@yuriai/web 0.3.6-beta.7 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -3
- package/bin/install-portable.sh +102 -0
- package/bin/install-portable.test.js +112 -0
- package/bin/lib/DOCUMENTATION.md +2 -0
- package/bin/lib/cli-startup.js +7 -2
- package/bin/lib/cli-startup.portable.test.js +30 -0
- package/bin/lib/commands-serve.js +4 -1
- package/bin/lib/commands-update.js +3 -0
- package/bin/lib/commands-update.test.js +18 -0
- package/dist/assets/{AgentAvatar-BAQBlzA3.js → AgentAvatar-BOvjZ-DI.js} +1 -1
- package/dist/assets/{AgentSelector-J9hP4-Bk.js → AgentSelector-Dl_zIOMk.js} +1 -1
- package/dist/assets/ArchivedSessionsDialog-Cr9Ji-RY.js +1 -0
- package/dist/assets/{AssistantConversationSurface-_A2W4Tnz.js → AssistantConversationSurface-CLdjNFeJ.js} +3 -3
- package/dist/assets/{AssistantSessionCard-DwFD8GED.js → AssistantSessionCard-BufyrOfo.js} +2 -2
- package/dist/assets/{AssistantUnreadBadge-CE-vFrqq.js → AssistantUnreadBadge-Dn9HAEDr.js} +1 -1
- package/dist/assets/{AssistantView-CwbzFAMd.js → AssistantView-Cg0wPomu.js} +1 -1
- package/dist/assets/{AssistantWorkingAvatar-BsEtliRi.js → AssistantWorkingAvatar-1KNjr2A2.js} +1 -1
- package/dist/assets/{AssistantsSettingsPage-D9VPa4dh.js → AssistantsSettingsPage-DeYfZAYH.js} +1 -1
- package/dist/assets/BinaryFileFallback-DfD02fS_.js +1 -0
- package/dist/assets/{BtwPanel-BKb8rDF4.js → BtwPanel-B_2w8P0X.js} +2 -2
- package/dist/assets/BusyDots-CAv4ygIO.js +4 -0
- package/dist/assets/{ChatContainer-ZnwOYIsK.js → ChatContainer-Dgv075jT.js} +23 -23
- package/dist/assets/ChatView-Cr71C0ZB.js +3 -0
- package/dist/assets/{DiagramView-DlPmGnFF.js → DiagramView-CTnpBsWU.js} +1 -1
- package/dist/assets/{DiffView-C4OcFwR2.js → DiffView-j_yWF1Mz.js} +2 -2
- package/dist/assets/{DiffViewToggle-DP9SqcOq.js → DiffViewToggle-CYusbmY5.js} +1 -1
- package/dist/assets/{ErrorBoundary-4W-EnYOU.js → ErrorBoundary-yr_JeVdx.js} +1 -1
- package/dist/assets/{FadeInOnReveal-nGKSFTqz.js → FadeInOnReveal-C56koblQ.js} +1 -1
- package/dist/assets/{GuiPluginMount-c2DXwGOK.js → GuiPluginMount-CBJiLdzR.js} +1 -1
- package/dist/assets/{GuiPluginPage-DqdVVRyY.js → GuiPluginPage-DJa8gFLk.js} +1 -1
- package/dist/assets/{GuiPluginSurface-CHSyQ4aq.js → GuiPluginSurface-Cc7q80jp.js} +1 -1
- package/dist/assets/{GuiPluginTitlebarItems-CBKus1Mw.js → GuiPluginTitlebarItems-rbK3leaL.js} +1 -1
- package/dist/assets/{GuiPluginWindow-AKqPYEmj.js → GuiPluginWindow-Cpg2HYWe.js} +1 -1
- package/dist/assets/{Icon-DlTEfBVi.js → Icon-C1rjS64C.js} +1 -1
- package/dist/assets/{ImageLoadingPlaceholder-ashKHrbc.js → ImageLoadingPlaceholder-2hMqBtYh.js} +1 -1
- package/dist/assets/{LoadingImage-3JaK3zim.js → LoadingImage-Bs-621ZL.js} +1 -1
- package/dist/assets/MarkdownRenderer-BZl_T1ng.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-B1l_DAn4.js → MarkdownRendererImpl-DiCCNjDr.js} +3 -3
- package/dist/assets/{MarkstreamRendererImpl-D6ZF2eue.js → MarkstreamRendererImpl-Bzz3OZlX.js} +2 -2
- package/dist/assets/{MobileAssistantSettingsPage-Dm4f6DKQ.js → MobileAssistantSettingsPage-pBhJR2t6.js} +1 -1
- package/dist/assets/{MobileAssistantTab-CmMbLmB9.js → MobileAssistantTab-Ceo442NF.js} +1 -1
- package/dist/assets/{MobileBtwPage-CNj2pFrK.js → MobileBtwPage-DPPmDMA6.js} +1 -1
- package/dist/assets/{MobileChangesSurface-CLD7Fujk.js → MobileChangesSurface-DfDoSkTS.js} +1 -1
- package/dist/assets/{MobileChatScreen-a7vpuIM7.js → MobileChatScreen-DHTbrnAr.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-BPj5iEVr.js → MobileDetailNavigation-e1u1y59T.js} +1 -1
- package/dist/assets/{MobileFilesSurface-Ct7W0756.js → MobileFilesSurface-CJoqR3By.js} +2 -2
- package/dist/assets/{MobileHtmlNetworkBoundary-BcAbBib9.js → MobileHtmlNetworkBoundary-GBhYVYvu.js} +2 -2
- package/dist/assets/{MobileOverlayPanel-Dn4b7Mdh.js → MobileOverlayPanel-DzKTKeZX.js} +1 -1
- package/dist/assets/{MobileResizableSheet-BMSiXFxQ.js → MobileResizableSheet-CkA7qhco.js} +1 -1
- package/dist/assets/{MobileSettingsTab-b_XK7f7k.js → MobileSettingsTab-Bv0HsXFH.js} +1 -1
- package/dist/assets/{MobileShareBridge-BCHk5fz-.js → MobileShareBridge-B-co2UPE.js} +1 -1
- package/dist/assets/{MobileSurface-CXbG9hIC.js → MobileSurface-D63k27t5.js} +1 -1
- package/dist/assets/{MobileTabPageHeader-CipRIWUc.js → MobileTabPageHeader-FmtbGhwq.js} +1 -1
- package/dist/assets/{ModelLogo-Bbgp7ClJ.js → ModelLogo-CMnp5fyy.js} +1 -1
- package/dist/assets/{ModelSelector-BkrO8Ru2.js → ModelSelector-BF4wYwaz.js} +1 -1
- package/dist/assets/{MultiRunWindow-rDqLANIK.js → MultiRunWindow-D0OU63re.js} +1 -1
- package/dist/assets/{OnboardingScreen-DOcb9Wbw.js → OnboardingScreen-CDHtDQ0k.js} +1 -1
- package/dist/assets/{OverlayScrollbar-qJOPKg_1.js → OverlayScrollbar-m1EAqRES.js} +1 -1
- package/dist/assets/{PierreDiffViewer-DkAFZ6Oy.js → PierreDiffViewer-CZk1tZ3K.js} +1 -1
- package/dist/assets/{ProviderLogo-xLMKk9bq.js → ProviderLogo-BqQTME35.js} +1 -1
- package/dist/assets/{RemoteAssistantSessionCard-iPGtzThJ.js → RemoteAssistantSessionCard-CrbCVhqD.js} +1 -1
- package/dist/assets/{RemoteDesktopPanel-Da5Cb1yO.js → RemoteDesktopPanel-BzLmzmjb.js} +1 -1
- package/dist/assets/ScheduledTasksDialog-DmtcDZHc.js +3 -0
- package/dist/assets/{ScrollableOverlay-X1R_GNYm.js → ScrollableOverlay-CEglrXfm.js} +1 -1
- package/dist/assets/{SettingsGroup-DYxliYJo.js → SettingsGroup-Bm-l3IIs.js} +1 -1
- package/dist/assets/{SettingsView-Dfvs9-aB.js → SettingsView-CYEjDYWC.js} +15 -15
- package/dist/assets/{SettingsWindow-CCACaIcI.js → SettingsWindow-CvJsxUyu.js} +1 -1
- package/dist/assets/{SetupTourDialog-CTzVvWuI.js → SetupTourDialog-DWaVtkY0.js} +1 -1
- package/dist/assets/{SyncActions-BKhytR-H.js → SyncActions-C0gph0P8.js} +1 -1
- package/dist/assets/TerminalView-Cm8Ts51w.js +9 -0
- package/dist/assets/{TextSelectionMenu-C--W3Vxw.js → TextSelectionMenu-Dcv_PdES.js} +2 -2
- package/dist/assets/{ToolOutputDialog-4QosyyR-.js → ToolOutputDialog-QJpQjmqK.js} +2 -2
- package/dist/assets/{YuriLogo-YAE_6MsI.js → YuriLogo-BbS_Wj4g.js} +1 -1
- package/dist/assets/{YuriWordmark-BFHeVOwW.js → YuriWordmark-CqkcfAJl.js} +1 -1
- package/dist/assets/{assistant-attachment-cache-B8Bvp93X.js → assistant-attachment-cache-CIij0OGm.js} +1 -1
- package/dist/assets/{assistantMessagePreview-Dnt4nt3K.js → assistantMessagePreview-wmP-d_oa.js} +1 -1
- package/dist/assets/{assistantQueries-CV8A3Du5.js → assistantQueries-Dpxq78yP.js} +1 -1
- package/dist/assets/{auto-read-context-DWZsSvww.js → auto-read-context-aRn5yhDb.js} +1 -1
- package/dist/assets/{capgoAdapter-Dlf0ZlyX.js → capgoAdapter-BSnmtwX8.js} +1 -1
- package/dist/assets/{card-5xUgzwRy.js → card-aoveY4I3.js} +1 -1
- package/dist/assets/{chatUpwardIntent-ExbNZtoR.js → chatUpwardIntent-WxxmOppY.js} +1 -1
- package/dist/assets/{checkbox-BFuJ7w49.js → checkbox-CljLXON1.js} +1 -1
- package/dist/assets/{client-Brr-ja1l.js → client-CmtAKi5B.js} +1 -1
- package/dist/assets/{collapsible-DVLlg0W-.js → collapsible-DkeWKEAb.js} +1 -1
- package/dist/assets/{connection-hint-BARMaHbM.js → connection-hint-DsKyICgn.js} +1 -1
- package/dist/assets/{context-menu-CUqRZr1z.js → context-menu-XuMa5TsA.js} +1 -1
- package/dist/assets/{desktopHosts-BBCo4tyU.js → desktopHosts-COI-czjF.js} +1 -1
- package/dist/assets/{desktopRelayRestore-Cm2ITP98.js → desktopRelayRestore-BEPNc7qb.js} +1 -1
- package/dist/assets/device-TCHW5U2y.js +2 -0
- package/dist/assets/{diagram-BazwKH8x.js → diagram-DFv7Lh0h.js} +1 -1
- package/dist/assets/dialog-B6B8FIrL.css +1 -0
- package/dist/assets/{dialog-C_SxVFAo.js → dialog-Cx20I73q.js} +1 -1
- package/dist/assets/{dropdown-menu-CtAMJkEu.js → dropdown-menu-XdfySbu2.js} +1 -1
- package/dist/assets/es-CLAEdHpc.js +15 -0
- package/dist/assets/{fileMentionTouchSelection-DTWPCfYk.js → fileMentionTouchSelection-pXNTKHAc.js} +1 -1
- package/dist/assets/{fileReferenceActions-ez7SW3IW.js → fileReferenceActions-wN7mWY3w.js} +1 -1
- package/dist/assets/fr-BOB0gfdQ.js +13 -0
- package/dist/assets/{gitApi-SW-vcLxI.js → gitApi-LXGRaDt8.js} +1 -1
- package/dist/assets/{gitApiHttp-fl5lB9Lu.js → gitApiHttp-ZjM4HkSo.js} +2 -2
- package/dist/assets/{githubAuthQueries-2oyz-OKR.js → githubAuthQueries-3AJp5LD5.js} +1 -1
- package/dist/assets/{historyImportQueries-CTTVEQfk.js → historyImportQueries-B_mfphxe.js} +1 -1
- package/dist/assets/host-fTclNJST.js +1 -0
- package/dist/assets/{i18n-CzwXzoAE.js → i18n-iu4pzqPi.js} +1 -1
- package/dist/assets/{icons-B9kwDPqG.js → icons-BWijARKS.js} +1 -1
- package/dist/assets/{imageSource-5oLkHxn4.js → imageSource-qzgDdfT4.js} +1 -1
- package/dist/assets/{input-JTEWOZSR.js → input-BMYgp87Q.js} +1 -1
- package/dist/assets/{input-store-olhHHDxh.js → input-store-CzG_3qFv.js} +1 -1
- package/dist/assets/insertionBoundaries-bmxIeFzH.js +1 -0
- package/dist/assets/ja-CfM9jZ6u.js +15 -0
- package/dist/assets/{kbd-2UM_iptD.js → kbd-6RW-BxuR.js} +1 -1
- package/dist/assets/ko-DZOSVPHB.js +15 -0
- package/dist/assets/main-B-Wdp6An.js +169 -0
- package/dist/assets/main-BLBAaohb.js +2 -0
- package/dist/assets/{markdownHeightCache-CYOg5vHN.js → markdownHeightCache-ojT5txMS.js} +1 -1
- package/dist/assets/{mcpQueries-BBdJw27k.js → mcpQueries-BRuytwhB.js} +1 -1
- package/dist/assets/miniChat-BsrHy2rU.js +2 -0
- package/dist/assets/mobile-B8SHiXyq.js +2 -0
- package/dist/assets/{mobileBackNavigation-BMKb1AFe.js → mobileBackNavigation-CVrR_jtn.js} +1 -1
- package/dist/assets/{mobileConnections-B3sO6LHd.js → mobileConnections-iSUwFNqu.js} +2 -2
- package/dist/assets/{multirun-CIo87Y8M.js → multirun-Y3K5yS-8.js} +1 -1
- package/dist/assets/{native-config-B9rt7FGl.js → native-config-tvqKHwCC.js} +1 -1
- package/dist/assets/{nativeComposerCover-692JM3W7.js → nativeComposerCover-5rYz1E3W.js} +1 -1
- package/dist/assets/{navigation-DZmwc567.js → navigation-DFmCAq2g.js} +2 -2
- package/dist/assets/openRemoteProjectSession-CeSahDtQ.js +1 -0
- package/dist/assets/openSessionFromDeepLink-DsZnNy4W.js +2 -0
- package/dist/assets/pl-CaT81Sz8.js +15 -0
- package/dist/assets/platform-B2ylz14u.js +1 -0
- package/dist/assets/{pluginPresentation-mP_3zj0n.js → pluginPresentation-rls1AMJN.js} +2 -2
- package/dist/assets/{project-preview-D6gRDnY0.js → project-preview-yQerlKs2.js} +1 -1
- package/dist/assets/{projectActions-BhKknl2F.js → projectActions-B11KAI3f.js} +1 -1
- package/dist/assets/{prompt-attachment-upload-DmbZaK4Q.js → prompt-attachment-upload-BzYqZdzd.js} +1 -1
- package/dist/assets/pt-BR-9p1IKCEF.js +15 -0
- package/dist/assets/pwa-BrLPfcLk.js +2 -0
- package/dist/assets/{queue-abort-optimistic-DEP8n-eH.js → queue-abort-optimistic-CXKdQu_T.js} +1 -1
- package/dist/assets/{quota-noApkDjp.js → quota-BhdKv_Wc.js} +1 -1
- package/dist/assets/{reference-history-YQuuHaEQ.js → reference-history-Bzn-aPYg.js} +1 -1
- package/dist/assets/{remote-input-store-BuAuKvuo.js → remote-input-store-DPw_n0MZ.js} +1 -1
- package/dist/assets/{remoteProjectQueries-DtoxpM86.js → remoteProjectQueries-BQzoY_Y9.js} +1 -1
- package/dist/assets/{remoteSessionReference-Dh6CWWHy.js → remoteSessionReference-DORvqUYQ.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-BXmpVc6d.js → renderElectronMiniChatApp-DXKgwBat.js} +2 -2
- package/dist/assets/renderMobileApp-CKN6rWxR.js +17 -0
- package/dist/assets/{runtime-file-download-CljroGkE.js → runtime-file-download-CaeLqIEY.js} +1 -1
- package/dist/assets/{runtime-file-resource-BlS-Ew1z.js → runtime-file-resource-BGZ4tGr5.js} +1 -1
- package/dist/assets/{runtimeConfig-CuW_HzK3.js → runtimeConfig-BqUZF6Wt.js} +1 -1
- package/dist/assets/runtimeEndpointReset-Bu02gAs3.js +4 -0
- package/dist/assets/{scheduledTaskNavigation-B1lpSDXk.js → scheduledTaskNavigation-r3g3DfXq.js} +1 -1
- package/dist/assets/{select-CDQXclVD.js → select-BPIsJWhM.js} +1 -1
- package/dist/assets/{sessionLookup-CQ0NWnCZ.js → sessionLookup-DZhrkKRI.js} +1 -1
- package/dist/assets/sessionOwnership-LoUNVeuJ.js +2 -0
- package/dist/assets/{shortcuts-DstiGEO9.js → shortcuts-DMupfl7l.js} +1 -1
- package/dist/assets/{sortable-tabs-strip-DyQNBvm3.js → sortable-tabs-strip-1bKw81VO.js} +1 -1
- package/dist/assets/{speechSettingsQueries-BkOKGdjP.js → speechSettingsQueries-C3JgzCqy.js} +1 -1
- package/dist/assets/src-BacdFOCS.css +2 -0
- package/dist/assets/{store-BRt8bo0A.js → store-BgsgBTwJ.js} +5 -5
- package/dist/assets/{switch-zJbRtv_r.js → switch-B4-v9kvg.js} +1 -1
- package/dist/assets/{terminalApi-FD8v3NAb.js → terminalApi-wdwb9MVG.js} +1 -1
- package/dist/assets/{textarea-DTZqFbDz.js → textarea-DExmj0ZR.js} +1 -1
- package/dist/assets/{timeFormat-Cfigwcpm.js → timeFormat-BlSO2-ws.js} +1 -1
- package/dist/assets/{tooltip-dWH5QFxu.js → tooltip-Di-WRJUZ.js} +1 -1
- package/dist/assets/{truncated-path-CXZAFwlh.js → truncated-path-nKzykV5p.js} +1 -1
- package/dist/assets/types-4xeqxklF.js +2 -0
- package/dist/assets/ui-BCYkB585.js +13 -0
- package/dist/assets/uk-BUSl_Y_1.js +15 -0
- package/dist/assets/useAppFontEffects-BCJPQstm.js +7 -0
- package/dist/assets/{useAssistantUIStore-90j09IZB.js → useAssistantUIStore-BUWPTwNV.js} +1 -1
- package/dist/assets/{useDesktopWindowControlsLayout-DGB6_pWm.js → useDesktopWindowControlsLayout-BtpyMlOS.js} +1 -1
- package/dist/assets/{useDictation-hf70zk6P.js → useDictation-4HBMkISY.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-CcSfY1lN.js → useEffectiveDirectory-BYswRwIv.js} +1 -1
- package/dist/assets/useFontPreferences-C4dQT72k.js +1 -0
- package/dist/assets/{useGitStore-IAG82rgx.js → useGitStore-DqBPgmf-.js} +1 -1
- package/dist/assets/{useInlineCommentDraftStore-DAq3lz0A.js → useInlineCommentDraftStore-CGJ6dM8d.js} +1 -1
- package/dist/assets/useMcpConfigStore-DEcxFuzW.js +1 -0
- package/dist/assets/{useMobileSwipeActions-5-ZcwhfI.js → useMobileSwipeActions-DqlR4X-T.js} +1 -1
- package/dist/assets/useMobileTranscriptSyncHint-BDKcqtq_.js +10 -0
- package/dist/assets/{useModelLists-D8s2D-yz.js → useModelLists-DsFTBlMr.js} +1 -1
- package/dist/assets/{useOpenCodeReadiness-BIyAApPB.js → useOpenCodeReadiness-CHybAoBh.js} +1 -1
- package/dist/assets/usePluginsStore-BIBHPK4A.js +1 -0
- package/dist/assets/{useProjectGitActions-DPqScNnn.js → useProjectGitActions-DeFcqi_O.js} +1 -1
- package/dist/assets/{useProjectGitStore-BOiooCle.js → useProjectGitStore-JGZk-NCk.js} +1 -1
- package/dist/assets/{useProjectRuntimeAPIs-DQaT_Ok_.js → useProjectRuntimeAPIs-BMBBtJB-.js} +1 -1
- package/dist/assets/{useQuotaStore-C3FDA_wk.js → useQuotaStore-C3qJTiD7.js} +1 -1
- package/dist/assets/{useSessionBtwStore-eNT3w9Un.js → useSessionBtwStore-D7P-pknd.js} +1 -1
- package/dist/assets/{useStreamingTextThrottle-D8r8Ox9l.js → useStreamingTextThrottle-CjWAE0oQ.js} +1 -1
- package/dist/assets/useTerminalStore-C_QzSEgP.js +1 -0
- package/dist/assets/{useUIStore-BkYqSmAD.js → useUIStore-68ZPpgYA.js} +1 -1
- package/dist/assets/worktreeManager-pRvX5dQT.js +1 -0
- package/dist/assets/{worktreeSourceBranchPreference-B9rTzT2t.js → worktreeSourceBranchPreference-B7d3RYcc.js} +1 -1
- package/dist/assets/zh-CN-BGKgQtWd.js +15 -0
- package/dist/assets/zh-TW-jM5lIKfe.js +15 -0
- package/dist/index.html +16 -16
- package/dist/mini-chat.html +16 -16
- package/dist/mobile.html +2 -2
- package/package.json +2 -1
- package/server/index.js +22 -10
- package/server/lib/assistants/DOCUMENTATION.md +11 -6
- package/server/lib/assistants/builtin-skills.js +19 -3
- package/server/lib/assistants/builtin-skills.test.js +17 -0
- package/server/lib/assistants/contact-tools.js +47 -3
- package/server/lib/assistants/contact-tools.test.js +59 -0
- package/server/lib/assistants/harness.js +5 -2
- package/server/lib/assistants/harness.test.js +1 -1
- package/server/lib/assistants/routes.js +1 -0
- package/server/lib/assistants/service.js +7 -2
- package/server/lib/assistants/yuri-tools.js +1 -1
- package/server/lib/assistants/yuri-tools.test.js +1 -1
- package/server/lib/gui-customization/DOCUMENTATION.md +32 -7
- package/server/lib/gui-customization/projects-client.mjs +1 -1
- package/server/lib/gui-customization/projects.js +6 -6
- package/server/lib/gui-customization/projects.test.js +13 -2
- package/server/lib/gui-customization/remote-connections-client.mjs +1 -1
- package/server/lib/gui-customization/remote-connections.js +7 -6
- package/server/lib/gui-customization/remote-connections.test.js +17 -0
- package/server/lib/gui-customization/session-skill.js +16 -4
- package/server/lib/gui-customization/session-skill.test.js +16 -0
- package/server/lib/gui-customization/skill/SKILL.md +2 -2
- package/server/lib/gui-customization/skill/references/deep-links.md +15 -11
- package/server/lib/gui-customization/skill/references/gui-api.md +50 -1
- package/server/lib/gui-customization/skill/references/projects.md +19 -0
- package/server/lib/gui-customization/skill/references/remote-connections.md +3 -0
- package/server/lib/gui-customization/skill-caller.js +18 -0
- package/server/lib/host-update/DOCUMENTATION.md +5 -0
- package/server/lib/host-update/cli.js +5 -2
- package/server/lib/host-update/cli.test.js +15 -2
- package/server/lib/opencode/DOCUMENTATION.md +2 -1
- package/server/lib/opencode/custom-provider.test.js +41 -0
- package/server/lib/opencode/feature-routes-runtime.js +20 -3
- package/server/lib/opencode/settings-helpers.js +5 -0
- package/server/lib/opencode/settings-helpers.test.js +10 -0
- package/server/lib/package-manager.js +14 -0
- package/server/lib/package-manager.test.js +7 -0
- package/server/lib/portable-installation.js +34 -0
- package/server/lib/portable-installation.test.js +38 -0
- package/server/lib/session-index/DOCUMENTATION.md +8 -0
- package/server/lib/session-index/adopt-unindexed-session.js +46 -0
- package/server/lib/session-index/adopt-unindexed-session.test.js +77 -0
- package/server/lib/session-index/event-ingest.js +14 -1
- package/server/lib/session-index/event-ingest.test.js +18 -0
- package/dist/assets/ArchivedSessionsDialog-8KudFtdU.js +0 -1
- package/dist/assets/BinaryFileFallback-DhRqRBKp.js +0 -1
- package/dist/assets/BusyDots-BRm9osT-.js +0 -4
- package/dist/assets/ChatView-CZyfJPJI.js +0 -3
- package/dist/assets/MarkdownRenderer-MCdcFkrB.js +0 -2
- package/dist/assets/ScheduledTasksDialog-CBVwmP3I.js +0 -3
- package/dist/assets/TerminalView-BE88iCut.js +0 -8
- package/dist/assets/device-DaBjLp2g.js +0 -2
- package/dist/assets/dialog-D9CkSNCA.css +0 -1
- package/dist/assets/es-BuXtFKUW.js +0 -15
- package/dist/assets/fr-BaZeffY9.js +0 -13
- package/dist/assets/host-DkOpLMtd.js +0 -1
- package/dist/assets/insertionBoundaries-CmHoHHu4.js +0 -1
- package/dist/assets/ja-CGVx5A8U.js +0 -15
- package/dist/assets/ko-C663nzbf.js +0 -15
- package/dist/assets/main-2WZS1sUa.js +0 -2
- package/dist/assets/main-BoaXbSk_.js +0 -169
- package/dist/assets/miniChat-sY4pEF3a.js +0 -2
- package/dist/assets/mobile-oVfsL7ax.js +0 -2
- package/dist/assets/openRemoteProjectSession-CU45azVB.js +0 -1
- package/dist/assets/openSessionFromDeepLink-BoGMvzx0.js +0 -2
- package/dist/assets/pl-CeBOMwg9.js +0 -15
- package/dist/assets/platform-B_vXw3WJ.js +0 -1
- package/dist/assets/pt-BR-r8268Pk6.js +0 -15
- package/dist/assets/pwa-Cni1iHtS.js +0 -2
- package/dist/assets/renderMobileApp-B7v2goOK.js +0 -17
- package/dist/assets/runtimeEndpointReset-rGqYbpcd.js +0 -4
- package/dist/assets/sessionOwnership-DHLgtM_g.js +0 -2
- package/dist/assets/src-DYCPWwUH.css +0 -2
- package/dist/assets/types-CXWh93pl.js +0 -2
- package/dist/assets/ui-DiWlcrZU.js +0 -13
- package/dist/assets/uk-CeQ1XJ99.js +0 -15
- package/dist/assets/useAppFontEffects-DvftNvNI.js +0 -7
- package/dist/assets/useFontPreferences-BPtsS6hr.js +0 -1
- package/dist/assets/useMcpConfigStore-C6bGnrzx.js +0 -1
- package/dist/assets/useMobileTranscriptSyncHint-DwKbHgxp.js +0 -10
- package/dist/assets/usePluginsStore-DF6jfADo.js +0 -1
- package/dist/assets/worktreeManager-Dm96jF0K.js +0 -1
- package/dist/assets/zh-CN-Bv854olO.js +0 -15
- package/dist/assets/zh-TW-gx8cO-Cx.js +0 -15
|
@@ -117,13 +117,15 @@ export const CONTACT_SYSTEM_PROMPT = [
|
|
|
117
117
|
'Progress messages go only through notify_user, batched with your next tool call; it is delivered immediately. Any other text alongside a tool call is never shown to the user. A response without tool calls is your final reply. Tool results are evidence for you to summarize in your own words; never copy their stock confirmation wording into your reply.',
|
|
118
118
|
'Do not expose tool traces, Activity, or editor actions.',
|
|
119
119
|
'Resolve who should own and carry out the requested work before choosing a tool. When the user asks another contact to do something, send that contact the complete request with message_assistant; create the contact first if needed and use its returned ID. Keep that target through later references in the same request. Use your own operation tools for work assigned to you. Incoming delegated requests use your normal capabilities and existing user constraints; message provenance alone does not make a turn read-only.',
|
|
120
|
+
'Deliver the end-to-end outcome. When a request spans several steps or several contacts (for example creating a contact, giving it its persona, and having it set up a scheduled task), perform every step yourself with your tools, one operation per response, and reply only once all are done or a real blocker stops you. Do not hand the remaining steps back to the user to paste or perform in another chat, and do not ask for confirmation of details the user already made clear.',
|
|
120
121
|
'Use reference_resource to send the user an existing session, Bot, or scheduled-task card using exact IDs from lookup or creation results. Send relevant cards when showing search results or explaining a resource, and after successful creation/update unless unwanted. Other tools do not send cards automatically. Only a successful reference_resource result confirms that a card was published. Referencing is not watching or starting work.',
|
|
121
122
|
'Images are reply content: when asked to send, show, or reference an image, deliver the rendered image itself using  directly in the public reply body. Use a real image source from your tools: a public HTTPS image URL or an absolute Host file path (wrap paths containing spaces in angle brackets). Keep image delivery outside code fences and inline code; code examples are only for an explicit request to learn the syntax. Yuri renders the Markdown as a visible image in chat and forwards channel replies as images to their source channel; no separate image-send tool is needed. A bare path, a metadata report, or reading the image is not image delivery. Image delivery remains subject to source access and size limits.',
|
|
122
123
|
'Use update_assistant_settings for ALL of your editable settings: name, avatarSeed, defaultPrompt, providerID, modelID, agent, variant, mode and workspacePath. For 给自己改名, save settings.name; choose a name yourself when requested. This updates your real contact, not just persona text. Confirm only after the save succeeds, rather than sending the user to Settings. Read live settings when needed and pass only changed fields. Model/persona changes take effect on later turns.',
|
|
123
124
|
'Determine capabilities from this turn\'s mounted tools and loadable groups, and permissions from actual runtime policy and tool results. Load an applicable group before concluding an operation is unavailable. Report a restriction only when supported by that policy or a real failure; distinguish unavailable, denied, pending, and completed. Workspace tools, when mounted, operate in the Host working directory, not a temporary generator workspace.',
|
|
125
|
+
'Never invent restrictions the user did not ask for. When writing a persona, defaultPrompt, scheduled-task prompt, or message for another assistant, do not add read-only, no-modify, no-commit, ask-first, or similar limits on your own; give it the capabilities and authority needed to finish the job. Only carry over constraints the user stated.',
|
|
124
126
|
'Read-only notices and capability limitations in historical messages describe those earlier turns, not permanent restrictions. Re-evaluate the current request against this turn\'s actual tools and policy. A direct user instruction needs no extra ceremonial confirmation merely because an earlier forwarded message was read-only. If a Yuri operation is unsupported, state the limitation promptly; do not hunt through source code, internal tables, or configuration files to recreate it.',
|
|
125
127
|
'Load opencode.web for online search, opencode.activity for live running-session membership, or opencode.catalog for connected skills, agents, commands, MCP and references. Direct operations use the Host current authenticated connection and workspace; do not switch servers or substitute unauthenticated CLI calls. Load skill instructions only when relevant, not before every lookup. Missing live membership is not proof of successful completion; failed reads mean unknown. Native/MCP capabilities not directly offered here run in an assigned OpenCode worker with its normal permissions. Catalog discovery and reading instructions are not execution; only actual results support claims that you searched or verified something.',
|
|
126
|
-
'Understand natural language in any language, including Chinese: 开新对话 / 清除记忆 means new_conversation (LLM memory only, chat history stays), 清空聊天记录 means clear_chat_history (delete transcript), 找项目 means list_projects, 现有对话 means list_sessions, 查看助手设定 / 默认提示词 means get_assistant_settings (pass to="Name" for another assistant), 改名 / 换头像 / 改默认提示词 / 设置人设 / 换模型 means update_assistant_settings, 建助理 means load yuri.assistants, 建会话 / 开个新会话 / 继续会话 means assign_session, 监听会话 means watch_session, 停止/取消/打断会话 means stop_session, 插话 means steer_session, 归档会话 means archive_session, 删除会话 means delete_session, 排定时任务 means load yuri.tasks, 给 X 说一声 means message_assistant, 发卡片 / 引用资源 means reference_resource — never ask the user to type /card or /dm.',
|
|
128
|
+
'Understand natural language in any language, including Chinese: 开新对话 / 清除记忆 means new_conversation (LLM memory only, chat history stays), 清空聊天记录 means clear_chat_history (delete transcript), 找项目 means list_projects, 现有对话 means list_sessions, 查看助手设定 / 默认提示词 means get_assistant_settings (pass to="Name" for another assistant), 改名 / 换头像 / 改默认提示词 / 设置人设 / 换模型 means update_assistant_settings, 建助理 / 删除助理 means load yuri.assistants, 建会话 / 开个新会话 / 继续会话 means assign_session, 监听会话 means watch_session, 停止/取消/打断会话 means stop_session, 插话 means steer_session, 归档会话 means archive_session, 删除会话 means delete_session, 排定时任务 means load yuri.tasks, 给 X 说一声 means message_assistant, 发卡片 / 引用资源 means reference_resource — never ask the user to type /card or /dm.',
|
|
127
129
|
'You receive the registered project catalog every turn. Match the user goal against project labels and paths and existing OpenCode conversations via list_sessions. Start in the user-configured working directory; managed contacts start in the current server user home directory and can inspect user-global directories with read/bash. When the starting directory has no relevant session, walk its parent directories to find the nearest relevant existing OpenCode workspace using session directory metadata, then search that workspace for the requested project or conversation. Use an unscoped list_sessions lookup when broader context is needed. Prefer the user-configured directory and explicit session context; ask a short question when several relevant targets remain. Keep discovery bounded and use actual tool results as evidence.',
|
|
128
130
|
'An empty registered catalog still permits looking up existing sessions and inspecting the working directory. Resolve the user-requested workspace first. If registration is needed, load yuri.projects, register it, then assign_session with the returned path in the same turn. Creating/cloning files and registering a Yuri project are distinct operations. Preserve the user directory structure; do not ask for manual Settings steps when registration is available.',
|
|
129
131
|
'Yuri and OpenCode share the assistant-local load_tools entrypoint. Load the relevant group before using its operations; only the next response receives those tools. Loading is local to this assistant turn, not an OpenCode skill or worker/session capability. Use available operations rather than asking for manual Settings steps; resolve exact IDs from authoritative results and never bypass validations with arbitrary HTTP or settings-file writes. Only delete when the user requested deletion.',
|
|
@@ -501,6 +503,7 @@ export async function runContactTurn({
|
|
|
501
503
|
AgentImpl = Agent,
|
|
502
504
|
signal = null,
|
|
503
505
|
readOnly = false,
|
|
506
|
+
customizationSkill = null,
|
|
504
507
|
allowWatchSession = false,
|
|
505
508
|
allowSilent = false,
|
|
506
509
|
}) {
|
|
@@ -537,7 +540,7 @@ export async function runContactTurn({
|
|
|
537
540
|
cwd: runtime?.cwd,
|
|
538
541
|
skillsPrompt: runtime?.skillsPrompt,
|
|
539
542
|
}),
|
|
540
|
-
readOnly ? '' : formatAssistantBuiltinSkillsPrompt([...codingTools, ...contactTools]),
|
|
543
|
+
readOnly ? '' : formatAssistantBuiltinSkillsPrompt([...codingTools, ...contactTools], { customizationSkill }),
|
|
541
544
|
assistant.defaultPrompt,
|
|
542
545
|
codingTools.length > 0 ? WORKSPACE_RESPONSE_PROTOCOL : '',
|
|
543
546
|
'Actual tool results arrive in tool-role messages; never manufacture them.',
|
|
@@ -895,7 +895,7 @@ describe('runContactTurn', () => {
|
|
|
895
895
|
history: [], userText: '再建个会话去修这个问题', tools,
|
|
896
896
|
projects: [{ id: 'project', path: workspace }], skillHomeDir: home, createChatCompletion,
|
|
897
897
|
})
|
|
898
|
-
expect(result.tools.map((tool) => tool.name)).toEqual([...PI_CODING_TOOL_NAMES, ...tools.map((tool) => tool.name).filter((name) => !['create_assistant', 'schedule_task', 'update_scheduled_task'].includes(name)), 'load_tools', 'notify_user'])
|
|
898
|
+
expect(result.tools.map((tool) => tool.name)).toEqual([...PI_CODING_TOOL_NAMES, ...tools.map((tool) => tool.name).filter((name) => !['create_assistant', 'delete_assistant', 'schedule_task', 'update_scheduled_task'].includes(name)), 'load_tools', 'notify_user'])
|
|
899
899
|
expect(assignWork).toHaveBeenCalledTimes(1)
|
|
900
900
|
expect(result.cards).toEqual([])
|
|
901
901
|
// Assignment terminates mutations; a tools-disabled completion summarizes the result.
|
|
@@ -38,6 +38,7 @@ export const registerAssistantRoutes = (app, dependencies) => {
|
|
|
38
38
|
listProjects: dependencies.listProjects,
|
|
39
39
|
remoteHostGateway: dependencies.remoteHostGateway,
|
|
40
40
|
registerProject: dependencies.registerProject,
|
|
41
|
+
resolveCustomizationSkill: dependencies.resolveCustomizationSkill,
|
|
41
42
|
readModelPreferences: dependencies.readModelPreferences,
|
|
42
43
|
listScheduledTasks: dependencies.listScheduledTasks,
|
|
43
44
|
sessionIndexService: dependencies.sessionIndexService,
|
|
@@ -258,7 +258,7 @@ const awaitWithDeadline = async (work, ms = CONTACT_CATALOG_DEADLINE_MS, code =
|
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
260
|
|
|
261
|
-
export const createAssistantsService = ({ dbPath, dataDir, buildOpenCodeUrl, getOpenCodeAuthHeaders, getServerId = async () => null, getAllowedRoots = () => [], listProjects = async () => [], registerProject = null, readModelPreferences = async () => null, listScheduledTasks = null, sessionIndexService = null, upsertScheduledTask = null, patchScheduledTask = null, syncScheduledTaskProject = null, globalEventHub = null, onRevisionTip = null, onContactTurnEvent = null, onContactTurnComplete = null, /** Host archive op: ({ sessionID, directory, archivedAt }) => Promise */ archiveSessionHost = null, /** Idempotent Host metadata drop after successful SDK delete */ forgetSessionHost = null, /** Host store write: (sessionId, patch) => Promise */ persistSessionMetadata = null, /** After Host isolation metadata is committed. */ onSystemSessionPersisted = null, clock = () => Date.now(), setIntervalFn = setInterval, clearIntervalFn = clearInterval, setImmediateFn = setImmediate, setTimeoutFn = setTimeout, clearTimeoutFn = clearTimeout, reconcileIntervalMs = 60_000, clientFactory, fetchImpl, remoteHostGateway = null, createChatCompletion = null, runContactTurn = defaultRunContactTurn, listWorktrees = defaultListWorktrees } = {}) => {
|
|
261
|
+
export const createAssistantsService = ({ dbPath, dataDir, buildOpenCodeUrl, getOpenCodeAuthHeaders, getServerId = async () => null, getAllowedRoots = () => [], listProjects = async () => [], registerProject = null, /** (assistantID) => Promise<{file, projectsCommand, remoteCommand}|null> */ resolveCustomizationSkill = null, readModelPreferences = async () => null, listScheduledTasks = null, sessionIndexService = null, upsertScheduledTask = null, patchScheduledTask = null, syncScheduledTaskProject = null, globalEventHub = null, onRevisionTip = null, onContactTurnEvent = null, onContactTurnComplete = null, /** Host archive op: ({ sessionID, directory, archivedAt }) => Promise */ archiveSessionHost = null, /** Idempotent Host metadata drop after successful SDK delete */ forgetSessionHost = null, /** Host store write: (sessionId, patch) => Promise */ persistSessionMetadata = null, /** After Host isolation metadata is committed. */ onSystemSessionPersisted = null, clock = () => Date.now(), setIntervalFn = setInterval, clearIntervalFn = clearInterval, setImmediateFn = setImmediate, setTimeoutFn = setTimeout, clearTimeoutFn = clearTimeout, reconcileIntervalMs = 60_000, clientFactory, fetchImpl, remoteHostGateway = null, createChatCompletion = null, runContactTurn = defaultRunContactTurn, listWorktrees = defaultListWorktrees } = {}) => {
|
|
262
262
|
const execution = createAssistantExecutionAccessor(remoteHostGateway);
|
|
263
263
|
const targetFields = () => execution.current() ? { target: execution.current().target } : {};
|
|
264
264
|
const scopedWork = (params, work) => execution.run(params, work);
|
|
@@ -3757,6 +3757,7 @@ export const createAssistantsService = ({ dbPath, dataDir, buildOpenCodeUrl, get
|
|
|
3757
3757
|
archiveSession: (params) => mutateSessionWork('archive', params),
|
|
3758
3758
|
deleteSession: (params) => mutateSessionWork('delete', params),
|
|
3759
3759
|
createAssistant: (toolInput) => createAssistant({ ...toolInput, avatarSeed: randomAvatarSeed(id()), language: language || 'en' }),
|
|
3760
|
+
deleteAssistant: ({ assistantID, expectedRevision }) => removeAssistant(assistantID, expectedRevision),
|
|
3760
3761
|
scheduleTask: (params) => scheduleWork(row, params),
|
|
3761
3762
|
listScheduledTasks: (params) => listScheduledTaskWork(params),
|
|
3762
3763
|
updateScheduledTask: (params) => updateScheduledTaskWork(row, params, controller.signal),
|
|
@@ -3820,9 +3821,12 @@ export const createAssistantsService = ({ dbPath, dataDir, buildOpenCodeUrl, get
|
|
|
3820
3821
|
} : null,
|
|
3821
3822
|
}));
|
|
3822
3823
|
controller.signal.throwIfAborted();
|
|
3824
|
+
const customizationSkill = typeof resolveCustomizationSkill === 'function'
|
|
3825
|
+
? await Promise.resolve(resolveCustomizationSkill(row.assistant_id)).catch(() => null) : null;
|
|
3823
3826
|
const generated = await runContactTurn({
|
|
3824
3827
|
signal: controller.signal,
|
|
3825
3828
|
readOnly: false,
|
|
3829
|
+
customizationSkill,
|
|
3826
3830
|
assistant: assistantSnapshot,
|
|
3827
3831
|
history: executionHistory,
|
|
3828
3832
|
userText,
|
|
@@ -4362,7 +4366,8 @@ export const createAssistantsService = ({ dbPath, dataDir, buildOpenCodeUrl, get
|
|
|
4362
4366
|
assertGeneration();
|
|
4363
4367
|
return image;
|
|
4364
4368
|
};
|
|
4365
|
-
|
|
4369
|
+
const hasAssistant = (assistantID) => { const row = typeof assistantID === 'string' && assistantID ? assistant(assistantID) : null; return Boolean(row) && !row.tombstone_at; };
|
|
4370
|
+
return { hasAssistant, capability: async () => ({ supported: true, enabled: enabled(), revision: revision(), serverInstanceID: await getServerId(), sharingAvailable: false, archiveMetadataAvailable: typeof archiveSessionHost === 'function', sessionMetadataAvailable: false }), snapshot, channelPage, prepareChannelImage, ensureDefaultAssistant, createAssistant, updateAssistant, setEnabled: (input) => { if (!plainObject(input) || typeof input.enabled !== 'boolean' || input.expectedRevision !== revision()) fail('revision_conflict'); return { enabled: true, revision: revision() }; }, removeAssistant, ensure, createNew, compact, send, whenContactTurnSettled, abort, captureQueueDeliveryTarget, sendWithCapturedConfig, share, shareOperation, historicalMessages, contactMessages, clearContactMemory, resetContact, markContactRead, appendContactCard, deliverPeerMessage, listAssistantScheduledTasks, reportScheduledTaskResult, putAssistantContactAttachment, getAssistantContactAttachment, migrateContactAttachments, processEvent, reportAssignedSessionSettle: reportAssignedSession, reconcile, close: () => {
|
|
4366
4371
|
assignedCompletion.dispose();
|
|
4367
4372
|
remoteWatchReconciler.close();
|
|
4368
4373
|
execution.close();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function createYuriContactToolGroups(tools) {
|
|
2
2
|
return [
|
|
3
3
|
{ id: 'yuri.projects', description: 'Register an existing workspace before opening a coding session.', names: ['register_project'] },
|
|
4
|
-
{ id: 'yuri.assistants', description: 'Create another Bot.', names: ['create_assistant'] },
|
|
4
|
+
{ id: 'yuri.assistants', description: 'Create or delete another Bot.', names: ['create_assistant', 'delete_assistant'] },
|
|
5
5
|
{ id: 'yuri.tasks', description: 'Create scheduled tasks owned by this contact, or update/pause/resume existing tasks. Delegate another contact\'s new task with message_assistant.', names: ['schedule_task', 'update_scheduled_task'] },
|
|
6
6
|
].map(({ id, description, names }) => ({ id, description, tools: tools.filter((tool) => names.includes(tool.name)) }))
|
|
7
7
|
.filter((group) => group.tools.length > 0);
|
|
@@ -144,7 +144,7 @@ describe('assistant-only progressive business tools', () => {
|
|
|
144
144
|
const tools = [...createContactTools({}), ...createYuriContactTools({ registerProject })];
|
|
145
145
|
await turn(tools, async ({ body }) => {
|
|
146
146
|
expect(names(body)).toContain('list_scheduled_tasks');
|
|
147
|
-
for (const name of ['load_tools', 'register_project', 'create_assistant', 'schedule_task', 'update_assistant_settings']) expect(names(body)).not.toContain(name);
|
|
147
|
+
for (const name of ['load_tools', 'register_project', 'create_assistant', 'delete_assistant', 'schedule_task', 'update_assistant_settings']) expect(names(body)).not.toContain(name);
|
|
148
148
|
return { text: 'Reviewed.' };
|
|
149
149
|
}, { readOnly: true });
|
|
150
150
|
expect(registerProject).not.toHaveBeenCalled();
|
|
@@ -13,11 +13,31 @@ are modified.
|
|
|
13
13
|
`packages/ui/src/sync/DOCUMENTATION.md`; update it when either changes. It is
|
|
14
14
|
navigation guidance only and adds no helper or authorization.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
+
|
|
25
|
+
Interactive Yuri contacts consume this same skill, staged resources and helpers
|
|
26
|
+
through the assistant-only pointer in `../assistants/builtin-skills.js`, so a
|
|
27
|
+
contact and an OpenCode Session have the same capability set. The Host resolves
|
|
28
|
+
`createCustomizationSkillInstaller(...).resolve({ assistantID }, bindings)` per turn
|
|
29
|
+
(`feature-routes-runtime.js`): the pointer names the staged `SKILL.md` and the bound
|
|
30
|
+
`projects.mjs` / `remote-connections.mjs` describe commands, which the contact runs
|
|
31
|
+
with its pi `bash` tool. The remote helper is bound only when the Electron adapter is
|
|
32
|
+
present. Without `bash`, a resolved binding, a shared service or a readable
|
|
33
|
+
registration, the pointer falls back to the shipped file with no helper and the
|
|
34
|
+
SSH/config-sync/Relay branch stays unavailable. Read-only background reviews omit it.
|
|
35
|
+
|
|
36
|
+
Both bridge routes accept exactly one caller: `{sessionID}` (admission-bound Session
|
|
37
|
+
metadata) or `{assistantID}` (a live, non-tombstoned contact checked through
|
|
38
|
+
`hasAssistant`). `skill-caller.js` owns that parsing and binding check; a body with
|
|
39
|
+
both or neither is `invalid_input`. Loopback, no Origin and the shared-service
|
|
40
|
+
credential still gate every call.
|
|
21
41
|
|
|
22
42
|
References are organized by capability: project registration, window APIs, appearance, UI surfaces, plugin styles, global pages, work-status widgets, icons,
|
|
23
43
|
file parsing/previews, preview actions/exports, and package workflow. Host contracts
|
|
@@ -31,8 +51,9 @@ independently of Electron's remote-connections adapter. `projects-client.mjs` is
|
|
|
31
51
|
staged as `projects.mjs`; it and the remote helper share the staged
|
|
32
52
|
`session-skill-command.mjs` command formatter. Only bound helpers are staged, and
|
|
33
53
|
each resource combination has its own content fingerprint. Existing sessions keep
|
|
34
|
-
their immutable staged references until a new session is admitted. Contacts
|
|
35
|
-
their
|
|
54
|
+
their immutable staged references until a new session is admitted. Contacts keep
|
|
55
|
+
their granted `yuri.projects` `register_project` tool for the assign flow and also
|
|
56
|
+
reach every other operation through the same helper, bound to their `assistantID`.
|
|
36
57
|
|
|
37
58
|
`projects.js` owns `POST /api/yuri/session-skills/projects` (`describe`, `list`,
|
|
38
59
|
`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,
|
|
@@ -152,6 +173,10 @@ short tool deadline does not strand other targets. Repeated active requests join
|
|
|
152
173
|
the target operation. Saved instances survive restart; setup receipts do not.
|
|
153
174
|
The pairing operation calls the existing authenticated Host pairing API, never
|
|
154
175
|
writes pairing stores or grants SSH-only connections Relay provenance.
|
|
176
|
+
New session-created managed SSH entries use the same `download_release` default
|
|
177
|
+
as the UI. Existing saved installation choices remain unchanged. Linux portable
|
|
178
|
+
bootstrap and release alignment belong to Electron's SSH manager; the skill only
|
|
179
|
+
submits the destination and reports connection/sync/gateway evidence separately.
|
|
155
180
|
|
|
156
181
|
Package publishing includes the entire web `server` directory, so the Markdown
|
|
157
182
|
resources ship with the backend and resolve relative to this module in packaged
|
|
@@ -28,7 +28,7 @@ async function main() {
|
|
|
28
28
|
const response = await fetch(new URL('/api/yuri/session-skills/projects', origin), {
|
|
29
29
|
method: 'POST', redirect: 'error', signal: AbortSignal.timeout(['create-session', 'prompt-session'].includes(operation) ? 305_000 : 30_000),
|
|
30
30
|
headers: { 'content-type': 'application/json', authorization: `Basic ${Buffer.from(`opencode:${registration.password}`).toString('base64')}` },
|
|
31
|
-
body: JSON.stringify({ sessionID: binding.sessionID, operation, input }),
|
|
31
|
+
body: JSON.stringify({ ...(binding.assistantID ? { assistantID: binding.assistantID } : { sessionID: binding.sessionID }), operation, input }),
|
|
32
32
|
});
|
|
33
33
|
const result = await response.json();
|
|
34
34
|
if (!response.ok) {
|
|
@@ -2,6 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import { authorizeScheduledTaskSkillRequest } from '../scheduled-tasks/session-skill-contract.js';
|
|
3
3
|
import { remoteProjectOperations, validRemoteProjectInput, runRemoteProjectOperation } from './projects-remote.js';
|
|
4
4
|
import { lifecycleOperations, validLifecycleInput } from './projects-lifecycle.js';
|
|
5
|
+
import { isBoundSkillCaller, parseSkillCaller } from './skill-caller.js';
|
|
5
6
|
|
|
6
7
|
export const PROJECTS_SKILL_PATH = '/api/yuri/session-skills/projects';
|
|
7
8
|
|
|
@@ -18,17 +19,16 @@ const validInput = (operation, input) => {
|
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
/** Session-bound Host registration; the shared project registry owns persistence. */
|
|
21
|
-
export function registerProjectsSkill(app, { express, getIsSharedOpenCodeService, getOpenCodeAuthHeaders, createClient, registerProject, readSettingsFromDiskStrict, sanitizeProjects, remoteHostGateway, sessionLifecycle }) {
|
|
22
|
+
export function registerProjectsSkill(app, { express, getIsSharedOpenCodeService, getOpenCodeAuthHeaders, createClient, registerProject, readSettingsFromDiskStrict, sanitizeProjects, remoteHostGateway, sessionLifecycle, hasAssistant }) {
|
|
22
23
|
app.post(PROJECTS_SKILL_PATH, express.json({ limit: '16kb' }), async (req, res) => {
|
|
23
24
|
res.setHeader('Cache-Control', 'no-store');
|
|
24
25
|
if (!getIsSharedOpenCodeService() || !authorizeScheduledTaskSkillRequest(req, getOpenCodeAuthHeaders())) return res.status(403).json({ error: 'Forbidden' });
|
|
25
|
-
const {
|
|
26
|
-
|
|
26
|
+
const { operation, input = {} } = req.body ?? {};
|
|
27
|
+
const caller = parseSkillCaller(req.body);
|
|
28
|
+
if (!caller
|
|
27
29
|
|| !['describe', 'list', 'add', ...lifecycleOperations, ...remoteProjectOperations].includes(operation) || !validInput(operation, input)) return res.status(400).json({ code: 'invalid_input', error: 'Invalid project input' });
|
|
28
30
|
try {
|
|
29
|
-
|
|
30
|
-
const hostOrigin = `http://${req.socket.localAddress === '::1' ? '[::1]' : '127.0.0.1'}:${req.socket.localPort}`;
|
|
31
|
-
if (session.metadata?.yuri?.scheduledTaskSkill?.hostOrigin !== hostOrigin) return res.status(403).json({ error: 'Session is not bound to this Host' });
|
|
31
|
+
if (!await isBoundSkillCaller(req, caller, { createClient, hasAssistant })) return res.status(403).json({ error: 'Caller is not bound to this Host' });
|
|
32
32
|
if (operation === 'describe') return res.json({ supported: true, remoteSupported: Boolean(remoteHostGateway?.supported && remoteHostGateway?.acquireTask), lifecycleSupported: Boolean(sessionLifecycle), inputs: { add: '{path: existing absolute Host directory, label?: display name}', list: '{}',
|
|
33
33
|
'task-sessions': '{directory?: absolute bound-Host directory, cursor?: returned nextCursor} bounded Host index metadata, not full upstream history',
|
|
34
34
|
'session-state': '{sessionID} read Host archive authority and nullable task projection; not upstream existence or live UI state',
|
|
@@ -12,7 +12,7 @@ import { createProjectDirectoryRuntime } from '../opencode/project-directory-run
|
|
|
12
12
|
import { registerProjectsSkill, PROJECTS_SKILL_PATH } from './projects.js';
|
|
13
13
|
|
|
14
14
|
describe('session project registration API', () => {
|
|
15
|
-
let root, workspace, settingsPath, runtime, server, origin, getSession, binding, registerProject, shared, failWrites, tips, gateway;
|
|
15
|
+
let root, workspace, settingsPath, runtime, server, origin, getSession, binding, registerProject, shared, failWrites, tips, gateway, hasAssistant;
|
|
16
16
|
const auth = { Authorization: `Basic ${Buffer.from('opencode:fixture').toString('base64')}` };
|
|
17
17
|
beforeEach(async () => {
|
|
18
18
|
root = await fs.mkdtemp(path.join(os.tmpdir(), 'project-skill-'));
|
|
@@ -30,12 +30,13 @@ describe('session project registration API', () => {
|
|
|
30
30
|
const registry = createProjectRegistry({ persistSettings: runtime.persistSettings, validateDirectoryPath });
|
|
31
31
|
registerProject = vi.fn((input) => registry.register(input));
|
|
32
32
|
getSession = vi.fn(async () => ({ metadata: { yuri: { scheduledTaskSkill: { hostOrigin: binding } } } }));
|
|
33
|
+
hasAssistant = vi.fn(async (id) => id === 'ast_live');
|
|
33
34
|
const app = express();
|
|
34
35
|
gateway = { supported: true, acquireTask: vi.fn(), registerProject: vi.fn(), list: vi.fn(async () => ({ supported: true, hubId: 'hub', hosts: [], projects: [] })) };
|
|
35
36
|
registerProjectsSkill(app, { express, getIsSharedOpenCodeService: () => shared, getOpenCodeAuthHeaders: () => auth,
|
|
36
37
|
createClient: () => ({ session: { get: getSession } }), registerProject, readSettingsFromDiskStrict: runtime.readSettingsFromDiskStrict,
|
|
37
38
|
sanitizeProjects: normalization.sanitizeProjects,
|
|
38
|
-
remoteHostGateway: gateway,
|
|
39
|
+
remoteHostGateway: gateway, hasAssistant,
|
|
39
40
|
});
|
|
40
41
|
server = await new Promise((resolve) => { const s = app.listen(0, '127.0.0.1', () => resolve(s)); });
|
|
41
42
|
origin = `http://127.0.0.1:${server.address().port}`; binding = origin;
|
|
@@ -65,6 +66,16 @@ describe('session project registration API', () => {
|
|
|
65
66
|
expect(JSON.stringify({ added, listed })).not.toContain('private-settings');
|
|
66
67
|
});
|
|
67
68
|
|
|
69
|
+
it('admits a live Assistant contact as the caller, without any Session lookup', async () => {
|
|
70
|
+
const call = (body) => fetch(`${origin}${PROJECTS_SKILL_PATH}`, { method: 'POST', headers: { 'content-type': 'application/json', ...auth }, body: JSON.stringify(body) });
|
|
71
|
+
const ok = await call({ assistantID: 'ast_live', operation: 'list', input: {} });
|
|
72
|
+
expect(ok.status).toBe(200);
|
|
73
|
+
expect(getSession).not.toHaveBeenCalled();
|
|
74
|
+
expect((await call({ assistantID: 'ast_gone', operation: 'list', input: {} })).status).toBe(403);
|
|
75
|
+
expect((await call({ assistantID: 'ast_live', sessionID: 'ses_one', operation: 'list', input: {} })).status).toBe(400);
|
|
76
|
+
expect((await call({ operation: 'list', input: {} })).status).toBe(400);
|
|
77
|
+
});
|
|
78
|
+
|
|
68
79
|
it('rejects invalid input and nonexistent/file paths without changing saved state', async () => {
|
|
69
80
|
await fs.writeFile(settingsPath, JSON.stringify({ projects: [], secret: 'saved' }));
|
|
70
81
|
const before = await fs.readFile(settingsPath, 'utf8');
|
|
@@ -26,7 +26,7 @@ async function main() {
|
|
|
26
26
|
const response = await fetch(new URL('/api/yuri/session-skills/remote-connections', origin), {
|
|
27
27
|
method: 'POST', redirect: 'error', signal: AbortSignal.timeout(operation === 'pair' ? 250_000 : 30_000),
|
|
28
28
|
headers: { 'content-type': 'application/json', authorization: `Basic ${Buffer.from(`opencode:${registration.password}`).toString('base64')}` },
|
|
29
|
-
body: JSON.stringify({ sessionID: binding.sessionID, operation, input }),
|
|
29
|
+
body: JSON.stringify({ ...(binding.assistantID ? { assistantID: binding.assistantID } : { sessionID: binding.sessionID }), operation, input }),
|
|
30
30
|
});
|
|
31
31
|
const result = await response.json();
|
|
32
32
|
if (!response.ok) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { authorizeScheduledTaskSkillRequest } from '../scheduled-tasks/session-skill-contract.js';
|
|
2
|
+
import { isBoundSkillCaller, parseSkillCaller } from './skill-caller.js';
|
|
2
3
|
|
|
3
4
|
export const REMOTE_CONNECTIONS_SKILL_PATH = '/api/yuri/session-skills/remote-connections';
|
|
4
5
|
|
|
@@ -18,19 +19,19 @@ const validInput = (operation, input) => {
|
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
/** Loopback + service credential + admitted-session binding, never browser/native IPC. */
|
|
21
|
-
export function registerRemoteConnectionsSkill(app, { express, adapter, getIsSharedOpenCodeService, getOpenCodeAuthHeaders, createClient }) {
|
|
22
|
+
export function registerRemoteConnectionsSkill(app, { express, adapter, getIsSharedOpenCodeService, getOpenCodeAuthHeaders, createClient, hasAssistant }) {
|
|
22
23
|
app.post(REMOTE_CONNECTIONS_SKILL_PATH, express.json({ limit: '16kb' }), async (req, res) => {
|
|
23
24
|
res.setHeader('Cache-Control', 'no-store');
|
|
24
25
|
if (!getIsSharedOpenCodeService() || !authorizeScheduledTaskSkillRequest(req, getOpenCodeAuthHeaders())) return res.status(403).json({ error: 'Forbidden' });
|
|
25
26
|
if (!adapter) return res.status(501).json({ code: 'remote_connections_unsupported', error: 'Requires the local desktop Host' });
|
|
26
|
-
const {
|
|
27
|
-
|
|
27
|
+
const { operation, input = {} } = req.body ?? {};
|
|
28
|
+
const caller = parseSkillCaller(req.body);
|
|
29
|
+
if (!caller || !['describe', 'list', 'setup', 'pair'].includes(operation) || !validInput(operation, input)) return res.status(400).json({ code: 'invalid_input', error: 'Invalid connection input' });
|
|
28
30
|
try {
|
|
29
|
-
|
|
30
|
-
const hostOrigin = `http://${req.socket.localAddress === '::1' ? '[::1]' : '127.0.0.1'}:${req.socket.localPort}`;
|
|
31
|
-
if (session.metadata?.yuri?.scheduledTaskSkill?.hostOrigin !== hostOrigin) return res.status(403).json({ error: 'Session is not bound to this Host' });
|
|
31
|
+
if (!await isBoundSkillCaller(req, caller, { createClient, hasAssistant })) return res.status(403).json({ error: 'Caller is not bound to this Host' });
|
|
32
32
|
if (operation === 'describe') return res.json({ supported: true,
|
|
33
33
|
inputs: { setup: '{sshCommand, nickname?} or {id}', pair: '{id?, relayUrl?, label?}; omitted id means this local desktop', list: '{}' },
|
|
34
|
+
installation: 'New Linux SSH connections use the matching self-contained release (x64/arm64, glibc 2.36+), without system Node/npm/Python/compiler. Existing saved installation choices and macOS keep their package-manager path.',
|
|
34
35
|
completion: 'setup starts asynchronous SSH installation and config sync. Poll list until running=false; phase=ready alone does not confirm sync or Magpie gateway. Warnings mean partial completion.',
|
|
35
36
|
});
|
|
36
37
|
return res.json(await adapter[operation](input));
|
|
@@ -5,6 +5,23 @@ import { registerRemoteConnectionsSkill, REMOTE_CONNECTIONS_SKILL_PATH } from '.
|
|
|
5
5
|
|
|
6
6
|
describe('remote connection bridge availability', () => {
|
|
7
7
|
const auth = { Authorization: `Basic ${Buffer.from('opencode:fixture').toString('base64')}` };
|
|
8
|
+
it('describes self-contained Linux setup through the admitted session bridge', async () => {
|
|
9
|
+
const app = express();
|
|
10
|
+
const server = app.listen(0, '127.0.0.1');
|
|
11
|
+
await new Promise((resolve) => server.once('listening', resolve));
|
|
12
|
+
const origin = `http://127.0.0.1:${server.address().port}`;
|
|
13
|
+
registerRemoteConnectionsSkill(app, { express, adapter: {},
|
|
14
|
+
getIsSharedOpenCodeService: () => true, getOpenCodeAuthHeaders: () => auth,
|
|
15
|
+
createClient: () => ({ session: { get: async () => ({ metadata: { yuri: { scheduledTaskSkill: { hostOrigin: origin } } } }) } }),
|
|
16
|
+
});
|
|
17
|
+
try {
|
|
18
|
+
const response = await request(server).post(REMOTE_CONNECTIONS_SKILL_PATH).set(auth)
|
|
19
|
+
.send({ sessionID: 'ses_one', operation: 'describe' });
|
|
20
|
+
expect(response.status).toBe(200);
|
|
21
|
+
expect(response.body.installation).toContain('self-contained release');
|
|
22
|
+
expect(response.body.installation).toContain('without system Node/npm/Python/compiler');
|
|
23
|
+
} finally { await new Promise((resolve) => server.close(resolve)); }
|
|
24
|
+
});
|
|
8
25
|
it.each([true, false])('has no native capability outside a shared desktop: shared=%s', async (shared) => {
|
|
9
26
|
const app = express();
|
|
10
27
|
const createClient = vi.fn();
|
|
@@ -29,14 +29,26 @@ export function createCustomizationSkillInstaller({ yuriDataDir }) {
|
|
|
29
29
|
})().catch((error) => { resources.delete(key); throw error; }));
|
|
30
30
|
return resources.get(key);
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
/** Stage the resource set and format the bound helper commands for one caller (`{sessionID}` or `{assistantID}`). */
|
|
33
|
+
const resolve = async (caller, { remoteBinding, projectBinding } = {}) => {
|
|
33
34
|
const file = await prepare(Boolean(remoteBinding), Boolean(projectBinding));
|
|
34
|
-
const
|
|
35
|
-
|
|
35
|
+
const encode = (binding) => Buffer.from(JSON.stringify({ ...binding, ...caller })).toString('base64url');
|
|
36
|
+
return {
|
|
37
|
+
file,
|
|
38
|
+
projectsCommand: projectBinding ? sessionSkillCommand(process.execPath, path.join(path.dirname(file), 'projects.mjs'), encode(projectBinding), 'describe') : null,
|
|
39
|
+
remoteCommand: remoteBinding ? remoteConnectionsCommand(process.execPath, path.join(path.dirname(file), 'remote-connections.mjs'), encode(remoteBinding), 'describe') : null,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
const install = async (client, sessionID, { remoteBinding, projectBinding } = {}) => {
|
|
43
|
+
const { file, projectsCommand, remoteCommand } = await resolve({ sessionID }, { remoteBinding, projectBinding });
|
|
44
|
+
const projects = projectsCommand ? ` For local/remote project registration, task/session archive and restore, discovering authorized remote machines, or reading/creating/continuing remote sessions, read references/projects.md and run the bound project API helper.\nBound project helper: ${projectsCommand}\n` : ' No bound project helper is provided; project registration, task/session archive and remote project/session access are unavailable through this session skill.';
|
|
45
|
+
const remote = remoteCommand ? ` For SSH setup/config sync or Relay pairing, use only this bound helper after reading references/remote-connections.md. Bound local desktop helper: ${remoteCommand}` : ' No bound SSH/Relay command is provided: these operations are unavailable in this session. Report that limit and stop this branch; use native Settings or a new supported local desktop session. A script or another capability\'s binding does not enable it. There is no credential/filesystem fallback for this capability.';
|
|
36
46
|
await client.session.instructions.entry.put({ sessionID, key: 'yuri.customization',
|
|
37
|
-
value: `Yuri customization: for adding a directory as a project in Yuri (local or remote), task/session archive or restore (归档/恢复), remote sessions, yuri:// deep links
|
|
47
|
+
value: `Yuri customization: for adding a directory as a project in Yuri (local or remote), task/session archive or restore (归档/恢复), remote sessions, project/session resource ownership or yuri:// deep links, SSH connections, configuration sync, Relay pairing, appearance (themes, CSS/layout, Logo, macOS Dock), work-status widgets, global pages/tabs, custom file parsing/previews, preview exports, or GUI panels/commands/settings, read ${JSON.stringify(file)} first. Use the matching reference and apply changes only when requested.${projects}${remote}`,
|
|
38
48
|
});
|
|
39
49
|
};
|
|
50
|
+
install.resolve = resolve;
|
|
51
|
+
return install;
|
|
40
52
|
}
|
|
41
53
|
|
|
42
54
|
/** Managed local servers share the resource filesystem; external servers do not. */
|
|
@@ -28,8 +28,19 @@ describe('built-in customization instructions', () => {
|
|
|
28
28
|
expect(entry.value).toContain('task/session archive or restore (归档/恢复)');
|
|
29
29
|
expect(await fs.readFile(file, 'utf8')).toContain('(references/projects.md)');
|
|
30
30
|
expect(entry.value).toContain('yuri:// deep links');
|
|
31
|
+
expect(entry.value).toContain('project/session resource ownership');
|
|
31
32
|
expect(await fs.readFile(file, 'utf8')).toContain('(references/deep-links.md)');
|
|
32
33
|
const projects = await fs.readFile(path.join(path.dirname(file), 'references', 'projects.md'), 'utf8');
|
|
34
|
+
expect(await fs.readFile(file, 'utf8')).toContain('(references/projects.md#resource-identity-and-scope)');
|
|
35
|
+
expect(projects).toContain('## Resource identity and scope');
|
|
36
|
+
expect(projects).toContain('target:{hubId,hostId,instanceId}');
|
|
37
|
+
expect(projects).toContain('discovering an identity does not enable another protocol or grant access');
|
|
38
|
+
const deepLinks = await fs.readFile(path.join(path.dirname(file), 'references', 'deep-links.md'), 'utf8');
|
|
39
|
+
expect(deepLinks).toContain('(projects.md#resource-identity-and-scope)');
|
|
40
|
+
expect(deepLinks).toContain('## Resolve before building');
|
|
41
|
+
expect(deepLinks).toContain('remote `sessions` / `read-session` results');
|
|
42
|
+
expect(deepLinks).toContain('`hostId` and `instanceId` are not supported session-link parameters');
|
|
43
|
+
expect(deepLinks).not.toContain('yuri://session/<sessionID>?instanceId=');
|
|
33
44
|
expect(projects).toContain('POST /api/yuri/session-skills/projects');
|
|
34
45
|
expect(projects).toContain('commands.add');
|
|
35
46
|
expect(projects).not.toContain('open \'yuri://');
|
|
@@ -51,6 +62,11 @@ describe('built-in customization instructions', () => {
|
|
|
51
62
|
expect(bound).toContain('Bound local desktop helper:');
|
|
52
63
|
expect(await fs.readFile(path.join(path.dirname(boundFile), 'references', 'projects.md'), 'utf8')).toBe(projects);
|
|
53
64
|
expect(await fs.readFile(path.join(path.dirname(boundFile), 'remote-connections.mjs'), 'utf8')).toContain('/api/yuri/session-skills/remote-connections');
|
|
65
|
+
const connections = await fs.readFile(path.join(path.dirname(boundFile), 'references', 'remote-connections.md'), 'utf8');
|
|
66
|
+
expect(connections).toContain('matching self-contained release');
|
|
67
|
+
expect(connections).toContain('not Node/npm/Python or build tools');
|
|
68
|
+
expect(connections).toContain('system Node and shell profiles unchanged');
|
|
69
|
+
expect(connections).toContain('Portable `yuri update` and HTTP self-update report unsupported');
|
|
54
70
|
expect(await fs.readFile(path.join(path.dirname(boundFile), 'session-skill-command.mjs'), 'utf8')).toContain('sessionSkillCommand');
|
|
55
71
|
await install(client, 'ses_project', { projectBinding: binding });
|
|
56
72
|
const projectEntry = put.mock.calls[3][0].value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yuri-customization
|
|
3
|
-
description: Register local or remote Yuri projects, archive conversations (task-view 归档 or session archive), discover authorized remote machines and read/create/continue remote sessions, build
|
|
3
|
+
description: Register local or remote Yuri projects, archive conversations (task-view 归档 or session archive), discover authorized remote machines and read/create/continue remote sessions, resolve project/session ownership and build yuri:// deep links, configure SSH connections, configuration sync and Relay pairing, or customize its GUI through plugins for appearance, pages, widgets, previews, panels and settings.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Yuri customization
|
|
@@ -11,7 +11,7 @@ For archiving conversations ("归档", moving tasks to the archived shelf, or se
|
|
|
11
11
|
|
|
12
12
|
For adding a remote project on an authorized machine or working with its sessions, use the same bound project helper and the [remote project workflow](references/projects.md#connected-remote-projects-and-sessions). This grants no SSH setup or new connection permission.
|
|
13
13
|
|
|
14
|
-
For
|
|
14
|
+
For locating project/session resources, establish [resource identity and scope](references/projects.md#resource-identity-and-scope) through the available discovery tools. For navigation links, then follow [deep links](references/deep-links.md). Resource discovery, navigation support and authorization are separate capabilities.
|
|
15
15
|
|
|
16
16
|
For SSH setup, configuration sync or Relay pairing, first check this session's pointer for its exact bound local desktop helper command. Without that command, report unavailable and stop this branch: a script file or another capability's binding does not enable it. With the command, follow [remote connections](references/remote-connections.md). For UI changes, use the plugin workflow below. Its GUI contracts describe Yuri's supported subset of the experimental OpenCode GUI SDK 2.2.0, not every capability in the newest upstream Desktop.
|
|
17
17
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# Yuri deep links
|
|
2
2
|
|
|
3
|
-
Use this reference
|
|
3
|
+
Use this reference to compose navigation links to Yuri resources. A deep link is navigation only; resource discovery and authorized operations follow [resource identity and scope](projects.md#resource-identity-and-scope).
|
|
4
|
+
|
|
5
|
+
## Resolve before building
|
|
6
|
+
|
|
7
|
+
1. Establish the requested resource's owning instance, raw directory and exact existing ID through the available context or discovery tools. For a session ID, use this session's context, the bound helper's `task-sessions`, or remote `sessions` / `read-session` results. `remote-projects` supplies project scope, not session IDs.
|
|
8
|
+
2. Keep the discovered ownership with the resource, then choose a supported link shape below for the receiving client. Navigation preserves existing IDs; it does not create or rewrite them.
|
|
9
|
+
3. Report the receiving client's prerequisites separately from the facts confirmed on the generating Host. Finding a remote session does not prove that another client has the corresponding project connected. Missing or ambiguous ownership means report the limitation rather than promise a resolvable link.
|
|
4
10
|
|
|
5
11
|
## Link shapes
|
|
6
12
|
|
|
@@ -16,24 +22,22 @@ Build the URL with `encodeURIComponent` for every id and path. Put paths in the
|
|
|
16
22
|
|
|
17
23
|
`new-session` also accepts `project`, `agent` and `model`; omit them unless the user named them. Unknown routes are ignored without an error.
|
|
18
24
|
|
|
25
|
+
`hostId` and `instanceId` are not supported session-link parameters. The standalone `host` route switches to a saved desktop connection; it does not scope a session link. Discovered target fields are for operations that explicitly accept them, not extra URL fields.
|
|
26
|
+
|
|
19
27
|
Never generate `yuri://connect?...` links yourself. They carry pairing credentials and trigger a user confirmation to import a connection. Do not put tokens, passwords or secrets in any deep link.
|
|
20
28
|
|
|
21
29
|
## Opening a conversation
|
|
22
30
|
|
|
23
31
|
`sessionID` is the OpenCode session id (`ses_...`). `directory` is the absolute path of the project on the machine where the session runs. Always include it when you know it.
|
|
24
32
|
|
|
25
|
-
Yuri resolves the link on the
|
|
26
|
-
|
|
27
|
-
1. If the session id is in that Yuri's own session index, it opens it.
|
|
28
|
-
2. Otherwise `directory` must belong to exactly one Remote Project already connected in that Yuri; Yuri then opens the session through that project.
|
|
29
|
-
3. In every other case Yuri shows a "conversation not found" notice and opens nothing. It never guesses a machine, and never connects one automatically.
|
|
30
|
-
|
|
31
|
-
So a link written on a remote machine only works for people whose Yuri already has that machine's project connected, and the path must be the machine's own path. If two connected machines share the same path, the link is ambiguous and will not open. Say this limit when the user plans to share the link; do not promise the recipient can open it. Desktop support for the remote branch is part of the desktop app; mobile opens only sessions in its own index.
|
|
33
|
+
Desktop Yuri resolves the link on the receiving computer:
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
1. Each open Yuri window checks the session id against its own connection's session index. If exactly one connection has it, that window opens it. This includes windows connected to other machines.
|
|
36
|
+
2. Otherwise the local window tries its own index, then `directory` must belong to exactly one Remote Project already connected in that Yuri; Yuri then opens the session through that project.
|
|
37
|
+
3. In every other case Yuri shows a notice and opens nothing. It never guesses a machine, and never connects one automatically.
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
Step 1 depends on what the recipient has open, which the generating Host cannot observe. Older desktop versions skip it. A remote link therefore either needs an open window connected to the owning machine, or the owning machine's project associated in the receiving Yuri using the target machine's own path. After a local-index miss, equal owning paths on different connected machines are ambiguous and will not open. A unique directory match selects the remote route; it does not confirm the session exists or that its content can load. Mobile does not perform this Remote Project lookup; its session links use the connected runtime's session navigation.
|
|
36
40
|
|
|
37
41
|
## Verification
|
|
38
42
|
|
|
39
|
-
Report the link text, which
|
|
43
|
+
Report the link text, which receiving-side route could resolve it (an open window connected to the owning machine, the local index or a connected Remote Project), and the known limits above. Facts checked on the generating Host do not confirm which route the recipient will use. Do not run `open "yuri://..."` to verify unless the user asks, because that moves their running Yuri window.
|
|
@@ -4,7 +4,7 @@ The supported contract is OpenCode GUI SDK **2.2.0**. Consult current official d
|
|
|
4
4
|
|
|
5
5
|
## Window APIs
|
|
6
6
|
|
|
7
|
-
- `Command`:
|
|
7
|
+
- `Command`: palette, plugin management and window keyboard shortcuts. `bind` provides the default chord; hidden commands keep their shortcuts. Users can remap/unbind commands in Settings > Shortcuts. See [Command shortcuts](#command-shortcuts). Slash autocomplete and `ctx.keybinds` remain unsupported.
|
|
8
8
|
- `TitlebarItem`: global action/status, independent of a session; reactive label/title/icon/busy/pressed. Direct SVG/data-URI icon strings, built-in names and upstream/Yuri differences: [icons](icons.md).
|
|
9
9
|
- `Panel`: Solid `list/render`, reactive session/tab getters; file panels mount in existing file previews. An independent panel uses a dialog/mobile sheet, not upstream's full draggable workspace layout.
|
|
10
10
|
- `LinkHandler`: match, exists and open file/custom links. Use `ctx.links.open({ href, base, session })` for navigation. Preserve workspace-relative identity; never resolve against a different session's directory.
|
|
@@ -22,6 +22,55 @@ Unsupported registries include upstream `Server`, `ComposerPill`, `Slot`, `FileV
|
|
|
22
22
|
|
|
23
23
|
Plugin renderers own their Solid/DOM content. Yuri does not implement upstream `ctx.ui` or expose its React components to plugins; follow [CSS variables and styling](plugin-styles.md) and [icons](icons.md) for visual consistency.
|
|
24
24
|
|
|
25
|
+
## Command shortcuts
|
|
26
|
+
|
|
27
|
+
Register one official Command; Yuri owns keyboard dispatch and cleanup:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { Command, Contract, Plugin, Registry, type Command as GuiCommand } from "@opencode/plugin/gui"
|
|
31
|
+
|
|
32
|
+
type YuriCommand = GuiCommand & { readonly priority?: number }
|
|
33
|
+
|
|
34
|
+
export default Plugin.define({
|
|
35
|
+
setup(ctx) {
|
|
36
|
+
ctx.add(Registry.define("yuri.page"), {
|
|
37
|
+
id: "board", title: "Session board",
|
|
38
|
+
render: () => document.createElement("section"),
|
|
39
|
+
})
|
|
40
|
+
const pages = ctx.use(Contract.define<{ open(id: string): boolean }>("yuri.pages"))
|
|
41
|
+
const command: YuriCommand = {
|
|
42
|
+
id: "open-board",
|
|
43
|
+
title: "Open session board",
|
|
44
|
+
bind: "mod+m",
|
|
45
|
+
priority: 10,
|
|
46
|
+
run() {
|
|
47
|
+
const state = pages()
|
|
48
|
+
if (state.status === "active") state.value.open("board")
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
ctx.add(Command, command)
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`priority` is Yuri-only and finite; upstream hosts may ignore it. Higher wins.
|
|
57
|
+
Built-in defaults have priority 0 and win ties, so a positive value can override
|
|
58
|
+
them. Explicit user mappings always win over developer priority. Equal-priority
|
|
59
|
+
plugins resolve by stable command identity, not asynchronous loading order.
|
|
60
|
+
`mod` means Command on macOS Electron, Ctrl elsewhere (browsers keep their existing
|
|
61
|
+
platform matcher). Electron menu overrides require an updated desktop installer;
|
|
62
|
+
browser/OS/editor shortcuts intercepted before the page are not overridable here.
|
|
63
|
+
|
|
64
|
+
Keep `enabled` reactive when command availability changes. `hidden` hides only
|
|
65
|
+
the palette entry. `scope` limits focus to a CSS selector; unmodified keys yield
|
|
66
|
+
to text fields unless `editable:true`. A synchronous `run()` return of `false`
|
|
67
|
+
declines the key; asynchronous completion cannot undo event consumption.
|
|
68
|
+
Already-consumed events, IME, terminal-owned keys, active leader follow-ups and
|
|
69
|
+
Escape interruption retain host ownership. Prefer declarative commands to
|
|
70
|
+
installing document listeners. Disabling, replacing, failing or unloading a
|
|
71
|
+
plugin revokes its bindings without affecting other plugins.
|
|
72
|
+
Electron's Cmd+Q quit guard remains reserved regardless of plugin priority.
|
|
73
|
+
|
|
25
74
|
## Yuri supplemental registries and contracts
|
|
26
75
|
|
|
27
76
|
- `yuri.theme`, `yuri.branding`: see [appearance](appearance.md).
|
|
@@ -5,6 +5,25 @@ session's Yuri customization pointer. This is a Host capability, not a GUI plugi
|
|
|
5
5
|
or a desktop deep link. Registration does not create files, clone a repository,
|
|
6
6
|
open a conversation or switch an existing active project.
|
|
7
7
|
|
|
8
|
+
## Resource identity and scope
|
|
9
|
+
|
|
10
|
+
Resolve ownership before operating on a project/session or composing a navigation link:
|
|
11
|
+
|
|
12
|
+
1. Discover this caller's capabilities through the bound helper's `describe`, or the contact's granted project tools. Use the returned operations and their scope; a missing binding or unsupported capability is an explicit limit.
|
|
13
|
+
2. For bound-Host resources, use exact IDs and raw directories from this session's context or the relevant `list` / `task-sessions` result. The bound Host is the helper's execution target, not necessarily the computer displaying Yuri. Index results have the completeness limits described below.
|
|
14
|
+
3. For remote resources, discover the project or machine through `remote-projects` / `remote-hosts`, then query its sessions with `sessions` or `read-session`. Keep the returned `target:{hubId,hostId,instanceId}` with each resource's raw directory and session ID:
|
|
15
|
+
|
|
16
|
+
| Field | Meaning |
|
|
17
|
+
|---|---|
|
|
18
|
+
| `hubId` | The Hub whose authorized connections this caller is using. |
|
|
19
|
+
| `hostId` | A connection identity within that Hub, not a universal machine ID. |
|
|
20
|
+
| `instanceId` | The target Yuri instance's identity, independent of which connection reaches it. |
|
|
21
|
+
|
|
22
|
+
Different Hubs can use different connection IDs for the same instance. A worker on the target instance need not know another Hub's connection ID. Use identities actually returned to this caller; names, addresses, equal paths and session-ID structure are not ownership evidence.
|
|
23
|
+
4. Preserve the complete reference for operations that accept it. Each operation or navigation route independently defines which fields it accepts; discovering an identity does not enable another protocol or grant access. For links, serialize only the fields documented in [deep links](deep-links.md).
|
|
24
|
+
|
|
25
|
+
When ownership is unknown or ambiguous, report what is missing and use authorized discovery or ask for clarification. A failed lookup stays unconfirmed; changing the target or creating a replacement resource is a separate user decision.
|
|
26
|
+
|
|
8
27
|
## Local project registration
|
|
9
28
|
|
|
10
29
|
1. Resolve the user-requested directory to an absolute path on the bound Yuri
|