@intent-hq/web 2.312.0 → 2.313.0

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 (265) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{B2aHvKzW.js → -URcs0EB.js} +2 -2
  3. package/web/app/immutable/chunks/{BVEbTxE_.js → 04XFWhBd.js} +1 -1
  4. package/web/app/immutable/chunks/{C46TnD1H.js → 19F8thw1.js} +1 -1
  5. package/web/app/immutable/chunks/{bcv2TMVC.js → 28aV1Wzl.js} +1 -1
  6. package/web/app/immutable/chunks/{C6_fF-vn.js → 2O2vJlPl.js} +1 -1
  7. package/web/app/immutable/chunks/{lGuvxH0P.js → 2bp47GFs.js} +1 -1
  8. package/web/app/immutable/chunks/{DiN36N-2.js → 2g3BKwo_.js} +2 -2
  9. package/web/app/immutable/chunks/2zKcFAvZ.js +1 -0
  10. package/web/app/immutable/chunks/3V4Tx4nH.js +1 -0
  11. package/web/app/immutable/chunks/{DMiVWfnj.js → 4CMzT_BI.js} +1 -1
  12. package/web/app/immutable/chunks/{DFo_icpD.js → 6uLD17LP.js} +1 -1
  13. package/web/app/immutable/chunks/{onlOqkEU.js → 77JHYRqp.js} +22 -22
  14. package/web/app/immutable/chunks/{Ddfj4iOJ.js → 7IyNIHph.js} +1 -1
  15. package/web/app/immutable/chunks/{CiN55CeC.js → 7ZJvg7ev.js} +1 -1
  16. package/web/app/immutable/chunks/{B63GdhMJ.js → 992RyGqf.js} +1 -1
  17. package/web/app/immutable/chunks/{ChqSx7V8.js → 9sI_nbHm.js} +1 -1
  18. package/web/app/immutable/chunks/{BDPd3Gxs.js → AGSVFpXc.js} +1 -1
  19. package/web/app/immutable/chunks/{B1Yylqx8.js → B-agcRbG.js} +1 -1
  20. package/web/app/immutable/chunks/{Dwxm4mRs.js → B-rSL5ZP.js} +2 -2
  21. package/web/app/immutable/chunks/{D25S3m8c.js → B-xGvc_0.js} +1 -1
  22. package/web/app/immutable/chunks/{DB5R3D7Y.js → B0qtRhuw.js} +1 -1
  23. package/web/app/immutable/chunks/{BnAX9yTi.js → B1Rrvp0b.js} +1 -1
  24. package/web/app/immutable/chunks/{LnbsKux_.js → B2RRuLl5.js} +1 -1
  25. package/web/app/immutable/chunks/{8ZUxx0Co.js → B3nB6DWs.js} +1 -1
  26. package/web/app/immutable/chunks/{CWKTWYM7.js → B6mHy78M.js} +1 -1
  27. package/web/app/immutable/chunks/{Yu0gam1U.js → B6oQfzis.js} +1 -1
  28. package/web/app/immutable/chunks/{CLevwIvK.js → B7-651e2.js} +1 -1
  29. package/web/app/immutable/chunks/{Co6qQZL7.js → B721JIop.js} +2 -2
  30. package/web/app/immutable/chunks/{BXmFIcIP.js → B8VhjfbW.js} +1 -1
  31. package/web/app/immutable/chunks/{Z5fbCd-X.js → B9F8nd-t.js} +4 -4
  32. package/web/app/immutable/chunks/{CddrLe5o.js → B9pAuhbK.js} +1 -1
  33. package/web/app/immutable/chunks/{BqddjWz6.js → BAQDI3wv.js} +1 -1
  34. package/web/app/immutable/chunks/BAqR9jtB.js +1 -0
  35. package/web/app/immutable/chunks/{ZjB_ER6s.js → BBRz8JFJ.js} +1 -1
  36. package/web/app/immutable/chunks/{li27w4Od.js → BCDWZbwh.js} +1 -1
  37. package/web/app/immutable/chunks/{B195Jf7v.js → BCoW5DN6.js} +3 -3
  38. package/web/app/immutable/chunks/{CVVkCR3K.js → BDGDJyji.js} +1 -1
  39. package/web/app/immutable/chunks/{C6AEaqMK.js → BDICjj7k.js} +1 -1
  40. package/web/app/immutable/chunks/{DGjSXQQ8.js → BDXCy3lH.js} +1 -1
  41. package/web/app/immutable/chunks/{htWd8PdL.js → BE-b7v7R.js} +1 -1
  42. package/web/app/immutable/chunks/{BlvwJgNV.js → BEVpCf6b.js} +1 -1
  43. package/web/app/immutable/chunks/{DaUwNiAB.js → BFETMHTz.js} +3 -3
  44. package/web/app/immutable/chunks/{uxsR8mHg.js → BFpzDysH.js} +1 -1
  45. package/web/app/immutable/chunks/{-g2yD8nW.js → BGGxKX5q.js} +1 -1
  46. package/web/app/immutable/chunks/{CcoNUQ4q.js → BGYaMCAp.js} +1 -1
  47. package/web/app/immutable/chunks/{B1fMeJph.js → BHqHNrOT.js} +1 -1
  48. package/web/app/immutable/chunks/{CpLMWsmF.js → BKTydVIY.js} +1 -1
  49. package/web/app/immutable/chunks/{BJ9Pk-Qc.js → BLDT4lze.js} +1 -1
  50. package/web/app/immutable/chunks/{BlzuC8vd.js → BM7ZHc1t.js} +2 -2
  51. package/web/app/immutable/chunks/{Cu9hF6Lj.js → BMkc6ng0.js} +1 -1
  52. package/web/app/immutable/chunks/{66T_vlm_.js → BN6Sv1MY.js} +1 -1
  53. package/web/app/immutable/chunks/{C8M-Eryf.js → BNHRvqeQ.js} +1 -1
  54. package/web/app/immutable/chunks/{BY5CEwGM.js → BNasdn-P.js} +1 -1
  55. package/web/app/immutable/chunks/{DU64vtBR.js → BPk16bSc.js} +1 -1
  56. package/web/app/immutable/chunks/{Dm_KenRX.js → BQFqw3YD.js} +1 -1
  57. package/web/app/immutable/chunks/{Bk-q0J3W.js → BR8jrnEs.js} +1 -1
  58. package/web/app/immutable/chunks/{CcnOA9dj.js → BRNfUSNR.js} +1 -1
  59. package/web/app/immutable/chunks/{DaA44xVk.js → BSwWMzab.js} +5 -5
  60. package/web/app/immutable/chunks/{B1LFg8Ni.js → BUjtm23k.js} +1 -1
  61. package/web/app/immutable/chunks/{K1Aj4aiz.js → BVkJyN1U.js} +2 -2
  62. package/web/app/immutable/chunks/{DEA2ISnw.js → BXMFG8vW.js} +1 -1
  63. package/web/app/immutable/chunks/{CmZ4R63v.js → BZ90Gl9e.js} +1 -1
  64. package/web/app/immutable/chunks/{qCTbBtmS.js → B_CpN824.js} +1 -1
  65. package/web/app/immutable/chunks/{D6Tu0KcL.js → B_ifqSee.js} +6 -6
  66. package/web/app/immutable/chunks/{3xBR6H3M.js → BaWcyleE.js} +1 -1
  67. package/web/app/immutable/chunks/{DNPjjQTW.js → Bc-8qHYh.js} +1 -1
  68. package/web/app/immutable/chunks/{Bg-wwj8e.js → Bc2zOKbx.js} +1 -1
  69. package/web/app/immutable/chunks/{wFaVm_je.js → BcVu_y1Z.js} +1 -1
  70. package/web/app/immutable/chunks/{Db_s6atq.js → BdetxH0g.js} +1 -1
  71. package/web/app/immutable/chunks/{Bgo6QmNg.js → Bf1tCDQg.js} +1 -1
  72. package/web/app/immutable/chunks/{Cts5KPIk.js → BfxxnTgV.js} +1 -1
  73. package/web/app/immutable/chunks/{0BDej8J9.js → BgUzpkp7.js} +1 -1
  74. package/web/app/immutable/chunks/{D728aNnl.js → BgyuoEGq.js} +1 -1
  75. package/web/app/immutable/chunks/{BUhKOoKe.js → BiMGZT5w.js} +2 -2
  76. package/web/app/immutable/chunks/BkKnMUvE.js +1 -0
  77. package/web/app/immutable/chunks/{Brz_LsyP.js → Bl_iEh1f.js} +1 -1
  78. package/web/app/immutable/chunks/{CFKI_75v.js → BlfjnWuH.js} +3 -3
  79. package/web/app/immutable/chunks/{B4eSJ_b5.js → Bops7MsY.js} +29 -29
  80. package/web/app/immutable/chunks/{RGxIilBQ.js → Bpy6Muvw.js} +4 -4
  81. package/web/app/immutable/chunks/Br5d6l04.js +1 -0
  82. package/web/app/immutable/chunks/{DHQetc-m.js → BtAYzBSd.js} +1 -1
  83. package/web/app/immutable/chunks/{Bj1XwsOw.js → Bvq2wF7r.js} +7 -7
  84. package/web/app/immutable/chunks/{cLppJexf.js → BwK5Bace.js} +1 -1
  85. package/web/app/immutable/chunks/{CwAr2bfc.js → BxiJOwnz.js} +1 -1
  86. package/web/app/immutable/chunks/{Civ86Ers.js → C0VJEx2v.js} +1 -1
  87. package/web/app/immutable/chunks/{BUJT8nbP.js → C11wqToa.js} +1 -1
  88. package/web/app/immutable/chunks/{D8Iqos3S.js → C1XicA-w.js} +1 -1
  89. package/web/app/immutable/chunks/{B95izTqM.js → C2L4VLjE.js} +1 -1
  90. package/web/app/immutable/chunks/C3X16aYc.js +1 -0
  91. package/web/app/immutable/chunks/{YdCQJnUj.js → C48G3Oh4.js} +1 -1
  92. package/web/app/immutable/chunks/{DwCiT34L.js → C4XQStEU.js} +1 -1
  93. package/web/app/immutable/chunks/{Q3Bjy5v7.js → C58wlt4Q.js} +2 -2
  94. package/web/app/immutable/chunks/{B6tJ7e7m.js → C5EEwI0-.js} +2 -2
  95. package/web/app/immutable/chunks/{CKcLU7Ix.js → C5Nz-crT.js} +1 -1
  96. package/web/app/immutable/chunks/{CHk37LgR.js → C5c-LdLT.js} +1 -1
  97. package/web/app/immutable/chunks/{C8G4GKsE.js → C6L7wkhi.js} +1 -1
  98. package/web/app/immutable/chunks/{QiI6ZCof.js → C8_w7W1W.js} +4 -4
  99. package/web/app/immutable/chunks/{BP22EbgY.js → C8reKsm7.js} +1 -1
  100. package/web/app/immutable/chunks/{D7b_n5fi.js → C9gP-gRX.js} +3 -3
  101. package/web/app/immutable/chunks/{DhmDkL56.js → CAK2j9T_.js} +1 -1
  102. package/web/app/immutable/chunks/{0KiNbR5l.js → CBwn70Pq.js} +1 -1
  103. package/web/app/immutable/chunks/{5jwgbfJ7.js → CBzaXebB.js} +1 -1
  104. package/web/app/immutable/chunks/{BIsm3Ahi.js → CCIxcA5l.js} +1 -1
  105. package/web/app/immutable/chunks/{3U-mPo_x.js → CCxcLQdk.js} +1 -1
  106. package/web/app/immutable/chunks/{DUIaBcOd.js → CDE88Tgk.js} +2 -2
  107. package/web/app/immutable/chunks/{GiRbWuMt.js → CEWfqweJ.js} +1 -1
  108. package/web/app/immutable/chunks/{Bqekhi5h.js → CHtSQ3Rg.js} +1 -1
  109. package/web/app/immutable/chunks/{BNn2h7IG.js → CJCZCJxO.js} +1 -1
  110. package/web/app/immutable/chunks/{19JeQ6BX.js → CKJYXvLT.js} +1 -1
  111. package/web/app/immutable/chunks/{M4M675TN.js → CM7ZaQP_.js} +1 -1
  112. package/web/app/immutable/chunks/{DsKjRYyi.js → CNMS2KOf.js} +1 -1
  113. package/web/app/immutable/chunks/CPfTSiRI.js +1 -0
  114. package/web/app/immutable/chunks/{BG1ODLUu.js → CPzgXxXu.js} +1 -1
  115. package/web/app/immutable/chunks/{T-DUA-1O.js → CRgLy9Dv.js} +1 -1
  116. package/web/app/immutable/chunks/{CFyiOaFx.js → CVvtz86e.js} +3 -3
  117. package/web/app/immutable/chunks/{Bh9tHAiY.js → CYlqp1HL.js} +49 -49
  118. package/web/app/immutable/chunks/{U838LLRH.js → CYtxGPAf.js} +1 -1
  119. package/web/app/immutable/chunks/CZI4_vlI.js +1 -0
  120. package/web/app/immutable/chunks/{CXqStKXr.js → C_73TJPq.js} +1 -1
  121. package/web/app/immutable/chunks/{D08RO1VG.js → CatH1hIe.js} +1 -1
  122. package/web/app/immutable/chunks/{BFbKEECb.js → Cb7SCycF.js} +1 -1
  123. package/web/app/immutable/chunks/{B6RmASgD.js → Ccf4dYFA.js} +1 -1
  124. package/web/app/immutable/chunks/{CWlg1b-s.js → CeQYwwry.js} +1 -1
  125. package/web/app/immutable/chunks/CgAzfuNr.js +1 -0
  126. package/web/app/immutable/chunks/{DPHQ6GUU.js → CnfYogWn.js} +1 -1
  127. package/web/app/immutable/chunks/{Z7mWElPD.js → Cnihm-Nc.js} +1 -1
  128. package/web/app/immutable/chunks/{BYLg_iMr.js → CoKEteoj.js} +1 -1
  129. package/web/app/immutable/chunks/{BsLhCljI.js → Cop9b2dY.js} +1 -1
  130. package/web/app/immutable/chunks/{OeYTP1p9.js → Cpw4G06I.js} +1 -1
  131. package/web/app/immutable/chunks/{BNVixDQg.js → Cpwl5RRn.js} +1 -1
  132. package/web/app/immutable/chunks/{BawsvKy-.js → CqzZhYYx.js} +1 -1
  133. package/web/app/immutable/chunks/{CPy8SeUf.js → Cw6SlTJ6.js} +2 -2
  134. package/web/app/immutable/chunks/{CIx9_tZJ.js → CxPdVa60.js} +1 -1
  135. package/web/app/immutable/chunks/{DRwfCI3n.js → CzRl1R1n.js} +1 -1
  136. package/web/app/immutable/chunks/{C1SG0POo.js → D-XHjwsv.js} +1 -1
  137. package/web/app/immutable/chunks/{CwwcEFDp.js → D-rJNj43.js} +1 -1
  138. package/web/app/immutable/chunks/{CgIYxUJQ.js → D0Dsw2tV.js} +1 -1
  139. package/web/app/immutable/chunks/{BPvrn9n_.js → D0NG9Gzz.js} +2 -2
  140. package/web/app/immutable/chunks/{DQpR_z9x.js → D0tEEJ7X.js} +1 -1
  141. package/web/app/immutable/chunks/{C3ePiQWu.js → D6DsI_Sr.js} +1 -1
  142. package/web/app/immutable/chunks/{ffaoYO6L.js → D9SqGY86.js} +1 -1
  143. package/web/app/immutable/chunks/{vOfkzWZD.js → DBfJXlLJ.js} +1 -1
  144. package/web/app/immutable/chunks/{Ba7aiW_M.js → DCcgbj-g.js} +1 -1
  145. package/web/app/immutable/chunks/{xXCdIyF3.js → DD-f8Y3V.js} +1 -1
  146. package/web/app/immutable/chunks/{D4dn9g8x.js → DE32xZOO.js} +1 -1
  147. package/web/app/immutable/chunks/{BtTToJTU.js → DEfnfMIS.js} +3 -3
  148. package/web/app/immutable/chunks/{CJ4_4cNv.js → DFq6CFhq.js} +1 -1
  149. package/web/app/immutable/chunks/{EyZ0nhwB.js → DFzMoFQx.js} +4 -4
  150. package/web/app/immutable/chunks/{BRYVEoAL.js → DGAww3vc.js} +1 -1
  151. package/web/app/immutable/chunks/{B_mg6-Vc.js → DH9gMPGd.js} +1 -1
  152. package/web/app/immutable/chunks/{wV3lKTnH.js → DJCJ21BX.js} +1 -1
  153. package/web/app/immutable/chunks/{C44r02pn.js → DKPwGUzq.js} +1 -1
  154. package/web/app/immutable/chunks/{vV7Eo_ua.js → DKXEy5Lq.js} +1 -1
  155. package/web/app/immutable/chunks/{DlM5T-ri.js → DKhv0I45.js} +1 -1
  156. package/web/app/immutable/chunks/{Bl-s542_.js → DNo4fphO.js} +1 -1
  157. package/web/app/immutable/chunks/{BVNJnx5b.js → DO2cS8JO.js} +1 -1
  158. package/web/app/immutable/chunks/{Bd8zPJ0R.js → DOzphY7c.js} +1 -1
  159. package/web/app/immutable/chunks/{QfXYPrZH.js → DPcbMgdd.js} +2 -2
  160. package/web/app/immutable/chunks/{CR_HWuhj.js → DPiGMYKs.js} +1 -1
  161. package/web/app/immutable/chunks/{rpm2NzpE.js → DQRxUuCh.js} +1 -1
  162. package/web/app/immutable/chunks/{Pow4u-14.js → DSRwOSd4.js} +1 -1
  163. package/web/app/immutable/chunks/{CIL9eyec.js → DTMKqgRU.js} +1 -1
  164. package/web/app/immutable/chunks/{CwBMLcFF.js → DW9ZR5Up.js} +1 -1
  165. package/web/app/immutable/chunks/{BMoOyvL9.js → DY6JypjK.js} +1 -1
  166. package/web/app/immutable/chunks/{BlZonKZY.js → DZ64qqlL.js} +1 -1
  167. package/web/app/immutable/chunks/{BIwSEl2U.js → DZuInc-o.js} +1 -1
  168. package/web/app/immutable/chunks/{Cee62BOx.js → D_uOXHFE.js} +1 -1
  169. package/web/app/immutable/chunks/{dzprHFyK.js → DaWdrOD0.js} +1 -1
  170. package/web/app/immutable/chunks/{CsQu3MKC.js → DcYvv2Iw.js} +1 -1
  171. package/web/app/immutable/chunks/{ZaVuh6Ie.js → DeBw56y4.js} +1 -1
  172. package/web/app/immutable/chunks/{BGpTsVFh.js → DfTvRpFp.js} +1 -1
  173. package/web/app/immutable/chunks/{BBg1ABUj.js → DgJXm20t.js} +1 -1
  174. package/web/app/immutable/chunks/{xQjZTcxq.js → DhAv1XMF.js} +1 -1
  175. package/web/app/immutable/chunks/{BPso9ZTU.js → DhXr1ZqD.js} +1 -1
  176. package/web/app/immutable/chunks/{C9Ba8Wsx.js → DiCMHWTR.js} +1 -1
  177. package/web/app/immutable/chunks/{tA5hPyrR.js → DiVHUgRZ.js} +2 -2
  178. package/web/app/immutable/chunks/{CMmlAySy.js → DijSalri.js} +1 -1
  179. package/web/app/immutable/chunks/{C1-APN-K.js → DkrnUdRW.js} +1 -1
  180. package/web/app/immutable/chunks/{CHKw7UrD.js → DmsGklpx.js} +1 -1
  181. package/web/app/immutable/chunks/{DCYjhyno.js → DoCNcHnE.js} +3 -3
  182. package/web/app/immutable/chunks/{CQolNqfo.js → DqLOhjhM.js} +8 -8
  183. package/web/app/immutable/chunks/{ZS63KZzT.js → DqTygHNa.js} +4 -4
  184. package/web/app/immutable/chunks/{X868iZaW.js → DsU6W5Yf.js} +1 -1
  185. package/web/app/immutable/chunks/{i6q5e9Bi.js → Dt9TrzFG.js} +1 -1
  186. package/web/app/immutable/chunks/{CMNPJIlE.js → DuRHazc8.js} +1 -1
  187. package/web/app/immutable/chunks/{CtZpQlR0.js → DuVelotc.js} +2 -2
  188. package/web/app/immutable/chunks/{sbHX8DXH.js → DvC622kv.js} +1 -1
  189. package/web/app/immutable/chunks/{aHlukoGt.js → DvExZ34Y.js} +1 -1
  190. package/web/app/immutable/chunks/{CUhYwYxv.js → DwbQaKgL.js} +1 -1
  191. package/web/app/immutable/chunks/{Co9bnw2t.js → DwdStl3H.js} +11 -11
  192. package/web/app/immutable/chunks/{B1XZ9Wy8.js → Dxpr5NqS.js} +1 -1
  193. package/web/app/immutable/chunks/{BwN9PPwq.js → DzfdD6YD.js} +1 -1
  194. package/web/app/immutable/chunks/EEJgvLyS.js +1 -0
  195. package/web/app/immutable/chunks/{BqAelQe2.js → IB-HmS7d.js} +1 -1
  196. package/web/app/immutable/chunks/{-dq3wJnW.js → Io79CQwx.js} +1 -1
  197. package/web/app/immutable/chunks/{CjJ2aG8c.js → KFwqetYG.js} +1 -1
  198. package/web/app/immutable/chunks/{BqK5afB2.js → LoSFphII.js} +1 -1
  199. package/web/app/immutable/chunks/{CXsLrVJH.js → OS5fDMId.js} +1 -1
  200. package/web/app/immutable/chunks/{OAsZcRpW.js → P4NanOkc.js} +1 -1
  201. package/web/app/immutable/chunks/{Frujgmwq.js → PTzYQcOR.js} +1 -1
  202. package/web/app/immutable/chunks/{DYe4BNIz.js → QCq950da.js} +1 -1
  203. package/web/app/immutable/chunks/{8rrBGDgQ.js → UuiGcpAE.js} +1 -1
  204. package/web/app/immutable/chunks/{SU_Zxid7.js → V553m0MO.js} +1 -1
  205. package/web/app/immutable/chunks/{CWlxHxOH.js → X-W6j8OD.js} +1 -1
  206. package/web/app/immutable/chunks/{CpbXsTys.js → XzWc0fs1.js} +1 -1
  207. package/web/app/immutable/chunks/{rWFIPcdV.js → Y6LratEc.js} +1 -1
  208. package/web/app/immutable/chunks/{DFV_t0gv.js → YH3VI7O_.js} +1 -1
  209. package/web/app/immutable/chunks/{ICkI56ZY.js → _4p7wl12.js} +1 -1
  210. package/web/app/immutable/chunks/{CDGEKoBr.js → aegF9YRH.js} +1 -1
  211. package/web/app/immutable/chunks/{URtDzPe4.js → cUCU_6OD.js} +1 -1
  212. package/web/app/immutable/chunks/{BDF6V5e0.js → dKjrvSqn.js} +1 -1
  213. package/web/app/immutable/chunks/{17TgXovQ.js → gqVNwlAV.js} +1 -1
  214. package/web/app/immutable/chunks/{BEBrFxQu.js → h4HcKsDl.js} +1 -1
  215. package/web/app/immutable/chunks/{C6JSYFyu.js → hacdNVQl.js} +1 -1
  216. package/web/app/immutable/chunks/{DjeoEINQ.js → hcpthRFf.js} +1 -1
  217. package/web/app/immutable/chunks/{SAR1HpYu.js → i92hRJko.js} +3 -3
  218. package/web/app/immutable/chunks/{DyLPqvAi.js → jvw1Fn3k.js} +1 -1
  219. package/web/app/immutable/chunks/{BP56q1O2.js → kRmfkT9J.js} +2 -2
  220. package/web/app/immutable/chunks/{BwRcoxdV.js → ldCNaZ5F.js} +1 -1
  221. package/web/app/immutable/chunks/{daIBqHmL.js → n2a_8s79.js} +1 -1
  222. package/web/app/immutable/chunks/{DexjcGy5.js → nt8jKVrH.js} +1 -1
  223. package/web/app/immutable/chunks/{HHVVLLOo.js → okmbexJZ.js} +1 -1
  224. package/web/app/immutable/chunks/{DdRYjUTh.js → qHcHiO2c.js} +1 -1
  225. package/web/app/immutable/chunks/{BioErF0E.js → sLnx1Tu5.js} +1 -1
  226. package/web/app/immutable/chunks/{I6iBDGZz.js → tuNJ429u.js} +1 -1
  227. package/web/app/immutable/chunks/{BeJPCJYr.js → um4u3A9l.js} +6 -6
  228. package/web/app/immutable/chunks/{DPQGeIyJ.js → xlntbOPQ.js} +2 -2
  229. package/web/app/immutable/chunks/{BjPJabzV.js → yNufUFm8.js} +1 -1
  230. package/web/app/immutable/entry/{app.zU9yYpXi.js → app.Co8E4L03.js} +3 -3
  231. package/web/app/immutable/entry/start.CBL0QUZV.js +1 -0
  232. package/web/app/immutable/nodes/{0.CpVAzuif.js → 0.BucKx3Zo.js} +1 -1
  233. package/web/app/immutable/nodes/{1.DRuW-6VC.js → 1.-v_Vj9ip.js} +1 -1
  234. package/web/app/immutable/nodes/{10.DKrkS2Ck.js → 10.BnlxMSMI.js} +4 -4
  235. package/web/app/immutable/nodes/{11.C3gubzv3.js → 11.BtNxR4dm.js} +1 -1
  236. package/web/app/immutable/nodes/{12.DwCDRGkT.js → 12.DQmthXqN.js} +1 -1
  237. package/web/app/immutable/nodes/{13.CUd5S4Yi.js → 13.pfWPVnQT.js} +3 -3
  238. package/web/app/immutable/nodes/{14.u0qAwLFY.js → 14.Ca9GXwJ0.js} +2 -2
  239. package/web/app/immutable/nodes/{15.D5mdZsCG.js → 15.CkuJDDnR.js} +1 -1
  240. package/web/app/immutable/nodes/{16.Di9o_NeI.js → 16.Dk1EKS3B.js} +2 -2
  241. package/web/app/immutable/nodes/2.Bazc0fR2.js +9 -0
  242. package/web/app/immutable/nodes/{3.BdPudEJY.js → 3.CCsh91Fv.js} +1 -1
  243. package/web/app/immutable/nodes/4.C_FHoeDU.js +1 -0
  244. package/web/app/immutable/nodes/5.DegIKxsI.js +5 -0
  245. package/web/app/immutable/nodes/{6.TDtUMw8i.js → 6.F6OlLFwi.js} +1 -1
  246. package/web/app/immutable/nodes/{7.heLExSUY.js → 7.quuP6x8b.js} +1 -1
  247. package/web/app/immutable/nodes/{8.iXetk1_-.js → 8.xtRgDwRj.js} +4 -4
  248. package/web/app/immutable/nodes/{9.Bq9HwFsC.js → 9.DFsNNJdd.js} +5 -5
  249. package/web/app/version.json +1 -1
  250. package/web/generated/paraglide.js +49 -49
  251. package/web/index.html +18 -18
  252. package/web/app/immutable/chunks/7FhPODJU.js +0 -1
  253. package/web/app/immutable/chunks/B-EQoMaE.js +0 -1
  254. package/web/app/immutable/chunks/BV49_RX-.js +0 -1
  255. package/web/app/immutable/chunks/BzwgImum.js +0 -1
  256. package/web/app/immutable/chunks/C-BI-o7z.js +0 -1
  257. package/web/app/immutable/chunks/CGtpSJYQ.js +0 -1
  258. package/web/app/immutable/chunks/CHmKgzDw.js +0 -1
  259. package/web/app/immutable/chunks/CfR8DHmm.js +0 -1
  260. package/web/app/immutable/chunks/CqtVr5NT.js +0 -1
  261. package/web/app/immutable/chunks/D1jYkFlI.js +0 -1
  262. package/web/app/immutable/entry/start.DtsLJnWx.js +0 -1
  263. package/web/app/immutable/nodes/2.CjuG4Yin.js +0 -9
  264. package/web/app/immutable/nodes/4.DvwRKOcg.js +0 -1
  265. package/web/app/immutable/nodes/5.gCklR-Wk.js +0 -5
@@ -1 +1 @@
1
- var j=Object.defineProperty;var V=(s,e,t)=>e in s?j(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var n=(s,e,t)=>V(s,typeof e!="symbol"?e+"":e,t);import{f as x,j as G,p as z}from"./BlOn95cv.js";import{u as J,o as T,_ as C,s as b,l as O,n as U}from"./UyBYtOpv.js";import{bo as $}from"./BV49_RX-.js";class u extends Error{constructor(t){super(t.message);n(this,"code");n(this,"data");n(this,"rpcCode");this.name="BackendError",this.code=t.code,this.data=t.data,this.rpcCode=t.rpcCode}}function Ee(s){return!s||typeof s!="object"?!1:typeof s.rpcCode=="number"}const K=-32003;function Ce(s){return!s||typeof s!="object"?!1:s.rpcCode===K}const Ae=x.refine(s=>s.repository.provider==="github"&&s.kind==="pull-request"||s.repository.provider==="gitlab"&&s.kind==="merge-request"),_e=J([T({state:C(["available","pending","reconnect-required","restricted","disabled","unsupported","unavailable","unknown"])}),T({state:O("backoff"),retryAt:b()}),T({state:O("unresolved"),reason:C(["missing-provenance","unverified-import","invalid-target","missing-authority","unknown"]).catch("unknown")})]).catch({state:"unknown"}),Oe=T({backendId:b().min(1),sessionId:b().min(1),workspaceId:b().min(1)}).strict();function v(s){return typeof s=="number"&&Number.isSafeInteger(s)&&s>=1}function Ne(s){if(s.resource||s.monitorAvailability||s.title===null||s.url===null||s.lastSnapshot===null)return!1;const e=s.lastSnapshot;return!e||!e.availability&&e.isDraft!==null&&e.hasConflicts!==null&&e.isBehind!==null&&Object.values(e.checks).every(t=>t!==null)&&e.approvals.decision!==null&&e.approvals.have!==null&&e.approvals.changesRequested!==null}const Ie=new Set(["agent.getConversation","agent.listUserMessages","agent.getMessageBlock","chat.subscribe","chat.unsubscribe"]);class Y{constructor(e,t,i,o,a,d,R){n(this,"ready");n(this,"acknowledged",!1);n(this,"closed",!1);n(this,"id",0);n(this,"pending",new Map);n(this,"listeners",new Set);n(this,"rejectReady");n(this,"timer");this.socket=e,this.currentSource=o,this.timeoutMs=a,this.onFailure=R,this.ready=new Promise((m,r)=>{this.rejectReady=r,e.onopen=()=>{if(!this.current())return this.fail();this.send("client.hello",{clientId:t,connectionRole:"review-monitor",capabilities:{reviewMonitoring:i}}).then(f=>{const c=f;if(!this.current()||c?.clientId!==t||c?.connectionRole!=="review-monitor"||!v(c?.server?.capabilities?.reviewMonitoring))return this.fail();this.acknowledged=!0,clearTimeout(this.timer),m()},()=>this.fail())}}),this.timer=setTimeout(()=>this.fail(),d),e.onerror=()=>this.fail(),e.onclose=()=>this.fail(),e.onmessage=({data:m})=>{if(!this.current()||typeof m!="string")return;let r;try{r=JSON.parse(m)}catch{return}if(!r||typeof r!="object")return;if(typeof r.method=="string"){if(r.id!=null){try{e.send(JSON.stringify({jsonrpc:"2.0",id:r.id,error:{code:-32601,message:"Method not found"}}))}catch{this.fail()}return}if(this.acknowledged)for(const c of[...this.listeners])c({method:r.method,params:r.params});return}if(typeof r.id!="number")return;const f=this.pending.get(r.id);if(f)if(this.pending.delete(r.id),clearTimeout(f.timer),r.error){const c=r.error.data,g=c&&typeof c=="object"&&"code"in c&&typeof c.code=="string"?c.code:"SERVER_ERROR";f.reject(new u({code:g,message:typeof r.error.message=="string"?r.error.message:"Monitor request failed",data:c,rpcCode:typeof r.error.code=="number"?r.error.code:void 0}))}else f.resolve(r.result)}}current(){return!this.closed&&this.currentSource()}onNotification(e){return this.listeners.add(e),()=>this.listeners.delete(e)}request(e,t){return!this.acknowledged||e==="client.hello"?Promise.reject(this.unavailable()):this.send(e,t)}close(){if(this.closed)return;this.closed=!0,this.acknowledged=!1,clearTimeout(this.timer);const e=this.unavailable();this.rejectReady(e);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(e);this.pending.clear(),this.listeners.clear(),this.socket.onopen=this.socket.onmessage=this.socket.onerror=this.socket.onclose=null;try{this.socket.close()}catch{}}fail(){this.closed||(this.close(),this.onFailure())}unavailable(){return new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor attachment unavailable"})}send(e,t){if(!this.current())return Promise.reject(this.unavailable());const i=++this.id;return new Promise((o,a)=>{const d=setTimeout(()=>{this.pending.delete(i),a(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`}))},this.timeoutMs);this.pending.set(i,{resolve:o,reject:a,timer:d});try{this.socket.send(JSON.stringify({jsonrpc:"2.0",id:i,method:e,params:t}))}catch{this.fail()}})}}const X=["agentNodes","localNodeIsolation","agentPlatformRouting","workspaceMembershipEvents","rawScreenshotRetention","chiefAttachments","noteTruncatedRead","remoteMachines","remoteInitialAgent","remoteMachineClaim","remoteLinkTraffic","cloudMachines","cloudMachineEntries"];function Q(s){return Object.freeze(Object.fromEntries(X.map(e=>[e,s?.[e]===1?1:0])))}function Z(s){if(!G(s,11,1))throw new Error($.files_secondaryRoot_unsupported_error())}function ee(s,e,t){te(s,e)&&Z(t)}function te(s,e){if(s!=="file.read"&&s!=="file.readChunk")return!1;const t=e?.gitRootId;return typeof t=="string"&&!!t.trim()}const N=-32012,se="system.startupStatus",ne=1e3,L=1e3,F=3e4,w=U().int().nonnegative().max(Number.MAX_SAFE_INTEGER),ie=T({completedNotes:w,totalNotes:w,processedSourceBytes:w,totalSourceBytes:w}).refine(s=>s.completedNotes<=s.totalNotes&&s.processedSourceBytes<=s.totalSourceBytes),oe=T({startupStatus:O(1),daemonVersion:b().min(1).optional(),attemptId:b().min(1),phase:C(["preparing","indexing","finalizing","ready","failed"]),elapsedMs:w,phaseElapsedMs:w,progressAgeMs:w,retryAfterMs:U().int().min(L).max(F).optional(),progress:ie.optional(),estimatedRemainingMs:w.optional(),finalizingStep:C(["anchors","committing","services"]).optional(),failure:T({code:b().min(1),message:b().min(1)}).optional()}).refine(s=>(s.phase==="ready"||s.phase==="failed"?s.retryAfterMs===void 0:s.retryAfterMs!==void 0)&&(s.phase==="finalizing"?s.finalizingStep!==void 0:s.finalizingStep===void 0)&&(s.phase==="failed"?s.failure!==void 0:s.failure===void 0)&&(s.estimatedRemainingMs===void 0||s.phase==="indexing"));function B(s){const e=oe.safeParse(s);return e.success?e.data:null}function P(s){const e=typeof s=="number"&&Number.isFinite(s)?s:ne;return Math.min(F,Math.max(L,e))}function re(s){const e=s;return typeof e.rpcCode=="number"?e.rpcCode:typeof e.code=="number"?e.code:void 0}function q(s){if(!s||typeof s!="object"||re(s)!==N)return;const e=s.data??{},t=B(e.startup);if(e.code==="daemon-startup-failed"){const i=e.startup?.failure?.message,o=s.message;return{kind:"failed",message:typeof i=="string"&&i.trim()?i:typeof o=="string"?o:"",snapshot:t}}if(!(e.code!=="daemon-not-ready"||e.retryable!==!0))return{kind:"not-ready",retryAfterMs:P(e.retryAfterMs),snapshot:t}}function D(s){const e=s.snapshot??void 0;return s.state==="failed"?{code:N,message:"Daemon startup failed",data:{code:"daemon-startup-failed",retryable:!1,startup:e}}:{code:N,message:"Daemon not ready",data:{code:"daemon-not-ready",retryable:!0,retryAfterMs:P(e?.retryAfterMs),startup:e}}}const ae=5e3,ce=5e3,le=3e4;function he(s){const e=s.snapshot;return JSON.stringify([s.state,s.available,e?.attemptId,e?.phase,e?.finalizingStep,e?.progress?.completedNotes,e?.progress?.totalNotes,e?.estimatedRemainingMs===void 0,(e?.progressAgeMs??0)>=le])}class ue{constructor(e){n(this,"generation",0);n(this,"timer",null);n(this,"snapshot",null);n(this,"lastKey",null);n(this,"lastPublishedAt",0);this.host=e}start(e){this.stop(),this.snapshot=e.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:e.snapshot!==null},!0),this.schedule(e.retryAfterMs)}stop(){this.generation++,this.timer&&(clearTimeout(this.timer),this.timer=null)}reset(){this.stop(),this.snapshot=null,this.lastKey=null,this.lastPublishedAt=0}publish(e,t=!1){const i=he(e),o=Date.now();!t&&i===this.lastKey&&o-this.lastPublishedAt<ce||(this.lastKey=i,this.lastPublishedAt=o,this.host.publish(e))}schedule(e){const t=this.generation;this.timer=setTimeout(()=>{if(this.timer=null,t!==this.generation)return;const i=()=>this.poll(t);this.host.track?this.host.track(i):i()},e)}async poll(e){let t;try{t=B(await this.host.request())}catch(i){if(e!==this.generation)return;const o=q(i);if(o?.kind==="failed"){this.stop(),this.host.fail(o.message,o.snapshot);return}if(o?.kind==="not-ready"){this.snapshot=o.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:o.snapshot!==null}),this.schedule(o.retryAfterMs);return}this.unavailable();return}if(e===this.generation){if(t===null){this.unavailable();return}if(this.snapshot=t,t.phase==="failed"){this.stop(),this.host.fail(t.failure?.message??"",t);return}if(t.phase==="ready"){this.stop(),this.publish({state:"starting",snapshot:t,available:!0},!0),this.host.handoff(!0);return}this.publish({state:"starting",snapshot:t,available:!0}),this.schedule(P(t.retryAfterMs))}}unavailable(){this.stop(),this.publish({state:"starting",snapshot:this.snapshot,available:!1},!0),this.host.handoff(!1)}}function Pe(s=(()=>{const e=globalThis.__INTENT_RUNTIME_CONFIG__;return e?.intentdWsUrl!==void 0?e.intentdWsUrl:typeof process>"u"?void 0:""})()){if(typeof s!="string")return;const e=s.trim();if(!e)return;if(e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\\")){const o=globalThis.location;if(o?.host&&(o.protocol==="http:"||o.protocol==="https:"))return`${o.protocol==="https:"?"wss:":"ws:"}//${o.host}${e}`;console.warn("[browser-websocket-transport] Ignoring same-origin WebSocket path without an HTTP page origin");return}let t;try{t=new URL(e)}catch{console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}if(t.protocol!=="ws:"&&t.protocol!=="wss:"){console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}const i=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol==="ws:"&&!i){console.warn("[browser-websocket-transport] Ignoring insecure remote WebSocket URL: use wss://");return}return e}function de(s){try{const e=new URL(s);return e.username="",e.password="",e.search="",e.hash="",e.toString()}catch{return s.replace(/[?#].*$/,"").replace(/^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/i,"$1")}}const fe={[-32700]:"PARSE_ERROR",[-32600]:"INVALID_REQUEST",[-32601]:"METHOD_NOT_FOUND",[-32602]:"INVALID_PARAMS",[-32603]:"INTERNAL_ERROR"};function pe(s){const e=fe[s];return e||(s<=-32e3&&s>=-32099?"SERVER_ERROR":"UNKNOWN_ERROR")}function me(s){if(s&&typeof s=="object"&&"code"in s){const e=s.code;if(typeof e=="string"&&e.length>0)return e}}function _(s){const e=me(s.data)??pe(s.code),t=s.data&&typeof s.data=="object"?{...s.data,code:e}:typeof s.data=="string"&&s.data.length>0?{code:e,detail:s.data}:{code:e};return{code:e,message:s.message,data:t,rpcCode:s.code}}function E(s){if(s instanceof u)return s;const e=s instanceof Error?s.message:String(s);return new u({code:"TRANSPORT_ERROR",message:e,data:{code:"TRANSPORT_ERROR"}})}const ge=3e4,Re=1e3,ye=3e4,Se=1e4,be=5e3;class we{constructor(e){n(this,"url");n(this,"webSocketFactory");n(this,"requestTimeoutMs");n(this,"reconnectDelayMs");n(this,"maxReconnectDelayMs");n(this,"connectTimeoutMs");n(this,"socket",null);n(this,"connected",!1);n(this,"connecting",!1);n(this,"disposed",!1);n(this,"requestId",0);n(this,"currentReconnectDelay");n(this,"reconnectTimer",null);n(this,"connectTimer",null);n(this,"connectWaiters",[]);n(this,"clientId");n(this,"helloConfirmed",!1);n(this,"acknowledgedHello",null);n(this,"nodeCapabilities",null);n(this,"capabilityHelloGeneration",0);n(this,"reviewMonitoring");n(this,"reviewMonitoringRecipient");n(this,"reviewMonitoringEnabled",!1);n(this,"ordinaryHello",!1);n(this,"monitorRetry",null);n(this,"monitorRetirements",new Set);n(this,"monitorReady",new Set);n(this,"protocolVersion",null);n(this,"helloError",new u({code:"UNAVAILABLE",message:"client.hello has not completed on this connection"}));n(this,"pending",new Map);n(this,"hasBeenConnected",!1);n(this,"hasConnectionFailed",!1);n(this,"notificationHandlers",new Set);n(this,"reconnectedHandlers",new Set);n(this,"statusHandlers",new Set);n(this,"lastNotifiedStatus","disconnected");n(this,"startupState",null);n(this,"startupSocket",null);n(this,"startupPoller",new ue({request:()=>{const e=this.startupSocket;return e?this.requestOnSocket(se,void 0,{timeoutMs:ae},e):Promise.reject(this.startupRefusal())},publish:e=>this.updateStartup(e),handoff:e=>this.startupHandoff(e),fail:(e,t)=>this.failStartup(e,t)}));n(this,"startupHandlers",new Set);this.reviewMonitoringEnabled=v(e.reviewMonitoring),this.reviewMonitoringRecipient=v(e.reviewMonitoring)?e.reviewMonitoring:void 0,this.url=e.url,this.webSocketFactory=e.webSocketFactory??(t=>new WebSocket(t)),this.requestTimeoutMs=e.requestTimeoutMs??ge,this.reconnectDelayMs=e.reconnectDelayMs??Re,this.maxReconnectDelayMs=e.maxReconnectDelayMs??ye,this.connectTimeoutMs=e.connectTimeoutMs??Se,this.currentReconnectDelay=this.reconnectDelayMs}isAvailable(){return!this.disposed}async readPrincipal(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected(),t=this.capabilityHelloGeneration,i=structuredClone(this.acknowledgedHello),o=()=>!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t&&this.acknowledgedHello!==null;if(!o())throw this.helloError;const a=await this.requestOnSocket("principal.me",{},void 0,e);if(!o())throw new u({code:"UNAVAILABLE",message:"Principal discovery connection changed"});return{hello:i,principal:a}}async observeNodeCapabilities(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected();if(this.disposed||!this.connected||this.socket!==e)throw new u({code:"UNAVAILABLE",message:"Backend connection changed"});return{server:{capabilities:this.nodeCapabilities}}}onMonitorReconnected(e){this.monitorReady.add(e);const t=this.onReconnected(e);return()=>{this.monitorReady.delete(e),t()}}prMonitorBackendId(){return de(this.url)}async capturePrMonitorSession(e){const t=await this.ensureConnected(),i=this.capabilityHelloGeneration,o=()=>new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor connection unavailable"});let a,d=!1;const R=new Set,m=new Set,r=()=>{if(!d){d=!0,this.monitorRetirements.delete(r),a?.close();for(const l of R)l();R.clear()}},f=()=>!d&&!this.disposed&&this.connected&&this.helloConfirmed&&this.socket===t&&i===this.capabilityHelloGeneration,c=()=>f()&&(!a||a.current());if(!c())throw o();this.monitorRetirements.add(r);const g=v(this.reviewMonitoring);let M=g?"consumer-pending":"unsupported";if(g&&this.reviewMonitoringEnabled&&this.ordinaryHello&&this.clientId)try{if(a=new Y(this.webSocketFactory(this.url),this.clientId,Math.min(this.reviewMonitoringRecipient,this.reviewMonitoring),f,this.requestTimeoutMs,this.connectTimeoutMs,()=>{const l=f();r(),l&&this.scheduleMonitorRecovery(t,i)}),await a.ready,!c())throw o();M="supported"}catch(l){const p=f();throw r(),p&&this.scheduleMonitorRecovery(t,i),l}const y=(l,p)=>a?a.request(l,p):this.requestOnSocket(l,p,void 0,t);return{origin:{backendId:this.prMonitorBackendId(),sessionId:crypto.randomUUID(),workspaceId:e},support:M,onRetired(l){return c()?(R.add(l),()=>{R.delete(l)}):(l(),()=>{})},onNotification:l=>(a??this).onNotification(p=>{c()&&l(p)}),request:async(l,p)=>{if(!c()||M==="consumer-pending"||p.workspaceId!==e)throw o();const k=await y(l,p),h=l==="events.subscribe"?k?.subscriptionId:void 0;if(!c())throw h&&this.socket===t&&this.connected&&i===this.capabilityHelloGeneration&&y("events.unsubscribe",{workspaceId:e,subscriptionId:h}).catch(()=>{}),o();return h&&m.add(h),l==="events.unsubscribe"&&m.delete(String(p.subscriptionId)),k},release:async()=>{const l=c();r(),l&&!a&&await Promise.all([...m].map(p=>this.requestOnSocket("events.unsubscribe",{workspaceId:e,subscriptionId:p},void 0,t).catch(()=>{})))}}}request(e,t,i){return this.requestOnSocket(e,t,i)}requestOnSocket(e,t,i,o){if(i?.localMachine)return Promise.reject(new u({code:"UNAVAILABLE",message:"Local machine requests require the desktop bridge"}));if(this.disposed)return Promise.reject(new u({code:"UNAVAILABLE",message:"Backend transport disposed"}));if(!o&&this.startupState?.state==="starting")return Promise.reject(new u(_(D(this.startupState))));const a=++this.requestId,d=i?.timeoutMs,R=typeof d=="number"&&Number.isFinite(d)&&d>0?d:this.requestTimeoutMs;return new Promise((m,r)=>{let f=!1;const c=setTimeout(()=>{f=!0,this.pending.delete(a),r(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`,data:{code:"TIMEOUT"}}))},R),g=y=>{clearTimeout(c),r(E(y))},M=y=>{if(f)return;if(this.disposed||this.socket!==y){g(new u({code:"TRANSPORT_ERROR",message:"Connection replaced"}));return}if(e==="presence.update"&&!this.helloConfirmed){g(this.helloError);return}try{ee(e,t,this.protocolVersion)}catch(h){g(h);return}let l=e==="client.hello"&&this.clientId?{clientId:this.clientId,...t}:t;if(e==="client.hello"){const h={...l},S={...h.capabilities};Object.prototype.hasOwnProperty.call(S,"reviewMonitoring")&&(this.reviewMonitoringEnabled=this.reviewMonitoringRecipient!==void 0&&v(S.reviewMonitoring)),delete S.reviewMonitoring,delete h.connectionRole,h.capabilities!==void 0&&(h.capabilities=S),l=h}const p=JSON.stringify({jsonrpc:"2.0",id:a,method:e,params:l}),k=e==="client.hello"?++this.capabilityHelloGeneration:0;if(e==="client.hello"){this.helloConfirmed=!1,this.ordinaryHello=!1,this.clearMonitorRecovery(),this.nodeCapabilities=null,this.reviewMonitoring=void 0;for(const h of[...this.monitorRetirements])h();this.acknowledgedHello=null}this.pending.set(a,{method:e,timeout:c,resolve:h=>{if(e==="client.hello"&&this.socket===y&&k===this.capabilityHelloGeneration){const S=h?.clientId;if(typeof S=="string"&&S.length>0){const H=h.server?.capabilities;if(this.clientId=S,this.reviewMonitoring=H?.reviewMonitoring,this.ordinaryHello=h.connectionRole===void 0,this.acknowledgedHello=structuredClone(h),this.nodeCapabilities=Q(H),this.protocolVersion=z(h.protocolVersion),this.helloConfirmed=!0,this.connected)for(const W of this.monitorReady)W()}}m(h)},reject:r});try{y.send(p)}catch(h){clearTimeout(c),this.pending.delete(a),r(E(h))}};o?M(o):this.connected&&this.socket?M(this.socket):this.ensureConnected().then(M,g)})}async subscribe(e){return this.request("events.subscribe",e)}async unsubscribe(e,t){try{await this.request("events.unsubscribe",{subscriptionId:e,...t!==void 0?{workspaceId:t}:{}})}catch{}}onNotification(e){return this.notificationHandlers.add(e),()=>this.notificationHandlers.delete(e)}onReconnected(e){return this.reconnectedHandlers.add(e),()=>this.reconnectedHandlers.delete(e)}getConnectionStatus(){return this.connected?"connected":this.connecting?"connecting":"disconnected"}getStartupState(){return this.startupState}onStartupChange(e){return this.startupHandlers.add(e),()=>this.startupHandlers.delete(e)}onConnectionStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}dispose(){if(this.disposed)return;this.disposed=!0,this.clearReconnect(),this.clearConnectTimer();const e=new u({code:"UNAVAILABLE",message:"Backend transport disposed"});this.failPending(e),this.failWaiters(e),this.teardownSocket(),this.connected=!1,this.connecting=!1,this.notifyStatusChange(),this.notificationHandlers.clear(),this.reconnectedHandlers.clear(),this.statusHandlers.clear(),this.startupHandlers.clear()}ensureConnected(){return this.connected&&this.socket?Promise.resolve(this.socket):new Promise((e,t)=>{this.connectWaiters.push({resolve:e,reject:t}),this.start()})}start(){this.disposed||this.socket||this.connecting||this.reconnectTimer||this.connect()}connect(){this.clearReconnect(),this.connecting=!0,this.notifyStatusChange();let e;try{e=this.webSocketFactory(this.url)}catch(t){this.connecting=!1,this.onConnectionFailure(E(t));return}this.socket=e,this.helloConfirmed=!1,this.connectTimer=setTimeout(()=>{this.connectTimer=null,!(this.socket!==e||this.connected)&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:`WebSocket connect attempt timed out after ${this.connectTimeoutMs}ms`})))},this.connectTimeoutMs),e.onopen=()=>{this.socket===e&&this.onConnected(e)},e.onmessage=t=>{this.socket===e&&this.onMessage(t.data)},e.onerror=null,e.onclose=()=>{this.socket===e&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})))}}onConnected(e){this.clearConnectTimer(),this.performHelloHandshake(e)}async performHelloHandshake(e){try{await this.requestOnSocket("client.hello",{},{timeoutMs:Math.min(this.requestTimeoutMs,be)},e)}catch(o){if(this.disposed||this.socket!==e)return;const a=q(o);if(a){this.enterStartup(e,a);return}this.helloError=E(o)}if(this.disposed||this.socket!==e)return;this.startupPoller.reset(),this.startupSocket=null;const t=this.startupState!==null;this.startupState=null,this.connecting=!1,this.connected=!0,this.currentReconnectDelay=this.reconnectDelayMs;const i=this.hasBeenConnected||this.hasConnectionFailed;if(this.hasBeenConnected=!0,this.hasConnectionFailed=!1,this.notifyStatusChange(),t)for(const o of[...this.startupHandlers])o(null);if(this.flushWaiters(e),i)for(const o of[...this.reconnectedHandlers])o()}onConnectionFailure(e){if(this.clearConnectTimer(),!this.disposed){if(this.startupSocket!==null&&this.startupSocket===this.socket){this.startupHandoff(!0);return}this.startupState?.state==="starting"&&(this.startupPoller.reset(),this.updateStartup(null)),this.hasConnectionFailed=!0,this.connected=!1,this.notifyStatusChange(),this.teardownSocket(),this.failPending(e),this.failWaiters(e),this.scheduleReconnect()}}notifyStatusChange(){const e=this.getConnectionStatus();if(e!==this.lastNotifiedStatus){this.lastNotifiedStatus=e;for(const t of[...this.statusHandlers])t(e)}}onMessage(e){if(typeof e!="string")return;let t;try{t=JSON.parse(e)}catch{console.warn("[browser-websocket-transport] Dropping unparseable frame");return}if(!t||typeof t!="object")return;const i=typeof t.method=="string",o=t.id!=null;if(i&&o){this.sendFrame({jsonrpc:"2.0",id:t.id,error:{code:-32601,message:`Method not found: ${String(t.method)}`}});return}if(o){const a=Number(t.id),d=this.pending.get(a);if(!d)return;this.pending.delete(a),clearTimeout(d.timeout),t.error?d.reject(new u(_(t.error))):d.resolve(t.result);return}if(i){const a={method:t.method,params:t.params};for(const d of[...this.notificationHandlers])d(a)}}sendFrame(e){try{this.socket?.send(JSON.stringify(e))}catch{}}scheduleReconnect(){if(this.disposed||this.reconnectTimer)return;const e=this.currentReconnectDelay;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.currentReconnectDelay=Math.min(e*2,this.maxReconnectDelayMs),this.disposed||this.connect()},e)}clearReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearConnectTimer(){this.connectTimer&&(clearTimeout(this.connectTimer),this.connectTimer=null)}scheduleMonitorRecovery(e,t){this.monitorRetry||this.disposed||(this.monitorRetry=setTimeout(()=>{if(this.monitorRetry=null,!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t)for(const i of[...this.monitorReady])i()},this.reconnectDelayMs))}clearMonitorRecovery(){this.monitorRetry&&clearTimeout(this.monitorRetry),this.monitorRetry=null}teardownSocket(){this.startupPoller.stop(),this.startupSocket=null,this.reviewMonitoring=void 0,this.clearMonitorRecovery();for(const t of[...this.monitorRetirements])t();if(this.acknowledgedHello=null,this.nodeCapabilities=null,this.capabilityHelloGeneration+=1,this.protocolVersion=null,!this.socket)return;const e=this.socket;this.socket=null,e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null;try{e.close()}catch{}}updateStartup(e){this.startupState=e?Object.freeze({...e}):null;for(const t of[...this.startupHandlers])t(this.startupState)}startupRefusal(){return this.startupState?new u(_(D(this.startupState))):new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})}enterStartup(e,t){if(this.hasConnectionFailed=!0,t.kind==="failed"){this.failStartup(t.message,t.snapshot);return}this.startupSocket=e,this.startupPoller.start(t),this.failWaiters(this.startupRefusal())}startupHandoff(e){const t=this.startupRefusal();if(this.teardownSocket(),this.failPending(t),this.disposed)return;this.connecting=!0,this.notifyStatusChange(),this.clearReconnect();let i=this.reconnectDelayMs;e?this.currentReconnectDelay=this.reconnectDelayMs:(i=this.currentReconnectDelay,this.currentReconnectDelay=Math.min(i*2,this.maxReconnectDelayMs)),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.disposed||this.connect()},i)}failStartup(e,t){this.startupPoller.stop(),this.startupSocket=null,this.hasConnectionFailed=!0,this.updateStartup({state:"failed",snapshot:t,available:t!==null,message:e}),this.connecting=!1,this.onConnectionFailure(this.startupRefusal())}failPending(e){for(const t of this.pending.values())clearTimeout(t.timeout),t.reject(e);this.pending.clear()}flushWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.resolve(e)}failWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.reject(e)}}function He(s){return new we(s)}let A=null;const I=new Set;function De(s){A=s;for(const e of[...I])e(s)}function Ue(){return A}function Le(s){return I.add(s),A&&s(A),()=>I.delete(s)}export{u as B,_e as M,Oe as P,Ie as R,Ae as a,Ce as b,He as c,Ne as d,Pe as e,v as f,Ue as g,Ee as i,Le as o,De as r,de as s};
1
+ var j=Object.defineProperty;var V=(s,e,t)=>e in s?j(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var n=(s,e,t)=>V(s,typeof e!="symbol"?e+"":e,t);import{f as x,j as G,p as z}from"./BlOn95cv.js";import{u as J,o as T,_ as C,s as b,l as O,n as U}from"./UyBYtOpv.js";import{bo as $}from"./BAqR9jtB.js";class u extends Error{constructor(t){super(t.message);n(this,"code");n(this,"data");n(this,"rpcCode");this.name="BackendError",this.code=t.code,this.data=t.data,this.rpcCode=t.rpcCode}}function Ee(s){return!s||typeof s!="object"?!1:typeof s.rpcCode=="number"}const K=-32003;function Ce(s){return!s||typeof s!="object"?!1:s.rpcCode===K}const Ae=x.refine(s=>s.repository.provider==="github"&&s.kind==="pull-request"||s.repository.provider==="gitlab"&&s.kind==="merge-request"),_e=J([T({state:C(["available","pending","reconnect-required","restricted","disabled","unsupported","unavailable","unknown"])}),T({state:O("backoff"),retryAt:b()}),T({state:O("unresolved"),reason:C(["missing-provenance","unverified-import","invalid-target","missing-authority","unknown"]).catch("unknown")})]).catch({state:"unknown"}),Oe=T({backendId:b().min(1),sessionId:b().min(1),workspaceId:b().min(1)}).strict();function v(s){return typeof s=="number"&&Number.isSafeInteger(s)&&s>=1}function Ne(s){if(s.resource||s.monitorAvailability||s.title===null||s.url===null||s.lastSnapshot===null)return!1;const e=s.lastSnapshot;return!e||!e.availability&&e.isDraft!==null&&e.hasConflicts!==null&&e.isBehind!==null&&Object.values(e.checks).every(t=>t!==null)&&e.approvals.decision!==null&&e.approvals.have!==null&&e.approvals.changesRequested!==null}const Ie=new Set(["agent.getConversation","agent.listUserMessages","agent.getMessageBlock","chat.subscribe","chat.unsubscribe"]);class Y{constructor(e,t,i,o,a,d,R){n(this,"ready");n(this,"acknowledged",!1);n(this,"closed",!1);n(this,"id",0);n(this,"pending",new Map);n(this,"listeners",new Set);n(this,"rejectReady");n(this,"timer");this.socket=e,this.currentSource=o,this.timeoutMs=a,this.onFailure=R,this.ready=new Promise((m,r)=>{this.rejectReady=r,e.onopen=()=>{if(!this.current())return this.fail();this.send("client.hello",{clientId:t,connectionRole:"review-monitor",capabilities:{reviewMonitoring:i}}).then(f=>{const c=f;if(!this.current()||c?.clientId!==t||c?.connectionRole!=="review-monitor"||!v(c?.server?.capabilities?.reviewMonitoring))return this.fail();this.acknowledged=!0,clearTimeout(this.timer),m()},()=>this.fail())}}),this.timer=setTimeout(()=>this.fail(),d),e.onerror=()=>this.fail(),e.onclose=()=>this.fail(),e.onmessage=({data:m})=>{if(!this.current()||typeof m!="string")return;let r;try{r=JSON.parse(m)}catch{return}if(!r||typeof r!="object")return;if(typeof r.method=="string"){if(r.id!=null){try{e.send(JSON.stringify({jsonrpc:"2.0",id:r.id,error:{code:-32601,message:"Method not found"}}))}catch{this.fail()}return}if(this.acknowledged)for(const c of[...this.listeners])c({method:r.method,params:r.params});return}if(typeof r.id!="number")return;const f=this.pending.get(r.id);if(f)if(this.pending.delete(r.id),clearTimeout(f.timer),r.error){const c=r.error.data,g=c&&typeof c=="object"&&"code"in c&&typeof c.code=="string"?c.code:"SERVER_ERROR";f.reject(new u({code:g,message:typeof r.error.message=="string"?r.error.message:"Monitor request failed",data:c,rpcCode:typeof r.error.code=="number"?r.error.code:void 0}))}else f.resolve(r.result)}}current(){return!this.closed&&this.currentSource()}onNotification(e){return this.listeners.add(e),()=>this.listeners.delete(e)}request(e,t){return!this.acknowledged||e==="client.hello"?Promise.reject(this.unavailable()):this.send(e,t)}close(){if(this.closed)return;this.closed=!0,this.acknowledged=!1,clearTimeout(this.timer);const e=this.unavailable();this.rejectReady(e);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(e);this.pending.clear(),this.listeners.clear(),this.socket.onopen=this.socket.onmessage=this.socket.onerror=this.socket.onclose=null;try{this.socket.close()}catch{}}fail(){this.closed||(this.close(),this.onFailure())}unavailable(){return new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor attachment unavailable"})}send(e,t){if(!this.current())return Promise.reject(this.unavailable());const i=++this.id;return new Promise((o,a)=>{const d=setTimeout(()=>{this.pending.delete(i),a(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`}))},this.timeoutMs);this.pending.set(i,{resolve:o,reject:a,timer:d});try{this.socket.send(JSON.stringify({jsonrpc:"2.0",id:i,method:e,params:t}))}catch{this.fail()}})}}const X=["agentNodes","localNodeIsolation","agentPlatformRouting","workspaceMembershipEvents","rawScreenshotRetention","chiefAttachments","noteTruncatedRead","remoteMachines","remoteInitialAgent","remoteMachineClaim","remoteLinkTraffic","cloudMachines","cloudMachineEntries"];function Q(s){return Object.freeze(Object.fromEntries(X.map(e=>[e,s?.[e]===1?1:0])))}function Z(s){if(!G(s,11,1))throw new Error($.files_secondaryRoot_unsupported_error())}function ee(s,e,t){te(s,e)&&Z(t)}function te(s,e){if(s!=="file.read"&&s!=="file.readChunk")return!1;const t=e?.gitRootId;return typeof t=="string"&&!!t.trim()}const N=-32012,se="system.startupStatus",ne=1e3,L=1e3,F=3e4,w=U().int().nonnegative().max(Number.MAX_SAFE_INTEGER),ie=T({completedNotes:w,totalNotes:w,processedSourceBytes:w,totalSourceBytes:w}).refine(s=>s.completedNotes<=s.totalNotes&&s.processedSourceBytes<=s.totalSourceBytes),oe=T({startupStatus:O(1),daemonVersion:b().min(1).optional(),attemptId:b().min(1),phase:C(["preparing","indexing","finalizing","ready","failed"]),elapsedMs:w,phaseElapsedMs:w,progressAgeMs:w,retryAfterMs:U().int().min(L).max(F).optional(),progress:ie.optional(),estimatedRemainingMs:w.optional(),finalizingStep:C(["anchors","committing","services"]).optional(),failure:T({code:b().min(1),message:b().min(1)}).optional()}).refine(s=>(s.phase==="ready"||s.phase==="failed"?s.retryAfterMs===void 0:s.retryAfterMs!==void 0)&&(s.phase==="finalizing"?s.finalizingStep!==void 0:s.finalizingStep===void 0)&&(s.phase==="failed"?s.failure!==void 0:s.failure===void 0)&&(s.estimatedRemainingMs===void 0||s.phase==="indexing"));function B(s){const e=oe.safeParse(s);return e.success?e.data:null}function P(s){const e=typeof s=="number"&&Number.isFinite(s)?s:ne;return Math.min(F,Math.max(L,e))}function re(s){const e=s;return typeof e.rpcCode=="number"?e.rpcCode:typeof e.code=="number"?e.code:void 0}function q(s){if(!s||typeof s!="object"||re(s)!==N)return;const e=s.data??{},t=B(e.startup);if(e.code==="daemon-startup-failed"){const i=e.startup?.failure?.message,o=s.message;return{kind:"failed",message:typeof i=="string"&&i.trim()?i:typeof o=="string"?o:"",snapshot:t}}if(!(e.code!=="daemon-not-ready"||e.retryable!==!0))return{kind:"not-ready",retryAfterMs:P(e.retryAfterMs),snapshot:t}}function D(s){const e=s.snapshot??void 0;return s.state==="failed"?{code:N,message:"Daemon startup failed",data:{code:"daemon-startup-failed",retryable:!1,startup:e}}:{code:N,message:"Daemon not ready",data:{code:"daemon-not-ready",retryable:!0,retryAfterMs:P(e?.retryAfterMs),startup:e}}}const ae=5e3,ce=5e3,le=3e4;function he(s){const e=s.snapshot;return JSON.stringify([s.state,s.available,e?.attemptId,e?.phase,e?.finalizingStep,e?.progress?.completedNotes,e?.progress?.totalNotes,e?.estimatedRemainingMs===void 0,(e?.progressAgeMs??0)>=le])}class ue{constructor(e){n(this,"generation",0);n(this,"timer",null);n(this,"snapshot",null);n(this,"lastKey",null);n(this,"lastPublishedAt",0);this.host=e}start(e){this.stop(),this.snapshot=e.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:e.snapshot!==null},!0),this.schedule(e.retryAfterMs)}stop(){this.generation++,this.timer&&(clearTimeout(this.timer),this.timer=null)}reset(){this.stop(),this.snapshot=null,this.lastKey=null,this.lastPublishedAt=0}publish(e,t=!1){const i=he(e),o=Date.now();!t&&i===this.lastKey&&o-this.lastPublishedAt<ce||(this.lastKey=i,this.lastPublishedAt=o,this.host.publish(e))}schedule(e){const t=this.generation;this.timer=setTimeout(()=>{if(this.timer=null,t!==this.generation)return;const i=()=>this.poll(t);this.host.track?this.host.track(i):i()},e)}async poll(e){let t;try{t=B(await this.host.request())}catch(i){if(e!==this.generation)return;const o=q(i);if(o?.kind==="failed"){this.stop(),this.host.fail(o.message,o.snapshot);return}if(o?.kind==="not-ready"){this.snapshot=o.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:o.snapshot!==null}),this.schedule(o.retryAfterMs);return}this.unavailable();return}if(e===this.generation){if(t===null){this.unavailable();return}if(this.snapshot=t,t.phase==="failed"){this.stop(),this.host.fail(t.failure?.message??"",t);return}if(t.phase==="ready"){this.stop(),this.publish({state:"starting",snapshot:t,available:!0},!0),this.host.handoff(!0);return}this.publish({state:"starting",snapshot:t,available:!0}),this.schedule(P(t.retryAfterMs))}}unavailable(){this.stop(),this.publish({state:"starting",snapshot:this.snapshot,available:!1},!0),this.host.handoff(!1)}}function Pe(s=(()=>{const e=globalThis.__INTENT_RUNTIME_CONFIG__;return e?.intentdWsUrl!==void 0?e.intentdWsUrl:typeof process>"u"?void 0:""})()){if(typeof s!="string")return;const e=s.trim();if(!e)return;if(e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\\")){const o=globalThis.location;if(o?.host&&(o.protocol==="http:"||o.protocol==="https:"))return`${o.protocol==="https:"?"wss:":"ws:"}//${o.host}${e}`;console.warn("[browser-websocket-transport] Ignoring same-origin WebSocket path without an HTTP page origin");return}let t;try{t=new URL(e)}catch{console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}if(t.protocol!=="ws:"&&t.protocol!=="wss:"){console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}const i=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol==="ws:"&&!i){console.warn("[browser-websocket-transport] Ignoring insecure remote WebSocket URL: use wss://");return}return e}function de(s){try{const e=new URL(s);return e.username="",e.password="",e.search="",e.hash="",e.toString()}catch{return s.replace(/[?#].*$/,"").replace(/^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/i,"$1")}}const fe={[-32700]:"PARSE_ERROR",[-32600]:"INVALID_REQUEST",[-32601]:"METHOD_NOT_FOUND",[-32602]:"INVALID_PARAMS",[-32603]:"INTERNAL_ERROR"};function pe(s){const e=fe[s];return e||(s<=-32e3&&s>=-32099?"SERVER_ERROR":"UNKNOWN_ERROR")}function me(s){if(s&&typeof s=="object"&&"code"in s){const e=s.code;if(typeof e=="string"&&e.length>0)return e}}function _(s){const e=me(s.data)??pe(s.code),t=s.data&&typeof s.data=="object"?{...s.data,code:e}:typeof s.data=="string"&&s.data.length>0?{code:e,detail:s.data}:{code:e};return{code:e,message:s.message,data:t,rpcCode:s.code}}function E(s){if(s instanceof u)return s;const e=s instanceof Error?s.message:String(s);return new u({code:"TRANSPORT_ERROR",message:e,data:{code:"TRANSPORT_ERROR"}})}const ge=3e4,Re=1e3,ye=3e4,Se=1e4,be=5e3;class we{constructor(e){n(this,"url");n(this,"webSocketFactory");n(this,"requestTimeoutMs");n(this,"reconnectDelayMs");n(this,"maxReconnectDelayMs");n(this,"connectTimeoutMs");n(this,"socket",null);n(this,"connected",!1);n(this,"connecting",!1);n(this,"disposed",!1);n(this,"requestId",0);n(this,"currentReconnectDelay");n(this,"reconnectTimer",null);n(this,"connectTimer",null);n(this,"connectWaiters",[]);n(this,"clientId");n(this,"helloConfirmed",!1);n(this,"acknowledgedHello",null);n(this,"nodeCapabilities",null);n(this,"capabilityHelloGeneration",0);n(this,"reviewMonitoring");n(this,"reviewMonitoringRecipient");n(this,"reviewMonitoringEnabled",!1);n(this,"ordinaryHello",!1);n(this,"monitorRetry",null);n(this,"monitorRetirements",new Set);n(this,"monitorReady",new Set);n(this,"protocolVersion",null);n(this,"helloError",new u({code:"UNAVAILABLE",message:"client.hello has not completed on this connection"}));n(this,"pending",new Map);n(this,"hasBeenConnected",!1);n(this,"hasConnectionFailed",!1);n(this,"notificationHandlers",new Set);n(this,"reconnectedHandlers",new Set);n(this,"statusHandlers",new Set);n(this,"lastNotifiedStatus","disconnected");n(this,"startupState",null);n(this,"startupSocket",null);n(this,"startupPoller",new ue({request:()=>{const e=this.startupSocket;return e?this.requestOnSocket(se,void 0,{timeoutMs:ae},e):Promise.reject(this.startupRefusal())},publish:e=>this.updateStartup(e),handoff:e=>this.startupHandoff(e),fail:(e,t)=>this.failStartup(e,t)}));n(this,"startupHandlers",new Set);this.reviewMonitoringEnabled=v(e.reviewMonitoring),this.reviewMonitoringRecipient=v(e.reviewMonitoring)?e.reviewMonitoring:void 0,this.url=e.url,this.webSocketFactory=e.webSocketFactory??(t=>new WebSocket(t)),this.requestTimeoutMs=e.requestTimeoutMs??ge,this.reconnectDelayMs=e.reconnectDelayMs??Re,this.maxReconnectDelayMs=e.maxReconnectDelayMs??ye,this.connectTimeoutMs=e.connectTimeoutMs??Se,this.currentReconnectDelay=this.reconnectDelayMs}isAvailable(){return!this.disposed}async readPrincipal(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected(),t=this.capabilityHelloGeneration,i=structuredClone(this.acknowledgedHello),o=()=>!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t&&this.acknowledgedHello!==null;if(!o())throw this.helloError;const a=await this.requestOnSocket("principal.me",{},void 0,e);if(!o())throw new u({code:"UNAVAILABLE",message:"Principal discovery connection changed"});return{hello:i,principal:a}}async observeNodeCapabilities(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected();if(this.disposed||!this.connected||this.socket!==e)throw new u({code:"UNAVAILABLE",message:"Backend connection changed"});return{server:{capabilities:this.nodeCapabilities}}}onMonitorReconnected(e){this.monitorReady.add(e);const t=this.onReconnected(e);return()=>{this.monitorReady.delete(e),t()}}prMonitorBackendId(){return de(this.url)}async capturePrMonitorSession(e){const t=await this.ensureConnected(),i=this.capabilityHelloGeneration,o=()=>new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor connection unavailable"});let a,d=!1;const R=new Set,m=new Set,r=()=>{if(!d){d=!0,this.monitorRetirements.delete(r),a?.close();for(const l of R)l();R.clear()}},f=()=>!d&&!this.disposed&&this.connected&&this.helloConfirmed&&this.socket===t&&i===this.capabilityHelloGeneration,c=()=>f()&&(!a||a.current());if(!c())throw o();this.monitorRetirements.add(r);const g=v(this.reviewMonitoring);let M=g?"consumer-pending":"unsupported";if(g&&this.reviewMonitoringEnabled&&this.ordinaryHello&&this.clientId)try{if(a=new Y(this.webSocketFactory(this.url),this.clientId,Math.min(this.reviewMonitoringRecipient,this.reviewMonitoring),f,this.requestTimeoutMs,this.connectTimeoutMs,()=>{const l=f();r(),l&&this.scheduleMonitorRecovery(t,i)}),await a.ready,!c())throw o();M="supported"}catch(l){const p=f();throw r(),p&&this.scheduleMonitorRecovery(t,i),l}const y=(l,p)=>a?a.request(l,p):this.requestOnSocket(l,p,void 0,t);return{origin:{backendId:this.prMonitorBackendId(),sessionId:crypto.randomUUID(),workspaceId:e},support:M,onRetired(l){return c()?(R.add(l),()=>{R.delete(l)}):(l(),()=>{})},onNotification:l=>(a??this).onNotification(p=>{c()&&l(p)}),request:async(l,p)=>{if(!c()||M==="consumer-pending"||p.workspaceId!==e)throw o();const k=await y(l,p),h=l==="events.subscribe"?k?.subscriptionId:void 0;if(!c())throw h&&this.socket===t&&this.connected&&i===this.capabilityHelloGeneration&&y("events.unsubscribe",{workspaceId:e,subscriptionId:h}).catch(()=>{}),o();return h&&m.add(h),l==="events.unsubscribe"&&m.delete(String(p.subscriptionId)),k},release:async()=>{const l=c();r(),l&&!a&&await Promise.all([...m].map(p=>this.requestOnSocket("events.unsubscribe",{workspaceId:e,subscriptionId:p},void 0,t).catch(()=>{})))}}}request(e,t,i){return this.requestOnSocket(e,t,i)}requestOnSocket(e,t,i,o){if(i?.localMachine)return Promise.reject(new u({code:"UNAVAILABLE",message:"Local machine requests require the desktop bridge"}));if(this.disposed)return Promise.reject(new u({code:"UNAVAILABLE",message:"Backend transport disposed"}));if(!o&&this.startupState?.state==="starting")return Promise.reject(new u(_(D(this.startupState))));const a=++this.requestId,d=i?.timeoutMs,R=typeof d=="number"&&Number.isFinite(d)&&d>0?d:this.requestTimeoutMs;return new Promise((m,r)=>{let f=!1;const c=setTimeout(()=>{f=!0,this.pending.delete(a),r(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`,data:{code:"TIMEOUT"}}))},R),g=y=>{clearTimeout(c),r(E(y))},M=y=>{if(f)return;if(this.disposed||this.socket!==y){g(new u({code:"TRANSPORT_ERROR",message:"Connection replaced"}));return}if(e==="presence.update"&&!this.helloConfirmed){g(this.helloError);return}try{ee(e,t,this.protocolVersion)}catch(h){g(h);return}let l=e==="client.hello"&&this.clientId?{clientId:this.clientId,...t}:t;if(e==="client.hello"){const h={...l},S={...h.capabilities};Object.prototype.hasOwnProperty.call(S,"reviewMonitoring")&&(this.reviewMonitoringEnabled=this.reviewMonitoringRecipient!==void 0&&v(S.reviewMonitoring)),delete S.reviewMonitoring,delete h.connectionRole,h.capabilities!==void 0&&(h.capabilities=S),l=h}const p=JSON.stringify({jsonrpc:"2.0",id:a,method:e,params:l}),k=e==="client.hello"?++this.capabilityHelloGeneration:0;if(e==="client.hello"){this.helloConfirmed=!1,this.ordinaryHello=!1,this.clearMonitorRecovery(),this.nodeCapabilities=null,this.reviewMonitoring=void 0;for(const h of[...this.monitorRetirements])h();this.acknowledgedHello=null}this.pending.set(a,{method:e,timeout:c,resolve:h=>{if(e==="client.hello"&&this.socket===y&&k===this.capabilityHelloGeneration){const S=h?.clientId;if(typeof S=="string"&&S.length>0){const H=h.server?.capabilities;if(this.clientId=S,this.reviewMonitoring=H?.reviewMonitoring,this.ordinaryHello=h.connectionRole===void 0,this.acknowledgedHello=structuredClone(h),this.nodeCapabilities=Q(H),this.protocolVersion=z(h.protocolVersion),this.helloConfirmed=!0,this.connected)for(const W of this.monitorReady)W()}}m(h)},reject:r});try{y.send(p)}catch(h){clearTimeout(c),this.pending.delete(a),r(E(h))}};o?M(o):this.connected&&this.socket?M(this.socket):this.ensureConnected().then(M,g)})}async subscribe(e){return this.request("events.subscribe",e)}async unsubscribe(e,t){try{await this.request("events.unsubscribe",{subscriptionId:e,...t!==void 0?{workspaceId:t}:{}})}catch{}}onNotification(e){return this.notificationHandlers.add(e),()=>this.notificationHandlers.delete(e)}onReconnected(e){return this.reconnectedHandlers.add(e),()=>this.reconnectedHandlers.delete(e)}getConnectionStatus(){return this.connected?"connected":this.connecting?"connecting":"disconnected"}getStartupState(){return this.startupState}onStartupChange(e){return this.startupHandlers.add(e),()=>this.startupHandlers.delete(e)}onConnectionStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}dispose(){if(this.disposed)return;this.disposed=!0,this.clearReconnect(),this.clearConnectTimer();const e=new u({code:"UNAVAILABLE",message:"Backend transport disposed"});this.failPending(e),this.failWaiters(e),this.teardownSocket(),this.connected=!1,this.connecting=!1,this.notifyStatusChange(),this.notificationHandlers.clear(),this.reconnectedHandlers.clear(),this.statusHandlers.clear(),this.startupHandlers.clear()}ensureConnected(){return this.connected&&this.socket?Promise.resolve(this.socket):new Promise((e,t)=>{this.connectWaiters.push({resolve:e,reject:t}),this.start()})}start(){this.disposed||this.socket||this.connecting||this.reconnectTimer||this.connect()}connect(){this.clearReconnect(),this.connecting=!0,this.notifyStatusChange();let e;try{e=this.webSocketFactory(this.url)}catch(t){this.connecting=!1,this.onConnectionFailure(E(t));return}this.socket=e,this.helloConfirmed=!1,this.connectTimer=setTimeout(()=>{this.connectTimer=null,!(this.socket!==e||this.connected)&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:`WebSocket connect attempt timed out after ${this.connectTimeoutMs}ms`})))},this.connectTimeoutMs),e.onopen=()=>{this.socket===e&&this.onConnected(e)},e.onmessage=t=>{this.socket===e&&this.onMessage(t.data)},e.onerror=null,e.onclose=()=>{this.socket===e&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})))}}onConnected(e){this.clearConnectTimer(),this.performHelloHandshake(e)}async performHelloHandshake(e){try{await this.requestOnSocket("client.hello",{},{timeoutMs:Math.min(this.requestTimeoutMs,be)},e)}catch(o){if(this.disposed||this.socket!==e)return;const a=q(o);if(a){this.enterStartup(e,a);return}this.helloError=E(o)}if(this.disposed||this.socket!==e)return;this.startupPoller.reset(),this.startupSocket=null;const t=this.startupState!==null;this.startupState=null,this.connecting=!1,this.connected=!0,this.currentReconnectDelay=this.reconnectDelayMs;const i=this.hasBeenConnected||this.hasConnectionFailed;if(this.hasBeenConnected=!0,this.hasConnectionFailed=!1,this.notifyStatusChange(),t)for(const o of[...this.startupHandlers])o(null);if(this.flushWaiters(e),i)for(const o of[...this.reconnectedHandlers])o()}onConnectionFailure(e){if(this.clearConnectTimer(),!this.disposed){if(this.startupSocket!==null&&this.startupSocket===this.socket){this.startupHandoff(!0);return}this.startupState?.state==="starting"&&(this.startupPoller.reset(),this.updateStartup(null)),this.hasConnectionFailed=!0,this.connected=!1,this.notifyStatusChange(),this.teardownSocket(),this.failPending(e),this.failWaiters(e),this.scheduleReconnect()}}notifyStatusChange(){const e=this.getConnectionStatus();if(e!==this.lastNotifiedStatus){this.lastNotifiedStatus=e;for(const t of[...this.statusHandlers])t(e)}}onMessage(e){if(typeof e!="string")return;let t;try{t=JSON.parse(e)}catch{console.warn("[browser-websocket-transport] Dropping unparseable frame");return}if(!t||typeof t!="object")return;const i=typeof t.method=="string",o=t.id!=null;if(i&&o){this.sendFrame({jsonrpc:"2.0",id:t.id,error:{code:-32601,message:`Method not found: ${String(t.method)}`}});return}if(o){const a=Number(t.id),d=this.pending.get(a);if(!d)return;this.pending.delete(a),clearTimeout(d.timeout),t.error?d.reject(new u(_(t.error))):d.resolve(t.result);return}if(i){const a={method:t.method,params:t.params};for(const d of[...this.notificationHandlers])d(a)}}sendFrame(e){try{this.socket?.send(JSON.stringify(e))}catch{}}scheduleReconnect(){if(this.disposed||this.reconnectTimer)return;const e=this.currentReconnectDelay;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.currentReconnectDelay=Math.min(e*2,this.maxReconnectDelayMs),this.disposed||this.connect()},e)}clearReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearConnectTimer(){this.connectTimer&&(clearTimeout(this.connectTimer),this.connectTimer=null)}scheduleMonitorRecovery(e,t){this.monitorRetry||this.disposed||(this.monitorRetry=setTimeout(()=>{if(this.monitorRetry=null,!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t)for(const i of[...this.monitorReady])i()},this.reconnectDelayMs))}clearMonitorRecovery(){this.monitorRetry&&clearTimeout(this.monitorRetry),this.monitorRetry=null}teardownSocket(){this.startupPoller.stop(),this.startupSocket=null,this.reviewMonitoring=void 0,this.clearMonitorRecovery();for(const t of[...this.monitorRetirements])t();if(this.acknowledgedHello=null,this.nodeCapabilities=null,this.capabilityHelloGeneration+=1,this.protocolVersion=null,!this.socket)return;const e=this.socket;this.socket=null,e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null;try{e.close()}catch{}}updateStartup(e){this.startupState=e?Object.freeze({...e}):null;for(const t of[...this.startupHandlers])t(this.startupState)}startupRefusal(){return this.startupState?new u(_(D(this.startupState))):new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})}enterStartup(e,t){if(this.hasConnectionFailed=!0,t.kind==="failed"){this.failStartup(t.message,t.snapshot);return}this.startupSocket=e,this.startupPoller.start(t),this.failWaiters(this.startupRefusal())}startupHandoff(e){const t=this.startupRefusal();if(this.teardownSocket(),this.failPending(t),this.disposed)return;this.connecting=!0,this.notifyStatusChange(),this.clearReconnect();let i=this.reconnectDelayMs;e?this.currentReconnectDelay=this.reconnectDelayMs:(i=this.currentReconnectDelay,this.currentReconnectDelay=Math.min(i*2,this.maxReconnectDelayMs)),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.disposed||this.connect()},i)}failStartup(e,t){this.startupPoller.stop(),this.startupSocket=null,this.hasConnectionFailed=!0,this.updateStartup({state:"failed",snapshot:t,available:t!==null,message:e}),this.connecting=!1,this.onConnectionFailure(this.startupRefusal())}failPending(e){for(const t of this.pending.values())clearTimeout(t.timeout),t.reject(e);this.pending.clear()}flushWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.resolve(e)}failWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.reject(e)}}function He(s){return new we(s)}let A=null;const I=new Set;function De(s){A=s;for(const e of[...I])e(s)}function Ue(){return A}function Le(s){return I.add(s),A&&s(A),()=>I.delete(s)}export{u as B,_e as M,Oe as P,Ie as R,Ae as a,Ce as b,He as c,Ne as d,Pe as e,v as f,Ue as g,Ee as i,Le as o,De as r,de as s};
@@ -1 +1 @@
1
- import{a2 as f,HO as p,qy as k}from"./DaA44xVk.js";import{cd as m}from"./DYhIMPy1.js";const h=["agent:started","agent:completed","agent:failed","agent:idle","agent:status-changed","task:created","task:status-changed","workspace:displayStatus-changed","workspace:attention-changed","pr:linked","pr:updated","pr:unlinked","git:commit","git:pull"],y="agent:delegated";function n(t){return typeof t=="string"&&t.length>0?t:void 0}function S(t,e){if(t==="agent:failed")return"err";if(t==="agent:status-changed"){const r=n(e.status)??"";return r==="error"||r==="failed"?"err":r==="completed"?"ok":p(r)==="running"?"info":"idle"}if(t==="agent:idle")return"idle";if(t==="agent:completed")return"ok";if(t==="task:created")return"info";if(t==="task:status-changed")return n(e.newStatus)==="complete"?"ok":"info";if(t==="workspace:displayStatus-changed"){const r=n(e.displayStatus);return r==="pr_merged"||r==="complete"?"ok":r==="pr_ready"||r==="pr_queued"||r==="pr_open"?"accent":r==="needs_attention"?"warn":r==="idle"||r==="not_started"?"idle":"info"}return t==="workspace:attention-changed"?k(n(e.attention)??"")?"warn":"info":t.startsWith("pr:")?"accent":"info"}function T(t,e){switch(t){case"agent:started":case"agent:completed":case"agent:idle":return"";case"agent:failed":return n(e.error)??"";case"agent:status-changed":return"";case"task:created":return n(e.noteTitle)??n(e.noteId)??"";case"task:status-changed":return[n(e.noteTitle)??n(e.noteId),n(e.newStatus)].filter(Boolean).join(" → ");case"workspace:displayStatus-changed":return"";case"workspace:attention-changed":return n(e.attention)??"";case"pr:linked":case"pr:updated":return[typeof e.prNumber=="number"?`#${e.prNumber}`:void 0,n(e.prStatus)].filter(Boolean).join(" ");case"pr:unlinked":return"";case"git:commit":return n(e.message)??n(e.commit)??"";case"git:pull":return n(e.branch)??"";default:return""}}const w=new Set(["idle","inactive"]);function E(t,e){if(t!=="agent:status-changed")return!1;const r=(n(e.status)??"").toLowerCase();return w.has(r)}function _(t,e){return t==="workspace:attention-changed"&&n(e.attention)===f}function N(t){const e=typeof t.type=="string"?t.type:"";if(!h.includes(e))return null;const r=n(t.id),u=n(t.timestamp),c=n(t.workspaceId);if(!r||!u||!c)return null;const a=t.data&&typeof t.data=="object"?t.data:{};if(E(e,a)||_(e,a))return null;const s={id:r,ts:u,colorClass:S(e,a),source:c,kind:e,text:T(e,a)};if(e.startsWith("agent:")){const i=n(a.agentId),d=n(a.agentName);if(i&&(s.agentId=i),d&&(s.agentName=d),e==="agent:status-changed"){const l=n(a.status);l&&(s.agentStatus=l)}}if(e==="workspace:displayStatus-changed"){const i=n(a.displayStatus);i&&(s.displayStatus=i)}return s}const o=new Set;function D(t){return o.add(t),()=>o.delete(t)}function A(t){for(const e of o)e(t)}const g=m(null),H={subscribe:g.subscribe};function U(t){g.set(t)}export{y as H,h as a,A as e,N as m,D as o,U as s,H as t};
1
+ import{a2 as f,HR as p,qA as k}from"./BSwWMzab.js";import{cd as m}from"./DYhIMPy1.js";const h=["agent:started","agent:completed","agent:failed","agent:idle","agent:status-changed","task:created","task:status-changed","workspace:displayStatus-changed","workspace:attention-changed","pr:linked","pr:updated","pr:unlinked","git:commit","git:pull"],N="agent:delegated";function n(t){return typeof t=="string"&&t.length>0?t:void 0}function S(t,e){if(t==="agent:failed")return"err";if(t==="agent:status-changed"){const r=n(e.status)??"";return r==="error"||r==="failed"?"err":r==="completed"?"ok":p(r)==="running"?"info":"idle"}if(t==="agent:idle")return"idle";if(t==="agent:completed")return"ok";if(t==="task:created")return"info";if(t==="task:status-changed")return n(e.newStatus)==="complete"?"ok":"info";if(t==="workspace:displayStatus-changed"){const r=n(e.displayStatus);return r==="pr_merged"||r==="complete"?"ok":r==="pr_ready"||r==="pr_queued"||r==="pr_open"?"accent":r==="needs_attention"?"warn":r==="idle"||r==="not_started"?"idle":"info"}return t==="workspace:attention-changed"?k(n(e.attention)??"")?"warn":"info":t.startsWith("pr:")?"accent":"info"}function T(t,e){switch(t){case"agent:started":case"agent:completed":case"agent:idle":return"";case"agent:failed":return n(e.error)??"";case"agent:status-changed":return"";case"task:created":return n(e.noteTitle)??n(e.noteId)??"";case"task:status-changed":return[n(e.noteTitle)??n(e.noteId),n(e.newStatus)].filter(Boolean).join(" → ");case"workspace:displayStatus-changed":return"";case"workspace:attention-changed":return n(e.attention)??"";case"pr:linked":case"pr:updated":return[typeof e.prNumber=="number"?`#${e.prNumber}`:void 0,n(e.prStatus)].filter(Boolean).join(" ");case"pr:unlinked":return"";case"git:commit":return n(e.message)??n(e.commit)??"";case"git:pull":return n(e.branch)??"";default:return""}}const w=new Set(["idle","inactive"]);function E(t,e){if(t!=="agent:status-changed")return!1;const r=(n(e.status)??"").toLowerCase();return w.has(r)}function _(t,e){return t==="workspace:attention-changed"&&n(e.attention)===f}function y(t){const e=typeof t.type=="string"?t.type:"";if(!h.includes(e))return null;const r=n(t.id),u=n(t.timestamp),c=n(t.workspaceId);if(!r||!u||!c)return null;const a=t.data&&typeof t.data=="object"?t.data:{};if(E(e,a)||_(e,a))return null;const s={id:r,ts:u,colorClass:S(e,a),source:c,kind:e,text:T(e,a)};if(e.startsWith("agent:")){const i=n(a.agentId),d=n(a.agentName);if(i&&(s.agentId=i),d&&(s.agentName=d),e==="agent:status-changed"){const l=n(a.status);l&&(s.agentStatus=l)}}if(e==="workspace:displayStatus-changed"){const i=n(a.displayStatus);i&&(s.displayStatus=i)}return s}const o=new Set;function A(t){return o.add(t),()=>o.delete(t)}function D(t){for(const e of o)e(t)}const g=m(null),H={subscribe:g.subscribe};function U(t){g.set(t)}export{N as H,h as a,D as e,y as m,A as o,U as s,H as t};
@@ -1 +1 @@
1
- import{a as S}from"./BJzHxIyr.js";import{aE as g}from"./DYhIMPy1.js";import{g as c}from"./D6Tu0KcL.js";import{p as l}from"./ZaVuh6Ie.js";import{d as I}from"./B0Z-1lwJ.js";import{dx as w}from"./BMoOyvL9.js";import{AA as f,g as y,Hm as o,gN as A,u4 as m,u5 as N,u7 as b}from"./DaA44xVk.js";import{g as W,n as h}from"./DHQetc-m.js";import{S as D,a as R,n as E}from"./Dwxm4mRs.js";import{n as O,o as v}from"./CLevwIvK.js";const k="intent:onboarding-skip:v1";function P(e){return f.getItem(h(k,e))==="1"}function re(e){P(e)||f.setItem(h(k,e),"1")}function _(e){return e.connections?.hasReceivedList===!0&&P(W(e))}function F(e,a){return e.some(t=>t.id!==y&&t.id!==a&&t.status!=="Archived"&&t.status!=="Deleted")}function j(e,a,t=!1){return t||F(e,a)?"/":"/workspace/new"}function d(e,a){return j(w.select(e),a,_(e))}const se=Object.freeze(Object.defineProperty({__proto__:null,resolveWindowEmptyDestination:d},Symbol.toStringTag,{value:"Module"})),r=new S("WorkspaceNavigation");async function L(e){r.info(`[navigateToAgent] Navigating to agent: ${e}`);const t=g(l).params.id;if(!t){r.error("[navigateToAgent] No workspace ID found in current page params");return}const n=new URL(window.location.href);n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","agent"),n.searchParams.set("selectedAgent",e),n.searchParams.delete("selectedTerminal"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"agent",e))}async function $(e){r.info(`[navigateToTerminal] Navigating to terminal: ${e}`);const t=g(l).params.id;if(!t){r.error("[navigateToTerminal] No workspace ID found in current page params");return}const n=new URL(window.location.href),i=n.searchParams.get("drawerOpen")==="1",s=n.searchParams.get("drawerType")==="terminal";(!i||!s)&&n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","terminal"),n.searchParams.set("selectedTerminal",e),n.searchParams.delete("selectedAgent"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"terminal",e))}function C(e){return!e||!(e instanceof Element)?void 0:e.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}async function p(e,a){r.info(`[navigateToNote] Navigating to note: ${e}`,a);const t=g(l),n=a?.workspaceId??t.params.id;if(!n){r.error("[navigateToNote] No workspace ID found in current page params");return}o.dispatch(b(n,e,{openInAdjacentPanel:a?.openInAdjacentPanel??!1,openInNewAdjacentPanel:a?.openInNewAdjacentPanel??!1,sourcePanelId:a?.sourcePanelId}))}async function U(e,a,t){r.info(`[navigateToFile] Navigating to file: ${e}${a?` (line ${a})`:""}`,t);const i=g(l).params.id;if(!i){r.error("[navigateToFile] No workspace ID found in current page params");return}o.dispatch(N(i,e,{line:a,openInAdjacentPanel:t?.openInAdjacentPanel??!1,sourcePanelId:t?.sourcePanelId}))}async function M(){r.info("[navigateToSpec] Navigating to workspace spec"),await p("spec")}async function B(){r.info("[closeDrawer] Closing drawer");const a=g(l).params.id;if(!a){r.error("[closeDrawer] No workspace ID found in current page params");return}const t=new URL(window.location.href);t.searchParams.set("drawerOpen","0"),t.searchParams.delete("selectedAgent"),t.searchParams.delete("selectedTerminal"),await c(t.toString(),{replaceState:!0}),o.dispatch(A(a))}async function K(){r.info("[clearMainContent] Clearing main content");const e=new URL(window.location.href);e.searchParams.set("mainContentType","empty"),e.searchParams.delete("selectedNoteId"),e.searchParams.delete("selectedFile"),e.searchParams.delete("line"),await c(e.toString(),{replaceState:!1})}async function H(e,a,t){r.info("[navigateToTask] Navigating to task",{noteId:e,taskPosition:a,taskText:t}),await p(e);const n=()=>{I("scroll-to-task",{noteId:e,taskPosition:a,taskText:t},{bubbles:!0}),r.debug("[navigateToTask] Dispatched scroll-to-task event",{noteId:e,taskPosition:a})},i=[100,300,600];for(const s of i)setTimeout(n,s)}async function G(e){r.info("[navigateToSettings] Navigating to settings",e);const a=new URL("/settings",window.location.origin),t=window.location.pathname.match(/^\/workspace\/([^/]+)/)?.[1],n=t==="new"?void 0:t,i=e?.workspaceId??n;if(e?.tab&&a.searchParams.set("tab",e.tab),e?.specialist&&a.searchParams.set("specialist",e.specialist),e?.view&&a.searchParams.set("view",e.view),i&&a.searchParams.set("workspaceId",i),e?.hash&&(a.hash=e.hash),typeof window<"u"&&window.location.pathname==="/settings"){if(e?.tab||e?.specialist||e?.view||e?.workspaceId){const s=new URL(window.location.href);e?.tab&&s.searchParams.set("tab",e.tab),e?.specialist&&s.searchParams.set("specialist",e.specialist),e?.view&&s.searchParams.set("view",e.view),e?.workspaceId&&s.searchParams.set("workspaceId",e.workspaceId),e?.hash&&(s.hash=e.hash),await c(s.toString(),{replaceState:!0});return}if(e?.hash){const s=`#${e.hash}`;window.location.hash===s&&(window.location.hash=""),window.location.hash=s;return}return}await E(a.pathname+a.search+a.hash)}function T(){const e=typeof sessionStorage>"u"?null:sessionStorage.getItem(D);if(e&&e!=="/"&&!R(e))return e;const a=u();return a?`/workspace/${a.id}`:d(o.state)}async function z(){const e=T();r.info("[navigateBackFromSettings] Navigating back to:",e),await O(e)}function u(e){return w.select(o.state).find(a=>a.id!==e&&a.status!=="Archived"&&a.status!=="Deleted")}async function Y(){const e=u();if(e){r.info("[navigateToFirstWorkspace] Showing workspace:",e.id),await v(e.id);return}const a=d(o.state);r.info("[navigateToFirstWorkspace] Navigating to:",a),await c(a)}async function x(e){const a=u(e);if(a){r.info("[navigateAfterWorkspaceRemoval] Showing workspace:",a.id),await v(a.id);return}const t=d(o.state,e);r.info("[navigateAfterWorkspaceRemoval] Navigating to:",t),await c(t)}const ie=Object.freeze(Object.defineProperty({__proto__:null,clearMainContent:K,closeDrawer:B,findSourcePanelId:C,getSettingsPreviousPath:T,navigateAfterWorkspaceRemoval:x,navigateBackFromSettings:z,navigateToAgent:L,navigateToFile:U,navigateToFirstWorkspace:Y,navigateToNote:p,navigateToSettings:G,navigateToSpec:M,navigateToTask:H,navigateToTerminal:$},Symbol.toStringTag,{value:"Module"}));export{U as a,Y as b,p as c,G as d,H as e,C as f,d as g,ie as h,_ as i,z as n,re as r,se as w};
1
+ import{a as S}from"./BJzHxIyr.js";import{aE as g}from"./DYhIMPy1.js";import{g as c}from"./B_ifqSee.js";import{p as l}from"./DeBw56y4.js";import{d as I}from"./B0Z-1lwJ.js";import{dx as w}from"./DY6JypjK.js";import{AD as f,g as y,Hp as o,gO as A,u7 as m,u8 as N,ua as b}from"./BSwWMzab.js";import{g as D,n as h}from"./BtAYzBSd.js";import{S as W,a as R,n as O}from"./B-rSL5ZP.js";import{n as E,o as v}from"./B7-651e2.js";const k="intent:onboarding-skip:v1";function P(e){return f.getItem(h(k,e))==="1"}function re(e){P(e)||f.setItem(h(k,e),"1")}function _(e){return e.connections?.hasReceivedList===!0&&P(D(e))}function F(e,a){return e.some(t=>t.id!==y&&t.id!==a&&t.status!=="Archived"&&t.status!=="Deleted")}function j(e,a,t=!1){return t||F(e,a)?"/":"/workspace/new"}function d(e,a){return j(w.select(e),a,_(e))}const se=Object.freeze(Object.defineProperty({__proto__:null,resolveWindowEmptyDestination:d},Symbol.toStringTag,{value:"Module"})),r=new S("WorkspaceNavigation");async function L(e){r.info(`[navigateToAgent] Navigating to agent: ${e}`);const t=g(l).params.id;if(!t){r.error("[navigateToAgent] No workspace ID found in current page params");return}const n=new URL(window.location.href);n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","agent"),n.searchParams.set("selectedAgent",e),n.searchParams.delete("selectedTerminal"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"agent",e))}async function $(e){r.info(`[navigateToTerminal] Navigating to terminal: ${e}`);const t=g(l).params.id;if(!t){r.error("[navigateToTerminal] No workspace ID found in current page params");return}const n=new URL(window.location.href),i=n.searchParams.get("drawerOpen")==="1",s=n.searchParams.get("drawerType")==="terminal";(!i||!s)&&n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","terminal"),n.searchParams.set("selectedTerminal",e),n.searchParams.delete("selectedAgent"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"terminal",e))}function C(e){return!e||!(e instanceof Element)?void 0:e.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}async function p(e,a){r.info(`[navigateToNote] Navigating to note: ${e}`,a);const t=g(l),n=a?.workspaceId??t.params.id;if(!n){r.error("[navigateToNote] No workspace ID found in current page params");return}o.dispatch(b(n,e,{openInAdjacentPanel:a?.openInAdjacentPanel??!1,openInNewAdjacentPanel:a?.openInNewAdjacentPanel??!1,sourcePanelId:a?.sourcePanelId}))}async function U(e,a,t){r.info(`[navigateToFile] Navigating to file: ${e}${a?` (line ${a})`:""}`,t);const i=g(l).params.id;if(!i){r.error("[navigateToFile] No workspace ID found in current page params");return}o.dispatch(N(i,e,{line:a,openInAdjacentPanel:t?.openInAdjacentPanel??!1,sourcePanelId:t?.sourcePanelId}))}async function M(){r.info("[navigateToSpec] Navigating to workspace spec"),await p("spec")}async function B(){r.info("[closeDrawer] Closing drawer");const a=g(l).params.id;if(!a){r.error("[closeDrawer] No workspace ID found in current page params");return}const t=new URL(window.location.href);t.searchParams.set("drawerOpen","0"),t.searchParams.delete("selectedAgent"),t.searchParams.delete("selectedTerminal"),await c(t.toString(),{replaceState:!0}),o.dispatch(A(a))}async function K(){r.info("[clearMainContent] Clearing main content");const e=new URL(window.location.href);e.searchParams.set("mainContentType","empty"),e.searchParams.delete("selectedNoteId"),e.searchParams.delete("selectedFile"),e.searchParams.delete("line"),await c(e.toString(),{replaceState:!1})}async function H(e,a,t){r.info("[navigateToTask] Navigating to task",{noteId:e,taskPosition:a,taskText:t}),await p(e);const n=()=>{I("scroll-to-task",{noteId:e,taskPosition:a,taskText:t},{bubbles:!0}),r.debug("[navigateToTask] Dispatched scroll-to-task event",{noteId:e,taskPosition:a})},i=[100,300,600];for(const s of i)setTimeout(n,s)}async function G(e){r.info("[navigateToSettings] Navigating to settings",e);const a=new URL("/settings",window.location.origin),t=window.location.pathname.match(/^\/workspace\/([^/]+)/)?.[1],n=t==="new"?void 0:t,i=e?.workspaceId??n;if(e?.tab&&a.searchParams.set("tab",e.tab),e?.specialist&&a.searchParams.set("specialist",e.specialist),e?.view&&a.searchParams.set("view",e.view),i&&a.searchParams.set("workspaceId",i),e?.hash&&(a.hash=e.hash),typeof window<"u"&&window.location.pathname==="/settings"){if(e?.tab||e?.specialist||e?.view||e?.workspaceId){const s=new URL(window.location.href);e?.tab&&s.searchParams.set("tab",e.tab),e?.specialist&&s.searchParams.set("specialist",e.specialist),e?.view&&s.searchParams.set("view",e.view),e?.workspaceId&&s.searchParams.set("workspaceId",e.workspaceId),e?.hash&&(s.hash=e.hash),await c(s.toString(),{replaceState:!0});return}if(e?.hash){const s=`#${e.hash}`;window.location.hash===s&&(window.location.hash=""),window.location.hash=s;return}return}await O(a.pathname+a.search+a.hash)}function T(){const e=typeof sessionStorage>"u"?null:sessionStorage.getItem(W);if(e&&e!=="/"&&!R(e))return e;const a=u();return a?`/workspace/${a.id}`:d(o.state)}async function z(){const e=T();r.info("[navigateBackFromSettings] Navigating back to:",e),await E(e)}function u(e){return w.select(o.state).find(a=>a.id!==e&&a.status!=="Archived"&&a.status!=="Deleted")}async function Y(){const e=u();if(e){r.info("[navigateToFirstWorkspace] Showing workspace:",e.id),await v(e.id);return}const a=d(o.state);r.info("[navigateToFirstWorkspace] Navigating to:",a),await c(a)}async function x(e){const a=u(e);if(a){r.info("[navigateAfterWorkspaceRemoval] Showing workspace:",a.id),await v(a.id);return}const t=d(o.state,e);r.info("[navigateAfterWorkspaceRemoval] Navigating to:",t),await c(t)}const ie=Object.freeze(Object.defineProperty({__proto__:null,clearMainContent:K,closeDrawer:B,findSourcePanelId:C,getSettingsPreviousPath:T,navigateAfterWorkspaceRemoval:x,navigateBackFromSettings:z,navigateToAgent:L,navigateToFile:U,navigateToFirstWorkspace:Y,navigateToNote:p,navigateToSettings:G,navigateToSpec:M,navigateToTask:H,navigateToTerminal:$},Symbol.toStringTag,{value:"Module"}));export{U as a,Y as b,p as c,G as d,H as e,C as f,d as g,ie as h,_ as i,z as n,re as r,se as w};
@@ -0,0 +1 @@
1
+ import{n as i}from"./B-rSL5ZP.js";import{o as n}from"./B7-651e2.js";import{g as o,Hp as a,Cv as s,tR as r,ts as p}from"./BSwWMzab.js";async function u(t,e){if(!(!t||!e)){if(t===o){await i("/"),a.dispatch(s(e)),a.dispatch(r("chief"));return}await n(t)&&a.dispatch(p(t,{agentId:e}))}}export{u as n};