@yuriai/web 0.2.40-beta.4 → 0.2.40-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AgentAvatar-BmT_6apW.js → AgentAvatar-XDXiFZvA.js} +1 -1
- package/dist/assets/AssistantConversationSurface-B59k-lXE.css +1 -0
- package/dist/assets/AssistantConversationSurface-CQnJaKTn.js +3 -0
- package/dist/assets/AssistantSessionCard-DXY8-wyP.js +2 -0
- package/dist/assets/{AssistantUnreadBadge-C34eOGCL.js → AssistantUnreadBadge-B-G015yE.js} +1 -1
- package/dist/assets/{AssistantView-0nXkM9VG.js → AssistantView-CasyQbii.js} +1 -1
- package/dist/assets/DiagramView-DhWnsM9v.js +1 -0
- package/dist/assets/{FadeInOnReveal-CCVdl9Vt.js → FadeInOnReveal-Ca9EVP3a.js} +1 -1
- package/dist/assets/{GuiPluginPage-BMt5AMqg.js → GuiPluginPage-DKOsUpVL.js} +1 -1
- package/dist/assets/GuiPluginSurface-BfXMBqdD.js +1 -0
- package/dist/assets/{GuiPluginWindow-BVvzrnp1.js → GuiPluginWindow-Dmg2Qui6.js} +1 -1
- package/dist/assets/{Icon-B5nBc6dO.js → Icon-ChyA050P.js} +1 -1
- package/dist/assets/{ImageLoadingPlaceholder-Bv5mmf2U.js → ImageLoadingPlaceholder-C8QUF5aV.js} +1 -1
- package/dist/assets/LoadingImage-BxRq1dMQ.js +1 -0
- package/dist/assets/MarkdownRenderer-CvWLikEO.js +2 -0
- package/dist/assets/MarkdownRendererImpl-CcNsQOEn.js +10 -0
- package/dist/assets/MarkstreamRendererImpl-D9W5XXPo.js +3 -0
- package/dist/assets/MobileDetailNavigation-CnwIZn5g.js +1 -0
- package/dist/assets/{MobileResizableSheet-D5PcZMuI.js → MobileResizableSheet-Bpp079l7.js} +1 -1
- package/dist/assets/MobileShareBridge-C-GpJfF6.js +3 -0
- package/dist/assets/MobileSurface-CrNI8cYQ.js +2 -0
- package/dist/assets/{MultiRunWindow-rMqP99ID.js → MultiRunWindow-DvywQkz9.js} +1 -1
- package/dist/assets/OnboardingScreen-BvueSxVk.js +1 -0
- package/dist/assets/{OverlayScrollbar-Byx2H3pc.js → OverlayScrollbar-CPaH_j8g.js} +1 -1
- package/dist/assets/RemoteAssistantSessionCard-CFWE00xD.js +1 -0
- package/dist/assets/SettingsView-Df6GCFPI.js +29 -0
- package/dist/assets/{SettingsWindow-U-RDDOS7.js → SettingsWindow-BpaRjeR-.js} +1 -1
- package/dist/assets/SetupTourDialog-DD_4qiTz.js +1 -0
- package/dist/assets/TerminalView-CRTtNAfA.js +8 -0
- package/dist/assets/ToolOutputDialog-omGmWntf.js +16 -0
- package/dist/assets/VoiceSettings-Du-Yd5MF.js +2 -0
- package/dist/assets/{YuriLogo-B58GIl2v.js → YuriLogo-CvyJy_R9.js} +1 -1
- package/dist/assets/YuriWordmark-B7lmpLRB.js +1 -0
- package/dist/assets/{assistant-attachment-cache-Cmzt4xXE.js → assistant-attachment-cache-D-LmCflm.js} +1 -1
- package/dist/assets/bootstrap-eLlfzqAI.js +1 -0
- package/dist/assets/{capgoAdapter-B5NImlKh.js → capgoAdapter-CqMX4zC-.js} +1 -1
- package/dist/assets/{checkbox-Bdj4n5cI.js → checkbox-KNAgqjPZ.js} +1 -1
- package/dist/assets/client-1Fk5IbQR.js +7 -0
- package/dist/assets/{collapsible-D1JZOgJZ.js → collapsible-CdiLY07j.js} +1 -1
- package/dist/assets/{context-menu-DDX0ZFhc.js → context-menu-CO_VRWeV.js} +1 -1
- package/dist/assets/{desktopHosts-DovfbQPm.js → desktopHosts-135cuRCE.js} +1 -1
- package/dist/assets/{desktopRelayRestore-D4pbpNKN.js → desktopRelayRestore-1aUztDPU.js} +1 -1
- package/dist/assets/{device-DNG0cNwQ.js → device-QL8KNSLM.js} +1 -1
- package/dist/assets/{diagram-C72TQWfh.js → diagram-9b-Aaful.js} +1 -1
- package/dist/assets/{dialog-CIKJalI5.js → dialog-8YYmYPFP.js} +1 -1
- package/dist/assets/{es-D0Q_CV0t.js → es-Ba3NUCtE.js} +3 -3
- package/dist/assets/{fileMentionTouchSelection-tnd9RDDh.js → fileMentionTouchSelection-CLQBqWR8.js} +1 -1
- package/dist/assets/fileReferenceActions-cYqdsXFz.js +1 -0
- package/dist/assets/{fr-DrO5SAKl.js → fr-CRhp3hyT.js} +3 -3
- package/dist/assets/{gitApi-BI8OG_ts.js → gitApi-uhoLUa-e.js} +11 -7
- package/dist/assets/gitApiHttp-B0FJaIhU.js +3 -0
- package/dist/assets/{gui-DN2sVP96.js → gui-BMN3-WPc.js} +1 -1
- package/dist/assets/historyImportQueries-D_9RlrLp.js +1 -0
- package/dist/assets/host-D9EDWNmx.js +1 -0
- package/dist/assets/{i18n-UaLestuf.js → i18n-RH7UieOS.js} +1 -1
- package/dist/assets/image-loading-DBqnxgDH.js +1 -0
- package/dist/assets/{input-gVHSS0EB.js → input-DK8VTvJw.js} +1 -1
- package/dist/assets/input-store-CsY-uaSj.js +1 -0
- package/dist/assets/insertionBoundaries-rYqUxuB-.js +1 -0
- package/dist/assets/{ja-BNeP9_GU.js → ja-D-UPjDY2.js} +3 -3
- package/dist/assets/{ko-DRRFD_7l.js → ko-x-z9J5z7.js} +3 -3
- package/dist/assets/main-BMx-2MjO.js +169 -0
- package/dist/assets/main-DzqojuZ1.js +2 -0
- package/dist/assets/{markdownHeightCache-B-FoaQ1U.js → markdownHeightCache-DAvnT6xF.js} +1 -1
- package/dist/assets/{markdownTheme-CHNl6tUv.js → markdownTheme-DFDWa8Gh.js} +1 -1
- package/dist/assets/mcpQueries-CpH8vPf1.js +1 -0
- package/dist/assets/miniChat-BTE_XpRk.js +2 -0
- package/dist/assets/mobile-BBZOulQ1.js +2 -0
- package/dist/assets/mobileBackNavigation-Cq08UPxZ.js +1 -0
- package/dist/assets/mobileConnections-ZehAozpe.js +2 -0
- package/dist/assets/multirun-Cll2Meol.js +3 -0
- package/dist/assets/{native-DsqzO52u.js → native-CDqNKjmz.js} +1 -1
- package/dist/assets/{native-config-DqDXViVx.js → native-config-DtUZFauV.js} +1 -1
- package/dist/assets/navigation-J3d8PQcs.js +2 -0
- package/dist/assets/openRemoteProjectSession-oJZpCDPT.js +1 -0
- package/dist/assets/{pl-BnW5wJrl.js → pl-Cqo1FJwM.js} +3 -3
- package/dist/assets/platform-wF65ZFgV.js +1 -0
- package/dist/assets/project-preview-2H-TmJkd.js +1 -0
- package/dist/assets/projectActions-50e_f9dI.js +1 -0
- package/dist/assets/projectMeta-BBpfOmij.js +1 -0
- package/dist/assets/prompt-attachment-upload-9fjmgafL.js +1 -0
- package/dist/assets/{pt-BR-fZW8CCVQ.js → pt-BR-C930XU1k.js} +3 -3
- package/dist/assets/pwa-C8B1Mf_t.js +2 -0
- package/dist/assets/queue-abort-optimistic-B1Uskf6F.js +1 -0
- package/dist/assets/{react-DeB-Vc_L.js → react-45rBMaUm.js} +1 -1
- package/dist/assets/{readiness-CIlvQ-aQ.js → readiness-CrjBrUa_.js} +2 -2
- package/dist/assets/reference-history-DqfMBWzF.js +1 -0
- package/dist/assets/relay-preview-frame-src-BPyz3nXA.js +1 -0
- package/dist/assets/remote-input-store-84i8uDyM.js +1 -0
- package/dist/assets/remoteProjectQueries-B6lrEDMq.js +1 -0
- package/dist/assets/remoteSessionReference-YiGvdabX.js +1 -0
- package/dist/assets/renderElectronMiniChatApp-BuHQB0V8.js +2 -0
- package/dist/assets/renderMobileApp-D_VswCi0.js +29 -0
- package/dist/assets/{runtime-file-download-DMY1k1af.js → runtime-file-download-D11Nnedg.js} +1 -1
- package/dist/assets/runtime-file-resource-CuLP3xp7.js +6 -0
- package/dist/assets/runtimeConfig-CMbNyYbK.js +2 -0
- package/dist/assets/{runtimeEndpointReset-BOdd_mJM.css → runtimeEndpointReset-BUGfn7y0.css} +1 -1
- package/dist/assets/runtimeEndpointReset-zo-HZQgX.js +151 -0
- package/dist/assets/safeStorage-DTOhKN0V.js +1 -0
- package/dist/assets/scheduledTaskNavigation-y5g8D2ee.js +1 -0
- package/dist/assets/{select-BwCKwnTH.js → select-VWoGVTBZ.js} +1 -1
- package/dist/assets/sessionLookup-JAf5UU7-.js +1 -0
- package/dist/assets/sortable-tabs-strip-Dbt3TTAs.js +1 -0
- package/dist/assets/{speechSettingsQueries-C5mPRWIv.js → speechSettingsQueries-Bidfcv0W.js} +1 -1
- package/dist/assets/src-BZCFf9_1.css +2 -0
- package/dist/assets/{store-CzVMz42v.js → store-DunGyOfe.js} +4 -4
- package/dist/assets/terminalApi-Cq0vjFe1.js +1 -0
- package/dist/assets/{textarea-CaTDyZrS.js → textarea-vyMsAV5p.js} +1 -1
- package/dist/assets/{tooltip-BvZzoiqg.js → tooltip-DWqHWi4N.js} +1 -1
- package/dist/assets/tour-CQMBn8gJ.js +1 -0
- package/dist/assets/{types-Bm8kDgSv.js → types-DeOkRCgE.js} +1 -1
- package/dist/assets/{uk-C4OKsNRv.js → uk-OXQSdzuT.js} +3 -3
- package/dist/assets/useAppFontEffects-K31q-1OV.css +1 -0
- package/dist/assets/{useAppFontEffects-C9IaiJgF.js → useAppFontEffects-z382Lhm_.js} +63 -58
- package/dist/assets/useAssistantUIStore-jOKVcBK8.js +1 -0
- package/dist/assets/useDesktopWindowControlsLayout-BEs7i5qj.js +1 -0
- package/dist/assets/{useDictation-Sk20Gi0T.js → useDictation-e68rFA6y.js} +1 -1
- package/dist/assets/useEffectiveDirectory-CcM3S1OQ.js +1 -0
- package/dist/assets/useFontPreferences-CO-L-Gd7.js +1 -0
- package/dist/assets/{useMobileHtmlPreviewStore-C03uVLfX.js → useMobileHtmlPreviewStore-EOAzZiAy.js} +1 -1
- package/dist/assets/useMobileNavigationStore-BA0IaUi_.js +13 -0
- package/dist/assets/usePluginsStore-BG5MW5LR.js +1 -0
- package/dist/assets/useProjectRuntimeAPIs-Be4gXG7P.js +1 -0
- package/dist/assets/{useStreamingTextThrottle-CeKHHK13.js → useStreamingTextThrottle-DylP9HFC.js} +1 -1
- package/dist/assets/{useThemeSystem-CNzUUkFn.js → useThemeSystem-C57Z9mV2.js} +1 -1
- package/dist/assets/useUIStore-Cfmg-aDQ.js +1 -0
- package/dist/assets/uuid-D-SDZijH.js +1 -0
- package/dist/assets/{vendor-base-ui-CzHs0bHY.js → vendor-base-ui-z2M4boRm.js} +1 -1
- package/dist/assets/{vendor-cmdk-C_tivUtr.js → vendor-cmdk-BgHvMv5l.js} +1 -1
- package/dist/assets/{vendor-dnd-kit-accessibility-BOtnpZt5.js → vendor-dnd-kit-accessibility-gVi9ga0x.js} +1 -1
- package/dist/assets/{vendor-dnd-kit-core-DK4OoOTr.js → vendor-dnd-kit-core-Dd5yS2-T.js} +1 -1
- package/dist/assets/{vendor-dnd-kit-sortable-Cv69eQm1.js → vendor-dnd-kit-sortable-CV-SGi8y.js} +1 -1
- package/dist/assets/{vendor-framer-motion-DDMKlXiP.js → vendor-framer-motion-CF9BQLta.js} +1 -1
- package/dist/assets/{vendor-markstream-react-6zxyQLCD.js → vendor-markstream-react-TwEpkgfP.js} +3 -3
- package/dist/assets/vendor-motion-Dv27UnOI.js +1 -0
- package/dist/assets/{vendor-opencode-client-cQ47ywrT.js → vendor-opencode-client-BM2r1f0o.js} +3 -3
- package/dist/assets/{vendor-opencode-plugin-BmdTE4Te.js → vendor-opencode-plugin-ZhpPgHCL.js} +1 -1
- package/dist/assets/{vendor-pierre-diffs-BFiZ3IhI.js → vendor-pierre-diffs-tqo4Z3TC.js} +1 -1
- package/dist/assets/{vendor-react-DlzBev0S.js → vendor-react-P8wFrkcT.js} +1 -1
- package/dist/assets/{vendor-react-drawio-Dyg1-39Q.js → vendor-react-drawio-CQW1YP2l.js} +1 -1
- package/dist/assets/vendor-reactuses-core-Dyjw5sZR.js +1 -0
- package/dist/assets/{vendor-solid-js-D98iXT7C.js → vendor-solid-js-BBVUd3Hw.js} +1 -1
- package/dist/assets/{vendor-sonner-BEHGipm5.js → vendor-sonner-B5HgJenP.js} +1 -1
- package/dist/assets/{vendor-stream-diffs-wcQxoPZk.js → vendor-stream-diffs-DCMtZcS3.js} +2 -2
- package/dist/assets/vendor-tanstack-query-core-BSjXNgF_.js +1 -0
- package/dist/assets/vendor-tanstack-react-query-B-KblYBV.js +1 -0
- package/dist/assets/{vendor-tanstack-react-virtual-DSFNK3qc.js → vendor-tanstack-react-virtual-BkuqzrEV.js} +1 -1
- package/dist/assets/{vendor-zustand-vDaAPGfl.js → vendor-zustand-Cwko4FG1.js} +1 -1
- package/dist/assets/{zh-CN-ieAs59w6.js → zh-CN-B5X8yCZV.js} +3 -3
- package/dist/assets/{zh-TW-WWTW1fkP.js → zh-TW-CF6zr1fk.js} +3 -3
- package/dist/index.html +32 -27
- package/dist/mini-chat.html +32 -27
- package/dist/mobile.html +2 -2
- package/package.json +3 -2
- package/server/index.d.ts +19 -0
- package/server/index.js +36 -5
- package/server/lib/assistants/DOCUMENTATION.md +87 -0
- package/server/lib/assistants/assign.js +10 -7
- package/server/lib/assistants/builtin-skills.js +1 -0
- package/server/lib/assistants/builtin-skills.test.js +1 -1
- package/server/lib/assistants/cards.js +6 -1
- package/server/lib/assistants/contact-store.js +22 -5
- package/server/lib/assistants/contact-tools.js +46 -26
- package/server/lib/assistants/execution-target.js +136 -0
- package/server/lib/assistants/opencode-tools.js +22 -9
- package/server/lib/assistants/remote-execution.test.js +378 -0
- package/server/lib/assistants/remote-watch-reconciler.js +43 -0
- package/server/lib/assistants/remote-watch-reconciler.test.js +88 -0
- package/server/lib/assistants/routes.js +1 -0
- package/server/lib/assistants/service.js +302 -99
- package/server/lib/assistants/yuri-project.http.test.js +2 -2
- package/server/lib/client-auth/remote-clients.js +11 -0
- package/server/lib/content-search/DOCUMENTATION.md +5 -0
- package/server/lib/content-search/routes.js +4 -0
- package/server/lib/content-search/routes.test.js +10 -0
- package/server/lib/event-stream/DOCUMENTATION.md +5 -0
- package/server/lib/event-stream/runtime.js +3 -0
- package/server/lib/event-stream/upstream-reader.js +1 -1
- package/server/lib/gui-customization/DOCUMENTATION.md +8 -2
- package/server/lib/gui-customization/projects-client.mjs +10 -8
- package/server/lib/gui-customization/projects-remote.js +101 -0
- package/server/lib/gui-customization/projects-remote.test.js +125 -0
- package/server/lib/gui-customization/projects.js +30 -6
- package/server/lib/gui-customization/projects.test.js +66 -1
- package/server/lib/gui-customization/session-skill.js +2 -2
- package/server/lib/gui-customization/session-skill.test.js +4 -0
- package/server/lib/gui-customization/skill/SKILL.md +3 -1
- package/server/lib/gui-customization/skill/references/projects.md +30 -3
- package/server/lib/gui-customization/skill/references/remote-connections.md +13 -0
- package/server/lib/message-queue/DOCUMENTATION.md +4 -0
- package/server/lib/message-queue/service.js +2 -1
- package/server/lib/message-queue/service.test.js +11 -0
- package/server/lib/notifications/emitter-runtime.js +5 -0
- package/server/lib/opencode/DOCUMENTATION.md +34 -0
- package/server/lib/opencode/core-routes.js +14 -2
- package/server/lib/opencode/core-routes.test.js +28 -0
- package/server/lib/opencode/feature-routes-runtime.js +8 -1
- package/server/lib/opencode/proxy.js +1 -0
- package/server/lib/opencode/routes.js +18 -4
- package/server/lib/opencode/routes.test.js +22 -0
- package/server/lib/opencode/settings-helpers.js +26 -0
- package/server/lib/opencode/settings-helpers.test.js +20 -0
- package/server/lib/opencode/settings-runtime.js +5 -3
- package/server/lib/opencode/settings-runtime.test.js +35 -0
- package/server/lib/opencode/v2-client.js +9 -4
- package/server/lib/preview/DOCUMENTATION.md +73 -0
- package/server/lib/preview/file-preview-path.js +37 -0
- package/server/lib/preview/file-target.js +38 -0
- package/server/lib/preview/file-target.test.js +111 -0
- package/server/lib/preview/proxy-runtime.js +110 -17
- package/server/lib/projects/DOCUMENTATION.md +6 -0
- package/server/lib/relay/tunnel-host.js +1 -0
- package/server/lib/remote-hosts/DOCUMENTATION.md +321 -0
- package/server/lib/remote-hosts/configuration.js +15 -0
- package/server/lib/remote-hosts/deadline.js +22 -0
- package/server/lib/remote-hosts/deadline.test.js +64 -0
- package/server/lib/remote-hosts/fixtures/settings-server.mjs +26 -0
- package/server/lib/remote-hosts/gateway.js +744 -0
- package/server/lib/remote-hosts/json-lifecycle.test.js +90 -0
- package/server/lib/remote-hosts/preview-scope.js +23 -0
- package/server/lib/remote-hosts/relay-client.ts +3 -0
- package/server/lib/remote-hosts/routes.js +429 -0
- package/server/lib/remote-hosts/routes.test.js +1427 -0
- package/server/lib/remote-hosts/settings-production.test.js +145 -0
- package/server/lib/remote-hosts/store.js +124 -0
- package/server/lib/remote-hosts/store.test.js +52 -0
- package/server/lib/remote-hosts/task-client.js +25 -0
- package/server/lib/remote-hosts/task-client.test.js +60 -0
- package/server/lib/remote-hosts/transport.js +118 -0
- package/server/lib/request-cors.js +1 -1
- package/server/lib/request-cors.test.js +1 -0
- package/server/lib/scheduled-tasks/session-skill.test.js +33 -2
- package/server/lib/session-folders/routes.js +1 -0
- package/server/lib/transcript-cache/DOCUMENTATION.md +4 -0
- package/server/lib/transcript-cache/routes.js +3 -0
- package/server/lib/transcript-cache/service.js +15 -0
- package/server/lib/transcript-cache/service.test.js +13 -0
- package/server/lib/ui-auth/DOCUMENTATION.md +18 -0
- package/server/lib/ui-auth/ui-auth.js +30 -2
- package/server/lib/ui-auth/ui-auth.test.js +46 -1
- package/dist/assets/AssistantConversationSurface-B-D-mLgs.js +0 -3
- package/dist/assets/AssistantConversationSurface-n9w_Av0k.css +0 -1
- package/dist/assets/DiagramView-BU6jWxKJ.js +0 -1
- package/dist/assets/GuiPluginSurface-kxAcgmf1.js +0 -1
- package/dist/assets/LoadingImage-BzBw_1lI.js +0 -1
- package/dist/assets/MarkdownRenderer-CoMohPOZ.js +0 -2
- package/dist/assets/MarkdownRendererImpl-DoZW1UKH.js +0 -10
- package/dist/assets/MarkstreamRendererImpl-B3zd5x2O.js +0 -3
- package/dist/assets/MobileDetailNavigation-bEZ_NA03.js +0 -1
- package/dist/assets/MobileShareBridge-Cjukxazk.js +0 -3
- package/dist/assets/MobileTabPageHeader-Da1maXx-.js +0 -2
- package/dist/assets/OnboardingScreen-CZhqHzAj.js +0 -1
- package/dist/assets/SettingsView-7Bea2DvF.js +0 -29
- package/dist/assets/SetupTourDialog-CKec5tUy.js +0 -1
- package/dist/assets/TerminalView-CS1oSAuY.js +0 -8
- package/dist/assets/ToolOutputDialog-BWhrFvvI.js +0 -10
- package/dist/assets/VoiceSettings-7aFmJq9Z.js +0 -2
- package/dist/assets/YuriWordmark--S-QEpRp.js +0 -1
- package/dist/assets/appThemeRegistry-LyWTE-mT.js +0 -1
- package/dist/assets/bootstrap-BhC95qVC.js +0 -1
- package/dist/assets/fileQueries-D9l0crnM.js +0 -1
- package/dist/assets/fileReferenceActions-BmquJskG.js +0 -1
- package/dist/assets/gitApiHttp-D4d-rgcR.js +0 -9
- package/dist/assets/historyImportQueries-DkB2_92i.js +0 -1
- package/dist/assets/host-kMLXU0hK.js +0 -1
- package/dist/assets/image-loading-BrDob6MW.js +0 -1
- package/dist/assets/insertionBoundaries-B-yZI6iY.js +0 -1
- package/dist/assets/main-BfAN93rT.js +0 -169
- package/dist/assets/main-DYWwmI_W.js +0 -2
- package/dist/assets/mcpQueries-CehWHIB1.js +0 -1
- package/dist/assets/miniChat-BlkcLQBr.js +0 -2
- package/dist/assets/mobile-I3Xe5NtO.js +0 -2
- package/dist/assets/mobileBackNavigation-BFUH-c-G.js +0 -1
- package/dist/assets/mobileConnections-BFvtbJXX.js +0 -2
- package/dist/assets/multirun-DdEjp77z.js +0 -3
- package/dist/assets/pathNormalization-ewtPqJWn.js +0 -1
- package/dist/assets/platform-DMsFWy1a.js +0 -1
- package/dist/assets/projectActions-C-9Z8R7y.js +0 -1
- package/dist/assets/projectMeta-BKgum5WN.js +0 -1
- package/dist/assets/pwa-BvKUY4Hk.js +0 -2
- package/dist/assets/queue-abort-optimistic-BcbiNk8t.js +0 -1
- package/dist/assets/renderElectronMiniChatApp-DIjWdFHu.js +0 -2
- package/dist/assets/renderMobileApp-CE0QyOH0.js +0 -29
- package/dist/assets/runtime-file-resource-CL7EVzOG.js +0 -2
- package/dist/assets/runtimeConfig-uhjQn4kK.js +0 -2
- package/dist/assets/runtimeEndpointReset-DezNESKT.js +0 -149
- package/dist/assets/scheduledTaskNavigation-FMDNRUnX.js +0 -1
- package/dist/assets/sessionLookup-DzKZsy-W.js +0 -1
- package/dist/assets/sortable-tabs-strip-m5JQrTx4.js +0 -1
- package/dist/assets/src-HgtAe3Q4.css +0 -2
- package/dist/assets/terminalApi-DK4KmfFn.js +0 -1
- package/dist/assets/touch-gestures-CErgaXZ7.js +0 -1
- package/dist/assets/tour-DDI0Zg7l.js +0 -1
- package/dist/assets/useAppFontEffects-RpgNbjA4.css +0 -1
- package/dist/assets/useAssistantUIStore-nNYL140o.js +0 -1
- package/dist/assets/useDesktopWindowControlsLayout-C3M12PjJ.js +0 -1
- package/dist/assets/useEffectiveDirectory-Do4UqfZR.js +0 -1
- package/dist/assets/useFontPreferences-DxzruDDQ.js +0 -1
- package/dist/assets/useMobileNavigationStore-InwdmuDX.js +0 -17
- package/dist/assets/usePluginsStore-BH4-CNcj.js +0 -1
- package/dist/assets/useUIStore-vvNwcOk3.js +0 -1
- package/dist/assets/useWorkerHighlightedLines-0XahwAbS.js +0 -7
- package/dist/assets/vendor-motion-C9oiAdx-.js +0 -1
- package/dist/assets/vendor-reactuses-core-CuTmqEMK.js +0 -1
- package/dist/assets/vendor-tanstack-query-core-Y_YoRHtC.js +0 -1
- package/dist/assets/vendor-tanstack-react-query-B-Wpqq5J.js +0 -1
- /package/dist/assets/{sessionLookup-8C8nv-EP.css → reference-history-8C8nv-EP.css} +0 -0
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { remotePreviewPrefix, REMOTE_PREVIEW_TOKEN_MARKER } from '../remote-hosts/preview-scope.js';
|
|
2
|
+
import { parseFilePreviewPath, filePreviewResponseBase } from './file-preview-path.js';
|
|
3
|
+
import { createFileTarget, resolveFileTargetResource, readFileTargetText } from './file-target.js';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
|
|
1
6
|
const DEFAULT_TARGET_TTL_MS = 30 * 60 * 1000;
|
|
2
7
|
const TOKEN_COOKIE_NAME = 'yuri_preview_token';
|
|
3
8
|
const TOKEN_QUERY_PARAM = 'yuri_preview_token';
|
|
@@ -169,8 +174,8 @@ export const classifyPreviewNavigation = ({ url, currentUrl, targetOrigin }) =>
|
|
|
169
174
|
}
|
|
170
175
|
|
|
171
176
|
const path = parsed.pathname || '/';
|
|
172
|
-
const proxyMatch = current?.pathname?.match(/^(\/api\/preview\/proxy\/[a-f0-9]{16,64})(?:\/|$)/i);
|
|
173
|
-
if (parsed.origin === current?.origin && path.startsWith('/api/preview/proxy/')) {
|
|
177
|
+
const proxyMatch = current?.pathname?.match(/^((?:\/api\/hosts\/[^/]+)?\/api\/preview\/proxy\/[a-f0-9]{16,64}(?:\/_file\/[a-f0-9]{32}\/(?:yuri_url_[A-Za-z0-9_-]{32}|-))?)(?:\/|$)/i);
|
|
178
|
+
if (parsed.origin === current?.origin && (path.startsWith('/api/preview/proxy/') || (proxyMatch && path.startsWith(`${proxyMatch[1]}/`)))) {
|
|
174
179
|
return { action: 'allow', url: parsed.toString() };
|
|
175
180
|
}
|
|
176
181
|
|
|
@@ -426,11 +431,11 @@ const PREVIEW_BRIDGE_SCRIPT = String.raw`(() => {
|
|
|
426
431
|
const parsed = new URL(value, window.location.href);
|
|
427
432
|
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') return { action: 'allow', url: parsed.toString() };
|
|
428
433
|
const current = new URL(window.location.href);
|
|
429
|
-
const proxyMatch = current.pathname.match(/^(\/api\/preview\/proxy\/[a-f0-9]{16,64})(?:\/|$)/i);
|
|
434
|
+
const proxyMatch = current.pathname.match(/^((?:\/api\/hosts\/[^/]+)?\/api\/preview\/proxy\/[a-f0-9]{16,64}(?:\/_file\/[a-f0-9]{32}\/(?:yuri_url_[A-Za-z0-9_-]{32}|-))?)(?:\/|$)/i);
|
|
430
435
|
if (parsed.origin === current.origin && parsed.pathname === current.pathname && parsed.search === current.search && parsed.hash) {
|
|
431
436
|
return { action: 'allow', url: parsed.toString() };
|
|
432
437
|
}
|
|
433
|
-
if (parsed.origin === current.origin && parsed.pathname.startsWith('/api/preview/proxy/')) {
|
|
438
|
+
if (parsed.origin === current.origin && (parsed.pathname.startsWith('/api/preview/proxy/') || (proxyMatch && parsed.pathname.startsWith(proxyMatch[1] + '/')))) {
|
|
434
439
|
return { action: 'allow', url: parsed.toString() };
|
|
435
440
|
}
|
|
436
441
|
if (proxyMatch && parsed.origin === current.origin && parsed.pathname.startsWith('/') && parsed.pathname.indexOf(proxyMatch[1]) !== 0 && TARGET_ORIGIN) {
|
|
@@ -477,7 +482,7 @@ const PREVIEW_BRIDGE_SCRIPT = String.raw`(() => {
|
|
|
477
482
|
if (window.__yuriViteHmrProxyPatched || typeof window.WebSocket !== 'function') return;
|
|
478
483
|
window.__yuriViteHmrProxyPatched = true;
|
|
479
484
|
const NativeWebSocket = window.WebSocket;
|
|
480
|
-
const proxyMatch = window.location.pathname.match(/^(\/api\/preview\/proxy\/[a-f0-9]{16,64})(?:\/|$)/i);
|
|
485
|
+
const proxyMatch = window.location.pathname.match(/^((?:\/api\/hosts\/[^/]+)?\/api\/preview\/proxy\/[a-f0-9]{16,64}(?:\/_file\/[a-f0-9]{32}\/(?:yuri_url_[A-Za-z0-9_-]{32}|-))?)(?:\/|$)/i);
|
|
481
486
|
if (!proxyMatch) return;
|
|
482
487
|
const proxyBase = proxyMatch[1] + '/';
|
|
483
488
|
const currentSearchParams = new URL(window.location.href).searchParams;
|
|
@@ -544,7 +549,7 @@ const PREVIEW_BRIDGE_SCRIPT = String.raw`(() => {
|
|
|
544
549
|
const installAppRequestProxyPatch = () => {
|
|
545
550
|
if (window.__yuriAppRequestProxyPatched) return;
|
|
546
551
|
window.__yuriAppRequestProxyPatched = true;
|
|
547
|
-
const proxyMatch = window.location.pathname.match(/^(\/api\/preview\/proxy\/[a-f0-9]{16,64})(?:\/|$)/i);
|
|
552
|
+
const proxyMatch = window.location.pathname.match(/^((?:\/api\/hosts\/[^/]+)?\/api\/preview\/proxy\/[a-f0-9]{16,64}(?:\/_file\/[a-f0-9]{32}\/(?:yuri_url_[A-Za-z0-9_-]{32}|-))?)(?:\/|$)/i);
|
|
548
553
|
if (!proxyMatch) return;
|
|
549
554
|
const proxyBase = proxyMatch[1];
|
|
550
555
|
const currentSearchParams = new URL(window.location.href).searchParams;
|
|
@@ -645,6 +650,7 @@ const PREVIEW_BRIDGE_SCRIPT = String.raw`(() => {
|
|
|
645
650
|
if (typeof input === 'string') {
|
|
646
651
|
return nativeFetch(proxiedUrl(input), init);
|
|
647
652
|
}
|
|
653
|
+
if (input instanceof URL) return nativeFetch(proxiedUrl(input.href), init);
|
|
648
654
|
if (input instanceof Request) {
|
|
649
655
|
try {
|
|
650
656
|
const parsed = new URL(input.url);
|
|
@@ -1058,7 +1064,7 @@ export const rewritePreviewBody = ({ bodyText, proxyBasePath, targetOrigin, kind
|
|
|
1058
1064
|
const rewriteResourceUrl = (value) => {
|
|
1059
1065
|
if (typeof value !== 'string' || value.length === 0) return value;
|
|
1060
1066
|
if (value.startsWith('/') && !value.startsWith('//')) {
|
|
1061
|
-
if (value.startsWith('/api/preview/proxy/')) return appendProxyAuthToProxyUrl(value, { previewToken, urlAuthToken });
|
|
1067
|
+
if (value.startsWith('/api/preview/proxy/') || value.startsWith(`${prefix}/`)) return appendProxyAuthToProxyUrl(value, { previewToken, urlAuthToken });
|
|
1062
1068
|
return appendProxyAuthToProxyUrl(`${prefix}${value}`, { previewToken, urlAuthToken });
|
|
1063
1069
|
}
|
|
1064
1070
|
try {
|
|
@@ -1194,11 +1200,17 @@ export const createPreviewProxyRuntime = ({
|
|
|
1194
1200
|
|
|
1195
1201
|
const now = () => Date.now();
|
|
1196
1202
|
|
|
1203
|
+
const revokeTarget = (id) => {
|
|
1204
|
+
const entry = targets.get(id);
|
|
1205
|
+
targets.delete(id);
|
|
1206
|
+
for (const cancel of entry?.resources || []) cancel();
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1197
1209
|
const sweepExpired = () => {
|
|
1198
1210
|
const t = now();
|
|
1199
1211
|
for (const [id, entry] of targets.entries()) {
|
|
1200
1212
|
if (entry.expiresAt <= t) {
|
|
1201
|
-
|
|
1213
|
+
revokeTarget(id);
|
|
1202
1214
|
}
|
|
1203
1215
|
}
|
|
1204
1216
|
};
|
|
@@ -1212,7 +1224,7 @@ export const createPreviewProxyRuntime = ({
|
|
|
1212
1224
|
sweepTimer.unref?.();
|
|
1213
1225
|
};
|
|
1214
1226
|
|
|
1215
|
-
const createTarget = (origin, ttlMs) => {
|
|
1227
|
+
const createTarget = (origin, ttlMs, fileTarget) => {
|
|
1216
1228
|
const id = crypto.randomBytes(16).toString('hex');
|
|
1217
1229
|
const token = crypto.randomBytes(16).toString('hex');
|
|
1218
1230
|
const createdAt = now();
|
|
@@ -1223,6 +1235,8 @@ export const createPreviewProxyRuntime = ({
|
|
|
1223
1235
|
token,
|
|
1224
1236
|
createdAt,
|
|
1225
1237
|
expiresAt,
|
|
1238
|
+
...fileTarget,
|
|
1239
|
+
resources: new Set(),
|
|
1226
1240
|
});
|
|
1227
1241
|
return { id, token, expiresAt };
|
|
1228
1242
|
};
|
|
@@ -1240,17 +1254,19 @@ export const createPreviewProxyRuntime = ({
|
|
|
1240
1254
|
|
|
1241
1255
|
const entry = targets.get(id);
|
|
1242
1256
|
if (!entry || entry.expiresAt <= now()) {
|
|
1243
|
-
|
|
1257
|
+
revokeTarget(id);
|
|
1244
1258
|
return { ok: false, status: 404, error: 'Preview target expired' };
|
|
1245
1259
|
}
|
|
1246
1260
|
|
|
1261
|
+
const filePath = entry.kind === 'file' ? parseFilePreviewPath(pathname) : null;
|
|
1262
|
+
if (entry.kind === 'file' && !filePath) return { ok: false, status: 403, error: 'Invalid file preview path' };
|
|
1247
1263
|
const cookies = parseCookieHeader(req.headers?.cookie);
|
|
1248
|
-
const token = parsed.searchParams.get(TOKEN_QUERY_PARAM) || cookies.get(TOKEN_COOKIE_NAME) || '';
|
|
1264
|
+
const token = filePath?.previewToken || parsed.searchParams.get(TOKEN_QUERY_PARAM) || cookies.get(TOKEN_COOKIE_NAME) || '';
|
|
1249
1265
|
if (!token || token !== entry.token) {
|
|
1250
1266
|
return { ok: false, status: 403, error: 'Preview token missing' };
|
|
1251
1267
|
}
|
|
1252
1268
|
|
|
1253
|
-
return { ok: true, id, entry, parsed };
|
|
1269
|
+
return { ok: true, id, entry, parsed, filePath };
|
|
1254
1270
|
};
|
|
1255
1271
|
|
|
1256
1272
|
const stripProxyPrefix = (pathname, id) => {
|
|
@@ -1362,6 +1378,16 @@ export const createPreviewProxyRuntime = ({
|
|
|
1362
1378
|
}
|
|
1363
1379
|
}
|
|
1364
1380
|
|
|
1381
|
+
if (req.body?.kind === 'file') {
|
|
1382
|
+
const file = await createFileTarget(req.body.directory, req.body.path);
|
|
1383
|
+
if (req.aborted || res.destroyed) return;
|
|
1384
|
+
const target = createTarget(null, req.body.ttlMs, file);
|
|
1385
|
+
res.once('close', () => { if (!res.writableFinished) revokeTarget(target.id); });
|
|
1386
|
+
return res.set('Cache-Control', 'no-store').json({
|
|
1387
|
+
id: target.id, kind: 'file', proxyBasePath: `${remotePreviewPrefix(req)}/api/preview/proxy/${target.id}`,
|
|
1388
|
+
entryPath: file.entryPath, previewToken: target.token, expiresAt: target.expiresAt,
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1365
1391
|
const rawUrl = typeof req.body?.url === 'string' ? req.body.url.trim() : '';
|
|
1366
1392
|
if (!rawUrl) {
|
|
1367
1393
|
return res.status(400).json({ error: 'url is required' });
|
|
@@ -1389,16 +1415,29 @@ export const createPreviewProxyRuntime = ({
|
|
|
1389
1415
|
|
|
1390
1416
|
return res.json({
|
|
1391
1417
|
id: target.id,
|
|
1392
|
-
proxyBasePath: cookiePath
|
|
1418
|
+
proxyBasePath: `${remotePreviewPrefix(req)}${cookiePath}`,
|
|
1393
1419
|
previewToken: target.token,
|
|
1394
1420
|
expiresAt: target.expiresAt,
|
|
1395
1421
|
});
|
|
1396
1422
|
} catch (error) {
|
|
1423
|
+
if (req.body?.kind === 'file') return res.status(error?.status || (error?.code === 'ENOENT' ? 404 : 500)).json({ error: 'File preview unavailable' });
|
|
1397
1424
|
console.error('[preview-proxy] Failed to create target:', error);
|
|
1398
1425
|
return res.status(500).json({ error: 'Failed to create preview target' });
|
|
1399
1426
|
}
|
|
1400
1427
|
});
|
|
1401
1428
|
|
|
1429
|
+
app.delete('/api/preview/targets/:id', express.json(), async (req, res) => {
|
|
1430
|
+
if (uiAuthController?.enabled) {
|
|
1431
|
+
if (!await uiAuthController.ensureSessionToken(req, res)) return res.status(401).json({ error: 'UI authentication required' });
|
|
1432
|
+
if (!await isRequestOriginAllowed(req)) return res.status(403).json({ error: 'Invalid origin' });
|
|
1433
|
+
}
|
|
1434
|
+
const entry = targets.get(req.params.id);
|
|
1435
|
+
if (!entry) return res.status(204).end();
|
|
1436
|
+
if (!req.body?.previewToken || req.body.previewToken !== entry.token) return res.status(403).json({ error: 'Preview token missing' });
|
|
1437
|
+
revokeTarget(req.params.id);
|
|
1438
|
+
return res.status(204).end();
|
|
1439
|
+
});
|
|
1440
|
+
|
|
1402
1441
|
const proxy = createProxyMiddleware({
|
|
1403
1442
|
target: 'http://127.0.0.1',
|
|
1404
1443
|
changeOrigin: true,
|
|
@@ -1417,7 +1456,10 @@ export const createPreviewProxyRuntime = ({
|
|
|
1417
1456
|
// contains the full path.
|
|
1418
1457
|
pathFilter: (pathname, req) => {
|
|
1419
1458
|
const target = req?.originalUrl || pathname || req?.url || '';
|
|
1420
|
-
|
|
1459
|
+
if (!target.startsWith('/api/preview/proxy/')) return false;
|
|
1460
|
+
if (/^\/api\/preview\/proxy\/[a-f0-9]{16,64}\/_file(?:\/|$)/i.test(target)) return false;
|
|
1461
|
+
const resolved = resolveTargetFromRequest(req);
|
|
1462
|
+
return !resolved.ok || resolved.entry.kind !== 'file';
|
|
1421
1463
|
},
|
|
1422
1464
|
router: (req) => {
|
|
1423
1465
|
const resolved = resolveTargetFromRequest(req);
|
|
@@ -1465,8 +1507,9 @@ export const createPreviewProxyRuntime = ({
|
|
|
1465
1507
|
return responseBuffer;
|
|
1466
1508
|
}
|
|
1467
1509
|
|
|
1468
|
-
const
|
|
1469
|
-
const
|
|
1510
|
+
const hubPrefix = remotePreviewPrefix(req);
|
|
1511
|
+
const proxyBasePath = `${hubPrefix}/api/preview/proxy/${resolved.id}`;
|
|
1512
|
+
const urlAuthToken = hubPrefix ? REMOTE_PREVIEW_TOKEN_MARKER : resolved.parsed.searchParams.get(URL_AUTH_TOKEN_QUERY_PARAM) || '';
|
|
1470
1513
|
if (typeof proxyRes.headers?.location === 'string') {
|
|
1471
1514
|
proxyRes.headers.location = rewritePreviewRedirectLocation({
|
|
1472
1515
|
location: proxyRes.headers.location,
|
|
@@ -1475,6 +1518,7 @@ export const createPreviewProxyRuntime = ({
|
|
|
1475
1518
|
previewToken: resolved.entry.token,
|
|
1476
1519
|
urlAuthToken,
|
|
1477
1520
|
});
|
|
1521
|
+
res.setHeader('location', proxyRes.headers.location);
|
|
1478
1522
|
}
|
|
1479
1523
|
|
|
1480
1524
|
const contentType = String(proxyRes.headers?.['content-type'] || '').toLowerCase();
|
|
@@ -1548,19 +1592,68 @@ export const createPreviewProxyRuntime = ({
|
|
|
1548
1592
|
},
|
|
1549
1593
|
});
|
|
1550
1594
|
|
|
1551
|
-
app.use('/api/preview/proxy', (req, res, next) => {
|
|
1595
|
+
app.use('/api/preview/proxy', async (req, res, next) => {
|
|
1552
1596
|
const resolved = resolveTargetFromRequest(req);
|
|
1553
1597
|
if (!resolved.ok) {
|
|
1554
1598
|
return res.status(resolved.status).json({ error: resolved.error });
|
|
1555
1599
|
}
|
|
1600
|
+
if (resolved.entry.kind === 'file') {
|
|
1601
|
+
// Network previews retain a legacy capability-only access gate. A file
|
|
1602
|
+
// target must still pass ordinary client/session auth, even if a caller
|
|
1603
|
+
// supplies that legacy network query/cookie alongside the file envelope.
|
|
1604
|
+
if (typeof uiAuthController?.requireAuth === 'function') {
|
|
1605
|
+
let authorized = false;
|
|
1606
|
+
await uiAuthController.requireAuth(req, res, () => { authorized = true; });
|
|
1607
|
+
if (!authorized) return;
|
|
1608
|
+
} else if (uiAuthController?.enabled && !await uiAuthController.ensureSessionToken(req, res)) {
|
|
1609
|
+
return res.status(401).json({ error: 'UI authentication required' });
|
|
1610
|
+
}
|
|
1611
|
+
if (req.aborted || res.destroyed) return;
|
|
1612
|
+
if (!['GET', 'HEAD'].includes(req.method)) return res.status(405).set('Allow', 'GET, HEAD').end();
|
|
1613
|
+
const controller = new AbortController();
|
|
1614
|
+
const cancel = () => { controller.abort(); res.destroy(); };
|
|
1615
|
+
const cleanup = () => {
|
|
1616
|
+
controller.abort(); clearTimeout(expiry); resolved.entry.resources.delete(cancel);
|
|
1617
|
+
};
|
|
1618
|
+
const expiry = setTimeout(cancel, Math.min(2147483647, Math.max(0, resolved.entry.expiresAt - now())));
|
|
1619
|
+
expiry.unref?.();
|
|
1620
|
+
resolved.entry.resources.add(cancel);
|
|
1621
|
+
res.once('close', cleanup);
|
|
1622
|
+
res.set({ 'Cache-Control': 'no-store', 'Referrer-Policy': 'no-referrer', 'X-Content-Type-Options': 'nosniff' });
|
|
1623
|
+
try {
|
|
1624
|
+
const file = await resolveFileTargetResource(resolved.entry.root, resolved.filePath.resourcePath);
|
|
1625
|
+
controller.signal.throwIfAborted();
|
|
1626
|
+
res.type(path.extname(file));
|
|
1627
|
+
const contentType = String(res.getHeader('Content-Type'));
|
|
1628
|
+
const kind = contentType.includes('text/html') ? 'html' : contentType.includes('text/css') ? 'css'
|
|
1629
|
+
: /javascript|ecmascript/.test(contentType) ? 'javascript' : null;
|
|
1630
|
+
if (!kind || req.method === 'HEAD') return res.sendFile(file, { dotfiles: 'allow', cacheControl: false, lastModified: false });
|
|
1631
|
+
const bodyText = await readFileTargetText(file, controller.signal);
|
|
1632
|
+
controller.signal.throwIfAborted();
|
|
1633
|
+
const proxyBasePath = filePreviewResponseBase(resolved.filePath, remotePreviewPrefix(req));
|
|
1634
|
+
const rewritten = rewritePreviewBody({ bodyText, proxyBasePath, kind });
|
|
1635
|
+
return res.send(kind === 'html' ? injectPreviewBridge(rewritten, '', '') : rewritten);
|
|
1636
|
+
} catch (error) {
|
|
1637
|
+
if (controller.signal.aborted || res.destroyed) return;
|
|
1638
|
+
return res.status(error?.status || (error?.code === 'ENOENT' ? 404 : error?.code === 'EACCES' ? 403 : 500)).json({ error: 'File preview unavailable' });
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1556
1641
|
next();
|
|
1557
1642
|
}, proxy);
|
|
1558
1643
|
|
|
1559
1644
|
server.on('upgrade', (req, socket, head) => {
|
|
1645
|
+
if (/^\/api\/preview\/proxy\/[a-f0-9]{16,64}\/_file(?:\/|$)/i.test(req.url || '')) {
|
|
1646
|
+
rejectWebSocketUpgrade(socket, 405, 'File preview is read-only');
|
|
1647
|
+
return;
|
|
1648
|
+
}
|
|
1560
1649
|
const resolved = resolveTargetFromRequest(req);
|
|
1561
1650
|
if (!resolved.ok) {
|
|
1562
1651
|
return;
|
|
1563
1652
|
}
|
|
1653
|
+
if (resolved.entry.kind === 'file') {
|
|
1654
|
+
rejectWebSocketUpgrade(socket, 405, 'File preview is read-only');
|
|
1655
|
+
return;
|
|
1656
|
+
}
|
|
1564
1657
|
|
|
1565
1658
|
const handleUpgrade = async () => {
|
|
1566
1659
|
try {
|
|
@@ -30,3 +30,9 @@ and result contract live in `../gui-customization/DOCUMENTATION.md`.
|
|
|
30
30
|
writes, persistence, offline-project retention, corrupt
|
|
31
31
|
reads and failed-write preservation. Assistant HTTP integration is covered in
|
|
32
32
|
`../assistants/yuri-project.http.test.js`.
|
|
33
|
+
|
|
34
|
+
The Remote Host Gateway mounts authenticated `POST /api/projects` and `PATCH
|
|
35
|
+
/api/projects/:id` local-authority operations using the same registry/settings
|
|
36
|
+
lock. `GET /api/projects` excludes remote references. Remote-first registration,
|
|
37
|
+
metadata write-through and Hub-only reference removal belong to
|
|
38
|
+
`../remote-hosts/`, not this local filesystem registry.
|
|
@@ -49,6 +49,7 @@ const PREVIEW_PROXY_WS_PATH_PREFIX = '/api/preview/proxy/';
|
|
|
49
49
|
*/
|
|
50
50
|
export const isTunnelWsPathAllowed = (path) => {
|
|
51
51
|
if (typeof path !== 'string' || !path) return false;
|
|
52
|
+
if (/^\/api\/hosts\/[^/]+\/api\/(?:terminal\/ws(?:\?|$)|preview\/proxy\/)/.test(path)) return true;
|
|
52
53
|
// Path only (no query) — tunnel open payload already splits query.
|
|
53
54
|
if (ALLOWED_WS_PATHS.has(path)) return true;
|
|
54
55
|
try {
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
# Remote Host Gateway
|
|
2
|
+
|
|
3
|
+
`server/index.js` constructs this module before the generic OpenCode proxy and
|
|
4
|
+
stops it before closing the local session index. Electron injects the process-local
|
|
5
|
+
adapter from `packages/electron/remote-hosts.mjs`. The adapter reads that computer's
|
|
6
|
+
saved hosts/SSH manager, never the focused window's selected runtime. CLI/web/VS
|
|
7
|
+
Code instances without an adapter report `supported: false`; desktop and
|
|
8
|
+
SSH-managed PC instances expose the local-project authority protocol.
|
|
9
|
+
|
|
10
|
+
## Ownership and persistence
|
|
11
|
+
|
|
12
|
+
Resource authority is distinct from a connection: `remote_host_authority` pins a
|
|
13
|
+
saved `hostId` to the first authenticated capabilities `instanceId`. Reopening,
|
|
14
|
+
credential rotation and transport reconnection preserve the pin. A different
|
|
15
|
+
instance returns `remote_instance_mismatch` before resource reads or mutations;
|
|
16
|
+
old project references and snapshots remain available. Existing databases acquire
|
|
17
|
+
this pin on their first successful admission. Separate SSH/Relay connection records
|
|
18
|
+
and credentials remain separate, even when their `instanceId` matches. Public Hosts
|
|
19
|
+
and project references expose the pinned identity. The optional Hub-only
|
|
20
|
+
`X-Yuri-Target-Instance` request header checks an explicit resource reference and
|
|
21
|
+
is stripped before forwarding upstream.
|
|
22
|
+
|
|
23
|
+
Server-owned work uses `acquireTask(hostId, { instanceId, signal, onEvent })`.
|
|
24
|
+
The returned immutable lease owns its authenticated target, fenced request/JSON
|
|
25
|
+
methods and idempotent release. Plain reads retain a short HTTP demand; `onEvent`
|
|
26
|
+
retains only that Host's existing shared status reader independently of UI windows.
|
|
27
|
+
Task callbacks receive metadata/status events, never a second transcript mirror.
|
|
28
|
+
Tasks release on completion/cancellation; persistent watches own their lease until
|
|
29
|
+
settlement and re-acquire from their explicit target during recovery. No UI and no
|
|
30
|
+
task demand still means zero remote readers/transports. Revocation/retargeting
|
|
31
|
+
rejects stale leases; it never dispatches against the Hub's local OpenCode service.
|
|
32
|
+
Official SDK task mutations use the existing long-running operation budget; reads
|
|
33
|
+
retain the short budget. Status projection retains only allowlisted interruption
|
|
34
|
+
reasons and a `MessageAbortedError` name marker, never raw error messages/stacks.
|
|
35
|
+
Task status also covers authorized remote sessions whose project has not been
|
|
36
|
+
associated with the Hub sidebar. Those events go only to the task consumer and do
|
|
37
|
+
not create project references or index rows. Content-channel messages never reach
|
|
38
|
+
task status callbacks.
|
|
39
|
+
|
|
40
|
+
- `store.js` owns `remote-hosts.sqlite`: stable Hub identity, remote-project
|
|
41
|
+
references, safe presentation fields, connection receipts and bounded-shape
|
|
42
|
+
unread/folder/order snapshots. `(hostId, path)` is unique. Missing hosts retain
|
|
43
|
+
their reference and display record; removing a reference never deletes remote
|
|
44
|
+
sessions, files or projects.
|
|
45
|
+
`saveProject` is explicit association/upsert; asynchronous metadata completions
|
|
46
|
+
use `refreshProject(reference, remote)` instead. The latter only updates the
|
|
47
|
+
matching existing id/Host/path/addedAt/remoteProjectId row and returns null if it was removed
|
|
48
|
+
or replaced. A late refresh or PATCH must never recreate a deleted reference.
|
|
49
|
+
`hasProjects()` uses SQLite EXISTS-style `SELECT 1 ... LIMIT 1`, never a Host
|
|
50
|
+
lookup, subscription or timer. Existing settings bootstrap and full settings
|
|
51
|
+
project it as read-only `hasRemoteProjects`. Successful reference creation or
|
|
52
|
+
removal sends the existing content-free `yuri:project-order-changed` global
|
|
53
|
+
invalidation tip, including the first/last reference transition. Clients refresh
|
|
54
|
+
their existing bootstrap/settings query, not an unconditional hosts request.
|
|
55
|
+
Hub project order and collapse live only in settings `hubProjectLayout`, not
|
|
56
|
+
in remote metadata or local `projects`. See the settings module contract.
|
|
57
|
+
- `gateway.js` owns connections, shared status/content readers, generation fences,
|
|
58
|
+
owner cancellation and the fair two-slot refresh queue. Remote summaries use
|
|
59
|
+
the existing session-index service and its newest-20 directory bound. Each
|
|
60
|
+
partition hashes `hub:<stable Hub ID>:remote-host:<host ID>`; no mutable local
|
|
61
|
+
runtime endpoint or local filesystem resolution participates.
|
|
62
|
+
- `transport.js` owns authenticated direct/SSH-forwarded requests and reuses the
|
|
63
|
+
normative E2EE Relay client. `build:remote-host-relay` compiles that client once;
|
|
64
|
+
normal web build/prepack and `build:llm-bridge` include the build. The generated
|
|
65
|
+
bundle ships inside the web server resources, not as a new dependency.
|
|
66
|
+
Both direct and Relay normalize Fetch `HeadersInit` (Headers/record/pairs)
|
|
67
|
+
before merging target authentication case-insensitively; SDK content-type and
|
|
68
|
+
directory headers survive without forwarding the caller's authorization.
|
|
69
|
+
- `routes.js` owns external authorization, host-scoped HTTP/WS routing and demand
|
|
70
|
+
tracking on the existing global client stream. `preview-scope.js` carries only
|
|
71
|
+
a relative host prefix and a nonsecret marker across the remote preview pipe;
|
|
72
|
+
real Hub URL tokens are inserted on the Hub, never sent upstream.
|
|
73
|
+
|
|
74
|
+
There is no remote message/part/transcript table. Remote content events bypass the
|
|
75
|
+
Hub's transcript, message queue, search indexing and upstream watcher side effects.
|
|
76
|
+
Remote queue requests execute on the target machine through the prefix proxy.
|
|
77
|
+
The local HTTP transcript-cache rejects explicit remote scopes; client IndexedDB
|
|
78
|
+
is the only Hub-client content acceleration store. Configuration catalogs are
|
|
79
|
+
read-only projected views; raw settings/config files and machine mutations are
|
|
80
|
+
not proxy capabilities.
|
|
81
|
+
|
|
82
|
+
## HTTP protocol
|
|
83
|
+
|
|
84
|
+
The client proxy permits `PUT /api/yuri/sessions/:id/archive` for Host-owned
|
|
85
|
+
archive/unarchive writes and `PUT /api/yuri/sessions/:id/metadata` for metadata
|
|
86
|
+
patches. These are exact method/path capabilities, not a blanket
|
|
87
|
+
allowance for `/api/yuri/sessions/*`; normal client/Host authorization and target
|
|
88
|
+
authority fences still apply.
|
|
89
|
+
|
|
90
|
+
`task-client.js` exports `makeRemoteTaskOpenCodeClient(lease)` for trusted
|
|
91
|
+
in-process Assistant and bound-project consumers. It preserves official SDK
|
|
92
|
+
Request method, headers, JSON body, query and abort signal through `lease.request`.
|
|
93
|
+
The synthetic SDK base origin is never fetched; every route terminates at the
|
|
94
|
+
lease's authenticated target Yuri proxy. That proxy's current runtime gate owns
|
|
95
|
+
write admission (`executionAdmission: 'target-yuri-proxy'`), not the Hub's unrelated
|
|
96
|
+
OpenCode availability. Target rejection propagates without fallback/retry. This
|
|
97
|
+
factory owns neither the lease lifetime nor body persistence; consumers release
|
|
98
|
+
short reads in `finally` and retain background watch demand until settlement.
|
|
99
|
+
|
|
100
|
+
- `GET /api/hosts`: `{supported, hubId, hosts, projects, reason?}`; local SQLite /
|
|
101
|
+
saved descriptors only, no probe. Public hosts contain id/name/source/state,
|
|
102
|
+
available, generation, safe error/timestamps/version, never URLs/credentials.
|
|
103
|
+
`scopeGeneration` is an opaque in-process authorization/configuration epoch,
|
|
104
|
+
independent of `generation`, which identifies the physical event connection.
|
|
105
|
+
Releasing an unreferenced short HTTP transport leaves its scope epoch intact;
|
|
106
|
+
credential/target descriptor changes or observed Host removal and re-addition
|
|
107
|
+
create a fresh epoch, including when old credentials are restored (no ABA reuse).
|
|
108
|
+
The identity record has no transport, reader, timer or background IO. It is
|
|
109
|
+
bounded by the current saved Host catalog and cleared on shutdown. Clients fence
|
|
110
|
+
captured HTTP/query scopes by this epoch and continue fencing events by wire
|
|
111
|
+
generation. Current-connection checks still reject late physical responses.
|
|
112
|
+
- `GET /api/hosts/projects`: persisted Hub references.
|
|
113
|
+
- `POST /api/hosts/:hostId/projects {path,label?}`: remote register first, then
|
|
114
|
+
upsert the Hub reference. A Hub disk failure leaves the remote project intact;
|
|
115
|
+
retry associates the same canonical remote path and deterministic Hub ID.
|
|
116
|
+
The UI route and bound session `add-remote` share `gateway.registerProject`.
|
|
117
|
+
It captures an authenticated task lease (and checks an explicit instance ID),
|
|
118
|
+
validates the remote response, persists the reference and emits the same
|
|
119
|
+
project-order tip. Every outcome releases the lease. Route resource-expiry
|
|
120
|
+
tracking listens to this tip, including when an Agent creates the first reference.
|
|
121
|
+
- `PATCH /api/hosts/:hostId/projects/:projectId`: remote metadata write-through;
|
|
122
|
+
cache updates only on successful authority response.
|
|
123
|
+
- `DELETE` on that path removes only the reference.
|
|
124
|
+
- `GET /api/hosts/:hostId/summaries`: immediate SQLite snapshot, stale marker,
|
|
125
|
+
connection receipts and unread/folder/order snapshots. Offline live status is
|
|
126
|
+
`metadata.yuri.sessionStatus = {type:'unknown',lastKnown}`.
|
|
127
|
+
Opening a replacement status stream does not make persisted activity live:
|
|
128
|
+
the snapshot remains stale/unknown until that connection completes its refresh.
|
|
129
|
+
`worktrees` contains `projectDirectories: Record<projectRoot, string[]>` and
|
|
130
|
+
`staleProjectDirectories: string[]`. These are path-only metadata from the
|
|
131
|
+
remote Git worktree catalog, never locally resolved paths. Root subdirectories
|
|
132
|
+
and verified worktrees outside the project root participate in summaries,
|
|
133
|
+
status ingestion and content leases. Explicit project roots take precedence;
|
|
134
|
+
a nested source project maps only its suffix within the longest authoritative
|
|
135
|
+
checkout: `/repo/src` with checkouts `/repo` and `/other` maps `/other/src`,
|
|
136
|
+
never the entire `/other`. Filesystem presence remains a remote operation;
|
|
137
|
+
the Hub does not stat or resolve these paths on its own filesystem.
|
|
138
|
+
- `POST /api/hosts/:hostId/connect`: explicit foreground wake. The response awaits
|
|
139
|
+
native SSH preparation and authenticated capability admission; callers entering
|
|
140
|
+
the directory picker wait for this acknowledgement, not a cached status label.
|
|
141
|
+
Without project references no status stream is opened, so the response's live
|
|
142
|
+
status can still be `connecting` despite successful HTTP admission. Subsequent
|
|
143
|
+
short requests reuse the native manager's matching live Ready tunnel rather
|
|
144
|
+
than repeatedly restarting SSH initialization.
|
|
145
|
+
- `POST /api/hosts/:hostId/subscriptions {directory,sessionId?}`: content lease;
|
|
146
|
+
`DELETE /.../subscriptions/:id` releases only the authenticated owner's lease.
|
|
147
|
+
- The shared worktree dialog forwards read-only (`GET`/`HEAD`)
|
|
148
|
+
`/api/github/auth/status`, `/api/github/issues/{list,get,comments}`,
|
|
149
|
+
`/api/github/pulls/{list,context}`, and `/api/magic-prompts`. These exact
|
|
150
|
+
routes supply Host GitHub availability, linked context and prompt templates;
|
|
151
|
+
GitHub authentication mutations and prompt-template writes remain forbidden.
|
|
152
|
+
- `/api/hosts/:hostId/api/*`: supported project/session APIs preserve method,
|
|
153
|
+
body, query, directory headers, cancellation and streaming. Client credentials,
|
|
154
|
+
cookies, arbitrary destinations, recursive host APIs and machine-level writes
|
|
155
|
+
do not cross this boundary. Large bodies/streams do not inherit the index's
|
|
156
|
+
15-second response-body deadline. Every proxy request still has a bounded
|
|
157
|
+
response-header wait; receiving headers clears that deadline for streaming bodies.
|
|
158
|
+
Snapshots/session reads use the short request budget. Mutations (including
|
|
159
|
+
synchronous shell) and file/preview transfers use a separate five-minute
|
|
160
|
+
operation header budget, rather than being cut off by the 15-second index
|
|
161
|
+
budget. Ordinary JSON bodies remain bounded; file/SSE bodies stay cancellable
|
|
162
|
+
without a fixed total-body deadline.
|
|
163
|
+
`deadline.js` preserves those budgets and TimeoutError semantics while clearing
|
|
164
|
+
deadline timers immediately when their request/connection parent is cancelled.
|
|
165
|
+
Its unref timers weakly retain their owner and are finalized when an abandoned
|
|
166
|
+
signal is collected; completed calls cannot keep a disconnected Host's timeout
|
|
167
|
+
work alive. Streaming responses retain only the existing response-header timer,
|
|
168
|
+
never a new fixed body deadline. Cancellation still reaches the transport and
|
|
169
|
+
all existing authorization/generation fences remain authoritative.
|
|
170
|
+
Gateway-owned `json()` reads additionally retain a request-local consumption
|
|
171
|
+
signal through body parsing and the final descriptor/current-connection check.
|
|
172
|
+
Their `finally` cancels only that local owner on success or failure, clearing
|
|
173
|
+
its deadline without cancelling the shared connection or sibling requests.
|
|
174
|
+
Receiving headers alone never completes this owner; raw/streaming `request()`
|
|
175
|
+
responses retain their existing lifecycle and budgets.
|
|
176
|
+
Optional file reads preserve the Remote's `x-yuri-file-exists` response header:
|
|
177
|
+
an existing empty file and a missing file both have empty bodies, but remain
|
|
178
|
+
distinct. Attachment uploads preserve `x-yuri-content-length`, `x-yuri-sha256`,
|
|
179
|
+
`x-yuri-mime` and `x-yuri-filename` along with their original body bytes; size
|
|
180
|
+
and digest validation still execute on the Remote. These allowlisted metadata
|
|
181
|
+
headers never replace Remote authentication or forward Hub credentials.
|
|
182
|
+
- `/api/hosts/:hostId/api/terminal/ws` and `/api/hosts/:hostId/api/preview/proxy/*`
|
|
183
|
+
mount real upgrades, mirrored in Relay and URL-token allowlists. Host removal
|
|
184
|
+
closes direct sockets and Relay substreams, including pending handshakes.
|
|
185
|
+
Client revocation tracks the raw upgrade socket before waiting for the upstream;
|
|
186
|
+
authorization is checked again immediately before accepting the upgrade.
|
|
187
|
+
Upstream message handling is installed at socket creation, before awaiting
|
|
188
|
+
physical connection validation or downstream authorization. Frames arriving
|
|
189
|
+
during admission (including the terminal protocol's immediate binary `ok`)
|
|
190
|
+
are held in an ordered, memory-only queue capped at 1 MiB and 256 frames.
|
|
191
|
+
They are forwarded with unchanged text/binary types only after the second
|
|
192
|
+
authorization check and client upgrade. Overflow fails the upgrade and closes
|
|
193
|
+
the upstream; revocation, socket closure and failure discard the queue.
|
|
194
|
+
Direct and E2EE Relay use the same admission path. No greeting is synthesized
|
|
195
|
+
and no terminal handshake timeout is extended to conceal missing frames.
|
|
196
|
+
|
|
197
|
+
The target-side local authority is `GET/POST /api/projects` and `PATCH
|
|
198
|
+
/api/projects/:id`. It only returns local projects. Authenticated
|
|
199
|
+
`/api/hosts/capabilities` advertises protocol 1 and the stable instance identity;
|
|
200
|
+
old/unavailable capability servers return a structured incompatible failure.
|
|
201
|
+
Transport admission uses this protected endpoint for both client authorization
|
|
202
|
+
and protocol negotiation, then reuses the result in the Gateway. It does not
|
|
203
|
+
require a separate `/auth/session` round trip or accept an unauthenticated health
|
|
204
|
+
response as authorization.
|
|
205
|
+
|
|
206
|
+
## Real time and lifecycle
|
|
207
|
+
|
|
208
|
+
The target-side `/api/hosts/status-stream` subscribes to the target's existing
|
|
209
|
+
server-owned event hub and product tips. It projects only session-summary/status
|
|
210
|
+
fields; token/part/message deltas and inbox bodies never travel this status stream.
|
|
211
|
+
Native execution/inbox boundaries, unread/order/folder and project revisions are
|
|
212
|
+
covered. The Hub holds one such subscription per referenced host while an
|
|
213
|
+
authorized global client stream is present, and no periodic full-list poll.
|
|
214
|
+
Short HTTP operations retain only their target transport, not a status observer;
|
|
215
|
+
creating projects without a global stream cannot start background index scans.
|
|
216
|
+
After the final project reference is removed, the last temporary HTTP/WS holder
|
|
217
|
+
also closes that Host connection when it releases. A global Hub stream alone
|
|
218
|
+
does not keep an unreferenced Host alive; late release callbacks after shutdown
|
|
219
|
+
do not query the already-closed SQLite store.
|
|
220
|
+
The first status connection, reconnection and `yuri:worktree-topology-changed`
|
|
221
|
+
invalidate the remote worktree catalog. Ordinary summary/status changes reuse
|
|
222
|
+
it. Refresh requests retain the existing per-Host serial/two-Host global budget.
|
|
223
|
+
Those topology edges also enqueue the referenced roots and verified worktrees
|
|
224
|
+
through the remote `/api/yuri/session-index/sync` scheduler. Merely reading its
|
|
225
|
+
SQLite snapshot would leave a headless remote's imported sessions undiscovered.
|
|
226
|
+
Subsequent revision tips pull the updated snapshot; ordinary index tips never
|
|
227
|
+
enqueue the same scan again. An empty snapshot while the scheduler is active
|
|
228
|
+
remains stale. No remote UI window is required to initialize the index.
|
|
229
|
+
A failed project's catalog keeps its prior mapping with an explicit stale root;
|
|
230
|
+
it cannot erase another project's summaries or replace failure with empty success.
|
|
231
|
+
Removing a verified worktree hides its old summary partition without deleting
|
|
232
|
+
remote sessions. The directory resolver is built once per snapshot, rather than
|
|
233
|
+
reading the SQLite project/catalog tables for each session bucket.
|
|
234
|
+
|
|
235
|
+
OpenCode form reads/replies (`/api/form`) are project/session operations and pass
|
|
236
|
+
through the same authenticated Host proxy as permission and question operations.
|
|
237
|
+
Reconnection uses bounded jittered backoff; one-second source heartbeats permit
|
|
238
|
+
the 1.5-second stream stall detector to invalidate live status promptly.
|
|
239
|
+
|
|
240
|
+
The client's existing global stream carries:
|
|
241
|
+
|
|
242
|
+
```ts
|
|
243
|
+
{ type: 'yuri:host-status', properties: { hubId, hostId, host } }
|
|
244
|
+
{ type: 'yuri:host-event', properties: { hubId, hostId, generation, directory?, payload } }
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Content demand is shared by `(hostId,directory,sessionId)`. Its eight-channel cap
|
|
248
|
+
never evicts an active reader: a ninth distinct active channel returns 429. Zero
|
|
249
|
+
observer channels are immediately released. Every active lease gets its own
|
|
250
|
+
`yuri:content-ready` payload `{id:leaseId,sessionId,channelId,readyGeneration}`;
|
|
251
|
+
late joiners get current ready and upstream reconnect changes readyGeneration.
|
|
252
|
+
Clients deduplicate by lease plus ready generation, then fetch the authority tail.
|
|
253
|
+
The last global stream for an owner releases all its leases. Pending acquisitions
|
|
254
|
+
capture the owner's cancellation generation and cannot recreate a revoked lease.
|
|
255
|
+
|
|
256
|
+
No references means zero added background network requests/readers/timers. No
|
|
257
|
+
clients means status/content readers, retry timers and Relay sockets are closed.
|
|
258
|
+
Interactive session reads/mutations preempt every host's refresh; interrupted
|
|
259
|
+
refreshes are requeued. Continued network waits suppress only their own host's
|
|
260
|
+
refresh, so a slow response cannot freeze unrelated hosts. Up to two hosts refresh concurrently,
|
|
261
|
+
one per host. Failure/partial/aborted reads preserve the prior snapshot.
|
|
262
|
+
|
|
263
|
+
## Security
|
|
264
|
+
|
|
265
|
+
Aggregation requires a real desktop-local bearer or a current desktop/mobile
|
|
266
|
+
pairing grant. A password-less browser cookie is not a grant. URL-token requests
|
|
267
|
+
resolve the issuing client and recheck revocation/expiry. Every host-event send
|
|
268
|
+
uses a live resource filter in SSE, WS and the OpenCode SSE proxy subscriber;
|
|
269
|
+
unpaired global-stream consumers cannot receive remote content. Revocation
|
|
270
|
+
invalidates the filter before closing streams and outstanding operations.
|
|
271
|
+
|
|
272
|
+
Native setting changes reconcile ownership and replace connection generations.
|
|
273
|
+
SSH preparation installs its placeholder/promise before awaiting native work so
|
|
274
|
+
parallel cold requests share one preparation and transport. Credentials never
|
|
275
|
+
appear in public hosts, event envelopes or diagnostic errors. Direct candidates
|
|
276
|
+
of Relay-paired devices must prove server identity without credentials first.
|
|
277
|
+
Unpaired SSH never gets a Relay fallback. Target credentials remain in the Hub.
|
|
278
|
+
Native SSH errors are reduced to safe authentication/unreachable/service-starting
|
|
279
|
+
codes before crossing the adapter. Relay admission failures keep authorization
|
|
280
|
+
and incompatibility distinct from Relay unreachability; raw diagnostics remain
|
|
281
|
+
outside Gateway responses and receipts.
|
|
282
|
+
|
|
283
|
+
## Validation and evidence boundary
|
|
284
|
+
|
|
285
|
+
`routes.test.js` uses real HTTP servers, production route registration/auth,
|
|
286
|
+
SQLite, real WS upgrades, the real E2EE tunnel client and the private Relay server.
|
|
287
|
+
It covers dual-write recovery, write-through, generation/authorization races,
|
|
288
|
+
unauthorized fanout, per-client shared content readiness, zero-work startup,
|
|
289
|
+
resource cleanup, host removal, preview assets/redirects, repeated Relay concurrent
|
|
290
|
+
requests/creation/terminal and delayed concurrent SSH preparation.
|
|
291
|
+
The three-Host collision fixture also checks SQLite reopen isolation, offline
|
|
292
|
+
retention and the global two-refresh/per-Host one-refresh budget while one Host
|
|
293
|
+
is stalled. The production `scripts/remote-projects-smoke.mjs` exercises the real
|
|
294
|
+
`startWebUiServer` middleware, registration, forwarding and reference removal;
|
|
295
|
+
its synthetic direct origin does not establish physical SSH/Relay/UI parity.
|
|
296
|
+
|
|
297
|
+
These are deterministic correctness/operation-count checks, not production
|
|
298
|
+
Electron/iOS timing, CPU/memory, WAN or physical SSH evidence. Those gates remain
|
|
299
|
+
separate in the feature acceptance record; do not infer them from this suite.
|
|
300
|
+
|
|
301
|
+
Latest backend validation covered 173 passing tests across the Gateway, transcript
|
|
302
|
+
cache, queue, content search, auth, event runtime, SSE reader, folders and Relay
|
|
303
|
+
cross-compatibility suites. The Gateway HTTP suite has 20 cases, including failed
|
|
304
|
+
metadata write preservation and remote removal/reassociation. Electron's package
|
|
305
|
+
suite passed 504 tests with 14 skipped native evidence cases. Web production build,
|
|
306
|
+
Electron main bundle, Web type-check, Electron syntax checks and focused backend
|
|
307
|
+
syntax checks passed. Web lint has its existing path-normalization warning;
|
|
308
|
+
Electron lint is a no-op. Dead-code inspection reported no Remote Host module
|
|
309
|
+
or notification-identity findings. The unmodified production smoke passed twice
|
|
310
|
+
after capability admission replaced the separate auth-session preflight.
|
|
311
|
+
|
|
312
|
+
Integration follow-up added three red-to-green production HTTP/WS cases for
|
|
313
|
+
revocation during handshake, bounded response-header waits and cross-host refresh
|
|
314
|
+
while an interactive body remains open. All 23 Gateway cases pass; the combined
|
|
315
|
+
auth/event-stream run passes 111 tests. The full Web project subsequently passed
|
|
316
|
+
4014 tests with 20 skipped (305 passing files and 6 skipped).
|
|
317
|
+
|
|
318
|
+
This is not a complete feature acceptance result: skipped native evidence remains
|
|
319
|
+
unverified, and real desktop/Capacitor UI, physical SSH/WAN and production
|
|
320
|
+
performance must be validated by the integrating owner. No release or installer
|
|
321
|
+
launch is implied by bundle success.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const secretField = /^(?:api[_-]?key|password|secret|token|access[_-]?token|refresh[_-]?token|authorization|credentials?|clientToken|headers|env)$/i;
|
|
2
|
+
|
|
3
|
+
/** Config directories are read-only views, not a path to remote provider/MCP secrets. */
|
|
4
|
+
export function projectRemoteConfiguration(value) {
|
|
5
|
+
if (Array.isArray(value)) return value.map(projectRemoteConfiguration);
|
|
6
|
+
if (value && typeof value === 'object') return Object.fromEntries(Object.entries(value)
|
|
7
|
+
.filter(([name]) => !secretField.test(name)).map(([name, child]) => [name, projectRemoteConfiguration(child)]));
|
|
8
|
+
if (typeof value === 'string' && /^https?:\/\//i.test(value)) {
|
|
9
|
+
try {
|
|
10
|
+
const url = new URL(value);
|
|
11
|
+
if (url.username || url.password) { url.username = ''; url.password = ''; return url.toString(); }
|
|
12
|
+
} catch { /* Non-URL text stays display metadata. */ }
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
}
|