@yuriai/web 0.2.29-beta.5 → 0.2.29-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/assets/{AssistantContactStatus-B67HXRUY.js → AssistantContactStatus-CgOdvIWb.js} +3 -3
  2. package/dist/assets/{AssistantUnreadBadge-Xz7kMLSv.js → AssistantUnreadBadge-DTMRKZCr.js} +1 -1
  3. package/dist/assets/{AssistantView-YVdgtBeh.js → AssistantView-uufzeb1u.js} +1 -1
  4. package/dist/assets/{DiagramView-DCrAY37j.js → DiagramView-IJ0lkLlX.js} +1 -1
  5. package/dist/assets/{GuiPluginSurface-u815jFNI.js → GuiPluginSurface-D_2lOySl.js} +1 -1
  6. package/dist/assets/{MarkdownRenderer-DZXM92vp.js → MarkdownRenderer-BG5J2mhU.js} +2 -2
  7. package/dist/assets/{MarkdownRendererImpl-BLzRLmeZ.js → MarkdownRendererImpl-eHz56xHD.js} +1 -1
  8. package/dist/assets/{MarkstreamRendererImpl-MqrsrtVx.js → MarkstreamRendererImpl-DchZmgl0.js} +1 -1
  9. package/dist/assets/{MobileDetailNavigation-CozkWJ5y.js → MobileDetailNavigation-1eLMIXsT.js} +1 -1
  10. package/dist/assets/{MobileShareBridge-yWj21Mpo.js → MobileShareBridge-gZSJfJFe.js} +1 -1
  11. package/dist/assets/{MobileTabPageHeader-BSbOGw3M.js → MobileTabPageHeader-DiMMm7-i.js} +1 -1
  12. package/dist/assets/{MultiRunWindow-BDh7FxgY.js → MultiRunWindow-DawaRhCU.js} +1 -1
  13. package/dist/assets/{SettingsView-C1dLufb0.js → SettingsView-iZoHP7ZH.js} +1 -1
  14. package/dist/assets/{SettingsWindow-DZFZJ8PI.js → SettingsWindow-DcOkFGsW.js} +1 -1
  15. package/dist/assets/{TerminalView-2DhtuWTv.js → TerminalView-Cy-KXoO8.js} +1 -1
  16. package/dist/assets/{ToolOutputDialog-COWWhGPD.js → ToolOutputDialog-CMYmDCR4.js} +1 -1
  17. package/dist/assets/{appThemeRegistry-CPa7wDcf.js → appThemeRegistry-DeWACE9-.js} +1 -1
  18. package/dist/assets/{capgoAdapter-CQz-vZo-.js → capgoAdapter-7QGwb_Ft.js} +1 -1
  19. package/dist/assets/{gitApi-CXkfrI_H.js → gitApi-7_CLu286.js} +1 -1
  20. package/dist/assets/{insertionBoundaries-CmxtGojv.js → insertionBoundaries-MbOUMCNs.js} +1 -1
  21. package/dist/assets/{main-CJAnB1m1.js → main-CDhqjr2O.js} +4 -4
  22. package/dist/assets/{main-DuN735GT.js → main-DIWLptmb.js} +2 -2
  23. package/dist/assets/{mcpQueries-Ls770ehB.js → mcpQueries-ZP9RYRpN.js} +1 -1
  24. package/dist/assets/{miniChat-BibI1YhA.js → miniChat-CUOtrJxd.js} +2 -2
  25. package/dist/assets/{mobile-DNvOl_GU.js → mobile-BTUerqBN.js} +2 -2
  26. package/dist/assets/{mobileBackNavigation-CXfKEN3p.js → mobileBackNavigation-DFGZEe-t.js} +1 -1
  27. package/dist/assets/{multirun-CicU-KQt.js → multirun-Bm50cLcf.js} +1 -1
  28. package/dist/assets/{native-config-BHa0LfdJ.js → native-config-DPpUUZUE.js} +1 -1
  29. package/dist/assets/{projectMeta-D3GYq5jV.js → projectMeta-BJmwM0K0.js} +1 -1
  30. package/dist/assets/{queue-abort-optimistic-DRJa-BrH.js → queue-abort-optimistic-mL8MaoCr.js} +1 -1
  31. package/dist/assets/{readiness-lO-fOlzd.js → readiness-ZMfy8K84.js} +1 -1
  32. package/dist/assets/{renderElectronMiniChatApp-DnzgZv3d.js → renderElectronMiniChatApp-1hIEJ9QD.js} +2 -2
  33. package/dist/assets/{renderMobileApp-DLFGqfxp.js → renderMobileApp-DtZxMBPw.js} +4 -4
  34. package/dist/assets/{runtimeConfig-Be6cMHuS.js → runtimeConfig-pLw4gnz5.js} +1 -1
  35. package/dist/assets/{runtimeEndpointReset-DeWcqIyJ.js → runtimeEndpointReset-5JI5Tj-e.js} +3 -3
  36. package/dist/assets/{sessionLookup-qvz-n65R.js → sessionLookup-8R_5W-vC.js} +1 -1
  37. package/dist/assets/{speechSettingsQueries-CsCKPsRU.js → speechSettingsQueries-HRIksqYz.js} +1 -1
  38. package/dist/assets/{types-CTkS0uZU.js → types-YPHToBnK.js} +1 -1
  39. package/dist/assets/{useAppFontEffects-Cs_0mUpl.js → useAppFontEffects-B1m1Chi0.js} +5 -5
  40. package/dist/assets/{useDesktopWindowControlsLayout-avf-_JWZ.js → useDesktopWindowControlsLayout-BTfHr7J0.js} +1 -1
  41. package/dist/assets/{useEffectiveDirectory-esZ8PL08.js → useEffectiveDirectory-Yn0r_C4_.js} +1 -1
  42. package/dist/assets/{useMobileNavigationStore-9lAGHZos.js → useMobileNavigationStore-BA7xNhOy.js} +4 -4
  43. package/dist/assets/{useWorkerHighlightedLines-BxqdOw1S.js → useWorkerHighlightedLines-CmzpUaxp.js} +1 -1
  44. package/dist/index.html +5 -5
  45. package/dist/mini-chat.html +5 -5
  46. package/dist/mobile.html +5 -5
  47. package/package.json +1 -1
  48. package/server/lib/opencode/DOCUMENTATION.md +1 -0
  49. package/server/lib/opencode/static-routes-runtime.js +5 -3
  50. package/server/lib/opencode/static-routes-runtime.test.js +23 -10
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-CzHs0bHY.js";import{y as r}from"./useUIStore-BDZCXouA.js";import{n as i}from"./vendor-react-DlzBev0S.js";import{f as a,r as o,t as s}from"./button-BF2cNEuq.js";import{n as c}from"./useThemeSystem-CNzUUkFn.js";import{n as l}from"./Icon-CLLDJn-P.js";import{n as u}from"./MarkdownRenderer-DZXM92vp.js";import{n as d,r as f}from"./toolHelpers-iEHVHQ9p.js";import{n as p}from"./markdownTheme-CHNl6tUv.js";import{n as m,t as h}from"./markdown-worker-oBGEB9Eg.js";var g=e(n(),1),_=i(),v=t(),y=e=>e===`in_progress`||e===`completed`||e===`cancelled`?e:`pending`,b=e=>e.status===`completed`||e.status===`cancelled`,x={in_progress:`chat.statusRow.todo.status.inProgress`,pending:`chat.statusRow.todo.status.pending`,completed:`chat.statusRow.todo.status.completed`,cancelled:`chat.statusRow.todo.status.cancelled`},S={in_progress:`text-foreground`,pending:`text-muted-foreground/60`,completed:`text-muted-foreground`,cancelled:`text-muted-foreground/60`},C={in_progress:`text-foreground`,pending:`text-muted-foreground`,completed:`text-muted-foreground/60 line-through decoration-1`,cancelled:`text-muted-foreground/60 line-through decoration-1`},w=1.2,T=24,E=`1 1`,D=e=>{let t=(0,_.c)(23),{status:n,className:r}=e,{t:i}=a(),s=x[n],c;t[0]!==i||t[1]!==s?(c=i(s),t[0]=i,t[1]=s,t[2]=c):c=t[2];let l=S[n],u;t[3]!==r||t[4]!==l?(u=o(`size-[1em] shrink-0 transition-colors duration-300`,l,r),t[3]=r,t[4]=l,t[5]=u):u=t[5];let d=n===`pending`?w:void 0,f=n===`pending`?T:void 0,p=n===`pending`?E:void 0,m;t[6]!==d||t[7]!==f||t[8]!==p?(m=(0,v.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6.5`,stroke:`currentColor`,strokeWidth:d,pathLength:f,strokeDasharray:p}),t[6]=d,t[7]=f,t[8]=p,t[9]=m):m=t[9];let h;t[10]===n?h=t[11]:(h=n===`in_progress`?(0,v.jsx)(`path`,{d:`M4.8 8h6.4M8.6 5.4 11.2 8l-2.6 2.6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}):null,t[10]=n,t[11]=h);let g;t[12]===n?g=t[13]:(g=n===`completed`?(0,v.jsx)(`path`,{d:`M5 8 7.5 11 11 5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}):null,t[12]=n,t[13]=g);let y;t[14]===n?y=t[15]:(y=n===`cancelled`?(0,v.jsx)(`path`,{d:`M3.5 12.5 12.5 3.5`,stroke:`currentColor`}):null,t[14]=n,t[15]=y);let b;return t[16]!==g||t[17]!==y||t[18]!==c||t[19]!==u||t[20]!==m||t[21]!==h?(b=(0,v.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,role:`img`,"aria-label":c,className:u,children:[m,h,g,y]}),t[16]=g,t[17]=y,t[18]=c,t[19]=u,t[20]=m,t[21]=h,t[22]=b):b=t[22],b},O=3.2,k=e=>{let t=Math.PI*2*e,n=8+O*Math.sin(t),r=8-O*Math.cos(t);return`M8 8 L8 4.8 A${O} ${O} 0 ${+(e>.5)} 1 ${n.toFixed(3)} ${r.toFixed(3)} Z`},A=e=>{let t=(0,_.c)(11),{done:n,total:r,spinning:i,className:a}=e,s=n===void 0?0:n,c=r===void 0?0:r,l=i!==void 0&&i,u=c>0?Math.min(1,s/c):0,d;t[0]===a?d=t[1]:(d=o(`size-[1.15em] shrink-0 text-foreground`,a),t[0]=a,t[1]=d);let f=l?`yuri-todo-spin`:void 0,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p={transformBox:`fill-box`,transformOrigin:`center`},t[2]=p):p=t[2];let m;t[3]===f?m=t[4]:(m=(0,v.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6.5`,stroke:`currentColor`,strokeWidth:w,pathLength:T,strokeDasharray:E,className:f,style:p}),t[3]=f,t[4]=m);let h;t[5]===u?h=t[6]:(h=u>0?(0,v.jsx)(`path`,{d:k(u),fill:`currentColor`,className:`transition-opacity duration-300`}):null,t[5]=u,t[6]=h);let g;return t[7]!==d||t[8]!==m||t[9]!==h?(g=(0,v.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,className:d,children:[m,h]}),t[7]=d,t[8]=m,t[9]=h,t[10]=g):g=t[10],g},j=({done:e,total:t,className:n,animate:r=!0})=>{let i=g.useRef(e),a=r&&i.current!==e;return g.useEffect(()=>{i.current=e},[e]),(0,v.jsxs)(`span`,{className:o(`shrink-0 tabular-nums`,n),children:[(0,v.jsx)(`span`,{className:o(a&&`yuri-todo-count-tick`),children:e},e),`/${t}`]})},ee=e=>{let t=(0,_.c)(5),{className:n}=e,r;t[0]===n?r=t[1]:(r=o(`flex size-[1.15em] shrink-0 items-center justify-center rounded-full bg-[var(--status-success)] text-[var(--status-success-foreground)]`,n),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,v.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,className:`size-[70%]`,children:(0,v.jsx)(`path`,{d:`M4.5 8.2 7 10.8 11.5 5.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})}),t[2]=i):i=t[2];let a;return t[3]===r?a=t[4]:(a=(0,v.jsx)(`span`,{"data-todo-complete":!0,className:r,children:i}),t[3]=r,t[4]=a),a},M=e=>{let t=(0,_.c)(27),{todos:n,isWorking:r,animate:i,className:s,rowClassName:c,listRef:l,id:u}=e,d=r!==void 0&&r,f=i!==void 0&&i,{t:p}=a(),m=n.findIndex(N),h;t[0]!==m||t[1]!==n?(h=m>=0?m:n.findIndex(P),t[0]=m,t[1]=n,t[2]=h):h=t[2];let g=h,b;t[3]===n?b=t[4]:(b=n.some(F),t[3]=n,t[4]=b);let S=b,w;t[5]===s?w=t[6]:(w=o(`m-0 flex min-w-0 list-none flex-col gap-[0.125em] p-0`,s),t[5]=s,t[6]=w);let T;if(t[7]!==g||t[8]!==f||t[9]!==S||t[10]!==d||t[11]!==c||t[12]!==p||t[13]!==n){let e;t[15]!==g||t[16]!==f||t[17]!==S||t[18]!==d||t[19]!==c||t[20]!==p?(e=(e,t)=>{let n=y(e.status),r=d&&!S&&t===g&&n===`pending`?`in_progress`:n;return(0,v.jsxs)(`li`,{"data-status":r,"aria-current":t===g?`step`:void 0,className:o(`grid min-w-0 shrink-0 grid-cols-[auto_minmax(0,1fr)] items-start py-[0.25em]`,c??`gap-[0.6em] px-[0.5em]`,f&&`yuri-todo-row-in`),children:[(0,v.jsx)(`span`,{className:o(`flex h-[1.32em] w-[1.15em] items-center justify-center`,f&&`yuri-todo-icon-pop`),title:p(x[r]),children:(0,v.jsx)(D,{status:r})},r),(0,v.jsx)(`span`,{dir:`auto`,title:e.content,className:o(`line-clamp-3 min-w-0 whitespace-normal text-[0.88em] break-words leading-[1.5] transition-colors duration-300`,C[r]),children:(0,v.jsx)(`span`,{className:o(r===`in_progress`&&`animate-text-shimmer`),children:e.content})})]},e.id??`${t}:${e.content}`)},t[15]=g,t[16]=f,t[17]=S,t[18]=d,t[19]=c,t[20]=p,t[21]=e):e=t[21],T=n.map(e),t[7]=g,t[8]=f,t[9]=S,t[10]=d,t[11]=c,t[12]=p,t[13]=n,t[14]=T}else T=t[14];let E;return t[22]!==u||t[23]!==l||t[24]!==w||t[25]!==T?(E=(0,v.jsx)(`ul`,{id:u,ref:l,className:w,children:T}),t[22]=u,t[23]=l,t[24]=w,t[25]=T,t[26]=E):E=t[26],E};function N(e){return e.status===`in_progress`}function P(e){return e.status===`pending`}function F(e){return e.status===`in_progress`}var I=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),L=e=>e?Object.entries(e).map(([e,t])=>t==null?``:`${e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${typeof t==`number`?`${t}px`:t};`).join(``):``,R=(e,t,n)=>{let r=e.querySelector(`pre`);r&&(r.style.margin=`0`,r.style.background=`transparent`,r.style.whiteSpace=t?`pre-wrap`:`pre`,t&&(r.style.wordBreak=`break-word`,r.style.overflowWrap=`break-word`));let i=e.querySelector(`code`);if(i){let e=L(n);e&&i.setAttribute(`style`,`${i.getAttribute(`style`)??``}${e}`)}},z=e=>`<pre><code>${I(e)}</code></pre>`,B=e=>{let t=(0,_.c)(21),{code:n,language:r,className:i,style:a,codeStyle:s,wrap:l}=e,u=l!==void 0&&l,{currentTheme:d}=c(),f=g.useRef(null),m;t[0]===d?m=t[1]:(m=p(d),t[0]=d,t[1]=m);let y=m,b,x;t[2]!==n||t[3]!==s||t[4]!==u?(b=()=>{let e=f.current;e&&(e.innerHTML=z(n),R(e,u,s))},x=[n,u,s],t[2]=n,t[3]=s,t[4]=u,t[5]=b,t[6]=x):(b=t[5],x=t[6]),g.useLayoutEffect(b,x);let S,C;t[7]!==n||t[8]!==s||t[9]!==r||t[10]!==u?(S=()=>{let e=f.current;if(!e)return;let t=!0,i=new AbortController;return h(n,(r||`text`).toLowerCase(),{signal:i.signal,priority:`visible`}).then(n=>{!t||!e||!n||(e.innerHTML=n,R(e,u,s))}),()=>{t=!1,i.abort()}},C=[n,r,u,s],t[7]=n,t[8]=s,t[9]=r,t[10]=u,t[11]=S,t[12]=C):(S=t[11],C=t[12]),g.useEffect(S,C);let w;t[13]===i?w=t[14]:(w=o(`typography-code`,i),t[13]=i,t[14]=w);let T=y,E;t[15]!==a||t[16]!==T?(E={...T,...a},t[15]=a,t[16]=T,t[17]=E):E=t[17];let D;return t[18]!==w||t[19]!==E?(D=(0,v.jsx)(`div`,{ref:f,className:w,style:E}),t[18]=w,t[19]=E,t[20]=D):D=t[20],D},V=e=>{let t=e.replace(/^<file>\s*\n?/,``).replace(/\n?<\/file>\s*$/,``);return t=t.replace(/^\s*\d{5}\|\s?/gm,``),t.trim()},H=(e,t=``)=>{if(typeof e==`string`)return e;if(e==null)return t;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);try{return JSON.stringify(e)}catch{return t}},U=e=>e?e.includes(`<diagnostics`)||e.includes(`<file_diagnostics>`)||e.includes(`LSP errors detected`)||e.includes(`This file has errors`):!1,W=e=>e?e.replace(/\n{0,2}LSP errors detected[\s\S]*?<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/\n{0,2}This file has errors[\s\S]*?<\/file_diagnostics>/g,``).replace(/<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/<file_diagnostics>[\s\S]*?<\/file_diagnostics>/g,``).trim():``,G=(e,t)=>!e||typeof e!=`object`?String(e):f(e,t||``),K=e=>{if(typeof e==`string`){let t=e.trim();return t.length>0?t:void 0}if(e&&typeof e==`object`){let t=e.patch;if(typeof t==`string`){let e=t.trim();return e.length>0?e:void 0}}},q=e=>{if(!e||typeof e!=`object`)return;let t=K(e.patch)??K(e.diff);if(t)return t;let n=Array.isArray(e.files)?e.files:[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=K(e.patch)??K(e.diff);if(t)return t}},J=e=>{if(!e||typeof e!=`string`)return{data:null,isJson:!1};let t=e.trim();if(!t.startsWith(`{`)&&!t.startsWith(`[`)||!t.endsWith(`}`)&&!t.endsWith(`]`)||t.length<2)return{data:null,isJson:!1};try{let e=JSON.parse(t);return typeof e==`object`&&e?{data:e,isJson:!0}:{data:null,isJson:!1}}catch{return{data:null,isJson:!1}}},Y=(e,t,n)=>{let r=V(e);if((t===`edit`||t===`multiedit`||t===`write`||t===`apply_patch`)&&U(r)&&(r=W(r)),(t===`edit`||t===`multiedit`||t===`apply_patch`)&&r.trim().length===0){let e=q(n);if(e)return e}return r},X=e=>{let t=e.match(/<type>(file|directory)<\/type>/i)?.[1]?.toLowerCase()??`unknown`,n=(e.match(/<content>([\s\S]*?)<\/content>/i)?.[1]??e).replace(/\r\n/g,`
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-CzHs0bHY.js";import{y as r}from"./useUIStore-BDZCXouA.js";import{n as i}from"./vendor-react-DlzBev0S.js";import{f as a,r as o,t as s}from"./button-BF2cNEuq.js";import{n as c}from"./useThemeSystem-CNzUUkFn.js";import{n as l}from"./Icon-CLLDJn-P.js";import{n as u}from"./MarkdownRenderer-BG5J2mhU.js";import{n as d,r as f}from"./toolHelpers-iEHVHQ9p.js";import{n as p}from"./markdownTheme-CHNl6tUv.js";import{n as m,t as h}from"./markdown-worker-oBGEB9Eg.js";var g=e(n(),1),_=i(),v=t(),y=e=>e===`in_progress`||e===`completed`||e===`cancelled`?e:`pending`,b=e=>e.status===`completed`||e.status===`cancelled`,x={in_progress:`chat.statusRow.todo.status.inProgress`,pending:`chat.statusRow.todo.status.pending`,completed:`chat.statusRow.todo.status.completed`,cancelled:`chat.statusRow.todo.status.cancelled`},S={in_progress:`text-foreground`,pending:`text-muted-foreground/60`,completed:`text-muted-foreground`,cancelled:`text-muted-foreground/60`},C={in_progress:`text-foreground`,pending:`text-muted-foreground`,completed:`text-muted-foreground/60 line-through decoration-1`,cancelled:`text-muted-foreground/60 line-through decoration-1`},w=1.2,T=24,E=`1 1`,D=e=>{let t=(0,_.c)(23),{status:n,className:r}=e,{t:i}=a(),s=x[n],c;t[0]!==i||t[1]!==s?(c=i(s),t[0]=i,t[1]=s,t[2]=c):c=t[2];let l=S[n],u;t[3]!==r||t[4]!==l?(u=o(`size-[1em] shrink-0 transition-colors duration-300`,l,r),t[3]=r,t[4]=l,t[5]=u):u=t[5];let d=n===`pending`?w:void 0,f=n===`pending`?T:void 0,p=n===`pending`?E:void 0,m;t[6]!==d||t[7]!==f||t[8]!==p?(m=(0,v.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6.5`,stroke:`currentColor`,strokeWidth:d,pathLength:f,strokeDasharray:p}),t[6]=d,t[7]=f,t[8]=p,t[9]=m):m=t[9];let h;t[10]===n?h=t[11]:(h=n===`in_progress`?(0,v.jsx)(`path`,{d:`M4.8 8h6.4M8.6 5.4 11.2 8l-2.6 2.6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}):null,t[10]=n,t[11]=h);let g;t[12]===n?g=t[13]:(g=n===`completed`?(0,v.jsx)(`path`,{d:`M5 8 7.5 11 11 5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}):null,t[12]=n,t[13]=g);let y;t[14]===n?y=t[15]:(y=n===`cancelled`?(0,v.jsx)(`path`,{d:`M3.5 12.5 12.5 3.5`,stroke:`currentColor`}):null,t[14]=n,t[15]=y);let b;return t[16]!==g||t[17]!==y||t[18]!==c||t[19]!==u||t[20]!==m||t[21]!==h?(b=(0,v.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,role:`img`,"aria-label":c,className:u,children:[m,h,g,y]}),t[16]=g,t[17]=y,t[18]=c,t[19]=u,t[20]=m,t[21]=h,t[22]=b):b=t[22],b},O=3.2,k=e=>{let t=Math.PI*2*e,n=8+O*Math.sin(t),r=8-O*Math.cos(t);return`M8 8 L8 4.8 A${O} ${O} 0 ${+(e>.5)} 1 ${n.toFixed(3)} ${r.toFixed(3)} Z`},A=e=>{let t=(0,_.c)(11),{done:n,total:r,spinning:i,className:a}=e,s=n===void 0?0:n,c=r===void 0?0:r,l=i!==void 0&&i,u=c>0?Math.min(1,s/c):0,d;t[0]===a?d=t[1]:(d=o(`size-[1.15em] shrink-0 text-foreground`,a),t[0]=a,t[1]=d);let f=l?`yuri-todo-spin`:void 0,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p={transformBox:`fill-box`,transformOrigin:`center`},t[2]=p):p=t[2];let m;t[3]===f?m=t[4]:(m=(0,v.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6.5`,stroke:`currentColor`,strokeWidth:w,pathLength:T,strokeDasharray:E,className:f,style:p}),t[3]=f,t[4]=m);let h;t[5]===u?h=t[6]:(h=u>0?(0,v.jsx)(`path`,{d:k(u),fill:`currentColor`,className:`transition-opacity duration-300`}):null,t[5]=u,t[6]=h);let g;return t[7]!==d||t[8]!==m||t[9]!==h?(g=(0,v.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,className:d,children:[m,h]}),t[7]=d,t[8]=m,t[9]=h,t[10]=g):g=t[10],g},j=({done:e,total:t,className:n,animate:r=!0})=>{let i=g.useRef(e),a=r&&i.current!==e;return g.useEffect(()=>{i.current=e},[e]),(0,v.jsxs)(`span`,{className:o(`shrink-0 tabular-nums`,n),children:[(0,v.jsx)(`span`,{className:o(a&&`yuri-todo-count-tick`),children:e},e),`/${t}`]})},ee=e=>{let t=(0,_.c)(5),{className:n}=e,r;t[0]===n?r=t[1]:(r=o(`flex size-[1.15em] shrink-0 items-center justify-center rounded-full bg-[var(--status-success)] text-[var(--status-success-foreground)]`,n),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,v.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,className:`size-[70%]`,children:(0,v.jsx)(`path`,{d:`M4.5 8.2 7 10.8 11.5 5.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})}),t[2]=i):i=t[2];let a;return t[3]===r?a=t[4]:(a=(0,v.jsx)(`span`,{"data-todo-complete":!0,className:r,children:i}),t[3]=r,t[4]=a),a},M=e=>{let t=(0,_.c)(27),{todos:n,isWorking:r,animate:i,className:s,rowClassName:c,listRef:l,id:u}=e,d=r!==void 0&&r,f=i!==void 0&&i,{t:p}=a(),m=n.findIndex(N),h;t[0]!==m||t[1]!==n?(h=m>=0?m:n.findIndex(P),t[0]=m,t[1]=n,t[2]=h):h=t[2];let g=h,b;t[3]===n?b=t[4]:(b=n.some(F),t[3]=n,t[4]=b);let S=b,w;t[5]===s?w=t[6]:(w=o(`m-0 flex min-w-0 list-none flex-col gap-[0.125em] p-0`,s),t[5]=s,t[6]=w);let T;if(t[7]!==g||t[8]!==f||t[9]!==S||t[10]!==d||t[11]!==c||t[12]!==p||t[13]!==n){let e;t[15]!==g||t[16]!==f||t[17]!==S||t[18]!==d||t[19]!==c||t[20]!==p?(e=(e,t)=>{let n=y(e.status),r=d&&!S&&t===g&&n===`pending`?`in_progress`:n;return(0,v.jsxs)(`li`,{"data-status":r,"aria-current":t===g?`step`:void 0,className:o(`grid min-w-0 shrink-0 grid-cols-[auto_minmax(0,1fr)] items-start py-[0.25em]`,c??`gap-[0.6em] px-[0.5em]`,f&&`yuri-todo-row-in`),children:[(0,v.jsx)(`span`,{className:o(`flex h-[1.32em] w-[1.15em] items-center justify-center`,f&&`yuri-todo-icon-pop`),title:p(x[r]),children:(0,v.jsx)(D,{status:r})},r),(0,v.jsx)(`span`,{dir:`auto`,title:e.content,className:o(`line-clamp-3 min-w-0 whitespace-normal text-[0.88em] break-words leading-[1.5] transition-colors duration-300`,C[r]),children:(0,v.jsx)(`span`,{className:o(r===`in_progress`&&`animate-text-shimmer`),children:e.content})})]},e.id??`${t}:${e.content}`)},t[15]=g,t[16]=f,t[17]=S,t[18]=d,t[19]=c,t[20]=p,t[21]=e):e=t[21],T=n.map(e),t[7]=g,t[8]=f,t[9]=S,t[10]=d,t[11]=c,t[12]=p,t[13]=n,t[14]=T}else T=t[14];let E;return t[22]!==u||t[23]!==l||t[24]!==w||t[25]!==T?(E=(0,v.jsx)(`ul`,{id:u,ref:l,className:w,children:T}),t[22]=u,t[23]=l,t[24]=w,t[25]=T,t[26]=E):E=t[26],E};function N(e){return e.status===`in_progress`}function P(e){return e.status===`pending`}function F(e){return e.status===`in_progress`}var I=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),L=e=>e?Object.entries(e).map(([e,t])=>t==null?``:`${e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${typeof t==`number`?`${t}px`:t};`).join(``):``,R=(e,t,n)=>{let r=e.querySelector(`pre`);r&&(r.style.margin=`0`,r.style.background=`transparent`,r.style.whiteSpace=t?`pre-wrap`:`pre`,t&&(r.style.wordBreak=`break-word`,r.style.overflowWrap=`break-word`));let i=e.querySelector(`code`);if(i){let e=L(n);e&&i.setAttribute(`style`,`${i.getAttribute(`style`)??``}${e}`)}},z=e=>`<pre><code>${I(e)}</code></pre>`,B=e=>{let t=(0,_.c)(21),{code:n,language:r,className:i,style:a,codeStyle:s,wrap:l}=e,u=l!==void 0&&l,{currentTheme:d}=c(),f=g.useRef(null),m;t[0]===d?m=t[1]:(m=p(d),t[0]=d,t[1]=m);let y=m,b,x;t[2]!==n||t[3]!==s||t[4]!==u?(b=()=>{let e=f.current;e&&(e.innerHTML=z(n),R(e,u,s))},x=[n,u,s],t[2]=n,t[3]=s,t[4]=u,t[5]=b,t[6]=x):(b=t[5],x=t[6]),g.useLayoutEffect(b,x);let S,C;t[7]!==n||t[8]!==s||t[9]!==r||t[10]!==u?(S=()=>{let e=f.current;if(!e)return;let t=!0,i=new AbortController;return h(n,(r||`text`).toLowerCase(),{signal:i.signal,priority:`visible`}).then(n=>{!t||!e||!n||(e.innerHTML=n,R(e,u,s))}),()=>{t=!1,i.abort()}},C=[n,r,u,s],t[7]=n,t[8]=s,t[9]=r,t[10]=u,t[11]=S,t[12]=C):(S=t[11],C=t[12]),g.useEffect(S,C);let w;t[13]===i?w=t[14]:(w=o(`typography-code`,i),t[13]=i,t[14]=w);let T=y,E;t[15]!==a||t[16]!==T?(E={...T,...a},t[15]=a,t[16]=T,t[17]=E):E=t[17];let D;return t[18]!==w||t[19]!==E?(D=(0,v.jsx)(`div`,{ref:f,className:w,style:E}),t[18]=w,t[19]=E,t[20]=D):D=t[20],D},V=e=>{let t=e.replace(/^<file>\s*\n?/,``).replace(/\n?<\/file>\s*$/,``);return t=t.replace(/^\s*\d{5}\|\s?/gm,``),t.trim()},H=(e,t=``)=>{if(typeof e==`string`)return e;if(e==null)return t;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);try{return JSON.stringify(e)}catch{return t}},U=e=>e?e.includes(`<diagnostics`)||e.includes(`<file_diagnostics>`)||e.includes(`LSP errors detected`)||e.includes(`This file has errors`):!1,W=e=>e?e.replace(/\n{0,2}LSP errors detected[\s\S]*?<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/\n{0,2}This file has errors[\s\S]*?<\/file_diagnostics>/g,``).replace(/<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/<file_diagnostics>[\s\S]*?<\/file_diagnostics>/g,``).trim():``,G=(e,t)=>!e||typeof e!=`object`?String(e):f(e,t||``),K=e=>{if(typeof e==`string`){let t=e.trim();return t.length>0?t:void 0}if(e&&typeof e==`object`){let t=e.patch;if(typeof t==`string`){let e=t.trim();return e.length>0?e:void 0}}},q=e=>{if(!e||typeof e!=`object`)return;let t=K(e.patch)??K(e.diff);if(t)return t;let n=Array.isArray(e.files)?e.files:[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=K(e.patch)??K(e.diff);if(t)return t}},J=e=>{if(!e||typeof e!=`string`)return{data:null,isJson:!1};let t=e.trim();if(!t.startsWith(`{`)&&!t.startsWith(`[`)||!t.endsWith(`}`)&&!t.endsWith(`]`)||t.length<2)return{data:null,isJson:!1};try{let e=JSON.parse(t);return typeof e==`object`&&e?{data:e,isJson:!0}:{data:null,isJson:!1}}catch{return{data:null,isJson:!1}}},Y=(e,t,n)=>{let r=V(e);if((t===`edit`||t===`multiedit`||t===`write`||t===`apply_patch`)&&U(r)&&(r=W(r)),(t===`edit`||t===`multiedit`||t===`apply_patch`)&&r.trim().length===0){let e=q(n);if(e)return e}return r},X=e=>{let t=e.match(/<type>(file|directory)<\/type>/i)?.[1]?.toLowerCase()??`unknown`,n=(e.match(/<content>([\s\S]*?)<\/content>/i)?.[1]??e).replace(/\r\n/g,`
2
2
  `).split(`
3
3
  `),r=e=>/\(\s*File has more lines\..*offset.*\)/i.test(e.trim());return{type:t,lines:n.map(e=>{let n=e.trim(),i=n.startsWith(`(`)&&n.endsWith(`)`)||r(n);if(t!==`directory`){let t=e.match(/^(\d+):\s?(.*)$/);if(t){let e=t[2],n=e.trim(),i=n.startsWith(`(`)&&n.endsWith(`)`)||r(n);return{lineNumber:i?null:Number(t[1]),text:e,isInfo:i}}}return{lineNumber:null,text:e,isInfo:i}}).filter((e,t,n)=>{if(e.text.trim().length>0)return!0;let r=n[t-1],i=n[t+1],a=!!(r?.isInfo||i?.isInfo),o=e.lineNumber!==null;return!(a&&o)})}},Z=(e,t)=>{try{let n=e.trim().split(`
4
4
  `).filter(Boolean);if(n.length===0)return null;let i=[];return n.forEach(e=>{let t=e.match(/^(\s*)(.+)$/);if(t){let[,e,n]=t,r=Math.floor(e.length/2),a=!n.endsWith(`/`);i.push({name:n.replace(/\/$/,``),depth:r,isFile:a})}}),(0,v.jsx)(`div`,{className:o(`w-full min-w-0 font-mono space-y-0.5`,t?.unstyled?null:`p-3 bg-muted/20 rounded-xl border border-border/30`),style:r.tool.popup,children:i.map((e,t)=>(0,v.jsx)(`div`,{className:`min-w-0`,style:{paddingLeft:`${e.depth*20}px`},children:e.isFile?(0,v.jsx)(`span`,{className:`text-foreground/90 block truncate`,children:e.name}):(0,v.jsxs)(`span`,{className:`font-semibold text-foreground block truncate`,children:[e.name,`/`]})},t))})}catch{return null}},Q={backgroundColor:`var(--status-info)`,opacity:.6},te=(e,t,n)=>{try{let i=e.trim().split(`
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-DuN735GT.js"></script>
563
+ <script type="module" crossorigin src="/assets/main-DIWLptmb.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">
@@ -592,10 +592,10 @@
592
592
  <link rel="modulepreload" crossorigin href="/assets/terminalApi-CPVNQ5DH.js">
593
593
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-download-o29morT6.js">
594
594
  <link rel="modulepreload" crossorigin href="/assets/platform-DFJEtBlo.js">
595
- <link rel="modulepreload" crossorigin href="/assets/types-CTkS0uZU.js">
596
- <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-CQz-vZo-.js">
597
- <link rel="modulepreload" crossorigin href="/assets/native-config-BHa0LfdJ.js">
598
- <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-Be6cMHuS.js">
595
+ <link rel="modulepreload" crossorigin href="/assets/types-YPHToBnK.js">
596
+ <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-7QGwb_Ft.js">
597
+ <link rel="modulepreload" crossorigin href="/assets/native-config-DPpUUZUE.js">
598
+ <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-pLw4gnz5.js">
599
599
  <link rel="stylesheet" crossorigin href="/assets/src-DME3XM8W.css">
600
600
  </head>
601
601
  <body class="h-full bg-background text-foreground">
@@ -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-BibI1YhA.js"></script>
80
+ <script type="module" crossorigin src="/assets/miniChat-CUOtrJxd.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">
@@ -109,10 +109,10 @@
109
109
  <link rel="modulepreload" crossorigin href="/assets/terminalApi-CPVNQ5DH.js">
110
110
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-download-o29morT6.js">
111
111
  <link rel="modulepreload" crossorigin href="/assets/platform-DFJEtBlo.js">
112
- <link rel="modulepreload" crossorigin href="/assets/types-CTkS0uZU.js">
113
- <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-CQz-vZo-.js">
114
- <link rel="modulepreload" crossorigin href="/assets/native-config-BHa0LfdJ.js">
115
- <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-Be6cMHuS.js">
112
+ <link rel="modulepreload" crossorigin href="/assets/types-YPHToBnK.js">
113
+ <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-7QGwb_Ft.js">
114
+ <link rel="modulepreload" crossorigin href="/assets/native-config-DPpUUZUE.js">
115
+ <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-pLw4gnz5.js">
116
116
  <link rel="stylesheet" crossorigin href="/assets/src-DME3XM8W.css">
117
117
  </head>
118
118
  <body class="h-full bg-background text-foreground">
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-DNvOl_GU.js"></script>
67
+ <script type="module" crossorigin src="/assets/mobile-BTUerqBN.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">
@@ -96,10 +96,10 @@
96
96
  <link rel="modulepreload" crossorigin href="/assets/terminalApi-CPVNQ5DH.js">
97
97
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-download-o29morT6.js">
98
98
  <link rel="modulepreload" crossorigin href="/assets/platform-DFJEtBlo.js">
99
- <link rel="modulepreload" crossorigin href="/assets/types-CTkS0uZU.js">
100
- <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-CQz-vZo-.js">
101
- <link rel="modulepreload" crossorigin href="/assets/native-config-BHa0LfdJ.js">
102
- <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-Be6cMHuS.js">
99
+ <link rel="modulepreload" crossorigin href="/assets/types-YPHToBnK.js">
100
+ <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-7QGwb_Ft.js">
101
+ <link rel="modulepreload" crossorigin href="/assets/native-config-DPpUUZUE.js">
102
+ <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-pLw4gnz5.js">
103
103
  <link rel="stylesheet" crossorigin href="/assets/src-DME3XM8W.css">
104
104
  </head>
105
105
  <body class="h-full bg-background text-foreground">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuriai/web",
3
- "version": "0.2.29-beta.5",
3
+ "version": "0.2.29-beta.6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./server/index.js",
@@ -58,6 +58,7 @@ encoding, not removed V1 endpoints.
58
58
  - `packages/web/server/lib/opencode/shutdown-runtime.js`: graceful shutdown orchestration runtime for watcher/session/terminal/process/server teardown.
59
59
  - `packages/web/server/lib/opencode/server-startup-runtime.js`: server listen/startup flow and process/signal handler orchestration runtime.
60
60
  - `packages/web/server/lib/opencode/static-routes-runtime.js`: static asset/SPA fallback route registration and manifest route wiring. The SPA fallback sends `index.html` relative to `root`, so deep links keep working when the install lives under a dot directory.
61
+ - Canonical `/plugins/<pluginId>/<pageId>` routes are application documents even when either encoded identity contains an asset-like suffix such as `.js`, `.json` or `.png`. Static files still resolve first; missing assets outside that exact two-identity route retain 404 responses. API-only mode uses its existing headless response for the same plugin routes.
61
62
  - The API-only dark fallback and both server/client PWA manifest defaults use the Cursor surface (`#1a1a1a`) and primary (`#4c9df3`).
62
63
  - `packages/web/server/lib/opencode/feature-routes-runtime.js`: feature route composition runtime for dynamic import-backed config/skill/provider route registration.
63
64
  - `packages/web/server/lib/conversations/`: combined create-session-and-prompt orchestration (Yuri-owned, registered before generic proxy).
@@ -1,5 +1,7 @@
1
1
  import { registerPwaManifestRoute } from './pwa-manifest-routes.js';
2
2
 
3
+ const PLUGIN_PAGE_ROUTE = /^\/plugins\/[^/]+\/[^/]+\/?$/;
4
+
3
5
  export const createStaticRoutesRuntime = (dependencies) => {
4
6
  const {
5
7
  fs,
@@ -49,20 +51,20 @@ export const createStaticRoutesRuntime = (dependencies) => {
49
51
 
50
52
  // `root` limits send's dotfile check to `index.html`; an absolute path
51
53
  // would 404 whenever the install lives under a dot directory (~/.bun, ~/.local).
52
- app.get(/^(?!\/api|.*\.(js|css|svg|png|jpg|jpeg|gif|ico|woff|woff2|ttf|eot|map)).*$/, (_req, res) => {
54
+ app.get([PLUGIN_PAGE_ROUTE, /^(?!\/api|.*\.(js|css|svg|png|jpg|jpeg|gif|ico|woff|woff2|ttf|eot|map)).*$/], (_req, res) => {
53
55
  res.sendFile('index.html', { root: distPath });
54
56
  });
55
57
  return;
56
58
  }
57
59
 
58
60
  console.warn(`Warning: ${distPath} not found, static files will not be served`);
59
- app.get(/^(?!\/api|.*\.(js|css|svg|png|jpg|jpeg|gif|ico|woff|woff2|ttf|eot|map)).*$/, (_req, res) => {
61
+ app.get([PLUGIN_PAGE_ROUTE, /^(?!\/api|.*\.(js|css|svg|png|jpg|jpeg|gif|ico|woff|woff2|ttf|eot|map)).*$/], (_req, res) => {
60
62
  res.status(404).send('Static files not found. Please build the application first.');
61
63
  });
62
64
  };
63
65
 
64
66
  const registerApiOnlyFallbackRoutes = (app) => {
65
- app.get(/^(?!\/api|\/auth|\/health|.*\.(js|css|svg|png|jpg|jpeg|gif|ico|woff|woff2|ttf|eot|map)).*$/, (req, res) => {
67
+ app.get([PLUGIN_PAGE_ROUTE, /^(?!\/api|\/auth|\/health|.*\.(js|css|svg|png|jpg|jpeg|gif|ico|woff|woff2|ttf|eot|map)).*$/], (req, res) => {
66
68
  const command = 'yuri connect-url --help';
67
69
  res.status(200).format({
68
70
  html: () => {
@@ -1,4 +1,4 @@
1
- import { describe, expect, it } from 'bun:test';
1
+ import { describe, expect, it } from 'vitest';
2
2
  import fs from 'node:fs';
3
3
  import os from 'node:os';
4
4
  import path from 'node:path';
@@ -25,13 +25,15 @@ describe('static routes runtime', () => {
25
25
  const app = express();
26
26
  createRuntime().registerApiOnlyFallbackRoutes(app);
27
27
 
28
- const response = await request(app).get('/sessions/abc').set('Accept', 'text/html');
28
+ for (const route of ['/sessions/abc', '/plugins/example/report.json', '/plugins/example.js/board']) {
29
+ const response = await request(app).get(route).set('Accept', 'text/html');
29
30
 
30
- expect(response.status).toBe(200);
31
- expect(response.text).toContain('Yuri is running in headless mode');
32
- expect(response.text).toContain('Open it from the Yuri desktop or mobile app');
33
- expect(response.text).toContain('yuri connect-url --help');
34
- expect(response.text).toContain('Copy command');
31
+ expect(response.status, route).toBe(200);
32
+ expect(response.text).toContain('Yuri is running in headless mode');
33
+ expect(response.text).toContain('Open it from the Yuri desktop or mobile app');
34
+ expect(response.text).toContain('yuri connect-url --help');
35
+ expect(response.text).toContain('Copy command');
36
+ }
35
37
  });
36
38
 
37
39
  it('returns API-only info JSON for JSON clients', async () => {
@@ -66,6 +68,8 @@ describe('static routes runtime', () => {
66
68
  const distPath = path.join(root, '.bun', 'install', 'dist');
67
69
  fs.mkdirSync(distPath, { recursive: true });
68
70
  fs.writeFileSync(path.join(distPath, 'index.html'), '<!doctype html><title>Yuri</title>');
71
+ fs.mkdirSync(path.join(distPath, 'assets'));
72
+ fs.writeFileSync(path.join(distPath, 'assets', 'app.js'), 'globalThis.fixture = true;');
69
73
  try {
70
74
  const app = express();
71
75
  createStaticRoutesRuntime({
@@ -82,10 +86,19 @@ describe('static routes runtime', () => {
82
86
  normalizePwaOrientation: (value) => value,
83
87
  }).registerStaticRoutes(app);
84
88
 
85
- const response = await request(app).get('/session/ses_abc');
89
+ for (const route of ['/session/ses_abc', '/plugins/example/board', '/plugins/example/report.json',
90
+ '/plugins/example.js/board', '/plugins/%40example%2Fplugin.js/chart.png/', '/plugins/example/chart.css?view=compact']) {
91
+ const response = await request(app).get(route);
86
92
 
87
- expect(response.status).toBe(200);
88
- expect(response.text).toContain('<title>Yuri</title>');
93
+ expect(response.status, route).toBe(200);
94
+ expect(response.text).toContain('<title>Yuri</title>');
95
+ }
96
+ const asset = await request(app).get('/assets/app.js');
97
+ expect(asset.status).toBe(200);
98
+ expect(asset.text).toBe('globalThis.fixture = true;');
99
+ for (const route of ['/assets/missing.js', '/api/plugin', '/plugins/example/board/missing.js']) {
100
+ expect((await request(app).get(route)).status, route).toBe(404);
101
+ }
89
102
  } finally {
90
103
  fs.rmSync(root, { recursive: true, force: true });
91
104
  }