@testmuai/kane-cli 0.6.0 → 0.6.1

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 (99) hide show
  1. package/dist/{ChatSurface-I6PFL3OE.js → ChatSurface-R55VO3VW.js} +1 -1
  2. package/dist/{ChromeProfilePicker-YG7TKHM5.js → ChromeProfilePicker-BZKLIO2T.js} +1 -1
  3. package/dist/{CliFeedbackPrompt-5RUIP4KA.js → CliFeedbackPrompt-3HYRBMXS.js} +1 -1
  4. package/dist/{CliUploadProgress-YQYPZNEV.js → CliUploadProgress-OAPMO5I3.js} +1 -1
  5. package/dist/{ConfigView-HZ7MFCAJ.js → ConfigView-YIAAISLE.js} +1 -1
  6. package/dist/{EvidenceViewOffer-N4UED7VY.js → EvidenceViewOffer-DBMZQ34Z.js} +1 -1
  7. package/dist/FolderPicker-ILK4AIKL.js +2 -0
  8. package/dist/{HelpView-BLWTCQ6T.js → HelpView-HBQX64VR.js} +1 -1
  9. package/dist/{InfoBox-7ZZGMYHY.js → InfoBox-DKJO73HM.js} +1 -1
  10. package/dist/{LinksBox-63Q5YS5X.js → LinksBox-44WCVBT4.js} +1 -1
  11. package/dist/{ProfilesView-AVYB43ES.js → ProfilesView-NVEDYU3H.js} +1 -1
  12. package/dist/{ProjectPicker-EINNALUG.js → ProjectPicker-COBY7TCY.js} +1 -1
  13. package/dist/{SaveSessionPrompt-C3LCI2KZ.js → SaveSessionPrompt-O4ENMYHP.js} +1 -1
  14. package/dist/SingleShotApp-NA6A2S6I.js +2 -0
  15. package/dist/{SummaryBox-NRPQ2AMW.js → SummaryBox-ROV7TNK4.js} +1 -1
  16. package/dist/TestMdRunView-U5YTNLY6.js +2 -0
  17. package/dist/{WhoamiView-YLMIEJQN.js → WhoamiView-4QV3DPN2.js} +1 -1
  18. package/dist/{bind-QYQ5IT4S.js → bind-RDTZZ6ZI.js} +2 -2
  19. package/dist/{bridge-QENVIWWC.js → bridge-VY2Q3HQU.js} +1 -1
  20. package/dist/{changelog-4RSI7UIO.js → changelog-JMFGVNEU.js} +1 -1
  21. package/dist/{chunk-BV3EARZO.js → chunk-2PDWMY2B.js} +1 -1
  22. package/dist/{chunk-6BQD2BXI.js → chunk-2T4JPBB5.js} +1 -1
  23. package/dist/{chunk-YWWKKKXY.js → chunk-37CI4EJX.js} +1 -1
  24. package/dist/{chunk-ZZOSDBYN.js → chunk-47RNFG2V.js} +3 -3
  25. package/dist/{chunk-OXARXMMD.js → chunk-4CRKK5WV.js} +1 -1
  26. package/dist/{chunk-HYW5VDEC.js → chunk-5FD6ZXB5.js} +1 -1
  27. package/dist/{chunk-LBBPMEO2.js → chunk-5UXL6RNG.js} +1 -1
  28. package/dist/{chunk-NWZTYAJB.js → chunk-7DBQEOFL.js} +1 -1
  29. package/dist/{chunk-3SK5GXQM.js → chunk-7SUKUJO2.js} +1 -1
  30. package/dist/{chunk-MQ7DJ2XC.js → chunk-AAWRKFE4.js} +1 -1
  31. package/dist/{chunk-Y2S3PW7N.js → chunk-BMSWIYYK.js} +1 -1
  32. package/dist/{chunk-N2BUF6YU.js → chunk-CB3TEWZJ.js} +1 -1
  33. package/dist/{chunk-TZVURR5H.js → chunk-CP4XCWAJ.js} +1 -1
  34. package/dist/{chunk-NOOHQBUD.js → chunk-FAIH2K2U.js} +1 -1
  35. package/dist/{chunk-5Q46BEG7.js → chunk-FS4YJM22.js} +1 -1
  36. package/dist/{chunk-RTWWPEQ7.js → chunk-HGL3RM7P.js} +1 -1
  37. package/dist/{chunk-MKD3KZPM.js → chunk-HMGNPFXP.js} +1 -1
  38. package/dist/{chunk-IPCC3P6T.js → chunk-IRDMEYJB.js} +2 -2
  39. package/dist/{chunk-QI6WZ56Y.js → chunk-ISAE457F.js} +1 -1
  40. package/dist/{chunk-WUNN5OCH.js → chunk-J5BUMF3G.js} +1 -1
  41. package/dist/{chunk-25YSMNUP.js → chunk-KFAYCOTB.js} +1 -1
  42. package/dist/{chunk-INP7FG6V.js → chunk-KGP7NSXH.js} +1 -1
  43. package/dist/{chunk-WUMNIGPR.js → chunk-MJFYMMX2.js} +1 -1
  44. package/dist/{chunk-FAXRERS6.js → chunk-MMI3VSCA.js} +1 -1
  45. package/dist/{chunk-CBIW5DTU.js → chunk-MZ2PXBKK.js} +1 -1
  46. package/dist/{chunk-IF2R3AR4.js → chunk-N2ZW5635.js} +1 -1
  47. package/dist/{chunk-C5NNT7Y3.js → chunk-NSSKSXCT.js} +1 -1
  48. package/dist/{chunk-XQDDUVD3.js → chunk-O4O4KL6Z.js} +1 -1
  49. package/dist/{chunk-FPGOV4AQ.js → chunk-OBBXDBEE.js} +1 -1
  50. package/dist/{chunk-VK7RF53I.js → chunk-Q4P2L7DY.js} +1 -1
  51. package/dist/{chunk-NTJDMMLC.js → chunk-Q4PUOA46.js} +2 -2
  52. package/dist/{chunk-WFSQZG26.js → chunk-QZWQCHXK.js} +1 -1
  53. package/dist/{chunk-MESFNOY3.js → chunk-R2K2SGGE.js} +1 -1
  54. package/dist/{chunk-D5SHVZGD.js → chunk-RH2OAIJI.js} +1 -1
  55. package/dist/{chunk-WFAMF4SG.js → chunk-ROPXE7TF.js} +1 -1
  56. package/dist/{chunk-B2OAEEKI.js → chunk-RY4OOGSC.js} +1 -1
  57. package/dist/{chunk-ZXDA4K6G.js → chunk-S74MQRDN.js} +1 -1
  58. package/dist/{chunk-QK6KZMYG.js → chunk-SB6MBQKR.js} +1 -1
  59. package/dist/{chunk-VXS23M67.js → chunk-SQJWMOJQ.js} +1 -1
  60. package/dist/{chunk-PGEMGGBS.js → chunk-SUDAFBVD.js} +2 -2
  61. package/dist/{chunk-WG3BBXJF.js → chunk-VXD5667K.js} +2 -2
  62. package/dist/{chunk-LKXVYWKG.js → chunk-WAGJLR5X.js} +1 -1
  63. package/dist/{chunk-ABSEKYIB.js → chunk-WGG5XURS.js} +2 -2
  64. package/dist/{chunk-ME3GYVBV.js → chunk-WRHZCHZY.js} +1 -1
  65. package/dist/{chunk-5U3GOEGG.js → chunk-XDW2RGIL.js} +1 -1
  66. package/dist/{chunk-H7ZQ4AWL.js → chunk-YJ6AQ2KP.js} +1 -1
  67. package/dist/{chunk-ZO7ROBPR.js → chunk-ZA67EBYF.js} +1 -1
  68. package/dist/{chunk-GNGGFK7C.js → chunk-ZNANAARA.js} +1 -1
  69. package/dist/{credentials-WUEKK7FI.js → credentials-L63BBW2S.js} +1 -1
  70. package/dist/{evidence-4BSNTVND.js → evidence-UAFPTHQX.js} +1 -1
  71. package/dist/{evolve-cmd-VUWLH3CO.js → evolve-cmd-2SPNVTT4.js} +1 -1
  72. package/dist/{extract-bind-T7SUAID6.js → extract-bind-DS4UP23P.js} +2 -2
  73. package/dist/{extract-cmd-LZW7CRT3.js → extract-cmd-PMZHMMU7.js} +1 -1
  74. package/dist/{generate-headless-C55T3GGR.js → generate-headless-C3UZKDS5.js} +2 -2
  75. package/dist/index.js +12 -12
  76. package/dist/{interactive-bind-P6AGLUMM.js → interactive-bind-SJLDJULN.js} +2 -2
  77. package/dist/{list-commands-M34USUNO.js → list-commands-PGAX5HRB.js} +1 -1
  78. package/dist/login-flow-4OJ34VDP.js +2 -0
  79. package/dist/{persist-recorded-session-L2KAY37H.js → persist-recorded-session-WFU4M4SQ.js} +1 -1
  80. package/dist/{pipeline-FJXQIFW7.js → pipeline-EYQUM27P.js} +1 -1
  81. package/dist/{reconcile-cmd-KTCH4KZQ.js → reconcile-cmd-TFFYCTCY.js} +2 -2
  82. package/dist/{recording-banner-2KIVZAXY.js → recording-banner-PH2NND2X.js} +1 -1
  83. package/dist/{require-project-folder-NOGEHZTS.js → require-project-folder-RD2UAB7E.js} +1 -1
  84. package/dist/{run-P4CHG2VH.js → run-NODOSQUL.js} +1 -1
  85. package/dist/{run-test-md-ICLG4OPX.js → run-test-md-I6O4H7B2.js} +2 -2
  86. package/dist/{skill-installer-KGPXQRCE.js → skill-installer-BJLHH3DW.js} +1 -1
  87. package/dist/{spawner-DDD3ICOX.js → spawner-UDCF35OA.js} +1 -1
  88. package/dist/tcg-generate-E7H4LF7Y.js +2 -0
  89. package/dist/{testmd-actions-45BY3YFO.js → testmd-actions-FMVUXZGX.js} +1 -1
  90. package/dist/token-refresh-OGBTJGZ2.js +2 -0
  91. package/dist/{validate-basic-QCD4VN37.js → validate-basic-WILRWRRP.js} +1 -1
  92. package/dist/{version-check-55YZMQUI.js → version-check-TXTCVX2N.js} +1 -1
  93. package/package.json +6 -6
  94. package/dist/FolderPicker-NAFYP7ES.js +0 -2
  95. package/dist/SingleShotApp-PS42WWT7.js +0 -2
  96. package/dist/TestMdRunView-5FVCEQZI.js +0 -2
  97. package/dist/login-flow-GMLHK6JT.js +0 -2
  98. package/dist/tcg-generate-KBXZIIHB.js +0 -2
  99. package/dist/token-refresh-OCFALJ7U.js +0 -2
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as H,b as $e}from"./chunk-6PS65QFF.js";import{a as xe,b as ye}from"./chunk-FAXRERS6.js";import{b as de,d as he}from"./chunk-WFSQZG26.js";import{a as pe}from"./chunk-5Y2G4NC7.js";import{a as fe}from"./chunk-C5NNT7Y3.js";import{b as ge}from"./chunk-DFS4RMVP.js";import"./chunk-N2BUF6YU.js";import{x as l}from"./chunk-MKD3KZPM.js";import{a as R}from"./chunk-HCBYKLMW.js";import{a as x,b as o,i as me,k as U}from"./chunk-C44QQJR4.js";import{a as Y}from"./chunk-6YGTRKDT.js";import{e as I}from"./chunk-UR6MHSHU.js";var L=I(Y(),1);var B=I(R(),1),Te=3,Ze=60;function et(e){let n=e.cursor>=0?e.questions[e.cursor]:void 0;if(n?.risk==="high")return"high-risk \u2014 answer explicitly, or type 'defer' to leave the rest with the agent";let t=e.resolution.findIndex(Boolean);if(t>=0){let a=e.questions[t],r=a.options.find((i,p)=>p!==e.resolution[t].selected_index)?.label??a.options[0]?.label??"\u2026";return`changed your mind? \`${t+1}: ${r}\` re-answers q${t+1}`}let s=n??e.questions[0],u=s.options[0]?.label??"\u2026",c=s.allow_free_text?" \xB7 or your own words":"";return`e.g. \`1\` or \`${u}\`${c} \xB7 Enter takes recommended defaults`}function tt(e){return`[${e}]`}function nt({batch:e,i:n}){let t=e.resolution[n],s=t.form==="deferred"?"\u2013 deferred (the agent keeps it)":`\u2713 ${t.form}: ${t.choice}${t.form==="assumed"?" (flagged)":" (you)"}`;return(0,B.jsx)(o,{color:l.dim,children:` ${s}`})}function rt({batch:e,i:n}){let t=e.questions[n],s=e.cursor===n&&!e.resolution[n],u=s?"\u203A":" ";return(0,B.jsxs)(x,{flexDirection:"column",children:[(0,B.jsx)(o,{bold:s,children:` ${n+1} ${u} ${t.text} ${tt(t.risk)}`}),(0,B.jsx)(o,{color:l.dim,children:` why: ${t.rationale}`}),e.resolution[n]?(0,B.jsx)(nt,{batch:e,i:n}):(0,B.jsxs)(x,{flexDirection:"column",children:[t.multi_select?(0,B.jsx)(o,{color:l.dim,children:" note: multi-select not yet supported \u2014 pick the best single option"}):null,t.options.map((c,a)=>(0,B.jsx)(o,{children:` ${a+1}. ${c.label}${a===t.recommended_index?" \u2605 recommended":""}`},`o-${a}`)),t.allow_free_text?(0,B.jsx)(o,{color:l.dim,children:" (free text allowed \u2014 just type your own words)"}):null]})]})}function we({batch:e}){let{stdout:n}=U(),t=n?.columns??80,s=t<Ze,u=e.resolution.filter(y=>!y).length,c=Math.max(0,Math.min(e.cursor<0?0:e.cursor,e.questions.length-Te)),a=e.questions.slice(c,c+Te),r=c,i=e.questions.length-c-a.length,p=et(e);s&&p.length>t-2&&(p=`${p.slice(0,Math.max(0,t-3))}\u2026`);let f=e.cursor>=0?`answering ${e.cursor+1} of ${e.questions.length}`:"all placed",g=(0,B.jsxs)(x,{flexDirection:"column",children:[(0,B.jsx)(o,{bold:!0,children:`questions \xB7 ${u} pending \xB7 ${f}`}),r>0?(0,B.jsx)(o,{color:l.muted,children:` \u22EE ${r} above`}):null,a.map((y,C)=>(0,B.jsx)(rt,{batch:e,i:c+C},y.id)),i>0?(0,B.jsx)(o,{color:l.muted,children:` \u22EE ${i} more`}):null,(0,B.jsx)(o,{color:l.dim,children:p})]});return s?g:(0,B.jsx)(x,{flexDirection:"column",borderStyle:"round",borderColor:l.dim,paddingX:1,children:g})}var A=I(R(),1),be=60,ot=e=>e.length<=be?e:`${e.slice(0,be-1)}\u2026`;function Z({item:e}){return(0,A.jsxs)(x,{flexDirection:"column",marginLeft:2,children:[(e.cite??[]).map((n,t)=>(0,A.jsx)(o,{dimColor:!0,children:`cite ${n.anchor??"conv"} \u2014 "${n.quote??""}"`},`cite-${t}`)),(e.depends_on_hint??[]).length>0&&(0,A.jsx)(o,{dimColor:!0,children:`depends on: ${(e.depends_on_hint??[]).join(", ")}`}),Object.entries(e.extra??{}).map(([n,t])=>(0,A.jsx)(o,{dimColor:!0,children:`${n}: ${t}`},`extra-${n}`))]})}function Q({heading:e,turn:n,items:t,expandedRef:s,total:u,compact:c,numbers:a,marks:r}){return(0,A.jsxs)(x,{flexDirection:"column",children:[(0,A.jsx)(o,{bold:!0,children:`${e} \xB7 turn ${n} \xB7 ${u??t.length} proposed`}),t.map((i,p)=>{let f=i.matches_existing,g=f?f.cid?f.archived?` \u2248 matches ARCHIVED ${f.cid.slice(0,19)} \u2014 previously rejected${f.reason?`: "${f.reason}"`:""}`:` \u2248 matches ${f.cid.slice(0,19)}`:" \u2248overlap":"",y=r?.[p]?" \xB7 updated":"",C=c?` ${a?.[p]??p+1} \xB7 ${i.title}${i.badge!==void 0?` \xB7 ${i.badge}`:""}${i.why?` \u2014 ${ot(i.why)}`:""}${g}${y}`:` ${i.title}${i.badge!==void 0?` \xB7 ${i.badge}`:""}${i.why!==void 0?` \xB7 ${i.why}`:""}${g}`;return(0,A.jsxs)(x,{flexDirection:"column",children:[(0,A.jsx)(o,{children:C}),s===i.temp_ref&&(0,A.jsx)(Z,{item:i})]},i.temp_ref)})]})}var Ce=I(R(),1),st=e=>e.summary??e.description??"";function it(e){return{temp_ref:e.temp_ref,title:e.title,badge:e.risk,why:st(e),matches_existing:e.matches_existing?e.matches_existing:null,cite:e.cite??[],depends_on_hint:e.depends_on_hint??[]}}function ve({turn:e,items:n,expandedRef:t,total:s,compact:u,numbers:c,marks:a}){return(0,Ce.jsx)(Q,{heading:"use-cases",turn:e,items:n.map(it),expandedRef:t,total:s,compact:u,numbers:c,marks:a})}var at={"use-case":"use-cases",ac:"ACs",scenario:"scenarios",test:"tests",gap:"gaps"},P=e=>at[e]??`${e}s`,ke=e=>e==="ac"?"AC":e==="use-case"?"use-case":e,ee=e=>e.kind??"use-case",Se=e=>`${ee(e)}:${e.temp_ref}`;function Ie(e){let n=e,t=n.badge??e.risk??null,s=n.why??e.summary??e.description??null;return JSON.stringify([e.title,t,s,n.extra??null,e.depends_on_hint??null])}function Be(e){return e.filter(n=>n.role==="agent"&&typeof n.turnIndex=="number"&&Array.isArray(n.items)&&n.items.length>0)}function F(e){let n=new Map,t=1;for(let c of Be(e)){let a=new Set;for(let r of c.items){let i=Se(r);if(a.has(i))continue;a.add(i);let p=n.get(i);n.set(i,{num:p?.num??t++,ref:r.temp_ref,kind:ee(r),item:r,turnIndex:c.turnIndex,fingerprint:Ie(r)})}}let s=[...n.values()].sort((c,a)=>c.num-a.num),u=[];for(let c of s){let a=u.find(r=>r.kind===c.kind);a?a.count++:u.push({kind:c.kind,label:P(c.kind),count:1})}return{entries:s,byRef:n,counts:u}}function Re(e,n){let s=Be(e).find(m=>m.turnIndex===n);if(!s)return null;let u=e.filter(m=>m.role!=="agent"||typeof m.turnIndex!="number"||m.turnIndex<=n),c=F(u),a=F(e.filter(m=>m.role!=="agent"||typeof m.turnIndex!="number"||m.turnIndex<n)),r=[],i=new Map,p=new Map,f=new Map,g=new Set;for(let m of s.items){let w=Se(m);if(g.has(w))continue;g.add(w);let q=a.byRef.get(w),O=m.changed===!0,S=c.byRef.get(w).num,D=ee(m);if(q&&!O&&q.fingerprint===Ie(m)){i.set(D,(i.get(D)??0)+1);continue}let b=!!q||O,M=b?f:p;M.set(D,(M.get(D)??0)+1),r.push({item:m,num:S,updated:b})}let y=[...i.entries()].map(([m,w])=>({label:P(m),count:w})),C=[...[...p.entries()].map(([m,w])=>`${w} new ${w===1?ke(m):P(m)}`),...[...f.entries()].map(([m,w])=>`${w} updated ${w===1?ke(m):P(m)}`)].join(" \xB7 ");return{fresh:r,unchanged:y,headerStats:C}}var E=I(R(),1);function De({turnIndex:e,fresh:n,headerStats:t,unchangedTotal:s}){let u=[];for(let a of n){let r=a.item.kind??"use-case",i=u.find(p=>p.kind===r);i?i.rows.push(a):u.push({kind:r,rows:[a]})}let c=`design \xB7 turn ${e} \u2014 ${t||"no new items"}${s>0?` (${s} unchanged)`:""}`;return(0,E.jsxs)(x,{flexDirection:"column",children:[(0,E.jsx)(o,{bold:!0,children:c}),u.map(({kind:a,rows:r})=>{let i=r.filter(g=>!g.updated).length,p=r.length-i,f=[...i>0?[`${i} new`]:[],...p>0?[`${p} updated`]:[]].join(" \xB7 ");return(0,E.jsxs)(x,{flexDirection:"column",children:[(0,E.jsx)(o,{color:l.dim,children:`${P(a).toLowerCase()} \xB7 ${f}`}),r.map(({item:g,num:y,updated:C})=>{let m=g;return(0,E.jsxs)(x,{flexDirection:"column",children:[(0,E.jsxs)(o,{children:[(0,E.jsx)(o,{children:` ${y} \xB7 ${g.title}`}),m.badge?(0,E.jsx)(o,{color:l.dim,children:` \xB7 ${m.badge}`}):null,C?(0,E.jsx)(o,{color:l.dim,children:" \xB7 updated"}):null]}),m.why?(0,E.jsx)(o,{color:l.dim,children:` ${m.why}`}):null]},`${a}:${g.temp_ref}`)})]},a)})]})}var d=I(R(),1);function ct(e){let n=e.form==="assumed"?" (flagged)":e.form==="deferred"?"":" (you)",t=e.note?` \u2014 ${e.note}`:"";return e.form==="deferred"?`\u21B3 deferred q${e.qNum} ${e.stub}${t}`:e.form==="changed"?`\u21B3 changed q${e.qNum} ${e.stub}: ${e.prev??"?"} \u2192 ${e.choice??"?"}${n}${t}`:`\u21B3 ${e.form} q${e.qNum} ${e.stub}: ${e.choice??"?"}${n}${t}`}function Ee({block:e,annotations:n}){switch(e.kind){case"banner":return(0,d.jsx)(o,{color:l.dim,children:`\u2500\u2500 ${e.text} \u2500\u2500`});case"user":return(0,d.jsxs)(x,{children:[(0,d.jsx)(o,{color:l.orange,children:"\u276F "}),(0,d.jsx)(o,{children:e.text})]});case"note":return(0,d.jsx)(o,{color:l.dim,children:e.text});case"agent":return(0,d.jsx)(xe,{text:e.text});case"thinking":return(0,d.jsx)(o,{color:l.dim,children:` thought for ${(e.tookMs/1e3).toFixed(1)}s`});case"tool":return(0,d.jsx)(o,{color:l.dim,children:` ${H({name:e.name,status:e.status==="ok"?"done":e.status,detail:e.detail})}`});case"usage":return(0,d.jsx)(o,{color:l.dim,children:` \xB7 ${e.credits.toFixed(1)} credits \u2014 total ${e.total.toFixed(1)}`});case"turn":{let t=n??null,s=t?t.fresh.map(r=>r.item):e.items,u=t?t.fresh.map(r=>r.num):void 0,c=t?t.fresh.map(r=>r.updated):void 0,a=s.some(r=>!!r.kind);return(0,d.jsxs)(x,{flexDirection:"column",marginLeft:2,children:[a?(0,d.jsx)(De,{turnIndex:e.turnIndex,fresh:t?t.fresh:s.map((r,i)=>({item:r,num:i+1,updated:!1})),headerStats:t?.headerStats??"",unchangedTotal:(t?.unchanged??[]).reduce((r,i)=>r+i.count,0)}):e.heading==="use-cases"?(0,d.jsx)(ve,{turn:e.turnIndex,items:s,expandedRef:null,compact:!0,total:s.length,numbers:u,marks:c}):(0,d.jsx)(Q,{heading:e.heading,turn:e.turnIndex,items:s,expandedRef:null,compact:!0,total:s.length,numbers:u,marks:c}),t&&t.unchanged.length>0&&(0,d.jsx)(o,{color:l.dim,children:` \u22EE unchanged: ${t.unchanged.map(r=>`${r.count} ${r.label}`).join(" \xB7 ")} \u2014 /view to browse`})]})}case"answer":return(0,d.jsx)(o,{color:l.dim,children:ct(e.receipt)});case"commit":return(0,d.jsxs)(x,{flexDirection:"column",children:[(0,d.jsx)(o,{color:e.ok?l.green:l.red,children:`${e.ok?"\u2714":"\u2717"} ${e.line}`}),(e.warnings??[]).map((t,s)=>(0,d.jsx)(o,{color:l.dim,children:` \u26A0 ${t}`},`w-${s}`))]});case"error":return(0,d.jsxs)(fe,{variant:"error",paddingX:1,children:[(0,d.jsx)(o,{color:l.red,children:e.title}),e.detail.map((t,s)=>(0,d.jsx)(o,{color:l.dim,children:t},`d-${s}`))]});case"interrupted":return(0,d.jsxs)(x,{flexDirection:"column",children:[(0,d.jsx)(o,{color:l.red,children:"interrupted \u2014 session not saved"}),e.detail?(0,d.jsx)(o,{color:l.dim,children:e.detail}):null]});case"pause":return(0,d.jsxs)(x,{flexDirection:"column",children:[(0,d.jsx)(o,{children:`paused: session ${e.sid} saved`}),e.expires_at?(0,d.jsx)(o,{color:l.dim,children:`expires: ${e.expires_at}`}):null,(0,d.jsx)(o,{children:`resume: ${e.resume}`}),e.messageForm?(0,d.jsx)(o,{children:`or say something on the way in: ${e.messageForm}`}):null]});case"summary":return(0,d.jsxs)(x,{flexDirection:"column",children:[(0,d.jsx)(o,{bold:!0,children:"session summary"}),e.lines.map((t,s)=>(0,d.jsx)(o,{children:` ${t}`},`s-${s}`))]})}}var W=I(Y(),1);var Oe=I(R(),1),Le=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],te="ctrl+t thinking \xB7 ctrl+c pause";function Ae(e,n){if(e.length<=n)return e;if(n<=1)return"\u2026";let t=Math.ceil((n-1)/2),s=Math.floor((n-1)/2);return`${e.slice(0,t)}\u2026${s>0?e.slice(-s):""}`}function _e({streaming:e,verb:n,subject:t,turn:s,pendingCount:u,lastActivity:c,workingLabel:a,creditsTotal:r}){let{stdout:i}=U(),p=i?.columns??80,[f,g]=(0,W.useState)(0),y=(0,W.useRef)(null);(0,W.useEffect)(()=>{e&&y.current===null&&(y.current=Date.now()),e||(y.current=null)},[e]),pe(()=>g(b=>b+1),e?1e3:null);let C=[];if(e){let b=y.current?Math.floor((Date.now()-y.current)/1e3):0;C.push(`${Le[f%Le.length]} ${b}s ${a??c??"waiting for model"}`)}C.push(n),s&&C.push(`turn ${s}`),r!==void 0&&C.push(`${r.toFixed(1)} cr`);let m=u?`[${u} pending]`:null,w=" \xB7 ",O=[...C,...m?[m]:[]].join(w).length,S,D=[...C,...t?[t]:[],...m?[m]:[],te].join(w);if(D.length<=p)S=D;else{let b=p-O-(t?w.length:0)-w.length-te.length;if(t&&b>=8)S=[...C,Ae(t,b),...m?[m]:[],te].join(w);else{let M=p-O-(t?w.length:0);S=[...C,...t&&M>=4?[Ae(t,M)]:[],...m?[m]:[]].join(w)}}return(0,Oe.jsx)(o,{color:l.dim,children:S})}var V=I(Y(),1);function ne({onToggleThinking:e,onCtrlC:n,explorer:t}){let u=(0,V.useRef)(null),c=(0,V.useRef)(""),a=()=>{u.current&&clearTimeout(u.current),u.current=null,c.current=""};return(0,V.useEffect)(()=>a,[]),me((r,i)=>{if(i.ctrl&&r==="t"){e();return}if(i.ctrl&&r==="c"){n();return}if(!i.ctrl&&r.includes("")){n();return}if(!i.ctrl&&r.includes("")){e();return}if(t&&t.isOpen()){let p=()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{a(),t.onBack()},150)};if(u.current){if(i.upArrow||i.downArrow||i.return){a(),i.return?t.onEnter():t.onMove(i.upArrow?-1:1);return}if(c.current+=r,c.current==="["){p();return}let f=c.current;a();let g=/^\[([AB])/.exec(f);if(g){t.onMove(g[1]==="A"?-1:1);return}t.onBack();return}if(i.upArrow){t.onMove(-1);return}if(i.downArrow){t.onMove(1);return}if(i.return){t.onEnter();return}if(i.escape){c.current="",p();return}if(r.length>=2&&!i.ctrl&&!i.meta){t.onClose();return}return}}),null}var v=I(R(),1),re=(e,n)=>Math.max(0,Math.min(n,e));function X(e,n,t){switch(n.type){case"move":return{...e,cursor:re(e.cursor+n.delta,Math.max(0,t-1))};case"enter":return e.level==="list"?{...e,level:"detail"}:e;case"back":return e.level==="detail"?{...e,level:"list"}:null}}var Pe={"use-case":"use-cases",ac:"acs",scenario:"scenarios",test:"tests",gap:"gaps"};function qe(e,n){if(e.level==="detail")return{level:"detail",cursor:re(e.num-1,Math.max(0,n.entries.length-1))};if(e.section){let t=n.entries.findIndex(s=>Pe[s.kind]===e.section);if(t>=0)return{level:"list",cursor:t}}return{level:"list",cursor:0}}function lt(e){let n=[];for(let t of e.entries){let s=n.find(u=>u.kind===t.kind);s?s.entries.push(t):n.push({kind:t.kind,entries:[t]})}return n}var Me=3;function ut({items:e,cursor:n,verb:t}){let s=`view \xB7 ${t} so far \xB7 ${e.counts.map(c=>`${c.count} ${c.count===1?c.label.replace(/s$/,""):c.label}`).join(" \xB7 ")}`,u=e.entries[n];return(0,v.jsxs)(x,{flexDirection:"column",borderStyle:"round",borderColor:l.dim,paddingX:1,children:[(0,v.jsx)(o,{bold:!0,children:s}),lt(e).map(({kind:c,entries:a})=>{let r=u?.kind===c,i=r?a.findIndex(y=>y.ref===u.ref):-1,p=r?re(i-1,Math.max(0,a.length-Me)):0,f=a.slice(p,p+(r?Me:1)),g=a.length-f.length;return(0,v.jsxs)(x,{flexDirection:"column",children:[(0,v.jsx)(o,{color:l.dim,children:`${Pe[c]??P(c)} \xB7 ${a.length}`}),f.map(y=>{let C=r&&y.ref===u.ref,m=y.item.badge;return(0,v.jsxs)(o,{children:[(0,v.jsx)(o,{color:l.generateAccent,children:C?"\u203A ":" "}),(0,v.jsx)(o,{children:`${y.num} \xB7 ${y.item.title}`}),m?(0,v.jsx)(o,{color:l.dim,children:` \xB7 ${m}`}):null]},`${y.kind}:${y.ref}`)}),g>0&&(0,v.jsx)(o,{color:l.dim,children:` \u22EE ${g} more`})]},c)}),(0,v.jsx)(o,{color:l.dim,children:"\u2191\u2193 move \xB7 \u21B5 detail \xB7 esc back to chat"})]})}function mt({items:e,cursor:n}){let t=e.entries[n];if(!t)return(0,v.jsx)(o,{color:l.dim,children:"nothing to show"});let s=t.item;return(0,v.jsxs)(x,{flexDirection:"column",borderStyle:"round",borderColor:l.dim,paddingX:1,children:[(0,v.jsx)(o,{bold:!0,children:`view \xB7 ${t.kind} ${t.num} of ${e.entries.length}`}),(0,v.jsx)(o,{children:t.item.title}),s.badge?(0,v.jsx)(o,{color:l.dim,children:`kind: ${s.badge}`}):null,s.why?(0,v.jsx)(o,{color:l.dim,children:s.why}):null,(0,v.jsx)(Z,{item:t.item}),(0,v.jsx)(o,{color:l.dim,children:"view-only \u2014 approvals happen in chat"}),(0,v.jsx)(o,{color:l.dim,children:"\u2191\u2193 prev/next \xB7 esc back to list"})]})}function Ne({items:e,state:n,verb:t}){return n.level==="list"?(0,v.jsx)(ut,{items:e,cursor:n.cursor,verb:t}):(0,v.jsx)(mt,{items:e,cursor:n.cursor})}var Ue=[{name:"view",description:"browse the proposal set"},{name:"explain",description:"why a committed item exists"},{name:"pause",description:"save + exit (resumable)"},{name:"done",description:"finish the session"}],dt={"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 We(e){let n=(e??"").trim().toLowerCase();if(!n)return{level:"list"};if(/^\d+$/.test(n)){let s=parseInt(n,10);return s>=1?{level:"detail",num:s}:{error:"items are numbered from 1 \u2014 /view 1"}}let t=dt[n];return t?{level:"list",section:t}:{error:"try /view, /view <number>, or /view acs|scenarios|tests"}}var k=I(R(),1),pt=6,Ke=12;function Fe(e,n,t){let s=Math.max(20,n),u=[];for(let a of e.split(`
2
+ import{a as H,b as $e}from"./chunk-6PS65QFF.js";import{a as xe,b as ye}from"./chunk-MMI3VSCA.js";import{b as de,d as he}from"./chunk-QZWQCHXK.js";import{a as pe}from"./chunk-5Y2G4NC7.js";import{a as fe}from"./chunk-NSSKSXCT.js";import{b as ge}from"./chunk-DFS4RMVP.js";import"./chunk-CB3TEWZJ.js";import{x as l}from"./chunk-HMGNPFXP.js";import{a as R}from"./chunk-HCBYKLMW.js";import{a as x,b as o,i as me,k as U}from"./chunk-C44QQJR4.js";import{a as Y}from"./chunk-6YGTRKDT.js";import{e as I}from"./chunk-UR6MHSHU.js";var L=I(Y(),1);var B=I(R(),1),Te=3,Ze=60;function et(e){let n=e.cursor>=0?e.questions[e.cursor]:void 0;if(n?.risk==="high")return"high-risk \u2014 answer explicitly, or type 'defer' to leave the rest with the agent";let t=e.resolution.findIndex(Boolean);if(t>=0){let a=e.questions[t],r=a.options.find((i,p)=>p!==e.resolution[t].selected_index)?.label??a.options[0]?.label??"\u2026";return`changed your mind? \`${t+1}: ${r}\` re-answers q${t+1}`}let s=n??e.questions[0],u=s.options[0]?.label??"\u2026",c=s.allow_free_text?" \xB7 or your own words":"";return`e.g. \`1\` or \`${u}\`${c} \xB7 Enter takes recommended defaults`}function tt(e){return`[${e}]`}function nt({batch:e,i:n}){let t=e.resolution[n],s=t.form==="deferred"?"\u2013 deferred (the agent keeps it)":`\u2713 ${t.form}: ${t.choice}${t.form==="assumed"?" (flagged)":" (you)"}`;return(0,B.jsx)(o,{color:l.dim,children:` ${s}`})}function rt({batch:e,i:n}){let t=e.questions[n],s=e.cursor===n&&!e.resolution[n],u=s?"\u203A":" ";return(0,B.jsxs)(x,{flexDirection:"column",children:[(0,B.jsx)(o,{bold:s,children:` ${n+1} ${u} ${t.text} ${tt(t.risk)}`}),(0,B.jsx)(o,{color:l.dim,children:` why: ${t.rationale}`}),e.resolution[n]?(0,B.jsx)(nt,{batch:e,i:n}):(0,B.jsxs)(x,{flexDirection:"column",children:[t.multi_select?(0,B.jsx)(o,{color:l.dim,children:" note: multi-select not yet supported \u2014 pick the best single option"}):null,t.options.map((c,a)=>(0,B.jsx)(o,{children:` ${a+1}. ${c.label}${a===t.recommended_index?" \u2605 recommended":""}`},`o-${a}`)),t.allow_free_text?(0,B.jsx)(o,{color:l.dim,children:" (free text allowed \u2014 just type your own words)"}):null]})]})}function we({batch:e}){let{stdout:n}=U(),t=n?.columns??80,s=t<Ze,u=e.resolution.filter(y=>!y).length,c=Math.max(0,Math.min(e.cursor<0?0:e.cursor,e.questions.length-Te)),a=e.questions.slice(c,c+Te),r=c,i=e.questions.length-c-a.length,p=et(e);s&&p.length>t-2&&(p=`${p.slice(0,Math.max(0,t-3))}\u2026`);let f=e.cursor>=0?`answering ${e.cursor+1} of ${e.questions.length}`:"all placed",g=(0,B.jsxs)(x,{flexDirection:"column",children:[(0,B.jsx)(o,{bold:!0,children:`questions \xB7 ${u} pending \xB7 ${f}`}),r>0?(0,B.jsx)(o,{color:l.muted,children:` \u22EE ${r} above`}):null,a.map((y,C)=>(0,B.jsx)(rt,{batch:e,i:c+C},y.id)),i>0?(0,B.jsx)(o,{color:l.muted,children:` \u22EE ${i} more`}):null,(0,B.jsx)(o,{color:l.dim,children:p})]});return s?g:(0,B.jsx)(x,{flexDirection:"column",borderStyle:"round",borderColor:l.dim,paddingX:1,children:g})}var A=I(R(),1),be=60,ot=e=>e.length<=be?e:`${e.slice(0,be-1)}\u2026`;function Z({item:e}){return(0,A.jsxs)(x,{flexDirection:"column",marginLeft:2,children:[(e.cite??[]).map((n,t)=>(0,A.jsx)(o,{dimColor:!0,children:`cite ${n.anchor??"conv"} \u2014 "${n.quote??""}"`},`cite-${t}`)),(e.depends_on_hint??[]).length>0&&(0,A.jsx)(o,{dimColor:!0,children:`depends on: ${(e.depends_on_hint??[]).join(", ")}`}),Object.entries(e.extra??{}).map(([n,t])=>(0,A.jsx)(o,{dimColor:!0,children:`${n}: ${t}`},`extra-${n}`))]})}function Q({heading:e,turn:n,items:t,expandedRef:s,total:u,compact:c,numbers:a,marks:r}){return(0,A.jsxs)(x,{flexDirection:"column",children:[(0,A.jsx)(o,{bold:!0,children:`${e} \xB7 turn ${n} \xB7 ${u??t.length} proposed`}),t.map((i,p)=>{let f=i.matches_existing,g=f?f.cid?f.archived?` \u2248 matches ARCHIVED ${f.cid.slice(0,19)} \u2014 previously rejected${f.reason?`: "${f.reason}"`:""}`:` \u2248 matches ${f.cid.slice(0,19)}`:" \u2248overlap":"",y=r?.[p]?" \xB7 updated":"",C=c?` ${a?.[p]??p+1} \xB7 ${i.title}${i.badge!==void 0?` \xB7 ${i.badge}`:""}${i.why?` \u2014 ${ot(i.why)}`:""}${g}${y}`:` ${i.title}${i.badge!==void 0?` \xB7 ${i.badge}`:""}${i.why!==void 0?` \xB7 ${i.why}`:""}${g}`;return(0,A.jsxs)(x,{flexDirection:"column",children:[(0,A.jsx)(o,{children:C}),s===i.temp_ref&&(0,A.jsx)(Z,{item:i})]},i.temp_ref)})]})}var Ce=I(R(),1),st=e=>e.summary??e.description??"";function it(e){return{temp_ref:e.temp_ref,title:e.title,badge:e.risk,why:st(e),matches_existing:e.matches_existing?e.matches_existing:null,cite:e.cite??[],depends_on_hint:e.depends_on_hint??[]}}function ve({turn:e,items:n,expandedRef:t,total:s,compact:u,numbers:c,marks:a}){return(0,Ce.jsx)(Q,{heading:"use-cases",turn:e,items:n.map(it),expandedRef:t,total:s,compact:u,numbers:c,marks:a})}var at={"use-case":"use-cases",ac:"ACs",scenario:"scenarios",test:"tests",gap:"gaps"},P=e=>at[e]??`${e}s`,ke=e=>e==="ac"?"AC":e==="use-case"?"use-case":e,ee=e=>e.kind??"use-case",Se=e=>`${ee(e)}:${e.temp_ref}`;function Ie(e){let n=e,t=n.badge??e.risk??null,s=n.why??e.summary??e.description??null;return JSON.stringify([e.title,t,s,n.extra??null,e.depends_on_hint??null])}function Be(e){return e.filter(n=>n.role==="agent"&&typeof n.turnIndex=="number"&&Array.isArray(n.items)&&n.items.length>0)}function F(e){let n=new Map,t=1;for(let c of Be(e)){let a=new Set;for(let r of c.items){let i=Se(r);if(a.has(i))continue;a.add(i);let p=n.get(i);n.set(i,{num:p?.num??t++,ref:r.temp_ref,kind:ee(r),item:r,turnIndex:c.turnIndex,fingerprint:Ie(r)})}}let s=[...n.values()].sort((c,a)=>c.num-a.num),u=[];for(let c of s){let a=u.find(r=>r.kind===c.kind);a?a.count++:u.push({kind:c.kind,label:P(c.kind),count:1})}return{entries:s,byRef:n,counts:u}}function Re(e,n){let s=Be(e).find(m=>m.turnIndex===n);if(!s)return null;let u=e.filter(m=>m.role!=="agent"||typeof m.turnIndex!="number"||m.turnIndex<=n),c=F(u),a=F(e.filter(m=>m.role!=="agent"||typeof m.turnIndex!="number"||m.turnIndex<n)),r=[],i=new Map,p=new Map,f=new Map,g=new Set;for(let m of s.items){let w=Se(m);if(g.has(w))continue;g.add(w);let q=a.byRef.get(w),O=m.changed===!0,S=c.byRef.get(w).num,D=ee(m);if(q&&!O&&q.fingerprint===Ie(m)){i.set(D,(i.get(D)??0)+1);continue}let b=!!q||O,M=b?f:p;M.set(D,(M.get(D)??0)+1),r.push({item:m,num:S,updated:b})}let y=[...i.entries()].map(([m,w])=>({label:P(m),count:w})),C=[...[...p.entries()].map(([m,w])=>`${w} new ${w===1?ke(m):P(m)}`),...[...f.entries()].map(([m,w])=>`${w} updated ${w===1?ke(m):P(m)}`)].join(" \xB7 ");return{fresh:r,unchanged:y,headerStats:C}}var E=I(R(),1);function De({turnIndex:e,fresh:n,headerStats:t,unchangedTotal:s}){let u=[];for(let a of n){let r=a.item.kind??"use-case",i=u.find(p=>p.kind===r);i?i.rows.push(a):u.push({kind:r,rows:[a]})}let c=`design \xB7 turn ${e} \u2014 ${t||"no new items"}${s>0?` (${s} unchanged)`:""}`;return(0,E.jsxs)(x,{flexDirection:"column",children:[(0,E.jsx)(o,{bold:!0,children:c}),u.map(({kind:a,rows:r})=>{let i=r.filter(g=>!g.updated).length,p=r.length-i,f=[...i>0?[`${i} new`]:[],...p>0?[`${p} updated`]:[]].join(" \xB7 ");return(0,E.jsxs)(x,{flexDirection:"column",children:[(0,E.jsx)(o,{color:l.dim,children:`${P(a).toLowerCase()} \xB7 ${f}`}),r.map(({item:g,num:y,updated:C})=>{let m=g;return(0,E.jsxs)(x,{flexDirection:"column",children:[(0,E.jsxs)(o,{children:[(0,E.jsx)(o,{children:` ${y} \xB7 ${g.title}`}),m.badge?(0,E.jsx)(o,{color:l.dim,children:` \xB7 ${m.badge}`}):null,C?(0,E.jsx)(o,{color:l.dim,children:" \xB7 updated"}):null]}),m.why?(0,E.jsx)(o,{color:l.dim,children:` ${m.why}`}):null]},`${a}:${g.temp_ref}`)})]},a)})]})}var d=I(R(),1);function ct(e){let n=e.form==="assumed"?" (flagged)":e.form==="deferred"?"":" (you)",t=e.note?` \u2014 ${e.note}`:"";return e.form==="deferred"?`\u21B3 deferred q${e.qNum} ${e.stub}${t}`:e.form==="changed"?`\u21B3 changed q${e.qNum} ${e.stub}: ${e.prev??"?"} \u2192 ${e.choice??"?"}${n}${t}`:`\u21B3 ${e.form} q${e.qNum} ${e.stub}: ${e.choice??"?"}${n}${t}`}function Ee({block:e,annotations:n}){switch(e.kind){case"banner":return(0,d.jsx)(o,{color:l.dim,children:`\u2500\u2500 ${e.text} \u2500\u2500`});case"user":return(0,d.jsxs)(x,{children:[(0,d.jsx)(o,{color:l.orange,children:"\u276F "}),(0,d.jsx)(o,{children:e.text})]});case"note":return(0,d.jsx)(o,{color:l.dim,children:e.text});case"agent":return(0,d.jsx)(xe,{text:e.text});case"thinking":return(0,d.jsx)(o,{color:l.dim,children:` thought for ${(e.tookMs/1e3).toFixed(1)}s`});case"tool":return(0,d.jsx)(o,{color:l.dim,children:` ${H({name:e.name,status:e.status==="ok"?"done":e.status,detail:e.detail})}`});case"usage":return(0,d.jsx)(o,{color:l.dim,children:` \xB7 ${e.credits.toFixed(1)} credits \u2014 total ${e.total.toFixed(1)}`});case"turn":{let t=n??null,s=t?t.fresh.map(r=>r.item):e.items,u=t?t.fresh.map(r=>r.num):void 0,c=t?t.fresh.map(r=>r.updated):void 0,a=s.some(r=>!!r.kind);return(0,d.jsxs)(x,{flexDirection:"column",marginLeft:2,children:[a?(0,d.jsx)(De,{turnIndex:e.turnIndex,fresh:t?t.fresh:s.map((r,i)=>({item:r,num:i+1,updated:!1})),headerStats:t?.headerStats??"",unchangedTotal:(t?.unchanged??[]).reduce((r,i)=>r+i.count,0)}):e.heading==="use-cases"?(0,d.jsx)(ve,{turn:e.turnIndex,items:s,expandedRef:null,compact:!0,total:s.length,numbers:u,marks:c}):(0,d.jsx)(Q,{heading:e.heading,turn:e.turnIndex,items:s,expandedRef:null,compact:!0,total:s.length,numbers:u,marks:c}),t&&t.unchanged.length>0&&(0,d.jsx)(o,{color:l.dim,children:` \u22EE unchanged: ${t.unchanged.map(r=>`${r.count} ${r.label}`).join(" \xB7 ")} \u2014 /view to browse`})]})}case"answer":return(0,d.jsx)(o,{color:l.dim,children:ct(e.receipt)});case"commit":return(0,d.jsxs)(x,{flexDirection:"column",children:[(0,d.jsx)(o,{color:e.ok?l.green:l.red,children:`${e.ok?"\u2714":"\u2717"} ${e.line}`}),(e.warnings??[]).map((t,s)=>(0,d.jsx)(o,{color:l.dim,children:` \u26A0 ${t}`},`w-${s}`))]});case"error":return(0,d.jsxs)(fe,{variant:"error",paddingX:1,children:[(0,d.jsx)(o,{color:l.red,children:e.title}),e.detail.map((t,s)=>(0,d.jsx)(o,{color:l.dim,children:t},`d-${s}`))]});case"interrupted":return(0,d.jsxs)(x,{flexDirection:"column",children:[(0,d.jsx)(o,{color:l.red,children:"interrupted \u2014 session not saved"}),e.detail?(0,d.jsx)(o,{color:l.dim,children:e.detail}):null]});case"pause":return(0,d.jsxs)(x,{flexDirection:"column",children:[(0,d.jsx)(o,{children:`paused: session ${e.sid} saved`}),e.expires_at?(0,d.jsx)(o,{color:l.dim,children:`expires: ${e.expires_at}`}):null,(0,d.jsx)(o,{children:`resume: ${e.resume}`}),e.messageForm?(0,d.jsx)(o,{children:`or say something on the way in: ${e.messageForm}`}):null]});case"summary":return(0,d.jsxs)(x,{flexDirection:"column",children:[(0,d.jsx)(o,{bold:!0,children:"session summary"}),e.lines.map((t,s)=>(0,d.jsx)(o,{children:` ${t}`},`s-${s}`))]})}}var W=I(Y(),1);var Oe=I(R(),1),Le=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],te="ctrl+t thinking \xB7 ctrl+c pause";function Ae(e,n){if(e.length<=n)return e;if(n<=1)return"\u2026";let t=Math.ceil((n-1)/2),s=Math.floor((n-1)/2);return`${e.slice(0,t)}\u2026${s>0?e.slice(-s):""}`}function _e({streaming:e,verb:n,subject:t,turn:s,pendingCount:u,lastActivity:c,workingLabel:a,creditsTotal:r}){let{stdout:i}=U(),p=i?.columns??80,[f,g]=(0,W.useState)(0),y=(0,W.useRef)(null);(0,W.useEffect)(()=>{e&&y.current===null&&(y.current=Date.now()),e||(y.current=null)},[e]),pe(()=>g(b=>b+1),e?1e3:null);let C=[];if(e){let b=y.current?Math.floor((Date.now()-y.current)/1e3):0;C.push(`${Le[f%Le.length]} ${b}s ${a??c??"waiting for model"}`)}C.push(n),s&&C.push(`turn ${s}`),r!==void 0&&C.push(`${r.toFixed(1)} cr`);let m=u?`[${u} pending]`:null,w=" \xB7 ",O=[...C,...m?[m]:[]].join(w).length,S,D=[...C,...t?[t]:[],...m?[m]:[],te].join(w);if(D.length<=p)S=D;else{let b=p-O-(t?w.length:0)-w.length-te.length;if(t&&b>=8)S=[...C,Ae(t,b),...m?[m]:[],te].join(w);else{let M=p-O-(t?w.length:0);S=[...C,...t&&M>=4?[Ae(t,M)]:[],...m?[m]:[]].join(w)}}return(0,Oe.jsx)(o,{color:l.dim,children:S})}var V=I(Y(),1);function ne({onToggleThinking:e,onCtrlC:n,explorer:t}){let u=(0,V.useRef)(null),c=(0,V.useRef)(""),a=()=>{u.current&&clearTimeout(u.current),u.current=null,c.current=""};return(0,V.useEffect)(()=>a,[]),me((r,i)=>{if(i.ctrl&&r==="t"){e();return}if(i.ctrl&&r==="c"){n();return}if(!i.ctrl&&r.includes("")){n();return}if(!i.ctrl&&r.includes("")){e();return}if(t&&t.isOpen()){let p=()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{a(),t.onBack()},150)};if(u.current){if(i.upArrow||i.downArrow||i.return){a(),i.return?t.onEnter():t.onMove(i.upArrow?-1:1);return}if(c.current+=r,c.current==="["){p();return}let f=c.current;a();let g=/^\[([AB])/.exec(f);if(g){t.onMove(g[1]==="A"?-1:1);return}t.onBack();return}if(i.upArrow){t.onMove(-1);return}if(i.downArrow){t.onMove(1);return}if(i.return){t.onEnter();return}if(i.escape){c.current="",p();return}if(r.length>=2&&!i.ctrl&&!i.meta){t.onClose();return}return}}),null}var v=I(R(),1),re=(e,n)=>Math.max(0,Math.min(n,e));function X(e,n,t){switch(n.type){case"move":return{...e,cursor:re(e.cursor+n.delta,Math.max(0,t-1))};case"enter":return e.level==="list"?{...e,level:"detail"}:e;case"back":return e.level==="detail"?{...e,level:"list"}:null}}var Pe={"use-case":"use-cases",ac:"acs",scenario:"scenarios",test:"tests",gap:"gaps"};function qe(e,n){if(e.level==="detail")return{level:"detail",cursor:re(e.num-1,Math.max(0,n.entries.length-1))};if(e.section){let t=n.entries.findIndex(s=>Pe[s.kind]===e.section);if(t>=0)return{level:"list",cursor:t}}return{level:"list",cursor:0}}function lt(e){let n=[];for(let t of e.entries){let s=n.find(u=>u.kind===t.kind);s?s.entries.push(t):n.push({kind:t.kind,entries:[t]})}return n}var Me=3;function ut({items:e,cursor:n,verb:t}){let s=`view \xB7 ${t} so far \xB7 ${e.counts.map(c=>`${c.count} ${c.count===1?c.label.replace(/s$/,""):c.label}`).join(" \xB7 ")}`,u=e.entries[n];return(0,v.jsxs)(x,{flexDirection:"column",borderStyle:"round",borderColor:l.dim,paddingX:1,children:[(0,v.jsx)(o,{bold:!0,children:s}),lt(e).map(({kind:c,entries:a})=>{let r=u?.kind===c,i=r?a.findIndex(y=>y.ref===u.ref):-1,p=r?re(i-1,Math.max(0,a.length-Me)):0,f=a.slice(p,p+(r?Me:1)),g=a.length-f.length;return(0,v.jsxs)(x,{flexDirection:"column",children:[(0,v.jsx)(o,{color:l.dim,children:`${Pe[c]??P(c)} \xB7 ${a.length}`}),f.map(y=>{let C=r&&y.ref===u.ref,m=y.item.badge;return(0,v.jsxs)(o,{children:[(0,v.jsx)(o,{color:l.generateAccent,children:C?"\u203A ":" "}),(0,v.jsx)(o,{children:`${y.num} \xB7 ${y.item.title}`}),m?(0,v.jsx)(o,{color:l.dim,children:` \xB7 ${m}`}):null]},`${y.kind}:${y.ref}`)}),g>0&&(0,v.jsx)(o,{color:l.dim,children:` \u22EE ${g} more`})]},c)}),(0,v.jsx)(o,{color:l.dim,children:"\u2191\u2193 move \xB7 \u21B5 detail \xB7 esc back to chat"})]})}function mt({items:e,cursor:n}){let t=e.entries[n];if(!t)return(0,v.jsx)(o,{color:l.dim,children:"nothing to show"});let s=t.item;return(0,v.jsxs)(x,{flexDirection:"column",borderStyle:"round",borderColor:l.dim,paddingX:1,children:[(0,v.jsx)(o,{bold:!0,children:`view \xB7 ${t.kind} ${t.num} of ${e.entries.length}`}),(0,v.jsx)(o,{children:t.item.title}),s.badge?(0,v.jsx)(o,{color:l.dim,children:`kind: ${s.badge}`}):null,s.why?(0,v.jsx)(o,{color:l.dim,children:s.why}):null,(0,v.jsx)(Z,{item:t.item}),(0,v.jsx)(o,{color:l.dim,children:"view-only \u2014 approvals happen in chat"}),(0,v.jsx)(o,{color:l.dim,children:"\u2191\u2193 prev/next \xB7 esc back to list"})]})}function Ne({items:e,state:n,verb:t}){return n.level==="list"?(0,v.jsx)(ut,{items:e,cursor:n.cursor,verb:t}):(0,v.jsx)(mt,{items:e,cursor:n.cursor})}var Ue=[{name:"view",description:"browse the proposal set"},{name:"explain",description:"why a committed item exists"},{name:"pause",description:"save + exit (resumable)"},{name:"done",description:"finish the session"}],dt={"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 We(e){let n=(e??"").trim().toLowerCase();if(!n)return{level:"list"};if(/^\d+$/.test(n)){let s=parseInt(n,10);return s>=1?{level:"detail",num:s}:{error:"items are numbered from 1 \u2014 /view 1"}}let t=dt[n];return t?{level:"list",section:t}:{error:"try /view, /view <number>, or /view acs|scenarios|tests"}}var k=I(R(),1),pt=6,Ke=12;function Fe(e,n,t){let s=Math.max(20,n),u=[];for(let a of e.split(`
3
3
  `)){if(a.length<=s){u.push(a);continue}let r="";for(let i of a.split(" "))r&&r.length+1+i.length>s?(u.push(r),r=i):r=r?`${r} ${i}`:i;u.push(r)}let c=Math.max(0,u.length-t);return{body:u.slice(-t).join(`
4
4
  `),hidden:c}}var ft='chat with the agent \u2014 "/" for commands';function un({controller:e,verb:n="extract",onCtrlC:t}){let[,s]=(0,L.useState)(0),[u,c]=(0,L.useState)(!1),[a,r]=(0,L.useState)(null),[i,p]=(0,L.useState)(null),f=(0,L.useRef)(null),g=$=>{f.current=$,p($)},y=ge(),{stdout:C}=U(),m=C?.columns??80,w=(0,L.useRef)(0),q=(0,L.useRef)(0),O=(0,L.useRef)(null);O.current||(O.current=new de(null)),(0,L.useEffect)(()=>{let $=()=>{let h=e.state.ledger;for(let _=w.current;_<h.length;_++){let N=h[_],Ye=N.kind==="turn"?Re(e.state.turns,N.turnIndex):void 0;y.append((0,k.jsx)(Ee,{block:N,annotations:Ye},`lg-${_}`))}w.current=h.length};$();let T=e.subscribe(()=>{$();let h=e.state;f.current&&(h.pending||h.status==="pausing")&&(g(null),h.pending&&r("questions arrived \u2014 back to chat")),s(_=>_+1)});return s(h=>h+1),T},[e,y]);let{thinking:S,status:D,pending:b,confirm:M,ledger:oe,activeTurn:se,stream:z,notice:j}=e.state,G=S.activity[S.activity.length-1],ie=G&&G.status==="started"?G:null,ae=z!=null&&z.text.length>0,Ve=ae?`\u2237 thinking \xB7 ${S.thinkingLog.length} block${S.thinkingLog.length===1?"":"s"} \xB7 ctrl+t to inspect`:S.liveThinking.length>0?`\u273B ${Fe(S.liveThinking,m-4,1).body}`:D==="streaming"?"\u2237 thinking\u2026 (ctrl+t to show)":"\u2237 thinking complete (ctrl+t to view)",je=S.liveThinking.length>0||u&&S.thinkingLog.length>0,He=Fe(S.liveThinking||S.thinkingLog.map($=>$.text).join(`
5
5
  `),m-6,Ke),ce=ae?z.text.split(`
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-WFAMF4SG.js";import"./chunk-N2BUF6YU.js";import"./chunk-MKD3KZPM.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-ROPXE7TF.js";import"./chunk-CB3TEWZJ.js";import"./chunk-HMGNPFXP.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-ZO7ROBPR.js";import"./chunk-N2BUF6YU.js";import"./chunk-MKD3KZPM.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-ZA67EBYF.js";import"./chunk-CB3TEWZJ.js";import"./chunk-HMGNPFXP.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-H7ZQ4AWL.js";import"./chunk-5Q46BEG7.js";import"./chunk-5Y2G4NC7.js";import"./chunk-MKD3KZPM.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-YJ6AQ2KP.js";import"./chunk-FS4YJM22.js";import"./chunk-5Y2G4NC7.js";import"./chunk-HMGNPFXP.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-C5NNT7Y3.js";import{x as o}from"./chunk-MKD3KZPM.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-NSSKSXCT.js";import{x as o}from"./chunk-HMGNPFXP.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};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-ME3GYVBV.js";import"./chunk-RFHMDQXZ.js";import"./chunk-ABSEKYIB.js";import"./chunk-FYOCF7DY.js";import"./chunk-RGEAEAZB.js";import"./chunk-BC7UVJJB.js";import"./chunk-NFOBDHZK.js";import"./chunk-KHDUQ33H.js";import"./chunk-L5LI2JF4.js";import"./chunk-D5T4ARTB.js";import"./chunk-AE6SS34N.js";import"./chunk-GIRXJOJI.js";import"./chunk-B2PZAB7J.js";import"./chunk-IACKIGPX.js";import"./chunk-M5JQXOCE.js";import"./chunk-INP7FG6V.js";import"./chunk-MKD3KZPM.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as EvidenceViewOffer};
2
+ import{a}from"./chunk-WRHZCHZY.js";import"./chunk-RFHMDQXZ.js";import"./chunk-WGG5XURS.js";import"./chunk-FYOCF7DY.js";import"./chunk-RGEAEAZB.js";import"./chunk-BC7UVJJB.js";import"./chunk-NFOBDHZK.js";import"./chunk-KHDUQ33H.js";import"./chunk-L5LI2JF4.js";import"./chunk-D5T4ARTB.js";import"./chunk-AE6SS34N.js";import"./chunk-GIRXJOJI.js";import"./chunk-B2PZAB7J.js";import"./chunk-IACKIGPX.js";import"./chunk-M5JQXOCE.js";import"./chunk-KGP7NSXH.js";import"./chunk-HMGNPFXP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as EvidenceViewOffer};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-SQJWMOJQ.js";import"./chunk-YCCUBQY4.js";import"./chunk-37CI4EJX.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-KGP7NSXH.js";import"./chunk-RZ4F3BHX.js";import"./chunk-CB3TEWZJ.js";import"./chunk-HMGNPFXP.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,x as t}from"./chunk-MKD3KZPM.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,x as t}from"./chunk-HMGNPFXP.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-QK6KZMYG.js";import"./chunk-C5NNT7Y3.js";import"./chunk-MKD3KZPM.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-SB6MBQKR.js";import"./chunk-NSSKSXCT.js";import"./chunk-HMGNPFXP.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-CBIW5DTU.js";import"./chunk-MKD3KZPM.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-MZ2PXBKK.js";import"./chunk-HMGNPFXP.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-NOOHQBUD.js";import"./chunk-N2BUF6YU.js";import"./chunk-MKD3KZPM.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-FAIH2K2U.js";import"./chunk-CB3TEWZJ.js";import"./chunk-HMGNPFXP.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-25YSMNUP.js";import"./chunk-YCCUBQY4.js";import"./chunk-YWWKKKXY.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-INP7FG6V.js";import"./chunk-RZ4F3BHX.js";import"./chunk-N2BUF6YU.js";import"./chunk-MKD3KZPM.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-KFAYCOTB.js";import"./chunk-YCCUBQY4.js";import"./chunk-37CI4EJX.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-KGP7NSXH.js";import"./chunk-RZ4F3BHX.js";import"./chunk-CB3TEWZJ.js";import"./chunk-HMGNPFXP.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-MQ7DJ2XC.js";import"./chunk-S3DAAAE5.js";import"./chunk-QK6KZMYG.js";import"./chunk-C5NNT7Y3.js";import"./chunk-MKD3KZPM.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-AAWRKFE4.js";import"./chunk-S3DAAAE5.js";import"./chunk-SB6MBQKR.js";import"./chunk-NSSKSXCT.js";import"./chunk-HMGNPFXP.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-Q4P2L7DY.js";import"./chunk-S74MQRDN.js";import"./chunk-QZWQCHXK.js";import"./chunk-2PDWMY2B.js";import"./chunk-HGL3RM7P.js";import"./chunk-FPFOW6BS.js";import"./chunk-WAOCHXJ5.js";import"./chunk-L5LI2JF4.js";import"./chunk-KFAYCOTB.js";import"./chunk-SQJWMOJQ.js";import"./chunk-YCCUBQY4.js";import"./chunk-37CI4EJX.js";import"./chunk-M5JQXOCE.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-VE3SUJMA.js";import"./chunk-RH2OAIJI.js";import"./chunk-KGP7NSXH.js";import"./chunk-RZ4F3BHX.js";import"./chunk-4CRKK5WV.js";import"./chunk-CB3TEWZJ.js";import"./chunk-HMGNPFXP.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-LBBPMEO2.js";import"./chunk-QK6KZMYG.js";import"./chunk-C5NNT7Y3.js";import"./chunk-MKD3KZPM.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-5UXL6RNG.js";import"./chunk-SB6MBQKR.js";import"./chunk-NSSKSXCT.js";import"./chunk-HMGNPFXP.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-J5BUMF3G.js";import"./chunk-O4O4KL6Z.js";import"./chunk-XDW2RGIL.js";import"./chunk-HGL3RM7P.js";import"./chunk-FS4YJM22.js";import"./chunk-5Y2G4NC7.js";import"./chunk-M5JQXOCE.js";import"./chunk-KGP7NSXH.js";import"./chunk-SB6MBQKR.js";import"./chunk-NSSKSXCT.js";import"./chunk-DFS4RMVP.js";import"./chunk-HMGNPFXP.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-C5NNT7Y3.js";import{x as o}from"./chunk-MKD3KZPM.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-NSSKSXCT.js";import{x as o}from"./chunk-HMGNPFXP.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-LKXVYWKG.js";import"./chunk-KHU7C6EE.js";import"./chunk-NNZV5RCE.js";import"./chunk-NWZTYAJB.js";import"./chunk-I2S6KNZW.js";import"./chunk-DM2GL24Z.js";import"./chunk-JFAFKHDX.js";import"./chunk-5ILXUQIX.js";import"./chunk-QPZRHAYK.js";import"./chunk-VJUIW2ES.js";import"./chunk-FXPPQL4D.js";import"./chunk-5446YVGQ.js";import"./chunk-Z56AWGVY.js";import"./chunk-427OQS2N.js";import"./chunk-6PS65QFF.js";import"./chunk-RGEAEAZB.js";import{a as u}from"./chunk-BC7UVJJB.js";import"./chunk-KHDUQ33H.js";import"./chunk-L5LI2JF4.js";import"./chunk-D5T4ARTB.js";import"./chunk-AE6SS34N.js";import"./chunk-GIRXJOJI.js";import"./chunk-B2PZAB7J.js";import"./chunk-IACKIGPX.js";import"./chunk-MKD3KZPM.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-WAGJLR5X.js";import"./chunk-KHU7C6EE.js";import"./chunk-NNZV5RCE.js";import"./chunk-7DBQEOFL.js";import"./chunk-I2S6KNZW.js";import"./chunk-DM2GL24Z.js";import"./chunk-JFAFKHDX.js";import"./chunk-5ILXUQIX.js";import"./chunk-QPZRHAYK.js";import"./chunk-VJUIW2ES.js";import"./chunk-FXPPQL4D.js";import"./chunk-5446YVGQ.js";import"./chunk-Z56AWGVY.js";import"./chunk-427OQS2N.js";import"./chunk-6PS65QFF.js";import"./chunk-RGEAEAZB.js";import{a as u}from"./chunk-BC7UVJJB.js";import"./chunk-KHDUQ33H.js";import"./chunk-L5LI2JF4.js";import"./chunk-D5T4ARTB.js";import"./chunk-AE6SS34N.js";import"./chunk-GIRXJOJI.js";import"./chunk-B2PZAB7J.js";import"./chunk-IACKIGPX.js";import"./chunk-HMGNPFXP.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-GXHKDPHB.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-GXHKDPHB.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-P6AGLUMM.js");return await o(a)}let{resolveAgentAuthEnv:s}=await import("./spawner-DDD3ICOX.js"),{runAgent:t}=await import("./bridge-QENVIWWC.js"),{preflightTurn:i}=await import("./turn-preflight-I5SM4UIZ.js"),{makeInterruptGuard:h}=await import("./interrupt-guard-UREUWNRL.js"),{baseUrlAdvisory:w}=await import("./turn-preflight-I5SM4UIZ.js"),{makeHeadlessIO:T,resolveEncoding:v,guardedChannels:x}=await import("./headless-io-GXHKDPHB.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-SJLDJULN.js");return await o(a)}let{resolveAgentAuthEnv:s}=await import("./spawner-UDCF35OA.js"),{runAgent:t}=await import("./bridge-VY2Q3HQU.js"),{preflightTurn:i}=await import("./turn-preflight-I5SM4UIZ.js"),{makeInterruptGuard:h}=await import("./interrupt-guard-UREUWNRL.js"),{baseUrlAdvisory:w}=await import("./turn-preflight-I5SM4UIZ.js"),{makeHeadlessIO:T,resolveEncoding:v,guardedChannels:x}=await import("./headless-io-GXHKDPHB.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-IF2R3AR4.js";import"./chunk-WUMNIGPR.js";import"./chunk-UR6MHSHU.js";export{a as runAgent};
2
+ import{a}from"./chunk-N2ZW5635.js";import"./chunk-MJFYMMX2.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,f as c}from"./chunk-MKD3KZPM.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,f as c}from"./chunk-HMGNPFXP.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};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as m}from"./chunk-L5LI2JF4.js";import{c as p}from"./chunk-MKD3KZPM.js";import{randomUUID as E}from"crypto";import{mkdirSync as F,writeFileSync as f,appendFileSync as O,existsSync as v}from"fs";import{join as u}from"path";import{writeFileSync as w,mkdirSync as x,existsSync as I}from"fs";import{join as h,relative as j}from"path";function _(n){let t=Object.keys(n.frontmatter).length>0?m(n.frontmatter).trimEnd():"",s=["---"];return t&&s.push(t),s.push("---",""),s.push(`# ${n.heading}`,""),n.steps.forEach((i,r)=>{s.push(`## Step ${r+1}`,i,"")}),s.join(`
2
+ import{b as m}from"./chunk-L5LI2JF4.js";import{c as p}from"./chunk-HMGNPFXP.js";import{randomUUID as E}from"crypto";import{mkdirSync as F,writeFileSync as f,appendFileSync as O,existsSync as v}from"fs";import{join as u}from"path";import{writeFileSync as w,mkdirSync as x,existsSync as I}from"fs";import{join as h,relative as j}from"path";function _(n){let t=Object.keys(n.frontmatter).length>0?m(n.frontmatter).trimEnd():"",s=["---"];return t&&s.push(t),s.push("---",""),s.push(`# ${n.heading}`,""),n.steps.forEach((i,r)=>{s.push(`## Step ${r+1}`,i,"")}),s.join(`
3
3
  `)}function C(n,e){let t={},s={},i=e;for(let[r,l]of Object.entries(n)){if(r.startsWith("global.")||r.startsWith("secrets.user.")||r.startsWith("environment.")){let o=r.startsWith("secrets.user.");t[r]={value:l.value,secret:o,syntax:`{{${r}}}`,type:o?"secret":r.startsWith("environment.")?"environment":"global"},s[r]=r;continue}if(l.secret){let o=`secrets.user.${r}`;t[o]={value:l.value,secret:!0,syntax:`{{secrets.user.${r}}}`,type:"secret"},s[r]=o,i=i.replaceAll(`{{${r}}}`,`{{secrets.user.${r}}}`)}else{let o=`global.${r}`;t[o]={value:l.value,secret:!1,syntax:`{{global.${r}}}`,type:"global"},s[r]=o,i=i.replaceAll(`{{${r}}}`,`{{global.${r}}}`)}}return{variables:t,objective:i,keyMap:s}}var y=/\{\{\s*(?:global|secrets\.user|environment)\.([^{}]+?)\s*\}\}/g;function c(n){return typeof n!="string"||!n.includes("{{")?n:n.replace(y,"{{$1}}")}function d(n){if(typeof n=="string")return c(n);if(Array.isArray(n))return n.map(e=>d(e));if(n&&typeof n=="object"){let e={};for(let[t,s]of Object.entries(n))e[t]=d(s);return e}return n}var L=new Set(["username","access_key","oauth","profile","project_id","folder_id"]),N=new Set(["model","env"]),g=class{constructor(e){this.opts=e}objectives=[];flushed=!1;lastWrittenPath=null;lastCollisionSuffixed=!1;appendObjective(e){this.objectives.push(e)}flush(){if(this.flushed||(this.flushed=!0,this.objectives.length===0))return;let e=this.opts.getName();if(!e)return;let t=h(this.opts.cwd,".testmuai","tests");try{x(t,{recursive:!0})}catch(a){process.stderr.write(`
4
4
  \u26A0 Failed to create ${j(this.opts.cwd,t)}/
5
5
  ${a.message}
@@ -1,3 +1,3 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
2
  function l(r){let{isAgent:c,log:m}=r,a=r.stdout??process.stderr,s=r.stdin??process.stdin,p=t=>{c&&process.stdout.write(JSON.stringify(t)+`
3
- `)};return{async runSteps(t){let{default:e}=await import("./react-QWOAB3TB.js"),{render:o}=await import("./build-JIKYOZUH.js"),{TestMdRunView:i}=await import("./TestMdRunView-5FVCEQZI.js"),{ScrollbackProvider:n}=await import("./scrollback-JLPJR25X.js"),{waitUntilExit:d}=o(e.createElement(n,null,e.createElement(i,t)),{stdout:a,stdin:s,exitOnCtrlC:!1});await d()},async runUpload(t,e){let{renderUploadProgress:o}=await import("./CliUploadProgress-YQYPZNEV.js");return await o(t,e)},async onSummary(t){try{let{default:e}=await import("./react-QWOAB3TB.js"),{render:o}=await import("./build-JIKYOZUH.js"),{AutoExitSummaryBox:i}=await import("./SummaryBox-NRPQ2AMW.js"),{waitUntilExit:n}=o(e.createElement(i,{data:t}),{stdout:a,stdin:s});await n()}catch(e){m("warn","TEST_MD_SUMMARY_RENDER_FAILED","Summary box render failed",{error:String(e)})}},async onLinks(t){try{let{default:e}=await import("./react-QWOAB3TB.js"),{render:o}=await import("./build-JIKYOZUH.js"),{LinksBox:i}=await import("./LinksBox-63Q5YS5X.js"),{waitUntilExit:n}=o(e.createElement(i,t),{stdout:a,stdin:s});await n()}catch(e){m("warn","TEST_MD_LINKS_RENDER_FAILED","LinksBox render failed",{error:String(e)})}},onLockState(t){p({type:"test_md_lock_state",...t})},onRetryAttempt(t){p({type:"test_md_retry_attempt",...t})},onAgentEvent(t){p(t)}}}export{l as a};
3
+ `)};return{async runSteps(t){let{default:e}=await import("./react-QWOAB3TB.js"),{render:o}=await import("./build-JIKYOZUH.js"),{TestMdRunView:i}=await import("./TestMdRunView-U5YTNLY6.js"),{ScrollbackProvider:n}=await import("./scrollback-JLPJR25X.js"),{waitUntilExit:d}=o(e.createElement(n,null,e.createElement(i,t)),{stdout:a,stdin:s,exitOnCtrlC:!1});await d()},async runUpload(t,e){let{renderUploadProgress:o}=await import("./CliUploadProgress-OAPMO5I3.js");return await o(t,e)},async onSummary(t){try{let{default:e}=await import("./react-QWOAB3TB.js"),{render:o}=await import("./build-JIKYOZUH.js"),{AutoExitSummaryBox:i}=await import("./SummaryBox-ROV7TNK4.js"),{waitUntilExit:n}=o(e.createElement(i,{data:t}),{stdout:a,stdin:s});await n()}catch(e){m("warn","TEST_MD_SUMMARY_RENDER_FAILED","Summary box render failed",{error:String(e)})}},async onLinks(t){try{let{default:e}=await import("./react-QWOAB3TB.js"),{render:o}=await import("./build-JIKYOZUH.js"),{LinksBox:i}=await import("./LinksBox-44WCVBT4.js"),{waitUntilExit:n}=o(e.createElement(i,t),{stdout:a,stdin:s});await n()}catch(e){m("warn","TEST_MD_LINKS_RENDER_FAILED","LinksBox render failed",{error:String(e)})}},onLockState(t){p({type:"test_md_lock_state",...t})},onRetryAttempt(t){p({type:"test_md_retry_attempt",...t})},onAgentEvent(t){p(t)}}}export{l as a};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as R}from"./chunk-N2BUF6YU.js";import{x as r}from"./chunk-MKD3KZPM.js";import{a as Y}from"./chunk-HCBYKLMW.js";import{a,b as i,i as X}from"./chunk-C44QQJR4.js";import{a as G}from"./chunk-6YGTRKDT.js";import{e as P}from"./chunk-UR6MHSHU.js";var u=P(G(),1);var e=P(Y(),1),f=5;function K(t,I){if(!I)return t;let c=I.toLowerCase();return t.filter(B=>B.label.toLowerCase().includes(c))}function J(t){let{title:I,items:c,loading:B=!1,loadingText:F,error:L=null,itemNoun:T="items",onSelect:H,onCancel:E,defaultActiveId:w,onTab:y,extraHint:N}=t,[x,d]=(0,u.useState)(0),[S,g]=(0,u.useState)(0),[s,A]=(0,u.useState)(""),[C,h]=(0,u.useState)(null);(0,u.useEffect)(()=>{if(c.length===0)return;if(t.preserveSelectionById&&C!==null){let n=c.findIndex(o=>o.id===C);if(n>=0){g(Math.floor(n/f)),d(n%f);return}}let l=w?c.findIndex(n=>n.id===w):c.findIndex(n=>n.isActive);l>=0?(g(Math.floor(l/f)),d(l%f),t.preserveSelectionById&&h(c[l].id)):t.preserveSelectionById&&(g(0),d(0),h(c[0]?.id??null))},[c,w,t.preserveSelectionById,C]),(0,u.useEffect)(()=>{if(!t.onSearch)return;let l=setTimeout(()=>t.onSearch(s),t.searchDebounceMs??250);return()=>clearTimeout(l)},[s,t.onSearch,t.searchDebounceMs]);let m=t.onSearch?c:K(c,s),M=S*f,p=Math.min(M+f,m.length),D=Math.ceil(m.length/f),O=p-M,v=m.slice(M,p);return X((l,n)=>{if(L){n.escape&&E();return}if(n.escape){s?(A(""),d(0),g(0)):E();return}if(n.tab&&y){y();return}if(n.upArrow){if(x>0){let o=x-1;d(o),t.preserveSelectionById&&h(v[o]?.id??null)}else if(S>0){let o=S-1,b=f-1;g(o),d(b),t.preserveSelectionById&&h(m[o*f+b]?.id??null)}return}if(n.downArrow){if(x<O-1){let o=x+1;d(o),t.preserveSelectionById&&h(v[o]?.id??null)}else if(S<D-1){let o=S+1,b=0;g(o),d(b),t.preserveSelectionById&&h(m[o*f+b]?.id??null)}return}if(n.return&&v[x]){H(v[x]);return}if(n.backspace||n.delete){A(o=>o.slice(0,-1)),d(0),g(0);return}l&&!n.ctrl&&!n.meta&&(A(o=>o+l),d(0),g(0))},{isActive:!B}),B?(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.orange,paddingX:2,paddingY:1,children:[(0,e.jsx)(i,{color:r.orange,bold:!0,children:I}),(0,e.jsx)(a,{marginTop:1,children:(0,e.jsx)(i,{color:r.secondary,children:F??`Loading ${T}\u2026`})})]}):L?(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.red,paddingX:2,paddingY:1,children:[(0,e.jsx)(i,{color:r.red,bold:!0,children:I}),(0,e.jsx)(a,{marginTop:1,children:(0,e.jsx)(i,{color:r.red,children:L})}),(0,e.jsx)(R,{bindings:[]})]}):(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.orange,paddingX:2,paddingY:1,children:[(0,e.jsxs)(a,{children:[(0,e.jsx)(i,{color:r.orange,bold:!0,children:I}),(0,e.jsxs)(i,{color:r.dim,children:[" (",m.length,!t.onSearch&&s?`/${c.length}`:""," ",T,t.loadingMore?" \xB7 loading more":"",")"]})]}),(0,e.jsxs)(a,{marginTop:1,children:[(0,e.jsx)(i,{color:r.secondary,children:s?"filter: ":""}),s?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{children:s}),(0,e.jsx)(i,{inverse:!0,children:" "})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(i,{color:r.dim,children:["Search ",T,"\u2026"]}),(0,e.jsx)(i,{inverse:!0,children:" "})]})]}),(0,e.jsx)(a,{flexDirection:"column",marginTop:1,children:t.searching?(0,e.jsxs)(i,{color:r.secondary,children:["Searching ",T,"\u2026"]}):m.length===0?(0,e.jsxs)(i,{color:r.dim,children:["No ",T,' match "',s,'"']}):v.map((l,n)=>{let o=n===x,b=o?"\u276F ":" ",$=l.isActive?r.green:o?r.orange:void 0;return(0,e.jsxs)(i,{color:$,children:[b,l.label,l.isActive?" \u25CF selected":""]},l.id)})}),!t.searching&&D>1&&(0,e.jsx)(a,{marginTop:1,children:(0,e.jsxs)(i,{color:r.dim,children:["Page ",S+1,"/",D]})}),t.footer&&(0,e.jsx)(a,{marginTop:1,flexDirection:"column",children:t.footer}),(0,e.jsx)(R,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"type",label:"to search"},{keys:"\u21B5",label:"select"},...y&&N?[{keys:"tab",label:N}]:[]],escBackLabel:s?"clear":"back to chat"})]})}export{J as a};
2
+ import{a as R}from"./chunk-CB3TEWZJ.js";import{x as r}from"./chunk-HMGNPFXP.js";import{a as Y}from"./chunk-HCBYKLMW.js";import{a,b as i,i as X}from"./chunk-C44QQJR4.js";import{a as G}from"./chunk-6YGTRKDT.js";import{e as P}from"./chunk-UR6MHSHU.js";var u=P(G(),1);var e=P(Y(),1),f=5;function K(t,I){if(!I)return t;let c=I.toLowerCase();return t.filter(B=>B.label.toLowerCase().includes(c))}function J(t){let{title:I,items:c,loading:B=!1,loadingText:F,error:L=null,itemNoun:T="items",onSelect:H,onCancel:E,defaultActiveId:w,onTab:y,extraHint:N}=t,[x,d]=(0,u.useState)(0),[S,g]=(0,u.useState)(0),[s,A]=(0,u.useState)(""),[C,h]=(0,u.useState)(null);(0,u.useEffect)(()=>{if(c.length===0)return;if(t.preserveSelectionById&&C!==null){let n=c.findIndex(o=>o.id===C);if(n>=0){g(Math.floor(n/f)),d(n%f);return}}let l=w?c.findIndex(n=>n.id===w):c.findIndex(n=>n.isActive);l>=0?(g(Math.floor(l/f)),d(l%f),t.preserveSelectionById&&h(c[l].id)):t.preserveSelectionById&&(g(0),d(0),h(c[0]?.id??null))},[c,w,t.preserveSelectionById,C]),(0,u.useEffect)(()=>{if(!t.onSearch)return;let l=setTimeout(()=>t.onSearch(s),t.searchDebounceMs??250);return()=>clearTimeout(l)},[s,t.onSearch,t.searchDebounceMs]);let m=t.onSearch?c:K(c,s),M=S*f,p=Math.min(M+f,m.length),D=Math.ceil(m.length/f),O=p-M,v=m.slice(M,p);return X((l,n)=>{if(L){n.escape&&E();return}if(n.escape){s?(A(""),d(0),g(0)):E();return}if(n.tab&&y){y();return}if(n.upArrow){if(x>0){let o=x-1;d(o),t.preserveSelectionById&&h(v[o]?.id??null)}else if(S>0){let o=S-1,b=f-1;g(o),d(b),t.preserveSelectionById&&h(m[o*f+b]?.id??null)}return}if(n.downArrow){if(x<O-1){let o=x+1;d(o),t.preserveSelectionById&&h(v[o]?.id??null)}else if(S<D-1){let o=S+1,b=0;g(o),d(b),t.preserveSelectionById&&h(m[o*f+b]?.id??null)}return}if(n.return&&v[x]){H(v[x]);return}if(n.backspace||n.delete){A(o=>o.slice(0,-1)),d(0),g(0);return}l&&!n.ctrl&&!n.meta&&(A(o=>o+l),d(0),g(0))},{isActive:!B}),B?(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.orange,paddingX:2,paddingY:1,children:[(0,e.jsx)(i,{color:r.orange,bold:!0,children:I}),(0,e.jsx)(a,{marginTop:1,children:(0,e.jsx)(i,{color:r.secondary,children:F??`Loading ${T}\u2026`})})]}):L?(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.red,paddingX:2,paddingY:1,children:[(0,e.jsx)(i,{color:r.red,bold:!0,children:I}),(0,e.jsx)(a,{marginTop:1,children:(0,e.jsx)(i,{color:r.red,children:L})}),(0,e.jsx)(R,{bindings:[]})]}):(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.orange,paddingX:2,paddingY:1,children:[(0,e.jsxs)(a,{children:[(0,e.jsx)(i,{color:r.orange,bold:!0,children:I}),(0,e.jsxs)(i,{color:r.dim,children:[" (",m.length,!t.onSearch&&s?`/${c.length}`:""," ",T,t.loadingMore?" \xB7 loading more":"",")"]})]}),(0,e.jsxs)(a,{marginTop:1,children:[(0,e.jsx)(i,{color:r.secondary,children:s?"filter: ":""}),s?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{children:s}),(0,e.jsx)(i,{inverse:!0,children:" "})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(i,{color:r.dim,children:["Search ",T,"\u2026"]}),(0,e.jsx)(i,{inverse:!0,children:" "})]})]}),(0,e.jsx)(a,{flexDirection:"column",marginTop:1,children:t.searching?(0,e.jsxs)(i,{color:r.secondary,children:["Searching ",T,"\u2026"]}):m.length===0?(0,e.jsxs)(i,{color:r.dim,children:["No ",T,' match "',s,'"']}):v.map((l,n)=>{let o=n===x,b=o?"\u276F ":" ",$=l.isActive?r.green:o?r.orange:void 0;return(0,e.jsxs)(i,{color:$,children:[b,l.label,l.isActive?" \u25CF selected":""]},l.id)})}),!t.searching&&D>1&&(0,e.jsx)(a,{marginTop:1,children:(0,e.jsxs)(i,{color:r.dim,children:["Page ",S+1,"/",D]})}),t.footer&&(0,e.jsx)(a,{marginTop:1,flexDirection:"column",children:t.footer}),(0,e.jsx)(R,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"type",label:"to search"},{keys:"\u21B5",label:"select"},...y&&N?[{keys:"tab",label:N}]:[]],escBackLabel:s?"clear":"back to chat"})]})}export{J as a};