@testmuai/kane-cli 0.9.0 → 0.10.0-rc.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 (634) hide show
  1. package/dist/ChatSurface-VPD5G67Q.js +2 -0
  2. package/dist/ChromeProfilePicker-CRKQEFYD.js +2 -0
  3. package/dist/CliFeedbackPrompt-M7BMWLKK.js +2 -0
  4. package/dist/CliUploadProgress-OP7DXMC2.js +2 -0
  5. package/dist/ConfigView-XI74BCCH.js +2 -0
  6. package/dist/EvidenceViewOffer-HAAK6DS5.js +2 -0
  7. package/dist/FolderPicker-W5S6RFCP.js +2 -0
  8. package/dist/InfoBox-OWUEHV2D.js +2 -0
  9. package/dist/LinksBox-PNSESNCU.js +2 -0
  10. package/dist/ProfilesView-PYDZZHKO.js +2 -0
  11. package/dist/ProjectPicker-BGFCUGT5.js +2 -0
  12. package/dist/SaveSessionPrompt-SUJE54GS.js +2 -0
  13. package/dist/ScrollbackTap-4SPXGFMU.js +2 -0
  14. package/dist/SingleShotApp-4TDXZEUA.js +2 -0
  15. package/dist/SummaryBox-FALOODAQ.js +2 -0
  16. package/dist/TestMdRunView-4GPRWHEU.js +2 -0
  17. package/dist/TestrunEvidenceTable-OBVQJ6IO.js +2 -0
  18. package/dist/WhoamiView-6WXGRANY.js +2 -0
  19. package/dist/{agent-parse-2MLJOJTH.js → agent-parse-CAS45UKA.js} +1 -1
  20. package/dist/app-client-U2YYF65L.js +2 -0
  21. package/dist/app-download-RXVZB6MM.js +2 -0
  22. package/dist/assurance-job-C3TXZGLL.js +7 -0
  23. package/dist/auth-7Z54TMQQ.js +2 -0
  24. package/dist/{binary-LVHXED3O.js → binary-DJCDMGPX.js} +1 -1
  25. package/dist/bind-XVO4CQYV.js +2 -0
  26. package/dist/bootstrap-TY5RANJ7.js +2 -0
  27. package/dist/bridge-T6QMYKED.js +2 -0
  28. package/dist/build-5ZN47FAT.js +2 -0
  29. package/dist/catalog-RRQF4TCA.js +2 -0
  30. package/dist/{changelog-N5AZHXOS.js → changelog-GBEVIUFJ.js} +1 -1
  31. package/dist/chat-committer-ZCSRJEUB.js +2 -0
  32. package/dist/chat-controller-XINCDH6Z.js +2 -0
  33. package/dist/child-G2GCW73X.js +2 -0
  34. package/dist/chunk-22PIMG52.js +2 -0
  35. package/dist/chunk-252FWF2G.js +19 -0
  36. package/dist/{chunk-UWXDURAB.js → chunk-2IZRPMZN.js} +1 -1
  37. package/dist/{chunk-X2A6CC6B.js → chunk-2NFS4KE4.js} +1 -1
  38. package/dist/{chunk-ZXY4P76I.js → chunk-2OOFURWD.js} +1 -1
  39. package/dist/chunk-2OSFI33O.js +97 -0
  40. package/dist/{chunk-CSNJPD2J.js → chunk-2S3W2JT3.js} +3 -3
  41. package/dist/chunk-2SWSVJUP.js +12 -0
  42. package/dist/chunk-2TVPA3LL.js +2 -0
  43. package/dist/{chunk-FMUV6UCX.js → chunk-2XW33VOK.js} +1 -1
  44. package/dist/chunk-33DWJV67.js +235 -0
  45. package/dist/chunk-34R7BNZ2.js +2 -0
  46. package/dist/chunk-35ECWCCK.js +2 -0
  47. package/dist/chunk-3BSYOCSW.js +3 -0
  48. package/dist/chunk-3G2LSTK5.js +2 -0
  49. package/dist/chunk-3GXN6VF6.js +2 -0
  50. package/dist/chunk-3JLEDSG5.js +4 -0
  51. package/dist/chunk-3QICDXY5.js +5 -0
  52. package/dist/chunk-3UVSAAES.js +10 -0
  53. package/dist/chunk-42PALMW2.js +4 -0
  54. package/dist/chunk-432ZOE42.js +21 -0
  55. package/dist/chunk-44B6THYK.js +2 -0
  56. package/dist/chunk-47WQBG5I.js +6 -0
  57. package/dist/{chunk-DOOI2JBD.js → chunk-4D5PC6QE.js} +1 -1
  58. package/dist/chunk-4I7YN6YY.js +3 -0
  59. package/dist/chunk-4IEQNX7F.js +2 -0
  60. package/dist/{chunk-KXEE6VCA.js → chunk-4LPX2OLV.js} +1 -1
  61. package/dist/chunk-4LTHDJ3D.js +2 -0
  62. package/dist/chunk-4QTH7VYE.js +2 -0
  63. package/dist/chunk-54XA5MZH.js +2 -0
  64. package/dist/chunk-57MDWTON.js +2 -0
  65. package/dist/{chunk-CNUCP6DK.js → chunk-5BUIIFLC.js} +1 -1
  66. package/dist/{chunk-AKE2CTV6.js → chunk-5D7ENQTQ.js} +1 -1
  67. package/dist/chunk-63EKRZKI.js +2 -0
  68. package/dist/{chunk-EHN5HTUD.js → chunk-65VANXOF.js} +51 -51
  69. package/dist/chunk-672CQECV.js +47 -0
  70. package/dist/chunk-6LIC2R22.js +3 -0
  71. package/dist/chunk-6NFOH4AC.js +4 -0
  72. package/dist/chunk-6NWT2TEJ.js +2 -0
  73. package/dist/chunk-6PIIUAZF.js +3 -0
  74. package/dist/{chunk-4CYBXJIA.js → chunk-6U7ID777.js} +1 -1
  75. package/dist/chunk-6UVIY56J.js +2 -0
  76. package/dist/chunk-72KYMWQ5.js +2 -0
  77. package/dist/chunk-72RC7JSA.js +21 -0
  78. package/dist/chunk-74W4AOT2.js +2 -0
  79. package/dist/chunk-77ZZQJLX.js +2 -0
  80. package/dist/chunk-7DFBOVUB.js +2 -0
  81. package/dist/chunk-7EXDYXXD.js +2 -0
  82. package/dist/chunk-7HO4NX5W.js +1 -0
  83. package/dist/chunk-7KX2BHKG.js +2 -0
  84. package/dist/chunk-7LKCWO2R.js +11 -0
  85. package/dist/{chunk-ULGZPRKU.js → chunk-7NCJMWFX.js} +1 -1
  86. package/dist/{chunk-EBLXHOE3.js → chunk-7RPKHKA3.js} +1 -1
  87. package/dist/chunk-7RWP4Y3H.js +2 -0
  88. package/dist/chunk-7V4BQSSV.js +2 -0
  89. package/dist/chunk-7XBNMOH4.js +6 -0
  90. package/dist/chunk-A6TJOZ24.js +2 -0
  91. package/dist/chunk-AA674WLL.js +2 -0
  92. package/dist/chunk-AIXJYMSP.js +9 -0
  93. package/dist/chunk-AJQZ3ST5.js +8 -0
  94. package/dist/chunk-AQ2OG2EF.js +2 -0
  95. package/dist/chunk-AUJSC7PU.js +4 -0
  96. package/dist/chunk-AVI5H4UM.js +13 -0
  97. package/dist/chunk-AZLNLHUA.js +4 -0
  98. package/dist/chunk-B2HXPGIZ.js +26 -0
  99. package/dist/{chunk-HGFWIBVF.js → chunk-B7ZX5HEN.js} +5 -5
  100. package/dist/{chunk-WRSIKZ2V.js → chunk-BJJUKB5K.js} +1 -1
  101. package/dist/{chunk-66MOZKD2.js → chunk-BSRSXYDZ.js} +1 -1
  102. package/dist/{chunk-4BZOG6PE.js → chunk-BVO4C5F2.js} +1 -1
  103. package/dist/chunk-BWXLZS5O.js +2 -0
  104. package/dist/chunk-BY65QAAN.js +4 -0
  105. package/dist/chunk-BZVNI44O.js +6 -0
  106. package/dist/chunk-C5Z7MQE6.js +2 -0
  107. package/dist/chunk-C6HI6Y3S.js +2 -0
  108. package/dist/chunk-CB4ARIHR.js +2 -0
  109. package/dist/{chunk-C25M2J5Q.js → chunk-CPBBYNL7.js} +1 -1
  110. package/dist/{chunk-75MMTNPB.js → chunk-D4FFXCX6.js} +2 -2
  111. package/dist/chunk-D756UWY2.js +6 -0
  112. package/dist/chunk-DBMW3VUN.js +4 -0
  113. package/dist/chunk-DD5TULWQ.js +34 -0
  114. package/dist/{chunk-Q5RDCSYM.js → chunk-DDJNYQBH.js} +1 -1
  115. package/dist/{chunk-6HU5M2DS.js → chunk-DHQ4SQWA.js} +1 -1
  116. package/dist/chunk-DNGOT65K.js +3 -0
  117. package/dist/chunk-DPGOAFKF.js +2 -0
  118. package/dist/chunk-DREQ3RAA.js +2 -0
  119. package/dist/chunk-DTUPEKEO.js +2 -0
  120. package/dist/chunk-E6KSRQXL.js +8 -0
  121. package/dist/chunk-EF47KRUK.js +2 -0
  122. package/dist/chunk-ENL4XTQ2.js +2 -0
  123. package/dist/chunk-EXFDIVNI.js +9 -0
  124. package/dist/chunk-EZN7CF45.js +4 -0
  125. package/dist/chunk-F3U6T4YD.js +22 -0
  126. package/dist/{chunk-DHJSM5DT.js → chunk-FCD3NYOM.js} +1 -1
  127. package/dist/chunk-FFL55I2M.js +2 -0
  128. package/dist/chunk-FIP5L6LV.js +9 -0
  129. package/dist/chunk-FOJHSG5M.js +6 -0
  130. package/dist/chunk-FSYOTRMC.js +2 -0
  131. package/dist/chunk-GFLB2SHW.js +2 -0
  132. package/dist/chunk-GMTHZUZ3.js +2 -0
  133. package/dist/chunk-GRURFGBP.js +2 -0
  134. package/dist/chunk-GZFLJORM.js +2 -0
  135. package/dist/{chunk-EOA6YPES.js → chunk-H3HHSTEK.js} +4 -4
  136. package/dist/chunk-HAW5WEKT.js +13 -0
  137. package/dist/chunk-HFJSP4KD.js +2 -0
  138. package/dist/chunk-HHW6MRU3.js +6 -0
  139. package/dist/chunk-HIUAUZNL.js +2 -0
  140. package/dist/chunk-HJLMH7ZM.js +2 -0
  141. package/dist/{chunk-5GUD3CIH.js → chunk-HQ2E2XCU.js} +1 -1
  142. package/dist/{chunk-K3IQEL7R.js → chunk-I2KOGINW.js} +1 -1
  143. package/dist/chunk-I2MC6VVX.js +2 -0
  144. package/dist/chunk-I5NSJBOZ.js +2 -0
  145. package/dist/chunk-I6OQISK4.js +2 -0
  146. package/dist/chunk-IBBD36FQ.js +2 -0
  147. package/dist/{chunk-GCISXCDU.js → chunk-IINZZ4BZ.js} +1 -1
  148. package/dist/{chunk-M3UAZTDK.js → chunk-IMDMRJQ6.js} +2 -2
  149. package/dist/chunk-IXW7FOGX.js +2 -0
  150. package/dist/chunk-IZ65ZPWY.js +3 -0
  151. package/dist/chunk-JD52IXON.js +9 -0
  152. package/dist/chunk-JGRXMTME.js +15 -0
  153. package/dist/{chunk-NBXYL2JT.js → chunk-JIRNI5TB.js} +7 -7
  154. package/dist/chunk-JNSWKGTB.js +2 -0
  155. package/dist/chunk-JPYW6U4D.js +2 -0
  156. package/dist/chunk-JQSLUGD4.js +3 -0
  157. package/dist/{chunk-GFBAK7WQ.js → chunk-K45BKGB5.js} +7 -7
  158. package/dist/chunk-KF4DKXSS.js +2 -0
  159. package/dist/chunk-KGNE5CIM.js +2 -0
  160. package/dist/chunk-KM3YCIDV.js +3 -0
  161. package/dist/chunk-KU3YHPWZ.js +2 -0
  162. package/dist/chunk-L4UVUFL6.js +3 -0
  163. package/dist/chunk-LCSJ7GOG.js +2 -0
  164. package/dist/chunk-LKQFG4RW.js +5 -0
  165. package/dist/chunk-LNNWCBPQ.js +2 -0
  166. package/dist/chunk-LRS5MGBY.js +3 -0
  167. package/dist/chunk-LRXBJTD4.js +4 -0
  168. package/dist/chunk-LSDJOVWW.js +6 -0
  169. package/dist/chunk-LWJRSUE2.js +2 -0
  170. package/dist/chunk-LX2I4JEH.js +2 -0
  171. package/dist/{chunk-RWSOZPJQ.js → chunk-M6MBMRFR.js} +1 -1
  172. package/dist/chunk-MGNRNLBE.js +2 -0
  173. package/dist/chunk-MII3JOO3.js +4 -0
  174. package/dist/chunk-MNBGG4H3.js +16 -0
  175. package/dist/chunk-MYVKUJGS.js +2 -0
  176. package/dist/chunk-MYZHOBS4.js +2 -0
  177. package/dist/chunk-MZOIHUVX.js +27 -0
  178. package/dist/{chunk-7GAHJZLH.js → chunk-N3TCNZSX.js} +1 -1
  179. package/dist/chunk-NC7D7GOM.js +21 -0
  180. package/dist/{chunk-HAYV4D2I.js → chunk-NDEI7R4K.js} +1 -1
  181. package/dist/{chunk-BL3SJDCG.js → chunk-NFRA64NU.js} +1 -1
  182. package/dist/chunk-NLZZLANH.js +4 -0
  183. package/dist/{chunk-DWMESHFI.js → chunk-NQTYWHPB.js} +1 -1
  184. package/dist/chunk-NWBLYMH7.js +3 -0
  185. package/dist/chunk-NWD54VV5.js +2 -0
  186. package/dist/chunk-NXRF7FFS.js +2 -0
  187. package/dist/chunk-O3HHTKZ5.js +6 -0
  188. package/dist/{chunk-F7NSSQYZ.js → chunk-OAKYUBD3.js} +1 -1
  189. package/dist/{chunk-7WXMV3O3.js → chunk-OEWYXCTA.js} +1 -1
  190. package/dist/{chunk-4FHK4LKQ.js → chunk-OF7WPCTQ.js} +1 -1
  191. package/dist/chunk-OFSDB7B4.js +3 -0
  192. package/dist/chunk-OJ33Q6DU.js +2 -0
  193. package/dist/chunk-OQ5G773E.js +2 -0
  194. package/dist/chunk-OVNRRI4E.js +2 -0
  195. package/dist/{chunk-C6S2RPZA.js → chunk-OZNBTSW5.js} +1 -1
  196. package/dist/chunk-P2ZQDQDB.js +2 -0
  197. package/dist/chunk-P7MSVLAH.js +6 -0
  198. package/dist/chunk-PUVMC4PX.js +26 -0
  199. package/dist/{chunk-SEEEGDVK.js → chunk-PZA3BSOE.js} +1 -1
  200. package/dist/chunk-Q3C6NDGI.js +2 -0
  201. package/dist/chunk-QCKA665H.js +2 -0
  202. package/dist/chunk-QDFY5GGO.js +5 -0
  203. package/dist/{chunk-YBAVDT3G.js → chunk-QHRUBG7J.js} +1 -1
  204. package/dist/chunk-QI5RZ7LL.js +2 -0
  205. package/dist/chunk-QNLVC5ZB.js +2 -0
  206. package/dist/{chunk-WDMUPK6I.js → chunk-QQ4TKLWP.js} +1 -1
  207. package/dist/chunk-QS5ZJFGF.js +4 -0
  208. package/dist/chunk-QTZBVDPR.js +12 -0
  209. package/dist/chunk-QXQ7KVEN.js +2 -0
  210. package/dist/chunk-R4JUKTDO.js +2 -0
  211. package/dist/chunk-R7KXAISS.js +12 -0
  212. package/dist/chunk-RDP7GWSY.js +2 -0
  213. package/dist/chunk-REKHAN53.js +5 -0
  214. package/dist/{chunk-KWEOLPBJ.js → chunk-RFEON5GN.js} +1 -1
  215. package/dist/{chunk-SOCHN2PY.js → chunk-RFIIM33J.js} +1 -1
  216. package/dist/chunk-RG372DON.js +6 -0
  217. package/dist/chunk-RPRXRKKR.js +2 -0
  218. package/dist/chunk-RTVWQK7I.js +2 -0
  219. package/dist/{chunk-2PKME4VT.js → chunk-RW3Z2HMB.js} +4 -4
  220. package/dist/chunk-RX47NRSM.js +2 -0
  221. package/dist/chunk-RX6776AI.js +5 -0
  222. package/dist/chunk-S53AQU7R.js +6 -0
  223. package/dist/{chunk-XT7XA4DN.js → chunk-SA6IKFFD.js} +1 -1
  224. package/dist/{chunk-Q5CINJYL.js → chunk-SLKYD44Y.js} +1 -1
  225. package/dist/chunk-SMTBOSEJ.js +2 -0
  226. package/dist/chunk-SMXABALN.js +2 -0
  227. package/dist/chunk-SONMD3W5.js +5 -0
  228. package/dist/chunk-SWMTXMKB.js +2 -0
  229. package/dist/{chunk-TM7VRLWS.js → chunk-SXRHKXSE.js} +1 -1
  230. package/dist/chunk-T3HEJASG.js +5 -0
  231. package/dist/chunk-T4AVLJCW.js +6 -0
  232. package/dist/{chunk-6VY62QC2.js → chunk-T6K2MEWP.js} +1 -1
  233. package/dist/{chunk-PCKIANML.js → chunk-T7H4LBFK.js} +1 -1
  234. package/dist/chunk-TNORODUF.js +2 -0
  235. package/dist/chunk-TW63WWEN.js +2 -0
  236. package/dist/chunk-UALJTPSA.js +18 -0
  237. package/dist/chunk-UAWWLLTI.js +2 -0
  238. package/dist/chunk-UEE3RZN4.js +14 -0
  239. package/dist/chunk-UTM7D4PI.js +2 -0
  240. package/dist/chunk-UUJIGOEO.js +2 -0
  241. package/dist/chunk-UYDHOHSZ.js +2 -0
  242. package/dist/chunk-V5JGXOV7.js +2 -0
  243. package/dist/chunk-V7S6S5W3.js +2 -0
  244. package/dist/{chunk-OHOJSADN.js → chunk-VG44B5JD.js} +1 -1
  245. package/dist/chunk-VJGWVBZR.js +1 -0
  246. package/dist/chunk-VLDCHFXF.js +2 -0
  247. package/dist/chunk-VO66KP2W.js +2 -0
  248. package/dist/{chunk-J3BGYSMD.js → chunk-VQLH63X7.js} +8 -8
  249. package/dist/chunk-VRIZDOO5.js +2 -0
  250. package/dist/chunk-VYHT2IET.js +1397 -0
  251. package/dist/chunk-VZJ6LUXX.js +2 -0
  252. package/dist/chunk-W3OVSDBN.js +29 -0
  253. package/dist/chunk-W7FLXW6Q.js +5 -0
  254. package/dist/{chunk-UA2QDAWT.js → chunk-WEM3MOAL.js} +1 -1
  255. package/dist/chunk-WI7K6VKQ.js +2 -0
  256. package/dist/chunk-WMGKUERB.js +6 -0
  257. package/dist/{chunk-DFS4RMVP.js → chunk-WN5VKKJ3.js} +1 -1
  258. package/dist/chunk-WOSANGV6.js +5 -0
  259. package/dist/chunk-WYSZ6TPW.js +15 -0
  260. package/dist/chunk-XB6BJPDL.js +2 -0
  261. package/dist/{chunk-YWYORBY3.js → chunk-XBEYWXPV.js} +1 -1
  262. package/dist/chunk-XIPKSXRQ.js +16 -0
  263. package/dist/chunk-XJ7HCXKW.js +2 -0
  264. package/dist/chunk-XMPTFXPW.js +5 -0
  265. package/dist/chunk-XZYA7DNH.js +2 -0
  266. package/dist/chunk-Y4T4SLDO.js +2 -0
  267. package/dist/{chunk-OIUV3ISA.js → chunk-Y6Y6RAY4.js} +1 -1
  268. package/dist/chunk-YDPTSDIJ.js +2 -0
  269. package/dist/chunk-YDSGXB25.js +2 -0
  270. package/dist/chunk-YIKF4ERQ.js +375 -0
  271. package/dist/chunk-Z55KBMYV.js +2 -0
  272. package/dist/chunk-ZCRZFAOT.js +2 -0
  273. package/dist/chunk-ZFM77AQU.js +2 -0
  274. package/dist/{chunk-Q6F23V7L.js → chunk-ZFMRQ57Y.js} +1 -1
  275. package/dist/chunk-ZHWU6L2G.js +5 -0
  276. package/dist/chunk-ZTHYAHDN.js +17 -0
  277. package/dist/chunk-ZZP5SHUV.js +3 -0
  278. package/dist/committer-JGY66PFM.js +2 -0
  279. package/dist/config-5ZOALGKE.js +2 -0
  280. package/dist/controller-client-PB3AZAGG.js +2 -0
  281. package/dist/cover-cmd-UA2SVIZZ.js +2 -0
  282. package/dist/{credentials-QD32Y7K7.js → credentials-MRG452Y6.js} +1 -1
  283. package/dist/{deps-bundle-OI7JJ22L.js → deps-bundle-FWINW4XM.js} +1 -1
  284. package/dist/{deps-resolve-ZOALDS6H.js → deps-resolve-IET4KIBO.js} +1 -1
  285. package/dist/descriptor-7T32VRMB.js +2 -0
  286. package/dist/design-chat-MM5PJD2N.js +2 -0
  287. package/dist/design-committer-TRYP3LOZ.js +2 -0
  288. package/dist/design-headless-FZONCKHW.js +2 -0
  289. package/dist/design-remote-SPVRIY2H.js +3 -0
  290. package/dist/device-env-LXJ65AVF.js +2 -0
  291. package/dist/dispatch-DVQ3H7EJ.js +2 -0
  292. package/dist/doctor-VAX2BWQF.js +2 -0
  293. package/dist/docx-convert-6IZO5P5K.js +2 -0
  294. package/dist/{dossier-7HVC6BNK.js → dossier-NROC2MCY.js} +1 -1
  295. package/dist/evidence-LVVK7ROT.js +2 -0
  296. package/dist/evidence-presentation-YYTIDCBS.js +2 -0
  297. package/dist/evolve-cmd-AGRKG7T3.js +2 -0
  298. package/dist/evolve-remote-BGHULJTL.js +2 -0
  299. package/dist/{exit-manager-ZLDO54S4.js → exit-manager-EDHCETUN.js} +1 -1
  300. package/dist/explain-DGJ5T6V5.js +2 -0
  301. package/dist/explain-cmd-VYAANFFZ.js +4 -0
  302. package/dist/explain-cmd-WOBGS6KX.js +12 -0
  303. package/dist/explore-LOKNOVNP.js +2 -0
  304. package/dist/explore-context-tty-JTZVZFOE.js +2 -0
  305. package/dist/explore-entry-5OGNLFAU.js +6 -0
  306. package/dist/explore-live-2XZHUYFS.js +5 -0
  307. package/dist/explore-run-tty-LGTIK2NA.js +5 -0
  308. package/dist/extract-bind-NM2BBK4I.js +14 -0
  309. package/dist/extract-chat-HLQMJJIC.js +2 -0
  310. package/dist/extract-cmd-T2TSAC3N.js +6 -0
  311. package/dist/extract-headless-OQTQ3FJK.js +2 -0
  312. package/dist/feeder-NY45UFJK.js +2 -0
  313. package/dist/folder-flags-WXUR6OPJ.js +2 -0
  314. package/dist/gaps-cmd-PTSKPTF7.js +3 -0
  315. package/dist/gate-P57VP4E5.js +2 -0
  316. package/dist/gate-WISOUTHQ.js +2 -0
  317. package/dist/{generate-headless-6WMJYNI6.js → generate-headless-JYZP6VXZ.js} +3 -3
  318. package/dist/headless-io-FFM5T6KL.js +2 -0
  319. package/dist/hold-passthrough-IOWPVB4W.js +2 -0
  320. package/dist/identity-HL5CJJXR.js +2 -0
  321. package/dist/index.js +178 -160
  322. package/dist/ingest-PDGS5ZTL.js +2 -0
  323. package/dist/ingest-cmd-LHCBMO4Z.js +8 -0
  324. package/dist/ingest-remote-D5TO5JQP.js +2 -0
  325. package/dist/ink-screen-RZ7QDIUI.js +2 -0
  326. package/dist/install-Z6K2D2VY.js +2 -0
  327. package/dist/interactive-bind-5EJQUGKI.js +26 -0
  328. package/dist/interactive-remote-D77ULJGL.js +65 -0
  329. package/dist/interrupt-guard-QETBPINI.js +2 -0
  330. package/dist/lane-AQYRIW24.js +2 -0
  331. package/dist/lattice-auth-74XGF77Y.js +2 -0
  332. package/dist/lifecycle-cmd-7SM6UCMH.js +2 -0
  333. package/dist/list-cmd-Z6FZXMFU.js +3 -0
  334. package/dist/list-commands-CZYZ7GIG.js +2 -0
  335. package/dist/list-remote-WOPOC6KK.js +15 -0
  336. package/dist/locks-cmd-JJ2QNTNY.js +2 -0
  337. package/dist/logical-ids-RXAQJZ3T.js +2 -0
  338. package/dist/login-flow-2FZEOVHM.js +2 -0
  339. package/dist/maintenance-cmd-VRTGZVRE.js +2 -0
  340. package/dist/mobile-prompts-KNAHU64X.js +2 -0
  341. package/dist/{next-KZXH4UA4.js → next-O6SUSX3R.js} +1 -1
  342. package/dist/{objective-variable-gate-CG2KK5UX.js → objective-variable-gate-3Z7DNVVC.js} +1 -1
  343. package/dist/onboarding-LGT6PMDZ.js +5 -0
  344. package/dist/open-provider-OZAG6WZS.js +2 -0
  345. package/dist/{paths-JCYX6UWL.js → paths-UMIX3RJF.js} +1 -1
  346. package/dist/pdf-convert-447ACUB3.js +2 -0
  347. package/dist/persist-recorded-session-BX7II5P7.js +3 -0
  348. package/dist/phase-seed-LCJ4WSYV.js +2 -0
  349. package/dist/pipeline-IXVTVRS5.js +2 -0
  350. package/dist/prepare-target-ULMKVKMC.js +2 -0
  351. package/dist/pull-cmd-6AL2WYHB.js +2 -0
  352. package/dist/pull-route-TTVARJMV.js +2 -0
  353. package/dist/readmodel-INMP6MNW.js +2 -0
  354. package/dist/real-device-run-2LFS5WE2.js +2 -0
  355. package/dist/reconcile-cmd-R6H37SQR.js +5 -0
  356. package/dist/reconcile-deps-TWJ3FTSU.js +2 -0
  357. package/dist/reconcile-remote-GWDV5CUT.js +13 -0
  358. package/dist/recording-banner-ACC67Q2U.js +2 -0
  359. package/dist/registry-6IJYQXQC.js +2 -0
  360. package/dist/remote-entry-YL7O2NJQ.js +2 -0
  361. package/dist/remote-mode-7G6PLJCW.js +4 -0
  362. package/dist/remote-words-45USLRVN.js +2 -0
  363. package/dist/require-project-folder-A3UDRELU.js +2 -0
  364. package/dist/resolve-run-intent-ZGPSUBXV.js +2 -0
  365. package/dist/resolver-IPM6R7U4.js +2 -0
  366. package/dist/revert-FHOBLZWF.js +2 -0
  367. package/dist/review-cmd-NNT5C5RZ.js +5 -0
  368. package/dist/run-5RQUCNYP.js +2 -0
  369. package/dist/run-PC5YO4AS.js +2 -0
  370. package/dist/run-channel-63SVP5OI.js +2 -0
  371. package/dist/run-remote-3AYYVPKX.js +2 -0
  372. package/dist/run-startup-gate-NKRMKYBB.js +2 -0
  373. package/dist/run-test-md-HE6DUWQR.js +17 -0
  374. package/dist/scrollback-GGNBDFQV.js +2 -0
  375. package/dist/session-target-DD53UXO7.js +2 -0
  376. package/dist/session-worker.js +12 -0
  377. package/dist/sessions-CFV7FOIT.js +2 -0
  378. package/dist/sessions-cmd-GYMETJHG.js +26 -0
  379. package/dist/sessions-remote-GI7GOBMH.js +3 -0
  380. package/dist/shell-arg-FN3MT5U7.js +2 -0
  381. package/dist/{skill-installer-32YYMM4N.js → skill-installer-3QAVQGDH.js} +1 -1
  382. package/dist/spawner-C7NLLM4F.js +2 -0
  383. package/dist/store-X6XPFSKF.js +2 -0
  384. package/dist/store-choice-RT73HAI7.js +2 -0
  385. package/dist/store-guard-SNWKLHQV.js +2 -0
  386. package/dist/store-id-YZ5WKJ25.js +2 -0
  387. package/dist/store-site-KA2DNBGY.js +2 -0
  388. package/dist/stream-warnings-GEQKKJU7.js +2 -0
  389. package/dist/structured-answers-EQ2AP3F7.js +2 -0
  390. package/dist/sync-cmd-NBPPDG3B.js +2 -0
  391. package/dist/sync-setup-5NUCH6N3.js +2 -0
  392. package/dist/{sync-setup-ui-RC727VK6.js → sync-setup-ui-XITPGSO4.js} +2 -2
  393. package/dist/tcg-generate-Z23CUISY.js +2 -0
  394. package/dist/test-definition-VRI4YIYL.js +2 -0
  395. package/dist/testmd-actions-GH5BW5V5.js +2 -0
  396. package/dist/testmd-sync-ACKCIOL3.js +2 -0
  397. package/dist/tms-client-NXAB6VJD.js +2 -0
  398. package/dist/token-refresh-4UCYAG6A.js +2 -0
  399. package/dist/trust-gate-AT2XBWN4.js +2 -0
  400. package/dist/turn-preflight-LHYLRL7G.js +2 -0
  401. package/dist/ui-SNV3FD2G.js +4 -0
  402. package/dist/use-case-ref-NE4X4MZN.js +2 -0
  403. package/dist/validate-basic-RE2WLIGQ.js +2 -0
  404. package/dist/{variable-receipt-YWNS24TH.js → variable-receipt-BXSZO36E.js} +1 -1
  405. package/dist/verdicts-XK3GAUX3.js +2 -0
  406. package/dist/version-check-4FJVZP3K.js +2 -0
  407. package/dist/{view-cmd-3WHG6MVB.js → view-cmd-N47BQZPD.js} +4 -3
  408. package/dist/walk-session-DA7QWXSW.js +2 -0
  409. package/dist/with-telemetry-7V4LY2BG.js +2 -0
  410. package/package.json +11 -11
  411. package/dist/ChatSurface-FJPK3XEJ.js +0 -8
  412. package/dist/ChromeProfilePicker-7DUDJTE2.js +0 -2
  413. package/dist/CliFeedbackPrompt-ZZPYC6OS.js +0 -2
  414. package/dist/CliUploadProgress-WQYKIBAR.js +0 -2
  415. package/dist/ConfigView-KXNOODDW.js +0 -2
  416. package/dist/EvidenceViewOffer-BTBVPBZX.js +0 -2
  417. package/dist/FolderPicker-H4YEX5LV.js +0 -2
  418. package/dist/InfoBox-DTM7X24Z.js +0 -2
  419. package/dist/LinksBox-KFG3FVOT.js +0 -2
  420. package/dist/ProfilesView-KBZHT4KL.js +0 -2
  421. package/dist/ProjectPicker-OARWULNN.js +0 -2
  422. package/dist/SaveSessionPrompt-37SMU5MC.js +0 -2
  423. package/dist/ScrollbackTap-QHJOFYMC.js +0 -2
  424. package/dist/SingleShotApp-UYCAW65Y.js +0 -2
  425. package/dist/SummaryBox-6RB5DSAH.js +0 -2
  426. package/dist/TestMdRunView-ZMOII3PL.js +0 -2
  427. package/dist/TestrunEvidenceTable-3UP2EYIV.js +0 -2
  428. package/dist/WhoamiView-MC62GERR.js +0 -2
  429. package/dist/app-client-PQFJAB63.js +0 -2
  430. package/dist/app-download-P6YXWSVQ.js +0 -2
  431. package/dist/auth-LXW4OFKF.js +0 -2
  432. package/dist/bind-ZYESQSCJ.js +0 -15
  433. package/dist/bootstrap-DI4UGMH3.js +0 -2
  434. package/dist/bridge-7J3JE3JS.js +0 -2
  435. package/dist/build-JIKYOZUH.js +0 -2
  436. package/dist/catalog-LLME3744.js +0 -2
  437. package/dist/chat-committer-6D7AQI6Z.js +0 -2
  438. package/dist/chat-controller-UJQ6Z4RE.js +0 -2
  439. package/dist/chunk-243ZJHT6.js +0 -4
  440. package/dist/chunk-2KVECC36.js +0 -2
  441. package/dist/chunk-2YEHV2CX.js +0 -2
  442. package/dist/chunk-3MCPTVJX.js +0 -2
  443. package/dist/chunk-3UI5VTQS.js +0 -4
  444. package/dist/chunk-3VAU3PNU.js +0 -2
  445. package/dist/chunk-3YIZG7WZ.js +0 -3
  446. package/dist/chunk-4Y2WH77W.js +0 -2
  447. package/dist/chunk-5EOX4MEY.js +0 -2
  448. package/dist/chunk-5HMN74RZ.js +0 -9
  449. package/dist/chunk-5LJRZI7S.js +0 -6
  450. package/dist/chunk-5RCS2LIQ.js +0 -26
  451. package/dist/chunk-5TQFOPJV.js +0 -2
  452. package/dist/chunk-5ZFOKYFB.js +0 -5
  453. package/dist/chunk-63DYVWNX.js +0 -2
  454. package/dist/chunk-6MD7SR7D.js +0 -9
  455. package/dist/chunk-7N6OCHPC.js +0 -7
  456. package/dist/chunk-A2SQD2AY.js +0 -4
  457. package/dist/chunk-AACQE24F.js +0 -2
  458. package/dist/chunk-AHFIRHSP.js +0 -18
  459. package/dist/chunk-AJT34ESA.js +0 -38
  460. package/dist/chunk-AUMJ4RVA.js +0 -21
  461. package/dist/chunk-AXTPNZPX.js +0 -2
  462. package/dist/chunk-BB2W35TW.js +0 -2
  463. package/dist/chunk-BKM2LWU2.js +0 -3
  464. package/dist/chunk-BUPRL2TE.js +0 -2
  465. package/dist/chunk-C44QQJR4.js +0 -239
  466. package/dist/chunk-CW3RHKLA.js +0 -5
  467. package/dist/chunk-D6E6KRVX.js +0 -2
  468. package/dist/chunk-DTRKTBCE.js +0 -17
  469. package/dist/chunk-DTRSYWZE.js +0 -2
  470. package/dist/chunk-EVFFDODK.js +0 -5
  471. package/dist/chunk-F2OBORCG.js +0 -2
  472. package/dist/chunk-FQNQVC5O.js +0 -5
  473. package/dist/chunk-FY7TCYPK.js +0 -6
  474. package/dist/chunk-GTVQYT3D.js +0 -35
  475. package/dist/chunk-HG5LLZBU.js +0 -2
  476. package/dist/chunk-I7TIGB7K.js +0 -2
  477. package/dist/chunk-IICT4VOU.js +0 -2
  478. package/dist/chunk-ILDHE4P4.js +0 -6
  479. package/dist/chunk-IPXKUYUK.js +0 -2
  480. package/dist/chunk-JQY5HRZ4.js +0 -15
  481. package/dist/chunk-JX6BFEDO.js +0 -4
  482. package/dist/chunk-K2UJYY2U.js +0 -2
  483. package/dist/chunk-KBM3XHAM.js +0 -2
  484. package/dist/chunk-KDNNMU7Q.js +0 -4
  485. package/dist/chunk-KJQNAOOE.js +0 -6
  486. package/dist/chunk-LH4IPANP.js +0 -2
  487. package/dist/chunk-LLG7NEGX.js +0 -6
  488. package/dist/chunk-LSDWPG6C.js +0 -2
  489. package/dist/chunk-MSGW4JDG.js +0 -2
  490. package/dist/chunk-NJ4BXZBX.js +0 -2
  491. package/dist/chunk-NLCCBXXV.js +0 -2
  492. package/dist/chunk-NMSZ7G6P.js +0 -2
  493. package/dist/chunk-OC6H6BYI.js +0 -6
  494. package/dist/chunk-OJAXOOZ5.js +0 -8
  495. package/dist/chunk-OMNLAGQC.js +0 -29
  496. package/dist/chunk-OOCCUUR2.js +0 -2
  497. package/dist/chunk-OXC6O5O7.js +0 -2
  498. package/dist/chunk-OZQDD2EX.js +0 -94
  499. package/dist/chunk-PEDINHVU.js +0 -2
  500. package/dist/chunk-PNUAP3RY.js +0 -8
  501. package/dist/chunk-Q2F5QB2W.js +0 -2
  502. package/dist/chunk-Q4YYAN6E.js +0 -2
  503. package/dist/chunk-Q6AHSGOE.js +0 -5
  504. package/dist/chunk-QAB3Y5FQ.js +0 -4
  505. package/dist/chunk-RDHWNSDP.js +0 -7
  506. package/dist/chunk-RKXHVP2Z.js +0 -2
  507. package/dist/chunk-RRY5IXOB.js +0 -2
  508. package/dist/chunk-RSSOJ3L2.js +0 -21
  509. package/dist/chunk-RTSBKCZY.js +0 -16
  510. package/dist/chunk-SID4X77D.js +0 -370
  511. package/dist/chunk-SRTKRHYI.js +0 -12
  512. package/dist/chunk-T2ONUKTL.js +0 -5
  513. package/dist/chunk-U6OTFMIT.js +0 -4
  514. package/dist/chunk-UD7KKHPW.js +0 -5
  515. package/dist/chunk-USOYXCZ4.js +0 -2
  516. package/dist/chunk-USY7VAO6.js +0 -2
  517. package/dist/chunk-V4B5QA3U.js +0 -4
  518. package/dist/chunk-VBS33P2C.js +0 -2
  519. package/dist/chunk-VHW7BMZQ.js +0 -2
  520. package/dist/chunk-VIO7CCFW.js +0 -5
  521. package/dist/chunk-VORWZLS3.js +0 -9
  522. package/dist/chunk-VVOKM2VO.js +0 -2
  523. package/dist/chunk-W5TTF7GB.js +0 -6
  524. package/dist/chunk-WESMQEPO.js +0 -2
  525. package/dist/chunk-WMI4P76K.js +0 -27
  526. package/dist/chunk-WNOC6MQC.js +0 -2
  527. package/dist/chunk-WVHMPIDQ.js +0 -2
  528. package/dist/chunk-XBX643ZD.js +0 -2
  529. package/dist/chunk-XKHWWKJZ.js +0 -3
  530. package/dist/chunk-XLSOQLVT.js +0 -2
  531. package/dist/chunk-Y3ZYN6AK.js +0 -4
  532. package/dist/chunk-YCCUBQY4.js +0 -2
  533. package/dist/chunk-YKTYVJBN.js +0 -3
  534. package/dist/chunk-YLQHY4A7.js +0 -2
  535. package/dist/chunk-Z7IGTVJW.js +0 -2
  536. package/dist/chunk-ZC2CKWLB.js +0 -2
  537. package/dist/chunk-ZER3FZSZ.js +0 -22
  538. package/dist/chunk-ZJYT72BA.js +0 -9
  539. package/dist/chunk-ZKSN2SJ7.js +0 -2
  540. package/dist/chunk-ZLWURCJ7.js +0 -2
  541. package/dist/committer-2QPBANRD.js +0 -2
  542. package/dist/config-YGTHSGQN.js +0 -2
  543. package/dist/controller-client-ZF5IXRUV.js +0 -2
  544. package/dist/cover-cmd-6RO366CC.js +0 -3
  545. package/dist/descriptor-3JJUOHBM.js +0 -2
  546. package/dist/design-committer-D44GSUXY.js +0 -2
  547. package/dist/device-env-DXDJJMTL.js +0 -2
  548. package/dist/dispatch-7EWWQRQ5.js +0 -2
  549. package/dist/doctor-TPYPEEUL.js +0 -2
  550. package/dist/docx-convert-SQRTF7XS.js +0 -2
  551. package/dist/evidence-NPFTBGDF.js +0 -2
  552. package/dist/evidence-presentation-XF23B7F2.js +0 -2
  553. package/dist/evolve-cmd-VGVXV6XW.js +0 -2
  554. package/dist/explain-NEFBUX5G.js +0 -2
  555. package/dist/explain-cmd-GOP5TE63.js +0 -9
  556. package/dist/explain-cmd-M7IX2YNB.js +0 -3
  557. package/dist/extract-bind-CKIRLXAJ.js +0 -14
  558. package/dist/extract-cmd-3EWLSPGS.js +0 -5
  559. package/dist/feeder-66TUPB2R.js +0 -2
  560. package/dist/gaps-cmd-WVC5GXQC.js +0 -3
  561. package/dist/gate-OYRDJMF6.js +0 -2
  562. package/dist/headless-io-75HUMWZB.js +0 -2
  563. package/dist/identity-ADZ4PAJF.js +0 -2
  564. package/dist/ingest-OSNNM3DH.js +0 -2
  565. package/dist/ingest-cmd-AECK5T4H.js +0 -2
  566. package/dist/install-ZV3KJZV4.js +0 -2
  567. package/dist/interactive-bind-IYS6KDOH.js +0 -26
  568. package/dist/interrupt-guard-UREUWNRL.js +0 -2
  569. package/dist/lifecycle-cmd-XCSBELFQ.js +0 -2
  570. package/dist/list-cmd-S4DSN2ET.js +0 -3
  571. package/dist/list-commands-GLNGHPDU.js +0 -2
  572. package/dist/locks-cmd-67OHQZNV.js +0 -2
  573. package/dist/logical-ids-GLVM2SVR.js +0 -2
  574. package/dist/login-flow-ASUUU7SO.js +0 -2
  575. package/dist/maintenance-cmd-K5KXRIFL.js +0 -2
  576. package/dist/mobile-prompts-ZUZTA3RV.js +0 -2
  577. package/dist/open-provider-YIBB77FE.js +0 -2
  578. package/dist/pdf-convert-RLXSXFWN.js +0 -2
  579. package/dist/persist-recorded-session-EWV56TSZ.js +0 -3
  580. package/dist/phase-seed-MKHEWUN6.js +0 -2
  581. package/dist/pipeline-LAWACB2O.js +0 -2
  582. package/dist/prepare-target-WGPCZKLE.js +0 -2
  583. package/dist/readmodel-FVLRQWZ7.js +0 -2
  584. package/dist/real-device-run-MDLFKFVQ.js +0 -2
  585. package/dist/reconcile-cmd-XFM2ZXUJ.js +0 -2
  586. package/dist/reconcile-deps-V5VLDPYT.js +0 -4
  587. package/dist/reconcile-engine-VZBTMPUK.js +0 -2
  588. package/dist/recording-banner-CJHRPHHF.js +0 -2
  589. package/dist/records-LMCVKPE5.js +0 -2
  590. package/dist/registry-3JXQFZEG.js +0 -2
  591. package/dist/require-project-folder-SE5GVCYJ.js +0 -2
  592. package/dist/resolve-run-intent-DD4MB6UD.js +0 -2
  593. package/dist/resolver-TLO4SRWV.js +0 -2
  594. package/dist/revert-NOUECRW4.js +0 -2
  595. package/dist/review-cmd-7EOYQMPE.js +0 -5
  596. package/dist/run-EHUNJPW6.js +0 -2
  597. package/dist/run-OTMPUQSH.js +0 -2
  598. package/dist/run-channel-RGH4WIQX.js +0 -2
  599. package/dist/run-test-md-KBDEHGXJ.js +0 -17
  600. package/dist/scrollback-JLPJR25X.js +0 -2
  601. package/dist/session-items-2ATN7VXG.js +0 -2
  602. package/dist/session-target-UMNASXI7.js +0 -2
  603. package/dist/sessions-NH7WQWMX.js +0 -2
  604. package/dist/sessions-cmd-M3SECFKQ.js +0 -25
  605. package/dist/spawner-DPT2RLAO.js +0 -2
  606. package/dist/store-guard-U32JE6JJ.js +0 -2
  607. package/dist/store-id-EOSGEKVK.js +0 -2
  608. package/dist/structured-answers-ZI2B6JJE.js +0 -2
  609. package/dist/sync-cmd-3EP7LZGL.js +0 -2
  610. package/dist/sync-setup-SWTBVQEV.js +0 -2
  611. package/dist/tcg-generate-KXU7E2GF.js +0 -2
  612. package/dist/testmd-actions-PEWCPQ5R.js +0 -2
  613. package/dist/testmd-sync-ZWFQWZ2X.js +0 -2
  614. package/dist/tms-client-KU6HCA23.js +0 -2
  615. package/dist/token-refresh-QD3OCGJJ.js +0 -2
  616. package/dist/trust-gate-EX7R2P4Y.js +0 -2
  617. package/dist/turn-preflight-JGYT7LXP.js +0 -2
  618. package/dist/ui-JEJGTURD.js +0 -4
  619. package/dist/validate-basic-AAIXSAWH.js +0 -2
  620. package/dist/verdicts-LAB5BGCC.js +0 -2
  621. package/dist/version-check-EHOLX3YH.js +0 -2
  622. package/dist/walk-session-XP4KYFKO.js +0 -2
  623. package/dist/with-telemetry-FJMJQDCM.js +0 -2
  624. /package/dist/{chunk-BKHXPBWN.js → chunk-2RUSXQ3O.js} +0 -0
  625. /package/dist/{chunk-6J5T5FEY.js → chunk-3AGP2BVN.js} +0 -0
  626. /package/dist/{chunk-CH273NAE.js → chunk-73Y6T2UK.js} +0 -0
  627. /package/dist/{chunk-ZMNJBUAO.js → chunk-73ZFOJOK.js} +0 -0
  628. /package/dist/{chunk-NOL7MNZH.js → chunk-A7RJQJNT.js} +0 -0
  629. /package/dist/{chunk-N2P4MI32.js → chunk-FWGUISUG.js} +0 -0
  630. /package/dist/{chunk-UJZZDPDY.js → chunk-HD6NR44L.js} +0 -0
  631. /package/dist/{chunk-LDPLJFCV.js → chunk-I6S6DZ2E.js} +0 -0
  632. /package/dist/{chunk-427OQS2N.js → chunk-LD5B3QFW.js} +0 -0
  633. /package/dist/{chunk-2UIHS2FH.js → chunk-PGESS7BW.js} +0 -0
  634. /package/dist/{chunk-BZAGVBCX.js → chunk-ZCIWQHCO.js} +0 -0
@@ -1,8 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as It,b as $n,c as Dt,e as rt,f as it,g as Cn,h as Rn,j as Sn,k as Bt,l as In}from"./chunk-OOCCUUR2.js";import{a as le,b as Oe,c as vn}from"./chunk-6J5T5FEY.js";import{b as Rt}from"./chunk-UJZZDPDY.js";import{a as yn}from"./chunk-RRY5IXOB.js";import{a as tt}from"./chunk-VIO7CCFW.js";import{a as nt,d as _e,e as Tn,f as St}from"./chunk-RKXHVP2Z.js";import{a as kn,b as bn,c as wn}from"./chunk-AXTPNZPX.js";import"./chunk-U6OTFMIT.js";import"./chunk-V4B5QA3U.js";import{a as hn,b as pn,c as xn}from"./chunk-EOA6YPES.js";import{a as gn,b as me}from"./chunk-4Y2WH77W.js";import{a as dn}from"./chunk-5Y2G4NC7.js";import"./chunk-VVOKM2VO.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import{a as et}from"./chunk-YCCUBQY4.js";import{a as mn}from"./chunk-Z7IGTVJW.js";import{y as r}from"./chunk-5TQFOPJV.js";import{b as fn}from"./chunk-DFS4RMVP.js";import{a as Q}from"./chunk-HCBYKLMW.js";import{a as k,b as n,k as Ze}from"./chunk-C44QQJR4.js";import{a as Mr}from"./chunk-6YGTRKDT.js";import{e as V}from"./chunk-UR6MHSHU.js";var m=V(Mr(),1);var a=V(Q(),1),Ar=60,Lr=100;function Et(t,o){let l=t.options.length,u=l,g=t.multi_select?u++:null,x=t.allow_free_text?u++:null,f=o?u++:null;return{optionCount:l,doneIdx:g,freeIdx:x,batchIdx:f,maxSel:u-1}}var Or="\xA0",_r={high:{text:`\u203C${Or}high`,color:r.red},med:{text:"med",color:"yellow"},low:{text:"low",color:r.dim}};function Pr(t){let o=(t.header??t.text.split(/\s+/).slice(0,3).join(" ")).trim();return o.length>16?`${o.slice(0,15)}\u2026`:o}function qr(t,o,l){let u=p=>t[p].length+6,g=u(o),x=o,f=o;for(;;){let p=f+1<t.length?u(f+1):1/0,C=x-1>=0?u(x-1):1/0;if(p===1/0&&C===1/0)break;if(p<=C){if(g+p>l)break;g+=p,f+=1}else{if(g+C>l)break;g+=C,x-=1}}return{lo:x,hi:f}}function Dn({batch:t,qView:o,sel:l=0,focused:u=!1,freeText:g=null,optionText:x=null,attach:f=null,multiSelFor:p,childPrefix:C}){let{stdout:M}=Ze(),v=M?.columns??80,T=v<Ar,W=Math.min(v-1,Lr),$=Math.max(0,Math.min(t.questions.length-1,o??(t.cursor<0?0:t.cursor))),I=t.questions[$],N=t.resolution[$],L=t.resolution.filter(D=>!D).length,B=t.questions.length-L,P=tt(t),O=Et(I,P!==""),H=p?p($):[],K=_r[I.risk],re=D=>u&&l===D?(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"}):" ",S=`? ${C??""}the agent needs ${L===1?"one answer":`${L} answers`}`,$e=t.questions.length>1?` \xB7 ${$+1} of ${t.questions.length} \xB7 ${B} answered`:"",z=(0,a.jsxs)(k,{flexDirection:"column",children:[(0,a.jsx)(k,{paddingLeft:2,children:(0,a.jsxs)(n,{bold:!0,children:[I.text,K?(0,a.jsx)(n,{color:K.color,bold:!1,children:` ${K.text}`}):null]})}),(0,a.jsx)(k,{paddingLeft:2,children:(0,a.jsx)(n,{color:r.dim,children:I.rationale})}),(0,a.jsx)(n,{children:" "}),I.options.map((D,w)=>{let X=u&&l===w;return x&&x.optionIndex===w?(0,a.jsx)(k,{flexDirection:"column",children:(0,a.jsxs)(k,{children:[(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,a.jsx)(n,{color:r.assuranceAccent,children:`${w+1}. ${D.label}`}),(0,a.jsx)(n,{color:r.dim,children:" \u270E "})]}),(0,a.jsx)(et,{value:x.value,onChange:x.onChange,onSubmit:x.onSubmit,onCancel:x.onCancel,placeholder:D.detail||"type your answer"})]})},`o-${w}`):(0,a.jsxs)(k,{flexDirection:"column",children:[(0,a.jsxs)(n,{children:[re(w)," ",I.multi_select?(0,a.jsx)(n,{color:H.includes(w)?r.green:r.dim,children:H.includes(w)?"[x] ":"[ ] "}):null,(0,a.jsx)(n,{color:X?r.assuranceAccent:void 0,children:`${w+1}. ${D.label}`}),w===I.recommended_index?(0,a.jsx)(n,{color:r.dim,children:" (recommended)"}):null,N?.selected_index===w?(0,a.jsx)(n,{color:r.dim,children:" (current)"}):null]}),D.detail?(0,a.jsx)(k,{paddingLeft:5,children:(0,a.jsx)(n,{color:r.dim,children:D.detail})}):null]},`o-${w}`)}),I.multi_select&&O.doneIdx!=null?(0,a.jsxs)(n,{children:[re(O.doneIdx)," ",(0,a.jsx)(n,{color:r.green,children:"\u2714"}),(0,a.jsx)(n,{color:u&&l===O.doneIdx?r.assuranceAccent:void 0,children:" done \u2014 confirm selection"})]}):null,I.allow_free_text?(0,a.jsx)(n,{children:" "}):null,I.allow_free_text?g?(0,a.jsxs)(k,{children:[(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,a.jsx)(n,{color:r.dim,children:"\u270E "})]}),(0,a.jsx)(et,{value:g.value,onChange:g.onChange,onSubmit:g.onSubmit,onCancel:g.onCancel,placeholder:"Tell me what to do"})]}):(0,a.jsxs)(n,{children:[O.freeIdx!=null?re(O.freeIdx):" "," ",(0,a.jsx)(n,{color:u&&O.freeIdx!=null&&l===O.freeIdx?r.assuranceAccent:r.dim,children:"\u270E Tell me what to do"})]}):null,f?(0,a.jsxs)(k,{flexDirection:"column",marginTop:1,children:[(0,a.jsxs)(k,{children:[(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,a.jsx)(n,{color:r.assuranceAccent,children:"@ attach a file or URL"}),(0,a.jsx)(n,{color:r.dim,children:" \u270E "})]}),(0,a.jsx)(et,{value:f.value,onChange:f.onChange,onSubmit:f.onSubmit,onCancel:f.onCancel,placeholder:"path or URL"})]}),(0,a.jsx)(k,{paddingLeft:2,children:(0,a.jsx)(n,{color:r.dim,children:"the questions are set aside \u2014 the agent reads the source and re-asks what's still open"})})]}):null]}),j=P!==""?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n,{children:" "}),(0,a.jsxs)(n,{children:[u&&O.batchIdx!=null&&l===O.batchIdx?(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"}):" "," ",(0,a.jsx)(n,{color:r.assuranceAccent,children:"\xBB"}),(0,a.jsx)(n,{bold:!0,color:u&&O.batchIdx!=null&&l===O.batchIdx?r.assuranceAccent:void 0,children:" Go with recommendations"}),L>=5?(0,a.jsx)(n,{color:r.dim,children:` \u2014 resolves all ${L} open`}):null,(0,a.jsx)(n,{color:r.dim,children:" (tab)"})]})]}):null;if(T)return(0,a.jsxs)(k,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,a.jsx)(n,{color:r.assuranceAccent,bold:!0,children:S}),t.questions.length>1?(0,a.jsx)(n,{color:r.dim,children:$e.replace(/^ · /,"")}):null,(0,a.jsx)(n,{children:" "}),z,j]});let h=t.questions.map(D=>Pr(D)),ce=t.questions.length>1?qr(h,$,W-8):null;return(0,a.jsxs)(k,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,a.jsxs)(n,{color:r.assuranceAccent,children:[(0,a.jsx)(n,{bold:!0,children:S}),$e?(0,a.jsx)(n,{color:r.dim,children:$e}):null]}),ce?(0,a.jsx)(k,{marginTop:1,children:(0,a.jsxs)(n,{children:[ce.lo>0?(0,a.jsx)(n,{color:r.dim,children:"\u25C0 "}):" ",t.questions.slice(ce.lo,ce.hi+1).map((D,w)=>{let X=ce.lo+w,Pe=w>0?" ":"";return X===$?(0,a.jsxs)(n,{children:[Pe,(0,a.jsx)(n,{backgroundColor:r.assuranceAccent,color:"#0d1117",bold:!0,children:` ${h[X]} `})]},D.id):(0,a.jsxs)(n,{children:[Pe,t.resolution[X]?(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.green,children:"\u2713 "}),(0,a.jsx)(n,{color:r.dim,children:h[X]})]}):(0,a.jsx)(n,{color:r.dim,children:`\u25CB ${h[X]}`})]},D.id)}),ce.hi<t.questions.length-1?(0,a.jsx)(n,{color:r.dim,children:" \u25B6"}):null]})}):null,(0,a.jsx)(n,{children:" "}),z,j]})}var A=V(Q(),1),Bn={high:0,med:1,low:2},jr={high:r.red,med:"yellow",low:r.dim};function Fr(t){return t.map((o,l)=>({r:o,i:l})).sort((o,l)=>(Bn[o.r.risk??"zz"]??3)-(Bn[l.r.risk??"zz"]??3)||o.i-l.i).map(({r:o})=>o)}function En({rows:t,width:o=120,badgeHeader:l="risk"}){if(t.length===0)return null;let u=Fr(t),g=B=>B.staged||!B.id?"(staged)":yn(B.id),x=Math.max(2,...u.map(B=>g(B).length)),f=Math.max(l.length,...u.map(B=>(B.badge??"").length)),p=o>=84&&u.some(B=>B.summary),M=o-(p?13:10)-x-f,v=Math.max(...u.map(B=>Math.max(B.title.length,(B.marker??"").length)),5),T=Math.max(5,p?Math.min(v,Math.max(16,Math.floor(M*.5))):Math.min(v,M)),W=p?Math.max(7,M-T):0,$=(B,P,O,H)=>vn(B,P,O,H.map(K=>K.length)),I=(B,P,O,H)=>[Oe(le(B,x),x),Oe(le(P,T),T),Oe(le(O,f),f),...p?[Oe(le(H,W),W)]:[]],N=I("id","title",l,"summary"),L=[];L.push((0,A.jsx)(n,{color:r.dim,children:$("\u250C","\u252C","\u2510",N)},"t")),L.push((0,A.jsxs)(n,{children:[N.map((B,P)=>(0,A.jsxs)(n,{children:[(0,A.jsx)(n,{color:r.dim,children:P===0?"\u2502 ":" \u2502 "}),(0,A.jsx)(n,{bold:!0,children:B})]},P)),(0,A.jsx)(n,{color:r.dim,children:" \u2502"})]},"h")),L.push((0,A.jsx)(n,{color:r.dim,children:$("\u251C","\u253C","\u2524",N)},"m"));for(let[B,P]of u.entries()){let O=I(g(P),le(P.title,T),le(P.badge??"",f),le(P.summary??"",W)),H=P.badgeColor??jr[P.badge??""]??r.dim;if(L.push((0,A.jsxs)(n,{children:[(0,A.jsx)(n,{color:r.dim,children:"\u2502 "}),(0,A.jsx)(n,{color:r.assuranceAccent,children:O[0]}),(0,A.jsx)(n,{color:r.dim,children:" \u2502 "}),O[1],(0,A.jsx)(n,{color:r.dim,children:" \u2502 "}),(0,A.jsx)(n,{color:H,children:O[2]}),p?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(n,{color:r.dim,children:" \u2502 "}),O[3]]}):null,(0,A.jsx)(n,{color:r.dim,children:" \u2502"})]},`r-${B}`)),P.marker){let K=I("",le(P.marker,T),"","");L.push((0,A.jsx)(n,{color:r.dim,children:`\u2502 ${K.join(" \u2502 ")} \u2502`},`mk-${B}`))}}return L.push((0,A.jsx)(n,{color:r.dim,children:$("\u2514","\u2534","\u2518",N)},"b")),(0,A.jsx)(A.Fragment,{children:L})}var y=V(Q(),1);function Wr(t){let o=t.form==="assumed"?" (assumed)":t.form==="deferred"?"":" (you)",l=t.note?` \u2014 ${t.note}`:"";return t.form==="deferred"?`\u21B3 deferred q${t.qNum} ${t.stub}${l}`:t.form==="changed"?`\u21B3 changed q${t.qNum} ${t.stub}: ${t.prev??"?"} \u2192 ${t.choice??"?"}${o}${l}`:`\u21B3 ${t.form} q${t.qNum} ${t.stub}: ${t.choice??"?"}${o}${l}`}var Vr=()=>(process.stdout?.columns??100)-12;function Mn({block:t,annotations:o}){let l=t.era??0,u=Nr(t,o??null);return l>0?(0,y.jsx)(k,{marginLeft:l*2,children:u}):u}function Nr(t,o){switch(t.kind){case"banner":return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsx)(n,{bold:!0,color:r.assuranceAccent,children:` ${t.text}`})});case"user":return(0,y.jsxs)(k,{marginTop:1,children:[(0,y.jsx)(n,{color:r.orange,children:"\u276F "}),(0,y.jsx)(n,{children:t.text})]});case"note":return(0,y.jsx)(n,{color:r.dim,children:` ${t.text}`});case"agent":return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsx)(pn,{text:t.text,accent:r.assuranceAccent})});case"worked":return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsx)(n,{color:r.dim,children:` \u2699 ${wn(t.durS,t.toolCalls,t.tools)}`})});case"usage":return(0,y.jsx)(n,{color:r.dim,children:` \xB7 ${t.credits.toFixed(1)} credits \u2014 total ${t.total.toFixed(1)}`});case"turn":{let l=o,u=l?l.fresh:t.items.map((v,T)=>({item:v,num:T+1,updated:!1})),g={usecase:"risk","use-case":"risk",ac:"check",scenario:"kind",test:"check",gap:"severity",stylenote:"kind"},x=v=>v.kind??"use-case",f=new Map;for(let v of u){let T=v.item,W=x(v.item),$=T.risk==="high"||T.risk==="med"||T.risk==="low"?T.risk:void 0,I={id:T.logical_id??"",staged:!T.logical_id,title:T.title,badge:T.badge??T.risk??"",summary:T.why??T.summary??T.description??"",...$?{risk:$}:{},...v.updated?{marker:"\u21B3 changed"}:{}},N=f.get(W)??[];N.push(I),f.set(W,N)}let p=u.some(v=>!!v.item.kind),C=(l?.unchanged??[]).reduce((v,T)=>v+T.count,0),M=l?.headerStats?` \u2014 ${l.headerStats}${C>0?` (${C} unchanged)`:""}`:"";return(0,y.jsxs)(k,{flexDirection:"column",marginLeft:2,children:[(0,y.jsxs)(n,{bold:!0,children:[p?"design":t.heading,M?(0,y.jsx)(n,{bold:!1,color:r.dim,children:M}):null]}),[...f.entries()].map(([v,T])=>(0,y.jsxs)(k,{flexDirection:"column",children:[f.size>1?(0,y.jsx)(n,{color:r.dim,children:`${nt(v)} \xB7 ${T.length}`}):null,(0,y.jsx)(En,{rows:T,width:Vr(),badgeHeader:g[v]??"info"})]},v)),l&&l.unchanged.length>0&&(0,y.jsx)(n,{color:r.dim,children:` \u22EE unchanged: ${l.unchanged.map(v=>`${v.count} ${v.label}`).join(" \xB7 ")}`})]})}case"answer":return(0,y.jsx)(n,{color:r.dim,children:Wr(t.receipt)});case"continued":return(0,y.jsx)(n,{color:r.dim,children:"\u21B3 continued"});case"childOpen":{let{ing:l}=Rt(t.verb);return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsxs)(n,{color:r.assuranceAccent,children:[`\u25CF ${l} ${t.subject}`,t.sid?(0,y.jsx)(n,{color:r.dim,children:` \u2014 ${t.sid}`}):null,t.note?(0,y.jsx)(n,{color:r.dim,children:` ${t.note}`}):null]})})}case"childClose":{let{ed:l}=Rt(t.verb);if(!t.ok)return(0,y.jsxs)(n,{color:r.red,children:[`\u25CF ${t.verb} failed \u2014 ${t.exitCode!=null?`exited ${t.exitCode}`:"error"}`,t.fixCmd?(0,y.jsx)(n,{color:r.dim,children:` \xB7 ${t.fixCmd}`}):null]});let u=[bn(t.durS),...t.results?[t.results]:[],...t.credits!==void 0?[`${t.credits.toFixed(1)} credits`]:[]].join(" \xB7 ");return(0,y.jsx)(n,{color:r.green,children:`\u25CF ${l} ${t.subject} \u2014 ${u}`})}case"childBack":return(0,y.jsx)(n,{color:r.dim,children:`back with ${t.parentVerb} \u2014 ${t.context}`});case"commit":return(0,y.jsxs)(k,{flexDirection:"column",children:[(0,y.jsx)(n,{color:t.ok?r.green:r.red,children:` ${t.ok?"\u2714":"\u2717"} ${t.line}`}),(t.warnings??[]).map((l,u)=>(0,y.jsx)(n,{color:r.dim,children:` \u26A0 ${l}`},`w-${u}`))]});case"error":return(0,y.jsxs)(mn,{variant:"error",paddingX:1,children:[(0,y.jsx)(n,{color:r.red,children:t.title}),t.detail.map((l,u)=>(0,y.jsx)(n,{color:r.dim,children:l},`d-${u}`))]})}}var Te=V(Q(),1);function An({item:t}){return(0,Te.jsxs)(k,{flexDirection:"column",marginLeft:2,children:[(t.cite??[]).map((o,l)=>(0,Te.jsx)(n,{dimColor:!0,children:`cite ${o.anchor??"conv"} \u2014 "${o.quote??""}"`},`cite-${l}`)),(t.depends_on_hint??[]).length>0&&(0,Te.jsx)(n,{dimColor:!0,children:`depends on: ${(t.depends_on_hint??[]).join(", ")}`}),Object.entries(t.extra??{}).map(([o,l])=>(0,Te.jsx)(n,{dimColor:!0,children:`${o}: ${l}`},`extra-${o}`))]})}var R=V(Q(),1),Mt=(t,o)=>Math.max(0,Math.min(o,t));function ot(t,o,l){switch(o.type){case"move":return t.level==="detail"?{...t,scroll:Math.max(0,(t.scroll??0)+o.delta)}:{...t,cursor:Mt(t.cursor+o.delta,Math.max(0,l-1))};case"enter":return t.level==="list"?{...t,level:"detail",scroll:0}:t;case"back":return t.level==="detail"?{...t,level:"list",scroll:0}:null}}var On={"use-case":"use-cases",ac:"acs",scenario:"scenarios",test:"tests",gap:"gaps"};function _n(t,o){if(t.level==="detail")return{level:"detail",cursor:Mt(t.num-1,Math.max(0,o.entries.length-1))};if(t.section){let l=o.entries.findIndex(u=>On[u.kind]===t.section);if(l>=0)return{level:"list",cursor:l}}return{level:"list",cursor:0}}function Kr(t){let o=[];for(let l of t.entries){let u=o.find(g=>g.kind===l.kind);u?u.entries.push(l):o.push({kind:l.kind,entries:[l]})}return o}var Ln=3;function Ur({items:t,cursor:o,verb:l,more:u}){let g=`view \xB7 ${l} so far \xB7 ${t.counts.map(f=>`${f.count} ${f.count===1?f.label.replace(/s$/,""):f.label}`).join(" \xB7 ")}`,x=t.entries[o];return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsx)(n,{bold:!0,color:r.assuranceAccent,children:g}),Kr(t).map(({kind:f,entries:p})=>{let C=x?.kind===f,M=C?p.findIndex($=>$.ref===x.ref):-1,v=C?Mt(M-1,Math.max(0,p.length-Ln)):0,T=p.slice(v,v+(C?Ln:1)),W=p.length-T.length;return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsx)(n,{color:r.dim,children:`${On[f]??nt(f)} \xB7 ${p.length}`}),T.map($=>{let I=C&&$.ref===x.ref,N=$.item.badge;return(0,R.jsxs)(n,{children:[(0,R.jsx)(n,{color:r.assuranceAccent,children:I?"\u203A ":" "}),(0,R.jsx)(n,{children:`${$.num} \xB7 ${$.item.title}`}),N?(0,R.jsx)(n,{color:r.dim,children:` \xB7 ${N}`}):null]},`${$.kind}:${$.ref}`)}),W>0&&(0,R.jsx)(n,{color:r.dim,children:` \u22EE ${W} more`})]},f)}),u?(0,R.jsxs)(n,{children:[(0,R.jsx)(n,{color:r.assuranceAccent,children:o===t.entries.length?"\u203A ":" "}),(0,R.jsx)(n,{color:r.dim,children:`\u22EF show all \u2014 ${u.hidden} more from earlier turns`})]}):null]})}var st=14;function Qr({items:t,cursor:o,explain:l,grandTotal:u,dossier:g,scroll:x=0}){let f=t.entries[o];if(!f)return(0,R.jsx)(n,{color:r.dim,children:"nothing to show"});if(g){let C=Math.max(0,Math.min(x,Math.max(0,g.lines.length-st))),M=g.lines.slice(C,C+st);return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsxs)(n,{bold:!0,children:[`view \xB7 ${g.id}`,g.id.toLowerCase()!==g.rawId?(0,R.jsx)(n,{bold:!1,color:r.dim,children:` \xB7 ${g.rawId}`}):null]}),(0,R.jsx)(n,{bold:!0,children:g.title}),C>0?(0,R.jsx)(n,{color:r.muted,children:`\u22EE ${C} above`}):null,M.map((v,T)=>(0,R.jsx)(n,{color:v.dim?r.dim:void 0,children:v.text},`dl-${T}`)),g.lines.length>C+st?(0,R.jsx)(n,{color:r.muted,children:`\u22EE ${g.lines.length-C-st} more`}):null]})}let p=f.item;return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsx)(n,{bold:!0,children:`view \xB7 ${f.kind} ${f.num} of ${u??t.entries.length}`}),(0,R.jsx)(n,{children:f.item.title}),p.badge?(0,R.jsx)(n,{color:r.dim,children:`kind: ${p.badge}`}):null,p.why?(0,R.jsx)(n,{color:r.dim,children:p.why}):null,(0,R.jsx)(An,{item:f.item}),l?.map((C,M)=>(0,R.jsx)(n,{color:r.dim,children:C},`ex-${M}`)),(0,R.jsx)(n,{color:r.dim,children:"view-only \u2014 approvals happen in chat"})]})}function Pn({items:t,state:o,verb:l,more:u,explain:g,grandTotal:x,dossier:f=null}){return o.level==="list"?(0,R.jsx)(Ur,{items:t,cursor:o.cursor,verb:l,more:u}):(0,R.jsx)(Qr,{items:t,cursor:o.cursor,explain:g,grandTotal:x,dossier:f,scroll:o.scroll??0})}var J=V(Q(),1),At=14;function Hr(t){let o=[],l=null;for(let u of t)u.field!==l&&(l=u.field,o.push({kind:"field",field:l})),o.push({kind:"line",field:l,line:u});return o}function qn({title:t,lines:o,offset:l=0}){let u=Hr(o),g=Math.max(0,Math.min(l,Math.max(0,u.length-At))),x=u.slice(g,g+At),f=g,p=Math.max(0,u.length-g-At),C=`view \xB7 diff \xB7 ${t} \xB7 current \u2192 proposed`;return(0,J.jsxs)(k,{flexDirection:"column",children:[(0,J.jsx)(n,{bold:!0,color:r.assuranceAccent,children:C}),f>0?(0,J.jsx)(k,{paddingLeft:2,children:(0,J.jsx)(n,{color:r.dim,children:`\u22EE ${f} above`})}):null,x.map((M,v)=>M.kind==="field"?(0,J.jsx)(k,{paddingLeft:2,children:(0,J.jsx)(n,{color:r.dim,children:M.field==="criteria"?"criteria":M.field})},`r-${g+v}`):(0,J.jsx)(k,{paddingLeft:4,children:(0,J.jsx)(n,{color:M.line.op==="-"?"red":"green",children:`${M.line.op==="-"?"\u2212":"+"} ${M.line.text}`})},`r-${g+v}`)),p>0?(0,J.jsx)(k,{paddingLeft:2,children:(0,J.jsx)(n,{color:r.dim,children:`\u22EE ${p} more`})}):null]})}var zr={"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 jn(t){let o=(t??"").trim().toLowerCase();if(!o)return{level:"list"};if(/^\d+$/.test(o)){let u=parseInt(o,10);return u>=1?{level:"detail",num:u}:{error:"items are numbered from 1 \u2014 /view 1"}}let l=zr[o];return l?{level:"list",section:l}:{error:"try /view, /view <number>, or /view acs|scenarios|tests"}}var E=V(Q(),1),Xr=6,Fn=12;function Gr(t,o,l){let u=Math.max(20,o),g=[];for(let f of t.split(`
3
- `)){if(f.length<=u){g.push(f);continue}let p="";for(let C of f.split(" "))p&&p.length+1+C.length>u?(g.push(p),p=C):p=p?`${p} ${C}`:C;g.push(p)}let x=Math.max(0,g.length-l);return{body:g.slice(-l).join(`
4
- `),hidden:x}}function Wn(t){let o={key:"redesign",label:"re-design from scratch",detail:"replaces the current design"},l={key:"keep",label:"keep the existing design",detail:"back to the list"};return t.designed==="stale"?[{...o,detail:"the use-case changed since it was designed"},l]:[l,o]}function Xi({controller:t,verb:o="extract",onCtrlC:l,chain:u=null,inspect:g=null,reconcile:x=null,autoReview:f=!1,onReviewExit:p,meta:C=null}){let[,M]=(0,m.useState)(0),[v,T]=(0,m.useState)(!1),[W,$]=(0,m.useState)(null),[I,N]=(0,m.useState)(null),L=(0,m.useRef)(null),[B,P]=(0,m.useState)(null),O=(0,m.useRef)(null),H=e=>{O.current=e,P(e)},K=e=>{L.current=e,N(e),e===null&&H(null)},re=(0,m.useRef)([]),[S,$e]=(0,m.useState)(null),z=(0,m.useRef)(null),j=e=>{z.current=e,$e(e)},[h,ce]=(0,m.useState)(null),D=(0,m.useRef)(null),w=e=>{D.current=e,ce(e)},[X,Pe]=(0,m.useState)(null),Lt=(0,m.useRef)(null),he=e=>{Lt.current=e,Pe(e)},lt=(0,m.useRef)({approved:0,rejected:0,deferred:0}),Ce=(0,m.useRef)(!1),ae=(0,m.useRef)(null),Ot=fn(),{stdout:Vn}=Ze(),Nn=Vn?.columns??80,_t=(0,m.useRef)(0),ct=(0,m.useRef)(0);(0,m.useEffect)(()=>{let e=()=>{let i=t.state.ledger;for(let c=_t.current;c<i.length;c++){let d=i[c],b=d.kind==="turn"?Tn(t.state.turns,d.turnIndex):void 0;Ot.append((0,E.jsx)(Mn,{block:d,annotations:b},`lg-${c}`))}_t.current=i.length};e();let s=t.subscribe(()=>{e();let i=t.state;L.current&&(i.pending||i.status==="pausing")&&(K(null),i.pending&&$("questions arrived \u2014 back to chat")),M(c=>c+1)});return M(i=>i+1),s},[t,Ot]);let{thinking:ue,status:de,pending:_,confirm:qe,ledger:ie,activeTurn:Pt,stream:Kn,notice:je}=t.state,qt=(Kn?.text??"").trimEnd(),jt=qt.length>0,Un=v&&(ue.liveThinking.length>0||ue.thinkingLog.length>0),Qn=Gr(ue.liveThinking||ue.thinkingLog.map(e=>e.text).join(`
5
- `),Nn-6,Fn),Ft=jt?qt.split(`
6
- `).slice(-Xr):[];Pt&&(ct.current=Pt.turnIndex);let Hn=_?_.resolution.filter(e=>!e).length:0,at;for(let e=ie.length-1;e>=0;e--){if(re.current.some(i=>i.end!=null&&e>=i.start&&e<i.end))continue;let s=ie[e];if(s.kind==="banner"&&!s.text.startsWith("kane")){at=s.text;break}}let Re=ue.activity[ue.activity.length-1],zn=Re?Re.status==="decision"?Re.label:kn({name:Re.name,status:Re.status}):void 0,Wt=de==="streaming"||de==="working",[,Xn]=(0,m.useState)(0);dn(()=>Xn(e=>e+1),Wt||S?.kind==="running"||h?.st.kind==="running"?120:null);let Gn=t.state.busySince?Math.floor((Date.now()-t.state.busySince)/1e3):0,Yn=t.state.turns.some(e=>e.role==="agent"),[Jn,Zn]=(0,m.useState)(0),[er,tr]=(0,m.useState)(!1),[ut,nr]=(0,m.useState)(null),pe=(0,m.useRef)(0),Vt=(0,m.useRef)(!1),Nt=(0,m.useRef)(null),Se=e=>{pe.current=e,Zn(e)},Kt=e=>{Vt.current=e,tr(e)},xe=e=>{Nt.current=e,nr(e)},[Ie,rr]=(0,m.useState)(null),dt=(0,m.useRef)(null),ke=e=>{dt.current=e,rr(e)},[mt,ir]=(0,m.useState)(null),Ut=(0,m.useRef)(null),De=e=>{Ut.current=e,ir(e)},[Fe,sr]=(0,m.useState)(0),G=(0,m.useRef)(0),Be=e=>{G.current=e,sr(e)},Qt=_?_.questions[0]?.id??"b":null;(0,m.useEffect)(()=>{_&&Be(_.cursor<0?0:_.cursor)},[Qt,_?.cursor]);let We=()=>{let e=Z.current;if(!e)return;let s=e.questions.length;for(let i=1;i<=s;i++){let c=(G.current+i)%s;if(!e.resolution[c]){Be(c);return}}},Ve=_?_.questions[Math.max(0,Math.min(_.questions.length-1,Fe))]:void 0,te=(0,m.useRef)(Ve);te.current=Ve;let Z=(0,m.useRef)(_);Z.current=_;let or=_?`${Qt}:${Fe}`:null;(0,m.useEffect)(()=>{if(xe(null),ke(null),De(null),te.current){Kt(!0);let e=Z.current?.resolution[G.current]?.selected_index;Se(e??te.current.recommended_index??0)}else Kt(!1)},[or]);let Ne=e=>{let s=Z.current;return Et(e,s?tt(s)!=="":!1)},lr={isFocused:()=>Vt.current&&te.current!=null&&Nt.current==null&&dt.current==null&&Ut.current==null||D.current!=null&&D.current.st.kind!=="running"&&Lt.current==null||z.current!=null&&z.current.kind!=="running"||U.current&&cn.current==null,onMove:e=>{let s=te.current;if(s){Se(Math.max(0,Math.min(Ne(s).maxSel,pe.current+e)));return}let i=D.current;if(i){let d=i.items[i.i];if(i.st.kind==="card"&&d){let b=it(d.card)??rt(d.card).length-1;w({...i,st:{kind:"card",sel:Math.max(0,Math.min(b,i.st.sel+e))}});return}if(i.st.kind==="view"&&d){w({...i,st:{kind:"view",offset:Math.max(0,i.st.offset+e)}});return}if(i.st.kind==="offer"||i.st.kind==="done"){let b=i.st.kind==="offer"?1:Ge.current.length-1;w({...i,st:{...i.st,sel:Math.max(0,Math.min(b,i.st.sel+e))}});return}if(i.st.kind==="running"&&!U.current)return}let c=z.current;if(c?.kind==="picker"){j({...c,sel:Math.max(0,Math.min(c.items.length-1,c.sel+e))});return}if(c?.kind==="ask"||c?.kind==="confirm"||c?.kind==="failed"){let d=(c.kind==="ask"?He.current.length:c.kind==="failed"?ze.current.length:2)-1;j({...c,sel:Math.max(0,Math.min(d,c.sel+e))});return}c&&!U.current||U.current&&ye(Math.max(0,Math.min(Le.current.length-1,vt.current+e)))},onSelect:()=>{let e=te.current,s=Z.current;if(!e||!s){let d=D.current;if(d&&d.st.kind!=="running"){let q=d.items[d.i];if(d.st.kind==="card"&&q){let F=d.st.sel;if(F===it(q.card)){he("");return}let ge=rt(q.card)[F];if(!ge)return;if(ge.v==="view_diff"){w({...d,st:{kind:"view",offset:0}});return}let Er=ge.v==="approve"||ge.v==="archive"?"approve":ge.v==="skip"?"reject":"defer";xr(d,Er);return}if(d.st.kind==="view"){w({...d,st:{kind:"card",sel:0}});return}if(d.st.kind==="offer"){d.st.sel===0?rn(d,d.st.offer):we(d);return}if(d.st.kind==="done"){Ge.current[d.st.sel]?.key==="view"?Je(""):(w(null),p?.());return}return}if(d&&!U.current)return;let b=z.current;if(b?.kind==="picker"){let q=b.items[b.sel];q&&(q.designed?j({kind:"confirm",item:q,sel:0}):bt(q,!1));return}if(b?.kind==="confirm"){Wn(b.item)[b.sel]?.key==="redesign"?bt(b.item,!0):kt();return}if(b?.kind==="ask"){let q=He.current[b.sel]?.key;q==="another"?kt():q==="view"?Je(""):j(null);return}if(b?.kind==="failed"){let q=ze.current[b.sel]?.key;q==="retry"?bt(b.item,b.force):q==="view"?Je(""):j(null);return}if(b&&!U.current||!U.current)return;switch(Le.current[vt.current]?.key){case"reconcile-review":tn();return;case"finish":t.completeSession();return;case"continue":t.continueParked();return;case"design-chain":kt();return;case"view":Je("",ct.current);return;case"free":ve("");return}return}let i=Ne(e),c=pe.current;if(i.batchIdx!=null&&c===i.batchIdx){t.goWithRecommendations();return}if(i.freeIdx!=null&&c===i.freeIdx){xe("");return}if(i.doneIdx!=null&&c===i.doneIdx){t.confirmMulti(G.current),We();return}if(e.multi_select){t.toggleOption(G.current,c);return}if(e.options[c]?.input===!0){ke({opt:c,value:""});return}t.submitAnswer(G.current,c),We()},onLeft:()=>{Z.current&&Be(Math.max(0,G.current-1))},onRight:()=>{let e=Z.current;e&&Be(Math.min(e.questions.length-1,G.current+1))},onDigit:e=>{let s=te.current;if(s){e-1<s.options.length&&Se(e-1);return}let i=D.current;if(i){let d=i.items[i.i];if(i.st.kind==="card"&&d){e-1<rt(d.card).length&&w({...i,st:{kind:"card",sel:e-1}});return}if(i.st.kind==="offer"){e-1<2&&w({...i,st:{...i.st,sel:e-1}});return}if(i.st.kind==="done"){e-1<Ge.current.length&&w({...i,st:{...i.st,sel:e-1}});return}if(i.st.kind!=="running"||!U.current)return}let c=z.current;if(c?.kind==="picker"){e-1<c.items.length&&j({...c,sel:e-1});return}if(c?.kind==="ask"){e-1<He.current.length&&j({...c,sel:e-1});return}if(c?.kind==="failed"){e-1<ze.current.length&&j({...c,sel:e-1});return}if(c?.kind==="confirm"){e-1<2&&j({...c,sel:e-1});return}if(!(c&&!U.current)&&U.current){let d=Le.current,b=0;for(let Y=0;Y<d.length;Y++)if(!d[Y].free&&(b+=1,b===e)){ye(Y);return}}},isMulti:()=>{let e=te.current;return!!e?.multi_select&&pe.current<(e?.options.length??0)},onSpace:()=>{Z.current&&t.toggleOption(G.current,pe.current)},onTab:()=>{let e=te.current;if(!e)return;let s=Ne(e);s.batchIdx!=null&&Se(s.batchIdx)},onType:e=>{let s=te.current;if(s){if(e==="@"&&t.canIngest()){De("");return}let c=pe.current;if(s.options[c]?.input===!0){ke({opt:c,value:e});return}if(!s.allow_free_text)return;let d=Ne(s);Se(d.freeIdx??0),xe(e);return}let i=D.current;if(i){if(i.st.kind==="card"){let c=it(i.items[i.i].card);c!=null&&(w({...i,st:{kind:"card",sel:c}}),he(e));return}if(i.st.kind!=="running"||!U.current)return}if(!(z.current&&!U.current)&&U.current){let c=gn(Le.current);if(c==null)return;ye(c),ve(e)}},onBack:()=>{let e=D.current;if(e){e.st.kind==="view"?w({...e,st:{kind:"card",sel:0}}):e.st.kind==="offer"?we(e):e.st.kind==="done"&&(w(null),p?.());return}let s=z.current;if(s&&s.kind!=="running"){j(null);return}let i=Z.current;if(i){for(let c=G.current-1;c>=0;c--)if(i.resolution[c]){Be(c);return}}}},cr=ut!=null?{value:ut,onChange:e=>xe(e),onSubmit:e=>{xe(null),e.trim()&&Z.current&&(t.submitFreeText(G.current,e),We())},onCancel:()=>xe(null)}:null,ar=mt!=null?{value:mt,onChange:e=>De(e),onSubmit:e=>{De(null),e.trim()&&t.ingestAttach(e)},onCancel:()=>De(null)}:null,ur=Ie!=null?{optionIndex:Ie.opt,value:Ie.value,onChange:e=>ke({opt:Ie.opt,value:e}),onSubmit:e=>{let s=dt.current?.opt;ke(null),s!=null&&Z.current&&(t.submitAnswerWithText(G.current,s,e),We())},onCancel:()=>ke(null)}:null,Ke=(0,m.useRef)(!1),ft=l??(()=>t.requestPause()),Ht=()=>{if(Ce.current&&!Ke.current){Ke.current=!0,$("finishing the verdict \u2014 exiting once it lands (ctrl+c again = force)");return}ft()},se=t.state.checkpoint,Ee=S?.kind==="running"&&de==="idle",gt=h?.st.kind==="running"&&de==="idle"&&ae.current!=null,fe=de==="idle"&&Yn&&!_&&!I&&(!S||Ee)&&(!h||gt),U=(0,m.useRef)(!1);U.current=fe;let ee=_e(t.state.turns).entries.length,Me,ne;for(let e=ie.length-1;e>=0;e--){if(re.current.some(i=>i.end!=null&&e>=i.start&&e<i.end))continue;let s=ie[e];if(!Me&&s.kind==="commit"&&s.ok&&(Me=s.line),!ne&&s.kind==="banner"&&s.text.startsWith("designing: ")&&(ne=s.text.slice(11)),Me&&ne)break}let ht;for(let e=ie.length-1;e>=0;e--){let s=ie[e];if(s.kind==="user")break;if(s.kind==="commit"&&s.ok&&/\bapplied\b/.test(s.line)){ht=s.line;break}}let oe=ne?{"acceptance criteria":"scenarios",scenarios:"acceptance criteria + exercises","acceptance criteria + exercises":"tests + gaps"}[ne]:void 0,zt={"acceptance criteria":"the promises every path of this use-case must keep",scenarios:"the concrete user journeys that exercise those promises","acceptance criteria + exercises":"the wiring pass \u2014 per-journey checks, tied to the promises each journey exercises","tests + gaps":"runnable browser tests \u2014 anything unautomatable is recorded as a gap"},Xt=ne?zt[ne]:void 0,Gt=oe?zt[oe]:void 0,dr="phases: acceptance criteria \u2192 scenarios \u2192 wiring \u2192 tests \xB7 stop anytime with finish",mr=(()=>{for(let e=ie.length-1;e>=0;e--){let s=ie[e];if(s.kind==="agent")return s.text}return null})(),be=/\?\s*$/.test((mr??"").trimEnd()),Yt=o==="design"&&!se&&(be||oe!==void 0),Jt=ne==="tests + gaps",Ue=S?.kind==="running"?S.title:"the design",Zt=!!t.state.error&&!t.senderAlive(),fr=Ee?"\u25CF design \xB7 ":gt?`\u25CF ${ae.current??"design"} \xB7 `:"",gr=qe?"the agent needs a clarification before it can apply that":Ee&&!se?be?`${Ue} \u2014 the agent asked a question`:ht?`${Ue} \u2014 ${ht}`:Jt?`${Ue} \u2014 design complete`:`${Ue} \u2014 the agent is waiting on you`:se?ne?`${ne} done${oe?` \u2014 next: ${oe}`:""}`:Me??"phase done":Zt?"the agent stopped \u2014 the session is view-only":Yt?be?"the agent asked a question \u2014 answer or continue":`design incomplete \u2014 ${oe} not started`:Me??"waiting on you",[Ae,hr]=(0,m.useState)(null),pr=(0,m.useRef)(null);(0,m.useEffect)(()=>{if(!x)return;let e=fe||se?x.pending():null;pr.current=e,hr(e)},[fe,se,ie.length,h==null]);let en=Ae?[{key:"reconcile-review",label:Ae.kind==="cards"?`review ${Ae.count} change(s) from ${Ae.source}`:`review change(s) detected in ${Ae.source}`}]:[],Qe=qe?[{key:"free",label:"clarify \u2014 type which one you meant",free:!0}]:Ee&&!se?Jt&&!be?[{key:"finish",label:"finish this design"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"free",label:"reply \u2014 tell the agent what to change",free:!0}]:[{key:"continue",label:be?"continue \u2014 go with your suggestion":"continue designing"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"finish",label:"finish this design"},{key:"free",label:"reply \u2014 tell the agent what to change",free:!0}]:se?[...en,{key:"continue",label:oe?`continue to ${oe}`:"continue"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"finish",label:"finish here"},{key:"free",label:"adjust \u2014 tell me what to change",free:!0}]:Zt?[...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"free",label:"tell me what to change",free:!0}]:Yt?[{key:"continue",label:be?"continue \u2014 go with your suggestion":`continue \u2014 ${oe} next`},...ee>0?[{key:"view",label:"view the design"}]:[],{key:"finish",label:"finish anyway"},{key:"free",label:"reply \u2014 answer and continue",free:!0}]:[...en,{key:"finish",label:o==="design"?"finish":"looks good \u2014 finish the session"},...u?[{key:"design-chain",label:"design tests for a use-case\u2026"}]:[],...ee>0?[{key:"view",label:o==="design"?"view the design":`view the ${ee} draft${ee===1?"":"s"}`}]:[],{key:"free",label:o==="design"?"keep adjusting \u2014 tell me what to change":"tell me what to change",free:!0}],pt=[{key:"another",label:"design another use-case\u2026"},...ee>0?[{key:"view",label:"view what was designed"}]:[],{key:"back",label:"done \u2014 back"}],He=(0,m.useRef)(pt);He.current=pt;let xt=[{key:"retry",label:"try again"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"back",label:"back"}],ze=(0,m.useRef)(xt);ze.current=xt;let Xe=[...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"back",label:"back to the check-in"}],Ge=(0,m.useRef)(Xe);Ge.current=Xe;let kt=()=>{let e=u?.listUcs()??[];if(e.length===0){$("no use-cases to design yet");return}j({kind:"picker",items:e,sel:0})},bt=(e,s)=>{let i={start:t.state.ledger.length,end:null};re.current.push(i);let c=()=>{i.end=t.state.ledger.length};j({kind:"running",title:e.title,item:e,force:s,startedAt:Date.now()}),u.runDesignChild(e.key,s).then(d=>{c(),j(d===0?{kind:"ask",title:e.title,sel:0}:{kind:"failed",item:e,force:s,detail:`child exited ${d}`,sel:0})}).catch(d=>{c();let b=d instanceof Error?d.message:String(d);t.ledger({kind:"childClose",verb:"design",subject:e.title,ok:!1,durS:Math.max(1,Math.round((Date.now()-(z.current?.kind==="running"?z.current.startedAt:Date.now()))/1e3))}),t.note(b),j({kind:"failed",item:e,force:s,detail:b,sel:0})})},tn=()=>{if(D.current?.st.kind==="running")return;let e=x?.pending();if(!e){$("nothing awaiting review");return}if(lt.current={approved:0,rejected:0,deferred:0},e.kind==="needs-run"){w({items:[],i:0,st:{kind:"running",label:`reviewing changes in ${e.source}`,startedAt:Date.now()}}),x.startReview(e.source).then(()=>{let i=x.loadCards();if(i.length===0){t.note("no reviewable changes came back \u2014 the source may be unchanged"),w(null);return}w({items:i,i:0,st:{kind:"card",sel:0}})}).catch(i=>{t.note(`the review run failed \u2014 ${i instanceof Error?i.message:String(i)}`),w(null)});return}let s=x.loadCards();if(s.length===0){$("nothing awaiting review");return}w({items:s,i:0,st:{kind:"card",sel:0}})},nn=e=>{let s=lt.current,i=`${s.approved} approved \xB7 ${s.rejected} rejected \xB7 ${s.deferred} deferred`;w({...e,st:{kind:"done",sel:0,summary:i}})},we=e=>{if(e.i+1<e.items.length){w({...e,i:e.i+1,st:{kind:"card",sel:0}});return}let s=x?.loadCards()??[];s.length===0?nn(e):w({items:s,i:0,st:{kind:"card",sel:0}})},rn=(e,s)=>{if(!u){we(e);return}ae.current=s.kind;let i={start:t.state.ledger.length,end:null};re.current.push(i),w({...e,st:{kind:"running",label:`${s.kind==="evolve"?"Evolving":"Designing"} ${s.title}`,startedAt:Date.now()}}),u.runDesignChild(s.key,s.kind==="evolve",s.kind).then(()=>{ae.current=null,i.end=t.state.ledger.length,we(D.current??e)}).catch(c=>{ae.current=null,i.end=t.state.ledger.length,t.ledger({kind:"childClose",verb:s.kind,subject:s.title,ok:!1,durS:1}),t.note(c instanceof Error?c.message:String(c)),we(D.current??e)})},xr=(e,s,i)=>{let c=e.items[e.i];!c||Ce.current||(Ce.current=!0,x.applyVerdict(c.key,s,i).then(d=>{if(Ce.current=!1,Ke.current){ft();return}let b=D.current??e;if(!d.ok){t.note(d.refusal);let Y=x.loadCards();Y.length===0?nn(b):w({items:Y,i:Math.min(b.i,Y.length-1),st:{kind:"card",sel:0}});return}lt.current[s==="approve"?"approved":s==="reject"?"rejected":"deferred"]+=1,t.ledger({kind:"commit",ok:!0,line:d.line}),d.note&&t.note(d.note),d.offer?rn(b,d.offer):we(b)}).catch(d=>{if(Ce.current=!1,Ke.current){ft();return}t.note(`the verdict did not land \u2014 ${d instanceof Error?d.message:String(d)}; try the card again`)}))},kr=e=>{x?.noteSteer?.(),w(null),he(null),$(null),t.submit(e)},br=X!=null?{value:X,onChange:e=>he(e),onSubmit:e=>{let s=e.trim();s?kr(s):he(null)},onCancel:()=>he(null)}:null,sn=(0,m.useRef)(!1);(0,m.useEffect)(()=>{!f||sn.current||(sn.current=!0,x?.pending()?tn():p?.())},[f]);let Le=(0,m.useRef)(Qe);Le.current=Qe;let wt=fe&&se&&Xt!==void 0,yt=re.current.find(e=>e.end==null)?.start??"top",on=(0,m.useRef)(new Set),[wr,ln]=(0,m.useState)(!1);(0,m.useEffect)(()=>{wt?on.current.has(yt)||(on.current.add(yt),ln(!0)):ln(!1)},[wt,yt]);let yr=wt?[...wr?[dr]:[],`${Xt}${Gt?` \xB7 next: ${Gt}`:""}`]:[],[vr,Tr]=(0,m.useState)(0),[Ye,$r]=(0,m.useState)(null),vt=(0,m.useRef)(0),cn=(0,m.useRef)(null),ye=e=>{vt.current=e,Tr(e)},ve=e=>{cn.current=e,$r(e)},Cr=`${fe}:${se}:${ct.current}`;(0,m.useEffect)(()=>{ye(0),ve(null)},[Cr]);let Rr=Ye!=null?{value:Ye,onChange:e=>ve(e),onSubmit:e=>{ve(null),ye(0);let s=e.trim();s&&($(null),t.submit(s))},onCancel:()=>{ve(null),ye(0)}}:null,Je=(e,s)=>{if(/^(uc|sc|ac|t|gap|sty)-\d+$/i.test(e.trim())){let b=e.trim().toLowerCase(),q=_e(t.state.turns).entries.findIndex(F=>(F.item.logical_id??"").toLowerCase()===b);if(q<0){$(`${e.trim().toUpperCase()} isn't in this session's items \u2014 view lists what this session minted`);return}K({level:"detail",cursor:q,scroll:0}),H(null);return}let i=jn(e);if("error"in i){$(i.error);return}let c=_e(t.state.turns);if(c.entries.length===0){$("nothing proposed yet \u2014 the first turn is still coming");return}if(i.level==="detail"&&i.num>c.entries.length){$(`no item ${i.num} \u2014 the set has ${c.entries.length} item${c.entries.length===1?"":"s"}`);return}let d=s!=null?St(c,s):c;K(_n(i,d)),H(s!=null&&d.entries.length<c.entries.length?s:null)},Tt=jt?"writing":zn??(t.state.workingLabel?It(t.state.workingLabel):o==="design"?"designing":"thinking"),Sr=ue.liveThinking.length>0||ue.thinkingLog.length>0,$t=S?.kind==="running"?{verb:"design"}:h?.st.kind==="running"&&ae.current?{verb:ae.current}:void 0,Ir=_?{kind:"waiting",pending:Hn}:de==="pausing"?{kind:"working",step:"pausing \u2014 saving session"}:S?.kind==="running"?Ee?{kind:"child-waiting"}:{kind:"child-working",step:Tt}:h?.st.kind==="running"?gt?{kind:"child-waiting"}:ae.current?{kind:"child-working",step:Tt}:{kind:"working",step:It(h.st.label)}:h?.st.kind==="card"&&h.items.length>0?{kind:"card",n:h.i+1,m:h.items.length}:S||h?{kind:"idle"}:Wt?{kind:"working",step:Tt,elapsedS:Gn}:{kind:"idle"},Dr=ut!=null||Ie!=null||mt!=null||X!=null||Ye!=null,an=h?h.items[h.i]:void 0,Br=[...Dr?["\u23CE submit","esc back"]:I?I.level==="list"?["\u2191\u2193 move","\u23CE open","esc back"]:["\u2191\u2193 scroll","esc back"]:_&&Ve?Sn(Ve,{batchCount:_.questions.length,canAttach:t.canIngest(),escBack:_.resolution.slice(0,Fe).some(e=>!!e)}).keys:h?.st.kind==="card"&&an?In(an.card).keys:h?.st.kind==="view"?["\u2191\u2193 scroll","esc back"]:h?.st.kind==="offer"?["\u2191\u2193 select","\u23CE confirm","esc later"]:h?.st.kind==="done"?Bt(Xe,{escBack:!0}).keys:S?.kind==="picker"||S?.kind==="confirm"||S?.kind==="ask"||S?.kind==="failed"?["\u2191\u2193 select","\u23CE confirm","esc back"]:fe?Bt(Qe,{escBack:!1}).keys:[],...Sr?["ctrl+t thinking"]:[],de==="pausing"?"ctrl+c force quit":"ctrl+c exit"],Ct=C??{verb:o,sid:"",env:""},un=(0,E.jsx)($n,{status:Ir,meta:{...Ct,...at??Ct.subject?{subject:at??Ct.subject}:{}},tallies:Rn(t.state,o),keys:Br,child:$t});if(I){let e=_e(t.state.turns),s=B!=null?St(e,B):e,i=e.entries.length-s.entries.length,c=I.level==="list"&&i>0,d=s.entries.length+(c?1:0),b=s.entries[I.cursor],Y=I.level==="detail"&&b?t.explainLines(b.item.slug??b.item.temp_ref):null,q=I.level==="detail"&&b&&g?g(b.item.logical_id??t.aliasOf(b.item.temp_ref)??b.item.temp_ref):null;return(0,E.jsxs)(k,{flexDirection:"column",children:[(0,E.jsx)(Dt,{onToggleThinking:()=>T(F=>!F),onCtrlC:Ht,explorer:{isOpen:()=>L.current!==null,onMove:F=>K(L.current&&ot(L.current,{type:"move",delta:F},d)),onEnter:()=>{let F=L.current;if(F){if(F.level==="list"&&c&&F.cursor===s.entries.length){H(null);return}K(ot(F,{type:"enter"},d))}},onBack:()=>{K(L.current&&ot(L.current,{type:"back"},d)),setTimeout(()=>M(F=>F+1),0)}}}),(0,E.jsx)(Pn,{items:s,state:I,verb:o,more:c?{hidden:i}:null,explain:Y,grandTotal:e.entries.length,dossier:q}),(je??W)&&(je??W).split(`
7
- `).map((F,ge)=>(0,E.jsx)(n,{color:r.orange,children:F},`nt-${ge}`)),un]})}return(0,E.jsxs)(k,{flexDirection:"column",children:[(0,E.jsx)(Dt,{onToggleThinking:()=>T(e=>!e),onCtrlC:Ht,panel:lr}),Un&&(0,E.jsx)(xn,{thinking:Qn.body,expanded:!0,thinkingDone:de!=="streaming",maxLines:Fn+1}),Ft.length>0&&(0,E.jsx)(k,{flexDirection:"column",children:Ft.map((e,s)=>(0,E.jsx)(n,{children:hn(e).map((i,c)=>(0,E.jsx)(n,{bold:i.bold,italic:i.italic,color:i.code?r.dim:void 0,children:i.text},c))},`st-${s}`))}),_&&(0,E.jsx)(Dn,{childPrefix:$t?`${$t.verb} \xB7 `:void 0,batch:_,qView:Fe,sel:Jn,focused:er,freeText:cr,optionText:ur,attach:ar,multiSelFor:e=>t.multiSelection(e)}),qe&&(0,E.jsx)(n,{color:"yellow",children:qe.prompt}),(je??W)&&(je??W).split(`
8
- `).map((e,s)=>(0,E.jsx)(n,{color:r.orange,children:e},`nt-${s}`)),fe&&(0,E.jsx)(me,{headline:`${fr}${gr}`,rows:Qe,sel:vr,focused:Ye==null,freeText:Rr,sublines:yr}),h?.st.kind==="card"&&h.items[h.i]&&(0,E.jsx)(Cn,{card:h.items[h.i].card,position:{n:h.i+1,of:h.items.length},sel:h.st.sel,focused:X==null,freeText:br,editorIntent:"steer"}),h?.st.kind==="view"&&h.items[h.i]&&(0,E.jsx)(qn,{title:h.items[h.i].card.title,lines:h.items[h.i].viewLines,offset:h.st.offset}),h?.st.kind==="offer"&&(0,E.jsx)(me,{ask:!0,headline:h.st.offer.kind==="evolve"?`approved \u2014 the design for ${h.st.offer.title} should evolve with it`:`approved \u2014 ${h.st.offer.title} has no tests yet`,rows:[{key:"run",label:h.st.offer.kind==="evolve"?"evolve the design now":"design tests now"},{key:"later",label:"later \u2014 next change"}],sel:h.st.sel,focused:!0}),h?.st.kind==="done"&&(0,E.jsx)(me,{headline:`review complete \u2014 ${h.st.summary}`,rows:Xe,sel:h.st.sel,focused:!0}),S?.kind==="picker"&&(0,E.jsx)(me,{ask:!0,headline:"design tests for which use-case?",rows:S.items.map(e=>({key:e.key,label:e.title,detail:e.badge})),sel:S.sel,focused:!0}),S?.kind==="confirm"&&(0,E.jsx)(me,{ask:!0,headline:`${S.item.title} is already designed${S.item.designed==="stale"?" \u2014 and the use-case has changed since":""}`,rows:Wn(S.item).map(e=>({key:e.key,label:e.label,detail:e.detail})),sel:S.sel,focused:!0}),S?.kind==="ask"&&(0,E.jsx)(me,{headline:`designed ${S.title}`,rows:pt,sel:S.sel,focused:!0}),S?.kind==="failed"&&(0,E.jsx)(me,{headline:`design failed \u2014 ${S.item.title} (${S.detail})`,rows:xt,sel:S.sel,focused:!0}),un]})}export{Xi as ChatSurface,Gr as tailVisualRows};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-PCKIANML.js";import"./chunk-ZC2CKWLB.js";import"./chunk-5TQFOPJV.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 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as r}from"./chunk-DOOI2JBD.js";import"./chunk-ZC2CKWLB.js";import"./chunk-5TQFOPJV.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 +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-WDMUPK6I.js";import"./chunk-DWMESHFI.js";import"./chunk-5Y2G4NC7.js";import"./chunk-5TQFOPJV.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 as h,b as l,c as i}from"./chunk-Z7IGTVJW.js";import{y as n}from"./chunk-5TQFOPJV.js";import{a as x}from"./chunk-HCBYKLMW.js";import{a as s,j as C}from"./chunk-C44QQJR4.js";import{a as S}from"./chunk-6YGTRKDT.js";import{e as u}from"./chunk-UR6MHSHU.js";var B=u(S(),1);var e=u(x(),1);function T({model:D,authLabel:w,profile:$,env:y,defaultUrl:d,projectId:a,projectName:v,folderId:t,folderName:g,windowSize:P,chromeProfile:R,target:r,deviceName:m,osVersion:f,appLabel:b,deviceSettings:c=[]}){let V=a?v?`${v} (${a})`:a:"(none)",A=t?g?`${g} (${t})`:t:"(none)",{exit:p}=C();return(0,B.useEffect)(()=>{let o=setTimeout(()=>p(),50);return()=>clearTimeout(o)},[p]),(0,e.jsx)(s,{flexDirection:"column",children:(0,e.jsx)(h,{title:"Configuration",children:(0,e.jsxs)(s,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{label:"Auth"}),(0,e.jsx)(l,{label:" method",value:w}),(0,e.jsx)(l,{label:" profile",value:$}),(0,e.jsx)(l,{label:" env",value:y}),(0,e.jsx)(i,{label:"Defaults"}),(0,e.jsx)(l,{label:" url",value:d??"(none)",valueColor:d?n.orange:n.dim}),(0,e.jsx)(l,{label:" model",value:D}),(0,e.jsx)(l,{label:" window",value:P}),(0,e.jsx)(l,{label:" project",value:V}),(0,e.jsx)(l,{label:" folder",value:A}),r!==void 0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l,{label:" target",value:r}),r!=="desktop"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l,{label:" device_name",value:m??"(not set)",valueColor:m?void 0:n.dim}),(0,e.jsx)(l,{label:" os_version",value:f??"(not set)",valueColor:f?void 0:n.dim}),(0,e.jsx)(l,{label:" app",value:b??"(not set)",valueColor:b?void 0:n.dim})]})]}),c.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{label:"Device settings"}),c.map(o=>(0,e.jsx)(l,{label:` ${o.label}`,value:o.value},o.label))]}),(0,e.jsx)(i,{label:"Paths"}),(0,e.jsx)(l,{label:" chrome",value:R,valueColor:n.dim})]})})})}export{T as ConfigView};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-UWXDURAB.js";import"./chunk-ZJYT72BA.js";import"./chunk-AACQE24F.js";import"./chunk-5GUD3CIH.js";import"./chunk-4CYBXJIA.js";import"./chunk-RTSBKCZY.js";import"./chunk-WESMQEPO.js";import"./chunk-EHN5HTUD.js";import"./chunk-OMNLAGQC.js";import"./chunk-VVOKM2VO.js";import"./chunk-HGFWIBVF.js";import"./chunk-VZ7KXRXB.js";import"./chunk-GCISXCDU.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-CH273NAE.js";import"./chunk-RFHMDQXZ.js";import"./chunk-OHOJSADN.js";import"./chunk-OIUV3ISA.js";import"./chunk-HG5LLZBU.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-75MMTNPB.js";import"./chunk-MSGW4JDG.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-XT7XA4DN.js";import"./chunk-TM7VRLWS.js";import"./chunk-4JOD47QI.js";import"./chunk-NMSZ7G6P.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.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-PEDINHVU.js";import"./chunk-WNOC6MQC.js";import"./chunk-YCCUBQY4.js";import"./chunk-2KVECC36.js";import"./chunk-ZC2CKWLB.js";import"./chunk-NMSZ7G6P.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-5TQFOPJV.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}from"./chunk-CNUCP6DK.js";import"./chunk-Z7IGTVJW.js";import"./chunk-5TQFOPJV.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as InfoBox};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-LH4IPANP.js";import"./chunk-5TQFOPJV.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as LinksBox};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-6VY62QC2.js";import"./chunk-ZC2CKWLB.js";import"./chunk-5TQFOPJV.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 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-USOYXCZ4.js";import"./chunk-WNOC6MQC.js";import"./chunk-YCCUBQY4.js";import"./chunk-2KVECC36.js";import"./chunk-ZC2CKWLB.js";import"./chunk-NMSZ7G6P.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-5TQFOPJV.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 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-Q5RDCSYM.js";import"./chunk-S3DAAAE5.js";import"./chunk-CNUCP6DK.js";import"./chunk-Z7IGTVJW.js";import"./chunk-5TQFOPJV.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};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-66MOZKD2.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as ScrollbackTap};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-BUPRL2TE.js";import"./chunk-HAYV4D2I.js";import"./chunk-X2A6CC6B.js";import"./chunk-AHFIRHSP.js";import"./chunk-JQ64X2TO.js";import"./chunk-TDPWFYTJ.js";import"./chunk-QAB3Y5FQ.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4BZOG6PE.js";import"./chunk-AKE2CTV6.js";import"./chunk-OIUV3ISA.js";import"./chunk-HG5LLZBU.js";import"./chunk-USOYXCZ4.js";import"./chunk-PEDINHVU.js";import"./chunk-WNOC6MQC.js";import"./chunk-YCCUBQY4.js";import"./chunk-2KVECC36.js";import"./chunk-VE3SUJMA.js";import"./chunk-TZXXJWHA.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-XT7XA4DN.js";import"./chunk-TM7VRLWS.js";import"./chunk-ZC2CKWLB.js";import"./chunk-Z7S3IWUX.js";import"./chunk-C6S2RPZA.js";import"./chunk-NMSZ7G6P.js";import"./chunk-DHJSM5DT.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-YWYORBY3.js";import"./chunk-5TQFOPJV.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{a,b,c,d}from"./chunk-XBX643ZD.js";import"./chunk-CNUCP6DK.js";import"./chunk-Z7IGTVJW.js";import"./chunk-5TQFOPJV.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};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{g as a}from"./chunk-C25M2J5Q.js";import"./chunk-7WXMV3O3.js";import"./chunk-K3IQEL7R.js";import"./chunk-TDPWFYTJ.js";import"./chunk-QAB3Y5FQ.js";import"./chunk-DWMESHFI.js";import"./chunk-5Y2G4NC7.js";import"./chunk-GCISXCDU.js";import"./chunk-AKE2CTV6.js";import"./chunk-ZXY4P76I.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-75MMTNPB.js";import"./chunk-MSGW4JDG.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-NMSZ7G6P.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-CNUCP6DK.js";import"./chunk-Z7IGTVJW.js";import"./chunk-5TQFOPJV.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as TestMdRunView};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-UA2QDAWT.js";import"./chunk-4CYBXJIA.js";import"./chunk-RFHMDQXZ.js";import"./chunk-NMSZ7G6P.js";import"./chunk-Z7IGTVJW.js";import"./chunk-5TQFOPJV.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as buildServeMap,b as renderTestrunEvidenceTable};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as f,b as r}from"./chunk-Z7IGTVJW.js";import{y as o}from"./chunk-5TQFOPJV.js";import{a as s}from"./chunk-HCBYKLMW.js";import{a as i,b as l,j as x}from"./chunk-C44QQJR4.js";import{a as B}from"./chunk-6YGTRKDT.js";import{e as a}from"./chunk-UR6MHSHU.js";var p=a(B(),1);var e=a(s(),1);function V({profile:b,env:g,authenticated:n,authMethod:v,username:c,tokenStatus:t,serverStatus:d,detail:u}){let{exit:m}=x();return(0,p.useEffect)(()=>{let h=setTimeout(()=>m(),50);return()=>clearTimeout(h)},[m]),(0,e.jsx)(i,{flexDirection:"column",children:(0,e.jsx)(f,{title:"Identity",variant:n?"success":"warning",children:(0,e.jsxs)(i,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{children:d==="rejected"?(0,e.jsx)(l,{color:o.red,bold:!0,children:"\u2717 Not authenticated"}):d==="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:b}),(0,e.jsx)(r,{label:"Environment",value:g}),(0,e.jsx)(r,{label:"Method",value:v}),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}),u&&(0,e.jsx)(r,{label:"Detail",value:u})]})]})})})}export{V as WhoamiView};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c,d,e,f,g,h}from"./chunk-TM7VRLWS.js";import"./chunk-RZ4F3BHX.js";import"./chunk-NOL7MNZH.js";import"./chunk-UR6MHSHU.js";export{h as AppClient,g as AppUploadError,a as UPLOAD_CONTENT_TYPE,e as parseAppDetails,b as parseAppListPage,d as parseSignedDownload,c as parseUploadResponse,f as transportReason};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as a,c as b}from"./chunk-XT7XA4DN.js";import"./chunk-TM7VRLWS.js";import"./chunk-RZ4F3BHX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-UR6MHSHU.js";export{a as isAppId,b as resolveCloudApp};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import"./chunk-UR6MHSHU.js";async function i(e){try{let[{CredentialsManager:n},{AuthResolver:a},{getEnvironment:s}]=await Promise.all([import("./credentials-QD32Y7K7.js"),import("./resolver-TLO4SRWV.js"),import("./config-YGTHSGQN.js")]),t=new n,o=t.getActiveProfile()??"default",c=t.loadCredentials(o,e);if(typeof c?.access_token!="string")return null;let r=await new a(s(e).controllerBaseUrl,async()=>c.access_token,null).resolve();return typeof r?.username!="string"||!r.username||typeof r.access_key!="string"||!r.access_key?null:Buffer.from(`${r.username}:${r.access_key}`,"utf8").toString("base64")}catch{return null}}async function u(e={}){let n=e.env??process.env,s=await(e.resolveBase??(async()=>(await import("./spawner-DPT2RLAO.js")).resolveAgentAuthEnv()))();if(s.TESTMUAI_BASIC_AUTH||n.TESTMUAI_BASIC_AUTH)return s;let t=n.TESTMUAI_ENV==="stage"?"stage":"prod",o=await(e.exchange??i)(t);return o?{...s,TESTMUAI_BASIC_AUTH:o}:s}export{u as resolveLisAuthEnv};
@@ -1,15 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{d as N}from"./chunk-SID4X77D.js";import"./chunk-ZKSN2SJ7.js";import"./chunk-EVFFDODK.js";import"./chunk-KJQNAOOE.js";import"./chunk-LSDWPG6C.js";import"./chunk-5HMN74RZ.js";import"./chunk-VORWZLS3.js";import"./chunk-VBS33P2C.js";import"./chunk-WVHMPIDQ.js";import"./chunk-XKHWWKJZ.js";import"./chunk-BB2W35TW.js";import"./chunk-AXTPNZPX.js";import"./chunk-U6OTFMIT.js";import"./chunk-BZAGVBCX.js";import"./chunk-V4B5QA3U.js";import"./chunk-SEEEGDVK.js";import"./chunk-243ZJHT6.js";import"./chunk-DTRKTBCE.js";import"./chunk-2UIHS2FH.js";import"./chunk-YKTYVJBN.js";import"./chunk-FY7TCYPK.js";import"./chunk-63DYVWNX.js";import"./chunk-427OQS2N.js";import"./chunk-7N6OCHPC.js";import"./chunk-KDNNMU7Q.js";import"./chunk-Q2F5QB2W.js";import"./chunk-Q6F23V7L.js";import"./chunk-BKHXPBWN.js";import"./chunk-N2P4MI32.js";import"./chunk-USY7VAO6.js";import{U as A,V as U,W as I,X as k}from"./chunk-GTVQYT3D.js";import"./chunk-4Y2WH77W.js";import"./chunk-T2ONUKTL.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-VHW7BMZQ.js";import"./chunk-OMNLAGQC.js";import"./chunk-VVOKM2VO.js";import"./chunk-HGFWIBVF.js";import"./chunk-VZ7KXRXB.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import{t as R}from"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import{a as d}from"./chunk-CH273NAE.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-YCCUBQY4.js";import"./chunk-MSGW4JDG.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";import{existsSync as M}from"fs";var q=new Set(["interactive","agent","ci","override"]);function F(t){return t.mode!=null&&!q.has(t.mode)?{error:`design: --mode must be interactive | agent | ci | override, got '${t.mode}'`}:t.strength!=null&&t.strength!=="pairwise"&&t.strength!=="3-wise"?{error:`design: --strength must be pairwise | 3-wise, got '${t.strength}'`}:t.max!=null&&(!Number.isInteger(t.max)||t.max<1)?{error:"design: --max must be a positive integer"}:!t.useCase&&!t.resume?{error:"design: --use-case is required (or --resume <sid> \u2014 the session remembers its use-case)"}:{useCase:t.useCase,max:t.max,strength:t.strength,mode:t.mode,force:t.force,resume:t.resume,plan:t.plan,message:t.message,phase:t.phase,allowUnreviewed:t.allowUnreviewed,because:t.because,changeDelta:t.changeDelta,priorDesign:t.priorDesign,statement:t.statement}}async function X(t){let l=async(e,s)=>{if(t.mode!=="agent")return process.stderr.write(e+`
3
- `),2;let{makeHeadlessIO:n,agentRefusal:c}=await import("./headless-io-75HUMWZB.js");return c(n("ndjson","design"),e,s)};if(t.mode!=null&&!["interactive","agent","ci","override"].includes(t.mode)){let{makeHeadlessIO:e,agentRefusal:s}=await import("./headless-io-75HUMWZB.js");return s(e("ndjson","design"),`design: --mode must be interactive | agent | ci | override, got '${t.mode}'`,"MODE_USAGE")}let T=F(t);if("error"in T)return l(T.error);let o=T;{let{validateResumeMessage:e}=await import("./headless-io-75HUMWZB.js"),s=e(o,"design");if(s)return l(s)}{let{gateStructuredFlags:e}=await import("./structured-answers-ZI2B6JJE.js"),s=e(t,"design");if(s)return l(s,"STRUCTURED_FLAGS_USAGE")}if(!M(d(process.cwd())))return l("error: no context store here (run `kane-cli context ingest` + `kane-cli context extract` first)","NO_STORE");{let e=I(d(process.cwd()));if(e){if(t.mode!=="agent")return l(`error: ${e.text}
4
- next: ${e.remedy}`,e.code);let{makeHeadlessIO:s}=await import("./headless-io-75HUMWZB.js"),n=s("ndjson","design");return n.event(k(e)),n.done(2,"refused")}}let x=!!o.resume;if(o.useCase&&o.resume&&!t.allowUnreviewed)try{let{peekSession:e}=await import("./sessions-NH7WQWMX.js"),s=e(d(process.cwd()),o.resume);x=!!(s&&s.use_case===o.useCase)}catch{x=!1}if(o.useCase&&!x&&!t.allowUnreviewed)try{let[{openGraph:e},{designEntryCheck:s}]=await Promise.all([import("./readmodel-FVLRQWZ7.js"),import("./trust-gate-EX7R2P4Y.js")]),n=s(e(d(process.cwd())),o.useCase);if(!n.ok&&(n.code==="UC_UNREVIEWED"||n.code==="UC_ARCHIVED"))if((o.mode??"interactive")==="interactive"&&process.stdin.isTTY&&process.stdout.isTTY){let{createInterface:f}=await import("readline/promises"),u=f({input:process.stdin,output:process.stderr}),w=(await u.question(`design: ${n.detail}
5
- Design against it anyway? (y/N) `)).trim().toLowerCase();if(u.close(),w!=="y"&&w!=="yes")return process.stderr.write(`aborted \u2014 approve it first: ${n.reviewCmd}
6
- `),2}else if(t.mode==="agent"){let{makeHeadlessIO:f}=await import("./headless-io-75HUMWZB.js"),u=f("ndjson","design");return u.event({type:"error",code:n.code,message:`design: ${n.detail}`,next:[n.reviewCmd]}),u.event({type:"done",status:"refused",exit_code:2,next:[n.reviewCmd,`kane-cli design tests --use-case ${o.useCase} --mode agent --allow-unreviewed`]}),2}else return process.stderr.write(`design: ${n.detail} (${n.reviewCmd})
7
- `),2}catch(e){process.env.KANE_DEBUG&&process.stderr.write(`trust gate skipped: ${String(e)}
8
- `)}let r=null,p=null;try{if(!o.mode&&!process.stdin.isTTY)return process.stderr.write(`design: no TTY \u2014 pass an explicit --mode agent|ci|override to run headless
9
- `),2;let e=o.mode??"interactive";if(e==="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)
10
- `),2;let{bindDesignInteractive:i}=await import("./interactive-bind-IYS6KDOH.js");return await i(o)}let{resolveAgentAuthEnv:s}=await import("./spawner-DPT2RLAO.js"),{runAgent:n}=await import("./bridge-7J3JE3JS.js"),{preflightTurn:c}=await import("./turn-preflight-JGYT7LXP.js"),{makeInterruptGuard:f}=await import("./interrupt-guard-UREUWNRL.js"),{baseUrlAdvisory:u}=await import("./turn-preflight-JGYT7LXP.js"),{makeHeadlessIO:w,resolveEncoding:E,guardedChannels:G}=await import("./headless-io-75HUMWZB.js"),{withStructuredNext:O,prepareStructuredResume:Y}=await import("./structured-answers-ZI2B6JJE.js");r=O(w(E(e),"design"));let b=await A(d(process.cwd()));b&&(E(e)==="ndjson"?r.event(U(b)):r.progress(b.text));let{runWithChannel:H}=await import("./run-channel-RGH4WIQX.js"),v=r,P=E(e)==="ndjson"?i=>H({event:g=>v.event(g)},i):i=>i(),C=i=>{v.out(i),v.event({type:"note",text:i})},{telemetryBootstrap:j,telemetryEnvName:B}=await import("./bootstrap-DI4UGMH3.js"),m=j({verb:"design",mode:e,contextRoot:d(process.cwd()),env:B(),resumeSid:o.resume,write:!0,longSession:!0});p=i=>m.end(i);let a=Y({opts:t,contextDir:d(process.cwd()),verb:"design"});if(a.kind==="refuse")return r.out(a.error),e==="agent"&&r.event({type:"error",message:a.error,code:a.code}),await m.end({exit_code:2}),e==="agent"?r.done(2,"refused"):2;let D;if(a.kind==="apply"){for(let i of a.notes)C(i);if(a.matchedQids.length>0){C(`applying ${a.matchedQids.length} structured answer(s) from --answer to the paused session's pending questions`);for(let i of a.matchedQids)r.event({type:"panel_resolved",id:i,by:"user",via:"flag"})}a.statement&&(D=[o.message,a.statement].filter(Boolean).join(`
11
-
12
- `))}let _=u();_&&C(_);let h=f(n,i=>r.out(i)),S=G(r,()=>h.interrupted(),/^error: (design agent failed|the design agent ended)/);try{let i=e==="interactive"&&process.stdin.isTTY&&process.stdout.isTTY?async y=>{let{createInterface:L}=await import("readline/promises"),$=L({input:process.stdin,output:process.stdout});try{return/^y(es)?$/i.test((await $.question(`${y} [y/N] `)).trim())}finally{$.close()}}:void 0,g=await P(async()=>{let y={...await s(),...m.spawnEnv()};return N({...o,mode:e,...D!==void 0?{message:D}:{},...i?{confirmRetarget:i}:{}},{contextDir:d(process.cwd()),agent:h.agent,preflightTurn:()=>c(y),ask:async()=>[],out:S.out,emit:S.emit,progress:v.progress,isTTY:!1,auth:y,telemetry:m})});return h.interrupted()&&g!==3?(r.out("interrupted \u2014 no session saved"),await m.end({exit_code:130}),r.done(130)):(g===1&&r.out(m.supportFooter()),await m.end({exit_code:g}),r.done(g))}finally{h.dispose()}}catch(e){if(e instanceof R)return p&&await p({exit_code:2}).catch(()=>{}),r?(r.event(k({code:e.code,text:e.message,remedy:e.remedy})),r.done(2,"refused")):(process.stderr.write(`error: ${e.message}
13
- next: ${e.remedy}
14
- `),2);p&&await p({exit_code:1}).catch(()=>{});let s=e instanceof Error?e.message:String(e);r?.event({type:"error",message:`error: design failed: ${s}`});let n=r?c=>r.out(c):c=>process.stderr.write(c+`
15
- `);return n(`error: design failed: ${s}`),(process.env.ASSURANCE_LOG_LEVEL??"").toLowerCase()==="debug"&&e instanceof Error&&e.stack&&n(e.stack),n('hint: the full trace is in the file named on the "trace:" line at the start of this run'),r?r.done(1):1}}export{X as designTestsCommand,F as normalizeOpts};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-3YIZG7WZ.js";import"./chunk-ZLWURCJ7.js";import"./chunk-QSCXXNC2.js";import"./chunk-KBM3XHAM.js";import"./chunk-2YEHV2CX.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-5TQFOPJV.js";import"./chunk-UR6MHSHU.js";export{b as telemetryBootstrap,a as telemetryEnvName};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-OC6H6BYI.js";import"./chunk-OXC6O5O7.js";import"./chunk-243ZJHT6.js";import"./chunk-UD7KKHPW.js";import"./chunk-5TQFOPJV.js";import"./chunk-UR6MHSHU.js";export{a as runAgent};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as Box,f as Newline,g as Spacer,d as Static,b as Text,e as Transform,o as measureElement,c as render,j as useApp,m as useFocus,n as useFocusManager,i as useInput,l as useStderr,h as useStdin,k as useStdout};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{f as a,g as b,h as c,i as d,j as e,k as f,l as g}from"./chunk-BL3SJDCG.js";import"./chunk-NMSZ7G6P.js";import"./chunk-RZ4F3BHX.js";import"./chunk-5TQFOPJV.js";import"./chunk-UR6MHSHU.js";export{a as ANY_REAL_DEVICE,g as checkRealDevice,c as fetchRealDeviceCatalog,e as isAnyRealDevice,f as matchRealDevice,d as osMajorOf,b as parseRealDeviceCatalog};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-3VAU3PNU.js";import"./chunk-BZAGVBCX.js";import"./chunk-V4B5QA3U.js";import"./chunk-427OQS2N.js";import"./chunk-VVOKM2VO.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{a as commitChatTurn};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-VIO7CCFW.js";import"./chunk-AXTPNZPX.js";import"./chunk-U6OTFMIT.js";import"./chunk-V4B5QA3U.js";import"./chunk-VVOKM2VO.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{c as makeChatController,b as questionStub,a as recommendationPicks};
@@ -1,4 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as n}from"./chunk-5TQFOPJV.js";import{createHash as _}from"crypto";import{existsSync as m,readFileSync as u}from"fs";import{dirname as T,join as f,resolve as o}from"path";import{fileURLToPath as E}from"url";var s=T(E(import.meta.url)),l=2;function p(e,r){let t=_("sha256");return t.update(`kane-assurance-contract
3
- `),t.update(e),t.update(`
4
- agent_state_schema=${r}`),"sha256:"+t.digest("hex")}function d(){return[o(s,".."),o(s,"../../..")]}function i(){return"sha256:4f00de27d151118e79aafd46ebe51bb69ce7dd9fabe647124c62f2d187e11aa7"}var a=class extends Error{constructor(t,c){super(`agent/cli contract mismatch (cli ${t||"<unset>"}, agent ${c||"<unset>"}) \u2014 rebuild or reinstall the stale half`);this.expected=t;this.actual=c;this.name="PairMismatchError"}};function I(){return{TESTMUAI_CONTRACT_DIGEST:i(),TESTMUAI_CLIENT_VERSION:process.env.KANE_DEV_FORCE_CLIENT_RELEASE??`kane-cli/${n}`}}export{a,I as b};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as u}from"./chunk-NLCCBXXV.js";import{a as n}from"./chunk-RZ4F3BHX.js";var f=class extends u{constructor(e,t,s){super(e,{username:t,accessKey:s})}async listProjects(e){let t=[],s=!1;for await(let r of this.listProjectsStream({log:e})){if(e&&!s&&r.projects.length>0){let o=r.projects[0];e("info","PROJECT_SAMPLE","Project list sample",{project_id:o.project_id,name:o.name}),s=!0}t.push(...r.projects)}return t}async*listProjectsStream(e){let t=e?.perPage??200,s=e?.maxPages??100,r=e?.signal,o=e?.log,d=e?.name?.trim(),a=0;for(let i=1;i<=s;i++){if(r?.aborted)return;let g=`${this.baseUrl}/v1/projects?page=${i}&per_page=${t}&sort=created_at&filter[product]=KTM`;d&&(g+=`&filter[name]=${encodeURIComponent(d)}`);let p=AbortSignal.timeout(15e3),y=r?AbortSignal.any([r,p]):p,c;try{c=await n(g,{method:"GET",headers:this.headers(),signal:y})}catch(l){if(r?.aborted)return;if(i===1)throw l;o?.("warn","PROJECTS_STREAM_PARTIAL","stream stopped mid-page",{page:i,total_loaded:a,error:l instanceof Error?l.message:String(l)}),yield{page:i,projects:[],totalLoaded:a,done:!0};return}if(!c.ok){if(i===1)throw new Error(`listProjects ${c.status}: ${await c.text()}`);o?.("warn","PROJECTS_STREAM_PARTIAL","stream stopped on non-OK response",{page:i,status:c.status,total_loaded:a}),yield{page:i,projects:[],totalLoaded:a,done:!0};return}let m=(await c.json()).data??[];a+=m.length;let h=m.length<t;if(yield{page:i,projects:m,totalLoaded:a,done:h},h)return}o?.("warn","PROJECTS_STREAM_MAXPAGES","max pages reached",{max_pages:s,total_loaded:a}),yield{page:s,projects:[],totalLoaded:a,done:!0}}async getDefaultFolder(e){let t=await n(`${this.baseUrl}/v1/projects/${e}/folder/default`,{method:"GET",headers:this.headers()});if(!t.ok)throw new Error(`Get default folder failed: ${t.status} ${await t.text()}`);return(await t.json()).id}async listFolders(e){let t=await n(`${this.baseUrl}/v1/folder/entity/${e}`,{method:"GET",headers:this.headers()});if(!t.ok)throw new Error(`List folders failed: ${t.status} ${await t.text()}`);return(await t.json()).data??[]}async validateProjectFolder(e,t){let s;try{s=await n(`${this.baseUrl}/v1/folder/entity/${e}`,{method:"GET",headers:this.headers()})}catch{return{project:"error",folder:"error"}}if(s.status>=400&&s.status<500)return{project:"missing",folder:"missing"};if(!s.ok)return{project:"error",folder:"error"};let r;try{r=await s.json()}catch{return{project:"error",folder:"error"}}return{project:"ok",folder:(r.data??[]).some(a=>a.id===t)?"ok":"missing"}}async createProject(e,t=""){let s=await n(`${this.baseUrl}/v1/projects`,{method:"POST",headers:{...this.headers(),"Content-Type":"application/json"},body:JSON.stringify({name:e,description:t,tags:[],source:"KTM"})});if(!s.ok)throw new Error(`Create project failed: ${s.status} ${await s.text()}`);return{id:(await s.json()).id,name:e}}async createFolder(e,t,s=""){let r=await n(`${this.baseUrl}/v1/folder`,{method:"POST",headers:{...this.headers(),"Content-Type":"application/json"},body:JSON.stringify({folders:[{name:t,description:s,entity_id:e,entity_type:"project"}]})});if(!r.ok)throw new Error(`Create folder failed: ${r.status} ${await r.text()}`);return{id:(await r.json()).id,name:t}}async createAtmTest(e,t){let s=t?`Bearer ${t}`:this.authHeader,r=await n(`${this.baseUrl}/kane-cli/v1/test`,{method:"POST",headers:{Authorization:s,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)});if(!r.ok)throw new Error(`Create ATM test failed: ${r.status} ${await r.text()}`);let o=await r.json();if(!o.test_id)throw new Error("Create ATM test returned no test_id");return o.test_id}async createMobileAtmTest(e,t){let s=t?`Bearer ${t}`:this.authHeader,r=await n(`${this.baseUrl}/kane-cli/v1/mobile/test`,{method:"POST",headers:{Authorization:s,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)});if(!r.ok)throw new Error(`Create mobile ATM test failed: ${r.status} ${await r.text()}`);let o=await r.json();if(!o.test_id)throw new Error("Create mobile ATM test returned no test_id");return o.test_id}async endTest(e,t,s){let r=s?`Bearer ${s}`:this.authHeader,o=new URLSearchParams({commit_id:t.commit_id,time_taken:String(t.time_taken),steps_count:String(t.steps_count),commit_message:t.commit_message}),d={};t.objectives&&t.objectives.length>0&&(d.objectives=t.objectives);let a=await n(`${this.baseUrl}/kane-cli/v1/test/${e}?${o.toString()}`,{method:"DELETE",headers:{Authorization:r,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(d)});if(!a.ok)throw new Error(`End test failed: ${a.status} ${await a.text()}`);let i=await a.json();return{testcase_id:i.data?.testcase_id??"",test_id:i.data?.test_id??e,project_id:i.data?.project_id??""}}async submitFeedback(e,t){let s=t?`Bearer ${t}`:this.authHeader,r={instruction_id:e.instruction_id,test_id:e.test_id,feedback_type:e.feedback_type,mode:e.mode??"human"};e.details&&(r.details=e.details);let o=await n(`${this.baseUrl}/atm/v1/generative-feedback`,{method:"POST",headers:{Authorization:s,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)});if(!o.ok)throw new Error(`Submit feedback failed: ${o.status} ${await o.text()}`);return await o.json()}async ingestEvidence(e,t){let s=await n(`${this.baseUrl}/kane-cli/v1/evidence/ingest`,{method:"POST",headers:{Authorization:this.authHeader,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({evidence_id:e,project_id:t})});if(!s.ok)throw new Error(`Evidence ingest failed: ${s.status} ${await s.text()}`)}};export{f as a};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{execSync as c}from"child_process";import{readFileSync as o}from"fs";import{createHash as a}from"crypto";import{hostname as u,platform as f,arch as m}from"os";var t=null;function g(){return t||(t=s(),t)}function s(){let r=f();if(r==="darwin")try{let n=c("ioreg -rd1 -c IOPlatformExpertDevice",{encoding:"utf-8",timeout:5e3}).match(/"IOPlatformUUID"\s*=\s*"([^"]+)"/);if(n?.[1])return n[1]}catch{}if(r==="linux")try{let e=o("/etc/machine-id","utf-8").trim();if(e)return e}catch{}let i=`${u()}:${r}:${m()}`;return a("sha256").update(i).digest("hex").slice(0,32)}export{g as a};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as h}from"./chunk-4BZOG6PE.js";import{a as f}from"./chunk-F7NSSQYZ.js";import{a as m}from"./chunk-NMSZ7G6P.js";var i=class extends Error{constructor(a,l){super(a);this.code=l;this.name="AuthError"}};async function S(c){let{creds:o,env:a,usernameFlag:l,accessKeyFlag:g,log:t}=c,e=null,u=null;if(l&&g)e={username:l,access_key:g},t("info","AUTH_RESOLVE_FLAGS","Auth resolved via CLI flags",{username:l});else{let r=o.resolveAuth();r?.method==="basic"&&(e={username:r.username,access_key:r.access_key},t("info","AUTH_RESOLVE_CONFIG","Auth resolved via config",{username:r.username}))}if(!e){let{credentials:r,profile:E}=o.getActiveCredentials();if(!r)throw new i("Not authenticated \u2014 no credentials found","not_authenticated");if(u=r.access_token,r.expires_at-Date.now()/1e3<300)try{let n=await f({creds:o,profile:E,env:a,credentials:r});n&&(u=n.accessToken,t("info","AUTH_TOKEN_REFRESHED","OAuth token refreshed"))}catch(n){let d=n instanceof Error?n.message:String(n);throw t("error","TOKEN_REFRESH_FAILED","Token refresh failed",{error:d}),new i(`Token refresh failed: ${d}`,"refresh_failed")}}let v=m(a),b=async()=>u,y=e?{username:e.username,access_key:e.access_key}:null,p=new h(v.controllerBaseUrl,b,y,t),s=await p.resolve();return s&&!e&&(e={username:s.username,access_key:s.access_key},t("info","AUTH_RESOLVE_CONTROLLER","Auth resolved via controller",{username:s.username})),{basicAuth:e,token:u,resolver:p,resolvedCreds:s}}export{i as a,S as b};
@@ -1,4 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- var d=/^L([1-9]\d*)-L([1-9]\d*)$/,u=/^img#(p[1-9]\d*-[1-9]\d*|i[1-9]\d*)$/;function l(e){if(e==="img#whole")return{kind:"img-whole"};let n=u.exec(e);if(n)return{kind:"img-part",ref:n[1]};let r=d.exec(e);return r?{kind:"lines",a:parseInt(r[1],10),b:parseInt(r[2],10)}:null}function c(e,n){let r=/^L(\d+)-L(\d+)$/.exec(n);if(!r)return null;let t=parseInt(r[1],10),o=parseInt(r[2],10),i=e.split(`
3
- `);return t<1||o<t||o>i.length?null:i.slice(t-1,o).map(s=>s.replace(/^\d+\| /,"")).join(`
4
- `)}function a(e){return e.replace(/\s+/g," ").trim()}function g(e,n){let r=a(e);return r.length>0&&a(n).includes(r)}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function f(e,n){let r=n.split(/\s+/).filter(i=>i.length>0);if(r.length===0)return[];let t=new RegExp(r.map(p).join("\\s+"),"g"),o=[];for(let i=t.exec(e);i!==null;i=t.exec(e))o.push({index:i.index,length:i[0].length}),t.lastIndex=i.index+1;return o}function x(e,n,r){let t=l(n.anchor);if(e.format==="image")return t?.kind==="img-whole"?[]:[{code:"CITE_ANCHOR_INVALID",detail:`image cites are anchor-only (img#whole), got ${n.anchor}`}];if(t?.kind==="img-part")return new Set((e.images??[]).map(s=>s.ref)).has(t.ref)?[]:[{code:"CITE_ANCHOR_INVALID",detail:`anchor ${n.anchor} names no embedded image of this source version`}];if(!n.anchor||n.quote===void 0||n.quote==="")return[{code:"MISSING_CITE",detail:"text-kind cites need anchor+quote"}];let o=r!==null?c(r,n.anchor):null;return o===null?[{code:"BAD_ANCHOR",detail:`anchor ${n.anchor} does not resolve in the source`}]:g(n.quote,o)?[]:[{code:"QUOTE_MISMATCH",detail:`quote is not verbatim within ${n.anchor}`}]}export{l as a,c as b,g as c,f as d,x as e};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as J,c as Ee}from"./chunk-BZAGVBCX.js";import{a as M,b as ve}from"./chunk-V4B5QA3U.js";import{a as ye}from"./chunk-427OQS2N.js";import{d as me}from"./chunk-VVOKM2VO.js";import{C as he,b as le,c as pe,e as ue,m as j,y as ge,z as fe}from"./chunk-IICT4VOU.js";import{a as ae}from"./chunk-D6E6KRVX.js";import{c as ce}from"./chunk-3UI5VTQS.js";import{H as re,M as oe,c as F,d as k,m as de}from"./chunk-RDHWNSDP.js";import{g as N,h as L,i as se,j as Y}from"./chunk-XLSOQLVT.js";var Ne=new Set(["approve","edit","reject"]);function Ue(v){let{contextDir:E,graph:s,ops:z,by:f}=v,w=v.mintable??ye(),U=re(E);if(s.latestHash!==U)return{record:null,errors:[{code:"STALE_BASIS",detail:`graph opened at ${String(s.latestHash)} but chain head is ${String(U)} \u2014 re-open and retry`}]};let V=[],b=[],Q=new Set;for(let e of z){if(s.appliedEvents.has(e.eventId)||Q.has(e.eventId)){V.push(e.eventId);continue}Q.add(e.eventId),b.push(e)}if(b.length===0)return{record:null,errors:null,applied:[],skipped:V,minted:[],staleDelta:[]};let d=[],B=[],y=[],C=[],$=[],G=[],D=[...v.judgements??[]],K=[],q=new Map,X=new Set,Z=[],_=new Set,$e=new Set(w),ee=new Set;for(let e of b){if(!Ne.has(e.kind))continue;let i=e.target,t=s.resolve(i),n=t?s.tipOf(t.cid):i;ee.has(n)&&d.push({code:"MULTIPLE_TERMINAL_OPS",detail:`${i} has more than one terminal op in this turn \u2014 normalize latest-wins first`}),ee.add(n)}let I={targets:{},enhance:{},redirectTo:{},retract:{},conv:{}},T=(e,i)=>{let{target:t,expectedCid:n}=i,o=s.resolve(t);if(!o)return d.push({code:"UNKNOWN_NODE",detail:`${e}: ${t} names nothing in the graph`}),null;let r=s.tipOf(o.cid);return r!==n||s.superseded.has(n)?(d.push({code:"EXPECTED_CID_MOVED",detail:`${e}: ${t} moved or was archived since it was displayed`,data:{tip:r}}),null):(I.targets[i.eventId]=n,n)},W=e=>new Set(he(s,s.tipOf(e))),O=[],R=new Set,te=e=>({code:"RETRACT_FORBIDDEN",detail:`retract ${e}: provenance edges cannot be retracted \u2014 DERIVES is historical evidence; reject or edit the node instead`});for(let e of b){if(e.kind!=="retract"){O.push(e);continue}let i=T("retract",e);if(!i)continue;let t=new Map;for(let r of W(i))for(let p of[...s.edgesFrom(r),...s.edgesInto(r)])t.set(p.ecid,p);let n,o={};if(e.edgeEcid!==void 0){if(s.superseded.has(e.edgeEcid)){d.push({code:"UNKNOWN_EDGE",detail:`retract ${e.target}: ${e.edgeEcid} is already retracted`});continue}if(n=t.get(e.edgeEcid),!n){d.push({code:"UNKNOWN_EDGE",detail:`retract ${e.target}: ${e.edgeEcid} is not a live edge touching ${e.target} (checked the full version chain)`});continue}}else if(e.edgeRef!==void 0){let r=e.edgeRef;if(r.type===N.DERIVES){d.push(te(e.target));continue}let p=(a,h)=>{let S=j(s,h);if(S)return S;let u=s.resolve(h)!==null;return d.push(u?{code:"TOMBSTONED_REF",detail:`retract ${e.target}: ${r.type} ${a} '${h}' is tombstoned (retired with no live successor) \u2014 pick a live node`}:{code:"UNKNOWN_REF",detail:`retract ${e.target}: ${r.type} ${a} got (unknown) for '${h}' \u2014 not a committed node (a node added in this same turn has no id yet: commit the add first)`}),null},l=p("dst",r.dst);if(!l)continue;o.dst=l.cid;let c=W(l.cid),m=null;if(r.src!==void 0){let a=p("src",r.src);if(!a)continue;o.src=a.cid,m=W(a.cid)}let g=[...t.values()].filter(a=>a.type===r.type&&c.has(a.dst)&&(m===null||m.has(a.src)));if(g.length===0){d.push({code:"UNKNOWN_EDGE",detail:`retract ${e.target}: no live ${r.type} edge onto ${r.dst}${r.src!==void 0?` from ${r.src}`:""} touches ${e.target} (checked the full version chain)`});continue}if(g.length>1){let a=g.map(h=>`${h.type} ${s.displayNameOf(h.src)??h.src} \u2192 ${s.displayNameOf(h.dst)??h.dst} (${h.ecid})`).join("; ");d.push({code:"AMBIGUOUS_RETRACT",detail:`retract ${e.target}: ${g.length} live ${r.type} edges match \u2014 ${a} \u2014 add src to disambiguate`});continue}n=g[0]}else{d.push({code:"INVALID_RETRACT",detail:`retract ${e.target}: neither edge_ecid nor edge {type, dst, src?} was given`});continue}if(n.type===N.DERIVES){d.push(te(e.target));continue}if(R.has(n.ecid)){d.push({code:"EDGE_RETRACTED",detail:`retract ${e.target}: ${n.ecid} was retracted earlier in this turn`});continue}R.add(n.ecid),I.retract[e.eventId]={ecid:n.ecid,...o},O.push({kind:"retract",target:e.target,expectedCid:e.expectedCid,edgeEcid:n.ecid,reason:e.reason,eventId:e.eventId})}let x=new Map;for(let e of O){if(e.kind!=="edit")continue;let i=s.resolve(e.target);if(!i||s.tipOf(i.cid)!==e.expectedCid||s.superseded.has(e.expectedCid))continue;let t=s.getNode(e.expectedCid);if(!t)continue;let n={...t.content};for(let[r,p]of Object.entries(e.edit))p!==void 0&&(n[r]=p);if(typeof n.title=="string"&&!n.title.trim()||L(t.label,n).length>0)continue;let o=F(t.label,n);o!==e.expectedCid&&x.set(e.expectedCid,o)}for(let e of O)if(e.kind==="approve"){let i=T("approve",e);i&&C.push({id:i,kind:"review-item",resolution:"approved",edit:null,reason:null,by:f})}else if(e.kind==="reject"){let i=T("reject",e);if(!i)continue;if(C.push({id:i,kind:"review-item",resolution:"rejected",edit:null,reason:e.reason,by:f}),e.redirectTo!==void 0){let t=s.resolve(e.redirectTo);if(!t||t.superseded){d.push({code:"UNKNOWN_NODE",detail:`reject.redirectTo: ${e.redirectTo} is not a live node`});continue}I.redirectTo[e.eventId]=t.cid,$.push({kind:"node",old:i,new:t.cid,reason:e.reason,by:f})}}else if(e.kind==="edit"){let i=T("edit",e);if(!i)continue;let t=s.getNode(i);if(!t){d.push({code:"UNKNOWN_NODE",detail:`edit: ${e.target} node file unreadable`});continue}let n={...t.content};for(let[l,c]of Object.entries(e.edit))c!==void 0&&(n[l]=c);if(typeof n.title=="string"&&!n.title.trim()){d.push({code:"EMPTY_TITLE",detail:`edit: ${e.target} edited title is empty`});continue}let o=L(t.label,n);if(o.length>0){for(let l of o)d.push({code:l.code,detail:`edit ${e.target}: ${l.detail}`});continue}let r=F(t.label,n);if(r===i){C.push({id:i,kind:"review-item",resolution:"approved",edit:null,reason:null,by:f});continue}if(le(s,i,r)){d.push({code:"SUPERSEDE_CYCLE",detail:`edit ${e.target}: edit reproduces an already-superseded version (supersession cycle guard) \u2014 re-edit forward or redesign`});continue}let p=pe({graph:s,oldTip:i,newCid:r,newLabel:t.label,by:f,reason:`re-blessed onto ${r} (edited in chat)`,skipEcids:R,dstRedirect:x});if(p.errors.length>0){for(let l of p.errors)d.push({code:"REBLESS_REFUSED",detail:`edit ${e.target}: ${l}`});continue}B.push({cid:r,label:t.label,content:n}),y.push(...p.edges),$.push({kind:"node",old:i,new:r,reason:e.reason??"edited in chat",by:f}),$.push(...p.supersessions),C.push({id:r,kind:"review-item",resolution:"edited",edit:{...e.edit},reason:null,by:f})}else if(e.kind==="enhance"){if(!T("enhance",e))continue;for(let t of e.edges){let n=j(s,t.src),o=j(s,t.dst);if(!n||!o){let[u,H]=n?["dst",t.dst]:["src",t.src],Se=s.resolve(H)!==null;d.push(Se?{code:"TOMBSTONED_REF",detail:`enhance ${e.target}: ${t.type} ${u} '${H}' is tombstoned (retired with no live successor) \u2014 pick a live node`}:{code:"UNKNOWN_REF",detail:`enhance ${e.target}: ${t.type} ${u} got (unknown) for '${H}' \u2014 not a committed node (a node added in this same turn has no id yet: commit the add first)`});continue}(I.enhance[e.eventId]??=[]).push({src:n.cid,dst:o.cid});let r=s.nodeLabel.get(n.cid)??"(unknown)",p=s.nodeLabel.get(o.cid)??"(unknown)";for(let u of Y(t.type,r,p,t.props))d.push({code:u.code,detail:`enhance ${e.target}: ${u.detail}`});let l=k(t.type,n.cid,o.cid,t.props),c=x.get(n.cid)??n.cid,m=x.get(o.cid)??o.cid,g=k(t.type,c,m,t.props);if(s.superseded.has(l)||R.has(l)||s.superseded.has(g)){let u=s.superseded.has(l)||R.has(l)?l:g;d.push({code:"EDGE_RETRACTED",detail:`enhance ${e.target}: this ${t.type} edge was retracted (${u}) \u2014 re-adding a retracted edge is refused (revival unsupported)`});continue}if(s.edgesFrom(n.cid).some(u=>u.ecid===l)||y.some(u=>u.ecid===g))continue;let a=ue(s,t.type,n.cid,o.cid,Z);a&&d.push(a);let h=ae(s,{type:t.type,src:n.cid,dst:o.cid},{pending:[],retracted:R},`enhance ${e.target}`);h&&d.push(h);let S=se(t.type)?.cardinality;if(S==="one-live-per-src"||S==="one-live-per-src-and-dst"){let u=`${t.type}|${n.cid}`;_.has(u)&&d.push({code:"CARDINALITY_VIOLATION",detail:`${t.type} from ${n.cid}: two one-live edges in one turn`}),_.add(u)}if(S==="one-live-per-src-and-dst"){let u=`${t.type}|dst|${o.cid}`;_.has(u)&&d.push({code:"CARDINALITY_VIOLATION",detail:`${t.type} onto ${o.cid}: two one-live edges in one turn (strict 1:1)`}),_.add(u)}y.push({ecid:g,type:t.type,src:c,dst:m,props:t.props}),Z.push({src:n.cid,dst:o.cid,type:t.type})}}else if(e.kind==="retract")$.push({kind:"edge",ecid:e.edgeEcid,reason:e.reason,by:f});else if(e.kind==="add"){if(!$e.has(e.label)){d.push({code:"GATED_LABEL",detail:`add: ${e.label} is not mintable in v1 (gate: ${w.join("|")})`,data:{gate:[...w]}});continue}let i=s.heads.get(e.convSourceId),t=s.convChains.get(e.convSourceId);if(typeof i!="string"||!t){d.push({code:"CONV_SOURCE_MISSING",detail:`add: ${e.convSourceId} is not a live conversation source`});continue}I.conv[e.eventId]=i;let n=s.getNode(i)?.content?.blob,o=typeof n=="string"?me(E,n)?.toString("utf8")??"":"",r=ve(o,e.cite.turn);if(r===null){d.push({code:"BAD_ANCHOR",detail:`add: ${M(e.cite.turn)} does not resolve in ${e.convSourceId}`});continue}if(!ce(e.cite.quote,r)){d.push({code:"QUOTE_MISMATCH",detail:`add: quote is not verbatim within ${M(e.cite.turn)}`});continue}let p={...e.content,derived:!0},l=L(e.label,p);if(l.length>0){for(let a of l)d.push({code:a.code,detail:`add: ${a.detail}`});continue}let c=F(e.label,p),m={source_id:e.convSourceId,source_cid:i,anchor:M(e.cite.turn),quote:e.cite.quote};for(let a of Y(N.DERIVES,"source",e.label,m))d.push({code:a.code,detail:`add: ${a.detail}`});if(s.hasNode(c)){if(s.superseded.has(c)){d.push({code:"NODE_TOMBSTONED",detail:`add: ${s.nameOf.get(c)??c} already exists and was retired \u2014 restore it deliberately or add it under new content`});continue}y.push({ecid:k("DERIVES",i,c,m),type:N.DERIVES,src:i,dst:c,props:m}),e.rationale&&D.push({about:c,rationale:e.rationale,by:f}),q.set(e.eventId,c);continue}B.push({cid:c,label:e.label,content:p}),y.push({ecid:k("DERIVES",i,c,m),type:N.DERIVES,src:i,dst:c,props:m}),e.rationale&&D.push({about:c,rationale:e.rationale,by:f});let g=ge(e.label,a=>X.has(a),s.names.keys());g!==null&&(X.add(g),G.push({cid:c,slug:g,by:f})),K.push({cid:c,...g!==null?{slug:g}:{}}),q.set(e.eventId,c)}if(d.length)return{record:null,errors:d};let ne=new Date().toISOString();for(let e of O){if(e.kind==="add"){let i=q.get(e.eventId);i&&J(E,{ts:ne,command:"extract-chat",id:i,verdict:"add",polarity:"preference",tag:e.label,by:f,event_id:e.eventId,target:i});continue}for(let i of Ee(e,{ts:ne,command:"extract-chat",by:f}))J(E,i)}let ie=b.map(e=>e.eventId).sort(),Ie=oe(E,{ts:new Date().toISOString(),proposal_id:null,nodes:B,edges:y,review:C,supersessions:$,...G.length>0?{names:G}:{},...D.length>0?{judgements:D}:{},event_ids:ie,...v.sid?{sid:v.sid}:{},source_head_moves:{}},{expectPrev:U,intent:{v:1,verb:"chat",args:de({ops:z,judgements:v.judgements??null,by:f,mintable:[...w],sid:v.sid??null}),pins:I},provenance:v.provenance}),P=fe(E),A=new Set;for(let e of $)if(e.kind==="node"){A.add(e.old);for(let i of P.edgesInto(e.old))A.add(i.src)}for(let e of K)A.add(e.cid);let Re=[...A].map(e=>({cid:e,state:P.stale(P.tipOf(e))})).filter(e=>e.state!=="fresh");return{record:Ie.record,errors:null,applied:ie,skipped:V,minted:K,staleDelta:Re}}export{Ue as a};
@@ -1,3 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as w}from"./chunk-ZLWURCJ7.js";import{a as O}from"./chunk-QSCXXNC2.js";import{a as I}from"./chunk-KBM3XHAM.js";import{f as L}from"./chunk-5LJRZI7S.js";import{a as N,b as k}from"./chunk-BKM2LWU2.js";import{a as R,b as y,c as T,d as m,e as A,g as b,h as r}from"./chunk-RSSOJ3L2.js";import{b as x}from"./chunk-5EOX4MEY.js";import{a as E}from"./chunk-RZ4F3BHX.js";import{a as g,i as v}from"./chunk-5TQFOPJV.js";import{platform as X,arch as Y}from"os";import P from"fs";import M from"fs";import D from"path";var V=1e3,d=0,j=new Set([130,3]),a=class t{ids;logger;opts;ended=!1;createdAt=Date.now();errorState;constructor(e,n={emitted:!1}){this.ids=e.envelope,this.logger=e.logger,this.opts=e,this.errorState=n}get enabled(){return this.logger!==null}event(e,n={}){if(!this.logger)return;e==="ASR_ERROR"&&(this.errorState.emitted=!0);let i=m(this.ids,e,n);this.logger.log(R[e],e,e,C(i))}error(e,n={}){this.logger&&(this.logger.escalate(d),this.event("ASR_ERROR",{...n,error_code:e}))}child(e,n){return new t({...this.opts,envelope:{...this.ids,operation_id:n,parent_operation_id:this.ids.operation_id,verb:"design"}},this.errorState)}async lateBindContext(e){if(!(!this.logger||this.ids.context_instance_id))try{let{ensureStoreIds:n}=await import("./store-id-EOSGEKVK.js"),{ids:i,cloned:s}=n(e);this.ids.context_lineage_id=i.context_lineage_id,this.ids.context_instance_id=i.context_instance_id,s&&this.event("ASR_CONTEXT_CLONED")}catch{}}agentSession(e){this.ids.agent_session_id=e}spawnEnv(){if(!this.opts.telemetryEnabled)return{};let e={TESTMUAI_USER_SESSION_ID:this.ids.session_id,TESTMUAI_OPERATION_ID:this.ids.operation_id,TESTMUAI_CLIENT_VERSION:this.opts.clientVersion,TESTMUAI_TELEMETRY_PROXY_URL:this.opts.proxyUrl};return this.ids.context_instance_id&&(e.TESTMUAI_CONTEXT_INSTANCE_ID=this.ids.context_instance_id),e}traceTee(){return e=>{if(!this.logger)return;let n=typeof e.kind=="string"?e.kind.slice(0,64):"trace",i={...C(m(this.ids,"ASR_CMD_START",{})),trace_kind:n};typeof e.code=="string"&&(i.trace_code=e.code.slice(0,64)),delete i.event,this.logger.logStep(d,`trace_${n}`,n,i)}}wireTrace(e,n,i){if(!this.logger)return;i&&this.agentSession(i);let s=n&&typeof n=="object"?n:{};switch(e){case"spawn":this.event("ASR_AGENT_SPAWN",{tier:s.tier});break;case"session_paused":this.event("ASR_SESSION_PAUSED",s);break;case"commit":this.event("ASR_COMMIT",s);break;default:this.traceTee()({kind:e,code:typeof s.code=="string"?s.code:void 0})}}banner(){return`session: ${this.ids.session_id}`}supportFooter(){return`if this keeps failing, share this id with support: ${this.ids.session_id}`}async end(e){if(!this.ended){if(this.ended=!0,e.duration_ms===void 0&&(e={...e,duration_ms:Date.now()-this.createdAt}),this.logger)if(e.exit_code===0?this.logger.discardSteps(d):this.logger.escalate(d),e.exit_code>0&&!j.has(e.exit_code)&&!this.errorState.emitted&&this.event("ASR_ERROR",{error_code:e.exit_code===2?"usage_exit_unattributed":`exit_${e.exit_code}_unattributed`,exit_code:e.exit_code}),this.event("ASR_CMD_END",e),this.opts.longSession)await this.logger.shutdown();else{let n=await this.logger.flushOnce(V);(n==="failed"||n==="timeout")&&A(this.logger.drainBuffer())}this.logger&&this.writeManifestLine(e.exit_code),r(null)}}writeManifestLine(e){try{let n=x(this.ids.context_instance_id??null);M.mkdirSync(D.dirname(n),{recursive:!0});let i={ts:new Date().toISOString(),session_id:this.ids.session_id,operation_id:this.ids.operation_id,agent_session_id:this.ids.agent_session_id,verb:this.ids.verb,mode:this.ids.mode,exit_code:e};M.appendFileSync(n,JSON.stringify(i)+`
3
- `,{flag:"a",mode:384})}catch{}}};function C(t){let e={event:t.event,session_id:t.session_id,operation_id:t.operation_id,verb:t.verb,mode:t.mode,component:t.component,seq:t.seq,context_lineage_id:t.context_lineage_id,context_instance_id:t.context_instance_id};t.parent_operation_id&&(e.parent_operation_id=t.parent_operation_id),t.agent_session_id&&(e.agent_session_id=t.agent_session_id);for(let[n,i]of Object.entries(t.context))e[n]=i;return e}var u=process.env.KANE_TELEMETRY_URL||v;function B(){return process.env.TESTMUAI_BASE_URL?"custom":process.env.TESTMUAI_ENV==="stage"?"stage":"prod"}function _e(t){let e=process.env.KANE_TELEMETRY!=="0"&&(!process.env.VITEST||process.env.KANE_TELEMETRY==="1"),n=t.env??B(),i=null;if(t.resumeSid&&t.contextRoot)try{let o=L(t.contextRoot,t.resumeSid);o?.user_session_id&&(i=o.user_session_id)}catch{}if(!i&&t.applyPlanPath)try{let o=JSON.parse(P.readFileSync(t.applyPlanPath,"utf8"));o.telemetry?.user_session_id&&(i=o.telemetry.user_session_id)}catch{}let s=i!==null;i||(i=y());let l=null,c=null,f=!1;if(t.contextRoot&&P.existsSync(t.contextRoot))if(t.write&&e){let o=k(t.contextRoot);l=o.ids.context_lineage_id,c=o.ids.context_instance_id,f=o.cloned}else{let o=N(t.contextRoot);l=o?.context_lineage_id??null,c=o?.context_instance_id??null}let h={session_id:i,operation_id:T(),context_lineage_id:l,context_instance_id:c,verb:t.verb,mode:t.mode,component:"kane-cli"},_=null;if(e){let o=I(n),S={org_id:o.org_id??"",user_id:o.user_id??"",machine_id:o.machine_id,email:null,email_domain:"",user_type:o.user_type??"unknown",env:o.env,plan:o.plan??"unknown"},U=t.mode==="interactive"||t.mode==="cli"?"cli":"agent";_=new w({proxyUrl:u,sessionId:i,identity:S,device:{cli_version:g,platform:X(),arch:Y(),host_agent:O(),invocation_mode:U},getToken:async()=>null}),t.longSession&&_.start()}let p=new a({envelope:h,logger:_,longSession:!!t.longSession,proxyUrl:u,clientVersion:`kane-cli/${g}`,telemetryEnabled:e});return e&&(r(h),p.event("ASR_CMD_START",{resumed:s,applied_plan:!!t.applyPlanPath}),f&&p.event("ASR_CONTEXT_CLONED"),b(async o=>{try{return(await E(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})).ok}catch{return!1}}).catch(()=>{})),p}export{B as a,_e as b};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as y}from"./chunk-YCCUBQY4.js";import{y as t}from"./chunk-5TQFOPJV.js";import{a as O}from"./chunk-HCBYKLMW.js";import{a as c,b as n,k as w}from"./chunk-C44QQJR4.js";import{e as k}from"./chunk-UR6MHSHU.js";var e=k(O(),1);function D(i){let a=i.findIndex(s=>s.free);return a>=0?a:null}var P=60,C=100;function F({headline:i,ask:a=!1,rows:s,sel:u,focused:m,freeText:l=null,freeTextNote:x,sublines:$=[]}){let{stdout:h}=w(),p=h?.columns??80,A=p<P,B=Math.min(p-1,C),d=o=>m&&u===o?(0,e.jsx)(n,{color:t.assuranceAccent,children:"\u276F"}):" ",b=a?`? ${i}`:i,f=Math.max(4,B-3),T=$.map((o,r)=>(0,e.jsx)(n,{color:t.dim,children:` ${o.length>f?`${o.slice(0,f-1)}\u2026`:o}`},`sub-${r}`)),g=0,R=s.map((o,r)=>o.free?l?(0,e.jsxs)(c,{flexDirection:"column",children:[(0,e.jsxs)(c,{children:[(0,e.jsxs)(n,{children:[(0,e.jsx)(n,{color:t.assuranceAccent,children:"\u276F"})," ",(0,e.jsx)(n,{color:t.dim,children:"\u270E "})]}),(0,e.jsx)(y,{value:l.value,onChange:l.onChange,onSubmit:l.onSubmit,onCancel:l.onCancel,placeholder:o.label})]}),x?(0,e.jsx)(n,{color:t.muted,children:` ${x}`}):null]},o.key):(0,e.jsxs)(n,{children:[d(r)," ",(0,e.jsx)(n,{color:t.dim,children:`\u270E ${o.label}`})]},o.key):(g+=1,(0,e.jsxs)(n,{bold:m&&u===r,children:[d(r),` ${g}. ${o.label}`,o.detail?(0,e.jsx)(n,{color:t.dim,bold:!1,children:` \u2014 ${o.detail}`}):null]},o.key)));return A?(0,e.jsxs)(c,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,e.jsx)(n,{bold:!0,color:t.assuranceAccent,children:b}),T,R]}):(0,e.jsxs)(c,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,e.jsx)(n,{bold:!0,color:t.assuranceAccent,children:b}),T,(0,e.jsx)(n,{children:" "}),R]})}export{D as a,F as b};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import s from"os";import t from"path";function r(){return t.join(s.homedir(),".testmuai","kaneai","assurance")}function i(n){return t.join(r(),n??"no-context")}function g(n,o,e){return t.join(i(n),"logs",`${o}-${e}.log`)}function c(n){return t.join(i(n),"manifest.ndjson")}function d(){return t.join(r(),"telemetry-deadletter.ndjson")}function f(n){return t.join(r(),`identity-${n}.json`)}function j(){return t.join(r(),"bindings.json")}export{g as a,c as b,d as c,f as d,j as e};
@@ -1,9 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as be}from"./chunk-VORWZLS3.js";import{a as ke}from"./chunk-WVHMPIDQ.js";import{b as he,c as pe,d as Y,e as J}from"./chunk-XKHWWKJZ.js";import{d as ye,e as we}from"./chunk-AXTPNZPX.js";import{d as _e}from"./chunk-BZAGVBCX.js";import{a as me}from"./chunk-243ZJHT6.js";import{a as L}from"./chunk-KDNNMU7Q.js";import{z as I}from"./chunk-IICT4VOU.js";import{F as fe,X as ge,p as ae,t as le,x as ue,y as de}from"./chunk-RDHWNSDP.js";function yt(t){let e=process.env.HOME??"";return e&&t.startsWith(e)?`~${t.slice(e.length)}`:t}import{randomBytes as gt}from"crypto";function Z(t,e){let r=Math.min(t.length,e.length),o=0,n=0,c=0;for(let s=0;s<r;s++)o+=t[s]*e[s],n+=t[s]*t[s],c+=e[s]*e[s];return n===0||c===0?0:o/(Math.sqrt(n)*Math.sqrt(c))}function ee(t,e,r){return r*t+(1-r)*e}var te=.7;var He=["get_node","get_edges","find_by_provenance","match_by_type","stale_nodes","search_similar","search_similar_batch","history"],Qe=["source_read","source_grep","source_list"],ze=[...He,...Qe],Ee=50,Ae=200,ne=10,Re=50,xe=20,Ke=200,We=50;function P(t,e,r){let o=typeof t=="number"&&Number.isFinite(t)?Math.floor(t):e;return Math.max(1,Math.min(o,r))}function M(t,e){let r=t[e];if(typeof r!="string"||r.length===0)throw new k(`param "${e}" must be a non-empty string`);return r}function $(t,e){let r=t[e];if(r==null)return null;if(typeof r!="string")throw new k(`param "${e}" must be a string when present`);return r}var k=class extends Error{},ve=24,Xe=10,qe=10;function Ye(t){let e=t.cursor;if(e==null)return 0;if(typeof e=="string"&&/^\d+$/.test(e))return Number.parseInt(e,10);throw new k(`BAD_CURSOR: cursor ${JSON.stringify(e)} is not a cursor this store minted`)}function De(t,e){let r=e.fields;if(!Array.isArray(r)||r.length===0)return t;let o=new Set(r.filter(n=>typeof n=="string"));return t.map(n=>Object.fromEntries(Object.entries(n).filter(([c])=>o.has(c))))}function re(t,e,r=Ee,o=Ae){let n=Ye(e),c=P(e.limit,r,o),s=t.slice(n,n+c),u=n+s.length<t.length;return{rows:De(s,e),truncated:u,next_cursor:u?String(n+s.length):null}}var Je=t=>t.cursor!=null||t.fields!=null;function U(t,e,r=Ee){let o=re(t,e,r);return Je(e)||o.truncated?{rows:o.rows,truncated:o.truncated,next_cursor:o.next_cursor}:o.rows}function se(t,e){let r=t.getNode(e);return r?{cid:e,label:r.label,content:r.content,trust:t.trust.get(e)??null,freshness:t.stale(e)}:null}function Se(t){return new Set(t.toLowerCase().replace(/[^\p{L}\p{N}]+/gu," ").split(" ").filter(Boolean))}function V(t,...e){let r=Se(t);if(r.size===0)return 0;let o=t.trim().toLowerCase(),n=0;for(let c of e){let s=Se(c);if(s.size===0)continue;let u=0;for(let l of r)s.has(l)&&u++;let f=r.size+s.size-u,d=f===0?0:u/f;o&&c.toLowerCase().includes(o)&&(d=Math.max(d,.9)),n=Math.max(n,d)}return n}function Ze(t,e){let r=M(e,"cid"),o=$(e,"type"),n=$(e,"direction")??"both";if(!["out","in","both"].includes(n))throw new k('param "direction" must be out|in|both');let c=[];(n==="out"||n==="both")&&c.push(...t.edgesFrom(r)),(n==="in"||n==="both")&&c.push(...t.edgesInto(r));let s=c.filter(u=>o==null||u.type===o);return U(s,e)}function et(t,e){let r=M(e,"source_id"),o=t.heads.get(r)??null,n=[];for(let c of t.nodeLabel.keys()){let s=t.derivesInto(c).filter(f=>f.props.source_id===r).map(f=>({source_cid:f.props.source_cid,anchor:f.props.anchor??null}));if(s.length===0)continue;let u=se(t,c);u&&n.push({...u,pins:s,pinned_to_head:o!=null&&s.some(f=>f.source_cid===o)})}return U(n,e,Ae)}function tt(t,e){let r=M(e,"label"),o=$(e,"trust"),n=$(e,"freshness"),c=[];for(let{cid:s}of t.byLabel(r)){let u=se(t,s);u&&(o!=null&&u.trust!==o||n!=null&&u.freshness!==n||c.push(u))}return U(c,e)}function nt(t,e={}){let r=$(e,"label"),o=t.staleList().map(({cid:n,state:c})=>{let s=t.getNode(n);return{cid:n,state:c,label:s?.label??null,title:s?.content.title??null}}).filter(n=>r==null||n.label===r);return U(o,e)}function rt(t,e,r){let o=e.extracted,n=$(e,"kind"),c=[];for(let d of[...t.heads.keys()].sort()){let l=t.heads.get(d);if(typeof l!="string")continue;let h=t.mediaOf(l).format;if(n!=null&&h!==n)continue;let p=t.extractedSourceCids.has(l);if(typeof o=="boolean"&&p!==o)continue;let S=0;if(h!=="image"){let b=L(r,t,l);b&&(S=b.toString("utf8").replace(/\n$/,"").split(`
3
- `).length)}let _=t.extractionCompleteness.get(d);c.push({source_id:d,kind:h,lines:S,head_cid:l,extracted:p,last_extract_at:_?.at??null,extractor_version:_?.extractor_version??null})}let{rows:s,truncated:u,next_cursor:f}=re(c,e);return{sources:s,truncated:u,next_cursor:f}}function st(t,e,r){let o=M(e,"ref"),n=t.resolve(o);if(!n)throw new k(`UNKNOWN_REF: ${o} names nothing in the graph`);let c=n.tip,s=new Map;for(let[m,w]of t.superseded)typeof w=="string"&&w!==m&&s.set(w,[...s.get(w)??[],m]);let u=[],f=[c],d=new Set;for(;f.length>0;){let m=f.pop();d.has(m)||(d.add(m),u.push(m),f.push(...s.get(m)??[]))}let{records:l}=fe(r),g=new Map,h=new Map;for(let m of l){for(let w of m.nodes)g.has(w.cid)||g.set(w.cid,m.ts);for(let w of m.supersessions)w.kind==="node"&&h.set(w.old,{by_cid:w.new,reason:w.reason})}let p=u.map(m=>({cid:m,minted_at:g.get(m)??null,superseded_by:h.get(m)?.by_cid??null,reason:h.get(m)?.reason??null,change_note:null})),{rows:S,truncated:_,next_cursor:b}=re(p,e,qe);return{root_logical_id:t.displayNameOf(c),live_tip:t.superseded.has(c)?null:c,truncated:_,next_cursor:b,chain:S}}function $e(t){let e=t.queries;if(!Array.isArray(e)||e.length<1||e.length>ve)throw new k(`param "queries" must be 1..${ve} entries`);return e.map((r,o)=>{if(typeof r!="object"||r===null)throw new k(`queries[${o}] must be an object`);let n=r;if(typeof n.qid!="string"||n.qid.length===0)throw new k(`queries[${o}].qid must be a non-empty string`);if(typeof n.text!="string"||n.text.length===0)throw new k(`queries[${o}].text must be a non-empty string`);return{qid:n.qid,text:n.text,topK:P(n.top_k,ne,Xe)}})}function Me(t){let e=[];for(let{cid:r,content:o}of t.byLabel("usecase"))t.superseded.has(r)||e.push({cid:r,title:String(o.title??""),summary:String(o.summary??""),description:String(o.description??"")});return e}function Ce(t,e,r){let o=Me(t);return e.map(n=>{let c=[];for(let s of o){let u=r(n,s);u<=0||c.push({cid:s.cid,logical_id:t.displayNameOf(s.cid),title:s.title,score:Math.round(u*1e3)/1e3,trust:t.trust.get(s.cid)??null,superseded:!1})}return c.sort((s,u)=>u.score-s.score||s.cid.localeCompare(u.cid)),{qid:n.qid,truncated:c.length>n.topK,matches:c.slice(0,n.topK)}})}function Te(t,e){let r=$e(e);return{results:Ce(t,r,(o,n)=>V(o.text,n.title,n.summary,n.description)),scorer:"lexical_fallback"}}function ot(t,e){let r=M(e,"text"),o=$(e,"label")??"usecase",n=P(e.k,ne,Re),c=[];for(let{cid:s,content:u}of t.byLabel(o)){let f=String(u.title??""),d=String(u.summary??""),l=V(r,f,d);l<=0||c.push({cid:s,title:f,summary:d,score:Math.round(l*1e3)/1e3,trust:t.trust.get(s)??null,freshness:t.stale(s)})}return c.sort((s,u)=>u.score-s.score||s.cid.localeCompare(u.cid)),c.slice(0,n)}function Ie(t,e,r){let o=t.heads.get(r);if(typeof o!="string"){let c=[...t.heads.keys()].sort().join(", ");throw new k(`unknown source_id "${r}" \u2014 known: ${c||"(none)"}`)}if(t.mediaOf(o).format==="image")throw new k(`source "${r}" is an image \u2014 no line window (cite img#whole)`);let n=L(e,t,o);if(n==null)throw new k(`source "${r}" blob is missing from the store`);return{head:o,lines:n.toString("utf8").replace(/\n$/,"").split(`
4
- `)}}function it(t,e,r){return t.slice(e-1,r).map((o,n)=>`${String(e+n).padStart(4,"0")}| ${o}`).join(`
5
- `)}function ct(t,e,r){let o=M(e,"source_id"),n=$(e,"anchor"),c=e.line_range;if(n!=null&&c!=null)throw new k("give anchor OR line_range, not both");let{head:s,lines:u}=Ie(t,r,o),f=u.length,d,l;if(n!=null){let g=/^L(\d+)-L(\d+)$/.exec(n);if(!g)throw new k(`anchor "${n}" is not L<a>-L<b>`);let h=Number(g[1]),p=Number(g[2]);if(h<1||p<h||p>f)throw new k(`anchor "${n}" does not resolve (source has ${f} lines)`);d=Math.max(1,h-xe),l=Math.min(f,p+xe)}else if(c!=null){if(!Array.isArray(c)||c.length!==2||!c.every(p=>Number.isInteger(p)))throw new k('param "line_range" must be [from_line, to_line]');let[g,h]=c;if(g<1||h<g)throw new k('param "line_range" must be 1-based with from \u2264 to');if(g>f)throw new k(`line_range starts past the end (source has ${f} lines)`);d=g,l=Math.min(h,f)}else d=1,l=f;return l=Math.min(l,d+Ke-1),{window:it(u,d,l),from_line:d,to_line:l,source_cid:s,total_lines:f}}function at(t,e,r){let o=M(e,"pattern"),n=$(e,"source_id"),c;try{c=new RegExp(o,"u")}catch(d){throw new k(`invalid pattern: ${d instanceof Error?d.message:String(d)}`)}let s=n!=null?[n]:[...t.heads.keys()].sort(),u=[],f=!1;e:for(let d of s){if(n==null){let g=t.heads.get(d);if(typeof g!="string"||t.mediaOf(g).format==="image")continue}let{lines:l}=Ie(t,r,d);for(let g=0;g<l.length;g++)if(c.test(l[g])){if(u.length>=We){f=!0;break e}u.push({source_id:d,line:g+1,text:l[g]})}}return{matches:u,truncated:f}}function lt(t,e,r,o){try{switch(e){case"get_node":{let n=se(t,M(r,"cid"));return n==null?{ok:!0,result:null}:{ok:!0,result:De([n],r)[0]}}case"get_edges":return{ok:!0,result:Ze(t,r)};case"find_by_provenance":return{ok:!0,result:et(t,r)};case"match_by_type":return{ok:!0,result:tt(t,r)};case"stale_nodes":return{ok:!0,result:nt(t,r)};case"search_similar":return{ok:!0,result:ot(t,r)};case"search_similar_batch":return{ok:!0,result:Te(t,r)};case"history":{if(o==null)throw new k("history unavailable (no context store)");return{ok:!0,result:st(t,r,o)}}case"source_list":{if(o==null)throw new k("source roster unavailable (no context store)");return{ok:!0,result:rt(t,r,o)}}case"source_read":case"source_grep":{if(o==null)throw new k("source text unavailable (no context store)");return{ok:!0,result:(e==="source_read"?ct:at)(t,r,o)}}default:return{ok:!1,error:`unknown method: ${e} \u2014 available: ${ze.join(", ")}`}}}catch(n){return n instanceof k?{ok:!1,error:`${e}: ${n.message}`}:{ok:!1,error:`${e}: graph read failed: ${n instanceof Error?n.message:String(n)}`}}}var j="assurance.sim";function ut(t){return[t.title,t.summary,t.description].filter(Boolean).join(`
6
- `)}async function dt(t,e,r){let o=M(e,"text"),n=$(e,"label")??"usecase",c=P(e.k,ne,Re),s=[];for(let{cid:f,content:d}of t.byLabel(n)){if(t.superseded.has(f))continue;let l=String(d.title??""),g=String(d.summary??""),h=String(d.description??"");s.push({cid:f,title:l,summary:g,description:h,lex:V(o,l,g,h)})}let u=f=>{let d=[];for(let l of s){let g=f(l);g.score<=0||d.push({cid:l.cid,title:l.title,summary:l.summary,score:Math.round(g.score*1e3)/1e3,trust:t.trust.get(l.cid)??null,freshness:t.stale(l.cid),...g.dense!==void 0?{dense_score:Math.round(g.dense*1e3)/1e3,lexical_score:Math.round(l.lex*1e3)/1e3}:{}})}return d.sort((l,g)=>g.score-l.score||l.cid.localeCompare(g.cid)),d.slice(0,c)};try{let f=r.readVector??Y,d=r.writeVector??J,l=r.alpha??te,{alias:g}=await r.resolveAlias(j),h=new Map,p=[],S=[];for(let m of s){let w=f(r.contextDir,g,m.cid);w?h.set(m.cid,w):(p.push(m.cid),S.push(ut(m)))}let{vectors:_}=await r.embed(j,[o,...S]),b=Float32Array.from(_[0]);for(let m=0;m<p.length;m++){let w=Float32Array.from(_[m+1]);h.set(p[m],w),d(r.contextDir,g,p[m],w)}return u(m=>{let w=h.get(m.cid),T=w?Z(b,w):0;return{score:ee(T,m.lex,l),dense:T}})}catch{return r.onDegraded?.(),u(f=>({score:f.lex}))}}async function ft(t,e,r){let o=$e(e),n=Me(t);try{let c=r.readVector??Y,s=r.writeVector??J,u=r.alpha??te,{alias:f}=await r.resolveAlias(j),d=new Map,l=[],g=[];for(let _ of n){let b=c(r.contextDir,f,_.cid);b?d.set(_.cid,b):(l.push(_.cid),g.push([_.title,_.summary,_.description].filter(Boolean).join(`
7
- `)))}let{vectors:h}=await r.embed(j,[...o.map(_=>_.text),...g]),p=o.map((_,b)=>Float32Array.from(h[b]));for(let _=0;_<l.length;_++){let b=Float32Array.from(h[o.length+_]);d.set(l[_],b),s(r.contextDir,f,l[_],b)}let S=new Map(o.map((_,b)=>[_.qid,b]));return{results:Ce(t,o,(_,b)=>{let m=d.get(b.cid),w=m?Z(p[S.get(_.qid)],m):0;return ee(w,V(_.text,b.title,b.summary,b.description),u)}),scorer:"embedding"}}catch{return r.onDegraded?.(),Te(t,e)}}async function Ge(t,e,r,o){if((e==="search_similar"||e==="search_similar_batch")&&o)try{return{ok:!0,result:e==="search_similar"?await dt(t,r,o):await ft(t,r,o)}}catch(n){return n instanceof k?{ok:!1,error:`${e}: ${n.message}`}:{ok:!1,error:`${e}: graph read failed: ${n instanceof Error?n.message:String(n)}`}}return lt(t,e,r,o?.contextDir)}var mt=2,Ne=10,ht=2;function Le(t,e,r){return t.map(o=>{let n=e.find(c=>c.id===o.id);if(n&&n.selected_index!=null&&n.selected_index>=0&&n.selected_index<o.options.length){let s=(o.allow_free_text||o.options[n.selected_index]?.input===!0)&&n.free_text!=null?n.free_text:null;return{id:o.id,resolution:"answered",selected_index:n.selected_index,free_text:s}}return n&&n.free_text!=null&&o.allow_free_text?{id:o.id,resolution:"answered",selected_index:-1,free_text:n.free_text}:r.explicitAcceptDefaults?{id:o.id,resolution:"assumed-default",selected_index:o.recommended_index,flagged:!0}:{id:o.id,resolution:"deferred",selected_index:null}})}async function Tt(t,e,r,o,n=()=>{},c){let s=(i,a)=>n(i,a,t.session_id),u=(process.env.ASSURANCE_LOG_LEVEL??"info").toLowerCase()==="debug",f={contextDir:e.contextDir,resolveAlias:i=>he(i,{env:process.env,auth:e.auth}),embed:(i,a)=>pe(i,a,{env:process.env,auth:e.auth}),...e.onEmbedDegraded?{onDegraded:e.onEmbedDegraded}:{}},d=0,l=e.agent(t,{auth:e.auth,onWarn:i=>{s("warn",i),e.out(i)},onStderr:i=>s("agent_stderr",i)}),g=null,h=null,p,S,_=l.send.bind(l),b=new Set(["user_response","user_message","session_complete"]),m=null,w=!1,T=[],E=i=>{if(i.type==="session_complete"&&(w=!0),m!==null&&b.has(i.type)){T.push(i),s("belt_withheld",{type:i.type,unacked_seq:m});return}_(i)};if(t.checkpoints&&!e.checkpoint)throw l.kill(),new Error("run_config.checkpoints is on but DriverDeps.checkpoint sink is absent (programming error)");let oe=!1,Q=e.pendingDeferral??null,O=!1,je=e.chat?.attachSender?.(i=>E(i));e.initialMessage&&(E({type:"user_message",message_id:`msg-${t.session_id}-${gt(3).toString("hex")}`,text:e.initialMessage}),s("user_message_sent",{chars:e.initialMessage.length,...u?{text:e.initialMessage}:{}}),e.emit?.({type:"message_sent",sid:t.session_id,chars:e.initialMessage.length}),e.chat?.note("\u21B3 delivered to the agent"));let z,F=0,K=0,B=0,W,A=ye(),G=e.progress??e.out;try{for await(let i of l.events){try{e.chat?.onAgentEvent(i)}catch(a){s("chat_mirror_error",{event_type:i.type,message:a instanceof Error?a.message:String(a)})}if(i.type==="reasoning_delta"?(d+=i.text.length,process.env.KANE_TRACE_REASONING&&s("reasoning_delta",i.text)):i.type==="state_checkpoint"&&!process.env.KANE_TRACE_REASONING?s("state_checkpoint",{seq:i.seq,items:i.delta_items.length,bytes:JSON.stringify(i.delta_items).length}):s(i.type,i),i.type==="reasoning_done"&&s("reasoning_chars",d),i.type==="progress")G(`\u2026 ${i.stage}${i.n?` #${i.n}`:""}`),e.emit?.({type:"agent_activity",kind:"progress",label:`${i.stage}${i.n?` #${i.n}`:""}`});else if(i.type==="reasoning_delta"||i.type==="reasoning_done"||i.type==="tool_activity"||i.type==="decision_activity"){e.onStreamEvent?.(i);let a=A;if(A=we(A,i),A===a)continue;i.type==="reasoning_delta"?A.liveThinking===i.text&&G("\u2237 thinking\u2026"):i.type==="reasoning_done"?i.present&&(G(`thought for ${(i.took_ms/1e3).toFixed(1)}s`),e.emit?.({type:"agent_activity",kind:"thinking_done",label:`thought for ${(i.took_ms/1e3).toFixed(1)}s`})):i.type==="tool_activity"?i.status!=="done"&&(G(A.activity[A.activity.length-1].label),e.emit?.({type:"agent_activity",kind:"tool",label:A.activity[A.activity.length-1].label})):(G(`\xB7 ${A.activity[A.activity.length-1].label}`),e.emit?.({type:"agent_activity",kind:"decision",label:A.activity[A.activity.length-1].label}))}else if(i.type==="usage"){W=i.total_credits;let a=x=>Math.round(x*100)/100;e.emit?.({type:"usage",credits:a(i.credits),total_credits:a(i.total_credits)})}else if(i.type==="graph_query"){let a=await Ge(e.graphSlot?.current??o,i.method,i.params??{},f),x=a.ok?{type:"graph_result",id:i.id,ok:!0,result:a.result}:{type:"graph_result",id:i.id,ok:!1,error:a.error};s("graph_result",u?{id:i.id,method:i.method,ok:a.ok,result:a.ok?a.result:a.error}:{id:i.id,method:i.method,ok:a.ok}),E(x)}else if(i.type==="ingest_request")if(e.ingest){let a;try{a=await e.ingest({id:i.id,ref:i.ref,purpose:i.purpose??null})}catch(C){s("ingest_executor_threw",{id:i.id,error:C instanceof Error?C.message:String(C)}),a={ok:!1,error:{code:"INGEST_FAILED",message:"the landing failed \u2014 see the trace for detail"}}}let x=a.ok?{type:"ingest_result",id:i.id,ok:!0,result:a.result}:{type:"ingest_result",id:i.id,ok:!1,error:a.error};s("ingest_result",a.ok?{id:i.id,ok:!0,source_id:a.result.source_id}:{id:i.id,ok:!1,code:a.error.code}),E(x)}else{let a={type:"ingest_result",id:i.id,ok:!1,error:{code:"INGEST_UNAVAILABLE",message:"this session has no ingest executor"}};s("ingest_result",{id:i.id,ok:!1,code:a.error.code}),E(a)}else if(i.type==="state_checkpoint"){if(!e.checkpoint)throw new Error("state_checkpoint arrived with no checkpoint sink (programming error)");m=i.seq;try{for(e.checkpoint.persist(i),m=null,_({type:"checkpoint_ack",seq:i.seq}),s("checkpoint_acked",{seq:i.seq,at:i.at});T.length>0&&m===null;)E(T.shift())}catch(a){let x=a instanceof Error?a.message:String(a);if(!oe){oe=!0;let C=a instanceof ue||a instanceof de||a instanceof le,X=a instanceof ae&&!C;e.out(`warning: couldn't save the session checkpoint \u2014 ${x}; asking the agent to pause`+(X?". The store's record chain fails verification \u2014 run kane-cli context fsck to diagnose.":""))}s("checkpoint_persist_failed",{seq:i.seq,message:x}),_({type:"pause"})}}else if(i.type==="session_paused")O=!0,S=i;else if(i.type==="done")O=!0;else if(i.type==="ask_user"){i.text&&(e.chat?e.chat.ledger({kind:"agent",text:i.text}):e.out(i.text),e.emit?.({type:"agent_message",text:i.text}));let a=t.mode;if(Q){let y=Q;Q=null,e.emit?.({type:"ask_deferred",source_id:y.ingested.source_id,cid:y.ingested.cid,questions:i.questions.length}),s("ask_deferred",{source_id:y.ingested.source_id,questions:i.questions.length}),E({type:"user_response",answers:[],deferral:{deferred:!0,ingested:y.ingested}});continue}if(a!=="interactive"){if(a==="agent"){s("pause_requested",{questions:i.questions.map(v=>v.id)}),E({type:"pause"});continue}if(a==="ci"){let v=i.questions.filter(R=>R.risk==="high");if(v.length>0){z=v,l.kill();break}}let y=Le(i.questions,[],{explicitAcceptDefaults:!0});F+=y.length;for(let v of y)s("assumed_default",{id:v.id,resolution:v.resolution}),e.emit?.({type:"assumed_default",id:v.id,selected_index:v.selected_index,risk:i.questions.find(R=>R.id===v.id)?.risk});let D={type:"user_response",answers:y.map(v=>({id:v.id,selected_index:v.resolution==="deferred"?null:v.selected_index,free_text:null}))};E(D);continue}let x=await e.ask(i.questions);if(!Array.isArray(x)){E({type:"user_response",answers:[],deferral:x});continue}let C=x,X=Le(i.questions,C,{explicitAcceptDefaults:!1}),Ue={type:"user_response",answers:i.questions.map(y=>{let D=C.find(R=>R.id===y.id);if(D?.free_text!=null){let R=D.selected_index!=null&&D.selected_index>=0&&D.selected_index<y.options.length?D.selected_index:null;if(R!=null){let N=y.allow_free_text||y.options[R]?.input===!0;return N&&D.free_text!=null&&r.set(y.id,(r.get(y.id)??0)+1),{id:y.id,selected_index:R,free_text:N?D.free_text:null}}let ce=r.get(y.id)??0;if(!y.allow_free_text||ce>=mt){let N=y.options[y.recommended_index]?.label??"recommended option";if(F+=1,e.emit?.({type:"assumed_default",id:y.id,selected_index:y.recommended_index,risk:y.risk}),e.chat?.noteCoercion)e.chat.noteCoercion(y,N);else{let q=y.text.replace(/\?+\s*$/,""),Ve=q.length<=36?q:`${q.slice(0,33)}\u2026`;e.out(`note: couldn't use a typed answer for "${Ve}" \u2014 kept the recommended option (${N})`)}return{id:y.id,selected_index:y.recommended_index,free_text:null}}return r.set(y.id,ce+1),{id:y.id,selected_index:null,free_text:D.free_text}}let v=X.find(R=>R.id===y.id);return v.resolution==="deferred"?{id:y.id,selected_index:null,free_text:null}:{id:y.id,selected_index:v.selected_index,free_text:null}})};E(Ue)}else if(i.type==="chat_ops"&&!e.chat){let a=i.chat_ops??i,x=Array.isArray(a.ops)?a.ops.length:0;if(x===0)a.text&&(e.out(a.text),e.emit?.({type:"agent_message",text:a.text})),E({type:"session_complete"}),s("headless_zero_op_chat_turn_complete",{chars:a.text?.length??0});else if(B<ht)B+=1,E({type:"user_message",message_id:`nochat-${t.session_id}-${B}`,text:"[auto-repair] chat ops are unavailable in this mode \u2014 commit through finalize_design, or finish if nothing remains."}),s("headless_chat_ops_nudge",{n:B,ops:x});else{h="the agent kept trying to hold a conversation in a non-interactive run",e.out("error: the agent kept trying to hold a conversation in a non-interactive run \u2014 session closed; re-run interactively, or retry"),s("headless_chat_ops_terminal",{ops:x}),l.kill();break}}else if(i.type===(c.terminalEventType??"proposal")){let a=await c.onProposalEvent(i[i.type]);if(g=a.proposal,a.error&&(h=a.error),a.receipt)e.emit?.(a.receipt.event),t.mode!=="interactive"?(K+=1,a.sessionComplete||K>=Ne?(a.sessionComplete||(e.out(`warning: ${Ne} commits without completion \u2014 closing the session (runaway guard)`),s("receipt_runaway_cap",{commits:K})),E({type:"session_complete"}),s("session_complete_sent",{commit_n:a.receipt.event.commit_n,runaway:!a.sessionComplete})):(E({type:"user_message",message_id:`receipt-${t.session_id}-${String(a.receipt.event.commit_n??0)}`,text:a.receipt.text}),s("receipt_sent",{commit_n:a.receipt.event.commit_n,chars:a.receipt.text.length}))):e.chat?.holdReceipt&&(e.chat.holdReceipt(a.receipt.text),s("receipt_held",{commit_n:a.receipt.event.commit_n}));else if(a.error&&t.mode!=="interactive"){e.out("error: saving the agent's work failed and can't be retried in this mode \u2014 session closed; re-run to retry"),e.emit?.({type:"warning",code:"SAVE_FAILED",message:"saving the agent's work failed and can't be retried in this mode \u2014 session closed; re-run to retry"}),s("headless_commit_error_terminal",{error:a.error}),l.kill();break}}else if(i.type==="error"){O=!0;let a=i;if(a.code==="PAIR_MISMATCH")throw new me(a.expected??"",a.actual??"");h=i.message,typeof a.code=="string"&&(p=a.code);let x=i.failed_proposal;x&&s("failed_proposal",x)}}}finally{l.kill(),je?.()}let Pe=t.chat===!0&&t.mode==="interactive",ie=!!e.checkpoint&&!O&&!w&&!S&&!z&&h===null&&g===null&&!Pe;return{proposal:g,error:h,...p!==void 0?{errorCode:p}:{},paused:S,highRisk:z,...F>0?{assumedDefaults:F}:{},...W!==void 0?{creditsTotal:W}:{},...ie?{crashed:ie}:{}}}function Oe(t,e){let r=e.trim(),o=null;for(let n of t??[])if(n.ref===r){if(!n.consumed)return{kind:"unconsumed"};o={kind:"consumed",identity:n.consumed}}return o??{kind:"unauthorized"}}function Gt(t,e,r){let o=e.trim(),n=[...t??[]];return n.find(s=>s.ref===o&&!s.consumed)||n.push({ref:o,entered_at:r.toISOString()}),n}function Fe(t,e,r){let o=e.trim(),n=[...t??[]],c=n.findIndex(s=>s.ref===o&&!s.consumed);return c<0||(n[c]={...n[c],consumed:r}),n}import{basename as H}from"path";function Be(t,e,r,o,n){let c=e.mediaOf(o),s=0;if(c.format!=="image"){let u=L(t,e,o);u&&(s=u.toString("utf8").replace(/\n$/,"").split(`
8
- `).length)}return{source_id:r,cid:o,total_lines:s,media_type:c.format,status:n}}function Pt(t){return async e=>{let r=Oe(t.handle.state.ingest_registry,e.ref);if(r.kind==="unauthorized")return{ok:!1,error:{code:"INGEST_UNAUTHORIZED_REF",message:"that ref was not provided by the owner this session \u2014 only owner-provided refs may land"}};if(r.kind==="consumed"){let p=t.graphSlot?.current??I(t.contextDir);return{ok:!0,result:Be(t.contextDir,p,r.identity.source_id,r.identity.cid,"unchanged")}}let o=[],n={out:p=>o.push(p),err:p=>o.push(p),confirm:async()=>!1,isTTY:!1},c;try{c=await be([e.ref],{},n,t.cwd,t.remoteDeps)}catch(p){return{ok:!1,error:{code:"INGEST_FAILED",message:p instanceof Error?p.message:String(p)}}}if(c.code!==0||c.results.length===0)return{ok:!1,error:{code:"INGEST_FAILED",message:o.find(S=>S.startsWith("error:"))??o.at(-1)??"the landing failed"}};let s=c.results[0],u={source_id:s.source_id,cid:s.source_cid},f=Fe(t.handle.state.ingest_registry,e.ref,u),d=s.status==="versioned"&&t.schedule,l=t.schedule?[...t.handle.state.ingest_schedule??[],d?{source_id:s.source_id,cid:s.source_cid,status:"skipped",note:"new version of a known source \u2014 its changes await your review (reconcile), never a blind re-extraction"}:{source_id:s.source_id,cid:s.source_cid,status:"pending"}]:void 0;t.handle.save({ingest_registry:f,...l!==void 0?{ingest_schedule:l}:{}}),t.graphSlot&&(t.graphSlot.current=I(t.contextDir));let g=t.graphSlot?.current??I(t.contextDir),h=Be(t.contextDir,g,s.source_id,s.source_cid,s.status==="unchanged"?"unchanged":"landed");return t.note(d?`landed ${s.source_id} (${H(e.ref)}) \u2014 ${h.total_lines} lines; a NEW VERSION of a known source \u2014 its changes await your review (the check-in offers it), not a blind re-extraction`:t.schedule?`landed ${s.source_id} (${H(e.ref)}) \u2014 ${h.total_lines} lines; scheduled for extraction in this run`:t.scheduleRefused?`landed ${s.source_id} (${H(e.ref)}) \u2014 ${h.total_lines} lines; ${t.scheduleRefused}`:`landed ${s.source_id} (${H(e.ref)}) \u2014 ${h.total_lines} lines; it guides this design only (not extracted \u2014 its own extraction pass adds its use-cases)`),{ok:!0,result:h}}}var pt={kind:"system",id:"distiller"};function Kt(t,e=r=>process.stderr.write(r+`
9
- `)){try{let r=I(t),{watermark:o}=_e(t),n=ke({contextDir:t,graph:r,watermark:o,by:pt});if(n.errors){let c=n.errors.map(s=>`${s.code}: ${s.detail}`).join("; ");return e(`warning: style-note distill skipped \u2014 ${c}`),{minted:0,error:c}}if(n.minted>0)try{ge(t)}catch{}return{minted:n.minted,error:null}}catch(r){let o=r instanceof Error?r.message:String(r);return e(`warning: style-note distill skipped \u2014 ${o}`),{minted:0,error:o}}}export{yt as a,Ge as b,mt as c,Le as d,Tt as e,Gt as f,Pt as g,Kt as h};
@@ -1,6 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{existsSync as f,fsyncSync as X,mkdirSync as z,readFileSync as S,readdirSync as N,renameSync as E,rmSync as m,writeFileSync as H,openSync as K,closeSync as j}from"fs";import{randomBytes as Q}from"crypto";import{join as y}from"path";var u=class extends Error{constructor(t,r){super(`${t}: ${r}`);this.code=t}},q=1440*60*1e3,F=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,v=n=>y(n,"sessions"),O=(n,e)=>y(v(n),e),l=(n,e)=>y(O(n,e),"state.json"),h=(n,e)=>y(O(n,e),".lock"),w=n=>(n?.now??(()=>new Date))();function M(n){if(!Number.isInteger(n)||n<=0)return!1;try{return process.kill(n,0),!0}catch(e){return e.code==="EPERM"}}function b(n,e){let t=`${n}.tmp-${process.pid}`,r=K(t,"w");try{H(r,e,{mode:384}),X(r)}finally{j(r)}E(t,n)}function k(n,e,t,r=0){if(r>20)throw new u("SESSION_LOCKED",`${e}: lock contention did not settle`);let o=h(n,e),s=Q(8).toString("hex"),c=JSON.stringify({pid:process.pid,ts:t.toISOString(),nonce:s})+`
3
- `;try{let i=K(o,"wx",384);return H(i,c),j(i),s}catch(i){if(i.code!=="EEXIST")throw i;let p=!1,a;try{let d=JSON.parse(S(o,"utf8")),_=t.getTime()-new Date(d.ts).getTime();p=!M(d.pid)||_>=q,a=d.nonce}catch{p=!0}if(!p)throw new u("SESSION_LOCKED",`${e} is held by another live process`);let g=`${o}.break-${s}`;try{E(o,g);let d;try{d=JSON.parse(S(g,"utf8"))}catch{d=null}if(d===null||d.nonce===a)m(g,{force:!0});else try{E(g,o)}catch{m(g,{force:!0})}}catch(d){if(d.code!=="ENOENT")throw d}return k(n,e,t,r+1)}}function G(n,e,t,r,o){let s=()=>{try{if(JSON.parse(S(h(n,e),"utf8")).nonce!==r)throw new u("SESSION_LOCK_LOST",`${e} lock was taken over`)}catch(i){throw i instanceof u?i:new u("SESSION_LOCK_LOST",`${e} lock file unreadable/gone`)}},c=()=>b(l(n,e),JSON.stringify(t)+`
4
- `);return{get state(){return t},isApplied:i=>t.applied_events.includes(i),markApplied(i){s(),t={...t,applied_events:[...new Set([...t.applied_events,...i])].sort()},c()},reconcileSave(i){s(),t={...t,applied_events:[...new Set([...t.applied_events,...i.appliedEvents])].sort(),held_receipts:i.heldReceipts,pending:i.pending},c()},save(i){s();let{agent_state:p,pending:a,assumed:g,read_basis:d,corpus_cursor:_,expires_at:I,force:x,conv_source:R,held_receipts:T,force_scope:D,user_session_id:J,checkpoint:L,target_pins:$,ingest_registry:A,ingest_schedule:P,reconcile:C}=i;t={...t,...p!==void 0?{agent_state:p}:{},...a!==void 0?{pending:a}:{},...g!==void 0?{assumed:g}:{},...d!==void 0?{read_basis:d}:{},..._!==void 0?{corpus_cursor:_}:{},...I!==void 0?{expires_at:I}:{},...x!==void 0?{force:x}:{},...R!==void 0?{conv_source:R}:{},...T!==void 0?{held_receipts:T}:{},...D!==void 0?{force_scope:D}:{},...J!==void 0?{user_session_id:J}:{},...L!==void 0?{checkpoint:L}:{},...$!==void 0?{target_pins:$}:{},...A!==void 0?{ingest_registry:A}:{},...P!==void 0?{ingest_schedule:P}:{},...C!==void 0?{reconcile:C}:{}},c()},complete(){s(),m(O(n,e),{recursive:!0,force:!0})},release(){try{s(),m(h(n,e),{force:!0})}catch(i){if(i instanceof u||i.code==="ENOENT")return;throw i}}}}function W(n,e,t){if(!F.test(e.sid))throw new u("SESSION_MISSING",`bad sid ${JSON.stringify(e.sid)}`);let r=w(t);if(f(l(n,e.sid)))throw new u("SESSION_LOCKED",`${e.sid} already exists \u2014 resume it`);z(O(n,e.sid),{recursive:!0,mode:448});let o=k(n,e.sid,r),s={schema:1,applied_events:[],...e};return b(l(n,e.sid),JSON.stringify(s)+`
5
- `),G(n,e.sid,s,o,t)}function Y(n,e,t){if(!F.test(e)||!f(l(n,e)))throw new u("SESSION_MISSING",`no session ${e}`);let r=w(t),o=k(n,e,r),s=JSON.parse(S(l(n,e),"utf8"));if(new Date(s.expires_at).getTime()<=r.getTime())throw m(h(n,e),{force:!0}),new u("SESSION_EXPIRED",`${e} expired at ${s.expires_at}`);let c={...s,expires_at:new Date(r.getTime()+q).toISOString()};return b(l(n,e),JSON.stringify(c)+`
6
- `),G(n,e,c,o,t)}function Z(n,e){try{let t=y(n,"proposals",e,"verdicts.json");return JSON.parse(S(t,"utf8")).resolved===!0}catch{return!1}}function ee(n,e){let t=l(n,e);return f(t)?JSON.parse(S(t,"utf8")):null}function ne(n){let e=v(n);if(!f(e))return[];let t=[];for(let r of N(e)){let o=l(n,r);if(f(o))try{let s=JSON.parse(S(o,"utf8"));t.push({sid:s.sid,mode:s.mode,created_at:s.created_at,expires_at:s.expires_at,pendingCount:s.pending.questions.length+s.pending.proposals.length,verb:s.verb,use_case:s.use_case})}catch{t.push({sid:r,mode:"?",created_at:"",expires_at:"",pendingCount:0,corrupt:!0})}}return t.sort((r,o)=>r.created_at<o.created_at?-1:1)}function te(n,e,t){let r=v(n);if(!f(r))return{holders:[],corrupt:0};let o=w(t),s=[],c=0;for(let i of N(r)){let p=l(n,i);if(f(p))try{let a=JSON.parse(S(p,"utf8"));if(new Date(a.expires_at).getTime()<=o.getTime())continue;let g=a.pending.proposals.some(_=>(_.content?._held?.source_id??null)===e),d=a.reconcile!=null&&e in a.read_basis&&!Z(n,a.reconcile.proposal_id);(g||d)&&s.push(a.sid)}catch{c+=1}}return{holders:s,corrupt:c}}function se(n,e){let t=w(e),r=[],o=[],s=v(n);if(!f(s))return{removed:r,skipped:o};for(let c of N(s)){if(e?.sid&&c!==e.sid)continue;let i=!1,p=!1;try{let a=JSON.parse(S(l(n,c),"utf8"));i=new Date(a.expires_at).getTime()<=t.getTime()}catch{p=!0}if(e?.sid||e?.all||i||p&&e?.all){try{let a=JSON.parse(S(h(n,c),"utf8"));if(M(a.pid)&&a.pid!==process.pid){o.push({sid:c,reason:`in use by live pid ${a.pid}`});continue}}catch{}m(O(n,c),{recursive:!0,force:!0}),r.push(c)}}return{removed:r,skipped:o}}export{u as a,q as b,W as c,Y as d,Z as e,ee as f,ne as g,te as h,se as i};