@testmuai/kane-cli 0.8.3 → 0.8.4
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.
- package/dist/{ChatSurface-FJSO3IKR.js → ChatSurface-H26E7DM6.js} +1 -1
- package/dist/{ChromeProfilePicker-NTZ2RN3L.js → ChromeProfilePicker-USUPENU2.js} +1 -1
- package/dist/{CliFeedbackPrompt-BCHUH24C.js → CliFeedbackPrompt-ZIAZ2M2U.js} +1 -1
- package/dist/{CliUploadProgress-QVAJJRUW.js → CliUploadProgress-LEOJTXHT.js} +1 -1
- package/dist/{ConfigView-LAKAQN7O.js → ConfigView-JBIQPG7O.js} +1 -1
- package/dist/EvidenceViewOffer-IWQ6Q2CI.js +2 -0
- package/dist/FolderPicker-G4DT3OEZ.js +2 -0
- package/dist/{HelpView-JFFVHQAW.js → HelpView-I27LWSL5.js} +1 -1
- package/dist/{InfoBox-46C7AHDE.js → InfoBox-ORHNXPET.js} +1 -1
- package/dist/{LinksBox-KFJXZDUJ.js → LinksBox-6SKDUB5T.js} +1 -1
- package/dist/{ProfilesView-FV3KFVBX.js → ProfilesView-Y5GTLDJY.js} +1 -1
- package/dist/{ProjectPicker-MCH35VEF.js → ProjectPicker-WDCMKWNQ.js} +1 -1
- package/dist/{SaveSessionPrompt-RXHP3YW6.js → SaveSessionPrompt-I4KLFESC.js} +1 -1
- package/dist/SingleShotApp-Y77CNTSO.js +2 -0
- package/dist/{SummaryBox-33K2MMUW.js → SummaryBox-QWKW5FHK.js} +1 -1
- package/dist/TestMdRunView-PPM6LD3I.js +2 -0
- package/dist/TestrunEvidenceTable-ENJJ2GIW.js +2 -0
- package/dist/{WhoamiView-HUPBB5AQ.js → WhoamiView-H6M536AY.js} +1 -1
- package/dist/{app-download-3O7NJNGG.js → app-download-PSRQWDVW.js} +1 -1
- package/dist/{auth-OMWFVDL2.js → auth-JVH2EHK2.js} +1 -1
- package/dist/binary-YTQJP2FG.js +2 -0
- package/dist/{bind-NXXKFJMA.js → bind-OUXCFLSE.js} +2 -2
- package/dist/{bootstrap-MMRPAHWE.js → bootstrap-3NEI7O6I.js} +1 -1
- package/dist/bridge-AFQTFWCU.js +2 -0
- package/dist/{changelog-VZ5HFHYM.js → changelog-WDKG4WCV.js} +1 -1
- package/dist/chunk-2HT3RYKJ.js +2 -0
- package/dist/chunk-2PH43Z3P.js +69 -0
- package/dist/{chunk-NWJOPZ7P.js → chunk-35L2QXWP.js} +2 -2
- package/dist/{chunk-IFIXY3YG.js → chunk-3JLWPEQW.js} +1 -1
- package/dist/{chunk-IWWQTXGK.js → chunk-4CHO7SAT.js} +1 -1
- package/dist/{chunk-YJNGBZ42.js → chunk-52GWEKFD.js} +1 -1
- package/dist/chunk-55NSNWM5.js +26 -0
- package/dist/{chunk-CJJXT5DO.js → chunk-5GUD3CIH.js} +1 -1
- package/dist/{chunk-KZVEFBH5.js → chunk-5HYXTFGB.js} +1 -1
- package/dist/{chunk-IEOHAHZO.js → chunk-62WYSEAT.js} +1 -1
- package/dist/{chunk-AVH3BEEU.js → chunk-66RJPH73.js} +1 -1
- package/dist/chunk-6CR2HTIM.js +7 -0
- package/dist/{chunk-QJTXNQV5.js → chunk-7HPEHQHH.js} +1 -1
- package/dist/chunk-7HXZZ3VA.js +19 -0
- package/dist/{chunk-LP3BSP74.js → chunk-7LP4X25A.js} +1 -1
- package/dist/{chunk-SA2LQSYP.js → chunk-7VTYRTEJ.js} +1 -1
- package/dist/{chunk-UBTNWAKK.js → chunk-A3PGLDQY.js} +1 -1
- package/dist/{chunk-5CKQTZMG.js → chunk-A4XJUWAQ.js} +1 -1
- package/dist/{chunk-EBJD2V4Z.js → chunk-A6TJUSOS.js} +1 -1
- package/dist/{chunk-KOMKHFC4.js → chunk-BCCWICSS.js} +1 -1
- package/dist/{chunk-CJP7RX3E.js → chunk-BDUCWZYO.js} +1 -1
- package/dist/{chunk-2ZDXNTZT.js → chunk-BGMI5PH4.js} +1 -1
- package/dist/{chunk-DSXSU5MH.js → chunk-BSCMUMSV.js} +4 -4
- package/dist/{chunk-DVYO4CR2.js → chunk-BWSL2KQQ.js} +1 -1
- package/dist/{chunk-4G4RWARU.js → chunk-BXRZGISN.js} +1 -1
- package/dist/{chunk-VK3NU742.js → chunk-DEZ7CXGM.js} +1 -1
- package/dist/{chunk-GR35ZFM2.js → chunk-DWWAIXVZ.js} +2 -2
- package/dist/{chunk-NNCMMV6P.js → chunk-DXJKMZEC.js} +29 -23
- package/dist/{chunk-5BVOF4UW.js → chunk-DYGUHGZ6.js} +1 -1
- package/dist/{chunk-TUTDSX7T.js → chunk-DZJQNL66.js} +1 -1
- package/dist/{chunk-RUCSRS4C.js → chunk-EQSE6NIB.js} +1 -1
- package/dist/{chunk-7YZMUTJA.js → chunk-GJED4QGF.js} +1 -1
- package/dist/chunk-GSYJUHRK.js +2 -0
- package/dist/{chunk-LNQCZ5DS.js → chunk-HHHNQW5Z.js} +1 -1
- package/dist/{chunk-ZNNRCUHH.js → chunk-HXSEA7JS.js} +1 -1
- package/dist/chunk-IXTFWIQ6.js +2 -0
- package/dist/{chunk-4FQI643D.js → chunk-J27JJWMT.js} +1 -1
- package/dist/{chunk-SPQPOUUR.js → chunk-JCILRPOM.js} +2 -2
- package/dist/chunk-JR46A564.js +2 -0
- package/dist/{chunk-IHAHCFFG.js → chunk-JRADU3PO.js} +1 -1
- package/dist/{chunk-CVCVBQP6.js → chunk-JT7I6OST.js} +1 -1
- package/dist/{chunk-DJR3M7XO.js → chunk-KAMJ7U4M.js} +1 -1
- package/dist/{chunk-3MFTTLOF.js → chunk-KUYJ6FEN.js} +1 -1
- package/dist/{chunk-AF572MQG.js → chunk-L4EDLDLZ.js} +3 -3
- package/dist/{chunk-KGSVOTLG.js → chunk-L77ZOU4N.js} +1 -1
- package/dist/{chunk-ZH64GOBG.js → chunk-N5JHMCRU.js} +1 -1
- package/dist/{chunk-LSZVSYAP.js → chunk-N7N222VC.js} +2 -2
- package/dist/{chunk-XO45NGSN.js → chunk-NDAAY2RL.js} +1 -1
- package/dist/{chunk-NVGM5ISX.js → chunk-NEAMQMYH.js} +1 -1
- package/dist/chunk-NEHX45NQ.js +15 -0
- package/dist/{chunk-IVYXXZEE.js → chunk-OSB32HJE.js} +1 -1
- package/dist/chunk-OVLCJ2VX.js +37 -0
- package/dist/{chunk-6IA6QMPH.js → chunk-P7YZ3PU3.js} +1 -1
- package/dist/{chunk-D6FYCAIA.js → chunk-PH22FRN5.js} +1 -1
- package/dist/{chunk-JANVTG62.js → chunk-PQWSHTSH.js} +1 -1
- package/dist/{chunk-TRVB7RSW.js → chunk-PRLTUEKP.js} +1 -1
- package/dist/{chunk-LCU2P3CH.js → chunk-PSWB3BWQ.js} +1 -1
- package/dist/{chunk-CDB3SYZG.js → chunk-PWFZZWYU.js} +1 -1
- package/dist/{chunk-3S5DDQLP.js → chunk-QBF5FJVL.js} +1 -1
- package/dist/{chunk-DOG7S7R6.js → chunk-QDIZQ3ZF.js} +1 -1
- package/dist/{chunk-FPAJURPL.js → chunk-QWDFFEEJ.js} +1 -1
- package/dist/{chunk-WMMJXI5O.js → chunk-RN3YHD4S.js} +1 -1
- package/dist/{chunk-WCF2Z4SE.js → chunk-SFXQFUM6.js} +1 -1
- package/dist/{chunk-XMYCRE5K.js → chunk-SIH6JG7S.js} +3 -3
- package/dist/{chunk-ITTZYA2G.js → chunk-TXH2KG7U.js} +1 -1
- package/dist/{chunk-NXXJ56QA.js → chunk-TYI4MLFJ.js} +1 -1
- package/dist/{chunk-DN42IM2Z.js → chunk-U55NUF4E.js} +2 -2
- package/dist/chunk-ULGZPRKU.js +2 -0
- package/dist/{chunk-BRIEBB2U.js → chunk-UOMRMCMI.js} +1 -1
- package/dist/{chunk-2ERQYYSJ.js → chunk-UONRTWLU.js} +1 -1
- package/dist/{chunk-2N4SZOWN.js → chunk-UTIGOLON.js} +1 -1
- package/dist/chunk-V444REBC.js +11 -0
- package/dist/chunk-VBCIDWSK.js +2 -0
- package/dist/{chunk-37ZWKLEN.js → chunk-VYYTENPY.js} +1 -1
- package/dist/{chunk-L5LI2JF4.js → chunk-VZ7KXRXB.js} +11 -11
- package/dist/{chunk-SQDKYSWT.js → chunk-W75AVBFG.js} +1 -1
- package/dist/{chunk-5OVEBP4D.js → chunk-XHNPNYJP.js} +1 -1
- package/dist/{chunk-6G5YKTVN.js → chunk-YB73T7QH.js} +1 -1
- package/dist/{chunk-APETOVZK.js → chunk-YBX2SQ5R.js} +1 -1
- package/dist/{chunk-HJ6AXOCR.js → chunk-ZI6W65E3.js} +1 -1
- package/dist/{chunk-GIQURCTO.js → chunk-ZK57J37M.js} +1 -1
- package/dist/{chunk-KHU7C6EE.js → chunk-ZKSN2SJ7.js} +1 -1
- package/dist/{chunk-ZPDM6FO7.js → chunk-ZSXDZI56.js} +2 -2
- package/dist/{config-OTUKOTHM.js → config-SFM45WCV.js} +1 -1
- package/dist/cover-cmd-7JILZJUK.js +3 -0
- package/dist/{credentials-A3RU25MJ.js → credentials-3CENDBPH.js} +1 -1
- package/dist/{deps-bundle-RIBEQC2R.js → deps-bundle-P37ZJDXC.js} +1 -1
- package/dist/{deps-resolve-7SWSUDRX.js → deps-resolve-VSICFRWU.js} +1 -1
- package/dist/{dispatch-RHSWJJLC.js → dispatch-HDGQAEWN.js} +1 -1
- package/dist/doctor-CPMWU5TL.js +2 -0
- package/dist/evidence-ABYJOIV2.js +2 -0
- package/dist/evidence-presentation-XF23B7F2.js +2 -0
- package/dist/{evolve-cmd-FFF3F3HO.js → evolve-cmd-MROTNJIV.js} +1 -1
- package/dist/{explain-cmd-3GEKR7O5.js → explain-cmd-2TKO7GRW.js} +1 -1
- package/dist/{extract-bind-VIPNGK2H.js → extract-bind-LBZMEDUK.js} +2 -2
- package/dist/{extract-cmd-5J47Q4XU.js → extract-cmd-K4KBPMB7.js} +1 -1
- package/dist/{gaps-cmd-WPCJPLGB.js → gaps-cmd-3ZX3PZF4.js} +1 -1
- package/dist/{generate-headless-AJI2OVRG.js → generate-headless-EBMWSLTR.js} +2 -2
- package/dist/index.js +147 -85
- package/dist/{ingest-cmd-2LK7DWDW.js → ingest-cmd-ULEWNGCI.js} +1 -1
- package/dist/install-YDH2CORO.js +2 -0
- package/dist/{interactive-bind-PI3HY623.js → interactive-bind-IYAJN45L.js} +3 -3
- package/dist/{list-commands-7Y5XV5FK.js → list-commands-YPBJNGCE.js} +1 -1
- package/dist/login-flow-W5SAB7NN.js +2 -0
- package/dist/{mobile-prompts-O5ALU3QU.js → mobile-prompts-LHUYRSV7.js} +1 -1
- package/dist/{persist-recorded-session-TKSU4HOA.js → persist-recorded-session-KCXYXSQG.js} +1 -1
- package/dist/pipeline-ELIXCTFZ.js +2 -0
- package/dist/prepare-target-OU2DQXSW.js +2 -0
- package/dist/{reconcile-cmd-VHEW2DY5.js → reconcile-cmd-TSQDYEUT.js} +1 -1
- package/dist/{reconcile-deps-UJ6KVUIS.js → reconcile-deps-ETMGIQNM.js} +2 -2
- package/dist/{reconcile-engine-NUQJSIFX.js → reconcile-engine-TLFTAOTZ.js} +1 -1
- package/dist/{recording-banner-GO2PP53Y.js → recording-banner-ACOLKL4K.js} +1 -1
- package/dist/{registry-KYPVINS2.js → registry-3Q6PNWCK.js} +1 -1
- package/dist/{require-project-folder-NUQMH224.js → require-project-folder-5KWTJAXN.js} +1 -1
- package/dist/resolve-run-intent-L2I7G55O.js +2 -0
- package/dist/{resolver-HHLYRR5W.js → resolver-NRU6HGTL.js} +1 -1
- package/dist/run-RHLRZCV5.js +2 -0
- package/dist/{run-OPLOL3PZ.js → run-T53Z5TCY.js} +1 -1
- package/dist/{run-test-md-3BA56ZYF.js → run-test-md-JYDYT3XF.js} +2 -2
- package/dist/{skill-installer-O7JYVZXD.js → skill-installer-NWF53JAB.js} +1 -1
- package/dist/{spawner-OZ4OE44T.js → spawner-LKYUMXSO.js} +1 -1
- package/dist/tcg-generate-2PHA7VNL.js +2 -0
- package/dist/{testmd-actions-YJ7O43Z6.js → testmd-actions-CRRUXYOP.js} +1 -1
- package/dist/token-refresh-XKXPM6H3.js +2 -0
- package/dist/{types-6E2HTDKJ.js → types-VYEOJ6U2.js} +1 -1
- package/dist/{validate-basic-HWYK3CU6.js → validate-basic-X2XPEBFD.js} +1 -1
- package/dist/{verdicts-KFPMRADV.js → verdicts-J2SDU4MW.js} +1 -1
- package/dist/{version-check-3ECNG5V2.js → version-check-DAWGRSJ5.js} +1 -1
- package/dist/{walk-session-MZCMXVZB.js → walk-session-D6TCM33V.js} +1 -1
- package/dist/{with-telemetry-Q6V6THIF.js → with-telemetry-RXLIXUMR.js} +1 -1
- package/package.json +11 -11
- package/dist/EvidenceViewOffer-POKUWAPS.js +0 -2
- package/dist/FolderPicker-GR6FZMUJ.js +0 -2
- package/dist/SingleShotApp-BK5QNXGG.js +0 -2
- package/dist/TestMdRunView-AT26LOSG.js +0 -2
- package/dist/bridge-UH32UGR5.js +0 -2
- package/dist/chunk-5NQ3TI4S.js +0 -13
- package/dist/chunk-A5FFLJVL.js +0 -26
- package/dist/chunk-D5VYMHSO.js +0 -2
- package/dist/chunk-DXI5TXNL.js +0 -19
- package/dist/chunk-IOD3HQVW.js +0 -11
- package/dist/chunk-ZUYPPPC5.js +0 -66
- package/dist/cover-cmd-HDZZWJXG.js +0 -3
- package/dist/doctor-XP7YDE3J.js +0 -2
- package/dist/evidence-K7R7OG2K.js +0 -2
- package/dist/login-flow-Z45G34DM.js +0 -2
- package/dist/pipeline-HZUV7IMT.js +0 -2
- package/dist/prepare-target-DBYKQ7HW.js +0 -2
- package/dist/resolve-run-intent-H3HX5KUC.js +0 -7
- package/dist/run-67ONKMGR.js +0 -2
- package/dist/tcg-generate-EG2MXRJ7.js +0 -2
- package/dist/token-refresh-K7CANKFQ.js +0 -2
- /package/dist/{lifecycle-cmd-HO5VL7AM.js → lifecycle-cmd-O2324GN6.js} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-D5VYMHSO.js";import"./chunk-5NQ3TI4S.js";import"./chunk-5DBK6QNS.js";import"./chunk-CJJXT5DO.js";import"./chunk-XWKUZJCP.js";import"./chunk-ZPDM6FO7.js";import"./chunk-EHN5HTUD.js";import"./chunk-NVGBE2DR.js";import"./chunk-CH273NAE.js";import"./chunk-L5LI2JF4.js";import"./chunk-6IA6QMPH.js";import"./chunk-TH47OOBV.js";import"./chunk-VAYBKR76.js";import"./chunk-CUM23TLF.js";import"./chunk-DUAXZYAD.js";import"./chunk-DBIBROYW.js";import"./chunk-WXHQYYD5.js";import"./chunk-IAHKTEET.js";import"./chunk-UD7KKHPW.js";import"./chunk-YJNGBZ42.js";import"./chunk-RFHMDQXZ.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-SPQPOUUR.js";import"./chunk-MSGW4JDG.js";import"./chunk-56PAQAX5.js";import"./chunk-5EOX4MEY.js";import"./chunk-4JOD47QI.js";import"./chunk-CVCVBQP6.js";import"./chunk-RZ4F3BHX.js";import"./chunk-D6FYCAIA.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as EvidenceViewOffer};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-TRVB7RSW.js";import"./chunk-YCCUBQY4.js";import"./chunk-KOMKHFC4.js";import"./chunk-BPMSNGXQ.js";import"./chunk-SA2LQSYP.js";import"./chunk-CVCVBQP6.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-D6FYCAIA.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-6G5YKTVN.js";import"./chunk-IWWQTXGK.js";import"./chunk-KGSVOTLG.js";import"./chunk-2ERQYYSJ.js";import"./chunk-L5LI2JF4.js";import"./chunk-TDPWFYTJ.js";import"./chunk-CJP7RX3E.js";import"./chunk-37ZWKLEN.js";import"./chunk-7YZMUTJA.js";import"./chunk-TRVB7RSW.js";import"./chunk-YCCUBQY4.js";import"./chunk-KOMKHFC4.js";import"./chunk-BPMSNGXQ.js";import"./chunk-VE3SUJMA.js";import"./chunk-TZXXJWHA.js";import"./chunk-56PAQAX5.js";import"./chunk-5EOX4MEY.js";import"./chunk-AVH3BEEU.js";import"./chunk-TAOHYWEO.js";import"./chunk-SA2LQSYP.js";import"./chunk-UBTNWAKK.js";import"./chunk-CVCVBQP6.js";import"./chunk-DPUV6OSP.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-5OVEBP4D.js";import"./chunk-D6FYCAIA.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-DJR3M7XO.js";import"./chunk-IVYXXZEE.js";import"./chunk-5BVOF4UW.js";import"./chunk-6IA6QMPH.js";import"./chunk-TDPWFYTJ.js";import"./chunk-CJP7RX3E.js";import"./chunk-KZVEFBH5.js";import"./chunk-5Y2G4NC7.js";import"./chunk-DXI5TXNL.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-SPQPOUUR.js";import"./chunk-MSGW4JDG.js";import"./chunk-56PAQAX5.js";import"./chunk-5EOX4MEY.js";import"./chunk-4JOD47QI.js";import"./chunk-CVCVBQP6.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-ZNNRCUHH.js";import"./chunk-LCU2P3CH.js";import"./chunk-D6FYCAIA.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};
|
package/dist/bridge-UH32UGR5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-DVYO4CR2.js";import"./chunk-XO45NGSN.js";import"./chunk-TUTDSX7T.js";import"./chunk-UD7KKHPW.js";import"./chunk-D6FYCAIA.js";import"./chunk-UR6MHSHU.js";export{a as runAgent};
|
package/dist/chunk-5NQ3TI4S.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{d as ot,g as st}from"./chunk-5DBK6QNS.js";import{b as w,c as ne,d as Ze,f as ie,g as oe}from"./chunk-CJJXT5DO.js";import{a as Qe,e as P,f as j,g as et,h as U,i as L,j as tt}from"./chunk-ZPDM6FO7.js";import{a as M,b as T,d as qe}from"./chunk-EHN5HTUD.js";import{d as at}from"./chunk-NVGBE2DR.js";import{a as W}from"./chunk-CH273NAE.js";import{a as R,b as _}from"./chunk-L5LI2JF4.js";import{a as te,c as We,d as Je,e as Xe,f as re}from"./chunk-6IA6QMPH.js";import{A as x}from"./chunk-TH47OOBV.js";import{b as K}from"./chunk-VAYBKR76.js";import{a as nt}from"./chunk-CUM23TLF.js";import{b as it,f as G,i as Y}from"./chunk-DUAXZYAD.js";import{d as se,f as rt}from"./chunk-WXHQYYD5.js";import{a as Ye,b as Ke}from"./chunk-YJNGBZ42.js";import{a as Ge}from"./chunk-CVCVBQP6.js";import{a as Ue}from"./chunk-D6FYCAIA.js";function C(t){if(t===null)return"broken";let e=Math.floor(t/100);return e===1?"passed":e===7?"failed":e===2?"skipped":"broken"}var A={failed:3,broken:2,passed:1,skipped:0};function ae(t){let e="skipped";for(let r of t)A[r]>A[e]&&(e=r);return e}import{createHash as Vt}from"crypto";import{basename as Bt}from"path";function ce(t){let e=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return e.length>0?e:"session"}function de(t){return Vt("sha256").update(t).digest("hex").slice(0,8)}function ue(t){let e=Bt(t).replace(/_test\.md$/i,"").replace(/\.md$/i,"");return`${ce(e)}-${de(t)}`}function le(t,e){return`${ce(t)}-${de(e)}`}function pe(t){let e={};for(let[r,n]of Object.entries(t))typeof n=="string"&&n.length>0&&(e[r]=n);return e}function Ht(t,e){return{pack_test_dir:t,ordinal_offset:e}}import{promises as k}from"fs";import{join as E}from"path";function fe(t){let e={evidence:"0.1",run_id:t.execution_id,status:"running",title:t.title,started:t.started,environment:{producer:{name:"kane-cli",version:t.producerVersion},...t.surfaces?{surfaces:t.surfaces}:{},run_kind:t.run_kind,origin:t.origin,pid:t.pid},...t.credits!==void 0?{metrics:{credits:{value:t.credits,type:"count"}}}:{}};return _(e,{lineWidth:-1})}async function me(t,e,r,n=process.cwd(),i){let o=i??w(t.execution_id,n),s=E(o,"tests",e);return await k.mkdir(E(o,"coverage"),{recursive:!0}),await k.writeFile(E(o,"coverage",".keep"),""),await k.mkdir(s,{recursive:!0}),await k.writeFile(E(o,"run.yaml"),fe(t)),r&&await k.writeFile(E(s,r.path),r.content),o}async function zt(t,e=process.cwd()){let r=w(t.execution_id,e);await k.mkdir(E(r,"coverage"),{recursive:!0}),await k.writeFile(E(r,"coverage",".keep"),"");let n=R(fe(t));return n.environment&&delete n.environment.run_kind,await k.writeFile(E(r,"run.yaml"),_(n,{lineWidth:-1})),r}async function Ut(t,e=process.cwd()){return T(w(t,e),new Date().toISOString())}async function ge(t,e=process.cwd()){await k.rm(w(t,e),{recursive:!0,force:!0})}import{promises as he}from"fs";import{join as ve}from"path";function J(t){let e={evidence:"0.1",test:t.testId,status:t.status,...t.durationMs!==void 0?{duration_ms:t.durationMs}:{},...t.attempts&&t.attempts.length?{attempts:t.attempts}:{},...t.flaky!==void 0?{flaky:t.flaky}:{},...t.definitionPath?{definition:{path:t.definitionPath}}:{},...t.definitionId?{definition_id:t.definitionId}:{},...t.assuranceId?{assurance_id:t.assuranceId}:{},...Object.keys(t.externalId).length?{external_id:t.externalId}:{},...t.tags&&t.tags.length?{tags:t.tags}:{},...Object.keys(t.environment).length?{environment:t.environment}:{},steps:t.steps};return _(e,{lineWidth:-1})}function ye(t){return _({logs:t},{lineWidth:-1})}async function we(t,e,r){await he.writeFile(ve(t,"tests",e,"result.yaml"),r)}async function _e(t,e,r){let n=ve(t,"tests",e,"logs");await he.mkdir(n,{recursive:!0}),await he.writeFile(ve(n,"meta.yaml"),r)}import{promises as X}from"fs";import{join as ct}from"path";function dt(t){return ct(t,".internal","meta.json")}async function ut(t){let e;try{e=await X.readFile(dt(t),"utf8")}catch(n){if(n?.code==="ENOENT")return null;throw n}let r=JSON.parse(e);if(!r||typeof r!="object"||Array.isArray(r))throw new Error("meta.json is not a JSON object");return r}async function xe(t,e){let r;try{r=await ut(t)??{}}catch(s){console.warn(`evidence: meta.json at ${t} unreadable \u2014 skipping execution-pointer append to preserve identity`,s);return}let n=Array.isArray(r.executions)?r.executions:[];n.push(e),r.executions=n,await X.mkdir(ct(t,".internal"),{recursive:!0});let i=dt(t),o=`${i}.tmp-${process.pid}-${Date.now()}`;await X.writeFile(o,JSON.stringify(r,null,2)+`
|
|
3
|
-
`),await X.rename(o,i)}async function Gt(t){try{let e=await ut(t);return e&&Array.isArray(e.executions)?e.executions:[]}catch{return[]}}async function Yt(t,e,r=process.cwd()){let n=await ie(t,r);if(!n){let o=`evidence: no pack found for "${t}"`;return e.json?console.log(JSON.stringify({valid:!1,error:"not_found",target:t})):console.error(o),2}let i=await M(n,e.profile??"L1");return e.json?console.log(JSON.stringify({valid:i.valid,status:i.status,diagnostics:i.diagnostics})):console.log(`evidence: ${i.valid?"valid":"INVALID"} (${e.profile??"L1"}, status ${i.status})`),i.valid?0:1}function ke(t){let e=[];for(let r of t){let n=r.perFlow&&r.perFlow.length?r.perFlow.map(i=>i.resultCode):[r.resultCode];for(let i of n)e.push(C(i))}return ae(e)}function Kt(t){let e=null;for(let r of t){let n=r.perFlow&&r.perFlow.length?r.perFlow.map(i=>i.resultCode):[r.resultCode];for(let i of n)i!=null&&(e==null||A[C(i)]>A[C(e)]||A[C(i)]===A[C(e)]&&i>e)&&(e=i)}return e}import{promises as Wt}from"fs";import{extname as lt,basename as Jt}from"path";var Xt={".ndjson":"ndjson",".log":"log",".json":"json",".har":"har"};async function be(t){let e;try{e=await Wt.readdir(t)}catch{return[]}return e.filter(r=>r!=="meta.yaml").sort().map(r=>({name:Jt(r,lt(r)),file:r,format:Xt[lt(r)]??"txt"}))}import{mkdirSync as qt,appendFileSync as Zt}from"fs";import{join as pt}from"path";function Se(t,e){return pt(t,"tests",e,"logs")}function Ee(t,e,r,n={},i){try{i?.(e,r,r,n)}catch{}if(t)try{qt(t,{recursive:!0});let o=JSON.stringify({ts:new Date().toISOString(),level:e,event:r,...n})+`
|
|
4
|
-
`;Zt(pt(t,"diagnostics.ndjson"),o)}catch{}}import{promises as I}from"fs";import{dirname as ar,join as D}from"path";import{statSync as Qt}from"fs";import{promises as Ie}from"fs";import{basename as er,join as tr}from"path";var rr=1e6,nr=2e6;function ir(){return Ye.map(t=>Ke(t))}function ft(t=ir()){return t.map(e=>{let r=0;try{r=Qt(e).size}catch{}return{path:e,offset:r}})}var or=/\x1b\[[0-9;]*[A-Za-z]/g;async function sr(t,e,r){let n;try{n=await Ie.open(t,"r");let i=(await n.stat()).size,o=e<=i?e:0,s=i-o;if(s<=0)return null;let a=s>r?i-r:o,c=Buffer.alloc(Math.min(s,r));return await n.read(c,0,c.length,a),c.toString("utf8")}catch{return null}finally{await n?.close().catch(()=>{})}}async function mt(t,e){let r=e.caps?.stderr??rr,n=e.caps?.appium??nr,i=[];e.runnerStderrPath&&i.push({src:e.runnerStderrPath,from:0,cap:r});for(let o of e.appiumMarks??[])i.push({src:o.path,from:o.offset,cap:n});for(let o of i){let s=await sr(o.src,o.from,o.cap);if(s===null)continue;let a=s.replace(or,"");if(a!=="")try{await Ie.mkdir(t,{recursive:!0}),await Ie.writeFile(tr(t,er(o.src)),a)}catch{}}}async function cr(t){try{let e=D(t,"tests"),r=await I.readdir(e).catch(()=>[]);for(let n of r){let i=D(e,n,"steps"),o=await I.readdir(i).catch(()=>[]);for(let s of o){let a=await I.readFile(D(i,s,"failure.yaml"),"utf8").catch(()=>null);if(a!=null)try{let c=R(a);if(c&&typeof c=="object"&&c.triage)return!0}catch{}}}}catch{}return!1}async function gt(t,e,r,n={}){let i=D(t,"tests",e,"logs");if(r)try{await I.mkdir(i,{recursive:!0}),await I.copyFile(r,D(i,"tui.log"))}catch{}await mt(i,{runnerStderrPath:r?D(ar(r),"runner-stderr.log"):void 0,appiumMarks:n.appiumMarks});let o=await be(i);if(!o.length&&n.requireRealLog)throw new Error(`evidence test ${e} has no real log to declare`);o.length&&await _e(t,e,ye(o))}async function Re(t){let e=t.cwd??process.cwd(),r=t.packDir??w(t.executionId,e);if(!t.saved&&!t.packDir)return await ge(t.executionId,e),{sealed:!1};await gt(r,t.testId,t.tuiLogPath,{requireRealLog:t.requireRealLog,appiumMarks:t.appiumMarks});let n=D(r,"run.yaml"),i=R(await I.readFile(n,"utf8"));i.environment={...i.environment??{},saved:t.saved,run_kind:t.runKind},await I.writeFile(n,_(i,{lineWidth:-1}));let o=await I.open(n,"r+");try{await o.sync()}finally{await o.close()}let s=await cr(r);await T(r,new Date().toISOString());let a;try{let d=await M(r,"L1");a=d.valid;let u=(d.diagnostics??[]).filter(p=>String(p?.code??"").includes("failure.status_disagrees"));if(u.length>0)if(t.expectStatusDisagrees||s){let p=t.expectStatusDisagrees?"expected under --bug-detection continue":"self-explained by triaged failure record(s)";console.warn(`evidence: ${u.length} status_disagrees advisory(ies) \u2014 ${p}`)}else console.warn(`evidence: ${u.length} status_disagrees advisory(ies) \u2014 step verdicts disagree with their failure records`,u);if(!d.valid){console.warn(`evidence: sealed pack ${t.executionId} failed L1 validation`,d.diagnostics);let p=String(d.diagnostics?.[0]?.code??"");Ee(Se(r,t.testId),"warn","EVIDENCE_INVALID",{execution_id:t.executionId,first_code:p,surface:t.surface??"testmd"},t.log)}}catch(d){console.warn(`evidence: validation error for ${t.executionId}`,d)}let c;if(t.saved&&t.packDir)try{c=await Ze(r,t.executionId,e)}catch(d){console.warn(`evidence: store install failed for ${t.executionId}`,d)}if(t.outputStemDir)try{await xe(t.outputStemDir,{execution_id:t.executionId,run_kind:t.runKind,status:t.verdict,valid:a,at:new Date().toISOString()})}catch(d){console.warn(`evidence: execution-pointer append failed for ${t.executionId} (pack is sealed)`,d)}return{sealed:!0,valid:a,storePath:c}}import{release as ht}from"os";import{execFileSync as dr}from"child_process";var vt=!1,q;function ur(){if(!vt)if(vt=!0,process.platform==="darwin")try{q=dr("sw_vers",["-productVersion"],{timeout:2e3}).toString().trim()||void 0}catch{q=ht()||void 0}else q=ht()||void 0;return q}function Pe(t){let e={os:te(process.platform)},r=ur();if(r&&(e.os_version=r),t.cdpBrowser){let n=/^([A-Za-z]+)\/(\d+)/.exec(t.cdpBrowser);n&&(e.browser=n[1].replace(/^Headless/,""),e.browser_version=n[2])}return t.resolution&&(e.resolution=t.resolution),Je(e,t.runnerEnvironment)}async function yt(t){if(t)try{let e=await fetch(`${t}/json/version`,{signal:AbortSignal.timeout(2e3)});if(!e.ok)return;let r=await e.json();return typeof r.Browser=="string"?r.Browser:void 0}catch{return}}function lr(t){let e;return()=>(e||(e=yt(t)),e)}import{promises as $,existsSync as O,readFileSync as gr}from"fs";import{basename as hr,join as h}from"path";import{readFileSync as pr}from"fs";import{dirname as fr,resolve as mr}from"path";function wt(t,e){let r=mr(t),n=pr(r,"utf8");return P(e?j(n,U(fr(r),e)):n)}var N=class t{constructor(e){this.opts=e}executionId;testId;definitionPath=null;definitionContent=null;accumulatedSteps=[];maxOrdinal=0;_attempts=[];_packDirOverride;_attached=!1;appiumMarks=ft();get attached(){return this._attached}static async attach(e){let r=hr(e.packDir).replace(/\.evidence$/,""),n=new t({origin:"testrun",runKind:"author",pid:process.pid,title:e.testId,started:new Date().toISOString(),producerVersion:Ue,cwd:e.cwd});n.executionId=r,n.testId=e.testId,n._packDirOverride=e.packDir,n._attached=!0;let i=h(e.packDir,"tests",e.testId);return await $.mkdir(i,{recursive:!0}),e.definition&&(await $.writeFile(h(i,e.definition.path),e.definition.content),n.definitionPath=e.definition.path,n.definitionContent=e.definition.content),n}async start(){if(this._attached)throw new Error("attach-mode session is already started");this.executionId=ne(),this.testId=this.opts.testmdRelPath?ue(this.opts.testmdRelPath):le(this.opts.objectiveOrName??"session",this.opts.sessionId??this.executionId);let e=this.opts.definition??null;return await me({execution_id:this.executionId,title:this.opts.title,started:this.opts.started,producerVersion:this.opts.producerVersion,surfaces:this.opts.surfaces,run_kind:this.opts.runKind,origin:this.opts.origin,pid:this.opts.pid,...this.opts.credits!==void 0?{credits:this.opts.credits}:{}},this.testId,e,this.opts.cwd,this.opts.packRootDir?this.pack:void 0),e&&(this.definitionPath=e.path,this.definitionContent=e.content),{executionId:this.executionId,testId:this.testId,packTestDir:this.packTestDir}}get pack(){return this._packDirOverride?this._packDirOverride:this.opts.packRootDir?h(this.opts.packRootDir,`${this.executionId}.evidence`):w(this.executionId,this.opts.cwd)}get packTestDir(){return h(this.pack,"tests",this.testId)}async writeDefinition(e,r="test.md"){await $.writeFile(h(this.packTestDir,r),e),this.definitionPath=r,this.definitionContent=e}computeAssuranceId(){try{if(this.opts.testmdRelPath&&this.opts.cwd){let e=h(this.opts.cwd,this.opts.testmdRelPath);if(O(e))return L(gr(e,"utf8"))?.id}}catch{}}computeDefinitionId(){try{if(this.opts.testmdRelPath&&this.opts.cwd){let e=h(this.opts.cwd,this.opts.testmdRelPath),r=h(this.opts.cwd,".context"),n=O(r)?x(r):void 0;if(O(e))return wt(e,n)}if(this.definitionContent!=null)return P(this.definitionContent)}catch{}}noteSpawn(e){this.accumulatedSteps.push(...e.steps),this.maxOrdinal=Math.max(this.maxOrdinal,e.maxOrdinal)}nextOrdinalOffset(){return this.maxOrdinal}get steps(){return this.accumulatedSteps}get attempts(){return this._attempts}async archiveAttempt(e,r){let n=this._attempts.length+1,i=h(this.packTestDir,String(n));try{await $.mkdir(i,{recursive:!0});for(let o of["steps","logs","v16-trajectory"]){let s=h(this.packTestDir,o);O(s)&&await $.rename(s,h(i,o))}this.definitionPath&&O(h(this.packTestDir,this.definitionPath))&&await $.copyFile(h(this.packTestDir,this.definitionPath),h(i,this.definitionPath))}catch{}return this._attempts.push({n,status:e,steps:this.accumulatedSteps,...r!==void 0?{durationMs:r}:{}}),this.accumulatedSteps=[],this.maxOrdinal=0,n}async writeResult(e){let r=ke(e.spawns),n=this._attempts.length?[...this._attempts.map(u=>({status:u.status,...u.durationMs!==void 0?{duration_ms:u.durationMs}:{}})),{status:r,...e.durationMs!==void 0?{duration_ms:e.durationMs}:{}}]:void 0,i=n?new Set(n.map(u=>u.status)).size>1:void 0,o=this.pack,s=pe(e.externalIdInput),a=re(e.runnerEnv,e.intentEnv),c=this.computeDefinitionId(),d=this.computeAssuranceId();await we(o,this.testId,J({testId:this.testId,status:r,durationMs:e.durationMs,definitionPath:this.definitionPath,definitionId:c,assuranceId:d,externalId:s,environment:a,steps:e.steps,tags:e.tags,attempts:n,flaky:i}));for(let u of this._attempts){let p=h(this.packTestDir,String(u.n));O(p)&&await $.writeFile(h(p,"result.yaml"),J({testId:this.testId,status:u.status,durationMs:u.durationMs,definitionPath:this.definitionPath,definitionId:c,assuranceId:d,externalId:s,environment:a,steps:u.steps,tags:e.tags}))}let l=e.externalIdInput;return e.log&&(l.commit_id||l.test_id||l.testcase_id)&&e.log("info","EVIDENCE_EXTERNAL_ID","Evidence external-id mapping",{execution_id:this.executionId,commit_id:l.commit_id??null,test_id:l.test_id??null,testcase_id:l.testcase_id??null,project_id:l.project_id??null,session_id:l.session_id??null,session_name:l.session_name??null}),r}get id(){return this.executionId}get test(){return this.testId}};async function vr(t,e,r=oe){try{let n=await r(t);if(n.aborted.length>0||n.removed.length>0)try{e?.("info","EVIDENCE_RECOVERY","Startup evidence recovery swept incomplete packs",{aborted:n.aborted,removed:n.removed,origin:"startup"})}catch{}return n}catch(n){return console.warn("evidence: startup recovery failed",n),{aborted:[],removed:[]}}}import{promises as jr}from"fs";import{existsSync as De,mkdirSync as Dr,readdirSync as $r,readFileSync as Lr,rmSync as Or,statSync as Fr,writeFileSync as Mr}from"fs";import{join as F}from"path";import{mkdirSync as yr,renameSync as wr,rmSync as _r,writeFileSync as xr}from"fs";import{join as _t}from"path";var kr=5e6;function xt(t,e,r){let n=_t(t,"coverage","sources"),i=new Map,o=!1;try{for(let s of r.usecases)for(let a of s.sources){if(i.has(a.id)){a.file=i.get(a.id);continue}if(!a.cid)continue;let c=at(e,a.cid);if(c===null||c.byteLength>kr)continue;o||(yr(n,{recursive:!0}),o=!0);let d=_t(n,a.id),l=`${d}.tmp-${process.pid}`;xr(l,c),wr(l,d);let u=`coverage/sources/${a.id}`;i.set(a.id,u),a.file=u}}catch{for(let s of r.usecases)for(let a of s.sources)delete a.file;if(o)try{_r(n,{recursive:!0,force:!0})}catch{}}}import{existsSync as Ce,readFileSync as V,renameSync as Ir,writeFileSync as Rr}from"fs";import{dirname as It,isAbsolute as Rt,resolve as Pt}from"path";var br=new Set(["inline","testmd","testrun"]),Sr=new Set(["inferred","authored","runtime-derived"]),Ae=new Set(["passed","failed","broken","skipped"]);function kt(t,e,r){if(r.facts.length===0)return{record:null,errors:[{code:"EMPTY_EXECUTIONS",detail:"a run with no designed units attaches no facts \u2014 skip the call"}]};let n=e;for(let i=0;;i++){let o=G(t);if(n.latestHash!==o){if(i>=3)return{record:null,errors:[{code:"STALE_BASIS",detail:`graph opened at ${String(n.latestHash)} but chain head is ${String(o)} \u2014 retry budget exhausted`}]};n=x(t);continue}let s=Er(t,n,r);if(s!=="cas")return s;if(i>=3)return{record:null,errors:[{code:"STALE_BASIS",detail:"concurrent appends kept moving the head \u2014 retry budget exhausted"}]};n=x(t)}}function Er(t,e,r){let n=[],i=[];for(let s of r.facts){let a=`executions[${s.ref}]`,c=e.resolve(s.ref),d=c?e.tipOf(c.cid):null;if(!c||!d||e.superseded.has(d)){n.push({code:"UNKNOWN_REF",detail:`${a}: '${s.ref}' is not a live committed node`});continue}if(e.nodeLabel.get(d)!==se.TEST){n.push({code:"ILLEGAL_TARGET",detail:`${a}: execution facts attach to tests \u2014 '${s.ref}' is a ${e.nodeLabel.get(d)}`});continue}if(!br.has(s.mode)){n.push({code:"BAD_MODE",detail:`${a}: mode '${s.mode}' not in inline|testmd|testrun`});continue}if(!Ae.has(s.verdict)){n.push({code:"BAD_VERDICT",detail:`${a}: verdict '${s.verdict}' not in ${[...Ae].join("|")}`});continue}if(!Sr.has(s.oracle_mode)){n.push({code:"BAD_ORACLE_MODE",detail:`${a}: oracle_mode '${s.oracle_mode}' not in inferred|authored|runtime-derived`});continue}if(typeof s.drift_flag!="boolean"||typeof s.stale_at_run!="boolean"){n.push({code:"MISSING_FIELD",detail:`${a}: drift_flag and stale_at_run are required booleans`});continue}if(!s.execution_id||!s.started_at||!s.definition_id_at_run){n.push({code:"MISSING_FIELD",detail:`${a}: execution_id, started_at and definition_id_at_run are required`});continue}let l=[];for(let u of s.per_ac??[]){let p=e.resolve(u.ac_ref),f=p?e.tipOf(p.cid):null;if(!p||!f||e.superseded.has(f)||e.nodeLabel.get(f)!==se.AC){n.push({code:"UNKNOWN_REF",detail:`${a}.per_ac: '${u.ac_ref}' is not a live AC`});continue}if(!Ae.has(u.verdict)){n.push({code:"BAD_VERDICT",detail:`${a}.per_ac['${u.ac_ref}']: verdict '${u.verdict}'`});continue}l.push({ac_ref:e.nameOf.get(f)??f,verdict:u.verdict})}i.push({about:d,definition_id_at_run:s.definition_id_at_run,verdict:s.verdict,...l.length?{per_ac:l}:{},drift_flag:s.drift_flag,oracle_mode:s.oracle_mode,stale_at_run:s.stale_at_run,...s.unresolved_acs?.length?{unresolved_acs:s.unresolved_acs}:{},execution_id:s.execution_id,...s.evidence_id?{evidence_id:s.evidence_id}:{},...s.duration_ms!==void 0?{duration_ms:s.duration_ms}:{},started_at:s.started_at,mode:s.mode,local:s.local,...s.via_parent?{via_parent:s.via_parent}:{}})}if(n.length>0)return{record:null,errors:n};let o;try{o=Y(t,{ts:new Date().toISOString(),proposal_id:null,nodes:[],edges:[],review:[],supersessions:[],executions:i,...r.eventIds&&r.eventIds.length>0?{event_ids:r.eventIds}:{},source_head_moves:{}},{expectPrev:e.latestHash})}catch(s){if(s instanceof it)return"cas";throw s}return K(t),{record:o.record,errors:null}}function At(t){let e={failed:3,broken:2,skipped:1,passed:0},r=new Map;for(let n of t)for(let i of n.verifies??[]){let o=r.get(i);(o===void 0||(e[n.status]??0)>(e[o]??0))&&r.set(i,n.status)}return[...r.entries()].map(([n,i])=>({ref:n,verdict:i}))}function Ct(t){let e=[],r=W(t.cwd);if(!Ce(r))return{synced:0,superseded:0,skipped:"no-context",warnings:e};let n=t.by??{kind:"ai",id:"exec-sync"},i=x(r),o=[],s=0,a=new Set;for(let d of t.members){let l=Rt(d.path)?d.path:Pt(t.cwd,d.path);for(let u of Pr(l)){if(a.has(u.path))continue;a.add(u.path);let p=u.path===l?void 0:L(V(l,"utf8"))?.id,f=V(u.path,"utf8"),m=L(f);if(!m?.id)continue;let g=i.resolve(m.id),b=g?i.tipOf(g.cid):null;if(!g||!b||i.superseded.has(b)){e.push(`sync: ${m.id} does not resolve to a live test \u2014 skipped (foreign store?)`);continue}let S=P(j(f,U(It(u.path),i))),v=String(i.getNode(b)?.content.test_md_blob??""),H=P(j(v,et(i))),z=!1,ee=b;if(S===H)m.base!==H&&Et(u.path,f,H,e);else if(m.base===H){let y=Ar(r,i,b,f,S,n);y.error?(e.push(`sync: could not supersede ${m.id}: ${y.error}`),z=!0):(s++,ee=y.newCid,z=y.oracleTier,Et(u.path,V(u.path,"utf8"),S,e),i=x(r))}else z=!0,e.push(m.base?`sync: ${m.id} was edited from an older version \u2014 graph kept; reconcile via a redesign or maintain`:`sync: ${m.id} carries no base pin (hand-copied file?) \u2014 fact attached with drift flag`);let Ve=i.getNode(ee)?.content.check,Be=u.path===l?d.acs??[]:[],He=Be.filter(y=>bt(i,y.ref)),ze=Be.filter(y=>!bt(i,y.ref)).map(y=>y.ref);o.push({ref:m.id,definition_id_at_run:S,verdict:d.verdict,...He.length?{per_ac:He.map(y=>({ac_ref:y.ref,verdict:y.verdict}))}:{},drift_flag:z,oracle_mode:Ve?.expected_mode??(Qe(Ve?.operand)?"runtime-derived":"inferred"),stale_at_run:i.stale(ee)!=="fresh",...ze.length?{unresolved_acs:ze}:{},execution_id:d.executionId,...d.evidenceId?{evidence_id:d.evidenceId}:{},...d.durationMs!==void 0?{duration_ms:d.durationMs}:{},started_at:d.startedAt,mode:d.mode,local:d.local,...p?{via_parent:p}:{}})}}if(o.length===0)return{synced:0,superseded:s,warnings:e};let c=kt(r,x(r),{facts:o,by:n});return c.errors?(e.push(...c.errors.map(d=>`sync facts: ${d.code}: ${d.detail}`)),{synced:0,superseded:s,warnings:e}):{synced:o.length,superseded:s,warnings:e}}function Pr(t){let e=[],r=new Set,n=i=>{if(r.has(i)||!Ce(i))return;r.add(i);let o=V(i,"utf8");for(let s of o.split(`
|
|
5
|
-
`)){let a=/^@import\s+(\S+)\s*$/.exec(s.trim());if(!a)continue;let c=Rt(a[1])?a[1]:Pt(It(i),a[1]);Ce(c)&&L(V(c,"utf8"))?.id&&n(c)}e.push({path:i})};return n(t),e}function bt(t,e){let r=t.resolve(e),n=r?t.tipOf(r.cid):null;return!!(r&&n&&!t.superseded.has(n)&&t.nodeLabel.get(n)==="ac")}function Ar(t,e,r,n,i,o){let s=e.getNode(r);if(!s)return{oracleTier:!1,error:"tip unreadable"};let a=tt(n),c=String(s.content.test_md_blob??""),d=/^#\s+(.+?)\s*$/m.exec(a)?.[1]??String(s.content.title??""),l={...s.content,test_md_blob:a,definitionId:i,title:d},u=rt("test",l);if(u.length>0)return{oracleTier:!1,error:u.map(g=>g.detail).join("; ")};let p=nt("test",l);if(p===r)return{newCid:r,oracleTier:!1};let f=St(c)!==St(a),m=G(t);if(e.latestHash!==m)return{oracleTier:f,error:`store advanced under the sync (basis ${String(e.latestHash)} vs head ${String(m)}) \u2014 re-run to retry`};try{Y(t,{ts:new Date().toISOString(),proposal_id:null,nodes:[{cid:p,label:"test",content:l}],edges:[],review:[{id:p,kind:"review-item",resolution:"edited",edit:null,reason:"edited on disk (run sync)",by:o}],supersessions:[{kind:"node",old:r,new:p,reason:"edited on disk (run sync)",by:o}],source_head_moves:{}},{expectPrev:m})}catch(g){return{oracleTier:f,error:g instanceof Error?g.message:String(g)}}return K(t),{newCid:p,oracleTier:f}}var Cr=/\s@verifies\s+(ac-[\w.:\/-]+(?:\s*,\s*ac-[\w.:\/-]+)*)\s*$/;function St(t){let e=[],r=t.split(`
|
|
6
|
-
`),n=!1;for(let i of r){if(/^##\s/.test(i)){n=/\bassert\b/i.test(i);let o=Cr.exec(i);o&&e.push(`v:${o[1].trim()}`);continue}n&&i.trim()!==""&&e.push(i.trim())}return e.join(`
|
|
7
|
-
`)}function Et(t,e,r,n){try{let i=e.split(`
|
|
8
|
-
`),o=-1;if(i[0]?.trim()==="---"){for(let c=1;c<i.length;c++)if(i[c].trim()==="---"){o=c;break}}if(o<0)return;let s=!1;for(let c=1;c<o;c++){if(/^\s+base:\s*sha256:[0-9a-f]+\s*$/.test(i[c])){i[c]=i[c].replace(/sha256:[0-9a-f]+/,r),s=!0;break}if(/^assurance:\s*$/.test(i[c])&&!i.slice(c,Math.min(c+3,o)).some(d=>/^\s+base:/.test(d))){i.splice(c+2,0,` base: ${r}`),s=!0;break}}if(!s)return;let a=`${t}.tmp-sync`;Rr(a,i.join(`
|
|
9
|
-
`)),Ir(a,t)}catch(i){n.push(`sync: pin refresh failed for ${t} (${i instanceof Error?i.message:String(i)}) \u2014 next run self-heals`)}}var Tr={passed:"passed",failed:"failed",broken:"blocked",skipped:"not-run"},Dt=(t,e)=>{try{if(!De(e))return{status:"skipped",reason:"no context store at the project root"};let r=F(t,"tests");if(!De(r))return{status:"skipped",reason:"pack has no tests/"};let n=new Map;for(let a of $r(r)){let c=F(r,a,"result.yaml");if(!De(c)||!Fr(F(r,a)).isDirectory())continue;let d=R(Lr(c,"utf8"));if(!d?.definition_id&&!d?.assurance_id)continue;let l=At(d.steps??[]),u={testShortId:String(d.test??a),execution:Tr[String(d.status)]??"not-run",...l.length?{acs:l}:{}};d.assurance_id&&n.set(`id:${d.assurance_id}`,u),d.definition_id&&n.set(`def:${d.definition_id}`,u)}let i=st(x(e),n,{scope:"run"}),o=ot(i);xt(t,e,i);let s=_({...i,rollup:o},{lineWidth:-1});return Dr(F(t,"coverage"),{recursive:!0}),Mr(F(t,"coverage","usecases.yaml"),s),{status:"written"}}catch(r){try{Or(F(t,"coverage","sources"),{recursive:!0,force:!0})}catch{}return{status:"skipped",reason:r instanceof Error?r.message:String(r)}}};async function Nr(t){try{let e=new N({origin:"inline",runKind:"author",pid:t.pid,title:t.title,started:new Date().toISOString(),producerVersion:t.producerVersion,surfaces:t.surfaces,objectiveOrName:t.objectiveOrName,sessionId:t.sessionId,cwd:t.cwd,packRootDir:t.packRootDir}),r=await e.start();return{session:e,...r,packDir:e.pack,spawns:[],startedAtMs:Date.now(),cwd:t.cwd}}catch(e){return console.warn("evidence: inline pack creation failed",e),null}}function Vr(t,e,r){if(!t)return;t.session.noteSpawn(e),e.resolution&&(t.resolution=e.resolution),t.runnerEnvironment=We(t.runnerEnvironment,e.runnerEnvironment);let n=(r?.per_flow_metadata??[]).map(i=>({resultCode:i?.result_code!=null?Number(i.result_code):null}));t.spawns.push({resultCode:r?.result_code!=null?Number(r.result_code):null,...n.length?{perFlow:n}:{}})}function Br(t){if(t)return{packTestDir:t.packTestDir,ordinalOffset:t.session.nextOrdinalOffset()}}async function Hr(t,e){if(!t)return null;if(t.finalized)return t.finalized;let r=(n,i,o)=>e.log?e.log("warn",n,i,o):console.warn(`evidence: ${i}`,o??"");try{if(e.recordedTestPath)try{await t.session.writeDefinition(await jr.readFile(e.recordedTestPath,"utf8"))}catch(s){r("EVIDENCE_DEFINITION_FAILED","could not attach synthesized test.md",{error:String(s)})}let n=e.cdpBrowserCapture?await e.cdpBrowserCapture():void 0,i=await t.session.writeResult({steps:t.session.steps,spawns:t.spawns.length?t.spawns:[{resultCode:null}],externalIdInput:{...e.externalIdInput,execution_id:t.executionId},runnerEnv:Pe({cdpBrowser:n,resolution:t.resolution,runnerEnvironment:t.runnerEnvironment}),intentEnv:Xe(e.model,t.runnerEnvironment),durationMs:e.durationMs??Date.now()-t.startedAtMs,log:e.log});try{if(e.recordedTestPath){let s=Ct({cwd:e.cwd??t.cwd??process.cwd(),members:[{path:e.recordedTestPath,verdict:i,executionId:t.executionId,startedAt:new Date(t.startedAtMs).toISOString(),mode:"inline",local:e.local??!1}]});for(let a of s.warnings)r("EXEC_SYNC",a)}}catch(s){r("EXEC_SYNC","exec-sync failed",{error:String(s)})}try{let s=(e.coverageWriter??Dt)(t.packDir,W(e.cwd??t.cwd??process.cwd()));s.status==="skipped"&&r("EVIDENCE_COVERAGE_SKIPPED",`coverage/usecases.yaml not written: ${s.reason}`)}catch(s){r("EVIDENCE_COVERAGE_SKIPPED","coverage writer threw",{error:String(s)})}let o=await Re({executionId:t.executionId,testId:t.testId,saved:e.saved,runKind:"author",verdict:i,cwd:e.cwd??t.cwd,packDir:t.packDir,tuiLogPath:e.tuiLogPath,log:e.log,surface:"inline",requireRealLog:!!t.runnerEnvironment?.native_platform,appiumMarks:t.session.appiumMarks});return t.finalized=o,e.log?.("info","EVIDENCE_SEALED","Inline pack sealed",{execution_id:t.executionId,verdict:i,valid:o.valid,pack:t.packDir,store_copy:o.storePath??null}),o}catch(n){return r("EVIDENCE_SEAL_FAILED","inline pack finalize failed",{error:String(n)}),null}}import{statSync as Wr,openSync as Jr,readSync as Xr,closeSync as qr}from"fs";import{basename as Zr,resolve as Qr}from"path";import{createServer as zr}from"http";import{createReadStream as Ur,promises as Gr}from"fs";import{randomBytes as Yr}from"crypto";var Z="127.0.0.1";function $t(t,e){if(!t)return null;let r=/^bytes=(\d*)-(\d*)$/.exec(t.trim());if(!r)return null;let[,n,i]=r;if(n===""&&i==="")return null;if(n===""){let a=Number(i);return a===0||e===0?"unsatisfiable":{start:Math.max(0,e-a),end:e-1}}let o=Number(n);if(o>=e)return"unsatisfiable";let s=i===""?e-1:Math.min(Number(i),e-1);return s<o?null:{start:o,end:s}}async function $e(t){let e=Yr(16).toString("hex"),r=zr((i,o)=>{Kr(i,o,t,e).catch(()=>o.destroy())});await new Promise((i,o)=>{r.once("error",o),r.listen(t.port??0,Z,()=>{r.removeListener("error",o),i()})});let n=r.address().port;return{port:n,urlFor:i=>`http://${Z}:${n}/${e}/${encodeURIComponent(i)}`,close:()=>new Promise(i=>{r.close(()=>i()),r.closeAllConnections()})}}async function Kr(t,e,r,n){let i=t.url??"/",o=v=>{try{r.log?.("warn","EVIDENCE_SERVE_DENIED",{reason:v,path:i})}catch{}};if(t.headers.host!==`${Z}:${t.socket.localPort}`){o("host_mismatch"),e.writeHead(403).end();return}let s=t.headers.origin;if(s!==void 0&&!r.allowedOrigins.includes(s)){o("origin_denied"),e.writeHead(403).end();return}let a=s?{"Access-Control-Allow-Origin":s,Vary:"Origin","Access-Control-Expose-Headers":"Content-Range, Content-Length"}:{};if(t.method==="OPTIONS"){let v={...a,"Access-Control-Allow-Methods":"GET, HEAD, OPTIONS","Access-Control-Allow-Headers":"range","Access-Control-Max-Age":"86400"};t.headers["access-control-request-private-network"]==="true"&&(v["Access-Control-Allow-Private-Network"]="true"),e.writeHead(204,v).end();return}if(t.method!=="GET"&&t.method!=="HEAD"){e.writeHead(405,a).end();return}let c;try{let v=new URL(t.url??"/",`http://${Z}`).pathname.split("/");if(v.length!==3||v[1]!==n){o("bad_token"),e.writeHead(404,a).end();return}c=decodeURIComponent(v[2])}catch{o("not_found"),e.writeHead(404,a).end();return}let d=r.packs.get(c);if(!d){o("not_found"),e.writeHead(404,a).end();return}let l;try{let v=await Gr.stat(d);if(!v.isFile())throw new Error("not a file");l=v.size}catch{o("not_found"),e.writeHead(404,a).end();return}let u={...a,"Accept-Ranges":"bytes","Content-Type":"application/zip","Cache-Control":"no-store"};if(t.method==="HEAD"){e.writeHead(200,{...u,"Content-Length":String(l)}).end();return}let p=$t(t.headers.range,l);if(p==="unsatisfiable"){o("unsatisfiable"),e.writeHead(416,{...a,"Content-Range":`bytes */${l}`}).end();return}let[f,m,g]=p===null?[0,l-1,200]:[p.start,p.end,206],b={...u,"Content-Length":String(m-f+1)};if(g===206&&(b["Content-Range"]=`bytes ${f}-${m}/${l}`),e.writeHead(g,b),l===0){e.end();return}let S=Ur(d,{start:f,end:m});S.on("error",()=>e.destroy()),e.on("close",()=>S.destroy()),S.pipe(e)}function B(t,e){return(e??Ge(t).evidenceViewerUrl).replace(/\/+$/,"")}function Le(t,e){return`${e}/?pack=${encodeURIComponent(t)}`}function Oe(t){return`evidence: view locally with \`kane-cli evidence serve ${t}\``}async function en(t,e,r={}){let n=r.out??(l=>process.stdout.write(l+`
|
|
10
|
-
`)),i=l=>(n(`error: ${l}`),2);if(e.env!=="prod"&&e.env!=="stage")return i(`invalid --env: ${String(e.env)}`);if(e.port!==void 0&&(!Number.isInteger(e.port)||e.port<1||e.port>65535))return i("invalid --port: expected an integer 1-65535");let o;try{o=B(e.env,e.viewerUrl),new URL(o)}catch{return i(`invalid --viewer-url: ${e.viewerUrl}`)}if(t.length===0)return i("no pack paths given");let s=new Map;for(let l of t){let u=Qr(l),p;try{p=Wr(u)}catch{return i(`${l}: not found`)}if(p.isDirectory())return i(`${l}: is a directory \u2014 packs must be sealed .evidence files (run the execution to completion, or seal it, first)`);if(!p.isFile())return i(`${l}: not a regular file`);let f=Buffer.alloc(2),m=Jr(u,"r");try{Xr(m,f,0,2,0)}finally{qr(m)}if(f.toString("latin1")!=="PK")return i(`${l}: not a sealed evidence pack (zip magic missing)`);let g=Zr(u);if(s.has(g))return i(`duplicate pack basename: ${g} (URL names collide \u2014 rename one)`);s.set(g,u)}let a=r.log??((l,u,p)=>process.stderr.write(`warn: ${u} reason=${p.reason} path=${p.path}
|
|
11
|
-
`)),c;try{c=await $e({packs:s,allowedOrigins:[new URL(o).origin],port:e.port,log:a})}catch(l){return i(`could not bind 127.0.0.1${e.port?`:${e.port}`:""} \u2014 ${l.message}`)}n(`serving ${s.size} pack${s.size===1?"":"s"} on http://127.0.0.1:${c.port}`);for(let l of s.keys()){let u=c.urlFor(l);n(l),n(` pack ${u}`),n(` viewer ${Le(u,o)}`)}return n("press Ctrl-C to stop"),await(r.hold??tn)(),await c.close(),0}function tn(){return new Promise(t=>{let e=process.listeners("SIGINT");process.removeAllListeners("SIGINT"),process.once("SIGINT",()=>{for(let r of e)process.on("SIGINT",r);t()})})}import{promises as Q}from"fs";import{tmpdir as sn}from"os";import{join as Ft,resolve as Me}from"path";var rn=["error","prefer_first","prefer_latest","discard"],nn=["external_id.commit_id","external_id.test_id"];function Lt(t){let e=t.replace(/-/g,"_");return rn.includes(e)?e:null}function Ot(t){let e=t==="discard"?{on_collision:"discard"}:{on_collision:"error",identity:{keys:[...nn],on_same:t??"nest",on_different:t?"error":"split"}};return _({packs:{require_status:"finalized",require_valid:"L1",on_ineligible:"abort"},tests:e,rules:[{file:"run.yaml",key:"run_id",must:"different",on_violation:"skip"},{file:"result.yaml",key:"external_id.project_id",must:"same",on_violation:"error"},{file:"result.yaml",key:"external_id.org_id",must:"same",on_violation:"error"}]},{lineWidth:-1})}async function Fe(t){try{if(!t.isTTY){t.log(Oe(t.packPath));return}let e=B(t.env);await(t.renderPrompt??on)(t.packPath,e)}catch(e){try{t.log(`evidence view failed \u2014 ${e.message}`)}catch{}}}async function on(t,e){let r=await import("./react-QWOAB3TB.js"),{render:n}=await import("./build-JIKYOZUH.js"),{EvidenceViewOffer:i}=await import("./EvidenceViewOffer-POKUWAPS.js");await new Promise(o=>{let s=n(r.default.createElement(i,{packPath:t,viewerBase:e,onDone:()=>{s.unmount(),o()}}),{stdout:process.stderr,exitOnCtrlC:!1})})}async function an(t,e,r=process.cwd(),n={}){let i=n.out??(p=>process.stdout.write(p+`
|
|
12
|
-
`)),o=n.err??(p=>process.stderr.write(p+`
|
|
13
|
-
`)),s=p=>(o(`evidence merge: ${p}`),2);if(!e.runId)return s("--run-id is required (merged identity is the caller's fact)");if(e.rules&&e.onCollision)return s("--rules and --on-collision are mutually exclusive");let a;if(e.onCollision!==void 0){let p=Lt(e.onCollision);if(!p)return s(`invalid --on-collision: ${e.onCollision} (expected error | prefer-first | prefer-latest | discard)`);a=p}let c=[];for(let p of t){let f=await cn(p,r);if(!f)return s(`no pack found for "${p}"`);c.push(f)}let d=e.out?Me(r,e.out):w(e.runId,r),l=null,u;e.rules?u=Me(r,e.rules):(l=await Q.mkdtemp(Ft(sn(),"kane-merge-rules-")),u=Ft(l,"merge-rules.yaml"),await Q.writeFile(u,Ot(a)));try{let p=await(n.mergeFn??qe)(c,{runId:e.runId,out:d,rulesPath:u,title:e.title,finalize:e.finalize});return e.json?i(JSON.stringify(p)):dn(i,p),p.output.finalized&&!e.json&&await(n.offer??Fe)({packPath:d,env:e.env,isTTY:n.isTTY??(!!process.stdin.isTTY&&!!process.stderr.isTTY),log:o}),0}catch(p){let f=p instanceof Error?p.message:String(p);return p?.code==="ABORT"?(o(`evidence merge: aborted \u2014 ${f}`),1):s(f)}finally{l&&await Q.rm(l,{recursive:!0,force:!0}).catch(()=>{})}}async function cn(t,e){let r=Me(e,t);if(await Mt(r))return r;let n=w(t,e);return await Mt(n)?n:null}async function Mt(t){try{return await Q.stat(t),!0}catch{return!1}}function dn(t,e){let{packs:r,tests:n,output:i}=e;t(`evidence: merged ${n.merged} tests from ${r.eligible.length} packs -> ${i.path} (${i.finalized?"sealed":"live"})`);for(let o of r.skipped)t(` skipped ${o.runId}: ${o.rule} \u2014 ${o.reason}`);for(let o of n.collisions){let s;o.action==="nest"?s=`nested into ${o.folder}, latest ${o.winner}`:o.action==="split"?s=`split into ${o.folder}`:s=`winner ${o.winner}`,t(` collision ${o.test}: ${s} (${o.rule})`)}for(let o of n.discarded)t(` discarded ${o}`)}import{copyFileSync as un,existsSync as Te,mkdirSync as ln}from"fs";import{join as Tt}from"path";function pn(t,e,r){try{let n=Tt(t,"auteur","execution.json");if(Te(n))return!0;for(let i of e)if(!(!i||!Te(i)))return ln(Tt(t,"auteur"),{recursive:!0}),un(i,n),!0}catch(n){try{r?.("debug","EVIDENCE_BLOB_COPY_FAILED","auteur execution blob copy failed",{operation:"ensureAuteurExecution",source:e.find(i=>i&&Te(i))??null,error:n instanceof Error?n.message:String(n)})}catch{}}return!1}import{readFileSync as fn}from"fs";import{join as mn}from"path";function Ne(t){let e=[],r=!0,n=o=>{if(o===null||typeof o!="object")return;let s=o;if(Array.isArray(s.operations))for(let a of s.operations){let c=a?.operation_id;typeof c=="string"&&c&&e.push(c)}if(Array.isArray(s.children)){s.content_type!=="generative_block"&&(r=!1);for(let a of s.children)n(a)}if(Array.isArray(s.branches)){r=!1;for(let a of s.branches){let c=a?.children;if(Array.isArray(c))for(let d of c)n(d)}}},i=t?.instructions;if(Array.isArray(i))for(let o of i)n(o);return{ids:e,linear:r}}function gn(t){return Ne(t).ids}function je(t,e){let r=new Set(e.map(a=>a.action_id).filter(Boolean)),n=-1;for(let a of r){let c=t.indexOf(a);c>n&&(n=c)}let i=e.reduce((a,c)=>Math.max(a,c.ordinal),0),o=new Set,s=[];for(let a of t.slice(n+1))r.has(a)||o.has(a)||(o.add(a),s.push({id:a,ordinal:++i,status:"skipped",action_id:a}));return s}function jt(t,e){let r=new Set(e),n=t.filter(o=>o.action_id);if(n.some(o=>r.has(o.action_id))||n.length>e.length)return null;let i=0;return t.map(o=>o.action_id?{...o,action_id:e[i++]}:o)}function hn(t,e){if(t.length>e.length)return!1;for(let r=0;r<t.length;r++)if(e[r]!==t[r].action_id)return!1;return!0}function vn(t,e,r,n=!0){if(e.length===0)return{steps:t,tail:[]};let i=(r&&n?jt(t,e):null)??t,o=i.filter(a=>a.action_id),s=new Set(e);return o.length>0&&o.every(a=>s.has(a.action_id))?{steps:i,tail:je(e,i)}:o.length>0&&!hn(o,e)?{steps:i,tail:[],unjoined:!0}:{steps:i,tail:je(e,i)}}function Nt(t){try{let e=fn(mn(t,"auteur","execution.json"),"utf8");return Ne(JSON.parse(e))}catch{return{ids:[],linear:!0}}}function yn(t){return Nt(t).ids}export{C as a,ae as b,ce as c,de as d,ue as e,le as f,pe as g,Ht as h,fe as i,me as j,zt as k,Ut as l,ge as m,J as n,ye as o,we as p,_e as q,xe as r,Gt as s,Yt as t,ke as u,Kt as v,be as w,Se as x,Ee as y,gt as z,Re as A,Pe as B,yt as C,lr as D,N as E,vr as F,At as G,Ct as H,Dt as I,Nr as J,Vr as K,Br as L,Hr as M,$t as N,$e as O,B as P,Le as Q,Oe as R,en as S,Fe as T,an as U,pn as V,Ne as W,gn as X,je as Y,jt as Z,vn as _,Nt as $,yn as aa};
|