@yuriai/web 0.2.25 → 0.2.27-beta.3
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 +21 -1
- package/dist/assets/AgentAvatar-kIN4sZMz.js +1 -0
- package/dist/assets/AssistantView-C2KQZ6a4.js +3 -0
- package/dist/assets/{DiagramView-DN_rHdr9.js → DiagramView-DK0iXm9b.js} +1 -1
- package/dist/assets/{FadeInOnReveal-555z1y1N.js → FadeInOnReveal-BJA9Za3T.js} +1 -1
- package/dist/assets/{GuiPluginSurface-BPMATuPa.js → GuiPluginSurface-Dz2CdSUA.js} +1 -1
- package/dist/assets/{GuiPluginWindow-CAmfr79x.js → GuiPluginWindow-l4FYY6S-.js} +1 -1
- package/dist/assets/Icon-BP1sfnHn.js +1 -0
- package/dist/assets/{ImageLoadingPlaceholder-BMsQLN_b.js → ImageLoadingPlaceholder-DCWssLJG.js} +1 -1
- package/dist/assets/{LoadingImage-DI7sb_H_.js → LoadingImage-C_Hryaqe.js} +1 -1
- package/dist/assets/MarkdownRenderer-Y6uQXIFH.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-B9K5q0Lc.js → MarkdownRendererImpl-qKp1tQrP.js} +1 -1
- package/dist/assets/{MarkstreamRendererImpl-9gUEVQck.js → MarkstreamRendererImpl-B_JTod0h.js} +1 -1
- package/dist/assets/MobileDetailNavigation-B3rUx5Ve.js +1 -0
- package/dist/assets/{MobileResizableSheet-_6OvPSMI.js → MobileResizableSheet-F1zSUD1S.js} +1 -1
- package/dist/assets/{MobileShareBridge-BrdOiu_r.js → MobileShareBridge-F70fkIfS.js} +3 -3
- package/dist/assets/MobileTabPageHeader-0esgB2TO.js +2 -0
- package/dist/assets/MultiRunWindow-D8m6R_4x.js +1 -0
- package/dist/assets/{OnboardingScreen-g8PDztN3.js → OnboardingScreen-BAsPVV_W.js} +1 -1
- package/dist/assets/{OverlayScrollbar-COv8rH_z.js → OverlayScrollbar-wiRM4AGj.js} +1 -1
- package/dist/assets/SettingsView-izzjIckv.js +29 -0
- package/dist/assets/SettingsWindow-CSuHDq_c.js +1 -0
- package/dist/assets/{TerminalView-BLer-ZhM.js → TerminalView-BtM5-BVx.js} +1 -1
- package/dist/assets/{ToolOutputDialog-DI-s2TBb.js → ToolOutputDialog-DJs9w1_J.js} +2 -2
- package/dist/assets/{YuriLogo-BP4j1iqV.js → YuriLogo-aBS6wlYU.js} +1 -1
- package/dist/assets/appThemeRegistry-BY5rY9-W.js +1 -0
- package/dist/assets/{assistant-attachment-cache-Cis9yYGt.js → assistant-attachment-cache-B9iHLlm2.js} +1 -1
- package/dist/assets/{button-Be1cqulG.js → button-Dt6Ygbc7.js} +1 -1
- package/dist/assets/{capgoAdapter-B31jIkD8.js → capgoAdapter-MQ1qpf60.js} +1 -1
- package/dist/assets/collapsible-Dm7OHk7m.js +1 -0
- package/dist/assets/{device-hj359GjJ.js → device-BjRYYXNT.js} +1 -1
- package/dist/assets/{diagram-hEIRiKol.js → diagram-DWZaG3_v.js} +1 -1
- package/dist/assets/dialog-CTYD3Sbr.css +1 -0
- package/dist/assets/dialog-CjQeHVOc.js +1 -0
- package/dist/assets/{dropdown-menu.styles-xxM2ofOp.js → dropdown-menu.styles-PdxueXzN.js} +1 -1
- package/dist/assets/{es-Clj7CS2r.js → es-BjI1GHJ5.js} +3 -3
- package/dist/assets/{fileMentionTouchSelection-CTh0Mc2g.js → fileMentionTouchSelection-D7QtVxjI.js} +2 -2
- package/dist/assets/{fileQueries-COS23nLq.js → fileQueries-5a1jkme2.js} +1 -1
- package/dist/assets/{fileReferenceActions-Cus9oSW7.js → fileReferenceActions-BAoEu4z8.js} +1 -1
- package/dist/assets/{fr-dmrFQLCO.js → fr-Bs7ndHkb.js} +4 -4
- package/dist/assets/{gitApi-deADOzlN.js → gitApi-BxQmH8Wg.js} +1 -1
- package/dist/assets/{gitApiHttp-BBRKl9WX.js → gitApiHttp-DHrRqnYh.js} +3 -3
- package/dist/assets/{gui-BHEKelUx.js → gui-9enrif_1.js} +1 -1
- package/dist/assets/{host-DrqLUbqt.js → host-D1EpSUMR.js} +1 -1
- package/dist/assets/image-loading-Dq1g_wpm.js +1 -0
- package/dist/assets/{input-DTdHYZ6r.js → input-Dq4usRDa.js} +1 -1
- package/dist/assets/insertionBoundaries-CKQL85zy.js +1 -0
- package/dist/assets/{ja-Co0dxiN_.js → ja-DkdV26EW.js} +4 -4
- package/dist/assets/{ko-BltElAGq.js → ko-B0qoC5da.js} +4 -4
- package/dist/assets/main-CNwFqQQd.js +2 -0
- package/dist/assets/main-DPhcXanT.js +169 -0
- package/dist/assets/{markdownHeightCache-DnR01ECa.js → markdownHeightCache-C1u0bWDL.js} +1 -1
- package/dist/assets/{markdownTheme-DHoKvD6O.js → markdownTheme-hpURsgju.js} +1 -1
- package/dist/assets/{mcpQueries-Cpb22_60.js → mcpQueries-D2IxTr4k.js} +1 -1
- package/dist/assets/miniChat-CF2vb25D.js +2 -0
- package/dist/assets/mobile-C24qSj44.js +2 -0
- package/dist/assets/{mobileBackNavigation-BibkyIeB.js → mobileBackNavigation-vpCg1S7j.js} +1 -1
- package/dist/assets/{multirun-CPvUnP91.js → multirun-DT-dFXud.js} +2 -2
- package/dist/assets/{native-BMAEg2E6.js → native-De1DIkLZ.js} +1 -1
- package/dist/assets/{native-config-DA8S8EqV.js → native-config-ncdoz9Wl.js} +1 -1
- package/dist/assets/{persistence-CBL0OOdj.js → persistence-JyLTFv27.js} +1 -1
- package/dist/assets/{pl-qd6Wnl7H.js → pl-D27Y_GBs.js} +4 -4
- package/dist/assets/projectMeta-CG8NLahh.js +1 -0
- package/dist/assets/{pt-BR-CsOFfQXS.js → pt-BR-DbocEu4b.js} +3 -3
- package/dist/assets/{react-BYRXYlGz.js → react-CURmDhtB.js} +1 -1
- package/dist/assets/{readiness-RiznV1AX.js → readiness-DSJs_3v4.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-DdGqTh4X.js → renderElectronMiniChatApp-ChZCxxH6.js} +2 -2
- package/dist/assets/renderMobileApp-CRv3Il6P.js +28 -0
- package/dist/assets/{runtime-file-download-B_c7JBoS.js → runtime-file-download-CcNIVp7u.js} +1 -1
- package/dist/assets/{runtime-file-resource-DpTxBCsp.js → runtime-file-resource-6np6lzoV.js} +1 -1
- package/dist/assets/runtimeConfig-CZrflo-r.js +2 -0
- package/dist/assets/runtimeEndpointReset-BL9hV6J1.css +1 -0
- package/dist/assets/runtimeEndpointReset-Cx3RE97b.js +149 -0
- package/dist/assets/scheduledTaskNavigation-rhgnZaaj.js +1 -0
- package/dist/assets/sessionChangeSummary-8C8nv-EP.css +1 -0
- package/dist/assets/sessionChangeSummary-CVUA1AFw.js +1 -0
- package/dist/assets/{sessionLookup-B7kUOIpO.js → sessionLookup-C3_vQwLe.js} +1 -1
- package/dist/assets/{sortable-tabs-strip-CQZ16rbO.js → sortable-tabs-strip-C1QmKFdb.js} +1 -1
- package/dist/assets/speechSettingsQueries-BSQ-2JTv.js +4 -0
- package/dist/assets/src-NKCZI3Lg.css +2 -0
- package/dist/assets/{store-7wItZZ7_.js → store-DvN2L3vf.js} +4 -4
- package/dist/assets/{terminalApi-C0_GUlPR.js → terminalApi-B5o8UqWA.js} +1 -1
- package/dist/assets/{textarea-BU8JtaSQ.js → textarea-vtIQM2iP.js} +1 -1
- package/dist/assets/{tooltip-C8DhNU1d.js → tooltip-BpG2mxrT.js} +1 -1
- package/dist/assets/{touch-gestures-zegXCZEP.js → touch-gestures-K2_ZOkKW.js} +1 -1
- package/dist/assets/types-CNTgeeM1.js +2 -0
- package/dist/assets/{uk-BNrdZFvK.js → uk-B_JwElWz.js} +3 -3
- package/dist/assets/{useAppFontEffects-Bs6kVjrE.js → useAppFontEffects-BguV1Hfa.js} +55 -51
- package/dist/assets/useAppFontEffects-RpgNbjA4.css +1 -0
- package/dist/assets/{useAssistantUIStore-NlYBroMc.js → useAssistantUIStore-C9FPlYQz.js} +1 -1
- package/dist/assets/{useDesktopWindowControlsLayout-COBTly74.js → useDesktopWindowControlsLayout-CwgkVw9f.js} +1 -1
- package/dist/assets/useEffectiveDirectory-Ci6Z13kj.js +1 -0
- package/dist/assets/{useFontPreferences-DQAS94Z4.js → useFontPreferences-DMiP_Yy-.js} +1 -1
- package/dist/assets/useMobileNavigationStore-TCj7ZnhV.js +418 -0
- package/dist/assets/{useThemeSystem-8jhE4Zyk.js → useThemeSystem-CGF5jnIh.js} +1 -1
- package/dist/assets/{useUIStore-96W41KFb.js → useUIStore-DI7va1HH.js} +1 -1
- package/dist/assets/{useWorkerHighlightedLines-BZUO0Si5.js → useWorkerHighlightedLines-HKhuYGSj.js} +1 -1
- package/dist/assets/{vendor-base-ui-CdzJ6My_.js → vendor-base-ui-BQjbsJ43.js} +1 -1
- package/dist/assets/{vendor-cmdk-RDxC-9Iz.js → vendor-cmdk-C3oBVL9X.js} +1 -1
- package/dist/assets/{vendor-dnd-kit-accessibility-COSwgjFs.js → vendor-dnd-kit-accessibility-DxpFzZhi.js} +1 -1
- package/dist/assets/{vendor-dnd-kit-core-5pNnzVdw.js → vendor-dnd-kit-core-B3g3zWQd.js} +1 -1
- package/dist/assets/{vendor-dnd-kit-sortable-Dm50I0m7.js → vendor-dnd-kit-sortable-BKewx0Py.js} +1 -1
- package/dist/assets/{vendor-framer-motion-BQ3-sJMO.js → vendor-framer-motion-C1twy-GF.js} +1 -1
- package/dist/assets/{vendor-markstream-react-Bm0cO70Z.js → vendor-markstream-react-BlbOg72y.js} +3 -3
- package/dist/assets/vendor-motion-BmLx2V78.js +1 -0
- package/dist/assets/{vendor-opencode-client-fxfj4IA_.js → vendor-opencode-client-UL_TecvQ.js} +1 -1
- package/dist/assets/{vendor-opencode-plugin-CQ5ogY33.js → vendor-opencode-plugin-Bw7Q6Nv9.js} +1 -1
- package/dist/assets/{vendor-pierre-diffs-DPBtNDJ5.js → vendor-pierre-diffs-Bj9Nqn6w.js} +1 -1
- package/dist/assets/{vendor-react-BP2cRVqX.js → vendor-react-D5d-V1vN.js} +1 -1
- package/dist/assets/{vendor-react-drawio-Ck9ZKdNN.js → vendor-react-drawio-C-iPmmED.js} +1 -1
- package/dist/assets/{vendor-reactuses-core-BJ-jJ4YM.js → vendor-reactuses-core-BcebBLwF.js} +1 -1
- package/dist/assets/{vendor-solid-js-Dmt4_-Zk.js → vendor-solid-js-0T254UHG.js} +1 -1
- package/dist/assets/{vendor-sonner-ZS8XIOVl.js → vendor-sonner-r2EJnfoo.js} +1 -1
- package/dist/assets/{vendor-stream-diffs-TgIdH4lX.js → vendor-stream-diffs-BnLmeqg2.js} +2 -2
- package/dist/assets/{vendor-tanstack-react-query-CdqCAt40.js → vendor-tanstack-react-query-C4SG3JZB.js} +1 -1
- package/dist/assets/vendor-tanstack-react-virtual-BeZn51tF.js +1 -0
- package/dist/assets/{vendor-zustand-o69pgTEK.js → vendor-zustand-B43HCgwC.js} +1 -1
- package/dist/assets/{zh-CN-DMvJXS23.js → zh-CN-DhFFdHQu.js} +4 -4
- package/dist/assets/{zh-TW-D0wsKLs1.js → zh-TW-BvehppXO.js} +4 -4
- package/dist/index.html +18 -18
- package/dist/mini-chat.html +18 -18
- package/dist/mobile.html +18 -18
- package/package.json +1 -1
- package/server/lib/assistants/DOCUMENTATION.md +68 -37
- package/server/lib/assistants/cards.js +4 -0
- package/server/lib/assistants/cards.test.js +11 -1
- package/server/lib/assistants/contact-attachments.http.test.js +31 -7
- package/server/lib/assistants/contact-store.js +70 -27
- package/server/lib/assistants/contact-store.test.js +88 -8
- package/server/lib/assistants/contact-tools.js +68 -84
- package/server/lib/assistants/contact-tools.test.js +85 -42
- package/server/lib/assistants/harness.js +6 -3
- package/server/lib/assistants/harness.test.js +25 -10
- package/server/lib/assistants/routes.js +25 -3
- package/server/lib/assistants/service.js +283 -146
- package/server/lib/assistants/service.test.js +954 -54
- package/server/lib/assistants/weixin/DOCUMENTATION.md +142 -0
- package/server/lib/assistants/weixin/api.js +113 -0
- package/server/lib/assistants/weixin/api.test.js +80 -0
- package/server/lib/assistants/weixin/routes.js +23 -0
- package/server/lib/assistants/weixin/routes.test.js +41 -0
- package/server/lib/assistants/weixin/runtime.js +357 -0
- package/server/lib/assistants/weixin/runtime.test.js +286 -0
- package/server/lib/assistants/weixin/store.js +103 -0
- package/server/lib/assistants/weixin/typing.js +88 -0
- package/server/lib/assistants/weixin/typing.test.js +185 -0
- package/server/lib/assistants/yuri-project.http.test.js +47 -0
- package/server/lib/assistants/yuri-tools.js +1 -1
- package/server/lib/assistants/yuri-tools.test.js +3 -2
- package/server/lib/git/DOCUMENTATION.md +6 -0
- package/server/lib/git/branches.test.js +18 -0
- package/server/lib/git/service.js +6 -3
- package/server/lib/llm/DOCUMENTATION.md +15 -7
- package/server/lib/llm/bridge-client.js +58 -34
- package/server/lib/llm/bridge-client.test.js +123 -16
- package/server/lib/notifications/APNS.md +7 -4
- package/server/lib/notifications/DOCUMENTATION.md +3 -1
- package/server/lib/notifications/apns-runtime.js +14 -8
- package/server/lib/notifications/apns-runtime.test.js +28 -0
- package/server/lib/notifications/family-completion-gate.js +37 -31
- package/server/lib/notifications/family-completion-gate.test.js +32 -0
- package/server/lib/opencode/DOCUMENTATION.md +6 -0
- package/server/lib/opencode/hmr-isolation.test.js +56 -0
- package/server/lib/opencode/lifecycle.js +23 -27
- package/server/lib/opencode/network-runtime.js +8 -14
- package/server/lib/opencode/network-runtime.test.js +4 -4
- package/server/lib/opencode/proxy.js +2 -1
- package/server/lib/opencode/proxy.test.js +1 -0
- package/server/lib/opencode/shutdown-runtime.js +1 -1
- package/server/lib/opencode/shutdown-runtime.test.js +12 -0
- package/server/lib/relay/DOCUMENTATION.md +8 -1
- package/server/lib/relay/relay-server.e2e.test.ts +102 -1
- package/server/lib/relay/service.js +1 -1
- package/server/lib/relay/service.test.js +14 -1
- package/server/lib/request-cors.js +1 -1
- package/server/lib/request-cors.test.js +13 -1
- package/server/lib/session-goal/DOCUMENTATION.md +3 -0
- package/server/lib/session-goal/runtime.js +0 -4
- package/server/lib/session-index/DOCUMENTATION.md +18 -4
- package/server/lib/session-index/event-ingest.js +6 -0
- package/server/lib/session-index/event-ingest.test.js +10 -0
- package/server/lib/session-index/service.js +89 -13
- package/server/lib/session-index/service.test.js +144 -1
- package/server/lib/session-metadata/routes.test.js +44 -0
- package/server/lib/tts/DOCUMENTATION.md +24 -2
- package/server/lib/tts/direct-speech.test.js +28 -3
- package/server/opencode-proxy.test.js +5 -5
- package/dist/assets/AgentAvatar--wjVXk3I.js +0 -1
- package/dist/assets/AssistantView-CSpW-4g6.js +0 -3
- package/dist/assets/Icon-Bn4Eec3Y.js +0 -1
- package/dist/assets/MarkdownRenderer-DP2a0lfG.js +0 -2
- package/dist/assets/MobileDetailNavigation-C9NHt08G.js +0 -1
- package/dist/assets/MobileTabPageHeader-qe23xT2-.js +0 -2
- package/dist/assets/MultiRunWindow-CvHADKf9.js +0 -1
- package/dist/assets/SettingsView-DK8Jkkhd.js +0 -29
- package/dist/assets/SettingsWindow-EP8KZok8.js +0 -1
- package/dist/assets/appThemeRegistry-BnQF2GlY.js +0 -1
- package/dist/assets/collapsible-DqfguRMp.js +0 -1
- package/dist/assets/dialog-BS-KgM5J.js +0 -1
- package/dist/assets/image-loading-DJZLvhMd.js +0 -1
- package/dist/assets/insertionBoundaries-h2be7xbf.js +0 -1
- package/dist/assets/main-BpBrYqtJ.js +0 -169
- package/dist/assets/main-C2QklNP4.js +0 -2
- package/dist/assets/miniChat-C-9deNrt.js +0 -2
- package/dist/assets/mobile-DW7tEL-k.js +0 -2
- package/dist/assets/projectMeta-BwAS96mf.js +0 -1
- package/dist/assets/renderMobileApp-Bipi0hKv.js +0 -28
- package/dist/assets/runtimeConfig-Dx7Y6Yvp.js +0 -2
- package/dist/assets/runtimeEndpointReset-0buInzjw.js +0 -149
- package/dist/assets/runtimeEndpointReset-HYSytKO-.css +0 -1
- package/dist/assets/scheduledTaskNavigation-CYozx15H.js +0 -1
- package/dist/assets/sessionChangeSummary-BGisROOB.js +0 -1
- package/dist/assets/sessionChangeSummary-CRYRvpy7.css +0 -1
- package/dist/assets/speechSettingsQueries-CWXTghOr.js +0 -4
- package/dist/assets/src-BFsc_2gs.css +0 -2
- package/dist/assets/types-C9aO7yfx.js +0 -2
- package/dist/assets/useEffectiveDirectory-Bg0LmEqP.js +0 -1
- package/dist/assets/useMobileNavigationStore-hhiMBg5n.js +0 -418
- package/dist/assets/vendor-motion-B4xmxmaP.js +0 -1
- package/dist/assets/vendor-tanstack-react-virtual-B_EO--9t.js +0 -1
package/dist/index.html
CHANGED
|
@@ -560,7 +560,7 @@
|
|
|
560
560
|
opacity: 0.72;
|
|
561
561
|
}
|
|
562
562
|
</style>
|
|
563
|
-
<script type="module" crossorigin src="/assets/main-
|
|
563
|
+
<script type="module" crossorigin src="/assets/main-CNwFqQQd.js"></script>
|
|
564
564
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
565
565
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-DBn9yahL.js">
|
|
566
566
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-DEZ1K7qW.js">
|
|
@@ -569,34 +569,34 @@
|
|
|
569
569
|
<link rel="modulepreload" crossorigin href="/assets/desktop-JwYqThiw.js">
|
|
570
570
|
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-CB0CTcMg.js">
|
|
571
571
|
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-CoLLVJw8.js">
|
|
572
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-
|
|
573
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-
|
|
572
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-BQjbsJ43.js">
|
|
573
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-B43HCgwC.js">
|
|
574
574
|
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-DV9F8PTZ.js">
|
|
575
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-
|
|
575
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-UL_TecvQ.js">
|
|
576
576
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-migration-Bhz6UOBJ.js">
|
|
577
577
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-bootstrap-D4BW3w-M.js">
|
|
578
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
579
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-react-
|
|
578
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-DI7va1HH.js">
|
|
579
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-D5d-V1vN.js">
|
|
580
580
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BWz0ose6.js">
|
|
581
581
|
<link rel="modulepreload" crossorigin href="/assets/queryRuntime-Dkpnq3Z1.js">
|
|
582
582
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
583
583
|
<link rel="modulepreload" crossorigin href="/assets/pathNormalization-ewtPqJWn.js">
|
|
584
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
585
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-
|
|
586
|
-
<link rel="modulepreload" crossorigin href="/assets/fileQueries-
|
|
584
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-JyLTFv27.js">
|
|
585
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-C4SG3JZB.js">
|
|
586
|
+
<link rel="modulepreload" crossorigin href="/assets/fileQueries-5a1jkme2.js">
|
|
587
587
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
588
588
|
<link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
|
|
589
589
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
590
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-
|
|
591
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
592
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
593
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-
|
|
590
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-6np6lzoV.js">
|
|
591
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-DHrRqnYh.js">
|
|
592
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-B5o8UqWA.js">
|
|
593
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-CcNIVp7u.js">
|
|
594
594
|
<link rel="modulepreload" crossorigin href="/assets/platform-DFJEtBlo.js">
|
|
595
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
596
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
597
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
598
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
599
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
595
|
+
<link rel="modulepreload" crossorigin href="/assets/types-CNTgeeM1.js">
|
|
596
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-MQ1qpf60.js">
|
|
597
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-ncdoz9Wl.js">
|
|
598
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-CZrflo-r.js">
|
|
599
|
+
<link rel="stylesheet" crossorigin href="/assets/src-NKCZI3Lg.css">
|
|
600
600
|
</head>
|
|
601
601
|
<body class="h-full bg-background text-foreground">
|
|
602
602
|
<!-- Keep the startup layer outside #root. React replaces every child of
|
package/dist/mini-chat.html
CHANGED
|
@@ -77,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-CF2vb25D.js"></script>
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-DBn9yahL.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-DEZ1K7qW.js">
|
|
@@ -86,34 +86,34 @@
|
|
|
86
86
|
<link rel="modulepreload" crossorigin href="/assets/desktop-JwYqThiw.js">
|
|
87
87
|
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-CB0CTcMg.js">
|
|
88
88
|
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-CoLLVJw8.js">
|
|
89
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-
|
|
89
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-BQjbsJ43.js">
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-B43HCgwC.js">
|
|
91
91
|
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-DV9F8PTZ.js">
|
|
92
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-
|
|
92
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-UL_TecvQ.js">
|
|
93
93
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-migration-Bhz6UOBJ.js">
|
|
94
94
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-bootstrap-D4BW3w-M.js">
|
|
95
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
96
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-react-
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-DI7va1HH.js">
|
|
96
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-D5d-V1vN.js">
|
|
97
97
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BWz0ose6.js">
|
|
98
98
|
<link rel="modulepreload" crossorigin href="/assets/queryRuntime-Dkpnq3Z1.js">
|
|
99
99
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
100
100
|
<link rel="modulepreload" crossorigin href="/assets/pathNormalization-ewtPqJWn.js">
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-
|
|
103
|
-
<link rel="modulepreload" crossorigin href="/assets/fileQueries-
|
|
101
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-JyLTFv27.js">
|
|
102
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-C4SG3JZB.js">
|
|
103
|
+
<link rel="modulepreload" crossorigin href="/assets/fileQueries-5a1jkme2.js">
|
|
104
104
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
105
105
|
<link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
|
|
106
106
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
107
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
109
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
110
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-
|
|
107
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-6np6lzoV.js">
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-DHrRqnYh.js">
|
|
109
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-B5o8UqWA.js">
|
|
110
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-CcNIVp7u.js">
|
|
111
111
|
<link rel="modulepreload" crossorigin href="/assets/platform-DFJEtBlo.js">
|
|
112
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
113
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
114
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
115
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
116
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
112
|
+
<link rel="modulepreload" crossorigin href="/assets/types-CNTgeeM1.js">
|
|
113
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-MQ1qpf60.js">
|
|
114
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-ncdoz9Wl.js">
|
|
115
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-CZrflo-r.js">
|
|
116
|
+
<link rel="stylesheet" crossorigin href="/assets/src-NKCZI3Lg.css">
|
|
117
117
|
</head>
|
|
118
118
|
<body class="h-full bg-background text-foreground">
|
|
119
119
|
<div id="root" class="h-full">
|
package/dist/mobile.html
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
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-C24qSj44.js"></script>
|
|
68
68
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-DBn9yahL.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-DEZ1K7qW.js">
|
|
@@ -73,34 +73,34 @@
|
|
|
73
73
|
<link rel="modulepreload" crossorigin href="/assets/desktop-JwYqThiw.js">
|
|
74
74
|
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-CB0CTcMg.js">
|
|
75
75
|
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-CoLLVJw8.js">
|
|
76
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-
|
|
77
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-
|
|
76
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-BQjbsJ43.js">
|
|
77
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-B43HCgwC.js">
|
|
78
78
|
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-DV9F8PTZ.js">
|
|
79
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-
|
|
79
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-UL_TecvQ.js">
|
|
80
80
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-migration-Bhz6UOBJ.js">
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-bootstrap-D4BW3w-M.js">
|
|
82
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
83
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-react-
|
|
82
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-DI7va1HH.js">
|
|
83
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-D5d-V1vN.js">
|
|
84
84
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BWz0ose6.js">
|
|
85
85
|
<link rel="modulepreload" crossorigin href="/assets/queryRuntime-Dkpnq3Z1.js">
|
|
86
86
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
87
87
|
<link rel="modulepreload" crossorigin href="/assets/pathNormalization-ewtPqJWn.js">
|
|
88
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
89
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/fileQueries-
|
|
88
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-JyLTFv27.js">
|
|
89
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-C4SG3JZB.js">
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/fileQueries-5a1jkme2.js">
|
|
91
91
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
|
|
93
93
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-
|
|
95
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
96
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
97
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-6np6lzoV.js">
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-DHrRqnYh.js">
|
|
96
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-B5o8UqWA.js">
|
|
97
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-CcNIVp7u.js">
|
|
98
98
|
<link rel="modulepreload" crossorigin href="/assets/platform-DFJEtBlo.js">
|
|
99
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
100
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
103
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
99
|
+
<link rel="modulepreload" crossorigin href="/assets/types-CNTgeeM1.js">
|
|
100
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-MQ1qpf60.js">
|
|
101
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-ncdoz9Wl.js">
|
|
102
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-CZrflo-r.js">
|
|
103
|
+
<link rel="stylesheet" crossorigin href="/assets/src-NKCZI3Lg.css">
|
|
104
104
|
</head>
|
|
105
105
|
<body class="h-full bg-background text-foreground">
|
|
106
106
|
<div id="root" class="h-full">
|
package/package.json
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Assistants Module
|
|
2
2
|
|
|
3
|
+
## WeChat message channel
|
|
4
|
+
|
|
5
|
+
Each saved Bot has a Host-owned, QR-authorized text channel configured in the final
|
|
6
|
+
**Message channels** settings group. It admits only the QR-confirmed owner through
|
|
7
|
+
the existing `send()` pipeline and reads committed public replies through the internal
|
|
8
|
+
`channelPage()` feed. Bindings, private credentials, durable receipts/outbox and
|
|
9
|
+
process leases are owned by `weixin/`, not ordinary Session delivery or UI state.
|
|
10
|
+
See `weixin/DOCUMENTATION.md` for authorization, shared-context/output semantics,
|
|
11
|
+
restart ambiguity, local disconnect and the explicit platform-verification limits.
|
|
12
|
+
|
|
3
13
|
## New-contact greeting
|
|
4
14
|
|
|
5
15
|
Every successful create (HTTP, contact tool, or first-run seed) atomically inserts
|
|
@@ -21,7 +31,7 @@ silently omits the ordering field. Contact-list order and navigation avatar iden
|
|
|
21
31
|
use this timestamp, never assistant configuration `updatedAt`. Regression fixtures
|
|
22
32
|
return the timestamp actually inserted, and snapshot tests require a finite value.
|
|
23
33
|
|
|
24
|
-
##
|
|
34
|
+
## Recoverable contact errors
|
|
25
35
|
|
|
26
36
|
Contact model requests have no Yuri generation time limit (`timeoutMs: 0`).
|
|
27
37
|
Empty text-only model replies recover in the same generation call with capped
|
|
@@ -39,13 +49,20 @@ final declarations then pass through the existing parser unchanged; an envelope
|
|
|
39
49
|
is transport framing, not permission to bypass tool/protocol validation. See
|
|
40
50
|
`../llm/DOCUMENTATION.md` for generation recovery and attachment-path behavior.
|
|
41
51
|
|
|
42
|
-
Contact-turn failures
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
Contact-turn failures publish `yuri:contact-turn-end` and persist one assistant
|
|
53
|
+
`status:error` row (`${messageID}:error`) so reconnect, remount and restart recover
|
|
54
|
+
the same feedback. This covers user/peer turns and automatic continuations,
|
|
55
|
+
including provider failures and empty output. Every new contact message insert
|
|
56
|
+
(user, peer, spoken reply or card, including mid-turn publishes) atomically removes
|
|
57
|
+
that contact's previous error rows and parts before writing the update. A later
|
|
58
|
+
failure replaces the previous failure too. Failed inserts roll back the cleanup;
|
|
59
|
+
other contacts, user messages and already-published valid replies/cards stay intact.
|
|
60
|
+
Idempotent admission replay does not clear the error. Startup atomically removes
|
|
61
|
+
only legacy errors followed by a newer `(ordinal, message_id)` row in that contact,
|
|
62
|
+
retaining a latest error; cleanup failure rolls back and fails startup. Errors do
|
|
63
|
+
not become list previews, unread counts, or LLM memory. If error persistence itself
|
|
64
|
+
fails, the service emits a body-free warning and still settles activity and sends
|
|
65
|
+
live failure feedback; that failure cannot be recovered after reconnect.
|
|
49
66
|
Worker-card execution status remains part of the card's authoritative state.
|
|
50
67
|
|
|
51
68
|
## Contact attachment chronology
|
|
@@ -84,14 +101,15 @@ seeds retain their original shape/color mapping; no migration or read-time write
|
|
|
84
101
|
is introduced. The shared renderer now uses one fixed capsule-eye specification
|
|
85
102
|
regardless of legacy eye/expression fields.
|
|
86
103
|
|
|
87
|
-
Contacts
|
|
88
|
-
the existing revision-checked update path.
|
|
104
|
+
Contacts use `update_assistant_settings({ settings: { avatarSeed } })` through
|
|
105
|
+
the existing revision-checked update path. A null seed generates a complete v1
|
|
89
106
|
recipe with a fresh nonce, one of the twelve mixed pigments and the existing
|
|
90
107
|
seven-shape random pool; the Node-only catalog mirror is checked against the UI
|
|
91
108
|
recipe catalog by service tests. No renderer or animation data is loaded on the Host;
|
|
92
|
-
an explicit seed restores a face.
|
|
93
|
-
|
|
94
|
-
|
|
109
|
+
an explicit seed restores a face. Omitted targets bind the calling contact;
|
|
110
|
+
explicit named/ID targets retain the settings tool's target resolution. Unsupported
|
|
111
|
+
customization arguments are rejected. Results include saved settings;
|
|
112
|
+
unchanged values do not bump revision. Storage failures remain
|
|
95
113
|
tool errors, and revision conflicts retry once.
|
|
96
114
|
|
|
97
115
|
Procedural-avatar guidance is progressively disclosed: the short tool description
|
|
@@ -101,7 +119,7 @@ restoration and limitations (no semantic image prompts, uploads or URLs).
|
|
|
101
119
|
Assistant Settings saves a versioned shape/color/eyes/expression/motion recipe in
|
|
102
120
|
the same opaque `avatarSeed` string. The server preserves it byte-for-byte through
|
|
103
121
|
create/update/snapshot/restart; no new column or write path is introduced. The tool
|
|
104
|
-
|
|
122
|
+
edits the complete seed, not individual customization arguments. Legacy seeds remain
|
|
105
123
|
valid, and UI builds own their visual interpretation.
|
|
106
124
|
Ordinary settings reads expose `avatarSeed` without the full guide. Background
|
|
107
125
|
read-only turns cannot call the mutation tool.
|
|
@@ -134,7 +152,7 @@ reasoning display.
|
|
|
134
152
|
scheduler to `reportScheduledTaskResult`; prompt admission and intermediate
|
|
135
153
|
session events do not wake the contact. Associations created after the run
|
|
136
154
|
started do not receive its historical result.
|
|
137
|
-
- Each
|
|
155
|
+
- Each live owner receives a read-only contact-lane turn with the captured
|
|
138
156
|
contact configuration, the run's original task prompt, authoritative outcome,
|
|
139
157
|
error and bounded worker output. `read_session` can fetch the full result.
|
|
140
158
|
The existing live contact-turn state drives working indicators; no synthetic
|
|
@@ -153,8 +171,8 @@ reasoning display.
|
|
|
153
171
|
result when the service closes or admission/preparation fails. User interruption
|
|
154
172
|
follows the existing automatic-turn cancellation policy.
|
|
155
173
|
- Assistant-owned results bypass the generic scheduled-task notification;
|
|
156
|
-
contact notification settings apply only when the review speaks.
|
|
157
|
-
|
|
174
|
+
contact notification settings apply only when the review speaks.
|
|
175
|
+
Deleted/unowned associations use
|
|
158
176
|
the scheduler's ordinary notification path. Per-owner receipts let one failed
|
|
159
177
|
owner retry without replaying other completed owners.
|
|
160
178
|
- This is Host-owned behavior for web, Electron, hosted mobile, Capacitor and
|
|
@@ -212,7 +230,7 @@ available domain names and short descriptions, not every deferred schema:
|
|
|
212
230
|
| Domain | Deferred tools | Owning behavior |
|
|
213
231
|
| --- | --- | --- |
|
|
214
232
|
| `yuri.projects` | `register_project` | Register an existing directory through shared `projects/registry.js` |
|
|
215
|
-
| `yuri.assistants` | `create_assistant
|
|
233
|
+
| `yuri.assistants` | `create_assistant` | Existing Bot creation owner |
|
|
216
234
|
| `yuri.tasks` | `schedule_task`, `update_scheduled_task` | Existing task creation/update/pause/resume owners |
|
|
217
235
|
| `opencode.web` | `websearch`, `list_websearch_providers` | Existing authenticated SDK search; provider listing is optional, not a search prerequisite |
|
|
218
236
|
| `opencode.activity` | `list_active_sessions` | Authoritative live execution membership, not history-derived completion |
|
|
@@ -417,7 +435,7 @@ and keep their existing error result handling.
|
|
|
417
435
|
- The model is prompted to send a progress message only when it adds information the user does not already have (a direction worth correcting, a meaningful finding, a blocker, or expected long work), then give a short final outcome. A message is not required before each tool call, and successful lookups need no separate confirmation. Public messages share the existing SSE, durable contact rows, and turn-global indices across web, desktop, VS Code, hosted mobile, and Capacitor. No timer narration, tool logs, progress widgets, or synthetic chat messages are added. Timing of model-authored milestones remains model policy; the transport guarantees immediate delivery once an explicit public record arrives.
|
|
418
436
|
- Completion notifications use the latest spoken message, keeping earlier progress out of the final notification body. Transcript persistence reconciles by stable bubble IDs and adds only remaining messages.
|
|
419
437
|
- Tool results remain model context for every tool. The outcome projector uses assistant-authored text only. Terminal operations retain the mutation stop gate, followed by a tools-disabled completion on the same provider/model to communicate the actual result. A failed/empty summary surfaces a turn error; a completed side effect stays committed and is never replayed by that summary pass.
|
|
420
|
-
- Reset summaries receive only the successful reset tool result, excluding prior messages and attachments. The service retains one model-generated confirmation and discards pre-reset output for that turn. Failures emit
|
|
438
|
+
- Reset summaries receive only the successful reset tool result, excluding prior messages and attachments. The service retains one model-generated confirmation and discards pre-reset output for that turn. Failures emit recoverable error feedback outside assistant speech bubbles, retained until the next contact message update.
|
|
421
439
|
|
|
422
440
|
- Protocol correction never replays rejected assistant prose into model history: simulated User/Assistant turns and tool-result records are rejected as fabricated evidence. Corrections remain bounded and exhaustion is an error, not a completion.
|
|
423
441
|
|
|
@@ -432,6 +450,7 @@ and keep their existing error result handling.
|
|
|
432
450
|
|
|
433
451
|
- First-class contact parts reuse one slot: `cardType` `session` | `assistant` | `schedule`.
|
|
434
452
|
- Persist in `assistant_contact_message` / `assistant_contact_part`. Survive reload.
|
|
453
|
+
- Schedule create/update auto-cards persist the authoritative schedule's optional `cron`, `date`, `times`, and `weekdays`, not just a `time`/first-time projection. The card parser and UI DTO retain these fields through JSON persistence and transport. Omitted legacy fields stay omitted; explicit null marks an inapplicable field on new cards. This is additive contact-part JSON, with no SQLite migration or task rewrite. Clients may recover legacy display details through the existing Assistant-scoped task mapping, matching `(projectID, taskID)`; failed/deleted task lookups do not erase stored card information.
|
|
435
454
|
- Cards are **assistant-emitted UI**, not user slash commands. The user never types `/card`. Insert: tool auto-cards (`assign_session`, `watch_session`, `create_assistant`, `schedule_task`), and API `POST /:id/contact/cards` for harness/tests. Later project/worktree/PR, inbound pushes, and summon **must** reuse this card slot.
|
|
436
455
|
|
|
437
456
|
**Assign work (this PR)**
|
|
@@ -450,11 +469,17 @@ and keep their existing error result handling.
|
|
|
450
469
|
- After a successful assign or watch, the service persists the existing session card into the contact transcript (user bubbles first, then the card) and watches that worker session in `assistant_contact_watch` (watch baselines the live status). The user-facing outcome is the session card plus any `notify_user` progress note; English tool-result confirms (`Opened a coding session.`, `Watching that coding session.`, `Created assistant…`, `Sent to…`) for card/side-effect tools are **not** written into the transcript.
|
|
451
470
|
- Existing OpenCode SSE on the same `globalEventHub` as notifications (`session.idle`, `session.error`, `session.status`, `session.execution.*`, `question.asked`, `permission.asked`) updates **the same card** (`busy` → `complete` / `error` / `question` / `cancelled`). **No canned settle transcript bubbles** (`oc.settle.complete` / `error` / `question` are not written). On **complete, error, or cancelled (user interrupt)** when the watch status actually changed, the service schedules an async contact-lane **continuation** (`inContactTurnLane` + `runContactTurn`) per related assistant: no admitted user row (internal `userText` only), active contact turn (green dot / 3-dot), stable resume id `resume_${assistantID}_${sessionID}_${status}_${updatedAt}`, bounded last worker assistant text (~2000 chars; fetch failure still resumes with status only). Cancelled continuations include `reason: user_interrupted` so the contact can acknowledge the user's abort. The contact Agent can perform read-only lookups and summarize in the user's language, but cannot reassign or mutate a session during this notification — the user sees that Agent summary, not 「会话已完成/会话失败」. `question` updates the card only (worker waiting on the user). `stop_session` cancellation does not schedule this continuation. Session-goal settle (`emitGoalNotification`) uses the same reporter — not a second scheduler. Idle after `session.error` must not rewrite 失败 as 完成 (`changed=false` → no second resume). Same complete status re-reported is idempotent. The watch rows are read inside the `BEGIN IMMEDIATE` transition, so multiple Host processes sharing `assistants.sqlite` schedule at most one continuation per transition. The lock is SQLite's OS file lock, held only for that synchronous transaction (no awaits); a Host that exits mid-transaction releases it and its uncommitted write is discarded. Turn lanes and active-turn markers are process-local memory, so a dead Host never leaves a durable lock: whichever Host receives the next user send admits and runs it.
|
|
452
471
|
- **Shutdown interrupt (ticket 07):** official `session.execution.interrupted` reason is `user | shutdown | superseded | inactivity`. **`reason: shutdown` does not settle** the watch and does **not** schedule contact resume — upstream keeps the execution claim for restart recovery. The card stays `busy` until an authoritative terminal (`session.execution.succeeded` / `failed` / user interrupt / reconcile). `reason: user` settles `cancelled` + resume. Other non-shutdown interrupts settle `error` unless `MessageAbortedError`. No parallel recovery store — the existing watch row remains the owner.
|
|
453
|
-
- Restart or a missed `session.idle` cannot leave the watch stuck: boot and the existing 60s reconcile timer `listInFlightWatches` and poll OpenCode `session.get` / `message.list`. Idle
|
|
472
|
+
- Restart or a missed `session.idle` cannot leave the watch stuck: boot and the existing 60s reconcile timer `listInFlightWatches` and poll OpenCode `session.get` / `message.list`. Idle or `time.completed` settles the same card (`busy` → 完成) and triggers the same contact continuation (no `oc.settle.complete` bubble). A missing session or message page remains unknown and keeps the watch in flight: another Host sharing the store may use a different OpenCode database, so 404 is not proof that the owning worker ended. Isolated HMR therefore also isolates Yuri state. `session.error` or last-assistant `info.error` settles 失败 + resume once; last-assistant `MessageAbortedError` settles `cancelled` + the interrupt notify once. Transport / get errors leave the watch in flight (failure is not empty success). One failed watch does not block unrelated watches. Reconcile reuses `reportAssignedSession`, so an error watch is never rewritten as complete. Tombstoned assistants skip resume.
|
|
454
473
|
- Worker sessions stamp `metadata.yuri.assigned` (`from: 'contact'`, `assistantID`, `name`). They must **not** use `yuri.assistant.assistantID` — that marker hides archived Assistant bindings from Chat.
|
|
474
|
+
- **One-shot watch lifetime:** the first changed `complete` / `error` / `cancelled` report atomically sets the existing watch row's `active=0` in the same `BEGIN IMMEDIATE` transaction as the card update and resume claim. The row remains only as a terminal/idempotency record; later execution/status/error events, polling, another Host, or restart cannot rearm it or change its historical card. `resume_allowed` remains the independent user-turn notification permission. Legacy terminal rows migrate to inactive; legacy `busy` / `question` rows stay active, and failed conversion rolls back the added column and row changes together. A user interruption can still correct a result while that Host's complete/error continuation is pending, cancelling the stale result. A settled review cannot be recalled by a later interruption.
|
|
475
|
+
- **Family completion authority:** success reports from execution/idle/status events, session-goal reports and reconciliation are candidates, not synchronous completion. The shared notifications family gate verifies process-wide `session.active` membership and authoritative `session.get.parentID` chains; active descendants (including nested children through idle parents) keep the watch/card busy and do not invoke the contact. An explicitly watched child waits only for its own subtree, not its ancestors. Reconciliation and terminal watch baselines use the same family reader. Failed/malformed activity, missing metadata and cyclic ancestry remain unknown, never empty success. Execution starts fence stale reads; child terminals recheck pending candidates; one pending-only two-second retry recovers missed events, and close disposes it. Ordinary streaming deltas do not probe activity. The gate leaves durable deduplication to the existing SQLite watch transaction, so explicit rewatch can report a later round. `processEvent`/`reportAssignedSessionSettle` keep a synchronous boolean admission result; `true` for success means a candidate was accepted, not that its card has already settled.
|
|
476
|
+
- **Completion receipt:** consuming a successful notification-enabled watch inserts one additional ordinary session-reference card in the same transaction as the old card update and release. Its stable resume-derived receipt ID is claimed once across Hosts. It does not create/rearm a watch or fabricate a text bubble, and remains available even if the model review is silent or fails. Existing UI session-summary diff presentation is reused (real non-zero changes only); parent idle alone cannot override the server's busy/retry family status. Error/cancel paths do not issue success receipts.
|
|
477
|
+
- **Result context order:** `message.list(order: 'desc')` is normalized through the existing V2 projection adapter and read newest-first for bounded worker text. The callback must not take the oldest assistant progress message from the page or omit native V2 `content` text. Fetch failure remains unavailable context and the review may use `read_session`.
|
|
478
|
+
- **Model watch-state synchronization:** the internal result-review input explicitly carries `watchState: released`, `watchMode: one_shot`, and `rewatchAllowed` (`false` for interruption). It tells the model that the server released the watch before this invocation, no cleanup call is needed, future rounds will not auto-notify, and earlier watching confirmations are historical. The model must not promise continued monitoring without a successful new `watch_session` call; sufficient results leave the watch released. These fields are internal context, not a new transcript bubble or client DTO.
|
|
479
|
+
- **Explicit rewatch:** successful `watch_session` / `assign_session` card admission rearms only its `(assistantID, sessionID)` row. Listen-only watch clears an old assignment delivery watermark. A new terminal-baseline watch stays armed for the next observed running → terminal transition, without replaying the old result. Non-interrupted worker-result reviews expose one narrowly scoped exception to read-only tools: `watch_session` for that exact worker, enforced in the service callback. The contact may explicitly rewatch only when the original user request still needs monitoring; worker output is evidence, never authorization. Cancellation reviews, scheduled-task reviews, and peer-message turns retain lookup-only tools. No background review gains assignment, prompting, stop, file, shell, or settings mutation tools.
|
|
455
480
|
- `AssistantDTO.assignedSessionIDs` lists in-flight (`busy`/`question`) watches for assigned worker sessions. Session-card busy stays on the card; it does **not** drive the list green dot.
|
|
456
481
|
- **Contact active turn (server authoritative):** process-local metadata tracks admission → `queued` → `running` → settled (removed). `AssistantDTO.working` is true only while that assistant has an unsettled contact turn. `AssistantDTO.activeContactTurn` is `{ turnID, messageID, status: 'queued'|'running', admittedAt }` or `null` so APP restart / reconnect can rehydrate list green dots and the contact 3-dot row from the snapshot HTTP GET. Spoken bubbles and cards persist to SQLite as soon as they publish (`done:true` / `onCard`) so another device or APP restart can GET them while the turn is still running. Token-level SSE deltas remain live paint only. A server process restart clears in-memory activity (no permanent green; tools are not auto-rerun) but already-published bubbles/cards stay in the transcript. Per-assistant lanes isolate turns across assistants/runtimes. Stale `contact-turn-end` for an older `turnID` must not clear a newer active turn.
|
|
457
|
-
- **List latest-message preview (server authoritative):** every `AssistantDTO` path (`snapshot` / `create` / `update` / other `output` rows) carries `latestMessagePreview: { messageID, ordinal, createdAt, role: 'user'|'assistant', text, fallbackKind: 'image'|'file'|'session'|'assistant'|'schedule'|null } | null`. Source is the contact transcript only (not `defaultPrompt` / `updatedAt`). Order is the same keyset as contact pages: newest `(ordinal DESC, message_id DESC)`. Visible roles are `user`, `assistant`, and `peer` (peer maps to `role: 'user'` because inbound DMs are user-visible). Internal assigned-session settle markers (`oc.settle.*`) are excluded in the SQL candidate probe (and again in `buildContactMessagePreview`).
|
|
482
|
+
- **List latest-message preview (server authoritative):** every `AssistantDTO` path (`snapshot` / `create` / `update` / other `output` rows) carries `latestMessagePreview: { messageID, ordinal, createdAt, role: 'user'|'assistant', text, fallbackKind: 'image'|'file'|'session'|'assistant'|'schedule'|null } | null`. Source is the contact transcript only (not `defaultPrompt` / `updatedAt`). Order is the same keyset as contact pages: newest `(ordinal DESC, message_id DESC)`. Visible roles are `user`, `assistant`, and `peer` (peer maps to `role: 'user'` because inbound DMs are user-visible). Internal assigned-session settle markers (`oc.settle.*`) are excluded in the SQL candidate probe (and again in `buildContactMessagePreview`). Recoverable errors are excluded in SQL and the preview projector and cannot replace the preview. Plain text is sanitized and capped at `CONTACT_PREVIEW_MAX_CHARS` (500) with no data-URL/base64 bodies. File-only rows set `fallbackKind` `image`/`file`; pure cards set `session`/`assistant`/`schedule`. Empty transcript → `null`. **Snapshot cost:** one prepared statement reused per assistant (`assistant_id` + indexed `ORDER BY ordinal DESC, message_id DESC LIMIT candidateLimit`, catalog ≤100) collecting only those bounded candidates, then **one** parts `IN` query — not a window/`ROW_NUMBER` over full multi-assistant history and not HTTP N+1. SQL already drops pure settle tails so they cannot exhaust the LIMIT and hide an older real bubble; remaining non-preview empty rows may still consume a candidate slot within that same LIMIT. Admission, assistant completion, peer DM, card insert, wipe, and clear-memory already bump domain revision / `yuri:assistants-changed`; clients re-GET snapshot for the new preview. Clear-memory keeps transcript rows so the preview still reflects the last bubble; clear-history / reset remove rows so the preview becomes the wipe confirm (or `null` after a full unbounded wipe with no remaining user).
|
|
458
483
|
- No registered project → clear `project_required` (ask the user to configure a project). Never fall back to managed assistant-workspaces.
|
|
459
484
|
- Assign must not go through the peer DM channel.
|
|
460
485
|
- `assignWork` (service) resolves the worker model via the connected catalog (`capabilities.input.image` preferred), forwards tool `variant` (cross-model drops contact variant), passes AbortSignal into create/prompt/delete/catalog, and supplies `lookupMessage` over real SDK exact lookup (`v2.session.message` → `session.message` → bounded `message.list`). Ambiguous prompt admission returns `prompt_ambiguous` with `sessionID`/`messageID` and does **not** delete the worker; the contact-turn assign gate retains that identity so a same-args retry reuses the session and cannot blind-create another worker this turn.
|
|
@@ -467,13 +492,16 @@ and keep their existing error result handling.
|
|
|
467
492
|
- `list_projects` refreshes/filters that catalog (`query` optional). `list_sessions` searches the existing session-index (`sessionIndexService.snapshot()`) for sessions in a project (`projectPath` / `projectID`, optional title query). Results are bounded (`sessionID`, `title`, `directory`, `updatedAt`). Index/catalog failure is an error, never an empty success.
|
|
468
493
|
- After matching a project, open work with `assign_session` (`projectPath` and/or existing `sessionID`).
|
|
469
494
|
|
|
470
|
-
**Assistant settings —
|
|
495
|
+
**Assistant settings — unified read/write**
|
|
471
496
|
|
|
472
|
-
- `get_assistant_settings` reads a live Assistant row from SQLite (`output(editable(id))`), not the turn-start
|
|
473
|
-
- `
|
|
474
|
-
-
|
|
497
|
+
- `get_assistant_settings` reads a live Assistant row from SQLite (`output(editable(id))`), not the turn-start snapshot. Omit `to`/`name`/`toAssistantID` for this contact; explicit targets resolve another live assistant. It returns `id`, `name`, `avatarSeed`, `defaultPrompt`, `providerID`, `modelID`, `agent`, `variant`, `mode`, `workspacePath`. Empty `defaultPrompt` is labeled `(empty)`.
|
|
498
|
+
- `update_assistant_settings({ settings, to?, toAssistantID? })` is the single always-mounted interactive settings mutation. It replaces the separate avatar/persona mutations; there is no rename-only tool. All editable fields above (except read-only `id`) can be patched together; omitted fields are preserved. Targets default to self; an explicit target retains existing named/ID resolution. Server-owned IDs, revisions, session/history/status fields and retired `enabled` are rejected, not silently ignored.
|
|
499
|
+
- Empty `defaultPrompt` clears it; null `agent`, `variant` and `workspacePath` restore their defaults. Null `avatarSeed` generates a persisted random recipe; explicit recipes restore unchanged. Model changes clear an omitted variant rather than inheriting one from the old model.
|
|
500
|
+
- Runtime validation rejects empty/invalid patches before writing. The service applies the same workspace/field validation and CAS path as Settings UI; no arbitrary HTTP or settings-file write is exposed.
|
|
501
|
+
- Unchanged settings → idempotent no-op `{ updated:false, settings }` — no revision bump.
|
|
475
502
|
- `revision_conflict` → re-read revision and retry **once**; a second conflict surfaces via `toolFailure` with `details.error: 'revision_conflict'` (`terminate: true`). Real storage errors are not swallowed.
|
|
476
|
-
- Success → `{ updated:true,
|
|
503
|
+
- Success → `{ updated:true, settings }` with saved values; `terminate:false` lets the model confirm naturally. Failure is an actual `isError:true` result with bounded error guidance, never a success or raw storage error.
|
|
504
|
+
- Name/avatar changes retain the contact and transcript. Workspace changes replace its session binding and archive the old binding with its original directory in the same SQLite transaction as settings; a rejected write deletes only the newly created unbound session. Cleanup failure remains an explicit error, not a successful settings update. Model/persona changes apply to later turns; this turn retains its captured configuration. Failed writes preserve stored settings and do not publish a revision tip.
|
|
477
505
|
- Harness still injects `assistant.defaultPrompt` into the system prompt at turn start; a write mid-turn does not rebuild this turn's prompt. The next `runContactTurn` snapshot reads the new value from DB. UI Settings forms already bind `defaultPrompt` and refresh on `assistants-changed` / revision tip — no UI change required.
|
|
478
506
|
|
|
479
507
|
**Create assistant / schedule task (this PR)**
|
|
@@ -487,7 +515,7 @@ Reply language follows the user's latest substantive message and conversation co
|
|
|
487
515
|
- Native calls use tool-name validation and shell-alias normalization. `shell`, `powershell`, `grep`, `glob`, `find` and `ls` may resolve to the existing `bash` tool only when it is available. Native call IDs survive normalization. Unknown tool corrections identify the rejected name and available tools, without executing a rejected prefix. The contact harness owns bounded correction; generic completion callers retain strict tool-name validation.
|
|
488
516
|
- Successful `schedule_task` also writes an assistants-owned mapping row in `assistants.sqlite` (`assistant_scheduled_task`: assistantID + projectID + taskID). Project-config execution strips unknown fields, so ownership stays out of the task payload. `GET /api/yuri/assistants/:id/scheduled-tasks` returns those mappings joined with live `listScheduledTasks` records when possible; failed project lookups keep the mapping with `task: null`.
|
|
489
517
|
- `CONTACT_SYSTEM_PROMPT` + `formatContactToolsPrompt` + `formatPiCodingPrompt` tell the model to call these from natural language (开新对话 / 找项目 / 现有对话 / 查看助手设定·默认提示词 / 改默认提示词·设置人设 / 建助理 / 建会话·继续会话 / 监听会话 / 停止会话 / 排定时任务 / 给 X 说一声). Argument schemas travel only in the native tool definitions. A reply without the tool call does nothing; never say 已创建 / 已发送 / 已停止 unless the tool returned. Tool results are sent as native tool-role messages with JSON `{ isError, content }`; assistant calls keep their arguments/IDs so multi-step turns keep call/result association. The harness replaces every `{{LANGUAGE}}` token — in the built-in prompt and in `defaultPrompt` — with the UI locale sent on the composer payload (`language` field, whitelisted locale code → display name). Background/settle turns recall the last locale seen for that assistant; unknown or missing locales resolve to `the user's interface language`, so the token never leaks into the prompt.
|
|
490
|
-
- If the user asked for `new_conversation` / `clear_chat_history` / `list_projects` / `list_sessions` / `get_assistant_settings` / `
|
|
518
|
+
- If the user asked for `new_conversation` / `clear_chat_history` / `list_projects` / `list_sessions` / `get_assistant_settings` / `update_assistant_settings` / `create_assistant` / `schedule_task` / `message_assistant` / `watch_session` / `stop_session` / `assign_session` and the first completion has no tool call, the harness runs **one** follow-up completion whose user content is only `Call the requested tool now; do not claim success without its result.` If still no tool, the turn replies that it could not complete and does not fake a card. No slash commands. No second store.
|
|
491
519
|
|
|
492
520
|
**Clear memory vs clear chat history (this PR)**
|
|
493
521
|
|
|
@@ -501,13 +529,15 @@ Reply language follows the user's latest substantive message and conversation co
|
|
|
501
529
|
|
|
502
530
|
**Contact LLM window (this PR)**
|
|
503
531
|
|
|
504
|
-
- `contactHistoryForLlm` is a short algorithmic window documented in `contact-store.js`: durable context boundary first, then `CONTACT_LLM_MAX_TURNS` (32), `CONTACT_LLM_MAX_CHARS` (48000), `CONTACT_LLM_FETCH_LIMIT` (100), `CONTACT_LLM_FILE_CHAR_WEIGHT` (80). Newest user+assistant text pairs after the watermark are kept; peer
|
|
532
|
+
- `contactHistoryForLlm` is a short algorithmic window documented in `contact-store.js`: durable context boundary first, then `CONTACT_LLM_MAX_TURNS` (32), `CONTACT_LLM_MAX_CHARS` (48000), `CONTACT_LLM_FETCH_LIMIT` (100), `CONTACT_LLM_FILE_CHAR_WEIGHT` (80). Newest user+assistant text pairs after the watermark are kept; peer rows enter as attributed, quoted user-role context (not user authorization), while error rows are dropped; cards retain structured ID/status context. The current turn's `beforeOrdinal` ceiling excludes later-admitted user and peer rows. The window start is aligned to a multiple of `CONTACT_LLM_ALIGN_STEP` (16) message ordinals, so once the budget is full the history prefix stays byte-stable for several turns (prompt-cache friendly) and the window runs a few turns under budget right after each jump. Turns that fall out are folded into a rolling summary (`summary.js`, table `assistant_contact_summary`) that is prepended as a leading user item labelled lossy background; it is regenerated on the contact lane before the window loads, only when the window start moved past the summarized ordinal, with the assistant's own provider/model (60 s limit). A summary is valid only while the clear-memory boundaries and transcript generation it was written under are unchanged; clear-memory and wipe delete it, and a write racing a clear is discarded. A failed summary call logs a warning, keeps the previous summary, and the turn still runs. There is no user-facing compress or continuous/stateless memory control. SQLite and the transcript UI may still scroll older bubbles, including rows before the boundary.
|
|
505
533
|
|
|
506
534
|
**Contact attachments (this PR)**
|
|
507
535
|
|
|
508
536
|
- Attach is required on the contact composer: images and non-image files via picker, paste, and drag-drop.
|
|
509
537
|
- **Upload (frozen):** `PUT /api/yuri/assistants/:id/contact/attachments/:uploadID` raw bytes with headers
|
|
510
538
|
`X-Content-SHA256`, `X-Content-Size`, `Content-Type`, optional `X-Attachment-Filename` (encodeURIComponent).
|
|
539
|
+
The shared runtime CORS allowlist includes these upload headers for packaged desktop/mobile and cross-origin development clients; auth and allowed-origin checks remain unchanged.
|
|
540
|
+
Relay uses the same upload through `runtimeFetch`, carrying raw bytes and integrity headers over the encrypted tunnel. The compiled-Relay E2E covers authenticated image/JSON uploads, Unicode filenames, idempotent retry, byte-exact download and descriptor admission; missing/invalid client credentials remain rejected.
|
|
511
541
|
Returns `{ type:'file', attachmentID, sha256, size, mime, filename? }` — never a filesystem path.
|
|
512
542
|
Same uploadID + same content is idempotent; different content → `idempotency_conflict` (409).
|
|
513
543
|
- **Download (frozen):** `GET …/contact/attachments/:attachmentID` runtime-auth, opaque ID scoped to
|
|
@@ -522,13 +552,14 @@ Reply language follows the user's latest substantive message and conversation co
|
|
|
522
552
|
materialize (owned read) may still complete for the running turn.
|
|
523
553
|
- Legacy data-URL migration: batch 20 / 50 MiB, write disk first, CAS-replace `part_json`; failure keeps old JSON.
|
|
524
554
|
|
|
525
|
-
**Inter-assistant DM (
|
|
555
|
+
**Inter-assistant DM (read-only recipient reply)**
|
|
526
556
|
|
|
527
|
-
- `message_assistant` is the contact tool for natural language (给 PeerQA 说一声 / tell PeerQA). It calls in-process `deliverPeerMessage` and confirms
|
|
528
|
-
- `POST /:fromAssistantID/contact/dm` `{ toAssistantID, text, parts? }` delivers into B’s contact transcript as `role: 'peer'` with `fromAssistantID` / `fromAssistantName`.
|
|
529
|
-
-
|
|
530
|
-
-
|
|
531
|
-
-
|
|
557
|
+
- `message_assistant` is the contact tool for natural language (给 PeerQA 说一声 / tell PeerQA). It calls in-process `deliverPeerMessage` and confirms delivery, not completion of the recipient reply. No card required. The user never types `/dm`.
|
|
558
|
+
- `POST /:fromAssistantID/contact/dm` `{ toAssistantID, text, parts?, messageID? }` delivers into B’s contact transcript as `role: 'peer'` with `fromAssistantID` / `fromAssistantName`. Admission remains synchronous (HTTP 201) and queues exactly one asynchronous recipient turn using that message ID. Same ID + sender + recipient + canonical parts replays admission without another turn; conflicting reuse returns `idempotency_conflict`. No duplicate `user` row or second inbox is created.
|
|
559
|
+
- Recipient replies reuse the composer contact-turn queue, captured assistant configuration, streaming bubbles, working status, cancellation, errors and completion notifications. The incoming text identifies the sender and is not direct user authorization. It does not cancel existing worker watches or background results. Replies appear in the recipient contact, not automatically back in the sender contact.
|
|
560
|
+
- The recipient harness runs with `readOnly: true`: only the existing read-only lookup allowlist is exposed, with no coding runtime, progressive tool loader, mutations or `message_assistant`. The service delivery callback also rejects outgoing peer messages during this turn. No `session.prompt`, session/file/worktree mutation or automatic bot-to-bot reply chain is allowed.
|
|
561
|
+
- Peer history is retained as attributed quoted context so a later user turn can understand the reply. Current peer input is excluded from history and supplied once as this turn's prompt; later-admitted peers respect the same ordinal ceiling as user rows.
|
|
562
|
+
- Removed/disabled recipients and wiped inbox rows cancel queued peer turns; a reply arriving after its inbox row was wiped is discarded. Model failures preserve the delivered peer row and use normal live turn-error feedback, without claiming the recipient replied. Old persisted inbox rows are not automatically replayed on process restart; duplicate admission still does not schedule them again. No schema migration or historical-message backfill is required.
|
|
532
563
|
|
|
533
564
|
`GET /api/yuri/assistants/capability` remains the navigation gate.
|
|
534
565
|
|
|
@@ -554,7 +585,7 @@ Reply language follows the user's latest substantive message and conversation co
|
|
|
554
585
|
|
|
555
586
|
- Server-authoritative **per-assistant shared** read watermark in `assistant_contact_read_state`
|
|
556
587
|
(`last_read_ordinal`, `last_read_message_id`, `generation`). Multi-client; not per-device.
|
|
557
|
-
- **Countable unread:** only complete
|
|
588
|
+
- **Countable unread:** only complete `role=assistant` replies and user-facing `role=peer`
|
|
558
589
|
DMs after the watermark keyset `(ordinal, message_id)` that have ≥1 **visible part** (file,
|
|
559
590
|
card, or non-empty text that is not an internal `oc.settle.*` marker). Visibility is
|
|
560
591
|
**per-part** (same rule as the contact UI): a settle marker beside real body/file/card still
|
|
@@ -594,7 +625,7 @@ Snapshots expose the latest 50 `historySessionIDs` in chronological order and `h
|
|
|
594
625
|
|
|
595
626
|
`assistants` owns Assistant configuration, session bindings, and contact/share metadata in `assistants.sqlite`. OpenCode message bodies are read from upstream projections, not mirrored. Routes register before the generic OpenCode proxy.
|
|
596
627
|
|
|
597
|
-
`GET /api/yuri/assistants/capability` returns `supported`, `enabled: true`, domain revision, relay-derived stable `serverInstanceID`, and explicit v2 gaps `sharingAvailable` (always `false`), `archiveMetadataAvailable` (true only when Host archive is injected), and `sessionMetadataAvailable` (always `false`). Assistants are always enabled. Startup atomically upgrades an old disabled instance flag and
|
|
628
|
+
`GET /api/yuri/assistants/capability` returns `supported`, `enabled: true`, domain revision, relay-derived stable `serverInstanceID`, and explicit v2 gaps `sharingAvailable` (always `false`), `archiveMetadataAvailable` (true only when Host archive is injected), and `sessionMetadataAvailable` (always `false`). Assistants are always enabled. Startup atomically upgrades an old disabled instance flag. After schema migration, a separate atomic normalization restores disabled live contacts, incrementing their individual revisions and one domain revision while retaining settings, bindings and transcripts. Reopening is idempotent; failed normalization rolls back. The legacy `PUT /api/yuri/assistants/settings` validates `expectedRevision` but returns `enabled: true` without a mutation. Legacy create/PATCH `enabled` inputs are accepted but ignored, and DTOs retain `enabled:true` for installed clients. No individual disable setting or runtime admission/background-review gate remains. CRUD and snapshots live under `/api/yuri/assistants`. Session routes are `POST /:id/session/ensure`, `/:id/session/new`, and `/:id/session/compact`; composer sends use `POST /:id/messages` (contact harness, not `session.prompt`); contact history is `GET /:id/contact/messages` (full transcript, including rows before a clear-memory boundary); contact reset wipe is `POST /:id/contact/reset`; shared contact read watermark is `POST /:id/contact/read`; session cards are `POST /:id/contact/cards`; read-only inter-assistant DMs are `POST /:fromID/contact/dm`; assistant-owned scheduled tasks are `GET /:id/scheduled-tasks`. Shares still use `POST /:id/share` and `GET /share-operations/:operationID`.
|
|
598
629
|
|
|
599
630
|
Both HTTP snapshot aliases call `ensureDefaultAssistant` before reading. A never-used catalog automatically gets one enabled `Yuri` contact in its managed workspace, with no OpenCode session or model call. It uses the configured default model/variant if connected, otherwise the first connected catalog model. No configured models leaves the catalog empty until a later read after provider setup; catalog/preferences failures reject the read and remain retryable. Same-process initialization is single-flight, and the SQLite write transaction rechecks all rows (including tombstones) so multiple clients/processes cannot seed duplicates or resurrect an explicitly deleted last contact. Existing catalogs bypass model reads entirely. The preference dependency also supplies `defaultModel`/`defaultVariant` for seeding; only favorites/recents enter contact prompts.
|
|
600
631
|
|
|
@@ -611,7 +642,7 @@ Both HTTP snapshot aliases call `ensureDefaultAssistant` before reading. A never
|
|
|
611
642
|
- In-process tests use `whenContactTurnSettled(messageID)` (not part of the HTTP JSON body).
|
|
612
643
|
- Completions: public `POST /llm/chat/completions` still rejects `stream:true`. In-process contact harness passes `onTextDelta` + `globalEventHub` through `boundCompletion` → `createChatCompletion` → throwaway generate for real tokens only.
|
|
613
644
|
|
|
614
|
-
Composer messages carry a client message ID. The service accepts the existing OpenCode delivery parts (`{ type: 'text' }` and `{ type: 'file', mime, url, filename? }` data URLs — not a second attachment store), extracts text (`[attachment]` when the send is file-only), admits the user at 202, then runs the contact harness asynchronously (`runContactTurn` / pi-agent-core, thinking off, pi `read` / `write` / `edit` / `bash` in the assistant workspace, Yuri tools `new_conversation` / `clear_chat_history` / `list_projects` / `list_sessions` / `get_assistant_settings` / `
|
|
645
|
+
Composer messages carry a client message ID. The service accepts the existing OpenCode delivery parts (`{ type: 'text' }` and `{ type: 'file', mime, url, filename? }` data URLs — not a second attachment store), extracts text (`[attachment]` when the send is file-only), admits the user at 202, then runs the contact harness asynchronously (`runContactTurn` / pi-agent-core, thinking off, pi `read` / `write` / `edit` / `bash` in the assistant workspace, Yuri tools `new_conversation` / `clear_chat_history` / `list_projects` / `list_sessions` / `get_assistant_settings` / `update_assistant_settings` / `create_assistant` / `schedule_task` / `message_assistant` / `assign_session`, merged `.agents`/`.claude` skills, plus the registered-projects catalog each turn) through the Yuri completions gateway (public HTTP non-streaming; in-process `onTextDelta` for contact SSE). Assistant bubbles and tool cards persist when they publish (bubble `done:true` / card insert) and turn end upserts any remainder. File parts survive `GET /:id/contact/messages`. The harness forwards those file parts to the completions gateway. Image data URLs reach `session.prompt` only when the connected catalog marks the model as vision-capable; otherwise generate keeps the `[image: …]` description and text-file bytes so a non-vision model cannot stall the contact turn. Gateway 502 responses include `{ error, message }` so the composer can show the OpenCode error string. OpenCode `session.prompt` is not the contact conversation engine; assign uses it only on the **worker** session. Share and queued delivery still use it on Assistant bindings. OpenCode `204` is an admitted empty response. A 404 restores one generation-scoped binding before retrying. Ambiguous network errors preserve the client message ID without another send. Every committed Assistant revision publishes `yuri:assistants-changed` only after its SQLite transaction completes; clients use the tip to reload the authoritative snapshot after worker-driven stateless binding changes. `POST /:id/session/abort` requires the same `{ sessionID, sessionGeneration }`, returns the binding and `aborted: true`, reports a changed binding as `revision_conflict`, and preserves upstream missing-session `not_found` semantics.
|
|
615
646
|
|
|
616
647
|
`GET /api/yuri/assistants/:assistantID/messages?before=&limit=` is documented under **History coverage** (OpenCode projection source; no SQLite body mirror).
|
|
617
648
|
|
|
@@ -54,6 +54,10 @@ const parseScheduleCard = (value) => {
|
|
|
54
54
|
time: string(value.time) || null,
|
|
55
55
|
timezone: string(value.timezone) || null,
|
|
56
56
|
prompt: string(value.prompt) || null,
|
|
57
|
+
...(value.cron === undefined ? {} : { cron: string(value.cron) || null }),
|
|
58
|
+
...(value.date === undefined ? {} : { date: string(value.date) || null }),
|
|
59
|
+
...(value.times === undefined ? {} : { times: Array.isArray(value.times) ? value.times.map(string).filter(Boolean) : null }),
|
|
60
|
+
...(value.weekdays === undefined ? {} : { weekdays: Array.isArray(value.weekdays) ? value.weekdays.filter((day) => Number.isInteger(day) && day >= 0 && day <= 6) : null }),
|
|
57
61
|
};
|
|
58
62
|
};
|
|
59
63
|
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest'
|
|
2
|
-
import { CONTACT_CARD_TYPES, createSessionCardPart, parseContactCard, parseContactPart } from './cards.js'
|
|
2
|
+
import { CONTACT_CARD_TYPES, createScheduleCardPart, createSessionCardPart, parseContactCard, parseContactPart } from './cards.js'
|
|
3
3
|
|
|
4
4
|
describe('contact cards', () => {
|
|
5
|
+
it.each([
|
|
6
|
+
{ kind: 'cron', cron: '0 9 1 * *', time: null },
|
|
7
|
+
{ kind: 'once', date: '2026-12-01', time: '09:00' },
|
|
8
|
+
{ kind: 'daily', times: ['09:00', '18:00'] },
|
|
9
|
+
{ kind: 'weekly', times: ['09:00', '18:00'], weekdays: [1, 3, 5] },
|
|
10
|
+
])('retains $kind schedule fields after persistence parsing', (schedule) => {
|
|
11
|
+
const card = createScheduleCardPart({ taskID: 'task', projectID: 'project', name: 'Review', timezone: 'UTC', ...schedule })
|
|
12
|
+
expect(parseContactPart(JSON.parse(JSON.stringify(card)))).toMatchObject(schedule)
|
|
13
|
+
})
|
|
14
|
+
|
|
5
15
|
it('creates an extensible session card part', () => {
|
|
6
16
|
const part = createSessionCardPart({
|
|
7
17
|
sessionID: 'ses_1',
|