@testmuai/kane-cli 0.6.7 → 0.6.8

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 (162) hide show
  1. package/dist/ChatSurface-QLRMFZJG.js +8 -0
  2. package/dist/{ChromeProfilePicker-IW3K43VC.js → ChromeProfilePicker-FJOUNY2B.js} +1 -1
  3. package/dist/{CliFeedbackPrompt-ZJ4LZGPK.js → CliFeedbackPrompt-HC4NNBTK.js} +1 -1
  4. package/dist/{CliUploadProgress-SMPVN7Q6.js → CliUploadProgress-VIEZQNZ5.js} +1 -1
  5. package/dist/{ConfigView-RTAGKZH4.js → ConfigView-LK5F4F7W.js} +1 -1
  6. package/dist/EvidenceViewOffer-HZ4WZKGM.js +2 -0
  7. package/dist/{FolderPicker-QUY7LNVZ.js → FolderPicker-3S57MSC6.js} +1 -1
  8. package/dist/{HelpView-47J2NZWJ.js → HelpView-BQ3TS7WE.js} +1 -1
  9. package/dist/{InfoBox-G63WZAMH.js → InfoBox-4HVXV3TD.js} +1 -1
  10. package/dist/{LinksBox-2HIHDT5K.js → LinksBox-3B2KO5S4.js} +1 -1
  11. package/dist/{ProfilesView-TUXQXPXJ.js → ProfilesView-FLRMROUR.js} +1 -1
  12. package/dist/{ProjectPicker-VUABWG2P.js → ProjectPicker-R3KLRGHH.js} +1 -1
  13. package/dist/{SaveSessionPrompt-PNVGNLGO.js → SaveSessionPrompt-P7HSG7R7.js} +1 -1
  14. package/dist/SingleShotApp-ZBZY7KGR.js +2 -0
  15. package/dist/{SummaryBox-36MDDDYQ.js → SummaryBox-HCDIWKPS.js} +1 -1
  16. package/dist/TestMdRunView-GQP2QGFU.js +2 -0
  17. package/dist/{WhoamiView-LHU6RGIY.js → WhoamiView-ZD6FIBMK.js} +1 -1
  18. package/dist/{bind-E67W2DXG.js → bind-RSVQXQJT.js} +2 -2
  19. package/dist/{bridge-WVFTWHKP.js → bridge-D2HETW5M.js} +1 -1
  20. package/dist/{changelog-D4Y5QJIZ.js → changelog-QB7S4VV4.js} +1 -1
  21. package/dist/chat-committer-MWZ4JQMM.js +2 -0
  22. package/dist/chat-controller-YX5A7R52.js +2 -0
  23. package/dist/{chunk-3GOZ7R4G.js → chunk-27GF2OQ7.js} +3 -3
  24. package/dist/{chunk-GAD6IBZ6.js → chunk-35RV2AAV.js} +8 -8
  25. package/dist/{chunk-7ZMYAXES.js → chunk-3BIEIXJK.js} +1 -1
  26. package/dist/{chunk-UZWOHCFX.js → chunk-4GXOBABK.js} +1 -1
  27. package/dist/chunk-5VC7MBHR.js +2 -0
  28. package/dist/{chunk-XUHVQ5VL.js → chunk-66LXV7NN.js} +1 -1
  29. package/dist/{chunk-JR37W7IJ.js → chunk-6WHKJSMJ.js} +1 -1
  30. package/dist/{chunk-BBZBXSTP.js → chunk-A6TFZQV6.js} +1 -1
  31. package/dist/{chunk-AASBJJCU.js → chunk-ATO6NM45.js} +1 -1
  32. package/dist/{chunk-LVWB6TB2.js → chunk-AXJIXRYF.js} +1 -1
  33. package/dist/{chunk-RBLZUDMZ.js → chunk-B22NUHB2.js} +2 -2
  34. package/dist/chunk-BLHCGRSK.js +11 -0
  35. package/dist/chunk-BSFONZ2E.js +2 -0
  36. package/dist/{chunk-Z34XRBKQ.js → chunk-BUVRZXO3.js} +1 -1
  37. package/dist/{chunk-G5CYSC23.js → chunk-D4WLVWJQ.js} +1 -1
  38. package/dist/{chunk-3CY3DZDH.js → chunk-D5IZ77YG.js} +2 -2
  39. package/dist/{chunk-UQVKNUYO.js → chunk-ELN3EN4K.js} +1 -1
  40. package/dist/{chunk-QG6LJCZG.js → chunk-EQORZ6RT.js} +1 -1
  41. package/dist/chunk-EYZWG32F.js +13 -0
  42. package/dist/{chunk-TADJIOHV.js → chunk-F4FXE466.js} +1 -1
  43. package/dist/chunk-FCMLIK7P.js +2 -0
  44. package/dist/{chunk-TSWGQKUK.js → chunk-FCZ2YFD3.js} +2 -2
  45. package/dist/{chunk-QVJ7C4GW.js → chunk-GFKIE3AL.js} +1 -1
  46. package/dist/chunk-GG43HSU2.js +3 -0
  47. package/dist/{chunk-KVAALPTA.js → chunk-GO4CBUB6.js} +1 -1
  48. package/dist/{chunk-RWIHSR4H.js → chunk-HCWEZCKP.js} +1 -1
  49. package/dist/{chunk-SK2GVMTJ.js → chunk-IQFUBT6Z.js} +1 -1
  50. package/dist/{chunk-77PBBYRZ.js → chunk-JKHQBGFY.js} +2 -2
  51. package/dist/{chunk-3NR6OTHL.js → chunk-K4ERF7GT.js} +1 -1
  52. package/dist/chunk-K4LCN5X4.js +6 -0
  53. package/dist/{chunk-NEHF4C6X.js → chunk-K7P6VNLI.js} +1 -1
  54. package/dist/chunk-L3HG5ONB.js +4 -0
  55. package/dist/chunk-LEA6IHXC.js +2 -0
  56. package/dist/{chunk-RGQIBS32.js → chunk-MEHEGW3V.js} +1 -1
  57. package/dist/{chunk-WFQUDSKY.js → chunk-N5YIMTGV.js} +1 -1
  58. package/dist/{chunk-QYTMD6NM.js → chunk-NKCXCCPM.js} +1 -1
  59. package/dist/{chunk-DL5CXC64.js → chunk-NKUA3TSO.js} +1 -1
  60. package/dist/chunk-NVGTSXCJ.js +9 -0
  61. package/dist/{chunk-IX34JIXK.js → chunk-OYOTWI53.js} +1 -1
  62. package/dist/{chunk-X47VFBIV.js → chunk-PV4EDQY4.js} +1 -1
  63. package/dist/{chunk-NMKZHHB6.js → chunk-PXPXK4Q7.js} +1 -1
  64. package/dist/{chunk-EDM6YACR.js → chunk-Q3WHZ26R.js} +1 -1
  65. package/dist/{chunk-WJG4ZPUH.js → chunk-QFD6CB4P.js} +1 -1
  66. package/dist/chunk-QM4S2APK.js +2 -0
  67. package/dist/{chunk-OPDJD7WS.js → chunk-QOGQBVTP.js} +2 -2
  68. package/dist/{chunk-I37UOX73.js → chunk-QZ7DZXLQ.js} +3 -3
  69. package/dist/chunk-SHAA6FOD.js +11 -0
  70. package/dist/{chunk-6EC54ZHT.js → chunk-TAUSKB3O.js} +1 -1
  71. package/dist/{chunk-A2AZQ4PQ.js → chunk-TBXIOT6M.js} +1 -1
  72. package/dist/chunk-TFVMSEIA.js +2 -0
  73. package/dist/{chunk-5J3HQZNU.js → chunk-TRXNJZSL.js} +1 -1
  74. package/dist/{chunk-FYSWQ4K7.js → chunk-VRVSOGXH.js} +1 -1
  75. package/dist/{chunk-MTG2LRGV.js → chunk-VZHXNQDO.js} +1 -1
  76. package/dist/chunk-XSAZDIQV.js +347 -0
  77. package/dist/chunk-XWIN3S7O.js +4 -0
  78. package/dist/{chunk-YB54MHKU.js → chunk-YEMR62WY.js} +1 -1
  79. package/dist/{chunk-GLVDOR5G.js → chunk-YKZIACYJ.js} +1 -1
  80. package/dist/{chunk-TTJ4XMWP.js → chunk-YTK3IQUB.js} +1 -1
  81. package/dist/{config-BZ7C5NU5.js → config-JV7HNJ3I.js} +1 -1
  82. package/dist/cover-cmd-L2HSVDLH.js +2 -0
  83. package/dist/{credentials-BPJL6YIZ.js → credentials-TQW3TT2I.js} +1 -1
  84. package/dist/dossier-ZHSHATVU.js +3 -0
  85. package/dist/evidence-ZFYDHO73.js +2 -0
  86. package/dist/evolve-cmd-YGJECGND.js +2 -0
  87. package/dist/{explain-cmd-AG6ZDXV6.js → explain-cmd-327F6ESA.js} +1 -1
  88. package/dist/{explain-cmd-NZPC6537.js → explain-cmd-E366QTAD.js} +1 -1
  89. package/dist/extract-bind-7UZXDON6.js +5 -0
  90. package/dist/{extract-cmd-4PGUDJMU.js → extract-cmd-TQ2MYXOG.js} +1 -1
  91. package/dist/gaps-cmd-IAEXXESW.js +2 -0
  92. package/dist/{generate-headless-NZUDYIKJ.js → generate-headless-XXECVP6L.js} +2 -2
  93. package/dist/index.js +12 -12
  94. package/dist/ingest-CBQAXVH6.js +2 -0
  95. package/dist/ingest-cmd-JN6PLDE3.js +3 -0
  96. package/dist/interactive-bind-WA2YVAUW.js +7 -0
  97. package/dist/lifecycle-cmd-KZOC4WDW.js +2 -0
  98. package/dist/list-cmd-6X5U46RD.js +3 -0
  99. package/dist/{list-commands-55RCFEOL.js → list-commands-I577A5LK.js} +1 -1
  100. package/dist/logical-ids-RFGWBVML.js +2 -0
  101. package/dist/login-flow-OVEZXSMW.js +2 -0
  102. package/dist/{persist-recorded-session-HK7JUONC.js → persist-recorded-session-DT3K6ZYQ.js} +1 -1
  103. package/dist/pipeline-5N7HWGAL.js +2 -0
  104. package/dist/readmodel-V3DVL6NP.js +2 -0
  105. package/dist/reconcile-cmd-HYYH3SZS.js +2 -0
  106. package/dist/{recording-banner-5IYX2KBV.js → recording-banner-QI77ERTZ.js} +1 -1
  107. package/dist/{require-project-folder-J4Q4FRQ4.js → require-project-folder-2UAXXZA4.js} +1 -1
  108. package/dist/review-cmd-XVWPSWU2.js +4 -0
  109. package/dist/run-RYIYWV63.js +2 -0
  110. package/dist/run-VMKZDO7J.js +2 -0
  111. package/dist/{run-test-md-WN6BH3PC.js → run-test-md-DKRJOUFA.js} +2 -2
  112. package/dist/{skill-installer-4HYPUBNB.js → skill-installer-TK5REDD6.js} +1 -1
  113. package/dist/{spawner-VD6YFZ43.js → spawner-K7LWPNIC.js} +1 -1
  114. package/dist/tcg-generate-6EJLU5KX.js +2 -0
  115. package/dist/{testmd-actions-LT5FNIR6.js → testmd-actions-Q2XWL7P5.js} +1 -1
  116. package/dist/token-refresh-NQZJEUQE.js +2 -0
  117. package/dist/{validate-basic-XWGKC5VF.js → validate-basic-XEJGB4GN.js} +1 -1
  118. package/dist/{version-check-6FDTS6MK.js → version-check-IT7T5YKJ.js} +1 -1
  119. package/dist/{view-cmd-PCDG3FIC.js → view-cmd-G4PGJRQH.js} +3 -3
  120. package/dist/walk-session-HCTG4LN2.js +2 -0
  121. package/package.json +6 -6
  122. package/dist/ChatSurface-Y2M6HB2R.js +0 -8
  123. package/dist/EvidenceViewOffer-LHPIZUGQ.js +0 -2
  124. package/dist/SingleShotApp-BZV5CULT.js +0 -2
  125. package/dist/TestMdRunView-A655PMEY.js +0 -2
  126. package/dist/chat-committer-WOTCC7L3.js +0 -2
  127. package/dist/chat-controller-MONWZKS7.js +0 -4
  128. package/dist/chunk-64LC36AF.js +0 -2
  129. package/dist/chunk-6PS65QFF.js +0 -2
  130. package/dist/chunk-CIFVUX3B.js +0 -4
  131. package/dist/chunk-DCWCANNS.js +0 -6
  132. package/dist/chunk-GBBVP2JW.js +0 -2
  133. package/dist/chunk-IYTHPCQ2.js +0 -356
  134. package/dist/chunk-NMZATEKQ.js +0 -9
  135. package/dist/chunk-QHFUDBQH.js +0 -2
  136. package/dist/chunk-R7NNIQMH.js +0 -11
  137. package/dist/chunk-RE3BZVGE.js +0 -3
  138. package/dist/chunk-VLC24QVT.js +0 -2
  139. package/dist/chunk-Y6HPW2OQ.js +0 -2
  140. package/dist/chunk-YTZUYCFZ.js +0 -2
  141. package/dist/chunk-YZBLBPOE.js +0 -13
  142. package/dist/cover-cmd-DN5D6A3S.js +0 -2
  143. package/dist/evidence-E5B24ZO6.js +0 -2
  144. package/dist/evolve-cmd-V7H4PLCX.js +0 -2
  145. package/dist/extract-bind-3QBBCWYE.js +0 -5
  146. package/dist/gaps-cmd-42LPHWFP.js +0 -2
  147. package/dist/ingest-GOKIMEP4.js +0 -2
  148. package/dist/ingest-cmd-BTYHVJ33.js +0 -3
  149. package/dist/interactive-bind-TKRWAPJU.js +0 -7
  150. package/dist/lifecycle-cmd-E6AXODQD.js +0 -2
  151. package/dist/list-cmd-RJVLH2GR.js +0 -3
  152. package/dist/logical-ids-QZQRQ3TV.js +0 -2
  153. package/dist/login-flow-WNIHDQXF.js +0 -2
  154. package/dist/pipeline-FTLXJQRT.js +0 -2
  155. package/dist/readmodel-KTNI6QDC.js +0 -2
  156. package/dist/reconcile-cmd-5XC4AUSJ.js +0 -2
  157. package/dist/review-cmd-XB2DCTMZ.js +0 -4
  158. package/dist/run-2RFR2ASQ.js +0 -2
  159. package/dist/run-3ZYJQBBC.js +0 -2
  160. package/dist/tcg-generate-77QKMB63.js +0 -2
  161. package/dist/token-refresh-PCOAZBKK.js +0 -2
  162. package/dist/walk-session-YS62CWX5.js +0 -2
@@ -0,0 +1,8 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as mt,b as de,c as ft,d as Ae}from"./chunk-BSFONZ2E.js";import{a as be}from"./chunk-XWIN3S7O.js";import{a as gt}from"./chunk-TFVMSEIA.js";import{b as ut,c as dt}from"./chunk-GG43HSU2.js";import"./chunk-OSALXGD4.js";import{a as ct,b as at}from"./chunk-K4LCN5X4.js";import{a as ot}from"./chunk-5Y2G4NC7.js";import"./chunk-NVGBE2DR.js";import"./chunk-L3HG5ONB.js";import"./chunk-L4JIMNKW.js";import"./chunk-MBXWXBDM.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import{a as lt}from"./chunk-YCCUBQY4.js";import{a as st}from"./chunk-GO4CBUB6.js";import{b as it}from"./chunk-DFS4RMVP.js";import{y as o}from"./chunk-PXPXK4Q7.js";import{a as F}from"./chunk-HCBYKLMW.js";import{a as T,b as n,k as ke}from"./chunk-C44QQJR4.js";import{a as sn}from"./chunk-6YGTRKDT.js";import{e as q}from"./chunk-UR6MHSHU.js";var S=q(sn(),1);var u=q(F(),1),pt=3,ln=60;function Le(e,r){let s=e.options.length,l=s,d=e.multi_select?l++:null,f=e.allow_free_text?l++:null,i=r?l++:null;return{optionCount:s,doneIdx:d,freeIdx:f,batchIdx:i,maxSel:l-1}}var cn="\xA0",an={high:{text:`\u203C${cn}high`,color:o.red},med:{text:"med",color:"yellow"},low:{text:"low",color:o.dim}};function un({batch:e,i:r}){let s=e.resolution[r],l=s.form==="deferred"?"\u2013 deferred (the agent keeps it)":`\u2713 ${s.form}: ${s.choice}${s.form==="assumed"?" (flagged)":" (you)"}`;return(0,u.jsx)(T,{paddingLeft:5,children:(0,u.jsx)(n,{color:o.dim,children:l})})}function dn({batch:e,i:r,sel:s,focused:l,freeText:d,multiSel:f,layout:i,contentW:m}){let g=e.questions[r],b=e.cursor===r,p=e.resolution[r],x=b?"\u203A":" ",C=an[g.risk],B=h=>b&&l&&s===h?(0,u.jsx)(n,{color:o.generateAccent,children:"\u25B8"}):" ";return(0,u.jsxs)(T,{flexDirection:"column",children:[(0,u.jsxs)(T,{children:[(0,u.jsx)(T,{width:5,flexShrink:0,children:(0,u.jsx)(n,{bold:b,children:` ${r+1} ${x}`})}),(0,u.jsx)(T,{width:m,children:(0,u.jsxs)(n,{bold:b,children:[g.text,C?(0,u.jsx)(n,{color:C.color,bold:!1,children:` ${C.text}`}):null]})})]}),(0,u.jsx)(T,{paddingLeft:5,children:(0,u.jsx)(n,{color:o.dim,children:g.rationale})}),p&&!b?(0,u.jsx)(un,{batch:e,i:r}):(0,u.jsxs)(T,{flexDirection:"column",children:[g.options.map((h,y)=>{let E=b&&l&&s===y;return(0,u.jsx)(T,{paddingLeft:5,children:(0,u.jsxs)(n,{children:[B(y),g.multi_select?(0,u.jsx)(n,{color:f.includes(y)?o.green:o.dim,children:f.includes(y)?" [x]":" [ ]"}):null,(0,u.jsx)(n,{color:E?o.generateAccent:void 0,children:` ${y+1} ${h.label}`}),y===g.recommended_index?(0,u.jsx)(n,{color:o.dim,children:" (recommended)"}):null,p?.selected_index===y?(0,u.jsx)(n,{color:o.dim,children:" (current)"}):null]})},`o-${y}`)}),g.multi_select&&b&&i.doneIdx!=null?(0,u.jsx)(T,{paddingLeft:5,children:(0,u.jsxs)(n,{children:[B(i.doneIdx)," ",(0,u.jsx)(n,{color:o.green,children:"\u2714"}),(0,u.jsx)(n,{color:l&&s===i.doneIdx?o.generateAccent:void 0,children:" done \u2014 confirm selection"})]})}):null,g.allow_free_text&&b?d?(0,u.jsxs)(T,{paddingLeft:5,children:[(0,u.jsxs)(n,{children:[(0,u.jsx)(n,{color:o.generateAccent,children:"\u25B8"})," ",(0,u.jsx)(n,{color:o.dim,children:"\u270E "})]}),(0,u.jsx)(lt,{value:d.value,onChange:d.onChange,onSubmit:d.onSubmit,onCancel:d.onCancel,placeholder:"Tell me what to do"})]}):(0,u.jsx)(T,{paddingLeft:5,children:(0,u.jsxs)(n,{children:[i.freeIdx!=null?B(i.freeIdx):" "," ",(0,u.jsx)(n,{color:l&&i.freeIdx!=null&&s===i.freeIdx?o.generateAccent:o.dim,children:"\u270E Tell me what to do"})]})}):null]})]})}var mn=[];function ht({batch:e,sel:r=0,focused:s=!1,freeText:l=null,multiSelFor:d}){let{stdout:f}=ke(),i=f?.columns??80,m=i<ln,g=Math.max(20,(m?i:i-4)-5),b=e.resolution.filter(k=>!k).length,p=be(e),x=e.cursor>=0?e.questions[e.cursor]:void 0,C=x?Le(x,p!==""):{optionCount:0,doneIdx:null,freeIdx:null,batchIdx:null,maxSel:0},B=s&&C.batchIdx!=null&&r===C.batchIdx?(0,u.jsx)(n,{color:o.generateAccent,children:"\u25B8"}):" ",h=Math.max(0,Math.min(e.cursor<0?0:e.cursor,e.questions.length-pt)),y=e.questions.slice(h,h+pt),E=h,v=e.questions.length-h-y.length,L=(0,u.jsxs)(T,{flexDirection:"column",children:[(0,u.jsx)(n,{bold:!0,color:o.generateAccent,children:`? the agent needs ${b===1?"one answer":`${b} answers`} before it can continue`}),E>0?(0,u.jsx)(T,{paddingLeft:5,children:(0,u.jsx)(n,{color:o.dim,children:`\u22EE ${E} above`})}):null,y.map((k,P)=>(0,u.jsx)(dn,{batch:e,i:h+P,sel:r,focused:s,freeText:l,multiSel:d?d(h+P):mn,layout:C,contentW:g},k.id)),v>0?(0,u.jsx)(T,{paddingLeft:5,children:(0,u.jsx)(n,{color:o.dim,children:`\u22EE ${v} more`})}):null,p!==""?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n,{children:" "}),(0,u.jsx)(T,{paddingLeft:1,children:(0,u.jsxs)(n,{children:[B," ",(0,u.jsx)(n,{color:o.generateAccent,children:"\xBB"}),(0,u.jsx)(n,{bold:!0,color:s&&C.batchIdx!=null&&r===C.batchIdx?o.generateAccent:void 0,children:" Go with recommendations"}),(0,u.jsx)(n,{color:o.dim,children:" (tab)"})]})})]}):null,(0,u.jsx)(T,{paddingLeft:5,children:(0,u.jsx)(n,{color:o.muted,children:"\u2191\u2193 \xB7 \u23CE select \xB7 1-9 \xB7 type = your words \xB7 esc previous answer"})})]});return m?L:(0,u.jsx)(T,{flexDirection:"column",borderStyle:"round",borderColor:o.generateAccent,paddingX:1,children:L})}var A=q(F(),1),xt={high:0,med:1,low:2},gn={high:o.red,med:"yellow",low:o.dim};function fn(e){return e.map((r,s)=>({r,i:s})).sort((r,s)=>(xt[r.r.risk??"zz"]??3)-(xt[s.r.risk??"zz"]??3)||r.i-s.i).map(({r})=>r)}var V=(e,r)=>e.length<=r?e:r<=1?"\u2026":`${e.slice(0,r-1)}\u2026`,ye=(e,r)=>e+" ".repeat(Math.max(0,r-e.length));function kt({rows:e,width:r=120,badgeHeader:s="risk"}){if(e.length===0)return null;let l=fn(e),d=v=>v.staged||!v.id?"(staged)":gt(v.id),f=Math.max(2,...l.map(v=>d(v).length)),i=Math.max(s.length,...l.map(v=>(v.badge??"").length)),m=r>=96&&l.some(v=>v.summary),b=r-(m?13:10)-f-i,p=Math.max(...l.map(v=>Math.max(v.title.length,(v.marker??"").length)),5),x=Math.max(5,m?Math.min(p,Math.max(16,Math.floor(b*.5))):Math.min(p,b)),C=m?Math.max(7,b-x):0,B=(v,L,k,P)=>v+P.map(_=>`\u2500${"\u2500".repeat(_.length)}\u2500`).join(L)+k,h=(v,L,k,P)=>[ye(V(v,f),f),ye(V(L,x),x),ye(V(k,i),i),...m?[ye(V(P,C),C)]:[]],y=h("id","title",s,"summary"),E=[];E.push((0,A.jsx)(n,{color:o.dim,children:B("\u250C","\u252C","\u2510",y)},"t")),E.push((0,A.jsx)(n,{color:o.dim,children:`\u2502 ${y.join(" \u2502 ")} \u2502`},"h")),E.push((0,A.jsx)(n,{color:o.dim,children:B("\u251C","\u253C","\u2524",y)},"m"));for(let[v,L]of l.entries()){let k=h(d(L),V(L.title,x),V(L.badge??"",i),V(L.summary??"",C)),P=L.badgeColor??gn[L.badge??""]??o.dim;if(E.push((0,A.jsxs)(n,{children:[(0,A.jsx)(n,{color:o.dim,children:"\u2502 "}),(0,A.jsx)(n,{color:o.generateAccent,children:k[0]}),(0,A.jsx)(n,{color:o.dim,children:" \u2502 "}),k[1],(0,A.jsx)(n,{color:o.dim,children:" \u2502 "}),(0,A.jsx)(n,{color:P,children:k[2]}),m?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(n,{color:o.dim,children:" \u2502 "}),(0,A.jsx)(n,{color:o.dim,children:k[3]})]}):null,(0,A.jsx)(n,{color:o.dim,children:" \u2502"})]},`r-${v}`)),L.marker){let _=h("",V(L.marker,x),"","");E.push((0,A.jsx)(n,{color:o.dim,children:`\u2502 ${_.join(" \u2502 ")} \u2502`},`mk-${v}`))}}return E.push((0,A.jsx)(n,{color:o.dim,children:B("\u2514","\u2534","\u2518",y)},"b")),(0,A.jsx)(A.Fragment,{children:E})}var pn={"use-case":"use-cases",ac:"ACs",scenario:"scenarios",test:"tests",gap:"gaps"},Q=e=>pn[e]??`${e}s`,bt=e=>e==="ac"?"AC":e==="use-case"?"use-case":e,Me=e=>e.kind??"use-case",yt=e=>`${Me(e)}:${e.temp_ref}`;function Tt(e){let r=e,s=r.badge??e.risk??null,l=r.why??e.summary??e.description??null;return JSON.stringify([e.title,s,l,r.extra??null,e.depends_on_hint??null])}function wt(e){return e.filter(r=>r.role==="agent"&&typeof r.turnIndex=="number"&&Array.isArray(r.items)&&r.items.length>0)}function G(e){let r=new Map,s=1;for(let f of wt(e)){let i=new Set;for(let m of f.items){let g=yt(m);if(i.has(g))continue;i.add(g);let b=r.get(g);r.set(g,{num:b?.num??s++,ref:m.temp_ref,kind:Me(m),item:m,turnIndex:f.turnIndex,fingerprint:Tt(m)})}}let l=[...r.values()].sort((f,i)=>f.num-i.num),d=[];for(let f of l){let i=d.find(m=>m.kind===f.kind);i?i.count++:d.push({kind:f.kind,label:Q(f.kind),count:1})}return{entries:l,byRef:r,counts:d}}function $t(e,r){let l=wt(e).find(h=>h.turnIndex===r);if(!l)return null;let d=e.filter(h=>h.role!=="agent"||typeof h.turnIndex!="number"||h.turnIndex<=r),f=G(d),i=G(e.filter(h=>h.role!=="agent"||typeof h.turnIndex!="number"||h.turnIndex<r)),m=[],g=new Map,b=new Map,p=new Map,x=new Set;for(let h of l.items){let y=yt(h);if(x.has(y))continue;x.add(y);let E=i.byRef.get(y),v=h.changed===!0,L=f.byRef.get(y).num,k=Me(h);if(E&&!v&&E.fingerprint===Tt(h)){g.set(k,(g.get(k)??0)+1);continue}let P=!!E||v,_=P?p:b;_.set(k,(_.get(k)??0)+1),m.push({item:h,num:L,updated:P})}let C=[...g.entries()].map(([h,y])=>({label:Q(h),count:y})),B=[...[...b.entries()].map(([h,y])=>`${y} new ${y===1?bt(h):Q(h)}`),...[...p.entries()].map(([h,y])=>`${y} updated ${y===1?bt(h):Q(h)}`)].join(" \xB7 ");return{fresh:m,unchanged:C,headerStats:B}}function _e(e,r){let s=e.entries.filter(f=>f.turnIndex===r);if(s.length===0)return e;let l=new Map(s.map(f=>[f.ref,f])),d=[];for(let f of s){let i=d.find(m=>m.kind===f.kind);i?i.count+=1:d.push({kind:f.kind,label:Q(f.kind),count:1})}return{entries:s,byRef:l,counts:d}}var w=q(F(),1);function hn(e){let r=e.form==="assumed"?" (flagged)":e.form==="deferred"?"":" (you)",s=e.note?` \u2014 ${e.note}`:"";return e.form==="deferred"?`\u21B3 deferred q${e.qNum} ${e.stub}${s}`:e.form==="changed"?`\u21B3 changed q${e.qNum} ${e.stub}: ${e.prev??"?"} \u2192 ${e.choice??"?"}${r}${s}`:`\u21B3 ${e.form} q${e.qNum} ${e.stub}: ${e.choice??"?"}${r}${s}`}var xn=Math.min(process.stdout?.columns??100,120)-2;function St({block:e,annotations:r}){switch(e.kind){case"banner":return(0,w.jsx)(n,{color:o.dim,children:` \u2500\u2500 ${e.text} \u2500\u2500`});case"user":return(0,w.jsxs)(T,{children:[(0,w.jsx)(n,{color:o.orange,children:"\u276F "}),(0,w.jsx)(n,{children:e.text})]});case"note":return(0,w.jsx)(n,{color:o.dim,children:` ${e.text}`});case"agent":return(0,w.jsx)(ct,{text:e.text});case"thinking":return(0,w.jsx)(n,{color:o.dim,children:` thought for ${(e.tookMs/1e3).toFixed(1)}s`});case"tool":return(0,w.jsx)(n,{color:o.dim,children:` ${ut({name:e.name,status:e.status==="ok"?"done":e.status,detail:e.detail})}`});case"usage":return(0,w.jsx)(n,{color:o.dim,children:` \xB7 ${e.credits.toFixed(1)} credits \u2014 total ${e.total.toFixed(1)}`});case"turn":{let s=r??null,l=s?s.fresh:e.items.map((p,x)=>({item:p,num:x+1,updated:!1})),d={usecase:"risk","use-case":"risk",ac:"check",scenario:"kind",test:"check",gap:"severity",stylenote:"kind"},f=p=>p.kind??"use-case",i=new Map;for(let p of l){let x=p.item,C=f(p.item),B=x.risk==="high"||x.risk==="med"||x.risk==="low"?x.risk:void 0,h={id:x.logical_id??"",staged:!x.logical_id,title:x.title,badge:x.badge??x.risk??"",summary:x.why??x.summary??x.description??"",...B?{risk:B}:{},...p.updated?{marker:"\u21B3 changed"}:{}},y=i.get(C)??[];y.push(h),i.set(C,y)}let m=l.some(p=>!!p.item.kind),g=(s?.unchanged??[]).reduce((p,x)=>p+x.count,0),b=s?.headerStats?` \u2014 ${s.headerStats}${g>0?` (${g} unchanged)`:""}`:"";return(0,w.jsxs)(T,{flexDirection:"column",marginLeft:2,children:[(0,w.jsxs)(n,{bold:!0,children:[m?"design":e.heading,b?(0,w.jsx)(n,{bold:!1,color:o.dim,children:b}):null]}),[...i.entries()].map(([p,x])=>(0,w.jsxs)(T,{flexDirection:"column",children:[i.size>1?(0,w.jsx)(n,{color:o.dim,children:`${Q(p)} \xB7 ${x.length}`}):null,(0,w.jsx)(kt,{rows:x,width:xn,badgeHeader:d[p]??"info"})]},p)),s&&s.unchanged.length>0&&(0,w.jsx)(n,{color:o.dim,children:` \u22EE unchanged: ${s.unchanged.map(p=>`${p.count} ${p.label}`).join(" \xB7 ")}`})]})}case"answer":return(0,w.jsx)(n,{color:o.dim,children:hn(e.receipt)});case"continued":return(0,w.jsx)(n,{color:o.dim,children:"\u21B3 continued"});case"commit":return(0,w.jsxs)(T,{flexDirection:"column",children:[(0,w.jsx)(n,{color:e.ok?o.green:o.red,children:` ${e.ok?"\u2714":"\u2717"} ${e.line}`}),(e.warnings??[]).map((s,l)=>(0,w.jsx)(n,{color:o.dim,children:` \u26A0 ${s}`},`w-${l}`))]});case"error":return(0,w.jsxs)(st,{variant:"error",paddingX:1,children:[(0,w.jsx)(n,{color:o.red,children:e.title}),e.detail.map((s,l)=>(0,w.jsx)(n,{color:o.dim,children:s},`d-${l}`))]});case"interrupted":return(0,w.jsxs)(T,{flexDirection:"column",children:[(0,w.jsx)(n,{color:o.red,children:"interrupted \u2014 session not saved"}),e.detail?(0,w.jsx)(n,{color:o.dim,children:e.detail}):null]});case"pause":return(0,w.jsxs)(T,{flexDirection:"column",children:[(0,w.jsx)(n,{children:`paused: session ${e.sid} saved`}),e.expires_at?(0,w.jsx)(n,{color:o.dim,children:`expires: ${e.expires_at}`}):null,(0,w.jsx)(n,{children:`resume: ${e.resume}`}),e.messageForm?(0,w.jsx)(n,{children:`or say something on the way in: ${e.messageForm}`}):null]});case"summary":return(0,w.jsxs)(T,{flexDirection:"column",children:[(0,w.jsx)(n,{bold:!0,children:"session summary"}),e.lines.map((s,l)=>(0,w.jsx)(n,{children:` ${s}`},`s-${l}`))]})}}var se=q(F(),1);function vt({item:e}){return(0,se.jsxs)(T,{flexDirection:"column",marginLeft:2,children:[(e.cite??[]).map((r,s)=>(0,se.jsx)(n,{dimColor:!0,children:`cite ${r.anchor??"conv"} \u2014 "${r.quote??""}"`},`cite-${s}`)),(e.depends_on_hint??[]).length>0&&(0,se.jsx)(n,{dimColor:!0,children:`depends on: ${(e.depends_on_hint??[]).join(", ")}`}),Object.entries(e.extra??{}).map(([r,s])=>(0,se.jsx)(n,{dimColor:!0,children:`${r}: ${s}`},`extra-${r}`))]})}var $=q(F(),1),Oe=(e,r)=>Math.max(0,Math.min(r,e));function we(e,r,s){switch(r.type){case"move":return e.level==="detail"?{...e,scroll:Math.max(0,(e.scroll??0)+r.delta)}:{...e,cursor:Oe(e.cursor+r.delta,Math.max(0,s-1))};case"enter":return e.level==="list"?{...e,level:"detail",scroll:0}:e;case"back":return e.level==="detail"?{...e,level:"list",scroll:0}:null}}var Rt={"use-case":"use-cases",ac:"acs",scenario:"scenarios",test:"tests",gap:"gaps"};function Ct(e,r){if(e.level==="detail")return{level:"detail",cursor:Oe(e.num-1,Math.max(0,r.entries.length-1))};if(e.section){let s=r.entries.findIndex(l=>Rt[l.kind]===e.section);if(s>=0)return{level:"list",cursor:s}}return{level:"list",cursor:0}}function kn(e){let r=[];for(let s of e.entries){let l=r.find(d=>d.kind===s.kind);l?l.entries.push(s):r.push({kind:s.kind,entries:[s]})}return r}var It=3;function bn({items:e,cursor:r,verb:s,more:l}){let d=`view \xB7 ${s} so far \xB7 ${e.counts.map(i=>`${i.count} ${i.count===1?i.label.replace(/s$/,""):i.label}`).join(" \xB7 ")}`,f=e.entries[r];return(0,$.jsxs)(T,{flexDirection:"column",borderStyle:"round",borderColor:o.dim,paddingX:1,children:[(0,$.jsx)(n,{bold:!0,children:d}),kn(e).map(({kind:i,entries:m})=>{let g=f?.kind===i,b=g?m.findIndex(B=>B.ref===f.ref):-1,p=g?Oe(b-1,Math.max(0,m.length-It)):0,x=m.slice(p,p+(g?It:1)),C=m.length-x.length;return(0,$.jsxs)(T,{flexDirection:"column",children:[(0,$.jsx)(n,{color:o.dim,children:`${Rt[i]??Q(i)} \xB7 ${m.length}`}),x.map(B=>{let h=g&&B.ref===f.ref,y=B.item.badge;return(0,$.jsxs)(n,{children:[(0,$.jsx)(n,{color:o.generateAccent,children:h?"\u203A ":" "}),(0,$.jsx)(n,{children:`${B.num} \xB7 ${B.item.title}`}),y?(0,$.jsx)(n,{color:o.dim,children:` \xB7 ${y}`}):null]},`${B.kind}:${B.ref}`)}),C>0&&(0,$.jsx)(n,{color:o.dim,children:` \u22EE ${C} more`})]},i)}),l?(0,$.jsxs)(n,{children:[(0,$.jsx)(n,{color:o.generateAccent,children:r===e.entries.length?"\u203A ":" "}),(0,$.jsx)(n,{color:o.dim,children:`\u22EF show all \u2014 ${l.hidden} more from earlier turns`})]}):null,(0,$.jsx)(n,{color:o.dim,children:"\u2191\u2193 move \xB7 \u21B5 detail \xB7 esc back"})]})}var Te=14;function yn({items:e,cursor:r,explain:s,grandTotal:l,dossier:d,scroll:f=0}){let i=e.entries[r];if(!i)return(0,$.jsx)(n,{color:o.dim,children:"nothing to show"});if(d){let g=Math.max(0,Math.min(f,Math.max(0,d.lines.length-Te))),b=d.lines.slice(g,g+Te);return(0,$.jsxs)(T,{flexDirection:"column",borderStyle:"round",borderColor:o.dim,paddingX:1,children:[(0,$.jsxs)(n,{bold:!0,children:[`view \xB7 ${d.id}`,d.id.toLowerCase()!==d.rawId?(0,$.jsx)(n,{bold:!1,color:o.dim,children:` \xB7 ${d.rawId}`}):null]}),(0,$.jsx)(n,{bold:!0,children:d.title}),g>0?(0,$.jsx)(n,{color:o.muted,children:`\u22EE ${g} above`}):null,b.map((p,x)=>(0,$.jsx)(n,{color:p.dim?o.dim:void 0,children:p.text},`dl-${x}`)),d.lines.length>g+Te?(0,$.jsx)(n,{color:o.muted,children:`\u22EE ${d.lines.length-g-Te} more`}):null,(0,$.jsx)(n,{color:o.dim,children:"\u2191\u2193 scroll \xB7 esc back"})]})}let m=i.item;return(0,$.jsxs)(T,{flexDirection:"column",borderStyle:"round",borderColor:o.dim,paddingX:1,children:[(0,$.jsx)(n,{bold:!0,children:`view \xB7 ${i.kind} ${i.num} of ${l??e.entries.length}`}),(0,$.jsx)(n,{children:i.item.title}),m.badge?(0,$.jsx)(n,{color:o.dim,children:`kind: ${m.badge}`}):null,m.why?(0,$.jsx)(n,{color:o.dim,children:m.why}):null,(0,$.jsx)(vt,{item:i.item}),s?.map((g,b)=>(0,$.jsx)(n,{color:o.dim,children:g},`ex-${b}`)),(0,$.jsx)(n,{color:o.dim,children:"view-only \u2014 approvals happen in chat"}),(0,$.jsx)(n,{color:o.dim,children:"\u2191\u2193 prev/next \xB7 esc back to list"})]})}function Bt({items:e,state:r,verb:s,more:l,explain:d,grandTotal:f,dossier:i=null}){return r.level==="list"?(0,$.jsx)(bn,{items:e,cursor:r.cursor,verb:s,more:l}):(0,$.jsx)(yn,{items:e,cursor:r.cursor,explain:d,grandTotal:f,dossier:i,scroll:r.scroll??0})}var Tn={"use-cases":"use-cases",usecases:"use-cases","use-case":"use-cases",acs:"acs",ac:"acs",scenarios:"scenarios",scenario:"scenarios",tests:"tests",test:"tests",gaps:"gaps",gap:"gaps"};function Dt(e){let r=(e??"").trim().toLowerCase();if(!r)return{level:"list"};if(/^\d+$/.test(r)){let l=parseInt(r,10);return l>=1?{level:"detail",num:l}:{error:"items are numbered from 1 \u2014 /view 1"}}let s=Tn[r];return s?{level:"list",section:s}:{error:"try /view, /view <number>, or /view acs|scenarios|tests"}}var D=q(F(),1),wn=6,Et=12;function $n(e,r,s){let l=Math.max(20,r),d=[];for(let i of e.split(`
3
+ `)){if(i.length<=l){d.push(i);continue}let m="";for(let g of i.split(" "))m&&m.length+1+g.length>l?(d.push(m),m=g):m=m?`${m} ${g}`:g;d.push(m)}let f=Math.max(0,d.length-s);return{body:d.slice(-s).join(`
4
+ `),hidden:f}}var $e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function At(e){let r={key:"redesign",label:"re-design from scratch",detail:"replaces the current design"},s={key:"keep",label:"keep the existing design",detail:"back to the list"};return e.designed==="stale"?[{...r,detail:"the use-case changed since it was designed"},s]:[s,r]}function mr({controller:e,verb:r="extract",onCtrlC:s,chain:l=null,inspect:d=null}){let[,f]=(0,S.useState)(0),[i,m]=(0,S.useState)(!1),[g,b]=(0,S.useState)(null),[p,x]=(0,S.useState)(null),C=(0,S.useRef)(null),[B,h]=(0,S.useState)(null),y=(0,S.useRef)(null),E=t=>{y.current=t,h(t)},v=t=>{C.current=t,x(t),t===null&&E(null)},L=(0,S.useRef)([]),[k,P]=(0,S.useState)(null),_=(0,S.useRef)(null),N=t=>{_.current=t,P(t)},Pe=it(),{stdout:Lt}=ke(),Mt=Lt?.columns??80,qe=(0,S.useRef)(0),Se=(0,S.useRef)(0);(0,S.useEffect)(()=>{let t=()=>{let a=e.state.ledger;for(let I=qe.current;I<a.length;I++){let R=a[I],W=R.kind==="turn"?$t(e.state.turns,R.turnIndex):void 0;Pe.append((0,D.jsx)(St,{block:R,annotations:W},`lg-${I}`))}qe.current=a.length};t();let c=e.subscribe(()=>{t();let a=e.state;C.current&&(a.pending||a.status==="pausing")&&(v(null),a.pending&&b("questions arrived \u2014 back to chat")),f(I=>I+1)});return f(a=>a+1),c},[e,Pe]);let{thinking:J,status:Y,pending:M,confirm:Ne,ledger:Z,activeTurn:We,stream:_t,notice:me}=e.state,Fe=(_t?.text??"").trimEnd(),Ue=Fe.length>0,Ot=i&&(J.liveThinking.length>0||J.thinkingLog.length>0),Pt=$n(J.liveThinking||J.thinkingLog.map(t=>t.text).join(`
5
+ `),Mt-6,Et),je=Ue?Fe.split(`
6
+ `).slice(-wn):[];We&&(Se.current=We.turnIndex);let qt=M?M.resolution.filter(t=>!t).length:0,Ke;for(let t=Z.length-1;t>=0;t--){if(L.current.some(a=>a.end!=null&&t>=a.start&&t<a.end))continue;let c=Z[t];if(c.kind==="banner"&&!c.text.startsWith("kane")){Ke=c.text;break}}let ie=J.activity[J.activity.length-1],ve=ie?ie.status==="decision"?ie.label:dt({name:ie.name,status:ie.status}):void 0,Qe=Y==="streaming"||Y==="working",[Ve,Nt]=(0,S.useState)(0);ot(()=>Nt(t=>t+1),Qe||k?.kind==="running"?120:null);let Wt=e.state.busySince?Math.floor((Date.now()-e.state.busySince)/1e3):0,Ft=Ue?"Writing\u2026":ve?`${ve.charAt(0).toUpperCase()}${ve.slice(1)}\u2026`:e.state.workingLabel??(r==="design"?"Designing\u2026":"Thinking\u2026"),Ut=e.state.turns.some(t=>t.role==="agent"),[jt,Kt]=(0,S.useState)(0),[Qt,Vt]=(0,S.useState)(!1),[He,Ht]=(0,S.useState)(null),le=(0,S.useRef)(0),Xe=(0,S.useRef)(!1),ze=(0,S.useRef)(null),ce=t=>{le.current=t,Kt(t)},Ge=t=>{Xe.current=t,Vt(t)},ee=t=>{ze.current=t,Ht(t)},Je=M&&M.cursor>=0?M.questions[M.cursor]:void 0,j=(0,S.useRef)(Je);j.current=Je;let H=(0,S.useRef)(M);H.current=M;let Xt=M?`${M.questions[0]?.id??"b"}:${M.cursor}`:null;(0,S.useEffect)(()=>{if(ee(null),j.current){Ge(!0);let t=H.current?.resolution[H.current.cursor]?.selected_index;ce(t??j.current.recommended_index??0)}else Ge(!1)},[Xt]);let ge=t=>{let c=H.current;return Le(t,c?be(c)!=="":!1)},zt={isFocused:()=>Xe.current&&j.current!=null&&ze.current==null||_.current!=null&&_.current.kind!=="running"||K.current&&tt.current==null,onMove:t=>{let c=j.current;if(c){ce(Math.max(0,Math.min(ge(c).maxSel,le.current+t)));return}let a=_.current;if(a?.kind==="picker"){N({...a,sel:Math.max(0,Math.min(a.items.length-1,a.sel+t))});return}if(a?.kind==="ask"||a?.kind==="confirm"){let I=(a.kind==="ask"?he.current.length:2)-1;N({...a,sel:Math.max(0,Math.min(I,a.sel+t))});return}a&&!K.current||K.current&&re(Math.max(0,Math.min(ue.current.length-1,Ee.current+t)))},onSelect:()=>{let t=j.current,c=H.current;if(!t||!c){let R=_.current;if(R?.kind==="picker"){let U=R.items[R.sel];U&&(U.designed?N({kind:"confirm",item:U,sel:0}):et(U,!1));return}if(R?.kind==="confirm"){At(R.item)[R.sel]?.key==="redesign"?et(R.item,!0):Be();return}if(R?.kind==="ask"){let U=he.current[R.sel]?.key;U==="another"?Be():U==="view"?nt(""):N(null);return}if(R&&!K.current||!K.current)return;switch(ue.current[Ee.current]?.key){case"finish":e.completeSession();return;case"continue":e.continueParked();return;case"design-chain":Be();return;case"view":nt("",Se.current);return;case"free":oe("");return}return}let a=ge(t),I=le.current;if(a.batchIdx!=null&&I===a.batchIdx){e.goWithRecommendations();return}if(a.freeIdx!=null&&I===a.freeIdx){ee("");return}if(a.doneIdx!=null&&I===a.doneIdx){e.confirmMulti(c.cursor);return}if(t.multi_select){e.toggleOption(c.cursor,I);return}e.submitAnswer(c.cursor,I)},onDigit:t=>{let c=j.current;if(c){t-1<c.options.length&&ce(t-1);return}let a=_.current;if(a?.kind==="picker"){t-1<a.items.length&&N({...a,sel:t-1});return}if(a?.kind==="ask"){t-1<he.current.length&&N({...a,sel:t-1});return}if(a?.kind==="confirm"){t-1<2&&N({...a,sel:t-1});return}if(!a&&K.current){let I=ue.current.filter(R=>!R.free);t-1<I.length&&re(t-1)}},isMulti:()=>{let t=j.current;return!!t?.multi_select&&le.current<(t?.options.length??0)},onSpace:()=>{let t=H.current;t&&e.toggleOption(t.cursor,le.current)},onTab:()=>{let t=j.current;if(!t)return;let c=ge(t);c.batchIdx!=null&&ce(c.batchIdx)},onType:t=>{let c=j.current;if(c){if(!c.allow_free_text)return;let a=ge(c);ce(a.freeIdx??0),ee(t);return}if(!(_.current&&!K.current)&&K.current){let a=mt(ue.current);if(a==null)return;re(a),oe(t)}},onBack:()=>{let t=_.current;if(t&&t.kind!=="running"){N(null);return}e.reopenQuestion()}},Gt=He!=null?{value:He,onChange:t=>ee(t),onSubmit:t=>{ee(null);let c=H.current;t.trim()&&c&&e.submitFreeText(c.cursor,t)},onCancel:()=>ee(null)}:null,Ye=s??(()=>e.requestPause()),te=e.state.checkpoint,fe=k?.kind==="running"&&Y==="idle",pe=Y==="idle"&&Ut&&!M&&!p&&(!k||fe),K=(0,S.useRef)(!1);K.current=pe;let X=G(e.state.turns).entries.length,ae,z;for(let t=Z.length-1;t>=0;t--){let c=Z[t];if(!ae&&c.kind==="commit"&&c.ok&&(ae=c.line),!z&&c.kind==="banner"&&c.text.startsWith("designing: ")&&(z=c.text.slice(11)),ae&&z)break}let ne=z?{"acceptance criteria":"scenarios",scenarios:"acceptance criteria + exercises","acceptance criteria + exercises":"tests + gaps"}[z]:void 0,Jt=(()=>{for(let t=Z.length-1;t>=0;t--){let c=Z[t];if(c.kind==="agent")return c.text}return null})(),Ie=/\?\s*$/.test((Jt??"").trimEnd()),Ze=r==="design"&&!te&&(Ie||ne!==void 0),Yt=fe&&!te?Ie?"the agent asked a question \u2014 reply to continue":`${k?.kind==="running"?k.title:"the design"} \u2014 the agent is waiting on you`:te?z?`${z} done${ne?` \u2014 next: ${ne}`:""}`:ae??"phase done":Ze?Ie?"the agent asked a question \u2014 reply to continue":`design incomplete \u2014 ${ne} not started`:ae??"waiting on you",Re=fe&&!te?[{key:"free",label:"reply \u2014 tell the agent what to change",free:!0},...X>0?[{key:"view",label:"view what's saved"}]:[],{key:"finish",label:"finish this design"}]:te?[{key:"continue",label:ne?`continue to ${ne}`:"continue"},...X>0?[{key:"view",label:"view what's saved"}]:[],{key:"finish",label:"finish here"},{key:"free",label:"adjust \u2014 tell me what to change",free:!0}]:Ze?[{key:"free",label:"reply \u2014 answer and continue",free:!0},...X>0?[{key:"view",label:"view the design"}]:[],{key:"finish",label:"finish anyway"}]:[{key:"finish",label:r==="design"?"finish":"looks good \u2014 finish the session"},...l?[{key:"design-chain",label:"design tests for a use-case\u2026"}]:[],...X>0?[{key:"view",label:r==="design"?"view the design":`view the ${X} draft${X===1?"":"s"}`}]:[],{key:"free",label:r==="design"?"keep adjusting \u2014 tell me what to change":"tell me what to change",free:!0}],Ce=[{key:"another",label:"design another use-case\u2026"},...X>0?[{key:"view",label:"view what was designed"}]:[],{key:"back",label:"done \u2014 back"}],he=(0,S.useRef)(Ce);he.current=Ce;let Be=()=>{let t=l?.listUcs()??[];if(t.length===0){b("no use-cases to design yet");return}N({kind:"picker",items:t,sel:0})},et=(t,c)=>{let a={start:e.state.ledger.length,end:null};L.current.push(a);let I=()=>{a.end=e.state.ledger.length};N({kind:"running",title:t.title,startedAt:Date.now()}),l.runDesignChild(t.key,c).then(R=>{I(),e.ledger({kind:"commit",ok:R===0,line:R===0?`designed ${t.title}`:`design for ${t.title} failed \u2014 child exited ${R}`}),N({kind:"ask",title:t.title,sel:0})}).catch(R=>{I(),e.ledger({kind:"commit",ok:!1,line:`design for ${t.title} failed \u2014 ${R instanceof Error?R.message:String(R)}`}),N(null)})},ue=(0,S.useRef)(Re);ue.current=Re;let[Zt,en]=(0,S.useState)(0),[De,tn]=(0,S.useState)(null),Ee=(0,S.useRef)(0),tt=(0,S.useRef)(null),re=t=>{Ee.current=t,en(t)},oe=t=>{tt.current=t,tn(t)},nn=`${pe}:${te}:${Se.current}`;(0,S.useEffect)(()=>{re(0),oe(null)},[nn]);let rn=De!=null?{value:De,onChange:t=>oe(t),onSubmit:t=>{oe(null),re(0);let c=t.trim();c&&(b(null),e.submit(c))},onCancel:()=>{oe(null),re(0)}}:null,nt=(t,c)=>{if(/^(uc|sc|ac|t|gap|sty)-\d+$/i.test(t.trim())){let W=t.trim().toLowerCase(),xe=G(e.state.turns).entries.findIndex(O=>(O.item.logical_id??"").toLowerCase()===W);if(xe<0){b(`${t.trim().toUpperCase()} isn't in this session's items \u2014 view lists what this session minted`);return}v({level:"detail",cursor:xe,scroll:0}),E(null);return}let a=Dt(t);if("error"in a){b(a.error);return}let I=G(e.state.turns);if(I.entries.length===0){b("nothing proposed yet \u2014 the first turn is still coming");return}if(a.level==="detail"&&a.num>I.entries.length){b(`no item ${a.num} \u2014 the set has ${I.entries.length} item${I.entries.length===1?"":"s"}`);return}let R=c!=null?_e(I,c):I;v(Ct(a,R)),E(c!=null&&R.entries.length<I.entries.length?c:null)},rt=(0,D.jsx)(ft,{verb:r,subject:Ke,pendingCount:qt,creditsTotal:e.state.credits?.total,state:M||pe||p||k&&k.kind!=="running"?"idle":void 0});if(p){let t=G(e.state.turns),c=B!=null?_e(t,B):t,a=t.entries.length-c.entries.length,I=p.level==="list"&&a>0,R=c.entries.length+(I?1:0),W=c.entries[p.cursor],U=p.level==="detail"&&W?e.explainLines(W.item.slug??W.item.temp_ref):null,xe=p.level==="detail"&&W&&d?d(W.item.logical_id??e.aliasOf(W.item.temp_ref)??W.item.temp_ref):null;return(0,D.jsxs)(T,{flexDirection:"column",children:[(0,D.jsx)(Ae,{onToggleThinking:()=>m(O=>!O),onCtrlC:Ye,explorer:{isOpen:()=>C.current!==null,onMove:O=>v(C.current&&we(C.current,{type:"move",delta:O},R)),onEnter:()=>{let O=C.current;if(O){if(O.level==="list"&&I&&O.cursor===c.entries.length){E(null);return}v(we(O,{type:"enter"},R))}},onBack:()=>{v(C.current&&we(C.current,{type:"back"},R)),setTimeout(()=>f(O=>O+1),0)}}}),(0,D.jsx)(Bt,{items:c,state:p,verb:r,more:I?{hidden:a}:null,explain:U,grandTotal:t.entries.length,dossier:xe}),(me??g)&&(me??g).split(`
7
+ `).map((O,on)=>(0,D.jsx)(n,{color:o.orange,children:O},`nt-${on}`)),rt]})}return(0,D.jsxs)(T,{flexDirection:"column",children:[(0,D.jsx)(Ae,{onToggleThinking:()=>m(t=>!t),onCtrlC:Ye,panel:zt}),Ot&&(0,D.jsx)(at,{thinking:Pt.body,expanded:!0,thinkingDone:Y!=="streaming",maxLines:Et+1}),je.length>0&&(0,D.jsx)(T,{flexDirection:"column",children:je.map((t,c)=>(0,D.jsx)(n,{children:t},`st-${c}`))}),M&&(0,D.jsx)(ht,{batch:M,sel:jt,focused:Qt,freeText:Gt,multiSelFor:t=>e.multiSelection(t)}),Ne&&(0,D.jsx)(n,{color:"yellow",children:Ne.prompt}),(me??g)&&(me??g).split(`
8
+ `).map((t,c)=>(0,D.jsx)(n,{color:o.orange,children:t},`nt-${c}`)),Qe&&!M&&(0,D.jsxs)(n,{color:o.generateAccent,children:[`${$e[Ve%$e.length]} ${Ft} `,(0,D.jsx)(n,{color:o.dim,children:`(${Wt}s)`})]}),pe&&(0,D.jsx)(de,{headline:Yt,rows:Re,sel:Zt,focused:De==null,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 type = your own words",freeText:rn}),k?.kind==="picker"&&(0,D.jsx)(de,{ask:!0,headline:"design tests for which use-case?",rows:k.items.map(t=>({key:t.key,label:t.title,detail:t.badge})),sel:k.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 esc back"}),k?.kind==="confirm"&&(0,D.jsx)(de,{ask:!0,headline:`${k.item.title} is already designed${k.item.designed==="stale"?" \u2014 and the use-case has changed since":""}`,rows:At(k.item).map(t=>({key:t.key,label:t.label,detail:t.detail})),sel:k.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 esc back"}),k?.kind==="running"&&!fe&&(0,D.jsxs)(n,{color:o.generateAccent,children:[`${$e[Ve%$e.length]} Designing ${k.title}\u2026 `,(0,D.jsx)(n,{color:o.dim,children:`(${Math.floor((Date.now()-k.startedAt)/1e3)}s)`})]}),k?.kind==="ask"&&(0,D.jsx)(de,{headline:`designed ${k.title}`,rows:Ce,sel:k.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 esc back"}),Y==="pausing"&&(0,D.jsx)(n,{color:o.dim,children:"pausing \u2014 saving session\u2026 (ctrl+c again = force quit)"}),rt]})}export{mr as ChatSurface,$n as tailVisualRows};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-WJG4ZPUH.js";import"./chunk-RGQIBS32.js";import"./chunk-NMKZHHB6.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{c as ChromeProfilePicker,b as formatChromeProfileLine,a as listChromeProfiles};
2
+ import{a,b,c}from"./chunk-QFD6CB4P.js";import"./chunk-MEHEGW3V.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{c as ChromeProfilePicker,b as formatChromeProfileLine,a as listChromeProfiles};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as r}from"./chunk-LVWB6TB2.js";import"./chunk-RGQIBS32.js";import"./chunk-NMKZHHB6.js";import"./chunk-HCBYKLMW.js";import{c as e}from"./chunk-C44QQJR4.js";import{a as i}from"./chunk-6YGTRKDT.js";import{e as m}from"./chunk-UR6MHSHU.js";var t=m(i(),1);async function d(){return new Promise(o=>{let c=e(t.default.createElement(r,{onSubmit:n=>{c.unmount(),o(n)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{d as renderFeedbackPrompt};
2
+ import{a as r}from"./chunk-AXJIXRYF.js";import"./chunk-MEHEGW3V.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import{c as e}from"./chunk-C44QQJR4.js";import{a as i}from"./chunk-6YGTRKDT.js";import{e as m}from"./chunk-UR6MHSHU.js";var t=m(i(),1);async function d(){return new Promise(o=>{let c=e(t.default.createElement(r,{onSubmit:n=>{c.unmount(),o(n)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{d as renderFeedbackPrompt};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as P,b as g,c as f}from"./chunk-MTG2LRGV.js";import"./chunk-WFQUDSKY.js";import"./chunk-5Y2G4NC7.js";import"./chunk-NMKZHHB6.js";import{a as c}from"./chunk-HCBYKLMW.js";import{c as d}from"./chunk-C44QQJR4.js";import{a as h}from"./chunk-6YGTRKDT.js";import{e as p}from"./chunk-UR6MHSHU.js";var e=p(h(),1);var m=p(c(),1);function w({pipeline:t,buildShareUrl:r,onDone:o}){let[n,i]=(0,e.useState)(P()),[S,l]=(0,e.useState)("uploading"),[U,R]=(0,e.useState)(),[C,E]=(0,e.useState)();return(0,e.useEffect)(()=>{let x=t.config.onProgress;t.config.onProgress=(s,u,a)=>{x(s,u,a),i(y=>g(y,s,u,a))},t.execute().then(s=>{s.success?(R(r?.(s)),l("success")):(E(s.error),l("failed")),setTimeout(()=>o(s),1500)})},[]),(0,m.jsx)(f,{steps:n,status:S,testUrl:U,error:C})}async function O(t,r){return new Promise(o=>{let n=d(e.default.createElement(w,{pipeline:t,buildShareUrl:r,onDone:i=>{n.unmount(),o(i)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{O as renderUploadProgress};
2
+ import{a as P,b as g,c as f}from"./chunk-VZHXNQDO.js";import"./chunk-N5YIMTGV.js";import"./chunk-5Y2G4NC7.js";import"./chunk-PXPXK4Q7.js";import{a as c}from"./chunk-HCBYKLMW.js";import{c as d}from"./chunk-C44QQJR4.js";import{a as h}from"./chunk-6YGTRKDT.js";import{e as p}from"./chunk-UR6MHSHU.js";var e=p(h(),1);var m=p(c(),1);function w({pipeline:t,buildShareUrl:r,onDone:o}){let[n,i]=(0,e.useState)(P()),[S,l]=(0,e.useState)("uploading"),[U,R]=(0,e.useState)(),[C,E]=(0,e.useState)();return(0,e.useEffect)(()=>{let x=t.config.onProgress;t.config.onProgress=(s,u,a)=>{x(s,u,a),i(y=>g(y,s,u,a))},t.execute().then(s=>{s.success?(R(r?.(s)),l("success")):(E(s.error),l("failed")),setTimeout(()=>o(s),1500)})},[]),(0,m.jsx)(f,{steps:n,status:S,testUrl:U,error:C})}async function O(t,r){return new Promise(o=>{let n=d(e.default.createElement(w,{pipeline:t,buildShareUrl:r,onDone:i=>{n.unmount(),o(i)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{O as renderUploadProgress};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as p,b as l,c as n}from"./chunk-KVAALPTA.js";import{y as o}from"./chunk-NMKZHHB6.js";import{a as g}from"./chunk-HCBYKLMW.js";import{a,j as c}from"./chunk-C44QQJR4.js";import{a as R}from"./chunk-6YGTRKDT.js";import{e as t}from"./chunk-UR6MHSHU.js";var b=t(R(),1);var e=t(g(),1);function A({model:d,authLabel:v,profile:x,env:w,defaultUrl:u,projectId:r,projectName:s,folderId:i,folderName:f,windowSize:B,chromeProfile:C}){let h=r?s?`${s} (${r})`:r:"(none)",D=i?f?`${f} (${i})`:i:"(none)",{exit:m}=c();return(0,b.useEffect)(()=>{let P=setTimeout(()=>m(),50);return()=>clearTimeout(P)},[m]),(0,e.jsx)(a,{flexDirection:"column",children:(0,e.jsx)(p,{title:"Configuration",children:(0,e.jsxs)(a,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(n,{label:"Auth"}),(0,e.jsx)(l,{label:" method",value:v}),(0,e.jsx)(l,{label:" profile",value:x}),(0,e.jsx)(l,{label:" env",value:w}),(0,e.jsx)(n,{label:"Defaults"}),(0,e.jsx)(l,{label:" url",value:u??"(none)",valueColor:u?o.orange:o.dim}),(0,e.jsx)(l,{label:" model",value:d}),(0,e.jsx)(l,{label:" window",value:B}),(0,e.jsx)(l,{label:" project",value:h}),(0,e.jsx)(l,{label:" folder",value:D}),(0,e.jsx)(n,{label:"Paths"}),(0,e.jsx)(l,{label:" chrome",value:C,valueColor:o.dim})]})})})}export{A as ConfigView};
2
+ import{a as p,b as l,c as n}from"./chunk-GO4CBUB6.js";import{y as o}from"./chunk-PXPXK4Q7.js";import{a as g}from"./chunk-HCBYKLMW.js";import{a,j as c}from"./chunk-C44QQJR4.js";import{a as R}from"./chunk-6YGTRKDT.js";import{e as t}from"./chunk-UR6MHSHU.js";var b=t(R(),1);var e=t(g(),1);function A({model:d,authLabel:v,profile:x,env:w,defaultUrl:u,projectId:r,projectName:s,folderId:i,folderName:f,windowSize:B,chromeProfile:C}){let h=r?s?`${s} (${r})`:r:"(none)",D=i?f?`${f} (${i})`:i:"(none)",{exit:m}=c();return(0,b.useEffect)(()=>{let P=setTimeout(()=>m(),50);return()=>clearTimeout(P)},[m]),(0,e.jsx)(a,{flexDirection:"column",children:(0,e.jsx)(p,{title:"Configuration",children:(0,e.jsxs)(a,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(n,{label:"Auth"}),(0,e.jsx)(l,{label:" method",value:v}),(0,e.jsx)(l,{label:" profile",value:x}),(0,e.jsx)(l,{label:" env",value:w}),(0,e.jsx)(n,{label:"Defaults"}),(0,e.jsx)(l,{label:" url",value:u??"(none)",valueColor:u?o.orange:o.dim}),(0,e.jsx)(l,{label:" model",value:d}),(0,e.jsx)(l,{label:" window",value:B}),(0,e.jsx)(l,{label:" project",value:h}),(0,e.jsx)(l,{label:" folder",value:D}),(0,e.jsx)(n,{label:"Paths"}),(0,e.jsx)(l,{label:" chrome",value:C,valueColor:o.dim})]})})})}export{A as ConfigView};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a}from"./chunk-Q3WHZ26R.js";import"./chunk-RFHMDQXZ.js";import"./chunk-EYZWG32F.js";import"./chunk-FCMLIK7P.js";import"./chunk-CJJXT5DO.js";import"./chunk-QM4S2APK.js";import"./chunk-ZPDM6FO7.js";import"./chunk-BC7UVJJB.js";import"./chunk-NVGBE2DR.js";import"./chunk-EHN5HTUD.js";import"./chunk-L5LI2JF4.js";import"./chunk-LEA6IHXC.js";import"./chunk-RGDQMKNJ.js";import"./chunk-L3HG5ONB.js";import"./chunk-L4JIMNKW.js";import"./chunk-MBXWXBDM.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-M5JQXOCE.js";import"./chunk-K4ERF7GT.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as EvidenceViewOffer};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-X47VFBIV.js";import"./chunk-YCCUBQY4.js";import"./chunk-XUHVQ5VL.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-3NR6OTHL.js";import"./chunk-RGQIBS32.js";import"./chunk-NMKZHHB6.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as FolderPicker,a as formatFolderLine};
2
+ import{a,b}from"./chunk-PV4EDQY4.js";import"./chunk-YCCUBQY4.js";import"./chunk-66LXV7NN.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-K4ERF7GT.js";import"./chunk-MEHEGW3V.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as FolderPicker,a as formatFolderLine};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as f,b as r,y as t}from"./chunk-NMKZHHB6.js";import{a as T}from"./chunk-HCBYKLMW.js";import{a as s,b as o,j as x,k as p}from"./chunk-C44QQJR4.js";import{a as v}from"./chunk-6YGTRKDT.js";import{e as h}from"./chunk-UR6MHSHU.js";var w=h(v(),1);var e=h(T(),1),b="https://www.testmuai.com/support/docs/kane-cli-introduction",S="https://github.com/LambdaTest/kane-cli/issues";function L(){let{exit:c}=x(),{stdout:a}=p(),l=a?.columns??80;return(0,w.useEffect)(()=>{let m=setTimeout(()=>c(),50);return()=>clearTimeout(m)},[c]),(0,e.jsxs)(s,{flexDirection:"column",children:[(0,e.jsxs)(s,{paddingX:1,paddingTop:1,flexDirection:"column",children:[(0,e.jsx)(o,{color:t.orange,bold:!0,children:r}),(0,e.jsxs)(s,{children:[(0,e.jsx)(o,{color:t.dim,children:"Browser automation powered by AI "}),(0,e.jsxs)(o,{color:t.muted,children:[" v",f]})]})]}),(0,e.jsx)(o,{children:" "}),(0,e.jsxs)(d,{title:"USAGE",children:[(0,e.jsx)(g,{cmd:`${r}`,desc:"Single-shot prompt (no args, TTY)"}),(0,e.jsx)(g,{cmd:`${r} --tui`,desc:"Full interactive TUI",highlight:!0}),(0,e.jsx)(g,{cmd:`${r} run "<objective>"`,desc:"Inline objective"}),(0,e.jsx)(g,{cmd:`${r} testmd run <path>.md`,desc:"Replay a saved *_test.md file"})]}),(0,e.jsxs)(d,{title:"HELP",children:[(0,e.jsx)(g,{cmd:`${r} --help`,desc:"Show this help (long form)"}),(0,e.jsx)(g,{cmd:`${r} -h`,desc:"Show this help (short form)"}),(0,e.jsx)(g,{cmd:`${r} help`,desc:"Show this help (subcommand form)"}),(0,e.jsxs)(s,{marginLeft:2,marginTop:0,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:["These are the only supported help invocations. Anything else (e.g. ",(0,e.jsx)(o,{color:t.orange,children:"-help"}),") is an unknown flag."]}),(0,e.jsxs)(o,{color:t.dim,children:["Terminal tab-completion is a shell feature; ",r," does not ship shell-completion scripts, so any flag your shell suggests is a generic guess \u2014 not from ",r,"."]})]})]}),(0,e.jsxs)(d,{title:"COMMANDS",children:[(0,e.jsx)(i,{cmd:"run",args:"<objective>",desc:"Run an objective (inline string)",highlight:!0}),(0,e.jsx)(i,{cmd:"testmd",args:"run|list|status|delete|export",desc:"Manage *_test.md files"}),(0,e.jsx)(i,{cmd:"testrun",args:"run",desc:"Run M *_test.md files as one sealed execution"}),(0,e.jsx)(i,{cmd:"login",desc:"Auth setup (interactive, --oauth, or --username)"}),(0,e.jsx)(i,{cmd:"logout",desc:"Revoke tokens + delete profile"}),(0,e.jsx)(i,{cmd:"whoami",desc:"Show authenticated identity"}),(0,e.jsx)(i,{cmd:"config",args:"show|set-mode|set-assertion-mode|\u2026",desc:"Chrome, run & generate settings"}),(0,e.jsx)(i,{cmd:"profiles",args:"list|switch|delete",desc:"Manage auth profiles"}),(0,e.jsx)(i,{cmd:"evidence",args:"validate|serve|merge",desc:"Validate, serve (viewer) or merge evidence packs"}),(0,e.jsx)(i,{cmd:"changelog",args:"[--all]",desc:"Show recent release notes"}),(0,e.jsx)(i,{cmd:"context",args:"ingest|extract|list|review|sessions|\u2026",desc:"Build & manage the assurance context store"}),(0,e.jsx)(i,{cmd:"design",args:"tests --use-case <ref>",desc:"Design tests from the context store"})]}),(0,e.jsxs)(d,{title:"TESTMD ACTIONS",children:[(0,e.jsx)(i,{cmd:"testmd run",args:"<path>",desc:"Replay a saved *_test.md file",highlight:!0}),(0,e.jsx)(i,{cmd:"testmd list",desc:"List *_test.md files in cwd (recursive)"}),(0,e.jsx)(i,{cmd:"testmd status",args:"<path>",desc:"Print local meta.json for a test"}),(0,e.jsx)(i,{cmd:"testmd delete",args:"<path>",desc:"Remove output-<stem>/ and the source file"}),(0,e.jsx)(i,{cmd:"testmd export",args:"<path> --language <py|js>",desc:"Generate standalone Playwright code"})]}),(0,e.jsxs)(d,{title:"RUN FLAGS",children:[(0,e.jsx)(n,{long:"--max-steps",arg:"<n>",desc:"Max agent steps (default: 30)"}),(0,e.jsx)(n,{long:"--timeout",arg:"<sec>",desc:"Kill run after N seconds"}),(0,e.jsx)(n,{long:"--headless",desc:"No visible browser window"}),(0,e.jsx)(n,{long:"--mode",arg:"<action|testing>",desc:"Run mode (default: testing)"}),(0,e.jsx)(n,{long:"--name",arg:"<name>",desc:"Persist session under this name"}),(0,e.jsx)(n,{long:"--variables",arg:"<json>",desc:"Inline variables as JSON"}),(0,e.jsx)(n,{long:"--variables-file",arg:"<path>",desc:"Load variables from file"}),(0,e.jsx)(n,{long:"--session-context",arg:"<json>",desc:"Prior runs context JSON"}),(0,e.jsx)(n,{long:"--global-context",arg:"<file>",desc:"Override global context markdown"}),(0,e.jsx)(n,{long:"--local-context",arg:"<file>",desc:"Override local context markdown"}),(0,e.jsx)(n,{long:"--ws-endpoint",arg:"<url>",desc:"Remote browser (LambdaTest)"}),(0,e.jsx)(n,{long:"--cdp-endpoint",arg:"<url>",desc:"Connect to existing Chrome CDP"}),(0,e.jsx)(n,{long:"--task-skills",desc:"Domain-specific task skills (experimental)"}),(0,e.jsx)(n,{long:"--code-export",desc:"Generate code export after upload"}),(0,e.jsx)(n,{long:"--code-language",arg:"<lang>",desc:"Code export language: python | javascript"}),(0,e.jsx)(n,{long:"--skip-code-validation",desc:"Skip post-codegen validation"}),(0,e.jsx)(n,{long:"--username",arg:"<user>",desc:"Basic auth (skip OAuth)"}),(0,e.jsx)(n,{long:"--access-key",arg:"<key>",desc:"Basic auth access key"}),(0,e.jsx)(n,{long:"--env",arg:"<name>",desc:"Environment (prod or stage)"}),(0,e.jsx)(n,{long:"--agent",desc:"NDJSON output (no UI)",highlight:!0})]}),(0,e.jsxs)(d,{title:"EXAMPLES",children:[(0,e.jsx)(u,{label:"Inline objective",cmd:`${r} run "Search for laptop"`}),(0,e.jsx)(u,{label:"Replay a saved test",cmd:`${r} testmd run smoke_test.md`}),(0,e.jsx)(u,{label:"Variables",cmd:`${r} run "Login as {{user}}" --variables '{"user":{"value":"alice"}}'`}),(0,e.jsx)(u,{label:"Agent mode (NDJSON)",cmd:`${r} run "Add to cart" --agent | jq .status`})]}),(0,e.jsx)(d,{title:"TEST FILES",children:(0,e.jsxs)(s,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:[(0,e.jsx)(o,{color:t.orange,children:"*_test.md"})," \u2014 markdown test files with YAML frontmatter and ",(0,e.jsx)(o,{color:t.orange,children:"## "}),"step headings."]}),(0,e.jsxs)(o,{color:t.dim,children:["Run with ",(0,e.jsxs)(o,{color:t.orange,children:[r," testmd run path/to/foo_test.md"]}),". (`.md` paths are not accepted by `",r," run`.)"]}),(0,e.jsxs)(o,{color:t.dim,children:["Sessions you run in TUI auto-save to ",(0,e.jsx)(o,{color:t.orange,children:"<cwd>/.testmuai/tests/<name>_test.md"})," (testing mode prompts on exit)."]})]})}),(0,e.jsxs)(s,{flexDirection:"column",marginTop:0,paddingX:1,children:[(0,e.jsx)(o,{color:t.muted,children:"\u2500".repeat(Math.min(l-2,70))}),(0,e.jsxs)(s,{gap:3,children:[(0,e.jsxs)(s,{children:[(0,e.jsx)(o,{color:t.dim,children:"Docs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:b})]}),(0,e.jsxs)(s,{children:[(0,e.jsx)(o,{color:t.dim,children:"Bugs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:S})]})]})]}),(0,e.jsx)(o,{children:" "})]})}function d({title:c,children:a}){return(0,e.jsxs)(s,{flexDirection:"column",marginBottom:1,children:[(0,e.jsx)(s,{marginLeft:1,children:(0,e.jsx)(o,{bold:!0,color:t.dim,children:c})}),a]})}function g({cmd:c,desc:a,highlight:l}){return(0,e.jsxs)(s,{marginLeft:2,children:[(0,e.jsxs)(s,{width:40,children:[(0,e.jsx)(o,{color:t.dim,children:"$ "}),(0,e.jsx)(o,{color:l?t.orange:t.orange,children:c})]}),(0,e.jsx)(o,{color:t.dim,children:a})]})}function i({cmd:c,args:a,desc:l,highlight:m}){return(0,e.jsxs)(s,{marginLeft:2,children:[(0,e.jsx)(s,{width:16,children:(0,e.jsx)(o,{color:m?t.orange:t.green,bold:!0,children:c})}),(0,e.jsx)(s,{width:32,children:a?(0,e.jsx)(o,{color:t.dim,children:a}):null}),(0,e.jsx)(o,{color:t.dim,children:l})]})}function n({long:c,arg:a,desc:l,highlight:m}){return(0,e.jsxs)(s,{marginLeft:2,children:[(0,e.jsxs)(s,{width:30,children:[(0,e.jsx)(o,{color:m?t.orange:t.orange,children:c}),a&&(0,e.jsxs)(o,{color:t.dim,children:[" ",a]})]}),(0,e.jsx)(o,{color:t.dim,children:l})]})}function u({label:c,cmd:a}){return(0,e.jsxs)(s,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:["# ",c]}),(0,e.jsxs)(o,{color:t.orange,children:["$ ",a]})]})}export{L as HelpView};
2
+ import{a as f,b as r,y as t}from"./chunk-PXPXK4Q7.js";import{a as T}from"./chunk-HCBYKLMW.js";import{a as s,b as o,j as x,k as p}from"./chunk-C44QQJR4.js";import{a as v}from"./chunk-6YGTRKDT.js";import{e as h}from"./chunk-UR6MHSHU.js";var w=h(v(),1);var e=h(T(),1),b="https://www.testmuai.com/support/docs/kane-cli-introduction",S="https://github.com/LambdaTest/kane-cli/issues";function L(){let{exit:c}=x(),{stdout:a}=p(),l=a?.columns??80;return(0,w.useEffect)(()=>{let m=setTimeout(()=>c(),50);return()=>clearTimeout(m)},[c]),(0,e.jsxs)(s,{flexDirection:"column",children:[(0,e.jsxs)(s,{paddingX:1,paddingTop:1,flexDirection:"column",children:[(0,e.jsx)(o,{color:t.orange,bold:!0,children:r}),(0,e.jsxs)(s,{children:[(0,e.jsx)(o,{color:t.dim,children:"Browser automation powered by AI "}),(0,e.jsxs)(o,{color:t.muted,children:[" v",f]})]})]}),(0,e.jsx)(o,{children:" "}),(0,e.jsxs)(d,{title:"USAGE",children:[(0,e.jsx)(g,{cmd:`${r}`,desc:"Single-shot prompt (no args, TTY)"}),(0,e.jsx)(g,{cmd:`${r} --tui`,desc:"Full interactive TUI",highlight:!0}),(0,e.jsx)(g,{cmd:`${r} run "<objective>"`,desc:"Inline objective"}),(0,e.jsx)(g,{cmd:`${r} testmd run <path>.md`,desc:"Replay a saved *_test.md file"})]}),(0,e.jsxs)(d,{title:"HELP",children:[(0,e.jsx)(g,{cmd:`${r} --help`,desc:"Show this help (long form)"}),(0,e.jsx)(g,{cmd:`${r} -h`,desc:"Show this help (short form)"}),(0,e.jsx)(g,{cmd:`${r} help`,desc:"Show this help (subcommand form)"}),(0,e.jsxs)(s,{marginLeft:2,marginTop:0,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:["These are the only supported help invocations. Anything else (e.g. ",(0,e.jsx)(o,{color:t.orange,children:"-help"}),") is an unknown flag."]}),(0,e.jsxs)(o,{color:t.dim,children:["Terminal tab-completion is a shell feature; ",r," does not ship shell-completion scripts, so any flag your shell suggests is a generic guess \u2014 not from ",r,"."]})]})]}),(0,e.jsxs)(d,{title:"COMMANDS",children:[(0,e.jsx)(i,{cmd:"run",args:"<objective>",desc:"Run an objective (inline string)",highlight:!0}),(0,e.jsx)(i,{cmd:"testmd",args:"run|list|status|delete|export",desc:"Manage *_test.md files"}),(0,e.jsx)(i,{cmd:"testrun",args:"run",desc:"Run M *_test.md files as one sealed execution"}),(0,e.jsx)(i,{cmd:"login",desc:"Auth setup (interactive, --oauth, or --username)"}),(0,e.jsx)(i,{cmd:"logout",desc:"Revoke tokens + delete profile"}),(0,e.jsx)(i,{cmd:"whoami",desc:"Show authenticated identity"}),(0,e.jsx)(i,{cmd:"config",args:"show|set-mode|set-assertion-mode|\u2026",desc:"Chrome, run & generate settings"}),(0,e.jsx)(i,{cmd:"profiles",args:"list|switch|delete",desc:"Manage auth profiles"}),(0,e.jsx)(i,{cmd:"evidence",args:"validate|serve|merge",desc:"Validate, serve (viewer) or merge evidence packs"}),(0,e.jsx)(i,{cmd:"changelog",args:"[--all]",desc:"Show recent release notes"}),(0,e.jsx)(i,{cmd:"context",args:"ingest|extract|list|review|sessions|\u2026",desc:"Build & manage the assurance context store"}),(0,e.jsx)(i,{cmd:"design",args:"tests --use-case <ref>",desc:"Design tests from the context store"})]}),(0,e.jsxs)(d,{title:"TESTMD ACTIONS",children:[(0,e.jsx)(i,{cmd:"testmd run",args:"<path>",desc:"Replay a saved *_test.md file",highlight:!0}),(0,e.jsx)(i,{cmd:"testmd list",desc:"List *_test.md files in cwd (recursive)"}),(0,e.jsx)(i,{cmd:"testmd status",args:"<path>",desc:"Print local meta.json for a test"}),(0,e.jsx)(i,{cmd:"testmd delete",args:"<path>",desc:"Remove output-<stem>/ and the source file"}),(0,e.jsx)(i,{cmd:"testmd export",args:"<path> --language <py|js>",desc:"Generate standalone Playwright code"})]}),(0,e.jsxs)(d,{title:"RUN FLAGS",children:[(0,e.jsx)(n,{long:"--max-steps",arg:"<n>",desc:"Max agent steps (default: 30)"}),(0,e.jsx)(n,{long:"--timeout",arg:"<sec>",desc:"Kill run after N seconds"}),(0,e.jsx)(n,{long:"--headless",desc:"No visible browser window"}),(0,e.jsx)(n,{long:"--mode",arg:"<action|testing>",desc:"Run mode (default: testing)"}),(0,e.jsx)(n,{long:"--name",arg:"<name>",desc:"Persist session under this name"}),(0,e.jsx)(n,{long:"--variables",arg:"<json>",desc:"Inline variables as JSON"}),(0,e.jsx)(n,{long:"--variables-file",arg:"<path>",desc:"Load variables from file"}),(0,e.jsx)(n,{long:"--session-context",arg:"<json>",desc:"Prior runs context JSON"}),(0,e.jsx)(n,{long:"--global-context",arg:"<file>",desc:"Override global context markdown"}),(0,e.jsx)(n,{long:"--local-context",arg:"<file>",desc:"Override local context markdown"}),(0,e.jsx)(n,{long:"--ws-endpoint",arg:"<url>",desc:"Remote browser (LambdaTest)"}),(0,e.jsx)(n,{long:"--cdp-endpoint",arg:"<url>",desc:"Connect to existing Chrome CDP"}),(0,e.jsx)(n,{long:"--task-skills",desc:"Domain-specific task skills (experimental)"}),(0,e.jsx)(n,{long:"--code-export",desc:"Generate code export after upload"}),(0,e.jsx)(n,{long:"--code-language",arg:"<lang>",desc:"Code export language: python | javascript"}),(0,e.jsx)(n,{long:"--skip-code-validation",desc:"Skip post-codegen validation"}),(0,e.jsx)(n,{long:"--username",arg:"<user>",desc:"Basic auth (skip OAuth)"}),(0,e.jsx)(n,{long:"--access-key",arg:"<key>",desc:"Basic auth access key"}),(0,e.jsx)(n,{long:"--env",arg:"<name>",desc:"Environment (prod or stage)"}),(0,e.jsx)(n,{long:"--agent",desc:"NDJSON output (no UI)",highlight:!0})]}),(0,e.jsxs)(d,{title:"EXAMPLES",children:[(0,e.jsx)(u,{label:"Inline objective",cmd:`${r} run "Search for laptop"`}),(0,e.jsx)(u,{label:"Replay a saved test",cmd:`${r} testmd run smoke_test.md`}),(0,e.jsx)(u,{label:"Variables",cmd:`${r} run "Login as {{user}}" --variables '{"user":{"value":"alice"}}'`}),(0,e.jsx)(u,{label:"Agent mode (NDJSON)",cmd:`${r} run "Add to cart" --agent | jq .status`})]}),(0,e.jsx)(d,{title:"TEST FILES",children:(0,e.jsxs)(s,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:[(0,e.jsx)(o,{color:t.orange,children:"*_test.md"})," \u2014 markdown test files with YAML frontmatter and ",(0,e.jsx)(o,{color:t.orange,children:"## "}),"step headings."]}),(0,e.jsxs)(o,{color:t.dim,children:["Run with ",(0,e.jsxs)(o,{color:t.orange,children:[r," testmd run path/to/foo_test.md"]}),". (`.md` paths are not accepted by `",r," run`.)"]}),(0,e.jsxs)(o,{color:t.dim,children:["Sessions you run in TUI auto-save to ",(0,e.jsx)(o,{color:t.orange,children:"<cwd>/.testmuai/tests/<name>_test.md"})," (testing mode prompts on exit)."]})]})}),(0,e.jsxs)(s,{flexDirection:"column",marginTop:0,paddingX:1,children:[(0,e.jsx)(o,{color:t.muted,children:"\u2500".repeat(Math.min(l-2,70))}),(0,e.jsxs)(s,{gap:3,children:[(0,e.jsxs)(s,{children:[(0,e.jsx)(o,{color:t.dim,children:"Docs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:b})]}),(0,e.jsxs)(s,{children:[(0,e.jsx)(o,{color:t.dim,children:"Bugs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:S})]})]})]}),(0,e.jsx)(o,{children:" "})]})}function d({title:c,children:a}){return(0,e.jsxs)(s,{flexDirection:"column",marginBottom:1,children:[(0,e.jsx)(s,{marginLeft:1,children:(0,e.jsx)(o,{bold:!0,color:t.dim,children:c})}),a]})}function g({cmd:c,desc:a,highlight:l}){return(0,e.jsxs)(s,{marginLeft:2,children:[(0,e.jsxs)(s,{width:40,children:[(0,e.jsx)(o,{color:t.dim,children:"$ "}),(0,e.jsx)(o,{color:l?t.orange:t.orange,children:c})]}),(0,e.jsx)(o,{color:t.dim,children:a})]})}function i({cmd:c,args:a,desc:l,highlight:m}){return(0,e.jsxs)(s,{marginLeft:2,children:[(0,e.jsx)(s,{width:16,children:(0,e.jsx)(o,{color:m?t.orange:t.green,bold:!0,children:c})}),(0,e.jsx)(s,{width:32,children:a?(0,e.jsx)(o,{color:t.dim,children:a}):null}),(0,e.jsx)(o,{color:t.dim,children:l})]})}function n({long:c,arg:a,desc:l,highlight:m}){return(0,e.jsxs)(s,{marginLeft:2,children:[(0,e.jsxs)(s,{width:30,children:[(0,e.jsx)(o,{color:m?t.orange:t.orange,children:c}),a&&(0,e.jsxs)(o,{color:t.dim,children:[" ",a]})]}),(0,e.jsx)(o,{color:t.dim,children:l})]})}function u({label:c,cmd:a}){return(0,e.jsxs)(s,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:["# ",c]}),(0,e.jsxs)(o,{color:t.orange,children:["$ ",a]})]})}export{L as HelpView};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-TADJIOHV.js";import"./chunk-KVAALPTA.js";import"./chunk-NMKZHHB6.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as InfoBox};
2
+ import{a}from"./chunk-F4FXE466.js";import"./chunk-GO4CBUB6.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as InfoBox};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-A2AZQ4PQ.js";import"./chunk-NMKZHHB6.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as LinksBox};
2
+ import{a}from"./chunk-TBXIOT6M.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as LinksBox};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-IX34JIXK.js";import"./chunk-RGQIBS32.js";import"./chunk-NMKZHHB6.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProfilesView,a as formatProfileLine};
2
+ import{a,b}from"./chunk-OYOTWI53.js";import"./chunk-MEHEGW3V.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProfilesView,a as formatProfileLine};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-FYSWQ4K7.js";import"./chunk-YCCUBQY4.js";import"./chunk-XUHVQ5VL.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-3NR6OTHL.js";import"./chunk-RGQIBS32.js";import"./chunk-NMKZHHB6.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProjectPicker,a as formatProjectLine};
2
+ import{a,b}from"./chunk-VRVSOGXH.js";import"./chunk-YCCUBQY4.js";import"./chunk-66LXV7NN.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-K4ERF7GT.js";import"./chunk-MEHEGW3V.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProjectPicker,a as formatProjectLine};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-UQVKNUYO.js";import"./chunk-S3DAAAE5.js";import"./chunk-TADJIOHV.js";import"./chunk-KVAALPTA.js";import"./chunk-NMKZHHB6.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SaveSessionPrompt,b as defaultSessionTimestamp,c as renderSavePrompt};
2
+ import{a,b,c}from"./chunk-ELN3EN4K.js";import"./chunk-S3DAAAE5.js";import"./chunk-F4FXE466.js";import"./chunk-GO4CBUB6.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SaveSessionPrompt,b as defaultSessionTimestamp,c as renderSavePrompt};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a}from"./chunk-5VC7MBHR.js";import"./chunk-BLHCGRSK.js";import"./chunk-IQFUBT6Z.js";import"./chunk-NKCXCCPM.js";import"./chunk-NKUA3TSO.js";import"./chunk-FPFOW6BS.js";import"./chunk-WAOCHXJ5.js";import"./chunk-L5LI2JF4.js";import"./chunk-VRVSOGXH.js";import"./chunk-PV4EDQY4.js";import"./chunk-YCCUBQY4.js";import"./chunk-66LXV7NN.js";import"./chunk-M5JQXOCE.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-K4ERF7GT.js";import"./chunk-VE3SUJMA.js";import"./chunk-BUVRZXO3.js";import"./chunk-MEHEGW3V.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SingleShotApp};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c,d}from"./chunk-QG6LJCZG.js";import"./chunk-TADJIOHV.js";import"./chunk-KVAALPTA.js";import"./chunk-NMKZHHB6.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{d as AutoExitSummaryBox,c as SummaryBox,b as buildSummaryEvent,a as buildSummaryRendered};
2
+ import{a,b,c,d}from"./chunk-EQORZ6RT.js";import"./chunk-F4FXE466.js";import"./chunk-GO4CBUB6.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{d as AutoExitSummaryBox,c as SummaryBox,b as buildSummaryEvent,a as buildSummaryRendered};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{g as a}from"./chunk-TRXNJZSL.js";import"./chunk-TAUSKB3O.js";import"./chunk-K7P6VNLI.js";import"./chunk-NKCXCCPM.js";import"./chunk-N5YIMTGV.js";import"./chunk-5Y2G4NC7.js";import"./chunk-M5JQXOCE.js";import"./chunk-K4ERF7GT.js";import"./chunk-F4FXE466.js";import"./chunk-GO4CBUB6.js";import"./chunk-DFS4RMVP.js";import"./chunk-PXPXK4Q7.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as TestMdRunView};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as b,b as r}from"./chunk-KVAALPTA.js";import{y as o}from"./chunk-NMKZHHB6.js";import{a as p}from"./chunk-HCBYKLMW.js";import{a as i,b as l,j as s}from"./chunk-C44QQJR4.js";import{a as T}from"./chunk-6YGTRKDT.js";import{e as a}from"./chunk-UR6MHSHU.js";var f=a(T(),1);var e=a(p(),1);function V({profile:g,env:v,authenticated:n,authMethod:h,username:c,tokenStatus:t,expiresAt:d,serverStatus:u,detail:m}){let{exit:x}=s();return(0,f.useEffect)(()=>{let B=setTimeout(()=>x(),50);return()=>clearTimeout(B)},[x]),(0,e.jsx)(i,{flexDirection:"column",children:(0,e.jsx)(b,{title:"Identity",variant:n?"success":"warning",children:(0,e.jsxs)(i,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{children:u==="rejected"?(0,e.jsx)(l,{color:o.red,bold:!0,children:"\u2717 Not authenticated"}):u==="unreachable"?(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Couldn't verify"}):n?(0,e.jsx)(l,{color:o.green,bold:!0,children:"\u2713 Authenticated"}):(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Not logged in"})}),(0,e.jsxs)(i,{flexDirection:"column",marginTop:1,children:[(0,e.jsx)(r,{label:"Profile",value:g}),(0,e.jsx)(r,{label:"Environment",value:v}),(0,e.jsx)(r,{label:"Method",value:h}),c&&(0,e.jsx)(r,{label:"User",value:c}),t&&(0,e.jsx)(r,{label:"Token",value:t,valueColor:t==="valid"?o.green:t==="expired"?o.red:o.dim}),d&&(0,e.jsx)(r,{label:"Expires",value:d}),m&&(0,e.jsx)(r,{label:"Detail",value:m})]})]})})})}export{V as WhoamiView};
2
+ import{a as b,b as r}from"./chunk-GO4CBUB6.js";import{y as o}from"./chunk-PXPXK4Q7.js";import{a as p}from"./chunk-HCBYKLMW.js";import{a as i,b as l,j as s}from"./chunk-C44QQJR4.js";import{a as T}from"./chunk-6YGTRKDT.js";import{e as a}from"./chunk-UR6MHSHU.js";var f=a(T(),1);var e=a(p(),1);function V({profile:g,env:v,authenticated:n,authMethod:h,username:c,tokenStatus:t,expiresAt:d,serverStatus:u,detail:m}){let{exit:x}=s();return(0,f.useEffect)(()=>{let B=setTimeout(()=>x(),50);return()=>clearTimeout(B)},[x]),(0,e.jsx)(i,{flexDirection:"column",children:(0,e.jsx)(b,{title:"Identity",variant:n?"success":"warning",children:(0,e.jsxs)(i,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{children:u==="rejected"?(0,e.jsx)(l,{color:o.red,bold:!0,children:"\u2717 Not authenticated"}):u==="unreachable"?(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Couldn't verify"}):n?(0,e.jsx)(l,{color:o.green,bold:!0,children:"\u2713 Authenticated"}):(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Not logged in"})}),(0,e.jsxs)(i,{flexDirection:"column",marginTop:1,children:[(0,e.jsx)(r,{label:"Profile",value:g}),(0,e.jsx)(r,{label:"Environment",value:v}),(0,e.jsx)(r,{label:"Method",value:h}),c&&(0,e.jsx)(r,{label:"User",value:c}),t&&(0,e.jsx)(r,{label:"Token",value:t,valueColor:t==="valid"?o.green:t==="expired"?o.red:o.dim}),d&&(0,e.jsx)(r,{label:"Expires",value:d}),m&&(0,e.jsx)(r,{label:"Detail",value:m})]})]})})})}export{V as WhoamiView};
@@ -1,6 +1,6 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as p}from"./chunk-IYTHPCQ2.js";import"./chunk-KHU7C6EE.js";import"./chunk-3C5GMAM4.js";import"./chunk-NMZATEKQ.js";import"./chunk-FXPPQL4D.js";import"./chunk-RE3BZVGE.js";import"./chunk-6PS65QFF.js";import"./chunk-JFAFKHDX.js";import"./chunk-VLC24QVT.js";import"./chunk-CIFVUX3B.js";import"./chunk-OSALXGD4.js";import"./chunk-DNNZ353O.js";import"./chunk-YKTYVJBN.js";import"./chunk-CVOGP253.js";import"./chunk-427OQS2N.js";import"./chunk-ZPDM6FO7.js";import{a as u}from"./chunk-BC7UVJJB.js";import"./chunk-NVGBE2DR.js";import"./chunk-L5LI2JF4.js";import"./chunk-QHFUDBQH.js";import"./chunk-RGDQMKNJ.js";import"./chunk-L4JIMNKW.js";import"./chunk-MBXWXBDM.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-NMKZHHB6.js";import"./chunk-UR6MHSHU.js";import{existsSync as D}from"fs";var b=new Set(["interactive","agent","ci","override"]);function E(e){return e.mode!=null&&!b.has(e.mode)?{error:`design: --mode must be interactive | agent | ci | override, got '${e.mode}'`}:e.strength!=null&&e.strength!=="pairwise"&&e.strength!=="3-wise"?{error:`design: --strength must be pairwise | 3-wise, got '${e.strength}'`}:e.max!=null&&(!Number.isInteger(e.max)||e.max<1)?{error:"design: --max must be a positive integer"}:!e.useCase&&!e.resume?{error:"design: --use-case is required (or --resume <sid> \u2014 the session remembers its use-case)"}:{useCase:e.useCase,max:e.max,strength:e.strength,mode:e.mode,force:e.force,resume:e.resume,plan:e.plan,message:e.message,because:e.because,changeDelta:e.changeDelta,priorDesign:e.priorDesign}}async function A(e){let c=async(r,s)=>{if(process.stderr.write(r+`
2
+ import{a as p}from"./chunk-XSAZDIQV.js";import"./chunk-SHAA6FOD.js";import"./chunk-KHU7C6EE.js";import"./chunk-3C5GMAM4.js";import"./chunk-NVGTSXCJ.js";import"./chunk-FXPPQL4D.js";import"./chunk-GG43HSU2.js";import"./chunk-JFAFKHDX.js";import"./chunk-OSALXGD4.js";import"./chunk-DNNZ353O.js";import"./chunk-YKTYVJBN.js";import"./chunk-CVOGP253.js";import"./chunk-427OQS2N.js";import"./chunk-ZPDM6FO7.js";import{a as u}from"./chunk-BC7UVJJB.js";import"./chunk-NVGBE2DR.js";import"./chunk-L5LI2JF4.js";import"./chunk-LEA6IHXC.js";import"./chunk-RGDQMKNJ.js";import"./chunk-L3HG5ONB.js";import"./chunk-L4JIMNKW.js";import"./chunk-MBXWXBDM.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-PXPXK4Q7.js";import"./chunk-UR6MHSHU.js";import{existsSync as D}from"fs";var b=new Set(["interactive","agent","ci","override"]);function E(e){return e.mode!=null&&!b.has(e.mode)?{error:`design: --mode must be interactive | agent | ci | override, got '${e.mode}'`}:e.strength!=null&&e.strength!=="pairwise"&&e.strength!=="3-wise"?{error:`design: --strength must be pairwise | 3-wise, got '${e.strength}'`}:e.max!=null&&(!Number.isInteger(e.max)||e.max<1)?{error:"design: --max must be a positive integer"}:!e.useCase&&!e.resume?{error:"design: --use-case is required (or --resume <sid> \u2014 the session remembers its use-case)"}:{useCase:e.useCase,max:e.max,strength:e.strength,mode:e.mode,force:e.force,resume:e.resume,plan:e.plan,message:e.message,because:e.because,changeDelta:e.changeDelta,priorDesign:e.priorDesign}}async function A(e){let c=async(r,s)=>{if(process.stderr.write(r+`
3
3
  `),e.mode!=="agent")return 2;let{makeHeadlessIO:t,agentRefusal:i}=await import("./headless-io-PWW6YKH2.js");return i(t("ndjson","design"),r,s)},d=E(e);if("error"in d)return c(d.error);let a=d;{let{validateResumeMessage:r}=await import("./headless-io-PWW6YKH2.js"),s=r(a,"design");if(s)return c(s)}if(!D(u(process.cwd())))return c("error: no context store here (run `kane-cli context ingest` + `kane-cli context extract` first)","NO_STORE");let n=null;try{if(!a.mode&&!process.stdin.isTTY)return process.stderr.write(`design: no TTY \u2014 pass an explicit --mode agent|ci|override to run headless
4
4
  `),2;let r=a.mode??"interactive";if(r==="interactive"){if(!process.stdin.isTTY||!process.stdout.isTTY)return process.stderr.write(`design: --mode interactive needs a TTY on stdin and stdout (use --mode agent|ci|override headless)
5
- `),2;let{bindDesignInteractive:o}=await import("./interactive-bind-TKRWAPJU.js");return await o(a)}let{resolveAgentAuthEnv:s}=await import("./spawner-VD6YFZ43.js"),{runAgent:t}=await import("./bridge-WVFTWHKP.js"),{preflightTurn:i}=await import("./turn-preflight-JGYT7LXP.js"),{makeInterruptGuard:h}=await import("./interrupt-guard-UREUWNRL.js"),{baseUrlAdvisory:w}=await import("./turn-preflight-JGYT7LXP.js"),{makeHeadlessIO:T,resolveEncoding:v,guardedChannels:x}=await import("./headless-io-PWW6YKH2.js");n=T(v(r),"design");let m=await s(),l=w();l&&n.out(l);let g=h(t,o=>n.out(o)),f=x(n,()=>g.interrupted(),/^error: (design agent failed|the design agent ended)/);try{let o=await p({...a,mode:r},{contextDir:u(process.cwd()),agent:g.agent,preflightTurn:()=>i(m),ask:async()=>[],out:f.out,emit:f.emit,progress:n.progress,isTTY:!1,auth:m});return g.interrupted()&&o!==3?(n.out("interrupted \u2014 no session saved"),n.done(130)):n.done(o)}finally{g.dispose()}}catch(r){let s=r instanceof Error?r.message:String(r);n?.event({type:"error",message:`error: design failed: ${s}`});let t=n?i=>n.out(i):i=>process.stderr.write(i+`
5
+ `),2;let{bindDesignInteractive:o}=await import("./interactive-bind-WA2YVAUW.js");return await o(a)}let{resolveAgentAuthEnv:s}=await import("./spawner-K7LWPNIC.js"),{runAgent:t}=await import("./bridge-D2HETW5M.js"),{preflightTurn:i}=await import("./turn-preflight-JGYT7LXP.js"),{makeInterruptGuard:h}=await import("./interrupt-guard-UREUWNRL.js"),{baseUrlAdvisory:w}=await import("./turn-preflight-JGYT7LXP.js"),{makeHeadlessIO:T,resolveEncoding:v,guardedChannels:x}=await import("./headless-io-PWW6YKH2.js");n=T(v(r),"design");let m=await s(),l=w();l&&n.out(l);let g=h(t,o=>n.out(o)),f=x(n,()=>g.interrupted(),/^error: (design agent failed|the design agent ended)/);try{let o=await p({...a,mode:r},{contextDir:u(process.cwd()),agent:g.agent,preflightTurn:()=>i(m),ask:async()=>[],out:f.out,emit:f.emit,progress:n.progress,isTTY:!1,auth:m});return g.interrupted()&&o!==3?(n.out("interrupted \u2014 no session saved"),n.done(130)):n.done(o)}finally{g.dispose()}}catch(r){let s=r instanceof Error?r.message:String(r);n?.event({type:"error",message:`error: design failed: ${s}`});let t=n?i=>n.out(i):i=>process.stderr.write(i+`
6
6
  `);return t(`error: design failed: ${s}`),(process.env.ASSURANCE_LOG_LEVEL??"").toLowerCase()==="debug"&&r instanceof Error&&r.stack&&t(r.stack),t("hint: per-run trace logs live under .context/logs/ (design-*.log)"),n?n.done(1):1}}export{A as designTestsCommand};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-JR37W7IJ.js";import"./chunk-GLVDOR5G.js";import"./chunk-UR6MHSHU.js";export{a as runAgent};
2
+ import{a}from"./chunk-6WHKJSMJ.js";import"./chunk-YKZIACYJ.js";import"./chunk-UR6MHSHU.js";export{a as runAgent};
@@ -1,4 +1,4 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as l}from"./chunk-RZ4F3BHX.js";import{c as i,g as c}from"./chunk-NMKZHHB6.js";import"./chunk-UR6MHSHU.js";import{readFileSync as u,writeFileSync as g,mkdirSync as d}from"fs";import{join as f}from"path";var h=f(i,"changelog-cache.json"),p=3600*1e3;function y(){try{let e=JSON.parse(u(h,"utf-8"));if(Date.now()-e.cachedAt<p)return e}catch{}return null}function m(e){try{d(i,{recursive:!0}),g(h,JSON.stringify({entries:e,cachedAt:Date.now()}))}catch{}}async function A(e){try{let t=y();if(t){let r=t.entries;return e?.all?r:r.slice(0,5)}let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),a=await l(`${c}?per_page=30`,{headers:{Accept:"application/vnd.github+json"},signal:n.signal});if(clearTimeout(o),!a.ok)return[];let s=(await a.json()).map(r=>({version:r.tag_name.replace(/^v/,""),date:r.published_at?r.published_at.slice(0,10):"",body:r.body??""}));return m(s),e?.all?s:s.slice(0,5)}catch{return[]}}function v(e){if(e.length===0)return"Could not fetch changelog. Visit https://github.com/LambdaTest/kane-cli/releases";let t=["kane-cli Changelog","\u2500".repeat(40),""];for(let n of e){if(t.push(`v${n.version} (${n.date})`),n.body){let o=n.body.split(`
2
+ import{a as l}from"./chunk-RZ4F3BHX.js";import{c as i,g as c}from"./chunk-PXPXK4Q7.js";import"./chunk-UR6MHSHU.js";import{readFileSync as u,writeFileSync as g,mkdirSync as d}from"fs";import{join as f}from"path";var h=f(i,"changelog-cache.json"),p=3600*1e3;function y(){try{let e=JSON.parse(u(h,"utf-8"));if(Date.now()-e.cachedAt<p)return e}catch{}return null}function m(e){try{d(i,{recursive:!0}),g(h,JSON.stringify({entries:e,cachedAt:Date.now()}))}catch{}}async function A(e){try{let t=y();if(t){let r=t.entries;return e?.all?r:r.slice(0,5)}let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),a=await l(`${c}?per_page=30`,{headers:{Accept:"application/vnd.github+json"},signal:n.signal});if(clearTimeout(o),!a.ok)return[];let s=(await a.json()).map(r=>({version:r.tag_name.replace(/^v/,""),date:r.published_at?r.published_at.slice(0,10):"",body:r.body??""}));return m(s),e?.all?s:s.slice(0,5)}catch{return[]}}function v(e){if(e.length===0)return"Could not fetch changelog. Visit https://github.com/LambdaTest/kane-cli/releases";let t=["kane-cli Changelog","\u2500".repeat(40),""];for(let n of e){if(t.push(`v${n.version} (${n.date})`),n.body){let o=n.body.split(`
3
3
  `).filter(a=>a.trim());for(let a of o)t.push(` ${a}`)}t.push("")}return t.join(`
4
4
  `)}export{A as fetchChangelog,v as formatChangelog};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as V,c as te}from"./chunk-JFAFKHDX.js";import{a as w,b as ee}from"./chunk-OSALXGD4.js";import{a as ne}from"./chunk-427OQS2N.js";import{d as Z}from"./chunk-NVGBE2DR.js";import{a as X}from"./chunk-LEA6IHXC.js";import"./chunk-RGDQMKNJ.js";import{c as Y,d as z,n as Q}from"./chunk-L3HG5ONB.js";import{a as j,b as F}from"./chunk-L4JIMNKW.js";import{c as J,e as W}from"./chunk-MBXWXBDM.js";import"./chunk-IAHKTEET.js";import{e as L,f as A,g as P,h as x}from"./chunk-5YPBPZUR.js";import"./chunk-UR6MHSHU.js";var de=new Set(["approve","edit","reject"]);function ye(k){let{contextDir:f,graph:s,ops:oe,by:l}=k,N=k.mintable??ne(),T=J(f);if(s.latestHash!==T)return{record:null,errors:[{code:"STALE_BASIS",detail:`graph opened at ${String(s.latestHash)} but chain head is ${String(T)} \u2014 re-open and retry`}]};let C=[],h=[],M=new Set;for(let e of oe){if(s.appliedEvents.has(e.eventId)||M.has(e.eventId)){C.push(e.eventId);continue}M.add(e.eventId),h.push(e)}if(h.length===0)return{record:null,errors:null,applied:[],skipped:C,minted:[],staleDelta:[]};let o=[],$=[],y=[],m=[],I=[],O=[],_=[...k.judgements??[]],D=[],q=new Map,B=new Set,G=[],b=new Set,se=new Set(N),H=new Set;for(let e of h){if(!de.has(e.kind))continue;let n=e.target,t=s.resolve(n)?.cid??n;H.has(t)&&o.push({code:"MULTIPLE_TERMINAL_OPS",detail:`${n} has more than one terminal op in this turn \u2014 normalize latest-wins first`}),H.add(t)}let E=(e,n,t)=>{let i=s.resolve(n);if(!i)return o.push({code:"UNKNOWN_NODE",detail:`${e}: ${n} names nothing in the graph`}),null;let p=s.tipOf(i.cid);return p!==t||s.superseded.has(t)?(o.push({code:"EXPECTED_CID_MOVED",detail:`${e}: ${n} moved or was archived since it was displayed`,data:{tip:p}}),null):t};for(let e of h)if(e.kind==="approve"){let n=E("approve",e.target,e.expectedCid);n&&m.push({id:n,kind:"review-item",resolution:"approved",edit:null,reason:null,by:l})}else if(e.kind==="reject"){let n=E("reject",e.target,e.expectedCid);if(!n)continue;if(m.push({id:n,kind:"review-item",resolution:"rejected",edit:null,reason:e.reason,by:l}),e.redirectTo!==void 0){let t=s.resolve(e.redirectTo);if(!t||t.superseded){o.push({code:"UNKNOWN_NODE",detail:`reject.redirectTo: ${e.redirectTo} is not a live node`});continue}I.push({kind:"node",old:n,new:t.cid,reason:e.reason,by:l})}}else if(e.kind==="edit"){let n=E("edit",e.target,e.expectedCid);if(!n)continue;let t=s.getNode(n);if(!t){o.push({code:"UNKNOWN_NODE",detail:`edit: ${e.target} node file unreadable`});continue}let i={...t.content};for(let[c,u]of Object.entries(e.edit))u!==void 0&&(i[c]=u);if(typeof i.title=="string"&&!i.title.trim()){o.push({code:"EMPTY_TITLE",detail:`edit: ${e.target} edited title is empty`});continue}let p=A(t.label,i);if(p.length>0){for(let c of p)o.push({code:c.code,detail:`edit ${e.target}: ${c.detail}`});continue}let d=j(t.label,i);if(d===n){m.push({id:n,kind:"review-item",resolution:"approved",edit:null,reason:null,by:l});continue}$.push({cid:d,label:t.label,content:i}),I.push({kind:"node",old:n,new:d,reason:e.reason??"edited in chat",by:l}),m.push({id:d,kind:"review-item",resolution:"edited",edit:{...e.edit},reason:null,by:l})}else if(e.kind==="enhance"){if(!E("enhance",e.target,e.expectedCid))continue;for(let t of e.edges){let i=s.nodeLabel.get(t.src)??"(unknown)",p=s.nodeLabel.get(t.dst)??"(unknown)";for(let r of x(t.type,i,p,t.props))o.push({code:r.code,detail:`enhance ${e.target}: ${r.detail}`});let d=F(t.type,t.src,t.dst,t.props);if(s.edgesFrom(t.src).some(r=>r.ecid===d)||y.some(r=>r.ecid===d))continue;let c=Y(s,t.type,t.src,t.dst,G);c&&o.push(c);let u=z(s,t.type,t.src,t.dst);u&&o.push(u);let a=P(t.type)?.cardinality;if(a==="one-live-per-src"||a==="one-live-per-src-and-dst"){let r=`${t.type}|${t.src}`;b.has(r)&&o.push({code:"CARDINALITY_VIOLATION",detail:`${t.type} from ${t.src}: two one-live edges in one turn`}),b.add(r)}if(a==="one-live-per-src-and-dst"){let r=`${t.type}|dst|${t.dst}`;b.has(r)&&o.push({code:"CARDINALITY_VIOLATION",detail:`${t.type} onto ${t.dst}: two one-live edges in one turn (strict 1:1)`}),b.add(r)}y.push({ecid:d,type:t.type,src:t.src,dst:t.dst,props:t.props}),G.push({src:t.src,dst:t.dst,type:t.type})}}else if(e.kind==="add"){if(!se.has(e.label)){o.push({code:"GATED_LABEL",detail:`add: ${e.label} is not mintable in v1 (gate: ${N.join("|")})`,data:{gate:[...N]}});continue}let n=s.heads.get(e.convSourceId),t=s.convChains.get(e.convSourceId);if(typeof n!="string"||!t){o.push({code:"CONV_SOURCE_MISSING",detail:`add: ${e.convSourceId} is not a live conversation source`});continue}let i=s.getNode(n)?.content?.blob,p=typeof i=="string"?Z(f,i)?.toString("utf8")??"":"",d=ee(p,e.cite.turn);if(d===null){o.push({code:"BAD_ANCHOR",detail:`add: ${w(e.cite.turn)} does not resolve in ${e.convSourceId}`});continue}if(!d.includes(e.cite.quote)){o.push({code:"QUOTE_MISMATCH",detail:`add: quote is not verbatim within ${w(e.cite.turn)}`});continue}let c={...e.content,derived:!0},u=A(e.label,c);if(u.length>0){for(let g of u)o.push({code:g.code,detail:`add: ${g.detail}`});continue}let a=j(e.label,c),r={source_id:e.convSourceId,source_cid:n,anchor:w(e.cite.turn),quote:e.cite.quote};for(let g of x(L.DERIVES,"source",e.label,r))o.push({code:g.code,detail:`add: ${g.detail}`});$.push({cid:a,label:e.label,content:c}),y.push({ecid:F("DERIVES",n,a,r),type:L.DERIVES,src:n,dst:a,props:r}),e.rationale&&_.push({about:a,rationale:e.rationale,by:l});let v=Q(e.label,g=>B.has(g),s.names.keys());v!==null&&(B.add(v),O.push({cid:a,slug:v,by:l})),D.push({cid:a,...v!==null?{slug:v}:{}}),q.set(e.eventId,a)}if(o.length)return{record:null,errors:o};let U=new Date().toISOString();for(let e of h){if(e.kind==="add"){let n=q.get(e.eventId);n&&V(f,{ts:U,command:"extract-chat",id:n,verdict:"add",polarity:"preference",tag:e.label,by:l,event_id:e.eventId,target:n});continue}for(let n of te(e,{ts:U,command:"extract-chat",by:l}))V(f,n)}let K=h.map(e=>e.eventId).sort(),re=W(f,{ts:new Date().toISOString(),proposal_id:null,nodes:$,edges:y,review:m,supersessions:I,...O.length>0?{names:O}:{},..._.length>0?{judgements:_}:{},event_ids:K,source_head_moves:{}},{expectPrev:T}),R=X(f),S=new Set;for(let e of I)if(e.kind==="node"){S.add(e.old);for(let n of R.edgesInto(e.old))S.add(n.src)}for(let e of D)S.add(e.cid);let ie=[...S].map(e=>({cid:e,state:R.stale(R.tipOf(e))})).filter(e=>e.state!=="fresh");return{record:re.record,errors:null,applied:K,skipped:C,minted:D,staleDelta:ie}}export{ye as commitChatTurn};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b,c}from"./chunk-XWIN3S7O.js";import"./chunk-GG43HSU2.js";import"./chunk-OSALXGD4.js";import"./chunk-NVGBE2DR.js";import"./chunk-L4JIMNKW.js";import"./chunk-MBXWXBDM.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-UR6MHSHU.js";export{c as makeChatController,b as questionStub,a as recommendationPicks};