@testmuai/kane-cli 0.8.13 → 0.8.14
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-B6ZIO3JL.js → ChatSurface-AVL3TJA2.js} +3 -3
- package/dist/{ChromeProfilePicker-QSICCUMV.js → ChromeProfilePicker-WJZJOZ6Z.js} +1 -1
- package/dist/{CliFeedbackPrompt-LLLNSKW2.js → CliFeedbackPrompt-65BQF5G5.js} +1 -1
- package/dist/{CliUploadProgress-N5IY66T2.js → CliUploadProgress-HEBZYKGN.js} +1 -1
- package/dist/{ConfigView-UQIRPENS.js → ConfigView-JEVQ2SO4.js} +1 -1
- package/dist/EvidenceViewOffer-5MB4ZXKM.js +2 -0
- package/dist/FolderPicker-SYFXH6D5.js +2 -0
- package/dist/{InfoBox-ZGSLEOPE.js → InfoBox-KM5DLBCV.js} +1 -1
- package/dist/{LinksBox-JFT44YUK.js → LinksBox-FQA36GTV.js} +1 -1
- package/dist/{ProfilesView-WZSPK3HF.js → ProfilesView-76KGHTMK.js} +1 -1
- package/dist/{ProjectPicker-SBBGVF4L.js → ProjectPicker-65YOU46H.js} +1 -1
- package/dist/{SaveSessionPrompt-F3563T3C.js → SaveSessionPrompt-QD6BNTWO.js} +1 -1
- package/dist/ScrollbackTap-QHJOFYMC.js +2 -0
- package/dist/SingleShotApp-U54ETXS3.js +2 -0
- package/dist/{SummaryBox-6N6NESLI.js → SummaryBox-N2B6DUDD.js} +1 -1
- package/dist/TestMdRunView-WA4TC5PT.js +2 -0
- package/dist/{TestrunEvidenceTable-JLJBJ76Q.js → TestrunEvidenceTable-3WLQVTF4.js} +1 -1
- package/dist/{WhoamiView-PNVUCWLB.js → WhoamiView-T26HA4ZZ.js} +1 -1
- package/dist/agent-parse-XMWVKCRD.js +2 -0
- package/dist/{app-download-NNB52ZRJ.js → app-download-XKZWFMEK.js} +1 -1
- package/dist/attach-target-V6LECVES.js +2 -0
- package/dist/{auth-JIDDELKY.js → auth-PPJANIMZ.js} +1 -1
- package/dist/{binary-LXYAW7WQ.js → binary-DKWWODT2.js} +1 -1
- package/dist/bind-62AZYFAY.js +15 -0
- package/dist/{bootstrap-THOC3SS7.js → bootstrap-6IJNZIPT.js} +1 -1
- package/dist/bridge-X5DEJL6F.js +2 -0
- package/dist/{changelog-BSMZXLTG.js → changelog-UTGJ7FSP.js} +1 -1
- package/dist/chat-committer-HDE3TP5I.js +2 -0
- package/dist/chat-controller-3EPK7UZG.js +2 -0
- package/dist/chunk-22QIVSQR.js +29 -0
- package/dist/{chunk-FNIL4G3V.js → chunk-2BFXT7VQ.js} +3 -3
- package/dist/{chunk-3FXNQTCE.js → chunk-2RMHDOP4.js} +1 -1
- package/dist/{chunk-7GUFVQOQ.js → chunk-3BHRGHIZ.js} +1 -1
- package/dist/{chunk-EEFZXZTZ.js → chunk-3IXEARDX.js} +1 -1
- package/dist/chunk-3N6IAVD5.js +7 -0
- package/dist/{chunk-I75FRXKE.js → chunk-3SPOJWRA.js} +1 -1
- package/dist/chunk-3YX3RQXO.js +2 -0
- package/dist/chunk-42FHKRPA.js +4 -0
- package/dist/{chunk-VYMMGWVO.js → chunk-4BBDKWM3.js} +1 -1
- package/dist/{chunk-J2UN2AHO.js → chunk-4K5XTIJ6.js} +1 -1
- package/dist/chunk-52WM3XYO.js +4 -0
- package/dist/{chunk-WUV3FJ7C.js → chunk-53MPG2J3.js} +1 -1
- package/dist/{chunk-R7QAS6LZ.js → chunk-55YDTPB7.js} +1 -1
- package/dist/{chunk-IDX3TOPY.js → chunk-5LJRZI7S.js} +1 -1
- package/dist/chunk-66MOZKD2.js +2 -0
- package/dist/{chunk-2X3TANEV.js → chunk-6F6YI3ZG.js} +1 -1
- package/dist/chunk-6LGED4FC.js +35 -0
- package/dist/chunk-73ULUGBM.js +5 -0
- package/dist/{chunk-F5AI3UVS.js → chunk-75I46VTM.js} +2 -2
- package/dist/{chunk-SEKJZOKW.js → chunk-7L25ZNNP.js} +1 -1
- package/dist/chunk-7O54QURK.js +2 -0
- package/dist/{chunk-XAM5E27U.js → chunk-7RAI77XD.js} +1 -1
- package/dist/{chunk-PWRIG6UB.js → chunk-AC7BPO4X.js} +1 -1
- package/dist/chunk-AHXOKBVE.js +7 -0
- package/dist/{chunk-DNNZ353O.js → chunk-ALCE5RLK.js} +1 -1
- package/dist/{chunk-AQWTK6IN.js → chunk-ARG56PJG.js} +1 -1
- package/dist/{chunk-33GXXC2L.js → chunk-B2ZGG7WM.js} +1 -1
- package/dist/{chunk-LAQBCZ5A.js → chunk-BAKJPQGU.js} +1 -1
- package/dist/{chunk-DIM5X2FR.js → chunk-BJYGWXVP.js} +1 -1
- package/dist/chunk-C74ABM24.js +2 -0
- package/dist/chunk-CGT4NFQN.js +8 -0
- package/dist/{chunk-EV64VI66.js → chunk-CRZUBDJ3.js} +1 -1
- package/dist/{chunk-EXLXV5OU.js → chunk-DA57DXCF.js} +1 -1
- package/dist/{chunk-PUM5J56E.js → chunk-EMSLJTYN.js} +1 -1
- package/dist/{chunk-YEZYO5QH.js → chunk-FFFB5BXL.js} +1 -1
- package/dist/{chunk-WIAZN7G4.js → chunk-FFVNISYH.js} +1 -1
- package/dist/chunk-FQNQVC5O.js +5 -0
- package/dist/{chunk-UF4JZXEE.js → chunk-GESG672R.js} +1 -1
- package/dist/{chunk-XL6HDWM3.js → chunk-GKZ2KVE6.js} +1 -1
- package/dist/chunk-GP7WD4UY.js +4 -0
- package/dist/{chunk-PYQS5ST6.js → chunk-GPIXV7AV.js} +2 -2
- package/dist/chunk-H6TNBKGR.js +5 -0
- package/dist/chunk-HOA4VWSD.js +5 -0
- package/dist/chunk-IE3OO5GI.js +2 -0
- package/dist/chunk-IICQ5KRD.js +5 -0
- package/dist/{chunk-K4SULRBL.js → chunk-IQ7GPETF.js} +1 -1
- package/dist/{chunk-3M2D7UUI.js → chunk-IQ7NGOAT.js} +1 -1
- package/dist/{chunk-TMRLBSIA.js → chunk-J7NRD4Q7.js} +1 -1
- package/dist/{chunk-FE6XRABM.js → chunk-JH6E632O.js} +1 -1
- package/dist/{chunk-XH2KDLZO.js → chunk-JJJSDDQ2.js} +1 -1
- package/dist/{chunk-BTBUIL4Q.js → chunk-JKX57HA7.js} +1 -1
- package/dist/{chunk-VJ3ES3RR.js → chunk-K7K23DIQ.js} +1 -1
- package/dist/chunk-KN65CUNT.js +15 -0
- package/dist/{chunk-CAO3XRA2.js → chunk-KOL6ZWOQ.js} +1 -1
- package/dist/{chunk-MCKBJIBB.js → chunk-KOPP4CJW.js} +1 -1
- package/dist/chunk-KZG4E5RM.js +2 -0
- package/dist/{chunk-J3Q63NFG.js → chunk-L4M7753M.js} +1 -1
- package/dist/{chunk-BJAHVN2F.js → chunk-L6MOO4WT.js} +1 -1
- package/dist/chunk-LBNADEQN.js +8 -0
- package/dist/{chunk-Q4YAJJPP.js → chunk-LL5DQO6V.js} +1 -1
- package/dist/chunk-LNV7C2YO.js +6 -0
- package/dist/{chunk-JX2CAVX6.js → chunk-LR5DJ6EN.js} +1 -1
- package/dist/{chunk-IZU5ND2C.js → chunk-M7DN6FO3.js} +1 -1
- package/dist/chunk-MLRO7OH3.js +9 -0
- package/dist/{chunk-DMLYUTS4.js → chunk-MNE5VMHT.js} +1 -1
- package/dist/{chunk-TDNM22BQ.js → chunk-N7ZRF5K3.js} +1 -1
- package/dist/{chunk-TXZ66K4Q.js → chunk-NBMLBCJ3.js} +1 -1
- package/dist/{chunk-KSLJOUH4.js → chunk-NDCRJXYF.js} +1 -1
- package/dist/{chunk-XS3HIVNS.js → chunk-NOLYYHVG.js} +1 -1
- package/dist/{chunk-IWVA37B6.js → chunk-O25AL4B7.js} +1 -1
- package/dist/{chunk-AIVOYTYQ.js → chunk-O2APH6TZ.js} +1 -1
- package/dist/{chunk-KAZGHWGK.js → chunk-O3XBIURC.js} +1 -1
- package/dist/{chunk-ZOSY2PJM.js → chunk-O5AS2ZIX.js} +1 -1
- package/dist/{chunk-DXFMELKC.js → chunk-O6U2HU5M.js} +1 -1
- package/dist/{chunk-NUWOQS6L.js → chunk-OH2NSBO6.js} +1 -1
- package/dist/{chunk-ARU6KAGY.js → chunk-OO5GMBVI.js} +1 -1
- package/dist/chunk-OPL2MIQG.js +2 -0
- package/dist/chunk-P3JUE2RM.js +17 -0
- package/dist/{chunk-D4G3SEBU.js → chunk-PGU64EWQ.js} +1 -1
- package/dist/{chunk-GILD6RGH.js → chunk-Q7XBMBMR.js} +1 -1
- package/dist/{chunk-OHK6V7JX.js → chunk-QJ5O27SJ.js} +1 -1
- package/dist/{chunk-KXUTO5WC.js → chunk-QPUVOVD7.js} +1 -1
- package/dist/{chunk-NM76SG3S.js → chunk-RBHQXWR7.js} +1 -1
- package/dist/{chunk-LWQNRZH3.js → chunk-RH6KFHJB.js} +1 -1
- package/dist/{chunk-FUP4AP6J.js → chunk-RQLU4NDG.js} +1 -1
- package/dist/{chunk-MXDWS7S4.js → chunk-SFTFHFG3.js} +7 -7
- package/dist/{chunk-4PARDPK2.js → chunk-SGHP44WS.js} +1 -1
- package/dist/{chunk-6AZNGOLH.js → chunk-SQDQADWD.js} +1 -1
- package/dist/{chunk-N2I23ANS.js → chunk-SX56MVUO.js} +1 -1
- package/dist/{chunk-O5U6EAL3.js → chunk-TCAHDVII.js} +1 -1
- package/dist/chunk-TNBF5OMZ.js +2 -0
- package/dist/chunk-TU6IMGWO.js +2 -0
- package/dist/{chunk-5G22NOZK.js → chunk-UHT5SVP5.js} +1 -1
- package/dist/{chunk-UZCSVEWP.js → chunk-UXH3RMQ7.js} +1 -1
- package/dist/{chunk-K2UEVCIJ.js → chunk-VNFCX2SH.js} +1 -1
- package/dist/{chunk-NU45ROHH.js → chunk-WBHSPN55.js} +2 -2
- package/dist/chunk-WILT62DP.js +16 -0
- package/dist/{chunk-QD2BUO5M.js → chunk-WOA7VCGA.js} +1 -1
- package/dist/{chunk-RN5ERSV2.js → chunk-WR42Q3HU.js} +1 -1
- package/dist/chunk-X5276I5H.js +9 -0
- package/dist/{chunk-477DYMXZ.js → chunk-X74PP5NJ.js} +1 -1
- package/dist/{chunk-KV5BOFPK.js → chunk-XGHMZJGI.js} +2 -2
- package/dist/{chunk-XS2LZFCH.js → chunk-YCH7H7JX.js} +1 -1
- package/dist/{chunk-7KIIM6H7.js → chunk-YHR2YAN5.js} +1 -1
- package/dist/chunk-YHVG7V3E.js +21 -0
- package/dist/chunk-YLQHY4A7.js +2 -0
- package/dist/{chunk-KGKJU27A.js → chunk-YYYQ5MVD.js} +1 -1
- package/dist/{chunk-W2UYUV47.js → chunk-ZA4M4O7E.js} +2 -2
- package/dist/chunk-ZKEOPIQ3.js +9 -0
- package/dist/chunk-ZUZ6QJRA.js +23 -0
- package/dist/{chunk-3SP4JVDN.js → chunk-ZWHPIR2Z.js} +2 -2
- package/dist/chunk-ZZTZJPT2.js +88 -0
- package/dist/committer-IYQPXG6C.js +2 -0
- package/dist/{config-BCGD2FEX.js → config-3AKWRTFS.js} +1 -1
- package/dist/cover-cmd-ZLAWMEC2.js +3 -0
- package/dist/{credentials-YNH5BU2Z.js → credentials-Q4WH5CBN.js} +1 -1
- package/dist/{deps-bundle-LOFI4DAJ.js → deps-bundle-RVZK6LZJ.js} +1 -1
- package/dist/{deps-resolve-GA6IPHVZ.js → deps-resolve-6F2U4TJP.js} +1 -1
- package/dist/design-committer-J57IAAA5.js +2 -0
- package/dist/dispatch-46BETGXY.js +2 -0
- package/dist/{doctor-W5TQBYB5.js → doctor-WRPG56HH.js} +1 -1
- package/dist/docx-convert-WPZS6OIC.js +2 -0
- package/dist/{dossier-Y6TJWFZU.js → dossier-UGJMYYAB.js} +1 -1
- package/dist/evidence-XWR32HWP.js +2 -0
- package/dist/evolve-cmd-27ZQN6YB.js +2 -0
- package/dist/explain-H5HJEDEF.js +2 -0
- package/dist/explain-cmd-JCJTXVZY.js +9 -0
- package/dist/{explain-cmd-XCRO4AS6.js → explain-cmd-R45I5MT7.js} +1 -1
- package/dist/extract-bind-D5BYYGYA.js +14 -0
- package/dist/{extract-cmd-7FKQJNS7.js → extract-cmd-CCYW7FIY.js} +3 -3
- package/dist/feeder-RSHMGW6B.js +2 -0
- package/dist/gaps-cmd-3VJKQ25D.js +3 -0
- package/dist/{generate-headless-OBMB5CSB.js → generate-headless-2M6UT3IK.js} +2 -2
- package/dist/headless-io-3A3BZVQ5.js +2 -0
- package/dist/index.js +188 -205
- package/dist/ingest-QGLVY7ND.js +2 -0
- package/dist/ingest-cmd-HVTUK264.js +2 -0
- package/dist/install-5WJLE7XT.js +2 -0
- package/dist/interactive-bind-OJCYNQPI.js +26 -0
- package/dist/lifecycle-cmd-GWFGUGTC.js +2 -0
- package/dist/{list-cmd-V3HJ5K4O.js → list-cmd-AXDW64OY.js} +1 -1
- package/dist/{list-commands-SH4HPFI4.js → list-commands-YNZ6EFIF.js} +1 -1
- package/dist/{locks-cmd-CSVSWY2Y.js → locks-cmd-67OHQZNV.js} +1 -1
- package/dist/logical-ids-DN6IZSUM.js +2 -0
- package/dist/login-flow-PRXFPRYZ.js +2 -0
- package/dist/maintenance-cmd-QEMK6YNV.js +2 -0
- package/dist/{mobile-prompts-UZTRJ3L7.js → mobile-prompts-OXHA5GHJ.js} +1 -1
- package/dist/{objective-variable-gate-3VUXNDCZ.js → objective-variable-gate-76GYUHEP.js} +1 -1
- package/dist/open-provider-E5VUGFNE.js +2 -0
- package/dist/pdf-convert-5H4HQNN3.js +2 -0
- package/dist/{persist-recorded-session-QMRY4DOF.js → persist-recorded-session-KWPH37HI.js} +1 -1
- package/dist/phase-seed-HKJ2EF7R.js +2 -0
- package/dist/pipeline-A2OGF4XW.js +2 -0
- package/dist/prepare-target-P6BWJZBZ.js +2 -0
- package/dist/readmodel-IBFRM6EO.js +2 -0
- package/dist/reconcile-cmd-V7TDYETT.js +2 -0
- package/dist/reconcile-deps-X6IGH4CA.js +4 -0
- package/dist/reconcile-engine-OGXSIE7O.js +2 -0
- package/dist/{recording-banner-7E75ERQJ.js → recording-banner-IZWN2XFY.js} +1 -1
- package/dist/records-TJJJWBUD.js +2 -0
- package/dist/registry-GOLIFVK5.js +2 -0
- package/dist/{require-project-folder-LBUYWQOF.js → require-project-folder-PEEUITK6.js} +1 -1
- package/dist/{resolve-run-intent-GHISMXLZ.js → resolve-run-intent-JGXXE45Y.js} +1 -1
- package/dist/{resolver-7JC5VZ4S.js → resolver-TY7XLJBN.js} +1 -1
- package/dist/revert-6BBBK3I4.js +2 -0
- package/dist/review-cmd-74YTPT7E.js +5 -0
- package/dist/run-DN4XARP2.js +2 -0
- package/dist/run-GRYWYKIH.js +2 -0
- package/dist/{run-test-md-5LPCKCW7.js → run-test-md-DFCKCQ4T.js} +2 -2
- package/dist/sessions-NH7WQWMX.js +2 -0
- package/dist/{sessions-cmd-VDQGRBEM.js → sessions-cmd-DV442ZCY.js} +1 -1
- package/dist/{skill-installer-YQPZZB7I.js → skill-installer-GRU3HOYF.js} +1 -1
- package/dist/{spawner-X2FOOONV.js → spawner-LNMD4NJF.js} +1 -1
- package/dist/store-guard-Q4MYZQHF.js +2 -0
- package/dist/structured-answers-NADW6D44.js +5 -0
- package/dist/sync-cmd-H6Y5EB3L.js +2 -0
- package/dist/sync-setup-THGRBKTA.js +2 -0
- package/dist/sync-setup-ui-RC727VK6.js +3 -0
- package/dist/tcg-generate-SZZ7MJXY.js +2 -0
- package/dist/testmd-actions-MRIUOOXO.js +2 -0
- package/dist/testmd-sync-UYVJ47BN.js +2 -0
- package/dist/token-refresh-KN5JK2U4.js +2 -0
- package/dist/{validate-basic-GTSVZFQI.js → validate-basic-RCBEELSB.js} +1 -1
- package/dist/{variable-receipt-IHQAYWMZ.js → variable-receipt-JHRW73Z6.js} +1 -1
- package/dist/verdicts-XFXDRND4.js +2 -0
- package/dist/{version-check-IPEPJZDX.js → version-check-Z774UWW3.js} +1 -1
- package/dist/{view-cmd-SXXNDZIC.js → view-cmd-I4LQGJ2X.js} +1 -1
- package/dist/walk-session-FP52IGLB.js +2 -0
- package/dist/with-telemetry-P6RUPWBH.js +2 -0
- package/package.json +12 -11
- package/dist/EvidenceViewOffer-AZRAILJQ.js +0 -2
- package/dist/FolderPicker-OJFR7AKZ.js +0 -2
- package/dist/ScrollbackTap-Q3IOKNMS.js +0 -2
- package/dist/SingleShotApp-72D5VVLE.js +0 -2
- package/dist/TestMdRunView-4OA52DA2.js +0 -2
- package/dist/bind-F36JFHUK.js +0 -12
- package/dist/bridge-KMDML2NB.js +0 -2
- package/dist/chat-committer-RAOIL2T6.js +0 -2
- package/dist/chat-controller-YJCNU76T.js +0 -2
- package/dist/chunk-4WOVHRI2.js +0 -15
- package/dist/chunk-54JZ6VEW.js +0 -4
- package/dist/chunk-5DT7PIGB.js +0 -5
- package/dist/chunk-6FCPS2VT.js +0 -4
- package/dist/chunk-6IAA644J.js +0 -9
- package/dist/chunk-6J635CRI.js +0 -5
- package/dist/chunk-AGRUULPT.js +0 -4
- package/dist/chunk-BZTWTYQQ.js +0 -6
- package/dist/chunk-CUSTYILP.js +0 -2
- package/dist/chunk-DBIBROYW.js +0 -5
- package/dist/chunk-I27YRAGO.js +0 -7
- package/dist/chunk-IAHKTEET.js +0 -2
- package/dist/chunk-IVQX3AKL.js +0 -4
- package/dist/chunk-K6RAOZHP.js +0 -4
- package/dist/chunk-KO3FL2XW.js +0 -26
- package/dist/chunk-L32DKFRQ.js +0 -16
- package/dist/chunk-LPDBTGO5.js +0 -21
- package/dist/chunk-N7Z7BQYO.js +0 -3
- package/dist/chunk-NVGBE2DR.js +0 -2
- package/dist/chunk-OS4VSIHT.js +0 -4
- package/dist/chunk-OTMAFCZK.js +0 -8
- package/dist/chunk-P5MJMM3X.js +0 -85
- package/dist/chunk-QQ5MHSSY.js +0 -2
- package/dist/chunk-T7DGNWI2.js +0 -17
- package/dist/chunk-UH2ZTX4E.js +0 -2
- package/dist/chunk-W3Z7AZNT.js +0 -4
- package/dist/chunk-XMTSHHYQ.js +0 -4
- package/dist/committer-C6UCDYMC.js +0 -2
- package/dist/cover-cmd-5LPHIOSI.js +0 -3
- package/dist/design-committer-UPC6NZUF.js +0 -2
- package/dist/dispatch-FRCPK3AZ.js +0 -2
- package/dist/docx-convert-BIV5T7F5.js +0 -2
- package/dist/evidence-FHO36EEV.js +0 -2
- package/dist/evolve-cmd-6RXLKERE.js +0 -2
- package/dist/explain-3HAZY7Q6.js +0 -2
- package/dist/explain-cmd-RMJPXD4U.js +0 -9
- package/dist/extract-bind-BFJPRNPQ.js +0 -10
- package/dist/feeder-IOR3XRNF.js +0 -2
- package/dist/gaps-cmd-FDJ3PT4C.js +0 -3
- package/dist/headless-io-66RG5NN5.js +0 -2
- package/dist/ingest-TTUQ7UDK.js +0 -2
- package/dist/ingest-cmd-AV66Q5LC.js +0 -2
- package/dist/install-SFJ2FFQ6.js +0 -2
- package/dist/interactive-bind-N5AQB26T.js +0 -25
- package/dist/lifecycle-cmd-KSMETBPP.js +0 -2
- package/dist/logical-ids-MLXAH45L.js +0 -2
- package/dist/login-flow-ODVWEPRU.js +0 -2
- package/dist/maintenance-cmd-VFYGKY3X.js +0 -2
- package/dist/pdf-convert-OZIRUADA.js +0 -2
- package/dist/phase-seed-BMOSAA74.js +0 -2
- package/dist/pipeline-5FHWZAXK.js +0 -2
- package/dist/prepare-target-UJEY2FSR.js +0 -2
- package/dist/readmodel-TDRFVDVI.js +0 -2
- package/dist/reconcile-cmd-2QHZML2L.js +0 -2
- package/dist/reconcile-deps-ZBWUY3SM.js +0 -4
- package/dist/reconcile-engine-YC4RQYF2.js +0 -2
- package/dist/records-JLS63SDI.js +0 -2
- package/dist/registry-JJTRUPH7.js +0 -2
- package/dist/revert-PRR3D4XM.js +0 -2
- package/dist/review-cmd-SAGIKWEW.js +0 -4
- package/dist/run-43ACVPJK.js +0 -2
- package/dist/run-EOTOXNQO.js +0 -2
- package/dist/sessions-GIEXOCE4.js +0 -2
- package/dist/structured-answers-YAVW65G4.js +0 -5
- package/dist/tcg-generate-V4QRNEZV.js +0 -2
- package/dist/testmd-actions-2UMU3QMV.js +0 -2
- package/dist/testmd-sync-UBXDLWYD.js +0 -2
- package/dist/token-refresh-NL5AM446.js +0 -2
- package/dist/verdicts-QU6W3TUF.js +0 -2
- package/dist/walk-session-7JVB4Z5S.js +0 -2
- package/dist/with-telemetry-LRI7H6DH.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as le,b as Oe,c as vn}from"./chunk-6J5T5FEY.js";import{a as wn,b as me,c as It,d as $n,e as Dt,g as rt,h as it,i as Cn,j as Rn,l as Sn,m as Bt,n as In}from"./chunk-CUSTYILP.js";import{b as Rt}from"./chunk-UJZZDPDY.js";import{a as yn}from"./chunk-O5U6EAL3.js";import{a as tt}from"./chunk-IWVA37B6.js";import{a as xn,b as kn,c as bn}from"./chunk-AXTPNZPX.js";import"./chunk-L2TV4G56.js";import"./chunk-IVQX3AKL.js";import{a as nt,d as _e,e as Tn,f as St}from"./chunk-RKXHVP2Z.js";import{a as gn,b as hn,c as pn}from"./chunk-TXZ66K4Q.js";import"./chunk-NVGBE2DR.js";import{a as dn}from"./chunk-5Y2G4NC7.js";import"./chunk-W3Z7AZNT.js";import"./chunk-JQW2QFSX.js";import"./chunk-6FCPS2VT.js";import"./chunk-UH2ZTX4E.js";import"./chunk-XMTSHHYQ.js";import"./chunk-DBIBROYW.js";import"./chunk-AKX4VRRR.js";import"./chunk-IAHKTEET.js";import"./chunk-UD7KKHPW.js";import{a as et}from"./chunk-YCCUBQY4.js";import{a as mn}from"./chunk-AQWTK6IN.js";import{y as r}from"./chunk-33GXXC2L.js";import{b as fn}from"./chunk-DFS4RMVP.js";import{a as Q}from"./chunk-HCBYKLMW.js";import{a as k,b as n,k as Ze}from"./chunk-C44QQJR4.js";import{a as Mr}from"./chunk-6YGTRKDT.js";import{e as V}from"./chunk-UR6MHSHU.js";var m=V(Mr(),1);var a=V(Q(),1),Ar=60,Lr=100;function Et(t,o){let l=t.options.length,u=l,g=t.multi_select?u++:null,x=t.allow_free_text?u++:null,f=o?u++:null;return{optionCount:l,doneIdx:g,freeIdx:x,batchIdx:f,maxSel:u-1}}var Or="\xA0",_r={high:{text:`\u203C${Or}high`,color:r.red},med:{text:"med",color:"yellow"},low:{text:"low",color:r.dim}};function Pr(t){let o=(t.header??t.text.split(/\s+/).slice(0,3).join(" ")).trim();return o.length>16?`${o.slice(0,15)}\u2026`:o}function qr(t,o,l){let u=p=>t[p].length+6,g=u(o),x=o,f=o;for(;;){let p=f+1<t.length?u(f+1):1/0,C=x-1>=0?u(x-1):1/0;if(p===1/0&&C===1/0)break;if(p<=C){if(g+p>l)break;g+=p,f+=1}else{if(g+C>l)break;g+=C,x-=1}}return{lo:x,hi:f}}function Dn({batch:t,qView:o,sel:l=0,focused:u=!1,freeText:g=null,optionText:x=null,attach:f=null,multiSelFor:p,childPrefix:C}){let{stdout:M}=Ze(),v=M?.columns??80,T=v<Ar,W=Math.min(v-1,Lr),$=Math.max(0,Math.min(t.questions.length-1,o??(t.cursor<0?0:t.cursor))),I=t.questions[$],N=t.resolution[$],L=t.resolution.filter(D=>!D).length,B=t.questions.length-L,P=tt(t),O=Et(I,P!==""),H=p?p($):[],K=_r[I.risk],re=D=>u&&l===D?(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"}):" ",S=`? ${C??""}the agent needs ${L===1?"one answer":`${L} answers`}`,$e=t.questions.length>1?` \xB7 ${$+1} of ${t.questions.length} \xB7 ${B} answered`:"",z=(0,a.jsxs)(k,{flexDirection:"column",children:[(0,a.jsx)(k,{paddingLeft:2,children:(0,a.jsxs)(n,{bold:!0,children:[I.text,K?(0,a.jsx)(n,{color:K.color,bold:!1,children:` ${K.text}`}):null]})}),(0,a.jsx)(k,{paddingLeft:2,children:(0,a.jsx)(n,{color:r.dim,children:I.rationale})}),(0,a.jsx)(n,{children:" "}),I.options.map((D,w)=>{let X=u&&l===w;return x&&x.optionIndex===w?(0,a.jsx)(k,{flexDirection:"column",children:(0,a.jsxs)(k,{children:[(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,a.jsx)(n,{color:r.assuranceAccent,children:`${w+1}. ${D.label}`}),(0,a.jsx)(n,{color:r.dim,children:" \u270E "})]}),(0,a.jsx)(et,{value:x.value,onChange:x.onChange,onSubmit:x.onSubmit,onCancel:x.onCancel,placeholder:D.detail||"type your answer"})]})},`o-${w}`):(0,a.jsxs)(k,{flexDirection:"column",children:[(0,a.jsxs)(n,{children:[re(w)," ",I.multi_select?(0,a.jsx)(n,{color:H.includes(w)?r.green:r.dim,children:H.includes(w)?"[x] ":"[ ] "}):null,(0,a.jsx)(n,{color:X?r.assuranceAccent:void 0,children:`${w+1}. ${D.label}`}),w===I.recommended_index?(0,a.jsx)(n,{color:r.dim,children:" (recommended)"}):null,N?.selected_index===w?(0,a.jsx)(n,{color:r.dim,children:" (current)"}):null]}),D.detail?(0,a.jsx)(k,{paddingLeft:5,children:(0,a.jsx)(n,{color:r.dim,children:D.detail})}):null]},`o-${w}`)}),I.multi_select&&O.doneIdx!=null?(0,a.jsxs)(n,{children:[re(O.doneIdx)," ",(0,a.jsx)(n,{color:r.green,children:"\u2714"}),(0,a.jsx)(n,{color:u&&l===O.doneIdx?r.assuranceAccent:void 0,children:" done \u2014 confirm selection"})]}):null,I.allow_free_text?(0,a.jsx)(n,{children:" "}):null,I.allow_free_text?g?(0,a.jsxs)(k,{children:[(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,a.jsx)(n,{color:r.dim,children:"\u270E "})]}),(0,a.jsx)(et,{value:g.value,onChange:g.onChange,onSubmit:g.onSubmit,onCancel:g.onCancel,placeholder:"Tell me what to do"})]}):(0,a.jsxs)(n,{children:[O.freeIdx!=null?re(O.freeIdx):" "," ",(0,a.jsx)(n,{color:u&&O.freeIdx!=null&&l===O.freeIdx?r.assuranceAccent:r.dim,children:"\u270E Tell me what to do"})]}):null,f?(0,a.jsxs)(k,{flexDirection:"column",marginTop:1,children:[(0,a.jsxs)(k,{children:[(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,a.jsx)(n,{color:r.assuranceAccent,children:"@ attach a file or URL"}),(0,a.jsx)(n,{color:r.dim,children:" \u270E "})]}),(0,a.jsx)(et,{value:f.value,onChange:f.onChange,onSubmit:f.onSubmit,onCancel:f.onCancel,placeholder:"path or URL"})]}),(0,a.jsx)(k,{paddingLeft:2,children:(0,a.jsx)(n,{color:r.dim,children:"the questions are set aside \u2014 the agent reads the source and re-asks what's still open"})})]}):null]}),j=P!==""?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n,{children:" "}),(0,a.jsxs)(n,{children:[u&&O.batchIdx!=null&&l===O.batchIdx?(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"}):" "," ",(0,a.jsx)(n,{color:r.assuranceAccent,children:"\xBB"}),(0,a.jsx)(n,{bold:!0,color:u&&O.batchIdx!=null&&l===O.batchIdx?r.assuranceAccent:void 0,children:" Go with recommendations"}),L>=5?(0,a.jsx)(n,{color:r.dim,children:` \u2014 resolves all ${L} open`}):null,(0,a.jsx)(n,{color:r.dim,children:" (tab)"})]})]}):null;if(T)return(0,a.jsxs)(k,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,a.jsx)(n,{color:r.assuranceAccent,bold:!0,children:S}),t.questions.length>1?(0,a.jsx)(n,{color:r.dim,children:$e.replace(/^ · /,"")}):null,(0,a.jsx)(n,{children:" "}),z,j]});let h=t.questions.map(D=>Pr(D)),ce=t.questions.length>1?qr(h,$,W-8):null;return(0,a.jsxs)(k,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,a.jsxs)(n,{color:r.assuranceAccent,children:[(0,a.jsx)(n,{bold:!0,children:S}),$e?(0,a.jsx)(n,{color:r.dim,children:$e}):null]}),ce?(0,a.jsx)(k,{marginTop:1,children:(0,a.jsxs)(n,{children:[ce.lo>0?(0,a.jsx)(n,{color:r.dim,children:"\u25C0 "}):" ",t.questions.slice(ce.lo,ce.hi+1).map((D,w)=>{let X=ce.lo+w,Pe=w>0?" ":"";return X===$?(0,a.jsxs)(n,{children:[Pe,(0,a.jsx)(n,{backgroundColor:r.assuranceAccent,color:"#0d1117",bold:!0,children:` ${h[X]} `})]},D.id):(0,a.jsxs)(n,{children:[Pe,t.resolution[X]?(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.green,children:"\u2713 "}),(0,a.jsx)(n,{color:r.dim,children:h[X]})]}):(0,a.jsx)(n,{color:r.dim,children:`\u25CB ${h[X]}`})]},D.id)}),ce.hi<t.questions.length-1?(0,a.jsx)(n,{color:r.dim,children:" \u25B6"}):null]})}):null,(0,a.jsx)(n,{children:" "}),z,j]})}var A=V(Q(),1),Bn={high:0,med:1,low:2},jr={high:r.red,med:"yellow",low:r.dim};function Fr(t){return t.map((o,l)=>({r:o,i:l})).sort((o,l)=>(Bn[o.r.risk??"zz"]??3)-(Bn[l.r.risk??"zz"]??3)||o.i-l.i).map(({r:o})=>o)}function En({rows:t,width:o=120,badgeHeader:l="risk"}){if(t.length===0)return null;let u=Fr(t),g=B=>B.staged||!B.id?"(staged)":yn(B.id),x=Math.max(2,...u.map(B=>g(B).length)),f=Math.max(l.length,...u.map(B=>(B.badge??"").length)),p=o>=84&&u.some(B=>B.summary),M=o-(p?13:10)-x-f,v=Math.max(...u.map(B=>Math.max(B.title.length,(B.marker??"").length)),5),T=Math.max(5,p?Math.min(v,Math.max(16,Math.floor(M*.5))):Math.min(v,M)),W=p?Math.max(7,M-T):0,$=(B,P,O,H)=>vn(B,P,O,H.map(K=>K.length)),I=(B,P,O,H)=>[Oe(le(B,x),x),Oe(le(P,T),T),Oe(le(O,f),f),...p?[Oe(le(H,W),W)]:[]],N=I("id","title",l,"summary"),L=[];L.push((0,A.jsx)(n,{color:r.dim,children:$("\u250C","\u252C","\u2510",N)},"t")),L.push((0,A.jsxs)(n,{children:[N.map((B,P)=>(0,A.jsxs)(n,{children:[(0,A.jsx)(n,{color:r.dim,children:P===0?"\u2502 ":" \u2502 "}),(0,A.jsx)(n,{bold:!0,children:B})]},P)),(0,A.jsx)(n,{color:r.dim,children:" \u2502"})]},"h")),L.push((0,A.jsx)(n,{color:r.dim,children:$("\u251C","\u253C","\u2524",N)},"m"));for(let[B,P]of u.entries()){let O=I(g(P),le(P.title,T),le(P.badge??"",f),le(P.summary??"",W)),H=P.badgeColor??jr[P.badge??""]??r.dim;if(L.push((0,A.jsxs)(n,{children:[(0,A.jsx)(n,{color:r.dim,children:"\u2502 "}),(0,A.jsx)(n,{color:r.assuranceAccent,children:O[0]}),(0,A.jsx)(n,{color:r.dim,children:" \u2502 "}),O[1],(0,A.jsx)(n,{color:r.dim,children:" \u2502 "}),(0,A.jsx)(n,{color:H,children:O[2]}),p?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(n,{color:r.dim,children:" \u2502 "}),O[3]]}):null,(0,A.jsx)(n,{color:r.dim,children:" \u2502"})]},`r-${B}`)),P.marker){let K=I("",le(P.marker,T),"","");L.push((0,A.jsx)(n,{color:r.dim,children:`\u2502 ${K.join(" \u2502 ")} \u2502`},`mk-${B}`))}}return L.push((0,A.jsx)(n,{color:r.dim,children:$("\u2514","\u2534","\u2518",N)},"b")),(0,A.jsx)(A.Fragment,{children:L})}var y=V(Q(),1);function Wr(t){let o=t.form==="assumed"?" (assumed)":t.form==="deferred"?"":" (you)",l=t.note?` \u2014 ${t.note}`:"";return t.form==="deferred"?`\u21B3 deferred q${t.qNum} ${t.stub}${l}`:t.form==="changed"?`\u21B3 changed q${t.qNum} ${t.stub}: ${t.prev??"?"} \u2192 ${t.choice??"?"}${o}${l}`:`\u21B3 ${t.form} q${t.qNum} ${t.stub}: ${t.choice??"?"}${o}${l}`}var Vr=()=>(process.stdout?.columns??100)-12;function Mn({block:t,annotations:o}){let l=t.era??0,u=Nr(t,o??null);return l>0?(0,y.jsx)(k,{marginLeft:l*2,children:u}):u}function Nr(t,o){switch(t.kind){case"banner":return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsx)(n,{bold:!0,color:r.assuranceAccent,children:` ${t.text}`})});case"user":return(0,y.jsxs)(k,{marginTop:1,children:[(0,y.jsx)(n,{color:r.orange,children:"\u276F "}),(0,y.jsx)(n,{children:t.text})]});case"note":return(0,y.jsx)(n,{color:r.dim,children:` ${t.text}`});case"agent":return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsx)(hn,{text:t.text,accent:r.assuranceAccent})});case"worked":return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsx)(n,{color:r.dim,children:` \u2699 ${bn(t.durS,t.toolCalls,t.tools)}`})});case"usage":return(0,y.jsx)(n,{color:r.dim,children:` \xB7 ${t.credits.toFixed(1)} credits \u2014 total ${t.total.toFixed(1)}`});case"turn":{let l=o,u=l?l.fresh:t.items.map((v,T)=>({item:v,num:T+1,updated:!1})),g={usecase:"risk","use-case":"risk",ac:"check",scenario:"kind",test:"check",gap:"severity",stylenote:"kind"},x=v=>v.kind??"use-case",f=new Map;for(let v of u){let T=v.item,W=x(v.item),$=T.risk==="high"||T.risk==="med"||T.risk==="low"?T.risk:void 0,I={id:T.logical_id??"",staged:!T.logical_id,title:T.title,badge:T.badge??T.risk??"",summary:T.why??T.summary??T.description??"",...$?{risk:$}:{},...v.updated?{marker:"\u21B3 changed"}:{}},N=f.get(W)??[];N.push(I),f.set(W,N)}let p=u.some(v=>!!v.item.kind),C=(l?.unchanged??[]).reduce((v,T)=>v+T.count,0),M=l?.headerStats?` \u2014 ${l.headerStats}${C>0?` (${C} unchanged)`:""}`:"";return(0,y.jsxs)(k,{flexDirection:"column",marginLeft:2,children:[(0,y.jsxs)(n,{bold:!0,children:[p?"design":t.heading,M?(0,y.jsx)(n,{bold:!1,color:r.dim,children:M}):null]}),[...f.entries()].map(([v,T])=>(0,y.jsxs)(k,{flexDirection:"column",children:[f.size>1?(0,y.jsx)(n,{color:r.dim,children:`${nt(v)} \xB7 ${T.length}`}):null,(0,y.jsx)(En,{rows:T,width:Vr(),badgeHeader:g[v]??"info"})]},v)),l&&l.unchanged.length>0&&(0,y.jsx)(n,{color:r.dim,children:` \u22EE unchanged: ${l.unchanged.map(v=>`${v.count} ${v.label}`).join(" \xB7 ")}`})]})}case"answer":return(0,y.jsx)(n,{color:r.dim,children:Wr(t.receipt)});case"continued":return(0,y.jsx)(n,{color:r.dim,children:"\u21B3 continued"});case"childOpen":{let{ing:l}=Rt(t.verb);return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsxs)(n,{color:r.assuranceAccent,children:[`\u25CF ${l} ${t.subject}`,t.sid?(0,y.jsx)(n,{color:r.dim,children:` \u2014 ${t.sid}`}):null,t.note?(0,y.jsx)(n,{color:r.dim,children:` ${t.note}`}):null]})})}case"childClose":{let{ed:l}=Rt(t.verb);if(!t.ok)return(0,y.jsxs)(n,{color:r.red,children:[`\u25CF ${t.verb} failed \u2014 ${t.exitCode!=null?`exited ${t.exitCode}`:"error"}`,t.fixCmd?(0,y.jsx)(n,{color:r.dim,children:` \xB7 ${t.fixCmd}`}):null]});let u=[kn(t.durS),...t.results?[t.results]:[],...t.credits!==void 0?[`${t.credits.toFixed(1)} credits`]:[]].join(" \xB7 ");return(0,y.jsx)(n,{color:r.green,children:`\u25CF ${l} ${t.subject} \u2014 ${u}`})}case"childBack":return(0,y.jsx)(n,{color:r.dim,children:`back with ${t.parentVerb} \u2014 ${t.context}`});case"commit":return(0,y.jsxs)(k,{flexDirection:"column",children:[(0,y.jsx)(n,{color:t.ok?r.green:r.red,children:` ${t.ok?"\u2714":"\u2717"} ${t.line}`}),(t.warnings??[]).map((l,u)=>(0,y.jsx)(n,{color:r.dim,children:` \u26A0 ${l}`},`w-${u}`))]});case"error":return(0,y.jsxs)(mn,{variant:"error",paddingX:1,children:[(0,y.jsx)(n,{color:r.red,children:t.title}),t.detail.map((l,u)=>(0,y.jsx)(n,{color:r.dim,children:l},`d-${u}`))]})}}var Te=V(Q(),1);function An({item:t}){return(0,Te.jsxs)(k,{flexDirection:"column",marginLeft:2,children:[(t.cite??[]).map((o,l)=>(0,Te.jsx)(n,{dimColor:!0,children:`cite ${o.anchor??"conv"} \u2014 "${o.quote??""}"`},`cite-${l}`)),(t.depends_on_hint??[]).length>0&&(0,Te.jsx)(n,{dimColor:!0,children:`depends on: ${(t.depends_on_hint??[]).join(", ")}`}),Object.entries(t.extra??{}).map(([o,l])=>(0,Te.jsx)(n,{dimColor:!0,children:`${o}: ${l}`},`extra-${o}`))]})}var R=V(Q(),1),Mt=(t,o)=>Math.max(0,Math.min(o,t));function ot(t,o,l){switch(o.type){case"move":return t.level==="detail"?{...t,scroll:Math.max(0,(t.scroll??0)+o.delta)}:{...t,cursor:Mt(t.cursor+o.delta,Math.max(0,l-1))};case"enter":return t.level==="list"?{...t,level:"detail",scroll:0}:t;case"back":return t.level==="detail"?{...t,level:"list",scroll:0}:null}}var On={"use-case":"use-cases",ac:"acs",scenario:"scenarios",test:"tests",gap:"gaps"};function _n(t,o){if(t.level==="detail")return{level:"detail",cursor:Mt(t.num-1,Math.max(0,o.entries.length-1))};if(t.section){let l=o.entries.findIndex(u=>On[u.kind]===t.section);if(l>=0)return{level:"list",cursor:l}}return{level:"list",cursor:0}}function Kr(t){let o=[];for(let l of t.entries){let u=o.find(g=>g.kind===l.kind);u?u.entries.push(l):o.push({kind:l.kind,entries:[l]})}return o}var Ln=3;function Ur({items:t,cursor:o,verb:l,more:u}){let g=`view \xB7 ${l} so far \xB7 ${t.counts.map(f=>`${f.count} ${f.count===1?f.label.replace(/s$/,""):f.label}`).join(" \xB7 ")}`,x=t.entries[o];return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsx)(n,{bold:!0,color:r.assuranceAccent,children:g}),Kr(t).map(({kind:f,entries:p})=>{let C=x?.kind===f,M=C?p.findIndex($=>$.ref===x.ref):-1,v=C?Mt(M-1,Math.max(0,p.length-Ln)):0,T=p.slice(v,v+(C?Ln:1)),W=p.length-T.length;return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsx)(n,{color:r.dim,children:`${On[f]??nt(f)} \xB7 ${p.length}`}),T.map($=>{let I=C&&$.ref===x.ref,N=$.item.badge;return(0,R.jsxs)(n,{children:[(0,R.jsx)(n,{color:r.assuranceAccent,children:I?"\u203A ":" "}),(0,R.jsx)(n,{children:`${$.num} \xB7 ${$.item.title}`}),N?(0,R.jsx)(n,{color:r.dim,children:` \xB7 ${N}`}):null]},`${$.kind}:${$.ref}`)}),W>0&&(0,R.jsx)(n,{color:r.dim,children:` \u22EE ${W} more`})]},f)}),u?(0,R.jsxs)(n,{children:[(0,R.jsx)(n,{color:r.assuranceAccent,children:o===t.entries.length?"\u203A ":" "}),(0,R.jsx)(n,{color:r.dim,children:`\u22EF show all \u2014 ${u.hidden} more from earlier turns`})]}):null]})}var st=14;function Qr({items:t,cursor:o,explain:l,grandTotal:u,dossier:g,scroll:x=0}){let f=t.entries[o];if(!f)return(0,R.jsx)(n,{color:r.dim,children:"nothing to show"});if(g){let C=Math.max(0,Math.min(x,Math.max(0,g.lines.length-st))),M=g.lines.slice(C,C+st);return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsxs)(n,{bold:!0,children:[`view \xB7 ${g.id}`,g.id.toLowerCase()!==g.rawId?(0,R.jsx)(n,{bold:!1,color:r.dim,children:` \xB7 ${g.rawId}`}):null]}),(0,R.jsx)(n,{bold:!0,children:g.title}),C>0?(0,R.jsx)(n,{color:r.muted,children:`\u22EE ${C} above`}):null,M.map((v,T)=>(0,R.jsx)(n,{color:v.dim?r.dim:void 0,children:v.text},`dl-${T}`)),g.lines.length>C+st?(0,R.jsx)(n,{color:r.muted,children:`\u22EE ${g.lines.length-C-st} more`}):null]})}let p=f.item;return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsx)(n,{bold:!0,children:`view \xB7 ${f.kind} ${f.num} of ${u??t.entries.length}`}),(0,R.jsx)(n,{children:f.item.title}),p.badge?(0,R.jsx)(n,{color:r.dim,children:`kind: ${p.badge}`}):null,p.why?(0,R.jsx)(n,{color:r.dim,children:p.why}):null,(0,R.jsx)(An,{item:f.item}),l?.map((C,M)=>(0,R.jsx)(n,{color:r.dim,children:C},`ex-${M}`)),(0,R.jsx)(n,{color:r.dim,children:"view-only \u2014 approvals happen in chat"})]})}function Pn({items:t,state:o,verb:l,more:u,explain:g,grandTotal:x,dossier:f=null}){return o.level==="list"?(0,R.jsx)(Ur,{items:t,cursor:o.cursor,verb:l,more:u}):(0,R.jsx)(Qr,{items:t,cursor:o.cursor,explain:g,grandTotal:x,dossier:f,scroll:o.scroll??0})}var J=V(Q(),1),At=14;function Hr(t){let o=[],l=null;for(let u of t)u.field!==l&&(l=u.field,o.push({kind:"field",field:l})),o.push({kind:"line",field:l,line:u});return o}function qn({title:t,lines:o,offset:l=0}){let u=Hr(o),g=Math.max(0,Math.min(l,Math.max(0,u.length-At))),x=u.slice(g,g+At),f=g,p=Math.max(0,u.length-g-At),C=`view \xB7 diff \xB7 ${t} \xB7 current \u2192 proposed`;return(0,J.jsxs)(k,{flexDirection:"column",children:[(0,J.jsx)(n,{bold:!0,color:r.assuranceAccent,children:C}),f>0?(0,J.jsx)(k,{paddingLeft:2,children:(0,J.jsx)(n,{color:r.dim,children:`\u22EE ${f} above`})}):null,x.map((M,v)=>M.kind==="field"?(0,J.jsx)(k,{paddingLeft:2,children:(0,J.jsx)(n,{color:r.dim,children:M.field==="criteria"?"criteria":M.field})},`r-${g+v}`):(0,J.jsx)(k,{paddingLeft:4,children:(0,J.jsx)(n,{color:M.line.op==="-"?"red":"green",children:`${M.line.op==="-"?"\u2212":"+"} ${M.line.text}`})},`r-${g+v}`)),p>0?(0,J.jsx)(k,{paddingLeft:2,children:(0,J.jsx)(n,{color:r.dim,children:`\u22EE ${p} more`})}):null]})}var zr={"use-cases":"use-cases",usecases:"use-cases","use-case":"use-cases",acs:"acs",ac:"acs",scenarios:"scenarios",scenario:"scenarios",tests:"tests",test:"tests",gaps:"gaps",gap:"gaps"};function jn(t){let o=(t??"").trim().toLowerCase();if(!o)return{level:"list"};if(/^\d+$/.test(o)){let u=parseInt(o,10);return u>=1?{level:"detail",num:u}:{error:"items are numbered from 1 \u2014 /view 1"}}let l=zr[o];return l?{level:"list",section:l}:{error:"try /view, /view <number>, or /view acs|scenarios|tests"}}var E=V(Q(),1),Xr=6,Fn=12;function Gr(t,o,l){let u=Math.max(20,o),g=[];for(let f of t.split(`
|
|
2
|
+
import{a as It,b as $n,c as Dt,e as rt,f as it,g as Cn,h as Rn,j as Sn,k as Bt,l as In}from"./chunk-3YX3RQXO.js";import{a as le,b as Oe,c as vn}from"./chunk-6J5T5FEY.js";import{b as Rt}from"./chunk-UJZZDPDY.js";import{a as tt}from"./chunk-O25AL4B7.js";import{a as nt,d as _e,e as Tn,f as St}from"./chunk-RKXHVP2Z.js";import{a as yn}from"./chunk-TCAHDVII.js";import{a as kn,b as bn,c as wn}from"./chunk-AXTPNZPX.js";import"./chunk-L2TV4G56.js";import"./chunk-52WM3XYO.js";import{a as hn,b as pn,c as xn}from"./chunk-NBMLBCJ3.js";import{a as gn,b as me}from"./chunk-C74ABM24.js";import"./chunk-IE3OO5GI.js";import{a as dn}from"./chunk-5Y2G4NC7.js";import"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import{a as et}from"./chunk-YCCUBQY4.js";import{a as mn}from"./chunk-ARG56PJG.js";import{y as r}from"./chunk-B2ZGG7WM.js";import{b as fn}from"./chunk-DFS4RMVP.js";import{a as Q}from"./chunk-HCBYKLMW.js";import{a as k,b as n,k as Ze}from"./chunk-C44QQJR4.js";import{a as Mr}from"./chunk-6YGTRKDT.js";import{e as V}from"./chunk-UR6MHSHU.js";var m=V(Mr(),1);var a=V(Q(),1),Ar=60,Lr=100;function Et(t,o){let l=t.options.length,u=l,g=t.multi_select?u++:null,x=t.allow_free_text?u++:null,f=o?u++:null;return{optionCount:l,doneIdx:g,freeIdx:x,batchIdx:f,maxSel:u-1}}var Or="\xA0",_r={high:{text:`\u203C${Or}high`,color:r.red},med:{text:"med",color:"yellow"},low:{text:"low",color:r.dim}};function Pr(t){let o=(t.header??t.text.split(/\s+/).slice(0,3).join(" ")).trim();return o.length>16?`${o.slice(0,15)}\u2026`:o}function qr(t,o,l){let u=p=>t[p].length+6,g=u(o),x=o,f=o;for(;;){let p=f+1<t.length?u(f+1):1/0,C=x-1>=0?u(x-1):1/0;if(p===1/0&&C===1/0)break;if(p<=C){if(g+p>l)break;g+=p,f+=1}else{if(g+C>l)break;g+=C,x-=1}}return{lo:x,hi:f}}function Dn({batch:t,qView:o,sel:l=0,focused:u=!1,freeText:g=null,optionText:x=null,attach:f=null,multiSelFor:p,childPrefix:C}){let{stdout:M}=Ze(),v=M?.columns??80,T=v<Ar,W=Math.min(v-1,Lr),$=Math.max(0,Math.min(t.questions.length-1,o??(t.cursor<0?0:t.cursor))),I=t.questions[$],N=t.resolution[$],L=t.resolution.filter(D=>!D).length,B=t.questions.length-L,P=tt(t),O=Et(I,P!==""),H=p?p($):[],K=_r[I.risk],re=D=>u&&l===D?(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"}):" ",S=`? ${C??""}the agent needs ${L===1?"one answer":`${L} answers`}`,$e=t.questions.length>1?` \xB7 ${$+1} of ${t.questions.length} \xB7 ${B} answered`:"",z=(0,a.jsxs)(k,{flexDirection:"column",children:[(0,a.jsx)(k,{paddingLeft:2,children:(0,a.jsxs)(n,{bold:!0,children:[I.text,K?(0,a.jsx)(n,{color:K.color,bold:!1,children:` ${K.text}`}):null]})}),(0,a.jsx)(k,{paddingLeft:2,children:(0,a.jsx)(n,{color:r.dim,children:I.rationale})}),(0,a.jsx)(n,{children:" "}),I.options.map((D,w)=>{let X=u&&l===w;return x&&x.optionIndex===w?(0,a.jsx)(k,{flexDirection:"column",children:(0,a.jsxs)(k,{children:[(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,a.jsx)(n,{color:r.assuranceAccent,children:`${w+1}. ${D.label}`}),(0,a.jsx)(n,{color:r.dim,children:" \u270E "})]}),(0,a.jsx)(et,{value:x.value,onChange:x.onChange,onSubmit:x.onSubmit,onCancel:x.onCancel,placeholder:D.detail||"type your answer"})]})},`o-${w}`):(0,a.jsxs)(k,{flexDirection:"column",children:[(0,a.jsxs)(n,{children:[re(w)," ",I.multi_select?(0,a.jsx)(n,{color:H.includes(w)?r.green:r.dim,children:H.includes(w)?"[x] ":"[ ] "}):null,(0,a.jsx)(n,{color:X?r.assuranceAccent:void 0,children:`${w+1}. ${D.label}`}),w===I.recommended_index?(0,a.jsx)(n,{color:r.dim,children:" (recommended)"}):null,N?.selected_index===w?(0,a.jsx)(n,{color:r.dim,children:" (current)"}):null]}),D.detail?(0,a.jsx)(k,{paddingLeft:5,children:(0,a.jsx)(n,{color:r.dim,children:D.detail})}):null]},`o-${w}`)}),I.multi_select&&O.doneIdx!=null?(0,a.jsxs)(n,{children:[re(O.doneIdx)," ",(0,a.jsx)(n,{color:r.green,children:"\u2714"}),(0,a.jsx)(n,{color:u&&l===O.doneIdx?r.assuranceAccent:void 0,children:" done \u2014 confirm selection"})]}):null,I.allow_free_text?(0,a.jsx)(n,{children:" "}):null,I.allow_free_text?g?(0,a.jsxs)(k,{children:[(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,a.jsx)(n,{color:r.dim,children:"\u270E "})]}),(0,a.jsx)(et,{value:g.value,onChange:g.onChange,onSubmit:g.onSubmit,onCancel:g.onCancel,placeholder:"Tell me what to do"})]}):(0,a.jsxs)(n,{children:[O.freeIdx!=null?re(O.freeIdx):" "," ",(0,a.jsx)(n,{color:u&&O.freeIdx!=null&&l===O.freeIdx?r.assuranceAccent:r.dim,children:"\u270E Tell me what to do"})]}):null,f?(0,a.jsxs)(k,{flexDirection:"column",marginTop:1,children:[(0,a.jsxs)(k,{children:[(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"})," ",(0,a.jsx)(n,{color:r.assuranceAccent,children:"@ attach a file or URL"}),(0,a.jsx)(n,{color:r.dim,children:" \u270E "})]}),(0,a.jsx)(et,{value:f.value,onChange:f.onChange,onSubmit:f.onSubmit,onCancel:f.onCancel,placeholder:"path or URL"})]}),(0,a.jsx)(k,{paddingLeft:2,children:(0,a.jsx)(n,{color:r.dim,children:"the questions are set aside \u2014 the agent reads the source and re-asks what's still open"})})]}):null]}),j=P!==""?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n,{children:" "}),(0,a.jsxs)(n,{children:[u&&O.batchIdx!=null&&l===O.batchIdx?(0,a.jsx)(n,{color:r.assuranceAccent,children:"\u276F"}):" "," ",(0,a.jsx)(n,{color:r.assuranceAccent,children:"\xBB"}),(0,a.jsx)(n,{bold:!0,color:u&&O.batchIdx!=null&&l===O.batchIdx?r.assuranceAccent:void 0,children:" Go with recommendations"}),L>=5?(0,a.jsx)(n,{color:r.dim,children:` \u2014 resolves all ${L} open`}):null,(0,a.jsx)(n,{color:r.dim,children:" (tab)"})]})]}):null;if(T)return(0,a.jsxs)(k,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,a.jsx)(n,{color:r.assuranceAccent,bold:!0,children:S}),t.questions.length>1?(0,a.jsx)(n,{color:r.dim,children:$e.replace(/^ · /,"")}):null,(0,a.jsx)(n,{children:" "}),z,j]});let h=t.questions.map(D=>Pr(D)),ce=t.questions.length>1?qr(h,$,W-8):null;return(0,a.jsxs)(k,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,a.jsxs)(n,{color:r.assuranceAccent,children:[(0,a.jsx)(n,{bold:!0,children:S}),$e?(0,a.jsx)(n,{color:r.dim,children:$e}):null]}),ce?(0,a.jsx)(k,{marginTop:1,children:(0,a.jsxs)(n,{children:[ce.lo>0?(0,a.jsx)(n,{color:r.dim,children:"\u25C0 "}):" ",t.questions.slice(ce.lo,ce.hi+1).map((D,w)=>{let X=ce.lo+w,Pe=w>0?" ":"";return X===$?(0,a.jsxs)(n,{children:[Pe,(0,a.jsx)(n,{backgroundColor:r.assuranceAccent,color:"#0d1117",bold:!0,children:` ${h[X]} `})]},D.id):(0,a.jsxs)(n,{children:[Pe,t.resolution[X]?(0,a.jsxs)(n,{children:[(0,a.jsx)(n,{color:r.green,children:"\u2713 "}),(0,a.jsx)(n,{color:r.dim,children:h[X]})]}):(0,a.jsx)(n,{color:r.dim,children:`\u25CB ${h[X]}`})]},D.id)}),ce.hi<t.questions.length-1?(0,a.jsx)(n,{color:r.dim,children:" \u25B6"}):null]})}):null,(0,a.jsx)(n,{children:" "}),z,j]})}var A=V(Q(),1),Bn={high:0,med:1,low:2},jr={high:r.red,med:"yellow",low:r.dim};function Fr(t){return t.map((o,l)=>({r:o,i:l})).sort((o,l)=>(Bn[o.r.risk??"zz"]??3)-(Bn[l.r.risk??"zz"]??3)||o.i-l.i).map(({r:o})=>o)}function En({rows:t,width:o=120,badgeHeader:l="risk"}){if(t.length===0)return null;let u=Fr(t),g=B=>B.staged||!B.id?"(staged)":yn(B.id),x=Math.max(2,...u.map(B=>g(B).length)),f=Math.max(l.length,...u.map(B=>(B.badge??"").length)),p=o>=84&&u.some(B=>B.summary),M=o-(p?13:10)-x-f,v=Math.max(...u.map(B=>Math.max(B.title.length,(B.marker??"").length)),5),T=Math.max(5,p?Math.min(v,Math.max(16,Math.floor(M*.5))):Math.min(v,M)),W=p?Math.max(7,M-T):0,$=(B,P,O,H)=>vn(B,P,O,H.map(K=>K.length)),I=(B,P,O,H)=>[Oe(le(B,x),x),Oe(le(P,T),T),Oe(le(O,f),f),...p?[Oe(le(H,W),W)]:[]],N=I("id","title",l,"summary"),L=[];L.push((0,A.jsx)(n,{color:r.dim,children:$("\u250C","\u252C","\u2510",N)},"t")),L.push((0,A.jsxs)(n,{children:[N.map((B,P)=>(0,A.jsxs)(n,{children:[(0,A.jsx)(n,{color:r.dim,children:P===0?"\u2502 ":" \u2502 "}),(0,A.jsx)(n,{bold:!0,children:B})]},P)),(0,A.jsx)(n,{color:r.dim,children:" \u2502"})]},"h")),L.push((0,A.jsx)(n,{color:r.dim,children:$("\u251C","\u253C","\u2524",N)},"m"));for(let[B,P]of u.entries()){let O=I(g(P),le(P.title,T),le(P.badge??"",f),le(P.summary??"",W)),H=P.badgeColor??jr[P.badge??""]??r.dim;if(L.push((0,A.jsxs)(n,{children:[(0,A.jsx)(n,{color:r.dim,children:"\u2502 "}),(0,A.jsx)(n,{color:r.assuranceAccent,children:O[0]}),(0,A.jsx)(n,{color:r.dim,children:" \u2502 "}),O[1],(0,A.jsx)(n,{color:r.dim,children:" \u2502 "}),(0,A.jsx)(n,{color:H,children:O[2]}),p?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(n,{color:r.dim,children:" \u2502 "}),O[3]]}):null,(0,A.jsx)(n,{color:r.dim,children:" \u2502"})]},`r-${B}`)),P.marker){let K=I("",le(P.marker,T),"","");L.push((0,A.jsx)(n,{color:r.dim,children:`\u2502 ${K.join(" \u2502 ")} \u2502`},`mk-${B}`))}}return L.push((0,A.jsx)(n,{color:r.dim,children:$("\u2514","\u2534","\u2518",N)},"b")),(0,A.jsx)(A.Fragment,{children:L})}var y=V(Q(),1);function Wr(t){let o=t.form==="assumed"?" (assumed)":t.form==="deferred"?"":" (you)",l=t.note?` \u2014 ${t.note}`:"";return t.form==="deferred"?`\u21B3 deferred q${t.qNum} ${t.stub}${l}`:t.form==="changed"?`\u21B3 changed q${t.qNum} ${t.stub}: ${t.prev??"?"} \u2192 ${t.choice??"?"}${o}${l}`:`\u21B3 ${t.form} q${t.qNum} ${t.stub}: ${t.choice??"?"}${o}${l}`}var Vr=()=>(process.stdout?.columns??100)-12;function Mn({block:t,annotations:o}){let l=t.era??0,u=Nr(t,o??null);return l>0?(0,y.jsx)(k,{marginLeft:l*2,children:u}):u}function Nr(t,o){switch(t.kind){case"banner":return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsx)(n,{bold:!0,color:r.assuranceAccent,children:` ${t.text}`})});case"user":return(0,y.jsxs)(k,{marginTop:1,children:[(0,y.jsx)(n,{color:r.orange,children:"\u276F "}),(0,y.jsx)(n,{children:t.text})]});case"note":return(0,y.jsx)(n,{color:r.dim,children:` ${t.text}`});case"agent":return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsx)(pn,{text:t.text,accent:r.assuranceAccent})});case"worked":return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsx)(n,{color:r.dim,children:` \u2699 ${wn(t.durS,t.toolCalls,t.tools)}`})});case"usage":return(0,y.jsx)(n,{color:r.dim,children:` \xB7 ${t.credits.toFixed(1)} credits \u2014 total ${t.total.toFixed(1)}`});case"turn":{let l=o,u=l?l.fresh:t.items.map((v,T)=>({item:v,num:T+1,updated:!1})),g={usecase:"risk","use-case":"risk",ac:"check",scenario:"kind",test:"check",gap:"severity",stylenote:"kind"},x=v=>v.kind??"use-case",f=new Map;for(let v of u){let T=v.item,W=x(v.item),$=T.risk==="high"||T.risk==="med"||T.risk==="low"?T.risk:void 0,I={id:T.logical_id??"",staged:!T.logical_id,title:T.title,badge:T.badge??T.risk??"",summary:T.why??T.summary??T.description??"",...$?{risk:$}:{},...v.updated?{marker:"\u21B3 changed"}:{}},N=f.get(W)??[];N.push(I),f.set(W,N)}let p=u.some(v=>!!v.item.kind),C=(l?.unchanged??[]).reduce((v,T)=>v+T.count,0),M=l?.headerStats?` \u2014 ${l.headerStats}${C>0?` (${C} unchanged)`:""}`:"";return(0,y.jsxs)(k,{flexDirection:"column",marginLeft:2,children:[(0,y.jsxs)(n,{bold:!0,children:[p?"design":t.heading,M?(0,y.jsx)(n,{bold:!1,color:r.dim,children:M}):null]}),[...f.entries()].map(([v,T])=>(0,y.jsxs)(k,{flexDirection:"column",children:[f.size>1?(0,y.jsx)(n,{color:r.dim,children:`${nt(v)} \xB7 ${T.length}`}):null,(0,y.jsx)(En,{rows:T,width:Vr(),badgeHeader:g[v]??"info"})]},v)),l&&l.unchanged.length>0&&(0,y.jsx)(n,{color:r.dim,children:` \u22EE unchanged: ${l.unchanged.map(v=>`${v.count} ${v.label}`).join(" \xB7 ")}`})]})}case"answer":return(0,y.jsx)(n,{color:r.dim,children:Wr(t.receipt)});case"continued":return(0,y.jsx)(n,{color:r.dim,children:"\u21B3 continued"});case"childOpen":{let{ing:l}=Rt(t.verb);return(0,y.jsx)(k,{marginTop:1,children:(0,y.jsxs)(n,{color:r.assuranceAccent,children:[`\u25CF ${l} ${t.subject}`,t.sid?(0,y.jsx)(n,{color:r.dim,children:` \u2014 ${t.sid}`}):null,t.note?(0,y.jsx)(n,{color:r.dim,children:` ${t.note}`}):null]})})}case"childClose":{let{ed:l}=Rt(t.verb);if(!t.ok)return(0,y.jsxs)(n,{color:r.red,children:[`\u25CF ${t.verb} failed \u2014 ${t.exitCode!=null?`exited ${t.exitCode}`:"error"}`,t.fixCmd?(0,y.jsx)(n,{color:r.dim,children:` \xB7 ${t.fixCmd}`}):null]});let u=[bn(t.durS),...t.results?[t.results]:[],...t.credits!==void 0?[`${t.credits.toFixed(1)} credits`]:[]].join(" \xB7 ");return(0,y.jsx)(n,{color:r.green,children:`\u25CF ${l} ${t.subject} \u2014 ${u}`})}case"childBack":return(0,y.jsx)(n,{color:r.dim,children:`back with ${t.parentVerb} \u2014 ${t.context}`});case"commit":return(0,y.jsxs)(k,{flexDirection:"column",children:[(0,y.jsx)(n,{color:t.ok?r.green:r.red,children:` ${t.ok?"\u2714":"\u2717"} ${t.line}`}),(t.warnings??[]).map((l,u)=>(0,y.jsx)(n,{color:r.dim,children:` \u26A0 ${l}`},`w-${u}`))]});case"error":return(0,y.jsxs)(mn,{variant:"error",paddingX:1,children:[(0,y.jsx)(n,{color:r.red,children:t.title}),t.detail.map((l,u)=>(0,y.jsx)(n,{color:r.dim,children:l},`d-${u}`))]})}}var Te=V(Q(),1);function An({item:t}){return(0,Te.jsxs)(k,{flexDirection:"column",marginLeft:2,children:[(t.cite??[]).map((o,l)=>(0,Te.jsx)(n,{dimColor:!0,children:`cite ${o.anchor??"conv"} \u2014 "${o.quote??""}"`},`cite-${l}`)),(t.depends_on_hint??[]).length>0&&(0,Te.jsx)(n,{dimColor:!0,children:`depends on: ${(t.depends_on_hint??[]).join(", ")}`}),Object.entries(t.extra??{}).map(([o,l])=>(0,Te.jsx)(n,{dimColor:!0,children:`${o}: ${l}`},`extra-${o}`))]})}var R=V(Q(),1),Mt=(t,o)=>Math.max(0,Math.min(o,t));function ot(t,o,l){switch(o.type){case"move":return t.level==="detail"?{...t,scroll:Math.max(0,(t.scroll??0)+o.delta)}:{...t,cursor:Mt(t.cursor+o.delta,Math.max(0,l-1))};case"enter":return t.level==="list"?{...t,level:"detail",scroll:0}:t;case"back":return t.level==="detail"?{...t,level:"list",scroll:0}:null}}var On={"use-case":"use-cases",ac:"acs",scenario:"scenarios",test:"tests",gap:"gaps"};function _n(t,o){if(t.level==="detail")return{level:"detail",cursor:Mt(t.num-1,Math.max(0,o.entries.length-1))};if(t.section){let l=o.entries.findIndex(u=>On[u.kind]===t.section);if(l>=0)return{level:"list",cursor:l}}return{level:"list",cursor:0}}function Kr(t){let o=[];for(let l of t.entries){let u=o.find(g=>g.kind===l.kind);u?u.entries.push(l):o.push({kind:l.kind,entries:[l]})}return o}var Ln=3;function Ur({items:t,cursor:o,verb:l,more:u}){let g=`view \xB7 ${l} so far \xB7 ${t.counts.map(f=>`${f.count} ${f.count===1?f.label.replace(/s$/,""):f.label}`).join(" \xB7 ")}`,x=t.entries[o];return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsx)(n,{bold:!0,color:r.assuranceAccent,children:g}),Kr(t).map(({kind:f,entries:p})=>{let C=x?.kind===f,M=C?p.findIndex($=>$.ref===x.ref):-1,v=C?Mt(M-1,Math.max(0,p.length-Ln)):0,T=p.slice(v,v+(C?Ln:1)),W=p.length-T.length;return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsx)(n,{color:r.dim,children:`${On[f]??nt(f)} \xB7 ${p.length}`}),T.map($=>{let I=C&&$.ref===x.ref,N=$.item.badge;return(0,R.jsxs)(n,{children:[(0,R.jsx)(n,{color:r.assuranceAccent,children:I?"\u203A ":" "}),(0,R.jsx)(n,{children:`${$.num} \xB7 ${$.item.title}`}),N?(0,R.jsx)(n,{color:r.dim,children:` \xB7 ${N}`}):null]},`${$.kind}:${$.ref}`)}),W>0&&(0,R.jsx)(n,{color:r.dim,children:` \u22EE ${W} more`})]},f)}),u?(0,R.jsxs)(n,{children:[(0,R.jsx)(n,{color:r.assuranceAccent,children:o===t.entries.length?"\u203A ":" "}),(0,R.jsx)(n,{color:r.dim,children:`\u22EF show all \u2014 ${u.hidden} more from earlier turns`})]}):null]})}var st=14;function Qr({items:t,cursor:o,explain:l,grandTotal:u,dossier:g,scroll:x=0}){let f=t.entries[o];if(!f)return(0,R.jsx)(n,{color:r.dim,children:"nothing to show"});if(g){let C=Math.max(0,Math.min(x,Math.max(0,g.lines.length-st))),M=g.lines.slice(C,C+st);return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsxs)(n,{bold:!0,children:[`view \xB7 ${g.id}`,g.id.toLowerCase()!==g.rawId?(0,R.jsx)(n,{bold:!1,color:r.dim,children:` \xB7 ${g.rawId}`}):null]}),(0,R.jsx)(n,{bold:!0,children:g.title}),C>0?(0,R.jsx)(n,{color:r.muted,children:`\u22EE ${C} above`}):null,M.map((v,T)=>(0,R.jsx)(n,{color:v.dim?r.dim:void 0,children:v.text},`dl-${T}`)),g.lines.length>C+st?(0,R.jsx)(n,{color:r.muted,children:`\u22EE ${g.lines.length-C-st} more`}):null]})}let p=f.item;return(0,R.jsxs)(k,{flexDirection:"column",children:[(0,R.jsx)(n,{bold:!0,children:`view \xB7 ${f.kind} ${f.num} of ${u??t.entries.length}`}),(0,R.jsx)(n,{children:f.item.title}),p.badge?(0,R.jsx)(n,{color:r.dim,children:`kind: ${p.badge}`}):null,p.why?(0,R.jsx)(n,{color:r.dim,children:p.why}):null,(0,R.jsx)(An,{item:f.item}),l?.map((C,M)=>(0,R.jsx)(n,{color:r.dim,children:C},`ex-${M}`)),(0,R.jsx)(n,{color:r.dim,children:"view-only \u2014 approvals happen in chat"})]})}function Pn({items:t,state:o,verb:l,more:u,explain:g,grandTotal:x,dossier:f=null}){return o.level==="list"?(0,R.jsx)(Ur,{items:t,cursor:o.cursor,verb:l,more:u}):(0,R.jsx)(Qr,{items:t,cursor:o.cursor,explain:g,grandTotal:x,dossier:f,scroll:o.scroll??0})}var J=V(Q(),1),At=14;function Hr(t){let o=[],l=null;for(let u of t)u.field!==l&&(l=u.field,o.push({kind:"field",field:l})),o.push({kind:"line",field:l,line:u});return o}function qn({title:t,lines:o,offset:l=0}){let u=Hr(o),g=Math.max(0,Math.min(l,Math.max(0,u.length-At))),x=u.slice(g,g+At),f=g,p=Math.max(0,u.length-g-At),C=`view \xB7 diff \xB7 ${t} \xB7 current \u2192 proposed`;return(0,J.jsxs)(k,{flexDirection:"column",children:[(0,J.jsx)(n,{bold:!0,color:r.assuranceAccent,children:C}),f>0?(0,J.jsx)(k,{paddingLeft:2,children:(0,J.jsx)(n,{color:r.dim,children:`\u22EE ${f} above`})}):null,x.map((M,v)=>M.kind==="field"?(0,J.jsx)(k,{paddingLeft:2,children:(0,J.jsx)(n,{color:r.dim,children:M.field==="criteria"?"criteria":M.field})},`r-${g+v}`):(0,J.jsx)(k,{paddingLeft:4,children:(0,J.jsx)(n,{color:M.line.op==="-"?"red":"green",children:`${M.line.op==="-"?"\u2212":"+"} ${M.line.text}`})},`r-${g+v}`)),p>0?(0,J.jsx)(k,{paddingLeft:2,children:(0,J.jsx)(n,{color:r.dim,children:`\u22EE ${p} more`})}):null]})}var zr={"use-cases":"use-cases",usecases:"use-cases","use-case":"use-cases",acs:"acs",ac:"acs",scenarios:"scenarios",scenario:"scenarios",tests:"tests",test:"tests",gaps:"gaps",gap:"gaps"};function jn(t){let o=(t??"").trim().toLowerCase();if(!o)return{level:"list"};if(/^\d+$/.test(o)){let u=parseInt(o,10);return u>=1?{level:"detail",num:u}:{error:"items are numbered from 1 \u2014 /view 1"}}let l=zr[o];return l?{level:"list",section:l}:{error:"try /view, /view <number>, or /view acs|scenarios|tests"}}var E=V(Q(),1),Xr=6,Fn=12;function Gr(t,o,l){let u=Math.max(20,o),g=[];for(let f of t.split(`
|
|
3
3
|
`)){if(f.length<=u){g.push(f);continue}let p="";for(let C of f.split(" "))p&&p.length+1+C.length>u?(g.push(p),p=C):p=p?`${p} ${C}`:C;g.push(p)}let x=Math.max(0,g.length-l);return{body:g.slice(-l).join(`
|
|
4
4
|
`),hidden:x}}function Wn(t){let o={key:"redesign",label:"re-design from scratch",detail:"replaces the current design"},l={key:"keep",label:"keep the existing design",detail:"back to the list"};return t.designed==="stale"?[{...o,detail:"the use-case changed since it was designed"},l]:[l,o]}function Xi({controller:t,verb:o="extract",onCtrlC:l,chain:u=null,inspect:g=null,reconcile:x=null,autoReview:f=!1,onReviewExit:p,meta:C=null}){let[,M]=(0,m.useState)(0),[v,T]=(0,m.useState)(!1),[W,$]=(0,m.useState)(null),[I,N]=(0,m.useState)(null),L=(0,m.useRef)(null),[B,P]=(0,m.useState)(null),O=(0,m.useRef)(null),H=e=>{O.current=e,P(e)},K=e=>{L.current=e,N(e),e===null&&H(null)},re=(0,m.useRef)([]),[S,$e]=(0,m.useState)(null),z=(0,m.useRef)(null),j=e=>{z.current=e,$e(e)},[h,ce]=(0,m.useState)(null),D=(0,m.useRef)(null),w=e=>{D.current=e,ce(e)},[X,Pe]=(0,m.useState)(null),Lt=(0,m.useRef)(null),he=e=>{Lt.current=e,Pe(e)},lt=(0,m.useRef)({approved:0,rejected:0,deferred:0}),Ce=(0,m.useRef)(!1),ae=(0,m.useRef)(null),Ot=fn(),{stdout:Vn}=Ze(),Nn=Vn?.columns??80,_t=(0,m.useRef)(0),ct=(0,m.useRef)(0);(0,m.useEffect)(()=>{let e=()=>{let i=t.state.ledger;for(let c=_t.current;c<i.length;c++){let d=i[c],b=d.kind==="turn"?Tn(t.state.turns,d.turnIndex):void 0;Ot.append((0,E.jsx)(Mn,{block:d,annotations:b},`lg-${c}`))}_t.current=i.length};e();let s=t.subscribe(()=>{e();let i=t.state;L.current&&(i.pending||i.status==="pausing")&&(K(null),i.pending&&$("questions arrived \u2014 back to chat")),M(c=>c+1)});return M(i=>i+1),s},[t,Ot]);let{thinking:ue,status:de,pending:_,confirm:qe,ledger:ie,activeTurn:Pt,stream:Kn,notice:je}=t.state,qt=(Kn?.text??"").trimEnd(),jt=qt.length>0,Un=v&&(ue.liveThinking.length>0||ue.thinkingLog.length>0),Qn=Gr(ue.liveThinking||ue.thinkingLog.map(e=>e.text).join(`
|
|
5
5
|
`),Nn-6,Fn),Ft=jt?qt.split(`
|
|
6
|
-
`).slice(-Xr):[];Pt&&(ct.current=Pt.turnIndex);let Hn=_?_.resolution.filter(e=>!e).length:0,at;for(let e=ie.length-1;e>=0;e--){if(re.current.some(i=>i.end!=null&&e>=i.start&&e<i.end))continue;let s=ie[e];if(s.kind==="banner"&&!s.text.startsWith("kane")){at=s.text;break}}let Re=ue.activity[ue.activity.length-1],zn=Re?Re.status==="decision"?Re.label:xn({name:Re.name,status:Re.status}):void 0,Wt=de==="streaming"||de==="working",[,Xn]=(0,m.useState)(0);dn(()=>Xn(e=>e+1),Wt||S?.kind==="running"||h?.st.kind==="running"?120:null);let Gn=t.state.busySince?Math.floor((Date.now()-t.state.busySince)/1e3):0,Yn=t.state.turns.some(e=>e.role==="agent"),[Jn,Zn]=(0,m.useState)(0),[er,tr]=(0,m.useState)(!1),[ut,nr]=(0,m.useState)(null),pe=(0,m.useRef)(0),Vt=(0,m.useRef)(!1),Nt=(0,m.useRef)(null),Se=e=>{pe.current=e,Zn(e)},Kt=e=>{Vt.current=e,tr(e)},xe=e=>{Nt.current=e,nr(e)},[Ie,rr]=(0,m.useState)(null),dt=(0,m.useRef)(null),ke=e=>{dt.current=e,rr(e)},[mt,ir]=(0,m.useState)(null),Ut=(0,m.useRef)(null),De=e=>{Ut.current=e,ir(e)},[Fe,sr]=(0,m.useState)(0),G=(0,m.useRef)(0),Be=e=>{G.current=e,sr(e)},Qt=_?_.questions[0]?.id??"b":null;(0,m.useEffect)(()=>{_&&Be(_.cursor<0?0:_.cursor)},[Qt,_?.cursor]);let We=()=>{let e=Z.current;if(!e)return;let s=e.questions.length;for(let i=1;i<=s;i++){let c=(G.current+i)%s;if(!e.resolution[c]){Be(c);return}}},Ve=_?_.questions[Math.max(0,Math.min(_.questions.length-1,Fe))]:void 0,te=(0,m.useRef)(Ve);te.current=Ve;let Z=(0,m.useRef)(_);Z.current=_;let or=_?`${Qt}:${Fe}`:null;(0,m.useEffect)(()=>{if(xe(null),ke(null),De(null),te.current){Kt(!0);let e=Z.current?.resolution[G.current]?.selected_index;Se(e??te.current.recommended_index??0)}else Kt(!1)},[or]);let Ne=e=>{let s=Z.current;return Et(e,s?tt(s)!=="":!1)},lr={isFocused:()=>Vt.current&&te.current!=null&&Nt.current==null&&dt.current==null&&Ut.current==null||D.current!=null&&D.current.st.kind!=="running"&&Lt.current==null||z.current!=null&&z.current.kind!=="running"||U.current&&cn.current==null,onMove:e=>{let s=te.current;if(s){Se(Math.max(0,Math.min(Ne(s).maxSel,pe.current+e)));return}let i=D.current;if(i){let d=i.items[i.i];if(i.st.kind==="card"&&d){let b=it(d.card)??rt(d.card).length-1;w({...i,st:{kind:"card",sel:Math.max(0,Math.min(b,i.st.sel+e))}});return}if(i.st.kind==="view"&&d){w({...i,st:{kind:"view",offset:Math.max(0,i.st.offset+e)}});return}if(i.st.kind==="offer"||i.st.kind==="done"){let b=i.st.kind==="offer"?1:Ge.current.length-1;w({...i,st:{...i.st,sel:Math.max(0,Math.min(b,i.st.sel+e))}});return}if(i.st.kind==="running"&&!U.current)return}let c=z.current;if(c?.kind==="picker"){j({...c,sel:Math.max(0,Math.min(c.items.length-1,c.sel+e))});return}if(c?.kind==="ask"||c?.kind==="confirm"||c?.kind==="failed"){let d=(c.kind==="ask"?He.current.length:c.kind==="failed"?ze.current.length:2)-1;j({...c,sel:Math.max(0,Math.min(d,c.sel+e))});return}c&&!U.current||U.current&&ye(Math.max(0,Math.min(Le.current.length-1,vt.current+e)))},onSelect:()=>{let e=te.current,s=Z.current;if(!e||!s){let d=D.current;if(d&&d.st.kind!=="running"){let q=d.items[d.i];if(d.st.kind==="card"&&q){let F=d.st.sel;if(F===it(q.card)){he("");return}let ge=rt(q.card)[F];if(!ge)return;if(ge.v==="view_diff"){w({...d,st:{kind:"view",offset:0}});return}let Er=ge.v==="approve"||ge.v==="archive"?"approve":ge.v==="skip"?"reject":"defer";xr(d,Er);return}if(d.st.kind==="view"){w({...d,st:{kind:"card",sel:0}});return}if(d.st.kind==="offer"){d.st.sel===0?rn(d,d.st.offer):we(d);return}if(d.st.kind==="done"){Ge.current[d.st.sel]?.key==="view"?Je(""):(w(null),p?.());return}return}if(d&&!U.current)return;let b=z.current;if(b?.kind==="picker"){let q=b.items[b.sel];q&&(q.designed?j({kind:"confirm",item:q,sel:0}):bt(q,!1));return}if(b?.kind==="confirm"){Wn(b.item)[b.sel]?.key==="redesign"?bt(b.item,!0):kt();return}if(b?.kind==="ask"){let q=He.current[b.sel]?.key;q==="another"?kt():q==="view"?Je(""):j(null);return}if(b?.kind==="failed"){let q=ze.current[b.sel]?.key;q==="retry"?bt(b.item,b.force):q==="view"?Je(""):j(null);return}if(b&&!U.current||!U.current)return;switch(Le.current[vt.current]?.key){case"reconcile-review":tn();return;case"finish":t.completeSession();return;case"continue":t.continueParked();return;case"design-chain":kt();return;case"view":Je("",ct.current);return;case"free":ve("");return}return}let i=Ne(e),c=pe.current;if(i.batchIdx!=null&&c===i.batchIdx){t.goWithRecommendations();return}if(i.freeIdx!=null&&c===i.freeIdx){xe("");return}if(i.doneIdx!=null&&c===i.doneIdx){t.confirmMulti(G.current),We();return}if(e.multi_select){t.toggleOption(G.current,c);return}if(e.options[c]?.input===!0){ke({opt:c,value:""});return}t.submitAnswer(G.current,c),We()},onLeft:()=>{Z.current&&Be(Math.max(0,G.current-1))},onRight:()=>{let e=Z.current;e&&Be(Math.min(e.questions.length-1,G.current+1))},onDigit:e=>{let s=te.current;if(s){e-1<s.options.length&&Se(e-1);return}let i=D.current;if(i){let d=i.items[i.i];if(i.st.kind==="card"&&d){e-1<rt(d.card).length&&w({...i,st:{kind:"card",sel:e-1}});return}if(i.st.kind==="offer"){e-1<2&&w({...i,st:{...i.st,sel:e-1}});return}if(i.st.kind==="done"){e-1<Ge.current.length&&w({...i,st:{...i.st,sel:e-1}});return}if(i.st.kind!=="running"||!U.current)return}let c=z.current;if(c?.kind==="picker"){e-1<c.items.length&&j({...c,sel:e-1});return}if(c?.kind==="ask"){e-1<He.current.length&&j({...c,sel:e-1});return}if(c?.kind==="failed"){e-1<ze.current.length&&j({...c,sel:e-1});return}if(c?.kind==="confirm"){e-1<2&&j({...c,sel:e-1});return}if(!(c&&!U.current)&&U.current){let d=Le.current,b=0;for(let Y=0;Y<d.length;Y++)if(!d[Y].free&&(b+=1,b===e)){ye(Y);return}}},isMulti:()=>{let e=te.current;return!!e?.multi_select&&pe.current<(e?.options.length??0)},onSpace:()=>{Z.current&&t.toggleOption(G.current,pe.current)},onTab:()=>{let e=te.current;if(!e)return;let s=Ne(e);s.batchIdx!=null&&Se(s.batchIdx)},onType:e=>{let s=te.current;if(s){if(e==="@"&&t.canIngest()){De("");return}let c=pe.current;if(s.options[c]?.input===!0){ke({opt:c,value:e});return}if(!s.allow_free_text)return;let d=Ne(s);Se(d.freeIdx??0),xe(e);return}let i=D.current;if(i){if(i.st.kind==="card"){let c=it(i.items[i.i].card);c!=null&&(w({...i,st:{kind:"card",sel:c}}),he(e));return}if(i.st.kind!=="running"||!U.current)return}if(!(z.current&&!U.current)&&U.current){let c=wn(Le.current);if(c==null)return;ye(c),ve(e)}},onBack:()=>{let e=D.current;if(e){e.st.kind==="view"?w({...e,st:{kind:"card",sel:0}}):e.st.kind==="offer"?we(e):e.st.kind==="done"&&(w(null),p?.());return}let s=z.current;if(s&&s.kind!=="running"){j(null);return}let i=Z.current;if(i){for(let c=G.current-1;c>=0;c--)if(i.resolution[c]){Be(c);return}}}},cr=ut!=null?{value:ut,onChange:e=>xe(e),onSubmit:e=>{xe(null),e.trim()&&Z.current&&(t.submitFreeText(G.current,e),We())},onCancel:()=>xe(null)}:null,ar=mt!=null?{value:mt,onChange:e=>De(e),onSubmit:e=>{De(null),e.trim()&&t.ingestAttach(e)},onCancel:()=>De(null)}:null,ur=Ie!=null?{optionIndex:Ie.opt,value:Ie.value,onChange:e=>ke({opt:Ie.opt,value:e}),onSubmit:e=>{let s=dt.current?.opt;ke(null),s!=null&&Z.current&&(t.submitAnswerWithText(G.current,s,e),We())},onCancel:()=>ke(null)}:null,Ke=(0,m.useRef)(!1),ft=l??(()=>t.requestPause()),Ht=()=>{if(Ce.current&&!Ke.current){Ke.current=!0,$("finishing the verdict \u2014 exiting once it lands (ctrl+c again = force)");return}ft()},se=t.state.checkpoint,Ee=S?.kind==="running"&&de==="idle",gt=h?.st.kind==="running"&&de==="idle"&&ae.current!=null,fe=de==="idle"&&Yn&&!_&&!I&&(!S||Ee)&&(!h||gt),U=(0,m.useRef)(!1);U.current=fe;let ee=_e(t.state.turns).entries.length,Me,ne;for(let e=ie.length-1;e>=0;e--){if(re.current.some(i=>i.end!=null&&e>=i.start&&e<i.end))continue;let s=ie[e];if(!Me&&s.kind==="commit"&&s.ok&&(Me=s.line),!ne&&s.kind==="banner"&&s.text.startsWith("designing: ")&&(ne=s.text.slice(11)),Me&&ne)break}let ht;for(let e=ie.length-1;e>=0;e--){let s=ie[e];if(s.kind==="user")break;if(s.kind==="commit"&&s.ok&&/\bapplied\b/.test(s.line)){ht=s.line;break}}let oe=ne?{"acceptance criteria":"scenarios",scenarios:"acceptance criteria + exercises","acceptance criteria + exercises":"tests + gaps"}[ne]:void 0,zt={"acceptance criteria":"the promises every path of this use-case must keep",scenarios:"the concrete user journeys that exercise those promises","acceptance criteria + exercises":"the wiring pass \u2014 per-journey checks, tied to the promises each journey exercises","tests + gaps":"runnable browser tests \u2014 anything unautomatable is recorded as a gap"},Xt=ne?zt[ne]:void 0,Gt=oe?zt[oe]:void 0,dr="phases: acceptance criteria \u2192 scenarios \u2192 wiring \u2192 tests \xB7 stop anytime with finish",mr=(()=>{for(let e=ie.length-1;e>=0;e--){let s=ie[e];if(s.kind==="agent")return s.text}return null})(),be=/\?\s*$/.test((mr??"").trimEnd()),Yt=o==="design"&&!se&&(be||oe!==void 0),Jt=ne==="tests + gaps",Ue=S?.kind==="running"?S.title:"the design",Zt=!!t.state.error&&!t.senderAlive(),fr=Ee?"\u25CF design \xB7 ":gt?`\u25CF ${ae.current??"design"} \xB7 `:"",gr=qe?"the agent needs a clarification before it can apply that":Ee&&!se?be?`${Ue} \u2014 the agent asked a question`:ht?`${Ue} \u2014 ${ht}`:Jt?`${Ue} \u2014 design complete`:`${Ue} \u2014 the agent is waiting on you`:se?ne?`${ne} done${oe?` \u2014 next: ${oe}`:""}`:Me??"phase done":Zt?"the agent stopped \u2014 the session is view-only":Yt?be?"the agent asked a question \u2014 answer or continue":`design incomplete \u2014 ${oe} not started`:Me??"waiting on you",[Ae,hr]=(0,m.useState)(null),pr=(0,m.useRef)(null);(0,m.useEffect)(()=>{if(!x)return;let e=fe||se?x.pending():null;pr.current=e,hr(e)},[fe,se,ie.length,h==null]);let en=Ae?[{key:"reconcile-review",label:Ae.kind==="cards"?`review ${Ae.count} change(s) from ${Ae.source}`:`review change(s) detected in ${Ae.source}`}]:[],Qe=qe?[{key:"free",label:"clarify \u2014 type which one you meant",free:!0}]:Ee&&!se?Jt&&!be?[{key:"finish",label:"finish this design"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"free",label:"reply \u2014 tell the agent what to change",free:!0}]:[{key:"continue",label:be?"continue \u2014 go with your suggestion":"continue designing"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"finish",label:"finish this design"},{key:"free",label:"reply \u2014 tell the agent what to change",free:!0}]:se?[...en,{key:"continue",label:oe?`continue to ${oe}`:"continue"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"finish",label:"finish here"},{key:"free",label:"adjust \u2014 tell me what to change",free:!0}]:Zt?[...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"free",label:"tell me what to change",free:!0}]:Yt?[{key:"continue",label:be?"continue \u2014 go with your suggestion":`continue \u2014 ${oe} next`},...ee>0?[{key:"view",label:"view the design"}]:[],{key:"finish",label:"finish anyway"},{key:"free",label:"reply \u2014 answer and continue",free:!0}]:[...en,{key:"finish",label:o==="design"?"finish":"looks good \u2014 finish the session"},...u?[{key:"design-chain",label:"design tests for a use-case\u2026"}]:[],...ee>0?[{key:"view",label:o==="design"?"view the design":`view the ${ee} draft${ee===1?"":"s"}`}]:[],{key:"free",label:o==="design"?"keep adjusting \u2014 tell me what to change":"tell me what to change",free:!0}],pt=[{key:"another",label:"design another use-case\u2026"},...ee>0?[{key:"view",label:"view what was designed"}]:[],{key:"back",label:"done \u2014 back"}],He=(0,m.useRef)(pt);He.current=pt;let xt=[{key:"retry",label:"try again"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"back",label:"back"}],ze=(0,m.useRef)(xt);ze.current=xt;let Xe=[...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"back",label:"back to the check-in"}],Ge=(0,m.useRef)(Xe);Ge.current=Xe;let kt=()=>{let e=u?.listUcs()??[];if(e.length===0){$("no use-cases to design yet");return}j({kind:"picker",items:e,sel:0})},bt=(e,s)=>{let i={start:t.state.ledger.length,end:null};re.current.push(i);let c=()=>{i.end=t.state.ledger.length};j({kind:"running",title:e.title,item:e,force:s,startedAt:Date.now()}),u.runDesignChild(e.key,s).then(d=>{c(),j(d===0?{kind:"ask",title:e.title,sel:0}:{kind:"failed",item:e,force:s,detail:`child exited ${d}`,sel:0})}).catch(d=>{c();let b=d instanceof Error?d.message:String(d);t.ledger({kind:"childClose",verb:"design",subject:e.title,ok:!1,durS:Math.max(1,Math.round((Date.now()-(z.current?.kind==="running"?z.current.startedAt:Date.now()))/1e3))}),t.note(b),j({kind:"failed",item:e,force:s,detail:b,sel:0})})},tn=()=>{if(D.current?.st.kind==="running")return;let e=x?.pending();if(!e){$("nothing awaiting review");return}if(lt.current={approved:0,rejected:0,deferred:0},e.kind==="needs-run"){w({items:[],i:0,st:{kind:"running",label:`reviewing changes in ${e.source}`,startedAt:Date.now()}}),x.startReview(e.source).then(()=>{let i=x.loadCards();if(i.length===0){t.note("no reviewable changes came back \u2014 the source may be unchanged"),w(null);return}w({items:i,i:0,st:{kind:"card",sel:0}})}).catch(i=>{t.note(`the review run failed \u2014 ${i instanceof Error?i.message:String(i)}`),w(null)});return}let s=x.loadCards();if(s.length===0){$("nothing awaiting review");return}w({items:s,i:0,st:{kind:"card",sel:0}})},nn=e=>{let s=lt.current,i=`${s.approved} approved \xB7 ${s.rejected} rejected \xB7 ${s.deferred} deferred`;w({...e,st:{kind:"done",sel:0,summary:i}})},we=e=>{if(e.i+1<e.items.length){w({...e,i:e.i+1,st:{kind:"card",sel:0}});return}let s=x?.loadCards()??[];s.length===0?nn(e):w({items:s,i:0,st:{kind:"card",sel:0}})},rn=(e,s)=>{if(!u){we(e);return}ae.current=s.kind;let i={start:t.state.ledger.length,end:null};re.current.push(i),w({...e,st:{kind:"running",label:`${s.kind==="evolve"?"Evolving":"Designing"} ${s.title}`,startedAt:Date.now()}}),u.runDesignChild(s.key,s.kind==="evolve",s.kind).then(()=>{ae.current=null,i.end=t.state.ledger.length,we(D.current??e)}).catch(c=>{ae.current=null,i.end=t.state.ledger.length,t.ledger({kind:"childClose",verb:s.kind,subject:s.title,ok:!1,durS:1}),t.note(c instanceof Error?c.message:String(c)),we(D.current??e)})},xr=(e,s,i)=>{let c=e.items[e.i];!c||Ce.current||(Ce.current=!0,x.applyVerdict(c.key,s,i).then(d=>{if(Ce.current=!1,Ke.current){ft();return}let b=D.current??e;if(!d.ok){t.note(d.refusal);let Y=x.loadCards();Y.length===0?nn(b):w({items:Y,i:Math.min(b.i,Y.length-1),st:{kind:"card",sel:0}});return}lt.current[s==="approve"?"approved":s==="reject"?"rejected":"deferred"]+=1,t.ledger({kind:"commit",ok:!0,line:d.line}),d.note&&t.note(d.note),d.offer?rn(b,d.offer):we(b)}).catch(d=>{if(Ce.current=!1,Ke.current){ft();return}t.note(`the verdict did not land \u2014 ${d instanceof Error?d.message:String(d)}; try the card again`)}))},kr=e=>{x?.noteSteer?.(),w(null),he(null),$(null),t.submit(e)},br=X!=null?{value:X,onChange:e=>he(e),onSubmit:e=>{let s=e.trim();s?kr(s):he(null)},onCancel:()=>he(null)}:null,sn=(0,m.useRef)(!1);(0,m.useEffect)(()=>{!f||sn.current||(sn.current=!0,x?.pending()?tn():p?.())},[f]);let Le=(0,m.useRef)(Qe);Le.current=Qe;let wt=fe&&se&&Xt!==void 0,yt=re.current.find(e=>e.end==null)?.start??"top",on=(0,m.useRef)(new Set),[wr,ln]=(0,m.useState)(!1);(0,m.useEffect)(()=>{wt?on.current.has(yt)||(on.current.add(yt),ln(!0)):ln(!1)},[wt,yt]);let yr=wt?[...wr?[dr]:[],`${Xt}${Gt?` \xB7 next: ${Gt}`:""}`]:[],[vr,Tr]=(0,m.useState)(0),[Ye,$r]=(0,m.useState)(null),vt=(0,m.useRef)(0),cn=(0,m.useRef)(null),ye=e=>{vt.current=e,Tr(e)},ve=e=>{cn.current=e,$r(e)},Cr=`${fe}:${se}:${ct.current}`;(0,m.useEffect)(()=>{ye(0),ve(null)},[Cr]);let Rr=Ye!=null?{value:Ye,onChange:e=>ve(e),onSubmit:e=>{ve(null),ye(0);let s=e.trim();s&&($(null),t.submit(s))},onCancel:()=>{ve(null),ye(0)}}:null,Je=(e,s)=>{if(/^(uc|sc|ac|t|gap|sty)-\d+$/i.test(e.trim())){let b=e.trim().toLowerCase(),q=_e(t.state.turns).entries.findIndex(F=>(F.item.logical_id??"").toLowerCase()===b);if(q<0){$(`${e.trim().toUpperCase()} isn't in this session's items \u2014 view lists what this session minted`);return}K({level:"detail",cursor:q,scroll:0}),H(null);return}let i=jn(e);if("error"in i){$(i.error);return}let c=_e(t.state.turns);if(c.entries.length===0){$("nothing proposed yet \u2014 the first turn is still coming");return}if(i.level==="detail"&&i.num>c.entries.length){$(`no item ${i.num} \u2014 the set has ${c.entries.length} item${c.entries.length===1?"":"s"}`);return}let d=s!=null?St(c,s):c;K(_n(i,d)),H(s!=null&&d.entries.length<c.entries.length?s:null)},Tt=jt?"writing":zn??(t.state.workingLabel?It(t.state.workingLabel):o==="design"?"designing":"thinking"),Sr=ue.liveThinking.length>0||ue.thinkingLog.length>0,$t=S?.kind==="running"?{verb:"design"}:h?.st.kind==="running"&&ae.current?{verb:ae.current}:void 0,Ir=_?{kind:"waiting",pending:Hn}:de==="pausing"?{kind:"working",step:"pausing \u2014 saving session"}:S?.kind==="running"?Ee?{kind:"child-waiting"}:{kind:"child-working",step:Tt}:h?.st.kind==="running"?gt?{kind:"child-waiting"}:ae.current?{kind:"child-working",step:Tt}:{kind:"working",step:It(h.st.label)}:h?.st.kind==="card"&&h.items.length>0?{kind:"card",n:h.i+1,m:h.items.length}:S||h?{kind:"idle"}:Wt?{kind:"working",step:Tt,elapsedS:Gn}:{kind:"idle"},Dr=ut!=null||Ie!=null||mt!=null||X!=null||Ye!=null,an=h?h.items[h.i]:void 0,Br=[...Dr?["\u23CE submit","esc back"]:I?I.level==="list"?["\u2191\u2193 move","\u23CE open","esc back"]:["\u2191\u2193 scroll","esc back"]:_&&Ve?Sn(Ve,{batchCount:_.questions.length,canAttach:t.canIngest(),escBack:_.resolution.slice(0,Fe).some(e=>!!e)}).keys:h?.st.kind==="card"&&an?In(an.card).keys:h?.st.kind==="view"?["\u2191\u2193 scroll","esc back"]:h?.st.kind==="offer"?["\u2191\u2193 select","\u23CE confirm","esc later"]:h?.st.kind==="done"?Bt(Xe,{escBack:!0}).keys:S?.kind==="picker"||S?.kind==="confirm"||S?.kind==="ask"||S?.kind==="failed"?["\u2191\u2193 select","\u23CE confirm","esc back"]:fe?Bt(Qe,{escBack:!1}).keys:[],...Sr?["ctrl+t thinking"]:[],de==="pausing"?"ctrl+c force quit":"ctrl+c exit"],Ct=C??{verb:o,sid:"",env:""},un=(0,E.jsx)($n,{status:Ir,meta:{...Ct,...at??Ct.subject?{subject:at??Ct.subject}:{}},tallies:Rn(t.state,o),keys:Br,child:$t});if(I){let e=_e(t.state.turns),s=B!=null?St(e,B):e,i=e.entries.length-s.entries.length,c=I.level==="list"&&i>0,d=s.entries.length+(c?1:0),b=s.entries[I.cursor],Y=I.level==="detail"&&b?t.explainLines(b.item.slug??b.item.temp_ref):null,q=I.level==="detail"&&b&&g?g(b.item.logical_id??t.aliasOf(b.item.temp_ref)??b.item.temp_ref):null;return(0,E.jsxs)(k,{flexDirection:"column",children:[(0,E.jsx)(Dt,{onToggleThinking:()=>T(F=>!F),onCtrlC:Ht,explorer:{isOpen:()=>L.current!==null,onMove:F=>K(L.current&&ot(L.current,{type:"move",delta:F},d)),onEnter:()=>{let F=L.current;if(F){if(F.level==="list"&&c&&F.cursor===s.entries.length){H(null);return}K(ot(F,{type:"enter"},d))}},onBack:()=>{K(L.current&&ot(L.current,{type:"back"},d)),setTimeout(()=>M(F=>F+1),0)}}}),(0,E.jsx)(Pn,{items:s,state:I,verb:o,more:c?{hidden:i}:null,explain:Y,grandTotal:e.entries.length,dossier:q}),(je??W)&&(je??W).split(`
|
|
7
|
-
`).map((F,ge)=>(0,E.jsx)(n,{color:r.orange,children:F},`nt-${ge}`)),un]})}return(0,E.jsxs)(k,{flexDirection:"column",children:[(0,E.jsx)(Dt,{onToggleThinking:()=>T(e=>!e),onCtrlC:Ht,panel:lr}),Un&&(0,E.jsx)(
|
|
6
|
+
`).slice(-Xr):[];Pt&&(ct.current=Pt.turnIndex);let Hn=_?_.resolution.filter(e=>!e).length:0,at;for(let e=ie.length-1;e>=0;e--){if(re.current.some(i=>i.end!=null&&e>=i.start&&e<i.end))continue;let s=ie[e];if(s.kind==="banner"&&!s.text.startsWith("kane")){at=s.text;break}}let Re=ue.activity[ue.activity.length-1],zn=Re?Re.status==="decision"?Re.label:kn({name:Re.name,status:Re.status}):void 0,Wt=de==="streaming"||de==="working",[,Xn]=(0,m.useState)(0);dn(()=>Xn(e=>e+1),Wt||S?.kind==="running"||h?.st.kind==="running"?120:null);let Gn=t.state.busySince?Math.floor((Date.now()-t.state.busySince)/1e3):0,Yn=t.state.turns.some(e=>e.role==="agent"),[Jn,Zn]=(0,m.useState)(0),[er,tr]=(0,m.useState)(!1),[ut,nr]=(0,m.useState)(null),pe=(0,m.useRef)(0),Vt=(0,m.useRef)(!1),Nt=(0,m.useRef)(null),Se=e=>{pe.current=e,Zn(e)},Kt=e=>{Vt.current=e,tr(e)},xe=e=>{Nt.current=e,nr(e)},[Ie,rr]=(0,m.useState)(null),dt=(0,m.useRef)(null),ke=e=>{dt.current=e,rr(e)},[mt,ir]=(0,m.useState)(null),Ut=(0,m.useRef)(null),De=e=>{Ut.current=e,ir(e)},[Fe,sr]=(0,m.useState)(0),G=(0,m.useRef)(0),Be=e=>{G.current=e,sr(e)},Qt=_?_.questions[0]?.id??"b":null;(0,m.useEffect)(()=>{_&&Be(_.cursor<0?0:_.cursor)},[Qt,_?.cursor]);let We=()=>{let e=Z.current;if(!e)return;let s=e.questions.length;for(let i=1;i<=s;i++){let c=(G.current+i)%s;if(!e.resolution[c]){Be(c);return}}},Ve=_?_.questions[Math.max(0,Math.min(_.questions.length-1,Fe))]:void 0,te=(0,m.useRef)(Ve);te.current=Ve;let Z=(0,m.useRef)(_);Z.current=_;let or=_?`${Qt}:${Fe}`:null;(0,m.useEffect)(()=>{if(xe(null),ke(null),De(null),te.current){Kt(!0);let e=Z.current?.resolution[G.current]?.selected_index;Se(e??te.current.recommended_index??0)}else Kt(!1)},[or]);let Ne=e=>{let s=Z.current;return Et(e,s?tt(s)!=="":!1)},lr={isFocused:()=>Vt.current&&te.current!=null&&Nt.current==null&&dt.current==null&&Ut.current==null||D.current!=null&&D.current.st.kind!=="running"&&Lt.current==null||z.current!=null&&z.current.kind!=="running"||U.current&&cn.current==null,onMove:e=>{let s=te.current;if(s){Se(Math.max(0,Math.min(Ne(s).maxSel,pe.current+e)));return}let i=D.current;if(i){let d=i.items[i.i];if(i.st.kind==="card"&&d){let b=it(d.card)??rt(d.card).length-1;w({...i,st:{kind:"card",sel:Math.max(0,Math.min(b,i.st.sel+e))}});return}if(i.st.kind==="view"&&d){w({...i,st:{kind:"view",offset:Math.max(0,i.st.offset+e)}});return}if(i.st.kind==="offer"||i.st.kind==="done"){let b=i.st.kind==="offer"?1:Ge.current.length-1;w({...i,st:{...i.st,sel:Math.max(0,Math.min(b,i.st.sel+e))}});return}if(i.st.kind==="running"&&!U.current)return}let c=z.current;if(c?.kind==="picker"){j({...c,sel:Math.max(0,Math.min(c.items.length-1,c.sel+e))});return}if(c?.kind==="ask"||c?.kind==="confirm"||c?.kind==="failed"){let d=(c.kind==="ask"?He.current.length:c.kind==="failed"?ze.current.length:2)-1;j({...c,sel:Math.max(0,Math.min(d,c.sel+e))});return}c&&!U.current||U.current&&ye(Math.max(0,Math.min(Le.current.length-1,vt.current+e)))},onSelect:()=>{let e=te.current,s=Z.current;if(!e||!s){let d=D.current;if(d&&d.st.kind!=="running"){let q=d.items[d.i];if(d.st.kind==="card"&&q){let F=d.st.sel;if(F===it(q.card)){he("");return}let ge=rt(q.card)[F];if(!ge)return;if(ge.v==="view_diff"){w({...d,st:{kind:"view",offset:0}});return}let Er=ge.v==="approve"||ge.v==="archive"?"approve":ge.v==="skip"?"reject":"defer";xr(d,Er);return}if(d.st.kind==="view"){w({...d,st:{kind:"card",sel:0}});return}if(d.st.kind==="offer"){d.st.sel===0?rn(d,d.st.offer):we(d);return}if(d.st.kind==="done"){Ge.current[d.st.sel]?.key==="view"?Je(""):(w(null),p?.());return}return}if(d&&!U.current)return;let b=z.current;if(b?.kind==="picker"){let q=b.items[b.sel];q&&(q.designed?j({kind:"confirm",item:q,sel:0}):bt(q,!1));return}if(b?.kind==="confirm"){Wn(b.item)[b.sel]?.key==="redesign"?bt(b.item,!0):kt();return}if(b?.kind==="ask"){let q=He.current[b.sel]?.key;q==="another"?kt():q==="view"?Je(""):j(null);return}if(b?.kind==="failed"){let q=ze.current[b.sel]?.key;q==="retry"?bt(b.item,b.force):q==="view"?Je(""):j(null);return}if(b&&!U.current||!U.current)return;switch(Le.current[vt.current]?.key){case"reconcile-review":tn();return;case"finish":t.completeSession();return;case"continue":t.continueParked();return;case"design-chain":kt();return;case"view":Je("",ct.current);return;case"free":ve("");return}return}let i=Ne(e),c=pe.current;if(i.batchIdx!=null&&c===i.batchIdx){t.goWithRecommendations();return}if(i.freeIdx!=null&&c===i.freeIdx){xe("");return}if(i.doneIdx!=null&&c===i.doneIdx){t.confirmMulti(G.current),We();return}if(e.multi_select){t.toggleOption(G.current,c);return}if(e.options[c]?.input===!0){ke({opt:c,value:""});return}t.submitAnswer(G.current,c),We()},onLeft:()=>{Z.current&&Be(Math.max(0,G.current-1))},onRight:()=>{let e=Z.current;e&&Be(Math.min(e.questions.length-1,G.current+1))},onDigit:e=>{let s=te.current;if(s){e-1<s.options.length&&Se(e-1);return}let i=D.current;if(i){let d=i.items[i.i];if(i.st.kind==="card"&&d){e-1<rt(d.card).length&&w({...i,st:{kind:"card",sel:e-1}});return}if(i.st.kind==="offer"){e-1<2&&w({...i,st:{...i.st,sel:e-1}});return}if(i.st.kind==="done"){e-1<Ge.current.length&&w({...i,st:{...i.st,sel:e-1}});return}if(i.st.kind!=="running"||!U.current)return}let c=z.current;if(c?.kind==="picker"){e-1<c.items.length&&j({...c,sel:e-1});return}if(c?.kind==="ask"){e-1<He.current.length&&j({...c,sel:e-1});return}if(c?.kind==="failed"){e-1<ze.current.length&&j({...c,sel:e-1});return}if(c?.kind==="confirm"){e-1<2&&j({...c,sel:e-1});return}if(!(c&&!U.current)&&U.current){let d=Le.current,b=0;for(let Y=0;Y<d.length;Y++)if(!d[Y].free&&(b+=1,b===e)){ye(Y);return}}},isMulti:()=>{let e=te.current;return!!e?.multi_select&&pe.current<(e?.options.length??0)},onSpace:()=>{Z.current&&t.toggleOption(G.current,pe.current)},onTab:()=>{let e=te.current;if(!e)return;let s=Ne(e);s.batchIdx!=null&&Se(s.batchIdx)},onType:e=>{let s=te.current;if(s){if(e==="@"&&t.canIngest()){De("");return}let c=pe.current;if(s.options[c]?.input===!0){ke({opt:c,value:e});return}if(!s.allow_free_text)return;let d=Ne(s);Se(d.freeIdx??0),xe(e);return}let i=D.current;if(i){if(i.st.kind==="card"){let c=it(i.items[i.i].card);c!=null&&(w({...i,st:{kind:"card",sel:c}}),he(e));return}if(i.st.kind!=="running"||!U.current)return}if(!(z.current&&!U.current)&&U.current){let c=gn(Le.current);if(c==null)return;ye(c),ve(e)}},onBack:()=>{let e=D.current;if(e){e.st.kind==="view"?w({...e,st:{kind:"card",sel:0}}):e.st.kind==="offer"?we(e):e.st.kind==="done"&&(w(null),p?.());return}let s=z.current;if(s&&s.kind!=="running"){j(null);return}let i=Z.current;if(i){for(let c=G.current-1;c>=0;c--)if(i.resolution[c]){Be(c);return}}}},cr=ut!=null?{value:ut,onChange:e=>xe(e),onSubmit:e=>{xe(null),e.trim()&&Z.current&&(t.submitFreeText(G.current,e),We())},onCancel:()=>xe(null)}:null,ar=mt!=null?{value:mt,onChange:e=>De(e),onSubmit:e=>{De(null),e.trim()&&t.ingestAttach(e)},onCancel:()=>De(null)}:null,ur=Ie!=null?{optionIndex:Ie.opt,value:Ie.value,onChange:e=>ke({opt:Ie.opt,value:e}),onSubmit:e=>{let s=dt.current?.opt;ke(null),s!=null&&Z.current&&(t.submitAnswerWithText(G.current,s,e),We())},onCancel:()=>ke(null)}:null,Ke=(0,m.useRef)(!1),ft=l??(()=>t.requestPause()),Ht=()=>{if(Ce.current&&!Ke.current){Ke.current=!0,$("finishing the verdict \u2014 exiting once it lands (ctrl+c again = force)");return}ft()},se=t.state.checkpoint,Ee=S?.kind==="running"&&de==="idle",gt=h?.st.kind==="running"&&de==="idle"&&ae.current!=null,fe=de==="idle"&&Yn&&!_&&!I&&(!S||Ee)&&(!h||gt),U=(0,m.useRef)(!1);U.current=fe;let ee=_e(t.state.turns).entries.length,Me,ne;for(let e=ie.length-1;e>=0;e--){if(re.current.some(i=>i.end!=null&&e>=i.start&&e<i.end))continue;let s=ie[e];if(!Me&&s.kind==="commit"&&s.ok&&(Me=s.line),!ne&&s.kind==="banner"&&s.text.startsWith("designing: ")&&(ne=s.text.slice(11)),Me&&ne)break}let ht;for(let e=ie.length-1;e>=0;e--){let s=ie[e];if(s.kind==="user")break;if(s.kind==="commit"&&s.ok&&/\bapplied\b/.test(s.line)){ht=s.line;break}}let oe=ne?{"acceptance criteria":"scenarios",scenarios:"acceptance criteria + exercises","acceptance criteria + exercises":"tests + gaps"}[ne]:void 0,zt={"acceptance criteria":"the promises every path of this use-case must keep",scenarios:"the concrete user journeys that exercise those promises","acceptance criteria + exercises":"the wiring pass \u2014 per-journey checks, tied to the promises each journey exercises","tests + gaps":"runnable browser tests \u2014 anything unautomatable is recorded as a gap"},Xt=ne?zt[ne]:void 0,Gt=oe?zt[oe]:void 0,dr="phases: acceptance criteria \u2192 scenarios \u2192 wiring \u2192 tests \xB7 stop anytime with finish",mr=(()=>{for(let e=ie.length-1;e>=0;e--){let s=ie[e];if(s.kind==="agent")return s.text}return null})(),be=/\?\s*$/.test((mr??"").trimEnd()),Yt=o==="design"&&!se&&(be||oe!==void 0),Jt=ne==="tests + gaps",Ue=S?.kind==="running"?S.title:"the design",Zt=!!t.state.error&&!t.senderAlive(),fr=Ee?"\u25CF design \xB7 ":gt?`\u25CF ${ae.current??"design"} \xB7 `:"",gr=qe?"the agent needs a clarification before it can apply that":Ee&&!se?be?`${Ue} \u2014 the agent asked a question`:ht?`${Ue} \u2014 ${ht}`:Jt?`${Ue} \u2014 design complete`:`${Ue} \u2014 the agent is waiting on you`:se?ne?`${ne} done${oe?` \u2014 next: ${oe}`:""}`:Me??"phase done":Zt?"the agent stopped \u2014 the session is view-only":Yt?be?"the agent asked a question \u2014 answer or continue":`design incomplete \u2014 ${oe} not started`:Me??"waiting on you",[Ae,hr]=(0,m.useState)(null),pr=(0,m.useRef)(null);(0,m.useEffect)(()=>{if(!x)return;let e=fe||se?x.pending():null;pr.current=e,hr(e)},[fe,se,ie.length,h==null]);let en=Ae?[{key:"reconcile-review",label:Ae.kind==="cards"?`review ${Ae.count} change(s) from ${Ae.source}`:`review change(s) detected in ${Ae.source}`}]:[],Qe=qe?[{key:"free",label:"clarify \u2014 type which one you meant",free:!0}]:Ee&&!se?Jt&&!be?[{key:"finish",label:"finish this design"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"free",label:"reply \u2014 tell the agent what to change",free:!0}]:[{key:"continue",label:be?"continue \u2014 go with your suggestion":"continue designing"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"finish",label:"finish this design"},{key:"free",label:"reply \u2014 tell the agent what to change",free:!0}]:se?[...en,{key:"continue",label:oe?`continue to ${oe}`:"continue"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"finish",label:"finish here"},{key:"free",label:"adjust \u2014 tell me what to change",free:!0}]:Zt?[...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"free",label:"tell me what to change",free:!0}]:Yt?[{key:"continue",label:be?"continue \u2014 go with your suggestion":`continue \u2014 ${oe} next`},...ee>0?[{key:"view",label:"view the design"}]:[],{key:"finish",label:"finish anyway"},{key:"free",label:"reply \u2014 answer and continue",free:!0}]:[...en,{key:"finish",label:o==="design"?"finish":"looks good \u2014 finish the session"},...u?[{key:"design-chain",label:"design tests for a use-case\u2026"}]:[],...ee>0?[{key:"view",label:o==="design"?"view the design":`view the ${ee} draft${ee===1?"":"s"}`}]:[],{key:"free",label:o==="design"?"keep adjusting \u2014 tell me what to change":"tell me what to change",free:!0}],pt=[{key:"another",label:"design another use-case\u2026"},...ee>0?[{key:"view",label:"view what was designed"}]:[],{key:"back",label:"done \u2014 back"}],He=(0,m.useRef)(pt);He.current=pt;let xt=[{key:"retry",label:"try again"},...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"back",label:"back"}],ze=(0,m.useRef)(xt);ze.current=xt;let Xe=[...ee>0?[{key:"view",label:"view what's saved"}]:[],{key:"back",label:"back to the check-in"}],Ge=(0,m.useRef)(Xe);Ge.current=Xe;let kt=()=>{let e=u?.listUcs()??[];if(e.length===0){$("no use-cases to design yet");return}j({kind:"picker",items:e,sel:0})},bt=(e,s)=>{let i={start:t.state.ledger.length,end:null};re.current.push(i);let c=()=>{i.end=t.state.ledger.length};j({kind:"running",title:e.title,item:e,force:s,startedAt:Date.now()}),u.runDesignChild(e.key,s).then(d=>{c(),j(d===0?{kind:"ask",title:e.title,sel:0}:{kind:"failed",item:e,force:s,detail:`child exited ${d}`,sel:0})}).catch(d=>{c();let b=d instanceof Error?d.message:String(d);t.ledger({kind:"childClose",verb:"design",subject:e.title,ok:!1,durS:Math.max(1,Math.round((Date.now()-(z.current?.kind==="running"?z.current.startedAt:Date.now()))/1e3))}),t.note(b),j({kind:"failed",item:e,force:s,detail:b,sel:0})})},tn=()=>{if(D.current?.st.kind==="running")return;let e=x?.pending();if(!e){$("nothing awaiting review");return}if(lt.current={approved:0,rejected:0,deferred:0},e.kind==="needs-run"){w({items:[],i:0,st:{kind:"running",label:`reviewing changes in ${e.source}`,startedAt:Date.now()}}),x.startReview(e.source).then(()=>{let i=x.loadCards();if(i.length===0){t.note("no reviewable changes came back \u2014 the source may be unchanged"),w(null);return}w({items:i,i:0,st:{kind:"card",sel:0}})}).catch(i=>{t.note(`the review run failed \u2014 ${i instanceof Error?i.message:String(i)}`),w(null)});return}let s=x.loadCards();if(s.length===0){$("nothing awaiting review");return}w({items:s,i:0,st:{kind:"card",sel:0}})},nn=e=>{let s=lt.current,i=`${s.approved} approved \xB7 ${s.rejected} rejected \xB7 ${s.deferred} deferred`;w({...e,st:{kind:"done",sel:0,summary:i}})},we=e=>{if(e.i+1<e.items.length){w({...e,i:e.i+1,st:{kind:"card",sel:0}});return}let s=x?.loadCards()??[];s.length===0?nn(e):w({items:s,i:0,st:{kind:"card",sel:0}})},rn=(e,s)=>{if(!u){we(e);return}ae.current=s.kind;let i={start:t.state.ledger.length,end:null};re.current.push(i),w({...e,st:{kind:"running",label:`${s.kind==="evolve"?"Evolving":"Designing"} ${s.title}`,startedAt:Date.now()}}),u.runDesignChild(s.key,s.kind==="evolve",s.kind).then(()=>{ae.current=null,i.end=t.state.ledger.length,we(D.current??e)}).catch(c=>{ae.current=null,i.end=t.state.ledger.length,t.ledger({kind:"childClose",verb:s.kind,subject:s.title,ok:!1,durS:1}),t.note(c instanceof Error?c.message:String(c)),we(D.current??e)})},xr=(e,s,i)=>{let c=e.items[e.i];!c||Ce.current||(Ce.current=!0,x.applyVerdict(c.key,s,i).then(d=>{if(Ce.current=!1,Ke.current){ft();return}let b=D.current??e;if(!d.ok){t.note(d.refusal);let Y=x.loadCards();Y.length===0?nn(b):w({items:Y,i:Math.min(b.i,Y.length-1),st:{kind:"card",sel:0}});return}lt.current[s==="approve"?"approved":s==="reject"?"rejected":"deferred"]+=1,t.ledger({kind:"commit",ok:!0,line:d.line}),d.note&&t.note(d.note),d.offer?rn(b,d.offer):we(b)}).catch(d=>{if(Ce.current=!1,Ke.current){ft();return}t.note(`the verdict did not land \u2014 ${d instanceof Error?d.message:String(d)}; try the card again`)}))},kr=e=>{x?.noteSteer?.(),w(null),he(null),$(null),t.submit(e)},br=X!=null?{value:X,onChange:e=>he(e),onSubmit:e=>{let s=e.trim();s?kr(s):he(null)},onCancel:()=>he(null)}:null,sn=(0,m.useRef)(!1);(0,m.useEffect)(()=>{!f||sn.current||(sn.current=!0,x?.pending()?tn():p?.())},[f]);let Le=(0,m.useRef)(Qe);Le.current=Qe;let wt=fe&&se&&Xt!==void 0,yt=re.current.find(e=>e.end==null)?.start??"top",on=(0,m.useRef)(new Set),[wr,ln]=(0,m.useState)(!1);(0,m.useEffect)(()=>{wt?on.current.has(yt)||(on.current.add(yt),ln(!0)):ln(!1)},[wt,yt]);let yr=wt?[...wr?[dr]:[],`${Xt}${Gt?` \xB7 next: ${Gt}`:""}`]:[],[vr,Tr]=(0,m.useState)(0),[Ye,$r]=(0,m.useState)(null),vt=(0,m.useRef)(0),cn=(0,m.useRef)(null),ye=e=>{vt.current=e,Tr(e)},ve=e=>{cn.current=e,$r(e)},Cr=`${fe}:${se}:${ct.current}`;(0,m.useEffect)(()=>{ye(0),ve(null)},[Cr]);let Rr=Ye!=null?{value:Ye,onChange:e=>ve(e),onSubmit:e=>{ve(null),ye(0);let s=e.trim();s&&($(null),t.submit(s))},onCancel:()=>{ve(null),ye(0)}}:null,Je=(e,s)=>{if(/^(uc|sc|ac|t|gap|sty)-\d+$/i.test(e.trim())){let b=e.trim().toLowerCase(),q=_e(t.state.turns).entries.findIndex(F=>(F.item.logical_id??"").toLowerCase()===b);if(q<0){$(`${e.trim().toUpperCase()} isn't in this session's items \u2014 view lists what this session minted`);return}K({level:"detail",cursor:q,scroll:0}),H(null);return}let i=jn(e);if("error"in i){$(i.error);return}let c=_e(t.state.turns);if(c.entries.length===0){$("nothing proposed yet \u2014 the first turn is still coming");return}if(i.level==="detail"&&i.num>c.entries.length){$(`no item ${i.num} \u2014 the set has ${c.entries.length} item${c.entries.length===1?"":"s"}`);return}let d=s!=null?St(c,s):c;K(_n(i,d)),H(s!=null&&d.entries.length<c.entries.length?s:null)},Tt=jt?"writing":zn??(t.state.workingLabel?It(t.state.workingLabel):o==="design"?"designing":"thinking"),Sr=ue.liveThinking.length>0||ue.thinkingLog.length>0,$t=S?.kind==="running"?{verb:"design"}:h?.st.kind==="running"&&ae.current?{verb:ae.current}:void 0,Ir=_?{kind:"waiting",pending:Hn}:de==="pausing"?{kind:"working",step:"pausing \u2014 saving session"}:S?.kind==="running"?Ee?{kind:"child-waiting"}:{kind:"child-working",step:Tt}:h?.st.kind==="running"?gt?{kind:"child-waiting"}:ae.current?{kind:"child-working",step:Tt}:{kind:"working",step:It(h.st.label)}:h?.st.kind==="card"&&h.items.length>0?{kind:"card",n:h.i+1,m:h.items.length}:S||h?{kind:"idle"}:Wt?{kind:"working",step:Tt,elapsedS:Gn}:{kind:"idle"},Dr=ut!=null||Ie!=null||mt!=null||X!=null||Ye!=null,an=h?h.items[h.i]:void 0,Br=[...Dr?["\u23CE submit","esc back"]:I?I.level==="list"?["\u2191\u2193 move","\u23CE open","esc back"]:["\u2191\u2193 scroll","esc back"]:_&&Ve?Sn(Ve,{batchCount:_.questions.length,canAttach:t.canIngest(),escBack:_.resolution.slice(0,Fe).some(e=>!!e)}).keys:h?.st.kind==="card"&&an?In(an.card).keys:h?.st.kind==="view"?["\u2191\u2193 scroll","esc back"]:h?.st.kind==="offer"?["\u2191\u2193 select","\u23CE confirm","esc later"]:h?.st.kind==="done"?Bt(Xe,{escBack:!0}).keys:S?.kind==="picker"||S?.kind==="confirm"||S?.kind==="ask"||S?.kind==="failed"?["\u2191\u2193 select","\u23CE confirm","esc back"]:fe?Bt(Qe,{escBack:!1}).keys:[],...Sr?["ctrl+t thinking"]:[],de==="pausing"?"ctrl+c force quit":"ctrl+c exit"],Ct=C??{verb:o,sid:"",env:""},un=(0,E.jsx)($n,{status:Ir,meta:{...Ct,...at??Ct.subject?{subject:at??Ct.subject}:{}},tallies:Rn(t.state,o),keys:Br,child:$t});if(I){let e=_e(t.state.turns),s=B!=null?St(e,B):e,i=e.entries.length-s.entries.length,c=I.level==="list"&&i>0,d=s.entries.length+(c?1:0),b=s.entries[I.cursor],Y=I.level==="detail"&&b?t.explainLines(b.item.slug??b.item.temp_ref):null,q=I.level==="detail"&&b&&g?g(b.item.logical_id??t.aliasOf(b.item.temp_ref)??b.item.temp_ref):null;return(0,E.jsxs)(k,{flexDirection:"column",children:[(0,E.jsx)(Dt,{onToggleThinking:()=>T(F=>!F),onCtrlC:Ht,explorer:{isOpen:()=>L.current!==null,onMove:F=>K(L.current&&ot(L.current,{type:"move",delta:F},d)),onEnter:()=>{let F=L.current;if(F){if(F.level==="list"&&c&&F.cursor===s.entries.length){H(null);return}K(ot(F,{type:"enter"},d))}},onBack:()=>{K(L.current&&ot(L.current,{type:"back"},d)),setTimeout(()=>M(F=>F+1),0)}}}),(0,E.jsx)(Pn,{items:s,state:I,verb:o,more:c?{hidden:i}:null,explain:Y,grandTotal:e.entries.length,dossier:q}),(je??W)&&(je??W).split(`
|
|
7
|
+
`).map((F,ge)=>(0,E.jsx)(n,{color:r.orange,children:F},`nt-${ge}`)),un]})}return(0,E.jsxs)(k,{flexDirection:"column",children:[(0,E.jsx)(Dt,{onToggleThinking:()=>T(e=>!e),onCtrlC:Ht,panel:lr}),Un&&(0,E.jsx)(xn,{thinking:Qn.body,expanded:!0,thinkingDone:de!=="streaming",maxLines:Fn+1}),Ft.length>0&&(0,E.jsx)(k,{flexDirection:"column",children:Ft.map((e,s)=>(0,E.jsx)(n,{children:hn(e).map((i,c)=>(0,E.jsx)(n,{bold:i.bold,italic:i.italic,color:i.code?r.dim:void 0,children:i.text},c))},`st-${s}`))}),_&&(0,E.jsx)(Dn,{childPrefix:$t?`${$t.verb} \xB7 `:void 0,batch:_,qView:Fe,sel:Jn,focused:er,freeText:cr,optionText:ur,attach:ar,multiSelFor:e=>t.multiSelection(e)}),qe&&(0,E.jsx)(n,{color:"yellow",children:qe.prompt}),(je??W)&&(je??W).split(`
|
|
8
8
|
`).map((e,s)=>(0,E.jsx)(n,{color:r.orange,children:e},`nt-${s}`)),fe&&(0,E.jsx)(me,{headline:`${fr}${gr}`,rows:Qe,sel:vr,focused:Ye==null,freeText:Rr,sublines:yr}),h?.st.kind==="card"&&h.items[h.i]&&(0,E.jsx)(Cn,{card:h.items[h.i].card,position:{n:h.i+1,of:h.items.length},sel:h.st.sel,focused:X==null,freeText:br,editorIntent:"steer"}),h?.st.kind==="view"&&h.items[h.i]&&(0,E.jsx)(qn,{title:h.items[h.i].card.title,lines:h.items[h.i].viewLines,offset:h.st.offset}),h?.st.kind==="offer"&&(0,E.jsx)(me,{ask:!0,headline:h.st.offer.kind==="evolve"?`approved \u2014 the design for ${h.st.offer.title} should evolve with it`:`approved \u2014 ${h.st.offer.title} has no tests yet`,rows:[{key:"run",label:h.st.offer.kind==="evolve"?"evolve the design now":"design tests now"},{key:"later",label:"later \u2014 next change"}],sel:h.st.sel,focused:!0}),h?.st.kind==="done"&&(0,E.jsx)(me,{headline:`review complete \u2014 ${h.st.summary}`,rows:Xe,sel:h.st.sel,focused:!0}),S?.kind==="picker"&&(0,E.jsx)(me,{ask:!0,headline:"design tests for which use-case?",rows:S.items.map(e=>({key:e.key,label:e.title,detail:e.badge})),sel:S.sel,focused:!0}),S?.kind==="confirm"&&(0,E.jsx)(me,{ask:!0,headline:`${S.item.title} is already designed${S.item.designed==="stale"?" \u2014 and the use-case has changed since":""}`,rows:Wn(S.item).map(e=>({key:e.key,label:e.label,detail:e.detail})),sel:S.sel,focused:!0}),S?.kind==="ask"&&(0,E.jsx)(me,{headline:`designed ${S.title}`,rows:pt,sel:S.sel,focused:!0}),S?.kind==="failed"&&(0,E.jsx)(me,{headline:`design failed \u2014 ${S.item.title} (${S.detail})`,rows:xt,sel:S.sel,focused:!0}),un]})}export{Xi as ChatSurface,Gr as tailVisualRows};
|
|
@@ -1,2 +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-LL5DQO6V.js";import"./chunk-OO5GMBVI.js";import"./chunk-B2ZGG7WM.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-K7K23DIQ.js";import"./chunk-OO5GMBVI.js";import"./chunk-B2ZGG7WM.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-Q7XBMBMR.js";import"./chunk-X74PP5NJ.js";import"./chunk-5Y2G4NC7.js";import"./chunk-B2ZGG7WM.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 C,b as l,c as o}from"./chunk-
|
|
2
|
+
import{a as C,b as l,c as o}from"./chunk-ARG56PJG.js";import{y as n}from"./chunk-B2ZGG7WM.js";import{a as b}from"./chunk-HCBYKLMW.js";import{a as u,j as p}from"./chunk-C44QQJR4.js";import{a as y}from"./chunk-6YGTRKDT.js";import{e as a}from"./chunk-UR6MHSHU.js";var x=a(y(),1);var e=a(b(),1);function T({model:w,authLabel:B,profile:h,env:D,defaultUrl:s,projectId:i,projectName:d,folderId:t,folderName:f,windowSize:P,chromeProfile:R,target:r,deviceName:m,osVersion:v,appLabel:g}){let V=i?d?`${d} (${i})`:i:"(none)",$=t?f?`${f} (${t})`:t:"(none)",{exit:c}=p();return(0,x.useEffect)(()=>{let S=setTimeout(()=>c(),50);return()=>clearTimeout(S)},[c]),(0,e.jsx)(u,{flexDirection:"column",children:(0,e.jsx)(C,{title:"Configuration",children:(0,e.jsxs)(u,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(o,{label:"Auth"}),(0,e.jsx)(l,{label:" method",value:B}),(0,e.jsx)(l,{label:" profile",value:h}),(0,e.jsx)(l,{label:" env",value:D}),(0,e.jsx)(o,{label:"Defaults"}),(0,e.jsx)(l,{label:" url",value:s??"(none)",valueColor:s?n.orange:n.dim}),(0,e.jsx)(l,{label:" model",value:w}),(0,e.jsx)(l,{label:" window",value:P}),(0,e.jsx)(l,{label:" project",value:V}),(0,e.jsx)(l,{label:" folder",value:$}),r!==void 0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l,{label:" target",value:r}),r!=="desktop"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l,{label:" device_name",value:m??"(not set)",valueColor:m?void 0:n.dim}),(0,e.jsx)(l,{label:" os_version",value:v??"(not set)",valueColor:v?void 0:n.dim}),(0,e.jsx)(l,{label:" app",value:g??"(not set)",valueColor:g?void 0:n.dim})]})]}),(0,e.jsx)(o,{label:"Paths"}),(0,e.jsx)(l,{label:" chrome",value:R,valueColor:n.dim})]})})})}export{T as ConfigView};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a}from"./chunk-IQ7GPETF.js";import"./chunk-CGT4NFQN.js";import"./chunk-VNFCX2SH.js";import"./chunk-7O54QURK.js";import"./chunk-5GUD3CIH.js";import"./chunk-WILT62DP.js";import"./chunk-YMLC55J4.js";import"./chunk-EHN5HTUD.js";import"./chunk-22QIVSQR.js";import"./chunk-IE3OO5GI.js";import"./chunk-CH273NAE.js";import"./chunk-LBNADEQN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-P7YZ3PU3.js";import"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-3BHRGHIZ.js";import"./chunk-RFHMDQXZ.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-WBHSPN55.js";import"./chunk-MSGW4JDG.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-4JOD47QI.js";import"./chunk-OH2NSBO6.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-B2ZGG7WM.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as EvidenceViewOffer};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b}from"./chunk-YHR2YAN5.js";import"./chunk-YCCUBQY4.js";import"./chunk-RBHQXWR7.js";import"./chunk-BPMSNGXQ.js";import"./chunk-OO5GMBVI.js";import"./chunk-OH2NSBO6.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-B2ZGG7WM.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}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-7L25ZNNP.js";import"./chunk-ARG56PJG.js";import"./chunk-B2ZGG7WM.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-PGU64EWQ.js";import"./chunk-B2ZGG7WM.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-QJ5O27SJ.js";import"./chunk-OO5GMBVI.js";import"./chunk-B2ZGG7WM.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-WOA7VCGA.js";import"./chunk-YCCUBQY4.js";import"./chunk-RBHQXWR7.js";import"./chunk-BPMSNGXQ.js";import"./chunk-OO5GMBVI.js";import"./chunk-OH2NSBO6.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-B2ZGG7WM.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-QPUVOVD7.js";import"./chunk-S3DAAAE5.js";import"./chunk-7L25ZNNP.js";import"./chunk-ARG56PJG.js";import"./chunk-B2ZGG7WM.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-66MOZKD2.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as ScrollbackTap};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a}from"./chunk-JH6E632O.js";import"./chunk-3SPOJWRA.js";import"./chunk-DA57DXCF.js";import"./chunk-M7DN6FO3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-TDPWFYTJ.js";import"./chunk-O5AS2ZIX.js";import"./chunk-4BBDKWM3.js";import"./chunk-WOA7VCGA.js";import"./chunk-YHR2YAN5.js";import"./chunk-YCCUBQY4.js";import"./chunk-RBHQXWR7.js";import"./chunk-BPMSNGXQ.js";import"./chunk-VE3SUJMA.js";import"./chunk-TZXXJWHA.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-AC7BPO4X.js";import"./chunk-TAOHYWEO.js";import"./chunk-OO5GMBVI.js";import"./chunk-Z7S3IWUX.js";import"./chunk-BAKJPQGU.js";import"./chunk-OH2NSBO6.js";import"./chunk-DHJSM5DT.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-IQ7NGOAT.js";import"./chunk-B2ZGG7WM.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-O6U2HU5M.js";import"./chunk-7L25ZNNP.js";import"./chunk-ARG56PJG.js";import"./chunk-B2ZGG7WM.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-GESG672R.js";import"./chunk-GPIXV7AV.js";import"./chunk-KOL6ZWOQ.js";import"./chunk-X74PP5NJ.js";import"./chunk-5Y2G4NC7.js";import"./chunk-P7YZ3PU3.js";import"./chunk-TDPWFYTJ.js";import"./chunk-O5AS2ZIX.js";import"./chunk-RQLU4NDG.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-WBHSPN55.js";import"./chunk-MSGW4JDG.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-OH2NSBO6.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-7L25ZNNP.js";import"./chunk-ARG56PJG.js";import"./chunk-B2ZGG7WM.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as TestMdRunView};
|
|
@@ -1,2 +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-GKZ2KVE6.js";import"./chunk-VNFCX2SH.js";import"./chunk-RFHMDQXZ.js";import"./chunk-OH2NSBO6.js";import"./chunk-ARG56PJG.js";import"./chunk-B2ZGG7WM.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as buildServeMap,b as renderTestrunEvidenceTable};
|
|
@@ -1,2 +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-ARG56PJG.js";import{y as o}from"./chunk-B2ZGG7WM.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as u}from"./chunk-ZUZ6QJRA.js";import{d as m}from"./chunk-H6TNBKGR.js";import"./chunk-UR6MHSHU.js";function x(t){let e=d(t),[n,r]=e;return n==="context"?r==="sync"||r==="pull"||r==="push"||r==="clone"?"sync":r==="ingest"||r==="extract"?"extract":r==="name"||r==="retire"||r==="revert"||r==="review"?r:r??n:n==="maintain"&&r==="reconcile"?"reconcile":n==="cover"?r==="gaps"?"gaps":"cover":n??"sync"}function d(t){let e=[];for(let n=0;n<t.length&&e.length<2;n++){let r=t[n];if(r==="--")break;if(r==="--mode"){n++;continue}r.startsWith("-")||e.push(r)}return e}function p(t){return t.startsWith("--")?t.split("=",1)[0]:t.slice(0,2)}function c(t){let e=t;return typeof e.long=="string"||typeof e.short=="string"?e.long??e.short??"option":typeof e.name=="function"?e.name():"argument"}var f={unknownOption:(t,[e])=>({code:"commander.unknownOption",name:p(String(e))}),missingArgument:(t,[e])=>({code:"commander.missingArgument",name:String(e)}),unknownCommand:t=>({code:"commander.unknownCommand",name:String(t.args[0]??"")}),optionMissingArgument:(t,[e])=>({code:"commander.optionMissingArgument",name:c(e)}),missingMandatoryOptionValue:(t,[e])=>({code:"commander.missingMandatoryOptionValue",name:c(e)}),_conflictingOption:(t,[e,n])=>({code:"commander.conflictingOption",name:c(e),other:c(n)}),_excessArguments:(t,[e])=>({code:"commander.excessArguments",name:t.parent?t.name():void 0,expected:t.registeredArguments.length,got:e.length}),_callParseArg:(t,[e])=>({code:"commander.invalidArgument",name:c(e)})};function w(t,e){let n=e&&e.code===t?e:null;switch(t){case"commander.unknownOption":return n?`unknown option ${n.name}`:"unknown option";case"commander.missingArgument":return n?`missing required argument ${n.name}`:"missing required argument";case"commander.unknownCommand":return n?`unknown command ${n.name}`:"unknown command";case"commander.optionMissingArgument":return n?`option ${n.name} needs a value`:"an option needs a value";case"commander.missingMandatoryOptionValue":return n?`required option ${n.name} not given`:"a required option was not given";case"commander.conflictingOption":return n?`option ${n.name} cannot be used with option ${n.other}`:"two options cannot be used together";case"commander.excessArguments":return n?`too many arguments${n.name?` for ${n.name}`:""}: expected ${n.expected}, got ${n.got}`:"too many arguments";case"commander.invalidArgument":return n?`invalid value for ${n.name}`:"an argument's value is invalid";case"kane.answerOnSubcommand":return"option --answer belongs to kane-cli context sync [name] and kane-cli context pull";default:return"the command line was not accepted"}}function g(t,e={current:null}){t.exitOverride(),t.configureOutput({writeErr:()=>{},writeOut:()=>{}});let n=t;for(let[o,i]of Object.entries(f)){let s=n[o];typeof s=="function"&&(n[o]=function(...a){try{return s.apply(this,a)}catch(l){throw e.current=i(this,a),l}})}let r=n.error;n.error=function(...o){let i=o[1]?.code;return i==="commander.unknownCommand"&&e.current?.code!==i&&(e.current={code:i,name:String(this.args[0]??"")}),r.apply(this,o)};for(let o of t.commands)g(o,e);return e}async function v(t,e,n,r={stdout:o=>process.stdout.write(o),stderr:o=>process.stderr.write(o)}){let o=g(t);try{return await t.parseAsync(e),null}catch(i){if(!(i instanceof u))throw i;let s=m("ndjson",n,r);if(i.exitCode===0)return s.done(0);let a=d(e.slice(2))[0];return s.event({type:"error",code:"USAGE",message:w(i.code,o.current),remedy:`run kane-cli${a?` ${a}`:""} --help`}),s.done(2,"refused")}}export{v as parseAsAgent,g as silenceCommandTree,x as streamVerbFor,w as usageMessage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as a,c as b}from"./chunk-
|
|
2
|
+
import{b as a,c as b}from"./chunk-AC7BPO4X.js";import"./chunk-TAOHYWEO.js";import"./chunk-RZ4F3BHX.js";import"./chunk-B2ZGG7WM.js";import"./chunk-UR6MHSHU.js";export{a as isAppId,b as resolveCloudApp};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import"./chunk-UR6MHSHU.js";var p=new Set(["android","ios"]),d="hyperexecute";function u(i,a=process.env){let t=i.appiumSessionId?.trim();if(!t)return{kind:"none"};if(a.KANE_CLI_MODE!==d)return{kind:"invalid",message:"--appium-session-id can only be used for an exported test running on the HyperExecute grid."};let e=[];if(i.appiumUrl?.trim()||e.push("--appium-url"),i.target?.trim()||e.push("--target"),e.length>0)return{kind:"invalid",message:`--appium-session-id requires --appium-url and --target android|ios. Missing: ${e.join(", ")}.`};let r=i.target.trim().toLowerCase();if(!p.has(r))return{kind:"invalid",message:`Invalid --target: got "${i.target}". With --appium-session-id, --target must be "android" or "ios".`};let s=["deviceName","osVersion","app"].filter(n=>i[n]!==void 0).map(n=>`--${n.replace(/[A-Z]/g,o=>"-"+o.toLowerCase())}`);return s.length>0?{kind:"invalid",message:`${s.join(", ")} cannot be used with --appium-session-id.`}:{kind:"attach",device:{platform:r,appium_url:i.appiumUrl.trim(),session_id:t}}}function g(i){return`Running on an attached ${i.platform} session ${i.session_id} at ${i.appium_url}`}export{u as attachTargetFromFlags,g as formatAttachBanner};
|
|
@@ -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-Q4WH5CBN.js"),import("./resolver-TY7XLJBN.js"),import("./config-3AKWRTFS.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-LNMD4NJF.js")).resolveAgentAuthEnv()))();if(s.TESTMUAI_BASIC_AUTH||n.TESTMUAI_BASIC_AUTH)return s;let t=n.TESTMUAI_ENV==="stage"?"stage":"prod",o=await(e.exchange??i)(t);return o?{...s,TESTMUAI_BASIC_AUTH:o}:s}export{u as resolveLisAuthEnv};
|
|
@@ -1,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-UXH3RMQ7.js";import"./chunk-NOLYYHVG.js";import"./chunk-B2ZGG7WM.js";import"./chunk-UR6MHSHU.js";export{b as ensureHyperexecuteBinary,a as hyperexecuteDownloadUrl};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as N}from"./chunk-SFTFHFG3.js";import"./chunk-ZKSN2SJ7.js";import"./chunk-HOA4VWSD.js";import"./chunk-YYYQ5MVD.js";import"./chunk-MLRO7OH3.js";import"./chunk-KZG4E5RM.js";import"./chunk-X5276I5H.js";import"./chunk-UHT5SVP5.js";import"./chunk-FFFB5BXL.js";import"./chunk-AXTPNZPX.js";import"./chunk-L2TV4G56.js";import"./chunk-BZAGVBCX.js";import"./chunk-52WM3XYO.js";import"./chunk-BB2W35TW.js";import"./chunk-P3JUE2RM.js";import"./chunk-YKTYVJBN.js";import"./chunk-CRZUBDJ3.js";import"./chunk-GX3FPJUG.js";import"./chunk-427OQS2N.js";import"./chunk-JUJ4SAGH.js";import"./chunk-AHXOKBVE.js";import"./chunk-ALCE5RLK.js";import"./chunk-55YDTPB7.js";import"./chunk-YCH7H7JX.js";import"./chunk-2UIHS2FH.js";import"./chunk-Q2F5QB2W.js";import"./chunk-BKHXPBWN.js";import"./chunk-N2P4MI32.js";import"./chunk-J7NRD4Q7.js";import{U as A,V as U,W as I,X as k}from"./chunk-6LGED4FC.js";import"./chunk-C74ABM24.js";import"./chunk-H6TNBKGR.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-L4M7753M.js";import"./chunk-22QIVSQR.js";import"./chunk-IE3OO5GI.js";import{a as d}from"./chunk-CH273NAE.js";import"./chunk-LBNADEQN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import{t as R}from"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-YCCUBQY4.js";import"./chunk-MSGW4JDG.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-EYOCNMUM.js";import"./chunk-B2ZGG7WM.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";import{existsSync as M}from"fs";var q=new Set(["interactive","agent","ci","override"]);function F(t){return t.mode!=null&&!q.has(t.mode)?{error:`design: --mode must be interactive | agent | ci | override, got '${t.mode}'`}:t.strength!=null&&t.strength!=="pairwise"&&t.strength!=="3-wise"?{error:`design: --strength must be pairwise | 3-wise, got '${t.strength}'`}:t.max!=null&&(!Number.isInteger(t.max)||t.max<1)?{error:"design: --max must be a positive integer"}:!t.useCase&&!t.resume?{error:"design: --use-case is required (or --resume <sid> \u2014 the session remembers its use-case)"}:{useCase:t.useCase,max:t.max,strength:t.strength,mode:t.mode,force:t.force,resume:t.resume,plan:t.plan,message:t.message,phase:t.phase,allowUnreviewed:t.allowUnreviewed,because:t.because,changeDelta:t.changeDelta,priorDesign:t.priorDesign}}async function X(t){let l=async(e,n)=>{if(t.mode!=="agent")return process.stderr.write(e+`
|
|
3
|
+
`),2;let{makeHeadlessIO:s,agentRefusal:c}=await import("./headless-io-3A3BZVQ5.js");return c(s("ndjson","design"),e,n)};if(t.mode!=null&&!["interactive","agent","ci","override"].includes(t.mode)){let{makeHeadlessIO:e,agentRefusal:n}=await import("./headless-io-3A3BZVQ5.js");return n(e("ndjson","design"),`design: --mode must be interactive | agent | ci | override, got '${t.mode}'`,"MODE_USAGE")}let T=F(t);if("error"in T)return l(T.error);let o=T;{let{validateResumeMessage:e}=await import("./headless-io-3A3BZVQ5.js"),n=e(o,"design");if(n)return l(n)}{let{gateStructuredFlags:e}=await import("./structured-answers-NADW6D44.js"),n=e(t,"design");if(n)return l(n,"STRUCTURED_FLAGS_USAGE")}if(!M(d(process.cwd())))return l("error: no context store here (run `kane-cli context ingest` + `kane-cli context extract` first)","NO_STORE");{let e=I(d(process.cwd()));if(e){if(t.mode!=="agent")return l(`error: ${e.text}
|
|
4
|
+
next: ${e.remedy}`,e.code);let{makeHeadlessIO:n}=await import("./headless-io-3A3BZVQ5.js"),s=n("ndjson","design");return s.event(k(e)),s.done(2,"refused")}}let x=!!o.resume;if(o.useCase&&o.resume&&!t.allowUnreviewed)try{let{peekSession:e}=await import("./sessions-NH7WQWMX.js"),n=e(d(process.cwd()),o.resume);x=!!(n&&n.use_case===o.useCase)}catch{x=!1}if(o.useCase&&!x&&!t.allowUnreviewed)try{let[{openGraph:e},{designEntryCheck:n}]=await Promise.all([import("./readmodel-IBFRM6EO.js"),import("./trust-gate-EX7R2P4Y.js")]),s=n(e(d(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:f}=await import("readline/promises"),u=f({input:process.stdin,output:process.stderr}),w=(await u.question(`design: ${s.detail}
|
|
5
|
+
Design against it anyway? (y/N) `)).trim().toLowerCase();if(u.close(),w!=="y"&&w!=="yes")return process.stderr.write(`aborted \u2014 approve it first: ${s.reviewCmd}
|
|
6
|
+
`),2}else if(t.mode==="agent"){let{makeHeadlessIO:f}=await import("./headless-io-3A3BZVQ5.js"),u=f("ndjson","design");return u.event({type:"error",code:s.code,message:`design: ${s.detail}`,next:[s.reviewCmd]}),u.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})
|
|
7
|
+
`),2}catch(e){process.env.KANE_DEBUG&&process.stderr.write(`trust gate skipped: ${String(e)}
|
|
8
|
+
`)}let r=null,p=null;try{if(!o.mode&&!process.stdin.isTTY)return process.stderr.write(`design: no TTY \u2014 pass an explicit --mode agent|ci|override to run headless
|
|
9
|
+
`),2;let e=o.mode??"interactive";if(e==="interactive"){if(!process.stdin.isTTY||!process.stdout.isTTY)return process.stderr.write(`design: --mode interactive needs a TTY on stdin and stdout (use --mode agent|ci|override headless)
|
|
10
|
+
`),2;let{bindDesignInteractive:i}=await import("./interactive-bind-OJCYNQPI.js");return await i(o)}let{resolveAgentAuthEnv:n}=await import("./spawner-LNMD4NJF.js"),{runAgent:s}=await import("./bridge-X5DEJL6F.js"),{preflightTurn:c}=await import("./turn-preflight-JGYT7LXP.js"),{makeInterruptGuard:f}=await import("./interrupt-guard-UREUWNRL.js"),{baseUrlAdvisory:u}=await import("./turn-preflight-JGYT7LXP.js"),{makeHeadlessIO:w,resolveEncoding:E,guardedChannels:G}=await import("./headless-io-3A3BZVQ5.js"),{withStructuredNext:O,prepareStructuredResume:Y}=await import("./structured-answers-NADW6D44.js");r=O(w(E(e),"design"));let b=await A(d(process.cwd()));b&&(E(e)==="ndjson"?r.event(U(b)):r.progress(b.text));let{runWithChannel:H}=await import("./run-channel-RGH4WIQX.js"),v=r,P=E(e)==="ndjson"?i=>H({event:g=>v.event(g)},i):i=>i(),C=i=>{v.out(i),v.event({type:"note",text:i})},{telemetryBootstrap:j,telemetryEnvName:B}=await import("./bootstrap-6IJNZIPT.js"),m=j({verb:"design",mode:e,contextRoot:d(process.cwd()),env:B(),resumeSid:o.resume,write:!0,longSession:!0});p=i=>m.end(i);let a=Y({opts:t,contextDir:d(process.cwd()),verb:"design"});if(a.kind==="refuse")return r.out(a.error),e==="agent"&&r.event({type:"error",message:a.error,code:a.code}),await m.end({exit_code:2}),e==="agent"?r.done(2,"refused"):2;let D;if(a.kind==="apply"){for(let i of a.notes)C(i);if(a.matchedQids.length>0){C(`applying ${a.matchedQids.length} structured answer(s) from --answer to the paused session's pending questions`);for(let i of a.matchedQids)r.event({type:"panel_resolved",id:i,by:"user",via:"flag"})}a.statement&&(D=[o.message,a.statement].filter(Boolean).join(`
|
|
11
|
+
|
|
12
|
+
`))}let _=u();_&&C(_);let h=f(s,i=>r.out(i)),S=G(r,()=>h.interrupted(),/^error: (design agent failed|the design agent ended)/);try{let i=e==="interactive"&&process.stdin.isTTY&&process.stdout.isTTY?async y=>{let{createInterface:L}=await import("readline/promises"),$=L({input:process.stdin,output:process.stdout});try{return/^y(es)?$/i.test((await $.question(`${y} [y/N] `)).trim())}finally{$.close()}}:void 0,g=await P(async()=>{let y={...await n(),...m.spawnEnv()};return N({...o,mode:e,...D!==void 0?{message:D}:{},...i?{confirmRetarget:i}:{}},{contextDir:d(process.cwd()),agent:h.agent,preflightTurn:()=>c(y),ask:async()=>[],out:S.out,emit:S.emit,progress:v.progress,isTTY:!1,auth:y,telemetry:m})});return h.interrupted()&&g!==3?(r.out("interrupted \u2014 no session saved"),await m.end({exit_code:130}),r.done(130)):(g===1&&r.out(m.supportFooter()),await m.end({exit_code:g}),r.done(g))}finally{h.dispose()}}catch(e){if(e instanceof R)return p&&await p({exit_code:2}).catch(()=>{}),r?(r.event(k({code:e.code,text:e.message,remedy:e.remedy})),r.done(2,"refused")):(process.stderr.write(`error: ${e.message}
|
|
13
|
+
next: ${e.remedy}
|
|
14
|
+
`),2);p&&await p({exit_code:1}).catch(()=>{});let n=e instanceof Error?e.message:String(e);r?.event({type:"error",message:`error: design failed: ${n}`});let s=r?c=>r.out(c):c=>process.stderr.write(c+`
|
|
15
|
+
`);return s(`error: design failed: ${n}`),(process.env.ASSURANCE_LOG_LEVEL??"").toLowerCase()==="debug"&&e instanceof Error&&e.stack&&s(e.stack),s('hint: the full trace is in the file named on the "trace:" line at the start of this run'),r?r.done(1):1}}export{X as designTestsCommand};
|
|
@@ -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-O2APH6TZ.js";import"./chunk-4PMZ5FCD.js";import"./chunk-KBM3XHAM.js";import"./chunk-2YEHV2CX.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-B2ZGG7WM.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-NDCRJXYF.js";import"./chunk-4K5XTIJ6.js";import"./chunk-J7NRD4Q7.js";import"./chunk-UD7KKHPW.js";import"./chunk-B2ZGG7WM.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{b as i,f as c}from"./chunk-
|
|
2
|
+
import{a as l}from"./chunk-RZ4F3BHX.js";import{b as i,f as c}from"./chunk-B2ZGG7WM.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}from"./chunk-TNBF5OMZ.js";import"./chunk-BZAGVBCX.js";import"./chunk-52WM3XYO.js";import"./chunk-427OQS2N.js";import"./chunk-IE3OO5GI.js";import"./chunk-GP7WD4UY.js";import"./chunk-JQW2QFSX.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{a as commitChatTurn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c}from"./chunk-O25AL4B7.js";import"./chunk-AXTPNZPX.js";import"./chunk-L2TV4G56.js";import"./chunk-52WM3XYO.js";import"./chunk-IE3OO5GI.js";import"./chunk-3N6IAVD5.js";import"./chunk-FQNQVC5O.js";import"./chunk-AKX4VRRR.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{c as makeChatController,b as questionStub,a as recommendationPicks};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{d as w}from"./chunk-LBNADEQN.js";import{b,c as v}from"./chunk-VZ7KXRXB.js";import{b as $}from"./chunk-3N6IAVD5.js";import{b as E}from"./chunk-FQNQVC5O.js";var _=new Set(["delta","state-transition"]),N=/^capture baseline:/i;function R(e){return typeof e=="string"?e:e.text}function j(e){return typeof e=="object"&&e.baseline===!0||N.test(R(e).trim())}function T(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&"derived"in e}function M(e,i){if(e.check_prose)return e.check_prose;let t=i.find(o=>o.ref===e.check.verified_against),n=t?.text?` \u2014 the stated promise: ${t.text}`:"",s=String(e.check.operand??e.check.within??e.check.metric??"");return e.check.kind==="forbidden-presence"?`Confirm '${s}' does NOT appear (forbidden-presence)${n}`:`Confirm ${e.check.kind} check: ${s} (${e.check.operator})${n}`}var F=/^## Step \d+ — assert\s*$/;function ae(e,i){let t=e.split(`
|
|
3
|
+
`),n=!1;for(let s=0;s<t.length;s++){let o=/^(##\s.*?)\s@verifies\s+(.+?)\s*$/.exec(t[s]);if(!o)continue;n=!0;let c=o[2].split(",").map(a=>a.trim()).filter(Boolean).map(a=>{let r=i(a)??(a.startsWith("ac-")?a:null);if(!r)throw new Error(`@verifies ref '${a}' does not resolve to a committed AC`);return r});t[s]=`${o[1]} @verifies ${c.join(", ")}`}return{md:t.join(`
|
|
4
|
+
`),tagged:n}}function de(e,i){if(i.length!==0&&!e.split(`
|
|
5
|
+
`).some(t=>/^##\s/.test(t)&&w.test(t)))throw new Error("generated body has no @verifies binding for its ACs \u2014 the emitter contract is broken")}function ue(e){let i=e.split(`
|
|
6
|
+
`);if(i[0]?.trim()!=="---")return{};let t=i.slice(1).findIndex(n=>n.trim()==="---");if(t<0)return{};try{return b(i.slice(1,t+1).join(`
|
|
7
|
+
`))??{}}catch{return{}}}function le(e,i){if(i.length===0)return e;let t=e.split(`
|
|
8
|
+
`);for(let n=t.length-1;n>=0;n--){if(/^## Step \d+ — assert @verifies /.test(t[n]))return e;if(F.test(t[n]))return t[n]=`${t[n].trimEnd()} @verifies ${i.join(", ")}`,t.join(`
|
|
9
|
+
`)}return e}function fe(e,i){return i.size===0?e:e.split(`
|
|
10
|
+
`).map(t=>{let n=t.match(/^@import\s+(\S+)\s*$/);if(n&&i.has(n[1]))return`@import ${i.get(n[1])}`;let s=t.match(/^## Import: (\S+)\s*$/);return s&&i.has(s[1])?`## Import: ${i.get(s[1])}`:t}).join(`
|
|
11
|
+
`)}function I(e){let i=e.expected_mode??(T(e.operand)?"runtime-derived":"inferred");return{kind:e.kind,operator:e.operator,...e.operand!==void 0?{operand:e.operand}:{},..._.has(e.kind)?{baseline:e.baseline??null}:{},...e.within!==void 0?{within:e.within}:{},...e.metric!==void 0?{metric:e.metric}:{},...e.threshold!==void 0?{threshold:e.threshold}:{},...e.unit!==void 0?{unit:e.unit}:{},verified_against:e.verified_against,expected_mode:i,review_required:e.review_required??i==="runtime-derived"}}function pe(e,i,t){if(_.has(e.check.kind)&&!e.steps.some(j))throw new Error(`emitTestMd: check kind '${e.check.kind}' needs a baseline-capture step before the action (a step starting 'capture baseline: <metric>' or { baseline: true }) \u2014 the validator should have caught this`);let n=[];if(e.target){let r=d=>/^[A-Za-z0-9._/@-]+$/.test(d)?d:JSON.stringify(d);n.push("---",`target: ${e.target}`),e.app&&n.push(`app: ${r(e.app)}`),n.push("---","")}n.push(`# ${e.title}`,""),i.intent&&n.push(`> ${i.intent}`,"");for(let r of e.reuses??[])n.push(`## Import: ${r}`,"",`@import ${r}`,"");let s=[],o=e.steps.some(r=>typeof r=="object"&&(r.verifies?.length??0)>0),c=0;for(let r of e.steps){c++;let d=R(r).trim(),l=typeof r=="object"&&r.verifies?.length?` @verifies ${r.verifies.join(", ")}`:"";n.push(`## Step ${c}${l}`,"",d,""),s.push({step:c,objective:d,...j(r)?{baseline:!0}:{},...typeof r=="object"&&r.verifies?.length?{verifies:[...r.verifies]}:{}})}if(o){let r=-1;if(e.steps.forEach((d,l)=>{typeof d=="object"&&d.verifies?.includes(e.check.verified_against)&&(r=l)}),r<0)throw new Error(`emitTestMd: no tagged step claims check.verified_against (${String(e.check.verified_against)}) \u2014 the check would be dropped`);s[r].check=I(e.check)}else{c++;let r=M(e,t);n.push(`## Step ${c} \u2014 assert`,"",r,""),s.push({step:c,objective:r,check:I(e.check)})}let a=v({title:e.title,...i.title?{scenario:i.title}:{},objectives:s},{sortKeys:!0,lineWidth:-1});return{test_md:n.join(`
|
|
12
|
+
`),objectives_yaml:a}}function me(e){let t=e.replace(/\r\n/g,`
|
|
13
|
+
`).split(`
|
|
14
|
+
`).map(o=>o.replace(/[ \t]+$/,""));if(t[0]?.trim()==="---"){let o=t.slice(1).findIndex(c=>c.trim()==="---");if(o>=0){let c=b(t.slice(1,o+1).join(`
|
|
15
|
+
`))??{},a="assurance"in c;delete c.assurance,Object.keys(c).length===0&&a?t=t.slice(o+2):t=["---",...v(c,{sortKeys:!0,lineWidth:-1}).trimEnd().split(`
|
|
16
|
+
`),"---",...t.slice(o+2)]}}let n=[];for(let o of t)o===""&&n[n.length-1]===""||n.push(o);for(;n[0]==="";)n.shift();for(;n[n.length-1]==="";)n.pop();let s=n.join(`
|
|
17
|
+
`)+`
|
|
18
|
+
`;return"sha256:"+$(Buffer.from("assurance.testdef\0"+s,"utf8"))}import{existsSync as O,readFileSync as W}from"fs";import{dirname as z,isAbsolute as G,resolve as Q}from"path";var A=/^@import\s+(\S+)\s*$/;function U(e){let i=new Set;for(let t=0;t<e.length;t++)if(A.test(e[t].trim()))for(let n=t-1;n>=0;n--){let s=e[n].trim();if(s!==""){s==="```"&&i.add(t);break}}return i}function q(e,i,t=new Set,n=0){if(n>10)return e;let s=e.split(`
|
|
19
|
+
`),o=U(s);return s.map((c,a)=>{let r=A.exec(c.trim());if(!r||o.has(a))return c;let d=i(r[1]);if(!d||t.has(d.cycleKey))return c;let l=new Set(t);return l.add(d.cycleKey),q(d.body.trimEnd(),d.next,l,n+1)}).join(`
|
|
20
|
+
`)}function V(e){return i=>{let t=e.resolve(i);if(!t)return null;let n=e.getNode(t.tip)?.content.test_md_blob;return n?{body:n,cycleKey:t.tip,next:V(e)}:null}}function D(e,i){return t=>{let n=G(t)?t:Q(e,t);if(!O(n))return null;let s=W(n,"utf8"),o=P(s);return!o||!i.resolve(o)?null:{body:J(s),cycleKey:n,next:D(z(n),i)}}}function L(e,i){let t=-1;for(let u=1;u<i;u++)if(/^assurance\s*:\s*$/.test(e[u])){t=u;break}if(t<0)return null;let n=i;for(let u=t+1;u<i;u++)if(/^[^\s#]/.test(e[u])){n=u;break}let s,o=t,c,a,r,d,l,f=!1;for(let u=t+1;u<n;u++){let p=e[u].endsWith("\r")?e[u].slice(0,-1):e[u];if(p.trim()===""||/^\s*#/.test(p))continue;o=u;let x=/^(\s+)([^\s:#][^:]*):\s*(.*)$/.exec(p);if(!x){/^\s*["']?base["']?\s*:/.test(p)&&(f=!0);continue}let[,y,B,K]=x,m=B.trimEnd();s===void 0&&(s=y);let h=y===s,k=/^([^#\s]\S*)?\s*(#.*)?$/.exec(K.trim()),S=k?.[1];m==="id"&&h&&c===void 0&&(c=u,a=S),m==="base"&&(h&&r===void 0?(r=u,d=S,l=k?.[2]):h||(f=!0)),m!=="base"&&/^["']base["']$/.test(m)&&(f=!0)}return{start:t,lastChild:o,childIndent:s,idLine:c,id:a,baseLine:r,base:d,baseComment:l,strayBase:f}}function H(e){let i=C(e);if(!i)return null;let t=e.split(`
|
|
21
|
+
`),n=L(t,i.endLine);return n?.id?{id:n.id,...n.base!==void 0?{base:n.base}:{}}:null}function P(e){return H(e)?.id??null}function C(e){let i=e.split(`
|
|
22
|
+
`);if(i[0]?.trim()!=="---")return null;for(let t=1;t<i.length;t++)if(i[t].trim()==="---")return{text:i.slice(1,t).join(`
|
|
23
|
+
`),endLine:t};return null}function J(e){let i=C(e);if(!i)return e;let t=e.split(`
|
|
24
|
+
`),n=L(t,i.endLine),s=[],o=!1;for(let a=1;a<i.endLine;a++){let r=t[a];if(n&&a>=n.start&&a<=n.lastChild){o=!1;continue}if(/^assurance\s*:\s*\{/.test(r)){o=!0;continue}o&&/^\s+\S/.test(r)||(o=!1,s.push(r))}let c=t.slice(i.endLine+1).join(`
|
|
25
|
+
`);return s.every(a=>a.trim()==="")?c:["---",...s,"---",c].join(`
|
|
26
|
+
`)}import{appendFileSync as Z,readdirSync as X,readFileSync as Y,rmSync as ee,statSync as te}from"fs";import{join as g}from"path";import{randomBytes as ne}from"crypto";var ie="pending-facts.ndjson",re=/^pending-facts\.(\d+)-[0-9a-f]+\.ndjson$/,we=()=>`pending-facts.${process.pid}-${ne(4).toString("hex")}.ndjson`;function $e(e,i=1/0){let t=[];for(let n of X(e)){let s=re.exec(n);if(!s)continue;let o=Number(s[1]),c=Date.now()-te(g(e,n)).mtimeMs;if(o!==process.pid&&E(o)&&c<i){t.push(n);continue}let a=Y(g(e,n),"utf8").split(`
|
|
27
|
+
`).filter(r=>r!=="");a.length>0&&Z(g(e,ie),a.join(`
|
|
28
|
+
`)+`
|
|
29
|
+
`),ee(g(e,n))}return t}export{T as a,ae as b,de as c,ue as d,le as e,fe as f,pe as g,me as h,A as i,U as j,q as k,V as l,D as m,L as n,H as o,J as p,ie as q,re as r,we as s,$e as t};
|