@puddle-code/cli 0.4.7 → 0.4.9

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 (103) hide show
  1. package/CHANGELOG.md +60 -2
  2. package/README.md +19 -4
  3. package/dist/host-control.mjs +75 -17
  4. package/dist/index.js +641 -143
  5. package/dist/install.sh +28 -0
  6. package/dist/public/assets/App-UQXXCAJF.js +65 -0
  7. package/dist/public/assets/{CompilationCommandForm-ByQ3n2Av.js → CompilationCommandForm-CipGdjjH.js} +1 -1
  8. package/dist/public/assets/Dashboard-6pSi_1fH.js +1 -0
  9. package/dist/public/assets/EditorTabClose-TixDVxvl.js +1 -0
  10. package/dist/public/assets/LazyTerminal-B88WIvyh.js +2 -0
  11. package/dist/public/assets/{ModelRefcount-CrRz4dBj.js → ModelRefcount-BeuZdwWp.js} +1 -1
  12. package/dist/public/assets/NewProjectDialog-C1TVzOvJ.js +1 -0
  13. package/dist/public/assets/{NotebookWidget-D_cBVZys.js → NotebookWidget-Bcavj7Lb.js} +2 -2
  14. package/dist/public/assets/PaneEditorBody-DRA4WG0A.js +284 -0
  15. package/dist/public/assets/{PdfViewer-CvbL21Y7.js → PdfViewer-Cr5306nr.js} +1 -1
  16. package/dist/public/assets/{ReleaseNotesDialog-WjdHjwjo.js → ReleaseNotesDialog-CbFYKoYM.js} +1 -1
  17. package/dist/public/assets/SettingsDialog-BvaE3Ue8.js +8 -0
  18. package/dist/public/assets/Terminal-Bo8hyZj7.js +67 -0
  19. package/dist/public/assets/Workspace-Bf0VMnaa.css +1 -0
  20. package/dist/public/assets/Workspace-Bf2zQC6v.js +20 -0
  21. package/dist/public/assets/{api-BOuyloUi.js → api-B90WKMKj.js} +1 -1
  22. package/dist/public/assets/{auth-olLlgxc3.js → auth-CdosKReE.js} +1 -1
  23. package/dist/public/assets/{buffer-store-BvfE0iGv.js → buffer-store-Bh2IilxW.js} +3 -3
  24. package/dist/public/assets/button-C_Rvtcwg.js +1 -0
  25. package/dist/public/assets/{chevron-right-nSpC9bNN.js → chevron-right-BEy-IXEZ.js} +1 -1
  26. package/dist/public/assets/{command-CrnEVrrI.js → command-BV8ZEhQz.js} +1 -1
  27. package/dist/public/assets/{context-CSOKgBuW.js → context-CG70lLa4.js} +1 -1
  28. package/dist/public/assets/context-menu-D3ZhKA9s.js +1 -0
  29. package/dist/public/assets/control-tray-CG26TqqQ.css +1 -0
  30. package/dist/public/assets/control-tray-c9uXOo-i.js +1 -0
  31. package/dist/public/assets/{cssMode-CSjHtANE.js → cssMode-C63oO3vc.js} +1 -1
  32. package/dist/public/assets/dialog-BX0tebJL.css +1 -0
  33. package/dist/public/assets/{dialog-BIriom7c.js → dialog-D-Axqpzg.js} +1 -1
  34. package/dist/public/assets/dist-BmSuHjIq.js +1 -0
  35. package/dist/public/assets/{dist-gLwIpKj2.js → dist-Cq-O0n8n.js} +1 -1
  36. package/dist/public/assets/{dist-DsLo0ckR.js → dist-Dge3wHdO.js} +1 -1
  37. package/dist/public/assets/{editor.api2-4X9Vh9Zw.js → editor.api2-DTL_SiN1.js} +2 -2
  38. package/dist/public/assets/errors-tuvbq1a_.js +1 -0
  39. package/dist/public/assets/forward-link-BspnTVuc.js +1 -0
  40. package/dist/public/assets/{freemarker2-DsOTa0Uq.js → freemarker2-DKWtaCtp.js} +1 -1
  41. package/dist/public/assets/{handlebars-DGS-lUwt.js → handlebars-uU1ujPOt.js} +1 -1
  42. package/dist/public/assets/{html-eVYoRhea.js → html-CrP_wDJ5.js} +1 -1
  43. package/dist/public/assets/{htmlMode-CIHMS93l.js → htmlMode-lNJ18wA0.js} +1 -1
  44. package/dist/public/assets/index-4XrK4Fes.css +2 -0
  45. package/dist/public/assets/index-Doe7MhnI.js +10 -0
  46. package/dist/public/assets/{javascript-Cq9FwqGi.js → javascript-WHxEzdgn.js} +1 -1
  47. package/dist/public/assets/{jsonMode-BijgXT6I.js → jsonMode-xHnT5kRj.js} +1 -1
  48. package/dist/public/assets/{liquid-BcLxSFu3.js → liquid-B1ddyofJ.js} +1 -1
  49. package/dist/public/assets/{lspLanguageFeatures-x2nWJpem.js → lspLanguageFeatures-CCO_e4_t.js} +1 -1
  50. package/dist/public/assets/markdown-mermaid-TizVRNLQ.js +2 -0
  51. package/dist/public/assets/{mdx-BDgbCiou.js → mdx-m1X3FtyX.js} +1 -1
  52. package/dist/public/assets/media-refresh-store-CiyvSvEu.js +1 -0
  53. package/dist/public/assets/{monaco.contribution-C0TYpF88.js → monaco.contribution-BXkMDWX9.js} +2 -2
  54. package/dist/public/assets/notification-delivery-BZzMYzIP.css +1 -0
  55. package/dist/public/assets/notification-delivery-CegOQxcZ.js +1 -0
  56. package/dist/public/assets/popover-D-jcaKGN.js +1 -0
  57. package/dist/public/assets/{protocol-support-BApsXw77.js → protocol-support-TSI4Ig6W.js} +1 -1
  58. package/dist/public/assets/{python-D5mUty3a.js → python-CRTN4ovU.js} +1 -1
  59. package/dist/public/assets/{razor-DAAn8j2s.js → razor-Cj7Cr6Fr.js} +1 -1
  60. package/dist/public/assets/{scroll-restoration-CwXbvZvT.js → scroll-restoration-6GVbekSz.js} +1 -1
  61. package/dist/public/assets/select-p5KTVHbg.js +1 -0
  62. package/dist/public/assets/{selection-actions-2STnRxD9.js → selection-actions-CvYaucrm.js} +1 -1
  63. package/dist/public/assets/{session-order-2oedrwDu.js → session-order-CiDVvIU5.js} +1 -1
  64. package/dist/public/assets/{switch-B1LYyDZA.js → switch-oBD5uCTu.js} +1 -1
  65. package/dist/public/assets/theme-swfNLod9.js +1 -0
  66. package/dist/public/assets/{tsMode-B7q3gz7a.js → tsMode-D0nEO9DL.js} +1 -1
  67. package/dist/public/assets/{typescript-DvKdOnR-.js → typescript-CQjjq4UE.js} +1 -1
  68. package/dist/public/assets/use-ui-state-D4FsRK2R.js +1 -0
  69. package/dist/public/assets/{view-state-store-Cy9sQJoZ.js → view-state-store-DbQ7YOPe.js} +1 -1
  70. package/dist/public/assets/{workers-Ck67TJT4.js → workers-m2qsiPbB.js} +1 -1
  71. package/dist/public/assets/ws-Cp1eCJaM.js +1 -0
  72. package/dist/public/assets/{xml-DDMTG7kD.js → xml-Ci2P6_gm.js} +1 -1
  73. package/dist/public/assets/{yaml-hCGJvPOb.js → yaml-76T3bIWj.js} +1 -1
  74. package/dist/public/index.html +4 -3
  75. package/dist/pudl.js +118 -75
  76. package/package.json +1 -1
  77. package/dist/public/assets/App-CiC_hRBz.js +0 -7
  78. package/dist/public/assets/Dashboard-DXufaZFW.js +0 -1
  79. package/dist/public/assets/EditorTabClose-dEi1apPb.js +0 -1
  80. package/dist/public/assets/LazyTerminal-CQNsHnn5.js +0 -2
  81. package/dist/public/assets/NewProjectDialog-CRoDFgh9.js +0 -1
  82. package/dist/public/assets/PaneEditorBody-_H5u21rG.js +0 -284
  83. package/dist/public/assets/SettingsDialog-CiDPg9PP.js +0 -8
  84. package/dist/public/assets/Terminal-kGAX-Lcx.js +0 -66
  85. package/dist/public/assets/Workspace-D8fTPYJv.js +0 -20
  86. package/dist/public/assets/Workspace-fmUH5XvW.css +0 -1
  87. package/dist/public/assets/button-q0ardkfx.js +0 -1
  88. package/dist/public/assets/context-menu-BaamZoTk.js +0 -1
  89. package/dist/public/assets/control-tray-CHewYBoS.css +0 -1
  90. package/dist/public/assets/control-tray-D6zVSZF4.js +0 -1
  91. package/dist/public/assets/dialog-BYIi-VQq.css +0 -1
  92. package/dist/public/assets/dist-t7ZlsY9S.js +0 -1
  93. package/dist/public/assets/forward-link-DMvLf0Xw.js +0 -1
  94. package/dist/public/assets/hotkeys-Cu0t6sbz.js +0 -1
  95. package/dist/public/assets/index-DAZZvnBz.css +0 -2
  96. package/dist/public/assets/index-Nd31gVbt.js +0 -10
  97. package/dist/public/assets/markdown-mermaid-ByeNUiyP.js +0 -2
  98. package/dist/public/assets/media-refresh-store-1wdl12UC.js +0 -1
  99. package/dist/public/assets/notification-delivery-BrgeSks8.js +0 -1
  100. package/dist/public/assets/popover-ChiZqTsE.js +0 -1
  101. package/dist/public/assets/select-4yfFmU4K.js +0 -1
  102. package/dist/public/assets/use-ui-state-Bi73JKcr.js +0 -1
  103. package/dist/public/assets/ws-Dgc69_w8.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{C as n,ot as r,x as i}from"./protocol-support-TSI4Ig6W.js";import{F as a}from"./auth-CdosKReE.js";import{t as o}from"./jsx-runtime-By8HlURe.js";import{v as s}from"./ws-Cp1eCJaM.js";import{C as c,E as l,T as u,_ as d,g as f,v as p,x as m,y as ee}from"./dialog-D-Axqpzg.js";import{i as h,o as g}from"./x-Dq6POV20.js";import{_ as te,a as _,d as v,g as y,h as ne,m as b,v as x}from"./chevron-right-BEy-IXEZ.js";import{i as S}from"./dist-Dge3wHdO.js";import{n as C,t as re}from"./createLucideIcon-C9A1vLE-.js";import{c as ie,n as ae}from"./switch-oBD5uCTu.js";import{a as w,n as oe,o as T}from"./preview-kind-CPkO-rSz.js";import{t as se}from"./debounce-B9DrqirV.js";var E=e(t(),1),D=o(),[O,ce]=u(`Tooltip`,[x]),k=x(),le=`TooltipProvider`,ue=700,A=`tooltip.open`,[de,j]=O(le),fe=e=>{let{__scopeTooltip:t,delayDuration:n=ue,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=E.useRef(!0),s=E.useRef(!1),c=E.useRef(0);return E.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,D.jsx)(de,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:E.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:E.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:E.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};fe.displayName=le;var M=`Tooltip`,[pe,N]=O(M),me=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=j(M,e.__scopeTooltip),l=k(t),[u,d]=E.useState(null),p=ee(),m=E.useRef(0),h=o??c.disableHoverableContent,g=s??c.delayDuration,_=E.useRef(!1),[v,y]=f({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(A))):c.onClose(),a?.(e)},caller:M}),ne=E.useMemo(()=>v?_.current?`delayed-open`:`instant-open`:`closed`,[v]),b=E.useCallback(()=>{window.clearTimeout(m.current),m.current=0,_.current=!1,y(!0)},[y]),x=E.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),S=E.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{_.current=!0,y(!0),m.current=0},g)},[g,y]);return E.useEffect(()=>()=>{m.current&&=(window.clearTimeout(m.current),0)},[]),(0,D.jsx)(te,{...l,children:(0,D.jsx)(pe,{scope:t,contentId:p,open:v,stateAttribute:ne,trigger:u,onTriggerChange:d,onTriggerEnter:E.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:E.useCallback(()=>{h?x():(window.clearTimeout(m.current),m.current=0)},[x,h]),onOpen:b,onClose:x,disableHoverableContent:h,children:n})})};me.displayName=M;var P=`TooltipTrigger`,he=E.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=N(P,n),a=j(P,n),o=k(n),s=g(t,E.useRef(null),i.onTriggerChange),u=E.useRef(!1),d=E.useRef(!1),f=E.useCallback(()=>u.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,D.jsx)(b,{asChild:!0,...o,children:(0,D.jsx)(c.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:l(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:l(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:l(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:l(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:l(e.onBlur,i.onClose),onClick:l(e.onClick,i.onClose)})})});he.displayName=P;var F=`TooltipPortal`,[ge,_e]=O(F,{forceMount:void 0}),ve=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=N(F,t);return(0,D.jsx)(ge,{scope:t,forceMount:n,children:(0,D.jsx)(d,{present:n||a.open,children:(0,D.jsx)(p,{asChild:!0,container:i,children:r})})})};ve.displayName=F;var I=`TooltipContent`,ye=E.forwardRef((e,t)=>{let n=_e(I,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=N(I,e.__scopeTooltip);return(0,D.jsx)(d,{present:r||o.open,children:o.disableHoverableContent?(0,D.jsx)(we,{side:i,...a,ref:t}):(0,D.jsx)(be,{side:i,...a,ref:t})})}),be=E.forwardRef((e,t)=>{let n=N(I,e.__scopeTooltip),r=j(I,e.__scopeTooltip),i=E.useRef(null),a=g(t,i),[o,s]=E.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=E.useCallback(()=>{s(null),d(!1)},[d]),p=E.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Oe(r,De(r,n.getBoundingClientRect())),a=ke(t.getBoundingClientRect()),o=je([...i,...a]);s(o),d(!0)},[d]);return E.useEffect(()=>()=>f(),[f]),E.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),E.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Ae(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,D.jsx)(we,{...e,ref:a})}),[xe,Se]=O(M,{isInside:!1}),Ce=h(`TooltipContent`),we=E.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=N(I,n),l=k(n),{onClose:u}=c;return E.useEffect(()=>(document.addEventListener(A,u),()=>document.removeEventListener(A,u)),[u]),E.useEffect(()=>{if(c.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,D.jsx)(m,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,D.jsxs)(y,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,D.jsx)(Ce,{children:r}),(0,D.jsx)(xe,{scope:n,isInside:!0,children:(0,D.jsx)(S,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});ye.displayName=I;var Te=`TooltipArrow`,Ee=E.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=k(n);return Se(Te,n).isInside?null:(0,D.jsx)(ne,{...i,...r,ref:t})});Ee.displayName=Te;function De(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Oe(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ke(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Ae(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function je(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Me(t)}function Me(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Ne=fe,Pe=me,Fe=he,Ie=ve,Le=ye,Re=Ne,ze=Pe,Be=Fe;function Ve({className:e,sideOffset:t=4,...n}){return(0,D.jsx)(Ie,{children:(0,D.jsx)(Le,{sideOffset:t,className:C(`z-50 overflow-hidden px-2 py-1 text-xs text-fg`,_,v,`overlay-tooltip-motion`,e),...n})})}var He=re(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);function Ue({initial:e,maxLength:t,className:n,fitContent:r=!1,onCommit:i,onCancel:a}){let[o,s]=(0,E.useState)(e),c=(0,D.jsx)(`input`,{autoFocus:!0,value:o,maxLength:t,onFocus:e=>e.currentTarget.select(),onChange:e=>s(e.target.value),onBlur:()=>i(o),onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`?i(o):e.key===`Escape`&&a()},className:C(`bg-transparent outline-none`,r?`col-start-1 row-start-1 w-0 min-w-full p-0`:n)});return r?(0,D.jsxs)(`span`,{className:C(`inline-grid min-w-px`,n),children:[(0,D.jsx)(`span`,{"aria-hidden":`true`,className:`invisible col-start-1 row-start-1 whitespace-pre`,children:o||`​`}),c]}):c}function We(e){return{onClick:e=>{e.detail===2&&e.preventDefault()},onDoubleClick:t=>{t.preventDefault(),e()}}}var L=null;function Ge(e){return L=e,()=>{L===e&&(L=null)}}function Ke(){L?.()}var R=null;function qe(e){return R=e,()=>{R===e&&(R=null)}}async function Je(e){if(!R)throw Error(`Open a project before opening a path.`);await R(e)}function Ye(){let e=r(s()??void 0).data?.tabTitleTemplate;return(0,E.useCallback)(t=>ae(t,e),[e])}var Xe=(0,E.createContext)({open:()=>void 0,handler:null,setHandler:()=>void 0});function Ze({children:e}){let[t,n]=(0,E.useState)(null),r=(0,E.useCallback)(e=>n(()=>e),[]),i=(0,E.useCallback)(e=>t?.(e),[t]),a=(0,E.useMemo)(()=>({open:i,handler:t,setHandler:r}),[i,t,r]);return(0,D.jsx)(Xe.Provider,{value:a,children:e})}function Qe(){return(0,E.useContext)(Xe)}function $e({className:e,strokeScale:t=1}){return(0,D.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.8*t,strokeLinecap:`round`,"aria-hidden":!0,children:[(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`22`,y2:`12`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17`,y2:`20.66`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`7`,y2:`20.66`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`2`,y2:`12`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`7`,y2:`3.34`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17`,y2:`3.34`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17.63`,y2:`15.25`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`12`,y2:`18.5`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`6.37`,y2:`15.25`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`6.37`,y2:`8.75`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`12`,y2:`5.5`}),(0,D.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17.63`,y2:`8.75`})]})}function et({className:e,strokeScale:t=1}){return(0,D.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.6*t,"aria-hidden":!0,children:[(0,D.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`}),(0,D.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`,transform:`rotate(60 12 12)`}),(0,D.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`,transform:`rotate(120 12 12)`})]})}function tt({className:e,strokeScale:t=1}){return(0,D.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.8*t,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,D.jsx)(`path`,{d:`M8 4H4v16h4`}),(0,D.jsx)(`path`,{d:`M16 4h4v16h-4`}),(0,D.jsx)(`rect`,{x:`10.5`,y:`10.5`,width:`3`,height:`3`,fill:`currentColor`,stroke:`none`})]})}function nt({className:e}){return(0,D.jsx)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`currentColor`,"aria-hidden":!0,children:(0,D.jsx)(`path`,{d:`M12 1.5c0 5.8 4.7 10.5 10.5 10.5C16.7 12 12 16.7 12 22.5 12 16.7 7.3 12 1.5 12 7.3 12 12 7.3 12 1.5Z`})})}function rt({type:e,className:t,strokeScale:n=1}){switch(e){case`claude-code`:return(0,D.jsx)($e,{className:t,strokeScale:n});case`codex`:return(0,D.jsx)(et,{className:t,strokeScale:n});case`opencode`:return(0,D.jsx)(tt,{className:t,strokeScale:n});case`gemini-cli`:return(0,D.jsx)(nt,{className:t});default:return(0,D.jsx)(ie,{className:t,strokeWidth:2*n})}}var z=new Set,B=!1,it=null;function at(){for(let e of z)e()}function ot(e){return z.add(e),()=>z.delete(e)}function st(e){B!==e&&(B=e,at())}function ct(){st(!B)}function lt(){return(0,E.useSyncExternalStore)(ot,()=>B)}function ut(e){it=e,at()}function dt(){return(0,E.useSyncExternalStore)(ot,()=>it)}function V(){return crypto.randomUUID()}function H(e){return e.type===`terminal`?`term:${e.session}`:`editor:${w(e.tab)}`}function U(e,t){return H(e)===H(t)}function ft(e){return e.type===`terminal`}function pt(e){return e.type===`editor`&&(e.tab.view===`linked`||e.tab.view===`locked`)}function W(e=[],t){let n=e.map(H),r=t&&n.includes(t)?t:n.length>0?n[0]:null;return{kind:`leaf`,id:V(),tabs:e,activeKey:r,previewKey:null}}function G(e,t,n){return{kind:`split`,id:V(),direction:e,children:t,sizes:n??t.map(()=>100/Math.max(1,t.length))}}function K(e,t){if(e.kind===`leaf`)return e.id===t?e:null;for(let n of e.children){let e=K(n,t);if(e)return e}return null}function q(e,t){if(e.kind===`leaf`)return e.tabs.some(e=>H(e)===t)?e:null;for(let n of e.children){let e=q(n,t);if(e)return e}return null}function J(e){return e.kind===`leaf`?[e]:e.children.flatMap(J)}function mt(e){return J(e).flatMap(e=>e.tabs)}function ht(e){return e.kind===`leaf`?[e.id]:[e.id,...e.children.flatMap(ht)]}function gt(e){let t=ht(e);return new Set(t).size!==t.length}function _t(e){return e.kind===`leaf`?{...e,id:V()}:{...e,id:V(),children:e.children.map(_t)}}function vt(e){if(!gt(e))return e;let t=new Set,n=e=>{let r=t.has(e.id)?V():e.id;return t.add(r),e.kind===`leaf`?{...e,id:r}:{...e,id:r,children:e.children.map(n)}};return n(e)}function yt(e){let t=e.tabs.map(H),n=e.activeKey&&t.includes(e.activeKey)?e.activeKey:t[0]??null,r=e.previewKey&&t.includes(e.previewKey)?e.previewKey:null;return n===e.activeKey&&r===(e.previewKey??null)?e:{...e,activeKey:n,previewKey:r}}function Y(e){if(e.kind===`leaf`)return yt(e);let t=e.children.map(Y),n=[],r=[];t.forEach((t,i)=>{let a=e.sizes[i]??1;if(t.kind===`split`&&t.direction===e.direction){let e=t.sizes.reduce((e,t)=>e+t,0)||t.children.length;t.children.forEach((i,o)=>{n.push(i),r.push(a*(t.sizes[o]??1)/e)})}else n.push(t),r.push(a)});let i=[],a=[];return n.forEach((e,t)=>{e.kind===`leaf`&&e.tabs.length===0||(i.push(e),a.push(r[t]??1))}),i.length===0?W([]):i.length===1?i[0]:{...e,children:i,sizes:a}}function X(e,t,n){return e.kind===`leaf`?e.id===t?n(e):e:{...e,children:e.children.map(e=>X(e,t,n))}}function bt(e,t,n){return X(e,t,e=>{if(!e.tabs.some(e=>H(e)===n))return e;let t=e.tabs.filter(e=>H(e)!==n),r=e.activeKey===n?xt(e,n):e.activeKey;return{...e,tabs:t,activeKey:r}})}function xt(e,t){let n=e.tabs.findIndex(e=>H(e)===t);if(n===-1)return e.activeKey;let r=e.tabs.filter(e=>H(e)!==t);return r.length===0?null:H(r[Math.min(n,r.length-1)])}function St(e,t,n){let r=e.tabs.filter(e=>!U(e,t)),i=n===void 0?r.length:Math.max(0,Math.min(n,r.length)),a=[...r.slice(0,i),t,...r.slice(i)];return{...e,tabs:a,activeKey:H(t)}}function Ct(e,t,n,r){let i=n===`left`||n===`right`?`row`:`col`,a=n===`left`||n===`top`;return Y(X(e,t,e=>{let t=W([r]);return G(i,a?[t,e]:[e,t],[50,50])}))}function wt(e,t){let{fromLeafId:n,toLeafId:r,edge:i}=t;if(n===r)return e;let a=K(e,n),o=K(e,r);if(!a||!o)return e;if(i===`center`){let t=e=>e.kind===`leaf`?e.id===n?o:e.id===r?a:e:{...e,children:e.children.map(t)};return t(e)}let s=Y(X(e,n,e=>({...e,tabs:[],activeKey:null,previewKey:null}))),c=i===`left`||i===`right`?`row`:`col`,l=i===`left`||i===`top`;return Y(X(s,r,e=>G(c,l?[a,e]:[e,a],[50,50])))}function Tt(e,t){let{ref:n,toLeafId:r,edge:i}=t,a=H(n),o=t.copy===!0&&!ft(n),s=t.index;if(i===`center`&&s!==void 0){let t=K(e,r)?.tabs.findIndex(e=>H(e)===a)??-1;t!==-1&&t<s&&--s}let c=o?e:bt(e,t.fromLeafId,a);if(i===`center`){let e=X(c,r,e=>St(e,n,s));return!K(e,r)&&!q(e,a)?Z(Y(Et(e,n)),a):Z(Y(e),a)}return K(c,r)?Z(Ct(c,r,i,n),a):Y(W([n]))}function Et(e,t){let n=J(e)[0];return n?X(e,n.id,e=>St(e,t)):W([t])}function Dt(e,t,n){return Y(X(e,t,e=>e.tabs.some(e=>H(e)===n)?{...e,tabs:e.tabs.filter(e=>H(e)!==n),activeKey:e.activeKey===n?xt(e,n):e.activeKey}:e))}function Ot(e,t,n){let r=H(n);return Y(X(e,t,e=>{let t=e.previewKey===r?null:e.previewKey;return e.tabs.some(e=>U(e,n))?{...e,activeKey:r,previewKey:t}:{...e,tabs:[...e.tabs,n],activeKey:r,previewKey:t}}))}function kt(e,t,n){let r=H(n);return Y(X(e,t,e=>e.tabs.some(e=>H(e)===r)?{...e,tabs:e.tabs.map(e=>H(e)===r?n:e),previewKey:e.previewKey===r?null:e.previewKey}:{...e,tabs:[...e.tabs,n]}))}function At(e,t,n){let r=H(n);return X(e,t,e=>({...e,tabs:e.tabs.map(e=>H(e)===r?n:e)}))}function jt(e,t,n){let r=w(t),i=e=>e.kind===`split`?{...e,children:e.children.map(i)}:{...e,tabs:e.tabs.map(e=>e.type===`editor`&&w(e.tab)===r?{...e,tab:{...e.tab,compile_mode:n}}:e)};return i(e)}function Mt(e,t){return e.type!==`editor`||t.type!==`editor`||e.tab.view!==`preview`||t.tab.view!==void 0||oe(t.tab.path)===null?t:{...t,tab:{...t.tab,view:`preview`}}}function Nt(e,t,n){let r=H(n);return Y(X(e,t,e=>{if(e.tabs.some(e=>U(e,n)))return{...e,activeKey:r};let t=e.previewKey?e.tabs.findIndex(t=>H(t)===e.previewKey):-1,i=t>=0?e.tabs[t]:void 0,a=e.tabs.length>1&&i!==void 0&&!ft(i)&&!pt(i),o=i?Mt(i,n):n,s=a?e.tabs.map((e,n)=>n===t?o:e):[...e.tabs,o];return{...e,tabs:s,activeKey:r,previewKey:r}}))}function Z(e,t){let n=e=>e.kind===`leaf`?e.previewKey===t?{...e,previewKey:null}:e:{...e,children:e.children.map(n)};return n(e)}function Pt(e,t,n,r){return X(e,t,e=>{let t=e.tabs.findIndex(e=>e.type===`editor`&&H(e)===n),i=t>=0?e.tabs[t]:void 0;if(i===void 0||i.type!==`editor`)return e;let a={...i,tab:{...i.tab,view:r}},o=H(a);if(o===n)return{...e,tabs:e.tabs.map((e,n)=>n===t?a:e)};let s=e.tabs.some((e,n)=>n!==t&&H(e)===o),c=s?e.tabs.filter((e,n)=>n!==t):e.tabs.map((e,n)=>n===t?a:e);return{...e,tabs:c,activeKey:e.activeKey===n?o:e.activeKey,previewKey:e.previewKey===n?s?null:o:e.previewKey??null}})}function Ft(e,t){let n=T(e);return n!==`commit`&&n!==`untitled`&&e.session===t.session&&e.path===t.path&&e.root===t.root}function It(e,t,n){if(n===t.path)return e;let r=!1,i=e=>{if(e.kind===`split`){let t=e.children.map(i);return t.some((t,n)=>t!==e.children[n])?{...e,children:t}:e}let a=new Map,o=!1,s=e.tabs.map(e=>{if(e.type!==`editor`||!Ft(e.tab,t))return e;let r={...e,tab:{...e.tab,path:n}};return a.set(H(e),H(r)),o=!0,r});if(!o)return e;r=!0;let c=e.activeKey,l=e.previewKey??null;return{...e,tabs:s,activeKey:c===null?null:a.get(c)??c,previewKey:l===null?null:a.get(l)??l}},a=i(e);return r?a:e}function Lt(e){if(e.type!==`editor`)return null;let t=e.tab,n=T(t);return n!==`file`&&n!==`external`||t.view===`linked`||t.view===`locked`||oe(t.path)===null?null:t}function Rt(e,t){let n=Lt(t);if(!n)return e;let r=!1,i=e=>{if(e.kind===`split`)return{...e,children:e.children.map(i)};let t=!1,a=e.tabs.map(e=>{if(e.type!==`editor`||!pt(e))return e;let r=e.tab;return r.session===n.session&&r.path===n.path&&(r.root??``)===(n.root??``)&&T(r)===T(n)?e:(t=!0,{type:`editor`,tab:{session:n.session,path:n.path,...n.kind===void 0?{}:{kind:n.kind},...n.root===void 0?{}:{root:n.root},view:r.view}})});return t?(r=!0,{...e,tabs:a}):e},a=i(e);return r?a:e}function zt(e,t){return e.session===t.session&&e.path===t.path&&(e.root??``)===(t.root??``)&&T(e)===T(t)}function Bt(e,t,n){let r=J(e).flatMap(e=>e.tabs.flatMap(n=>n.type!==`editor`||n.tab.view===`linked`||n.tab.view===`locked`||!zt(n.tab,t)?[]:[{leafId:e.id,ref:n}]));return r.find(({leafId:e})=>e===n)??r.find(({ref:e})=>(e.tab.view??`source`)===`source`)??r[0]??null}function Vt(e,t,n){return X(e,t,e=>e.tabs.some(e=>H(e)===n)?{...e,activeKey:n}:e)}function Ht(e,t,n){function r(e){return e.kind===`leaf`?e:e.id===t&&n.length===e.children.length?{...e,children:e.children.map(r),sizes:[...n]}:{...e,children:e.children.map(r)}}return r(e)}function Ut(e){let t=e.type===`terminal`?e.session:e.tab.session;return t===`00000000-0000-0000-0000-000000000000`?null:t}function Wt(e){return t=>{let n=Ut(t);return n===null||e.has(n)}}function Q(e,t){let n=e=>e.kind===`leaf`?{...e,tabs:e.tabs.filter(t)}:{...e,children:e.children.map(n)};return Y(n(e))}function Gt(e){let t=new Set,n=[];for(let r of e){let e=Y(Q(r,e=>!t.has(H(e)))),i=mt(e);if(i.length!==0){for(let e of i)t.add(H(e));n.push(e)}}return n.length===0?W([]):vt(n.length===1?n[0]:Y(G(`row`,n)))}function Kt(e){let t=e.editor_tabs.map(e=>({type:`editor`,tab:e})),n=e.session_tabs.map(e=>({type:`terminal`,session:e})),r=e.active_editor_tab?H({type:`editor`,tab:e.active_editor_tab}):null,i=e.active_session?`term:${e.active_session}`:null;if(t.length===0&&n.length===0)return W([]);if(t.length===0)return W(n,i);if(n.length===0)return W(t,r);let a=e.layout,o=typeof a.editor==`number`?a.editor:40,s=typeof a.session==`number`?a.session:60;return Y(G(`col`,[W(t,r),W(n,i)],[o,s]))}function qt(e){return JSON.stringify(Jt(e))}function Jt(e){return e===null?null:e.kind===`leaf`?e.tabs.length===0?null:{t:e.tabs.map(H)}:{d:e.direction,s:e.sizes.map(e=>Math.round(e*10)/10),c:e.children.map(Jt)}}var Yt=new Set,$=!1,Xt=null;function Zt(){for(let e of Yt)e()}function Qt(e){return Yt.add(e),()=>Yt.delete(e)}function $t(e){$!==e&&($=e,Zt())}function en(){$t(!$)}function tn(){return(0,E.useSyncExternalStore)(Qt,()=>$)}function nn(e){Xt=e,Zt()}function rn(){return(0,E.useSyncExternalStore)(Qt,()=>Xt)}var an={layout_tree:null,active_session:null,layout_ref:null};function on(e){return e.type===`terminal`?e.session:e.tab.session}function sn(e,t){let n=new Set;for(let[r,i]of Object.entries(e))if(!(r===t||!i.layout_tree))for(let e of mt(i.layout_tree))e.type===`terminal`&&n.add(e.session);return[...n]}function cn(e,t){let n=e.project_layouts[t];return{...e,layout_tree:n?.layout_tree??null,active_session:n?.active_session??null,layout_ref:n?.layout_ref??null,session_tabs:[],editor_tabs:[],active_editor_tab:null}}function ln(e,t,n){return n?{loaded:e.loaded,snapshot:cn(e.snapshot,t),current:()=>cn(e.current(),t),update(n){let r={},i={...n};if(`layout_tree`in n&&(r.layout_tree=n.layout_tree??null,delete i.layout_tree),`active_session`in n&&(r.active_session=n.active_session??null,delete i.active_session),`layout_ref`in n&&(r.layout_ref=n.layout_ref??null,delete i.layout_ref),Object.keys(r).length>0){let n=e.current().project_layouts;i.project_layouts={...n,[t]:{...n[t]??an,...r}}}Object.keys(i).length>0&&e.update(i)}}:e}function un(e,t,n,r){let i=e.layout_tree??Kt(e),a={};for(let o of t)a[o]={layout_tree:_t(Q(i,e=>{let i=on(e);return i===`00000000-0000-0000-0000-000000000000`?o===(r??t[0]):n.get(i)===o})),active_session:e.active_session!==null&&n.get(e.active_session)===o?e.active_session:null,layout_ref:null};return{layout_mode:`project`,project_layouts:a}}function dn(e,t,n={}){return{...e,...t,...n}}function fn(e,t,n){let r=t.layout_tree?Q(t.layout_tree,e=>{let t=on(e);return t===`00000000-0000-0000-0000-000000000000`||n.alive.has(t)}):null,i=t.active_session!==null&&n.alive.has(t.active_session)?t.active_session:null;if(t.scope===`profile`)return{projectBased:!1,patch:{layout_mode:`profile`,layout_tree:r,active_session:i,layout_ref:t.id}};let a=t.project_id??n.currentProject??n.projectIds[0]??``,o={layout_tree:r,active_session:i,layout_ref:t.id};if((e.layout_mode??`profile`)===`project`)return{projectBased:!0,patch:{project_layouts:{...e.project_layouts,[a]:o}}};let s=un(e,n.projectIds,n.sessionProject,a);return{projectBased:!0,patch:{...s,project_layouts:dn(s.project_layouts??{},e.project_layouts,{[a]:o})}}}function pn(e,t){let n=e.project_layouts,r=[...t.filter(e=>e in n),...Object.keys(n).filter(e=>!t.includes(e))].map(e=>n[e]);return{layout_mode:`profile`,project_layouts:{},layout_tree:Gt(r.map(e=>e.layout_tree).filter(e=>e!==null)),active_session:r.map(e=>e.active_session).find(e=>e!==null)??null,layout_ref:null}}var mn=2e3,hn=a.parse({});function gn(e){return`puddle.ws.${e}`}function _n(e){if(e===null)return{kind:`absent`};try{return{kind:`present`,snapshot:a.parse(JSON.parse(e))}}catch{return{kind:`corrupt`}}}function vn(){let e=s(),[t,r]=(0,E.useState)(!1),[a,o]=(0,E.useState)(hn),c=(0,E.useRef)(a);c.current=a;let l=(0,E.useRef)(null),u=(0,E.useMemo)(()=>se((e,t)=>{n(e,t).catch(e=>console.warn(`ui-state save failed: ${e.message}`))},mn),[]);return(0,E.useEffect)(()=>{if(e===null){l.current=null;return}let t=gn(e);l.current=t;let n=!1;r(!1),o(hn);let a;try{a=_n(sessionStorage.getItem(t)),a.kind===`corrupt`&&sessionStorage.removeItem(t)}catch(e){console.warn(`ui-state read failed: ${e.message}`),a={kind:`absent`}}return a.kind===`present`?(o(a.snapshot),r(!0)):i(e).then(e=>{n||(e&&o(e.ui_state),r(!0))}).catch(e=>{console.warn(`ui-state load failed: ${e.message}`),n||r(!0)}),()=>{n=!0,u.flush()}},[e,u]),{loaded:t,snapshot:a,current:()=>c.current,update(t){if(e===null)return;let n={...c.current,...t};c.current=n,o(n);let r=l.current??gn(e);u(e,n);try{sessionStorage.setItem(r,JSON.stringify(n))}catch(e){console.warn(`ui-state write failed: ${e.message}`)}}}}export{Ke as $,W as A,H as B,wt as C,Vt as D,mt as E,Ht as F,dt as G,ut as H,Rt as I,Ze as J,lt as K,jt as L,Z as M,Q as N,q as O,It as P,qe as Q,Pt as R,vt as S,K as T,st as U,At as V,ct as W,Ye as X,Qe as Y,Je as Z,Ot as _,dn as a,Ve as at,Kt as b,un as c,$t as d,Ge as et,en as f,kt as g,qt as h,fn as i,ze as it,Nt as j,Lt as k,pn as l,tn as m,vn as n,We as nt,sn as o,Re as ot,rn as p,rt as q,gn as r,He as rt,ln as s,Be as st,_n as t,Ue as tt,nn as u,J as v,Tt as w,Dt as x,Wt as y,Bt as z};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{a as n}from"./auth-olLlgxc3.js";var r=e(t(),1),i=(0,r.createContext)(``);function a(e,t){let a=(0,r.useContext)(i);return n(JSON.stringify([a,e,t]))}var o=class{limit;entries=new Map;constructor(e=500){this.limit=e}get(e){let t=this.entries.get(e);return t!==void 0&&(this.entries.delete(e),this.entries.set(e,t)),t}set(e,t){for(this.entries.delete(e),this.entries.set(e,t);this.entries.size>this.limit;){let e=this.entries.keys().next().value;if(e===void 0)break;this.entries.delete(e)}}};export{i as n,a as r,o as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{a as n}from"./auth-CdosKReE.js";var r=e(t(),1),i=(0,r.createContext)(``);function a(e,t){let a=(0,r.useContext)(i);return n(JSON.stringify([a,e,t]))}var o=class{limit;entries=new Map;constructor(e=500){this.limit=e}get(e){let t=this.entries.get(e);return t!==void 0&&(this.entries.delete(e),this.entries.set(e,t)),t}set(e,t){for(this.entries.delete(e),this.entries.set(e,t);this.entries.size>this.limit;){let e=this.entries.keys().next().value;if(e===void 0)break;this.entries.delete(e)}}};export{i as n,a as r,o as t};
@@ -1 +1 @@
1
- import{p as e}from"./editor.api2-4X9Vh9Zw.js";function t(e,t){let n=globalThis.MonacoEnvironment;if(n?.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}var n=typeof self==`object`&&self.constructor&&self.constructor.name===`DedicatedWorkerGlobalScope`&&globalThis.workerttPolicy!==void 0?globalThis.workerttPolicy:t(`defaultWorkerFactory`,{createScriptURL:e=>e});function r(e){let t=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker==`function`)return r.getWorker(`workerMain.js`,t);if(typeof r.getWorkerUrl==`function`){let e=r.getWorkerUrl(`workerMain.js`,t);return new Worker(n?n.createScriptURL(e):e,{name:t,type:`module`})}}if(e.createWorker)return e.createWorker();throw Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`)}function i(t){let n=Promise.resolve(r({label:t.label??`monaco-editor-worker`,moduleId:t.moduleId,createWorker:t.createWorker})).then(e=>(e.postMessage(`ignore`),e.postMessage(t.createData),e));return e.createWebWorker({worker:n,host:t.host,keepIdleModels:t.keepIdleModels})}export{i as t};
1
+ import{p as e}from"./editor.api2-DTL_SiN1.js";function t(e,t){let n=globalThis.MonacoEnvironment;if(n?.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}var n=typeof self==`object`&&self.constructor&&self.constructor.name===`DedicatedWorkerGlobalScope`&&globalThis.workerttPolicy!==void 0?globalThis.workerttPolicy:t(`defaultWorkerFactory`,{createScriptURL:e=>e});function r(e){let t=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker==`function`)return r.getWorker(`workerMain.js`,t);if(typeof r.getWorkerUrl==`function`){let e=r.getWorkerUrl(`workerMain.js`,t);return new Worker(n?n.createScriptURL(e):e,{name:t,type:`module`})}}if(e.createWorker)return e.createWorker();throw Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`)}function i(t){let n=Promise.resolve(r({label:t.label??`monaco-editor-worker`,moduleId:t.moduleId,createWorker:t.createWorker})).then(e=>(e.postMessage(`ignore`),e.postMessage(t.createData),e));return e.createWebWorker({worker:n,host:t.host,keepIdleModels:t.keepIdleModels})}export{i as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{i as n,n as r,o as i,r as a}from"./auth-CdosKReE.js";import{n as o}from"./dist-BOS6OKSE.js";var s=e(t(),1);function c(){return window.puddleDesktop}function l(){let[e,t]=(0,s.useState)({fullScreen:!1,animate:!1});return(0,s.useEffect)(()=>{let e=c();if(!e)return;let n=!0;e.isFullScreen?.()?.then(e=>{n&&t({fullScreen:e,animate:!1})});let r=e.onFullScreenChange?.(e=>t({fullScreen:e,animate:!0}));return()=>{n=!1,r?.()}},[]),e}var u=n(`puddle.profile-id`);function d(){let e=(0,s.useSyncExternalStore)(u.subscribe,u.get);return e!==null&&/^[0-9a-f]{10}$/.test(e)?e:null}function f(e){window.location.pathname!==`/`&&window.history.replaceState(null,``,`/`),u.set(e)}var p=[`Layout & tabs`,`Editor`,`Left sidebar`,`Right sidebar`],m=[{id:`host.peek`,label:`Show host identity (hold)`,group:`Layout & tabs`,defaultBinding:typeof navigator<`u`&&/Mac/.test(navigator.platform)?`alt+meta+Slash`:`ctrl+alt+Slash`,hold:!0},{id:`palette.toggle`,label:`Command palette`,group:`Layout & tabs`,defaultBinding:`meta+KeyK`},{id:`tab.close`,label:`Close current tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyW`,desktopBinding:`meta+KeyW`},{id:`tab.reopen`,label:`Reopen last closed tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyT`,desktopBinding:`shift+meta+KeyT`},{id:`tab.newUntitled`,label:`New untitled file`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyN`,desktopBinding:`meta+KeyN`},{id:`tab.next`,label:`Next tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketRight`,desktopBinding:`ctrl+Tab`},{id:`tab.prev`,label:`Previous tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketLeft`,desktopBinding:`ctrl+shift+Tab`},{id:`window.close`,label:`Close window`,group:`Layout & tabs`,defaultBinding:`meta+KeyW`,desktopBinding:`shift+meta+KeyW`},{id:`sidebar.left`,label:`Toggle left sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Comma`,desktopBinding:`meta+KeyB`},{id:`sidebar.right`,label:`Toggle right sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Period`,desktopBinding:`shift+meta+KeyB`},{id:`editor.save`,label:`Save`,group:`Editor`,defaultBinding:`meta+KeyS`,editor:!0},{id:`editor.wordWrap`,label:`Toggle word wrap`,group:`Editor`,defaultBinding:`alt+KeyZ`,editor:!0},{id:`nav.files`,label:`Open Files`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyE`},{id:`nav.search`,label:`Open Search`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyF`},{id:`nav.changes`,label:`Open Changes`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyV`},{id:`nav.worktrees`,label:`Open Worktrees`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyB`},{id:`session.newAgent`,label:`New agent`,group:`Right sidebar`,defaultBinding:`ctrl+alt+Backquote`,desktopBinding:`meta+KeyT`},{id:`session.newTerminal`,label:`New terminal`,group:`Right sidebar`,defaultBinding:`ctrl+Backquote`},{id:`scratchpad.toggle`,label:`Toggle Scratchpad`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyS`},{id:`layouts.toggle`,label:`Toggle Layouts`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyL`}],h=new Map(m.map(e=>[e.id,e])),g=typeof window<`u`&&c()!==void 0;function _(e,t=g){return t&&e.desktopBinding?e.desktopBinding:e.defaultBinding}function v(e){let t=e.code;if(!t||/^(Control|Alt|Shift|Meta)(Left|Right)$/.test(t))return null;let n=[];return e.ctrlKey&&n.push(`ctrl`),e.altKey&&n.push(`alt`),e.shiftKey&&n.push(`shift`),e.metaKey&&n.push(`meta`),n.length===0?null:(n.push(t),n.join(`+`))}var y={ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`},b={Comma:`,`,Period:`.`,Backquote:"`",Slash:`/`,Backslash:`\\`,Minus:`-`,Equal:`=`,Space:`␣`,Enter:`↵`,Escape:`Esc`,Tab:`⇥`,BracketLeft:`[`,BracketRight:`]`};function x(e){return e.startsWith(`Key`)?e.slice(3):e.startsWith(`Digit`)?e.slice(5):b[e]??e}function S(e){if(!e)return`—`;let t=e.split(`+`),n=t.pop()??``;return t.map(e=>y[e]??e).join(``)+x(n)}var C=new Map;function w(e,t){return C.set(e,t),()=>{C.get(e)===t&&C.delete(e)}}var T=e=>C.get(e),E=e=>h.get(e);function D(e,t){return e.hold===!0||e.id===`editor.save`||t&&e.editor!==!0}var O={},k=new Set,A=j();function j(){let e={};for(let t of m)e[t.id]=O[t.id]||_(t);return e}function M(e){O=e??{},A=j(),k.forEach(e=>e())}var N=e=>A[e]??``;function P(e){for(let[t,n]of Object.entries(A))if(n===e)return t}function F(e){return S(I()[e]??``)}function I(){return(0,s.useSyncExternalStore)(e=>(k.add(e),()=>k.delete(e)),()=>A)}var L=500,R=1e4;function z(e,t){return`${e} ${t}`}var B=new class{ws=null;open=!1;backoff=L;reconnectTimer=null;theme=null;terminals=new Map;notificationListeners=new Set;statusListeners=new Set;renameListeners=new Set;accountListeners=new Set;switchListeners=new Set;sessionsChangedListeners=new Set;hostUpdatesListeners=new Set;connectionListeners=new Set;shellWaiters=new Map;attach(e,t,n,r,i){let a={session:e,term:t,cols:n,rows:r,handlers:i,ready:!1,live:!1,pendingResize:!1};return this.terminals.set(z(e,t),a),this.ensureConnected(),this.open&&this.send({t:`attach`,session:e,term:t,cols:n,rows:r}),()=>this.detach(e,t)}detach(e,t){this.terminals.delete(z(e,t))&&this.open&&this.send({t:`detach`,session:e,term:t})}write(e,t,n){this.open&&this.terminals.get(z(e,t))?.ready&&this.send({t:`stdin`,session:e,term:t,data:n})}resize(e,t,n,r){let i=this.terminals.get(z(e,t));i&&(i.cols=n,i.rows=r,this.open&&i.ready?this.send({t:`resize`,session:e,term:t,cols:n,rows:r}):i.pendingResize=!0)}spawnShell(e){return this.ensureConnected(),this.open?new Promise((t,n)=>{let r=this.shellWaiters.get(e)??[];r.push({resolve:t,reject:n}),this.shellWaiters.set(e,r),this.open&&this.send({t:`spawn-shell`,session:e})}):Promise.reject(Error(`Connection is unavailable`))}killShell(e,t){this.open&&this.send({t:`kill-shell`,session:e,term:t})}onStatus(e){return this.statusListeners.add(e),this.ensureConnected(),()=>this.statusListeners.delete(e)}onAgentNotification(e){return this.notificationListeners.add(e),this.ensureConnected(),()=>this.notificationListeners.delete(e)}onRenamed(e){return this.renameListeners.add(e),this.ensureConnected(),()=>this.renameListeners.delete(e)}onAccount(e){return this.accountListeners.add(e),this.ensureConnected(),()=>this.accountListeners.delete(e)}onSessionSwitched(e){return this.switchListeners.add(e),this.ensureConnected(),()=>this.switchListeners.delete(e)}onSessionsChanged(e){return this.sessionsChangedListeners.add(e),this.ensureConnected(),()=>this.sessionsChangedListeners.delete(e)}onConnectionChange(e){return this.connectionListeners.add(e),()=>this.connectionListeners.delete(e)}onHostUpdatesChanged(e){return this.hostUpdatesListeners.add(e),this.ensureConnected(),()=>this.hostUpdatesListeners.delete(e)}isConnected(){return this.open}reportTheme(e,t){this.theme&&this.theme.fg===e&&this.theme.bg===t||(this.theme={fg:e,bg:t},this.open&&this.send({t:`theme`,fg:e,bg:t}))}reset(){this.ws?.close()}switchHost(){let e=this.ws;this.ws=null,this.open=!1,this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.terminals.clear();for(let e of this.shellWaiters.values())for(let t of e)t.reject(Error(`Host changed`));this.shellWaiters.clear(),e?.close();for(let e of this.connectionListeners)e(!1)}ensureConnected(){this.ws||this.reconnectTimer||this.connect()}connect(){let e=a.get(),t=i();if(!e&&!t)return;let n=window.location.protocol===`https:`?`wss`:`ws`,o=t?t.socket():new WebSocket(`${n}://${window.location.host}/ws`);this.ws=o,o.addEventListener(`open`,()=>{if(this.ws!==o){o.close();return}t||o.send(JSON.stringify({t:`auth`,token:e}))}),o.addEventListener(`message`,e=>{if(this.ws!==o)return;let t;try{t=JSON.parse(String(e.data))}catch{return}if(t.t===`authenticated`){if(this.open)return;this.open=!0,this.backoff=L,this.send({t:`subscribe-status`}),this.theme&&this.send({t:`theme`,...this.theme});for(let e of this.terminals.values()){e.ready=!1,e.pendingResize=!1;let{session:t,term:n,cols:r,rows:i}=e;this.send({t:`attach`,session:t,term:n,cols:r,rows:i})}for(let e of this.connectionListeners)e(!0)}else this.open&&this.handle(t)}),o.addEventListener(`close`,e=>{if(this.ws!==o)return;let t=this.open;this.open=!1,this.ws=null;for(let e of this.shellWaiters.values())for(let t of e)t.reject(Error(`Connection lost; operation outcome is unknown`));if(this.shellWaiters.clear(),t)for(let e of this.connectionListeners)e(!1);if(e.code===4401&&e.reason===`browser_rejected`){r();return}this.scheduleReconnect()})}scheduleReconnect(){this.reconnectTimer||this.terminals.size===0&&this.statusListeners.size===0&&this.notificationListeners.size===0&&this.renameListeners.size===0&&this.accountListeners.size===0&&this.switchListeners.size===0&&this.sessionsChangedListeners.size===0||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},this.backoff),this.backoff=Math.min(this.backoff*2,R))}send(e){this.open&&this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e))}handle(e){switch(e.t){case`agent-notification`:for(let t of this.notificationListeners)t(e);break;case`replay`:{let t=this.terminals.get(z(e.session,e.term));if(!t)break;if(t.ready=!0,t.pendingResize){t.pendingResize=!1;let{session:e,term:n,cols:r,rows:i}=t;this.send({t:`resize`,session:e,term:n,cols:r,rows:i})}t.handlers.onData(e.data,e.t);break}case`output`:this.terminals.get(z(e.session,e.term))?.handlers.onData(e.data,e.t);break;case`exit`:{let t=this.terminals.get(z(e.session,e.term));t&&(t.ready=!1,t.handlers.onExit?.(e.code)),e.term===`agent`&&t&&(t.live=!1);break}case`status`:{let t=[`starting`,`running`,`waiting_input`].includes(e.status);for(let n of this.terminals.values())if(!(n.session!==e.session||n.term!==`agent`)){if(t&&!n.live){n.ready=!1,n.pendingResize=!1;let{session:e,term:t,cols:r,rows:i}=n;this.send({t:`attach`,session:e,term:t,cols:r,rows:i})}n.live=t}for(let t of this.statusListeners)t({session:e.session,status:e.status,last_activity_at:e.last_activity_at});break}case`renamed`:for(let t of this.renameListeners)t({session:e.session,title:e.title,agent_title:e.agent_title,osc_title:e.osc_title});break;case`account`:for(let t of this.accountListeners)t({account_id:e.account_id,profile_id:e.profile_id,logged_in:e.logged_in});break;case`session-switched`:for(let t of this.switchListeners)t(e);break;case`sessions-changed`:for(let t of this.sessionsChangedListeners)t(e);break;case`host-updates-changed`:for(let e of this.hostUpdatesListeners)e();break;case`shell-spawned`:{let t=this.shellWaiters.get(e.session)?.shift();t&&t.resolve(e.term);break}case`notice`:(e.level===`warning`?o.warning:o.error)(e.title,{...e.detail===void 0?{}:{description:e.detail},duration:12e3});break;case`error`:o.error(`Connection error`,{description:e.message});break}}};export{f as _,v as a,l as b,T as c,w as d,M as f,u as g,F as h,P as i,N as l,I as m,m as n,S as o,_ as p,p as r,E as s,B as t,D as u,d as v,c as y};
@@ -1 +1 @@
1
- import{h as e}from"./editor.api2-4X9Vh9Zw.js";var t={comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<`,`>`]],autoClosingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],surroundingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],onEnterRules:[{beforeText:RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},n={defaultToken:``,tokenPostfix:`.xml`,ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,``],{include:`@whitespace`},[/(<)(@qualifiedName)/,[{token:`delimiter`},{token:`tag`,next:`@tag`}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:`delimiter`},{token:`tag`},``,{token:`delimiter`}]],[/(<\?)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/(<\!)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/<\!\[CDATA\[/,{token:`delimiter.cdata`,next:`@cdata`}],[/&\w+;/,`string.escape`]],cdata:[[/[^\]]+/,``],[/\]\]>/,{token:`delimiter.cdata`,next:`@pop`}],[/\]/,``]],tag:[[/[ \t\r\n]+/,``],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,[`attribute.name`,``,`attribute.value`]],[/@qualifiedName/,`attribute.name`],[/\?>/,{token:`delimiter`,next:`@pop`}],[/(\/)(>)/,[{token:`tag`},{token:`delimiter`,next:`@pop`}]],[/>/,{token:`delimiter`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[/<!--/,{token:`comment`,next:`@comment`}]],comment:[[/[^<\-]+/,`comment.content`],[/-->/,{token:`comment`,next:`@pop`}],[/<!--/,`comment.content.invalid`],[/[<\-]/,`comment.content`]]}};export{t as conf,n as language};
1
+ import{h as e}from"./editor.api2-DTL_SiN1.js";var t={comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<`,`>`]],autoClosingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],surroundingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],onEnterRules:[{beforeText:RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},n={defaultToken:``,tokenPostfix:`.xml`,ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,``],{include:`@whitespace`},[/(<)(@qualifiedName)/,[{token:`delimiter`},{token:`tag`,next:`@tag`}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:`delimiter`},{token:`tag`},``,{token:`delimiter`}]],[/(<\?)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/(<\!)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/<\!\[CDATA\[/,{token:`delimiter.cdata`,next:`@cdata`}],[/&\w+;/,`string.escape`]],cdata:[[/[^\]]+/,``],[/\]\]>/,{token:`delimiter.cdata`,next:`@pop`}],[/\]/,``]],tag:[[/[ \t\r\n]+/,``],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,[`attribute.name`,``,`attribute.value`]],[/@qualifiedName/,`attribute.name`],[/\?>/,{token:`delimiter`,next:`@pop`}],[/(\/)(>)/,[{token:`tag`},{token:`delimiter`,next:`@pop`}]],[/>/,{token:`delimiter`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[/<!--/,{token:`comment`,next:`@comment`}]],comment:[[/[^<\-]+/,`comment.content`],[/-->/,{token:`comment`,next:`@pop`}],[/<!--/,`comment.content.invalid`],[/[<\-]/,`comment.content`]]}};export{t as conf,n as language};
@@ -1 +1 @@
1
- import{h as e}from"./editor.api2-4X9Vh9Zw.js";var t={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},n={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{t as conf,n as language};
1
+ import{h as e}from"./editor.api2-DTL_SiN1.js";var t={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},n={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{t as conf,n as language};
@@ -47,15 +47,16 @@
47
47
  // Storage disabled or unreadable: the module's own init still runs.
48
48
  }
49
49
  </script>
50
- <script type="module" crossorigin src="/assets/index-Nd31gVbt.js"></script>
50
+ <script type="module" crossorigin src="/assets/index-Doe7MhnI.js"></script>
51
51
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-QTnfLwEv.js">
52
52
  <link rel="modulepreload" crossorigin href="/assets/react-CZI7_Jkm.js">
53
53
  <link rel="modulepreload" crossorigin href="/assets/react-dom-cJyBB_A4.js">
54
- <link rel="modulepreload" crossorigin href="/assets/auth-olLlgxc3.js">
54
+ <link rel="modulepreload" crossorigin href="/assets/auth-CdosKReE.js">
55
55
  <link rel="modulepreload" crossorigin href="/assets/client-settings-DhfHheKR.js">
56
+ <link rel="modulepreload" crossorigin href="/assets/theme-swfNLod9.js">
56
57
  <link rel="modulepreload" crossorigin href="/assets/jsx-runtime-By8HlURe.js">
57
58
  <link rel="modulepreload" crossorigin href="/assets/preload-helper-Czpn1I53.js">
58
- <link rel="stylesheet" crossorigin href="/assets/index-DAZZvnBz.css">
59
+ <link rel="stylesheet" crossorigin href="/assets/index-4XrK4Fes.css">
59
60
  </head>
60
61
  <body>
61
62
  <div id="root"></div>
package/dist/pudl.js CHANGED
@@ -14,7 +14,7 @@ import { parseArgs } from "node:util";
14
14
  import { setTimeout as delay } from "node:timers/promises";
15
15
 
16
16
  // ../shared/src/protocol.ts
17
- var PROTOCOL_VERSION = { major: 26, minor: 1 };
17
+ var PROTOCOL_VERSION = { major: 26, minor: 3 };
18
18
  function supportsApplicationFeature(peer, introduced, client = PROTOCOL_VERSION) {
19
19
  return peer?.major === client.major && (peer.major > introduced.major || peer.major === introduced.major && peer.minor >= introduced.minor);
20
20
  }
@@ -14759,10 +14759,15 @@ function hostUpdateTerminal(phase) {
14759
14759
 
14760
14760
  // ../shared/src/installation/catalogue.ts
14761
14761
  var releaseRepositorySchema = external_exports.string().max(201).regex(/^[A-Za-z0-9][A-Za-z0-9_.-]*\/[A-Za-z0-9_.-]+$/).refine((value) => ![".", ".."].includes(value.split("/")[1]));
14762
+ var availableRelease = external_exports.object({
14763
+ version: external_exports.string().max(64).regex(/^[0-9]+\.[0-9]+\.[0-9]+$/),
14764
+ host_asset: external_exports.boolean()
14765
+ }).strict();
14762
14766
  var timestamp2 = external_exports.number().int().nonnegative().safe();
14763
14767
  var hostReleaseCheckSchema = external_exports.object({
14764
14768
  repository: releaseRepositorySchema.nullable(),
14765
14769
  state: external_exports.enum(["unconfigured", "checking", "ready", "failed"]),
14770
+ components: external_exports.object({ daemon: availableRelease, runtime: availableRelease }).strict().optional(),
14766
14771
  checked_at: timestamp2.nullable(),
14767
14772
  succeeded_at: timestamp2.nullable(),
14768
14773
  latest: external_exports.object({
@@ -14803,7 +14808,8 @@ var hostUpdateCommandSchema = external_exports.discriminatedUnion("action", [
14803
14808
  /** Recorded continuation metadata, capability-detected from application 25.12. */
14804
14809
  include_recovery: external_exports.literal(true).optional(),
14805
14810
  /** Host-wide versions and coalesced release discovery (25.14), never admission evidence. */
14806
- include_catalogue: external_exports.literal(true).optional()
14811
+ include_catalogue: external_exports.literal(true).optional(),
14812
+ include_component_releases: external_exports.literal(true).optional()
14807
14813
  }).strict().refine(
14808
14814
  (command) => !command.adoption_nonce || command.id !== void 0,
14809
14815
  "Adoption inspection requires an exact operation"
@@ -15032,6 +15038,9 @@ var sessionDefaultsSchema = external_exports.looseObject({
15032
15038
  terminal: sessionSeedSchema.optional()
15033
15039
  });
15034
15040
  var profileSettingsSchema = external_exports.looseObject({
15041
+ /** Host identity for this profile on this daemon; deliberately excluded from sync. */
15042
+ hostIcon: external_exports.string().max(64).nullable().optional(),
15043
+ hostColour: external_exports.enum(PROFILE_ICON_COLOURS).nullable().optional(),
15035
15044
  allowSkipPermissions: external_exports.boolean().default(false),
15036
15045
  /**
15037
15046
  * Captured session environment (SPEC §4): whether this profile's session
@@ -16159,7 +16168,7 @@ var cockpitHostUpdateRequestSchema = external_exports.discriminatedUnion("action
16159
16168
  ...onlineHostUpdateRequestSchema.options,
16160
16169
  external_exports.object({ action: external_exports.literal("continue-offline"), reference: hostUpdateReferenceSchema }).strict()
16161
16170
  ]);
16162
- var cockpitHostUpdateQuerySchema = external_exports.object({ id: external_exports.uuid().optional() }).strict();
16171
+ var cockpitHostUpdateQuerySchema = external_exports.object({ id: external_exports.uuid().optional(), components: external_exports.literal("1").optional() }).strict();
16163
16172
  var operation = hostUpdateOperationSchema.shape;
16164
16173
  var cockpitHostUpdateOperationSchema = external_exports.object({
16165
16174
  id: operation.id,
@@ -16205,7 +16214,11 @@ var cockpitHostUpdateStatusSchema = external_exports.object({
16205
16214
 
16206
16215
  // ../shared/src/api/connection/host-maintenance.ts
16207
16216
  var hostMaintenanceCommandSchema = external_exports.discriminatedUnion("action", [
16208
- external_exports.object({ action: external_exports.literal("status"), id: external_exports.uuid().optional() }).strict(),
16217
+ external_exports.object({
16218
+ action: external_exports.literal("status"),
16219
+ id: external_exports.uuid().optional(),
16220
+ include_component_releases: external_exports.literal(true).optional()
16221
+ }).strict(),
16209
16222
  ...onlineHostUpdateRequestSchema.options
16210
16223
  ]);
16211
16224
  var hostMaintenanceReplySchema = external_exports.discriminatedUnion("kind", [
@@ -16947,10 +16960,22 @@ var notebookExecutionSchema = external_exports.object({
16947
16960
  input: notebookInputSchema.optional(),
16948
16961
  error: external_exports.string().max(32768).optional()
16949
16962
  });
16950
- var notebookExecutionRequestSchema = external_exports.object({ source: compilationFileTargetSchema });
16963
+ var notebookRevisionSchema = external_exports.object({
16964
+ id: external_exports.string().uuid(),
16965
+ revision: external_exports.number().int().nonnegative()
16966
+ }).nullable();
16967
+ var notebookExecutionRequestSchema = external_exports.object({
16968
+ source: compilationFileTargetSchema,
16969
+ /** Opt in to an unchanged reply; omission always asks for a full snapshot. */
16970
+ known: notebookRevisionSchema.optional()
16971
+ });
16951
16972
  var notebookExecutionResponseSchema = external_exports.object({
16952
16973
  execution: notebookExecutionSchema.nullable()
16953
16974
  });
16975
+ var notebookObservationResponseSchema = external_exports.union([
16976
+ notebookExecutionResponseSchema,
16977
+ external_exports.object({ unchanged: external_exports.literal(true) })
16978
+ ]);
16954
16979
  var notebookInputReplySchema = external_exports.object({
16955
16980
  source: compilationFileTargetSchema,
16956
16981
  run_id: external_exports.string().uuid(),
@@ -17855,6 +17880,39 @@ var hostReleaseCapabilitiesSchema = external_exports.object({
17855
17880
  database_schema_version: external_exports.number().int().nonnegative().max(2 ** 31 - 1).optional()
17856
17881
  }).strict();
17857
17882
 
17883
+ // ../shared/src/installation/release-manifest.ts
17884
+ var releaseVersionSchema = external_exports.string().max(64).regex(/^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/);
17885
+ var releaseComponentSchema = external_exports.enum(["cockpit", "daemon", "runtime"]);
17886
+ var releaseManifestSchema = external_exports.object({
17887
+ format: external_exports.literal(1),
17888
+ version: releaseVersionSchema,
17889
+ components: external_exports.object({
17890
+ cockpit: releaseVersionSchema,
17891
+ daemon: releaseVersionSchema,
17892
+ runtime: releaseVersionSchema
17893
+ }).strict()
17894
+ }).strict().superRefine((manifest, context) => {
17895
+ if (![manifest.version, ...Object.values(manifest.components)].every(
17896
+ (version2) => releaseVersionSchema.safeParse(version2).success
17897
+ ))
17898
+ return;
17899
+ for (const [component2, version2] of Object.entries(manifest.components)) {
17900
+ if (compareReleaseVersions(version2, manifest.version) > 0)
17901
+ context.addIssue({ code: "custom", message: `${component2} points beyond its release` });
17902
+ }
17903
+ if (manifest.components.cockpit !== manifest.version)
17904
+ context.addIssue({ code: "custom", message: "Every release publishes its cockpit" });
17905
+ });
17906
+ function compareReleaseVersions(a, b) {
17907
+ const left = a.split(".").map(BigInt);
17908
+ const right = b.split(".").map(BigInt);
17909
+ for (let i = 0; i < 3; i++) {
17910
+ if (left[i] < right[i]) return -1;
17911
+ if (left[i] > right[i]) return 1;
17912
+ }
17913
+ return 0;
17914
+ }
17915
+
17858
17916
  // ../shared/src/installation/removal/services.ts
17859
17917
  var service = hostServiceReplacementSchema.shape;
17860
17918
  var target = external_exports.object({ kind: service.kind, name: service.name, domain: service.domain }).strict();
@@ -18069,6 +18127,18 @@ var hostPurgeApplySchema = external_exports.object({
18069
18127
  attempt_id: external_exports.uuid()
18070
18128
  }).strict();
18071
18129
 
18130
+ // ../shared/src/node/releases/github.ts
18131
+ var assetSchema = external_exports.object({
18132
+ name: external_exports.string().min(1).max(256),
18133
+ browser_download_url: external_exports.string().max(2048).url().refine((value) => value.startsWith("https://"))
18134
+ });
18135
+ var releaseSchema = external_exports.object({
18136
+ tag_name: external_exports.string().max(129).regex(/^v?[0-9]+\.[0-9]+\.[0-9]+$/),
18137
+ draft: external_exports.literal(false).optional(),
18138
+ prerelease: external_exports.literal(false).optional(),
18139
+ assets: external_exports.array(assetSchema).max(1024).default([])
18140
+ });
18141
+
18072
18142
  // ../shared/src/node/control/update-authority.ts
18073
18143
  var HostUpdateOnlyScope = class {
18074
18144
  outgoing;
@@ -18233,18 +18303,6 @@ import { execFile } from "node:child_process";
18233
18303
  import { promisify } from "node:util";
18234
18304
  var execute = promisify(execFile);
18235
18305
 
18236
- // ../shared/src/node/releases/github.ts
18237
- var assetSchema = external_exports.object({
18238
- name: external_exports.string().min(1).max(256),
18239
- browser_download_url: external_exports.string().max(2048).url().refine((value) => value.startsWith("https://"))
18240
- });
18241
- var releaseSchema = external_exports.object({
18242
- tag_name: external_exports.string().max(129).regex(/^v?[0-9]+\.[0-9]+\.[0-9]+$/),
18243
- draft: external_exports.literal(false).optional(),
18244
- prerelease: external_exports.literal(false).optional(),
18245
- assets: external_exports.array(assetSchema).max(1024).default([])
18246
- });
18247
-
18248
18306
  // ../shared/src/node/control/requests.ts
18249
18307
  import { randomUUID } from "node:crypto";
18250
18308
  var HOST_CONTROL_REQUEST_LIMITS = {
@@ -18625,6 +18683,43 @@ var hostPaths = {
18625
18683
  pid: `${HOST_HOME}/puddled.pid`
18626
18684
  };
18627
18685
 
18686
+ // src/lib/transport/exec-output.ts
18687
+ var STDERR_TAIL_LENGTH = 64 * 1024;
18688
+ function collectExecOutput(child, opts) {
18689
+ return new Promise((resolve2) => {
18690
+ let stdout = "";
18691
+ let stderr = "";
18692
+ const appendStderr = (text2) => {
18693
+ stderr += text2;
18694
+ if (opts.capture === "stream") stderr = stderr.slice(-STDERR_TAIL_LENGTH);
18695
+ };
18696
+ let timer;
18697
+ if (opts.timeoutMs !== void 0) {
18698
+ timer = setTimeout(() => child.kill("SIGKILL"), opts.timeoutMs);
18699
+ timer.unref();
18700
+ }
18701
+ child.stdout.setEncoding("utf8");
18702
+ child.stderr.setEncoding("utf8");
18703
+ child.stdout.on("data", (text2) => {
18704
+ if (opts.capture !== "stream") stdout += text2;
18705
+ opts.onStdout?.(text2);
18706
+ });
18707
+ child.stderr.on("data", appendStderr);
18708
+ child.on("error", (err) => {
18709
+ if (timer) clearTimeout(timer);
18710
+ appendStderr(String(err));
18711
+ resolve2({ code: -1, stdout, stderr });
18712
+ });
18713
+ child.on("close", (code) => {
18714
+ if (timer) clearTimeout(timer);
18715
+ resolve2({ code: code ?? -1, stdout, stderr });
18716
+ });
18717
+ child.stdin.on("error", () => {
18718
+ });
18719
+ child.stdin.end(opts.stdin);
18720
+ });
18721
+ }
18722
+
18628
18723
  // src/lib/transport/ssh.ts
18629
18724
  var SshTransport = class {
18630
18725
  constructor(host, opts = {}) {
@@ -18746,37 +18841,11 @@ var SshTransport = class {
18746
18841
  });
18747
18842
  }
18748
18843
  exec(command, opts = {}) {
18749
- return new Promise((resolve2) => {
18750
- const child = spawn(this.ssh, this.args(this.host, "--", `sh -c ${shellQuote(command)}`), {
18751
- stdio: ["pipe", "pipe", "pipe"],
18752
- env: this.spawnEnv()
18753
- });
18754
- let stdout = "";
18755
- let stderr = "";
18756
- let timer;
18757
- if (opts.timeoutMs !== void 0) {
18758
- timer = setTimeout(() => child.kill("SIGKILL"), opts.timeoutMs);
18759
- timer.unref();
18760
- }
18761
- child.stdout.on("data", (chunk) => {
18762
- const text2 = chunk.toString();
18763
- stdout += text2;
18764
- opts.onStdout?.(text2);
18765
- });
18766
- child.stderr.on("data", (chunk) => stderr += chunk.toString());
18767
- child.on("error", (err) => {
18768
- if (timer) clearTimeout(timer);
18769
- resolve2({ code: -1, stdout, stderr: stderr + String(err) });
18770
- });
18771
- child.on("close", (code) => {
18772
- if (timer) clearTimeout(timer);
18773
- resolve2({ code: code ?? -1, stdout, stderr });
18774
- });
18775
- child.stdin.on("error", () => {
18776
- });
18777
- if (opts.stdin !== void 0) child.stdin.end(opts.stdin);
18778
- else child.stdin.end();
18844
+ const child = spawn(this.ssh, this.args(this.host, "--", `sh -c ${shellQuote(command)}`), {
18845
+ stdio: ["pipe", "pipe", "pipe"],
18846
+ env: this.spawnEnv()
18779
18847
  });
18848
+ return collectExecOutput(child, opts);
18780
18849
  }
18781
18850
  /**
18782
18851
  * Run a command through a live SSH channel instead of waiting for a detached
@@ -18973,34 +19042,8 @@ var LocalTransport = class {
18973
19042
  kind = "local";
18974
19043
  label = "this machine";
18975
19044
  exec(command, opts = {}) {
18976
- return new Promise((resolve2) => {
18977
- const child = spawn2("sh", ["-c", command], { stdio: ["pipe", "pipe", "pipe"] });
18978
- let stdout = "";
18979
- let stderr = "";
18980
- let timer;
18981
- if (opts.timeoutMs !== void 0) {
18982
- timer = setTimeout(() => child.kill("SIGKILL"), opts.timeoutMs);
18983
- timer.unref();
18984
- }
18985
- child.stdout.on("data", (chunk) => {
18986
- const text2 = chunk.toString();
18987
- stdout += text2;
18988
- opts.onStdout?.(text2);
18989
- });
18990
- child.stderr.on("data", (chunk) => stderr += chunk.toString());
18991
- child.on("error", (err) => {
18992
- if (timer) clearTimeout(timer);
18993
- resolve2({ code: -1, stdout, stderr: stderr + String(err) });
18994
- });
18995
- child.on("close", (code) => {
18996
- if (timer) clearTimeout(timer);
18997
- resolve2({ code: code ?? -1, stdout, stderr });
18998
- });
18999
- child.stdin.on("error", () => {
19000
- });
19001
- if (opts.stdin !== void 0) child.stdin.end(opts.stdin);
19002
- else child.stdin.end();
19003
- });
19045
+ const child = spawn2("sh", ["-c", command], { stdio: ["pipe", "pipe", "pipe"] });
19046
+ return collectExecOutput(child, opts);
19004
19047
  }
19005
19048
  readFile(path2) {
19006
19049
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puddle-code/cli",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "puddle \u2014 self-hosted orchestrator for CLI coding agents: serves the cockpit UI and connects it to local or SSH hosts.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/PerceptronV/puddle-code#readme",