@testmuai/kane-cli 0.8.15 → 0.8.16

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 (181) hide show
  1. package/dist/{ChatSurface-2GPR4S7I.js → ChatSurface-5JEEFY34.js} +1 -1
  2. package/dist/{ChromeProfilePicker-XAZGCJKR.js → ChromeProfilePicker-6IVAYCWJ.js} +1 -1
  3. package/dist/{CliFeedbackPrompt-4SILDU7S.js → CliFeedbackPrompt-K4IN7S6J.js} +1 -1
  4. package/dist/{CliUploadProgress-OAQBY55Y.js → CliUploadProgress-MI4H4LKT.js} +1 -1
  5. package/dist/{ConfigView-FDBMJC26.js → ConfigView-CJY5MB6H.js} +1 -1
  6. package/dist/{EvidenceViewOffer-YSNRKKPC.js → EvidenceViewOffer-ABKTGD4K.js} +1 -1
  7. package/dist/FolderPicker-RQIVS7ZR.js +2 -0
  8. package/dist/{InfoBox-ZPUBB7J4.js → InfoBox-RP6RDCG7.js} +1 -1
  9. package/dist/{LinksBox-MNNNOH23.js → LinksBox-QOQJ3S2I.js} +1 -1
  10. package/dist/{ProfilesView-GY5QCIT3.js → ProfilesView-BZEBT6R5.js} +1 -1
  11. package/dist/{ProjectPicker-UCHMCNFV.js → ProjectPicker-J42MEJRQ.js} +1 -1
  12. package/dist/{SaveSessionPrompt-ATVHKAHN.js → SaveSessionPrompt-MKAIUVX7.js} +1 -1
  13. package/dist/SingleShotApp-TZZ2J7ZO.js +2 -0
  14. package/dist/{SummaryBox-2DTNE25L.js → SummaryBox-JQJKGYDM.js} +1 -1
  15. package/dist/TestMdRunView-2YVGGFLU.js +2 -0
  16. package/dist/{TestrunEvidenceTable-6UE5EMON.js → TestrunEvidenceTable-FYDS3ZVU.js} +1 -1
  17. package/dist/{WhoamiView-TFCHIOW5.js → WhoamiView-F4PPB7SN.js} +1 -1
  18. package/dist/{app-download-N7MLJQ42.js → app-download-RA4CGTC5.js} +1 -1
  19. package/dist/{auth-IQPCVCZK.js → auth-TAT427C3.js} +1 -1
  20. package/dist/{binary-VML7EGV4.js → binary-OFPMBJ34.js} +1 -1
  21. package/dist/{bind-YV6V5AI6.js → bind-LY362KX7.js} +2 -2
  22. package/dist/{bootstrap-KCPWDBLX.js → bootstrap-RCDB5OWA.js} +1 -1
  23. package/dist/bridge-E2NGMJYM.js +2 -0
  24. package/dist/{changelog-CJFWGRIL.js → changelog-ZC3LHV2Z.js} +1 -1
  25. package/dist/{chunk-MLYNVJNH.js → chunk-23MVD7GY.js} +1 -1
  26. package/dist/{chunk-5HTSKF5K.js → chunk-2GWMENG5.js} +1 -1
  27. package/dist/{chunk-ORQGQSWG.js → chunk-3AVBUEBL.js} +2 -2
  28. package/dist/chunk-3LXN6AV5.js +5 -0
  29. package/dist/{chunk-EDQZIEPJ.js → chunk-3MVEGB2I.js} +1 -1
  30. package/dist/{chunk-FXO7JKMZ.js → chunk-4LVZLLTN.js} +3 -3
  31. package/dist/{chunk-3D5MKSG3.js → chunk-4PWYSDZR.js} +1 -1
  32. package/dist/{chunk-SIYSKT6I.js → chunk-4WEVTED6.js} +1 -1
  33. package/dist/{chunk-7EGIX6Y4.js → chunk-5ACSALRU.js} +3 -3
  34. package/dist/{chunk-WNB2IYHY.js → chunk-5VZAWKDF.js} +1 -1
  35. package/dist/{chunk-3GELV4IN.js → chunk-6HCY5LJO.js} +14 -14
  36. package/dist/{chunk-JFUFWICY.js → chunk-7P6FSGRD.js} +2 -2
  37. package/dist/{chunk-QXRT6HSV.js → chunk-7QUFOWMU.js} +1 -1
  38. package/dist/{chunk-KUS324VE.js → chunk-7XMDCGIZ.js} +1 -1
  39. package/dist/{chunk-EJXBKCNF.js → chunk-AAT4O22C.js} +1 -1
  40. package/dist/{chunk-DMCEGMGB.js → chunk-AGKE5WF3.js} +1 -1
  41. package/dist/{chunk-EPE2ELDH.js → chunk-BCJNIDS3.js} +1 -1
  42. package/dist/{chunk-6L5RV62W.js → chunk-BK42G6RI.js} +1 -1
  43. package/dist/{chunk-OWGFFJKK.js → chunk-BY2MU3ZS.js} +1 -1
  44. package/dist/{chunk-IAHOLH5W.js → chunk-C6JFTSIQ.js} +1 -1
  45. package/dist/{chunk-YAAQER2L.js → chunk-CDWUZ54U.js} +1 -1
  46. package/dist/{chunk-7WDPU33M.js → chunk-CR7UWQ76.js} +1 -1
  47. package/dist/{chunk-ZCSEBT2W.js → chunk-CVNHUDT4.js} +1 -1
  48. package/dist/{chunk-6DHEOPXX.js → chunk-DSWHEEHN.js} +1 -1
  49. package/dist/{chunk-UHSNUUX3.js → chunk-E44OHYDS.js} +2 -2
  50. package/dist/{chunk-RI4ILZZC.js → chunk-ECIGXPLN.js} +1 -1
  51. package/dist/{chunk-WFBJNVMQ.js → chunk-EMAKLNDV.js} +1 -1
  52. package/dist/{chunk-HYTBEPC2.js → chunk-F2XTOZTN.js} +1 -1
  53. package/dist/{chunk-XXE7W5AV.js → chunk-FQFVAFWK.js} +1 -1
  54. package/dist/{chunk-VZDLRJ5N.js → chunk-FWPRUGJJ.js} +1 -1
  55. package/dist/{chunk-GZ65ZA4C.js → chunk-FYJ62EVY.js} +1 -1
  56. package/dist/{chunk-74FHTDEE.js → chunk-G2ZMNVYN.js} +1 -1
  57. package/dist/{chunk-DMT3W26F.js → chunk-GCMJDOAE.js} +1 -1
  58. package/dist/{chunk-6GLFQHSW.js → chunk-GGD7NKPL.js} +2 -2
  59. package/dist/{chunk-Z73ZYROU.js → chunk-H6S7L2I2.js} +1 -1
  60. package/dist/{chunk-TVELOH5A.js → chunk-HBMNUT6E.js} +1 -1
  61. package/dist/{chunk-KALEPJAV.js → chunk-HYCOX7AB.js} +2 -2
  62. package/dist/{chunk-A557OSRS.js → chunk-ICUTARPB.js} +1 -1
  63. package/dist/{chunk-BMVE73M7.js → chunk-IJTSA34Q.js} +1 -1
  64. package/dist/chunk-IQDZ6YMY.js +18 -0
  65. package/dist/{chunk-OFWJBOGT.js → chunk-IYOPWIG4.js} +2 -2
  66. package/dist/{chunk-YGMUNNKH.js → chunk-IZ5CTC6M.js} +1 -1
  67. package/dist/{chunk-N3CVR4Z2.js → chunk-J2LWXO55.js} +1 -1
  68. package/dist/{chunk-TEHZUSUY.js → chunk-KPL2XHYF.js} +1 -1
  69. package/dist/{chunk-2WRBCTNM.js → chunk-KYZKPNPQ.js} +1 -1
  70. package/dist/chunk-L45HDSJ7.js +15 -0
  71. package/dist/{chunk-SHSXOYKT.js → chunk-MD3S2RXN.js} +1 -1
  72. package/dist/{chunk-JGAMMOUC.js → chunk-MU3I453X.js} +1 -1
  73. package/dist/{chunk-YZVR7ESF.js → chunk-MZYPDLD3.js} +1 -1
  74. package/dist/{chunk-JCMHB4KH.js → chunk-NADKZKGS.js} +1 -1
  75. package/dist/{chunk-W77SZLFC.js → chunk-NMBFAIXZ.js} +1 -1
  76. package/dist/{chunk-XSUJJB7Z.js → chunk-NN6UG2BE.js} +1 -1
  77. package/dist/chunk-NPKB7EK3.js +7 -0
  78. package/dist/{chunk-OGDAWNFY.js → chunk-O3ZKP4DY.js} +1 -1
  79. package/dist/{chunk-JL3L6KOG.js → chunk-OUWOLCCS.js} +1 -1
  80. package/dist/{chunk-Z3YYMZHT.js → chunk-OYY566GN.js} +1 -1
  81. package/dist/{chunk-AYJ2YZP5.js → chunk-PDTFQGQF.js} +1 -1
  82. package/dist/{chunk-HLCETZ73.js → chunk-Q7LZ5QJV.js} +1 -1
  83. package/dist/{chunk-T4R26WER.js → chunk-QMZLIHBS.js} +2 -2
  84. package/dist/chunk-QXUPBIV3.js +93 -0
  85. package/dist/{chunk-PGXJ275T.js → chunk-RCYYE6ED.js} +1 -1
  86. package/dist/{chunk-NLEA6NPU.js → chunk-SF5QPR6T.js} +1 -1
  87. package/dist/{chunk-4TMQTSIO.js → chunk-TBYYPGHF.js} +1 -1
  88. package/dist/{chunk-NUJVYAI4.js → chunk-TGBXIV7O.js} +1 -1
  89. package/dist/{chunk-Q77QO3PC.js → chunk-TWZ6NZWE.js} +4 -4
  90. package/dist/{chunk-CNPIJFZM.js → chunk-U466V5JN.js} +1 -1
  91. package/dist/{chunk-YKYKOV6U.js → chunk-U7BVK5IX.js} +1 -1
  92. package/dist/{chunk-NWNG5UWD.js → chunk-UAFCBZ3P.js} +1 -1
  93. package/dist/{chunk-7X4R6464.js → chunk-UEG4LJD6.js} +1 -1
  94. package/dist/{chunk-XUJXGE42.js → chunk-ULGFPKC7.js} +1 -1
  95. package/dist/{chunk-ZEVU2OT3.js → chunk-V4JR5JCK.js} +1 -1
  96. package/dist/{chunk-M36MOFJW.js → chunk-VATOIZYG.js} +1 -1
  97. package/dist/{chunk-27ERHOW3.js → chunk-VWOAEF7J.js} +1 -1
  98. package/dist/{chunk-GSDXZS4U.js → chunk-W4Y3PG7F.js} +1 -1
  99. package/dist/{chunk-R7QMZBBH.js → chunk-WECVT7WE.js} +1 -1
  100. package/dist/{chunk-UZIMYV5U.js → chunk-WML5KSGQ.js} +1 -1
  101. package/dist/{chunk-RQILLYSP.js → chunk-WPNNRMTP.js} +1 -1
  102. package/dist/{chunk-ZKCCG3GK.js → chunk-XGL3RSI5.js} +1 -1
  103. package/dist/{chunk-QVLYK5JL.js → chunk-Z2GDSCPS.js} +1 -1
  104. package/dist/{chunk-JVEZBJJ7.js → chunk-Z4KRSLAM.js} +1 -1
  105. package/dist/{chunk-D6GBOFK5.js → chunk-Z5DGFN7R.js} +1 -1
  106. package/dist/{chunk-LJGAXIDU.js → chunk-ZLIYWELJ.js} +1 -1
  107. package/dist/{chunk-EFTRH35G.js → chunk-ZYEFWJNZ.js} +1 -1
  108. package/dist/{config-UGCWZGH5.js → config-WETHR632.js} +1 -1
  109. package/dist/{cover-cmd-SWJ2NZUZ.js → cover-cmd-J3CTQT3R.js} +1 -1
  110. package/dist/{credentials-GWLYYRTL.js → credentials-RQPAP5KY.js} +1 -1
  111. package/dist/{deps-bundle-VNGC2UG6.js → deps-bundle-F47ZDYIM.js} +1 -1
  112. package/dist/{deps-resolve-YLCEU6I7.js → deps-resolve-URKD4QCB.js} +1 -1
  113. package/dist/{dispatch-OMQCT7WO.js → dispatch-KOZAJQDW.js} +1 -1
  114. package/dist/{doctor-B4Z6RPKQ.js → doctor-J44UKALC.js} +1 -1
  115. package/dist/{evidence-XJGXVLO5.js → evidence-KRNDKDCT.js} +1 -1
  116. package/dist/{evolve-cmd-QQQPPGL3.js → evolve-cmd-CEYGGIWA.js} +1 -1
  117. package/dist/{explain-cmd-XVE6Z67Q.js → explain-cmd-USGRZFBY.js} +1 -1
  118. package/dist/{extract-bind-7IDQS4QP.js → extract-bind-X4QRQX53.js} +2 -2
  119. package/dist/{extract-cmd-KIEOBRIT.js → extract-cmd-RKEE32FN.js} +1 -1
  120. package/dist/{gaps-cmd-RGIPUSIR.js → gaps-cmd-WL6P6YKS.js} +1 -1
  121. package/dist/{generate-headless-XGRIDD6O.js → generate-headless-LSQHOR3G.js} +2 -2
  122. package/dist/index.js +144 -144
  123. package/dist/{ingest-cmd-R5H5SF5K.js → ingest-cmd-TQ4ARSDE.js} +1 -1
  124. package/dist/install-47CRHVU6.js +2 -0
  125. package/dist/{interactive-bind-X5DVLRRW.js → interactive-bind-FPC4RYEW.js} +3 -3
  126. package/dist/{lifecycle-cmd-6R2PR2HM.js → lifecycle-cmd-DB5EFO2O.js} +1 -1
  127. package/dist/{list-cmd-QCIYKWYQ.js → list-cmd-UWGJRGKF.js} +1 -1
  128. package/dist/{list-commands-VRRCVWKO.js → list-commands-Q77CAQJ2.js} +1 -1
  129. package/dist/login-flow-RSNR5HY2.js +2 -0
  130. package/dist/{maintenance-cmd-GZ4EMT3V.js → maintenance-cmd-EJ2RAMWB.js} +1 -1
  131. package/dist/{mobile-prompts-CMIVWDHQ.js → mobile-prompts-PPPPKRS2.js} +1 -1
  132. package/dist/{objective-variable-gate-EEYJ6B3X.js → objective-variable-gate-BCKULIFQ.js} +1 -1
  133. package/dist/{open-provider-UFSCTIQQ.js → open-provider-XIGABCD3.js} +1 -1
  134. package/dist/{persist-recorded-session-JXL5E53A.js → persist-recorded-session-MK4HCDOY.js} +1 -1
  135. package/dist/{pipeline-RSCRNNPW.js → pipeline-XDWHEZ5S.js} +1 -1
  136. package/dist/prepare-target-NR3MTLLI.js +2 -0
  137. package/dist/{reconcile-cmd-4VRTUM2D.js → reconcile-cmd-VJPEY7YD.js} +1 -1
  138. package/dist/{reconcile-deps-ZCJ2QCK5.js → reconcile-deps-T5YX6HRG.js} +2 -2
  139. package/dist/{reconcile-engine-IVLZCYZB.js → reconcile-engine-GELPXSLV.js} +1 -1
  140. package/dist/{recording-banner-SRLPSTFP.js → recording-banner-3ET3PMSV.js} +1 -1
  141. package/dist/registry-3XMA4FOC.js +2 -0
  142. package/dist/{require-project-folder-SKEZMSN7.js → require-project-folder-ZLKONKKP.js} +1 -1
  143. package/dist/{resolve-run-intent-THC3EPAX.js → resolve-run-intent-3SXUS676.js} +1 -1
  144. package/dist/{resolver-2NUNLK7N.js → resolver-G7NGWACO.js} +1 -1
  145. package/dist/{review-cmd-BMJQZ6XJ.js → review-cmd-6DNGXV5E.js} +1 -1
  146. package/dist/{run-UDP5VPYS.js → run-MUVZVTTC.js} +1 -1
  147. package/dist/{run-TURFDLC6.js → run-UJLRTKTO.js} +1 -1
  148. package/dist/{run-test-md-MRYNFNPO.js → run-test-md-RI5RXVFU.js} +2 -2
  149. package/dist/{skill-installer-CVJ5VTEJ.js → skill-installer-CAO2NJZP.js} +1 -1
  150. package/dist/{spawner-7FUA3JXA.js → spawner-H6IDWY5U.js} +1 -1
  151. package/dist/{store-guard-XQ5MSUB2.js → store-guard-PIA2DYZX.js} +1 -1
  152. package/dist/{sync-cmd-5INKTZN2.js → sync-cmd-VFVTFIIJ.js} +1 -1
  153. package/dist/{sync-setup-4R54VRAO.js → sync-setup-R7BZDE24.js} +1 -1
  154. package/dist/tcg-generate-QADJKNYZ.js +2 -0
  155. package/dist/testmd-actions-EXSVQRHQ.js +2 -0
  156. package/dist/{testmd-sync-HYZI6NRM.js → testmd-sync-2CXNIPJ7.js} +1 -1
  157. package/dist/token-refresh-5TVNSL4U.js +2 -0
  158. package/dist/{validate-basic-OKLJLDML.js → validate-basic-MN5NDCT2.js} +1 -1
  159. package/dist/{variable-receipt-CMCDUJI2.js → variable-receipt-SIABUC74.js} +1 -1
  160. package/dist/{verdicts-EMCYGQWM.js → verdicts-ZXXBKTOZ.js} +1 -1
  161. package/dist/{version-check-4DQJBSXW.js → version-check-TDGK5REB.js} +1 -1
  162. package/dist/{view-cmd-P3XRFORJ.js → view-cmd-RLO7AP4X.js} +1 -1
  163. package/dist/{walk-session-MUGS6CZY.js → walk-session-ATWNUGHX.js} +1 -1
  164. package/dist/{with-telemetry-3T53GIQC.js → with-telemetry-CLSDKQAG.js} +1 -1
  165. package/package.json +11 -11
  166. package/dist/FolderPicker-XCTJ5447.js +0 -2
  167. package/dist/SingleShotApp-IPNZBFXB.js +0 -2
  168. package/dist/TestMdRunView-2FQIEI5W.js +0 -2
  169. package/dist/bridge-5UKX7YIO.js +0 -2
  170. package/dist/chunk-6K4FDYMH.js +0 -89
  171. package/dist/chunk-JQCOKL6U.js +0 -15
  172. package/dist/chunk-JSS22MFY.js +0 -17
  173. package/dist/chunk-O66WXOOC.js +0 -5
  174. package/dist/chunk-S4JUCBCT.js +0 -7
  175. package/dist/install-W3VPVPAQ.js +0 -2
  176. package/dist/login-flow-5HL2QYEL.js +0 -2
  177. package/dist/prepare-target-XZ3FTVBW.js +0 -2
  178. package/dist/registry-CPQHW2L2.js +0 -2
  179. package/dist/tcg-generate-2BOPGRM6.js +0 -2
  180. package/dist/testmd-actions-2CPJZAC2.js +0 -2
  181. package/dist/token-refresh-NTE4LQRN.js +0 -2
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as R,b as Y,g as _,o as N}from"./chunk-M36MOFJW.js";import"./chunk-OPL2MIQG.js";import"./chunk-TU6IMGWO.js";import"./chunk-TNBF5OMZ.js";import"./chunk-HOA4VWSD.js";import"./chunk-YYYQ5MVD.js";import"./chunk-KZG4E5RM.js";import"./chunk-BZAGVBCX.js";import"./chunk-52WM3XYO.js";import"./chunk-BB2W35TW.js";import"./chunk-427OQS2N.js";import"./chunk-AHXOKBVE.js";import"./chunk-ALCE5RLK.js";import"./chunk-Q2F5QB2W.js";import{a as T,b as O,c as U,d as j}from"./chunk-BMVE73M7.js";import{N as E,O as H,S as L,c as P,e as I}from"./chunk-UHSNUUX3.js";import"./chunk-YZVR7ESF.js";import{c as G,h as A}from"./chunk-H6TNBKGR.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-VOTIGXQ4.js";import"./chunk-SWTJMTBY.js";import"./chunk-IE3OO5GI.js";import{a as f}from"./chunk-CH273NAE.js";import"./chunk-CAOZKSQ3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-YCCUBQY4.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-HYTBEPC2.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";import{existsSync as y}from"fs";import{resolve as $}from"path";import{spawn as D}from"child_process";var w=class extends Error{},m=e=>{if(e===null)throw new w;return e},u=(e,t,o)=>({value:e,label:t,detail:o});async function p(e,t,o,n=!1){for(;;){let h=m(await e.input(t,o,n)).trim();if(h)return h;e.out("Enter a value, or press Esc to leave setup.")}}async function S(e,t){e.out(`Open in your browser: ${t}`);try{await e.open(t)}catch{e.out("The browser could not open automatically. Open that address yourself, then continue here.")}}async function b(e,t){let o=await e.gitRead(t);return o.ok||e.out(j(o.diagnostic,t)),o.ok}var x=u("change","Use a different address"),C=u("storage","Choose a different storage");async function z(e,t){for(;;)try{await e.checkGit();break}catch(n){e.out(n instanceof Error?n.message:"Git 2.31 or newer is required."),m(await e.choose("Install Git, then return here",[u("open","Open Git installation instructions"),u("retry","Check again")]))==="open"&&await S(e,"https://git-scm.com/downloads")}if(await b(e,t.gitUrl))return"ok";if(!/^https:\/\/github\.com\//i.test(t.gitUrl))for(e.out("Set up Git access for this repository with your server's SSH key or credential helper. kane-cli uses the same access as Git.");;){let n=m(await e.choose("Git cannot read this repository yet.",[u("retry","Check again"),x,C]));if(n==="change"||n==="storage")return n;if(await b(e,t.gitUrl))return"ok"}for(e.out("Sign in below if you have not, or ask the owner to grant your GitHub account access.");;){let n=m(await e.choose("Sign in to access this GitHub repository",[u("login","Sign in with your browser","Use or create your GitHub account."),u("retry","I've fixed my access \u2014 check again","Ask the owner to grant your account access, or check your existing Git login."),x,C]));if(n==="change"||n==="storage")return n;if(n==="login"){if((await e.gh(["--version"])).code){e.out("Browser sign-in uses GitHub CLI, a small GitHub tool. Install it once, then return to this step. GitHub CLI is optional if you already use SSH or another Git credential helper."),m(await e.choose("GitHub CLI is not installed",[u("open","Open installation instructions"),u("retry","Check again")]))==="open"&&await S(e,"https://cli.github.com/");continue}if((await e.gh(["auth","login","--hostname","github.com","--git-protocol","https","--web"],!0)).code){e.out("Sign-in did not finish. Your repository address is still saved in this setup.");continue}for(;(await e.gh(["auth","setup-git","--hostname","github.com"])).code&&(e.out("GitHub sign-in finished, but Git could not be told to use it."),m(await e.choose("Configure Git to use your GitHub sign-in",[u("retry","Try the configuration again"),u("skip","Skip; I use SSH or another credential helper")]))!=="skip"););}if(await b(e,t.gitUrl))return"ok";e.out("A browser login alone does not grant repository permission: ask the owner to grant your GitHub account access.")}}async function k(e){if(m(await e.choose("Access to the bucket",[u("existing","Use credentials already configured on this computer","Existing kane-cli credentials or KANE_SYNC_S3_ACCESS_KEY_ID and KANE_SYNC_S3_SECRET_ACCESS_KEY."),u("keys","Enter the access keys from my storage administrator","Saved in your local kane-cli configuration, never in the shared context.")]))!=="existing")return e.out("These are bucket access keys, not your cloud account password. Your administrator must grant access to the bucket and folder you selected."),{accessKeyId:await p(e,"Access key ID"),secretAccessKey:await p(e,"Secret access key (hidden)",void 0,!0)}}async function W(e,t){let o=t?.kind??m(await e.choose("Where should your team's shared context live?",[u("github","GitHub \u2014 Recommended","Guided setup for a repository: a storage space on GitHub."),u("s3","S3-compatible storage","Use your team's existing cloud bucket and access keys."),u("folder","Folder","A local folder stays on this computer. A mounted shared drive can serve your team.")]));if(o==="github"){t||(e.out("GitHub will hold the requirements, documents and test information you publish from kane-cli. Each teammate signs in with their own account."),m(await e.choose("Choose a GitHub repository",[u("existing","Use an existing repository"),u("create","Create a repository on GitHub","Use a dedicated repository. Choose Private to limit who can see your context.")]))==="create"&&(await S(e,"https://github.com/new"),e.out("On GitHub: choose the owner and repository name, choose Private, and create the repository. Return here and paste its HTTPS address. No code or Git knowledge is needed.")));let d=await p(e,"Repository address (for example https://github.com/my-team/team-context.git)",t?.address);return{location:d,journey:{kind:o,address:d}}}if(o==="folder"){t||e.out("Everyone needs access to the same mounted drive to share through a folder. Sending a local path does not share its contents. Dropbox, iCloud, OneDrive and Google Drive sync folders are not supported.");let d=await p(e,"Folder path",t?.address);return{location:d,journey:{kind:o,address:d}}}t||e.out("Ask your storage administrator for an existing bucket and access keys. kane-cli does not create buckets or cloud permissions.");let n=t?.s3,h=await p(e,"Bucket name",n?.bucket);for(;!/^[a-zA-Z0-9.-]+$/.test(h);)e.out("Use the bucket's name, not a URL."),h=await p(e,"Bucket name");let c=await p(e,"Region",n?.region??"us-east-1"),s=m(await e.input("Folder inside the bucket (optional)",n?.prefix??"")),i=[u("aws","Amazon S3"),u("compatible","Another S3-compatible service")];n&&i.sort((d,g)=>+(g.value===n.service)-+(d.value===n.service));let l=m(await e.choose("Which storage service?",i)),r=new URLSearchParams({region:c}),a=l==="compatible"?await p(e,"Service endpoint (https://host, with an optional port)",n?.service===l?n.endpoint:void 0):void 0;return a&&r.set("endpoint",a),{location:`s3://${h}/${s.split("/").map(encodeURIComponent).join("/")}?${r}`,journey:{kind:"s3",s3:{bucket:h,region:c,prefix:s,service:l,endpoint:a}}}}function K(e){return e.kind==="dir"?"A location address contains no password: everyone who can open this folder can read it; sending the path does not send its contents.":e.kind==="s3"?"A location address contains no keys and does not grant access: grant teammates access to the bucket in your storage's console.":U(e.gitUrl??"")==="github.com"?"A location address contains no password and does not grant access. Invite teammates on GitHub.":"A location address contains no password and does not grant access: grant teammates access on your Git server."}async function J(e,t){try{e.out("Share your context: the requirements, documents and test information you add to kane-cli. A location is where your team's shared copy lives.");let o=m(await e.choose("What do you want to do?",[u("share","Share my context with my team"),u("join","Join my team's context")]));if(o==="share"&&!y(f(t)))return e.out("There is no context here to share yet. Add your documents with kane-cli context ingest <files>, then run kane-cli context sync setup again."),2;let n,h=async()=>{for(;;){let r;for(;;){let a;if(o==="join")a=await p(e,"Paste the location your teammate shared",n?.address),n={kind:"join",address:a};else{let d=await W(e,n);a=d.location,n=d.journey}try{r=E(a,t);break}catch(d){e.out(d instanceof Error?d.message:"That location could not be read.")}}if(r.kind==="fake")throw new Error("This location is only available to tests.");if(r.kind==="git"){let a=await z(e,r);if(a==="storage"&&(n=void 0),a!=="ok")continue;if(/^https:\/\/github\.com\//i.test(r.gitUrl)){let d=await e.gh(["repo","view",r.gitUrl,"--json","nameWithOwner,visibility"]),g;try{let v=JSON.parse(d.text);["PUBLIC","PRIVATE","INTERNAL"].includes(v.visibility)&&(g=v.visibility)}catch{}e.out(g?`Repository visibility: ${g.toLowerCase()}.`:"Repository visibility could not be checked automatically. Check Public/Private on GitHub before publishing.")}}return r}},c=await h(),s=c.kind==="s3"?await k(e):void 0,i="origin",l;if(o==="join")for(;l=$(t,await p(e,"Download into a new folder","team-context")),!!y(l);)e.out("That folder already exists. Choose a new folder so your current context and files stay untouched.");else{let r=P(f(t)).locations;for(;r.some(a=>a.name===i)||!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(i);)i=await p(e,"Choose a new name for this connection","team")}for(e.out(`Location: ${c.gitUrl??c.path??c.location}`),e.out(c.kind==="git"?"Connection checks add small permanent files, commits and a scratch reference to this repository. Your own context is uploaded only by a separate publish command.":"Connection checks add small permanent files to this location. Your own context is uploaded only by a separate publish command."),m(await e.choose(o==="join"?"Connect and download team context?":"Connect this location? Your context will not be uploaded.",[u("connect",o==="join"?"Connect and download":"Connect location")]));e.out(o==="join"?"Checking access and downloading verified team context\u2026":"Checking read access and safe publishing\u2026"),(o==="join"?await e.clone(c.location,l,s):await e.add(i,c.location,s))!==0;){if(o==="join"&&y(l)){e.out(`The destination ${l} now exists after the interrupted attempt. Keep it; choose a new folder for a fresh download.`);do l=$(t,await p(e,"New download folder"));while(y(l))}let a=[u("retry","Retry this connection"),...c.kind==="s3"?[u("keys","Enter different keys")]:[],x,...o==="share"?[C]:[]],d=m(await e.choose("The connection did not finish. Your choices are kept; fix the reported issue and retry.",a));d==="keys"&&(s=await k(e)),(d==="change"||d==="storage")&&(d==="storage"&&(n=void 0),c=await h(),s=c.kind==="s3"?await k(e):void 0)}if(o==="join")e.out(`Team context downloaded into ${l}. Your previous local files were not replaced.`),e.out("Next: open that folder and run kane-cli context sync status.");else{let r=e.access(i);e.out(`Connected to ${c.gitUrl??c.path??c.location}. ${r==="write"?"You can download and publish changes.":"You can download context, but cannot publish changes."}`),e.out("Your context has not been uploaded yet."),e.out(r==="write"?`When ready, publish with kane-cli context push ${i}. This shares your context records and their referenced source documents with everyone who can read the location.`:"Ask the location owner for write access before publishing, then check the connection again."),e.out(`Share this location with teammates: ${H(c)}`),e.out(K(c))}return 0}catch(o){return o instanceof w?(e.out("Setup left. Your context has not been published. Any completed connection checks remain in the location."),3):(e.out(o instanceof Error?o.message:"Setup could not finish."),2)}}async function q(e,t=!1){return new Promise(o=>{let n=D("gh",e,{stdio:t?"inherit":["ignore","pipe","pipe"],windowsHide:!0}),h="";n.stdout?.on("data",s=>{h.length<64e3&&(h+=String(s))}),n.stderr?.on("data",()=>{});let c=setTimeout(()=>n.kill("SIGKILL"),t?3e5:2e4);n.on("error",()=>{clearTimeout(c),o({code:1,text:"GitHub CLI is unavailable"})}),n.on("close",s=>{clearTimeout(c),o({code:s??1,text:h})})})}async function ie(e,t=L(),o=process.cwd()){if(e.mode&&e.mode!=="interactive"||!G())return Y(R(e,t),t,new A("TTY_REQUIRED","guided setup needs an interactive terminal; for automation use kane-cli context sync add <name> <location> or kane-cli context clone <location> <new-folder>","run kane-cli context sync setup in a terminal"),2);let{promptSetup:n}=await import("./sync-setup-ui-RC727VK6.js"),h=(s,i)=>i(s?{credentials:s}:{}),c=async s=>{let i=[],l=await s({...t,out:r=>i.push(r),err:r=>i.push(r)});if(l!==0)for(let r of i){if(r.startsWith("next: ")||r.startsWith("checking "))continue;let a=r.startsWith("error: ")?r.slice(7):r,d=/^([a-z][a-z0-9+.-]*:\/\/|[a-z0-9._-]+@[a-z0-9.-]+[:/]|[\/~.])/i.test(a);t.out(/^[a-z]/.test(a)&&!d?a.charAt(0).toUpperCase()+a.slice(1)+(/[.!?]$/.test(a)?"":"."):a)}return l};return J({out:t.out,choose:(s,i)=>n({title:s,choices:i}),input:(s,i,l)=>n({title:s,initial:i,secret:l}),open:async s=>{let{default:i}=await import("./open-MQLQKFAW.js");await i(s)},checkGit:()=>O(),gitRead:async s=>{try{let i=await T(["ls-remote",s],{timeout:2e4});return{ok:i.code===0,diagnostic:i.stderr}}catch(i){return{ok:!1,diagnostic:i instanceof Error?i.message:String(i)}}},gh:q,add:(s,i,l)=>h(l,r=>c(a=>_(s,i,r,a,o))),clone:(s,i,l)=>h(l,r=>c(a=>N(s,i,r,a,o))),access:s=>I(f(o)).entries[s]?.tier===1?"write":"read"},o)}export{J as runSetup,ie as setupCommand};
2
+ import{a as R,b as Y,g as _,o as N}from"./chunk-VATOIZYG.js";import"./chunk-OPL2MIQG.js";import"./chunk-TU6IMGWO.js";import"./chunk-TNBF5OMZ.js";import"./chunk-HOA4VWSD.js";import"./chunk-YYYQ5MVD.js";import"./chunk-KZG4E5RM.js";import"./chunk-BZAGVBCX.js";import"./chunk-52WM3XYO.js";import"./chunk-BB2W35TW.js";import"./chunk-427OQS2N.js";import"./chunk-AHXOKBVE.js";import"./chunk-ALCE5RLK.js";import"./chunk-Q2F5QB2W.js";import{a as T,b as O,c as U,d as j}from"./chunk-IJTSA34Q.js";import{N as E,O as H,S as L,c as P,e as I}from"./chunk-E44OHYDS.js";import"./chunk-MZYPDLD3.js";import{c as G,h as A}from"./chunk-H6TNBKGR.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-VOTIGXQ4.js";import"./chunk-SWTJMTBY.js";import"./chunk-IE3OO5GI.js";import{a as f}from"./chunk-CH273NAE.js";import"./chunk-CAOZKSQ3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-YCCUBQY4.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-F2XTOZTN.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";import{existsSync as y}from"fs";import{resolve as $}from"path";import{spawn as D}from"child_process";var w=class extends Error{},m=e=>{if(e===null)throw new w;return e},u=(e,t,o)=>({value:e,label:t,detail:o});async function p(e,t,o,n=!1){for(;;){let h=m(await e.input(t,o,n)).trim();if(h)return h;e.out("Enter a value, or press Esc to leave setup.")}}async function S(e,t){e.out(`Open in your browser: ${t}`);try{await e.open(t)}catch{e.out("The browser could not open automatically. Open that address yourself, then continue here.")}}async function b(e,t){let o=await e.gitRead(t);return o.ok||e.out(j(o.diagnostic,t)),o.ok}var x=u("change","Use a different address"),C=u("storage","Choose a different storage");async function z(e,t){for(;;)try{await e.checkGit();break}catch(n){e.out(n instanceof Error?n.message:"Git 2.31 or newer is required."),m(await e.choose("Install Git, then return here",[u("open","Open Git installation instructions"),u("retry","Check again")]))==="open"&&await S(e,"https://git-scm.com/downloads")}if(await b(e,t.gitUrl))return"ok";if(!/^https:\/\/github\.com\//i.test(t.gitUrl))for(e.out("Set up Git access for this repository with your server's SSH key or credential helper. kane-cli uses the same access as Git.");;){let n=m(await e.choose("Git cannot read this repository yet.",[u("retry","Check again"),x,C]));if(n==="change"||n==="storage")return n;if(await b(e,t.gitUrl))return"ok"}for(e.out("Sign in below if you have not, or ask the owner to grant your GitHub account access.");;){let n=m(await e.choose("Sign in to access this GitHub repository",[u("login","Sign in with your browser","Use or create your GitHub account."),u("retry","I've fixed my access \u2014 check again","Ask the owner to grant your account access, or check your existing Git login."),x,C]));if(n==="change"||n==="storage")return n;if(n==="login"){if((await e.gh(["--version"])).code){e.out("Browser sign-in uses GitHub CLI, a small GitHub tool. Install it once, then return to this step. GitHub CLI is optional if you already use SSH or another Git credential helper."),m(await e.choose("GitHub CLI is not installed",[u("open","Open installation instructions"),u("retry","Check again")]))==="open"&&await S(e,"https://cli.github.com/");continue}if((await e.gh(["auth","login","--hostname","github.com","--git-protocol","https","--web"],!0)).code){e.out("Sign-in did not finish. Your repository address is still saved in this setup.");continue}for(;(await e.gh(["auth","setup-git","--hostname","github.com"])).code&&(e.out("GitHub sign-in finished, but Git could not be told to use it."),m(await e.choose("Configure Git to use your GitHub sign-in",[u("retry","Try the configuration again"),u("skip","Skip; I use SSH or another credential helper")]))!=="skip"););}if(await b(e,t.gitUrl))return"ok";e.out("A browser login alone does not grant repository permission: ask the owner to grant your GitHub account access.")}}async function k(e){if(m(await e.choose("Access to the bucket",[u("existing","Use credentials already configured on this computer","Existing kane-cli credentials or KANE_SYNC_S3_ACCESS_KEY_ID and KANE_SYNC_S3_SECRET_ACCESS_KEY."),u("keys","Enter the access keys from my storage administrator","Saved in your local kane-cli configuration, never in the shared context.")]))!=="existing")return e.out("These are bucket access keys, not your cloud account password. Your administrator must grant access to the bucket and folder you selected."),{accessKeyId:await p(e,"Access key ID"),secretAccessKey:await p(e,"Secret access key (hidden)",void 0,!0)}}async function W(e,t){let o=t?.kind??m(await e.choose("Where should your team's shared context live?",[u("github","GitHub \u2014 Recommended","Guided setup for a repository: a storage space on GitHub."),u("s3","S3-compatible storage","Use your team's existing cloud bucket and access keys."),u("folder","Folder","A local folder stays on this computer. A mounted shared drive can serve your team.")]));if(o==="github"){t||(e.out("GitHub will hold the requirements, documents and test information you publish from kane-cli. Each teammate signs in with their own account."),m(await e.choose("Choose a GitHub repository",[u("existing","Use an existing repository"),u("create","Create a repository on GitHub","Use a dedicated repository. Choose Private to limit who can see your context.")]))==="create"&&(await S(e,"https://github.com/new"),e.out("On GitHub: choose the owner and repository name, choose Private, and create the repository. Return here and paste its HTTPS address. No code or Git knowledge is needed.")));let d=await p(e,"Repository address (for example https://github.com/my-team/team-context.git)",t?.address);return{location:d,journey:{kind:o,address:d}}}if(o==="folder"){t||e.out("Everyone needs access to the same mounted drive to share through a folder. Sending a local path does not share its contents. Dropbox, iCloud, OneDrive and Google Drive sync folders are not supported.");let d=await p(e,"Folder path",t?.address);return{location:d,journey:{kind:o,address:d}}}t||e.out("Ask your storage administrator for an existing bucket and access keys. kane-cli does not create buckets or cloud permissions.");let n=t?.s3,h=await p(e,"Bucket name",n?.bucket);for(;!/^[a-zA-Z0-9.-]+$/.test(h);)e.out("Use the bucket's name, not a URL."),h=await p(e,"Bucket name");let c=await p(e,"Region",n?.region??"us-east-1"),s=m(await e.input("Folder inside the bucket (optional)",n?.prefix??"")),i=[u("aws","Amazon S3"),u("compatible","Another S3-compatible service")];n&&i.sort((d,g)=>+(g.value===n.service)-+(d.value===n.service));let l=m(await e.choose("Which storage service?",i)),r=new URLSearchParams({region:c}),a=l==="compatible"?await p(e,"Service endpoint (https://host, with an optional port)",n?.service===l?n.endpoint:void 0):void 0;return a&&r.set("endpoint",a),{location:`s3://${h}/${s.split("/").map(encodeURIComponent).join("/")}?${r}`,journey:{kind:"s3",s3:{bucket:h,region:c,prefix:s,service:l,endpoint:a}}}}function K(e){return e.kind==="dir"?"A location address contains no password: everyone who can open this folder can read it; sending the path does not send its contents.":e.kind==="s3"?"A location address contains no keys and does not grant access: grant teammates access to the bucket in your storage's console.":U(e.gitUrl??"")==="github.com"?"A location address contains no password and does not grant access. Invite teammates on GitHub.":"A location address contains no password and does not grant access: grant teammates access on your Git server."}async function J(e,t){try{e.out("Share your context: the requirements, documents and test information you add to kane-cli. A location is where your team's shared copy lives.");let o=m(await e.choose("What do you want to do?",[u("share","Share my context with my team"),u("join","Join my team's context")]));if(o==="share"&&!y(f(t)))return e.out("There is no context here to share yet. Add your documents with kane-cli context ingest <files>, then run kane-cli context sync setup again."),2;let n,h=async()=>{for(;;){let r;for(;;){let a;if(o==="join")a=await p(e,"Paste the location your teammate shared",n?.address),n={kind:"join",address:a};else{let d=await W(e,n);a=d.location,n=d.journey}try{r=E(a,t);break}catch(d){e.out(d instanceof Error?d.message:"That location could not be read.")}}if(r.kind==="fake")throw new Error("This location is only available to tests.");if(r.kind==="git"){let a=await z(e,r);if(a==="storage"&&(n=void 0),a!=="ok")continue;if(/^https:\/\/github\.com\//i.test(r.gitUrl)){let d=await e.gh(["repo","view",r.gitUrl,"--json","nameWithOwner,visibility"]),g;try{let v=JSON.parse(d.text);["PUBLIC","PRIVATE","INTERNAL"].includes(v.visibility)&&(g=v.visibility)}catch{}e.out(g?`Repository visibility: ${g.toLowerCase()}.`:"Repository visibility could not be checked automatically. Check Public/Private on GitHub before publishing.")}}return r}},c=await h(),s=c.kind==="s3"?await k(e):void 0,i="origin",l;if(o==="join")for(;l=$(t,await p(e,"Download into a new folder","team-context")),!!y(l);)e.out("That folder already exists. Choose a new folder so your current context and files stay untouched.");else{let r=P(f(t)).locations;for(;r.some(a=>a.name===i)||!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(i);)i=await p(e,"Choose a new name for this connection","team")}for(e.out(`Location: ${c.gitUrl??c.path??c.location}`),e.out(c.kind==="git"?"Connection checks add small permanent files, commits and a scratch reference to this repository. Your own context is uploaded only by a separate publish command.":"Connection checks add small permanent files to this location. Your own context is uploaded only by a separate publish command."),m(await e.choose(o==="join"?"Connect and download team context?":"Connect this location? Your context will not be uploaded.",[u("connect",o==="join"?"Connect and download":"Connect location")]));e.out(o==="join"?"Checking access and downloading verified team context\u2026":"Checking read access and safe publishing\u2026"),(o==="join"?await e.clone(c.location,l,s):await e.add(i,c.location,s))!==0;){if(o==="join"&&y(l)){e.out(`The destination ${l} now exists after the interrupted attempt. Keep it; choose a new folder for a fresh download.`);do l=$(t,await p(e,"New download folder"));while(y(l))}let a=[u("retry","Retry this connection"),...c.kind==="s3"?[u("keys","Enter different keys")]:[],x,...o==="share"?[C]:[]],d=m(await e.choose("The connection did not finish. Your choices are kept; fix the reported issue and retry.",a));d==="keys"&&(s=await k(e)),(d==="change"||d==="storage")&&(d==="storage"&&(n=void 0),c=await h(),s=c.kind==="s3"?await k(e):void 0)}if(o==="join")e.out(`Team context downloaded into ${l}. Your previous local files were not replaced.`),e.out("Next: open that folder and run kane-cli context sync status.");else{let r=e.access(i);e.out(`Connected to ${c.gitUrl??c.path??c.location}. ${r==="write"?"You can download and publish changes.":"You can download context, but cannot publish changes."}`),e.out("Your context has not been uploaded yet."),e.out(r==="write"?`When ready, publish with kane-cli context push ${i}. This shares your context records and their referenced source documents with everyone who can read the location.`:"Ask the location owner for write access before publishing, then check the connection again."),e.out(`Share this location with teammates: ${H(c)}`),e.out(K(c))}return 0}catch(o){return o instanceof w?(e.out("Setup left. Your context has not been published. Any completed connection checks remain in the location."),3):(e.out(o instanceof Error?o.message:"Setup could not finish."),2)}}async function q(e,t=!1){return new Promise(o=>{let n=D("gh",e,{stdio:t?"inherit":["ignore","pipe","pipe"],windowsHide:!0}),h="";n.stdout?.on("data",s=>{h.length<64e3&&(h+=String(s))}),n.stderr?.on("data",()=>{});let c=setTimeout(()=>n.kill("SIGKILL"),t?3e5:2e4);n.on("error",()=>{clearTimeout(c),o({code:1,text:"GitHub CLI is unavailable"})}),n.on("close",s=>{clearTimeout(c),o({code:s??1,text:h})})})}async function ie(e,t=L(),o=process.cwd()){if(e.mode&&e.mode!=="interactive"||!G())return Y(R(e,t),t,new A("TTY_REQUIRED","guided setup needs an interactive terminal; for automation use kane-cli context sync add <name> <location> or kane-cli context clone <location> <new-folder>","run kane-cli context sync setup in a terminal"),2);let{promptSetup:n}=await import("./sync-setup-ui-RC727VK6.js"),h=(s,i)=>i(s?{credentials:s}:{}),c=async s=>{let i=[],l=await s({...t,out:r=>i.push(r),err:r=>i.push(r)});if(l!==0)for(let r of i){if(r.startsWith("next: ")||r.startsWith("checking "))continue;let a=r.startsWith("error: ")?r.slice(7):r,d=/^([a-z][a-z0-9+.-]*:\/\/|[a-z0-9._-]+@[a-z0-9.-]+[:/]|[\/~.])/i.test(a);t.out(/^[a-z]/.test(a)&&!d?a.charAt(0).toUpperCase()+a.slice(1)+(/[.!?]$/.test(a)?"":"."):a)}return l};return J({out:t.out,choose:(s,i)=>n({title:s,choices:i}),input:(s,i,l)=>n({title:s,initial:i,secret:l}),open:async s=>{let{default:i}=await import("./open-MQLQKFAW.js");await i(s)},checkGit:()=>O(),gitRead:async s=>{try{let i=await T(["ls-remote",s],{timeout:2e4});return{ok:i.code===0,diagnostic:i.stderr}}catch(i){return{ok:!1,diagnostic:i instanceof Error?i.message:String(i)}}},gh:q,add:(s,i,l)=>h(l,r=>c(a=>_(s,i,r,a,o))),clone:(s,i,l)=>h(l,r=>c(a=>N(s,i,r,a,o))),access:s=>I(f(o)).entries[s]?.tier===1?"write":"read"},o)}export{J as runSetup,ie as setupCommand};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{f as a}from"./chunk-6HCY5LJO.js";import"./chunk-3MSXQU2C.js";import"./chunk-V4JR5JCK.js";import"./chunk-ZYEFWJNZ.js";import"./chunk-KYZKPNPQ.js";import"./chunk-ULGFPKC7.js";import"./chunk-QXUPBIV3.js";import"./chunk-NPKB7EK3.js";import"./chunk-E44OHYDS.js";import"./chunk-MZYPDLD3.js";import"./chunk-H6TNBKGR.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-IYOPWIG4.js";import"./chunk-HYCOX7AB.js";import"./chunk-UEG4LJD6.js";import"./chunk-WD52ZNQY.js";import"./chunk-WML5KSGQ.js";import"./chunk-Q7LZ5QJV.js";import"./chunk-TBYYPGHF.js";import"./chunk-WPNNRMTP.js";import"./chunk-BHSHGWBL.js";import"./chunk-S3DAAAE5.js";import"./chunk-5VZAWKDF.js";import"./chunk-3LXN6AV5.js";import"./chunk-PDXZROJM.js";import"./chunk-NN6UG2BE.js";import"./chunk-Z4KRSLAM.js";import"./chunk-XGL3RSI5.js";import"./chunk-5ACSALRU.js";import"./chunk-W4Y3PG7F.js";import"./chunk-7O54QURK.js";import"./chunk-5GUD3CIH.js";import"./chunk-VOTIGXQ4.js";import"./chunk-YMLC55J4.js";import"./chunk-EHN5HTUD.js";import"./chunk-SWTJMTBY.js";import"./chunk-IE3OO5GI.js";import"./chunk-CH273NAE.js";import"./chunk-PDTFQGQF.js";import"./chunk-CDWUZ54U.js";import"./chunk-IQDZ6YMY.js";import"./chunk-VWOAEF7J.js";import"./chunk-WECVT7WE.js";import"./chunk-L45HDSJ7.js";import"./chunk-NBXYL2JT.js";import"./chunk-CAOZKSQ3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-NADKZKGS.js";import"./chunk-OYY566GN.js";import"./chunk-OUWOLCCS.js";import"./chunk-2GWMENG5.js";import"./chunk-5Y2G4NC7.js";import"./chunk-P7YZ3PU3.js";import"./chunk-TDPWFYTJ.js";import"./chunk-23MVD7GY.js";import"./chunk-4PMZ5FCD.js";import"./chunk-2YEHV2CX.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-MD3S2RXN.js";import"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-SF5QPR6T.js";import"./chunk-BK42G6RI.js";import"./chunk-H6S7L2I2.js";import"./chunk-BY2MU3ZS.js";import"./chunk-YCCUBQY4.js";import"./chunk-HBMNUT6E.js";import"./chunk-TGBXIV7O.js";import"./chunk-BPMSNGXQ.js";import"./chunk-VE3SUJMA.js";import"./chunk-O3ZKP4DY.js";import"./chunk-RFHMDQXZ.js";import"./chunk-Z2GDSCPS.js";import"./chunk-ICUTARPB.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-GGD7NKPL.js";import"./chunk-MSGW4JDG.js";import"./chunk-TZXXJWHA.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-C6JFTSIQ.js";import"./chunk-TAOHYWEO.js";import"./chunk-EMAKLNDV.js";import"./chunk-AAT4O22C.js";import"./chunk-U7BVK5IX.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-G2ZMNVYN.js";import"./chunk-KPL2XHYF.js";import"./chunk-BCJNIDS3.js";import"./chunk-DHJSM5DT.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-E47GFYXA.js";import"./chunk-EYOCNMUM.js";import"./chunk-UAFCBZ3P.js";import"./chunk-IZ5CTC6M.js";import"./chunk-FQFVAFWK.js";import"./chunk-F2XTOZTN.js";import{a as o}from"./chunk-DFS4RMVP.js";import{a as t}from"./chunk-HCBYKLMW.js";import{c as n}from"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import{e as r}from"./chunk-UR6MHSHU.js";var e=r(t(),1);async function p(i){let c=i.scenarioLimit!==void 0||i.perScenarioLimit!==void 0?{scenarioLimit:i.scenarioLimit,perScenarioLimit:i.perScenarioLimit}:void 0,{waitUntilExit:m}=n((0,e.jsx)(o,{children:(0,e.jsx)(a,{initialChatMode:"generate",initialObjective:i.objective,initialGenerateLimits:c})}),{exitOnCtrlC:!1});await m()}export{p as runGenerate};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i,n as j,o as k,p as l,q as m}from"./chunk-IYOPWIG4.js";import"./chunk-HYCOX7AB.js";import"./chunk-UEG4LJD6.js";import"./chunk-WD52ZNQY.js";import"./chunk-PDXZROJM.js";import"./chunk-WECVT7WE.js";import"./chunk-L45HDSJ7.js";import"./chunk-NBXYL2JT.js";import"./chunk-CAOZKSQ3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-23MVD7GY.js";import"./chunk-MD3S2RXN.js";import"./chunk-HBMNUT6E.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-U7BVK5IX.js";import"./chunk-G2ZMNVYN.js";import"./chunk-KPL2XHYF.js";import"./chunk-BCJNIDS3.js";import"./chunk-DHJSM5DT.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-UAFCBZ3P.js";import"./chunk-F2XTOZTN.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{i as ExportError,c as assertOrgMatchOrExit,j as exportTestmd,b as metaMatchesOrg,a as readMetaIfExists,d as resolveCurrentOrgId,l as resolveSyncAuth,h as runDeleteAction,k as runExportAction,e as runListAction,f as runListTui,g as runStatusAction,m as runSyncAction};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as a,c as b,d as c,e as d,f as e,g as f}from"./chunk-R7QMZBBH.js";import"./chunk-JQCOKL6U.js";import"./chunk-NBXYL2JT.js";import"./chunk-CAOZKSQ3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-DHJSM5DT.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-HYTBEPC2.js";import"./chunk-UR6MHSHU.js";export{a as buildBundleZip,c as runBundleSync,d as shouldSyncBundle,e as shouldSyncPersistedBundle,f as syncPersistedBundle,b as syncTestmdBundle};
2
+ import{b as a,c as b,d as c,e as d,f as e,g as f}from"./chunk-WECVT7WE.js";import"./chunk-L45HDSJ7.js";import"./chunk-NBXYL2JT.js";import"./chunk-CAOZKSQ3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-DHJSM5DT.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-F2XTOZTN.js";import"./chunk-UR6MHSHU.js";export{a as buildBundleZip,c as runBundleSync,d as shouldSyncBundle,e as shouldSyncPersistedBundle,f as syncPersistedBundle,b as syncTestmdBundle};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a}from"./chunk-G2ZMNVYN.js";import"./chunk-KPL2XHYF.js";import"./chunk-BCJNIDS3.js";import"./chunk-RZ4F3BHX.js";import"./chunk-F2XTOZTN.js";import"./chunk-UR6MHSHU.js";export{a as refreshOAuthToken};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as t}from"./chunk-EPE2ELDH.js";import"./chunk-HYTBEPC2.js";import"./chunk-UR6MHSHU.js";async function l(n,o,r){let{ControllerClient:e}=await import("./controller-client-ZF5IXRUV.js");await new e(t(n).controllerBaseUrl,{username:o,accessKey:r}).getTmsCredentials()}export{l as validateBasicAuth};
2
+ import{a as t}from"./chunk-BCJNIDS3.js";import"./chunk-F2XTOZTN.js";import"./chunk-UR6MHSHU.js";async function l(n,o,r){let{ControllerClient:e}=await import("./controller-client-ZF5IXRUV.js");await new e(t(n).controllerBaseUrl,{username:o,accessKey:r}).getTmsCredentials()}export{l as validateBasicAuth};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-XSUJJB7Z.js";import"./chunk-JVEZBJJ7.js";import"./chunk-HYTBEPC2.js";import"./chunk-UR6MHSHU.js";export{b as formatUnresolvedReceipt,a as suggestedVariablesFile,c as unresolvedVariablesEvent};
2
+ import{a,b,c}from"./chunk-NN6UG2BE.js";import"./chunk-Z4KRSLAM.js";import"./chunk-F2XTOZTN.js";import"./chunk-UR6MHSHU.js";export{b as formatUnresolvedReceipt,a as suggestedVariablesFile,c as unresolvedVariablesEvent};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-W77SZLFC.js";import"./chunk-I7TIGB7K.js";import"./chunk-DMCEGMGB.js";import"./chunk-BB2W35TW.js";import"./chunk-YKTYVJBN.js";import"./chunk-ALCE5RLK.js";import"./chunk-IE3OO5GI.js";import"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-HYTBEPC2.js";import"./chunk-UR6MHSHU.js";export{b as requiresBecause,a as reviewProtocolCtx,c as submitReview};
2
+ import{a,b,c}from"./chunk-NMBFAIXZ.js";import"./chunk-I7TIGB7K.js";import"./chunk-AGKE5WF3.js";import"./chunk-BB2W35TW.js";import"./chunk-YKTYVJBN.js";import"./chunk-ALCE5RLK.js";import"./chunk-IE3OO5GI.js";import"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-F2XTOZTN.js";import"./chunk-UR6MHSHU.js";export{b as requiresBecause,a as reviewProtocolCtx,c as submitReview};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c,d}from"./chunk-D6GBOFK5.js";import"./chunk-RZ4F3BHX.js";import"./chunk-HYTBEPC2.js";import"./chunk-UR6MHSHU.js";export{d as checkForUpdate,b as compareVersions,c as getSeverity,a as getUpdateCommand};
2
+ import{a,b,c,d}from"./chunk-Z5DGFN7R.js";import"./chunk-RZ4F3BHX.js";import"./chunk-F2XTOZTN.js";import"./chunk-UR6MHSHU.js";export{d as checkForUpdate,b as compareVersions,c as getSeverity,a as getUpdateCommand};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{Q as T}from"./chunk-UHSNUUX3.js";import"./chunk-YZVR7ESF.js";import"./chunk-H6TNBKGR.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-SWTJMTBY.js";import"./chunk-IE3OO5GI.js";import"./chunk-CH273NAE.js";import"./chunk-CAOZKSQ3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import{C as V}from"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import{F as I}from"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import{d as f,e as x}from"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-YCCUBQY4.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-HYTBEPC2.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";import{writeFileSync as ce,mkdirSync as pe}from"fs";import{tmpdir as ue}from"os";import{dirname as fe,join as ge}from"path";var F={DERIVES:"derivation",automates:"linkage",exercises:"mesh",verifies:"mesh",depends_on:"crosslink",reuses:"crosslink",belongs_to:"containment",scoped_to:"containment",annotates:"annotation"},re=(t,r)=>t===f.SOURCE?String(r.source_id??""):t===f.AC?String(r.text??""):t===f.STYLENOTE?String(r.statement??r.text??""):t===f.GAP?String(r.text??r.question??""):String(r.title??"");function H(t){let r=[];for(let[o,p]of t.nodeLabel){let g=t.getNode(o)?.content??{};r.push({cid:o,label:p,slug:p===f.SOURCE?String(g.source_id??""):t.displayNameOf?.(o)??t.nameOf.get(o)??o.slice(0,19),trust:t.trust.get(o)??"derived",fresh:t.stale(o),title:re(p,g),content:g,superseded:t.superseded.has(o)})}let e=new Map;for(let[o]of t.nodeLabel)for(let p of t.edgesFrom(o)){let g=`${p.type}|${p.src}|${p.dst}`,v=typeof p.props?.anchor=="string"?p.props.anchor:void 0,w=e.get(g);w?(w.count++,v&&w.anchors.push(v)):e.set(g,{key:g,type:p.type,family:F[p.type]??"mesh",src:p.src,dst:p.dst,count:1,anchors:v?[v]:[],container:F[p.type]==="containment"})}let s=[...e.values()],i={},l={trusted:0,derived:0,archived:0},d={fresh:0,stale:0,orphaned:0,superseded:0},a=0;for(let o of r)o.superseded||(a++,i[o.label]=(i[o.label]??0)+1,o.label!==f.SOURCE&&l[o.trust]++,d[o.fresh]++);return{nodes:r,edges:s,summary:{nodes:a,edges:s.reduce((o,p)=>o+p.count,0),byLabel:i,trust:l,fresh:d,usecases:i[f.USECASE]??0,designed:0}}}var P=/^([a-z]+)-(\d+)$/,E=(t,r)=>{let e=P.exec(t),s=P.exec(r);return e&&s&&e[1]===s[1]?Number(e[2])-Number(s[2]):t<r?-1:t>r?1:0};function se(t,r,e){let s=new Set,i=d=>{let a=e.nodeLabel.get(d);if(a===f.USECASE)s.add(d);else if(a===f.SCENARIO)for(let o of e.edgesFrom(d))o.type===x.BELONGS_TO&&s.add(o.dst)},l=e.edgesFrom(t);if(r===f.SCENARIO)for(let d of l)d.type===x.BELONGS_TO&&s.add(d.dst);if(r===f.AC)for(let d of l)d.type===x.SCOPED_TO&&i(d.dst);if(r===f.TEST)for(let d of l)d.type===x.AUTOMATES&&i(d.dst);return s}function G(t,r){let e=new Map,s=t.nodes.filter(a=>a.label===f.USECASE).map(a=>a.cid),i=s.map(a=>({ucCid:a,slug:r.nameOf.get(a)??a.slice(0,19),designed:r.designOf.has(a),nodeCids:[a]})).sort((a,o)=>E(a.slug,o.slug)),l={ucCid:"__shared__",slug:"cross-cutting",designed:!1,nodeCids:[]},d=new Map(i.map(a=>[a.ucCid,a]));for(let a of s)e.set(a,a);for(let a of t.nodes){if(a.label===f.SOURCE||a.label===f.USECASE)continue;let o=se(a.cid,a.label,r);if(o.size===1){let p=[...o][0];e.set(a.cid,p),d.get(p).nodeCids.push(a.cid)}else e.set(a.cid,"__shared__"),l.nodeCids.push(a.cid)}return{laneOf:e,lanes:[...i,l]}}var N={source:0,usecase:1,scenario:2,ac:3,test:4,stylenote:5,gap:5},ie=6,z=260,R=64,B=28;function U(t,r,e){let{lanes:s}=r,i=new Map(t.nodes.map(n=>[n.cid,n])),l=new Map,d=[],a=[],o=n=>{let m=n.map(h=>l.get(h)).filter(h=>h!==void 0);return m.length?m.reduce((h,S)=>h+S,0)/m.length:Number.MAX_SAFE_INTEGER},p=s.filter(n=>n.ucCid!=="__shared__"||n.nodeCids.length>0),g=t.nodes.filter(n=>n.label===f.SOURCE).sort((n,m)=>E(n.slug,m.slug)),v=0;for(let n of p){let m=n.nodeCids.map(c=>i.get(c)).filter(Boolean),h=c=>m.filter(u=>u.label===c),S=h(f.USECASE).sort((c,u)=>E(c.slug,u.slug));S.forEach((c,u)=>l.set(c.cid,u));let D=h(f.SCENARIO).sort((c,u)=>E(c.slug,u.slug));D.forEach((c,u)=>l.set(c.cid,u));let M=h(f.AC).sort((c,u)=>{let _=o(e.edgesInto(c.cid).filter(b=>b.type===x.EXERCISES).map(b=>b.src)),O=o(e.edgesInto(u.cid).filter(b=>b.type===x.EXERCISES).map(b=>b.src));return _-O||E(c.slug,u.slug)});M.forEach((c,u)=>l.set(c.cid,u));let j=h(f.TEST).sort((c,u)=>{let _=o(e.edgesFrom(c.cid).filter(b=>b.type===x.VERIFIES).map(b=>b.dst)),O=o(e.edgesFrom(u.cid).filter(b=>b.type===x.VERIFIES).map(b=>b.dst));return _-O||E(c.slug,u.slug)});j.forEach((c,u)=>l.set(c.cid,u));let q=m.filter(c=>N[c.label]===void 0||N[c.label]>=5).sort((c,u)=>E(c.slug,u.slug));q.forEach((c,u)=>l.set(c.cid,u));let A=Math.max(1,S.length,D.length,M.length,j.length,q.length)*R+B;for(let c of m){let u=N[c.label]??4,_=l.get(c.cid)??0;d.push({...c,lane:n.ucCid,col:u,x:u*z,y:v+B/2+_*R})}a.push({...n,y0:v,y1:v+A}),v+=A}let w=Math.max(v,R);g.forEach((n,m)=>d.push({...n,lane:"__spine__",col:0,x:0,y:w/(g.length+1)*(m+1)}));let L=ie*z;return{nodes:d,lanes:a,width:L,height:w}}function ae(t){return t.design_of?"design":t.review.length>0?"review":t.nodes.some(r=>r.label==="source")?"ingest":t.nodes.length>0?"extract":"other"}function $(t){let r=new Map,e=new Map,s=[];for(let i of t){for(let n of i.nodes)r.has(n.cid)||r.set(n.cid,i.seq);let l=new Map(e);for(let n of i.nodes)n.content?.derived===!0&&!e.has(n.cid)&&e.set(n.cid,"derived");for(let n of i.review)n.resolution==="approved"||n.resolution==="edited"?e.set(n.id,"trusted"):n.resolution==="rejected"?e.set(n.id,"archived"):n.resolution==="reset"&&e.set(n.id,"derived");let d=n=>{let m=0;for(let[h,S]of e)S===n&&l.get(h)!==n&&m++;return m},a=0;for(let[n,m]of e){let h=l.get(n);m==="derived"&&(h==="trusted"||h==="archived")&&a++}let o={trusted:d("trusted"),archived:d("archived"),reset:a},p=ae(i),g=i.nodes.map(n=>n.cid),v=i.edges.map(n=>`${n.type}|${n.src}|${n.dst}`),w=i.review.map(n=>n.id),L=p==="review"?"review \xB7 +"+o.trusted+" trusted"+(o.archived?", +"+o.archived+" archived":""):p+" \xB7 +"+g.length+" nodes";s.push({seq:i.seq,ts:i.ts,kind:p,label:L,mintedNodeCids:g,mintedEdgeKeys:v,reviewedNodeCids:w,trustDelta:o})}return{commits:s,bornSeq:r}}function Y(t,r,e){let s=[];for(let i of t){i.nodes.some(l=>l.cid===r)&&s.push({seq:i.seq,ts:i.ts,kind:"minted",detail:"minted here"});for(let l of i.review)l.id===r&&s.push({seq:i.seq,ts:i.ts,kind:"review",detail:l.resolution+(l.reason?": "+l.reason:"")})}return e.length&&s.push({seq:0,ts:"",kind:"derived_from",detail:"source lines "+e.join(", ")}),s}var oe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function k(t){return String(t).replace(/[&<>"']/g,r=>oe[r])}var W=t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"),de=new RegExp("[\u2028\u2029]","g");function X(t){return t.replace(/[<>&]/g,W).replace(de,W)}var K=t=>t.replace("sha256:","").slice(0,12);function J(t){if(!t||typeof t!="object")return"";let r=String(t.operator??""),e=t.operand!=null?String(t.operand):"",s=t.unit!=null?" "+String(t.unit):"",i=t.baseline!=null?String(t.baseline):"",l=t.within&&typeof t.within=="object"?t.within:null,d;switch(r){case"exists":d="exists: "+e;break;case"forall":d="for all "+e;break;case"contains":d="contains "+e;break;case"gte":d=">= "+e+s;break;case"lte":d="<= "+e+s;break;case"equals":d="= "+e+s+(i?" (was "+i+")":"");break;case"changed-by":d="changed by "+e+s;break;default:d=(r+" "+e+s).trim()}if(l){let a=l.threshold!=null?String(l.threshold):"",o=l.unit!=null?String(l.unit):"";(a||o)&&(d+=" within "+a+o)}return d.trim()}var C=t=>t==null||t===""?"":`<span class="chip">${k(t)}</span>`,y=(t,r)=>r==null||r===""?"":`<div class="kv"><span class="k">${k(t)}</span><span class="v">${k(r)}</span></div>`,le=t=>Array.isArray(t)&&t.length?`<ul class="crit">${t.map(r=>`<li>${k(r)}</li>`).join("")}</ul>`:"";function Q(t,r){let e=r??{};switch(t){case"usecase":return[y("description",e.description),y("value",e.value),[C(e.risk?"risk: "+e.risk:""),...Array.isArray(e.actors)?e.actors.map(s=>C(s)):[]].join(""),le(e.criteria)].join("");case"scenario":return[y("intent",e.intent),[C(e.case_type)].join(""),e.parameters&&typeof e.parameters=="object"?Object.entries(e.parameters).map(([s,i])=>y(s,i)).join(""):"",y("techniques",e.technique_notes)].join("");case"ac":return[y("",e.text),[C(e.kind),C(e.risk?"risk: "+e.risk:"")].join(""),(()=>{let s=J(e.expected_answer);return s?`<div class="pred">${k(s)}</div>`:""})()].join("");case"test":{let s=J(e.check),i=e.test_md_blob!=null?`<pre class="md">${k(String(e.test_md_blob))}</pre>`:"";return[s?`<div class="pred">${k(s)}</div>`:"",y("definitionId",e.definitionId),i].join("")}case"source":return[y("source_id",e.source_id),y("blob",e.blob)].join("");case"stylenote":return[e.statement?`<div class="pred">${k(e.statement)}</div>`:"",[C(e.learned_from_kind?"learned from: "+e.learned_from_kind:"")].join(""),y("",e.text),Array.isArray(e.tags)?e.tags.map(s=>C(s)).join(""):""].join("");case"gap":return[y("",e.text??e.question),[C(e.kind),C(e.risk?"risk: "+e.risk:"")].join(""),y("why",e.risk_rationale),y("ref",e.ref)].join("");default:return""}}function Z(t,r,e,s){let i=H(t),l=G(i,t),d=U(i,l,t),{commits:a}=$(r);i.summary.designed=l.lanes.filter(n=>n.designed&&n.ucCid!=="__shared__").length;let o={},p={};for(let n of i.nodes){o[n.cid]=Q(n.label,n.content);let m=t.edgesInto(n.cid).filter(h=>h.type===x.DERIVES&&typeof h.props?.anchor=="string").map(h=>h.props.anchor);p[n.cid]=Y(r,n.cid,m)}let g=d.nodes.map(n=>({cid:n.cid,slug:n.slug,label:n.label,trust:n.trust,fresh:n.fresh,title:n.title,superseded:n.superseded,lane:n.lane,col:n.col,x:n.x,y:n.y})),v=d.lanes.map(n=>({ucCid:n.ucCid,slug:n.slug,designed:n.designed,y0:n.y0,y1:n.y1})),L=i.nodes.some(n=>n.label===f.SOURCE)?{}:void 0;return{meta:{fromSeq:r[0]?.seq??0,tipHash:e[e.length-1]??null,storePath:s,schema:"assurance/context@1",asOf:r[r.length-1]?.ts??null},summary:i.summary,lanes:v,nodes:g,edges:i.edges,commits:a,lineage:p,contentHtml:o,width:d.width,height:d.height,source:L}}var ee="__PAYLOAD__",te=`<!doctype html>
2
+ import{Q as T}from"./chunk-E44OHYDS.js";import"./chunk-MZYPDLD3.js";import"./chunk-H6TNBKGR.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-SWTJMTBY.js";import"./chunk-IE3OO5GI.js";import"./chunk-CH273NAE.js";import"./chunk-CAOZKSQ3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import{C as V}from"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import{F as I}from"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import{d as f,e as x}from"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-YCCUBQY4.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-F2XTOZTN.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";import{writeFileSync as ce,mkdirSync as pe}from"fs";import{tmpdir as ue}from"os";import{dirname as fe,join as ge}from"path";var F={DERIVES:"derivation",automates:"linkage",exercises:"mesh",verifies:"mesh",depends_on:"crosslink",reuses:"crosslink",belongs_to:"containment",scoped_to:"containment",annotates:"annotation"},re=(t,r)=>t===f.SOURCE?String(r.source_id??""):t===f.AC?String(r.text??""):t===f.STYLENOTE?String(r.statement??r.text??""):t===f.GAP?String(r.text??r.question??""):String(r.title??"");function H(t){let r=[];for(let[o,p]of t.nodeLabel){let g=t.getNode(o)?.content??{};r.push({cid:o,label:p,slug:p===f.SOURCE?String(g.source_id??""):t.displayNameOf?.(o)??t.nameOf.get(o)??o.slice(0,19),trust:t.trust.get(o)??"derived",fresh:t.stale(o),title:re(p,g),content:g,superseded:t.superseded.has(o)})}let e=new Map;for(let[o]of t.nodeLabel)for(let p of t.edgesFrom(o)){let g=`${p.type}|${p.src}|${p.dst}`,v=typeof p.props?.anchor=="string"?p.props.anchor:void 0,w=e.get(g);w?(w.count++,v&&w.anchors.push(v)):e.set(g,{key:g,type:p.type,family:F[p.type]??"mesh",src:p.src,dst:p.dst,count:1,anchors:v?[v]:[],container:F[p.type]==="containment"})}let s=[...e.values()],i={},l={trusted:0,derived:0,archived:0},d={fresh:0,stale:0,orphaned:0,superseded:0},a=0;for(let o of r)o.superseded||(a++,i[o.label]=(i[o.label]??0)+1,o.label!==f.SOURCE&&l[o.trust]++,d[o.fresh]++);return{nodes:r,edges:s,summary:{nodes:a,edges:s.reduce((o,p)=>o+p.count,0),byLabel:i,trust:l,fresh:d,usecases:i[f.USECASE]??0,designed:0}}}var P=/^([a-z]+)-(\d+)$/,E=(t,r)=>{let e=P.exec(t),s=P.exec(r);return e&&s&&e[1]===s[1]?Number(e[2])-Number(s[2]):t<r?-1:t>r?1:0};function se(t,r,e){let s=new Set,i=d=>{let a=e.nodeLabel.get(d);if(a===f.USECASE)s.add(d);else if(a===f.SCENARIO)for(let o of e.edgesFrom(d))o.type===x.BELONGS_TO&&s.add(o.dst)},l=e.edgesFrom(t);if(r===f.SCENARIO)for(let d of l)d.type===x.BELONGS_TO&&s.add(d.dst);if(r===f.AC)for(let d of l)d.type===x.SCOPED_TO&&i(d.dst);if(r===f.TEST)for(let d of l)d.type===x.AUTOMATES&&i(d.dst);return s}function G(t,r){let e=new Map,s=t.nodes.filter(a=>a.label===f.USECASE).map(a=>a.cid),i=s.map(a=>({ucCid:a,slug:r.nameOf.get(a)??a.slice(0,19),designed:r.designOf.has(a),nodeCids:[a]})).sort((a,o)=>E(a.slug,o.slug)),l={ucCid:"__shared__",slug:"cross-cutting",designed:!1,nodeCids:[]},d=new Map(i.map(a=>[a.ucCid,a]));for(let a of s)e.set(a,a);for(let a of t.nodes){if(a.label===f.SOURCE||a.label===f.USECASE)continue;let o=se(a.cid,a.label,r);if(o.size===1){let p=[...o][0];e.set(a.cid,p),d.get(p).nodeCids.push(a.cid)}else e.set(a.cid,"__shared__"),l.nodeCids.push(a.cid)}return{laneOf:e,lanes:[...i,l]}}var N={source:0,usecase:1,scenario:2,ac:3,test:4,stylenote:5,gap:5},ie=6,z=260,R=64,B=28;function U(t,r,e){let{lanes:s}=r,i=new Map(t.nodes.map(n=>[n.cid,n])),l=new Map,d=[],a=[],o=n=>{let m=n.map(h=>l.get(h)).filter(h=>h!==void 0);return m.length?m.reduce((h,S)=>h+S,0)/m.length:Number.MAX_SAFE_INTEGER},p=s.filter(n=>n.ucCid!=="__shared__"||n.nodeCids.length>0),g=t.nodes.filter(n=>n.label===f.SOURCE).sort((n,m)=>E(n.slug,m.slug)),v=0;for(let n of p){let m=n.nodeCids.map(c=>i.get(c)).filter(Boolean),h=c=>m.filter(u=>u.label===c),S=h(f.USECASE).sort((c,u)=>E(c.slug,u.slug));S.forEach((c,u)=>l.set(c.cid,u));let D=h(f.SCENARIO).sort((c,u)=>E(c.slug,u.slug));D.forEach((c,u)=>l.set(c.cid,u));let M=h(f.AC).sort((c,u)=>{let _=o(e.edgesInto(c.cid).filter(b=>b.type===x.EXERCISES).map(b=>b.src)),O=o(e.edgesInto(u.cid).filter(b=>b.type===x.EXERCISES).map(b=>b.src));return _-O||E(c.slug,u.slug)});M.forEach((c,u)=>l.set(c.cid,u));let j=h(f.TEST).sort((c,u)=>{let _=o(e.edgesFrom(c.cid).filter(b=>b.type===x.VERIFIES).map(b=>b.dst)),O=o(e.edgesFrom(u.cid).filter(b=>b.type===x.VERIFIES).map(b=>b.dst));return _-O||E(c.slug,u.slug)});j.forEach((c,u)=>l.set(c.cid,u));let q=m.filter(c=>N[c.label]===void 0||N[c.label]>=5).sort((c,u)=>E(c.slug,u.slug));q.forEach((c,u)=>l.set(c.cid,u));let A=Math.max(1,S.length,D.length,M.length,j.length,q.length)*R+B;for(let c of m){let u=N[c.label]??4,_=l.get(c.cid)??0;d.push({...c,lane:n.ucCid,col:u,x:u*z,y:v+B/2+_*R})}a.push({...n,y0:v,y1:v+A}),v+=A}let w=Math.max(v,R);g.forEach((n,m)=>d.push({...n,lane:"__spine__",col:0,x:0,y:w/(g.length+1)*(m+1)}));let L=ie*z;return{nodes:d,lanes:a,width:L,height:w}}function ae(t){return t.design_of?"design":t.review.length>0?"review":t.nodes.some(r=>r.label==="source")?"ingest":t.nodes.length>0?"extract":"other"}function $(t){let r=new Map,e=new Map,s=[];for(let i of t){for(let n of i.nodes)r.has(n.cid)||r.set(n.cid,i.seq);let l=new Map(e);for(let n of i.nodes)n.content?.derived===!0&&!e.has(n.cid)&&e.set(n.cid,"derived");for(let n of i.review)n.resolution==="approved"||n.resolution==="edited"?e.set(n.id,"trusted"):n.resolution==="rejected"?e.set(n.id,"archived"):n.resolution==="reset"&&e.set(n.id,"derived");let d=n=>{let m=0;for(let[h,S]of e)S===n&&l.get(h)!==n&&m++;return m},a=0;for(let[n,m]of e){let h=l.get(n);m==="derived"&&(h==="trusted"||h==="archived")&&a++}let o={trusted:d("trusted"),archived:d("archived"),reset:a},p=ae(i),g=i.nodes.map(n=>n.cid),v=i.edges.map(n=>`${n.type}|${n.src}|${n.dst}`),w=i.review.map(n=>n.id),L=p==="review"?"review \xB7 +"+o.trusted+" trusted"+(o.archived?", +"+o.archived+" archived":""):p+" \xB7 +"+g.length+" nodes";s.push({seq:i.seq,ts:i.ts,kind:p,label:L,mintedNodeCids:g,mintedEdgeKeys:v,reviewedNodeCids:w,trustDelta:o})}return{commits:s,bornSeq:r}}function Y(t,r,e){let s=[];for(let i of t){i.nodes.some(l=>l.cid===r)&&s.push({seq:i.seq,ts:i.ts,kind:"minted",detail:"minted here"});for(let l of i.review)l.id===r&&s.push({seq:i.seq,ts:i.ts,kind:"review",detail:l.resolution+(l.reason?": "+l.reason:"")})}return e.length&&s.push({seq:0,ts:"",kind:"derived_from",detail:"source lines "+e.join(", ")}),s}var oe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function k(t){return String(t).replace(/[&<>"']/g,r=>oe[r])}var W=t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"),de=new RegExp("[\u2028\u2029]","g");function X(t){return t.replace(/[<>&]/g,W).replace(de,W)}var K=t=>t.replace("sha256:","").slice(0,12);function J(t){if(!t||typeof t!="object")return"";let r=String(t.operator??""),e=t.operand!=null?String(t.operand):"",s=t.unit!=null?" "+String(t.unit):"",i=t.baseline!=null?String(t.baseline):"",l=t.within&&typeof t.within=="object"?t.within:null,d;switch(r){case"exists":d="exists: "+e;break;case"forall":d="for all "+e;break;case"contains":d="contains "+e;break;case"gte":d=">= "+e+s;break;case"lte":d="<= "+e+s;break;case"equals":d="= "+e+s+(i?" (was "+i+")":"");break;case"changed-by":d="changed by "+e+s;break;default:d=(r+" "+e+s).trim()}if(l){let a=l.threshold!=null?String(l.threshold):"",o=l.unit!=null?String(l.unit):"";(a||o)&&(d+=" within "+a+o)}return d.trim()}var C=t=>t==null||t===""?"":`<span class="chip">${k(t)}</span>`,y=(t,r)=>r==null||r===""?"":`<div class="kv"><span class="k">${k(t)}</span><span class="v">${k(r)}</span></div>`,le=t=>Array.isArray(t)&&t.length?`<ul class="crit">${t.map(r=>`<li>${k(r)}</li>`).join("")}</ul>`:"";function Q(t,r){let e=r??{};switch(t){case"usecase":return[y("description",e.description),y("value",e.value),[C(e.risk?"risk: "+e.risk:""),...Array.isArray(e.actors)?e.actors.map(s=>C(s)):[]].join(""),le(e.criteria)].join("");case"scenario":return[y("intent",e.intent),[C(e.case_type)].join(""),e.parameters&&typeof e.parameters=="object"?Object.entries(e.parameters).map(([s,i])=>y(s,i)).join(""):"",y("techniques",e.technique_notes)].join("");case"ac":return[y("",e.text),[C(e.kind),C(e.risk?"risk: "+e.risk:"")].join(""),(()=>{let s=J(e.expected_answer);return s?`<div class="pred">${k(s)}</div>`:""})()].join("");case"test":{let s=J(e.check),i=e.test_md_blob!=null?`<pre class="md">${k(String(e.test_md_blob))}</pre>`:"";return[s?`<div class="pred">${k(s)}</div>`:"",y("definitionId",e.definitionId),i].join("")}case"source":return[y("source_id",e.source_id),y("blob",e.blob)].join("");case"stylenote":return[e.statement?`<div class="pred">${k(e.statement)}</div>`:"",[C(e.learned_from_kind?"learned from: "+e.learned_from_kind:"")].join(""),y("",e.text),Array.isArray(e.tags)?e.tags.map(s=>C(s)).join(""):""].join("");case"gap":return[y("",e.text??e.question),[C(e.kind),C(e.risk?"risk: "+e.risk:"")].join(""),y("why",e.risk_rationale),y("ref",e.ref)].join("");default:return""}}function Z(t,r,e,s){let i=H(t),l=G(i,t),d=U(i,l,t),{commits:a}=$(r);i.summary.designed=l.lanes.filter(n=>n.designed&&n.ucCid!=="__shared__").length;let o={},p={};for(let n of i.nodes){o[n.cid]=Q(n.label,n.content);let m=t.edgesInto(n.cid).filter(h=>h.type===x.DERIVES&&typeof h.props?.anchor=="string").map(h=>h.props.anchor);p[n.cid]=Y(r,n.cid,m)}let g=d.nodes.map(n=>({cid:n.cid,slug:n.slug,label:n.label,trust:n.trust,fresh:n.fresh,title:n.title,superseded:n.superseded,lane:n.lane,col:n.col,x:n.x,y:n.y})),v=d.lanes.map(n=>({ucCid:n.ucCid,slug:n.slug,designed:n.designed,y0:n.y0,y1:n.y1})),L=i.nodes.some(n=>n.label===f.SOURCE)?{}:void 0;return{meta:{fromSeq:r[0]?.seq??0,tipHash:e[e.length-1]??null,storePath:s,schema:"assurance/context@1",asOf:r[r.length-1]?.ts??null},summary:i.summary,lanes:v,nodes:g,edges:i.edges,commits:a,lineage:p,contentHtml:o,width:d.width,height:d.height,source:L}}var ee="__PAYLOAD__",te=`<!doctype html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="utf-8">
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as ve}from"./chunk-TU6IMGWO.js";import{c as he}from"./chunk-FFVNISYH.js";import{a as Z}from"./chunk-A2SQD2AY.js";import{k as ge}from"./chunk-ORQGQSWG.js";import{a as ie,c as ne,d as pe}from"./chunk-PGXJ275T.js";import"./chunk-O3XBIURC.js";import{a as re,b as ce,c as le,d as N,f as G,g as de,i as ue,k as me,l as fe}from"./chunk-7WDPU33M.js";import{a as ee,b as te}from"./chunk-UJZZDPDY.js";import"./chunk-RKXHVP2Z.js";import{a as Y}from"./chunk-TCAHDVII.js";import"./chunk-YYYQ5MVD.js";import"./chunk-BZAGVBCX.js";import"./chunk-CRZUBDJ3.js";import"./chunk-JUJ4SAGH.js";import"./chunk-ALCE5RLK.js";import"./chunk-UHSNUUX3.js";import{b as Q}from"./chunk-YZVR7ESF.js";import"./chunk-H6TNBKGR.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-YMLC55J4.js";import"./chunk-SWTJMTBY.js";import"./chunk-IE3OO5GI.js";import"./chunk-CH273NAE.js";import"./chunk-CAOZKSQ3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-5Y2G4NC7.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import{C as _}from"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import{a as se}from"./chunk-YCCUBQY4.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import{y as h}from"./chunk-HYTBEPC2.js";import"./chunk-DFS4RMVP.js";import{a as K}from"./chunk-HCBYKLMW.js";import{a as F,b as x,k as ae}from"./chunk-C44QQJR4.js";import{a as Ie}from"./chunk-6YGTRKDT.js";import{e as U}from"./chunk-UR6MHSHU.js";var R=U(Ie(),1);function ke(t){let v=t.by??{kind:"human",id:process.env.USER??"operator"},k=t.mode==="interactive"?"override":t.mode,A=k==="override"?{note:"override \xB7 auto-answers, won't ask"}:{},M=(r,n)=>ee(t.onChild,{verb:"design",subject:r,...A,fixCmd:`kane-cli design tests --use-case ${r}`},n,l=>({ok:l===0,exitCode:l})),P=(r,n,l)=>ee(t.onChild,{verb:"evolve",subject:r,...A,fixCmd:`kane-cli maintain evolve ${n}`},l,a=>({ok:a.outcome==="evolved",exitCode:a.code})),S={out:()=>{},err:()=>{},isTTY:!1,confirm:async()=>!0},u={applied:0,committed:0,retired:0,skipped:0,deferred:0,failed:0},w=new Map;for(let r of t.planRows)if(r.held_ref&&t.held){let n=t.held.rows.find(a=>a.temp_ref===r.held_ref);if(!n)continue;let l={kind:n.kind,ref:n.temp_ref,title:n.title,why:n.why,origin:"content-change",...r.impact?{impact:r.impact}:{}};w.set(l.ref,{card:l,source:"held",heldRef:n.temp_ref})}else if(r.kind==="MODIFY"){let n={kind:"MODIFY",ref:r.ref,title:r.ref,why:`${r.reason}: ${r.provenance}`,origin:r.origin??"structural-stale",...r.impact?{impact:r.impact}:{}};w.set(n.ref,{card:n,source:"row",row:r})}else if(r.kind==="ADD"){let n={kind:"ADD",ref:r.ref,title:r.ref,why:r.reason,origin:r.origin??"content-change"};w.set(n.ref,{card:n,source:"row",row:r})}for(let r of t.archive){if(r.kind!=="ARCHIVE")continue;let n={kind:"ARCHIVE",ref:r.ref,title:r.ref,why:r.why,provenance:r.why,...r.impact?{impact:r.impact}:{}};w.set(n.ref,{card:n,source:"archive",row:r})}for(let r of t.reviewFeeder?.()??[]){if(w.has(r.ref))continue;let n={kind:r.kind==="MODIFY_HELD"?"MODIFY":r.kind,ref:r.ref,title:r.title,why:r.why,...r.impact?{impact:r.impact}:{},...r.pair?{pair:r.pair}:{},...r.held?{held:!0}:{},...r.kind==="MODIFY_HELD"?{heldPayload:!0}:{}};w.set(n.ref,{card:n,source:"review",reviewCard:r})}let y=r=>(u.failed++,{outcome:"failed",detail:r});return{cards:()=>[...w.values()].map(r=>r.card),async submit(r,n){let l=w.get(r);if(!l)return y(`no card ${r}`);if(l.source==="review"){if(l.reviewCard.kind==="PAIR"&&n.v==="approve")return y(`${r} is a PAIR card \u2014 approve is not in its grammar (merge / keep both / defer); words ride a defer note`);let{submitReview:s}=await import("./verdicts-EMCYGQWM.js"),b=n.v==="approve"?{v:"approve"}:n.v==="archive"?{v:"archive",because:n.because??""}:n.v==="skip"&&l.reviewCard.kind==="MODIFY_HELD"?{v:"keep_current"}:n.v==="defer"||n.v==="skip"?{v:"defer"}:n.v==="merge"?{v:"merge"}:{v:"keep_both"},g=await s({contextDir:t.contextDir,signals:o=>t.signals({ref:o.ref,verdict:o.verdict,...o.reason?{reason:o.reason}:{}})},l.reviewCard,b,v);return g.outcome==="failed"?(u.failed++,g):g.outcome==="deferred"?(u.deferred++,n.v==="defer"&&n.note?(t.signals({ref:r,verdict:"deferred-with-note",reason:n.note}),{...g,detail:`steering noted: "${n.note}" \u2014 decide ${l.reviewCard.kind==="PAIR"?"merge / keep both":"the verdict"} when it re-offers`}):g):g.outcome==="retired"?(u.retired++,g):g.outcome==="committed"?(u.committed++,g):(u.applied++,g)}if(n.v==="merge"||n.v==="keep_both")return y(`${r} is a ${l.card.kind} card \u2014 ${n.v} applies to review cards only`);if(n.v==="skip")return u.skipped++,t.signals({ref:r,verdict:"gap-dismissed"}),{outcome:"skipped"};if(n.v==="defer")return u.deferred++,n.note?(t.signals({ref:r,verdict:"deferred-with-note",reason:n.note}),{outcome:"deferred",detail:`steering noted: "${n.note}"`}):{outcome:"deferred"};if(n.v==="archive"){if(l.source!=="archive")return y(`${r} is not an ARCHIVE card`);let s=_(t.contextDir),b=s.resolve(l.row.ref);if(b&&s.superseded.has(s.tipOf(b.cid)))return u.skipped++,{outcome:"skipped",detail:"already retired \u2014 nothing to do"};let g=ve(t.contextDir,_(t.contextDir),{ref:l.row.ref,reason:`reconcile retire: ${l.row.why}`,by:v});return g.errors?y(g.errors.map(o=>`${o.code}: ${o.detail}`).join("; ")):(u.retired++,t.signals({ref:r,verdict:"gap-resolved-archive",reason:l.row.why}),{outcome:"retired"})}if(l.source==="archive")return y(`${r} takes archive/skip/defer, not approve`);if(l.source==="held"){let s=ge(t.contextDir,t.held,l.heldRef,v,n.edits);if(!s.ok)return y(s.message);if(s.kind==="ADD"){let b=await M(s.ref,()=>t.runDesign(s.ref,{yes:!0,mode:k,...n.steering?{because:n.steering}:{}}));return b!==0?(u.failed++,{outcome:"failed",landed:!0,detail:`committed ${s.ref}, but its design run exited ${b} \u2014 finish with kane-cli design tests --use-case ${s.ref}`}):(u.applied++,t.signals({ref:r,verdict:"gap-resolved-create",...n.steering?{reason:n.steering}:{}}),{outcome:"applied",detail:s.ref})}if(n.steering){let b=_(t.contextDir),g=ie(b,s.ref);if(!g.ok)return u.committed++,{outcome:"committed",detail:`committed ${s.ref}, but steering could not resolve it (${g.message}) \u2014 steer via kane-cli maintain evolve ${s.ref}`};let o=await P(g.target.display,s.ref,()=>ne(t.contextDir,g.target,{yes:!0,mode:k,because:n.steering},S,t.runDesign,"batch"));if(o.outcome==="no-design"){let c=await M(g.target.seamRef,()=>t.runDesign(g.target.seamRef,{yes:!0,mode:k,because:n.steering}));return c!==0?(u.failed++,{outcome:"failed",landed:!0,detail:`committed ${s.ref}, but its steered design run exited ${c} \u2014 finish with kane-cli design tests --use-case ${g.target.seamRef}`}):(u.applied++,t.signals({ref:r,verdict:"gap-resolved-create",reason:n.steering}),{outcome:"applied",detail:s.ref})}return o.outcome==="failed"||o.outcome==="paused"?(u.failed++,{outcome:"failed",landed:!0,detail:`committed ${s.ref}, but the steering evolve ${o.outcome} (exit ${o.code}) \u2014 finish with kane-cli maintain evolve ${s.ref}`}):o.outcome==="declined"?(u.committed++,{outcome:"committed",detail:`committed ${s.ref} \u2014 the steering evolve was declined; re-run kane-cli maintain evolve ${s.ref}`}):(u.applied++,t.signals({ref:r,verdict:"gap-resolved-evolve",reason:n.steering}),{outcome:"applied",detail:s.ref})}return u.committed++,t.signals({ref:r,verdict:"gap-resolved-evolve"}),{outcome:"committed",detail:s.ref}}let a=_(t.contextDir),d=ie(a,l.row.ref);if(!d.ok)return y(d.message);if(l.card.kind==="ADD"){let s=await M(d.target.seamRef,()=>t.runDesign(d.target.seamRef,{yes:!0,mode:k}));return s!==0?y(`design run exited ${s}`):(u.applied++,t.signals({ref:r,verdict:"gap-resolved-create"}),{outcome:"applied"})}let D=await P(d.target.display,l.row.ref,()=>ne(t.contextDir,d.target,{yes:!0,mode:k,...n.steering?{because:n.steering}:{}},S,t.runDesign,"batch"));return D.outcome==="evolved"?(u.applied++,t.signals({ref:r,verdict:"gap-resolved-evolve",...n.steering?{reason:n.steering}:{}}),{outcome:"applied"}):D.outcome==="failed"||D.outcome==="paused"?y(`evolve ${D.outcome} (exit ${D.code})`):(u.skipped++,{outcome:"skipped",detail:D.outcome})},summary:()=>({...u})}}var j=U(K(),1);function q({mark:t,markColor:v,color:k,indent:A=2,reserve:M=0,children:P}){let{stdout:S}=ae(),u=(S?.columns??80)-M,w=A+t.length+1;return(0,j.jsxs)(F,{children:[(0,j.jsx)(F,{width:w,flexShrink:0,children:(0,j.jsx)(x,{color:v,children:`${" ".repeat(A)}${t}`})}),(0,j.jsx)(F,{width:Math.max(20,u-w),children:(0,j.jsx)(x,{color:k,children:P})})]})}var p=U(K(),1);function be(t){return t.landed?"committed":t.outcome}var We={applied:{mark:"\u2714",color:"green"},committed:{mark:"\u2714",color:"green"},retired:{mark:"\u2714",color:"green"},skipped:{mark:"\xB7",color:"dim"},deferred:{mark:"\u2013",color:"dim"},failed:{mark:"\u2717",color:"red"}};function Ae(t){return t.v==="archive"?"Retiring\u2026":t.v==="approve"&&t.steering?"Approving with your changes \u2014 committing, then re-designing\u2026":"Applying \u2014 committing\u2026"}function Pe({controller:t,cards:v,note:k,markOutcome:A,routeChat:M,listEvolveTargets:P,barSubject:S,meta:u,resumeCmd:w,activeChild:y,onFinish:r,onCtrlC:n,pauseRef:l}){let[a,d]=(0,R.useState)(v.length>0?{at:"card",idx:0,sel:0,editor:null}:{at:"done-panel",sel:0}),D=(0,R.useRef)(0),s=(0,R.useRef)(a);s.current=a;let b=(0,R.useRef)([]),[,g]=(0,R.useState)(0),o=a.at==="busy"||a.at==="evolving";(0,R.useEffect)(()=>{if(!o)return;let e=setInterval(()=>g(i=>i+1),120);return()=>clearInterval(e)},[o]);let c=()=>{let e=t.summary();return`${e.applied+e.committed} applied \xB7 ${e.retired} retired \xB7 ${e.skipped} skipped \xB7 ${e.deferred} deferred`+(e.failed>0?` \xB7 ${e.failed} failed`:"")},E=()=>({state:"complete",facts:[c()]}),C=()=>({state:"walk-paused",reason:"ctrl+c",facts:[c(),"every verdict so far is committed \u2014 re-run the same reconcile command to continue"],...w?{resume:w}:{}}),$=()=>r(D.current,E()),T=(0,R.useRef)(!1),W=()=>{r(3,C())},I=()=>{if(T.current)return;T.current=!0;let e=s.current;if(e.at==="busy"||e.at==="evolving"){k((0,p.jsx)(x,{color:h.dim,children:"finishing the current item, then pausing\u2026"}));return}if(e.at==="done-panel"||e.at==="picker"||e.at==="why"||e.at==="view"){$();return}W()};l&&(l.current=I);let V=a.at==="card"||a.at==="busy"?v[a.idx]:null,O=()=>[{key:"finish",label:"finish"},...P?[{key:"evolve",label:"evolve another use-case\u2026"}]:[],...b.current.length>0?[{key:"view",label:"view what changed"}]:[]],H=()=>{let e=P?.()??[];if(e.length===0){k((0,p.jsx)(x,{color:h.dim,children:"nothing is stale \u2014 no evolve targets right now"})),d({at:"done-panel",sel:0});return}d({at:"picker",items:e,sel:0})},we=e=>{let i=e+1;i<v.length?d({at:"card",idx:i,sel:0,editor:null}):d({at:"done-panel",sel:0})},X=(0,R.useRef)(!1),L=(e,i)=>{if(X.current)return;X.current=!0;let m=v[e];d({at:"busy",idx:e,label:Ae(i),startedAt:Date.now()}),t.submit(m.ref,i).catch(f=>({outcome:"failed",detail:f instanceof Error?f.message:String(f)})).then(f=>{let B=We[f.outcome]??{mark:"\xB7",color:"dim"},Te=f.outcome!=="failed"&&f.outcome!=="skipped"&&f.outcome!=="deferred"&&m.impact&&"stale_refs"in m.impact&&m.impact.stale_refs.length>0?` \xB7 ${m.impact.stale_refs.length} item(s) now stale`:"",oe=`${f.outcome} [${m.kind}] ${Y(m.title)}${f.detail?` \u2014 ${Y(f.detail)}`:""}${Te}`;if(b.current.push({mark:B.mark,color:B.color,line:oe}),k((0,p.jsx)(q,{mark:B.mark,markColor:B.color==="green"?h.green:B.color==="red"?h.red:h.dim,color:B.color==="dim"?h.dim:void 0,children:oe})),f.outcome==="failed"&&(D.current=D.current===0?1:D.current),A(m.ref,be(f)),X.current=!1,T.current){W();return}we(e)})},ye=(e,i)=>{d({at:"evolving",title:e.title,startedAt:Date.now()}),M(`${e.key} ${i}`).catch(m=>`\u2717 evolve failed: ${m instanceof Error?m.message:String(m)}`).then(m=>{let f=m.startsWith("\u2713");if(b.current.push({mark:f?"\u2714":"\u2717",color:f?"green":"red",line:m.replace(/^[✓✗]\s*/,"")}),k((0,p.jsx)(q,{mark:f?"\u2714":"\u2717",markColor:f?h.green:h.red,children:m.replace(/^[✓✗]\s*/,"")})),T.current){$();return}d({at:"done-panel",sel:0})})},xe=(0,R.useMemo)(()=>({isFocused:()=>{let e=s.current;return e.at==="card"&&e.editor===null||e.at==="done-panel"||e.at==="picker"||e.at==="view"},onMove:e=>{d(i=>{if(i.at==="card"){let m=v[i.idx],f=G(m)??N(m).length-1;return{...i,sel:Math.max(0,Math.min(f,i.sel+e))}}return i.at==="done-panel"?{...i,sel:Math.max(0,Math.min(O().length-1,i.sel+e))}:i.at==="picker"?{...i,sel:Math.max(0,Math.min(i.items.length-1,i.sel+e))}:i})},onSelect:()=>{let e=s.current;if(e.at==="card"){let i=v[e.idx],m=G(i);if(m!==null&&e.sel===m){d({...e,editor:"",editorIntent:"steer"});return}let f=N(i)[e.sel];if(f?.v==="archive"&&i.kind==="REVIEW"){d({...e,editor:"",editorIntent:"because"});return}f&&L(e.idx,{v:f.v});return}if(e.at==="done-panel"){let i=O()[e.sel];i?.key==="finish"?$():i?.key==="evolve"?H():i?.key==="view"&&d({at:"view"});return}if(e.at==="picker"){let i=e.items[e.sel];i&&d({at:"why",item:i,text:""});return}},onDigit:e=>{let i=s.current;if(i.at==="card"){let m=v[i.idx],f=N(m)[e-1];if(f?.v==="archive"&&m.kind==="REVIEW"){d({...i,editor:"",editorIntent:"because"});return}f&&L(i.idx,{v:f.v});return}i.at==="done-panel"&&e-1<O().length&&d({...i,sel:e-1}),i.at==="picker"&&e-1<i.items.length&&d({...i,sel:e-1})},onType:e=>{d(i=>i.at!=="card"||G(v[i.idx])===null?i:{...i,editor:(i.editor??"")+e,editorIntent:i.editorIntent??"steer"})},isMulti:()=>!1,onSpace:()=>{},onBack:()=>{let e=s.current;(e.at==="picker"||e.at==="view")&&d({at:"done-panel",sel:0})}}),[v]);(0,R.useEffect)(()=>{a.at==="done"&&$()},[a.at]);let Ce=e=>Math.floor((Date.now()-e)/1e3),z=y?.current??null,$e=a.at==="card"?{kind:"card",n:a.idx+1,m:v.length}:a.at==="busy"?z?{kind:"child-working",step:re(a.label)}:{kind:"working",step:re(a.label),elapsedS:Ce(a.startedAt)}:a.at==="evolving"?{kind:"child-working",step:`evolving ${a.title}`}:{kind:"idle"},Re=a.at==="card"||a.at==="busy"?v.length-a.idx:0,Ee=a.at==="done-panel"||a.at==="picker"||a.at==="why"||a.at==="view",De=[...a.at==="card"?a.editor!==null?["\u23CE submit","esc back"]:fe(v[a.idx]).keys:a.at==="done-panel"?me(O(),{escBack:!1}).keys:a.at==="picker"?["\u2191\u2193 select","\u23CE confirm","esc back"]:a.at==="why"?["\u23CE submit","esc back"]:a.at==="view"?["esc back"]:[],"ctrl+c exit"],J=u??{verb:"reconcile",sid:"",env:""},Se=`view \xB7 this run's changes \xB7 ${b.current.length}`;return(0,p.jsxs)(F,{flexDirection:"column",children:[(0,p.jsx)(le,{onToggleThinking:()=>{},onCtrlC:()=>{n(),I()},panel:xe}),a.at==="card"&&V?(0,p.jsx)(de,{card:V,position:{n:a.idx+1,of:v.length},sel:a.sel,focused:a.editor===null,editorIntent:a.editorIntent??"steer",freeText:a.editor!==null?{value:a.editor,onChange:e=>d(i=>i.at==="card"?{...i,editor:e}:i),onSubmit:e=>{let i=s.current;if(i.at!=="card")return;let m=e.trim();if(!m){d({...i,editor:null,editorIntent:void 0});return}let f=v[i.idx];i.editorIntent==="because"?L(i.idx,{v:"archive",because:m}):f.kind==="PAIR"?L(i.idx,{v:"defer",note:m}):L(i.idx,{v:"approve",steering:m})},onCancel:()=>d(e=>e.at==="card"?{...e,editor:null,editorIntent:void 0}:e)}:null}):null,a.at==="done-panel"?(0,p.jsx)(Q,{headline:(()=>{let e=t.summary();return`reconcile done \u2014 ${e.applied+e.committed} applied \xB7 ${e.retired} retired \xB7 ${e.skipped} skipped \xB7 ${e.deferred} deferred${e.failed>0?` \xB7 ${e.failed} failed`:""}`})(),rows:O(),sel:a.sel,focused:!0}):null,a.at==="picker"?(0,p.jsx)(Q,{ask:!0,headline:"evolve which use-case?",rows:a.items.map(e=>({key:e.key,label:e.title,detail:e.badge})),sel:a.sel,focused:!0}):null,a.at==="why"?(0,p.jsxs)(F,{flexDirection:"column",borderStyle:"round",borderColor:h.assuranceAccent,paddingX:1,children:[(0,p.jsxs)(F,{children:[(0,p.jsxs)(x,{children:[(0,p.jsx)(x,{color:h.assuranceAccent,children:"\u25B8"})," ",(0,p.jsx)(x,{color:h.dim,children:"\u270E "})]}),(0,p.jsx)(se,{value:a.text,onChange:e=>d(i=>i.at==="why"?{...i,text:e}:i),onSubmit:e=>{let i=s.current;i.at==="why"&&(e.trim()?ye(i.item,e.trim()):d({at:"picker",items:[i.item],sel:0}))},onCancel:()=>{s.current.at==="why"&&H()},placeholder:`what should change about ${a.item.title}?`})]}),(0,p.jsx)(x,{color:h.muted,children:" \u23CE submit \xB7 esc back"})]}):null,a.at==="view"?(0,p.jsxs)(F,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,p.jsx)(x,{bold:!0,color:h.assuranceAccent,children:Se}),(0,p.jsx)(x,{children:" "}),b.current.map((e,i)=>(0,p.jsx)(q,{mark:e.mark,markColor:e.color==="green"?h.green:e.color==="red"?h.red:h.dim,color:e.color==="dim"?h.dim:void 0,indent:0,reserve:0,children:e.line},`vc-${i}`))]}):null,(0,p.jsx)(ce,{status:$e,meta:{...J,...S??J.subject?{subject:S??J.subject}:{}},tallies:ue(t.summary(),Re),keys:De,child:a.at==="evolving"?{verb:"evolve"}:z?{verb:z.verb}:void 0})]})}async function at(t){let v={current:null},k=o=>{v.current?.append(o)},A=null,M=async(o,c)=>{let[{runDesign:E},{resolveAgentAuthEnv:C},{runAgent:$},{preflightTurn:T}]=await Promise.all([import("./run-UDP5VPYS.js"),import("./spawner-7FUA3JXA.js"),import("./bridge-5UKX7YIO.js"),import("./turn-preflight-JGYT7LXP.js")]);A??=await C();let W=A;return E({useCase:o,force:!0,mode:c.mode??"override",...c.because?{because:c.because}:{},...c.changeDelta!==void 0?{changeDelta:c.changeDelta}:{},...c.priorDesign!==void 0?{priorDesign:c.priorDesign}:{}},{contextDir:t.dir,agent:$,preflightTurn:()=>T(W),ask:async()=>[],out:()=>{},progress:()=>{},isTTY:!1,auth:W})},P=t.runDesign??M,S={current:null},u="",w=o=>{if(o.kind==="start")S.current={verb:o.verb},u=o.subject,k((0,p.jsxs)(x,{color:h.assuranceAccent,children:[`\u25CF ${te(o.verb).ing} ${Y(o.subject)}`,o.note?(0,p.jsx)(x,{color:h.dim,children:` ${o.note}`}):null]}));else if(o.kind==="end"){let c=S.current?.verb??"design";S.current=null,k(o.ok?(0,p.jsx)(x,{color:h.green,children:`\u25CF ${te(c).ed} ${Y(u)} \u2014 ${o.durS}s`}):(0,p.jsx)(x,{color:h.red,children:`\u25CF ${c} failed \u2014 ${o.exitCode!=null?`exited ${o.exitCode}`:"error"}${o.fixCmd?` \xB7 ${o.fixCmd}`:""}`}))}},y=ke({contextDir:t.dir,held:t.held,archive:t.archive,planRows:t.rows,runDesign:P,mode:"interactive",signals:t.signals,onChild:w,reviewFeeder:()=>{try{return he({contextDir:t.dir},_(t.dir))}catch{return[]}}}),r=new Set(t.rows.filter(o=>o.applied!==void 0).map(o=>o.held_ref??o.ref)),n=y.cards().filter(o=>!r.has(o.ref)&&!(o.kind==="ARCHIVE"&&t.archiveState?.[o.ref]!==void 0)),l=o=>t.rows.findIndex(c=>(c.held_ref??c.ref)===o),a=(o,c)=>{try{if(n.find($=>$.ref===o)?.kind==="ARCHIVE"){c==="retired"?t.markA?.(o,"retired"):c==="skipped"&&t.markA?.(o,"skipped");return}let C=l(o);if(C<0)return;c==="applied"||c==="committed"?t.mark?.(C,"approved"):c==="skipped"&&t.mark?.(C,"skipped")}catch{}},d=async o=>{let[{openGraph:c},{resolveParentUc:E,evolveOneUc:C}]=await Promise.all([import("./readmodel-IBFRM6EO.js"),import("./evolve-cmd-QQQPPGL3.js")]),[$,...T]=o.split(/\s+/),W=c(t.dir),I=E(W,$);if(!I.ok)return`couldn't resolve '${$}' \u2014 start with a use-case id (uc-\u2026): ${I.message}`;if(T.length===0)return`say what to change: \`${$} <your words>\` \u2014 the words become the redesign's change delta`;let V=T.join(" "),O={out:()=>{},err:()=>{},isTTY:!1,confirm:async()=>!0},H=await C(t.dir,I.target,{yes:!0,mode:"override",because:V},O,P,"batch");return H.outcome==="evolved"?(t.signals({ref:I.target.display,verdict:"gap-resolved-evolve",reason:V}),`\u2713 redesigned ${I.target.display} \u2014 "${V}"`):`\u2717 evolve ${H.outcome} for ${I.target.display} (exit ${H.code})`},D=t.listEvolveTargets??(()=>{let o=_(t.dir);return pe(o).targets.map(c=>({key:c.display,title:c.display,badge:"stale"}))});if(t.script){let o=0;for(let c of n){let E=await t.script(c),C=await y.submit(c.ref,E);C.outcome==="failed"&&o===0&&(o=1),a(c.ref,be(C))}return o}let[{render:s},{ScrollbackProvider:b},{ScrollbackTap:g}]=await Promise.all([import("./build-JIKYOZUH.js"),import("./scrollback-JLPJR25X.js"),import("./ScrollbackTap-QHJOFYMC.js")]);return new Promise(o=>{let c=!1,E=(V,O)=>{c||(c=!0,(async()=>{process.removeListener("SIGINT",W),await v.current?.flush();try{I.unmount()}catch{}O&&Z(O),o(V)})())},C=0,$={current:null},T=()=>{if(C+=1,C>=2){if(c)return;c=!0,process.removeListener("SIGINT",W);try{I.unmount()}catch{}Z({state:"interrupted",reason:"ctrl+c \xD72",facts:["forced quit \u2014 every committed verdict is safe in the store"]}),o(130)}},W=()=>{T(),$.current?.()};process.on("SIGINT",W);let I=s((0,p.jsxs)(b,{children:[(0,p.jsx)(g,{into:v}),(0,p.jsx)(Pe,{controller:y,cards:n,note:k,markOutcome:a,routeChat:d,listEvolveTargets:D,barSubject:t.barSubject,meta:t.meta,resumeCmd:t.resumeCmd,activeChild:S,onFinish:E,onCtrlC:T,pauseRef:$})]}),{exitOnCtrlC:!1})})}export{Pe as WalkSessionSurface,be as outcomeToMark,at as runWalkSession};
2
+ import{a as ve}from"./chunk-TU6IMGWO.js";import{c as he}from"./chunk-FFVNISYH.js";import{a as Z}from"./chunk-A2SQD2AY.js";import{k as ge}from"./chunk-3AVBUEBL.js";import{a as ie,c as ne,d as pe}from"./chunk-RCYYE6ED.js";import"./chunk-O3XBIURC.js";import{a as re,b as ce,c as le,d as N,f as G,g as de,i as ue,k as me,l as fe}from"./chunk-CR7UWQ76.js";import{a as ee,b as te}from"./chunk-UJZZDPDY.js";import"./chunk-RKXHVP2Z.js";import{a as Y}from"./chunk-TCAHDVII.js";import"./chunk-YYYQ5MVD.js";import"./chunk-BZAGVBCX.js";import"./chunk-CRZUBDJ3.js";import"./chunk-JUJ4SAGH.js";import"./chunk-ALCE5RLK.js";import"./chunk-E44OHYDS.js";import{b as Q}from"./chunk-MZYPDLD3.js";import"./chunk-H6TNBKGR.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-YMLC55J4.js";import"./chunk-SWTJMTBY.js";import"./chunk-IE3OO5GI.js";import"./chunk-CH273NAE.js";import"./chunk-CAOZKSQ3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-5Y2G4NC7.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import{C as _}from"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import{a as se}from"./chunk-YCCUBQY4.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import{y as h}from"./chunk-F2XTOZTN.js";import"./chunk-DFS4RMVP.js";import{a as K}from"./chunk-HCBYKLMW.js";import{a as F,b as x,k as ae}from"./chunk-C44QQJR4.js";import{a as Ie}from"./chunk-6YGTRKDT.js";import{e as U}from"./chunk-UR6MHSHU.js";var R=U(Ie(),1);function ke(t){let v=t.by??{kind:"human",id:process.env.USER??"operator"},k=t.mode==="interactive"?"override":t.mode,A=k==="override"?{note:"override \xB7 auto-answers, won't ask"}:{},M=(r,n)=>ee(t.onChild,{verb:"design",subject:r,...A,fixCmd:`kane-cli design tests --use-case ${r}`},n,l=>({ok:l===0,exitCode:l})),P=(r,n,l)=>ee(t.onChild,{verb:"evolve",subject:r,...A,fixCmd:`kane-cli maintain evolve ${n}`},l,a=>({ok:a.outcome==="evolved",exitCode:a.code})),S={out:()=>{},err:()=>{},isTTY:!1,confirm:async()=>!0},u={applied:0,committed:0,retired:0,skipped:0,deferred:0,failed:0},w=new Map;for(let r of t.planRows)if(r.held_ref&&t.held){let n=t.held.rows.find(a=>a.temp_ref===r.held_ref);if(!n)continue;let l={kind:n.kind,ref:n.temp_ref,title:n.title,why:n.why,origin:"content-change",...r.impact?{impact:r.impact}:{}};w.set(l.ref,{card:l,source:"held",heldRef:n.temp_ref})}else if(r.kind==="MODIFY"){let n={kind:"MODIFY",ref:r.ref,title:r.ref,why:`${r.reason}: ${r.provenance}`,origin:r.origin??"structural-stale",...r.impact?{impact:r.impact}:{}};w.set(n.ref,{card:n,source:"row",row:r})}else if(r.kind==="ADD"){let n={kind:"ADD",ref:r.ref,title:r.ref,why:r.reason,origin:r.origin??"content-change"};w.set(n.ref,{card:n,source:"row",row:r})}for(let r of t.archive){if(r.kind!=="ARCHIVE")continue;let n={kind:"ARCHIVE",ref:r.ref,title:r.ref,why:r.why,provenance:r.why,...r.impact?{impact:r.impact}:{}};w.set(n.ref,{card:n,source:"archive",row:r})}for(let r of t.reviewFeeder?.()??[]){if(w.has(r.ref))continue;let n={kind:r.kind==="MODIFY_HELD"?"MODIFY":r.kind,ref:r.ref,title:r.title,why:r.why,...r.impact?{impact:r.impact}:{},...r.pair?{pair:r.pair}:{},...r.held?{held:!0}:{},...r.kind==="MODIFY_HELD"?{heldPayload:!0}:{}};w.set(n.ref,{card:n,source:"review",reviewCard:r})}let y=r=>(u.failed++,{outcome:"failed",detail:r});return{cards:()=>[...w.values()].map(r=>r.card),async submit(r,n){let l=w.get(r);if(!l)return y(`no card ${r}`);if(l.source==="review"){if(l.reviewCard.kind==="PAIR"&&n.v==="approve")return y(`${r} is a PAIR card \u2014 approve is not in its grammar (merge / keep both / defer); words ride a defer note`);let{submitReview:s}=await import("./verdicts-ZXXBKTOZ.js"),b=n.v==="approve"?{v:"approve"}:n.v==="archive"?{v:"archive",because:n.because??""}:n.v==="skip"&&l.reviewCard.kind==="MODIFY_HELD"?{v:"keep_current"}:n.v==="defer"||n.v==="skip"?{v:"defer"}:n.v==="merge"?{v:"merge"}:{v:"keep_both"},g=await s({contextDir:t.contextDir,signals:o=>t.signals({ref:o.ref,verdict:o.verdict,...o.reason?{reason:o.reason}:{}})},l.reviewCard,b,v);return g.outcome==="failed"?(u.failed++,g):g.outcome==="deferred"?(u.deferred++,n.v==="defer"&&n.note?(t.signals({ref:r,verdict:"deferred-with-note",reason:n.note}),{...g,detail:`steering noted: "${n.note}" \u2014 decide ${l.reviewCard.kind==="PAIR"?"merge / keep both":"the verdict"} when it re-offers`}):g):g.outcome==="retired"?(u.retired++,g):g.outcome==="committed"?(u.committed++,g):(u.applied++,g)}if(n.v==="merge"||n.v==="keep_both")return y(`${r} is a ${l.card.kind} card \u2014 ${n.v} applies to review cards only`);if(n.v==="skip")return u.skipped++,t.signals({ref:r,verdict:"gap-dismissed"}),{outcome:"skipped"};if(n.v==="defer")return u.deferred++,n.note?(t.signals({ref:r,verdict:"deferred-with-note",reason:n.note}),{outcome:"deferred",detail:`steering noted: "${n.note}"`}):{outcome:"deferred"};if(n.v==="archive"){if(l.source!=="archive")return y(`${r} is not an ARCHIVE card`);let s=_(t.contextDir),b=s.resolve(l.row.ref);if(b&&s.superseded.has(s.tipOf(b.cid)))return u.skipped++,{outcome:"skipped",detail:"already retired \u2014 nothing to do"};let g=ve(t.contextDir,_(t.contextDir),{ref:l.row.ref,reason:`reconcile retire: ${l.row.why}`,by:v});return g.errors?y(g.errors.map(o=>`${o.code}: ${o.detail}`).join("; ")):(u.retired++,t.signals({ref:r,verdict:"gap-resolved-archive",reason:l.row.why}),{outcome:"retired"})}if(l.source==="archive")return y(`${r} takes archive/skip/defer, not approve`);if(l.source==="held"){let s=ge(t.contextDir,t.held,l.heldRef,v,n.edits);if(!s.ok)return y(s.message);if(s.kind==="ADD"){let b=await M(s.ref,()=>t.runDesign(s.ref,{yes:!0,mode:k,...n.steering?{because:n.steering}:{}}));return b!==0?(u.failed++,{outcome:"failed",landed:!0,detail:`committed ${s.ref}, but its design run exited ${b} \u2014 finish with kane-cli design tests --use-case ${s.ref}`}):(u.applied++,t.signals({ref:r,verdict:"gap-resolved-create",...n.steering?{reason:n.steering}:{}}),{outcome:"applied",detail:s.ref})}if(n.steering){let b=_(t.contextDir),g=ie(b,s.ref);if(!g.ok)return u.committed++,{outcome:"committed",detail:`committed ${s.ref}, but steering could not resolve it (${g.message}) \u2014 steer via kane-cli maintain evolve ${s.ref}`};let o=await P(g.target.display,s.ref,()=>ne(t.contextDir,g.target,{yes:!0,mode:k,because:n.steering},S,t.runDesign,"batch"));if(o.outcome==="no-design"){let c=await M(g.target.seamRef,()=>t.runDesign(g.target.seamRef,{yes:!0,mode:k,because:n.steering}));return c!==0?(u.failed++,{outcome:"failed",landed:!0,detail:`committed ${s.ref}, but its steered design run exited ${c} \u2014 finish with kane-cli design tests --use-case ${g.target.seamRef}`}):(u.applied++,t.signals({ref:r,verdict:"gap-resolved-create",reason:n.steering}),{outcome:"applied",detail:s.ref})}return o.outcome==="failed"||o.outcome==="paused"?(u.failed++,{outcome:"failed",landed:!0,detail:`committed ${s.ref}, but the steering evolve ${o.outcome} (exit ${o.code}) \u2014 finish with kane-cli maintain evolve ${s.ref}`}):o.outcome==="declined"?(u.committed++,{outcome:"committed",detail:`committed ${s.ref} \u2014 the steering evolve was declined; re-run kane-cli maintain evolve ${s.ref}`}):(u.applied++,t.signals({ref:r,verdict:"gap-resolved-evolve",reason:n.steering}),{outcome:"applied",detail:s.ref})}return u.committed++,t.signals({ref:r,verdict:"gap-resolved-evolve"}),{outcome:"committed",detail:s.ref}}let a=_(t.contextDir),d=ie(a,l.row.ref);if(!d.ok)return y(d.message);if(l.card.kind==="ADD"){let s=await M(d.target.seamRef,()=>t.runDesign(d.target.seamRef,{yes:!0,mode:k}));return s!==0?y(`design run exited ${s}`):(u.applied++,t.signals({ref:r,verdict:"gap-resolved-create"}),{outcome:"applied"})}let D=await P(d.target.display,l.row.ref,()=>ne(t.contextDir,d.target,{yes:!0,mode:k,...n.steering?{because:n.steering}:{}},S,t.runDesign,"batch"));return D.outcome==="evolved"?(u.applied++,t.signals({ref:r,verdict:"gap-resolved-evolve",...n.steering?{reason:n.steering}:{}}),{outcome:"applied"}):D.outcome==="failed"||D.outcome==="paused"?y(`evolve ${D.outcome} (exit ${D.code})`):(u.skipped++,{outcome:"skipped",detail:D.outcome})},summary:()=>({...u})}}var j=U(K(),1);function q({mark:t,markColor:v,color:k,indent:A=2,reserve:M=0,children:P}){let{stdout:S}=ae(),u=(S?.columns??80)-M,w=A+t.length+1;return(0,j.jsxs)(F,{children:[(0,j.jsx)(F,{width:w,flexShrink:0,children:(0,j.jsx)(x,{color:v,children:`${" ".repeat(A)}${t}`})}),(0,j.jsx)(F,{width:Math.max(20,u-w),children:(0,j.jsx)(x,{color:k,children:P})})]})}var p=U(K(),1);function be(t){return t.landed?"committed":t.outcome}var We={applied:{mark:"\u2714",color:"green"},committed:{mark:"\u2714",color:"green"},retired:{mark:"\u2714",color:"green"},skipped:{mark:"\xB7",color:"dim"},deferred:{mark:"\u2013",color:"dim"},failed:{mark:"\u2717",color:"red"}};function Ae(t){return t.v==="archive"?"Retiring\u2026":t.v==="approve"&&t.steering?"Approving with your changes \u2014 committing, then re-designing\u2026":"Applying \u2014 committing\u2026"}function Pe({controller:t,cards:v,note:k,markOutcome:A,routeChat:M,listEvolveTargets:P,barSubject:S,meta:u,resumeCmd:w,activeChild:y,onFinish:r,onCtrlC:n,pauseRef:l}){let[a,d]=(0,R.useState)(v.length>0?{at:"card",idx:0,sel:0,editor:null}:{at:"done-panel",sel:0}),D=(0,R.useRef)(0),s=(0,R.useRef)(a);s.current=a;let b=(0,R.useRef)([]),[,g]=(0,R.useState)(0),o=a.at==="busy"||a.at==="evolving";(0,R.useEffect)(()=>{if(!o)return;let e=setInterval(()=>g(i=>i+1),120);return()=>clearInterval(e)},[o]);let c=()=>{let e=t.summary();return`${e.applied+e.committed} applied \xB7 ${e.retired} retired \xB7 ${e.skipped} skipped \xB7 ${e.deferred} deferred`+(e.failed>0?` \xB7 ${e.failed} failed`:"")},E=()=>({state:"complete",facts:[c()]}),C=()=>({state:"walk-paused",reason:"ctrl+c",facts:[c(),"every verdict so far is committed \u2014 re-run the same reconcile command to continue"],...w?{resume:w}:{}}),$=()=>r(D.current,E()),T=(0,R.useRef)(!1),W=()=>{r(3,C())},I=()=>{if(T.current)return;T.current=!0;let e=s.current;if(e.at==="busy"||e.at==="evolving"){k((0,p.jsx)(x,{color:h.dim,children:"finishing the current item, then pausing\u2026"}));return}if(e.at==="done-panel"||e.at==="picker"||e.at==="why"||e.at==="view"){$();return}W()};l&&(l.current=I);let V=a.at==="card"||a.at==="busy"?v[a.idx]:null,O=()=>[{key:"finish",label:"finish"},...P?[{key:"evolve",label:"evolve another use-case\u2026"}]:[],...b.current.length>0?[{key:"view",label:"view what changed"}]:[]],H=()=>{let e=P?.()??[];if(e.length===0){k((0,p.jsx)(x,{color:h.dim,children:"nothing is stale \u2014 no evolve targets right now"})),d({at:"done-panel",sel:0});return}d({at:"picker",items:e,sel:0})},we=e=>{let i=e+1;i<v.length?d({at:"card",idx:i,sel:0,editor:null}):d({at:"done-panel",sel:0})},X=(0,R.useRef)(!1),L=(e,i)=>{if(X.current)return;X.current=!0;let m=v[e];d({at:"busy",idx:e,label:Ae(i),startedAt:Date.now()}),t.submit(m.ref,i).catch(f=>({outcome:"failed",detail:f instanceof Error?f.message:String(f)})).then(f=>{let B=We[f.outcome]??{mark:"\xB7",color:"dim"},Te=f.outcome!=="failed"&&f.outcome!=="skipped"&&f.outcome!=="deferred"&&m.impact&&"stale_refs"in m.impact&&m.impact.stale_refs.length>0?` \xB7 ${m.impact.stale_refs.length} item(s) now stale`:"",oe=`${f.outcome} [${m.kind}] ${Y(m.title)}${f.detail?` \u2014 ${Y(f.detail)}`:""}${Te}`;if(b.current.push({mark:B.mark,color:B.color,line:oe}),k((0,p.jsx)(q,{mark:B.mark,markColor:B.color==="green"?h.green:B.color==="red"?h.red:h.dim,color:B.color==="dim"?h.dim:void 0,children:oe})),f.outcome==="failed"&&(D.current=D.current===0?1:D.current),A(m.ref,be(f)),X.current=!1,T.current){W();return}we(e)})},ye=(e,i)=>{d({at:"evolving",title:e.title,startedAt:Date.now()}),M(`${e.key} ${i}`).catch(m=>`\u2717 evolve failed: ${m instanceof Error?m.message:String(m)}`).then(m=>{let f=m.startsWith("\u2713");if(b.current.push({mark:f?"\u2714":"\u2717",color:f?"green":"red",line:m.replace(/^[✓✗]\s*/,"")}),k((0,p.jsx)(q,{mark:f?"\u2714":"\u2717",markColor:f?h.green:h.red,children:m.replace(/^[✓✗]\s*/,"")})),T.current){$();return}d({at:"done-panel",sel:0})})},xe=(0,R.useMemo)(()=>({isFocused:()=>{let e=s.current;return e.at==="card"&&e.editor===null||e.at==="done-panel"||e.at==="picker"||e.at==="view"},onMove:e=>{d(i=>{if(i.at==="card"){let m=v[i.idx],f=G(m)??N(m).length-1;return{...i,sel:Math.max(0,Math.min(f,i.sel+e))}}return i.at==="done-panel"?{...i,sel:Math.max(0,Math.min(O().length-1,i.sel+e))}:i.at==="picker"?{...i,sel:Math.max(0,Math.min(i.items.length-1,i.sel+e))}:i})},onSelect:()=>{let e=s.current;if(e.at==="card"){let i=v[e.idx],m=G(i);if(m!==null&&e.sel===m){d({...e,editor:"",editorIntent:"steer"});return}let f=N(i)[e.sel];if(f?.v==="archive"&&i.kind==="REVIEW"){d({...e,editor:"",editorIntent:"because"});return}f&&L(e.idx,{v:f.v});return}if(e.at==="done-panel"){let i=O()[e.sel];i?.key==="finish"?$():i?.key==="evolve"?H():i?.key==="view"&&d({at:"view"});return}if(e.at==="picker"){let i=e.items[e.sel];i&&d({at:"why",item:i,text:""});return}},onDigit:e=>{let i=s.current;if(i.at==="card"){let m=v[i.idx],f=N(m)[e-1];if(f?.v==="archive"&&m.kind==="REVIEW"){d({...i,editor:"",editorIntent:"because"});return}f&&L(i.idx,{v:f.v});return}i.at==="done-panel"&&e-1<O().length&&d({...i,sel:e-1}),i.at==="picker"&&e-1<i.items.length&&d({...i,sel:e-1})},onType:e=>{d(i=>i.at!=="card"||G(v[i.idx])===null?i:{...i,editor:(i.editor??"")+e,editorIntent:i.editorIntent??"steer"})},isMulti:()=>!1,onSpace:()=>{},onBack:()=>{let e=s.current;(e.at==="picker"||e.at==="view")&&d({at:"done-panel",sel:0})}}),[v]);(0,R.useEffect)(()=>{a.at==="done"&&$()},[a.at]);let Ce=e=>Math.floor((Date.now()-e)/1e3),z=y?.current??null,$e=a.at==="card"?{kind:"card",n:a.idx+1,m:v.length}:a.at==="busy"?z?{kind:"child-working",step:re(a.label)}:{kind:"working",step:re(a.label),elapsedS:Ce(a.startedAt)}:a.at==="evolving"?{kind:"child-working",step:`evolving ${a.title}`}:{kind:"idle"},Re=a.at==="card"||a.at==="busy"?v.length-a.idx:0,Ee=a.at==="done-panel"||a.at==="picker"||a.at==="why"||a.at==="view",De=[...a.at==="card"?a.editor!==null?["\u23CE submit","esc back"]:fe(v[a.idx]).keys:a.at==="done-panel"?me(O(),{escBack:!1}).keys:a.at==="picker"?["\u2191\u2193 select","\u23CE confirm","esc back"]:a.at==="why"?["\u23CE submit","esc back"]:a.at==="view"?["esc back"]:[],"ctrl+c exit"],J=u??{verb:"reconcile",sid:"",env:""},Se=`view \xB7 this run's changes \xB7 ${b.current.length}`;return(0,p.jsxs)(F,{flexDirection:"column",children:[(0,p.jsx)(le,{onToggleThinking:()=>{},onCtrlC:()=>{n(),I()},panel:xe}),a.at==="card"&&V?(0,p.jsx)(de,{card:V,position:{n:a.idx+1,of:v.length},sel:a.sel,focused:a.editor===null,editorIntent:a.editorIntent??"steer",freeText:a.editor!==null?{value:a.editor,onChange:e=>d(i=>i.at==="card"?{...i,editor:e}:i),onSubmit:e=>{let i=s.current;if(i.at!=="card")return;let m=e.trim();if(!m){d({...i,editor:null,editorIntent:void 0});return}let f=v[i.idx];i.editorIntent==="because"?L(i.idx,{v:"archive",because:m}):f.kind==="PAIR"?L(i.idx,{v:"defer",note:m}):L(i.idx,{v:"approve",steering:m})},onCancel:()=>d(e=>e.at==="card"?{...e,editor:null,editorIntent:void 0}:e)}:null}):null,a.at==="done-panel"?(0,p.jsx)(Q,{headline:(()=>{let e=t.summary();return`reconcile done \u2014 ${e.applied+e.committed} applied \xB7 ${e.retired} retired \xB7 ${e.skipped} skipped \xB7 ${e.deferred} deferred${e.failed>0?` \xB7 ${e.failed} failed`:""}`})(),rows:O(),sel:a.sel,focused:!0}):null,a.at==="picker"?(0,p.jsx)(Q,{ask:!0,headline:"evolve which use-case?",rows:a.items.map(e=>({key:e.key,label:e.title,detail:e.badge})),sel:a.sel,focused:!0}):null,a.at==="why"?(0,p.jsxs)(F,{flexDirection:"column",borderStyle:"round",borderColor:h.assuranceAccent,paddingX:1,children:[(0,p.jsxs)(F,{children:[(0,p.jsxs)(x,{children:[(0,p.jsx)(x,{color:h.assuranceAccent,children:"\u25B8"})," ",(0,p.jsx)(x,{color:h.dim,children:"\u270E "})]}),(0,p.jsx)(se,{value:a.text,onChange:e=>d(i=>i.at==="why"?{...i,text:e}:i),onSubmit:e=>{let i=s.current;i.at==="why"&&(e.trim()?ye(i.item,e.trim()):d({at:"picker",items:[i.item],sel:0}))},onCancel:()=>{s.current.at==="why"&&H()},placeholder:`what should change about ${a.item.title}?`})]}),(0,p.jsx)(x,{color:h.muted,children:" \u23CE submit \xB7 esc back"})]}):null,a.at==="view"?(0,p.jsxs)(F,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,p.jsx)(x,{bold:!0,color:h.assuranceAccent,children:Se}),(0,p.jsx)(x,{children:" "}),b.current.map((e,i)=>(0,p.jsx)(q,{mark:e.mark,markColor:e.color==="green"?h.green:e.color==="red"?h.red:h.dim,color:e.color==="dim"?h.dim:void 0,indent:0,reserve:0,children:e.line},`vc-${i}`))]}):null,(0,p.jsx)(ce,{status:$e,meta:{...J,...S??J.subject?{subject:S??J.subject}:{}},tallies:ue(t.summary(),Re),keys:De,child:a.at==="evolving"?{verb:"evolve"}:z?{verb:z.verb}:void 0})]})}async function at(t){let v={current:null},k=o=>{v.current?.append(o)},A=null,M=async(o,c)=>{let[{runDesign:E},{resolveAgentAuthEnv:C},{runAgent:$},{preflightTurn:T}]=await Promise.all([import("./run-MUVZVTTC.js"),import("./spawner-H6IDWY5U.js"),import("./bridge-E2NGMJYM.js"),import("./turn-preflight-JGYT7LXP.js")]);A??=await C();let W=A;return E({useCase:o,force:!0,mode:c.mode??"override",...c.because?{because:c.because}:{},...c.changeDelta!==void 0?{changeDelta:c.changeDelta}:{},...c.priorDesign!==void 0?{priorDesign:c.priorDesign}:{}},{contextDir:t.dir,agent:$,preflightTurn:()=>T(W),ask:async()=>[],out:()=>{},progress:()=>{},isTTY:!1,auth:W})},P=t.runDesign??M,S={current:null},u="",w=o=>{if(o.kind==="start")S.current={verb:o.verb},u=o.subject,k((0,p.jsxs)(x,{color:h.assuranceAccent,children:[`\u25CF ${te(o.verb).ing} ${Y(o.subject)}`,o.note?(0,p.jsx)(x,{color:h.dim,children:` ${o.note}`}):null]}));else if(o.kind==="end"){let c=S.current?.verb??"design";S.current=null,k(o.ok?(0,p.jsx)(x,{color:h.green,children:`\u25CF ${te(c).ed} ${Y(u)} \u2014 ${o.durS}s`}):(0,p.jsx)(x,{color:h.red,children:`\u25CF ${c} failed \u2014 ${o.exitCode!=null?`exited ${o.exitCode}`:"error"}${o.fixCmd?` \xB7 ${o.fixCmd}`:""}`}))}},y=ke({contextDir:t.dir,held:t.held,archive:t.archive,planRows:t.rows,runDesign:P,mode:"interactive",signals:t.signals,onChild:w,reviewFeeder:()=>{try{return he({contextDir:t.dir},_(t.dir))}catch{return[]}}}),r=new Set(t.rows.filter(o=>o.applied!==void 0).map(o=>o.held_ref??o.ref)),n=y.cards().filter(o=>!r.has(o.ref)&&!(o.kind==="ARCHIVE"&&t.archiveState?.[o.ref]!==void 0)),l=o=>t.rows.findIndex(c=>(c.held_ref??c.ref)===o),a=(o,c)=>{try{if(n.find($=>$.ref===o)?.kind==="ARCHIVE"){c==="retired"?t.markA?.(o,"retired"):c==="skipped"&&t.markA?.(o,"skipped");return}let C=l(o);if(C<0)return;c==="applied"||c==="committed"?t.mark?.(C,"approved"):c==="skipped"&&t.mark?.(C,"skipped")}catch{}},d=async o=>{let[{openGraph:c},{resolveParentUc:E,evolveOneUc:C}]=await Promise.all([import("./readmodel-IBFRM6EO.js"),import("./evolve-cmd-CEYGGIWA.js")]),[$,...T]=o.split(/\s+/),W=c(t.dir),I=E(W,$);if(!I.ok)return`couldn't resolve '${$}' \u2014 start with a use-case id (uc-\u2026): ${I.message}`;if(T.length===0)return`say what to change: \`${$} <your words>\` \u2014 the words become the redesign's change delta`;let V=T.join(" "),O={out:()=>{},err:()=>{},isTTY:!1,confirm:async()=>!0},H=await C(t.dir,I.target,{yes:!0,mode:"override",because:V},O,P,"batch");return H.outcome==="evolved"?(t.signals({ref:I.target.display,verdict:"gap-resolved-evolve",reason:V}),`\u2713 redesigned ${I.target.display} \u2014 "${V}"`):`\u2717 evolve ${H.outcome} for ${I.target.display} (exit ${H.code})`},D=t.listEvolveTargets??(()=>{let o=_(t.dir);return pe(o).targets.map(c=>({key:c.display,title:c.display,badge:"stale"}))});if(t.script){let o=0;for(let c of n){let E=await t.script(c),C=await y.submit(c.ref,E);C.outcome==="failed"&&o===0&&(o=1),a(c.ref,be(C))}return o}let[{render:s},{ScrollbackProvider:b},{ScrollbackTap:g}]=await Promise.all([import("./build-JIKYOZUH.js"),import("./scrollback-JLPJR25X.js"),import("./ScrollbackTap-QHJOFYMC.js")]);return new Promise(o=>{let c=!1,E=(V,O)=>{c||(c=!0,(async()=>{process.removeListener("SIGINT",W),await v.current?.flush();try{I.unmount()}catch{}O&&Z(O),o(V)})())},C=0,$={current:null},T=()=>{if(C+=1,C>=2){if(c)return;c=!0,process.removeListener("SIGINT",W);try{I.unmount()}catch{}Z({state:"interrupted",reason:"ctrl+c \xD72",facts:["forced quit \u2014 every committed verdict is safe in the store"]}),o(130)}},W=()=>{T(),$.current?.()};process.on("SIGINT",W);let I=s((0,p.jsxs)(b,{children:[(0,p.jsx)(g,{into:v}),(0,p.jsx)(Pe,{controller:y,cards:n,note:k,markOutcome:a,routeChat:d,listEvolveTargets:D,barSubject:t.barSubject,meta:t.meta,resumeCmd:t.resumeCmd,activeChild:S,onFinish:E,onCtrlC:T,pauseRef:$})]}),{exitOnCtrlC:!1})})}export{Pe as WalkSessionSurface,be as outcomeToMark,at as runWalkSession};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-3D5MKSG3.js";import"./chunk-H6TNBKGR.js";import"./chunk-KUS324VE.js";import"./chunk-4PMZ5FCD.js";import"./chunk-KBM3XHAM.js";import"./chunk-2YEHV2CX.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-HYTBEPC2.js";import"./chunk-UR6MHSHU.js";export{a as withTelemetry};
2
+ import{a}from"./chunk-4PWYSDZR.js";import"./chunk-H6TNBKGR.js";import"./chunk-7XMDCGIZ.js";import"./chunk-4PMZ5FCD.js";import"./chunk-KBM3XHAM.js";import"./chunk-2YEHV2CX.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-F2XTOZTN.js";import"./chunk-UR6MHSHU.js";export{a as withTelemetry};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testmuai/kane-cli",
3
- "version": "0.8.15",
3
+ "version": "0.8.16",
4
4
  "description": "KaneAI Terminal UI — browser automation testing agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,16 +33,16 @@
33
33
  "ws": "^8.20.0"
34
34
  },
35
35
  "optionalDependencies": {
36
- "@testmuai/kane-cli-assurance-darwin-arm64": "0.8.15",
37
- "@testmuai/kane-cli-assurance-darwin-x64": "0.8.15",
38
- "@testmuai/kane-cli-assurance-linux-arm64": "0.8.15",
39
- "@testmuai/kane-cli-assurance-linux-x64": "0.8.15",
40
- "@testmuai/kane-cli-assurance-win-x64": "0.8.15",
41
- "@testmuai/kane-cli-darwin-arm64": "0.8.15",
42
- "@testmuai/kane-cli-darwin-x64": "0.8.15",
43
- "@testmuai/kane-cli-linux-x64": "0.8.15",
44
- "@testmuai/kane-cli-linux-arm64": "0.8.15",
45
- "@testmuai/kane-cli-win-x64": "0.8.15",
36
+ "@testmuai/kane-cli-assurance-darwin-arm64": "0.8.16",
37
+ "@testmuai/kane-cli-assurance-darwin-x64": "0.8.16",
38
+ "@testmuai/kane-cli-assurance-linux-arm64": "0.8.16",
39
+ "@testmuai/kane-cli-assurance-linux-x64": "0.8.16",
40
+ "@testmuai/kane-cli-assurance-win-x64": "0.8.16",
41
+ "@testmuai/kane-cli-darwin-arm64": "0.8.16",
42
+ "@testmuai/kane-cli-darwin-x64": "0.8.16",
43
+ "@testmuai/kane-cli-linux-x64": "0.8.16",
44
+ "@testmuai/kane-cli-linux-arm64": "0.8.16",
45
+ "@testmuai/kane-cli-win-x64": "0.8.16",
46
46
  "@testmuai/kane-cli-node-darwin-arm64": "24.18.0",
47
47
  "@testmuai/kane-cli-node-darwin-x64": "24.18.0",
48
48
  "@testmuai/kane-cli-node-linux-x64": "24.18.0",
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-OWGFFJKK.js";import"./chunk-YCCUBQY4.js";import"./chunk-TVELOH5A.js";import"./chunk-BPMSNGXQ.js";import"./chunk-YKYKOV6U.js";import"./chunk-EPE2ELDH.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-HYTBEPC2.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-JGAMMOUC.js";import"./chunk-AYJ2YZP5.js";import"./chunk-YAAQER2L.js";import"./chunk-JSS22MFY.js";import"./chunk-27ERHOW3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-TDPWFYTJ.js";import"./chunk-MLYNVJNH.js";import"./chunk-SHSXOYKT.js";import"./chunk-Z73ZYROU.js";import"./chunk-OWGFFJKK.js";import"./chunk-YCCUBQY4.js";import"./chunk-TVELOH5A.js";import"./chunk-BPMSNGXQ.js";import"./chunk-VE3SUJMA.js";import"./chunk-TZXXJWHA.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-IAHOLH5W.js";import"./chunk-TAOHYWEO.js";import"./chunk-YKYKOV6U.js";import"./chunk-Z7S3IWUX.js";import"./chunk-TEHZUSUY.js";import"./chunk-EPE2ELDH.js";import"./chunk-DHJSM5DT.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-NWNG5UWD.js";import"./chunk-HYTBEPC2.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SingleShotApp};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{g as a}from"./chunk-JCMHB4KH.js";import"./chunk-Z3YYMZHT.js";import"./chunk-JL3L6KOG.js";import"./chunk-5HTSKF5K.js";import"./chunk-5Y2G4NC7.js";import"./chunk-P7YZ3PU3.js";import"./chunk-TDPWFYTJ.js";import"./chunk-MLYNVJNH.js";import"./chunk-A557OSRS.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-6GLFQHSW.js";import"./chunk-MSGW4JDG.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-EPE2ELDH.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-YGMUNNKH.js";import"./chunk-XXE7W5AV.js";import"./chunk-HYTBEPC2.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}from"./chunk-LJGAXIDU.js";import"./chunk-GZ65ZA4C.js";import"./chunk-DMT3W26F.js";import"./chunk-UD7KKHPW.js";import"./chunk-HYTBEPC2.js";import"./chunk-UR6MHSHU.js";export{a as runAgent};