@testmuai/kane-cli 0.8.11 → 0.8.13
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-YFJDAXOG.js → ChatSurface-B6ZIO3JL.js} +1 -1
- package/dist/{ChromeProfilePicker-PUCZN6WU.js → ChromeProfilePicker-QSICCUMV.js} +1 -1
- package/dist/{CliFeedbackPrompt-JAIB5MHS.js → CliFeedbackPrompt-LLLNSKW2.js} +1 -1
- package/dist/{CliUploadProgress-53LQMQJD.js → CliUploadProgress-N5IY66T2.js} +1 -1
- package/dist/{ConfigView-7HFP4OXS.js → ConfigView-UQIRPENS.js} +1 -1
- package/dist/EvidenceViewOffer-AZRAILJQ.js +2 -0
- package/dist/FolderPicker-OJFR7AKZ.js +2 -0
- package/dist/{InfoBox-62YG3YNQ.js → InfoBox-ZGSLEOPE.js} +1 -1
- package/dist/{LinksBox-6NS3GHWO.js → LinksBox-JFT44YUK.js} +1 -1
- package/dist/{ProfilesView-HIKK2HPC.js → ProfilesView-WZSPK3HF.js} +1 -1
- package/dist/{ProjectPicker-2CJMO5TD.js → ProjectPicker-SBBGVF4L.js} +1 -1
- package/dist/{SaveSessionPrompt-4DTPZSXD.js → SaveSessionPrompt-F3563T3C.js} +1 -1
- package/dist/SingleShotApp-72D5VVLE.js +2 -0
- package/dist/{SummaryBox-A6LKKQXJ.js → SummaryBox-6N6NESLI.js} +1 -1
- package/dist/TestMdRunView-4OA52DA2.js +2 -0
- package/dist/{TestrunEvidenceTable-7SCCTZPH.js → TestrunEvidenceTable-JLJBJ76Q.js} +1 -1
- package/dist/{WhoamiView-PDMQ6F5N.js → WhoamiView-PNVUCWLB.js} +1 -1
- package/dist/{app-download-K2ELUXWR.js → app-download-NNB52ZRJ.js} +1 -1
- package/dist/{auth-5WJSFLCP.js → auth-JIDDELKY.js} +1 -1
- package/dist/{binary-QVQRWQFK.js → binary-LXYAW7WQ.js} +1 -1
- package/dist/{bind-5WELCZ4S.js → bind-F36JFHUK.js} +3 -3
- package/dist/{bootstrap-3LNHRDQH.js → bootstrap-THOC3SS7.js} +1 -1
- package/dist/bridge-KMDML2NB.js +2 -0
- package/dist/{changelog-TK6DWFVW.js → changelog-BSMZXLTG.js} +1 -1
- package/dist/{chat-committer-MAW25ICC.js → chat-committer-RAOIL2T6.js} +1 -1
- package/dist/chat-controller-YJCNU76T.js +2 -0
- package/dist/chunk-2X3TANEV.js +2 -0
- package/dist/chunk-33GXXC2L.js +2 -0
- package/dist/{chunk-X6WB2QTT.js → chunk-3FXNQTCE.js} +1 -1
- package/dist/{chunk-NVRXDLJN.js → chunk-3M2D7UUI.js} +1 -1
- package/dist/{chunk-WRVDIZAI.js → chunk-3SP4JVDN.js} +2 -2
- package/dist/{chunk-A4BDLZOD.js → chunk-477DYMXZ.js} +1 -1
- package/dist/{chunk-2ZBY2GME.js → chunk-4PARDPK2.js} +1 -1
- package/dist/{chunk-T4OJX2GZ.js → chunk-4WOVHRI2.js} +1 -1
- package/dist/{chunk-3D7VYEDP.js → chunk-54JZ6VEW.js} +1 -1
- package/dist/{chunk-QHSF2CXK.js → chunk-5G22NOZK.js} +1 -1
- package/dist/{chunk-HFRMJP2P.js → chunk-6AZNGOLH.js} +1 -1
- package/dist/{chunk-FYLMTZ3J.js → chunk-6FCPS2VT.js} +1 -1
- package/dist/{chunk-NLSR2IFN.js → chunk-6IAA644J.js} +1 -1
- package/dist/{chunk-CABRAZOL.js → chunk-6J635CRI.js} +1 -1
- package/dist/{chunk-3PMEHGH3.js → chunk-7GUFVQOQ.js} +1 -1
- package/dist/{chunk-M3Q7IQMS.js → chunk-7KIIM6H7.js} +1 -1
- package/dist/{chunk-7P3JGF2X.js → chunk-AGRUULPT.js} +1 -1
- package/dist/{chunk-GSNGC7HI.js → chunk-AIVOYTYQ.js} +1 -1
- package/dist/{chunk-A76UL3EN.js → chunk-AQWTK6IN.js} +1 -1
- package/dist/{chunk-5NBT5IVT.js → chunk-ARU6KAGY.js} +1 -1
- package/dist/{chunk-XYSFPVJX.js → chunk-BJAHVN2F.js} +1 -1
- package/dist/{chunk-B7TJIUKZ.js → chunk-BTBUIL4Q.js} +1 -1
- package/dist/{chunk-OZMYKG6E.js → chunk-BZTWTYQQ.js} +1 -1
- package/dist/{chunk-AXW3WDFO.js → chunk-CAO3XRA2.js} +1 -1
- package/dist/{chunk-2QSG5ZG6.js → chunk-CUSTYILP.js} +1 -1
- package/dist/{chunk-4AZ7IG2A.js → chunk-D4G3SEBU.js} +1 -1
- package/dist/chunk-DHJSM5DT.js +2 -0
- package/dist/chunk-DIM5X2FR.js +52 -0
- package/dist/{chunk-URLZULC7.js → chunk-DMLYUTS4.js} +1 -1
- package/dist/{chunk-TB2CCKL7.js → chunk-DXFMELKC.js} +1 -1
- package/dist/{chunk-OKBEMFAW.js → chunk-EEFZXZTZ.js} +1 -1
- package/dist/{chunk-DP7GPS6S.js → chunk-EV64VI66.js} +1 -1
- package/dist/{chunk-CBLUNSF4.js → chunk-EXLXV5OU.js} +1 -1
- package/dist/{chunk-4SXJKDHO.js → chunk-F5AI3UVS.js} +2 -2
- package/dist/{chunk-NYUMJDCE.js → chunk-FE6XRABM.js} +1 -1
- package/dist/{chunk-HJBORIFP.js → chunk-FNIL4G3V.js} +3 -3
- package/dist/{chunk-4VZRBBLF.js → chunk-FUP4AP6J.js} +12 -12
- package/dist/{chunk-5LEO463W.js → chunk-GILD6RGH.js} +1 -1
- package/dist/{chunk-SNKFWPEM.js → chunk-I27YRAGO.js} +2 -2
- package/dist/{chunk-OC7TJTQG.js → chunk-I75FRXKE.js} +1 -1
- package/dist/{chunk-B7K5WOOU.js → chunk-IVQX3AKL.js} +1 -1
- package/dist/{chunk-ZES42R57.js → chunk-IWVA37B6.js} +1 -1
- package/dist/{chunk-W4IRHQGO.js → chunk-IZU5ND2C.js} +1 -1
- package/dist/{chunk-G5ZGEZCA.js → chunk-J2UN2AHO.js} +1 -1
- package/dist/chunk-J3Q63NFG.js +2 -0
- package/dist/{chunk-2E55VQYA.js → chunk-JX2CAVX6.js} +1 -1
- package/dist/{chunk-4FXSDPQW.js → chunk-K2UEVCIJ.js} +1 -1
- package/dist/{chunk-ASK4AZFC.js → chunk-K4SULRBL.js} +1 -1
- package/dist/{chunk-Z6GMZOVL.js → chunk-K6RAOZHP.js} +3 -3
- package/dist/{chunk-S63XGGBE.js → chunk-KAZGHWGK.js} +1 -1
- package/dist/{chunk-Z4QLCWLB.js → chunk-KGKJU27A.js} +1 -1
- package/dist/{chunk-NP3VGFZM.js → chunk-KO3FL2XW.js} +1 -1
- package/dist/{chunk-VUOAFV27.js → chunk-KSLJOUH4.js} +1 -1
- package/dist/{chunk-DHWS7SLT.js → chunk-KV5BOFPK.js} +2 -2
- package/dist/{chunk-W7NI6JCF.js → chunk-KXUTO5WC.js} +1 -1
- package/dist/{chunk-CQKKDIKA.js → chunk-L32DKFRQ.js} +1 -1
- package/dist/{chunk-XB7EMX6J.js → chunk-LAQBCZ5A.js} +1 -1
- package/dist/{chunk-O7RB4X6I.js → chunk-LPDBTGO5.js} +2 -2
- package/dist/{chunk-F7R6A6P5.js → chunk-LWQNRZH3.js} +1 -1
- package/dist/{chunk-QIRZBOKA.js → chunk-MCKBJIBB.js} +1 -1
- package/dist/chunk-MXDWS7S4.js +368 -0
- package/dist/{chunk-OGJ6ZSLC.js → chunk-N2I23ANS.js} +1 -1
- package/dist/{chunk-6GH4DRKR.js → chunk-N7Z7BQYO.js} +1 -1
- package/dist/{chunk-FIODM24X.js → chunk-NM76SG3S.js} +1 -1
- package/dist/{chunk-4VYWTTT4.js → chunk-NU45ROHH.js} +2 -2
- package/dist/{chunk-BE4FBVKY.js → chunk-NUWOQS6L.js} +1 -1
- package/dist/{chunk-YELGHSVH.js → chunk-O5U6EAL3.js} +1 -1
- package/dist/{chunk-YSNBXUM6.js → chunk-OHK6V7JX.js} +1 -1
- package/dist/{chunk-KRL2BDI5.js → chunk-OTMAFCZK.js} +2 -2
- package/dist/{chunk-47WY2637.js → chunk-P5MJMM3X.js} +58 -57
- package/dist/{chunk-CL3AMEK6.js → chunk-PUM5J56E.js} +1 -1
- package/dist/{chunk-3FJNTRAS.js → chunk-PWRIG6UB.js} +1 -1
- package/dist/{chunk-Y4ODYIOP.js → chunk-PYQS5ST6.js} +1 -1
- package/dist/{chunk-GV5BX2IQ.js → chunk-Q4YAJJPP.js} +1 -1
- package/dist/{chunk-VGLY4HWA.js → chunk-QD2BUO5M.js} +1 -1
- package/dist/{chunk-IX4FH5W6.js → chunk-RN5ERSV2.js} +1 -1
- package/dist/{chunk-6DOS5CJ5.js → chunk-SEKJZOKW.js} +1 -1
- package/dist/{chunk-YQ4MRF57.js → chunk-T7DGNWI2.js} +4 -4
- package/dist/{chunk-K6BWPGBO.js → chunk-TDNM22BQ.js} +1 -1
- package/dist/{chunk-7HUJVIMO.js → chunk-TMRLBSIA.js} +2 -2
- package/dist/{chunk-FQRWYXFG.js → chunk-TXZ66K4Q.js} +1 -1
- package/dist/{chunk-GMXM4WHF.js → chunk-UF4JZXEE.js} +1 -1
- package/dist/{chunk-TYRTD5DD.js → chunk-UH2ZTX4E.js} +1 -1
- package/dist/{chunk-JAO7TZBV.js → chunk-UZCSVEWP.js} +1 -1
- package/dist/{chunk-7B7OSHPX.js → chunk-VJ3ES3RR.js} +1 -1
- package/dist/{chunk-CRPBARFG.js → chunk-VYMMGWVO.js} +1 -1
- package/dist/chunk-W2UYUV47.js +27 -0
- package/dist/{chunk-R4EGL7VM.js → chunk-W3Z7AZNT.js} +1 -1
- package/dist/{chunk-HULEZ3D3.js → chunk-WIAZN7G4.js} +1 -1
- package/dist/chunk-WUV3FJ7C.js +11 -0
- package/dist/{chunk-DJJO4IHY.js → chunk-XAM5E27U.js} +1 -1
- package/dist/{chunk-OKCULEBD.js → chunk-XH2KDLZO.js} +1 -1
- package/dist/{chunk-TSW5A7W3.js → chunk-XL6HDWM3.js} +1 -1
- package/dist/{chunk-OXHMUZJV.js → chunk-XMTSHHYQ.js} +1 -1
- package/dist/{chunk-ZMJD3CI7.js → chunk-XS3HIVNS.js} +1 -1
- package/dist/{chunk-DLJIML73.js → chunk-YEZYO5QH.js} +1 -1
- package/dist/{chunk-7KRCBN6X.js → chunk-ZOSY2PJM.js} +1 -1
- package/dist/{committer-42AFWMEX.js → committer-C6UCDYMC.js} +1 -1
- package/dist/{config-KU2UICMC.js → config-BCGD2FEX.js} +1 -1
- package/dist/{controller-client-OB4WD2C4.js → controller-client-ZF5IXRUV.js} +1 -1
- package/dist/{cover-cmd-HAOBK2IC.js → cover-cmd-5LPHIOSI.js} +1 -1
- package/dist/{credentials-BEC4I5SE.js → credentials-YNH5BU2Z.js} +1 -1
- package/dist/{deps-bundle-EY5T7OH3.js → deps-bundle-LOFI4DAJ.js} +1 -1
- package/dist/{deps-resolve-MPLFFCZZ.js → deps-resolve-GA6IPHVZ.js} +1 -1
- package/dist/design-committer-UPC6NZUF.js +2 -0
- package/dist/dispatch-FRCPK3AZ.js +2 -0
- package/dist/{doctor-JBXA6WNL.js → doctor-W5TQBYB5.js} +1 -1
- package/dist/docx-convert-BIV5T7F5.js +1 -1
- package/dist/{dossier-WSWXZAPL.js → dossier-Y6TJWFZU.js} +1 -1
- package/dist/{evidence-MJV3PY2J.js → evidence-FHO36EEV.js} +1 -1
- package/dist/evolve-cmd-6RXLKERE.js +2 -0
- package/dist/explain-3HAZY7Q6.js +2 -0
- package/dist/{explain-cmd-BXFR5DB6.js → explain-cmd-RMJPXD4U.js} +1 -1
- package/dist/{explain-cmd-IRQ2YX5L.js → explain-cmd-XCRO4AS6.js} +1 -1
- package/dist/{extract-bind-PPMY4FFA.js → extract-bind-BFJPRNPQ.js} +3 -3
- package/dist/{extract-cmd-RHVLPNQB.js → extract-cmd-7FKQJNS7.js} +2 -2
- package/dist/{feeder-52VBZY3R.js → feeder-IOR3XRNF.js} +1 -1
- package/dist/{gaps-cmd-MSDGU6OU.js → gaps-cmd-FDJ3PT4C.js} +1 -1
- package/dist/{generate-headless-NSK32S53.js → generate-headless-OBMB5CSB.js} +2 -2
- package/dist/index.js +183 -119
- package/dist/ingest-TTUQ7UDK.js +2 -0
- package/dist/ingest-cmd-AV66Q5LC.js +2 -0
- package/dist/install-SFJ2FFQ6.js +2 -0
- package/dist/{interactive-bind-4FNW3OYT.js → interactive-bind-N5AQB26T.js} +4 -4
- package/dist/{lifecycle-cmd-HYNG5KH6.js → lifecycle-cmd-KSMETBPP.js} +1 -1
- package/dist/{list-cmd-Y4WEOT3E.js → list-cmd-V3HJ5K4O.js} +1 -1
- package/dist/list-commands-SH4HPFI4.js +2 -0
- package/dist/{logical-ids-N3UZACB4.js → logical-ids-MLXAH45L.js} +1 -1
- package/dist/login-flow-ODVWEPRU.js +2 -0
- package/dist/{maintenance-cmd-UJNH47SG.js → maintenance-cmd-VFYGKY3X.js} +1 -1
- package/dist/{mobile-prompts-SJZVJWSB.js → mobile-prompts-UZTRJ3L7.js} +1 -1
- package/dist/objective-variable-gate-3VUXNDCZ.js +2 -0
- package/dist/{persist-recorded-session-FWBAOQEF.js → persist-recorded-session-QMRY4DOF.js} +1 -1
- package/dist/{phase-seed-2WI7KUYO.js → phase-seed-BMOSAA74.js} +1 -1
- package/dist/pipeline-5FHWZAXK.js +2 -0
- package/dist/prepare-target-UJEY2FSR.js +2 -0
- package/dist/readmodel-TDRFVDVI.js +2 -0
- package/dist/reconcile-cmd-2QHZML2L.js +2 -0
- package/dist/{reconcile-deps-GMQA6ULT.js → reconcile-deps-ZBWUY3SM.js} +2 -2
- package/dist/{reconcile-engine-XLLYS5ZB.js → reconcile-engine-YC4RQYF2.js} +1 -1
- package/dist/{recording-banner-CQBXZMT3.js → recording-banner-7E75ERQJ.js} +1 -1
- package/dist/{records-EW4PIJ5W.js → records-JLS63SDI.js} +1 -1
- package/dist/registry-JJTRUPH7.js +2 -0
- package/dist/{require-project-folder-K3E3QIOZ.js → require-project-folder-LBUYWQOF.js} +1 -1
- package/dist/{resolve-run-intent-3CENNCF3.js → resolve-run-intent-GHISMXLZ.js} +1 -1
- package/dist/{resolver-PSNP72H4.js → resolver-7JC5VZ4S.js} +1 -1
- package/dist/{revert-RXHWWUMQ.js → revert-PRR3D4XM.js} +1 -1
- package/dist/{review-cmd-JUOWTME4.js → review-cmd-SAGIKWEW.js} +1 -1
- package/dist/run-43ACVPJK.js +2 -0
- package/dist/run-EOTOXNQO.js +2 -0
- package/dist/{run-test-md-XBM6RMCI.js → run-test-md-5LPCKCW7.js} +2 -2
- package/dist/{sessions-cmd-PGE6LP2W.js → sessions-cmd-VDQGRBEM.js} +1 -1
- package/dist/{skill-installer-FBOPYFYS.js → skill-installer-YQPZZB7I.js} +1 -1
- package/dist/{spawner-URQ5OAY7.js → spawner-X2FOOONV.js} +1 -1
- package/dist/{structured-answers-BZWJUX22.js → structured-answers-YAVW65G4.js} +1 -1
- package/dist/tcg-generate-V4QRNEZV.js +2 -0
- package/dist/testmd-actions-2UMU3QMV.js +2 -0
- package/dist/testmd-sync-UBXDLWYD.js +2 -0
- package/dist/token-refresh-NL5AM446.js +2 -0
- package/dist/{validate-basic-BXBHTTTO.js → validate-basic-GTSVZFQI.js} +1 -1
- package/dist/variable-receipt-IHQAYWMZ.js +2 -0
- package/dist/verdicts-QU6W3TUF.js +2 -0
- package/dist/{version-check-BGHE3LAK.js → version-check-IPEPJZDX.js} +1 -1
- package/dist/{view-cmd-XD5ENSML.js → view-cmd-SXXNDZIC.js} +1 -1
- package/dist/{walk-session-EYBUURRA.js → walk-session-7JVB4Z5S.js} +1 -1
- package/dist/{with-telemetry-L3SO6J3L.js → with-telemetry-LRI7H6DH.js} +1 -1
- package/package.json +11 -11
- package/dist/EvidenceViewOffer-2T2ZGHIF.js +0 -2
- package/dist/FolderPicker-LTQW4YNR.js +0 -2
- package/dist/SingleShotApp-KXZF5ZJM.js +0 -2
- package/dist/TestMdRunView-6X6W5YAP.js +0 -2
- package/dist/bridge-WFSSMJ57.js +0 -2
- package/dist/chat-controller-6GW2HSJP.js +0 -2
- package/dist/chunk-2KQF6WLX.js +0 -363
- package/dist/chunk-DEUDRSU7.js +0 -2
- package/dist/chunk-DPUV6OSP.js +0 -2
- package/dist/chunk-JJJREAFQ.js +0 -2
- package/dist/chunk-M7CGNE2D.js +0 -37
- package/dist/chunk-NGASEXVA.js +0 -27
- package/dist/design-committer-2BQVZPO4.js +0 -2
- package/dist/dispatch-NE35HS5F.js +0 -2
- package/dist/evolve-cmd-I4Z6IPIM.js +0 -2
- package/dist/explain-O3A2HZWD.js +0 -2
- package/dist/ingest-WTPY2VLS.js +0 -2
- package/dist/ingest-cmd-GOPW3SNF.js +0 -2
- package/dist/install-BDHZVEY4.js +0 -2
- package/dist/list-commands-CJCEW7MQ.js +0 -2
- package/dist/login-flow-DLG2WHSZ.js +0 -2
- package/dist/pipeline-B2TYZBMB.js +0 -2
- package/dist/prepare-target-JGVB7OKC.js +0 -2
- package/dist/readmodel-YDLGQDMH.js +0 -2
- package/dist/reconcile-cmd-6ILIXD3U.js +0 -2
- package/dist/registry-AA5YIO5Y.js +0 -2
- package/dist/run-6CMGGU2W.js +0 -2
- package/dist/run-PZIYMD35.js +0 -2
- package/dist/tcg-generate-BPLQ7WJ5.js +0 -2
- package/dist/testmd-actions-WJS2YM7B.js +0 -2
- package/dist/testmd-sync-TPUBEORI.js +0 -2
- package/dist/token-refresh-IT4LVE2H.js +0 -2
- package/dist/verdicts-J5MJHUGG.js +0 -2
package/dist/chunk-2KQF6WLX.js
DELETED
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as Je}from"./chunk-ZKSN2SJ7.js";import{a as Qe,b as ue}from"./chunk-6GH4DRKR.js";import{a as X,b as je,e as le,f as de,g as Fe,h as We}from"./chunk-NLSR2IFN.js";import{a as Be,c as Ue,d as He,e as me,f as ze}from"./chunk-QHSF2CXK.js";import{a as Pe,b as qe,c as Ne}from"./chunk-DLJIML73.js";import{a as Te,b as Ie,c as Oe}from"./chunk-BB2W35TW.js";import{a as Ve,b as Ke}from"./chunk-JUJ4SAGH.js";import{a as Me}from"./chunk-L2TV4G56.js";import{c as Le}from"./chunk-B7K5WOOU.js";import{a as Ce,e as Ae}from"./chunk-DP7GPS6S.js";import{a as Ge}from"./chunk-GX3FPJUG.js";import{c as Ye}from"./chunk-CQKKDIKA.js";import{b as ve,c as we,e as ke,f as Se,g as xe,h as ae,k as oe,l as ce}from"./chunk-NP3VGFZM.js";import{d as ye}from"./chunk-KRL2BDI5.js";import{b as ne}from"./chunk-VZ7KXRXB.js";import{a as be,b as re}from"./chunk-IDX3TOPY.js";import{C as F}from"./chunk-R4EGL7VM.js";import{g as Re}from"./chunk-OXHMUZJV.js";import{a as De,e as $e,f as Ee}from"./chunk-DBIBROYW.js";import{d as V,e as Y}from"./chunk-AKX4VRRR.js";import{a as _e}from"./chunk-5EOX4MEY.js";import{mkdirSync as Rt,appendFileSync as Ct,rmdirSync as pt}from"fs";import{randomBytes as At}from"crypto";import{dirname as gt,join as he}from"path";function Xe(t,e){let n=[];for(let i of e??[]){let m=t.resolve(i.ref)?.tip??null;m!==i.cid&&n.push({ref:i.ref,pinned:i.cid,now:m})}return n}import{existsSync as pe,readFileSync as ge,readdirSync as _t}from"fs";import{join as ee}from"path";var Ze=`
|
|
3
|
-
version: 1
|
|
4
|
-
techniques:
|
|
5
|
-
- id: eqp
|
|
6
|
-
name: "Equivalence partitioning"
|
|
7
|
-
applies_hint: "any constrained input"
|
|
8
|
-
emits: [absolute, forbidden-presence]
|
|
9
|
-
- id: bva
|
|
10
|
-
name: "Boundary value analysis"
|
|
11
|
-
applies_hint: "input has an ordered range or length"
|
|
12
|
-
emits: [absolute, forbidden-presence]
|
|
13
|
-
- id: negative
|
|
14
|
-
name: "Negative / error"
|
|
15
|
-
applies_hint: "any input or action that can fail"
|
|
16
|
-
emits: [forbidden-presence]
|
|
17
|
-
- id: state_flow
|
|
18
|
-
name: "State / flow"
|
|
19
|
-
applies_hint: "the AC sits in a multi-step flow"
|
|
20
|
-
emits: [state-transition]
|
|
21
|
-
- id: crud
|
|
22
|
-
name: "CRUD round-trip"
|
|
23
|
-
applies_hint: "AC touches a persisted resource"
|
|
24
|
-
emits: [delta, presence, forbidden-presence]
|
|
25
|
-
- id: auth
|
|
26
|
-
name: "Auth / permission"
|
|
27
|
-
applies_hint: "AC is behind a gate or role"
|
|
28
|
-
emits: [forbidden-presence, presence]
|
|
29
|
-
- id: api_contract
|
|
30
|
-
name: "API-contract"
|
|
31
|
-
applies_hint: "surface is REST/GraphQL"
|
|
32
|
-
emits: [absolute]
|
|
33
|
-
- id: concurrency
|
|
34
|
-
name: "Concurrency / race"
|
|
35
|
-
applies_hint: "high-risk (money / data-loss) or shared-resource AC"
|
|
36
|
-
emits: [state-transition, forbidden-presence]
|
|
37
|
-
- id: idempotency
|
|
38
|
-
name: "Idempotency / retry"
|
|
39
|
-
applies_hint: "money or write operations"
|
|
40
|
-
emits: [delta]
|
|
41
|
-
- id: i18n
|
|
42
|
-
name: "i18n / l10n"
|
|
43
|
-
applies_hint: "AC renders user text or formats numbers/dates/currency"
|
|
44
|
-
emits: [presence, absolute]
|
|
45
|
-
- id: a11y
|
|
46
|
-
name: "a11y"
|
|
47
|
-
applies_hint: "any rendered surface"
|
|
48
|
-
emits: [presence, absolute]
|
|
49
|
-
- id: responsiveness
|
|
50
|
-
name: "Responsiveness / layout"
|
|
51
|
-
applies_hint: "rendered surface"
|
|
52
|
-
emits: [presence, forbidden-presence]
|
|
53
|
-
- id: empty_state
|
|
54
|
-
name: "Empty / null / zero state"
|
|
55
|
-
applies_hint: "list / search / collection AC"
|
|
56
|
-
emits: [presence]
|
|
57
|
-
- id: overflow_underflow
|
|
58
|
-
name: "Overflow / underflow"
|
|
59
|
-
applies_hint: "numeric or quantity AC (R9: explicit underflow/overflow)"
|
|
60
|
-
emits: [forbidden-presence]
|
|
61
|
-
- id: persistence
|
|
62
|
-
name: "Persistence / refresh"
|
|
63
|
-
applies_hint: "AC asserts durable state"
|
|
64
|
-
emits: [absolute]
|
|
65
|
-
- id: temporal
|
|
66
|
-
name: "Time / timezone / expiry"
|
|
67
|
-
applies_hint: "AC involves dates, TTLs, schedules"
|
|
68
|
-
emits: [state-transition, forbidden-presence]
|
|
69
|
-
- id: currency
|
|
70
|
-
name: "Currency / rounding"
|
|
71
|
-
applies_hint: "money AC"
|
|
72
|
-
emits: [absolute]
|
|
73
|
-
- id: pagination
|
|
74
|
-
name: "Pagination / sort / filter"
|
|
75
|
-
applies_hint: "list / search AC"
|
|
76
|
-
emits: [absolute, presence]
|
|
77
|
-
- id: file_media
|
|
78
|
-
name: "File / media"
|
|
79
|
-
applies_hint: "upload surface"
|
|
80
|
-
emits: [forbidden-presence]
|
|
81
|
-
- id: notification
|
|
82
|
-
name: "Notification / async-effect"
|
|
83
|
-
applies_hint: "AC produces an out-of-band effect (email/SMS/push)"
|
|
84
|
-
emits: [presence, delta]
|
|
85
|
-
`;var et={"web-form":`
|
|
86
|
-
id: web-form
|
|
87
|
-
name: "Web form"
|
|
88
|
-
version: 1
|
|
89
|
-
applies_when: >
|
|
90
|
-
The AC concerns a data-entry form: input fields, required fields, submit,
|
|
91
|
-
validation messages.
|
|
92
|
-
candidate_checks:
|
|
93
|
-
- id: field-validation
|
|
94
|
-
family: negative
|
|
95
|
-
measurable_example: "Enter 'abc' in a numeric quantity field \u2192 inline error 'must be a number', value not accepted"
|
|
96
|
-
emits: forbidden-presence
|
|
97
|
-
- id: required-fields
|
|
98
|
-
family: negative
|
|
99
|
-
measurable_example: "Submit with a required field empty \u2192 submit blocked, field flagged"
|
|
100
|
-
emits: forbidden-presence
|
|
101
|
-
- id: formats
|
|
102
|
-
family: negative
|
|
103
|
-
measurable_example: "Email without @ rejected; valid accepted"
|
|
104
|
-
emits: forbidden-presence
|
|
105
|
-
- id: empty-state
|
|
106
|
-
family: empty_state
|
|
107
|
-
measurable_example: "First load: no stale values, placeholders shown"
|
|
108
|
-
emits: presence
|
|
109
|
-
- id: error-messages
|
|
110
|
-
family: negative
|
|
111
|
-
measurable_example: "Each error is specific and tied to its field"
|
|
112
|
-
emits: presence
|
|
113
|
-
- id: a11y
|
|
114
|
-
family: a11y
|
|
115
|
-
measurable_example: "Every input has a programmatic label; keyboard-only submit works"
|
|
116
|
-
emits: presence
|
|
117
|
-
- id: responsiveness
|
|
118
|
-
family: responsiveness
|
|
119
|
-
measurable_example: "No field overlap at 1280/768/375 px"
|
|
120
|
-
emits: forbidden-presence
|
|
121
|
-
`,"rest-graphql-api":`
|
|
122
|
-
id: rest-graphql-api
|
|
123
|
-
name: "REST / GraphQL API"
|
|
124
|
-
version: 1
|
|
125
|
-
applies_when: >
|
|
126
|
-
The surface is an HTTP/GraphQL endpoint.
|
|
127
|
-
candidate_checks:
|
|
128
|
-
- id: response-shape
|
|
129
|
-
family: api_contract
|
|
130
|
-
measurable_example: "Body validates against the declared schema"
|
|
131
|
-
emits: absolute
|
|
132
|
-
- id: status-codes
|
|
133
|
-
family: api_contract
|
|
134
|
-
measurable_example: "GET 200, POST 201, missing 404, bad 400, unauth 401"
|
|
135
|
-
emits: absolute
|
|
136
|
-
- id: verbs
|
|
137
|
-
family: idempotency
|
|
138
|
-
measurable_example: "PUT is idempotent, POST is not"
|
|
139
|
-
emits: delta
|
|
140
|
-
- id: bad-payloads
|
|
141
|
-
family: negative
|
|
142
|
-
measurable_example: "Malformed JSON \u2192 400, never 500"
|
|
143
|
-
emits: absolute
|
|
144
|
-
- id: idempotency
|
|
145
|
-
family: idempotency
|
|
146
|
-
measurable_example: "Same POST with idempotency-key twice \u2192 one effect"
|
|
147
|
-
emits: delta
|
|
148
|
-
- id: pagination
|
|
149
|
-
family: pagination
|
|
150
|
-
measurable_example: "Page beyond last \u2192 empty list, not error; cursor stable"
|
|
151
|
-
emits: absolute
|
|
152
|
-
- id: versioning
|
|
153
|
-
family: api_contract
|
|
154
|
-
measurable_example: "v1 contract unchanged after v2 ships"
|
|
155
|
-
emits: absolute
|
|
156
|
-
- id: rate-limits
|
|
157
|
-
family: api_contract
|
|
158
|
-
measurable_example: "Over the limit \u2192 429 with retry-after"
|
|
159
|
-
emits: absolute
|
|
160
|
-
`,"mobile-native":`
|
|
161
|
-
id: mobile-native
|
|
162
|
-
name: "Mobile native"
|
|
163
|
-
version: 2
|
|
164
|
-
applies_when: >
|
|
165
|
-
iOS/Android native surface.
|
|
166
|
-
candidate_checks:
|
|
167
|
-
- id: interruptions
|
|
168
|
-
family: state_flow
|
|
169
|
-
measurable_example: "Incoming call mid-flow \u2192 state preserved on return \u2014 no device control: promises here become gaps, not tests"
|
|
170
|
-
emits: state-transition
|
|
171
|
-
- id: network-transitions
|
|
172
|
-
family: state_flow
|
|
173
|
-
measurable_example: "wifi\u2192cellular\u21924G drop: no data loss, graceful retry \u2014 no connectivity control: promises here become gaps, not tests"
|
|
174
|
-
emits: state-transition
|
|
175
|
-
- id: permissions
|
|
176
|
-
family: negative
|
|
177
|
-
measurable_example: "Deny camera \u2192 feature degrades, no crash \u2014 the OS dialog is tappable UI (exercise Allow/Deny on screen); only programmatic grant/deny or pre-seeded permission state has no control"
|
|
178
|
-
emits: forbidden-presence
|
|
179
|
-
- id: orientation
|
|
180
|
-
family: persistence
|
|
181
|
-
measurable_example: "Rotate mid-form \u2192 input preserved"
|
|
182
|
-
emits: absolute
|
|
183
|
-
- id: deep-links
|
|
184
|
-
family: state_flow
|
|
185
|
-
measurable_example: "Cold-start deep link lands on the right screen with auth \u2014 legal when the test states the exact link target"
|
|
186
|
-
emits: state-transition
|
|
187
|
-
- id: state-persistence
|
|
188
|
-
family: persistence
|
|
189
|
-
measurable_example: "Kill + relaunch \u2192 resume where left off"
|
|
190
|
-
emits: absolute
|
|
191
|
-
- id: localization
|
|
192
|
-
family: i18n
|
|
193
|
-
measurable_example: "Device locale switch reformats and re-translates \u2014 no device control: promises here become gaps, not tests"
|
|
194
|
-
emits: presence
|
|
195
|
-
`,"stateful-flow":`
|
|
196
|
-
id: stateful-flow
|
|
197
|
-
name: "Stateful flow"
|
|
198
|
-
version: 1
|
|
199
|
-
applies_when: >
|
|
200
|
-
Multi-step wizard / checkout / onboarding.
|
|
201
|
-
candidate_checks:
|
|
202
|
-
- id: valid-transitions
|
|
203
|
-
family: state_flow
|
|
204
|
-
measurable_example: "Each step advances only when its precondition is met"
|
|
205
|
-
emits: state-transition
|
|
206
|
-
- id: invalid-transitions
|
|
207
|
-
family: state_flow
|
|
208
|
-
measurable_example: "Can't jump to step 3 with step 2 incomplete"
|
|
209
|
-
emits: forbidden-presence
|
|
210
|
-
- id: back-and-abandon
|
|
211
|
-
family: state_flow
|
|
212
|
-
measurable_example: "Back from step 3, then abandon \u2192 no partial commit"
|
|
213
|
-
emits: forbidden-presence
|
|
214
|
-
- id: refresh-persistence
|
|
215
|
-
family: persistence
|
|
216
|
-
measurable_example: "Reload at step 2 \u2192 still at step 2 with data"
|
|
217
|
-
emits: absolute
|
|
218
|
-
- id: resume
|
|
219
|
-
family: persistence
|
|
220
|
-
measurable_example: "Return later \u2192 resume the saved flow"
|
|
221
|
-
emits: absolute
|
|
222
|
-
- id: double-submission
|
|
223
|
-
family: idempotency
|
|
224
|
-
measurable_example: "Double-click submit \u2192 exactly one submission"
|
|
225
|
-
emits: delta
|
|
226
|
-
`,"data-crud":`
|
|
227
|
-
id: data-crud
|
|
228
|
-
name: "Data CRUD"
|
|
229
|
-
version: 1
|
|
230
|
-
applies_when: >
|
|
231
|
-
A persisted record.
|
|
232
|
-
candidate_checks:
|
|
233
|
-
- id: crud-round-trip
|
|
234
|
-
family: crud
|
|
235
|
-
measurable_example: "Create \u2192 read shows it \u2192 update \u2192 read shows the change \u2192 delete \u2192 read 404"
|
|
236
|
-
emits: state-transition
|
|
237
|
-
- id: retry-safety
|
|
238
|
-
family: idempotency
|
|
239
|
-
measurable_example: "Retried create with same key \u2192 one row"
|
|
240
|
-
emits: delta
|
|
241
|
-
- id: concurrency-lost-update
|
|
242
|
-
family: concurrency
|
|
243
|
-
measurable_example: "Two writers, last must not silently clobber \u2192 conflict surfaced"
|
|
244
|
-
emits: forbidden-presence
|
|
245
|
-
- id: delete-cascade
|
|
246
|
-
family: crud
|
|
247
|
-
measurable_example: "Delete parent \u2192 children handled per rule"
|
|
248
|
-
emits: state-transition
|
|
249
|
-
- id: referential-consistency
|
|
250
|
-
family: crud
|
|
251
|
-
measurable_example: "Can't create a child for a missing parent"
|
|
252
|
-
emits: forbidden-presence
|
|
253
|
-
`,"auth-gated":`
|
|
254
|
-
id: auth-gated
|
|
255
|
-
name: "Auth gated"
|
|
256
|
-
version: 1
|
|
257
|
-
applies_when: >
|
|
258
|
-
Behind login/role.
|
|
259
|
-
candidate_checks:
|
|
260
|
-
- id: login-gate
|
|
261
|
-
family: auth
|
|
262
|
-
measurable_example: "Anonymous \u2192 redirected to login, not the resource"
|
|
263
|
-
emits: forbidden-presence
|
|
264
|
-
- id: role-permission-matrix
|
|
265
|
-
family: auth
|
|
266
|
-
measurable_example: "For each role \xD7 action: allowed/denied as specified"
|
|
267
|
-
emits: absolute
|
|
268
|
-
- id: cross-user-record
|
|
269
|
-
family: auth
|
|
270
|
-
measurable_example: "User A cannot read/edit user B's record by id"
|
|
271
|
-
emits: forbidden-presence
|
|
272
|
-
- id: token-session-expiry
|
|
273
|
-
family: auth
|
|
274
|
-
measurable_example: "Expired token \u2192 401/redirect, no stale access"
|
|
275
|
-
emits: forbidden-presence
|
|
276
|
-
- id: privilege-escalation
|
|
277
|
-
family: auth
|
|
278
|
-
measurable_example: "Non-admin cannot reach an admin action by direct URL/API"
|
|
279
|
-
emits: forbidden-presence
|
|
280
|
-
`,"search-list":`
|
|
281
|
-
id: search-list
|
|
282
|
-
name: "Search / list"
|
|
283
|
-
version: 1
|
|
284
|
-
applies_when: >
|
|
285
|
-
Search results / list views.
|
|
286
|
-
candidate_checks:
|
|
287
|
-
- id: pagination
|
|
288
|
-
family: pagination
|
|
289
|
-
measurable_example: "First/last/empty page correct; total accurate"
|
|
290
|
-
emits: absolute
|
|
291
|
-
- id: sorting
|
|
292
|
-
family: pagination
|
|
293
|
-
measurable_example: "Sort asc/desc actually orders; ties stable"
|
|
294
|
-
emits: absolute
|
|
295
|
-
- id: filtering
|
|
296
|
-
family: pagination
|
|
297
|
-
measurable_example: "Each filter narrows correctly; combined filters AND"
|
|
298
|
-
emits: absolute
|
|
299
|
-
- id: empty-state
|
|
300
|
-
family: empty_state
|
|
301
|
-
measurable_example: "No results \u2192 friendly empty state, not blank/error"
|
|
302
|
-
emits: presence
|
|
303
|
-
- id: invalid-input
|
|
304
|
-
family: negative
|
|
305
|
-
measurable_example: "Garbage query \u2192 no crash, sane result"
|
|
306
|
-
emits: forbidden-presence
|
|
307
|
-
- id: length-limits
|
|
308
|
-
family: bva
|
|
309
|
-
measurable_example: "Max-length query handled"
|
|
310
|
-
emits: absolute
|
|
311
|
-
- id: locale
|
|
312
|
-
family: i18n
|
|
313
|
-
measurable_example: "Locale-correct collation/casing"
|
|
314
|
-
emits: presence
|
|
315
|
-
`};var tt=`
|
|
316
|
-
version: 3
|
|
317
|
-
principles:
|
|
318
|
-
- "Each step is one complete OBJECTIVE the executing agent achieves autonomously \u2014 state the goal and the path, never low-level actions (the agent emits its own actions)."
|
|
319
|
-
- "One objective (or tightly-related items of one goal) per step; unrelated goals split."
|
|
320
|
-
- "Verbose path: name site or app, page or screen, section, panel, control, state \u2014 'On the search results page for Noida, in the filter panel's Budget section, set min to 50L and max to 1Cr'."
|
|
321
|
-
- "Self-contained: concrete values inline; never 'as defined in the scenario' \u2014 the agent cannot see the graph."
|
|
322
|
-
- "Two surfaces: WEB tests run in the kane-cli browser agent; MOBILE tests run in the kane-cli mobile agent on a local Android emulator / iOS simulator (native app). One surface per test; imports/reuse only same-surface units."
|
|
323
|
-
- "In scope: web-browser behavior, mobile emulator/simulator native-app behavior, and direct API calls. NOT in scope: out-of-band email/SMS, backend state with no web, app-screen, or API surface."
|
|
324
|
-
verification:
|
|
325
|
-
- "Phrase checks against what the test's own surface can observe:"
|
|
326
|
-
- "WEB Visual \u2014 visible text, labels, counts, prices ('verify the price is 29.99', 'the Sold out label is shown')."
|
|
327
|
-
- "WEB Textual/DOM \u2014 element states/attributes ('the Add button is disabled', 'the placeholder of the search box is \u2026')."
|
|
328
|
-
- "WEB URL \u2014 'URL contains /checkout'. Title \u2014 'page title contains \u2026'."
|
|
329
|
-
- "WEB DevTools/Network \u2014 'no API calls returned 5xx', 'the POST /api/login returned 200'. Console \u2014 'no console errors'. Performance \u2014 'LCP under 2500ms'. Cookies/localStorage \u2014 'a cookie named session_id exists'."
|
|
330
|
-
- "MOBILE Visual \u2014 on-screen text, labels, counts, states ('the Upcoming list shows 2 reservations', 'a Booking cancelled toast is shown')."
|
|
331
|
-
- "MOBILE Element \u2014 native accessibility-tree states ('the Pay button is disabled', 'the Remember me switch is on')."
|
|
332
|
-
- "MOBILE Network (environment-dependent) \u2014 the app's own captured traffic ('the POST /api/login returned 200') and direct API calls ('call GET /api/bookings and verify the cancelled booking is absent') need a capture/API-wired run environment; when the promise is observable on-screen, prefer the screen."
|
|
333
|
-
- "MOBILE Lifecycle \u2014 background/foreground, terminate/relaunch (only when the objective closes the app), orientation, deep links with a stated target ('background the app and return; the draft is preserved'). OS permission dialogs are tappable UI \u2014 exercising Allow/Deny on screen is legal."
|
|
334
|
-
- "MOBILE ILLEGAL \u2014 URL, page Title, browser console, page-performance: none exist on a native app. Cookies/localStorage: WebView-only AND write-only \u2014 never a read check. Keyboard-visibility: illegal on Android (default sessions suppress the soft keyboard); iOS renders it as ordinary elements. No control exists \u2192 gap, never a test: incoming call/SMS, posting notifications, wifi/airplane switches, locale/timezone, clipboard reads, on-device DB/file reads (the db-query tool reads a configured backend DB, never the device), geolocation, biometrics, programmatic permission pre-seeding. Platform-conditional: notification-shade observation and tab handling are Android-only \u2014 gap iOS notification promises."
|
|
335
|
-
- "Assertions are the CLOSING CLAUSE of the step that performed the action \u2014 '\u2026swipe the row left, then assert a Cancel action is shown'. Say assert, not verify. Never a standalone assertion step, never a restated summary check at the end."
|
|
336
|
-
- "Setup steps stay clean: a step with no verifies tags states its goal plainly and carries NO assert clause \u2014 failing to reach the goal is signal enough."
|
|
337
|
-
- "Tag the proof: a step whose assert clause proves acceptance criteria lists them in its verifies field \u2014 every AC is proven by the step that observes it."
|
|
338
|
-
- "Assert the outcome, never the trigger: 'Verify the Submit button is visible' fails exactly when the action worked \u2014 assert what the action changed."
|
|
339
|
-
- "A UI-commit confirm is an action, not a check: 'confirm the dialog' presses a control; the check is the resulting state ('\u2026 then assert the banner reads Order placed')."
|
|
340
|
-
- "Intent for the actions, literal for the data: goals for verbs ('Log in with {{user}}'), literal or {{variable}} for values."
|
|
341
|
-
- "Extractions: 'Store \u2026 as name' \u2014 vague verbs (read/tell/report) do NOT persist values."
|
|
342
|
-
- "Baselines/deltas are EXTRACTIONS on both surfaces: 'store the result count as baseline_count' BEFORE the action; compare after. Never an abstract 'capture the state'."
|
|
343
|
-
variables:
|
|
344
|
-
- "Credentials and environment values are {{name}} variables; concrete domain values from the source stay literal."
|
|
345
|
-
- "A value no evidence supplies (start URL, test account, seed data) is ASKED for \u2014 actual value or a variable name \u2014 never invented."
|
|
346
|
-
pitfalls:
|
|
347
|
-
- "A WEB test without a starting URL cannot run \u2014 its first step names it."
|
|
348
|
-
- "A MOBILE test declares its platform as the typed target field; kane writes target:/app: frontmatter into the minted file and the run dispatches on it. Its first step launches the app \u2014 never a URL, never a [mobile:] marker. App data PERSISTS between runs (no reset): never assume first-install or signed-out state."
|
|
349
|
-
- "'Test the checkout flow' has no end state \u2014 state what done looks like."
|
|
350
|
-
- "Do not cram many unrelated operations into one step; do not reference data outside the step."
|
|
351
|
-
- "A step whose only content is an assertion is a smell \u2014 fold it into the action step before it."
|
|
352
|
-
`;var bt=["presence","forbidden-presence","count","delta","state-transition","absolute","bound","propagation","latency","graded"];function nt(t,e){for(let n of t)if(!bt.includes(n))throw new Error(`${e}: emits '${n}' is not an oracle kind`)}function st(t,e){let n=ne(t);if(!n||!Array.isArray(n.techniques))throw new Error(`${e}: expected { techniques: [...] }`);for(let i of n.techniques){if(!i.id||!i.name||!i.applies_hint||!Array.isArray(i.emits))throw new Error(`${e}: technique '${i?.id??"?"}' missing id/name/applies_hint/emits`);nt(i.emits,`${e}: technique '${i.id}'`)}return n.techniques}function it(t,e){let n=ne(t);if(!n||!n.id||!n.name||!n.applies_when||!Array.isArray(n.candidate_checks))throw new Error(`${e}: profile missing id/name/applies_when/candidate_checks`);for(let i of n.candidate_checks){if(!i.id||!i.family||!i.measurable_example||!i.emits)throw new Error(`${e}: candidate_check '${i?.id??"?"}' missing id/family/measurable_example/emits`);nt([i.emits],`${e}: check '${i.id}'`)}return n}function rt(t){let e=new Map(st(Ze,"packaged techniques").map(i=>[i.id,i])),n=ee(t,"design","techniques.yaml");if(pe(n))for(let i of st(ge(n,"utf8"),n))e.set(i.id,i);return[...e.values()]}function at(t){let e=new Map(Object.entries(et).map(([i,m])=>[i,it(m,`packaged profile '${i}'`)])),n=ee(t,"design","profiles");if(pe(n))for(let i of _t(n).filter(m=>m.endsWith(".yaml")||m.endsWith(".yml")).sort()){let m=it(ge(ee(n,i),"utf8"),ee(n,i));e.set(m.id,m)}return[...e.values()]}function ot(t){let e=ee(t,"design","runner-grammar.yaml");return pe(e)?ge(e,"utf8"):tt}function te(t,e){return!t.superseded.has(e)}function fe(t,e,n){return{cid:e,logical_id:t.nameOf.get(e)??null,content:n}}async function ct(t,e,n,i,m){let r=await je(t,"search_similar",{text:e,label:n,k:i},m);return r.ok&&Array.isArray(r.result)?r.result:[]}async function lt(t,e,n={}){let i=F(t),m=i.resolve(e);if(!m)throw new Error(`assembleDesignContext: unknown use-case '${e}' (run designGate first)`);let r=m.tip,v=i.getNode(r);if(!v||v.label!==V.USECASE)throw new Error(`assembleDesignContext: '${e}' is not a use-case (run designGate first)`);let P=i.derivesInto(r).map(u=>({source_id:u.props.source_id??null,anchor:u.props.anchor??null})),y=[],I=new Set;for(let{cid:u,content:b}of i.byLabel(V.SCENARIO))te(i,u)&&i.edgesFrom(u).some(w=>w.type===Y.BELONGS_TO&&w.dst===r)&&(y.push(fe(i,u,b)),I.add(u));let k=[];for(let{cid:u,content:b}of i.byLabel(V.AC)){if(!te(i,u))continue;let w=i.edgesFrom(u).find(R=>R.type===Y.SCOPED_TO);!w||w.dst!==r&&!I.has(w.dst)||k.push({...fe(i,u,b),scoped_to:w.dst})}let S=Array.isArray(v.content.criteria)?v.content.criteria:[],_=[v.content.title,v.content.description,...S].filter(Boolean).join(`
|
|
353
|
-
`),N=(await ct(i,_,V.SCENARIO,10,n.embedSearch)).filter(u=>!I.has(u.cid)),K=[],D=new Set,L=[],g=[r],f=new Set([r]);for(;g.length>0;){let u=g.shift();for(let b of i.edgesFrom(u)){if(b.type!==Y.DEPENDS_ON||i.nodeLabel.get(b.dst)!==V.USECASE)continue;let w=i.tipOf(b.dst);f.has(w)||(f.add(w),L.push(w),g.push(w))}}for(let u of L){let b=`depends_on ${i.nameOf.get(u)??u.slice(0,19)}`;for(let{cid:w}of i.byLabel(V.SCENARIO))if(te(i,w)&&i.edgesFrom(w).some(R=>R.type===Y.BELONGS_TO&&R.dst===u))for(let R of i.edgesInto(w)){if(R.type!==Y.AUTOMATES||!te(i,R.src)||D.has(R.src))continue;D.add(R.src);let J=String(i.getNode(R.src)?.content.title??"");K.push({cid:R.src,logical_id:i.nameOf.get(R.src)??null,title:J,via:b})}}for(let u of await ct(i,_,V.TEST,5,n.embedSearch)){let{cid:b,title:w}=u;D.has(b)||(D.add(b),K.push({cid:b,logical_id:i.nameOf.get(b)??null,title:w??"",via:"similar"}))}let $=i.byLabel(V.STYLENOTE).filter(u=>te(i,u.cid)).sort((u,b)=>u.cid<b.cid?-1:1).slice(0,5).map(u=>`${String(u.content.statement)} [${String(u.content.learned_from_kind)}]`);return{usecase:fe(i,r,v.content),cites:P,committed_acs:k,existing:{scenarios:y,reuse_candidates:N},import_candidates:K,style_notes:$,techniques:rt(t),profiles:at(t),runner_grammar:ot(t),budget:{...n.max!=null?{max_pairs:n.max}:{},...n.strength!=null?{strength_override:n.strength}:{}},design_of:(()=>{let u=Ve(i,r);return u?{engine:u.engine,seq:u.seq}:null})()}}function dt(t){let e=n=>{if(Array.isArray(n))return n.map(e);if(n!==null&&typeof n=="object"){let i={};for(let m of Object.keys(n).sort())i[m]=e(n[m]);return i}return n};return JSON.stringify(e(t),null,1)}import{basename as vt,dirname as wt,resolve as kt}from"path";var yt=oe,St=new Set(["narrative","acs","scenarios","tests","exercises","gaps","scoped_to_repoints","judgements","phase"]);function xt(t){let e=/strength=(\d+)\s*(?:—|-)?\s*(.*)/.exec(t??"");return e?{strength:Number(e[1]),reason:e[2]||t||""}:{strength:2,reason:t??""}}function Dt(t,e,n=new Set,i=0){return yt(e,ce(t),n,i)}function $t(t,e,n,i){let m=e.scenarios?.find(S=>S.temp_ref===n.automates)??(()=>{let S=t.resolve(n.automates),_=S?t.getNode(S.tip)?.content:void 0;return _?{title:String(_.title??""),intent:String(_.intent??""),technique_notes:String(_.technique_notes??"")}:{}})(),r=[...(e.acs??[]).map(S=>({ref:S.temp_ref,text:S.text})),...n.verifies.filter(S=>!(e.acs??[]).some(_=>_.temp_ref===S)).map(S=>{let _=t.resolve(S);return{ref:S,text:_?String(t.getNode(_.tip)?.content.text??""):""}})],{test_md:v,objectives_yaml:P}=xe({title:n.title,steps:n.steps,check:n.check,check_prose:n.check_prose,reuses:n.reuses,...n.target?{target:n.target,...n.app?{app:n.app}:{}}:{}},{title:m.title,intent:m.intent},r),y=ae(Dt(t,v)),I=n.check,k={technique:m.technique_notes??"",profile_family:e.judgements?.find(S=>S.kind==="profile_family"&&(S.target===n.temp_ref||S.target===n.automates))?.rationale??"unspecified",anchor:I.verified_against,expected_how:e.judgements?.find(S=>S.kind==="expected_how"&&S.target===I.verified_against)?.rationale??`expected_mode: ${I.expected_mode??"inferred"}`,combinatorial:xt(m.technique_notes),surface_state:"absent",deferred_bindings:I.expected_mode==="runtime-derived"?1:0};return i.push({definitionId:y,rationale:k,anchorRef:I.verified_against,tempRef:n.temp_ref}),{temp_ref:n.temp_ref,title:n.title,automates:n.automates,verifies:n.verifies,check:n.check,definitionId:y,test_md_blob:v,objectives_blob:P,...n.reuses?.length?{reuses:n.reuses}:{},...n.surface_required!==void 0?{surface_required:n.surface_required}:{},...n.target?{target:n.target}:{},...n.target&&n.app?{app:n.app}:{}}}function Et(t,e){try{let n=t.resolve(e.automates);if(!n)return!1;let i=t.tipOf(n.cid)??n.cid;for(let m of t.edgesInto(i)){if(m.type!==Y.AUTOMATES)continue;let r=t.getNode(t.tipOf(m.src)??m.src)?.content,v=typeof r?.test_md_blob=="string"?r.test_md_blob:"";if(!v)continue;if(!v.split(`
|
|
354
|
-
`).some(y=>/^##\s/.test(y)&&!/—\s?assert/.test(y)&&ye.test(y)))return!0}return!1}catch{return!1}}function mt(t){let e=0,n=t.forceScope??null;return{terminalEventType:"design",async onProposalEvent(i){let m=a=>t.steer?(t.steer(`[auto-repair] ${a} \u2014 please re-finalize with this fixed.`),{proposal:null,error:null}):{proposal:null,error:a};if(i==null||typeof i!="object")return m("finalize_design payload is not an object");let r=i,v=Object.keys(r).filter(a=>!St.has(a));if(v.length>0)return m(`finalize_design carries ungated/unknown section(s): ${v.join(", ")} \u2014 mintable here: acs, scenarios, tests (+gaps)`);let P=new Map;for(let a of r.tests??[]){let d=P.get(a.automates);if(d)return m(`strict 1:1 violated in-payload: ${d} and ${a.temp_ref} both automate ${a.automates}`);if(P.set(a.automates,a.temp_ref),typeof a.app=="string"&&!/^APP/.test(a.app)&&!/[\/]/.test(a.app)&&!/\.(apk|zip|app)$/i.test(a.app))return m(`${a.temp_ref}: app '${a.app}' is neither a build path (.apk / .zip of an .app) nor an APP\u2026 upload id \u2014 omit the field when only a bundle id exists`)}let y=F(t.contextDir),I=/^design@(\d+)$/.exec(t.templateVersion?.()??"");if(I&&Number.parseInt(I[1],10)>=6)for(let a of r.tests??[]){if(!Array.isArray(a.steps??[]))return m(`${a.temp_ref}: steps must be an array of objective strings or {text, verifies} objects`);let d=new Set;for(let E of Array.isArray(a.steps)?a.steps:[])if(typeof E=="object"&&E.verifies)for(let O of E.verifies)d.add(O);let A=new Set(a.verifies??[]),C=[...A].filter(E=>!d.has(E)),G=[...d].filter(E=>!A.has(E));if(!(d.size===0&&Et(y,a))&&(d.size===0||C.length>0||G.length>0))return m(`${a.temp_ref}: every AC must be claimed by the step that proves it \u2014 `+(d.size===0?"no step carries verifies tags":`not claimed by any step: [${C.join(", ")}]; tagged but not in the test's verifies: [${G.join(", ")}]`))}t.force&&!t.resuming&&e===0&&n===null&&(n=Qe(y,t.ucRef));let k=y.resolve(t.ucRef),S=k?String(y.getNode(k.tip)?.content.risk??"med"):"med",_=[],N=new Set([t.ucRef,k?.cid,k?.tip].filter(Boolean)),K=a=>{if(N.has(a))return!0;let d=y.resolve(a);return d!=null&&(N.has(d.cid)||N.has(d.tip))},D;try{D={...r.acs?.length?{acs:r.acs.map(a=>({temp_ref:a.temp_ref,text:a.text,kind:a.kind,risk:a.risk??S,...a.expected_answer?{expected_answer:a.expected_answer}:{},...a.scoped_to&&!K(a.scoped_to)?{scope:{type:"scenario",ref:a.scoped_to}}:{}}))}:{},...r.scenarios?.length?{scenarios:r.scenarios}:{},...r.tests?.length?{tests:r.tests.map(a=>$t(y,r,a,_))}:{},...r.exercises?.length?{exercises:r.exercises}:{},...r.gaps?.length?{gaps:r.gaps}:{},...r.scoped_to_repoints?.length?{scoped_to_repoints:r.scoped_to_repoints}:{},...r.judgements?.length?{judgements:r.judgements}:{}}}catch(a){return m(a instanceof Error?a.message:String(a))}let L=r.phase??(r.tests?.length?"tests":r.scenarios?.length?"scenarios":r.acs?.length?"acs":"design"),g=(a,d={})=>({contextDir:t.contextDir,graph:a,ucRef:t.ucRef,sections:D,by:t.by,phase:L,...d,...t.templateVersion?{templateVersion:t.templateVersion()}:{},...t.engine?{engine:t.engine}:{},...n?.length?{forceScope:n}:{},...t.because?{reason:t.because}:{},finalizeTestBody:(()=>{let A=new Map((D.tests??[]).map(E=>[E.temp_ref,E])),C=new Map,G=(E,O,U)=>{let M=A.get(E);if(!M?.test_md_blob)return null;let H=C.get(E);if(H!==void 0)return H;if(U.has(E))return M.test_md_blob;U.add(E);let z=new Map;for(let s of M.reuses??[]){G(s,O,U);let c=O(s);c!==null&&c!==s&&z.set(s,c)}let q=M.verifies.map(O).filter(s=>s!==null),Q=Se(M.test_md_blob,z),{md:se,tagged:x}=ve(Q,O),W=x?se:ke(Q,q);return we(W,q),C.set(E,W),W};return(E,O)=>{if(!E.test_md_blob)return null;let U=G(E.temp_ref,O,new Set)??E.test_md_blob;if(U===E.test_md_blob)return null;let M=H=>{for(let z of A.keys())if(O(z)===H){let q=G(z,O,new Set);if(q!==null)return{body:q,cycleKey:`batch:${H}`,next:M}}return ce(y)(H)};return{test_md_blob:U,definitionId:ae(oe(U,M))}}})()}),f;if(t.protocol){let a=t.generationTicket,d=await Pe(t.protocol,{verb:"design",ucTargets:[{ref:t.ucRef}],newBuCandidates:[],sourcePins:[],readBasis:y.latestHash,...a?{generationTicket:a}:{}},A=>{let C=ue(g(A.graph,{eventIds:A.eventIds("design",1),sid:A.sid,...a&&!t.generationStamped?{generationTicket:a}:{}}));return C.errors!==null?{errors:C.errors}:{result:C,record:C.record}});d.ok&&"result"in d?(f=d.result,a&&!t.generationStamped&&(t.generationStamped=!0,t.generationTicket={...a,expected_prev_gen:a.next_gen})):d.ok?f={record:null,errors:null,minted:{},logicalIds:{},superseded:[],warnings:["commit already applied (recommit)"],finalizedTests:{}}:f={record:null,errors:d.kind==="validation"?d.errors:d.kind==="contended"?[{code:d.err.code,detail:`${t.ucRef} is held by ${d.err.holder?.owner_sid??"another session"}${d.err.holder?.alive?" (live)":" (stale)"} \u2014 try another use-case or wait for it to free`}]:d.kind==="drifted"?d.asks.map(C=>({code:"DRIFTED",detail:C.detail})):[{code:"UNSETTLED",detail:`concurrent activity kept moving the store (${d.attempts} attempts) \u2014 retry when the store is quieter`}],minted:{},logicalIds:{},superseded:[],warnings:[],finalizedTests:{}}}else f=ue(g(y));if(f.errors)return m("design commit failed: "+f.errors.map(a=>`${a.code}: ${a.detail}`).join("; "));let $=f.warnings.filter(a=>a.includes("\u2014 committed anyway; approve"));for(let a of f.warnings)(!$.includes(a)||$.length===1)&&t.note(`warning: ${a}`);$.length>1&&t.note(`warning: ${$.length} test link(s) refer to items still awaiting approval \u2014 saved anyway; review and approve those items in chat or via kane-cli context review`);let u=(a,d)=>a?`${a} ${d}${a>1?"s":""}`:null,b=[u(r.acs?.length,"AC"),u(r.scenarios?.length,"scenario"),u(r.tests?.length,"test"),u(r.gaps?.length,"gap")].filter(Boolean);t.aliases?.(Object.entries(f.minted).map(([a,d])=>({ref:a,cid:d,...f.logicalIds[a]?{id:f.logicalIds[a]}:{}})));{let a=`saved ${b.join(" \xB7 ")||"judgements/wiring"} as drafts`;(t.commitLine??t.note)(a)}let w=F(t.contextDir);t.onCommitted?.(w);for(let a of _){let d=f.logicalIds[a.anchorRef]??f.minted[a.anchorRef];Je(t.contextDir,f.finalizedTests[a.tempRef]??a.definitionId,{...a.rationale,anchor:d??a.rationale.anchor})}try{let a=Object.values(f.minted).filter(d=>w.getNode(d)?.label==="test");if(a.length>0){let d=wt(kt(t.contextDir)),A=Ye({graph:w,cids:a,cwd:d});A.wrote.length>0&&t.note(`\u2692 wrote ${A.wrote.map(C=>vt(C.path)).join(" \xB7 ")}`);for(let C of A.refused)t.note(`warning: could not create the test file for ${C.id} \u2014 ${C.reason}`)}}catch(a){t.note(`warning: the design was saved, but its test file could not be created (${a instanceof Error?a.message:String(a)})`)}t.event?.({type:"commit",acs:r.acs?.length??0,scenarios:r.scenarios?.length??0,tests:r.tests?.length??0,gaps:r.gaps?.length??0,warnings:f.warnings.length,minted:Object.entries(f.minted).map(([a,d])=>({temp_ref:a,cid:d,...f.logicalIds[a]?{logical_id:f.logicalIds[a]}:{}}))}),e+=1,n!==null&&(n=f.forceScopeRemaining??n,t.onForceScope?.(n));let R=Me({verb:"design",commitN:e,ucRef:t.ucRef,phase:L,committed:Object.entries(f.minted).map(([a,d])=>({temp_ref:a,cid:d,...f.logicalIds[a]?{logical_id:f.logicalIds[a]}:{}})),warnings:f.warnings},w),J=R.event.parity?.missing??[],Z=!!r.tests?.length&&J.length===0;return{proposal:f,error:null,receipt:R,...Z?{sessionComplete:Z}:{}}}}}function ut(t,e){return{type:"run_config",version:1,session_id:e.session_id,mode:e.mode,source:{source_id:`design:${t.usecase.logical_id??e.ucCid.slice(0,19)}`,source_cid:e.ucCid,kind:"design_context",numbered_text:dt({...t,session_mode:e.mode})},existing_use_cases:[],read_basis:e.readBasis,max_free_text_rounds:2,graph_reads:!0,verb:"design",chat:!0,design_budget:t.budget,topology:e.topology}}var ft=Symbol("design-out-tee");function Tt(t,e,n,i){return{terminalEventType:"design",async onProposalEvent(m){let r=m??{},v=["acs","scenarios","tests","gaps"].map(P=>r[P]?.length?`${r[P].length} ${P}`:null).filter(Boolean).join(" \xB7 ");return n?.("plan_payload",{payload:r}),t(`plan: finalize_design \u2014 ${v||"wiring/judgements only"} (nothing committed${i?`; full payload: ${X(i)}`:""})`),e?.({type:"plan",payload:r}),{proposal:r,error:null}}}}async function Is(t,e){let n=F(e.contextDir),i=null,m=null,r=t.useCase;if(t.resume){try{{let p=await ze(e.contextDir,t.resume,n,{deps:{onWarn:h=>e.out(`note: ${h}`)}});m=p,i=p.handle,p.drift.length>0&&(e.out(`note: sources changed since the pause: ${p.drift.map(h=>h.subject).join(", ")} \u2014 the design continues against the current versions`),e.emit?.({type:"stale_basis",sources:p.drift.map(h=>h.subject)}))}}catch(p){if(p instanceof be||p instanceof me)return e.out(`error: ${p.message}`),e.emit?.({type:"error",message:`error: ${p.message}`}),p instanceof me||p.code==="SESSION_MISSING"||p.code==="SESSION_EXPIRED"?2:1;throw p}let s=i.state,c=Be(s.verb,"design",t.resume);if(c)return e.out(c.message),e.emit?.({type:"error",message:c.message,code:c.code}),i.release(),2;if(r&&s.use_case&&r!==s.use_case){let p=`session ${t.resume} was designing ${s.use_case}; --use-case ${r} RETARGETS it`;if(!(t.confirmRetarget?await t.confirmRetarget(`${p} \u2014 continue with the new target?`):!1))return e.out(`error: ${p} \u2014 resume without --use-case to continue ${s.use_case}, or start a fresh session on ${r}`),e.emit?.({type:"error",code:"RETARGET_MISMATCH",message:p}),i.release(),2}if(r=r??s.use_case,s.uc_tip&&r){let p=n.resolve(r)?.tip;if(p&&p!==s.uc_tip){let h=`the use-case changed since the pause (${s.uc_tip.slice(0,19)}\u2026 \u2192 ${p.slice(0,19)}\u2026)`;if(!(t.confirmRetarget?await t.confirmRetarget(`${h} \u2014 re-ground and continue against the new version?`):!1))return e.out(`error: ${h} \u2014 resume interactively to re-ground, or abandon this session`),e.emit?.({type:"error",code:"UC_TIP_MOVED",message:h}),i.release(),2;e.emit?.({type:"stale_basis",usecase:r})}}let l=Xe(n,s.target_pins);if(l.length>0){let p=`items this session pinned have changed since it paused: ${l.map(T=>`${T.ref}${T.now===null?" (now gone)":""}`).join(", ")}`;if(!(t.confirmRetarget?await t.confirmRetarget(`${p} \u2014 re-ground and continue?`):!1))return e.out(`error: ${p} \u2014 resume interactively to re-ground, or abandon`),e.emit?.({type:"error",code:"TARGET_PIN_MOVED",message:p}),i.release(),2;i.save({target_pins:(s.target_pins??[]).map(T=>({ref:T.ref,cid:n.resolve(T.ref)?.tip??T.cid}))})}let o=[...new Set([...i.state.held_receipts??[],...m?.view.kane?.held_receipts??[]])];if(o.length>0)if(e.chat?.holdReceipt)for(let p of o)e.chat.holdReceipt(p);else e={...e,initialMessage:[o.join(`
|
|
355
|
-
|
|
356
|
-
`),e.initialMessage].filter(Boolean).join(`
|
|
357
|
-
|
|
358
|
-
`)};if(!r)return e.out(`error: session ${t.resume} predates use-case persistence \u2014 re-supply --use-case <ref>`),e.emit?.({type:"error",message:`error: session ${t.resume} predates use-case persistence \u2014 re-supply --use-case <ref>`}),i.release(),2}let v=t.resume?void 0:t.phase,P=!1;if(v!==void 0){let{checkPhaseEntry:s,phaseEntryCmd:c,phaseLadderFor:l}=await import("./phase-seed-2WI7KUYO.js");P=l(e.contextDir,n,r).length>0;let o=s(e.contextDir,n,r,v);if(!o.ok&&o.code==="UNKNOWN_PHASE")return e.out(`error: ${o.message}`),e.emit?.({type:"error",code:"UNKNOWN_PHASE",message:o.message}),i?.release(),2;if(!o.ok&&o.code==="PHASE_ORDER"){let p=t.askPhaseEntry?await t.askPhaseEntry({message:o.message,earliest:o.earliest}):"cancel";if(p==="earliest")e.out(`starting at ${o.earliest} instead (${o.missing.join(", ")} not committed yet)`),v=o.earliest;else if(p==="proceed")e.out(`note: entering at ${v} with ${o.missing.join(", ")} uncommitted \u2014 proceeding on your say-so`),e.emit?.({type:"phase_entry_override",phase:v,missing:o.missing});else{let h=(t.mode??"interactive")==="agent",T=c(r,o.earliest,h);return e.out(`error: ${o.message}`),e.emit?.({type:"error",code:"PHASE_ORDER",message:o.message,next:[{cmd:T,why:`${o.earliest} is the earliest uncommitted phase for ${r}`,title:`Start at ${o.earliest}`}]}),i?.release(),2}}}let y=!!(t.force||i?.state.force),I=!!(t.resume&&i),k=Ke(n,r,y||I||P);if(!k.ok){let s=(t.mode??"interactive")==="interactive";if(k.wall&&s&&t.askDesignEntry){let{captureForceScope:c}=await import("./design-committer-2BQVZPO4.js"),l=c(n,r).length,o=await t.askDesignEntry({wall:k.wall.kind,message:k.message,display:k.wall.display,impactPairs:l});if(o.pick==="redesign"||o.pick==="proceed"){if(!o.because.trim())return e.out("a redesign needs a reason (--because) \u2014 nothing executed"),i?.release(),2;e.out(o.pick==="redesign"?`redesigning ${k.wall.display} (${l} pair(s) superseded) \u2014 because: ${o.because.trim()}`:`proceeding against the stale design (noted) \u2014 because: ${o.because.trim()}`),t={...t,force:!0,because:t.because??o.because.trim()},y=!0}else return o.pick==="view"?(e.out(`view the existing design: kane-cli context view ${k.wall.display}`),i?.release(),0):o.pick==="refresh"?(e.out(`refresh it first: kane-cli maintain evolve ${k.wall.display}`),i?.release(),0):(e.out("nothing executed \u2014 list use-cases: kane-cli context list"),i?.release(),0)}else{e.out(`design: ${k.message}`);let c=k.wall&&t.mode==="agent"?[{cmd:`kane-cli context view ${k.wall.display}`,why:"view the existing design",title:"View the design"},...k.wall.kind==="designed-stale"?[{cmd:`kane-cli maintain evolve ${k.wall.display}`,why:"the use-case moved since the design \u2014 evolve refreshes it",title:"Evolve the design"}]:[],{cmd:`kane-cli design tests --use-case ${k.wall.display} --force --mode agent`,why:"redesign \u2014 supersedes the live scenario+test pairs",title:"Redesign"}]:void 0;return e.emit?.({type:"gate_refused",message:k.message,...c?{next:c}:{}}),i?.release(),k.code}}if(e.preflightTurn){let s=await e.preflightTurn();if(!s.ok)return e.out(s.message??"error: turn-endpoint preflight failed"),e.emit?.({type:"error",message:s.message??"error: turn-endpoint preflight failed",code:"PREFLIGHT"}),i?.release(),2}let S={contextDir:e.contextDir,resolveAlias:s=>qe(s,{env:process.env,auth:e.auth}),embed:(s,c)=>Ne(s,c,{env:process.env,auth:e.auth})};e.chat?.setWorking?.("assembling context\u2026");let _=await lt(e.contextDir,r,{max:t.max,strength:t.strength,embedSearch:S});if(t.priorDesign!==void 0&&(_.prior_design=t.priorDesign),t.changeDelta!==void 0&&(_.change_delta=t.changeDelta),t.because&&(_.because=t.because),v!==void 0){let{buildPhaseSeed:s}=await import("./phase-seed-2WI7KUYO.js"),c=s(e.contextDir,n,r,v);_.prior_design===void 0&&c.priorDesign!==void 0&&(_.prior_design=c.priorDesign),_.entry_phase=v,c.phaseLadder.length>0&&(_.phase_ladder=c.phaseLadder)}let N=e.now?.()??new Date,K=`${N.toISOString().replace(/[-:]/g,"").slice(0,15)}-${At(2).toString("hex")}`,D=t.mode??"interactive",L=D==="interactive"&&!!e.chat&&!e.nested,g=m?{...m.spawnConfig,mode:D}:ut(_,{session_id:t.resume??`design-${K}`,mode:D,ucCid:_.usecase.cid,readBasis:n.latestHash,topology:Ge("design")}),f={current:null};if(g.resume&&"schema"in g.resume){let s=g.resume.binding?.template_version;typeof s=="string"&&(f.current=s)}t.plan?g.chat=!1:g.chat=!0;let $=e.telemetry?.enabled?e.telemetry:void 0,u=$?_e($.ids.context_instance_id??null,"design",$.ids.session_id):he(e.contextDir,"logs",`design-${K}.log`);Rt(gt(u),{recursive:!0}),L||e.out(`trace: ${X(u)}`),e.emit?.({type:"run_start",mode:D,trace:u,use_case:r,...$?{session:$.ids.session_id}:{}});let b=(s,c,l)=>{try{Ct(u,JSON.stringify({ts:new Date().toISOString(),level:s==="error"?"error":"info",run_id:$?.ids.operation_id,...$?{user_session_id:$.ids.session_id}:{},kind:s,session_id:l,data:c})+`
|
|
359
|
-
`)}catch{}$?.wireTrace(s,c,l)};{let s=e.out;if(s[ft]!==!0){let c=l=>{b("transcript",{line:l}),s(l)};c[ft]=!0,e.out=c}}if(t.resume&&i){m||(g.resume={agent_state:i.state.agent_state}),e.out(`resuming design session ${t.resume}`),i.state.assumed.length>0&&e.out(`note: ${i.state.assumed.length} default(s) were assumed while you were away \u2014 kane-cli context sessions show ${t.resume} lists them`);try{let{readRecords:s}=await import("./records-EW4PIJ5W.js"),c=s(e.contextDir).records.filter(l=>l.sid===t.resume).map(l=>l.design_phase).filter(l=>l!=null&&typeof l.phase=="string");if(c.length>0){let l=c.map(p=>`${p.phase}${p.completeness==="partial"?" (partial)":""}`).join(" \u2192 "),o=`[kane] durable record for this session (${t.resume}) on ${r}: design phases already COMMITTED \u2014 ${l}. Those finalizes landed; do not re-send them. Continue from the next uncommitted phase, or finish if the design is complete.`;e={...e,initialMessage:[e.initialMessage,o].filter(Boolean).join(`
|
|
360
|
-
|
|
361
|
-
`)}}}catch{}t.message&&(e={...e,initialMessage:[e.initialMessage,t.message].filter(Boolean).join(`
|
|
362
|
-
|
|
363
|
-
`)})}let w=null,R={current:n},J={detach:null},Z=()=>{let s=J.detach;J.detach=null,s&&s()},a=(s,c)=>{let l=i;if(!l)return{};let o=s.ask,p=Fe({contextDir:s.contextDir,cwd:gt(s.contextDir),handle:l,note:h=>s.chat?s.chat.note(h):s.out(h),graphSlot:c,...s.now?{now:s.now}:{}});if(s.chat?.attachIngest){let h=s.chat;J.detach=h.attachIngest(async T=>{try{l.save({ingest_registry:de(l.state.ingest_registry,T,s.now?.()??new Date)});let B=await p({id:`attach-${l.state.sid}-${(l.state.ingest_registry??[]).length}`,ref:T,purpose:null});return B.ok?(h.deferBatch({source_id:B.result.source_id,cid:B.result.cid}),{ok:!0}):{ok:!1,error:B.error.message}}catch(B){return{ok:!1,error:B instanceof Error?B.message:String(B)}}})}return{ask:async h=>{let T=await o(h);if(Array.isArray(T)){let B=T.filter(j=>{if(j.free_text==null||j.free_text.trim()==="")return!1;let ie=h.find(ht=>ht.id===j.id);return j.selected_index!=null&&ie?.options[j.selected_index]?.input===!0}).map(j=>j.free_text.trim());if(B.length>0){let j=l.state.ingest_registry;for(let ie of B)j=de(j,ie,s.now?.()??new Date);l.save({ingest_registry:j})}}return T},ingest:p}};e.nested||e.chat?.attachOnCommitted?.(s=>{R.current=s});let d="";if(e.chat&&!t.plan&&!e.nested){let s=Le({contextDir:e.contextDir,graph:F(e.contextDir),sessionStamp:g.session_id,by:e.by??{kind:"human",id:"owner"}});s.errors===null||s.errors[0]?.code==="CONV_SOURCE_EXISTS"?(d=s.sourceId,e.chat.attachConversationSource?.(d),R.current=F(e.contextDir)):e.out(`warning: notes you add in chat can't be saved to the context this session (${s.errors[0]?.detail})`)}let A=F(e.contextDir),C;if(!t.plan){let s=Ie(A,r);if(I&&s!==null&&s.live){let c=A.resolve(r);C={uc_root:Te(A,c.cid),next_gen:s.gen,expected_prev_gen:s.gen}}else{let c=Oe(A,r,{...y?{force:!0}:{},because:t.because??(y?"forced redesign (--force)":void 0)});if("error"in c)return e.out(`design: ${c.error.detail}`),e.emit?.({type:"gate_refused",message:c.error.detail,code:c.error.code}),i?.release(),2;C=c}}let G=$e(e.contextDir,g.session_id),E=null,O=()=>{try{E?.release()}catch{}};if(!t.plan)try{E=G.acquire([Ee(A,r).key],{hold:"session",verb:"design"})}catch(s){if(s instanceof De&&s.code==="UC_HELD"){let c=s.holder,l=`design: ${r} is being designed by another session${c?.alive===!1?` \u2014 that session looks stopped; resume it with kane-cli design tests --resume ${c?.owner_sid??"<session>"}`:""} \u2014 pick another use-case (kane-cli design tests) or wait for it to finish`;return e.out(l),e.emit?.({type:"error",code:"UC_HELD",message:l}),i?.release(),2}throw s}let U={contextDir:e.contextDir,rootSid:g.session_id,locks:G,probe:{batchSimilar:async()=>({hits:[],degraded:!1,probeBasis:null}),recheckLocal:()=>({hits:[],uncachedNewNodes:[]})}},M=!t.plan&&D!=="ci",H=()=>Object.fromEntries((n.resolve(r)?n.edgesInto(n.resolve(r).tip):[]).filter(s=>s.type==="DERIVES"&&typeof s.props.source_id=="string").map(s=>[String(s.props.source_id),n.heads.get(String(s.props.source_id))??null])),z=!1;M&&!i&&(z=!0,i=re(e.contextDir,{sid:g.session_id,mode:"agent",created_at:N.toISOString(),expires_at:new Date(N.getTime()+1440*60*1e3).toISOString(),agent_state:{schema:2,items:[],provider_state:""},pending:{questions:[],proposals:[]},read_basis:H(),assumed:[],corpus_cursor:{remaining:[]},conv_source:d,target_pins:n.resolve(r)?[{ref:r,cid:n.resolve(r).tip}]:[],verb:"design",use_case:r,...n.resolve(r)?.tip?{uc_tip:n.resolve(r).tip}:{},...y?{force:!0}:{},...$?{user_session_id:$.ids.session_id}:{}}));let q;if(M&&i){let{resume:s,...c}=g;Ae(e.contextDir,g.session_id,{schema:Ce,kind:"base",sid:g.session_id,verb:"design",mode:D,created_at:N.toISOString(),run_config:c,conv_source:d||i.state.conv_source||"",...r?{use_case:r}:{},...n.resolve(r)?.tip?{uc_tip:n.resolve(r).tip}:{},store_watermark:Re(e.contextDir)}),g.checkpoints=!0,t.resume&&b("resume_kind",{kind:m?m.view.pointer===null?"bare-base":m.view.pointer.at==="final"?"pause":"crash":"v1-shim"},g.session_id);let l=m?0:i.state.checkpoint?.seq??0,o=i;q=He({contextDir:e.contextDir,handle:o,seqBase:()=>l,peekHeldReceipts:()=>e.chat?.peekHeldReceipts?.()??[],readBasis:()=>H(),corpusCursor:()=>({remaining:[]}),onSoftCap:h=>e.out(h),onStat:h=>b("ckpt_stat",h,g.session_id),...e.now?{now:e.now}:{}});let p=q;q={...p,persist:h=>{let T=h.binding?.template_version;return typeof T=="string"&&T&&(f.current=T),p.persist(h)}}}!M&&!t.plan&&(g.checkpoints=!0,q={persist:s=>{let c=s.binding?.template_version;return typeof c=="string"&&c&&(f.current=c),{seq:s.seq,turn_id:s.turn_id,at:s.at,ts:new Date().toISOString(),full_seq:null}}});let Q=()=>{if(!i)return;let s=i.state.checkpoint;if(s){let c=D!=="interactive"?` --mode ${D}`:"";e.out(`session ${i.state.sid} kept its last checkpoint (seq ${s.seq}, ${s.ts}) \u2014 resume with: kane-cli design tests --resume ${i.state.sid}${c}`),i.release()}else if(z){try{i.complete()}catch{i.release()}try{pt(he(e.contextDir,"sessions"))}catch{}}else i.release();i=null},se=t.plan?Tt(e.out,e.emit,b,u):mt({templateVersion:()=>f.current,contextDir:e.contextDir,ucRef:r,by:{kind:"ai",id:"design-agent"},force:y,engine:"design@1",note:s=>e.chat?e.chat.note(s):e.out(s),commitLine:s=>e.chat?e.chat.ledger({kind:"commit",ok:!0,line:s}):e.out(s),steer:e.chat?s=>e.chat.submit(s):void 0,event:e.emit,resuming:I,...i?.state.force_scope?.length?{forceScope:i.state.force_scope}:{},onForceScope:s=>{w=s},...t.because?{because:t.because}:{},aliases:e.chat?s=>e.chat.registerAliases?.(s):void 0,onCommitted:s=>{R.current=s},protocol:U,...C?{generationTicket:C}:{},...I?{generationStamped:!0}:{}});e.chat||(b("design_budget",{max_pairs:_.budget.max_pairs??null,strength:_.budget.strength_override??null}),e.out(`designing: ${_.usecase.logical_id??r}`)),e.chat?.setWorking?.(`designing ${_.usecase.logical_id??r}\u2026`);let x;try{x=await le(g,{...e,graphSlot:R,...a(e,R),...q?{checkpoint:q}:{}},new Map,n,b,se)}catch(s){throw b("error",{message:s instanceof Error?s.message:String(s),stack:s instanceof Error?s.stack:void 0},g.session_id),Q(),s}finally{e.chat?.setWorking?.(null),Z()}if(x.errorCode==="binding_mismatch"&&m){let s=await e.ask([{id:"binding-mismatch",text:"this session's saved conversation is no longer accepted by the service \u2014 start the conversation fresh (committed work is kept), or stop and keep the session?",risk:"high",rationale:"the service refused the saved conversation on the first turn after resume",options:[{label:"start fresh",detail:"continue with a fresh conversation \u2014 earlier answers may be re-asked"},{label:"stop",detail:"stop here; the session stays resumable"}],recommended_index:1,allow_free_text:!1}]);if((Array.isArray(s)?s.find(o=>o.id==="binding-mismatch"):void 0)?.selected_index!==0){let o=`resume abandoned: binding mismatch on session ${g.session_id} \u2014 the session is preserved`;return e.out(o),e.emit?.({type:"error",message:o,code:"BINDING_MISMATCH"}),i?.release(),2}b("binding_migrate",{sid:g.session_id},g.session_id);let l=g.resume&&"schema"in g.resume?{...g.resume,binding:{}}:void 0;try{x=await le({...g,...l?{resume:l}:{}},{...e,graphSlot:R,...a(e,R),...q?{checkpoint:q}:{}},new Map,n,b,se)}catch(o){throw b("error",{message:o instanceof Error?o.message:String(o),stack:o instanceof Error?o.stack:void 0},g.session_id),Q(),o}finally{e.chat?.setWorking?.(null),Z()}}if(x.highRisk)return e.out(`error: ${x.highRisk.length} high-risk decision${x.highRisk.length===1?"":"s"} need a human \u2014 ci mode won't guess. Re-run with --mode agent to pause for review.`),e.emit?.({type:"error",message:`error: high-risk question(s) in ci mode (fail-closed): ${x.highRisk.map(s=>s.id).join(", ")}`,code:"HIGH_RISK_CI"}),Q(),O(),1;if(x.paused){let s=i;s||(s=re(e.contextDir,{sid:g.session_id,mode:"agent",created_at:N.toISOString(),expires_at:new Date(N.getTime()+1440*60*1e3).toISOString(),agent_state:x.paused.agent_state,pending:{questions:[],proposals:[]},read_basis:Object.fromEntries((n.resolve(r)?n.edgesInto(n.resolve(r).tip):[]).filter(o=>o.type==="DERIVES"&&typeof o.props.source_id=="string").map(o=>[String(o.props.source_id),n.heads.get(String(o.props.source_id))??null])),assumed:[],corpus_cursor:{remaining:[]},conv_source:d,target_pins:n.resolve(r)?[{ref:r,cid:n.resolve(r).tip}]:[],verb:"design",use_case:r,...n.resolve(r)?.tip?{uc_tip:n.resolve(r).tip}:{},...y?{force:!0}:{},...$?{user_session_id:$.ids.session_id}:{}}));try{y&&!s.state.force&&s.save({force:!0}),$&&s.state.user_session_id!==$.ids.session_id&&s.save({user_session_id:$.ids.session_id}),d&&s.state.conv_source!==d&&s.save({conv_source:d});let o=e.chat?.drainHeldReceipts?.()??[];(o.length>0||(s.state.held_receipts?.length??0)>0)&&s.save({held_receipts:o}),w!==null&&s.save({force_scope:w}),Ue(s,x.paused)}catch(o){let p=s.state.checkpoint,h=`error: couldn't persist the pause for session ${s.state.sid}`+(p?` \u2014 last durable checkpoint: seq ${p.seq} @ ${p.ts}`:" \u2014 no durable checkpoint exists")+` (${o instanceof Error?o.message:String(o)})`;return e.out(h),e.emit?.({type:"error",message:h,code:"PAUSE_PERSIST_FAILED",sid:s.state.sid}),1}b("session_paused",{sid:s.state.sid},g.session_id);let c=D!=="interactive"?` --mode ${D}`:"",l=`kane-cli design tests --resume ${s.state.sid}${c}`;if(L||e.out(`paused \u2014 resume with: ${l}`),e.emit?.({type:"session_paused",sid:s.state.sid,mode:D,resume:l,expires_at:s.state.expires_at,pending_questions:x.paused.pending.questions}),L){let o=e.chat?.state.credits?.total;e.onSummary?.({state:"paused",reason:"ctrl+c",facts:[`session ${s.state.sid} saved \u2014 designing ${_.usecase.logical_id??r}`,...s.state.expires_at?[`expires: ${s.state.expires_at}`]:[],...o!==void 0?[`credits used: ${o.toFixed(1)}`]:[]],resume:l,resumeMessage:`${l} --message "<your words>"`,tracePath:X(u)})}return O(),3}if(x.crashed&&i?.state.checkpoint){let s=i.state.checkpoint,c=D!=="interactive"?` --mode ${D}`:"",l=`kane-cli design tests --resume ${i.state.sid}${c}`;if(b("agent_crashed_resumable",{sid:i.state.sid,seq:s.seq},g.session_id),L||e.out(`agent crashed \u2014 session ${i.state.sid} is resumable at checkpoint seq ${s.seq} (at most the in-flight turn lost); resume with: ${l}`),e.emit?.({type:"session_paused",sid:i.state.sid,mode:D,resume:l,expires_at:i.state.expires_at,crashed:!0}),L){let o=e.chat?.state.credits?.total;e.onSummary?.({state:"crashed",facts:[`agent crashed \u2014 session ${i.state.sid} is resumable at checkpoint seq ${s.seq}`,"at most the in-flight turn was lost",...o!==void 0?[`credits used: ${o.toFixed(1)}`]:[]],resume:l,resumeMessage:`${l} --message "<your words>"`,tracePath:X(u)})}return i.release(),i=null,3}if(x.error)return e.out(`error: design agent failed: ${x.error}`),e.emit?.({type:"error",message:`error: design agent failed: ${x.error}`}),Q(),O(),1;if(x.proposal==null&&D!=="interactive")return e.out(`error: the design session stopped before saving anything \u2014 nothing committed (trace: ${u})`),e.emit?.({type:"error",message:`error: the design session stopped before saving anything \u2014 nothing committed (trace: ${u})`}),Q(),O(),1;let W=0;if(x.proposal==null)try{let{readRecords:s}=await import("./records-EW4PIJ5W.js"),c=t.resume??g.session_id;W=s(e.contextDir).records.filter(l=>l.sid===c).reduce((l,o)=>l+o.nodes.filter(p=>p.label!=="source").length,0)}catch{}if(x.proposal==null&&e.out(W>0?`done \u2014 ${W} item(s) committed in this session (earlier legs included); nothing new since the resume`:"done \u2014 nothing designed this session (no finalize before the session ended)"),x.assumedDefaults&&e.out(`assumed: ${x.assumedDefaults} default(s) taken while unattended`),i&&e.emit?.({type:"session_complete",sid:t.resume??g.session_id}),$?.event("ASR_SESSION_COMPLETE",{}),i?.complete(),z)try{pt(he(e.contextDir,"sessions"))}catch{}if(L){let s=e.chat.state.ledger.filter(o=>o.kind==="answer"&&o.receipt.form==="assumed").length??0,c=(x.assumedDefaults??0)+s,l=e.chat.state.credits?.total??x.creditsTotal;e.onSummary?.({state:"complete",facts:[`designed: ${_.usecase.logical_id??r}${x.proposal==null?W>0?` (${W} item(s) committed across this session)`:" (nothing committed this session)":""}`,...c>0?[`${c} assumed default(s)`]:[],...l!==void 0?[`credits used: ${l.toFixed(1)}`]:[]],tracePath:X(u)})}return t.plan||We(e.contextDir),O(),0}export{Is as a};
|
package/dist/chunk-DEUDRSU7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{homedir as a}from"os";import{join as t}from"path";var m="0.8.11";var e=t(a(),".testmuai","kaneai"),d=t(e,"profiles"),g=t(e,"tui-config.json"),h=t(e,"media"),b="https://registry.npmjs.org/@testmuai/kane-cli",A="https://api.github.com/repos/LambdaTest/kane-cli/releases",n="@testmuai/kane-cli-skill",_=`https://registry.npmjs.org/${n}`,r="kane-cli",L=[{dir:t(a(),".claude","skills",r),agent:"Claude Code"},{dir:t(a(),".agents","skills",r),agent:"Codex CLI"},{dir:t(a(),".gemini","skills",r),agent:"Gemini CLI"}],x="https://dd-proxy.lambdatest.com/intake/kane-cli",U="https://kaneai-playground.lambdatest.io",u=9222,R=9230,I=t(e,"chrome-profiles"),o=t(e,"hints"),E=t(o,"state.json");function C(s){return t(o,`catalog-${s}.json`)}var c="127.0.0.1",T=18392,S=18400,i="/callback";function f(s){return`http://${c}:${s}${i}`}var B="KANE CLI",N="*",P={prod:{authBaseUrl:"https://auth.lambdatest.com",consentUrl:"https://accounts.lambdatest.com",controllerBaseUrl:"https://kaneai-api.lambdatest.com/v16-controller/v1",tmsBaseUrl:"https://test-manager-api.lambdatest.com/api",testGeneratorBaseUrl:"https://test-manager-api.lambdatest.com",secretsBaseUrl:"https://api-hyperexecute.lambdatest.com",testManagerUiUrl:"https://test-manager.lambdatest.com",shareApiBaseUrl:"https://api.lambdatest.com",v16ServerHost:"https://kaneai-api.lambdatest.com/v16-server",evidenceViewerUrl:"https://evidence.lambdatest.com",mediaArtefactsHost:"prod-mobile-artefacts.lambdatest.com",mobileAppBaseUrl:"https://api.lambdatest.com"},stage:{authBaseUrl:"https://stage-auth.lambdatestinternal.com",consentUrl:"https://stage-accounts.lambdatestinternal.com",controllerBaseUrl:"https://auteur-stage-automind.lambdatestinternal.com/v16-controller/v1",tmsBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com/api",testGeneratorBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com",secretsBaseUrl:"https://api-stage-hyperexecute.lambdatestinternal.com",testManagerUiUrl:"https://stage-test-manager.lambdatestinternal.com",shareApiBaseUrl:"https://stage-api.lambdatestinternal.com",v16ServerHost:"https://auteur-stage-automind.lambdatestinternal.com/v16-server",evidenceViewerUrl:"https://stage-evidence.lambdatestinternal.com",mediaArtefactsHost:"stage-mobile-artefacts.lambdatestinternal.com",mobileAppBaseUrl:"https://stage-api.lambdatestinternal.com"}},O={orange:"#ff9500",generateAccent:"#0d9488",assuranceAccent:"#b388ff",purple:"#b388ff",secondary:"#888888",dim:"#666666",muted:"#444444",green:"#4ade80",red:"#ef4444",amber:"#fbbf24"};export{m as a,e as b,g as c,h as d,b as e,A as f,n as g,L as h,x as i,U as j,u as k,R as l,I as m,E as n,C as o,c as p,T as q,S as r,i as s,f as t,B as u,N as v,P as w,O as x};
|
package/dist/chunk-DPUV6OSP.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as n}from"./chunk-NLCCBXXV.js";import{a as r}from"./chunk-RZ4F3BHX.js";var i={attempts:3,backoffMs:[250,750]},o=class extends n{constructor(e,s){super(e,s)}headers(){return{Authorization:this.authHeader,"Content-Type":"application/json"}}async getTmsCredentials(){let e=await r(`${this.baseUrl}/auth/tms-credentials`,{method:"GET",headers:this.headers(),retry:i});if(!e.ok)throw new Error(`Credential exchange failed: ${e.status} ${await e.text()}`);return await e.json()}async getPresignedUrls(e,s,t){let a=await r(`${this.baseUrl}/upload/presign`,{method:"POST",headers:this.headers(),body:JSON.stringify({test_id:e,session_id:s,files:t})});if(!a.ok)throw new Error(`Presign request failed: ${a.status} ${await a.text()}`);return await a.json()}async getScreenshotSas(){let e=await r(`${this.baseUrl}/upload/screenshot-sas`,{method:"GET",headers:this.headers(),retry:i});if(!e.ok)throw new Error(`Screenshot SAS request failed: ${e.status} ${await e.text()}`);return await e.json()}async resolveMobileDepsBundle(e){let s=await r(`${this.baseUrl}/mobile-deps/presign`,{method:"POST",headers:this.headers(),body:JSON.stringify({cli_version:e.cliVersion,os:e.os,arch:e.arch,device_class:e.deviceClass})});if(!s.ok)throw new Error(`Mobile deps resolve failed: ${s.status} ${await s.text()}`);let t=await s.json();return{bundleVersion:t.bundle_version,url:t.url,sha256:t.sha256,bytes:t.bytes}}async getCreditBalance(){let e=await r(`${this.baseUrl}/credits/balance`,{method:"GET",headers:this.headers(),retry:i});if(!e.ok)throw new Error(`Credit balance request failed: ${e.status} ${await e.text()}`);return await e.json()}};export{o as a};
|
package/dist/chunk-JJJREAFQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{d as z,f as G,h as K}from"./chunk-3PMEHGH3.js";import{a as O,b as j,c as L}from"./chunk-OKCULEBD.js";import{d as R,f as N}from"./chunk-4VZRBBLF.js";import{b as F,c as M,j as $}from"./chunk-4VYWTTT4.js";import{a as B}from"./chunk-TZXXJWHA.js";import{n as P}from"./chunk-RSSOJ3L2.js";import{a as Y,b as T,c as H}from"./chunk-3FJNTRAS.js";import{h as q}from"./chunk-TAOHYWEO.js";import{e as E}from"./chunk-Z7S3IWUX.js";import{b as _}from"./chunk-DEUDRSU7.js";function J(e){return e.kind==="simulator"?e.id:e.virtualName??e.id}function V(e,r,t={}){let o={platform:e.platform,udid:e.id,target_kind:e.kind};return r&&(o.app_package=r),t.noReset!==void 0&&(o.no_reset=t.noReset),t.appiumUrl&&(o.appium_url=t.appiumUrl),e.platform==="android"&&t.autoGrantPermissions!==void 0&&(o.auto_grant_permissions=t.autoGrantPermissions),e.platform==="ios"&&t.autoAcceptAlerts!==void 0&&(o.auto_accept_alerts=t.autoAcceptAlerts),o}import{createHash as Te}from"crypto";import{readdir as Ce,stat as Ae}from"fs/promises";import{basename as g,extname as De,join as ke,relative as xe}from"path";import{createHash as le}from"crypto";import{createReadStream as ce}from"fs";import{mkdir as ue,readFile as ge,rename as fe,writeFile as me}from"fs/promises";import{dirname as he,join as ve}from"path";var we=60,be=5;function X(){return{entries:[]}}function Z(){return ve(_,"mobile","app-cache.json")}async function C(e){let r=le("sha256");for await(let t of ce(e))r.update(t);return r.digest("hex")}function ye(){return{readFile:e=>ge(e,"utf8"),writeFile:async(e,r)=>{await ue(he(e),{recursive:!0});let t=`${e}.tmp`;await me(t,r),await fe(t,e)},hashFile:C,now:()=>new Date}}function A(e){if(!e)return;let r=/\/(\d{4})\/(\d{2})\/(\d{2})\//.exec(e);if(!r)return;let[,t,o,i]=r,s=new Date(`${t}-${o}-${i}T00:00:00Z`);return Number.isNaN(s.getTime())?void 0:s.toISOString()}function Pe(e,r){if(!e.storedAt)return!0;let t=new Date(e.storedAt).getTime();return Number.isNaN(t)?!0:(r.getTime()-t)/864e5>=we-be}var u=class{deps;constructor(r={}){this.deps={...ye(),...r}}async read(){try{let r=JSON.parse(await this.deps.readFile(Z()));if(!r||typeof r!="object")return X();let t=r;return{entries:Array.isArray(t.entries)?t.entries:[]}}catch{return X()}}async write(r){await this.deps.writeFile(Z(),JSON.stringify(r,null,2))}async hashOf(r){return this.deps.hashFile(r)}async lookup(r){return(await this.read()).entries.find(o=>o.sha256===r.sha256&&o.env===r.env&&o.orgId===r.orgId&&o.type===r.type)}async remember(r){let t=await this.read();t.entries=[...t.entries.filter(o=>!(o.sha256===r.sha256&&o.env===r.env&&o.orgId===r.orgId&&o.type===r.type)),r],await this.write(t)}async forget(r){let t=await this.read(),o=t.entries.length;t.entries=t.entries.filter(i=>!(i.sha256===r.sha256&&i.env===r.env&&i.orgId===r.orgId&&i.type===r.type)),t.entries.length!==o&&await this.write(t)}isNearExpiry(r){return Pe(r,this.deps.now())}};var Q={emulator:[".apk"],simulator:[".zip"]};function W(e){return e.skipped===!0}function Ie(e,r){let t=De(e).toLowerCase();return t===".ipa"?`${g(e)} is a device build \u2014 .ipa is not accepted for ${r} runs.`:Q[r].includes(t)?null:`${g(e)} cannot be uploaded for a ${r} run \u2014 expected one of ${Q[r].join(", ")}.`}async function D(e,r){if(!(await Ae(e)).isDirectory())return r.hashOf(e);let o=[],i=async n=>{for(let a of await Ce(n,{withFileTypes:!0})){let p=ke(n,a.name);a.isDirectory()?await i(p):a.isFile()&&o.push(p)}};await i(e),o.sort();let s=Te("sha256");for(let n of o)s.update(xe(e,n)),s.update("\0"),s.update(await C(n)),s.update("\0");return s.digest("hex")}async function ee(e){let r=Ie(e.path,e.type);if(r)return{skipped:!0,reason:r};let t=e.cache??new u,o=e.client??new q(e.baseUrl,{...e.auth,orgId:e.orgId}),i;try{i=await D(e.path,t)}catch(a){return{skipped:!0,reason:`could not read ${g(e.path)}: ${a.message}`}}let s={sha256:i,env:e.env,orgId:e.orgId,type:e.type},n=await t.lookup(s);if(n){if(await o.liveness(n.appId)!=="gone")return{appId:n.appId,...n.appUrl?{appUrl:n.appUrl}:{},fromCache:!0};e.onProgress?.(`${n.appId} is no longer in the cloud \u2014 uploading again`),await t.forget(s)}try{e.onProgress?.(`uploading ${g(e.path)}\u2026`);let a=await o.upload(e.path,e.type);return await t.remember({sha256:i,env:e.env,orgId:e.orgId,type:e.type,appId:a.appId,...a.appUrl?{appUrl:a.appUrl}:{},...A(a.url)?{storedAt:A(a.url)}:{},sourcePath:e.path}),e.onProgress?.(a.cached?`${g(e.path)} already in the cloud (${a.appId})`:`${g(e.path)} uploaded (${a.appId})`),{appId:a.appId,...a.appUrl?{appUrl:a.appUrl}:{},fromCache:!1}}catch(a){return{skipped:!0,reason:a.message}}}function h(e){return`${e.platform}|${J(e)}`}var f=new Map,re=new Set;function te(e){return re.has(h(e))}function rr(e,r,t){r.state==="stopped"&&(f.has(h(r))||ae(e,r,t))}async function oe(e,r,t){let o=f.get(h(r));return o?(t?.(`waiting for ${r.displayName} to finish booting\u2026`),o):ae(e,r,t)}function ae(e,r,t){let o=h(r),i=e.prepare(r,t);f.set(o,i),r.state==="stopped"&&i.then(()=>re.add(o),()=>{});let s=()=>{f.get(o)===i&&f.delete(o)};return i.then(s,s),i.catch(()=>{}),i}import{basename as Ue}from"path";import{spawnSync as Se}from"child_process";async function _e(e,r,t){if(!e.teardownPlan||!t.appPackage&&!t.shutdown)return;let o;try{o=await e.teardownPlan(r,t)}catch{return}o.length!==0&&P(`device:${r.id}`,()=>{z({udid:r.id,displayName:r.displayName});for(let i of o)try{Se(i.file,i.args,{timeout:3e4,stdio:"ignore"})}catch{}})}var ie={emulator:[".apk"],simulator:[".zip"]};async function Ee(e,r,t,o){if(e.kind==="package")return e;if(e.kind==="app_id"){let i=r.cloudUpload;if(!i)throw new Error(`${e.value} is an app id, which needs an account to download it. Log in, or pass a path to a local build instead.`);let s=await H({appId:e.value,baseUrl:i.baseUrl,auth:i.auth,...ie[t]?{accepts:ie[t]}:{},...o?{onProgress:o}:{}}),n=x(s.path);if(!n||n.kind==="app_id")throw new Error(`${s.name} is not a build this CLI can install (from ${e.value}).`);return n}try{let i=new u,s=await D(e.value,i),n=new Y;await n.find(s)||o?.(`copying ${Ue(e.value)} into the local app store\u2026`);let p=await n.put({key:s,sourcePath:e.value,source:"local"});return{...e,value:p.path}}catch{return e}}function Fe(e){P(`appium:${e}`,()=>{K({deviceClass:e,owner:process.pid})})}var k=class extends Error{constructor(r){super(r),this.name="MobileHostUnsupportedError"}},v=class extends Error{constructor(t,o){super(t);this.doctorText=o;this.name="MobilePreflightError"}};async function Me(e,r,t){let o=t.cloudUpload,i=await ee({path:e,type:r,env:o.env,orgId:o.orgId,userId:o.userId,auth:o.auth,baseUrl:o.baseUrl,...t.onProgress?{onProgress:t.onProgress}:{}});if(W(i)){t.onProgress?.(`app not uploaded \u2014 ${i.reason}`);return}return i.appId}var $e="app must be a build (.apk for an emulator, .zip of the .app bundle for a simulator) or an app id from your cloud uploads \u2014 a package id names something already installed on one device, so it cannot be uploaded, exported as code, or run anywhere else.",ne=/\.(apk|zip)$/i;function x(e){let r=e.trim();if(T(r))return{kind:"app_id",value:r};let t=ne.exec(r)?.[1]?.toLowerCase();return t?{kind:t,value:r}:null}function Re(e){return!!e&&(ne.test(e)||T(e.trim()))}function Ne(e){return e.filter(r=>r.required&&r.status==="fail")}function Be(e,r){return!!r&&E(e,r)}async function wr(e){let r=B();if(!r.supported)throw new k(r.reason);let t=e.appiumUrl??e.defaults?.appium_url,o=!!(e.agent||!e.interactive),i=$();o&&e.platform?.toLowerCase()!=="ios"&&((await i.status("emulator")).installed||await i.ensure("emulator",{automatic:!0,onProgress:e.onProgress}));let s=await O(e.platform,{appiumUrl:t});if(L(s)){let d=s.sections.flatMap(y=>Ne(y.checks)).map(y=>y.label).join(", ");throw new v(`Mobile toolchain not ready (${d}). Run \`kane-cli doctor --target ${e.platform?.toLowerCase()==="ios"?"simulator":e.platform?.toLowerCase()==="android"?"emulator":"<emulator|simulator>"}\` for details.`,j(s))}let n=await N({device:e.device,platform:e.platform,defaultTarget:e.defaults?.default_target,interactive:e.interactive}),a;if(n.ok)a=n.target;else if(n.reason==="needs-picker"&&e.pickTarget){let d=await e.pickTarget(n.candidates);if(!d)throw new Error("Target selection cancelled");a=d}else throw new Error(n.message);let p=R(a.platform);if(!p)throw new Error(`No provider for platform "${a.platform}"`);let l=F(a);if(!l)throw new Error(`No managed dependencies serve ${a.platform} ${a.kind} targets yet.`);try{await i.ensure(l,{automatic:o,onProgress:e.onProgress})}catch(d){throw d instanceof M?new v(d.message,d.message):d}let se=a.state!=="ready"||te(a);a=await oe(p,a,e.onProgress);let pe=await G(l,{...t?{appiumUrl:t}:{},device:{udid:a.id,displayName:a.displayName},onProgress:e.onProgress});Fe(l);let I=Be(a,e.defaults?.default_target)?e.defaults?.default_app:void 0,m=e.app??(Re(I)?I:void 0);if(e.app&&!x(e.app))throw new Error(`${e.app}: ${$e}`);let c=m?x(m):null,U=c?await Ee(c,e,l,e.onProgress):null,w=U?await p.ensureApp(a,U,e.onProgress):void 0,b=c?.kind==="app_id"?c.value:e.cloudUpload&&c&&m?await Me(c.value,l,e):void 0;await _e(p,a,{shutdown:se,...w?{appPackage:w}:{}});let de=V(a,w,{noReset:e.noReset??e.defaults?.no_reset,appiumUrl:pe.url,autoGrantPermissions:e.defaults?.auto_grant_permissions,autoAcceptAlerts:e.defaults?.auto_accept_alerts}),S=b??m;return{device:de,target:a,provider:p,...b?{appId:b}:{},...S?{appRef:S}:{}}}export{J as a,V as b,rr as c,oe as d,k as e,v as f,$e as g,x as h,Re as i,wr as j};
|
package/dist/chunk-M7CGNE2D.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as m,d as g,e as f}from"./chunk-ZMJD3CI7.js";import{b as d}from"./chunk-DEUDRSU7.js";import{mkdirSync as M,writeFileSync as o,existsSync as c,readFileSync as O}from"fs";import{join as a}from"path";var p={name:"remote-execution",version:"0.3.0",backendId:"hyper",kaneCompat:">=0.4.0",defaults:{runson:"mac",concurrency:1}},E={runson:"mac",concurrency:1,timeoutMinutes:120},y=`version: "0.1"
|
|
3
|
-
runson: {{runson}}
|
|
4
|
-
autosplit: true
|
|
5
|
-
concurrency: {{concurrency}}
|
|
6
|
-
scenarioCommandStatusOnly: true
|
|
7
|
-
shell: bash
|
|
8
|
-
runtime:
|
|
9
|
-
- language: python
|
|
10
|
-
version: "3.11.9"
|
|
11
|
-
env:
|
|
12
|
-
KANE_CLI_MODE: hyperexecute
|
|
13
|
-
TESTMUAI_ENV: {{env}}
|
|
14
|
-
pre:
|
|
15
|
-
- rm -rf .testmuai/evidence
|
|
16
|
-
- npm install -g @testmuai/kane-cli@{{kaneVersion}}
|
|
17
|
-
- kane-cli login --env {{env}} --username \${{.secrets.LT_USERNAME}} --access-key \${{.secrets.LT_ACCESS_KEY}}{{projectFolderFlags}}
|
|
18
|
-
testDiscovery:
|
|
19
|
-
type: raw
|
|
20
|
-
mode: dynamic
|
|
21
|
-
command: {{discoveryCommand}}
|
|
22
|
-
testRunnerCommand: |
|
|
23
|
-
C=$(find /Users/ltuser/lrc/chrome /Applications "$HOME/Applications" -maxdepth 6 -name 'Google Chrome' -path '*/MacOS/*' -type f 2>/dev/null | head -1)
|
|
24
|
-
if [ -z "$C" ]; then C=$(command -v google-chrome || command -v google-chrome-stable || true); fi
|
|
25
|
-
if [ -n "$C" ]; then export KANE_CLI_CHROME_PATH="$C"; echo "using chrome: $C"; fi
|
|
26
|
-
kane-cli testmd run "$test" --env {{env}} --no-evidence-publish --headless --agent{{memberFlags}}
|
|
27
|
-
rc=$?
|
|
28
|
-
mkdir -p artifacts/session && cp -R "$HOME/.testmuai/kaneai/sessions/." artifacts/session/ 2>/dev/null || true
|
|
29
|
-
exit $rc
|
|
30
|
-
uploadArtefacts:
|
|
31
|
-
- name: kane-testrun
|
|
32
|
-
path:
|
|
33
|
-
{{uploadPaths}}
|
|
34
|
-
`;var _={"remote-execution":{manifest:p,templates:{"hyperexecute.yaml.tmpl":y},config:E}};function v(e){return _[e]}function b(e,i){let l=i.base??d,r=v(e);if(!r)return{status:"failed",name:e,version:"",dir:"",error:`unknown plugin '${e}'`};let n=r.manifest.version;if(i.version&&i.version!==n)return{status:"failed",name:e,version:n,dir:"",error:`only bundled version ${n} is available (requested ${i.version})`};let t=m(e,n,l),u=g(e,l),h=c(a(t,"plugin.json"))&&c(u)&&O(u,"utf8").trim()===n;try{M(a(t,"templates"),{recursive:!0}),o(a(t,"plugin.json"),JSON.stringify(r.manifest,null,2)+`
|
|
35
|
-
`);for(let[C,P]of Object.entries(r.templates))o(a(t,"templates",C),P);let s=f(e,l);return c(s)||o(s,JSON.stringify(r.config,null,2)+`
|
|
36
|
-
`),o(u,n+`
|
|
37
|
-
`),{status:h?"already-installed":"installed",name:e,version:n,dir:t}}catch(s){return{status:"failed",name:e,version:n,dir:t,error:s.message}}}export{y as a,b};
|
package/dist/chunk-NGASEXVA.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as j,b as H}from"./chunk-WRVDIZAI.js";import{a as B,b as N}from"./chunk-B7TJIUKZ.js";import{a as se,b as ie,c as ae}from"./chunk-PDXZROJM.js";import{d as ce}from"./chunk-F7R6A6P5.js";import{a as $,b as q,e as M,g as oe}from"./chunk-T4OJX2GZ.js";import{a as re,b as ne}from"./chunk-KRL2BDI5.js";import{a as L}from"./chunk-7KRCBN6X.js";import{a as te}from"./chunk-FIODM24X.js";import{a as X}from"./chunk-BE4FBVKY.js";import{a as ee}from"./chunk-DPUV6OSP.js";import{a as A}from"./chunk-RZ4F3BHX.js";import{a as O}from"./chunk-NVRXDLJN.js";import{x as y}from"./chunk-DEUDRSU7.js";import{a as F}from"./chunk-HCBYKLMW.js";import{a as k,b as p,i as Z}from"./chunk-C44QQJR4.js";import{a as K}from"./chunk-6YGTRKDT.js";import{e as v}from"./chunk-UR6MHSHU.js";var D=v(K(),1);import{existsSync as P,readFileSync as He,rmSync as ye,unlinkSync as Ve}from"fs";import{resolve as Q}from"path";import{promises as le,realpathSync as Ee}from"fs";import{homedir as Se}from"os";import{join as V,parse as ve,relative as ue,resolve as de}from"path";var fe=new Set(["node_modules",".git","dist","build",".next",".venv","venv","target","__pycache__"]),R=class extends Error{constructor(s){super(`refusing to scan '${s}'. Run from your project root, or pass --root <dir>.`);this.cwd=s;this.name="HomeRefusedError"}};function me(e){try{return Ee(de(e))}catch{return de(e)}}function Re(e){let r=me(e),s=me(Se()),n=ve(r).root;if(process.platform==="win32"){let o=t=>t.toLowerCase();return o(r)===o(s)||o(r)===o(n)}return r===s||r===n}async function U(e){if(Re(e.root))throw new R(e.root);let r=e.maxEntries??5e4,s=e.maxResults??5e3,n=new Set(e.ignore??[]),o=[],t=0,i=0,a=!1,u,c=[e.root];for(;c.length>0&&!a;){let l=c.shift(),g;try{g=await le.readdir(l,{withFileTypes:!0})}catch{continue}i++;for(let _ of g){if(t++,t>r){a=!0,u="max_entries";break}let m=_.name,T=V(l,m);if(_.isDirectory()){if(fe.has(m)||m.startsWith(".")||m.startsWith("output-")||n.has(m))continue;c.push(T)}else if(_.isFile()&&m.endsWith("_test.md")&&(o.push({path:T,relPath:ue(e.root,T),source:"cwd"}),o.length>=s)){a=!0,u="max_results";break}}e.onProgress?.(i,o.length)}if(!a){let g=[{dir:V(e.root,".testmuai","tests"),depth:0}];for(;g.length>0&&!a;){let{dir:_,depth:m}=g.shift(),T;try{T=await le.readdir(_,{withFileTypes:!0})}catch{continue}i++;for(let d of T){if(t++,t>r){a=!0,u="max_entries";break}let b=d.name,w=V(_,b);if(d.isDirectory()){if(m>=20||b.startsWith(".")||b.startsWith("output-")||fe.has(b))continue;g.push({dir:w,depth:m+1})}else if(d.isFile()&&b.endsWith("_test.md")&&(o.push({path:w,relPath:ue(e.root,w),source:"tests-dir"}),o.length>=s)){a=!0,u="max_results";break}}}}return{results:o,aborted:a,abortReason:u,dirsScanned:i}}import{readFileSync as Pe}from"fs";function Y(e){let r;try{r=Pe(e,"utf8")}catch{return{tags:[]}}try{let{global:s}=re(e,r),n=ne(s);return{tags:s.tags??[],...n?{mobileTarget:n}:{}}}catch{return{tags:[],...De(r)?{mobileTarget:Me}:{}}}}var Me={platform:"",app:""};function De(e){let r=/^---\r?\n([\s\S]*?)\r?\n---/.exec(e);if(!r)return!1;let s=r[1].split(/\r?\n/);if(s.some(o=>/^target:\s*['"]?(emulator|simulator)['"]?\s*$/.test(o)))return!0;let n=s.findIndex(o=>/^target:\s*$/.test(o));return n<0?!1:s.slice(n+1).some(o=>/^\s+\S/.test(o))}function W(e){return Y(e).tags}import{mkdirSync as Ce,writeFileSync as $e}from"fs";import{join as Ie}from"path";function ge(e,r){return`Basic ${Buffer.from(`${e}:${r}`).toString("base64")}`}async function Fe(e){let r=ie({tmsBaseUrl:e.tmsBaseUrl,testcaseId:e.testcaseId,codeExport:{enabled:!0,language:e.language,skipValidation:e.skipValidation},mobile:e.framework==="appium"}),s=await A(r.url,{method:"POST",headers:{"content-type":"application/json",authorization:ge(e.auth.username,e.auth.access_key)},body:JSON.stringify(r.body)});if(!s.ok)throw new Error(`code-export trigger failed: ${s.status} ${await s.text()}`);e.log("info","CODE_EXPORT_TRIGGERED","Code export triggered",{testcase_id:e.testcaseId})}async function Oe(e){let r=ae({tmsBaseUrl:e.tmsBaseUrl,testcaseId:e.testcaseId}),s=e.pollIntervalMs??5e3,n=e.timeoutMs??3e5,o=Date.now()+n;for(;Date.now()<o;){let t=await A(r,{headers:{authorization:ge(e.auth.username,e.auth.access_key),accept:"application/json"}});if(!t.ok){await new Promise(c=>setTimeout(c,s));continue}let a=(await t.json()).data?.find(c=>c.code_name==="kane-cli-trigger");if(!a){await new Promise(c=>setTimeout(c,s));continue}let u=(a.status??"").toLowerCase();if(u==="in progress"||u==="in_progress"||u==="pending"){await new Promise(c=>setTimeout(c,s));continue}if(!a.url||a.url.length===0)throw new Error(`code-export status=${a.status} but no files returned`);Ce(e.outDir,{recursive:!0});for(let c of a.url){let l=Ie(e.outDir,c.file_name),g=await A(c.file_url);if(!g.ok){e.log("warn","CODE_EXPORT_FILE_FAILED","Failed to download file",{file_name:c.file_name,status:g.status});continue}let _=await g.text();$e(l,_,"utf-8")}return e.log("info","CODE_EXPORT_DOWNLOADED","Code export saved",{out_dir:e.outDir,file_count:a.url.length}),e.outDir}throw new Error("code-export polling timed out")}async function pe(e){return await Fe(e),await Oe(e)}var E=v(K(),1);import{existsSync as Ae,readFileSync as Le}from"fs";var h=v(F(),1);function je(e){j(e);let r=M(e);if(!Ae(r))return null;try{return JSON.parse(Le(r,"utf8"))}catch{return{}}}function Be(e){return e===null?"never_run":e.testcase_id?"synced":"local_only"}function Ne(e){return e==="synced"?"\u2601":e==="local_only"?"\u25A3":"\u25CB"}function Ue(e){return e==="tests-dir"?"\u2726":" "}function We(e,r){return r==="all"?!0:r==="synced"?e.status==="synced":r==="local"?e.status==="local_only":r==="never_run"?e.status==="never_run":r==="cli"?e.source==="tests-dir":r==="hand"?e.source==="cwd":!0}var z=["all","synced","local","never_run","cli","hand"];function Je(e){let r=z.indexOf(e);return z[(r+1)%z.length]}function he({root:e,currentOrgId:r,onSelect:s,onCancel:n}){let[o,t]=(0,E.useState)([]),[i,a]=(0,E.useState)(null),[u,c]=(0,E.useState)(!0),[l,g]=(0,E.useState)("all");(0,E.useEffect)(()=>{(async()=>{try{let d=await U({root:e}),b=[];for(let w of d.results){let G=je(w.path);G?.org_id!==void 0&&G.org_id!==r||b.push({path:w.path,relPath:w.relPath,name:$(w.path),status:Be(G),source:w.source,tags:W(w.path)})}t(b),c(!1)}catch(d){d instanceof R,a(d.message),c(!1)}})()},[e,r]);let _=(0,E.useMemo)(()=>o.filter(d=>We(d,l)).map(d=>({id:d.path,label:`${Ne(d.status)} ${Ue(d.source)} ${d.relPath}${d.tags.length>0?` [${d.tags.join(", ")}]`:""}`})),[o,l]),m=(0,E.useMemo)(()=>Ke(l,o),[l,o]);if(i)return(0,h.jsxs)(k,{flexDirection:"column",borderStyle:"round",borderColor:y.red,paddingX:2,paddingY:1,children:[(0,h.jsx)(p,{color:y.red,bold:!0,children:"testmd"}),(0,h.jsx)(k,{marginTop:1,children:(0,h.jsx)(p,{color:y.red,children:i})})]});let T=l==="all"?"all":Ge(l);return(0,h.jsx)(te,{title:`testmd \xB7 filter: ${T}`,items:_,loading:u,itemNoun:"tests",onSelect:d=>{let b=o.find(w=>w.path===d.id);b&&s(b)},onCancel:n,onTab:()=>g(d=>Je(d)),extraHint:"cycle filter",footer:m})}function Ge(e){return e==="synced"?"synced (\u2601)":e==="local"?"local (\u25A3)":e==="never_run"?"never run (\u25CB)":e==="cli"?"cli-generated (\u2726)":e==="hand"?"hand-written":"all"}function Ke(e,r){let s={synced:r.filter(o=>o.status==="synced").length,local:r.filter(o=>o.status==="local_only").length,never:r.filter(o=>o.status==="never_run").length,cli:r.filter(o=>o.source==="tests-dir").length,hand:r.filter(o=>o.source==="cwd").length},n=o=>o?y.orange:y.dim;return(0,h.jsxs)(k,{flexDirection:"column",children:[(0,h.jsx)(p,{color:y.dim,children:"legend:"}),(0,h.jsxs)(k,{children:[(0,h.jsx)(p,{color:n(e==="synced"),children:` \u2601 synced (${s.synced}) `}),(0,h.jsx)(p,{color:n(e==="local"),children:`\u25A3 local (${s.local}) `}),(0,h.jsx)(p,{color:n(e==="never_run"),children:`\u25CB never run (${s.never})`})]}),(0,h.jsxs)(k,{children:[(0,h.jsx)(p,{color:n(e==="cli"),children:` \u2726 cli-generated (${s.cli}) `}),(0,h.jsx)(p,{color:n(e==="hand"),children:` hand-written (${s.hand})`})]})]})}var I=v(K(),1);import{existsSync as Xe,readFileSync as qe}from"fs";var f=v(F(),1);function _e({path:e,relPath:r,onAction:s,onBack:n,onView:o}){let[t,i]=(0,I.useState)(null),[a,u]=(0,I.useState)(!1);(0,I.useEffect)(()=>{let l=M(e);if(Xe(l))try{i(JSON.parse(qe(l,"utf8")))}catch{i(null)}},[e]),Z((l,g)=>{if(g.escape){if(a){u(!1);return}n();return}if(a){l==="y"||l==="Y"?(u(!1),s("delete")):(l==="n"||l==="N")&&u(!1);return}l==="r"&&s("run"),l==="e"&&t?.testcase_id&&s("export"),l==="d"&&u(!0),l==="v"&&o&&o()});let c=({k:l,v:g})=>g?(0,f.jsxs)(p,{children:[(0,f.jsx)(p,{color:y.dim,children:l.padEnd(14)}),g]}):null;return(0,f.jsxs)(k,{flexDirection:"column",borderStyle:"round",borderColor:y.orange,paddingX:2,paddingY:1,children:[(0,f.jsx)(p,{color:y.orange,bold:!0,children:r}),(0,f.jsx)(k,{marginTop:1,flexDirection:"column",children:t?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(c,{k:"test_id",v:t.test_id}),(0,f.jsx)(c,{k:"testcase_id",v:t.testcase_id}),(0,f.jsx)(c,{k:"project_id",v:t.project_id}),(0,f.jsx)(c,{k:"folder_id",v:t.folder_id}),(0,f.jsx)(c,{k:"org_id",v:t.org_id}),(0,f.jsx)(c,{k:"session_name",v:t.session_name}),(0,f.jsx)(c,{k:"commit_id",v:t.commit_id})]}):(0,f.jsx)(p,{color:y.dim,children:"(never run \u2014 no meta.json)"})}),a?(0,f.jsx)(k,{marginTop:1,children:(0,f.jsxs)(p,{color:y.red,bold:!0,children:["Delete ",r," and its output dir? [y/n]"]})}):(0,f.jsx)(k,{marginTop:1,children:(0,f.jsxs)(p,{color:y.dim,children:["[r] run [e] export",t?.testcase_id?"":" (need testcase_id)"," [d] delete",o?" [v] view":""," [Esc] back"]})})]})}function C(e){j(e);let r=M(e);if(!P(r))return null;try{return JSON.parse(He(r,"utf8"))}catch{return null}}function xe(e,r){return!e||e.org_id===void 0?!0:e.org_id===r}function J(e,r){return xe(e,r)?null:(process.stderr.write(`error: this test belongs to org ${e.org_id}; you are logged in as org ${r}.
|
|
3
|
-
Switch profiles with \`kane-cli profiles switch\` to act on it.
|
|
4
|
-
`),2)}async function Ht(e={}){let r=!!process.stdin.isTTY&&!e.json,s=new O,n=new L;await H({isInteractive:r,creds:s,config:n});let o=s.getDefaultEnv()??"prod";try{let t=await N({creds:s,env:o,log:()=>{}});return t.resolvedCreds?.org_id===void 0?(process.stderr.write("error: TMS did not return an org_id. Run `kane-cli login` again.\n"),{ok:!1,code:2}):{ok:!0,orgId:String(t.resolvedCreds.org_id)}}catch(t){if(t instanceof B)return process.stderr.write("error: not authenticated. Run `kane-cli login` first.\n"),{ok:!1,code:2};throw t}}async function Vt(e,r){if(process.stdin.isTTY&&!e.json)return await Qe(r,e.root);let s=e.root??process.cwd(),n;try{n=await U({root:s,ignore:e.ignore})}catch(o){if(o instanceof R)return process.stderr.write(`error: ${o.message}
|
|
5
|
-
`),2;throw o}for(let o of n.results){let t=C(o.path);if(!xe(t,r))continue;let i={path:o.relPath.startsWith(".")?o.relPath:`./${o.relPath}`,name:$(o.path),has_meta:t!==null,source:o.source,synced:!!t?.testcase_id,tags:W(o.path)};t&&(t.test_id&&(i.test_id=t.test_id),t.testcase_id&&(i.testcase_id=t.testcase_id),t.org_id&&(i.org_id=t.org_id),t.project_id&&(i.project_id=t.project_id),t.folder_id&&(i.folder_id=t.folder_id)),process.stdout.write(JSON.stringify(i)+`
|
|
6
|
-
`)}return n.aborted&&process.stderr.write(`warn: walk aborted (${n.abortReason}). Pass --root or --ignore to narrow.
|
|
7
|
-
`),0}var we=-1001,be=-1002,ke=-1003,x={action:null,path:null};function Ye(e,r){return x.action=e,x.path=r,e==="run"?we:e==="export"?be:ke}function ze({root:e,currentOrgId:r,onComplete:s}){let[n,o]=D.default.useState({kind:"list"});return D.default.useEffect(()=>{n.kind==="exiting"&&s(n.code)},[n,s]),n.kind==="list"?D.default.createElement(he,{root:e,currentOrgId:r,onSelect:t=>o({kind:"inspect",path:t.path,relPath:t.relPath}),onCancel:()=>o({kind:"exiting",code:0})}):n.kind==="inspect"?D.default.createElement(_e,{path:n.path,relPath:n.relPath,onAction:async t=>{o({kind:"exiting",code:Ye(t,n.path)})},onBack:()=>o({kind:"list"})}):null}async function Qe(e,r){let s=r??process.cwd(),{render:n}=await import("./build-JIKYOZUH.js"),o=await new Promise(t=>{let{unmount:i,waitUntilExit:a}=n(D.default.createElement(ze,{root:s,currentOrgId:e,onComplete:u=>{i(),t(u)}}),{stdout:process.stderr,exitOnCtrlC:!0});a().then(()=>t(0)).catch(()=>t(0))});if(o===we&&x.path){let{runTestMdFile:t}=await import("./run-test-md-XBM6RMCI.js"),i=await t(x.path,{});return x.action=null,x.path=null,i}if(o===be&&x.path){let t=await et(x.path,{},e);return x.action=null,x.path=null,t}if(o===ke&&x.path){let t=await Ze(x.path,!0,e);return x.action=null,x.path=null,t}return o}async function Yt(e,r){let s=Q(e);if(!P(s))return process.stderr.write(`error: file not found: ${s}
|
|
8
|
-
`),2;let n=C(s),o=J(n,r);if(o!==null)return o;let t={path:s,name:$(s),has_meta:n!==null};return n&&(n.commit_id&&(t.commit_id=n.commit_id),n.test_id&&(t.test_id=n.test_id),n.testcase_id&&(t.testcase_id=n.testcase_id),n.project_id&&(t.project_id=n.project_id),n.folder_id&&(t.folder_id=n.folder_id),n.org_id&&(t.org_id=n.org_id),n.session_name&&(t.session_name=n.session_name)),process.stdout.write(JSON.stringify(t)+`
|
|
9
|
-
`),0}async function Ze(e,r,s){let n=Q(e);if(!P(n))return process.stderr.write(`error: file not found: ${n}
|
|
10
|
-
`),2;let o=C(n),t=J(o,s);if(t!==null)return t;if(!r)return process.stderr.write(`error: refusing to delete without --yes.
|
|
11
|
-
This will remove '${n}' and '${q(n)}/'.
|
|
12
|
-
`),2;let i=q(n);if(P(i))try{ye(i,{recursive:!0,force:!0})}catch(a){return process.stderr.write(`error: failed to remove ${i}: ${a.message}
|
|
13
|
-
`),2}try{Ve(n)}catch(a){return process.stderr.write(`error: failed to remove ${n}: ${a.message}
|
|
14
|
-
`),2}return process.stderr.write(`removed ${n} and ${i}/
|
|
15
|
-
`),0}var S=class extends Error{kind;constructor(r,s){super(s),this.name="ExportError",this.kind=r}};async function zt(e,r){let{codeDir:s}=await Te(e,r);return{codeDir:s}}async function Te(e,r){let s=C(e);if(!s?.testcase_id)throw new S("not-synced","this test has not been synced to TMS \u2014 run `kane-cli testmd run` first.");let n=new L().load(),o=Y(e).mobileTarget!==void 0;if(o&&r.language?.toLowerCase()==="javascript")throw new S("js-on-mobile","--language javascript is not supported on a mobile target \u2014 mobile code export is Appium + Python only. Drop the flag, or pass --language python.");let t=r.language??n.code_export?.language;if(!o&&!t)throw new S("no-language","--language not provided and no default in tui-config.");let{framework:i,language:a}=se(t??"python",o),u=r.output??oe(e,i,a),c=P(u);if(c&&!r.force){let m=!1;try{let{readdirSync:T}=await import("fs");m=T(u).length>0}catch{}if(m)return{kind:"reused",codeDir:u}}c&&r.force&&ye(u,{recursive:!0,force:!0});let l=new O,g=r.env??l.getDefaultEnv()??"prod",_;try{_=await N({creds:l,env:g,log:()=>{}})}catch(m){throw m instanceof B?new S("auth-fail","not authenticated. Run `kane-cli login` first."):m}if(!_.basicAuth)throw new S("auth-incomplete","TMS basic auth could not be resolved. Run `kane-cli login` again.");try{let m=X(g);await pe({tmsBaseUrl:m.tmsBaseUrl,testcaseId:s.testcase_id,auth:_.basicAuth,language:a,framework:i,skipValidation:n.code_export?.skip_validation??!0,outDir:u,log:()=>{}})}catch(m){throw new S("export-fail",`code export failed: ${m.message}`)}return{kind:"exported",codeDir:u}}async function et(e,r,s){let n=Q(e);if(!P(n))return process.stderr.write(`error: file not found: ${n}
|
|
16
|
-
`),2;let o=C(n),t=J(o,s);if(t!==null)return t;try{let i=await Te(n,r);return i.kind==="reused"?process.stderr.write(`reusing existing export at ${i.codeDir}
|
|
17
|
-
`):process.stderr.write(`exported to ${i.codeDir}
|
|
18
|
-
`),0}catch(i){if(i instanceof S)return i.kind==="not-synced"?(process.stderr.write("error: this test has not been synced to TMS \u2014 run `kane-cli testmd run` first.\n"),2):i.kind==="no-language"?(process.stderr.write(`error: --language not provided and no default in tui-config.
|
|
19
|
-
`),2):i.kind==="js-on-mobile"?(process.stderr.write(`error: ${i.message}
|
|
20
|
-
`),2):i.kind==="auth-fail"?(process.stderr.write("error: not authenticated. Run `kane-cli login` first.\n"),2):i.kind==="auth-incomplete"?(process.stderr.write("error: TMS basic auth could not be resolved. Run `kane-cli login` again.\n"),2):(process.stderr.write(`error: ${i.message}
|
|
21
|
-
`),2);throw i}}async function Qt(e={}){let r=!!process.stdin.isTTY,s=new O,n=new L;await H({isInteractive:r,creds:s,config:n});let o=e.env??s.getDefaultEnv()??"prod";try{let t=await N({creds:s,env:o,usernameFlag:e.username,accessKeyFlag:e.accessKey,log:()=>{}});return t.resolvedCreds?.org_id===void 0||!t.basicAuth?(process.stderr.write("error: could not resolve TMS credentials. Run `kane-cli login` again.\n"),{ok:!1,code:2}):{ok:!0,orgId:String(t.resolvedCreds.org_id),basicAuth:t.basicAuth,controllerBaseUrl:X(o).controllerBaseUrl}}catch(t){if(t instanceof B)return process.stderr.write("error: not authenticated. Run `kane-cli login` first.\n"),{ok:!1,code:2};throw t}}async function Zt(e,r,s=ce){if(!P(e))return process.stderr.write(`error: file not found: ${e}
|
|
22
|
-
`),2;if(!e.endsWith("_test.md"))return process.stderr.write(`error: not a *_test.md file: ${e}
|
|
23
|
-
`),2;let n=C(e),o=J(n,r.orgId);if(o!==null)return o;if(!n?.commit_id||!n?.test_id)return process.stderr.write(`error: ${e} is not authored \u2014 run \`kane-cli testmd run ${e}\` first.
|
|
24
|
-
`),2;let t=await s({sourcePath:e,testId:n.test_id,sessionId:n.commit_id,commitId:n.commit_id,controller:new ee(r.controllerBaseUrl,{username:r.basicAuth.username,accessKey:r.basicAuth.access_key})}),i={type:"test_md_bundle_sync",status:t.ok?"ok":"failed",commit_id:n.commit_id,...t.ok?{bytes:t.bytes}:{stage:t.stage}};return process.stdout.write(JSON.stringify(i)+`
|
|
25
|
-
`),t.ok?(process.stderr.write(`synced: ${n.commit_id}-testmd.zip (${t.bytes} bytes)
|
|
26
|
-
`),0):(process.stderr.write(`error: bundle sync failed at ${t.stage}: ${t.error}
|
|
27
|
-
`),t.stage==="collect"?2:1)}export{U as a,Y as b,he as c,_e as d,C as e,xe as f,J as g,Ht as h,Vt as i,Qe as j,Yt as k,Ze as l,S as m,zt as n,et as o,Qt as p,Zt as q};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c}from"./chunk-6GH4DRKR.js";import"./chunk-Z4QLCWLB.js";import"./chunk-BB2W35TW.js";import"./chunk-DNNZ353O.js";import"./chunk-NVGBE2DR.js";import"./chunk-R4EGL7VM.js";import"./chunk-JQW2QFSX.js";import"./chunk-FYLMTZ3J.js";import"./chunk-TYRTD5DD.js";import"./chunk-OXHMUZJV.js";import"./chunk-DBIBROYW.js";import"./chunk-IAHKTEET.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{a as captureForceScope,b as commitDesign,c as designPhaseLadder};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-YQ4MRF57.js";import"./chunk-2UIHS2FH.js";import"./chunk-N2P4MI32.js";import"./chunk-YKTYVJBN.js";import"./chunk-3D7VYEDP.js";import"./chunk-DNNZ353O.js";import"./chunk-Q2F5QB2W.js";import"./chunk-NVGBE2DR.js";import"./chunk-R4EGL7VM.js";import"./chunk-JQW2QFSX.js";import"./chunk-FYLMTZ3J.js";import"./chunk-TYRTD5DD.js";import"./chunk-OXHMUZJV.js";import"./chunk-DBIBROYW.js";import"./chunk-IAHKTEET.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-DEUDRSU7.js";import"./chunk-UR6MHSHU.js";export{b as REMOTE_PROVIDERS,d as findProvider,a as landingReceipt,c as looksLikeUrl};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g}from"./chunk-HFRMJP2P.js";import"./chunk-OS4VSIHT.js";import"./chunk-S63XGGBE.js";import"./chunk-BZAGVBCX.js";import"./chunk-JUJ4SAGH.js";import"./chunk-UJZZDPDY.js";import"./chunk-DNNZ353O.js";import"./chunk-5DT7PIGB.js";import"./chunk-NVGBE2DR.js";import"./chunk-CH273NAE.js";import"./chunk-R4EGL7VM.js";import"./chunk-JQW2QFSX.js";import"./chunk-FYLMTZ3J.js";import"./chunk-TYRTD5DD.js";import"./chunk-OXHMUZJV.js";import"./chunk-DBIBROYW.js";import"./chunk-IAHKTEET.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{b as designStateOf,g as evolveCommand,c as evolveOneUc,f as liveRunDesignForUc,a as resolveParentUc,e as runEvolveCommand,d as staleTargets};
|
package/dist/explain-O3A2HZWD.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-OKBEMFAW.js";import"./chunk-OXHMUZJV.js";import"./chunk-DBIBROYW.js";import"./chunk-IAHKTEET.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{a as explain};
|
package/dist/ingest-WTPY2VLS.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{i as a,j as b,k as c,l as d,m as e}from"./chunk-3D7VYEDP.js";import"./chunk-DNNZ353O.js";import"./chunk-Q2F5QB2W.js";import"./chunk-NVGBE2DR.js";import"./chunk-R4EGL7VM.js";import"./chunk-JQW2QFSX.js";import"./chunk-FYLMTZ3J.js";import"./chunk-TYRTD5DD.js";import"./chunk-OXHMUZJV.js";import"./chunk-DBIBROYW.js";import"./chunk-IAHKTEET.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{a as compositePayloadBytes,e as ingestBytes,d as ingestFile,b as slugFromFilename,c as versionBaseOf};
|