@testmuai/kane-cli 0.7.1 → 0.7.2
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-E7QKI4LA.js +8 -0
- package/dist/{ChromeProfilePicker-4CDSPBWL.js → ChromeProfilePicker-DGDWGCZD.js} +1 -1
- package/dist/{CliFeedbackPrompt-TLRVBA4E.js → CliFeedbackPrompt-SYCZXSME.js} +1 -1
- package/dist/{CliUploadProgress-WGGFLUSF.js → CliUploadProgress-VDEAKXJY.js} +1 -1
- package/dist/{ConfigView-DBANTBXC.js → ConfigView-HPKRQXMC.js} +1 -1
- package/dist/EvidenceViewOffer-F5YG54OC.js +2 -0
- package/dist/{FolderPicker-W7RCIFEL.js → FolderPicker-4NSDXQY5.js} +1 -1
- package/dist/{HelpView-FBCX32U7.js → HelpView-ON6BFGJM.js} +1 -1
- package/dist/{InfoBox-KK2ICVS4.js → InfoBox-B23NZ6IG.js} +1 -1
- package/dist/{LinksBox-KKRANMR3.js → LinksBox-TI26VFFH.js} +1 -1
- package/dist/{ProfilesView-DGPXSAQN.js → ProfilesView-CRO5AH3H.js} +1 -1
- package/dist/{ProjectPicker-ESQSL4TT.js → ProjectPicker-3N7LJOXU.js} +1 -1
- package/dist/{SaveSessionPrompt-AQGP5W6E.js → SaveSessionPrompt-UTOEC5AW.js} +1 -1
- package/dist/SingleShotApp-Y3YDFQSD.js +2 -0
- package/dist/{SummaryBox-BFZJW2KK.js → SummaryBox-JK64EKC2.js} +1 -1
- package/dist/TestMdRunView-O6JTHV5W.js +2 -0
- package/dist/{WhoamiView-JABY3I5Q.js → WhoamiView-6QSLPNF6.js} +1 -1
- package/dist/{auth-76LVI6B5.js → auth-IKFVW3NX.js} +1 -1
- package/dist/bind-KCUSVJXG.js +12 -0
- package/dist/bootstrap-NFYYRGGR.js +2 -0
- package/dist/bridge-JSKEO4N3.js +2 -0
- package/dist/{changelog-PSWPPOAF.js → changelog-AAH2ZBYO.js} +1 -1
- package/dist/chat-committer-UUC6JTRJ.js +2 -0
- package/dist/chat-controller-T2FAI55V.js +2 -0
- package/dist/{chunk-NAE7MBR2.js → chunk-23VPUWBD.js} +3 -3
- package/dist/chunk-2UIHS2FH.js +2 -0
- package/dist/chunk-2WFZIQ62.js +2 -0
- package/dist/chunk-2WRBTLFN.js +13 -0
- package/dist/chunk-2YEHV2CX.js +2 -0
- package/dist/{chunk-KVQOBPAZ.js → chunk-3Q6WAK6P.js} +1 -1
- package/dist/{chunk-6HEGD6H2.js → chunk-4LTXE3IX.js} +1 -1
- package/dist/{chunk-KT6G7AF2.js → chunk-4NFCAGRK.js} +1 -1
- package/dist/chunk-53IBTIL3.js +12 -0
- package/dist/{chunk-FCMLIK7P.js → chunk-5DBK6QNS.js} +1 -1
- package/dist/chunk-5DT7PIGB.js +5 -0
- package/dist/{chunk-XDHZMCTA.js → chunk-5FJJJNJK.js} +2 -2
- package/dist/{chunk-XVDJ423L.js → chunk-5SXMV66P.js} +1 -1
- package/dist/{chunk-6UJDOAYR.js → chunk-5WXGMXGA.js} +2 -2
- package/dist/chunk-5ZQZOVWY.js +4 -0
- package/dist/{chunk-5KFS3GAZ.js → chunk-6KPPGMO2.js} +1 -1
- package/dist/{chunk-RNSSM2BK.js → chunk-74HTO7K3.js} +1 -1
- package/dist/{chunk-PMHJRT3A.js → chunk-7KORP5FF.js} +1 -1
- package/dist/chunk-7OYZR6JA.js +3 -0
- package/dist/chunk-7QJ75SYR.js +8 -0
- package/dist/{chunk-DXV6MBTD.js → chunk-AECMF3T2.js} +1 -1
- package/dist/{chunk-3LWTUMDG.js → chunk-AFBKGZFG.js} +1 -1
- package/dist/{chunk-AM5S4KG4.js → chunk-AFPHLUQ5.js} +1 -1
- package/dist/chunk-AJ56AMT6.js +9 -0
- package/dist/{chunk-NJPTOKW5.js → chunk-APPYQZFK.js} +1 -1
- package/dist/{chunk-CSQ46PJ7.js → chunk-AXTGYOMK.js} +1 -1
- package/dist/{chunk-HPMS5KO6.js → chunk-B5RS2XZU.js} +2 -2
- package/dist/chunk-BKHXPBWN.js +2 -0
- package/dist/{chunk-SRDHPKJT.js → chunk-BXYWX4J3.js} +1 -1
- package/dist/chunk-C3T7TKAC.js +349 -0
- package/dist/{chunk-JEUA4UWK.js → chunk-CLGC7VEO.js} +1 -1
- package/dist/{chunk-L4JIMNKW.js → chunk-CUM23TLF.js} +1 -1
- package/dist/chunk-DBIBROYW.js +5 -0
- package/dist/chunk-DBKNJRJG.js +2 -0
- package/dist/{chunk-M7WQM4UA.js → chunk-DUAXZYAD.js} +1 -1
- package/dist/chunk-DZPGG4S6.js +7 -0
- package/dist/{chunk-2KBD6JZX.js → chunk-EOLFTMWF.js} +1 -1
- package/dist/{chunk-2XGDWUJ5.js → chunk-F7ISS545.js} +1 -1
- package/dist/{chunk-JKTFTF24.js → chunk-FBHRBFHP.js} +1 -1
- package/dist/{chunk-L7VREJTG.js → chunk-FDIPQRX4.js} +1 -1
- package/dist/{chunk-AAONIIQV.js → chunk-GFKCTYCA.js} +1 -1
- package/dist/{chunk-73C4PRYU.js → chunk-GYNTNKNB.js} +1 -1
- package/dist/{chunk-KNDSQ4PS.js → chunk-H32GM5G4.js} +1 -1
- package/dist/{chunk-323MLBYA.js → chunk-HYSFJSIG.js} +1 -1
- package/dist/chunk-I7TIGB7K.js +2 -0
- package/dist/chunk-IDX3TOPY.js +6 -0
- package/dist/{chunk-CVOGP253.js → chunk-IMR64OCZ.js} +1 -1
- package/dist/{chunk-IBNC444G.js → chunk-IOD3HQVW.js} +1 -1
- package/dist/{chunk-URQUQWGW.js → chunk-J5FBU425.js} +40 -40
- package/dist/chunk-JKM2PUHI.js +4 -0
- package/dist/{chunk-ZM5PVRJK.js → chunk-JPWLGHPM.js} +1 -1
- package/dist/{chunk-5JTUL6XL.js → chunk-JZ26R6UL.js} +1 -1
- package/dist/chunk-KBM3XHAM.js +2 -0
- package/dist/{chunk-SY3HLQMV.js → chunk-KCCSWEGA.js} +1 -1
- package/dist/{chunk-APAIWBIH.js → chunk-KQZA2QSC.js} +1 -1
- package/dist/{chunk-X3ICV5M5.js → chunk-KWIK22R6.js} +1 -1
- package/dist/{chunk-33QXD75Y.js → chunk-M6FKJKC6.js} +2 -2
- package/dist/{chunk-IXVOXJP6.js → chunk-MK7JUOYV.js} +1 -1
- package/dist/chunk-N2P4MI32.js +2 -0
- package/dist/{chunk-JRMDGLLT.js → chunk-O75ZHGJG.js} +1 -1
- package/dist/chunk-OR6MCL6Z.js +2 -0
- package/dist/chunk-ORQNKZ2Z.js +5 -0
- package/dist/{chunk-QROUKGKU.js → chunk-OS4VSIHT.js} +1 -1
- package/dist/{chunk-UI7KULSI.js → chunk-OUJQVBUT.js} +3 -3
- package/dist/{chunk-UBFKZEX3.js → chunk-PLOWZLG5.js} +1 -1
- package/dist/chunk-QIGPXYMF.js +19 -0
- package/dist/chunk-QOFZSHSC.js +47 -0
- package/dist/{chunk-2XMJ6YAE.js → chunk-R5T4RLF5.js} +1 -1
- package/dist/chunk-R7QAS6LZ.js +4 -0
- package/dist/{chunk-CDQX6HGJ.js → chunk-RDNFVZEB.js} +1 -1
- package/dist/{chunk-NRTHYROA.js → chunk-SFII7HPP.js} +1 -1
- package/dist/{chunk-3FN5VJMV.js → chunk-SL6PCVM2.js} +1 -1
- package/dist/{chunk-LQZ2BU7Q.js → chunk-STVP2XHO.js} +1 -1
- package/dist/chunk-TH47OOBV.js +4 -0
- package/dist/{chunk-OHRS3H7Z.js → chunk-TRJUD3XJ.js} +1 -1
- package/dist/{chunk-BAL64WSI.js → chunk-UC7MNPIN.js} +1 -1
- package/dist/chunk-UD7KKHPW.js +5 -0
- package/dist/chunk-VAYBKR76.js +4 -0
- package/dist/chunk-VFII6C46.js +2 -0
- package/dist/{chunk-R2RGSO4B.js → chunk-VHZ4S57N.js} +1 -1
- package/dist/{chunk-WJ5HDEVH.js → chunk-VLWMMOMF.js} +1 -1
- package/dist/chunk-VMM4LC4V.js +10 -0
- package/dist/{chunk-322JEJEH.js → chunk-VOOPWFHW.js} +1 -1
- package/dist/{chunk-4OPQJ7PE.js → chunk-VRLUNZAK.js} +1 -1
- package/dist/{chunk-AH7ZZIZY.js → chunk-VRVFPMCR.js} +1 -1
- package/dist/{chunk-F6ZOJXYU.js → chunk-VT54ARGE.js} +1 -1
- package/dist/{chunk-NBKQT7LJ.js → chunk-VWKVUOXU.js} +1 -1
- package/dist/chunk-W4B5LOEX.js +4 -0
- package/dist/{chunk-36OC3TFE.js → chunk-W5TTF7GB.js} +2 -2
- package/dist/chunk-WXHQYYD5.js +2 -0
- package/dist/{chunk-NOCIMJSN.js → chunk-XUS4WKDS.js} +1 -1
- package/dist/chunk-XWKUZJCP.js +2 -0
- package/dist/chunk-YTHQNN2L.js +3 -0
- package/dist/{chunk-V36ATG7A.js → chunk-ZBOWFJB2.js} +2 -2
- package/dist/chunk-ZMNJBUAO.js +2 -0
- package/dist/{chunk-LR5XO2KD.js → chunk-ZRASQ63J.js} +1 -1
- package/dist/{chunk-C4G7RVJ6.js → chunk-ZUGCHQFC.js} +1 -1
- package/dist/committer-SWEWEYNX.js +2 -0
- package/dist/{config-R3GF2FZA.js → config-CWZV6XPT.js} +1 -1
- package/dist/{cover-cmd-TXICWHUU.js → cover-cmd-NWIRJY5Z.js} +1 -1
- package/dist/{credentials-XN4ROCQ3.js → credentials-YHTJGKEO.js} +1 -1
- package/dist/descriptor-OEUZZCOK.js +2 -0
- package/dist/design-committer-VYT6NU3T.js +2 -0
- package/dist/dispatch-WVNXB7AD.js +2 -0
- package/dist/docx-convert-CHLJUTFH.js +2 -0
- package/dist/{dossier-QZV74XOS.js → dossier-KTLTGT2X.js} +1 -1
- package/dist/{evidence-V23FPVXQ.js → evidence-IVDNXWPL.js} +1 -1
- package/dist/evolve-cmd-XBX4SX5H.js +2 -0
- package/dist/{exit-manager-HNFATGSM.js → exit-manager-XZL4KIJU.js} +1 -1
- package/dist/explain-UAAQWHYR.js +2 -0
- package/dist/{explain-cmd-RZW6QJYM.js → explain-cmd-75MCF2ZV.js} +1 -1
- package/dist/{explain-cmd-X7JZLSZZ.js → explain-cmd-IZEHWZV5.js} +1 -1
- package/dist/extract-bind-5OWELRME.js +10 -0
- package/dist/extract-cmd-ZRYMJ6IC.js +5 -0
- package/dist/feeder-C3TOJPKK.js +2 -0
- package/dist/{gaps-cmd-BWCRLLBK.js → gaps-cmd-XBRXKXDL.js} +1 -1
- package/dist/{gate-YHBPWEM5.js → gate-54BRAE7N.js} +1 -1
- package/dist/{generate-headless-BSTDLZZY.js → generate-headless-D6BISWDC.js} +2 -2
- package/dist/{headless-io-BL3TEAX5.js → headless-io-66RG5NN5.js} +1 -1
- package/dist/identity-ADZ4PAJF.js +2 -0
- package/dist/index.js +43 -43
- package/dist/ingest-EX72IEQT.js +2 -0
- package/dist/ingest-cmd-YTGOICTC.js +2 -0
- package/dist/{interactive-bind-43HGDF5K.js → interactive-bind-XSRD36MO.js} +7 -6
- package/dist/{lifecycle-cmd-D6TVTYRK.js → lifecycle-cmd-EQSFAZG6.js} +1 -1
- package/dist/{list-cmd-XCAV2FKA.js → list-cmd-IRJSUCM5.js} +1 -1
- package/dist/{list-commands-747UTUSS.js → list-commands-RCYHJ5Y3.js} +1 -1
- package/dist/locks-cmd-CSVSWY2Y.js +2 -0
- package/dist/logical-ids-TEBCQJGO.js +2 -0
- package/dist/login-flow-PYAPYCPY.js +2 -0
- package/dist/maintenance-cmd-MVFA6H74.js +2 -0
- package/dist/pdf-convert-OZIRUADA.js +2 -0
- package/dist/{persist-recorded-session-MDPWWUA7.js → persist-recorded-session-DTYCLXTQ.js} +1 -1
- package/dist/phase-seed-DIRETNU6.js +2 -0
- package/dist/pipeline-MXFOD6ES.js +2 -0
- package/dist/readmodel-XOYGGQ3S.js +2 -0
- package/dist/reconcile-cmd-EG6BOU3A.js +2 -0
- package/dist/reconcile-deps-HTT6IPHT.js +4 -0
- package/dist/reconcile-engine-JQNXALNY.js +2 -0
- package/dist/{recording-banner-TALO7PUR.js → recording-banner-76GCIPUN.js} +1 -1
- package/dist/records-IOZTZUZV.js +2 -0
- package/dist/{require-project-folder-R347LFDQ.js → require-project-folder-ACRDP5ZB.js} +1 -1
- package/dist/{resolver-IDCGRPFJ.js → resolver-SRPCFW7P.js} +1 -1
- package/dist/revert-NQ7GEVSE.js +2 -0
- package/dist/review-cmd-L3V5UP5T.js +4 -0
- package/dist/run-GMZCDRDD.js +2 -0
- package/dist/run-TFRWPGXP.js +2 -0
- package/dist/run-channel-RGH4WIQX.js +2 -0
- package/dist/{run-test-md-DFNIGYB7.js → run-test-md-KEHSRMCM.js} +2 -2
- package/dist/sessions-GIEXOCE4.js +2 -0
- package/dist/{sessions-cmd-AQWLL5ZN.js → sessions-cmd-ZVYGSRJ3.js} +4 -4
- package/dist/{skill-installer-ANXTCXQV.js → skill-installer-HBN3A35K.js} +1 -1
- package/dist/spawner-GC5CFAJ7.js +2 -0
- package/dist/structured-answers-A43Q25CZ.js +5 -0
- package/dist/tcg-generate-V7YFNC5O.js +2 -0
- package/dist/testmd-actions-MNDOO76O.js +2 -0
- package/dist/token-refresh-3UYMCYG3.js +2 -0
- package/dist/{validate-basic-O2DP2XJL.js → validate-basic-ZGWPBYB6.js} +1 -1
- package/dist/verdicts-SCETLY5J.js +2 -0
- package/dist/{version-check-RNR3JCQ5.js → version-check-CJWKDAXV.js} +1 -1
- package/dist/{view-cmd-YSEGA5PI.js → view-cmd-SOVM64L2.js} +1 -1
- package/dist/walk-session-YUYRULPY.js +2 -0
- package/dist/with-telemetry-E7QWPGL6.js +2 -0
- package/package.json +6 -6
- package/dist/ChatSurface-D66CACLX.js +0 -8
- package/dist/EvidenceViewOffer-DNCQ3A6R.js +0 -2
- package/dist/SingleShotApp-SMCAIKCE.js +0 -2
- package/dist/TestMdRunView-FMKZJ3A3.js +0 -2
- package/dist/bind-AACBTSAA.js +0 -12
- package/dist/bootstrap-CNOZ5VRB.js +0 -2
- package/dist/bridge-T4HL4TG7.js +0 -2
- package/dist/chat-committer-4BQBOKI4.js +0 -2
- package/dist/chat-controller-NNTMKEPG.js +0 -2
- package/dist/chunk-2SREGETM.js +0 -4
- package/dist/chunk-3STZLM5J.js +0 -4
- package/dist/chunk-5YPBPZUR.js +0 -2
- package/dist/chunk-BQHKBOSF.js +0 -11
- package/dist/chunk-DQ54MH7F.js +0 -13
- package/dist/chunk-EV3EHXEI.js +0 -4
- package/dist/chunk-F7WKDMX7.js +0 -47
- package/dist/chunk-FPFOW6BS.js +0 -2
- package/dist/chunk-GVIPTX6T.js +0 -6
- package/dist/chunk-GW5DWAXY.js +0 -2
- package/dist/chunk-HJERKSBK.js +0 -349
- package/dist/chunk-IQDWBTRJ.js +0 -3
- package/dist/chunk-KRXSXQBU.js +0 -12
- package/dist/chunk-NAC7SFBE.js +0 -5
- package/dist/chunk-NRC2G4Y5.js +0 -5
- package/dist/chunk-O56PUUNL.js +0 -9
- package/dist/chunk-QM4S2APK.js +0 -2
- package/dist/chunk-SE6WNCYU.js +0 -4
- package/dist/chunk-SWESH2J7.js +0 -10
- package/dist/chunk-T63R6QT4.js +0 -4
- package/dist/chunk-UPPEOQJQ.js +0 -3
- package/dist/chunk-UX2B7L6K.js +0 -2
- package/dist/chunk-VOHQA2SP.js +0 -2
- package/dist/chunk-W5DOU2DV.js +0 -2
- package/dist/chunk-W6VD2XFO.js +0 -19
- package/dist/chunk-WWNSD6FA.js +0 -6
- package/dist/chunk-ZLCZDAEX.js +0 -6
- package/dist/committer-2EJPVVCQ.js +0 -2
- package/dist/descriptor-KXDJ4XYD.js +0 -2
- package/dist/design-committer-BQUWD6AC.js +0 -2
- package/dist/docx-convert-ZBVQO2LG.js +0 -2
- package/dist/evolve-cmd-PZCPXDMR.js +0 -2
- package/dist/explain-UE4IACQH.js +0 -2
- package/dist/extract-bind-BFY7IRL4.js +0 -10
- package/dist/extract-cmd-U3MGK2LP.js +0 -6
- package/dist/feeder-XGTFV7TZ.js +0 -2
- package/dist/ingest-AL6CABJT.js +0 -2
- package/dist/ingest-cmd-O6OWWZT4.js +0 -2
- package/dist/locks-cmd-QAULI5LV.js +0 -2
- package/dist/logical-ids-4G4FAHNJ.js +0 -2
- package/dist/login-flow-CV76ENHV.js +0 -2
- package/dist/maintenance-cmd-ZRB4NTGG.js +0 -2
- package/dist/pdf-convert-S7VYE6AV.js +0 -2
- package/dist/phase-seed-52LRE3LH.js +0 -2
- package/dist/pipeline-LM5JAK7F.js +0 -2
- package/dist/readmodel-X7L7W2BA.js +0 -2
- package/dist/reconcile-cmd-DGCSDML6.js +0 -2
- package/dist/records-5SVUXJBW.js +0 -2
- package/dist/revert-DXXYXJGN.js +0 -2
- package/dist/review-cmd-2QF5HTI7.js +0 -4
- package/dist/run-52UIBPXD.js +0 -2
- package/dist/run-VRVH4VO3.js +0 -2
- package/dist/sessions-BLXZVK5U.js +0 -2
- package/dist/spawner-AH5FTUYU.js +0 -2
- package/dist/structured-answers-QHFGZPSS.js +0 -5
- package/dist/tcg-generate-WKCBBKI5.js +0 -2
- package/dist/testmd-actions-RPYG6TJG.js +0 -2
- package/dist/token-refresh-NIDUOTRM.js +0 -2
- package/dist/verdicts-TJH3O5UW.js +0 -2
- package/dist/walk-session-HXW4OSA2.js +0 -2
- package/dist/with-telemetry-PNP6CAVM.js +0 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as pn,b as ue,c as xn,d as Tt,f as Ye,g as Ze,h as kn}from"./chunk-VFII6C46.js";import{a as hn}from"./chunk-CLGC7VEO.js";import{a as Je}from"./chunk-KCCSWEGA.js";import{a as fn,b as gn}from"./chunk-VGFTNLQQ.js";import"./chunk-L2TV4G56.js";import"./chunk-6KPPGMO2.js";import{a as un,b as dn,c as mn}from"./chunk-SFII7HPP.js";import{a as ln}from"./chunk-5Y2G4NC7.js";import"./chunk-NVGBE2DR.js";import"./chunk-TH47OOBV.js";import"./chunk-VAYBKR76.js";import"./chunk-CUM23TLF.js";import"./chunk-DUAXZYAD.js";import"./chunk-DBIBROYW.js";import"./chunk-WXHQYYD5.js";import"./chunk-IAHKTEET.js";import"./chunk-UD7KKHPW.js";import{a as Ge}from"./chunk-YCCUBQY4.js";import{a as an}from"./chunk-GYNTNKNB.js";import{b as cn}from"./chunk-DFS4RMVP.js";import{y as r}from"./chunk-ZUGCHQFC.js";import{a as X}from"./chunk-HCBYKLMW.js";import{a as b,b as n,k as Ce}from"./chunk-C44QQJR4.js";import{a as wr}from"./chunk-6YGTRKDT.js";import{e as Q}from"./chunk-UR6MHSHU.js";var p=Q(wr(),1);var c=Q(X(),1),Tr=60,vr=100;function vt(t,i){let l=t.options.length,u=l,h=t.multi_select?u++:null,m=t.allow_free_text?u++:null,d=i?u++:null;return{optionCount:l,doneIdx:h,freeIdx:m,batchIdx:d,maxSel:u-1}}var $r="\xA0",Cr={high:{text:`\u203C${$r}high`,color:r.red},med:{text:"med",color:"yellow"},low:{text:"low",color:r.dim}};function Rr(t){let i=(t.header??t.text.split(/\s+/).slice(0,3).join(" ")).trim();return i.length>16?`${i.slice(0,15)}\u2026`:i}function Sr(t,i,l){let u=g=>t[g].length+6,h=u(i),m=i,d=i;for(;;){let g=d+1<t.length?u(d+1):1/0,k=m-1>=0?u(m-1):1/0;if(g===1/0&&k===1/0)break;if(g<=k){if(h+g>l)break;h+=g,d+=1}else{if(h+k>l)break;h+=k,m-=1}}return{lo:m,hi:d}}function bn({batch:t,qView:i,sel:l=0,focused:u=!1,freeText:h=null,optionText:m=null,attach:d=null,canAttach:g=!1,multiSelFor:k}){let{stdout:L}=Ce(),$=L?.columns??80,w=$<Tr,A=Math.min($-1,vr),y=Math.max(0,Math.min(t.questions.length-1,i??(t.cursor<0?0:t.cursor))),x=t.questions[y],S=t.resolution[y],P=t.resolution.filter(U=>!U).length,B=t.questions.length-P,O=Je(t),D=vt(x,O!==""),W=k?k(y):[],K=Cr[x.risk],M=U=>u&&l===U?(0,c.jsx)(n,{color:r.assuranceAccent,children:"\u276F"}):" ",Ie=`? the agent needs ${P===1?"one answer":`${P} answers`}`,z=t.questions.length>1?` \xB7 ${y+1} of ${t.questions.length} \xB7 ${B} answered`:"",N=(0,c.jsxs)(b,{flexDirection:"column",children:[(0,c.jsx)(b,{paddingLeft:2,children:(0,c.jsxs)(n,{bold:!0,children:[x.text,K?(0,c.jsx)(n,{color:K.color,bold:!1,children:` ${K.text}`}):null]})}),(0,c.jsx)(b,{paddingLeft:2,children:(0,c.jsx)(n,{color:r.dim,children:x.rationale})}),(0,c.jsx)(n,{children:" "}),x.options.map((U,q)=>{let re=u&&l===q;return m&&m.optionIndex===q?(0,c.jsx)(b,{flexDirection:"column",children:(0,c.jsxs)(b,{children:[(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,c.jsx)(n,{color:r.assuranceAccent,children:`${q+1}. ${U.label}`}),(0,c.jsx)(n,{color:r.dim,children:" \u270E "})]}),(0,c.jsx)(Ge,{value:m.value,onChange:m.onChange,onSubmit:m.onSubmit,onCancel:m.onCancel,placeholder:U.detail||"type your answer"})]})},`o-${q}`):(0,c.jsxs)(b,{flexDirection:"column",children:[(0,c.jsxs)(n,{children:[M(q)," ",x.multi_select?(0,c.jsx)(n,{color:W.includes(q)?r.green:r.dim,children:W.includes(q)?"[x] ":"[ ] "}):null,(0,c.jsx)(n,{color:re?r.assuranceAccent:void 0,children:`${q+1}. ${U.label}`}),q===x.recommended_index?(0,c.jsx)(n,{color:r.dim,children:" (recommended)"}):null,S?.selected_index===q?(0,c.jsx)(n,{color:r.dim,children:" (current)"}):null]}),U.detail?(0,c.jsx)(b,{paddingLeft:5,children:(0,c.jsx)(n,{color:r.dim,children:U.detail})}):null]},`o-${q}`)}),x.multi_select&&D.doneIdx!=null?(0,c.jsxs)(n,{children:[M(D.doneIdx)," ",(0,c.jsx)(n,{color:r.green,children:"\u2714"}),(0,c.jsx)(n,{color:u&&l===D.doneIdx?r.assuranceAccent:void 0,children:" done \u2014 confirm selection"})]}):null,x.allow_free_text?(0,c.jsx)(n,{children:" "}):null,x.allow_free_text?h?(0,c.jsxs)(b,{children:[(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,c.jsx)(n,{color:r.dim,children:"\u270E "})]}),(0,c.jsx)(Ge,{value:h.value,onChange:h.onChange,onSubmit:h.onSubmit,onCancel:h.onCancel,placeholder:"Tell me what to do"})]}):(0,c.jsxs)(n,{children:[D.freeIdx!=null?M(D.freeIdx):" "," ",(0,c.jsx)(n,{color:u&&D.freeIdx!=null&&l===D.freeIdx?r.assuranceAccent:r.dim,children:"\u270E Tell me what to do"})]}):null,d?(0,c.jsxs)(b,{flexDirection:"column",marginTop:1,children:[(0,c.jsxs)(b,{children:[(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,c.jsx)(n,{color:r.assuranceAccent,children:"@ attach a file or URL"}),(0,c.jsx)(n,{color:r.dim,children:" \u270E "})]}),(0,c.jsx)(Ge,{value:d.value,onChange:d.onChange,onSubmit:d.onSubmit,onCancel:d.onCancel,placeholder:"path or URL"})]}),(0,c.jsx)(b,{paddingLeft:2,children:(0,c.jsx)(n,{color:r.dim,children:"the questions are set aside \u2014 the agent reads the source and re-asks what's still open"})})]}):null]}),C=O!==""?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n,{children:" "}),(0,c.jsxs)(n,{children:[u&&D.batchIdx!=null&&l===D.batchIdx?(0,c.jsx)(n,{color:r.assuranceAccent,children:"\u276F"}):" "," ",(0,c.jsx)(n,{color:r.assuranceAccent,children:"\xBB"}),(0,c.jsx)(n,{bold:!0,color:u&&D.batchIdx!=null&&l===D.batchIdx?r.assuranceAccent:void 0,children:" Go with recommendations"}),P>=5?(0,c.jsx)(n,{color:r.dim,children:` \u2014 resolves all ${P} open`}):null,(0,c.jsx)(n,{color:r.dim,children:" (tab)"})]})]}):null;if(w)return(0,c.jsxs)(b,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,c.jsx)(n,{color:r.assuranceAccent,bold:!0,children:Ie}),t.questions.length>1?(0,c.jsx)(n,{color:r.dim,children:z.replace(/^ · /,"")}):null,(0,c.jsx)(n,{children:" "}),N,C,(0,c.jsx)(b,{paddingLeft:2,children:(0,c.jsx)(n,{color:r.muted,children:"\u2191\u2193 \u23CE \xB7 \u2190 \u2192 questions \xB7 esc back"})})]});let rt=`\u2500\u2500 ${Ie}${z} `,G=Math.max(2,A-rt.length),E=g?"\u2191\u2193 select \xB7 \u23CE confirm \xB7 \u2190 \u2192 questions \xB7 type = your words \xB7 @ attach a file or URL \xB7 esc back":"\u2191\u2193 select \xB7 \u23CE confirm \xB7 \u2190 \u2192 questions \xB7 type = your words \xB7 esc back",De=`\u2500\u2500 ${E} `,it=Math.max(2,A-De.length),me=t.questions.map(U=>Rr(U)),J=t.questions.length>1?Sr(me,y,A-8):null;return(0,c.jsxs)(b,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,c.jsxs)(n,{color:r.assuranceAccent,children:["\u2500\u2500 ",(0,c.jsx)(n,{bold:!0,children:Ie}),z?(0,c.jsx)(n,{color:r.dim,children:z}):null,` ${"\u2500".repeat(G)}`]}),J?(0,c.jsx)(b,{marginTop:1,children:(0,c.jsxs)(n,{children:[J.lo>0?(0,c.jsx)(n,{color:r.dim,children:"\u25C0 "}):" ",t.questions.slice(J.lo,J.hi+1).map((U,q)=>{let re=J.lo+q,qe=q>0?" ":"";return re===y?(0,c.jsxs)(n,{children:[qe,(0,c.jsx)(n,{backgroundColor:r.assuranceAccent,color:"#0d1117",bold:!0,children:` ${me[re]} `})]},U.id):(0,c.jsxs)(n,{children:[qe,t.resolution[re]?(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{color:r.green,children:"\u2713 "}),(0,c.jsx)(n,{color:r.dim,children:me[re]})]}):(0,c.jsx)(n,{color:r.dim,children:`\u25CB ${me[re]}`})]},U.id)}),J.hi<t.questions.length-1?(0,c.jsx)(n,{color:r.dim,children:" \u25B6"}):null]})}):null,(0,c.jsx)(n,{children:" "}),N,C,(0,c.jsx)(n,{children:" "}),(0,c.jsxs)(n,{color:r.assuranceAccent,children:["\u2500\u2500 ",(0,c.jsx)(n,{color:r.muted,children:E}),` ${"\u2500".repeat(it)}`]})]})}var _=Q(X(),1),yn={high:0,med:1,low:2},Ir={high:r.red,med:"yellow",low:r.dim};function Dr(t){return t.map((i,l)=>({r:i,i:l})).sort((i,l)=>(yn[i.r.risk??"zz"]??3)-(yn[l.r.risk??"zz"]??3)||i.i-l.i).map(({r:i})=>i)}var de=(t,i)=>t.length<=i?t:i<=1?"\u2026":`${t.slice(0,i-1)}\u2026`,et=(t,i)=>t+" ".repeat(Math.max(0,i-t.length));function wn({rows:t,width:i=120,badgeHeader:l="risk"}){if(t.length===0)return null;let u=Dr(t),h=B=>B.staged||!B.id?"(staged)":hn(B.id),m=Math.max(2,...u.map(B=>h(B).length)),d=Math.max(l.length,...u.map(B=>(B.badge??"").length)),g=i>=96&&u.some(B=>B.summary),L=i-(g?13:10)-m-d,$=Math.max(...u.map(B=>Math.max(B.title.length,(B.marker??"").length)),5),w=Math.max(5,g?Math.min($,Math.max(16,Math.floor(L*.5))):Math.min($,L)),A=g?Math.max(7,L-w):0,y=(B,O,D,W)=>B+W.map(K=>`\u2500${"\u2500".repeat(K.length)}\u2500`).join(O)+D,x=(B,O,D,W)=>[et(de(B,m),m),et(de(O,w),w),et(de(D,d),d),...g?[et(de(W,A),A)]:[]],S=x("id","title",l,"summary"),P=[];P.push((0,_.jsx)(n,{color:r.dim,children:y("\u250C","\u252C","\u2510",S)},"t")),P.push((0,_.jsxs)(n,{children:[S.map((B,O)=>(0,_.jsxs)(n,{children:[(0,_.jsx)(n,{color:r.dim,children:O===0?"\u2502 ":" \u2502 "}),(0,_.jsx)(n,{bold:!0,children:B})]},O)),(0,_.jsx)(n,{color:r.dim,children:" \u2502"})]},"h")),P.push((0,_.jsx)(n,{color:r.dim,children:y("\u251C","\u253C","\u2524",S)},"m"));for(let[B,O]of u.entries()){let D=x(h(O),de(O.title,w),de(O.badge??"",d),de(O.summary??"",A)),W=O.badgeColor??Ir[O.badge??""]??r.dim;if(P.push((0,_.jsxs)(n,{children:[(0,_.jsx)(n,{color:r.dim,children:"\u2502 "}),(0,_.jsx)(n,{color:r.assuranceAccent,children:D[0]}),(0,_.jsx)(n,{color:r.dim,children:" \u2502 "}),D[1],(0,_.jsx)(n,{color:r.dim,children:" \u2502 "}),(0,_.jsx)(n,{color:W,children:D[2]}),g?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(n,{color:r.dim,children:" \u2502 "}),D[3]]}):null,(0,_.jsx)(n,{color:r.dim,children:" \u2502"})]},`r-${B}`)),O.marker){let K=x("",de(O.marker,w),"","");P.push((0,_.jsx)(n,{color:r.dim,children:`\u2502 ${K.join(" \u2502 ")} \u2502`},`mk-${B}`))}}return P.push((0,_.jsx)(n,{color:r.dim,children:y("\u2514","\u2534","\u2518",S)},"b")),(0,_.jsx)(_.Fragment,{children:P})}var Ar={"use-case":"use-cases",ac:"ACs",scenario:"scenarios",test:"tests",gap:"gaps"},ce=t=>Ar[t]??`${t}s`,Tn=t=>t==="ac"?"AC":t==="use-case"?"use-case":t,$t=t=>t.kind??"use-case",vn=t=>`${$t(t)}:${t.temp_ref}`;function $n(t){let i=t,l=i.badge??t.risk??null,u=i.why??t.summary??t.description??null;return JSON.stringify([t.title,l,u,i.extra??null,t.depends_on_hint??null])}function Cn(t){return t.filter(i=>i.role==="agent"&&typeof i.turnIndex=="number"&&Array.isArray(i.items)&&i.items.length>0)}function he(t){let i=new Map,l=1;for(let m of Cn(t)){let d=new Set;for(let g of m.items){let k=vn(g);if(d.has(k))continue;d.add(k);let L=i.get(k);i.set(k,{num:L?.num??l++,ref:g.temp_ref,kind:$t(g),item:g,turnIndex:m.turnIndex,fingerprint:$n(g)})}}let u=[...i.values()].sort((m,d)=>m.num-d.num),h=[];for(let m of u){let d=h.find(g=>g.kind===m.kind);d?d.count++:h.push({kind:m.kind,label:ce(m.kind),count:1})}return{entries:u,byRef:i,counts:h}}function Rn(t,i){let u=Cn(t).find(x=>x.turnIndex===i);if(!u)return null;let h=t.filter(x=>x.role!=="agent"||typeof x.turnIndex!="number"||x.turnIndex<=i),m=he(h),d=he(t.filter(x=>x.role!=="agent"||typeof x.turnIndex!="number"||x.turnIndex<i)),g=[],k=new Map,L=new Map,$=new Map,w=new Set;for(let x of u.items){let S=vn(x);if(w.has(S))continue;w.add(S);let P=d.byRef.get(S),B=x.changed===!0,O=m.byRef.get(S).num,D=$t(x);if(P&&!B&&P.fingerprint===$n(x)){k.set(D,(k.get(D)??0)+1);continue}let W=!!P||B,K=W?$:L;K.set(D,(K.get(D)??0)+1),g.push({item:x,num:O,updated:W})}let A=[...k.entries()].map(([x,S])=>({label:ce(x),count:S})),y=[...[...L.entries()].map(([x,S])=>`${S} new ${S===1?Tn(x):ce(x)}`),...[...$.entries()].map(([x,S])=>`${S} updated ${S===1?Tn(x):ce(x)}`)].join(" \xB7 ");return{fresh:g,unchanged:A,headerStats:y}}function Ct(t,i){let l=t.entries.filter(m=>m.turnIndex===i);if(l.length===0)return t;let u=new Map(l.map(m=>[m.ref,m])),h=[];for(let m of l){let d=h.find(g=>g.kind===m.kind);d?d.count+=1:h.push({kind:m.kind,label:ce(m.kind),count:1})}return{entries:l,byRef:u,counts:h}}var v=Q(X(),1);function Mr(t){let i=t.form==="assumed"?" (assumed)":t.form==="deferred"?"":" (you)",l=t.note?` \u2014 ${t.note}`:"";return t.form==="deferred"?`\u21B3 deferred q${t.qNum} ${t.stub}${l}`:t.form==="changed"?`\u21B3 changed q${t.qNum} ${t.stub}: ${t.prev??"?"} \u2192 ${t.choice??"?"}${i}${l}`:`\u21B3 ${t.form} q${t.qNum} ${t.stub}: ${t.choice??"?"}${i}${l}`}var Br=Math.min(process.stdout?.columns??100,120)-2;function Sn({block:t,annotations:i}){switch(t.kind){case"banner":return(0,v.jsx)(b,{marginTop:1,children:(0,v.jsx)(n,{color:r.dim,children:` \u2500\u2500 ${t.text} \u2500\u2500`})});case"user":return(0,v.jsxs)(b,{marginTop:1,children:[(0,v.jsx)(n,{color:r.orange,children:"\u276F "}),(0,v.jsx)(n,{children:t.text})]});case"note":return(0,v.jsx)(n,{color:r.dim,children:` ${t.text}`});case"agent":return(0,v.jsx)(b,{marginTop:1,children:(0,v.jsx)(dn,{text:t.text,accent:r.assuranceAccent})});case"thinking":return(0,v.jsx)(b,{marginTop:1,children:(0,v.jsx)(n,{color:r.dim,children:` thought for ${(t.tookMs/1e3).toFixed(1)}s`})});case"tool":return(0,v.jsx)(n,{color:r.dim,children:` ${fn({name:t.name,status:t.status==="ok"?"done":t.status,detail:t.detail})}`});case"usage":return(0,v.jsx)(n,{color:r.dim,children:` \xB7 ${t.credits.toFixed(1)} credits \u2014 total ${t.total.toFixed(1)}`});case"turn":{let l=i??null,u=l?l.fresh:t.items.map(($,w)=>({item:$,num:w+1,updated:!1})),h={usecase:"risk","use-case":"risk",ac:"check",scenario:"kind",test:"check",gap:"severity",stylenote:"kind"},m=$=>$.kind??"use-case",d=new Map;for(let $ of u){let w=$.item,A=m($.item),y=w.risk==="high"||w.risk==="med"||w.risk==="low"?w.risk:void 0,x={id:w.logical_id??"",staged:!w.logical_id,title:w.title,badge:w.badge??w.risk??"",summary:w.why??w.summary??w.description??"",...y?{risk:y}:{},...$.updated?{marker:"\u21B3 changed"}:{}},S=d.get(A)??[];S.push(x),d.set(A,S)}let g=u.some($=>!!$.item.kind),k=(l?.unchanged??[]).reduce(($,w)=>$+w.count,0),L=l?.headerStats?` \u2014 ${l.headerStats}${k>0?` (${k} unchanged)`:""}`:"";return(0,v.jsxs)(b,{flexDirection:"column",marginLeft:2,children:[(0,v.jsxs)(n,{bold:!0,children:[g?"design":t.heading,L?(0,v.jsx)(n,{bold:!1,color:r.dim,children:L}):null]}),[...d.entries()].map(([$,w])=>(0,v.jsxs)(b,{flexDirection:"column",children:[d.size>1?(0,v.jsx)(n,{color:r.dim,children:`${ce($)} \xB7 ${w.length}`}):null,(0,v.jsx)(wn,{rows:w,width:Br,badgeHeader:h[$]??"info"})]},$)),l&&l.unchanged.length>0&&(0,v.jsx)(n,{color:r.dim,children:` \u22EE unchanged: ${l.unchanged.map($=>`${$.count} ${$.label}`).join(" \xB7 ")}`})]})}case"answer":return(0,v.jsx)(n,{color:r.dim,children:Mr(t.receipt)});case"continued":return(0,v.jsx)(n,{color:r.dim,children:"\u21B3 continued"});case"commit":return(0,v.jsxs)(b,{flexDirection:"column",children:[(0,v.jsx)(n,{color:t.ok?r.green:r.red,children:` ${t.ok?"\u2714":"\u2717"} ${t.line}`}),(t.warnings??[]).map((l,u)=>(0,v.jsx)(n,{color:r.dim,children:` \u26A0 ${l}`},`w-${u}`))]});case"error":return(0,v.jsxs)(an,{variant:"error",paddingX:1,children:[(0,v.jsx)(n,{color:r.red,children:t.title}),t.detail.map((l,u)=>(0,v.jsx)(n,{color:r.dim,children:l},`d-${u}`))]});case"interrupted":return(0,v.jsxs)(b,{flexDirection:"column",children:[(0,v.jsx)(n,{color:r.red,children:"interrupted \u2014 session not saved"}),t.detail?(0,v.jsx)(n,{color:r.dim,children:t.detail}):null]});case"pause":return(0,v.jsxs)(b,{flexDirection:"column",children:[(0,v.jsx)(n,{children:`paused: session ${t.sid} saved`}),t.expires_at?(0,v.jsx)(n,{color:r.dim,children:`expires: ${t.expires_at}`}):null,(0,v.jsx)(n,{children:`resume: ${t.resume}`}),t.messageForm?(0,v.jsx)(n,{children:`or say something on the way in: ${t.messageForm}`}):null]});case"summary":return(0,v.jsxs)(b,{flexDirection:"column",children:[(0,v.jsx)(n,{bold:!0,children:"session summary"}),t.lines.map((l,u)=>(0,v.jsx)(n,{children:` ${l}`},`s-${u}`))]})}}var Re=Q(X(),1);function In({item:t}){return(0,Re.jsxs)(b,{flexDirection:"column",marginLeft:2,children:[(t.cite??[]).map((i,l)=>(0,Re.jsx)(n,{dimColor:!0,children:`cite ${i.anchor??"conv"} \u2014 "${i.quote??""}"`},`cite-${l}`)),(t.depends_on_hint??[]).length>0&&(0,Re.jsx)(n,{dimColor:!0,children:`depends on: ${(t.depends_on_hint??[]).join(", ")}`}),Object.entries(t.extra??{}).map(([i,l])=>(0,Re.jsx)(n,{dimColor:!0,children:`${i}: ${l}`},`extra-${i}`))]})}var R=Q(X(),1),Rt=(t,i)=>Math.max(0,Math.min(i,t));function nt(t,i,l){switch(i.type){case"move":return t.level==="detail"?{...t,scroll:Math.max(0,(t.scroll??0)+i.delta)}:{...t,cursor:Rt(t.cursor+i.delta,Math.max(0,l-1))};case"enter":return t.level==="list"?{...t,level:"detail",scroll:0}:t;case"back":return t.level==="detail"?{...t,level:"list",scroll:0}:null}}var An={"use-case":"use-cases",ac:"acs",scenario:"scenarios",test:"tests",gap:"gaps"};function Mn(t,i){if(t.level==="detail")return{level:"detail",cursor:Rt(t.num-1,Math.max(0,i.entries.length-1))};if(t.section){let l=i.entries.findIndex(u=>An[u.kind]===t.section);if(l>=0)return{level:"list",cursor:l}}return{level:"list",cursor:0}}function Er(t){let i=[];for(let l of t.entries){let u=i.find(h=>h.kind===l.kind);u?u.entries.push(l):i.push({kind:l.kind,entries:[l]})}return i}var Dn=3;function Lr({items:t,cursor:i,verb:l,more:u}){let h=`view \xB7 ${l} so far \xB7 ${t.counts.map(d=>`${d.count} ${d.count===1?d.label.replace(/s$/,""):d.label}`).join(" \xB7 ")}`,m=t.entries[i];return(0,R.jsxs)(b,{flexDirection:"column",borderStyle:"round",borderColor:r.dim,paddingX:1,children:[(0,R.jsx)(n,{bold:!0,children:h}),Er(t).map(({kind:d,entries:g})=>{let k=m?.kind===d,L=k?g.findIndex(y=>y.ref===m.ref):-1,$=k?Rt(L-1,Math.max(0,g.length-Dn)):0,w=g.slice($,$+(k?Dn:1)),A=g.length-w.length;return(0,R.jsxs)(b,{flexDirection:"column",children:[(0,R.jsx)(n,{color:r.dim,children:`${An[d]??ce(d)} \xB7 ${g.length}`}),w.map(y=>{let x=k&&y.ref===m.ref,S=y.item.badge;return(0,R.jsxs)(n,{children:[(0,R.jsx)(n,{color:r.assuranceAccent,children:x?"\u203A ":" "}),(0,R.jsx)(n,{children:`${y.num} \xB7 ${y.item.title}`}),S?(0,R.jsx)(n,{color:r.dim,children:` \xB7 ${S}`}):null]},`${y.kind}:${y.ref}`)}),A>0&&(0,R.jsx)(n,{color:r.dim,children:` \u22EE ${A} more`})]},d)}),u?(0,R.jsxs)(n,{children:[(0,R.jsx)(n,{color:r.assuranceAccent,children:i===t.entries.length?"\u203A ":" "}),(0,R.jsx)(n,{color:r.dim,children:`\u22EF show all \u2014 ${u.hidden} more from earlier turns`})]}):null,(0,R.jsx)(n,{color:r.dim,children:"\u2191\u2193 move \xB7 \u21B5 detail \xB7 esc back"})]})}var tt=14;function _r({items:t,cursor:i,explain:l,grandTotal:u,dossier:h,scroll:m=0}){let d=t.entries[i];if(!d)return(0,R.jsx)(n,{color:r.dim,children:"nothing to show"});if(h){let k=Math.max(0,Math.min(m,Math.max(0,h.lines.length-tt))),L=h.lines.slice(k,k+tt);return(0,R.jsxs)(b,{flexDirection:"column",borderStyle:"round",borderColor:r.dim,paddingX:1,children:[(0,R.jsxs)(n,{bold:!0,children:[`view \xB7 ${h.id}`,h.id.toLowerCase()!==h.rawId?(0,R.jsx)(n,{bold:!1,color:r.dim,children:` \xB7 ${h.rawId}`}):null]}),(0,R.jsx)(n,{bold:!0,children:h.title}),k>0?(0,R.jsx)(n,{color:r.muted,children:`\u22EE ${k} above`}):null,L.map(($,w)=>(0,R.jsx)(n,{color:$.dim?r.dim:void 0,children:$.text},`dl-${w}`)),h.lines.length>k+tt?(0,R.jsx)(n,{color:r.muted,children:`\u22EE ${h.lines.length-k-tt} more`}):null,(0,R.jsx)(n,{color:r.dim,children:"\u2191\u2193 scroll \xB7 esc back"})]})}let g=d.item;return(0,R.jsxs)(b,{flexDirection:"column",borderStyle:"round",borderColor:r.dim,paddingX:1,children:[(0,R.jsx)(n,{bold:!0,children:`view \xB7 ${d.kind} ${d.num} of ${u??t.entries.length}`}),(0,R.jsx)(n,{children:d.item.title}),g.badge?(0,R.jsx)(n,{color:r.dim,children:`kind: ${g.badge}`}):null,g.why?(0,R.jsx)(n,{color:r.dim,children:g.why}):null,(0,R.jsx)(In,{item:d.item}),l?.map((k,L)=>(0,R.jsx)(n,{color:r.dim,children:k},`ex-${L}`)),(0,R.jsx)(n,{color:r.dim,children:"view-only \u2014 approvals happen in chat"}),(0,R.jsx)(n,{color:r.dim,children:"\u2191\u2193 prev/next \xB7 esc back to list"})]})}function Bn({items:t,state:i,verb:l,more:u,explain:h,grandTotal:m,dossier:d=null}){return i.level==="list"?(0,R.jsx)(Lr,{items:t,cursor:i.cursor,verb:l,more:u}):(0,R.jsx)(_r,{items:t,cursor:i.cursor,explain:h,grandTotal:m,dossier:d,scroll:i.scroll??0})}var Y=Q(X(),1),St=14;function Or(t){let i=[],l=null;for(let u of t)u.field!==l&&(l=u.field,i.push({kind:"field",field:l})),i.push({kind:"line",field:l,line:u});return i}function En({title:t,lines:i,offset:l=0}){let{stdout:u}=Ce(),h=u?.columns??80,m=Math.min(h-1,100),d=Or(i),g=Math.max(0,Math.min(l,Math.max(0,d.length-St))),k=d.slice(g,g+St),L=g,$=Math.max(0,d.length-g-St),w=`view \xB7 diff \xB7 ${t} \xB7 current \u2192 proposed`,A=y=>{let x=Math.max(0,m-y.length-1);return`${y} ${"\u2500".repeat(x)}`};return(0,Y.jsxs)(b,{flexDirection:"column",children:[(0,Y.jsx)(n,{color:r.dim,children:A(w)}),L>0?(0,Y.jsx)(b,{paddingLeft:2,children:(0,Y.jsx)(n,{color:r.dim,children:`\u22EE ${L} above`})}):null,k.map((y,x)=>y.kind==="field"?(0,Y.jsx)(b,{paddingLeft:2,children:(0,Y.jsx)(n,{color:r.dim,children:y.field==="criteria"?"criteria":y.field})},`r-${g+x}`):(0,Y.jsx)(b,{paddingLeft:4,children:(0,Y.jsx)(n,{color:y.line.op==="-"?"red":"green",children:`${y.line.op==="-"?"\u2212":"+"} ${y.line.text}`})},`r-${g+x}`)),$>0?(0,Y.jsx)(b,{paddingLeft:2,children:(0,Y.jsx)(n,{color:r.dim,children:`\u22EE ${$} more`})}):null,(0,Y.jsx)(n,{color:r.dim,children:`${"\u2500".repeat(Math.max(0,m-21))} \u2191\u2193 scroll \xB7 esc back`})]})}var Pr={"use-cases":"use-cases",usecases:"use-cases","use-case":"use-cases",acs:"acs",ac:"acs",scenarios:"scenarios",scenario:"scenarios",tests:"tests",test:"tests",gaps:"gaps",gap:"gaps"};function Ln(t){let i=(t??"").trim().toLowerCase();if(!i)return{level:"list"};if(/^\d+$/.test(i)){let u=parseInt(i,10);return u>=1?{level:"detail",num:u}:{error:"items are numbered from 1 \u2014 /view 1"}}let l=Pr[i];return l?{level:"list",section:l}:{error:"try /view, /view <number>, or /view acs|scenarios|tests"}}var I=Q(X(),1),qr=6,_n=12;function jr(t,i,l){let u=Math.max(20,i),h=[];for(let d of t.split(`
|
|
3
|
+
`)){if(d.length<=u){h.push(d);continue}let g="";for(let k of d.split(" "))g&&g.length+1+k.length>u?(h.push(g),g=k):g=g?`${g} ${k}`:k;h.push(g)}let m=Math.max(0,h.length-l);return{body:h.slice(-l).join(`
|
|
4
|
+
`),hidden:m}}var Se=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function On(t){let i={key:"redesign",label:"re-design from scratch",detail:"replaces the current design"},l={key:"keep",label:"keep the existing design",detail:"back to the list"};return t.designed==="stale"?[{...i,detail:"the use-case changed since it was designed"},l]:[l,i]}function Li({controller:t,verb:i="extract",onCtrlC:l,chain:u=null,inspect:h=null,reconcile:m=null,autoReview:d=!1,onReviewExit:g}){let[,k]=(0,p.useState)(0),[L,$]=(0,p.useState)(!1),[w,A]=(0,p.useState)(null),[y,x]=(0,p.useState)(null),S=(0,p.useRef)(null),[P,B]=(0,p.useState)(null),O=(0,p.useRef)(null),D=e=>{O.current=e,B(e)},W=e=>{S.current=e,x(e),e===null&&D(null)},K=(0,p.useRef)([]),[M,Ie]=(0,p.useState)(null),z=(0,p.useRef)(null),N=e=>{z.current=e,Ie(e)},[C,rt]=(0,p.useState)(null),G=(0,p.useRef)(null),E=e=>{G.current=e,rt(e)},[De,it]=(0,p.useState)(null),me=(0,p.useRef)(null),J=e=>{me.current=e,it(e)},U=(0,p.useRef)({approved:0,rejected:0,deferred:0}),q=(0,p.useRef)(!1),re=cn(),{stdout:qe}=Ce(),Pn=qe?.columns??80,It=(0,p.useRef)(0),st=(0,p.useRef)(0);(0,p.useEffect)(()=>{let e=()=>{let s=t.state.ledger;for(let a=It.current;a<s.length;a++){let f=s[a],T=f.kind==="turn"?Rn(t.state.turns,f.turnIndex):void 0;re.append((0,I.jsx)(Sn,{block:f,annotations:T},`lg-${a}`))}It.current=s.length};e();let o=t.subscribe(()=>{e();let s=t.state;S.current&&(s.pending||s.status==="pausing")&&(W(null),s.pending&&A("questions arrived \u2014 back to chat")),k(a=>a+1)});return k(s=>s+1),o},[t,re]);let{thinking:xe,status:fe,pending:F,confirm:je,ledger:oe,activeTurn:Dt,stream:qn,notice:Fe}=t.state,At=(qn?.text??"").trimEnd(),Mt=At.length>0,jn=L&&(xe.liveThinking.length>0||xe.thinkingLog.length>0),Fn=jr(xe.liveThinking||xe.thinkingLog.map(e=>e.text).join(`
|
|
5
|
+
`),Pn-6,_n),Bt=Mt?At.split(`
|
|
6
|
+
`).slice(-qr):[];Dt&&(st.current=Dt.turnIndex);let Wn=F?F.resolution.filter(e=>!e).length:0,Et;for(let e=oe.length-1;e>=0;e--){if(K.current.some(s=>s.end!=null&&e>=s.start&&e<s.end))continue;let o=oe[e];if(o.kind==="banner"&&!o.text.startsWith("kane")){Et=o.text;break}}let Ae=xe.activity[xe.activity.length-1],ot=Ae?Ae.status==="decision"?Ae.label:gn({name:Ae.name,status:Ae.status}):void 0,Lt=fe==="streaming"||fe==="working",[lt,Nn]=(0,p.useState)(0);ln(()=>Nn(e=>e+1),Lt||M?.kind==="running"||C?.st.kind==="running"?120:null);let Un=t.state.busySince?Math.floor((Date.now()-t.state.busySince)/1e3):0,Vn=Mt?"Writing\u2026":ot?`${ot.charAt(0).toUpperCase()}${ot.slice(1)}\u2026`:t.state.workingLabel??(i==="design"?"Designing\u2026":"Thinking\u2026"),Kn=t.state.turns.some(e=>e.role==="agent"),[Qn,Hn]=(0,p.useState)(0),[Xn,zn]=(0,p.useState)(!1),[_t,Gn]=(0,p.useState)(null),ke=(0,p.useRef)(0),Ot=(0,p.useRef)(!1),Pt=(0,p.useRef)(null),Me=e=>{ke.current=e,Hn(e)},qt=e=>{Ot.current=e,zn(e)},be=e=>{Pt.current=e,Gn(e)},[We,Jn]=(0,p.useState)(null),at=(0,p.useRef)(null),ye=e=>{at.current=e,Jn(e)},[jt,Yn]=(0,p.useState)(null),Ft=(0,p.useRef)(null),Be=e=>{Ft.current=e,Yn(e)},[ct,Zn]=(0,p.useState)(0),Z=(0,p.useRef)(0),Ee=e=>{Z.current=e,Zn(e)},Wt=F?F.questions[0]?.id??"b":null;(0,p.useEffect)(()=>{F&&Ee(F.cursor<0?0:F.cursor)},[Wt,F?.cursor]);let Ne=()=>{let e=te.current;if(!e)return;let o=e.questions.length;for(let s=1;s<=o;s++){let a=(Z.current+s)%o;if(!e.resolution[a]){Ee(a);return}}},Nt=F?F.questions[Math.max(0,Math.min(F.questions.length-1,ct))]:void 0,ie=(0,p.useRef)(Nt);ie.current=Nt;let te=(0,p.useRef)(F);te.current=F;let er=F?`${Wt}:${ct}`:null;(0,p.useEffect)(()=>{if(be(null),ye(null),Be(null),ie.current){qt(!0);let e=te.current?.resolution[Z.current]?.selected_index;Me(e??ie.current.recommended_index??0)}else qt(!1)},[er]);let Ue=e=>{let o=te.current;return vt(e,o?Je(o)!=="":!1)},tr={isFocused:()=>Ot.current&&ie.current!=null&&Pt.current==null&&at.current==null&&Ft.current==null||G.current!=null&&G.current.st.kind!=="running"&&me.current==null||z.current!=null&&z.current.kind!=="running"||H.current&&sn.current==null,onMove:e=>{let o=ie.current;if(o){Me(Math.max(0,Math.min(Ue(o).maxSel,ke.current+e)));return}let s=G.current;if(s){let f=s.items[s.i];if(s.st.kind==="card"&&f){let T=Ze(f.card)??Ye(f.card).length-1;E({...s,st:{kind:"card",sel:Math.max(0,Math.min(T,s.st.sel+e))}});return}if(s.st.kind==="view"&&f){E({...s,st:{kind:"view",offset:Math.max(0,s.st.offset+e)}});return}if(s.st.kind==="offer"||s.st.kind==="done"){let T=s.st.kind==="offer"?1:Xe.current.length-1;E({...s,st:{...s.st,sel:Math.max(0,Math.min(T,s.st.sel+e))}});return}if(s.st.kind==="running"&&!H.current)return}let a=z.current;if(a?.kind==="picker"){N({...a,sel:Math.max(0,Math.min(a.items.length-1,a.sel+e))});return}if(a?.kind==="ask"||a?.kind==="confirm"||a?.kind==="failed"){let f=(a.kind==="ask"?Qe.current.length:a.kind==="failed"?He.current.length:2)-1;N({...a,sel:Math.max(0,Math.min(f,a.sel+e))});return}a&&!H.current||H.current&&ve(Math.max(0,Math.min(Pe.current.length-1,wt.current+e)))},onSelect:()=>{let e=ie.current,o=te.current;if(!e||!o){let f=G.current;if(f&&f.st.kind!=="running"){let j=f.items[f.i];if(f.st.kind==="card"&&j){let V=f.st.sel;if(V===Ze(j.card)){J("");return}let pe=Ye(j.card)[V];if(!pe)return;if(pe.v==="view_diff"){E({...f,st:{kind:"view",offset:0}});return}let yr=pe.v==="approve"||pe.v==="archive"?"approve":pe.v==="skip"?"reject":"defer";ur(f,yr);return}if(f.st.kind==="view"){E({...f,st:{kind:"card",sel:0}});return}if(f.st.kind==="offer"){f.st.sel===0?en(f,f.st.offer):Te(f);return}if(f.st.kind==="done"){Xe.current[f.st.sel]?.key==="view"?ze(""):(E(null),g?.());return}return}if(f&&!H.current)return;let T=z.current;if(T?.kind==="picker"){let j=T.items[T.sel];j&&(j.designed?N({kind:"confirm",item:j,sel:0}):xt(j,!1));return}if(T?.kind==="confirm"){On(T.item)[T.sel]?.key==="redesign"?xt(T.item,!0):ht();return}if(T?.kind==="ask"){let j=Qe.current[T.sel]?.key;j==="another"?ht():j==="view"?ze(""):N(null);return}if(T?.kind==="failed"){let j=He.current[T.sel]?.key;j==="retry"?xt(T.item,T.force):j==="view"?ze(""):N(null);return}if(T&&!H.current||!H.current)return;switch(Pe.current[wt.current]?.key){case"reconcile-review":Yt();return;case"finish":t.completeSession();return;case"continue":t.continueParked();return;case"design-chain":ht();return;case"view":ze("",st.current);return;case"free":$e("");return}return}let s=Ue(e),a=ke.current;if(s.batchIdx!=null&&a===s.batchIdx){t.goWithRecommendations();return}if(s.freeIdx!=null&&a===s.freeIdx){be("");return}if(s.doneIdx!=null&&a===s.doneIdx){t.confirmMulti(Z.current),Ne();return}if(e.multi_select){t.toggleOption(Z.current,a);return}if(e.options[a]?.input===!0){ye({opt:a,value:""});return}t.submitAnswer(Z.current,a),Ne()},onLeft:()=>{te.current&&Ee(Math.max(0,Z.current-1))},onRight:()=>{let e=te.current;e&&Ee(Math.min(e.questions.length-1,Z.current+1))},onDigit:e=>{let o=ie.current;if(o){e-1<o.options.length&&Me(e-1);return}let s=G.current;if(s){let f=s.items[s.i];if(s.st.kind==="card"&&f){e-1<Ye(f.card).length&&E({...s,st:{kind:"card",sel:e-1}});return}if(s.st.kind==="offer"){e-1<2&&E({...s,st:{...s.st,sel:e-1}});return}if(s.st.kind==="done"){e-1<Xe.current.length&&E({...s,st:{...s.st,sel:e-1}});return}if(s.st.kind!=="running"||!H.current)return}let a=z.current;if(a?.kind==="picker"){e-1<a.items.length&&N({...a,sel:e-1});return}if(a?.kind==="ask"){e-1<Qe.current.length&&N({...a,sel:e-1});return}if(a?.kind==="failed"){e-1<He.current.length&&N({...a,sel:e-1});return}if(a?.kind==="confirm"){e-1<2&&N({...a,sel:e-1});return}if(!(a&&!H.current)&&H.current){let f=Pe.current,T=0;for(let ee=0;ee<f.length;ee++)if(!f[ee].free&&(T+=1,T===e)){ve(ee);return}}},isMulti:()=>{let e=ie.current;return!!e?.multi_select&&ke.current<(e?.options.length??0)},onSpace:()=>{te.current&&t.toggleOption(Z.current,ke.current)},onTab:()=>{let e=ie.current;if(!e)return;let o=Ue(e);o.batchIdx!=null&&Me(o.batchIdx)},onType:e=>{let o=ie.current;if(o){if(e==="@"&&t.canIngest()){Be("");return}let a=ke.current;if(o.options[a]?.input===!0){ye({opt:a,value:e});return}if(!o.allow_free_text)return;let f=Ue(o);Me(f.freeIdx??0),be(e);return}let s=G.current;if(s){if(s.st.kind==="card"){let a=Ze(s.items[s.i].card);a!=null&&(E({...s,st:{kind:"card",sel:a}}),J(e));return}if(s.st.kind!=="running"||!H.current)return}if(!(z.current&&!H.current)&&H.current){let a=pn(Pe.current);if(a==null)return;ve(a),$e(e)}},onBack:()=>{let e=G.current;if(e){e.st.kind==="view"?E({...e,st:{kind:"card",sel:0}}):e.st.kind==="offer"?Te(e):e.st.kind==="done"&&(E(null),g?.());return}let o=z.current;if(o&&o.kind!=="running"){N(null);return}let s=te.current;if(s){for(let a=Z.current-1;a>=0;a--)if(s.resolution[a]){Ee(a);return}}}},nr=_t!=null?{value:_t,onChange:e=>be(e),onSubmit:e=>{be(null),e.trim()&&te.current&&(t.submitFreeText(Z.current,e),Ne())},onCancel:()=>be(null)}:null,rr=jt!=null?{value:jt,onChange:e=>Be(e),onSubmit:e=>{Be(null),e.trim()&&t.ingestAttach(e)},onCancel:()=>Be(null)}:null,ir=We!=null?{optionIndex:We.opt,value:We.value,onChange:e=>ye({opt:We.opt,value:e}),onSubmit:e=>{let o=at.current?.opt;ye(null),o!=null&&te.current&&(t.submitAnswerWithText(Z.current,o,e),Ne())},onCancel:()=>ye(null)}:null,Ve=(0,p.useRef)(!1),ut=l??(()=>t.requestPause()),Ut=()=>{if(q.current&&!Ve.current){Ve.current=!0,A("finishing the verdict \u2014 exiting once it lands (ctrl+c again = force)");return}ut()},le=t.state.checkpoint,Le=M?.kind==="running"&&fe==="idle",Vt=C?.st.kind==="running"&&fe==="idle",ge=fe==="idle"&&Kn&&!F&&!y&&(!M||Le)&&(!C||Vt),H=(0,p.useRef)(!1);H.current=ge;let ne=he(t.state.turns).entries.length,_e,se;for(let e=oe.length-1;e>=0;e--){if(K.current.some(s=>s.end!=null&&e>=s.start&&e<s.end))continue;let o=oe[e];if(!_e&&o.kind==="commit"&&o.ok&&(_e=o.line),!se&&o.kind==="banner"&&o.text.startsWith("designing: ")&&(se=o.text.slice(11)),_e&&se)break}let dt;for(let e=oe.length-1;e>=0;e--){let o=oe[e];if(o.kind==="user")break;if(o.kind==="commit"&&o.ok&&/\bapplied\b/.test(o.line)){dt=o.line;break}}let ae=se?{"acceptance criteria":"scenarios",scenarios:"acceptance criteria + exercises","acceptance criteria + exercises":"tests + gaps"}[se]:void 0,Kt={"acceptance criteria":"the promises every path of this use-case must keep",scenarios:"the concrete user journeys that exercise those promises","acceptance criteria + exercises":"the wiring pass \u2014 per-journey checks, tied to the promises each journey exercises","tests + gaps":"runnable browser tests \u2014 anything unautomatable is recorded as a gap"},Qt=se?Kt[se]:void 0,Ht=ae?Kt[ae]:void 0,sr="phases: acceptance criteria \u2192 scenarios \u2192 wiring \u2192 tests \xB7 stop anytime with finish",or=(()=>{for(let e=oe.length-1;e>=0;e--){let o=oe[e];if(o.kind==="agent")return o.text}return null})(),we=/\?\s*$/.test((or??"").trimEnd()),Xt=i==="design"&&!le&&(we||ae!==void 0),zt=se==="tests + gaps",Ke=M?.kind==="running"?M.title:"the design",Gt=!!t.state.error&&!t.senderAlive(),lr=je?"the agent needs a clarification before it can apply that":Le&&!le?we?`${Ke} \u2014 the agent asked a question`:dt?`${Ke} \u2014 ${dt}`:zt?`${Ke} \u2014 design complete`:`${Ke} \u2014 the agent is waiting on you`:le?se?`${se} done${ae?` \u2014 next: ${ae}`:""}`:_e??"phase done":Gt?"the agent stopped \u2014 the session is view-only":Xt?we?"the agent asked a question \u2014 answer or continue":`design incomplete \u2014 ${ae} not started`:_e??"waiting on you",[Oe,ar]=(0,p.useState)(null),cr=(0,p.useRef)(null);(0,p.useEffect)(()=>{if(!m)return;let e=ge||le?m.pending():null;cr.current=e,ar(e)},[ge,le,oe.length,C==null]);let Jt=Oe?[{key:"reconcile-review",label:Oe.kind==="cards"?`review ${Oe.count} change(s) from ${Oe.source}`:`review change(s) detected in ${Oe.source}`}]:[],mt=je?[{key:"free",label:"clarify \u2014 type which one you meant",free:!0}]:Le&&!le?zt&&!we?[{key:"finish",label:"finish this design"},...ne>0?[{key:"view",label:"view what's saved"}]:[],{key:"free",label:"reply \u2014 tell the agent what to change",free:!0}]:[{key:"continue",label:we?"continue \u2014 go with your suggestion":"continue designing"},...ne>0?[{key:"view",label:"view what's saved"}]:[],{key:"finish",label:"finish this design"},{key:"free",label:"reply \u2014 tell the agent what to change",free:!0}]:le?[...Jt,{key:"continue",label:ae?`continue to ${ae}`:"continue"},...ne>0?[{key:"view",label:"view what's saved"}]:[],{key:"finish",label:"finish here"},{key:"free",label:"adjust \u2014 tell me what to change",free:!0}]:Gt?[...ne>0?[{key:"view",label:"view what's saved"}]:[],{key:"free",label:"tell me what to change",free:!0}]:Xt?[{key:"continue",label:we?"continue \u2014 go with your suggestion":`continue \u2014 ${ae} next`},...ne>0?[{key:"view",label:"view the design"}]:[],{key:"finish",label:"finish anyway"},{key:"free",label:"reply \u2014 answer and continue",free:!0}]:[...Jt,{key:"finish",label:i==="design"?"finish":"looks good \u2014 finish the session"},...u?[{key:"design-chain",label:"design tests for a use-case\u2026"}]:[],...ne>0?[{key:"view",label:i==="design"?"view the design":`view the ${ne} draft${ne===1?"":"s"}`}]:[],{key:"free",label:i==="design"?"keep adjusting \u2014 tell me what to change":"tell me what to change",free:!0}],ft=[{key:"another",label:"design another use-case\u2026"},...ne>0?[{key:"view",label:"view what was designed"}]:[],{key:"back",label:"done \u2014 back"}],Qe=(0,p.useRef)(ft);Qe.current=ft;let gt=[{key:"retry",label:"try again"},...ne>0?[{key:"view",label:"view what's saved"}]:[],{key:"back",label:"back"}],He=(0,p.useRef)(gt);He.current=gt;let pt=[...ne>0?[{key:"view",label:"view what's saved"}]:[],{key:"back",label:"back to the check-in"}],Xe=(0,p.useRef)(pt);Xe.current=pt;let ht=()=>{let e=u?.listUcs()??[];if(e.length===0){A("no use-cases to design yet");return}N({kind:"picker",items:e,sel:0})},xt=(e,o)=>{let s={start:t.state.ledger.length,end:null};K.current.push(s);let a=()=>{s.end=t.state.ledger.length};N({kind:"running",title:e.title,item:e,force:o,startedAt:Date.now()}),u.runDesignChild(e.key,o).then(f=>{a(),f===0?(t.ledger({kind:"commit",ok:!0,line:`designed ${e.title}`}),N({kind:"ask",title:e.title,sel:0})):(t.ledger({kind:"commit",ok:!1,line:`design for ${e.title} failed \u2014 child exited ${f}`}),N({kind:"failed",item:e,force:o,detail:`child exited ${f}`,sel:0}))}).catch(f=>{a();let T=f instanceof Error?f.message:String(f);t.ledger({kind:"commit",ok:!1,line:`design for ${e.title} failed \u2014 ${T}`}),N({kind:"failed",item:e,force:o,detail:T,sel:0})})},Yt=()=>{let e=m?.pending();if(!e){A("nothing awaiting review");return}if(U.current={approved:0,rejected:0,deferred:0},e.kind==="needs-run"){E({items:[],i:0,st:{kind:"running",label:`reviewing changes in ${e.source}`,startedAt:Date.now()}}),m.startReview(e.source).then(()=>{let s=m.loadCards();if(s.length===0){t.note("no reviewable changes came back \u2014 the source may be unchanged"),E(null);return}E({items:s,i:0,st:{kind:"card",sel:0}})}).catch(s=>{t.note(`the review run failed \u2014 ${s instanceof Error?s.message:String(s)}`),E(null)});return}let o=m.loadCards();if(o.length===0){A("nothing awaiting review");return}E({items:o,i:0,st:{kind:"card",sel:0}})},Zt=e=>{let o=U.current,s=`${o.approved} approved \xB7 ${o.rejected} rejected \xB7 ${o.deferred} deferred`;E({...e,st:{kind:"done",sel:0,summary:s}})},Te=e=>{if(e.i+1<e.items.length){E({...e,i:e.i+1,st:{kind:"card",sel:0}});return}let o=m?.loadCards()??[];o.length===0?Zt(e):E({items:o,i:0,st:{kind:"card",sel:0}})},en=(e,o)=>{if(!u){Te(e);return}let s={start:t.state.ledger.length,end:null};K.current.push(s),E({...e,st:{kind:"running",label:`${o.kind==="evolve"?"Evolving":"Designing"} ${o.title}`,startedAt:Date.now()}}),u.runDesignChild(o.key,o.kind==="evolve").then(a=>{s.end=t.state.ledger.length,t.ledger({kind:"commit",ok:a===0,line:a===0?`${o.kind==="evolve"?"evolved":"designed"} ${o.title}`:`${o.kind} child for ${o.title} failed \u2014 exited ${a}`}),Te(G.current??e)}).catch(a=>{s.end=t.state.ledger.length,t.ledger({kind:"commit",ok:!1,line:`${o.kind} child for ${o.title} failed \u2014 ${a instanceof Error?a.message:String(a)}`}),Te(G.current??e)})},ur=(e,o,s)=>{let a=e.items[e.i];!a||q.current||(q.current=!0,m.applyVerdict(a.key,o,s).then(f=>{if(q.current=!1,Ve.current){ut();return}let T=G.current??e;if(!f.ok){t.note(f.refusal);let ee=m.loadCards();ee.length===0?Zt(T):E({items:ee,i:Math.min(T.i,ee.length-1),st:{kind:"card",sel:0}});return}U.current[o==="approve"?"approved":o==="reject"?"rejected":"deferred"]+=1,t.ledger({kind:"commit",ok:!0,line:f.line}),f.note&&t.note(f.note),f.offer?en(T,f.offer):Te(T)}).catch(f=>{if(q.current=!1,Ve.current){ut();return}t.note(`the verdict did not land \u2014 ${f instanceof Error?f.message:String(f)}; try the card again`)}))},dr=e=>{m?.noteSteer?.(),E(null),J(null),A(null),t.submit(e)},mr=De!=null?{value:De,onChange:e=>J(e),onSubmit:e=>{let o=e.trim();o?dr(o):J(null)},onCancel:()=>J(null)}:null,tn=(0,p.useRef)(!1);(0,p.useEffect)(()=>{!d||tn.current||(tn.current=!0,m?.pending()?Yt():g?.())},[d]);let Pe=(0,p.useRef)(mt);Pe.current=mt;let kt=ge&&le&&Qt!==void 0,bt=K.current.find(e=>e.end==null)?.start??"top",nn=(0,p.useRef)(new Set),[fr,rn]=(0,p.useState)(!1);(0,p.useEffect)(()=>{kt?nn.current.has(bt)||(nn.current.add(bt),rn(!0)):rn(!1)},[kt,bt]);let gr=kt?[...fr?[sr]:[],`${Qt}${Ht?` \xB7 next: ${Ht}`:""}`]:[],[pr,hr]=(0,p.useState)(0),[yt,xr]=(0,p.useState)(null),wt=(0,p.useRef)(0),sn=(0,p.useRef)(null),ve=e=>{wt.current=e,hr(e)},$e=e=>{sn.current=e,xr(e)},kr=`${ge}:${le}:${st.current}`;(0,p.useEffect)(()=>{ve(0),$e(null)},[kr]);let br=yt!=null?{value:yt,onChange:e=>$e(e),onSubmit:e=>{$e(null),ve(0);let o=e.trim();o&&(A(null),t.submit(o))},onCancel:()=>{$e(null),ve(0)}}:null,ze=(e,o)=>{if(/^(uc|sc|ac|t|gap|sty)-\d+$/i.test(e.trim())){let T=e.trim().toLowerCase(),j=he(t.state.turns).entries.findIndex(V=>(V.item.logical_id??"").toLowerCase()===T);if(j<0){A(`${e.trim().toUpperCase()} isn't in this session's items \u2014 view lists what this session minted`);return}W({level:"detail",cursor:j,scroll:0}),D(null);return}let s=Ln(e);if("error"in s){A(s.error);return}let a=he(t.state.turns);if(a.entries.length===0){A("nothing proposed yet \u2014 the first turn is still coming");return}if(s.level==="detail"&&s.num>a.entries.length){A(`no item ${s.num} \u2014 the set has ${a.entries.length} item${a.entries.length===1?"":"s"}`);return}let f=o!=null?Ct(a,o):a;W(Mn(s,f)),D(o!=null&&f.entries.length<a.entries.length?o:null)},on=(0,I.jsx)(xn,{verb:i,subject:Et,pendingCount:Wn,creditsTotal:t.state.credits?.total,state:Le?"waiting on you":F||ge||y||M&&M.kind!=="running"?"idle":void 0});if(y){let e=he(t.state.turns),o=P!=null?Ct(e,P):e,s=e.entries.length-o.entries.length,a=y.level==="list"&&s>0,f=o.entries.length+(a?1:0),T=o.entries[y.cursor],ee=y.level==="detail"&&T?t.explainLines(T.item.slug??T.item.temp_ref):null,j=y.level==="detail"&&T&&h?h(T.item.logical_id??t.aliasOf(T.item.temp_ref)??T.item.temp_ref):null;return(0,I.jsxs)(b,{flexDirection:"column",children:[(0,I.jsx)(Tt,{onToggleThinking:()=>$(V=>!V),onCtrlC:Ut,explorer:{isOpen:()=>S.current!==null,onMove:V=>W(S.current&&nt(S.current,{type:"move",delta:V},f)),onEnter:()=>{let V=S.current;if(V){if(V.level==="list"&&a&&V.cursor===o.entries.length){D(null);return}W(nt(V,{type:"enter"},f))}},onBack:()=>{W(S.current&&nt(S.current,{type:"back"},f)),setTimeout(()=>k(V=>V+1),0)}}}),(0,I.jsx)(Bn,{items:o,state:y,verb:i,more:a?{hidden:s}:null,explain:ee,grandTotal:e.entries.length,dossier:j}),(Fe??w)&&(Fe??w).split(`
|
|
7
|
+
`).map((V,pe)=>(0,I.jsx)(n,{color:r.orange,children:V},`nt-${pe}`)),on]})}return(0,I.jsxs)(b,{flexDirection:"column",children:[(0,I.jsx)(Tt,{onToggleThinking:()=>$(e=>!e),onCtrlC:Ut,panel:tr}),jn&&(0,I.jsx)(mn,{thinking:Fn.body,expanded:!0,thinkingDone:fe!=="streaming",maxLines:_n+1}),Bt.length>0&&(0,I.jsx)(b,{flexDirection:"column",children:Bt.map((e,o)=>(0,I.jsx)(n,{children:un(e).map((s,a)=>(0,I.jsx)(n,{bold:s.bold,italic:s.italic,color:s.code?r.dim:void 0,children:s.text},a))},`st-${o}`))}),F&&(0,I.jsx)(bn,{batch:F,qView:ct,sel:Qn,focused:Xn,freeText:nr,optionText:ir,attach:rr,canAttach:t.canIngest(),multiSelFor:e=>t.multiSelection(e)}),je&&(0,I.jsx)(n,{color:"yellow",children:je.prompt}),(Fe??w)&&(Fe??w).split(`
|
|
8
|
+
`).map((e,o)=>(0,I.jsx)(n,{color:r.orange,children:e},`nt-${o}`)),Lt&&!F&&(0,I.jsxs)(n,{color:r.assuranceAccent,children:[`${Se[lt%Se.length]} ${Vn} `,(0,I.jsx)(n,{color:r.dim,children:`(${Un}s)`})]}),ge&&(0,I.jsx)(ue,{headline:lr,rows:mt,sel:pr,focused:yt==null,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 type = your own words",freeText:br,sublines:gr}),C?.st.kind==="card"&&C.items[C.i]&&(0,I.jsx)(kn,{card:C.items[C.i].card,position:{n:C.i+1,of:C.items.length},sel:C.st.sel,focused:De==null,freeText:mr,editorIntent:"steer"}),C?.st.kind==="view"&&C.items[C.i]&&(0,I.jsx)(En,{title:C.items[C.i].card.title,lines:C.items[C.i].viewLines,offset:C.st.offset}),C?.st.kind==="offer"&&(0,I.jsx)(ue,{ask:!0,headline:C.st.offer.kind==="evolve"?`approved \u2014 the design for ${C.st.offer.title} should evolve with it`:`approved \u2014 ${C.st.offer.title} has no tests yet`,rows:[{key:"run",label:C.st.offer.kind==="evolve"?"evolve the design now":"design tests now"},{key:"later",label:"later \u2014 next change"}],sel:C.st.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 esc later"}),C?.st.kind==="running"&&!Vt&&(0,I.jsxs)(n,{color:r.assuranceAccent,children:[`${Se[lt%Se.length]} ${C.st.label}\u2026 `,(0,I.jsx)(n,{color:r.dim,children:`(${Math.floor((Date.now()-C.st.startedAt)/1e3)}s)`})]}),C?.st.kind==="done"&&(0,I.jsx)(ue,{headline:`review complete \u2014 ${C.st.summary}`,rows:pt,sel:C.st.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 esc back"}),M?.kind==="picker"&&(0,I.jsx)(ue,{ask:!0,headline:"design tests for which use-case?",rows:M.items.map(e=>({key:e.key,label:e.title,detail:e.badge})),sel:M.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 esc back"}),M?.kind==="confirm"&&(0,I.jsx)(ue,{ask:!0,headline:`${M.item.title} is already designed${M.item.designed==="stale"?" \u2014 and the use-case has changed since":""}`,rows:On(M.item).map(e=>({key:e.key,label:e.label,detail:e.detail})),sel:M.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 esc back"}),M?.kind==="running"&&!Le&&(0,I.jsxs)(n,{color:r.assuranceAccent,children:[`${Se[lt%Se.length]} Designing ${M.title}\u2026 `,(0,I.jsx)(n,{color:r.dim,children:`(${Math.floor((Date.now()-M.startedAt)/1e3)}s)`})]}),M?.kind==="ask"&&(0,I.jsx)(ue,{headline:`designed ${M.title}`,rows:ft,sel:M.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 esc back"}),M?.kind==="failed"&&(0,I.jsx)(ue,{headline:`design failed \u2014 ${M.item.title} (${M.detail})`,rows:gt,sel:M.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 esc back"}),fe==="pausing"&&(0,I.jsx)(n,{color:r.dim,children:"pausing \u2014 saving session\u2026 (ctrl+c again = force quit)"}),on]})}export{Li as ChatSurface,jr as tailVisualRows};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c}from"./chunk-
|
|
2
|
+
import{a,b,c}from"./chunk-ZRASQ63J.js";import"./chunk-VRLUNZAK.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{c as ChromeProfilePicker,b as formatChromeProfileLine,a as listChromeProfiles};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as r}from"./chunk-
|
|
2
|
+
import{a as r}from"./chunk-FDIPQRX4.js";import"./chunk-VRLUNZAK.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import{c as e}from"./chunk-C44QQJR4.js";import{a as i}from"./chunk-6YGTRKDT.js";import{e as m}from"./chunk-UR6MHSHU.js";var t=m(i(),1);async function d(){return new Promise(o=>{let c=e(t.default.createElement(r,{onSubmit:n=>{c.unmount(),o(n)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{d as renderFeedbackPrompt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as P,b as g,c as f}from"./chunk-
|
|
2
|
+
import{a as P,b as g,c as f}from"./chunk-STVP2XHO.js";import"./chunk-VHZ4S57N.js";import"./chunk-5Y2G4NC7.js";import"./chunk-ZUGCHQFC.js";import{a as c}from"./chunk-HCBYKLMW.js";import{c as d}from"./chunk-C44QQJR4.js";import{a as h}from"./chunk-6YGTRKDT.js";import{e as p}from"./chunk-UR6MHSHU.js";var e=p(h(),1);var m=p(c(),1);function w({pipeline:t,buildShareUrl:r,onDone:o}){let[n,i]=(0,e.useState)(P()),[S,l]=(0,e.useState)("uploading"),[U,R]=(0,e.useState)(),[C,E]=(0,e.useState)();return(0,e.useEffect)(()=>{let x=t.config.onProgress;t.config.onProgress=(s,u,a)=>{x(s,u,a),i(y=>g(y,s,u,a))},t.execute().then(s=>{s.success?(R(r?.(s)),l("success")):(E(s.error),l("failed")),setTimeout(()=>o(s),1500)})},[]),(0,m.jsx)(f,{steps:n,status:S,testUrl:U,error:C})}async function O(t,r){return new Promise(o=>{let n=d(e.default.createElement(w,{pipeline:t,buildShareUrl:r,onDone:i=>{n.unmount(),o(i)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{O as renderUploadProgress};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as p,b as l,c as n}from"./chunk-
|
|
2
|
+
import{a as p,b as l,c as n}from"./chunk-GYNTNKNB.js";import{y as o}from"./chunk-ZUGCHQFC.js";import{a as g}from"./chunk-HCBYKLMW.js";import{a,j as c}from"./chunk-C44QQJR4.js";import{a as R}from"./chunk-6YGTRKDT.js";import{e as t}from"./chunk-UR6MHSHU.js";var b=t(R(),1);var e=t(g(),1);function A({model:d,authLabel:v,profile:x,env:w,defaultUrl:u,projectId:r,projectName:s,folderId:i,folderName:f,windowSize:B,chromeProfile:C}){let h=r?s?`${s} (${r})`:r:"(none)",D=i?f?`${f} (${i})`:i:"(none)",{exit:m}=c();return(0,b.useEffect)(()=>{let P=setTimeout(()=>m(),50);return()=>clearTimeout(P)},[m]),(0,e.jsx)(a,{flexDirection:"column",children:(0,e.jsx)(p,{title:"Configuration",children:(0,e.jsxs)(a,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(n,{label:"Auth"}),(0,e.jsx)(l,{label:" method",value:v}),(0,e.jsx)(l,{label:" profile",value:x}),(0,e.jsx)(l,{label:" env",value:w}),(0,e.jsx)(n,{label:"Defaults"}),(0,e.jsx)(l,{label:" url",value:u??"(none)",valueColor:u?o.orange:o.dim}),(0,e.jsx)(l,{label:" model",value:d}),(0,e.jsx)(l,{label:" window",value:B}),(0,e.jsx)(l,{label:" project",value:h}),(0,e.jsx)(l,{label:" folder",value:D}),(0,e.jsx)(n,{label:"Paths"}),(0,e.jsx)(l,{label:" chrome",value:C,valueColor:o.dim})]})})})}export{A as ConfigView};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a}from"./chunk-EOLFTMWF.js";import"./chunk-2WRBTLFN.js";import"./chunk-5DBK6QNS.js";import"./chunk-CJJXT5DO.js";import"./chunk-XWKUZJCP.js";import"./chunk-ZPDM6FO7.js";import"./chunk-NVGBE2DR.js";import"./chunk-EHN5HTUD.js";import"./chunk-L5LI2JF4.js";import"./chunk-TH47OOBV.js";import"./chunk-VAYBKR76.js";import"./chunk-CUM23TLF.js";import"./chunk-DUAXZYAD.js";import"./chunk-DBIBROYW.js";import"./chunk-WXHQYYD5.js";import"./chunk-IAHKTEET.js";import"./chunk-UD7KKHPW.js";import"./chunk-CH273NAE.js";import"./chunk-RFHMDQXZ.js";import"./chunk-QIGPXYMF.js";import"./chunk-5EOX4MEY.js";import"./chunk-O75ZHGJG.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as EvidenceViewOffer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-HYSFJSIG.js";import"./chunk-YCCUBQY4.js";import"./chunk-H32GM5G4.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-O75ZHGJG.js";import"./chunk-VRLUNZAK.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as FolderPicker,a as formatFolderLine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as f,b as r,y as t}from"./chunk-
|
|
2
|
+
import{a as f,b as r,y as t}from"./chunk-ZUGCHQFC.js";import{a as T}from"./chunk-HCBYKLMW.js";import{a as s,b as o,j as x,k as p}from"./chunk-C44QQJR4.js";import{a as v}from"./chunk-6YGTRKDT.js";import{e as h}from"./chunk-UR6MHSHU.js";var w=h(v(),1);var e=h(T(),1),b="https://www.testmuai.com/support/docs/kane-cli-introduction",S="https://github.com/LambdaTest/kane-cli/issues";function L(){let{exit:c}=x(),{stdout:a}=p(),l=a?.columns??80;return(0,w.useEffect)(()=>{let m=setTimeout(()=>c(),50);return()=>clearTimeout(m)},[c]),(0,e.jsxs)(s,{flexDirection:"column",children:[(0,e.jsxs)(s,{paddingX:1,paddingTop:1,flexDirection:"column",children:[(0,e.jsx)(o,{color:t.orange,bold:!0,children:r}),(0,e.jsxs)(s,{children:[(0,e.jsx)(o,{color:t.dim,children:"Browser automation powered by AI "}),(0,e.jsxs)(o,{color:t.muted,children:[" v",f]})]})]}),(0,e.jsx)(o,{children:" "}),(0,e.jsxs)(d,{title:"USAGE",children:[(0,e.jsx)(g,{cmd:`${r}`,desc:"Single-shot prompt (no args, TTY)"}),(0,e.jsx)(g,{cmd:`${r} --tui`,desc:"Full interactive TUI",highlight:!0}),(0,e.jsx)(g,{cmd:`${r} run "<objective>"`,desc:"Inline objective"}),(0,e.jsx)(g,{cmd:`${r} testmd run <path>.md`,desc:"Replay a saved *_test.md file"})]}),(0,e.jsxs)(d,{title:"HELP",children:[(0,e.jsx)(g,{cmd:`${r} --help`,desc:"Show this help (long form)"}),(0,e.jsx)(g,{cmd:`${r} -h`,desc:"Show this help (short form)"}),(0,e.jsx)(g,{cmd:`${r} help`,desc:"Show this help (subcommand form)"}),(0,e.jsxs)(s,{marginLeft:2,marginTop:0,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:["These are the only supported help invocations. Anything else (e.g. ",(0,e.jsx)(o,{color:t.orange,children:"-help"}),") is an unknown flag."]}),(0,e.jsxs)(o,{color:t.dim,children:["Terminal tab-completion is a shell feature; ",r," does not ship shell-completion scripts, so any flag your shell suggests is a generic guess \u2014 not from ",r,"."]})]})]}),(0,e.jsxs)(d,{title:"COMMANDS",children:[(0,e.jsx)(i,{cmd:"run",args:"<objective>",desc:"Run an objective (inline string)",highlight:!0}),(0,e.jsx)(i,{cmd:"testmd",args:"run|list|status|delete|export",desc:"Manage *_test.md files"}),(0,e.jsx)(i,{cmd:"testrun",args:"run",desc:"Run M *_test.md files as one sealed execution"}),(0,e.jsx)(i,{cmd:"login",desc:"Auth setup (interactive, --oauth, or --username)"}),(0,e.jsx)(i,{cmd:"logout",desc:"Revoke tokens + delete profile"}),(0,e.jsx)(i,{cmd:"whoami",desc:"Show authenticated identity"}),(0,e.jsx)(i,{cmd:"config",args:"show|set-mode|set-assertion-mode|\u2026",desc:"Chrome, run & generate settings"}),(0,e.jsx)(i,{cmd:"profiles",args:"list|switch|delete",desc:"Manage auth profiles"}),(0,e.jsx)(i,{cmd:"evidence",args:"validate|serve|merge",desc:"Validate, serve (viewer) or merge evidence packs"}),(0,e.jsx)(i,{cmd:"changelog",args:"[--all]",desc:"Show recent release notes"}),(0,e.jsx)(i,{cmd:"context",args:"ingest|extract|list|review|sessions|\u2026",desc:"Build & manage the assurance context store"}),(0,e.jsx)(i,{cmd:"design",args:"tests --use-case <ref>",desc:"Design tests from the context store"})]}),(0,e.jsxs)(d,{title:"TESTMD ACTIONS",children:[(0,e.jsx)(i,{cmd:"testmd run",args:"<path>",desc:"Replay a saved *_test.md file",highlight:!0}),(0,e.jsx)(i,{cmd:"testmd list",desc:"List *_test.md files in cwd (recursive)"}),(0,e.jsx)(i,{cmd:"testmd status",args:"<path>",desc:"Print local meta.json for a test"}),(0,e.jsx)(i,{cmd:"testmd delete",args:"<path>",desc:"Remove output-<stem>/ and the source file"}),(0,e.jsx)(i,{cmd:"testmd export",args:"<path> --language <py|js>",desc:"Generate standalone Playwright code"})]}),(0,e.jsxs)(d,{title:"RUN FLAGS",children:[(0,e.jsx)(n,{long:"--max-steps",arg:"<n>",desc:"Max agent steps (default: 30)"}),(0,e.jsx)(n,{long:"--timeout",arg:"<sec>",desc:"Kill run after N seconds"}),(0,e.jsx)(n,{long:"--headless",desc:"No visible browser window"}),(0,e.jsx)(n,{long:"--mode",arg:"<action|testing>",desc:"Run mode (default: testing)"}),(0,e.jsx)(n,{long:"--name",arg:"<name>",desc:"Persist session under this name"}),(0,e.jsx)(n,{long:"--variables",arg:"<json>",desc:"Inline variables as JSON"}),(0,e.jsx)(n,{long:"--variables-file",arg:"<path>",desc:"Load variables from file"}),(0,e.jsx)(n,{long:"--session-context",arg:"<json>",desc:"Prior runs context JSON"}),(0,e.jsx)(n,{long:"--global-context",arg:"<file>",desc:"Override global context markdown"}),(0,e.jsx)(n,{long:"--local-context",arg:"<file>",desc:"Override local context markdown"}),(0,e.jsx)(n,{long:"--ws-endpoint",arg:"<url>",desc:"Remote browser (LambdaTest)"}),(0,e.jsx)(n,{long:"--cdp-endpoint",arg:"<url>",desc:"Connect to existing Chrome CDP"}),(0,e.jsx)(n,{long:"--task-skills",desc:"Domain-specific task skills (experimental)"}),(0,e.jsx)(n,{long:"--code-export",desc:"Generate code export after upload"}),(0,e.jsx)(n,{long:"--code-language",arg:"<lang>",desc:"Code export language: python | javascript"}),(0,e.jsx)(n,{long:"--skip-code-validation",desc:"Skip post-codegen validation"}),(0,e.jsx)(n,{long:"--username",arg:"<user>",desc:"Basic auth (skip OAuth)"}),(0,e.jsx)(n,{long:"--access-key",arg:"<key>",desc:"Basic auth access key"}),(0,e.jsx)(n,{long:"--env",arg:"<name>",desc:"Environment (prod or stage)"}),(0,e.jsx)(n,{long:"--agent",desc:"NDJSON output (no UI)",highlight:!0})]}),(0,e.jsxs)(d,{title:"EXAMPLES",children:[(0,e.jsx)(u,{label:"Inline objective",cmd:`${r} run "Search for laptop"`}),(0,e.jsx)(u,{label:"Replay a saved test",cmd:`${r} testmd run smoke_test.md`}),(0,e.jsx)(u,{label:"Variables",cmd:`${r} run "Login as {{user}}" --variables '{"user":{"value":"alice"}}'`}),(0,e.jsx)(u,{label:"Agent mode (NDJSON)",cmd:`${r} run "Add to cart" --agent | jq .status`})]}),(0,e.jsx)(d,{title:"TEST FILES",children:(0,e.jsxs)(s,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:[(0,e.jsx)(o,{color:t.orange,children:"*_test.md"})," \u2014 markdown test files with YAML frontmatter and ",(0,e.jsx)(o,{color:t.orange,children:"## "}),"step headings."]}),(0,e.jsxs)(o,{color:t.dim,children:["Run with ",(0,e.jsxs)(o,{color:t.orange,children:[r," testmd run path/to/foo_test.md"]}),". (`.md` paths are not accepted by `",r," run`.)"]}),(0,e.jsxs)(o,{color:t.dim,children:["Sessions you run in TUI auto-save to ",(0,e.jsx)(o,{color:t.orange,children:"<cwd>/.testmuai/tests/<name>_test.md"})," (testing mode prompts on exit)."]})]})}),(0,e.jsxs)(s,{flexDirection:"column",marginTop:0,paddingX:1,children:[(0,e.jsx)(o,{color:t.muted,children:"\u2500".repeat(Math.min(l-2,70))}),(0,e.jsxs)(s,{gap:3,children:[(0,e.jsxs)(s,{children:[(0,e.jsx)(o,{color:t.dim,children:"Docs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:b})]}),(0,e.jsxs)(s,{children:[(0,e.jsx)(o,{color:t.dim,children:"Bugs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:S})]})]})]}),(0,e.jsx)(o,{children:" "})]})}function d({title:c,children:a}){return(0,e.jsxs)(s,{flexDirection:"column",marginBottom:1,children:[(0,e.jsx)(s,{marginLeft:1,children:(0,e.jsx)(o,{bold:!0,color:t.dim,children:c})}),a]})}function g({cmd:c,desc:a,highlight:l}){return(0,e.jsxs)(s,{marginLeft:2,children:[(0,e.jsxs)(s,{width:40,children:[(0,e.jsx)(o,{color:t.dim,children:"$ "}),(0,e.jsx)(o,{color:l?t.orange:t.orange,children:c})]}),(0,e.jsx)(o,{color:t.dim,children:a})]})}function i({cmd:c,args:a,desc:l,highlight:m}){return(0,e.jsxs)(s,{marginLeft:2,children:[(0,e.jsx)(s,{width:16,children:(0,e.jsx)(o,{color:m?t.orange:t.green,bold:!0,children:c})}),(0,e.jsx)(s,{width:32,children:a?(0,e.jsx)(o,{color:t.dim,children:a}):null}),(0,e.jsx)(o,{color:t.dim,children:l})]})}function n({long:c,arg:a,desc:l,highlight:m}){return(0,e.jsxs)(s,{marginLeft:2,children:[(0,e.jsxs)(s,{width:30,children:[(0,e.jsx)(o,{color:m?t.orange:t.orange,children:c}),a&&(0,e.jsxs)(o,{color:t.dim,children:[" ",a]})]}),(0,e.jsx)(o,{color:t.dim,children:l})]})}function u({label:c,cmd:a}){return(0,e.jsxs)(s,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:["# ",c]}),(0,e.jsxs)(o,{color:t.orange,children:["$ ",a]})]})}export{L as HelpView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-KQZA2QSC.js";import"./chunk-GYNTNKNB.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as InfoBox};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-AXTGYOMK.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as LinksBox};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-RDNFVZEB.js";import"./chunk-VRLUNZAK.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProfilesView,a as formatProfileLine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-FBHRBFHP.js";import"./chunk-YCCUBQY4.js";import"./chunk-H32GM5G4.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-O75ZHGJG.js";import"./chunk-VRLUNZAK.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProjectPicker,a as formatProjectLine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c}from"./chunk-
|
|
2
|
+
import{a,b,c}from"./chunk-APPYQZFK.js";import"./chunk-S3DAAAE5.js";import"./chunk-KQZA2QSC.js";import"./chunk-GYNTNKNB.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SaveSessionPrompt,b as defaultSessionTimestamp,c as renderSavePrompt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a}from"./chunk-BXYWX4J3.js";import"./chunk-74HTO7K3.js";import"./chunk-SL6PCVM2.js";import"./chunk-TDPWFYTJ.js";import"./chunk-AECMF3T2.js";import"./chunk-OR6MCL6Z.js";import"./chunk-L5LI2JF4.js";import"./chunk-4NFCAGRK.js";import"./chunk-WAOCHXJ5.js";import"./chunk-FBHRBFHP.js";import"./chunk-HYSFJSIG.js";import"./chunk-YCCUBQY4.js";import"./chunk-H32GM5G4.js";import"./chunk-QIGPXYMF.js";import"./chunk-5EOX4MEY.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-O75ZHGJG.js";import"./chunk-VE3SUJMA.js";import"./chunk-VT54ARGE.js";import"./chunk-VRLUNZAK.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SingleShotApp};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-
|
|
2
|
+
import{a,b,c,d}from"./chunk-5SXMV66P.js";import"./chunk-KQZA2QSC.js";import"./chunk-GYNTNKNB.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{d as AutoExitSummaryBox,c as SummaryBox,b as buildSummaryEvent,a as buildSummaryRendered};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{g as a}from"./chunk-VWKVUOXU.js";import"./chunk-MK7JUOYV.js";import"./chunk-OUJQVBUT.js";import"./chunk-TDPWFYTJ.js";import"./chunk-AECMF3T2.js";import"./chunk-VHZ4S57N.js";import"./chunk-5Y2G4NC7.js";import"./chunk-QIGPXYMF.js";import"./chunk-5EOX4MEY.js";import"./chunk-O75ZHGJG.js";import"./chunk-KQZA2QSC.js";import"./chunk-GYNTNKNB.js";import"./chunk-DFS4RMVP.js";import"./chunk-ZUGCHQFC.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as TestMdRunView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as b,b as r}from"./chunk-
|
|
2
|
+
import{a as b,b as r}from"./chunk-GYNTNKNB.js";import{y as o}from"./chunk-ZUGCHQFC.js";import{a as p}from"./chunk-HCBYKLMW.js";import{a as i,b as l,j as s}from"./chunk-C44QQJR4.js";import{a as T}from"./chunk-6YGTRKDT.js";import{e as a}from"./chunk-UR6MHSHU.js";var f=a(T(),1);var e=a(p(),1);function V({profile:g,env:v,authenticated:n,authMethod:h,username:c,tokenStatus:t,expiresAt:d,serverStatus:u,detail:m}){let{exit:x}=s();return(0,f.useEffect)(()=>{let B=setTimeout(()=>x(),50);return()=>clearTimeout(B)},[x]),(0,e.jsx)(i,{flexDirection:"column",children:(0,e.jsx)(b,{title:"Identity",variant:n?"success":"warning",children:(0,e.jsxs)(i,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{children:u==="rejected"?(0,e.jsx)(l,{color:o.red,bold:!0,children:"\u2717 Not authenticated"}):u==="unreachable"?(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Couldn't verify"}):n?(0,e.jsx)(l,{color:o.green,bold:!0,children:"\u2713 Authenticated"}):(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Not logged in"})}),(0,e.jsxs)(i,{flexDirection:"column",marginTop:1,children:[(0,e.jsx)(r,{label:"Profile",value:g}),(0,e.jsx)(r,{label:"Environment",value:v}),(0,e.jsx)(r,{label:"Method",value:h}),c&&(0,e.jsx)(r,{label:"User",value:c}),t&&(0,e.jsx)(r,{label:"Token",value:t,valueColor:t==="valid"?o.green:t==="expired"?o.red:o.dim}),d&&(0,e.jsx)(r,{label:"Expires",value:d}),m&&(0,e.jsx)(r,{label:"Detail",value:m})]})]})})})}export{V as WhoamiView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import"./chunk-UR6MHSHU.js";async function i(e){try{let[{CredentialsManager:n},{AuthResolver:a},{getEnvironment:s}]=await Promise.all([import("./credentials-
|
|
2
|
+
import"./chunk-UR6MHSHU.js";async function i(e){try{let[{CredentialsManager:n},{AuthResolver:a},{getEnvironment:s}]=await Promise.all([import("./credentials-YHTJGKEO.js"),import("./resolver-SRPCFW7P.js"),import("./config-CWZV6XPT.js")]),t=new n,o=t.getActiveProfile()??"default",c=t.loadCredentials(o,e);if(typeof c?.access_token!="string")return null;let r=await new a(s(e).controllerBaseUrl,async()=>c.access_token,null).resolve();return typeof r?.username!="string"||!r.username||typeof r.access_key!="string"||!r.access_key?null:Buffer.from(`${r.username}:${r.access_key}`,"utf8").toString("base64")}catch{return null}}async function u(e={}){let n=e.env??process.env,s=await(e.resolveBase??(async()=>(await import("./spawner-GC5CFAJ7.js")).resolveAgentAuthEnv()))();if(s.TESTMUAI_BASIC_AUTH||n.TESTMUAI_BASIC_AUTH)return s;let t=n.TESTMUAI_ENV==="stage"?"stage":"prod",o=await(e.exchange??i)(t);return o?{...s,TESTMUAI_BASIC_AUTH:o}:s}export{u as resolveLisAuthEnv};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as _}from"./chunk-C3T7TKAC.js";import"./chunk-IOD3HQVW.js";import"./chunk-KHU7C6EE.js";import"./chunk-3Q6WAK6P.js";import"./chunk-AFPHLUQ5.js";import"./chunk-AJ56AMT6.js";import"./chunk-DZPGG4S6.js";import"./chunk-F7ISS545.js";import"./chunk-7OYZR6JA.js";import"./chunk-JFAFKHDX.js";import"./chunk-BB2W35TW.js";import"./chunk-YKTYVJBN.js";import"./chunk-IMR64OCZ.js";import"./chunk-427OQS2N.js";import"./chunk-JZ26R6UL.js";import"./chunk-VGFTNLQQ.js";import"./chunk-L2TV4G56.js";import"./chunk-6KPPGMO2.js";import"./chunk-5DT7PIGB.js";import"./chunk-R7QAS6LZ.js";import"./chunk-QOFZSHSC.js";import"./chunk-BKHXPBWN.js";import"./chunk-5FJJJNJK.js";import"./chunk-VMM4LC4V.js";import"./chunk-W4B5LOEX.js";import"./chunk-DNNZ353O.js";import"./chunk-2UIHS2FH.js";import"./chunk-Q2F5QB2W.js";import"./chunk-N2P4MI32.js";import"./chunk-GFKCTYCA.js";import"./chunk-ZPDM6FO7.js";import"./chunk-NVGBE2DR.js";import"./chunk-L5LI2JF4.js";import"./chunk-TH47OOBV.js";import"./chunk-VAYBKR76.js";import"./chunk-CUM23TLF.js";import"./chunk-DUAXZYAD.js";import"./chunk-DBIBROYW.js";import"./chunk-WXHQYYD5.js";import"./chunk-IAHKTEET.js";import"./chunk-UD7KKHPW.js";import{a as m}from"./chunk-CH273NAE.js";import"./chunk-IDX3TOPY.js";import"./chunk-5EOX4MEY.js";import"./chunk-ZUGCHQFC.js";import"./chunk-UR6MHSHU.js";import{existsSync as O}from"fs";var P=new Set(["interactive","agent","ci","override"]);function H(e){return e.mode!=null&&!P.has(e.mode)?{error:`design: --mode must be interactive | agent | ci | override, got '${e.mode}'`}:e.strength!=null&&e.strength!=="pairwise"&&e.strength!=="3-wise"?{error:`design: --strength must be pairwise | 3-wise, got '${e.strength}'`}:e.max!=null&&(!Number.isInteger(e.max)||e.max<1)?{error:"design: --max must be a positive integer"}:!e.useCase&&!e.resume?{error:"design: --use-case is required (or --resume <sid> \u2014 the session remembers its use-case)"}:{useCase:e.useCase,max:e.max,strength:e.strength,mode:e.mode,force:e.force,resume:e.resume,plan:e.plan,message:e.message,phase:e.phase,allowUnreviewed:e.allowUnreviewed,because:e.because,changeDelta:e.changeDelta,priorDesign:e.priorDesign}}async function B(e){let p=async(t,r)=>{if(e.mode!=="agent")return process.stderr.write(t+`
|
|
3
|
+
`),2;let{makeHeadlessIO:s,agentRefusal:d}=await import("./headless-io-66RG5NN5.js");return d(s("ndjson","design"),t,r)};if(e.mode!=null&&!["interactive","agent","ci","override"].includes(e.mode)){let{makeHeadlessIO:t,agentRefusal:r}=await import("./headless-io-66RG5NN5.js");return r(t("ndjson","design"),`design: --mode must be interactive | agent | ci | override, got '${e.mode}'`,"MODE_USAGE")}let T=H(e);if("error"in T)return p(T.error);let o=T;{let{validateResumeMessage:t}=await import("./headless-io-66RG5NN5.js"),r=t(o,"design");if(r)return p(r)}{let{gateStructuredFlags:t}=await import("./structured-answers-A43Q25CZ.js"),r=t(e,"design");if(r)return p(r,"STRUCTURED_FLAGS_USAGE")}if(!O(m(process.cwd())))return p("error: no context store here (run `kane-cli context ingest` + `kane-cli context extract` first)","NO_STORE");let y=!!o.resume;if(o.useCase&&o.resume&&!e.allowUnreviewed)try{let{peekSession:t}=await import("./sessions-GIEXOCE4.js"),r=t(m(process.cwd()),o.resume);y=!!(r&&r.use_case===o.useCase)}catch{y=!1}if(o.useCase&&!y&&!e.allowUnreviewed)try{let[{openGraph:t},{designEntryCheck:r}]=await Promise.all([import("./readmodel-XOYGGQ3S.js"),import("./trust-gate-EX7R2P4Y.js")]),s=r(t(m(process.cwd())),o.useCase);if(!s.ok&&(s.code==="UC_UNREVIEWED"||s.code==="UC_ARCHIVED"))if((o.mode??"interactive")==="interactive"&&process.stdin.isTTY&&process.stdout.isTTY){let{createInterface:l}=await import("readline/promises"),c=l({input:process.stdin,output:process.stderr}),f=(await c.question(`design: ${s.detail}
|
|
4
|
+
Design against it anyway? (y/N) `)).trim().toLowerCase();if(c.close(),f!=="y"&&f!=="yes")return process.stderr.write(`aborted \u2014 approve it first: ${s.reviewCmd}
|
|
5
|
+
`),2}else if(e.mode==="agent"){let{makeHeadlessIO:l}=await import("./headless-io-66RG5NN5.js"),c=l("ndjson","design");return c.event({type:"error",code:s.code,message:`design: ${s.detail}`,next:[s.reviewCmd]}),c.event({type:"done",status:"refused",exit_code:2,next:[s.reviewCmd,`kane-cli design tests --use-case ${o.useCase} --mode agent --allow-unreviewed`]}),2}else return process.stderr.write(`design: ${s.detail} (${s.reviewCmd})
|
|
6
|
+
`),2}catch(t){process.env.KANE_DEBUG&&process.stderr.write(`trust gate skipped: ${String(t)}
|
|
7
|
+
`)}let i=null,x=null;try{if(!o.mode&&!process.stdin.isTTY)return process.stderr.write(`design: no TTY \u2014 pass an explicit --mode agent|ci|override to run headless
|
|
8
|
+
`),2;let t=o.mode??"interactive";if(t==="interactive"){if(!process.stdin.isTTY||!process.stdout.isTTY)return process.stderr.write(`design: --mode interactive needs a TTY on stdin and stdout (use --mode agent|ci|override headless)
|
|
9
|
+
`),2;let{bindDesignInteractive:n}=await import("./interactive-bind-XSRD36MO.js");return await n(o)}let{resolveAgentAuthEnv:r}=await import("./spawner-GC5CFAJ7.js"),{runAgent:s}=await import("./bridge-JSKEO4N3.js"),{preflightTurn:d}=await import("./turn-preflight-JGYT7LXP.js"),{makeInterruptGuard:l}=await import("./interrupt-guard-UREUWNRL.js"),{baseUrlAdvisory:c}=await import("./turn-preflight-JGYT7LXP.js"),{makeHeadlessIO:f,resolveEncoding:D,guardedChannels:R}=await import("./headless-io-66RG5NN5.js"),{withStructuredNext:A,prepareStructuredResume:U}=await import("./structured-answers-A43Q25CZ.js");i=A(f(D(t),"design"));let{runWithChannel:$}=await import("./run-channel-RGH4WIQX.js"),w=i,I=D(t)==="ndjson"?n=>$({event:g=>w.event(g)},n):n=>n(),E=n=>{w.out(n),w.event({type:"note",text:n})},{telemetryBootstrap:N,telemetryEnvName:G}=await import("./bootstrap-NFYYRGGR.js"),u=N({verb:"design",mode:t,contextRoot:m(process.cwd()),env:G(),resumeSid:o.resume,write:!0,longSession:!0});x=n=>u.end(n);let a=U({opts:e,contextDir:m(process.cwd()),verb:"design"});if(a.kind==="refuse")return i.out(a.error),t==="agent"&&i.event({type:"error",message:a.error,code:a.code}),await u.end({exit_code:2}),t==="agent"?i.done(2,"refused"):2;let C;if(a.kind==="apply"){for(let n of a.notes)E(n);if(a.matchedQids.length>0){E(`applying ${a.matchedQids.length} structured answer(s) from --answer to the paused session's pending questions`);for(let n of a.matchedQids)i.event({type:"panel_resolved",id:n,by:"user",via:"flag"})}a.statement&&(C=[o.message,a.statement].filter(Boolean).join(`
|
|
10
|
+
|
|
11
|
+
`))}let b=c();b&&E(b);let v=l(s,n=>i.out(n)),k=R(i,()=>v.interrupted(),/^error: (design agent failed|the design agent ended)/);try{let n=t==="interactive"&&process.stdin.isTTY&&process.stdout.isTTY?async h=>{let{createInterface:Y}=await import("readline/promises"),S=Y({input:process.stdin,output:process.stdout});try{return/^y(es)?$/i.test((await S.question(`${h} [y/N] `)).trim())}finally{S.close()}}:void 0,g=await I(async()=>{let h={...await r(),...u.spawnEnv()};return _({...o,mode:t,...C!==void 0?{message:C}:{},...n?{confirmRetarget:n}:{}},{contextDir:m(process.cwd()),agent:v.agent,preflightTurn:()=>d(h),ask:async()=>[],out:k.out,emit:k.emit,progress:w.progress,isTTY:!1,auth:h,telemetry:u})});return v.interrupted()&&g!==3?(i.out("interrupted \u2014 no session saved"),await u.end({exit_code:130}),i.done(130)):(g===1&&i.out(u.supportFooter()),await u.end({exit_code:g}),i.done(g))}finally{v.dispose()}}catch(t){x&&await x({exit_code:1}).catch(()=>{});let r=t instanceof Error?t.message:String(t);i?.event({type:"error",message:`error: design failed: ${r}`});let s=i?d=>i.out(d):d=>process.stderr.write(d+`
|
|
12
|
+
`);return s(`error: design failed: ${r}`),(process.env.ASSURANCE_LOG_LEVEL??"").toLowerCase()==="debug"&&t instanceof Error&&t.stack&&s(t.stack),s('hint: the full trace is in the file named on the "trace:" line at the start of this run'),i?i.done(1):1}}export{B as designTestsCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b}from"./chunk-YTHQNN2L.js";import"./chunk-R5T4RLF5.js";import"./chunk-KBM3XHAM.js";import"./chunk-2YEHV2CX.js";import"./chunk-IDX3TOPY.js";import"./chunk-BKM2LWU2.js";import"./chunk-QIGPXYMF.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-ZUGCHQFC.js";import"./chunk-UR6MHSHU.js";export{b as telemetryBootstrap,a as telemetryEnvName};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a}from"./chunk-VLWMMOMF.js";import"./chunk-DBKNJRJG.js";import"./chunk-5FJJJNJK.js";import"./chunk-UD7KKHPW.js";import"./chunk-ZUGCHQFC.js";import"./chunk-UR6MHSHU.js";export{a as runAgent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as l}from"./chunk-RZ4F3BHX.js";import{c as i,g as c}from"./chunk-
|
|
2
|
+
import{a as l}from"./chunk-RZ4F3BHX.js";import{c as i,g as c}from"./chunk-ZUGCHQFC.js";import"./chunk-UR6MHSHU.js";import{readFileSync as u,writeFileSync as g,mkdirSync as d}from"fs";import{join as f}from"path";var h=f(i,"changelog-cache.json"),p=3600*1e3;function y(){try{let e=JSON.parse(u(h,"utf-8"));if(Date.now()-e.cachedAt<p)return e}catch{}return null}function m(e){try{d(i,{recursive:!0}),g(h,JSON.stringify({entries:e,cachedAt:Date.now()}))}catch{}}async function A(e){try{let t=y();if(t){let r=t.entries;return e?.all?r:r.slice(0,5)}let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),a=await l(`${c}?per_page=30`,{headers:{Accept:"application/vnd.github+json"},signal:n.signal});if(clearTimeout(o),!a.ok)return[];let s=(await a.json()).map(r=>({version:r.tag_name.replace(/^v/,""),date:r.published_at?r.published_at.slice(0,10):"",body:r.body??""}));return m(s),e?.all?s:s.slice(0,5)}catch{return[]}}function v(e){if(e.length===0)return"Could not fetch changelog. Visit https://github.com/LambdaTest/kane-cli/releases";let t=["kane-cli Changelog","\u2500".repeat(40),""];for(let n of e){if(t.push(`v${n.version} (${n.date})`),n.body){let o=n.body.split(`
|
|
3
3
|
`).filter(a=>a.trim());for(let a of o)t.push(` ${a}`)}t.push("")}return t.join(`
|
|
4
4
|
`)}export{A as fetchChangelog,v as formatChangelog};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as V,c as te}from"./chunk-JFAFKHDX.js";import{a as ne}from"./chunk-427OQS2N.js";import{a as k,b as ee}from"./chunk-6KPPGMO2.js";import{d as Z}from"./chunk-NVGBE2DR.js";import{A as X,f as Y,g as z,z as Q}from"./chunk-TH47OOBV.js";import"./chunk-VAYBKR76.js";import{a as j,b as F}from"./chunk-CUM23TLF.js";import{f as J,i as W}from"./chunk-DUAXZYAD.js";import"./chunk-DBIBROYW.js";import{e as L,f as A,g as P,h as x}from"./chunk-WXHQYYD5.js";import"./chunk-IAHKTEET.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";var de=new Set(["approve","edit","reject"]);function ye(m){let{contextDir:f,graph:s,ops:oe,by:l}=m,N=m.mintable??ne(),T=J(f);if(s.latestHash!==T)return{record:null,errors:[{code:"STALE_BASIS",detail:`graph opened at ${String(s.latestHash)} but chain head is ${String(T)} \u2014 re-open and retry`}]};let C=[],h=[],M=new Set;for(let e of oe){if(s.appliedEvents.has(e.eventId)||M.has(e.eventId)){C.push(e.eventId);continue}M.add(e.eventId),h.push(e)}if(h.length===0)return{record:null,errors:null,applied:[],skipped:C,minted:[],staleDelta:[]};let o=[],$=[],I=[],v=[],b=[],O=[],_=[...m.judgements??[]],D=[],q=new Map,B=new Set,G=[],E=new Set,se=new Set(N),H=new Set;for(let e of h){if(!de.has(e.kind))continue;let n=e.target,t=s.resolve(n)?.cid??n;H.has(t)&&o.push({code:"MULTIPLE_TERMINAL_OPS",detail:`${n} has more than one terminal op in this turn \u2014 normalize latest-wins first`}),H.add(t)}let S=(e,n,t)=>{let r=s.resolve(n);if(!r)return o.push({code:"UNKNOWN_NODE",detail:`${e}: ${n} names nothing in the graph`}),null;let p=s.tipOf(r.cid);return p!==t||s.superseded.has(t)?(o.push({code:"EXPECTED_CID_MOVED",detail:`${e}: ${n} moved or was archived since it was displayed`,data:{tip:p}}),null):t};for(let e of h)if(e.kind==="approve"){let n=S("approve",e.target,e.expectedCid);n&&v.push({id:n,kind:"review-item",resolution:"approved",edit:null,reason:null,by:l})}else if(e.kind==="reject"){let n=S("reject",e.target,e.expectedCid);if(!n)continue;if(v.push({id:n,kind:"review-item",resolution:"rejected",edit:null,reason:e.reason,by:l}),e.redirectTo!==void 0){let t=s.resolve(e.redirectTo);if(!t||t.superseded){o.push({code:"UNKNOWN_NODE",detail:`reject.redirectTo: ${e.redirectTo} is not a live node`});continue}b.push({kind:"node",old:n,new:t.cid,reason:e.reason,by:l})}}else if(e.kind==="edit"){let n=S("edit",e.target,e.expectedCid);if(!n)continue;let t=s.getNode(n);if(!t){o.push({code:"UNKNOWN_NODE",detail:`edit: ${e.target} node file unreadable`});continue}let r={...t.content};for(let[c,u]of Object.entries(e.edit))u!==void 0&&(r[c]=u);if(typeof r.title=="string"&&!r.title.trim()){o.push({code:"EMPTY_TITLE",detail:`edit: ${e.target} edited title is empty`});continue}let p=A(t.label,r);if(p.length>0){for(let c of p)o.push({code:c.code,detail:`edit ${e.target}: ${c.detail}`});continue}let d=j(t.label,r);if(d===n){v.push({id:n,kind:"review-item",resolution:"approved",edit:null,reason:null,by:l});continue}$.push({cid:d,label:t.label,content:r}),b.push({kind:"node",old:n,new:d,reason:e.reason??"edited in chat",by:l}),v.push({id:d,kind:"review-item",resolution:"edited",edit:{...e.edit},reason:null,by:l})}else if(e.kind==="enhance"){if(!S("enhance",e.target,e.expectedCid))continue;for(let t of e.edges){let r=s.nodeLabel.get(t.src)??"(unknown)",p=s.nodeLabel.get(t.dst)??"(unknown)";for(let i of x(t.type,r,p,t.props))o.push({code:i.code,detail:`enhance ${e.target}: ${i.detail}`});let d=F(t.type,t.src,t.dst,t.props);if(s.edgesFrom(t.src).some(i=>i.ecid===d)||I.some(i=>i.ecid===d))continue;let c=Y(s,t.type,t.src,t.dst,G);c&&o.push(c);let u=z(s,t.type,t.src,t.dst);u&&o.push(u);let a=P(t.type)?.cardinality;if(a==="one-live-per-src"||a==="one-live-per-src-and-dst"){let i=`${t.type}|${t.src}`;E.has(i)&&o.push({code:"CARDINALITY_VIOLATION",detail:`${t.type} from ${t.src}: two one-live edges in one turn`}),E.add(i)}if(a==="one-live-per-src-and-dst"){let i=`${t.type}|dst|${t.dst}`;E.has(i)&&o.push({code:"CARDINALITY_VIOLATION",detail:`${t.type} onto ${t.dst}: two one-live edges in one turn (strict 1:1)`}),E.add(i)}I.push({ecid:d,type:t.type,src:t.src,dst:t.dst,props:t.props}),G.push({src:t.src,dst:t.dst,type:t.type})}}else if(e.kind==="add"){if(!se.has(e.label)){o.push({code:"GATED_LABEL",detail:`add: ${e.label} is not mintable in v1 (gate: ${N.join("|")})`,data:{gate:[...N]}});continue}let n=s.heads.get(e.convSourceId),t=s.convChains.get(e.convSourceId);if(typeof n!="string"||!t){o.push({code:"CONV_SOURCE_MISSING",detail:`add: ${e.convSourceId} is not a live conversation source`});continue}let r=s.getNode(n)?.content?.blob,p=typeof r=="string"?Z(f,r)?.toString("utf8")??"":"",d=ee(p,e.cite.turn);if(d===null){o.push({code:"BAD_ANCHOR",detail:`add: ${k(e.cite.turn)} does not resolve in ${e.convSourceId}`});continue}if(!d.includes(e.cite.quote)){o.push({code:"QUOTE_MISMATCH",detail:`add: quote is not verbatim within ${k(e.cite.turn)}`});continue}let c={...e.content,derived:!0},u=A(e.label,c);if(u.length>0){for(let g of u)o.push({code:g.code,detail:`add: ${g.detail}`});continue}let a=j(e.label,c),i={source_id:e.convSourceId,source_cid:n,anchor:k(e.cite.turn),quote:e.cite.quote};for(let g of x(L.DERIVES,"source",e.label,i))o.push({code:g.code,detail:`add: ${g.detail}`});$.push({cid:a,label:e.label,content:c}),I.push({ecid:F("DERIVES",n,a,i),type:L.DERIVES,src:n,dst:a,props:i}),e.rationale&&_.push({about:a,rationale:e.rationale,by:l});let y=Q(e.label,g=>B.has(g),s.names.keys());y!==null&&(B.add(y),O.push({cid:a,slug:y,by:l})),D.push({cid:a,...y!==null?{slug:y}:{}}),q.set(e.eventId,a)}if(o.length)return{record:null,errors:o};let U=new Date().toISOString();for(let e of h){if(e.kind==="add"){let n=q.get(e.eventId);n&&V(f,{ts:U,command:"extract-chat",id:n,verdict:"add",polarity:"preference",tag:e.label,by:l,event_id:e.eventId,target:n});continue}for(let n of te(e,{ts:U,command:"extract-chat",by:l}))V(f,n)}let K=h.map(e=>e.eventId).sort(),ie=W(f,{ts:new Date().toISOString(),proposal_id:null,nodes:$,edges:I,review:v,supersessions:b,...O.length>0?{names:O}:{},..._.length>0?{judgements:_}:{},event_ids:K,...m.sid?{sid:m.sid}:{},source_head_moves:{}},{expectPrev:T}),R=X(f),w=new Set;for(let e of b)if(e.kind==="node"){w.add(e.old);for(let n of R.edgesInto(e.old))w.add(n.src)}for(let e of D)w.add(e.cid);let re=[...w].map(e=>({cid:e,state:R.stale(R.tipOf(e))})).filter(e=>e.state!=="fresh");return{record:ie.record,errors:null,applied:K,skipped:C,minted:D,staleDelta:re}}export{ye as commitChatTurn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c}from"./chunk-KCCSWEGA.js";import"./chunk-VGFTNLQQ.js";import"./chunk-L2TV4G56.js";import"./chunk-6KPPGMO2.js";import"./chunk-NVGBE2DR.js";import"./chunk-CUM23TLF.js";import"./chunk-DUAXZYAD.js";import"./chunk-DBIBROYW.js";import"./chunk-WXHQYYD5.js";import"./chunk-IAHKTEET.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{c as makeChatController,b as questionStub,a as recommendationPicks};
|