@yuriai/web 0.3.4 → 0.3.6-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AgentAvatar-C_s-cMy0.js +1 -0
- package/dist/assets/AgentSelector-Df4rBNQs.js +1 -0
- package/dist/assets/ArchivedSessionsDialog-BQdqEIFM.js +1 -0
- package/dist/assets/{AssistantConversationSurface-36aP0hRf.js → AssistantConversationSurface-BOsGik2U.js} +3 -3
- package/dist/assets/AssistantSessionCard-DFi6eIIE.js +2 -0
- package/dist/assets/AssistantUnreadBadge-B9IS5LPM.js +1 -0
- package/dist/assets/AssistantView-yCnV95Dr.js +1 -0
- package/dist/assets/AssistantWorkingAvatar-Bp1KXuhO.js +1 -0
- package/dist/assets/AssistantsSettingsPage-pPeanepy.js +1 -0
- package/dist/assets/BinaryFileFallback-C3sgeTIN.js +1 -0
- package/dist/assets/BtwPanel-BvqTaKLQ.js +6 -0
- package/dist/assets/BusyDots-CU41Xq9E.js +4 -0
- package/dist/assets/ChatContainer-DXRL0aB2.js +65 -0
- package/dist/assets/ChatView-AcZ0Fl7_.js +3 -0
- package/dist/assets/{DiagramView-DGnmjS2b.js → DiagramView-CyGBR2qn.js} +1 -1
- package/dist/assets/{DiffView-Bbit6OZ8.js → DiffView-z4ArmNTm.js} +2 -2
- package/dist/assets/DiffViewToggle-BBxj5Yby.js +1 -0
- package/dist/assets/ErrorBoundary-B4CbFTTY.js +1 -0
- package/dist/assets/FadeInOnReveal-C2UMs63r.js +1 -0
- package/dist/assets/{GuiPluginMount-TC5FELtQ.js → GuiPluginMount-JWmLTeLO.js} +1 -1
- package/dist/assets/GuiPluginPage-BB6qitNb.js +1 -0
- package/dist/assets/GuiPluginSurface-CKW1UPZD.js +1 -0
- package/dist/assets/GuiPluginTitlebarItems-Bmo9W0sn.js +1 -0
- package/dist/assets/{GuiPluginWindow-BkAFJyFd.js → GuiPluginWindow-B-6WWulE.js} +1 -1
- package/dist/assets/Icon-CMNOrIAp.js +1 -0
- package/dist/assets/ImageLoadingPlaceholder-FqoECDc5.js +1 -0
- package/dist/assets/{LoadingImage-Df22Rkor.js → LoadingImage-U4z75PsW.js} +1 -1
- package/dist/assets/MarkdownRenderer-CckbVkti.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-D8q0FMnr.js → MarkdownRendererImpl-CO17sAsd.js} +1 -1
- package/dist/assets/MarkstreamRendererImpl-FOsYqre1.js +3 -0
- package/dist/assets/{MobileAssistantSettingsPage-Dgq5FMho.js → MobileAssistantSettingsPage-CYnXMlRV.js} +1 -1
- package/dist/assets/MobileAssistantTab-CtIoTTOV.js +1 -0
- package/dist/assets/{MobileBtwPage-DQUkSO6N.js → MobileBtwPage-CqiEtHuG.js} +1 -1
- package/dist/assets/{MobileChangesSurface-DsYNmAuM.js → MobileChangesSurface-D7AUZxEK.js} +2 -2
- package/dist/assets/MobileChatScreen-CCNqpS3r.js +1 -0
- package/dist/assets/MobileDetailNavigation-BncgS1Gb.js +1 -0
- package/dist/assets/MobileFilesSurface-D6Fzko7m.js +2 -0
- package/dist/assets/MobileHtmlNetworkBoundary-DXkpR8iy.js +2 -0
- package/dist/assets/MobileOverlayPanel-dc8EKqfh.js +1 -0
- package/dist/assets/MobileResizableSheet-Ddf0s-Dp.js +1 -0
- package/dist/assets/{MobileSettingsTab-DaTtRHo1.js → MobileSettingsTab-DoCREe-W.js} +1 -1
- package/dist/assets/{MobileShareBridge-CZpFYmiy.js → MobileShareBridge-DIIhDUmO.js} +1 -1
- package/dist/assets/MobileSurface-bA5ONMXf.js +1 -0
- package/dist/assets/MobileTabPageHeader-DuWdhFAU.js +1 -0
- package/dist/assets/ModelLogo-Bb63bM4S.js +1 -0
- package/dist/assets/ModelSelector-Dpt_OeOA.js +1 -0
- package/dist/assets/MultiRunWindow-CIueenaz.js +1 -0
- package/dist/assets/OnboardingScreen-DQz9jluT.js +1 -0
- package/dist/assets/OverlayScrollbar-Dsj-t--1.js +1 -0
- package/dist/assets/{PierreDiffViewer-DVKsdwJR.js → PierreDiffViewer-BPY2vUDa.js} +3 -3
- package/dist/assets/ProviderLogo-pBVtlU5X.js +1 -0
- package/dist/assets/{RemoteAssistantSessionCard-DAoFvZht.js → RemoteAssistantSessionCard-DV_D7Lmx.js} +1 -1
- package/dist/assets/RemoteDesktopPanel-DvF7mNsC.js +1 -0
- package/dist/assets/ScheduledTasksDialog-DbV9D6t0.js +3 -0
- package/dist/assets/ScrollableOverlay-T7ADHNbV.js +1 -0
- package/dist/assets/SettingsGroup-ZY4tnwQZ.js +1 -0
- package/dist/assets/SettingsView-C1cFkPEn.js +29 -0
- package/dist/assets/SettingsWindow-CPqIwaDs.js +1 -0
- package/dist/assets/SetupTourDialog-D8MqnViH.js +1 -0
- package/dist/assets/{SyncActions-CrOoREWF.js → SyncActions-BUkOsuvk.js} +1 -1
- package/dist/assets/TerminalView-CoeBAVr1.js +8 -0
- package/dist/assets/TextSelectionMenu-CZWUVT4Q.js +11 -0
- package/dist/assets/{ToolOutputDialog-DpaaQ1uZ.js → ToolOutputDialog-DLxoc22s.js} +1 -1
- package/dist/assets/{YuriLogo-Cp6vWDWp.js → YuriLogo-CnV3RxpE.js} +1 -1
- package/dist/assets/{YuriWordmark-CLGHwobA.js → YuriWordmark-Bn5KdqMC.js} +1 -1
- package/dist/assets/{assistant-attachment-cache-bRIIESGe.js → assistant-attachment-cache-Y7yhlQcv.js} +1 -1
- package/dist/assets/assistantMessagePreview-DyHFl0Zy.js +1 -0
- package/dist/assets/assistantQueries-BLm65-22.js +1 -0
- package/dist/assets/{auto-read-context-ClBUErN2.js → auto-read-context-eOYxlJjR.js} +1 -1
- package/dist/assets/{capgoAdapter-pfQJmvW2.js → capgoAdapter-DYyTs76s.js} +1 -1
- package/dist/assets/card-Csh0Af72.js +1 -0
- package/dist/assets/chatUpwardIntent-CivAb4ux.js +1 -0
- package/dist/assets/checkbox-CK288doZ.js +1 -0
- package/dist/assets/{client-B_907PBv.js → client-QcYZg8_d.js} +3 -3
- package/dist/assets/collapsible-C8knwYWk.js +1 -0
- package/dist/assets/{connection-hint-B-kOWome.js → connection-hint-BboPqLXQ.js} +1 -1
- package/dist/assets/context-menu-CBjNNTDr.js +1 -0
- package/dist/assets/{desktopHosts-BsTrBVja.js → desktopHosts-DFa3lf0i.js} +1 -1
- package/dist/assets/{desktopRelayRestore-BxbRKak_.js → desktopRelayRestore-CGq-Ylgq.js} +1 -1
- package/dist/assets/{device-EIfSfSWk.js → device-CtdJ8KBJ.js} +1 -1
- package/dist/assets/diagram-DuMpiER6.js +1 -0
- package/dist/assets/dialog-BPtWiCtF.js +1 -0
- package/dist/assets/dropdown-menu-BWP9Nxwt.js +1 -0
- package/dist/assets/{es-DqYZgeC6.js → es-BelVk9R_.js} +3 -3
- package/dist/assets/{fileMentionTouchSelection-BQEUty_A.js → fileMentionTouchSelection-3GZYNOSd.js} +1 -1
- package/dist/assets/{fileReferenceActions-TmbrIHBI.js → fileReferenceActions-DEUhs_7h.js} +1 -1
- package/dist/assets/{fr-BHaun7Zq.js → fr-DtUzwB6h.js} +3 -3
- package/dist/assets/{gitApi-CoVwjIDy.js → gitApi-CwF3k_rj.js} +1 -1
- package/dist/assets/gitApiHttp-C8AU1uiY.js +3 -0
- package/dist/assets/githubAuthQueries-IJPWBo0B.js +1 -0
- package/dist/assets/historyImportQueries-B3QBdaKo.js +1 -0
- package/dist/assets/host-DchPrZpw.js +1 -0
- package/dist/assets/{i18n-DXc6czdR.js → i18n-BU8XOKjS.js} +1 -1
- package/dist/assets/{icons-Bd-INsoy.js → icons-C25QjTQy.js} +1 -1
- package/dist/assets/{imageSource-BR4C9TuS.js → imageSource-B39pFDdo.js} +1 -1
- package/dist/assets/input-DHQ_HUNG.js +1 -0
- package/dist/assets/{input-store-BSJBQTMi.js → input-store-PqhVEhUI.js} +1 -1
- package/dist/assets/insertionBoundaries-6VDrFW8E.js +1 -0
- package/dist/assets/{ja-BGNugvrx.js → ja-CWta3CAu.js} +3 -3
- package/dist/assets/kbd-CVXHcAl2.js +1 -0
- package/dist/assets/{ko-CGbNBfDe.js → ko-CJFoAZPE.js} +3 -3
- package/dist/assets/main-BGVs-a-z.js +2 -0
- package/dist/assets/main-CHSIwKhf.js +169 -0
- package/dist/assets/{markdownHeightCache-CHGGNhWI.js → markdownHeightCache-BsFEgT5Y.js} +1 -1
- package/dist/assets/mcpQueries-BGNMOHKb.js +1 -0
- package/dist/assets/miniChat-ByGJ6Q_E.js +2 -0
- package/dist/assets/mobile-txc-T67P.js +2 -0
- package/dist/assets/{mobileBackNavigation-C94n2eLT.js → mobileBackNavigation-Cpb7IiCG.js} +1 -1
- package/dist/assets/mobileConnections-5xypkCyd.js +2 -0
- package/dist/assets/multirun-B5_-5JYt.js +3 -0
- package/dist/assets/{native-config-DVg8_Zx1.js → native-config-DLw0Zm99.js} +1 -1
- package/dist/assets/{nativeComposerCover-Bhv1EKPT.js → nativeComposerCover-Btj57e5V.js} +1 -1
- package/dist/assets/navigation-C2qzByuq.js +2 -0
- package/dist/assets/openRemoteProjectSession-BFp0YlF-.js +1 -0
- package/dist/assets/openSessionFromDeepLink-DUPajGkN.js +2 -0
- package/dist/assets/pathNormalization-ewtPqJWn.js +1 -0
- package/dist/assets/{pl-k8-4URiE.js → pl-BwZ6CWJm.js} +3 -3
- package/dist/assets/platform-CNdx57HN.js +1 -0
- package/dist/assets/pluginPresentation-wl8POjDE.js +2 -0
- package/dist/assets/{project-preview-BCtFY4Rg.js → project-preview-CIkGbBPZ.js} +1 -1
- package/dist/assets/{projectActions-BPmI9_mW.js → projectActions-D84EVh3q.js} +1 -1
- package/dist/assets/{prompt-attachment-upload-B5DHrw6U.js → prompt-attachment-upload-D1c308Ba.js} +1 -1
- package/dist/assets/{pt-BR-DdwCzXBH.js → pt-BR-DPAcgEDe.js} +3 -3
- package/dist/assets/pwa-FAC1qERc.js +2 -0
- package/dist/assets/queue-abort-optimistic-s-DVErY6.js +1 -0
- package/dist/assets/{quota-CqWNkFzw.js → quota-BEyQ6n-w.js} +1 -1
- package/dist/assets/{reference-history-IEuzG8KC.js → reference-history-B9H6MkUC.js} +1 -1
- package/dist/assets/{remote-input-store-C6UIEZxp.js → remote-input-store-CquhCIoR.js} +1 -1
- package/dist/assets/remoteProjectQueries-BunVM5PM.js +1 -0
- package/dist/assets/remoteSessionReference-BHvAalXk.js +1 -0
- package/dist/assets/renderElectronMiniChatApp-D3Vd8ffe.js +2 -0
- package/dist/assets/renderMobileApp-BulRo1RJ.js +17 -0
- package/dist/assets/{runtime-file-download-BWeoSXRb.js → runtime-file-download-wMVtKk2v.js} +1 -1
- package/dist/assets/runtime-file-resource-DKJJoOOc.js +6 -0
- package/dist/assets/{runtimeConfig-CyvlrO58.js → runtimeConfig-8Z7A5ncj.js} +1 -1
- package/dist/assets/runtimeEndpointReset-D5p8n8Z1.js +4 -0
- package/dist/assets/{scheduledTaskNavigation-VVTOq9n2.js → scheduledTaskNavigation-DpfZSGu8.js} +1 -1
- package/dist/assets/select-BL02HQzN.js +1 -0
- package/dist/assets/sessionChangeSummary-BCF9VwAA.js +1 -0
- package/dist/assets/sessionLookup-CLqpm_Sq.js +1 -0
- package/dist/assets/sessionOwnership-Zl2YX7dC.js +2 -0
- package/dist/assets/shortcuts-2XAaIaaK.js +1 -0
- package/dist/assets/sortable-tabs-strip-BsjgK90l.js +1 -0
- package/dist/assets/speechSettingsQueries-cQ6M7fJ3.js +1 -0
- package/dist/assets/src-DYCPWwUH.css +2 -0
- package/dist/assets/{store-C1ifDY0C.js → store-DWS9gJPW.js} +4 -4
- package/dist/assets/summaries-BQMyJaaw.js +1 -0
- package/dist/assets/switch-ps5COI8_.js +1 -0
- package/dist/assets/{terminalApi-DXvEquBF.js → terminalApi-D2ECmoAo.js} +1 -1
- package/dist/assets/textarea-DXs25Z8k.js +1 -0
- package/dist/assets/{timeFormat-dCsf2MQv.js → timeFormat-CUbYRR40.js} +1 -1
- package/dist/assets/tooltip-DYZonA8U.js +1 -0
- package/dist/assets/truncated-path-DJfRXALm.js +1 -0
- package/dist/assets/types-b90cIxfC.js +2 -0
- package/dist/assets/ui-z2JsXLmb.js +13 -0
- package/dist/assets/{uk-DU-7fAP4.js → uk-Dw75NtHH.js} +3 -3
- package/dist/assets/useAppFontEffects-tKUtvOIn.js +7 -0
- package/dist/assets/{useAssistantUIStore-CpJZ4Rqs.js → useAssistantUIStore-DEiMjSqf.js} +1 -1
- package/dist/assets/useDesktopWindowControlsLayout-CNAzDasQ.js +1 -0
- package/dist/assets/{useDictation-CZzAlsW0.js → useDictation-CUADIj-o.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-DiJBIfai.js → useEffectiveDirectory-hu13SCnK.js} +1 -1
- package/dist/assets/{useFontPreferences-BiRBKhti.js → useFontPreferences-BY0TXvWI.js} +1 -1
- package/dist/assets/{useGitStore-Bv8xmXDa.js → useGitStore-Dsh_ZiT1.js} +1 -1
- package/dist/assets/{useInlineCommentDraftStore-B2mkmAZd.js → useInlineCommentDraftStore-C75YIRui.js} +1 -1
- package/dist/assets/useMcpConfigStore-BfdokvWe.js +1 -0
- package/dist/assets/useMobileSwipeActions-jAZpJVTB.js +1 -0
- package/dist/assets/useMobileTranscriptSyncHint-XT7TWzKn.js +10 -0
- package/dist/assets/useModelLists-DrXScJk8.js +1 -0
- package/dist/assets/useOpenCodeReadiness-DLqT6fD5.js +1 -0
- package/dist/assets/usePluginsStore-DYO8nss8.js +1 -0
- package/dist/assets/useProjectGitActions-CYWPTGNa.js +1 -0
- package/dist/assets/{useProjectGitStore-DzU2pvrH.js → useProjectGitStore-C1Tswys-.js} +1 -1
- package/dist/assets/{useProjectRuntimeAPIs-tjGuODhu.js → useProjectRuntimeAPIs-BpdOaT67.js} +1 -1
- package/dist/assets/useQuotaStore-CZU1NU_Z.js +1 -0
- package/dist/assets/{useSessionBtwStore-CwvlMabN.js → useSessionBtwStore-PdQPx7tm.js} +2 -2
- package/dist/assets/{useStreamingTextThrottle-C9SaKeil.js → useStreamingTextThrottle-Btl31Wol.js} +1 -1
- package/dist/assets/{useUIStore-C3ewjGgP.js → useUIStore-P32bzAJc.js} +1 -1
- package/dist/assets/worktreeManager-DIrqBI6K.js +1 -0
- package/dist/assets/{worktreeSourceBranchPreference-CuLKwxkx.js → worktreeSourceBranchPreference-DncAXqYk.js} +1 -1
- package/dist/assets/{zh-CN-DOHH7nht.js → zh-CN-D5Jwengx.js} +3 -3
- package/dist/assets/{zh-TW-t1qlXGOg.js → zh-TW-CbbaPcxZ.js} +3 -3
- package/dist/index.html +18 -17
- package/dist/mini-chat.html +18 -17
- package/dist/mobile.html +2 -2
- package/package.json +1 -1
- package/server/index.js +1 -0
- package/server/lib/assistants/builtin-skills.js +1 -1
- package/server/lib/assistants/builtin-skills.test.js +1 -0
- package/server/lib/gui-customization/DOCUMENTATION.md +37 -1
- package/server/lib/gui-customization/projects-client.mjs +14 -3
- package/server/lib/gui-customization/projects-lifecycle.js +89 -0
- package/server/lib/gui-customization/projects-lifecycle.test.js +199 -0
- package/server/lib/gui-customization/projects.js +19 -3
- package/server/lib/gui-customization/projects.test.js +6 -0
- package/server/lib/gui-customization/session-skill.js +3 -3
- package/server/lib/gui-customization/session-skill.test.js +20 -1
- package/server/lib/gui-customization/skill/SKILL.md +5 -1
- package/server/lib/gui-customization/skill/references/deep-links.md +43 -0
- package/server/lib/gui-customization/skill/references/gui-api.md +50 -1
- package/server/lib/gui-customization/skill/references/projects.md +49 -0
- package/server/lib/opencode/DOCUMENTATION.md +1 -0
- package/server/lib/opencode/custom-provider.test.js +41 -0
- package/server/lib/opencode/feature-routes-runtime.js +5 -0
- package/server/lib/opencode/feature-routes-runtime.test.js +6 -0
- package/server/lib/opencode/settings-helpers.js +9 -0
- package/server/lib/opencode/settings-helpers.test.js +10 -0
- package/dist/assets/AgentAvatar-CHCjMxCF.js +0 -1
- package/dist/assets/AgentSelector-uBoLtut8.js +0 -1
- package/dist/assets/ArchivedSessionsDialog-DZcicxVO.js +0 -1
- package/dist/assets/AssistantSessionCard-CZ-1oJiE.js +0 -2
- package/dist/assets/AssistantUnreadBadge-p9mkpbMC.js +0 -1
- package/dist/assets/AssistantView-8fyAae7J.js +0 -1
- package/dist/assets/AssistantWorkingAvatar-CoxhuMvM.js +0 -1
- package/dist/assets/AssistantsSettingsPage-DD6spbXz.js +0 -1
- package/dist/assets/BinaryFileFallback-DgYaMG9f.js +0 -1
- package/dist/assets/BtwPanel-BkobGcf3.js +0 -6
- package/dist/assets/BusyDots-COTTwItx.js +0 -4
- package/dist/assets/ChatContainer-BfQ7RXwY.js +0 -65
- package/dist/assets/ChatView-ByMRjY1h.js +0 -3
- package/dist/assets/DiffViewToggle-BwJ6MYB7.js +0 -1
- package/dist/assets/ErrorBoundary-D7QcwhmL.js +0 -1
- package/dist/assets/FadeInOnReveal-B3uT04YJ.js +0 -1
- package/dist/assets/GuiPluginPage-BPjU8N49.js +0 -1
- package/dist/assets/GuiPluginSurface-CYPH6XzX.js +0 -1
- package/dist/assets/GuiPluginTitlebarItems-DxFINwbr.js +0 -1
- package/dist/assets/Icon-DmykXZL1.js +0 -1
- package/dist/assets/ImageLoadingPlaceholder-DgM_EFHn.js +0 -1
- package/dist/assets/MarkdownRenderer-VvziwyJB.js +0 -2
- package/dist/assets/MarkstreamRendererImpl-U_m_ZKG7.js +0 -3
- package/dist/assets/MobileAssistantTab-CMIQansR.js +0 -1
- package/dist/assets/MobileChatScreen-p356_BCN.js +0 -1
- package/dist/assets/MobileDetailNavigation-ldTzGo19.js +0 -1
- package/dist/assets/MobileFilesSurface-CF3EW_SK.js +0 -2
- package/dist/assets/MobileHtmlNetworkBoundary-DlPF4iPS.js +0 -2
- package/dist/assets/MobileOverlayPanel-C36VWWmN.js +0 -1
- package/dist/assets/MobileResizableSheet-CqphcaKq.js +0 -1
- package/dist/assets/MobileSurface-cmaGf3hZ.js +0 -1
- package/dist/assets/MobileTabPageHeader-D6P4K98S.js +0 -1
- package/dist/assets/ModelLogo-BkbD514M.js +0 -1
- package/dist/assets/ModelSelector-EmtltPnd.js +0 -1
- package/dist/assets/MultiRunWindow-CeSxAB8w.js +0 -1
- package/dist/assets/OnboardingScreen-BubjTNcy.js +0 -1
- package/dist/assets/OverlayScrollbar-D6vmoMkQ.js +0 -1
- package/dist/assets/ProviderLogo-DA98yu7M.js +0 -1
- package/dist/assets/RemoteDesktopPanel-f3vRj4ZP.js +0 -1
- package/dist/assets/ScheduledTasksDialog-D_hBP47Y.js +0 -3
- package/dist/assets/ScrollableOverlay-stxT7gLf.js +0 -1
- package/dist/assets/SettingsGroup-CvaPYznp.js +0 -1
- package/dist/assets/SettingsView-DEU94-h1.js +0 -29
- package/dist/assets/SettingsWindow-DMVAV_el.js +0 -1
- package/dist/assets/SetupTourDialog-BlR7FJvd.js +0 -1
- package/dist/assets/TerminalView-Xcwp3SG1.js +0 -8
- package/dist/assets/TextSelectionMenu-h8iUeNzE.js +0 -11
- package/dist/assets/assistantMessagePreview-DLBvPQtq.js +0 -1
- package/dist/assets/assistantQueries-NdPqu6rx.js +0 -1
- package/dist/assets/card-DmysoUAV.js +0 -1
- package/dist/assets/chatUpwardIntent-B2NrGMm-.js +0 -1
- package/dist/assets/checkbox-BMN5hAVm.js +0 -1
- package/dist/assets/collapsible-Z0IjDAMO.js +0 -1
- package/dist/assets/context-menu-CKlB6wxo.js +0 -1
- package/dist/assets/diagram-CzY6n_4N.js +0 -1
- package/dist/assets/dialog-BeFBA6ja.js +0 -1
- package/dist/assets/dropdown-menu-BblI9sN2.js +0 -1
- package/dist/assets/gitApiHttp-Dd-FwgCq.js +0 -3
- package/dist/assets/githubAuthQueries-DqregESf.js +0 -1
- package/dist/assets/historyImportQueries-D00KjUT2.js +0 -1
- package/dist/assets/host-ChBHl_Vl.js +0 -1
- package/dist/assets/input-Cf16qJ6g.js +0 -1
- package/dist/assets/insertionBoundaries-Btqgsu1M.js +0 -1
- package/dist/assets/kbd-CamdaxHJ.js +0 -1
- package/dist/assets/main-CXH2hObl.js +0 -169
- package/dist/assets/main-ClH7cLKr.js +0 -2
- package/dist/assets/mcpQueries-Rmp1BKeo.js +0 -1
- package/dist/assets/miniChat-B_Bw6udu.js +0 -2
- package/dist/assets/mobile-BR73yoNi.js +0 -2
- package/dist/assets/mobileConnections-x07fHO_5.js +0 -2
- package/dist/assets/multirun-CKQymP08.js +0 -3
- package/dist/assets/navigation-D1klsD7k.js +0 -2
- package/dist/assets/openRemoteProjectSession-DNr74gHD.js +0 -1
- package/dist/assets/platform-CiUKDeXd.js +0 -1
- package/dist/assets/pluginPresentation-DtyC8NF2.js +0 -2
- package/dist/assets/pwa-CtDladgB.js +0 -2
- package/dist/assets/queue-abort-optimistic-DFbWDRKT.js +0 -1
- package/dist/assets/remoteProjectQueries-C8382jM8.js +0 -1
- package/dist/assets/remoteSessionReference-ex07CtrZ.js +0 -1
- package/dist/assets/renderElectronMiniChatApp-DM9y9qXo.js +0 -2
- package/dist/assets/renderMobileApp-DqpPYtZI.js +0 -17
- package/dist/assets/runtime-file-resource-Bc_ss-sW.js +0 -2
- package/dist/assets/runtimeEndpointReset-C0zNrsI9.js +0 -4
- package/dist/assets/select-vZCgcnYG.js +0 -1
- package/dist/assets/session-startup-barrier-DT-hIBRf.js +0 -1
- package/dist/assets/sessionLookup-DQOiycHr.js +0 -1
- package/dist/assets/sessionOwnership-BjhXe6pi.js +0 -2
- package/dist/assets/shortcuts-WkN3Gh8v.js +0 -1
- package/dist/assets/sortable-tabs-strip-DmtfYPz0.js +0 -1
- package/dist/assets/speechSettingsQueries-BmkXNn4w.js +0 -1
- package/dist/assets/src-QTj33Z0x.css +0 -2
- package/dist/assets/switch-CNmsFYfY.js +0 -1
- package/dist/assets/textarea-ZiXxEOHK.js +0 -1
- package/dist/assets/tooltip-CpTbxEOE.js +0 -1
- package/dist/assets/truncated-path-CcmWjgCQ.js +0 -1
- package/dist/assets/types-DpcA-uDW.js +0 -2
- package/dist/assets/ui-ee2iN869.js +0 -13
- package/dist/assets/useAppFontEffects-rbTKcF0f.js +0 -7
- package/dist/assets/useDesktopWindowControlsLayout-BOkRz-p9.js +0 -1
- package/dist/assets/useMcpConfigStore-DKTl0PvE.js +0 -1
- package/dist/assets/useMobileSwipeActions-XoxrtaUo.js +0 -1
- package/dist/assets/useMobileTranscriptSyncHint-DM8WG7kz.js +0 -10
- package/dist/assets/useModelLists-Bf60FIJu.js +0 -1
- package/dist/assets/useOpenCodeReadiness-Dm6BjA1T.js +0 -1
- package/dist/assets/usePluginsStore-Du4WlceO.js +0 -1
- package/dist/assets/useProjectGitActions-D3B9ma9z.js +0 -1
- package/dist/assets/useQuotaStore-CSn2pk3T.js +0 -1
- package/dist/assets/worktreeManager-DGu8M01Z.js +0 -1
- package/dist/assets/yuriEvents-BFrD5fMU.js +0 -5
package/dist/index.html
CHANGED
|
@@ -571,7 +571,7 @@
|
|
|
571
571
|
opacity: 0.72;
|
|
572
572
|
}
|
|
573
573
|
</style>
|
|
574
|
-
<script type="module" crossorigin src="/assets/main-
|
|
574
|
+
<script type="module" crossorigin src="/assets/main-BGVs-a-z.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">
|
|
@@ -581,9 +581,10 @@
|
|
|
581
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/
|
|
585
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
586
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
584
|
+
<link rel="modulepreload" crossorigin href="/assets/pathNormalization-ewtPqJWn.js">
|
|
585
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-CNdx57HN.js">
|
|
586
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-DFa3lf0i.js">
|
|
587
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-CGq-Ylgq.js">
|
|
587
588
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-wXsskyKm.js">
|
|
588
589
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CTekDqaS.js">
|
|
589
590
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-migration-Bhz6UOBJ.js">
|
|
@@ -594,28 +595,28 @@
|
|
|
594
595
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BkccXcWz.js">
|
|
595
596
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BSjXNgF_.js">
|
|
596
597
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-DIb_ItL-.js">
|
|
597
|
-
<link rel="modulepreload" crossorigin href="/assets/yuriEvents-BFrD5fMU.js">
|
|
598
598
|
<link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
|
|
599
599
|
<link rel="modulepreload" crossorigin href="/assets/vendor-lodash-es-BS45jPoZ.js">
|
|
600
600
|
<link rel="modulepreload" crossorigin href="/assets/vendor-js-cookie-hSOiFTtX.js">
|
|
601
601
|
<link rel="modulepreload" crossorigin href="/assets/vendor-reactuses-core-DjKFMfz7.js">
|
|
602
|
+
<link rel="modulepreload" crossorigin href="/assets/summaries-BQMyJaaw.js">
|
|
602
603
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
603
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-
|
|
604
|
-
<link rel="modulepreload" crossorigin href="/assets/prompt-attachment-upload-
|
|
605
|
-
<link rel="modulepreload" crossorigin href="/assets/client-
|
|
604
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-DKJJoOOc.js">
|
|
605
|
+
<link rel="modulepreload" crossorigin href="/assets/prompt-attachment-upload-D1c308Ba.js">
|
|
606
|
+
<link rel="modulepreload" crossorigin href="/assets/client-QcYZg8_d.js">
|
|
606
607
|
<link rel="modulepreload" crossorigin href="/assets/useMobileHtmlPreviewStore-BYunNOBo.js">
|
|
607
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
608
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-P32bzAJc.js">
|
|
608
609
|
<link rel="modulepreload" crossorigin href="/assets/uuid-D-SDZijH.js">
|
|
609
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
610
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
611
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-
|
|
612
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
613
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
614
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
610
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-C8AU1uiY.js">
|
|
611
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-D2ECmoAo.js">
|
|
612
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-wMVtKk2v.js">
|
|
613
|
+
<link rel="modulepreload" crossorigin href="/assets/types-b90cIxfC.js">
|
|
614
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-DYyTs76s.js">
|
|
615
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-DLw0Zm99.js">
|
|
615
616
|
<link rel="modulepreload" crossorigin href="/assets/runtime-ead7P81A.js">
|
|
616
617
|
<link rel="modulepreload" crossorigin href="/assets/bootstrap-eLlfzqAI.js">
|
|
617
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
618
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
618
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-8Z7A5ncj.js">
|
|
619
|
+
<link rel="stylesheet" crossorigin href="/assets/src-DYCPWwUH.css">
|
|
619
620
|
</head>
|
|
620
621
|
<body class="h-full bg-background text-foreground">
|
|
621
622
|
<!-- Keep the startup layer outside #root. React replaces every child of
|
package/dist/mini-chat.html
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
.dark #initial-loading img { filter: invert(1); }
|
|
78
78
|
</style>
|
|
79
79
|
|
|
80
|
-
<script type="module" crossorigin src="/assets/miniChat-
|
|
80
|
+
<script type="module" crossorigin src="/assets/miniChat-ByGJ6Q_E.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">
|
|
@@ -87,9 +87,10 @@
|
|
|
87
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/
|
|
91
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
92
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/pathNormalization-ewtPqJWn.js">
|
|
91
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-CNdx57HN.js">
|
|
92
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-DFa3lf0i.js">
|
|
93
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-CGq-Ylgq.js">
|
|
93
94
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-wXsskyKm.js">
|
|
94
95
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CTekDqaS.js">
|
|
95
96
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-migration-Bhz6UOBJ.js">
|
|
@@ -100,28 +101,28 @@
|
|
|
100
101
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BkccXcWz.js">
|
|
101
102
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BSjXNgF_.js">
|
|
102
103
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-DIb_ItL-.js">
|
|
103
|
-
<link rel="modulepreload" crossorigin href="/assets/yuriEvents-BFrD5fMU.js">
|
|
104
104
|
<link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
|
|
105
105
|
<link rel="modulepreload" crossorigin href="/assets/vendor-lodash-es-BS45jPoZ.js">
|
|
106
106
|
<link rel="modulepreload" crossorigin href="/assets/vendor-js-cookie-hSOiFTtX.js">
|
|
107
107
|
<link rel="modulepreload" crossorigin href="/assets/vendor-reactuses-core-DjKFMfz7.js">
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/summaries-BQMyJaaw.js">
|
|
108
109
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
109
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-
|
|
110
|
-
<link rel="modulepreload" crossorigin href="/assets/prompt-attachment-upload-
|
|
111
|
-
<link rel="modulepreload" crossorigin href="/assets/client-
|
|
110
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-DKJJoOOc.js">
|
|
111
|
+
<link rel="modulepreload" crossorigin href="/assets/prompt-attachment-upload-D1c308Ba.js">
|
|
112
|
+
<link rel="modulepreload" crossorigin href="/assets/client-QcYZg8_d.js">
|
|
112
113
|
<link rel="modulepreload" crossorigin href="/assets/useMobileHtmlPreviewStore-BYunNOBo.js">
|
|
113
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
114
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-P32bzAJc.js">
|
|
114
115
|
<link rel="modulepreload" crossorigin href="/assets/uuid-D-SDZijH.js">
|
|
115
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
116
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
117
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-
|
|
118
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
119
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
120
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
116
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-C8AU1uiY.js">
|
|
117
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-D2ECmoAo.js">
|
|
118
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-wMVtKk2v.js">
|
|
119
|
+
<link rel="modulepreload" crossorigin href="/assets/types-b90cIxfC.js">
|
|
120
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-DYyTs76s.js">
|
|
121
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-DLw0Zm99.js">
|
|
121
122
|
<link rel="modulepreload" crossorigin href="/assets/runtime-ead7P81A.js">
|
|
122
123
|
<link rel="modulepreload" crossorigin href="/assets/bootstrap-eLlfzqAI.js">
|
|
123
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
124
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
124
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-8Z7A5ncj.js">
|
|
125
|
+
<link rel="stylesheet" crossorigin href="/assets/src-DYCPWwUH.css">
|
|
125
126
|
</head>
|
|
126
127
|
<body class="h-full bg-background text-foreground">
|
|
127
128
|
<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-txc-T67P.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-DYCPWwUH.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
package/server/index.js
CHANGED
|
@@ -1991,6 +1991,7 @@ async function main(options = {}) {
|
|
|
1991
1991
|
globalMessageStreamHub,
|
|
1992
1992
|
getServerId: () => relayService.getServerId(),
|
|
1993
1993
|
sessionIndexService,
|
|
1994
|
+
publishSessionIndexChange: () => sessionIndexSyncRuntime?.publishChange?.(),
|
|
1994
1995
|
notifyContactTurnComplete: (event) => notificationTriggerRuntime.sendContactTurnNotification(event),
|
|
1995
1996
|
});
|
|
1996
1997
|
|
|
@@ -10,7 +10,7 @@ export function formatAssistantBuiltinSkillsPrompt(tools) {
|
|
|
10
10
|
skills.push('- opencode: For OpenCode itself: configuration, agents, skills, tools, permissions, MCP, providers, plugins, CLI, SDK/API and troubleshooting. Load load_tools({"domain":"opencode.catalog"}), then read_opencode_skill({"id":"opencode"}); continue with nextOffset when partial. Use the current connected catalog, not a copied skill body or a virtual built-in file path.');
|
|
11
11
|
}
|
|
12
12
|
if (names.has('read')) {
|
|
13
|
-
skills.push(`- yuri-customization: For adding a directory as a project in Yuri, appearance, themes/CSS/layout, logos/Dock, GUI plugins, pages/tabs, widgets, file previews/exports, panels and settings, or SSH/config-sync/Relay capability boundaries. Load with read({"path":${JSON.stringify(customizationSkillPath)}}), then read only the matching references relative to ${JSON.stringify(path.dirname(customizationSkillPath))}. Project registration uses granted yuri.projects tools, not a session-bound helper. This contact has no bound local desktop helper for SSH, configuration sync or Relay pairing; those operations are unavailable here. Reading the skill does not create that authorization.`);
|
|
13
|
+
skills.push(`- yuri-customization: For adding a directory as a project in Yuri, project/session resource ownership or yuri:// deep links, appearance, themes/CSS/layout, logos/Dock, GUI plugins, pages/tabs, widgets, file previews/exports, panels and settings, or SSH/config-sync/Relay capability boundaries. Load with read({"path":${JSON.stringify(customizationSkillPath)}}), then read only the matching references relative to ${JSON.stringify(path.dirname(customizationSkillPath))}. Project registration uses granted yuri.projects tools, not a session-bound helper. This contact has no bound local desktop helper for SSH, configuration sync or Relay pairing; those operations are unavailable here. Reading the skill does not create that authorization.`);
|
|
14
14
|
}
|
|
15
15
|
return skills.length > 0 ? [
|
|
16
16
|
'Built-in skills (progressive instructions): load the matching skill before following its workflow. Reading instructions does not mount tools or grant permissions; use the actual contact tools, or assign substantive implementation to a worker with the relevant context.',
|
|
@@ -12,6 +12,7 @@ describe('assistant built-in skill pointers', () => {
|
|
|
12
12
|
expect(prompt).toContain('read_opencode_skill({"id":"opencode"})');
|
|
13
13
|
expect(prompt).toContain('nextOffset');
|
|
14
14
|
expect(prompt).toContain('adding a directory as a project in Yuri');
|
|
15
|
+
expect(prompt).toContain('project/session resource ownership or yuri:// deep links');
|
|
15
16
|
expect(prompt).toContain('granted yuri.projects tools');
|
|
16
17
|
expect(prompt).toContain('no bound local desktop helper');
|
|
17
18
|
expect(prompt).toContain('does not create that authorization');
|
|
@@ -7,6 +7,21 @@ short discovery pointer enters `session.instructions.entry` under
|
|
|
7
7
|
no global OpenCode config, installed user skills, project files or old sessions
|
|
8
8
|
are modified.
|
|
9
9
|
|
|
10
|
+
`skill/references/deep-links.md` is the on-demand reference for `yuri://` links
|
|
11
|
+
(session, new-session, open-project, host, settings). It mirrors the vocabulary in
|
|
12
|
+
`packages/ui/src/apps/deepLinks.ts` and the desktop session-link resolution in
|
|
13
|
+
`packages/ui/src/sync/DOCUMENTATION.md`; update it when either changes. It is
|
|
14
|
+
navigation guidance only and adds no helper or authorization.
|
|
15
|
+
|
|
16
|
+
The discovery pointers advertise resource ownership and navigation as capabilities,
|
|
17
|
+
not individual delivery scenarios. `references/projects.md#resource-identity-and-scope`
|
|
18
|
+
owns the common discovery/identity guidance; `references/deep-links.md` owns the
|
|
19
|
+
receiving client's supported URL fields and prerequisites. Agents retain complete
|
|
20
|
+
remote targets for resource operations while emitting only fields accepted by the
|
|
21
|
+
navigation protocol. Existing instance discovery/binding does not imply support for
|
|
22
|
+
identity-scoped session URLs; this skill update adds neither a self-identity helper
|
|
23
|
+
nor a new deep-link parameter.
|
|
24
|
+
|
|
10
25
|
Interactive Yuri contacts reuse this same shipped entry and references through
|
|
11
26
|
the assistant-only pointer in `../assistants/builtin-skills.js`. Their pi tools
|
|
12
27
|
run on the Host, so the pointer names the package-local resource directly rather
|
|
@@ -29,7 +44,7 @@ their immutable staged references until a new session is admitted. Contacts use
|
|
|
29
44
|
their own granted `yuri.projects` tools, not this session binding.
|
|
30
45
|
|
|
31
46
|
`projects.js` owns `POST /api/yuri/session-skills/projects` (`describe`, `list`,
|
|
32
|
-
`add`, `remote-hosts`, `add-remote`, `remote-projects`, `sessions`, `read-session`, `create-session`, `prompt-session`). `projects-remote.js` uses the injected `remoteHostGateway` and its immutable task leases; discovery returns authenticated `{hubId,hostId,instanceId}` targets, and explicit targets never fall back to local. `remote-hosts` includes authorized machines with no associated project, reports per-machine failures and releases each probe. `add-remote` uses `gateway.registerProject`, shared with the UI: the target validates/canonicalizes and registers the directory before the Hub saves a deduplicated reference and broadcasts project-order invalidation. A Hub write failure leaves the remote project intact; retrying the same target/path completes association. Paths are never resolved on the Hub filesystem. Lease cleanup runs on every outcome. Remote SDK requests preserve generated request data through the lease; bounded message reads use the existing Host turn-page route. No remote bodies are persisted on Hub. Session creation/prompt require stable caller IDs for ambiguous-result inspection, not automatic replay. This capability neither uses nor grants the desktop SSH helper. The global gate and route require the existing loopback service credential,
|
|
47
|
+
`add`, `task-sessions`, `session-state`, `settle-session`, `unsettle-session`, `archive-session`, `unarchive-session`, `remote-hosts`, `add-remote`, `remote-projects`, `sessions`, `read-session`, `create-session`, `prompt-session`). `projects-remote.js` uses the injected `remoteHostGateway` and its immutable task leases; discovery returns authenticated `{hubId,hostId,instanceId}` targets, and explicit targets never fall back to local. `remote-hosts` includes authorized machines with no associated project, reports per-machine failures and releases each probe. `add-remote` uses `gateway.registerProject`, shared with the UI: the target validates/canonicalizes and registers the directory before the Hub saves a deduplicated reference and broadcasts project-order invalidation. A Hub write failure leaves the remote project intact; retrying the same target/path completes association. Paths are never resolved on the Hub filesystem. Lease cleanup runs on every outcome. Remote SDK requests preserve generated request data through the lease; bounded message reads use the existing Host turn-page route. No remote bodies are persisted on Hub. Session creation/prompt require stable caller IDs for ambiguous-result inspection, not automatic replay. This capability neither uses nor grants the desktop SSH helper. The global gate and route require the existing loopback service credential,
|
|
33
48
|
no browser Origin, shared-service ownership and the session's admitted Host origin.
|
|
34
49
|
The bridge reuses `projects/registry.js`, just like the UI directory API and contact
|
|
35
50
|
tools: strict reads, canonical path deduplication, serialized persistence and
|
|
@@ -46,6 +61,22 @@ client waits five seconds longer for the result). Caller disconnect cancels and
|
|
|
46
61
|
releases the task lease; uncertain writes are inspected by their stable IDs before
|
|
47
62
|
any retry.
|
|
48
63
|
|
|
64
|
+
`projects-lifecycle.js` owns bound-Host task/session archive operations.
|
|
65
|
+
`task-sessions` pages the current index metadata (50 rows), using the same committed
|
|
66
|
+
Host archive filter as the UI; it explicitly distinguishes an exhausted index from
|
|
67
|
+
complete upstream history. It exposes no messages or raw metadata.
|
|
68
|
+
Verification uses `session-state`, which exposes Host archive authority even after
|
|
69
|
+
an archived row leaves the index; nullable task fields do not imply live membership.
|
|
70
|
+
Task archive (`settle-session`) and restore (`unsettle-session`) reuse index writers and the normal
|
|
71
|
+
revision publisher, validating existing membership before writing. Session archive
|
|
72
|
+
and restore reuse `sessionArchiveService.setArchive`, including partial index-repair
|
|
73
|
+
receipts and sanitized errors. Neither path needs a UI password, deletes content,
|
|
74
|
+
changes another runtime partition or bypasses the existing session binding.
|
|
75
|
+
Task projection is not live UI membership: pins and running/pending requests retain
|
|
76
|
+
their existing precedence. Remote targets are rejected by these local operations.
|
|
77
|
+
New admitted sessions get the updated fingerprinted skill and helper after the Host
|
|
78
|
+
is upgraded; existing staged helpers remain immutable, not silently overwritten.
|
|
79
|
+
|
|
49
80
|
`references/plugin-styles.md` inventories existing host CSS variables for plugin-owned
|
|
50
81
|
Solid/DOM content, including colors, typography, geometry, controls and optional
|
|
51
82
|
theme config. The workflow routes every plugin view through this reference. Visual
|
|
@@ -141,6 +172,11 @@ sessions across backend upgrades.
|
|
|
141
172
|
`projects.test.js` exercises project bridge validation, authentication, binding,
|
|
142
173
|
persisted idempotent registration and failure receipts. Shared-service admission
|
|
143
174
|
tests execute the exact staged project helper through the real global auth gate.
|
|
175
|
+
`projects-lifecycle.test.js` executes the staged lifecycle commands through that
|
|
176
|
+
gate with UI password protection enabled, real temporary SQLite/metadata stores
|
|
177
|
+
and the existing archive service. It verifies discovery/pagination, settle and
|
|
178
|
+
archive round trips, missing IDs, binding/runtime rejection, write/read failures,
|
|
179
|
+
revision publication and sanitized partial-repair receipts without production data.
|
|
144
180
|
`session-skill.test.js` exercises staging, complete resource availability, short
|
|
145
181
|
per-session pointers, managed admission/rollback/adopted sessions and external
|
|
146
182
|
ownership. Shared-service admission is covered by
|
|
@@ -8,7 +8,8 @@ async function main() {
|
|
|
8
8
|
try {
|
|
9
9
|
const [encoded, operation] = process.argv.slice(2);
|
|
10
10
|
const binding = JSON.parse(Buffer.from(encoded, 'base64url').toString());
|
|
11
|
-
const
|
|
11
|
+
const lifecycle = ['task-sessions', 'session-state', 'settle-session', 'unsettle-session', 'archive-session', 'unarchive-session'];
|
|
12
|
+
const operations = ['list', 'add', ...lifecycle, 'remote-hosts', 'add-remote', 'remote-projects', 'sessions', 'read-session', 'create-session', 'prompt-session'];
|
|
12
13
|
if (!['describe', ...operations].includes(operation)) throw new Error();
|
|
13
14
|
const origin = new URL(binding.hostOrigin);
|
|
14
15
|
if (origin.protocol !== 'http:' || !['127.0.0.1', '[::1]'].includes(origin.hostname) || origin.username || origin.password) throw new Error();
|
|
@@ -33,7 +34,7 @@ async function main() {
|
|
|
33
34
|
if (!response.ok) {
|
|
34
35
|
const terminal = [401, 403, 501].includes(response.status);
|
|
35
36
|
console.error(JSON.stringify({ error: 'Project API operation failed', status: response.status, terminal,
|
|
36
|
-
...(['invalid_input', 'validation_error', 'project_unavailable', 'project_operation_failed', 'remote_unavailable', 'remote_target_mismatch', 'remote_response_invalid'].includes(result?.code) ? { code: result.code } : {}),
|
|
37
|
+
...(['invalid_input', 'session_not_found', 'session_archived', 'session_operation_failed', 'not_found', 'directory_mismatch', 'validation_error', 'project_unavailable', 'project_operation_failed', 'remote_unavailable', 'remote_target_mismatch', 'remote_response_invalid'].includes(result?.code) ? { code: result.code } : {}),
|
|
37
38
|
recovery: terminal ? 'Stop this workflow; resume only with a new supported session and its bound project describe command.'
|
|
38
39
|
: 'Result not confirmed. Inspect the same target before retrying; retain sessionID/messageID for interrupted writes. Never switch to local or claim success from a failed request.',
|
|
39
40
|
}));
|
|
@@ -43,9 +44,19 @@ async function main() {
|
|
|
43
44
|
if (['add', 'add-remote'].includes(operation) && (typeof result.project?.id !== 'string' || typeof result.project?.path !== 'string' || typeof result.created !== 'boolean')) throw new Error();
|
|
44
45
|
if (operation === 'remote-hosts' && (!Array.isArray(result.hosts) || !Array.isArray(result.failed) || typeof result.complete !== 'boolean')) throw new Error();
|
|
45
46
|
if (operation === 'list' && !Array.isArray(result.projects)) throw new Error();
|
|
47
|
+
if (operation === 'task-sessions' && (!Array.isArray(result.sessions) || result.indexedOnly !== true
|
|
48
|
+
|| typeof result.historyComplete !== 'boolean' || (result.nextCursor !== null && typeof result.nextCursor !== 'string'))) throw new Error();
|
|
49
|
+
if (operation === 'session-state' && (result.sessionID !== input.sessionID || typeof result.indexed !== 'boolean'
|
|
50
|
+
|| !Number.isFinite(result.archivedAt) || (result.settled !== null && typeof result.settled !== 'boolean')
|
|
51
|
+
|| (result.pinned !== null && typeof result.pinned !== 'boolean'))) throw new Error();
|
|
52
|
+
if (['settle-session', 'unsettle-session'].includes(operation)
|
|
53
|
+
&& (result.sessionID !== input.sessionID || result.settled !== (operation === 'settle-session'))) throw new Error();
|
|
54
|
+
if (['archive-session', 'unarchive-session'].includes(operation)
|
|
55
|
+
&& (result.sessionID !== input.sessionID || result.archived !== (operation === 'archive-session')
|
|
56
|
+
|| !Number.isFinite(result.archivedAt) || (result.archivedAt > 0) !== result.archived)) throw new Error();
|
|
46
57
|
if (operation === 'describe' && result.supported !== true) throw new Error();
|
|
47
58
|
console.log(JSON.stringify(operation === 'describe' ? { ...result,
|
|
48
|
-
commands: Object.fromEntries(operations.filter((op) => result.remoteSupported || ['list', 'add'].includes(op)).map((op) => [op, sessionSkillCommand(process.execPath, process.argv[1], encoded, op)])),
|
|
59
|
+
commands: Object.fromEntries(operations.filter((op) => (lifecycle.includes(op) ? result.lifecycleSupported : result.remoteSupported || ['list', 'add'].includes(op))).map((op) => [op, sessionSkillCommand(process.execPath, process.argv[1], encoded, op)])),
|
|
49
60
|
} : result));
|
|
50
61
|
} catch {
|
|
51
62
|
console.error(JSON.stringify({ error: 'Bound project helper failed; the result is unconfirmed', terminal: !bound,
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { applyHostArchiveToIndexSnapshot } from '../session-index/host-authority-snapshot.js';
|
|
3
|
+
|
|
4
|
+
export const lifecycleOperations = ['task-sessions', 'session-state', 'settle-session', 'unsettle-session', 'archive-session', 'unarchive-session'];
|
|
5
|
+
|
|
6
|
+
export function validLifecycleInput(operation, input) {
|
|
7
|
+
if (!input || typeof input !== 'object' || Array.isArray(input)) return false;
|
|
8
|
+
const allowed = operation === 'task-sessions' ? ['directory', 'cursor']
|
|
9
|
+
: ['archive-session', 'unarchive-session'].includes(operation) ? ['sessionID', 'directory'] : ['sessionID'];
|
|
10
|
+
if (Object.entries(input).some(([key, value]) => !allowed.includes(key)
|
|
11
|
+
|| typeof value !== 'string' || !value.trim() || value.length > 4096 || /[\x00-\x1f]/.test(value))) return false;
|
|
12
|
+
if (input.directory !== undefined && !path.isAbsolute(input.directory)) return false;
|
|
13
|
+
if (operation === 'task-sessions') return input.cursor === undefined || /^(0|[1-9]\d{0,8})$/.test(input.cursor);
|
|
14
|
+
return typeof input.sessionID === 'string' && /^ses[A-Za-z0-9_]+$/.test(input.sessionID) && input.sessionID.length <= 256;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const unavailable = () => Object.assign(new Error('Session lifecycle unavailable'), { code: 'unsupported', status: 501 });
|
|
18
|
+
const notFound = () => Object.assign(new Error('Session not found'), { code: 'session_not_found', status: 404 });
|
|
19
|
+
|
|
20
|
+
/** Reuse the same index, Host archive authority and revision publisher as the UI. */
|
|
21
|
+
export function createProjectSessionLifecycle({ sessionIndexService, sessionArchiveService, publishSessionIndexChange, sessionMetadataStore }) {
|
|
22
|
+
if (!sessionIndexService || !sessionArchiveService || !sessionMetadataStore) return null;
|
|
23
|
+
const snapshot = async () => {
|
|
24
|
+
const stored = await sessionMetadataStore.getAll();
|
|
25
|
+
if (!stored || typeof stored !== 'object' || Array.isArray(stored)) throw new Error('Session metadata unavailable');
|
|
26
|
+
return applyHostArchiveToIndexSnapshot(sessionIndexService.snapshot(), stored);
|
|
27
|
+
};
|
|
28
|
+
return async (operation, input) => {
|
|
29
|
+
if (operation === 'task-sessions') {
|
|
30
|
+
const { directories, pinnedSessionIds = [] } = await snapshot();
|
|
31
|
+
const scoped = directories.filter((item) => !input.directory || item.directory === input.directory);
|
|
32
|
+
const pins = new Set(pinnedSessionIds);
|
|
33
|
+
const rows = scoped.flatMap((item) => item.sessions)
|
|
34
|
+
.filter((session) => !session.parentID)
|
|
35
|
+
.map((session) => ({
|
|
36
|
+
sessionID: session.id, directory: session.directory, title: session.title,
|
|
37
|
+
settled: Number(session.time?.settled ?? 0) > 0,
|
|
38
|
+
pinned: pins.has(session.id), activityUpdatedAt: session.metadata?.yuri?.titleRefresh?.activityUpdatedAt,
|
|
39
|
+
}));
|
|
40
|
+
const offset = Number(input.cursor ?? 0);
|
|
41
|
+
return {
|
|
42
|
+
sessions: rows.slice(offset, offset + 50),
|
|
43
|
+
nextCursor: offset + 50 < rows.length ? String(offset + 50) : null,
|
|
44
|
+
indexedOnly: true,
|
|
45
|
+
historyComplete: scoped.length > 0 && scoped.every((item) => item.lastFullSyncedAt > 0 && !item.hasMore),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const sessionID = input.sessionID;
|
|
49
|
+
if (operation === 'session-state') {
|
|
50
|
+
const hit = sessionIndexService.findBySessionId(sessionID);
|
|
51
|
+
const stored = await sessionMetadataStore.get(sessionID);
|
|
52
|
+
const stamp = stored?.yuri?.archive?.archivedAt;
|
|
53
|
+
if (!hit && !Number.isFinite(stamp)) throw notFound();
|
|
54
|
+
const view = await snapshot();
|
|
55
|
+
const row = view.directories.flatMap((item) => item.sessions).find((item) => item.id === sessionID);
|
|
56
|
+
return {
|
|
57
|
+
sessionID, indexed: Boolean(row),
|
|
58
|
+
archivedAt: Number.isFinite(stamp) ? stamp : hit.archivedAt,
|
|
59
|
+
settled: row ? Number(row.time?.settled ?? 0) > 0 : null,
|
|
60
|
+
pinned: row ? view.pinnedSessionIds.includes(sessionID) : null,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (operation === 'settle-session' || operation === 'unsettle-session') {
|
|
64
|
+
const action = operation === 'settle-session' ? 'setSettled' : 'clearSettled';
|
|
65
|
+
if (typeof sessionIndexService[action] !== 'function') throw unavailable();
|
|
66
|
+
// The index writer accepts unknown IDs for pending state; this API confirms only existing sessions.
|
|
67
|
+
const hit = sessionIndexService.findBySessionId(sessionID);
|
|
68
|
+
if (!hit) throw notFound();
|
|
69
|
+
const stored = await sessionMetadataStore.get(sessionID);
|
|
70
|
+
if (Number(stored?.yuri?.archive?.archivedAt ?? hit.archivedAt) > 0) {
|
|
71
|
+
throw Object.assign(new Error('Restore session archive first'), { code: 'session_archived', status: 409 });
|
|
72
|
+
}
|
|
73
|
+
if (!sessionIndexService[action](sessionID)) throw notFound();
|
|
74
|
+
publishSessionIndexChange?.();
|
|
75
|
+
return { sessionID, settled: operation === 'settle-session' };
|
|
76
|
+
}
|
|
77
|
+
const archived = operation === 'archive-session';
|
|
78
|
+
const result = await sessionArchiveService.setArchive({
|
|
79
|
+
sessionID, archivedAt: archived ? Date.now() : 0,
|
|
80
|
+
...(input.directory ? { directory: input.directory } : {}),
|
|
81
|
+
});
|
|
82
|
+
if (!Number.isFinite(result?.archivedAt) || (result.archivedAt > 0) !== archived
|
|
83
|
+
|| typeof result.index?.ok !== 'boolean') throw new Error('Session archive unconfirmed');
|
|
84
|
+
return {
|
|
85
|
+
sessionID, archived, archivedAt: result.archivedAt,
|
|
86
|
+
index: result.index.ok ? { ok: true } : { ok: false, retryable: true },
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { randomUUID } from 'node:crypto';
|
|
5
|
+
import { spawn } from 'node:child_process';
|
|
6
|
+
import express from 'express';
|
|
7
|
+
import { beforeEach, afterEach, describe, expect, it, vi } from 'vitest';
|
|
8
|
+
import { createUiAuth } from '../ui-auth/ui-auth.js';
|
|
9
|
+
import { registerAuthAndAccessRoutes } from '../opencode/core-routes.js';
|
|
10
|
+
import { createSessionIndexService } from '../session-index/service.js';
|
|
11
|
+
import { createSessionMetadataStore } from '../session-metadata/session-metadata-store.js';
|
|
12
|
+
import { createSessionArchiveService } from '../session-metadata/session-archive.js';
|
|
13
|
+
import { createCustomizationSkillInstaller } from './session-skill.js';
|
|
14
|
+
import { registerProjectsSkill, PROJECTS_SKILL_PATH } from './projects.js';
|
|
15
|
+
import { createProjectSessionLifecycle, lifecycleOperations } from './projects-lifecycle.js';
|
|
16
|
+
|
|
17
|
+
describe('bound session lifecycle helper end to end', () => {
|
|
18
|
+
let root, server, origin, auth, password, index, metadata, archive, records, publish, caller, command, shared, runtime;
|
|
19
|
+
const run = (command, input) => new Promise((resolve, reject) => {
|
|
20
|
+
const child = spawn(command, { shell: true, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
21
|
+
let stdout = '', stderr = '';
|
|
22
|
+
child.stdout.on('data', (chunk) => { stdout += chunk; });
|
|
23
|
+
child.stderr.on('data', (chunk) => { stderr += chunk; });
|
|
24
|
+
child.on('error', reject);
|
|
25
|
+
child.on('close', (code) => {
|
|
26
|
+
try { resolve({ code, stdout, stderr, value: JSON.parse(code === 0 ? stdout : stderr) }); }
|
|
27
|
+
catch (error) { reject(error); }
|
|
28
|
+
});
|
|
29
|
+
child.stdin.end(input === undefined ? '' : JSON.stringify(input));
|
|
30
|
+
});
|
|
31
|
+
const request = (operation, input = {}, headers = auth) => fetch(`${origin}${PROJECTS_SKILL_PATH}`, {
|
|
32
|
+
method: 'POST', headers: { 'content-type': 'application/json', ...headers },
|
|
33
|
+
body: JSON.stringify({ sessionID: caller.id, operation, input }),
|
|
34
|
+
});
|
|
35
|
+
const commands = async () => {
|
|
36
|
+
const result = await run(command);
|
|
37
|
+
expect(result.code).toBe(0);
|
|
38
|
+
expect(result.value.lifecycleSupported).toBe(true);
|
|
39
|
+
expect(Object.keys(result.value.commands)).toEqual(['list', 'add', ...lifecycleOperations]);
|
|
40
|
+
return result.value.commands;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
beforeEach(async () => {
|
|
44
|
+
root = await fs.mkdtemp(path.join(os.tmpdir(), 'project-lifecycle-'));
|
|
45
|
+
password = randomUUID(); shared = true; runtime = 'http://runtime.test';
|
|
46
|
+
auth = { Authorization: `Basic ${Buffer.from(`opencode:${password}`).toString('base64')}` };
|
|
47
|
+
const registrationFile = path.join(root, 'service.json');
|
|
48
|
+
await fs.writeFile(registrationFile, JSON.stringify({ url: runtime, password }), { mode: 0o600 });
|
|
49
|
+
index = createSessionIndexService({ dbPath: path.join(root, 'index.sqlite'), getRuntimeConfig: () => ({ apiBaseUrl: runtime }) });
|
|
50
|
+
metadata = createSessionMetadataStore({ dataDir: root });
|
|
51
|
+
const now = Date.now();
|
|
52
|
+
records = new Map([['ses_target', { id: 'ses_target', title: 'Target', directory: root, time: { created: now, updated: now } }]]);
|
|
53
|
+
index.upsert(records.get('ses_target'));
|
|
54
|
+
index.clearSettled('ses_target');
|
|
55
|
+
publish = vi.fn();
|
|
56
|
+
archive = createSessionArchiveService({
|
|
57
|
+
sessionMetadataStore: metadata, sessionIndexService: index,
|
|
58
|
+
fetchUpstreamSession: async ({ sessionID }) => records.get(sessionID) ?? null,
|
|
59
|
+
broadcastSessionEvent: publish,
|
|
60
|
+
});
|
|
61
|
+
caller = { id: 'ses_caller', metadata: { yuri: { scheduledTaskSkill: {} } } };
|
|
62
|
+
const app = express();
|
|
63
|
+
registerAuthAndAccessRoutes(app, {
|
|
64
|
+
express, tunnelAuthController: { classifyRequestScope: () => 'local' },
|
|
65
|
+
uiAuthController: createUiAuth({ password: randomUUID() }),
|
|
66
|
+
getScheduledTaskSkillAuthHeaders: () => auth,
|
|
67
|
+
});
|
|
68
|
+
registerProjectsSkill(app, {
|
|
69
|
+
express, getIsSharedOpenCodeService: () => shared, getOpenCodeAuthHeaders: () => auth,
|
|
70
|
+
createClient: () => ({ session: { get: async () => caller } }),
|
|
71
|
+
sessionLifecycle: createProjectSessionLifecycle({
|
|
72
|
+
sessionIndexService: index, sessionArchiveService: archive, sessionMetadataStore: metadata,
|
|
73
|
+
publishSessionIndexChange: publish,
|
|
74
|
+
}),
|
|
75
|
+
});
|
|
76
|
+
server = await new Promise((resolve) => { const s = app.listen(0, '127.0.0.1', () => resolve(s)); });
|
|
77
|
+
origin = `http://127.0.0.1:${server.address().port}`;
|
|
78
|
+
caller.metadata.yuri.scheduledTaskSkill.hostOrigin = origin;
|
|
79
|
+
let pointer;
|
|
80
|
+
await createCustomizationSkillInstaller({ yuriDataDir: root })({
|
|
81
|
+
session: { instructions: { entry: { put: ({ value }) => { pointer = value; } } } },
|
|
82
|
+
}, caller.id, { projectBinding: { hostOrigin: origin, upstreamOrigin: runtime, registrationFile } });
|
|
83
|
+
command = pointer.split('Bound project helper: ')[1].split('\n')[0];
|
|
84
|
+
});
|
|
85
|
+
afterEach(async () => {
|
|
86
|
+
archive.stop?.();
|
|
87
|
+
await new Promise((resolve) => server.close(resolve));
|
|
88
|
+
index.close();
|
|
89
|
+
await fs.rm(root, { recursive: true, force: true });
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('discovers, settles, re-reads and restores through staged commands without UI password, preserving pins and metadata', async () => {
|
|
93
|
+
expect((await fetch(`${origin}/api/yuri/session-index`)).status).toBe(401);
|
|
94
|
+
index.setPinned('ses_target');
|
|
95
|
+
const cmd = await commands();
|
|
96
|
+
const list = await run(cmd['task-sessions'], {});
|
|
97
|
+
expect(list.value.sessions).toEqual([expect.objectContaining({ sessionID: 'ses_target', settled: false, pinned: true })]);
|
|
98
|
+
expect((await run(cmd['settle-session'], { sessionID: 'ses_target' })).value).toEqual({ sessionID: 'ses_target', settled: true });
|
|
99
|
+
expect(publish).toHaveBeenCalledOnce();
|
|
100
|
+
expect((await run(cmd['task-sessions'], { directory: root })).value.sessions[0]).toMatchObject({ settled: true, pinned: true });
|
|
101
|
+
expect((await run(cmd['session-state'], { sessionID: 'ses_target' })).value).toMatchObject({ indexed: true, settled: true, pinned: true, archivedAt: 0 });
|
|
102
|
+
expect(await metadata.get('ses_target')).toEqual({});
|
|
103
|
+
expect((await run(cmd['unsettle-session'], { sessionID: 'ses_target' })).value.settled).toBe(false);
|
|
104
|
+
expect((await run(cmd['task-sessions'], {})).value.sessions[0].settled).toBe(false);
|
|
105
|
+
expect(publish).toHaveBeenCalledTimes(2);
|
|
106
|
+
expect(list.stdout).not.toContain(password);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('round-trips session archive through its real owner and persisted metadata, independently of settle', async () => {
|
|
110
|
+
const cmd = await commands();
|
|
111
|
+
const saved = await run(cmd['archive-session'], { sessionID: 'ses_target', directory: root });
|
|
112
|
+
expect(saved.value).toMatchObject({ sessionID: 'ses_target', archived: true, archivedAt: expect.any(Number), index: { ok: true } });
|
|
113
|
+
expect((await createSessionMetadataStore({ dataDir: root }).get('ses_target')).yuri.archive.archivedAt).toBe(saved.value.archivedAt);
|
|
114
|
+
expect((await run(cmd['task-sessions'], {})).value.sessions).toEqual([]);
|
|
115
|
+
expect((await run(cmd['session-state'], { sessionID: 'ses_target' })).value).toEqual({
|
|
116
|
+
sessionID: 'ses_target', indexed: false, archivedAt: saved.value.archivedAt, settled: null, pinned: null,
|
|
117
|
+
});
|
|
118
|
+
const restored = await run(cmd['unarchive-session'], { sessionID: 'ses_target' });
|
|
119
|
+
expect(restored.value).toMatchObject({ archived: false, archivedAt: 0, index: { ok: true } });
|
|
120
|
+
expect((await run(cmd['task-sessions'], {})).value.sessions).toHaveLength(1);
|
|
121
|
+
expect(saved.stdout + restored.stdout).not.toContain(password);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
it('rejects unknown IDs and invalid input instead of fabricating successful settle writes', async () => {
|
|
125
|
+
const cmd = await commands();
|
|
126
|
+
const result = await run(cmd['settle-session'], { sessionID: 'ses_missing' });
|
|
127
|
+
expect(result).toMatchObject({ code: 1, value: { status: 404, code: 'session_not_found', terminal: false } });
|
|
128
|
+
expect((await run(cmd['archive-session'], { sessionID: 'ses_missing' })).value).toMatchObject({ status: 404, code: 'not_found' });
|
|
129
|
+
expect((await run(cmd['session-state'], { sessionID: 'ses_missing' })).value).toMatchObject({ status: 404, code: 'session_not_found' });
|
|
130
|
+
for (const operation of lifecycleOperations) {
|
|
131
|
+
for (const input of [null, [], { sessionID: 'invalid' }, { sessionID: 'ses_target', target: {} }, { directory: 'relative' }]) {
|
|
132
|
+
expect((await request(operation, input)).status).toBe(400);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
expect(publish).not.toHaveBeenCalled();
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
it('gates every lifecycle operation by service authentication and admitted Host, and prevents cross-runtime writes', async () => {
|
|
139
|
+
for (const operation of lifecycleOperations) {
|
|
140
|
+
const input = operation === 'task-sessions' ? {} : { sessionID: 'ses_target' };
|
|
141
|
+
for (const headers of [{}, { Authorization: 'Bearer browser' }, { ...auth, Origin: origin }]) {
|
|
142
|
+
expect((await request(operation, input, headers)).status).toBe(403);
|
|
143
|
+
}
|
|
144
|
+
caller.metadata.yuri.scheduledTaskSkill.hostOrigin = 'http://127.0.0.1:1';
|
|
145
|
+
expect((await request(operation, input)).status).toBe(403);
|
|
146
|
+
caller.metadata.yuri.scheduledTaskSkill.hostOrigin = origin;
|
|
147
|
+
}
|
|
148
|
+
runtime = 'http://other-runtime.test';
|
|
149
|
+
expect((await request('task-sessions')).status).toBe(200);
|
|
150
|
+
expect((await (await request('task-sessions')).json()).sessions).toEqual([]);
|
|
151
|
+
expect((await request('settle-session', { sessionID: 'ses_target' })).status).toBe(404);
|
|
152
|
+
shared = false;
|
|
153
|
+
expect((await request('describe')).status).toBe(403);
|
|
154
|
+
expect(publish).not.toHaveBeenCalled();
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it('returns metadata read failures as errors and partial archive repair without leaking raw exceptions', async () => {
|
|
158
|
+
const cmd = await commands();
|
|
159
|
+
const failedRead = vi.spyOn(metadata, 'getAll').mockRejectedValueOnce(new Error('private-token'));
|
|
160
|
+
expect((await run(cmd['task-sessions'], {})).value).toMatchObject({ status: 503, code: 'session_operation_failed' });
|
|
161
|
+
failedRead.mockRestore();
|
|
162
|
+
const failedIndex = vi.spyOn(index, 'upsertAndReportChange').mockImplementation(() => { throw new Error('private-token'); });
|
|
163
|
+
const result = await run(cmd['archive-session'], { sessionID: 'ses_target' });
|
|
164
|
+
expect(result.value).toMatchObject({ archived: true, index: { ok: false, retryable: true } });
|
|
165
|
+
expect(result.stdout + result.stderr).not.toContain('private-token');
|
|
166
|
+
failedIndex.mockRestore();
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
it('rejects a stale indexed session archive and propagates metadata/write failures without publishing success', async () => {
|
|
170
|
+
await metadata.setSessionMetadata('ses_target', { yuri: { archive: { archivedAt: Date.now() } } }, { allowArchive: true });
|
|
171
|
+
expect((await request('unsettle-session', { sessionID: 'ses_target' })).status).toBe(409);
|
|
172
|
+
expect((await request('task-sessions')).status).toBe(200);
|
|
173
|
+
expect((await (await request('task-sessions')).json()).sessions).toEqual([]);
|
|
174
|
+
await metadata.setSessionMetadata('ses_target', { yuri: { archive: { archivedAt: 0 } } }, { allowArchive: true });
|
|
175
|
+
const failedRead = vi.spyOn(metadata, 'get').mockRejectedValueOnce(new Error('private-token'));
|
|
176
|
+
expect((await request('settle-session', { sessionID: 'ses_target' })).status).toBe(503);
|
|
177
|
+
failedRead.mockRestore();
|
|
178
|
+
const failedWrite = vi.spyOn(index, 'setSettled').mockImplementationOnce(() => { throw new Error('private-token'); });
|
|
179
|
+
const response = await request('settle-session', { sessionID: 'ses_target' });
|
|
180
|
+
expect(response.status).toBe(503);
|
|
181
|
+
expect(await response.text()).not.toContain('private-token');
|
|
182
|
+
failedWrite.mockRestore();
|
|
183
|
+
expect(publish).not.toHaveBeenCalled();
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
it('paginates a scoped index completely without mistaking it for full upstream history', async () => {
|
|
187
|
+
for (let n = 0; n < 55; n++) index.upsert({ ...records.get('ses_target'), id: `ses_${n}`, directory: path.join(root, `repo-${n}`) });
|
|
188
|
+
const cmd = await commands();
|
|
189
|
+
const first = await run(cmd['task-sessions'], {});
|
|
190
|
+
expect(first.value).toMatchObject({ indexedOnly: true, nextCursor: '50', historyComplete: false });
|
|
191
|
+
expect(first.value.sessions).toHaveLength(50);
|
|
192
|
+
const next = await run(cmd['task-sessions'], { cursor: first.value.nextCursor });
|
|
193
|
+
expect(next.value).toMatchObject({ nextCursor: null });
|
|
194
|
+
expect(next.value.sessions).toHaveLength(6);
|
|
195
|
+
const all = [...first.value.sessions, ...next.value.sessions];
|
|
196
|
+
expect(new Set(all.map((row) => row.sessionID)).size).toBe(56);
|
|
197
|
+
expect((await run(cmd['task-sessions'], { directory: root })).value.sessions).toHaveLength(1);
|
|
198
|
+
});
|
|
199
|
+
});
|