@testmuai/kane-cli 0.5.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 (188) hide show
  1. package/dist/ChatSurface-R55VO3VW.js +9 -0
  2. package/dist/{ChromeProfilePicker-PIWZY4WH.js → ChromeProfilePicker-BZKLIO2T.js} +1 -1
  3. package/dist/{CliFeedbackPrompt-URXCHBZ5.js → CliFeedbackPrompt-3HYRBMXS.js} +1 -1
  4. package/dist/CliUploadProgress-OAPMO5I3.js +2 -0
  5. package/dist/{ConfigView-NWNDNTKW.js → ConfigView-YIAAISLE.js} +1 -1
  6. package/dist/EvidenceViewOffer-DBMZQ34Z.js +2 -0
  7. package/dist/FolderPicker-ILK4AIKL.js +2 -0
  8. package/dist/HelpView-HBQX64VR.js +2 -0
  9. package/dist/{InfoBox-FPAWQZGQ.js → InfoBox-DKJO73HM.js} +1 -1
  10. package/dist/{LinksBox-O5ZFYSK2.js → LinksBox-44WCVBT4.js} +1 -1
  11. package/dist/{ProfilesView-SPECXHZE.js → ProfilesView-NVEDYU3H.js} +1 -1
  12. package/dist/{ProjectPicker-ANJ6NGNY.js → ProjectPicker-COBY7TCY.js} +1 -1
  13. package/dist/{SaveSessionPrompt-W2GWELOP.js → SaveSessionPrompt-O4ENMYHP.js} +1 -1
  14. package/dist/ScrollbackTap-Q3IOKNMS.js +2 -0
  15. package/dist/SingleShotApp-NA6A2S6I.js +2 -0
  16. package/dist/{SummaryBox-DJUDYML7.js → SummaryBox-ROV7TNK4.js} +1 -1
  17. package/dist/TestMdRunView-U5YTNLY6.js +2 -0
  18. package/dist/{WhoamiView-DH25ZD4C.js → WhoamiView-4QV3DPN2.js} +1 -1
  19. package/dist/archive-committer-3NI773TP.js +2 -0
  20. package/dist/bind-RDTZZ6ZI.js +6 -0
  21. package/dist/bridge-VY2Q3HQU.js +2 -0
  22. package/dist/{changelog-RCKUVBFL.js → changelog-JMFGVNEU.js} +1 -1
  23. package/dist/chat-committer-RTJCKQMM.js +2 -0
  24. package/dist/chat-controller-OTBYHB4Y.js +3 -0
  25. package/dist/chunk-22A2ECA2.js +2 -0
  26. package/dist/{chunk-T4PKTWZ6.js → chunk-2PDWMY2B.js} +1 -1
  27. package/dist/{chunk-I4B2KY4X.js → chunk-2T4JPBB5.js} +1 -1
  28. package/dist/{chunk-AM5WZPPY.js → chunk-37CI4EJX.js} +1 -1
  29. package/dist/chunk-427OQS2N.js +2 -0
  30. package/dist/chunk-47RNFG2V.js +23 -0
  31. package/dist/{chunk-IECUFWIZ.js → chunk-4CRKK5WV.js} +1 -1
  32. package/dist/chunk-5446YVGQ.js +4 -0
  33. package/dist/{chunk-TJWU7DOO.js → chunk-5FD6ZXB5.js} +1 -1
  34. package/dist/chunk-5ILXUQIX.js +2 -0
  35. package/dist/chunk-5UXL6RNG.js +2 -0
  36. package/dist/chunk-5Y2G4NC7.js +2 -0
  37. package/dist/chunk-6PS65QFF.js +2 -0
  38. package/dist/chunk-7DBQEOFL.js +9 -0
  39. package/dist/{chunk-R5RHRG65.js → chunk-7SUKUJO2.js} +1 -1
  40. package/dist/{chunk-LOQV5GME.js → chunk-AAWRKFE4.js} +1 -1
  41. package/dist/chunk-AD46OCZ4.js +4 -0
  42. package/dist/chunk-AE6SS34N.js +4 -0
  43. package/dist/chunk-B2PZAB7J.js +4 -0
  44. package/dist/chunk-BC7UVJJB.js +2 -0
  45. package/dist/{chunk-DTM4ZMMJ.js → chunk-BMSWIYYK.js} +1 -1
  46. package/dist/{chunk-YSIYPC4R.js → chunk-CB3TEWZJ.js} +1 -1
  47. package/dist/chunk-CE664P73.js +2 -0
  48. package/dist/chunk-CP4XCWAJ.js +5 -0
  49. package/dist/chunk-D5T4ARTB.js +2 -0
  50. package/dist/chunk-DFS4RMVP.js +2 -0
  51. package/dist/chunk-DM2GL24Z.js +3 -0
  52. package/dist/{chunk-HZ46P2GR.js → chunk-FAIH2K2U.js} +1 -1
  53. package/dist/chunk-FS4YJM22.js +2 -0
  54. package/dist/chunk-FXPPQL4D.js +6 -0
  55. package/dist/chunk-FYOCF7DY.js +2 -0
  56. package/dist/chunk-GIGD4M7V.js +5 -0
  57. package/dist/chunk-GIRXJOJI.js +2 -0
  58. package/dist/chunk-HGL3RM7P.js +8 -0
  59. package/dist/{chunk-HFXQU7UZ.js → chunk-HMGNPFXP.js} +1 -1
  60. package/dist/chunk-I2S6KNZW.js +2 -0
  61. package/dist/chunk-IACKIGPX.js +2 -0
  62. package/dist/{chunk-C4LYBQT3.js → chunk-IRDMEYJB.js} +2 -2
  63. package/dist/{chunk-4IOOBSNB.js → chunk-ISAE457F.js} +1 -1
  64. package/dist/{chunk-AFCEFOIK.js → chunk-J5BUMF3G.js} +1 -1
  65. package/dist/chunk-JFAFKHDX.js +4 -0
  66. package/dist/{chunk-6E5UYAEB.js → chunk-KFAYCOTB.js} +1 -1
  67. package/dist/{chunk-UOGJUJCF.js → chunk-KGP7NSXH.js} +1 -1
  68. package/dist/chunk-KHDUQ33H.js +2 -0
  69. package/dist/chunk-KHU7C6EE.js +2 -0
  70. package/dist/chunk-LMJTY32X.js +6 -0
  71. package/dist/chunk-M5JQXOCE.js +12 -0
  72. package/dist/chunk-MJFYMMX2.js +2 -0
  73. package/dist/chunk-MMI3VSCA.js +6 -0
  74. package/dist/{chunk-NLIOFVMP.js → chunk-MZ2PXBKK.js} +1 -1
  75. package/dist/chunk-N2ZW5635.js +6 -0
  76. package/dist/chunk-NNZV5RCE.js +2 -0
  77. package/dist/{chunk-7IBNOVML.js → chunk-NSSKSXCT.js} +1 -1
  78. package/dist/{chunk-PISZLYS5.js → chunk-O4O4KL6Z.js} +1 -1
  79. package/dist/{chunk-QO6PAA7Q.js → chunk-OBBXDBEE.js} +2 -2
  80. package/dist/chunk-Q4P2L7DY.js +2 -0
  81. package/dist/chunk-Q4PUOA46.js +61 -0
  82. package/dist/chunk-QPZRHAYK.js +4 -0
  83. package/dist/chunk-QZWQCHXK.js +11 -0
  84. package/dist/{chunk-7AEC572G.js → chunk-R2K2SGGE.js} +1 -1
  85. package/dist/{chunk-3FN66LTP.js → chunk-RFHMDQXZ.js} +1 -1
  86. package/dist/chunk-RGEAEAZB.js +20 -0
  87. package/dist/{chunk-GEAWRRR7.js → chunk-RH2OAIJI.js} +1 -1
  88. package/dist/chunk-RKWJG3WW.js +19 -0
  89. package/dist/{chunk-IU53F4ZV.js → chunk-ROPXE7TF.js} +1 -1
  90. package/dist/chunk-RY4OOGSC.js +14 -0
  91. package/dist/chunk-S74MQRDN.js +2 -0
  92. package/dist/{chunk-ZWAZ4QU4.js → chunk-SB6MBQKR.js} +1 -1
  93. package/dist/{chunk-XDERMCAU.js → chunk-SQJWMOJQ.js} +1 -1
  94. package/dist/{chunk-ELBPBHTE.js → chunk-SUDAFBVD.js} +2 -2
  95. package/dist/chunk-VJUIW2ES.js +4 -0
  96. package/dist/chunk-VXD5667K.js +7 -0
  97. package/dist/chunk-WAGJLR5X.js +356 -0
  98. package/dist/chunk-WGG5XURS.js +13 -0
  99. package/dist/chunk-WRHZCHZY.js +2 -0
  100. package/dist/chunk-XDW2RGIL.js +7 -0
  101. package/dist/chunk-YANCBRER.js +3 -0
  102. package/dist/{chunk-THEZSXZM.js → chunk-YJ6AQ2KP.js} +1 -1
  103. package/dist/chunk-Z56AWGVY.js +2 -0
  104. package/dist/{chunk-PTP3WS3N.js → chunk-ZA67EBYF.js} +1 -1
  105. package/dist/chunk-ZKYYZ5NO.js +6 -0
  106. package/dist/{chunk-TPG2T5GH.js → chunk-ZNANAARA.js} +1 -1
  107. package/dist/cover-cmd-Y5L4O4Q3.js +2 -0
  108. package/dist/{credentials-52QRPGET.js → credentials-L63BBW2S.js} +1 -1
  109. package/dist/descriptor-SL5A7RQE.js +2 -0
  110. package/dist/distill-cmd-EYCCCFL3.js +2 -0
  111. package/dist/evidence-UAFPTHQX.js +2 -0
  112. package/dist/evolve-cmd-2SPNVTT4.js +2 -0
  113. package/dist/{exit-manager-IUHAXFJ6.js → exit-manager-VCSIUYBR.js} +1 -1
  114. package/dist/explain-JIXUWEFJ.js +2 -0
  115. package/dist/explain-cmd-55WRDIMW.js +9 -0
  116. package/dist/explain-cmd-RIDEMDMY.js +3 -0
  117. package/dist/extract-bind-DS4UP23P.js +5 -0
  118. package/dist/extract-cmd-PMZHMMU7.js +6 -0
  119. package/dist/gaps-cmd-P2DRK6FW.js +2 -0
  120. package/dist/gate-FACZRGOC.js +2 -0
  121. package/dist/{generate-headless-WG6ZPINI.js → generate-headless-C3UZKDS5.js} +2 -2
  122. package/dist/headless-io-GXHKDPHB.js +2 -0
  123. package/dist/index.js +55 -54
  124. package/dist/ingest-4CGBXC2L.js +2 -0
  125. package/dist/ingest-cmd-FJ3SLTT4.js +3 -0
  126. package/dist/interactive-bind-SJLDJULN.js +7 -0
  127. package/dist/interrupt-guard-UREUWNRL.js +2 -0
  128. package/dist/lifecycle-cmd-56OZT4LY.js +2 -0
  129. package/dist/list-cmd-JB2ABACD.js +3 -0
  130. package/dist/list-commands-PGAX5HRB.js +2 -0
  131. package/dist/logical-ids-QRRUXV5E.js +2 -0
  132. package/dist/login-flow-4OJ34VDP.js +2 -0
  133. package/dist/maintenance-cmd-E3HEEVQW.js +2 -0
  134. package/dist/open-MQLQKFAW.js +2 -0
  135. package/dist/{persist-recorded-session-XKPZX7HW.js → persist-recorded-session-WFU4M4SQ.js} +1 -1
  136. package/dist/pipeline-EYQUM27P.js +2 -0
  137. package/dist/readmodel-MPTENJ2R.js +2 -0
  138. package/dist/reconcile-cmd-TFFYCTCY.js +8 -0
  139. package/dist/{recording-banner-2TNKQHP2.js → recording-banner-PH2NND2X.js} +1 -1
  140. package/dist/{require-project-folder-SJG5FQY6.js → require-project-folder-RD2UAB7E.js} +1 -1
  141. package/dist/revert-3TKLOYQA.js +2 -0
  142. package/dist/review-cmd-SL52N4TM.js +4 -0
  143. package/dist/run-NODOSQUL.js +2 -0
  144. package/dist/run-test-md-I6O4H7B2.js +17 -0
  145. package/dist/{scrollback-6GINSTL2.js → scrollback-JLPJR25X.js} +1 -1
  146. package/dist/sessions-cmd-STHKGDX4.js +23 -0
  147. package/dist/signals-cmd-LXHZQLXZ.js +2 -0
  148. package/dist/{skill-installer-M6AREQQW.js → skill-installer-BJLHH3DW.js} +1 -1
  149. package/dist/spawner-UDCF35OA.js +2 -0
  150. package/dist/tcg-generate-E7H4LF7Y.js +2 -0
  151. package/dist/testmd-actions-FMVUXZGX.js +2 -0
  152. package/dist/token-refresh-OGBTJGZ2.js +2 -0
  153. package/dist/turn-preflight-I5SM4UIZ.js +2 -0
  154. package/dist/ui-JEJGTURD.js +4 -0
  155. package/dist/{validate-basic-FO7C2URG.js → validate-basic-WILRWRRP.js} +1 -1
  156. package/dist/{version-check-PHZX5WS7.js → version-check-TXTCVX2N.js} +1 -1
  157. package/dist/view-cmd-QE2FS3GB.js +436 -0
  158. package/package.json +6 -6
  159. package/dist/CliUploadProgress-DMH3C3UZ.js +0 -2
  160. package/dist/EvidenceViewOffer-HEBQ7C4H.js +0 -2
  161. package/dist/FolderPicker-5S23OTSY.js +0 -2
  162. package/dist/HelpView-YYKTP4JH.js +0 -2
  163. package/dist/SingleShotApp-5TYM356H.js +0 -2
  164. package/dist/TestMdRunView-BIVXQE54.js +0 -2
  165. package/dist/chunk-54TKNWXF.js +0 -5
  166. package/dist/chunk-5MTRNUAK.js +0 -2
  167. package/dist/chunk-7KDNH6JP.js +0 -10
  168. package/dist/chunk-7YRNLGUT.js +0 -11
  169. package/dist/chunk-C6S4IEBC.js +0 -2
  170. package/dist/chunk-DJL47DYJ.js +0 -8
  171. package/dist/chunk-H6QJ4YU7.js +0 -2
  172. package/dist/chunk-J75KVNX5.js +0 -18
  173. package/dist/chunk-MUPHP5W6.js +0 -27
  174. package/dist/chunk-NAYAVVTP.js +0 -6
  175. package/dist/chunk-P5XBCJYQ.js +0 -7
  176. package/dist/chunk-Q2I65L2W.js +0 -6
  177. package/dist/chunk-QCEWUUE6.js +0 -55
  178. package/dist/chunk-V2GYBVSM.js +0 -2
  179. package/dist/chunk-Y44AETOW.js +0 -2
  180. package/dist/chunk-YCNCW4O4.js +0 -8
  181. package/dist/evidence-O4AON5FU.js +0 -2
  182. package/dist/list-commands-VJAL4J3O.js +0 -2
  183. package/dist/login-flow-VZ2MITFA.js +0 -2
  184. package/dist/pipeline-CADTHPDV.js +0 -2
  185. package/dist/run-test-md-INJKPE2I.js +0 -13
  186. package/dist/tcg-generate-VKFXR5JT.js +0 -2
  187. package/dist/testmd-actions-4QLHD74A.js +0 -2
  188. package/dist/token-refresh-2HKIYD4Y.js +0 -2
@@ -0,0 +1,436 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{b as T}from"./chunk-AD46OCZ4.js";import"./chunk-ZKYYZ5NO.js";import"./chunk-BC7UVJJB.js";import{a as A}from"./chunk-D5T4ARTB.js";import"./chunk-AE6SS34N.js";import"./chunk-GIRXJOJI.js";import{d as V}from"./chunk-B2PZAB7J.js";import{d as g,e as x}from"./chunk-IACKIGPX.js";import"./chunk-UR6MHSHU.js";import{writeFileSync as le,mkdirSync as ce}from"fs";import{tmpdir as pe}from"os";import{dirname as ue,join as ge}from"path";var F={DERIVES:"derivation",automates:"linkage",exercises:"mesh",verifies:"mesh",depends_on:"crosslink",reuses:"crosslink",belongs_to:"containment",scoped_to:"containment",annotates:"annotation"},ne=(t,r)=>t===g.SOURCE?String(r.source_id??""):t===g.AC?String(r.text??""):t===g.STYLENOTE?String(r.statement??r.text??""):t===g.GAP?String(r.text??r.question??""):String(r.title??"");function H(t){let r=[];for(let[o,p]of t.nodeLabel){let f=t.getNode(o)?.content??{};r.push({cid:o,label:p,slug:p===g.SOURCE?String(f.source_id??""):t.nameOf.get(o)??o.slice(0,19),trust:t.trust.get(o)??"derived",fresh:t.stale(o),title:ne(p,f),content:f,superseded:t.superseded.has(o)})}let e=new Map;for(let[o]of t.nodeLabel)for(let p of t.edgesFrom(o)){let f=`${p.type}|${p.src}|${p.dst}`,v=typeof p.props?.anchor=="string"?p.props.anchor:void 0,w=e.get(f);w?(w.count++,v&&w.anchors.push(v)):e.set(f,{key:f,type:p.type,family:F[p.type]??"mesh",src:p.src,dst:p.dst,count:1,anchors:v?[v]:[],container:F[p.type]==="containment"})}let a=[...e.values()],s={},l={trusted:0,derived:0,archived:0},d={fresh:0,stale:0,orphaned:0,superseded:0},i=0;for(let o of r)o.superseded||(i++,s[o.label]=(s[o.label]??0)+1,o.label!==g.SOURCE&&l[o.trust]++,d[o.fresh]++);return{nodes:r,edges:a,summary:{nodes:i,edges:a.reduce((o,p)=>o+p.count,0),byLabel:s,trust:l,fresh:d,usecases:s[g.USECASE]??0,designed:0}}}var E=(t,r)=>t<r?-1:t>r?1:0;function re(t,r,e){let a=new Set,s=d=>{let i=e.nodeLabel.get(d);if(i===g.USECASE)a.add(d);else if(i===g.SCENARIO)for(let o of e.edgesFrom(d))o.type===x.BELONGS_TO&&a.add(o.dst)},l=e.edgesFrom(t);if(r===g.SCENARIO)for(let d of l)d.type===x.BELONGS_TO&&a.add(d.dst);if(r===g.AC)for(let d of l)d.type===x.SCOPED_TO&&s(d.dst);if(r===g.TEST)for(let d of l)d.type===x.AUTOMATES&&s(d.dst);return a}function P(t,r){let e=new Map,a=t.nodes.filter(i=>i.label===g.USECASE).map(i=>i.cid),s=a.map(i=>({ucCid:i,slug:r.nameOf.get(i)??i.slice(0,19),designed:r.designOf.has(i),nodeCids:[i]})).sort((i,o)=>E(i.slug,o.slug)),l={ucCid:"__shared__",slug:"cross-cutting",designed:!1,nodeCids:[]},d=new Map(s.map(i=>[i.ucCid,i]));for(let i of a)e.set(i,i);for(let i of t.nodes){if(i.label===g.SOURCE||i.label===g.USECASE)continue;let o=re(i.cid,i.label,r);if(o.size===1){let p=[...o][0];e.set(i.cid,p),d.get(p).nodeCids.push(i.cid)}else e.set(i.cid,"__shared__"),l.nodeCids.push(i.cid)}return{laneOf:e,lanes:[...s,l]}}var N={source:0,usecase:1,scenario:2,ac:3,test:4,stylenote:5,gap:5},se=6,G=260,R=64,z=28;function B(t,r,e){let{lanes:a}=r,s=new Map(t.nodes.map(n=>[n.cid,n])),l=new Map,d=[],i=[],o=n=>{let m=n.map(h=>l.get(h)).filter(h=>h!==void 0);return m.length?m.reduce((h,S)=>h+S,0)/m.length:Number.MAX_SAFE_INTEGER},p=a.filter(n=>n.ucCid!=="__shared__"||n.nodeCids.length>0),f=t.nodes.filter(n=>n.label===g.SOURCE).sort((n,m)=>E(n.slug,m.slug)),v=0;for(let n of p){let m=n.nodeCids.map(c=>s.get(c)).filter(Boolean),h=c=>m.filter(u=>u.label===c),S=h(g.USECASE).sort((c,u)=>E(c.slug,u.slug));S.forEach((c,u)=>l.set(c.cid,u));let D=h(g.SCENARIO).sort((c,u)=>E(c.slug,u.slug));D.forEach((c,u)=>l.set(c.cid,u));let M=h(g.AC).sort((c,u)=>{let _=o(e.edgesInto(c.cid).filter(b=>b.type===x.EXERCISES).map(b=>b.src)),O=o(e.edgesInto(u.cid).filter(b=>b.type===x.EXERCISES).map(b=>b.src));return _-O||E(c.slug,u.slug)});M.forEach((c,u)=>l.set(c.cid,u));let j=h(g.TEST).sort((c,u)=>{let _=o(e.edgesFrom(c.cid).filter(b=>b.type===x.VERIFIES).map(b=>b.dst)),O=o(e.edgesFrom(u.cid).filter(b=>b.type===x.VERIFIES).map(b=>b.dst));return _-O||E(c.slug,u.slug)});j.forEach((c,u)=>l.set(c.cid,u));let q=m.filter(c=>N[c.label]===void 0||N[c.label]>=5).sort((c,u)=>E(c.slug,u.slug));q.forEach((c,u)=>l.set(c.cid,u));let I=Math.max(1,S.length,D.length,M.length,j.length,q.length)*R+z;for(let c of m){let u=N[c.label]??4,_=l.get(c.cid)??0;d.push({...c,lane:n.ucCid,col:u,x:u*G,y:v+z/2+_*R})}i.push({...n,y0:v,y1:v+I}),v+=I}let w=Math.max(v,R);f.forEach((n,m)=>d.push({...n,lane:"__spine__",col:0,x:0,y:w/(f.length+1)*(m+1)}));let L=se*G;return{nodes:d,lanes:i,width:L,height:w}}function ie(t){return t.design_of?"design":t.review.length>0?"review":t.nodes.some(r=>r.label==="source")?"ingest":t.nodes.length>0?"extract":"other"}function U(t){let r=new Map,e=new Map,a=[];for(let s of t){for(let n of s.nodes)r.has(n.cid)||r.set(n.cid,s.seq);let l=new Map(e);for(let n of s.nodes)n.content?.derived===!0&&!e.has(n.cid)&&e.set(n.cid,"derived");for(let n of s.review)n.resolution==="approved"||n.resolution==="edited"?e.set(n.id,"trusted"):n.resolution==="rejected"?e.set(n.id,"archived"):n.resolution==="reset"&&e.set(n.id,"derived");let d=n=>{let m=0;for(let[h,S]of e)S===n&&l.get(h)!==n&&m++;return m},i=0;for(let[n,m]of e){let h=l.get(n);m==="derived"&&(h==="trusted"||h==="archived")&&i++}let o={trusted:d("trusted"),archived:d("archived"),reset:i},p=ie(s),f=s.nodes.map(n=>n.cid),v=s.edges.map(n=>`${n.type}|${n.src}|${n.dst}`),w=s.review.map(n=>n.id),L=p==="review"?"review \xB7 +"+o.trusted+" trusted"+(o.archived?", +"+o.archived+" archived":""):p+" \xB7 +"+f.length+" nodes";a.push({seq:s.seq,ts:s.ts,kind:p,label:L,mintedNodeCids:f,mintedEdgeKeys:v,reviewedNodeCids:w,trustDelta:o})}return{commits:a,bornSeq:r}}function Y(t,r,e){let a=[];for(let s of t){s.nodes.some(l=>l.cid===r)&&a.push({seq:s.seq,ts:s.ts,kind:"minted",detail:"minted here"});for(let l of s.review)l.id===r&&a.push({seq:s.seq,ts:s.ts,kind:"review",detail:l.resolution+(l.reason?": "+l.reason:"")})}return e.length&&a.push({seq:0,ts:"",kind:"derived_from",detail:"source lines "+e.join(", ")}),a}var ae={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function k(t){return String(t).replace(/[&<>"']/g,r=>ae[r])}var $=t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"),oe=new RegExp("[\u2028\u2029]","g");function W(t){return t.replace(/[<>&]/g,$).replace(oe,$)}var X=t=>t.replace("sha256:","").slice(0,12);function K(t){if(!t||typeof t!="object")return"";let r=String(t.operator??""),e=t.operand!=null?String(t.operand):"",a=t.unit!=null?" "+String(t.unit):"",s=t.baseline!=null?String(t.baseline):"",l=t.within&&typeof t.within=="object"?t.within:null,d;switch(r){case"exists":d="exists: "+e;break;case"forall":d="for all "+e;break;case"contains":d="contains "+e;break;case"gte":d=">= "+e+a;break;case"lte":d="<= "+e+a;break;case"equals":d="= "+e+a+(s?" (was "+s+")":"");break;case"changed-by":d="changed by "+e+a;break;default:d=(r+" "+e+a).trim()}if(l){let i=l.threshold!=null?String(l.threshold):"",o=l.unit!=null?String(l.unit):"";(i||o)&&(d+=" within "+i+o)}return d.trim()}var C=t=>t==null||t===""?"":`<span class="chip">${k(t)}</span>`,y=(t,r)=>r==null||r===""?"":`<div class="kv"><span class="k">${k(t)}</span><span class="v">${k(r)}</span></div>`,de=t=>Array.isArray(t)&&t.length?`<ul class="crit">${t.map(r=>`<li>${k(r)}</li>`).join("")}</ul>`:"";function J(t,r){let e=r??{};switch(t){case"usecase":return[y("description",e.description),y("value",e.value),[C(e.risk?"risk: "+e.risk:""),...Array.isArray(e.actors)?e.actors.map(a=>C(a)):[]].join(""),de(e.criteria)].join("");case"scenario":return[y("intent",e.intent),[C(e.case_type)].join(""),e.parameters&&typeof e.parameters=="object"?Object.entries(e.parameters).map(([a,s])=>y(a,s)).join(""):"",y("techniques",e.technique_notes)].join("");case"ac":return[y("",e.text),[C(e.kind),C(e.risk?"risk: "+e.risk:"")].join(""),(()=>{let a=K(e.expected_answer);return a?`<div class="pred">${k(a)}</div>`:""})()].join("");case"test":{let a=K(e.check),s=e.test_md_blob!=null?`<pre class="md">${k(String(e.test_md_blob))}</pre>`:"";return[a?`<div class="pred">${k(a)}</div>`:"",y("definitionId",e.definitionId),s].join("")}case"source":return[y("source_id",e.source_id),y("blob",e.blob)].join("");case"stylenote":return[e.statement?`<div class="pred">${k(e.statement)}</div>`:"",[C(e.learned_from_kind?"learned from: "+e.learned_from_kind:"")].join(""),y("",e.text),Array.isArray(e.tags)?e.tags.map(a=>C(a)).join(""):""].join("");case"gap":return[y("",e.text??e.question),[C(e.kind),C(e.risk?"risk: "+e.risk:"")].join(""),y("why",e.risk_rationale),y("ref",e.ref)].join("");default:return""}}function Z(t,r,e,a){let s=H(t),l=P(s,t),d=B(s,l,t),{commits:i}=U(r);s.summary.designed=l.lanes.filter(n=>n.designed&&n.ucCid!=="__shared__").length;let o={},p={};for(let n of s.nodes){o[n.cid]=J(n.label,n.content);let m=t.edgesInto(n.cid).filter(h=>h.type===x.DERIVES&&typeof h.props?.anchor=="string").map(h=>h.props.anchor);p[n.cid]=Y(r,n.cid,m)}let f=d.nodes.map(n=>({cid:n.cid,slug:n.slug,label:n.label,trust:n.trust,fresh:n.fresh,title:n.title,superseded:n.superseded,lane:n.lane,col:n.col,x:n.x,y:n.y})),v=d.lanes.map(n=>({ucCid:n.ucCid,slug:n.slug,designed:n.designed,y0:n.y0,y1:n.y1})),L=s.nodes.some(n=>n.label===g.SOURCE)?{}:void 0;return{meta:{fromSeq:r[0]?.seq??0,tipHash:e[e.length-1]??null,storePath:a,schema:"assurance/context@1",asOf:r[r.length-1]?.ts??null},summary:s.summary,lanes:v,nodes:f,edges:s.edges,commits:i,lineage:p,contentHtml:o,width:d.width,height:d.height,source:L}}var Q="__PAYLOAD__",ee=`<!doctype html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <title>kane-cli context</title>
8
+ <style>
9
+ :root{
10
+ --bg:#f7f8fa; --fg:#1b2430; --muted:#68727f; --panel:#ffffff; --line:#e2e6ec;
11
+ --accent:#2563eb; --n-source:#6b7280; --n-usecase:#2563eb; --n-scenario:#7c3aed;
12
+ --n-ac:#0d9488; --n-test:#d97706; --n-stylenote:#0891b2; --n-gap:#e11d48;
13
+ --f-derivation:#6b7280; --f-linkage:#d97706; --f-mesh:#94a3b8; --f-crosslink:#db2777; --f-annotation:#0891b2;
14
+ --trusted:#16a34a; --archived:#9ca3af; --stale:#d97706; --orphan:#dc2626;
15
+ }
16
+ @media (prefers-color-scheme: dark){
17
+ :root{ --bg:#0f1420; --fg:#e6ebf2; --muted:#94a3b8; --panel:#161b28; --line:#273246;
18
+ --n-source:#94a3b8; --n-usecase:#60a5fa; --n-scenario:#c084fc; --n-ac:#5eead4; --n-test:#fbbf24;
19
+ --n-stylenote:#67e8f9; --n-gap:#fb7185; --f-annotation:#67e8f9; }
20
+ }
21
+ *{box-sizing:border-box}
22
+ html,body{margin:0;height:100%;background:var(--bg);color:var(--fg);
23
+ font:13px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
24
+ #app{display:grid;grid-template-rows:auto 1fr auto;height:100vh}
25
+ #header{display:flex;align-items:center;gap:14px;padding:8px 14px;border-bottom:1px solid var(--line);
26
+ flex-wrap:wrap}
27
+ #header .title{font-weight:600}
28
+ #header .stat{color:var(--muted);cursor:pointer;padding:2px 6px;border-radius:5px}
29
+ #header .stat:hover{background:var(--line);color:var(--fg)}
30
+ #header .stat b{color:var(--fg)}
31
+ #search{margin-left:auto;padding:5px 9px;border:1px solid var(--line);border-radius:7px;
32
+ background:var(--panel);color:var(--fg);min-width:180px}
33
+ #main{position:relative;overflow:hidden}
34
+ #graph{width:100%;height:100%;display:block;cursor:grab;touch-action:none}
35
+ #graph.grabbing{cursor:grabbing}
36
+ .laneband{fill:transparent}
37
+ .laneband.alt{fill:rgba(127,127,127,0.05)}
38
+ .lanelabel{fill:var(--muted);font-size:11px;font-weight:600}
39
+ .lanelabel.undesigned{font-style:italic;opacity:0.7}
40
+ .edge{fill:none;stroke-width:1.4}
41
+ .edge.f-derivation{stroke:var(--f-derivation)}
42
+ .edge.f-linkage{stroke:var(--f-linkage)}
43
+ .edge.f-mesh{stroke:var(--f-mesh);opacity:0.10}
44
+ .edge.f-crosslink{stroke:var(--f-crosslink);stroke-dasharray:5 4}
45
+ .edge.f-annotation{stroke:var(--f-annotation);stroke-dasharray:2 3;opacity:0.7}
46
+ .edge.inc{opacity:1 !important;stroke-width:2.2}
47
+ .edge.trace{opacity:1 !important;stroke-width:2.4}
48
+ .edge.hiddenfam{display:none}
49
+ .node{cursor:pointer}
50
+ .node rect{stroke:var(--line);stroke-width:1.4;rx:7}
51
+ .node .box.n-source{fill:color-mix(in srgb,var(--n-source) 16%,var(--panel))}
52
+ .node .box.n-usecase{fill:color-mix(in srgb,var(--n-usecase) 16%,var(--panel))}
53
+ .node .box.n-scenario{fill:color-mix(in srgb,var(--n-scenario) 16%,var(--panel))}
54
+ .node .box.n-ac{fill:color-mix(in srgb,var(--n-ac) 16%,var(--panel))}
55
+ .node .box.n-test{fill:color-mix(in srgb,var(--n-test) 16%,var(--panel))}
56
+ .node .box.n-stylenote{fill:color-mix(in srgb,var(--n-stylenote) 16%,var(--panel))}
57
+ .node .box.n-gap{fill:color-mix(in srgb,var(--n-gap) 16%,var(--panel))}
58
+ .node .slug{font-size:11px;font-weight:600;fill:var(--fg)}
59
+ .node .ttl{font-size:10px;fill:var(--muted)}
60
+ .node .bar{stroke-width:4}
61
+ .node.trust-trusted .bar{stroke:var(--trusted)}
62
+ .node.trust-archived .box{fill:url(#hatch);opacity:0.55}
63
+ .node.trust-archived .slug{text-decoration:line-through}
64
+ .node .badge{font-size:11px}
65
+ .node.dim{opacity:0.12}
66
+ .node.sel rect{stroke:var(--accent);stroke-width:2.4}
67
+ .node.trace rect{stroke:var(--accent);stroke-width:2.2}
68
+ .node.hiddennode{display:none}
69
+ .elabel{font-size:9px;fill:var(--fg)}
70
+ .elabel rect{fill:var(--panel);stroke:var(--line)}
71
+ #panel{position:absolute;top:0;right:0;width:390px;max-width:92vw;height:100%;background:var(--panel);
72
+ border-left:1px solid var(--line);transform:translateX(100%);transition:transform .14s ease;
73
+ overflow:auto;padding:14px;display:flex;flex-direction:column;gap:10px}
74
+ #panel.open{transform:none}
75
+ #panel h2{margin:0;font-size:15px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
76
+ #panel .close{margin-left:auto;cursor:pointer;color:var(--muted);border:0;background:none;font-size:18px}
77
+ .crumb{color:var(--muted);font-size:11px}
78
+ .pill{font-size:10px;padding:1px 7px;border-radius:20px;border:1px solid var(--line)}
79
+ .pill.trusted{color:var(--trusted);border-color:var(--trusted)}
80
+ .pill.archived{color:var(--archived)}
81
+ .pill.stale{color:var(--stale);border-color:var(--stale)}
82
+ .pill.orphaned{color:var(--orphan);border-color:var(--orphan)}
83
+ .tabs{display:flex;gap:6px;border-bottom:1px solid var(--line)}
84
+ .tab{padding:5px 10px;cursor:pointer;color:var(--muted);border-bottom:2px solid transparent}
85
+ .tab.on{color:var(--fg);border-color:var(--accent)}
86
+ .chip{display:inline-block;font-size:10px;padding:1px 7px;margin:2px 3px 2px 0;border:1px solid var(--line);border-radius:20px;color:var(--muted)}
87
+ .kv{display:flex;gap:8px;margin:3px 0}
88
+ .kv .k{color:var(--muted);min-width:84px;text-transform:capitalize}
89
+ .kv .v{flex:1;overflow-wrap:anywhere}
90
+ .crit{margin:4px 0;padding-left:18px}
91
+ .pred{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:var(--bg);border:1px solid var(--line);
92
+ border-radius:6px;padding:6px 8px;margin:4px 0;overflow-wrap:anywhere}
93
+ pre.md{white-space:pre-wrap;background:var(--bg);border:1px solid var(--line);border-radius:6px;
94
+ padding:8px;font-size:11px;max-height:280px;overflow:auto}
95
+ .rel h3{font-size:11px;color:var(--muted);margin:10px 0 4px}
96
+ .rel a{display:flex;gap:8px;padding:3px 5px;border-radius:5px;cursor:pointer;color:var(--fg);text-decoration:none}
97
+ .rel a:hover{background:var(--bg)}
98
+ .rel .et{color:var(--accent);font-size:10px;min-width:78px}
99
+ .lin{border-left:2px solid var(--line);padding-left:10px;margin:4px 0}
100
+ .lin .seq{color:var(--muted);font-size:10px}
101
+ #rail{display:flex;gap:2px;align-items:stretch;padding:8px 12px;border-top:1px solid var(--line);overflow-x:auto}
102
+ #rail .tick{border:1px solid var(--line);border-radius:6px;padding:5px 9px;cursor:pointer;white-space:nowrap;
103
+ background:var(--panel);font-size:11px}
104
+ #rail .tick:hover{border-color:var(--accent)}
105
+ #rail .tick.on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel))}
106
+ #rail .tick .k{color:var(--muted);text-transform:uppercase;font-size:9px;letter-spacing:.5px}
107
+ #legend{position:absolute;left:12px;bottom:12px;background:var(--panel);border:1px solid var(--line);
108
+ border-radius:8px;padding:8px 10px;font-size:11px;max-width:230px}
109
+ #legend .row{display:flex;align-items:center;gap:6px;cursor:pointer;padding:1px 0}
110
+ #legend .sw{width:14px;height:0;border-top:3px solid}
111
+ #legend label{cursor:pointer}
112
+ .controls{position:absolute;right:12px;bottom:12px;display:flex;gap:6px}
113
+ .controls button{background:var(--panel);border:1px solid var(--line);color:var(--fg);border-radius:7px;
114
+ padding:6px 10px;cursor:pointer}
115
+ #empty{position:absolute;inset:0;display:none;align-items:center;justify-content:center;flex-direction:column;
116
+ color:var(--muted);gap:8px;text-align:center}
117
+ .dimmed .node:not(.sel):not(.adj):not(.trace){opacity:0.12}
118
+ </style>
119
+ </head>
120
+ <body>
121
+ <div id="app">
122
+ <div id="header"></div>
123
+ <div id="main">
124
+ <svg id="graph"><defs>
125
+ <pattern id="hatch" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
126
+ <rect width="6" height="6" fill="var(--panel)"></rect>
127
+ <line x1="0" y1="0" x2="0" y2="6" stroke="var(--archived)" stroke-width="2"></line>
128
+ </pattern>
129
+ <marker id="arrow" markerWidth="7" markerHeight="7" refX="6" refY="3" orient="auto">
130
+ <path d="M0,0 L6,3 L0,6 Z" fill="var(--muted)"></path>
131
+ </marker>
132
+ </defs></svg>
133
+ <div id="empty"><div style="font-size:20px">No context yet</div>
134
+ <div>Run <code>kane-cli context ingest</code> then <code>kane-cli context extract</code>.</div></div>
135
+ <div id="legend"></div>
136
+ <div class="controls">
137
+ <button id="fit">Fit</button>
138
+ <button id="clear">Clear</button>
139
+ </div>
140
+ <aside id="panel"></aside>
141
+ </div>
142
+ <div id="rail"></div>
143
+ </div>
144
+ <script id="data" type="application/json">__PAYLOAD__</script>
145
+ <script>
146
+ (function(){
147
+ "use strict";
148
+ var D = JSON.parse(document.getElementById("data").textContent);
149
+ var SVGNS = "http://www.w3.org/2000/svg";
150
+ var NODE_W = 220, NODE_H = 44;
151
+ var byCid = {}; for (var i=0;i<D.nodes.length;i++) byCid[D.nodes[i].cid] = D.nodes[i];
152
+ var famVisible = { derivation:true, linkage:true, mesh:true, crosslink:true };
153
+ var typeFilter = null, trustFilter = null;
154
+ var showSuperseded = false;
155
+ var selected = null;
156
+
157
+ function E(tag, attrs, txt){ var e=document.createElement(tag);
158
+ if(attrs) for(var k in attrs) e.setAttribute(k, attrs[k]);
159
+ if(txt!=null) e.textContent = txt; return e; }
160
+ function S(tag, attrs){ var e=document.createElementNS(SVGNS, tag);
161
+ if(attrs) for(var k in attrs) e.setAttribute(k, attrs[k]); return e; }
162
+ function esc(s){ return String(s==null?"":s); }
163
+
164
+ // ---------- header ----------
165
+ function buildHeader(){
166
+ var h = document.getElementById("header"); h.innerHTML="";
167
+ h.appendChild(E("span",{"class":"title"},"kane-cli context"));
168
+ var s = D.summary;
169
+ function stat(txt, kind, val){ var el=E("span",{"class":"stat"});
170
+ el.appendChild(E("b",{},String(val))); el.appendChild(document.createTextNode(" "+txt));
171
+ el.onclick=function(){ filterByStat(kind); }; return el; }
172
+ h.appendChild(stat("nodes","", s.nodes));
173
+ h.appendChild(stat("edges","", s.edges));
174
+ h.appendChild(stat("derived","derived", s.trust.derived));
175
+ h.appendChild(stat("trusted","trusted", s.trust.trusted));
176
+ h.appendChild(stat("archived","archived", s.trust.archived));
177
+ var stale = s.fresh.stale + s.fresh.orphaned;
178
+ h.appendChild(stat("stale","stale", stale));
179
+ h.appendChild(stat("designed", "", s.designed + "/" + s.usecases));
180
+ var inp = E("input",{"id":"search","placeholder":"search slug/title"});
181
+ inp.oninput=function(){ applyFilters(); }; h.appendChild(inp);
182
+ }
183
+ function filterByStat(kind){
184
+ if(kind==="derived"||kind==="trusted"||kind==="archived"){ trustFilter = (trustFilter===kind?null:kind); }
185
+ else if(kind==="stale"){ trustFilter = (trustFilter==="stale"?null:"stale"); }
186
+ applyFilters();
187
+ }
188
+
189
+ // ---------- graph ----------
190
+ var g = document.getElementById("graph");
191
+ var root = S("g",{}); g.appendChild(root);
192
+ var edgesLayer = S("g",{}); var nodesLayer = S("g",{}); var labelLayer = S("g",{});
193
+ root.appendChild(edgesLayer); root.appendChild(nodesLayer); root.appendChild(labelLayer);
194
+ var edgeEls = {}; var nodeEls = {};
195
+
196
+ function port(n, side){ // side: 'r' or 'l'
197
+ return { x: n.x + (side==="r"?NODE_W:0), y: n.y + NODE_H/2 }; }
198
+ function edgePath(e){
199
+ var s = byCid[e.src], d = byCid[e.dst]; if(!s||!d) return "";
200
+ var forward = d.x >= s.x;
201
+ var a = port(s, forward?"r":"l"), b = port(d, forward?"l":"r");
202
+ // cubic S-curve with horizontal tangents: each connection gets its own arc
203
+ // (a shared-midpoint elbow stacked every edge in a gap into one thick line).
204
+ var dx = Math.max(40, Math.abs(b.x-a.x)*0.45) * (forward?1:-1);
205
+ return "M"+a.x+","+a.y+" C"+(a.x+dx)+","+a.y+" "+(b.x-dx)+","+b.y+" "+b.x+","+b.y;
206
+ }
207
+ function renderGraph(){
208
+ if(D.nodes.length===0){ document.getElementById("empty").style.display="flex"; return; }
209
+ // lane bands + labels
210
+ for(var i=0;i<D.lanes.length;i++){ var ln=D.lanes[i]; if(ln.ucCid==="__shared__"&&ln.y1<=ln.y0) continue;
211
+ var band=S("rect",{"class":"laneband"+(i%2?" alt":""),x:0,y:ln.y0,width:D.width,height:(ln.y1-ln.y0)});
212
+ root.insertBefore(band, edgesLayer);
213
+ var lab=S("text",{"class":"lanelabel"+(ln.designed?"":" undesigned"),x:6,y:ln.y0+16});
214
+ lab.textContent = ln.slug + (ln.designed?"":" (not yet designed)");
215
+ labelLayer.appendChild(lab);
216
+ }
217
+ // edges (skip container; mesh ghosted via css)
218
+ for(var j=0;j<D.edges.length;j++){ var e=D.edges[j]; if(e.container) continue;
219
+ var p=S("path",{"class":"edge f-"+e.family,d:edgePath(e),"marker-end":"url(#arrow)"});
220
+ p.dataset.key=e.key; p.dataset.src=e.src; p.dataset.dst=e.dst; p.dataset.type=e.type; p.dataset.family=e.family;
221
+ edgesLayer.appendChild(p); edgeEls[e.key]=p; }
222
+ // nodes
223
+ for(var k=0;k<D.nodes.length;k++){ var n=D.nodes[k];
224
+ var grp=S("g",{"class":"node n-"+n.label+" trust-"+n.trust+" fresh-"+n.fresh}); grp.dataset.cid=n.cid;
225
+ grp.appendChild(S("rect",{"class":"box n-"+n.label,x:n.x,y:n.y,width:NODE_W,height:NODE_H,rx:7}));
226
+ if(n.trust==="trusted") grp.appendChild(S("line",{"class":"bar",x1:n.x+1,y1:n.y+2,x2:n.x+1,y2:n.y+NODE_H-2}));
227
+ var slug=S("text",{"class":"slug",x:n.x+10,y:n.y+18}); slug.textContent=trunc(n.slug,30); grp.appendChild(slug);
228
+ var ttl=S("text",{"class":"ttl",x:n.x+10,y:n.y+33}); ttl.textContent=trunc(n.title,34); grp.appendChild(ttl);
229
+ var badge = n.fresh==="stale"?"!":(n.fresh==="orphaned"?"x":(n.fresh==="superseded"?"~":""));
230
+ if(badge){ var bd=S("text",{"class":"badge",x:n.x+NODE_W-14,y:n.y+16,fill:"var(--stale)"}); bd.textContent=badge; grp.appendChild(bd); }
231
+ grp.onclick=function(ev){ ev.stopPropagation(); select(this.dataset.cid); };
232
+ grp.ondblclick=function(ev){ ev.stopPropagation(); trace(this.dataset.cid); };
233
+ nodesLayer.appendChild(grp); nodeEls[n.cid]=grp; }
234
+ fit();
235
+ }
236
+ function trunc(s,n){ s=esc(s); return s.length>n? s.slice(0,n-1)+"\u2026" : s; }
237
+
238
+ // ---------- pan / zoom ----------
239
+ var vb = {x:0,y:0,w:1000,h:700};
240
+ function setVB(){ g.setAttribute("viewBox", vb.x+" "+vb.y+" "+vb.w+" "+vb.h); }
241
+ function fit(){ // fit the WHOLE graph (both dims) so the source spine + all lanes show
242
+ var pad=50; var cw=g.clientWidth||1200, ch=g.clientHeight||700;
243
+ var contentW=(D.width||1000)+pad*2, contentH=(D.height||700)+pad*2;
244
+ var vw=Math.max(contentW, contentH*cw/ch), vh=vw*ch/cw;
245
+ vb.x=-pad-(vw-contentW)/2; vb.y=-pad-(vh-contentH)/2; vb.w=vw; vb.h=vh; setVB(); }
246
+ document.getElementById("fit").onclick=fit;
247
+ var pan=null;
248
+ g.addEventListener("pointerdown", function(ev){ pan={x:ev.clientX,y:ev.clientY,vx:vb.x,vy:vb.y}; g.classList.add("grabbing"); });
249
+ window.addEventListener("pointerup", function(){ pan=null; g.classList.remove("grabbing"); });
250
+ window.addEventListener("pointermove", function(ev){ if(!pan) return;
251
+ var sx=vb.w/g.clientWidth, sy=vb.h/g.clientHeight;
252
+ vb.x = pan.vx-(ev.clientX-pan.x)*sx; vb.y=pan.vy-(ev.clientY-pan.y)*sy; setVB(); });
253
+ g.addEventListener("wheel", function(ev){ ev.preventDefault();
254
+ // gentle, magnitude-scaled zoom (trackpads fire many events per gesture, so a
255
+ // flat 10%/event compounds far too fast). Normalize line-mode deltas, clamp,
256
+ // then zoom toward the cursor.
257
+ var dy = ev.deltaY * (ev.deltaMode===1 ? 16 : 1);
258
+ dy = Math.max(-40, Math.min(40, dy));
259
+ var f = Math.exp(dy*0.0032);
260
+ var nw = vb.w*f; if(nw < 80 || nw > (D.width||1000)*8){ return; }
261
+ var rect = g.getBoundingClientRect();
262
+ var px = (ev.clientX-rect.left)/Math.max(1,rect.width), py = (ev.clientY-rect.top)/Math.max(1,rect.height);
263
+ var ax = vb.x+px*vb.w, ay = vb.y+py*vb.h;
264
+ vb.w = nw; vb.h *= f; vb.x = ax-px*vb.w; vb.y = ay-py*vb.h; setVB();
265
+ }, {passive:false});
266
+ g.addEventListener("click", function(){ clearSel(); });
267
+
268
+ // ---------- selection / highlight ----------
269
+ function neighbors(cid){ var ns={}, es=[];
270
+ for(var i=0;i<D.edges.length;i++){ var e=D.edges[i]; if(e.container) continue;
271
+ if(e.src===cid){ ns[e.dst]=1; es.push(e); } else if(e.dst===cid){ ns[e.src]=1; es.push(e); } }
272
+ return {ns:ns, es:es}; }
273
+ function clearSel(){ selected=null; g.classList.remove("dimmed");
274
+ for(var c in nodeEls){ nodeEls[c].classList.remove("sel","adj","trace"); }
275
+ for(var k in edgeEls){ edgeEls[k].classList.remove("inc","trace"); }
276
+ labelLayer.querySelectorAll(".elabel").forEach(function(x){x.remove();});
277
+ document.getElementById("panel").classList.remove("open");
278
+ if(location.hash) history.replaceState(null,"",location.pathname); }
279
+ function select(cid){ var n=byCid[cid]; if(!n) return; selected=cid;
280
+ for(var c in nodeEls){ nodeEls[c].classList.remove("sel","adj","trace"); }
281
+ for(var k in edgeEls){ edgeEls[k].classList.remove("inc","trace"); }
282
+ labelLayer.querySelectorAll(".elabel").forEach(function(x){x.remove();});
283
+ g.classList.add("dimmed"); nodeEls[cid].classList.add("sel");
284
+ var nb=neighbors(cid);
285
+ for(var d in nb.ns){ if(nodeEls[d]) nodeEls[d].classList.add("adj"); }
286
+ for(var i=0;i<nb.es.length;i++){ var e=nb.es[i]; var el=edgeEls[e.key]; if(el){ el.classList.add("inc"); edgeLabel(e); } }
287
+ buildPanel(cid);
288
+ location.hash = "node="+encodeURIComponent(n.slug);
289
+ }
290
+ function edgeLabel(e){ var s=byCid[e.src], d=byCid[e.dst]; if(!s||!d) return;
291
+ var mx=((s.x+NODE_W)+d.x)/2, my=(s.y+d.y)/2+NODE_H/2;
292
+ var w=e.type.length*6+10;
293
+ var box=S("g",{"class":"elabel"});
294
+ box.appendChild(S("rect",{x:mx-w/2,y:my-8,width:w,height:14,rx:3}));
295
+ var t=S("text",{x:mx,y:my+2,"text-anchor":"middle"}); t.setAttribute("class","elabel"); t.textContent=e.type+(e.count>1?" x"+e.count:"");
296
+ box.appendChild(t); labelLayer.appendChild(box); }
297
+
298
+ // ---------- trace to source ----------
299
+ function trace(cid){ // outgoing spine (incl. containment) + INCOMING derives to source (R5)
300
+ var keepN={}, keepE={}; var stack=[cid]; keepN[cid]=1;
301
+ while(stack.length){ var cur=stack.pop();
302
+ for(var i=0;i<D.edges.length;i++){ var e=D.edges[i];
303
+ var hit=null;
304
+ // climb the provenance spine: follow outgoing non-DERIVES (incl. the
305
+ // scoped_to/belongs_to containment that carries ac/scenario -> usecase),
306
+ // then reach the source via the usecase's INCOMING DERIVES.
307
+ if(e.src===cur && e.type!=="DERIVES"){ hit=e.dst; }
308
+ else if(e.dst===cur && e.type==="DERIVES"){ hit=e.src; }
309
+ if(hit){ if(!e.container) keepE[e.key]=1; if(!keepN[hit]){ keepN[hit]=1; stack.push(hit); } }
310
+ } }
311
+ g.classList.add("dimmed");
312
+ for(var c in nodeEls){ var on=keepN[c]; nodeEls[c].classList.toggle("trace",!!on); nodeEls[c].classList.toggle("sel", c===cid); }
313
+ for(var k in edgeEls){ edgeEls[k].classList.toggle("trace", !!keepE[k]); }
314
+ buildPanel(cid);
315
+ // no auto-zoom on interaction (owner directive) \u2014 the chain lights in place;
316
+ // use Fit to re-frame the whole traced path incl. the source.
317
+ }
318
+
319
+ // ---------- panel ----------
320
+ function buildPanel(cid){ var n=byCid[cid]; var p=document.getElementById("panel"); p.innerHTML="";
321
+ var h=E("h2"); var icon={source:"S",usecase:"U",scenario:"C",ac:"A",test:"T",stylenote:"N",gap:"G"}[n.label]||"?";
322
+ h.appendChild(E("span",{"class":"chip"},icon+" "+n.label));
323
+ var sl=E("span",{},n.slug); sl.style.cursor="copy"; sl.title="click to copy cid";
324
+ sl.onclick=function(){ if(navigator.clipboard) navigator.clipboard.writeText(n.cid); }; h.appendChild(sl);
325
+ if(n.trust) h.appendChild(E("span",{"class":"pill "+n.trust}, n.trust));
326
+ if(n.fresh && n.fresh!=="fresh") h.appendChild(E("span",{"class":"pill "+n.fresh}, n.fresh));
327
+ var close=E("button",{"class":"close"},"\xD7"); close.onclick=clearSel; h.appendChild(close);
328
+ p.appendChild(h);
329
+ p.appendChild(E("div",{"class":"crumb"}, breadcrumb(n)));
330
+ if(n.title) p.appendChild(E("div",{},esc(n.title)));
331
+ // tabs
332
+ var tabs=E("div",{"class":"tabs"}); var body=E("div");
333
+ var tContent=E("div",{"class":"tab on"},"content"), tRel=E("div",{"class":"tab"},"links"), tLin=E("div",{"class":"tab"},"lineage");
334
+ tabs.appendChild(tContent); tabs.appendChild(tRel); tabs.appendChild(tLin); p.appendChild(tabs); p.appendChild(body);
335
+ function show(which){ [tContent,tRel,tLin].forEach(function(t){t.classList.remove("on");}); which.classList.add("on");
336
+ body.innerHTML="";
337
+ if(which===tContent){ var d=E("div"); d.innerHTML=D.contentHtml[cid]||""; body.appendChild(d); }
338
+ else if(which===tRel){ body.appendChild(relations(cid)); }
339
+ else { body.appendChild(lineageView(cid)); } }
340
+ tContent.onclick=function(){show(tContent);}; tRel.onclick=function(){show(tRel);}; tLin.onclick=function(){show(tLin);};
341
+ show(tContent);
342
+ // trace button
343
+ var tb=E("button",{"class":"tab"},"Trace to source"); tb.onclick=function(){ trace(cid); };
344
+ p.appendChild(tb);
345
+ p.classList.add("open");
346
+ }
347
+ function breadcrumb(n){ var order={source:0,usecase:1,scenario:2,ac:3,test:4};
348
+ if(order[n.label]===undefined) return "annotation (" + n.label + ")";
349
+ return "source \u25B8 usecase \u25B8 scenario \u25B8 ac \u25B8 test".split(" \u25B8 ")
350
+ .filter(function(x,i){return i<=order[n.label];}).join(" \u25B8 "); }
351
+ function relations(cid){ var wrap=E("div",{"class":"rel"}); var inc={}, out={};
352
+ for(var i=0;i<D.edges.length;i++){ var e=D.edges[i];
353
+ if(e.src===cid){ (out[e.type]=out[e.type]||[]).push(e.dst); }
354
+ if(e.dst===cid){ (inc[e.type]=inc[e.type]||[]).push(e.src); } }
355
+ function group(title, map){ var keys=Object.keys(map); if(!keys.length) return;
356
+ wrap.appendChild(E("h3",{},title));
357
+ keys.forEach(function(t){ map[t].forEach(function(other){ var o=byCid[other]; if(!o) return;
358
+ var a=E("a"); a.appendChild(E("span",{"class":"et"},t)); a.appendChild(E("span",{},o.slug||other.slice(7,19)));
359
+ a.onclick=function(){ select(other); }; wrap.appendChild(a); }); }); }
360
+ group("Incoming", inc); group("Outgoing", out);
361
+ if(!wrap.querySelector("a")) wrap.appendChild(E("div",{"class":"crumb"},"no drawn relationships"));
362
+ return wrap; }
363
+ function lineageView(cid){ var wrap=E("div"); var ents=D.lineage[cid]||[];
364
+ if(!ents.length){ wrap.appendChild(E("div",{"class":"crumb"},"no recorded lineage")); return wrap; }
365
+ ents.forEach(function(en){ var d=E("div",{"class":"lin"});
366
+ d.appendChild(E("div",{"class":"seq"}, (en.seq?("seq "+en.seq):en.kind)+(en.ts?(" "+en.ts.slice(0,10)):"")));
367
+ d.appendChild(E("div",{}, en.kind+": "+esc(en.detail)));
368
+ if(en.seq) d.style.cursor="pointer"; if(en.seq) d.onclick=function(){ railSelect(en.seq); };
369
+ wrap.appendChild(d); });
370
+ return wrap; }
371
+
372
+ // ---------- filters ----------
373
+ function applyFilters(){ var q=(document.getElementById("search").value||"").toLowerCase();
374
+ for(var c in nodeEls){ var n=byCid[c]; var show=true;
375
+ if(q && (n.slug+" "+n.title).toLowerCase().indexOf(q)<0) show=false;
376
+ if(typeFilter && n.label!==typeFilter) show=false;
377
+ if(trustFilter==="stale"){ if(n.fresh==="fresh") show=false; }
378
+ else if(trustFilter && n.trust!==trustFilter) show=false;
379
+ if(n.superseded && !showSuperseded) show=false;
380
+ nodeEls[c].classList.toggle("hiddennode", !show); }
381
+ for(var k in edgeEls){ var e2=edgeEls[k];
382
+ var famOff = !famVisible[e2.dataset.family];
383
+ var ns = nodeEls[e2.dataset.src], nd = nodeEls[e2.dataset.dst];
384
+ var hidden = famOff || (ns&&ns.classList.contains("hiddennode")) || (nd&&nd.classList.contains("hiddennode"));
385
+ e2.classList.toggle("hiddenfam", hidden); } }
386
+
387
+ // ---------- legend ----------
388
+ function buildLegend(){ var l=document.getElementById("legend"); l.innerHTML="";
389
+ l.appendChild(E("div",{"style":"font-weight:600;margin-bottom:4px"},"edges (click to toggle)"));
390
+ var fams=[["derivation","derives"],["linkage","automates"],["mesh","exercises/verifies"],["crosslink","depends/reuses"],["annotation","annotates"]];
391
+ fams.forEach(function(f){ var r=E("div",{"class":"row"});
392
+ var sw=E("span",{"class":"sw"}); sw.style.borderColor="var(--f-"+f[0]+")"; r.appendChild(sw);
393
+ r.appendChild(E("label",{}, f[1]));
394
+ r.onclick=function(){ famVisible[f[0]]=!famVisible[f[0]]; r.style.opacity=famVisible[f[0]]?"1":"0.4"; applyFilters(); };
395
+ l.appendChild(r); });
396
+ var ss=E("div",{"class":"row"}); var cb=E("input",{"type":"checkbox"});
397
+ cb.onchange=function(){ showSuperseded=cb.checked; applyFilters(); };
398
+ ss.appendChild(cb); ss.appendChild(E("label",{},"include superseded")); l.appendChild(ss);
399
+ l.appendChild(E("div",{"style":"margin-top:6px;color:var(--muted)"},"dbl-click a node = trace to source")); }
400
+
401
+ // ---------- rail ----------
402
+ function buildRail(){ var r=document.getElementById("rail"); r.innerHTML="";
403
+ D.commits.forEach(function(c){ var t=E("div",{"class":"tick"}); t.dataset.seq=c.seq;
404
+ t.appendChild(E("div",{"class":"k"}, "#"+c.seq+" "+c.kind));
405
+ t.appendChild(E("div",{}, c.label));
406
+ t.onclick=function(){ railSelect(c.seq); }; r.appendChild(t); }); }
407
+ function railSelect(seq){ var c=null; for(var i=0;i<D.commits.length;i++) if(D.commits[i].seq===seq) c=D.commits[i];
408
+ if(!c) return;
409
+ document.querySelectorAll("#rail .tick").forEach(function(t){ t.classList.toggle("on", t.dataset.seq==seq); });
410
+ // highlight born nodes + edges, plus reviewed nodes for review commits (R8)
411
+ var mark={}; c.mintedNodeCids.forEach(function(x){mark[x]=1;}); c.reviewedNodeCids.forEach(function(x){mark[x]=1;});
412
+ var emark={}; c.mintedEdgeKeys.forEach(function(k){emark[k]=1;});
413
+ g.classList.add("dimmed");
414
+ for(var cc in nodeEls){ nodeEls[cc].classList.toggle("adj", !!mark[cc]); nodeEls[cc].classList.remove("sel","trace"); }
415
+ for(var k in edgeEls){ edgeEls[k].classList.toggle("inc", !!emark[k]); }
416
+ location.hash = "seq="+seq;
417
+ }
418
+
419
+ // ---------- hash restore ----------
420
+ function restoreHash(){ var h=location.hash.replace(/^#/,""); if(!h) return;
421
+ var m=/node=([^&]+)/.exec(h); if(m){ var slug=decodeURIComponent(m[1]);
422
+ for(var c in byCid) if(byCid[c].slug===slug){ select(c); return; } }
423
+ var s=/seq=(d+)/.exec(h); if(s){ railSelect(parseInt(s[1],10)); } }
424
+
425
+ document.getElementById("clear").onclick=clearSel;
426
+
427
+ buildHeader(); buildLegend(); renderGraph(); buildRail();
428
+ applyFilters(); // hide superseded (and apply any default filters) on first paint
429
+ window.addEventListener("resize", function(){ /* keep viewBox; user can Fit */ });
430
+ restoreHash();
431
+ })();
432
+ </script>
433
+ </body>
434
+ </html>`;function te(t){let r=W(JSON.stringify(t));return ee.split(Q).join(r)}async function fe(t,r,e=process.cwd()){let a=T(e,r);if(!a)return 2;let s=A(a),{records:l,hashes:d}=V(a),i=Z(s,l,d,a);if(t.json)return r.out(JSON.stringify(i)),0;let o=te(i),p=X(i.meta.tipHash??"empty"),f=t.out??ge(pe(),"kane-context-view-"+p+".html");if(ce(ue(f),{recursive:!0}),le(f,o),r.out(f),t.open??r.isTTY)try{await(await import("./open-MQLQKFAW.js")).default(f)}catch{}return 0}async function Xe(t){let r=await fe(t,{out:e=>process.stdout.write(e+`
435
+ `),err:e=>process.stderr.write(e+`
436
+ `),confirm:async()=>!0,isTTY:process.stdout.isTTY??!1});return await new Promise(e=>process.stdout.write("",()=>e())),r}export{fe as runViewCommand,Xe as viewCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testmuai/kane-cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "KaneAI Terminal UI — browser automation testing agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,11 +26,11 @@
26
26
  "ws": "^8.20.0"
27
27
  },
28
28
  "optionalDependencies": {
29
- "@testmuai/kane-cli-darwin-arm64": "0.5.0",
30
- "@testmuai/kane-cli-darwin-x64": "0.5.0",
31
- "@testmuai/kane-cli-linux-x64": "0.5.0",
32
- "@testmuai/kane-cli-linux-arm64": "0.5.0",
33
- "@testmuai/kane-cli-win-x64": "0.5.0",
29
+ "@testmuai/kane-cli-darwin-arm64": "0.6.1",
30
+ "@testmuai/kane-cli-darwin-x64": "0.6.1",
31
+ "@testmuai/kane-cli-linux-x64": "0.6.1",
32
+ "@testmuai/kane-cli-linux-arm64": "0.6.1",
33
+ "@testmuai/kane-cli-win-x64": "0.6.1",
34
34
  "sharp": "^0.34.5"
35
35
  },
36
36
  "publishConfig": {
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as P,b as g,c as f}from"./chunk-THEZSXZM.js";import"./chunk-V2GYBVSM.js";import"./chunk-HFXQU7UZ.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 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-Y44AETOW.js";import"./chunk-3FN66LTP.js";import"./chunk-DJL47DYJ.js";import"./chunk-NFOBDHZK.js";import"./chunk-L5LI2JF4.js";import"./chunk-7KDNH6JP.js";import"./chunk-UOGJUJCF.js";import"./chunk-HFXQU7UZ.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as EvidenceViewOffer};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-XDERMCAU.js";import"./chunk-YCCUBQY4.js";import"./chunk-AM5WZPPY.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-UOGJUJCF.js";import"./chunk-RZ4F3BHX.js";import"./chunk-YSIYPC4R.js";import"./chunk-HFXQU7UZ.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 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as f,b as r,x as t}from"./chunk-HFXQU7UZ.js";import{a as T}from"./chunk-HCBYKLMW.js";import{a as n,b as o,j as p,k as x}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}=p(),{stdout:a}=x(),l=a?.columns??80;return(0,w.useEffect)(()=>{let m=setTimeout(()=>c(),50);return()=>clearTimeout(m)},[c]),(0,e.jsxs)(n,{flexDirection:"column",children:[(0,e.jsxs)(n,{paddingX:1,paddingTop:1,flexDirection:"column",children:[(0,e.jsx)(o,{color:t.orange,bold:!0,children:r}),(0,e.jsxs)(n,{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)(n,{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.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)(s,{long:"--max-steps",arg:"<n>",desc:"Max agent steps (default: 30)"}),(0,e.jsx)(s,{long:"--timeout",arg:"<sec>",desc:"Kill run after N seconds"}),(0,e.jsx)(s,{long:"--headless",desc:"No visible browser window"}),(0,e.jsx)(s,{long:"--mode",arg:"<action|testing>",desc:"Run mode (default: testing)"}),(0,e.jsx)(s,{long:"--name",arg:"<name>",desc:"Persist session under this name"}),(0,e.jsx)(s,{long:"--variables",arg:"<json>",desc:"Inline variables as JSON"}),(0,e.jsx)(s,{long:"--variables-file",arg:"<path>",desc:"Load variables from file"}),(0,e.jsx)(s,{long:"--session-context",arg:"<json>",desc:"Prior runs context JSON"}),(0,e.jsx)(s,{long:"--global-context",arg:"<file>",desc:"Override global context markdown"}),(0,e.jsx)(s,{long:"--local-context",arg:"<file>",desc:"Override local context markdown"}),(0,e.jsx)(s,{long:"--ws-endpoint",arg:"<url>",desc:"Remote browser (LambdaTest)"}),(0,e.jsx)(s,{long:"--cdp-endpoint",arg:"<url>",desc:"Connect to existing Chrome CDP"}),(0,e.jsx)(s,{long:"--task-skills",desc:"Domain-specific task skills (experimental)"}),(0,e.jsx)(s,{long:"--code-export",desc:"Generate code export after upload"}),(0,e.jsx)(s,{long:"--code-language",arg:"<lang>",desc:"Code export language: python | javascript"}),(0,e.jsx)(s,{long:"--skip-code-validation",desc:"Skip post-codegen validation"}),(0,e.jsx)(s,{long:"--username",arg:"<user>",desc:"Basic auth (skip OAuth)"}),(0,e.jsx)(s,{long:"--access-key",arg:"<key>",desc:"Basic auth access key"}),(0,e.jsx)(s,{long:"--env",arg:"<name>",desc:"Environment (prod or stage)"}),(0,e.jsx)(s,{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)(n,{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)(n,{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)(n,{gap:3,children:[(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dim,children:"Docs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:b})]}),(0,e.jsxs)(n,{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)(n,{flexDirection:"column",marginBottom:1,children:[(0,e.jsx)(n,{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)(n,{marginLeft:2,children:[(0,e.jsxs)(n,{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)(n,{marginLeft:2,children:[(0,e.jsx)(n,{width:16,children:(0,e.jsx)(o,{color:m?t.orange:t.green,bold:!0,children:c})}),(0,e.jsx)(n,{width:32,children:a?(0,e.jsx)(o,{color:t.dim,children:a}):null}),(0,e.jsx)(o,{color:t.dim,children:l})]})}function s({long:c,arg:a,desc:l,highlight:m}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsxs)(n,{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)(n,{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 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-5MTRNUAK.js";import"./chunk-7YRNLGUT.js";import"./chunk-T4PKTWZ6.js";import"./chunk-YCNCW4O4.js";import"./chunk-FPFOW6BS.js";import"./chunk-WAOCHXJ5.js";import"./chunk-L5LI2JF4.js";import"./chunk-6E5UYAEB.js";import"./chunk-XDERMCAU.js";import"./chunk-YCCUBQY4.js";import"./chunk-AM5WZPPY.js";import"./chunk-7KDNH6JP.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-VE3SUJMA.js";import"./chunk-GEAWRRR7.js";import"./chunk-UOGJUJCF.js";import"./chunk-RZ4F3BHX.js";import"./chunk-IECUFWIZ.js";import"./chunk-YSIYPC4R.js";import"./chunk-HFXQU7UZ.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SingleShotApp};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{g as a}from"./chunk-AFCEFOIK.js";import"./chunk-V2GYBVSM.js";import"./chunk-PISZLYS5.js";import"./chunk-NAYAVVTP.js";import"./chunk-7KDNH6JP.js";import"./chunk-UOGJUJCF.js";import"./chunk-ZWAZ4QU4.js";import"./chunk-7IBNOVML.js";import"./chunk-C6S4IEBC.js";import"./chunk-HFXQU7UZ.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as TestMdRunView};