@testmuai/kane-cli 0.8.23 → 0.10.0-rc.1
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-VPD5G67Q.js +2 -0
- package/dist/ChromeProfilePicker-CRKQEFYD.js +2 -0
- package/dist/CliFeedbackPrompt-M7BMWLKK.js +2 -0
- package/dist/CliUploadProgress-OP7DXMC2.js +2 -0
- package/dist/ConfigView-XI74BCCH.js +2 -0
- package/dist/EvidenceViewOffer-HAAK6DS5.js +2 -0
- package/dist/FolderPicker-W5S6RFCP.js +2 -0
- package/dist/InfoBox-OWUEHV2D.js +2 -0
- package/dist/LinksBox-PNSESNCU.js +2 -0
- package/dist/ProfilesView-PYDZZHKO.js +2 -0
- package/dist/ProjectPicker-BGFCUGT5.js +2 -0
- package/dist/SaveSessionPrompt-SUJE54GS.js +2 -0
- package/dist/ScrollbackTap-4SPXGFMU.js +2 -0
- package/dist/SingleShotApp-4TDXZEUA.js +2 -0
- package/dist/SummaryBox-FALOODAQ.js +2 -0
- package/dist/TestMdRunView-4GPRWHEU.js +2 -0
- package/dist/TestrunEvidenceTable-OBVQJ6IO.js +2 -0
- package/dist/WhoamiView-6WXGRANY.js +2 -0
- package/dist/{agent-parse-2MLJOJTH.js → agent-parse-CAS45UKA.js} +1 -1
- package/dist/app-client-U2YYF65L.js +2 -0
- package/dist/app-download-RXVZB6MM.js +2 -0
- package/dist/assurance-job-C3TXZGLL.js +7 -0
- package/dist/auth-7Z54TMQQ.js +2 -0
- package/dist/{binary-MOJTQGUV.js → binary-DJCDMGPX.js} +1 -1
- package/dist/bind-XVO4CQYV.js +2 -0
- package/dist/bootstrap-TY5RANJ7.js +2 -0
- package/dist/bridge-T6QMYKED.js +2 -0
- package/dist/build-5ZN47FAT.js +2 -0
- package/dist/catalog-RRQF4TCA.js +2 -0
- package/dist/{changelog-2N6HKKKQ.js → changelog-GBEVIUFJ.js} +1 -1
- package/dist/chat-committer-ZCSRJEUB.js +2 -0
- package/dist/chat-controller-XINCDH6Z.js +2 -0
- package/dist/child-G2GCW73X.js +2 -0
- package/dist/chunk-22PIMG52.js +2 -0
- package/dist/chunk-252FWF2G.js +19 -0
- package/dist/{chunk-AT3RME5W.js → chunk-2IZRPMZN.js} +1 -1
- package/dist/chunk-2NFS4KE4.js +2 -0
- package/dist/{chunk-LHUW5QDT.js → chunk-2OOFURWD.js} +1 -1
- package/dist/chunk-2OSFI33O.js +97 -0
- package/dist/chunk-2S3W2JT3.js +5 -0
- package/dist/chunk-2SWSVJUP.js +12 -0
- package/dist/chunk-2TVPA3LL.js +2 -0
- package/dist/chunk-2XW33VOK.js +2 -0
- package/dist/chunk-33DWJV67.js +235 -0
- package/dist/chunk-34R7BNZ2.js +2 -0
- package/dist/chunk-35ECWCCK.js +2 -0
- package/dist/chunk-3BSYOCSW.js +3 -0
- package/dist/chunk-3G2LSTK5.js +2 -0
- package/dist/chunk-3GXN6VF6.js +2 -0
- package/dist/chunk-3JLEDSG5.js +4 -0
- package/dist/chunk-3QICDXY5.js +5 -0
- package/dist/chunk-3UVSAAES.js +10 -0
- package/dist/chunk-42PALMW2.js +4 -0
- package/dist/chunk-432ZOE42.js +21 -0
- package/dist/chunk-44B6THYK.js +2 -0
- package/dist/chunk-47WQBG5I.js +6 -0
- package/dist/{chunk-J2FJ62K4.js → chunk-4D5PC6QE.js} +1 -1
- package/dist/chunk-4I7YN6YY.js +3 -0
- package/dist/chunk-4IEQNX7F.js +2 -0
- package/dist/{chunk-SYJXTB4J.js → chunk-4LPX2OLV.js} +1 -1
- package/dist/chunk-4LTHDJ3D.js +2 -0
- package/dist/chunk-4QTH7VYE.js +2 -0
- package/dist/chunk-54XA5MZH.js +2 -0
- package/dist/chunk-57MDWTON.js +2 -0
- package/dist/{chunk-3C32LVLX.js → chunk-5BUIIFLC.js} +1 -1
- package/dist/chunk-5D7ENQTQ.js +2 -0
- package/dist/chunk-63EKRZKI.js +2 -0
- package/dist/{chunk-EHN5HTUD.js → chunk-65VANXOF.js} +51 -51
- package/dist/chunk-672CQECV.js +47 -0
- package/dist/chunk-6LIC2R22.js +3 -0
- package/dist/chunk-6NFOH4AC.js +4 -0
- package/dist/chunk-6NWT2TEJ.js +2 -0
- package/dist/chunk-6PIIUAZF.js +3 -0
- package/dist/{chunk-MBJHS653.js → chunk-6U7ID777.js} +1 -1
- package/dist/chunk-6UVIY56J.js +2 -0
- package/dist/chunk-72KYMWQ5.js +2 -0
- package/dist/chunk-72RC7JSA.js +21 -0
- package/dist/chunk-74W4AOT2.js +2 -0
- package/dist/chunk-77ZZQJLX.js +2 -0
- package/dist/chunk-7DFBOVUB.js +2 -0
- package/dist/chunk-7EXDYXXD.js +2 -0
- package/dist/chunk-7HO4NX5W.js +1 -0
- package/dist/chunk-7KX2BHKG.js +2 -0
- package/dist/chunk-7LKCWO2R.js +11 -0
- package/dist/{chunk-ULGZPRKU.js → chunk-7NCJMWFX.js} +1 -1
- package/dist/chunk-7RPKHKA3.js +2 -0
- package/dist/chunk-7RWP4Y3H.js +2 -0
- package/dist/chunk-7V4BQSSV.js +2 -0
- package/dist/chunk-7XBNMOH4.js +6 -0
- package/dist/chunk-A6TJOZ24.js +2 -0
- package/dist/chunk-A7RJQJNT.js +2 -0
- package/dist/chunk-AA674WLL.js +2 -0
- package/dist/chunk-AIXJYMSP.js +9 -0
- package/dist/chunk-AJQZ3ST5.js +8 -0
- package/dist/chunk-AQ2OG2EF.js +2 -0
- package/dist/chunk-AUJSC7PU.js +4 -0
- package/dist/chunk-AVI5H4UM.js +13 -0
- package/dist/chunk-AZLNLHUA.js +4 -0
- package/dist/chunk-B2HXPGIZ.js +26 -0
- package/dist/chunk-B7ZX5HEN.js +8 -0
- package/dist/{chunk-XQQHSC7G.js → chunk-BJJUKB5K.js} +1 -1
- package/dist/{chunk-66MOZKD2.js → chunk-BSRSXYDZ.js} +1 -1
- package/dist/{chunk-TONFENRW.js → chunk-BVO4C5F2.js} +1 -1
- package/dist/chunk-BWXLZS5O.js +2 -0
- package/dist/chunk-BY65QAAN.js +4 -0
- package/dist/chunk-BZVNI44O.js +6 -0
- package/dist/chunk-C5Z7MQE6.js +2 -0
- package/dist/chunk-C6HI6Y3S.js +2 -0
- package/dist/chunk-CB4ARIHR.js +2 -0
- package/dist/chunk-CPBBYNL7.js +4 -0
- package/dist/{chunk-GFNCGN5V.js → chunk-D4FFXCX6.js} +2 -2
- package/dist/chunk-D756UWY2.js +6 -0
- package/dist/chunk-DBMW3VUN.js +4 -0
- package/dist/chunk-DD5TULWQ.js +34 -0
- package/dist/{chunk-SY4T44VC.js → chunk-DDJNYQBH.js} +1 -1
- package/dist/{chunk-KJIDMW6N.js → chunk-DHQ4SQWA.js} +1 -1
- package/dist/chunk-DNGOT65K.js +3 -0
- package/dist/chunk-DPGOAFKF.js +2 -0
- package/dist/chunk-DREQ3RAA.js +2 -0
- package/dist/chunk-DTUPEKEO.js +2 -0
- package/dist/chunk-E6KSRQXL.js +8 -0
- package/dist/chunk-EF47KRUK.js +2 -0
- package/dist/chunk-ENL4XTQ2.js +2 -0
- package/dist/chunk-EXFDIVNI.js +9 -0
- package/dist/chunk-EZN7CF45.js +4 -0
- package/dist/chunk-F3U6T4YD.js +22 -0
- package/dist/{chunk-DHJSM5DT.js → chunk-FCD3NYOM.js} +1 -1
- package/dist/chunk-FFL55I2M.js +2 -0
- package/dist/chunk-FIP5L6LV.js +9 -0
- package/dist/chunk-FOJHSG5M.js +6 -0
- package/dist/chunk-FSYOTRMC.js +2 -0
- package/dist/chunk-GFLB2SHW.js +2 -0
- package/dist/chunk-GMTHZUZ3.js +2 -0
- package/dist/chunk-GRURFGBP.js +2 -0
- package/dist/chunk-GZFLJORM.js +2 -0
- package/dist/{chunk-PXHN7SFG.js → chunk-H3HHSTEK.js} +4 -4
- package/dist/chunk-HAW5WEKT.js +13 -0
- package/dist/chunk-HFJSP4KD.js +2 -0
- package/dist/chunk-HHW6MRU3.js +6 -0
- package/dist/chunk-HIUAUZNL.js +2 -0
- package/dist/chunk-HJLMH7ZM.js +2 -0
- package/dist/{chunk-5GUD3CIH.js → chunk-HQ2E2XCU.js} +1 -1
- package/dist/chunk-I2KOGINW.js +7 -0
- package/dist/chunk-I2MC6VVX.js +2 -0
- package/dist/chunk-I5NSJBOZ.js +2 -0
- package/dist/chunk-I6OQISK4.js +2 -0
- package/dist/chunk-IBBD36FQ.js +2 -0
- package/dist/chunk-IINZZ4BZ.js +2 -0
- package/dist/{chunk-UYI4WPNQ.js → chunk-IMDMRJQ6.js} +2 -2
- package/dist/chunk-IXW7FOGX.js +2 -0
- package/dist/chunk-IZ65ZPWY.js +3 -0
- package/dist/chunk-JD52IXON.js +9 -0
- package/dist/chunk-JGRXMTME.js +15 -0
- package/dist/{chunk-NBXYL2JT.js → chunk-JIRNI5TB.js} +7 -7
- package/dist/chunk-JNSWKGTB.js +2 -0
- package/dist/chunk-JPYW6U4D.js +2 -0
- package/dist/chunk-JQSLUGD4.js +3 -0
- package/dist/chunk-K45BKGB5.js +8 -0
- package/dist/chunk-KF4DKXSS.js +2 -0
- package/dist/chunk-KGNE5CIM.js +2 -0
- package/dist/chunk-KM3YCIDV.js +3 -0
- package/dist/chunk-KU3YHPWZ.js +2 -0
- package/dist/chunk-L4UVUFL6.js +3 -0
- package/dist/chunk-LCSJ7GOG.js +2 -0
- package/dist/chunk-LKQFG4RW.js +5 -0
- package/dist/chunk-LNNWCBPQ.js +2 -0
- package/dist/chunk-LRS5MGBY.js +3 -0
- package/dist/chunk-LRXBJTD4.js +4 -0
- package/dist/chunk-LSDJOVWW.js +6 -0
- package/dist/chunk-LWJRSUE2.js +2 -0
- package/dist/chunk-LX2I4JEH.js +2 -0
- package/dist/{chunk-K6VDRR3H.js → chunk-M6MBMRFR.js} +1 -1
- package/dist/chunk-MGNRNLBE.js +2 -0
- package/dist/chunk-MII3JOO3.js +4 -0
- package/dist/chunk-MNBGG4H3.js +16 -0
- package/dist/chunk-MYVKUJGS.js +2 -0
- package/dist/chunk-MYZHOBS4.js +2 -0
- package/dist/chunk-MZOIHUVX.js +27 -0
- package/dist/{chunk-OFRYEWZE.js → chunk-N3TCNZSX.js} +1 -1
- package/dist/chunk-NC7D7GOM.js +21 -0
- package/dist/{chunk-CLQP3DHT.js → chunk-NDEI7R4K.js} +1 -1
- package/dist/chunk-NFRA64NU.js +10 -0
- package/dist/chunk-NLZZLANH.js +4 -0
- package/dist/{chunk-5HOHXV2K.js → chunk-NQTYWHPB.js} +1 -1
- package/dist/chunk-NWBLYMH7.js +3 -0
- package/dist/chunk-NWD54VV5.js +2 -0
- package/dist/chunk-NXRF7FFS.js +2 -0
- package/dist/chunk-O3HHTKZ5.js +6 -0
- package/dist/{chunk-FPFS6OSR.js → chunk-OAKYUBD3.js} +1 -1
- package/dist/chunk-OEWYXCTA.js +7 -0
- package/dist/{chunk-BASTDR3M.js → chunk-OF7WPCTQ.js} +1 -1
- package/dist/chunk-OFSDB7B4.js +3 -0
- package/dist/chunk-OJ33Q6DU.js +2 -0
- package/dist/chunk-OQ5G773E.js +2 -0
- package/dist/chunk-OVNRRI4E.js +2 -0
- package/dist/{chunk-RAARDC2O.js → chunk-OZNBTSW5.js} +1 -1
- package/dist/chunk-P2ZQDQDB.js +2 -0
- package/dist/chunk-P7MSVLAH.js +6 -0
- package/dist/chunk-PUVMC4PX.js +26 -0
- package/dist/{chunk-SEEEGDVK.js → chunk-PZA3BSOE.js} +1 -1
- package/dist/chunk-Q3C6NDGI.js +2 -0
- package/dist/chunk-QCKA665H.js +2 -0
- package/dist/chunk-QDFY5GGO.js +5 -0
- package/dist/chunk-QHRUBG7J.js +2 -0
- package/dist/chunk-QI5RZ7LL.js +2 -0
- package/dist/chunk-QNLVC5ZB.js +2 -0
- package/dist/{chunk-DSKJ6J7Y.js → chunk-QQ4TKLWP.js} +1 -1
- package/dist/chunk-QS5ZJFGF.js +4 -0
- package/dist/chunk-QTZBVDPR.js +12 -0
- package/dist/chunk-QXQ7KVEN.js +2 -0
- package/dist/chunk-R4JUKTDO.js +2 -0
- package/dist/chunk-R7KXAISS.js +12 -0
- package/dist/chunk-RDP7GWSY.js +2 -0
- package/dist/chunk-REKHAN53.js +5 -0
- package/dist/{chunk-5RHR4DMF.js → chunk-RFEON5GN.js} +1 -1
- package/dist/chunk-RFIIM33J.js +2 -0
- package/dist/chunk-RG372DON.js +6 -0
- package/dist/chunk-RPRXRKKR.js +2 -0
- package/dist/chunk-RTVWQK7I.js +2 -0
- package/dist/chunk-RW3Z2HMB.js +7 -0
- package/dist/chunk-RX47NRSM.js +2 -0
- package/dist/chunk-RX6776AI.js +5 -0
- package/dist/chunk-S53AQU7R.js +6 -0
- package/dist/{chunk-HJX5PQRD.js → chunk-SA6IKFFD.js} +1 -1
- package/dist/{chunk-2MEQTHNI.js → chunk-SLKYD44Y.js} +1 -1
- package/dist/chunk-SMTBOSEJ.js +2 -0
- package/dist/chunk-SMXABALN.js +2 -0
- package/dist/chunk-SONMD3W5.js +5 -0
- package/dist/chunk-SWMTXMKB.js +2 -0
- package/dist/chunk-SXRHKXSE.js +2 -0
- package/dist/chunk-T3HEJASG.js +5 -0
- package/dist/chunk-T4AVLJCW.js +6 -0
- package/dist/{chunk-J6TBTWW7.js → chunk-T6K2MEWP.js} +1 -1
- package/dist/{chunk-D6BULK7E.js → chunk-T7H4LBFK.js} +1 -1
- package/dist/chunk-TNORODUF.js +2 -0
- package/dist/chunk-TW63WWEN.js +2 -0
- package/dist/chunk-UALJTPSA.js +18 -0
- package/dist/chunk-UAWWLLTI.js +2 -0
- package/dist/chunk-UEE3RZN4.js +14 -0
- package/dist/chunk-UTM7D4PI.js +2 -0
- package/dist/chunk-UUJIGOEO.js +2 -0
- package/dist/chunk-UYDHOHSZ.js +2 -0
- package/dist/chunk-V5JGXOV7.js +2 -0
- package/dist/chunk-V7S6S5W3.js +2 -0
- package/dist/{chunk-HBSYBL6J.js → chunk-VG44B5JD.js} +1 -1
- package/dist/chunk-VJGWVBZR.js +1 -0
- package/dist/chunk-VLDCHFXF.js +2 -0
- package/dist/chunk-VO66KP2W.js +2 -0
- package/dist/{chunk-D4XR7EEQ.js → chunk-VQLH63X7.js} +14 -12
- package/dist/chunk-VRIZDOO5.js +2 -0
- package/dist/chunk-VYHT2IET.js +1397 -0
- package/dist/chunk-VZJ6LUXX.js +2 -0
- package/dist/chunk-W3OVSDBN.js +29 -0
- package/dist/chunk-W7FLXW6Q.js +5 -0
- package/dist/{chunk-IEW7AW64.js → chunk-WEM3MOAL.js} +1 -1
- package/dist/chunk-WI7K6VKQ.js +2 -0
- package/dist/chunk-WMGKUERB.js +6 -0
- package/dist/{chunk-DFS4RMVP.js → chunk-WN5VKKJ3.js} +1 -1
- package/dist/chunk-WOSANGV6.js +5 -0
- package/dist/chunk-WYSZ6TPW.js +15 -0
- package/dist/chunk-XB6BJPDL.js +2 -0
- package/dist/{chunk-5ESGUPSR.js → chunk-XBEYWXPV.js} +1 -1
- package/dist/chunk-XIPKSXRQ.js +16 -0
- package/dist/chunk-XJ7HCXKW.js +2 -0
- package/dist/chunk-XMPTFXPW.js +5 -0
- package/dist/chunk-XZYA7DNH.js +2 -0
- package/dist/chunk-Y4T4SLDO.js +2 -0
- package/dist/chunk-Y6Y6RAY4.js +2 -0
- package/dist/chunk-YDPTSDIJ.js +2 -0
- package/dist/chunk-YDSGXB25.js +2 -0
- package/dist/chunk-YIKF4ERQ.js +375 -0
- package/dist/chunk-Z55KBMYV.js +2 -0
- package/dist/chunk-ZCRZFAOT.js +2 -0
- package/dist/chunk-ZFM77AQU.js +2 -0
- package/dist/{chunk-Q6F23V7L.js → chunk-ZFMRQ57Y.js} +1 -1
- package/dist/chunk-ZHWU6L2G.js +5 -0
- package/dist/chunk-ZTHYAHDN.js +17 -0
- package/dist/chunk-ZZP5SHUV.js +3 -0
- package/dist/committer-JGY66PFM.js +2 -0
- package/dist/config-5ZOALGKE.js +2 -0
- package/dist/controller-client-PB3AZAGG.js +2 -0
- package/dist/cover-cmd-UA2SVIZZ.js +2 -0
- package/dist/{credentials-PSQWWFGD.js → credentials-MRG452Y6.js} +1 -1
- package/dist/{deps-bundle-PPOQHJTB.js → deps-bundle-FWINW4XM.js} +1 -1
- package/dist/{deps-resolve-AX6ZAKLH.js → deps-resolve-IET4KIBO.js} +1 -1
- package/dist/descriptor-7T32VRMB.js +2 -0
- package/dist/design-chat-MM5PJD2N.js +2 -0
- package/dist/design-committer-TRYP3LOZ.js +2 -0
- package/dist/design-headless-FZONCKHW.js +2 -0
- package/dist/design-remote-SPVRIY2H.js +3 -0
- package/dist/device-env-LXJ65AVF.js +2 -0
- package/dist/dispatch-DVQ3H7EJ.js +2 -0
- package/dist/doctor-VAX2BWQF.js +2 -0
- package/dist/docx-convert-6IZO5P5K.js +2 -0
- package/dist/{dossier-7HVC6BNK.js → dossier-NROC2MCY.js} +1 -1
- package/dist/evidence-LVVK7ROT.js +2 -0
- package/dist/evidence-presentation-YYTIDCBS.js +2 -0
- package/dist/evolve-cmd-AGRKG7T3.js +2 -0
- package/dist/evolve-remote-BGHULJTL.js +2 -0
- package/dist/{exit-manager-ZLDO54S4.js → exit-manager-EDHCETUN.js} +1 -1
- package/dist/explain-DGJ5T6V5.js +2 -0
- package/dist/explain-cmd-VYAANFFZ.js +4 -0
- package/dist/explain-cmd-WOBGS6KX.js +12 -0
- package/dist/explore-LOKNOVNP.js +2 -0
- package/dist/explore-context-tty-JTZVZFOE.js +2 -0
- package/dist/explore-entry-5OGNLFAU.js +6 -0
- package/dist/explore-live-2XZHUYFS.js +5 -0
- package/dist/explore-run-tty-LGTIK2NA.js +5 -0
- package/dist/extract-bind-NM2BBK4I.js +14 -0
- package/dist/extract-chat-HLQMJJIC.js +2 -0
- package/dist/extract-cmd-T2TSAC3N.js +6 -0
- package/dist/extract-headless-OQTQ3FJK.js +2 -0
- package/dist/feeder-NY45UFJK.js +2 -0
- package/dist/folder-flags-WXUR6OPJ.js +2 -0
- package/dist/gaps-cmd-PTSKPTF7.js +3 -0
- package/dist/gate-P57VP4E5.js +2 -0
- package/dist/gate-WISOUTHQ.js +2 -0
- package/dist/{generate-headless-TEDHS3F2.js → generate-headless-JYZP6VXZ.js} +3 -3
- package/dist/headless-io-FFM5T6KL.js +2 -0
- package/dist/hold-passthrough-IOWPVB4W.js +2 -0
- package/dist/identity-HL5CJJXR.js +2 -0
- package/dist/index.js +194 -175
- package/dist/ingest-PDGS5ZTL.js +2 -0
- package/dist/ingest-cmd-LHCBMO4Z.js +8 -0
- package/dist/ingest-remote-D5TO5JQP.js +2 -0
- package/dist/ink-screen-RZ7QDIUI.js +2 -0
- package/dist/install-Z6K2D2VY.js +2 -0
- package/dist/interactive-bind-5EJQUGKI.js +26 -0
- package/dist/interactive-remote-D77ULJGL.js +65 -0
- package/dist/interrupt-guard-QETBPINI.js +2 -0
- package/dist/lane-AQYRIW24.js +2 -0
- package/dist/lattice-auth-74XGF77Y.js +2 -0
- package/dist/lifecycle-cmd-7SM6UCMH.js +2 -0
- package/dist/list-cmd-Z6FZXMFU.js +3 -0
- package/dist/list-commands-CZYZ7GIG.js +2 -0
- package/dist/list-remote-WOPOC6KK.js +15 -0
- package/dist/locks-cmd-JJ2QNTNY.js +2 -0
- package/dist/logical-ids-RXAQJZ3T.js +2 -0
- package/dist/login-flow-2FZEOVHM.js +2 -0
- package/dist/maintenance-cmd-VRTGZVRE.js +2 -0
- package/dist/mobile-prompts-KNAHU64X.js +2 -0
- package/dist/{next-KZXH4UA4.js → next-O6SUSX3R.js} +1 -1
- package/dist/{objective-variable-gate-JALOH6SL.js → objective-variable-gate-3Z7DNVVC.js} +1 -1
- package/dist/onboarding-LGT6PMDZ.js +5 -0
- package/dist/open-provider-OZAG6WZS.js +2 -0
- package/dist/{paths-JCYX6UWL.js → paths-UMIX3RJF.js} +1 -1
- package/dist/pdf-convert-447ACUB3.js +2 -0
- package/dist/persist-recorded-session-BX7II5P7.js +3 -0
- package/dist/phase-seed-LCJ4WSYV.js +2 -0
- package/dist/pipeline-IXVTVRS5.js +2 -0
- package/dist/prepare-target-ULMKVKMC.js +2 -0
- package/dist/pull-cmd-6AL2WYHB.js +2 -0
- package/dist/pull-route-TTVARJMV.js +2 -0
- package/dist/readmodel-INMP6MNW.js +2 -0
- package/dist/real-device-run-2LFS5WE2.js +2 -0
- package/dist/reconcile-cmd-R6H37SQR.js +5 -0
- package/dist/reconcile-deps-TWJ3FTSU.js +2 -0
- package/dist/reconcile-remote-GWDV5CUT.js +13 -0
- package/dist/recording-banner-ACC67Q2U.js +2 -0
- package/dist/registry-6IJYQXQC.js +2 -0
- package/dist/remote-entry-YL7O2NJQ.js +2 -0
- package/dist/remote-mode-7G6PLJCW.js +4 -0
- package/dist/remote-words-45USLRVN.js +2 -0
- package/dist/require-project-folder-A3UDRELU.js +2 -0
- package/dist/resolve-run-intent-ZGPSUBXV.js +2 -0
- package/dist/resolver-IPM6R7U4.js +2 -0
- package/dist/revert-FHOBLZWF.js +2 -0
- package/dist/review-cmd-NNT5C5RZ.js +5 -0
- package/dist/run-5RQUCNYP.js +2 -0
- package/dist/run-PC5YO4AS.js +2 -0
- package/dist/run-channel-63SVP5OI.js +2 -0
- package/dist/run-remote-3AYYVPKX.js +2 -0
- package/dist/run-startup-gate-NKRMKYBB.js +2 -0
- package/dist/run-test-md-HE6DUWQR.js +17 -0
- package/dist/scrollback-GGNBDFQV.js +2 -0
- package/dist/session-target-DD53UXO7.js +2 -0
- package/dist/session-worker.js +12 -0
- package/dist/sessions-CFV7FOIT.js +2 -0
- package/dist/sessions-cmd-GYMETJHG.js +26 -0
- package/dist/sessions-remote-GI7GOBMH.js +3 -0
- package/dist/shell-arg-FN3MT5U7.js +2 -0
- package/dist/{skill-installer-T2IOCPET.js → skill-installer-3QAVQGDH.js} +1 -1
- package/dist/spawner-C7NLLM4F.js +2 -0
- package/dist/store-X6XPFSKF.js +2 -0
- package/dist/store-choice-RT73HAI7.js +2 -0
- package/dist/store-guard-SNWKLHQV.js +2 -0
- package/dist/store-id-YZ5WKJ25.js +2 -0
- package/dist/store-site-KA2DNBGY.js +2 -0
- package/dist/stream-warnings-GEQKKJU7.js +2 -0
- package/dist/structured-answers-EQ2AP3F7.js +2 -0
- package/dist/sync-cmd-NBPPDG3B.js +2 -0
- package/dist/sync-setup-5NUCH6N3.js +2 -0
- package/dist/{sync-setup-ui-RC727VK6.js → sync-setup-ui-XITPGSO4.js} +2 -2
- package/dist/tcg-generate-Z23CUISY.js +2 -0
- package/dist/test-definition-VRI4YIYL.js +2 -0
- package/dist/testmd-actions-GH5BW5V5.js +2 -0
- package/dist/testmd-sync-ACKCIOL3.js +2 -0
- package/dist/tms-client-NXAB6VJD.js +2 -0
- package/dist/token-refresh-4UCYAG6A.js +2 -0
- package/dist/trust-gate-AT2XBWN4.js +2 -0
- package/dist/turn-preflight-LHYLRL7G.js +2 -0
- package/dist/ui-SNV3FD2G.js +4 -0
- package/dist/use-case-ref-NE4X4MZN.js +2 -0
- package/dist/validate-basic-RE2WLIGQ.js +2 -0
- package/dist/{variable-receipt-F55CSW5Z.js → variable-receipt-BXSZO36E.js} +1 -1
- package/dist/verdicts-XK3GAUX3.js +2 -0
- package/dist/version-check-4FJVZP3K.js +2 -0
- package/dist/{view-cmd-ELDKYRMZ.js → view-cmd-N47BQZPD.js} +4 -3
- package/dist/walk-session-DA7QWXSW.js +2 -0
- package/dist/with-telemetry-7V4LY2BG.js +2 -0
- package/package.json +11 -11
- package/dist/ChatSurface-GBZX4LWL.js +0 -8
- package/dist/ChromeProfilePicker-UONX2UVC.js +0 -2
- package/dist/CliFeedbackPrompt-6BJCNRNG.js +0 -2
- package/dist/CliUploadProgress-K4Z22DSY.js +0 -2
- package/dist/ConfigView-BB22G7JO.js +0 -2
- package/dist/EvidenceViewOffer-25IQF3TX.js +0 -2
- package/dist/FolderPicker-65JFR2NW.js +0 -2
- package/dist/InfoBox-OU5PLRIL.js +0 -2
- package/dist/LinksBox-DH7TSUXW.js +0 -2
- package/dist/ProfilesView-MGJKBOF5.js +0 -2
- package/dist/ProjectPicker-YFV6K77F.js +0 -2
- package/dist/SaveSessionPrompt-64QKQB6B.js +0 -2
- package/dist/ScrollbackTap-QHJOFYMC.js +0 -2
- package/dist/SingleShotApp-VYKUCRVW.js +0 -2
- package/dist/SummaryBox-DGS3LVRF.js +0 -2
- package/dist/TestMdRunView-LKAITAA4.js +0 -2
- package/dist/TestrunEvidenceTable-PHBAB4XQ.js +0 -2
- package/dist/WhoamiView-6HWPYN6Y.js +0 -2
- package/dist/app-client-ZCCNE3RV.js +0 -2
- package/dist/app-download-SQ2LYYL7.js +0 -2
- package/dist/auth-NWBIFCB7.js +0 -2
- package/dist/bind-S3IQTPNN.js +0 -15
- package/dist/bootstrap-RCV7PNMQ.js +0 -2
- package/dist/bridge-O7ENTV4K.js +0 -2
- package/dist/build-JIKYOZUH.js +0 -2
- package/dist/chat-committer-6D7AQI6Z.js +0 -2
- package/dist/chat-controller-UJQ6Z4RE.js +0 -2
- package/dist/chunk-2A7OQRAD.js +0 -17
- package/dist/chunk-2FH4HJYB.js +0 -5
- package/dist/chunk-2KVECC36.js +0 -2
- package/dist/chunk-2YEHV2CX.js +0 -2
- package/dist/chunk-3OKX64UR.js +0 -2
- package/dist/chunk-3UI5VTQS.js +0 -4
- package/dist/chunk-3UMVRJX3.js +0 -6
- package/dist/chunk-3VAU3PNU.js +0 -2
- package/dist/chunk-5EOX4MEY.js +0 -2
- package/dist/chunk-5LJRZI7S.js +0 -6
- package/dist/chunk-5UHY3PTQ.js +0 -3
- package/dist/chunk-5ZFOKYFB.js +0 -5
- package/dist/chunk-63DYVWNX.js +0 -2
- package/dist/chunk-6YZ3VP3E.js +0 -2
- package/dist/chunk-7KRY26OF.js +0 -4
- package/dist/chunk-7N6OCHPC.js +0 -7
- package/dist/chunk-A2SQD2AY.js +0 -4
- package/dist/chunk-AACQE24F.js +0 -2
- package/dist/chunk-AGDPEZXT.js +0 -4
- package/dist/chunk-AIK7BAME.js +0 -8
- package/dist/chunk-ATYXPCM6.js +0 -6
- package/dist/chunk-AXTPNZPX.js +0 -2
- package/dist/chunk-BB2W35TW.js +0 -2
- package/dist/chunk-BKM2LWU2.js +0 -3
- package/dist/chunk-BL5QHONU.js +0 -2
- package/dist/chunk-C44QQJR4.js +0 -239
- package/dist/chunk-C7NWWGLT.js +0 -6
- package/dist/chunk-CAJZQQ3G.js +0 -3
- package/dist/chunk-CSVPZ33X.js +0 -2
- package/dist/chunk-CXF6AZWY.js +0 -2
- package/dist/chunk-D6E6KRVX.js +0 -2
- package/dist/chunk-D7WG7SRA.js +0 -2
- package/dist/chunk-DDHGEJJP.js +0 -2
- package/dist/chunk-DUYRCVI5.js +0 -2
- package/dist/chunk-DWHF5HUD.js +0 -2
- package/dist/chunk-EM3PU2YW.js +0 -2
- package/dist/chunk-EVFFDODK.js +0 -5
- package/dist/chunk-EYOCNMUM.js +0 -2
- package/dist/chunk-F2OBORCG.js +0 -2
- package/dist/chunk-FMBPUXWL.js +0 -8
- package/dist/chunk-FORNRNHU.js +0 -2
- package/dist/chunk-FQJOWUEN.js +0 -2
- package/dist/chunk-FQNQVC5O.js +0 -5
- package/dist/chunk-FY7TCYPK.js +0 -6
- package/dist/chunk-HJGVM6TS.js +0 -370
- package/dist/chunk-HPHETGRE.js +0 -2
- package/dist/chunk-I7TIGB7K.js +0 -2
- package/dist/chunk-IGHK2ENL.js +0 -2
- package/dist/chunk-IICT4VOU.js +0 -2
- package/dist/chunk-IIDBLJ5A.js +0 -18
- package/dist/chunk-JFZA4UON.js +0 -9
- package/dist/chunk-K2UJYY2U.js +0 -2
- package/dist/chunk-KBM3XHAM.js +0 -2
- package/dist/chunk-KDNNMU7Q.js +0 -4
- package/dist/chunk-KJQNAOOE.js +0 -6
- package/dist/chunk-LF42V6P6.js +0 -7
- package/dist/chunk-LNFU4JZ7.js +0 -2
- package/dist/chunk-LNSBC32V.js +0 -2
- package/dist/chunk-LSDWPG6C.js +0 -2
- package/dist/chunk-MKMJOMLX.js +0 -8
- package/dist/chunk-MKQ7ZRDW.js +0 -2
- package/dist/chunk-MSGW4JDG.js +0 -2
- package/dist/chunk-MV3Q335C.js +0 -7
- package/dist/chunk-MWIE6LOZ.js +0 -4
- package/dist/chunk-MZ7W4WLF.js +0 -4
- package/dist/chunk-NIFJJX6N.js +0 -12
- package/dist/chunk-NJ4BXZBX.js +0 -2
- package/dist/chunk-NLCCBXXV.js +0 -2
- package/dist/chunk-ODU2JSMA.js +0 -8
- package/dist/chunk-OYKRCDT4.js +0 -15
- package/dist/chunk-Q2F5QB2W.js +0 -2
- package/dist/chunk-Q4YYAN6E.js +0 -2
- package/dist/chunk-Q6AHSGOE.js +0 -5
- package/dist/chunk-QAG67DUT.js +0 -2
- package/dist/chunk-QGXVQIN5.js +0 -27
- package/dist/chunk-QQCEP3QP.js +0 -2
- package/dist/chunk-QU7P7B3W.js +0 -4
- package/dist/chunk-RAPV3BTA.js +0 -98
- package/dist/chunk-RD72POF2.js +0 -2
- package/dist/chunk-RDHWNSDP.js +0 -7
- package/dist/chunk-RGRFL7XG.js +0 -29
- package/dist/chunk-RKXHVP2Z.js +0 -2
- package/dist/chunk-RMVASIVL.js +0 -35
- package/dist/chunk-RRY5IXOB.js +0 -2
- package/dist/chunk-RSSOJ3L2.js +0 -21
- package/dist/chunk-SB2SKN34.js +0 -2
- package/dist/chunk-SFFDVF3J.js +0 -9
- package/dist/chunk-T2ONUKTL.js +0 -5
- package/dist/chunk-TAOHYWEO.js +0 -2
- package/dist/chunk-U6OTFMIT.js +0 -4
- package/dist/chunk-UD7KKHPW.js +0 -5
- package/dist/chunk-UF4MU2AZ.js +0 -22
- package/dist/chunk-UQSVO7TY.js +0 -9
- package/dist/chunk-URWWROLS.js +0 -9
- package/dist/chunk-V4B5QA3U.js +0 -4
- package/dist/chunk-VACHFCNC.js +0 -21
- package/dist/chunk-VAN7ECN6.js +0 -2
- package/dist/chunk-VIO7CCFW.js +0 -5
- package/dist/chunk-VOYMN2WQ.js +0 -5
- package/dist/chunk-VVOKM2VO.js +0 -2
- package/dist/chunk-W5TTF7GB.js +0 -6
- package/dist/chunk-WESMQEPO.js +0 -2
- package/dist/chunk-WICJY6KL.js +0 -6
- package/dist/chunk-WJR2FU7S.js +0 -16
- package/dist/chunk-WVHMPIDQ.js +0 -2
- package/dist/chunk-X4NUVVCJ.js +0 -26
- package/dist/chunk-XLSOQLVT.js +0 -2
- package/dist/chunk-YCCUBQY4.js +0 -2
- package/dist/chunk-YFQGOOF7.js +0 -2
- package/dist/chunk-YI3H2UIB.js +0 -2
- package/dist/chunk-YKTYVJBN.js +0 -3
- package/dist/chunk-YLQHY4A7.js +0 -2
- package/dist/chunk-ZIHG6EKH.js +0 -2
- package/dist/chunk-ZKSN2SJ7.js +0 -2
- package/dist/chunk-ZLWURCJ7.js +0 -2
- package/dist/committer-2QPBANRD.js +0 -2
- package/dist/config-7E4NS553.js +0 -2
- package/dist/controller-client-ZF5IXRUV.js +0 -2
- package/dist/cover-cmd-6KZX46S2.js +0 -3
- package/dist/descriptor-3JJUOHBM.js +0 -2
- package/dist/design-committer-D44GSUXY.js +0 -2
- package/dist/device-env-TZQDB5T3.js +0 -2
- package/dist/dispatch-KMWEDMKE.js +0 -2
- package/dist/doctor-XDF3MA4W.js +0 -2
- package/dist/docx-convert-SQRTF7XS.js +0 -2
- package/dist/evidence-EUIDOVOR.js +0 -2
- package/dist/evidence-presentation-XF23B7F2.js +0 -2
- package/dist/evolve-cmd-QVTGTCJ5.js +0 -2
- package/dist/explain-NEFBUX5G.js +0 -2
- package/dist/explain-cmd-36SVSHU7.js +0 -9
- package/dist/explain-cmd-JAOHSI4F.js +0 -3
- package/dist/extract-bind-PLMSZKLZ.js +0 -14
- package/dist/extract-cmd-RJBHPPF3.js +0 -5
- package/dist/feeder-66TUPB2R.js +0 -2
- package/dist/gaps-cmd-3WZPDDYS.js +0 -3
- package/dist/gate-OYRDJMF6.js +0 -2
- package/dist/headless-io-75HUMWZB.js +0 -2
- package/dist/identity-ADZ4PAJF.js +0 -2
- package/dist/ingest-OSNNM3DH.js +0 -2
- package/dist/ingest-cmd-JDIOPJBN.js +0 -2
- package/dist/install-Y3VKFBK3.js +0 -2
- package/dist/interactive-bind-XUMKEGAN.js +0 -26
- package/dist/interrupt-guard-UREUWNRL.js +0 -2
- package/dist/lifecycle-cmd-FBDRFIOE.js +0 -2
- package/dist/list-cmd-TFUACRAM.js +0 -3
- package/dist/list-commands-OHIQFJGQ.js +0 -2
- package/dist/locks-cmd-67OHQZNV.js +0 -2
- package/dist/logical-ids-GLVM2SVR.js +0 -2
- package/dist/login-flow-OHNKSVYZ.js +0 -2
- package/dist/maintenance-cmd-7OSUIDL4.js +0 -2
- package/dist/mobile-prompts-DEVUZRG3.js +0 -2
- package/dist/open-provider-746LLSEO.js +0 -2
- package/dist/pdf-convert-RLXSXFWN.js +0 -2
- package/dist/persist-recorded-session-GPP6UKN6.js +0 -3
- package/dist/phase-seed-MKHEWUN6.js +0 -2
- package/dist/pipeline-QPTPZVUJ.js +0 -2
- package/dist/prepare-target-N7QRNYOS.js +0 -2
- package/dist/readmodel-FVLRQWZ7.js +0 -2
- package/dist/reconcile-cmd-SMGLHMLF.js +0 -2
- package/dist/reconcile-deps-DVIJK5UZ.js +0 -4
- package/dist/reconcile-engine-KL2J5SNQ.js +0 -2
- package/dist/recording-banner-TCFFB6KE.js +0 -2
- package/dist/records-LMCVKPE5.js +0 -2
- package/dist/registry-BFFA4YJK.js +0 -2
- package/dist/require-project-folder-2224ZMJ5.js +0 -2
- package/dist/resolve-run-intent-HFXGEOYK.js +0 -2
- package/dist/resolver-GJR2Z7JY.js +0 -2
- package/dist/revert-NOUECRW4.js +0 -2
- package/dist/review-cmd-CQE6SBZA.js +0 -5
- package/dist/run-BXKWDJFJ.js +0 -2
- package/dist/run-HSP2MZPU.js +0 -2
- package/dist/run-channel-RGH4WIQX.js +0 -2
- package/dist/run-test-md-2ELPAASM.js +0 -17
- package/dist/scrollback-JLPJR25X.js +0 -2
- package/dist/session-items-2ATN7VXG.js +0 -2
- package/dist/session-target-UWROGOCY.js +0 -2
- package/dist/sessions-NH7WQWMX.js +0 -2
- package/dist/sessions-cmd-IV25N2L7.js +0 -25
- package/dist/spawner-HQM2757J.js +0 -2
- package/dist/store-guard-NAW26EEQ.js +0 -2
- package/dist/store-id-EOSGEKVK.js +0 -2
- package/dist/structured-answers-ZI2B6JJE.js +0 -2
- package/dist/sync-cmd-Q6ZYEVWI.js +0 -2
- package/dist/sync-setup-CA362C5S.js +0 -2
- package/dist/tcg-generate-CDB2N5LD.js +0 -2
- package/dist/testmd-actions-BDWDE2TG.js +0 -2
- package/dist/testmd-sync-EPTUVJYJ.js +0 -2
- package/dist/tms-client-KU6HCA23.js +0 -2
- package/dist/token-refresh-TKBOHXSD.js +0 -2
- package/dist/trust-gate-EX7R2P4Y.js +0 -2
- package/dist/turn-preflight-JGYT7LXP.js +0 -2
- package/dist/ui-JEJGTURD.js +0 -4
- package/dist/validate-basic-V7R4RH5M.js +0 -2
- package/dist/verdicts-7IUZFXB4.js +0 -2
- package/dist/version-check-PUUSB7AY.js +0 -2
- package/dist/walk-session-EGIMA4VG.js +0 -2
- package/dist/with-telemetry-LRWWBISP.js +0 -2
- /package/dist/{chunk-BKHXPBWN.js → chunk-2RUSXQ3O.js} +0 -0
- /package/dist/{chunk-6J5T5FEY.js → chunk-3AGP2BVN.js} +0 -0
- /package/dist/{chunk-CH273NAE.js → chunk-73Y6T2UK.js} +0 -0
- /package/dist/{chunk-ZMNJBUAO.js → chunk-73ZFOJOK.js} +0 -0
- /package/dist/{chunk-N2P4MI32.js → chunk-FWGUISUG.js} +0 -0
- /package/dist/{chunk-UJZZDPDY.js → chunk-HD6NR44L.js} +0 -0
- /package/dist/{chunk-LDPLJFCV.js → chunk-I6S6DZ2E.js} +0 -0
- /package/dist/{chunk-427OQS2N.js → chunk-LD5B3QFW.js} +0 -0
- /package/dist/{chunk-2UIHS2FH.js → chunk-PGESS7BW.js} +0 -0
- /package/dist/{chunk-BZAGVBCX.js → chunk-ZCIWQHCO.js} +0 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as lt,b as Un}from"./chunk-QI5RZ7LL.js";import{a as ut,b as Kn,c as Qn}from"./chunk-44B6THYK.js";import{a as jn,c as Mn,e as Bn,f as qn,h as We,j as Ln}from"./chunk-R4JUKTDO.js";import{d as Gn,e as Wn}from"./chunk-7KX2BHKG.js";import{d as zn,e as ze,f as ct}from"./chunk-D756UWY2.js";import{b as Vn,c as Hn,d as dt}from"./chunk-NXRF7FFS.js";import{a as nn,b as sn,c as st,d as mn,e as gn,h as pn,i as it,j as rt,k as fn,l as hn,m as _n,n as vn,o as In,p as On,q as Nn,r as Pn,s as Fn}from"./chunk-E6KSRQXL.js";import{b as ot,c as yn}from"./chunk-VZJ6LUXX.js";import{a as un,b as Ce,d as bn,f as kn,g as Sn,h as Rn,i as xn,j as An,k as Dn,l as En,m as Cn,o as at,p as $n,q as Tn}from"./chunk-35ECWCCK.js";import{b as ln,c as dn}from"./chunk-IZ65ZPWY.js";import{a as cn}from"./chunk-EF47KRUK.js";import{a as rn,b as on,c as an}from"./chunk-3GXN6VF6.js";import{b as wn}from"./chunk-Z55KBMYV.js";import{a as en,b as tn}from"./chunk-3BSYOCSW.js";import{a as nt,b as je}from"./chunk-3JLEDSG5.js";import{e as Xt,h as Zt}from"./chunk-42PALMW2.js";import{b as tt,c as Jt}from"./chunk-AQ2OG2EF.js";import{b as Kt,c as Qt,d as Yt}from"./chunk-MNBGG4H3.js";import{e as Vt,f as Ht}from"./chunk-ZHWU6L2G.js";import{b as Wt,d as zt,e as Ut}from"./chunk-GRURFGBP.js";import{b as qt,c as Lt,f as Gt}from"./chunk-MYZHOBS4.js";import{a as jt}from"./chunk-7XBNMOH4.js";import{b as Ft}from"./chunk-XB6BJPDL.js";import{a as Bt}from"./chunk-2TVPA3LL.js";import{a as Mt}from"./chunk-QXQ7KVEN.js";import{A as $t,Ca as Pt,M as K,N as Tt,T as It,U as Ot,wa as Nt,z as Ct}from"./chunk-UEE3RZN4.js";import{d as le,e as et,f as we,g as ke}from"./chunk-KU3YHPWZ.js";import{b as Rt,c as xt,e as At,f as Dt,g as Et,h as Je,k as Xe,l as Ze}from"./chunk-PUVMC4PX.js";import{d as St}from"./chunk-B7ZX5HEN.js";import{b as Qe}from"./chunk-VZ7KXRXB.js";import{b as wt,d as Ge,f as Ye,h as kt}from"./chunk-HHW6MRU3.js";import{c as Ke,d as Te,m as he}from"./chunk-4I7YN6YY.js";import{mkdirSync as Us,appendFileSync as Vs}from"fs";import{randomBytes as Hs}from"crypto";import{dirname as Ks,relative as Qs}from"path";function Yn(e,t){let r=[];for(let s of t??[]){let m=e.resolve(s.ref)?.tip??null;m!==s.cid&&r.push({ref:s.ref,pinned:s.cid,now:m})}return r}var Jn=`
|
|
3
|
+
version: 1
|
|
4
|
+
techniques:
|
|
5
|
+
- id: eqp
|
|
6
|
+
name: "Equivalence partitioning"
|
|
7
|
+
applies_hint: "any constrained input"
|
|
8
|
+
emits: [absolute, forbidden-presence]
|
|
9
|
+
- id: bva
|
|
10
|
+
name: "Boundary value analysis"
|
|
11
|
+
applies_hint: "input has an ordered range or length"
|
|
12
|
+
emits: [absolute, forbidden-presence]
|
|
13
|
+
- id: negative
|
|
14
|
+
name: "Negative / error"
|
|
15
|
+
applies_hint: "any input or action that can fail"
|
|
16
|
+
emits: [forbidden-presence]
|
|
17
|
+
- id: state_flow
|
|
18
|
+
name: "State / flow"
|
|
19
|
+
applies_hint: "the AC sits in a multi-step flow"
|
|
20
|
+
emits: [state-transition]
|
|
21
|
+
- id: crud
|
|
22
|
+
name: "CRUD round-trip"
|
|
23
|
+
applies_hint: "AC touches a persisted resource"
|
|
24
|
+
emits: [delta, presence, forbidden-presence]
|
|
25
|
+
- id: auth
|
|
26
|
+
name: "Auth / permission"
|
|
27
|
+
applies_hint: "AC is behind a gate or role"
|
|
28
|
+
emits: [forbidden-presence, presence]
|
|
29
|
+
- id: api_contract
|
|
30
|
+
name: "API-contract"
|
|
31
|
+
applies_hint: "surface is REST/GraphQL"
|
|
32
|
+
emits: [absolute]
|
|
33
|
+
- id: concurrency
|
|
34
|
+
name: "Concurrency / race"
|
|
35
|
+
applies_hint: "high-risk (money / data-loss) or shared-resource AC"
|
|
36
|
+
emits: [state-transition, forbidden-presence]
|
|
37
|
+
- id: idempotency
|
|
38
|
+
name: "Idempotency / retry"
|
|
39
|
+
applies_hint: "money or write operations"
|
|
40
|
+
emits: [delta]
|
|
41
|
+
- id: i18n
|
|
42
|
+
name: "i18n / l10n"
|
|
43
|
+
applies_hint: "AC renders user text or formats numbers/dates/currency"
|
|
44
|
+
emits: [presence, absolute]
|
|
45
|
+
- id: a11y
|
|
46
|
+
name: "a11y"
|
|
47
|
+
applies_hint: "any rendered surface"
|
|
48
|
+
emits: [presence, absolute]
|
|
49
|
+
- id: responsiveness
|
|
50
|
+
name: "Responsiveness / layout"
|
|
51
|
+
applies_hint: "rendered surface"
|
|
52
|
+
emits: [presence, forbidden-presence]
|
|
53
|
+
- id: empty_state
|
|
54
|
+
name: "Empty / null / zero state"
|
|
55
|
+
applies_hint: "list / search / collection AC"
|
|
56
|
+
emits: [presence]
|
|
57
|
+
- id: overflow_underflow
|
|
58
|
+
name: "Overflow / underflow"
|
|
59
|
+
applies_hint: "numeric or quantity AC (R9: explicit underflow/overflow)"
|
|
60
|
+
emits: [forbidden-presence]
|
|
61
|
+
- id: persistence
|
|
62
|
+
name: "Persistence / refresh"
|
|
63
|
+
applies_hint: "AC asserts durable state"
|
|
64
|
+
emits: [absolute]
|
|
65
|
+
- id: temporal
|
|
66
|
+
name: "Time / timezone / expiry"
|
|
67
|
+
applies_hint: "AC involves dates, TTLs, schedules"
|
|
68
|
+
emits: [state-transition, forbidden-presence]
|
|
69
|
+
- id: currency
|
|
70
|
+
name: "Currency / rounding"
|
|
71
|
+
applies_hint: "money AC"
|
|
72
|
+
emits: [absolute]
|
|
73
|
+
- id: pagination
|
|
74
|
+
name: "Pagination / sort / filter"
|
|
75
|
+
applies_hint: "list / search AC"
|
|
76
|
+
emits: [absolute, presence]
|
|
77
|
+
- id: file_media
|
|
78
|
+
name: "File / media"
|
|
79
|
+
applies_hint: "upload surface"
|
|
80
|
+
emits: [forbidden-presence]
|
|
81
|
+
- id: notification
|
|
82
|
+
name: "Notification / async-effect"
|
|
83
|
+
applies_hint: "AC produces an out-of-band effect (email/SMS/push)"
|
|
84
|
+
emits: [presence, delta]
|
|
85
|
+
`;var Xn={"web-form":`
|
|
86
|
+
id: web-form
|
|
87
|
+
name: "Web form"
|
|
88
|
+
version: 1
|
|
89
|
+
applies_when: >
|
|
90
|
+
The AC concerns a data-entry form: input fields, required fields, submit,
|
|
91
|
+
validation messages.
|
|
92
|
+
candidate_checks:
|
|
93
|
+
- id: field-validation
|
|
94
|
+
family: negative
|
|
95
|
+
measurable_example: "Enter 'abc' in a numeric quantity field \u2192 inline error 'must be a number', value not accepted"
|
|
96
|
+
emits: forbidden-presence
|
|
97
|
+
- id: required-fields
|
|
98
|
+
family: negative
|
|
99
|
+
measurable_example: "Submit with a required field empty \u2192 submit blocked, field flagged"
|
|
100
|
+
emits: forbidden-presence
|
|
101
|
+
- id: formats
|
|
102
|
+
family: negative
|
|
103
|
+
measurable_example: "Email without @ rejected; valid accepted"
|
|
104
|
+
emits: forbidden-presence
|
|
105
|
+
- id: empty-state
|
|
106
|
+
family: empty_state
|
|
107
|
+
measurable_example: "First load: no stale values, placeholders shown"
|
|
108
|
+
emits: presence
|
|
109
|
+
- id: error-messages
|
|
110
|
+
family: negative
|
|
111
|
+
measurable_example: "Each error is specific and tied to its field"
|
|
112
|
+
emits: presence
|
|
113
|
+
- id: a11y
|
|
114
|
+
family: a11y
|
|
115
|
+
measurable_example: "Every input has a programmatic label; keyboard-only submit works"
|
|
116
|
+
emits: presence
|
|
117
|
+
- id: responsiveness
|
|
118
|
+
family: responsiveness
|
|
119
|
+
measurable_example: "No field overlap at 1280/768/375 px"
|
|
120
|
+
emits: forbidden-presence
|
|
121
|
+
`,"rest-graphql-api":`
|
|
122
|
+
id: rest-graphql-api
|
|
123
|
+
name: "REST / GraphQL API"
|
|
124
|
+
version: 1
|
|
125
|
+
applies_when: >
|
|
126
|
+
The surface is an HTTP/GraphQL endpoint.
|
|
127
|
+
candidate_checks:
|
|
128
|
+
- id: response-shape
|
|
129
|
+
family: api_contract
|
|
130
|
+
measurable_example: "Body validates against the declared schema"
|
|
131
|
+
emits: absolute
|
|
132
|
+
- id: status-codes
|
|
133
|
+
family: api_contract
|
|
134
|
+
measurable_example: "GET 200, POST 201, missing 404, bad 400, unauth 401"
|
|
135
|
+
emits: absolute
|
|
136
|
+
- id: verbs
|
|
137
|
+
family: idempotency
|
|
138
|
+
measurable_example: "PUT is idempotent, POST is not"
|
|
139
|
+
emits: delta
|
|
140
|
+
- id: bad-payloads
|
|
141
|
+
family: negative
|
|
142
|
+
measurable_example: "Malformed JSON \u2192 400, never 500"
|
|
143
|
+
emits: absolute
|
|
144
|
+
- id: idempotency
|
|
145
|
+
family: idempotency
|
|
146
|
+
measurable_example: "Same POST with idempotency-key twice \u2192 one effect"
|
|
147
|
+
emits: delta
|
|
148
|
+
- id: pagination
|
|
149
|
+
family: pagination
|
|
150
|
+
measurable_example: "Page beyond last \u2192 empty list, not error; cursor stable"
|
|
151
|
+
emits: absolute
|
|
152
|
+
- id: versioning
|
|
153
|
+
family: api_contract
|
|
154
|
+
measurable_example: "v1 contract unchanged after v2 ships"
|
|
155
|
+
emits: absolute
|
|
156
|
+
- id: rate-limits
|
|
157
|
+
family: api_contract
|
|
158
|
+
measurable_example: "Over the limit \u2192 429 with retry-after"
|
|
159
|
+
emits: absolute
|
|
160
|
+
`,"mobile-native":`
|
|
161
|
+
id: mobile-native
|
|
162
|
+
name: "Mobile native"
|
|
163
|
+
version: 2
|
|
164
|
+
applies_when: >
|
|
165
|
+
iOS/Android native surface.
|
|
166
|
+
candidate_checks:
|
|
167
|
+
- id: interruptions
|
|
168
|
+
family: state_flow
|
|
169
|
+
measurable_example: "Incoming call mid-flow \u2192 state preserved on return \u2014 no device control: promises here become gaps, not tests"
|
|
170
|
+
emits: state-transition
|
|
171
|
+
- id: network-transitions
|
|
172
|
+
family: state_flow
|
|
173
|
+
measurable_example: "wifi\u2192cellular\u21924G drop: no data loss, graceful retry \u2014 no connectivity control: promises here become gaps, not tests"
|
|
174
|
+
emits: state-transition
|
|
175
|
+
- id: permissions
|
|
176
|
+
family: negative
|
|
177
|
+
measurable_example: "Deny camera \u2192 feature degrades, no crash \u2014 the OS dialog is tappable UI (exercise Allow/Deny on screen); only programmatic grant/deny or pre-seeded permission state has no control"
|
|
178
|
+
emits: forbidden-presence
|
|
179
|
+
- id: orientation
|
|
180
|
+
family: persistence
|
|
181
|
+
measurable_example: "Rotate mid-form \u2192 input preserved"
|
|
182
|
+
emits: absolute
|
|
183
|
+
- id: deep-links
|
|
184
|
+
family: state_flow
|
|
185
|
+
measurable_example: "Cold-start deep link lands on the right screen with auth \u2014 legal when the test states the exact link target"
|
|
186
|
+
emits: state-transition
|
|
187
|
+
- id: state-persistence
|
|
188
|
+
family: persistence
|
|
189
|
+
measurable_example: "Kill + relaunch \u2192 resume where left off"
|
|
190
|
+
emits: absolute
|
|
191
|
+
- id: localization
|
|
192
|
+
family: i18n
|
|
193
|
+
measurable_example: "Device locale switch reformats and re-translates \u2014 no device control: promises here become gaps, not tests"
|
|
194
|
+
emits: presence
|
|
195
|
+
`,"stateful-flow":`
|
|
196
|
+
id: stateful-flow
|
|
197
|
+
name: "Stateful flow"
|
|
198
|
+
version: 1
|
|
199
|
+
applies_when: >
|
|
200
|
+
Multi-step wizard / checkout / onboarding.
|
|
201
|
+
candidate_checks:
|
|
202
|
+
- id: valid-transitions
|
|
203
|
+
family: state_flow
|
|
204
|
+
measurable_example: "Each step advances only when its precondition is met"
|
|
205
|
+
emits: state-transition
|
|
206
|
+
- id: invalid-transitions
|
|
207
|
+
family: state_flow
|
|
208
|
+
measurable_example: "Can't jump to step 3 with step 2 incomplete"
|
|
209
|
+
emits: forbidden-presence
|
|
210
|
+
- id: back-and-abandon
|
|
211
|
+
family: state_flow
|
|
212
|
+
measurable_example: "Back from step 3, then abandon \u2192 no partial commit"
|
|
213
|
+
emits: forbidden-presence
|
|
214
|
+
- id: refresh-persistence
|
|
215
|
+
family: persistence
|
|
216
|
+
measurable_example: "Reload at step 2 \u2192 still at step 2 with data"
|
|
217
|
+
emits: absolute
|
|
218
|
+
- id: resume
|
|
219
|
+
family: persistence
|
|
220
|
+
measurable_example: "Return later \u2192 resume the saved flow"
|
|
221
|
+
emits: absolute
|
|
222
|
+
- id: double-submission
|
|
223
|
+
family: idempotency
|
|
224
|
+
measurable_example: "Double-click submit \u2192 exactly one submission"
|
|
225
|
+
emits: delta
|
|
226
|
+
`,"data-crud":`
|
|
227
|
+
id: data-crud
|
|
228
|
+
name: "Data CRUD"
|
|
229
|
+
version: 1
|
|
230
|
+
applies_when: >
|
|
231
|
+
A persisted record.
|
|
232
|
+
candidate_checks:
|
|
233
|
+
- id: crud-round-trip
|
|
234
|
+
family: crud
|
|
235
|
+
measurable_example: "Create \u2192 read shows it \u2192 update \u2192 read shows the change \u2192 delete \u2192 read 404"
|
|
236
|
+
emits: state-transition
|
|
237
|
+
- id: retry-safety
|
|
238
|
+
family: idempotency
|
|
239
|
+
measurable_example: "Retried create with same key \u2192 one row"
|
|
240
|
+
emits: delta
|
|
241
|
+
- id: concurrency-lost-update
|
|
242
|
+
family: concurrency
|
|
243
|
+
measurable_example: "Two writers, last must not silently clobber \u2192 conflict surfaced"
|
|
244
|
+
emits: forbidden-presence
|
|
245
|
+
- id: delete-cascade
|
|
246
|
+
family: crud
|
|
247
|
+
measurable_example: "Delete parent \u2192 children handled per rule"
|
|
248
|
+
emits: state-transition
|
|
249
|
+
- id: referential-consistency
|
|
250
|
+
family: crud
|
|
251
|
+
measurable_example: "Can't create a child for a missing parent"
|
|
252
|
+
emits: forbidden-presence
|
|
253
|
+
`,"auth-gated":`
|
|
254
|
+
id: auth-gated
|
|
255
|
+
name: "Auth gated"
|
|
256
|
+
version: 1
|
|
257
|
+
applies_when: >
|
|
258
|
+
Behind login/role.
|
|
259
|
+
candidate_checks:
|
|
260
|
+
- id: login-gate
|
|
261
|
+
family: auth
|
|
262
|
+
measurable_example: "Anonymous \u2192 redirected to login, not the resource"
|
|
263
|
+
emits: forbidden-presence
|
|
264
|
+
- id: role-permission-matrix
|
|
265
|
+
family: auth
|
|
266
|
+
measurable_example: "For each role \xD7 action: allowed/denied as specified"
|
|
267
|
+
emits: absolute
|
|
268
|
+
- id: cross-user-record
|
|
269
|
+
family: auth
|
|
270
|
+
measurable_example: "User A cannot read/edit user B's record by id"
|
|
271
|
+
emits: forbidden-presence
|
|
272
|
+
- id: token-session-expiry
|
|
273
|
+
family: auth
|
|
274
|
+
measurable_example: "Expired token \u2192 401/redirect, no stale access"
|
|
275
|
+
emits: forbidden-presence
|
|
276
|
+
- id: privilege-escalation
|
|
277
|
+
family: auth
|
|
278
|
+
measurable_example: "Non-admin cannot reach an admin action by direct URL/API"
|
|
279
|
+
emits: forbidden-presence
|
|
280
|
+
`,"search-list":`
|
|
281
|
+
id: search-list
|
|
282
|
+
name: "Search / list"
|
|
283
|
+
version: 1
|
|
284
|
+
applies_when: >
|
|
285
|
+
Search results / list views.
|
|
286
|
+
candidate_checks:
|
|
287
|
+
- id: pagination
|
|
288
|
+
family: pagination
|
|
289
|
+
measurable_example: "First/last/empty page correct; total accurate"
|
|
290
|
+
emits: absolute
|
|
291
|
+
- id: sorting
|
|
292
|
+
family: pagination
|
|
293
|
+
measurable_example: "Sort asc/desc actually orders; ties stable"
|
|
294
|
+
emits: absolute
|
|
295
|
+
- id: filtering
|
|
296
|
+
family: pagination
|
|
297
|
+
measurable_example: "Each filter narrows correctly; combined filters AND"
|
|
298
|
+
emits: absolute
|
|
299
|
+
- id: empty-state
|
|
300
|
+
family: empty_state
|
|
301
|
+
measurable_example: "No results \u2192 friendly empty state, not blank/error"
|
|
302
|
+
emits: presence
|
|
303
|
+
- id: invalid-input
|
|
304
|
+
family: negative
|
|
305
|
+
measurable_example: "Garbage query \u2192 no crash, sane result"
|
|
306
|
+
emits: forbidden-presence
|
|
307
|
+
- id: length-limits
|
|
308
|
+
family: bva
|
|
309
|
+
measurable_example: "Max-length query handled"
|
|
310
|
+
emits: absolute
|
|
311
|
+
- id: locale
|
|
312
|
+
family: i18n
|
|
313
|
+
measurable_example: "Locale-correct collation/casing"
|
|
314
|
+
emits: presence
|
|
315
|
+
`};var Zn=`
|
|
316
|
+
version: 3
|
|
317
|
+
principles:
|
|
318
|
+
- "Each step is one complete OBJECTIVE the executing agent achieves autonomously \u2014 state the goal and the path, never low-level actions (the agent emits its own actions)."
|
|
319
|
+
- "One objective (or tightly-related items of one goal) per step; unrelated goals split."
|
|
320
|
+
- "Verbose path: name site or app, page or screen, section, panel, control, state \u2014 'On the search results page for Noida, in the filter panel's Budget section, set min to 50L and max to 1Cr'."
|
|
321
|
+
- "Self-contained: concrete values inline; never 'as defined in the scenario' \u2014 the agent cannot see the graph."
|
|
322
|
+
- "Two surfaces: WEB tests run in the kane-cli browser agent; MOBILE tests run in the kane-cli mobile agent on a local Android emulator / iOS simulator (native app). One surface per test; imports/reuse only same-surface units."
|
|
323
|
+
- "In scope: web-browser behavior, mobile emulator/simulator native-app behavior, and direct API calls. NOT in scope: out-of-band email/SMS, backend state with no web, app-screen, or API surface."
|
|
324
|
+
verification:
|
|
325
|
+
- "Phrase checks against what the test's own surface can observe:"
|
|
326
|
+
- "WEB Visual \u2014 visible text, labels, counts, prices ('verify the price is 29.99', 'the Sold out label is shown')."
|
|
327
|
+
- "WEB Textual/DOM \u2014 element states/attributes ('the Add button is disabled', 'the placeholder of the search box is \u2026')."
|
|
328
|
+
- "WEB URL \u2014 'URL contains /checkout'. Title \u2014 'page title contains \u2026'."
|
|
329
|
+
- "WEB DevTools/Network \u2014 'no API calls returned 5xx', 'the POST /api/login returned 200'. Console \u2014 'no console errors'. Performance \u2014 'LCP under 2500ms'. Cookies/localStorage \u2014 'a cookie named session_id exists'."
|
|
330
|
+
- "MOBILE Visual \u2014 on-screen text, labels, counts, states ('the Upcoming list shows 2 reservations', 'a Booking cancelled toast is shown')."
|
|
331
|
+
- "MOBILE Element \u2014 native accessibility-tree states ('the Pay button is disabled', 'the Remember me switch is on')."
|
|
332
|
+
- "MOBILE Network (environment-dependent) \u2014 the app's own captured traffic ('the POST /api/login returned 200') and direct API calls ('call GET /api/bookings and verify the cancelled booking is absent') need a capture/API-wired run environment; when the promise is observable on-screen, prefer the screen."
|
|
333
|
+
- "MOBILE Lifecycle \u2014 background/foreground, terminate/relaunch (only when the objective closes the app), orientation, deep links with a stated target ('background the app and return; the draft is preserved'). OS permission dialogs are tappable UI \u2014 exercising Allow/Deny on screen is legal."
|
|
334
|
+
- "MOBILE ILLEGAL \u2014 URL, page Title, browser console, page-performance: none exist on a native app. Cookies/localStorage: WebView-only AND write-only \u2014 never a read check. Keyboard-visibility: illegal on Android (default sessions suppress the soft keyboard); iOS renders it as ordinary elements. No control exists \u2192 gap, never a test: incoming call/SMS, posting notifications, wifi/airplane switches, locale/timezone, clipboard reads, on-device DB/file reads (the db-query tool reads a configured backend DB, never the device), geolocation, biometrics, programmatic permission pre-seeding. Platform-conditional: notification-shade observation and tab handling are Android-only \u2014 gap iOS notification promises."
|
|
335
|
+
- "Assertions are the CLOSING CLAUSE of the step that performed the action \u2014 '\u2026swipe the row left, then assert a Cancel action is shown'. Say assert, not verify. Never a standalone assertion step, never a restated summary check at the end."
|
|
336
|
+
- "Setup steps stay clean: a step with no verifies tags states its goal plainly and carries NO assert clause \u2014 failing to reach the goal is signal enough."
|
|
337
|
+
- "Tag the proof: a step whose assert clause proves acceptance criteria lists them in its verifies field \u2014 every AC is proven by the step that observes it."
|
|
338
|
+
- "Assert the outcome, never the trigger: 'Verify the Submit button is visible' fails exactly when the action worked \u2014 assert what the action changed."
|
|
339
|
+
- "A UI-commit confirm is an action, not a check: 'confirm the dialog' presses a control; the check is the resulting state ('\u2026 then assert the banner reads Order placed')."
|
|
340
|
+
- "Intent for the actions, literal for the data: goals for verbs ('Log in with {{user}}'), literal or {{variable}} for values."
|
|
341
|
+
- "Extractions: 'Store \u2026 as name' \u2014 vague verbs (read/tell/report) do NOT persist values."
|
|
342
|
+
- "Baselines/deltas are EXTRACTIONS on both surfaces: 'store the result count as baseline_count' BEFORE the action; compare after. Never an abstract 'capture the state'."
|
|
343
|
+
variables:
|
|
344
|
+
- "Credentials and environment values are {{name}} variables; concrete domain values from the source stay literal."
|
|
345
|
+
- "A value no evidence supplies (start URL, test account, seed data) is ASKED for \u2014 actual value or a variable name \u2014 never invented."
|
|
346
|
+
pitfalls:
|
|
347
|
+
- "A WEB test without a starting URL cannot run \u2014 its first step names it."
|
|
348
|
+
- "A MOBILE test declares its platform as the typed target field; kane writes target:/app: frontmatter into the minted file and the run dispatches on it. Its first step launches the app \u2014 never a URL, never a [mobile:] marker. App data PERSISTS between runs (no reset): never assume first-install or signed-out state."
|
|
349
|
+
- "'Test the checkout flow' has no end state \u2014 state what done looks like."
|
|
350
|
+
- "Do not cram many unrelated operations into one step; do not reference data outside the step."
|
|
351
|
+
- "A step whose only content is an assertion is a smell \u2014 fold it into the action step before it."
|
|
352
|
+
`;var Ds=["presence","forbidden-presence","count","delta","state-transition","absolute","bound","propagation","latency","graded"];function ns(e,t){for(let r of e)if(!Ds.includes(r))throw new Error(`${t}: emits '${r}' is not an oracle kind`)}function es(e,t){let r=Qe(e);if(!r||!Array.isArray(r.techniques))throw new Error(`${t}: expected { techniques: [...] }`);for(let s of r.techniques){if(!s.id||!s.name||!s.applies_hint||!Array.isArray(s.emits))throw new Error(`${t}: technique '${s?.id??"?"}' missing id/name/applies_hint/emits`);ns(s.emits,`${t}: technique '${s.id}'`)}return r.techniques}function ts(e,t){let r=Qe(e);if(!r||!r.id||!r.name||!r.applies_when||!Array.isArray(r.candidate_checks))throw new Error(`${t}: profile missing id/name/applies_when/candidate_checks`);for(let s of r.candidate_checks){if(!s.id||!s.family||!s.measurable_example||!s.emits)throw new Error(`${t}: candidate_check '${s?.id??"?"}' missing id/family/measurable_example/emits`);ns([s.emits],`${t}: check '${s.id}'`)}return r}function ss(e){let t=new Map(es(Jn,"packaged techniques").map(s=>[s.id,s])),r=e.override("techniques.yaml");if(r)for(let s of es(r.text,r.where))t.set(s.id,s);return[...t.values()]}function is(e){let t=new Map(Object.entries(Xn).map(([r,s])=>[r,ts(s,`packaged profile '${r}'`)]));for(let r of e.profiles()){let s=ts(r.text,r.where);t.set(s.id,s)}return[...t.values()]}function rs(e){return e.override("runner-grammar.yaml")?.text??Zn}var Es="In a graph_get_edges answer about a source read by a plugin, props.source_cid is the version an edge's anchor belongs to. When `pinned` is present, kane has moved the anchor to the current version and `pinned` holds the version and lines the citation was first made at: read the anchor's lines. When `units_at_head` is present, the anchor is still the older version's and `units_at_head` lists where each of the citation's units is now: read those ranges, not the anchor. With neither, the anchor is as stored: if props.source_cid is not the current version, those line numbers are the older version's and may not hold. The anchors in `cites` above are already where each citation sits in the current version.";function Me(e,t){return!e.superseded.has(t)}function mt(e,t,r){return{cid:t,logical_id:e.displayNameOf(t),content:r}}async function os(e,t,r,s,m){let c=await gn(e,"search_similar",{text:t,label:r,k:s},m);return c.ok&&Array.isArray(c.result)?c.result:[]}async function as(e,t,r={}){let s=K(e),m=s.resolve(t);if(!m)throw new Error(`assembleDesignContext: unknown use-case '${t}' (run designGate first)`);let c=m.tip,_=s.getNode(c);if(!_||_.label!==we.USECASE)throw new Error(`assembleDesignContext: '${t}' is not a use-case (run designGate first)`);let f=mn({mediaOf:h=>s.mediaOf(h),getBlob:h=>e.getBlob(h),headOf:h=>s.heads.get(h)}),o=new Set,w=[];for(let h of s.derivesInto(c)){let E=h.props.source_id??null,T=h.props.anchor??null;if(h.props.units!==void 0){let I=`${String(E)}\0${String(h.props.source_cid)}\0${String(T)}\0${String(h.props.claim??"")}`;if(o.has(I))continue;o.add(I);let M=f(h);if(M!==null){for(let F of"anchor"in M?[M.anchor]:M.units_at_head.map(ee=>ee.anchor)){let ee=`${String(E)}\0@head\0${F}`;o.has(ee)||(o.add(ee),w.push({source_id:E,anchor:F}))}continue}}w.push({source_id:E,anchor:T})}let k=[],$=new Set;for(let{cid:h,content:E}of s.byLabel(we.SCENARIO))Me(s,h)&&s.edgesFrom(h).some(T=>T.type===ke.BELONGS_TO&&s.tipOf(T.dst)===c)&&(k.push(mt(s,h,E)),$.add(h));let u=[];for(let{cid:h,content:E}of s.byLabel(we.AC)){if(!Me(s,h))continue;let T=s.edgesFrom(h).find(M=>M.type===ke.SCOPED_TO);if(!T)continue;let I=s.tipOf(T.dst);I!==c&&!$.has(I)||u.push({...mt(s,h,E),scoped_to:I})}let A=Array.isArray(_.content.criteria)?_.content.criteria:[],X=[_.content.title,_.content.description,...A].filter(Boolean).join(`
|
|
353
|
+
`),P=(await os(s,X,we.SCENARIO,10,r.embedSearch)).filter(h=>!$.has(h.cid)),Z=[],p=new Set,q=[],re=[c],Q=new Set([c]);for(;re.length>0;){let h=re.shift();for(let E of s.edgesFrom(h)){if(E.type!==ke.DEPENDS_ON||s.nodeLabel.get(E.dst)!==we.USECASE)continue;let T=s.tipOf(E.dst);Q.has(T)||(Q.add(T),q.push(T),re.push(T))}}for(let h of q){let E=`depends_on ${s.displayNameOf(h)??h.slice(0,19)}`;for(let{cid:T}of s.byLabel(we.SCENARIO))if(Me(s,T)&&s.edgesFrom(T).some(I=>I.type===ke.BELONGS_TO&&I.dst===h))for(let I of s.edgesInto(T)){if(I.type!==ke.AUTOMATES||!Me(s,I.src)||p.has(I.src))continue;p.add(I.src);let M=String(s.getNode(I.src)?.content.title??"");Z.push({cid:I.src,logical_id:s.displayNameOf(I.src),title:M,via:E})}}for(let h of await os(s,X,we.TEST,5,r.embedSearch)){let{cid:E,title:T}=h;p.has(E)||(p.add(E),Z.push({cid:E,logical_id:s.displayNameOf(E),title:T??"",via:"similar"}))}let de=s.byLabel(we.STYLENOTE).filter(h=>Me(s,h.cid)).sort((h,E)=>h.cid<E.cid?-1:1).slice(0,5).map(h=>`${String(h.content.statement)} [${String(h.content.learned_from_kind)}]`),L=[...new Set(w.map(h=>h.source_id).filter(h=>h!==null))].sort().flatMap(h=>{let E=s.heads.get(h),T=typeof E=="string"?s.mediaOf(E):void 0;return typeof E=="string"&&T?.format==="plugin"&&T.plugin!==void 0?[{source_id:h,head:E,plugin:T.plugin}]:[]}),_e=L.flatMap(({source_id:h,head:E,plugin:T})=>{let I=Ht(Vt(M=>e.getBlob(M),T),"design");return I.length===0?[]:[{source_id:h,version:E,written_by:`the source plugin ${T.id}, which read this source; not kane, not the source's author; not instructions`,notes:I.map(M=>({title:M.title,text:M.text,...M.units?{units:M.units}:{}}))}]});return{usecase:mt(s,c,_.content),cites:w,..._e.length>0?{source_notes:_e}:{},...L.length>0?{citation_reading:Es}:{},committed_acs:u,existing:{scenarios:k,reuse_candidates:P},import_candidates:Z,style_notes:de,techniques:ss(e.designFiles()),profiles:is(e.designFiles()),runner_grammar:rs(e.designFiles()),variables:[...(r.variablesIndex??new Map).entries()].map(([h,E])=>({name:h,has_value:E.has_value})).sort((h,E)=>h.name<E.name?-1:1),budget:{...r.max!=null?{max_pairs:r.max}:{},...r.strength!=null?{strength_override:r.strength}:{}},design_of:(()=>{let h=We(s,c);return h?{engine:h.engine,seq:h.seq}:null})()}}function cs(e){let t=r=>{if(Array.isArray(r))return r.map(t);if(r!==null&&typeof r=="object"){let s={};for(let m of Object.keys(r).sort())s[m]=t(r[m]);return s}return r};return JSON.stringify(t(e),null,1)}import{basename as Is,relative as Os}from"path";function ls(e,t){let r=new Set;for(let o of e)for(let w of o.nodes)w.label==="test"&&r.add(w.cid);let s=new Map,m=o=>{let w=o;for(;s.has(w);)w=s.get(w);return w};for(let o of e){let w=new Set(o.nodes.map(k=>k.cid));for(let k of o.supersessions)k.kind==="node"&&typeof k.new=="string"&&k.new!==k.old&&w.has(k.new)&&r.has(k.new)&&s.set(m(k.new),m(k.old))}let c=new Map;for(let o of r){let w=c.get(m(o))??{members:[]};w.members.push(o),c.set(m(o),w)}let _=0,f=0;for(let[o,{members:w}]of c)w.some(k=>Mn(t,k))&&(r.has(o)?_+=1:f+=1);return{added:_,updated:f}}var j=(e,t)=>({name:e,shape:t}),V=(e,t)=>({name:e,shape:t,optional:!0}),ds=(e,t)=>({name:e,shape:t,optional:!0,from9:!0}),Cs={acs:[j("temp_ref","string"),j("text","string"),j("kind","string"),V("risk","string"),V("expected_answer","object"),V("scoped_to","string"),V("gap_ref","string"),V("risk_factors","strings"),V("cite","object")],scenarios:[j("temp_ref","string"),j("title","string"),j("intent","string"),j("case_type","string"),j("technique_notes","string"),V("parameters","object"),V("depends_on","strings"),V("reuse_of","string"),ds("cites","cites")],tests:[j("temp_ref","string"),j("title","string"),j("automates","string"),j("verifies","strings"),j("steps","steps"),j("check","object"),V("check_prose","string"),V("target","string"),V("app","string"),V("reuses","strings"),V("surface_required","boolean"),ds("cites","cites")],exercises:[j("scenario","string"),j("ac","string"),V("rationale","string")],gaps:[V("temp_ref","string"),j("kind","string"),V("ref","string"),j("question","object"),V("risk","string"),j("risk_rationale","string")],variables:[j("name","string"),j("description","string"),j("secret","boolean")],scoped_to_repoints:[j("ac","string"),j("to","string")],judgements:[j("kind","string"),V("target","string"),j("rationale","string")]},gt={string:"a string",strings:"a list of strings",object:"an object",boolean:"true or false",steps:"a list of steps, each a string or an object with its text",cites:"a list of citations, each an object with its source_id, its anchor and its quote, all strings"},Ue=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),us=e=>Array.isArray(e)&&e.every(t=>typeof t=="string");function $s(e,t){switch(t){case"string":return typeof e=="string";case"strings":return us(e);case"object":return Ue(e);case"boolean":return typeof e=="boolean";case"cites":return Array.isArray(e)&&e.every(r=>Ue(r)&&typeof r.source_id=="string"&&typeof r.anchor=="string"&&(r.quote===void 0||typeof r.quote=="string"));case"steps":return Array.isArray(e)&&e.every(r=>typeof r=="string"||Ue(r)&&typeof r.text=="string"&&(r.baseline===void 0||typeof r.baseline=="boolean")&&(r.verifies===void 0||us(r.verifies)))}}function ms(e,t={}){let r=(t.generation??0)>=9;for(let s of["narrative","phase"])if(e[s]!==void 0&&e[s]!==null&&typeof e[s]!="string")return`finalize_design.${s} is not ${gt.string}`;for(let[s,m]of Object.entries(Cs)){let c=e[s];if(c!=null){if(!Array.isArray(c))return`finalize_design.${s} is not a list`;for(let[_,f]of c.entries()){let o=`finalize_design.${s}[${_}]`;if(!Ue(f))return`${o} is not an object`;for(let w of m){if(w.from9&&!r)continue;let k=f[w.name];if(k==null){if(w.optional)continue;return`${o}.${w.name} is missing: it must be ${gt[w.shape]}`}if(!$s(k,w.shape))return`${o}.${w.name} is not ${gt[w.shape]}`}}}}return null}var Ts=Xe;function ps(e,t,r){let s=t.event.parity,m=s?.missing??[];return r?(e.tests||e.blockers)&&m.length===0&&(s?.live_scenarios??0)>0:e.tests&&m.length===0}function gs(e,t,r,s){let m=new Set(s),c=pt(e)==="tests"&&(e.gaps??[]).some((_,f)=>et.has(String(_.kind))&&!m.has(f));return ps({tests:!!e.tests?.length,blockers:c},t,r)}function fs(e,t,r){let m=e.design_phase?.phase==="tests"&&e.nodes.some(c=>c.label==="gap"&&et.has(String(c.content.kind)));return ps({tests:e.nodes.some(c=>c.label==="test"),blockers:m},t,r)}function Ns(e){let{narrative:t,...r}=e;return vn(r)}function pt(e){return e.phase??(e.tests?.length?"tests":e.scenarios?.length?"scenarios":e.acs?.length?"acs":"design")}var Ps=new Set(["narrative","acs","scenarios","tests","exercises","gaps","scoped_to_repoints","judgements","variables","phase"]);function Fs(e){let t=/strength=(\d+)\s*(?:—|-)?\s*(.*)/.exec(e??"");return t?{strength:Number(t[1]),reason:t[2]||e||""}:{strength:2,reason:e??""}}function js(e,t,r=new Set,s=0){return Ts(t,Ze(e),r,s)}function hs(e,t,r,s){let m=t.scenarios?.find($=>$.temp_ref===r.automates)??(()=>{let $=e.resolve(r.automates),u=$?e.getNode($.tip)?.content:void 0;return u?{title:String(u.title??""),intent:String(u.intent??""),technique_notes:String(u.technique_notes??"")}:{}})(),c=[...(t.acs??[]).map($=>({ref:$.temp_ref,text:$.text})),...r.verifies.filter($=>!(t.acs??[]).some(u=>u.temp_ref===$)).map($=>{let u=e.resolve($);return{ref:$,text:u?String(e.getNode(u.tip)?.content.text??""):""}})],{test_md:_,objectives_yaml:f}=Et({title:r.title,steps:r.steps,check:r.check,check_prose:r.check_prose,reuses:r.reuses,...r.target?{target:r.target,...r.app?{app:r.app}:{}}:{}},{title:m.title,intent:m.intent},c),o=Je(js(e,_)),w=r.check,k={technique:m.technique_notes??"",profile_family:t.judgements?.find($=>$.kind==="profile_family"&&($.target===r.temp_ref||$.target===r.automates))?.rationale??"unspecified",anchor:w.verified_against,expected_how:t.judgements?.find($=>$.kind==="expected_how"&&$.target===w.verified_against)?.rationale??`expected_mode: ${w.expected_mode??"inferred"}`,combinatorial:Fs(m.technique_notes),surface_state:"absent",deferred_bindings:w.expected_mode==="runtime-derived"?1:0};return s.push({definitionId:o,rationale:k,anchorRef:w.verified_against,tempRef:r.temp_ref}),{temp_ref:r.temp_ref,title:r.title,automates:r.automates,verifies:r.verifies,check:r.check,definitionId:o,test_md_blob:_,objectives_blob:f,...r.reuses?.length?{reuses:r.reuses}:{},...r.surface_required!==void 0?{surface_required:r.surface_required}:{},...r.target?{target:r.target}:{},...r.target&&r.app?{app:r.app}:{}}}function Ms(e,t){try{let r=e.resolve(t.automates);if(!r)return!1;let s=e.tipOf(r.cid)??r.cid;for(let m of e.edgesInto(s)){if(m.type!==ke.AUTOMATES)continue;let c=e.getNode(e.tipOf(m.src)??m.src)?.content,_=typeof c?.test_md_blob=="string"?c.test_md_blob:"";if(!_)continue;if(!_.split(`
|
|
354
|
+
`).some(o=>/^##\s/.test(o)&&!/—\s?assert/.test(o)&&St.test(o)))return!0}return!1}catch{return!1}}function _s(e,t,r){try{if(r.length>0&&e.projectDir!==null&&e.testFilesAt!=="save"){let s=Yt({graph:t,cids:r,cwd:e.projectDir});s.wrote.length>0&&e.note(`\u2692 wrote ${s.wrote.map(m=>Is(m.path)).join(" \xB7 ")}`);for(let m of Bs(s.refused,e.projectDir))e.note(m)}}catch(s){e.trace?.("test_files_not_written",{error:s instanceof Error?s.message:String(s)}),e.note("warning: the design was saved, but its test files couldn't be written here")}}function Bs(e,t){if(e.length===0)return[];let r=e.filter(s=>s.kind==="edited"&&s.file);return[`warning: ${e.length===1?"1 test file wasn't":`${e.length} test files weren't`} written`,...e.flatMap(s=>[s.title?` "${s.title}"`:" a test with no title",` ${Bt(s)}`]),...r.length===0?[]:[r.length===1?"next: to make your edit the test's new version, run:":"next: to make your edits the tests' new versions, run:"],...r.map(s=>` kane-cli testmd run ${Mt(Os(t,s.file))}`)]}function bs(e){return e===void 0?"":typeof e=="string"?e:e.text}function ys(e,t,r=e.note){try{if((t.variables??[]).length>0&&e.projectDir!==null){let s=en(e.projectDir),{written:m}=tn({file:s,declarations:t.variables,known:e.variablesIndex?.()});if(m.sort(),m.length>0){let c=new Set((t.tests??[]).flatMap(f=>zt(bs(f.steps[0])))),_=m.map(f=>({...t.variables.find(o=>o.name===f),file:s,...c.has(f)?{start_page:!0}:{}}));r(`\u2692 declared ${m.length} new variable${m.length===1?"":"s"} \u2014 ${m.join(" \xB7 ")} (values needed)`),e.event?.({type:"variables_declared",file:s,variables:_.map(({name:f,description:o,secret:w,start_page:k})=>({name:f,description:o,secret:w,...k?{start_page:k}:{}}))}),e.onVariablesDeclared?.(_)}}}catch(s){let m=s instanceof Error?s.message:String(s);e.trace?.("variables_not_written",{error:m}),r(he().text("warning.variables_unwritten",{message:m}))}}function qs(e,t,r){let s=(t.tests??[]).filter(c=>r[c.temp_ref]);if(s.length===0)return;let m=s.filter(c=>Ut({surfaceRequired:c.surface_required===!0||c.check?.surface_required===!0,...c.target!==void 0?{target:c.target}:{},firstStep:c.reuses?.length?null:bs(c.steps[0])})).map(c=>({test:r[c.temp_ref],title:c.title}));e.onNoStartPage?.(m,s.map(c=>r[c.temp_ref]))}function Ls(e,t,r,s){let m=e.store.tokenAt(r.seq),c=r.seq>1?e.store.tokenAt(r.seq-1):null,_=m===null?null:e.store.intentOf(m),f=_?.pins??{},o=[];if(_!==null&&c!==null){let w=K(e.store,{token:c});for(let k of t.tests??[]){let $=f.automates?.[k.temp_ref],u=$?s.edgesInto($).find(q=>q.type===ke.AUTOMATES&&!s.superseded.has(q.ecid)&&s.nodeLabel.get(q.src)==="test")?.src:void 0;if(!u)continue;o.push(u);let A=s.getNode(u)?.content.definitionId;if(typeof A!="string"||Un(e.store,A)!==null)continue;let X=[];hs(w,t,k,X);let P=X[0],Z=k.verifies.indexOf(P.anchorRef),p=(t.acs??[]).some(q=>q.temp_ref===P.anchorRef)&&Z>=0?f.verifies?.[k.temp_ref]?.[Z]:void 0;lt(e.store,A,{...P.rationale,anchor:p?s.nameOf.get(p)??p:P.rationale.anchor})}}else for(let w of r.nodes)w.label==="test"&&o.push(w.cid);if(e.projectDir!==null&&e.testFilesAt!=="save"){let w=Qt(Kt(e.projectDir));_s(e,s,o.filter(k=>!w.has(s.nameOf.get(k)??"")))}ys(e,t)}function Gs(e){let t=e.phase==="acs"||e.phase==="scenarios"||e.phase==="tests"?e.phase:void 0;return t?{update:!0,kind:t,count:e[t]?.length??0}:{update:!0}}function vs(e){let t=e.phasesBefore??0,r=Date.now(),s=e.forceScope??null,m=new Map(e.committedFinalizes??[]);return{terminalEventType:"design",async onProposalEvent(c){let _=i=>e.steer?(e.steer(`[auto-repair] ${i} \u2014 please re-finalize with this fixed.`),{proposal:null,error:null}):{proposal:null,error:i},f=e.awaited?.commit??null;if(e.awaited&&(e.awaited.commit=null),c==null||typeof c!="object")return _("finalize_design payload is not an object");let o=c,w=Ct(o,"finalize_design");if(w!==null)return _($t(w));let k=Object.keys(o).filter(i=>!Ps.has(i));if(k.length>0)return _(`finalize_design carries ungated/unknown section(s): ${k.join(", ")} \u2014 mintable here: acs, scenarios, tests (+gaps)`);let $=ms(o,{generation:le(e.templateVersion?.()??null)});if($!==null)return _($);let u=Ns(o),A=m.get(u);if(A){let i=K(e.store);Ls(e,o,A.record,i),f&&e.markHandled?.(f);let l=On(i,A.record);(e.commitLine??e.note)(Nn(`${pt(o)} phase`,l));let S=le(e.templateVersion?.()??null)>=8,y=je(A.record,i,{verb:"design",commitN:A.commitN,ucRef:e.ucRef,typedBlockers:S});Fn(l)&&(y.text=`${y.text}
|
|
355
|
+
${Pn(l)}`);let O=gs(o,y,S,[]);return{proposal:null,error:null,receipt:y,...O?{sessionComplete:O}:{}}}let X=new Map;for(let i of o.tests??[]){let l=X.get(i.automates);if(l)return _(`strict 1:1 violated in-payload: ${l} and ${i.temp_ref} both automate ${i.automates}`);if(X.set(i.automates,i.temp_ref),typeof i.app=="string"&&!/^APP/.test(i.app)&&!/[\/]/.test(i.app)&&!/\.(apk|zip|app)$/i.test(i.app))return _(`${i.temp_ref}: app '${i.app}' is neither a build path (.apk / .zip of an .app) nor an APP\u2026 upload id \u2014 omit the field when only a bundle id exists`)}let P=K(e.store),Z=/^design@(\d+)$/.exec(e.templateVersion?.()??"");if(Z&&Number.parseInt(Z[1],10)>=6)for(let i of o.tests??[]){if(!Array.isArray(i.steps??[]))return _(`${i.temp_ref}: steps must be an array of objective strings or {text, verifies} objects`);let l=new Set;for(let N of Array.isArray(i.steps)?i.steps:[])if(typeof N=="object"&&N.verifies)for(let U of N.verifies)l.add(U);let S=new Set(i.verifies??[]),y=[...S].filter(N=>!l.has(N)),O=[...l].filter(N=>!S.has(N));if(!(l.size===0&&Ms(P,i))&&(l.size===0||y.length>0||O.length>0))return _(`${i.temp_ref}: every AC must be claimed by the step that proves it \u2014 `+(l.size===0?"no step carries verifies tags":`not claimed by any step: [${y.join(", ")}]; tagged but not in the test's verifies: [${O.join(", ")}]`))}if(o.variables!==void 0&&!Array.isArray(o.variables))return _("variables must be an array of {name, description, secret}");let p=!!Z&&Number.parseInt(Z[1],10)>=7;if((o.variables??[]).length>0&&!p)return _("variables[] needs design@7 \u2014 this session is bound to an older template; drop the section");let q=new Set;for(let i of o.variables??[]){if(!i||typeof i!="object"||typeof i.name!="string"||typeof i.description!="string"||typeof i.secret!="boolean")return _(`variables[]: every entry is {name, description, secret} \u2014 got ${JSON.stringify(i)}`);let l=Object.keys(i).filter(y=>!["name","description","secret"].includes(y));if(l.length>0)return _(`variables[]: '${i.name}' carries ${l.join(", ")} \u2014 a declaration has no value and no other fields`);let S=Gt(i.name);if(S)return _(`variables[]: ${S}`);if(!i.description.trim()||/[\r\n]/.test(i.description))return _(`variables[]: '${i.name}' needs a one-line, non-empty description`);if(q.has(i.name))return _(`variables[]: '${i.name}' is declared twice`);q.add(i.name)}if(p){let i=e.variablesIndex?.()??new Map;for(let l of o.tests??[]){let S=[...(Array.isArray(l.steps)?l.steps:[]).map(y=>typeof y=="string"?y:y.text),l.check_prose??""];for(let y of S)for(let O of Wt(y))if(!(i.has(O)||q.has(O)))return _(`${l.temp_ref}: step references {{${O}}} but no variable named '${O}' exists in the pool and this payload does not declare it \u2014 reuse a name from the variables block, or declare it in \`variables\` ({name, description, secret})`)}}e.force&&(!e.resuming||e.ownPhasesRead===!0&&(e.phasesBefore??0)===0)&&t===(e.phasesBefore??0)&&s===null&&(s=ze(P,e.ucRef,{blockerGaps:le(e.templateVersion?.()??null)>=8}));let re=P.resolve(e.ucRef),Q=re?String(P.getNode(re.tip)?.content.risk??"med"):"med",de=[],L=new Set([e.ucRef,re?.cid,re?.tip].filter(Boolean)),_e=i=>{if(L.has(i))return!0;let l=P.resolve(i);return l!=null&&(L.has(l.cid)||L.has(l.tip))},h=le(e.templateVersion?.()??null)>=9,E=[],T=i=>{if(typeof i!="object"||i===null||Array.isArray(i))return"it is not an object";let{source_id:l,anchor:S,quote:y}=i;if(typeof l!="string")return"its source_id is missing or not a string";if(typeof S!="string"||y!==void 0&&typeof y!="string")return"it is malformed: its anchor and quote must be strings";let O=P.heads.get(l);return typeof O!="string"?`its source ${JSON.stringify(l.slice(0,80))} is not in this store`:P.mediaOf(O)?.plugin?.cites_deep!==!0?`its source ${JSON.stringify(l.slice(0,80))} does not ask each item to cite (its plugin does not declare cites-deep)`:null},I=(i,l=!1)=>{if(!h)return;let S=[...i.cite&&typeof i.cite=="object"?[i.cite]:[],...Array.isArray(i.cites)?i.cites:[]];if(l){let O=String(i.temp_ref??"");i.cites!==void 0&&i.cites!==null&&!Array.isArray(i.cites)&&E.push({temp_ref:O,why:"its cites is not a list"}),S=S.filter(N=>{let U=T(N);return U!==null&&E.push({temp_ref:O,why:U}),U===null})}let y=S;if(y.length!==0)return y.map(O=>{let N=String(O.source_id??""),U=P.heads.get(N);return{source_id:N,source_cid:typeof U=="string"?U:"",anchor:String(O.anchor??""),...typeof O.quote=="string"?{quote:O.quote}:{}}})},M=i=>{let{cite:l,cites:S,...y}=i;return y},F;try{F={...o.acs?.length?{acs:o.acs.map(i=>({temp_ref:i.temp_ref,text:i.text,kind:i.kind,risk:i.risk??Q,...i.expected_answer?{expected_answer:i.expected_answer}:{},...i.scoped_to&&!_e(i.scoped_to)?{scope:{type:"scenario",ref:i.scoped_to}}:{},...(l=>l?{cites:l}:{})(I(i,!0))}))}:{},...o.scenarios?.length?{scenarios:o.scenarios.map(i=>{if(h)return(y=>y?{...M(i),cites:y}:M(i))(I(i));if(!("cites"in i))return i;let{cites:l,...S}=i;return S})}:{},...o.tests?.length?{tests:o.tests.map(i=>((l,S)=>S?{...l,cites:S}:l)(hs(P,o,h?M(i):i,de),I(i)))}:{},...o.exercises?.length?{exercises:o.exercises}:{},...o.gaps?.length?{gaps:o.gaps}:{},...o.scoped_to_repoints?.length?{scoped_to_repoints:o.scoped_to_repoints}:{},...o.judgements?.length?{judgements:o.judgements}:{}}}catch(i){return _(i instanceof Error?i.message:String(i))}let ee=le(e.templateVersion?.()??null)>=8,Se=pt(o),W=(i,l={})=>({store:e.store,graph:i,ucRef:e.ucRef,sections:F,by:e.by,phase:Se,payloadDigest:u,lineage:2,...l,...e.templateVersion?{templateVersion:e.templateVersion()}:{},...E.length?{droppedCriterionCites:E}:{},...e.engine?{engine:e.engine}:{},...s?.length?{forceScope:s}:{},...e.because?{reason:e.because}:{},finalizeTestBody:(()=>{let S=new Map((F.tests??[]).map(N=>[N.temp_ref,N])),y=new Map,O=(N,U,me)=>{let ae=S.get(N);if(!ae?.test_md_blob)return null;let J=y.get(N);if(J!==void 0)return J;if(me.has(N))return ae.test_md_blob;me.add(N);let De=new Map;for(let fe of ae.reuses??[]){O(fe,U,me);let Ee=U(fe);Ee!==null&&Ee!==fe&&De.set(fe,Ee)}let ge=ae.verifies.map(U).filter(fe=>fe!==null),Oe=Dt(ae.test_md_blob,De),{md:Ne,tagged:pe}=Rt(Oe,U),ce=pe?Ne:At(Oe,ge);return xt(ce,ge),y.set(N,ce),ce};return(N,U)=>{if(!N.test_md_blob)return null;let me=O(N.temp_ref,U,new Set)??N.test_md_blob;if(me===N.test_md_blob)return null;let ae=J=>{for(let De of S.keys())if(U(De)===J){let ge=O(De,U,new Set);if(ge!==null)return{body:ge,cycleKey:`batch:${J}`,next:ae}}return Ze(P)(J)};return{test_md_blob:me,definitionId:Je(Xe(me,ae))}}})()}),b,x=[],be=[];if(e.protocol){let i=e.generationTicket,l=await cn(e.protocol,{verb:"design",ucTargets:[{ref:e.ucRef}],newBuCandidates:[],sourcePins:[],readBasis:P.latestHash,...f?{eventIds:[f]}:{},...i?{generationTicket:i}:{}},S=>{let y=ct(W(S.graph,{eventIds:S.eventIds("design",1),sid:S.sid,...i&&!e.generationStamped?{generationTicket:i}:{}}));return y.errors!==null?(x=y.warnings,be=y.droppedBlockers??[],{errors:y.errors}):{result:y,record:y.record}});l.ok&&"result"in l?(b=l.result,i&&!e.generationStamped&&b.record!==null&&(e.generationStamped=!0,e.generationTicket={...i,expected_prev_gen:i.next_gen})):l.ok?b={record:null,errors:null,minted:{},logicalIds:{},superseded:[],warnings:["commit already applied (recommit)"],finalizedTests:{}}:b={record:null,errors:l.kind==="validation"?l.errors:l.kind==="contended"?[{code:l.err.code,detail:`${e.ucRef} is held by ${l.err.holder?.owner_sid??"another session"}${l.err.holder?.alive?" (live)":" (stale)"} \u2014 try another use-case or wait for it to free`}]:l.kind==="drifted"?l.asks.map(y=>({code:"DRIFTED",detail:y.detail})):[{code:"UNSETTLED",detail:`concurrent activity kept moving the store (${l.attempts} attempts) \u2014 retry when the store is quieter`}],minted:{},logicalIds:{},superseded:[],finalizedTests:{},warnings:l.kind==="validation"?x:[],...l.kind==="validation"&&be.length?{droppedBlockers:be}:{}}}else b=ct(W(P));if(b.errors){if((b.droppedBlockers?.length??0)>0&&b.errors.every(l=>l.code==="EMPTY_DESIGN")){for(let y of b.warnings)e.trace?.("design_warning",{warning:y});if(he().phaseNotesUnderAdded!==!0)for(let y of b.warnings)e.note(`warning: ${y}`);e.nothingCommitted?.();let l=new Set((s??[]).filter(y=>P.nodeLabel.get(y)==="gap"));return{proposal:null,error:null,receipt:nt({verb:"design",commitN:t,ucRef:e.ucRef,typedBlockers:ee,phase:Se,committed:[],warnings:b.warnings,streamWarnings:[],...l.size?{ignoreGaps:l}:{}},P)}}let i=b.errors.map(l=>`${l.code}: ${l.detail}`).join("; ");return e.trace?.("design_commit_failed",{phase:Se,codes:[...new Set(b.errors.map(l=>l.code))],detail:i}),_("design commit failed: "+i)}let H=Date.now();e.trace?.("design_phase_committed",{phase:Se,ms:H-r,acs:o.acs?.length??0,scenarios:o.scenarios?.length??0,tests:o.tests?.length??0,gaps:o.gaps?.length??0,...b.unchanged?{unchanged:!0}:{}}),r=H;let ue=b.warnings.filter(i=>i.includes("\u2014 committed anyway; approve")),xe=new Map(Object.entries(b.minted).map(([i,l])=>[l,i])),z={test:i=>b.logicalIds[i]??null,criterion:i=>P.displayNameOf(i)??b.logicalIds[xe.get(i)??""]??null,title:i=>{let l=o.acs?.find(S=>S.temp_ref===xe.get(i));return String(o.tests?.find(S=>S.temp_ref===i)?.title??P.getNode(i)?.content.text??l?.text??"untitled")}},Y=b.awaitingApproval??[],$e=Vn(b,z),se=he().phaseNotesUnderAdded===!0,ye=se?b.warnings.filter(i=>i.startsWith("CITE_MISSING: ")||i.startsWith("CITE_DROPPED: ")):[],Ae=!1,oe=null,ve=[];for(let i of b.warnings)e.trace?.("design_warning",{warning:i});for(let i of b.modelWarnings??[])e.trace?.("design_warning",{warning:i});if(b.lineage&&e.trace?.("design_lineage",b.lineage),!se){for(let l of b.warnings)ue.includes(l)||e.note(`warning: ${l}`);let i=dt(Y,z,{command:e.approveByCommand===!0});if(i)for(let l of i.split(`
|
|
356
|
+
`))e.note(l)}e.aliases?.(Object.entries(b.minted).map(([i,l])=>({ref:i,cid:l,...b.logicalIds[i]?{id:b.logicalIds[i]}:{}})),b.unchanged&&se?{unchanged:!0}:void 0);let Be=()=>{let i=ls(b.record?[b.record]:[],K(e.store));return i.added+i.updated},Ie=()=>he().text("chat.added_design",{acs:o.acs?.length??0,scenarios:o.scenarios?.length??0,tests:e.update?Be():o.tests?.length??0,gaps:o.gaps?.length??0,linked:new Set((o.exercises??[]).map(i=>i.scenario)).size,...e.update?{update:!0}:{}});se||(e.commitLine??e.note)(Ie());let te;try{te=K(e.store),e.onCommitted?.(te);for(let l of de){let S=b.logicalIds[l.anchorRef]??b.minted[l.anchorRef];lt(e.store,b.finalizedTests[l.tempRef]??l.definitionId,{...l.rationale,anchor:S??l.rationale.anchor})}let i=te;_s(e,i,Object.values(b.minted).filter(l=>i.getNode(l)?.label==="test")),ys(e,o,se?l=>ve.push(l):e.note),qs(e,o,b.logicalIds),Ae=!0}finally{oe=()=>{if(!se)return;for(let S of ye)ve.push(`warning: ${S}`);let i=dt(Y,z);i!==null&&ve.push(i);let l=b.unchanged?he().text("note.phase_unchanged",e.update?Gs(o):{}):Ie();if(e.commitLine)e.commitLine(l,ve,...b.unchanged?[{quiet:!0}]:[]);else for(let S of[l,...ve])e.note(S)},Ae||oe()}try{f&&e.markHandled?.(f),e.event?.({type:"commit",acs:o.acs?.length??0,scenarios:o.scenarios?.length??0,tests:o.tests?.length??0,gaps:o.gaps?.length??0,warnings:$e.length,...Y.length>0?{awaiting_approval:Hn(Y,z)}:{},minted:Object.entries(b.minted).map(([y,O])=>({temp_ref:y,cid:O,...b.logicalIds[y]?{logical_id:b.logicalIds[y]}:{}}))}),t+=1,b.record&&m.set(u,{record:b.record,commitN:t}),s!==null&&(s=b.forceScopeRemaining??s,e.onForceScope?.(s));let i=new Set((s??[]).filter(y=>te.nodeLabel.get(y)==="gap")),l=nt({verb:"design",commitN:t,ucRef:e.ucRef,typedBlockers:ee,...i.size?{ignoreGaps:i}:{},phase:Se,committed:Object.entries(b.minted).map(([y,O])=>({temp_ref:y,cid:O,...b.logicalIds[y]?{logical_id:b.logicalIds[y]}:{}})),warnings:[...b.modelWarnings??[],...b.warnings],streamWarnings:$e},te),S=gs(o,l,ee,b.droppedBlockers??[]);return{proposal:b,error:null,receipt:l,...S?{sessionComplete:S}:{}}}finally{oe?.()}}}}function ws(e,t){return{type:"run_config",version:1,session_id:t.session_id,mode:t.mode,source:{source_id:`design:${e.usecase.logical_id??t.ucCid.slice(0,19)}`,source_cid:t.ucCid,kind:"design_context",numbered_text:cs({...e,session_mode:t.mode})},existing_use_cases:[],read_basis:t.readBasis,max_free_text_rounds:2,graph_reads:!0,verb:"design",chat:!0,design_budget:e.budget,topology:t.topology}}var ft=Object.entries(Qn),Ws=e=>e==="scenario"?"the scenarios phase":"the tests phase";function zs(e,t){let r=ft.reduce((c,[_],f)=>t.includes(_)?f:c,-1),s=ft[Math.min(r+1,ft.length-1)][1],m=[...new Set(e.map(c=>Ws(c.label)))].sort((c,_)=>c==="the scenarios phase"?-1:_==="the scenarios phase"?1:0);return["EDIT REFUSED (design again) \u2014 nothing landed; do not assume any of your last ops applied.",...e.map(c=>`- ${c.target}: this redesign replaces it through its phases, so it isn't edited in a chat.`),`The open phase is ${s}: propose it with finalize_design, then each phase after it in turn. Acceptance criteria can still be edited in a chat.`,`If the person asked for this change, tell them it lands in ${m.join(" and ")}, and make it there.`].join(`
|
|
357
|
+
`)}function ks(e){let t=null;return r=>{let s=K(e.store);t??=e.landed().length===0?ze(s,e.ucRef,{blockerGaps:e.blockerGaps()}):[];let m=r.filter(o=>o.kind==="edit"||o.kind==="enhance");if(m.length===0)return null;let c=e.remainder()??t;if(c.length===0)return null;let _=new Set(c.map(o=>s.tipOf(o))),f=m.flatMap(o=>{let w=s.resolve(o.target),k=w?s.tipOf(w.cid):null;return k!==null&&_.has(k)?[{target:o.target,label:s.nodeLabel.get(k)??""}]:[]});return f.length===0?null:zs(f,e.landed())}}function Ys(e,t,r,s){return{terminalEventType:"design",async onProposalEvent(m){let c=m??{},_=["acs","scenarios","tests","gaps"].map(f=>c[f]?.length?`${c[f].length} ${f}`:null).filter(Boolean).join(" \xB7 ");return r?.("plan_payload",{payload:c}),e(`plan: finalize_design \u2014 ${_||"wiring/judgements only"} (nothing committed${s?`; full payload: ${st(s)}`:""})`),t?.({type:"plan",payload:c}),{proposal:c,error:null}}}}function Js(e,t){let r=Jt(e,t);return r<=tt?null:he().text("MESSAGE_TOO_LARGE",{bytes:r,max:tt})}function Xs(e,t,r){let s=e.statement??e.agentStatement??(e.becauseAsked?e.because:void 0);if(!s||e.resume)return{initialMessage:t};let m=[t,s].filter(Boolean).join(`
|
|
358
|
+
|
|
359
|
+
`),c=Js(m,r);return c?{initialMessage:t,error:e.statement?c:he().text("REASON_TOO_LARGE",{})}:!e.statement&&(!t||e.agentStatement)?{initialMessage:m,unannounced:!0}:{initialMessage:m}}function Zs(e,t){return{...e,force:!0,because:e.because??t,becauseAsked:!0}}var ht=ut.filter(e=>e!=="grounding").length,Ss="[kane] nothing from this session is saved yet \u2014 none of its finalizes landed, whatever your history holds. Finalize again from this session's first phase.";function Ve(e){let t=e.design_phase;return t==null||typeof t.phase!="string"?null:{phase:t.phase,...t.completeness!==void 0?{completeness:t.completeness}:{}}}function ei(e){return`design-${e.toISOString().replace(/[-:]/g,"").slice(0,15)}-${Hs(4).toString("hex")}`}async function qr(e,t){let r=t.nested&&t.chat?.enterNested?t.chat.enterNested("opening the design\u2026"):null;try{return await ti(e,t)}finally{r?.()}}async function ti(e,t){let r=_n(t.emit);t={...t,emit:r.emit};let s=()=>r.failed(),m=n=>t.emit?.(n),c=he(),_=!1;if(e.sessionId!==void 0){let n=kt(t.store.sessions(),e.sessionId,e.resume);if(n!==null){let a=`error: the session id given for this run is refused: ${n}`;return t.out(a),m({type:"error",message:a,code:"SESSION_ID_REFUSED",final:!0}),2}}let f=t.store,o=K(f);if(e.useCase!==void 0){let n=Ot(o,e.useCase);if(n!==null){let a=`error: ${n}`;return t.out(a),m({type:"error",message:a,code:"AMBIGUOUS_REF",final:!0}),2}e={...e,useCase:It(o,e.useCase)}}let w;if(e.resume&&e.useCase)try{w=f.sessions().peek(e.resume)?.use_case}catch{w=void 0}let k=Gn(o,{useCase:e.useCase,resuming:!!e.resume,sessionUseCase:w,allowUnreviewed:e.allowUnreviewed}),$=k!==null&&Wn(k);if(k&&!($&&e.confirmUnreviewed&&await e.confirmUnreviewed(k))){let n=`design: ${k.detail}`;t.out(k.reviewCmd!==void 0?`${n} (${k.reviewCmd})`:n);let a=(g,R)=>c.command(g,R)??{code:g,facts:R},d=a("next.review_use_case",{use_case:k.ref});return m({type:"error",code:k.code,message:n,final:!0,next:$?[d,a("next.design_unreviewed",{use_case:k.ref})]:[d]}),2}let u=null,A=null,X=0,P=[],Z=null,p=e.useCase;if(e.resume){try{{let v=await Tn(t.store,e.resume,o,{deps:{onWarn:B=>t.out(`note: ${B}`),ownActors:$n(t.by)}});A=v,u=v.handle,X=v.view.agent?.usage_total?.credits??0,t.chat?.creditsSoFar?.(X),v.drift.length>0&&(t.out(`note: sources changed since the pause: ${v.drift.map(B=>B.subject).join(", ")} \u2014 the design continues against the current versions`),t.emit?.({type:"stale_basis",sources:v.drift.map(B=>B.subject)}))}}catch(v){if(v instanceof wt||v instanceof at)return t.out(`error: ${v.message}`),m({type:"error",message:`error: ${v.message}`,code:v.code,final:yn(v.code)}),v instanceof at||v.code==="SESSION_MISSING"||v.code==="SESSION_EXPIRED"?2:1;throw v}let n=u.state,a=un(n.verb,"design",e.resume);if(a)return t.out(a.message),m({type:"error",message:a.message,code:a.code,final:!0}),u.release(),2;if(p&&n.use_case&&p!==n.use_case){let v=`session ${e.resume} was designing ${n.use_case}; --use-case ${p} RETARGETS it`;if(!(e.confirmRetarget?await e.confirmRetarget(`${v} \u2014 continue with the new target?`):!1))return t.out(`error: ${v} \u2014 resume without --use-case to continue ${n.use_case}, or start a fresh session on ${p}`),m({type:"error",code:"RETARGET_MISMATCH",message:v,final:!0}),u.release(),2}if(p=p??n.use_case,n.uc_tip&&p){let v=o.resolve(p)?.tip;if(v&&v!==n.uc_tip){let B=`the use-case changed since the pause (${n.uc_tip.slice(0,19)}\u2026 \u2192 ${v.slice(0,19)}\u2026)`;if(!(e.confirmRetarget?await e.confirmRetarget(`${B} \u2014 re-ground and continue against the new version?`):!1))return t.out(`error: ${B} \u2014 resume interactively to re-ground, or abandon this session`),m({type:"error",code:"UC_TIP_MOVED",message:B,final:!0}),u.release(),2;t.emit?.({type:"stale_basis",usecase:p})}}let d=Yn(o,n.target_pins);if(d.length>0){let v=`items this session pinned have changed since it paused: ${d.map(ne=>`${ne.ref}${ne.now===null?" (now gone)":""}`).join(", ")}`;if(!(e.confirmRetarget?await e.confirmRetarget(`${v} \u2014 re-ground and continue?`):!1))return t.out(`error: ${v} \u2014 resume interactively to re-ground, or abandon`),m({type:"error",code:"TARGET_PIN_MOVED",message:v,final:!0}),u.release(),2;u.save({target_pins:(n.target_pins??[]).map(ne=>({ref:ne.ref,cid:o.resolve(ne.ref)?.tip??ne.cid}))})}let g=[...new Set([...u.state.held_receipts??[],...A?.view.kane?.held_receipts??[]])];P=g,g.length>0&&(t.chat?.holdReceipt||(_=!0),t.chat?.holdReceipt?t={...t,heldAtSpawn:g}:t={...t,initialMessage:[g.join(`
|
|
360
|
+
|
|
361
|
+
`),t.initialMessage].filter(Boolean).join(`
|
|
362
|
+
|
|
363
|
+
`)});let R=u.state.conv_source||A?.base.conv_source,C=A?A.view.kane?A.view.kane.store_watermark:A.base.store_watermark:null;Z=C;let G=A&&R?Xt(t.store,R,C,A.view.agent?.delta_items??[],A.view.kane?.sent_unread??[]):[];if(G.length>0){_=!0,t={...t,redeliverAtSpawn:G};let v=An(G.length);t.chat?t.chat.note(v):t.out(v)}if(!p)return t.out(`error: session ${e.resume} predates use-case persistence \u2014 re-supply --use-case <ref>`),m({type:"error",message:`error: session ${e.resume} predates use-case persistence \u2014 re-supply --use-case <ref>`,code:"SESSION_NO_USE_CASE",final:!0}),u.release(),2}p&&f.prefetch(Ft(o,p),{token:null});let q=e.resume?void 0:e.phase,re=!1;if(q!==void 0){let{checkPhaseEntry:n,phaseLadderFor:a}=await import("./phase-seed-LCJ4WSYV.js");re=a(f,o,p).length>0;let d=n(f,o,p,q);if(!d.ok&&d.code==="UNKNOWN_PHASE")return t.out(`error: ${d.message}`),m({type:"error",code:"UNKNOWN_PHASE",message:d.message,final:!0}),u?.release(),2;if(!d.ok&&d.code==="PHASE_ORDER"){let g=e.askPhaseEntry?await e.askPhaseEntry({message:d.message,earliest:d.earliest}):"cancel";if(g==="earliest")t.out(`starting at ${d.earliest} instead (${d.missing.join(", ")} not committed yet)`),q=d.earliest;else if(g==="proceed")t.out(`note: entering at ${q} with ${d.missing.join(", ")} uncommitted \u2014 proceeding on your say-so`),t.emit?.({type:"phase_entry_override",phase:q,missing:d.missing});else{let R=(e.mode??"interactive")==="agent";return t.out(`error: ${d.message}`),m({type:"error",code:"PHASE_ORDER",final:!0,message:d.message,next:[Te(c,"next.design_phase",{use_case:p,phase:d.earliest,agent_mode:R},{why:`${d.earliest} is the earliest uncommitted phase for ${p}`,title:`Start at ${d.earliest}`})]}),u?.release(),2}}}let Q=!!(e.force||u?.state.force),de=!!(e.resume&&u),L=Ln(o,p,Q||de||re);if(!L.ok){let n=(e.mode??"interactive")==="interactive";if(L.wall&&n&&e.askDesignEntry){let{captureForceScope:a}=await import("./design-committer-TRYP3LOZ.js"),d=a(o,p).length,g=await e.askDesignEntry({wall:L.wall.kind,message:L.message,display:L.wall.display,impactPairs:d});if(g.pick==="redesign"||g.pick==="proceed"){if(!g.because.trim())return t.out("a redesign needs a reason (--because) \u2014 nothing executed"),u?.release(),2;t.out(g.pick==="redesign"?`redesigning ${L.wall.display} (${d} pair(s) superseded, with any typed blocker gaps standing in for their tests) \u2014 because: ${g.because.trim()}`:`proceeding against the stale design (noted) \u2014 because: ${g.because.trim()}`),e=Zs(e,g.because.trim()),Q=!0}else return g.pick==="view"?(t.out(c.text("note.view_design",{use_case:L.wall.display})),u?.release(),0):g.pick==="refresh"?(t.out(c.text("note.evolve_first",{use_case:L.wall.display})),u?.release(),0):(t.out(c.text("note.nothing_executed",{})),u?.release(),0)}else{t.out(`design: ${L.message}`);let a=L.wall&&e.mode==="agent"?[Te(c,"next.view_design",{use_case:L.wall.display},{why:"view the existing design",title:"View the design"}),...L.wall.kind==="designed-stale"?[Te(c,"next.evolve_design",{use_case:L.wall.display},{why:"the use-case moved since the design \u2014 evolve refreshes it",title:"Evolve the design"})]:[],Te(c,"next.redesign",{use_case:L.wall.display},{why:"redesign \u2014 supersedes the live scenario+test pairs",title:"Redesign"})]:void 0;return m({type:"gate_refused",message:L.message,final:!0,...a?{next:a}:{}}),u?.release(),L.code}}if(t.preflightTurn){let n=await t.preflightTurn();if(!n.ok)return t.out(n.message??"error: turn-endpoint preflight failed"),m({type:"error",message:n.message??"error: turn-endpoint preflight failed",code:"PREFLIGHT",final:n.final===!0}),u?.release(),2}let _e=t.similarity??ln(),h=_e.calls(()=>({env:process.env,auth:t.auth})),E={store:t.store,resolveAlias:n=>h.resolveAlias(n),embed:(n,a)=>h.embed(n,a)};t.chat?.setWorking?.("assembling context\u2026");let T=t.projectDir===null?new Map:Lt(qt(t.projectDir)),I=[],M=[],F=await as(f,p,{max:e.max,strength:e.strength,embedSearch:E,variablesIndex:T});if(e.priorDesign!==void 0&&(F.prior_design=e.priorDesign),e.changeDelta!==void 0&&(F.change_delta=e.changeDelta),e.because&&(F.because=e.because),q!==void 0){let{buildPhaseSeed:n}=await import("./phase-seed-LCJ4WSYV.js"),a=n(f,o,p,q);F.prior_design===void 0&&a.priorDesign!==void 0&&(F.prior_design=a.priorDesign),F.entry_phase=q,a.phaseLadder.length>0&&(F.phase_ladder=a.phaseLadder)}let ee=t.now?.()??new Date,Se=ei(ee).slice(7),W=e.mode??"interactive",b=W==="interactive"&&!!t.chat&&!t.nested,x=A?{...A.spawnConfig,mode:W}:ws(F,{session_id:e.resume??e.sessionId??`design-${Se}`,mode:W,ucCid:F.usecase.cid,readBasis:o.latestHash,topology:wn("design")});e.resume&&(e.message||_)&&(x.resend_open_ask=!1);let be={current:null};if(x.resume&&"schema"in x.resume){let n=x.resume.binding?.template_version;typeof n=="string"&&(be.current=n,t.onTemplateVersion?.(n))}e.plan?x.chat=!1:x.chat=!0;let H=t.telemetry?.enabled?t.telemetry:void 0,ue=nn({telemetryIds:H?.ids,provider:t.tracePath,verb:"design",storeLocalPath:t.store.logFile(`design-${Se}.log`)}),xe=sn(ue,st);ue&&Us(Ks(ue),{recursive:!0}),b||t.out(`trace: ${xe}`),t.emit?.({type:"run_start",mode:W,trace:ue,use_case:p,...H?{session:H.ids.session_id}:{}});let z=(n,a,d)=>{if(ue)try{Vs(ue,JSON.stringify({ts:new Date().toISOString(),level:n==="error"?"error":"info",run_id:H?.ids.operation_id,...H?{user_session_id:H.ids.session_id}:{},kind:n,session_id:d,data:a})+`
|
|
364
|
+
`)}catch{}H?.wireTrace(n,a,d)};dn(_e,z);{let n=t.out;t={...t,out:a=>{z("transcript",{line:a}),n(a)}}}let Y=[],$e=!1,se=e.resume?null:f.head();if(e.resume&&u){A||(x.resume={agent_state:u.state.agent_state});let n=!!(c.header&&t.chat),a=!1;n||t.out(`resuming design session ${e.resume}`),u.state.assumed.length>0&&t.out(c.text("note.assumed_defaults",{sid:u.state.sid,count:u.state.assumed.length}));try{let d=A?f.parse(A.base.store_watermark):null;se=d!==null&&f.resolveToken(d)!==null?d:null,Y=f.recordsSince(se).filter(R=>R.sid===e.resume&&Ve(R)!==null),$e=!0;let g=Y.map(R=>Ve(R));if(n){let R=String(F.usecase.content.title??F.usecase.logical_id??p),C=Kn(g.map(G=>G.phase));t.chat.ledger?.({kind:"header",...c.header("header.resume_design",{use_case:R,done:C,phases:ht}),...C<ht?{phase:C+1}:{}}),a=!0}if(g.length>0){let R=g.map(ie=>`${ie.phase}${ie.completeness==="partial"?" (partial)":""}`).join(" \u2192 "),C=Z!==null?f.parse(Z):null,G=new Set(f.recordsSince(C!==null&&f.resolveToken(C)!==null?C:se).map(ie=>ie.seq)),v=String(A?.view.agent?.binding?.template_version??""),B=Y.map((ie,He)=>G.has(ie.seq)?je(ie,K(f),{verb:"design",commitN:He+1,ucRef:p,typedBlockers:le(v)>=8}).text:null).filter(ie=>ie!==null&&!P.some(He=>He.includes(ie.split(`
|
|
365
|
+
`)[0]))),ne=[`[kane] durable record for this session (${e.resume}) on ${p}: design phases already COMMITTED \u2014 ${R}. Those finalizes landed; do not re-send them. Continue from the next uncommitted phase, or finish if the design is complete.`,...B].join(`
|
|
366
|
+
|
|
367
|
+
`);t.chat?.holdReceipt&&Ce(A?.view.agent?.delta_items??[])?t={...t,heldAtSpawn:[...t.heldAtSpawn??[],ne]}:t={...t,initialMessage:[t.initialMessage,ne].filter(Boolean).join(`
|
|
368
|
+
|
|
369
|
+
`)}}else t.chat?.holdReceipt&&!t.redeliverAtSpawn?.length&&Ce(A?.view.agent?.delta_items??[])&&(t={...t,heldAtSpawn:[...t.heldAtSpawn??[],Ss]})}catch{}n&&!a&&t.out(`resuming design session ${e.resume}`),e.message&&(t={...t,initialMessage:[t.initialMessage,e.message].filter(Boolean).join(`
|
|
370
|
+
|
|
371
|
+
`)})}if(!e.resume&&c.header&&t.chat){let n=ut.filter(g=>g!=="grounding"),a=q===void 0?0:Math.max(0,n.indexOf(q)),d=F.usecase.content.title;t.chat.ledger?.({kind:"header",...c.header("header.design",{title:typeof d=="string"&&d!==""?d:null,id:String(F.usecase.logical_id??p),phases:ht-a}),phase:a+1})}let ye=u?.state.force_scope;if(de&&u?.state.force&&Y.length>0){let n;for(let a=Y.length-1;a>=0&&n===void 0;a--)n=zn(f,Y[a]);if(n===null)t.out("warning: this store keeps no record of what the forced redesign left of the old generation; old scenarios and tests not yet replaced may stay live");else if(n!==void 0){let a=ye;ye=a===void 0?n:n.filter(d=>a.includes(d))}}{let n=Xs(e,t.initialMessage,x.session_id);if(n.error)return t.out(n.error),m({type:"error",message:n.error,code:"MESSAGE_TOO_LARGE",final:!1}),u?.release(),2;n.initialMessage!==t.initialMessage&&(t={...t,initialMessage:n.initialMessage,...n.unannounced?{initialMessageUnannounced:!0}:{}})}let Ae=null,oe={current:o},ve={detach:null},Be=()=>{let n=ve.detach;ve.detach=null,n&&n()},Ie=(n,a)=>{let d=u;if(!d)return{};let g=n.ask,R=fn({store:t.store,credentials:n.credentials,onRefusal:n.onIngestRefusal,handle:d,note:C=>n.chat?n.chat.note(C):n.out(C),graphSlot:a,...n.now?{now:n.now}:{}});if(n.chat?.attachIngest){let C=n.chat;ve.detach=C.attachIngest(async G=>{try{d.save({ingest_registry:rt(d.state.ingest_registry,G,n.now?.()??new Date)});let v=await R({id:`attach-${d.state.sid}-${(d.state.ingest_registry??[]).length}`,ref:G,purpose:null});return v.ok?(C.deferBatch({source_id:v.result.source_id,cid:v.result.cid}),{ok:!0}):{ok:!1,error:v.error.message}}catch(v){return{ok:!1,error:v instanceof Error?v.message:String(v)}}})}return{ask:async C=>{let G=await g(C);if(Array.isArray(G)){let v=G.filter(B=>{if(B.free_text==null||B.free_text.trim()==="")return!1;let ne=C.find(ie=>ie.id===B.id);return B.selected_index!=null&&ne?.options[B.selected_index]?.input===!0}).map(B=>B.free_text.trim());if(v.length>0){let B=d.state.ingest_registry;for(let ne of v)B=rt(B,ne,n.now?.()??new Date);d.save({ingest_registry:B})}}return G},ingest:R}};t.nested||t.chat?.attachOnCommitted?.(n=>{oe.current=n});let te="";if(t.chat&&!e.plan&&!t.nested){let n=Zt({store:t.store,graph:K(t.store),sessionStamp:x.session_id,by:t.by??{kind:"human",id:"owner"}});n.errors===null||n.errors[0]?.code==="CONV_SOURCE_EXISTS"?(te=n.sourceId,t.chat.attachConversationSource?.(te),oe.current=K(f)):t.out(`warning: notes you add in chat can't be saved to the context this session (${n.errors[0]?.detail})`)}let i=K(f),l=on(i,p),S=Tt(i,p),y=S!==null&&We(i,S)!==null,O=y&&!Bn(i,S),N,U=!1;if(!e.plan){let n=l;if(de&&n!==null&&n.live){let a=i.resolve(p),d=rn(i,a.cid);U=!Q||!$e||Y.some(g=>g.design_generation?.uc_root===d),N=U?{uc_root:d,next_gen:n.gen,expected_prev_gen:n.gen}:{uc_root:d,next_gen:n.gen+1,expected_prev_gen:n.gen,because:e.because??"forced redesign (--force)"}}else{let a=an(i,p,{...Q?{force:!0}:{},because:e.because??(Q?"forced redesign (--force)":void 0)});if("error"in a)return t.out(`design: ${a.error.detail}`),m({type:"gate_refused",message:a.error.detail,code:a.error.code,final:!0}),u?.release(),2;N=a}}let me=f.locks(x.session_id),ae=null,J=()=>{try{ae?.release()}catch{}};if(!e.plan)try{ae=me.acquire([Pt(i,p).key],{hold:"session",verb:"design"})}catch(n){if(n instanceof Nt&&n.code==="UC_HELD"){let a=n.holder,d=c.text("UC_HELD",{use_case:p,...a?.owner_sid!==void 0?{owner_sid:a.owner_sid}:{},stopped:a?.alive===!1});return t.out(d),m({type:"error",code:"UC_HELD",message:d,final:!1}),u?.release(),2}throw n}let De={store:t.store,rootSid:x.session_id,locks:me,probe:{batchSimilar:async()=>({hits:[],degraded:!1,probeBasis:null}),recheckLocal:()=>({hits:[],uncachedNewNodes:[]})}},ge=!e.plan&&W!=="ci",Oe=()=>Object.fromEntries((o.resolve(p)?o.edgesInto(o.resolve(p).tip):[]).filter(n=>n.type==="DERIVES"&&typeof n.props.source_id=="string").map(n=>[String(n.props.source_id),o.heads.get(String(n.props.source_id))??null]));if(!u&&!e.plan&&e.registerSession)try{await e.registerSession(x.session_id)}catch(n){throw J(),n}let Ne=!1;ge&&!u&&(Ne=!0,u=f.sessions().create({sid:x.session_id,mode:"agent",created_at:ee.toISOString(),expires_at:Ye(ee),agent_state:{schema:2,items:[],provider_state:""},pending:{questions:[],proposals:[]},read_basis:Oe(),assumed:[],corpus_cursor:{remaining:[]},conv_source:te,target_pins:o.resolve(p)?[{ref:p,cid:o.resolve(p).tip}]:[],verb:"design",use_case:p,...o.resolve(p)?.tip?{uc_tip:o.resolve(p).tip}:{},...Q?{force:!0}:{},...H?{user_session_id:H.ids.session_id}:{}}));let pe;if(ge&&u){let{resume:n,...a}=x;f.sessions().initCheckpoints(x.session_id,{schema:jt,kind:"base",sid:x.session_id,verb:"design",mode:W,created_at:ee.toISOString(),run_config:a,conv_source:te||u.state.conv_source||"",...p?{use_case:p}:{},...o.resolve(p)?.tip?{uc_tip:o.resolve(p).tip}:{},store_watermark:t.store.serialize(t.store.head())}),x.checkpoints=!0,e.resume&&z("resume_kind",{kind:A?A.view.pointer===null?"bare-base":A.view.pointer.at==="final"?"pause":"crash":"v1-shim"},x.session_id);let d=A?0:u.state.checkpoint?.seq??0,g=u;pe=Cn({store:t.store,handle:g,seqBase:()=>d,awaits:(C,G)=>{let v=Sn(x.session_id,te||null,C,G);return Ee.commit=v?.event_id??null,v?.event_prefix&&t.chat?.opIdPrefix?.(v.event_prefix.slice(0,-1)),v},peekHeldReceipts:()=>t.chat?.peekHeldReceipts?.()??[],readBasis:()=>Oe(),corpusCursor:()=>({remaining:[]}),onSoftCap:C=>t.out(C),onStat:C=>z("ckpt_stat",C,x.session_id),...t.now?{now:t.now}:{}});let R=pe;pe={...R,persist:(C,G)=>{let v=C.binding?.template_version;return typeof v=="string"&&v&&(be.current=v,t.onTemplateVersion?.(v)),R.persist(C,G)}}}!ge&&!e.plan&&(x.checkpoints=!0,pe={persist:n=>{let a=n.binding?.template_version;return typeof a=="string"&&a&&(be.current=a,t.onTemplateVersion?.(a)),{seq:n.seq,turn_id:n.turn_id,at:n.at,ts:new Date().toISOString(),full_seq:null}}});let ce=()=>{if(!u)return;let n=u.state.checkpoint;if(n){let a={verb:"design",sid:u.state.sid,...W!=="interactive"?{mode:W}:{},seq:n.seq,ts:n.ts};t.out(c.text("note.session_kept",a)),u.release()}else if(Ne){try{u.complete(s())}catch{u.release()}f.sessions().tidy()}else u.release();u=null};ye?.length&&t.onForceScope?.(ye);let fe=new Map,Ee={commit:null};Y.forEach((n,a)=>{let d=n.design_phase?.payload_digest;typeof d=="string"&&fe.set(d,{record:n,commitN:a+1})});let _t=e.plan?Ys(t.out,t.emit,z,ue??void 0):vs({templateVersion:()=>be.current,store:f,projectDir:t.projectDir,...e.changeDelta!==void 0?{update:!0}:{},...t.testFilesAt?{testFilesAt:t.testFilesAt}:{},ucRef:p,by:{kind:"ai",id:"design-agent"},force:Q,engine:"design@1",note:n=>t.chat?t.chat.note(n):t.out(n),...t.chat?{}:{approveByCommand:!0},trace:(n,a)=>z(n,a),commitLine:(n,a,d)=>{if(t.chat)t.chat.ledger({kind:"commit",ok:!0,line:n,...a?.length?{notes:a}:{},...d?.quiet?{quiet:!0}:{}});else for(let g of[n,...a??[]])t.out(g)},steer:t.chat?n=>t.chat.repair(n):void 0,event:t.emit,variablesIndex:()=>T,onVariablesDeclared:n=>{I.push(...n);for(let a of n)T.set(a.name,{has_value:!1,source:a.file})},onNoStartPage:(n,a)=>{let d=M.filter(g=>!a.includes(g.test));M.splice(0,M.length,...d,...n)},resuming:de,...ye?.length?{forceScope:ye}:{},onForceScope:n=>{Ae=n,t.onForceScope?.(n)},...e.because?{because:e.because}:{},aliases:t.chat?(n,a)=>t.chat.registerAliases?.(n,a):void 0,nothingCommitted:t.chat?()=>t.chat.nothingCommitted?.():void 0,onCommitted:n=>{oe.current=n},protocol:De,...N?{generationTicket:N}:{},...de&&U?{generationStamped:!0}:{},...fe.size>0?{committedFinalizes:fe}:{},phasesBefore:Y.length,ownPhasesRead:$e,awaited:Ee,...u?{markHandled:n=>u?.markApplied([n])}:{}});t.chat||(z("design_budget",{max_pairs:F.budget.max_pairs??null,strength:F.budget.strength_override??null}),t.out(`designing: ${F.usecase.logical_id??p}`));let Pe=A?.view.agent?.delta_items??[],Re=A?.view.kane?.awaits,qe=!!(A&&Re&&Ce(Pe)&&!Rn(t.store,u?.state.applied_events??[],Re)),bt=!!(A&&!qe&&Ce(Pe)&&Dn(t.store,u?.state.applied_events??[],Re));if((qe||bt)&&Re){let n=qe?xn(Re.call):En();t.chat?t.chat.note(n):t.out(n),x.resend_last_output=!0,Ee.commit=Re.event_id??null,Re.event_prefix&&t.chat?.opIdPrefix?.(Re.event_prefix.slice(0,-1))}let yt=qe||bt;if(A&&W!=="interactive"&&!e.message&&!yt&&!t.redeliverAtSpawn?.length&&Ce(Pe)){let n=Y.at(-1),a=String(A.view.agent?.binding?.template_version??""),d=le(a)>=8,g=n?je(n,K(f),{verb:"design",commitN:Y.length,ucRef:p,typedBlockers:d}):null;if(n!==void 0&&g!==null&&fs(n,g,d)){let{initialMessage:C,...G}=t;t={...G,completeAtSpawn:!0}}else t.initialMessage||(t={...t,initialMessage:Ss})}let vt=!!A&&!t.initialMessage&&!yt&&!t.redeliverAtSpawn?.length&&(Ce(Pe)||bn(Pe));t.chat?.setWorking?.(`designing ${F.usecase.logical_id??p}\u2026`);let Rs=Q&&t.chat?.guardOps?t.chat.guardOps(ks({store:f,ucRef:p,remainder:()=>Ae??ye??null,landed:()=>f.recordsSince(se).filter(n=>n.sid===x.session_id&&Ve(n)!==null).map(n=>Ve(n).phase),blockerGaps:()=>le(be.current)>=8})):null,D;try{D=await it(x,{...t,similarity:_e,graphSlot:oe,...Ie(t,oe),...pe?{checkpoint:pe}:{},...vt?{readyAtSpawn:!0}:{},...X>0?{creditsBefore:X}:{}},new Map,o,z,_t)}catch(n){throw z("error",{message:n instanceof Error?n.message:String(n),stack:n instanceof Error?n.stack:void 0},x.session_id),ce(),n}finally{t.chat?.setWorking?.(null),Rs?.(),Be()}if(D.errorCode==="binding_mismatch"&&A){let n=await t.ask([{id:"binding-mismatch",text:"this session's saved conversation is no longer accepted by the service \u2014 start the conversation fresh (committed work is kept), or stop and keep the session?",risk:"high",rationale:"the service refused the saved conversation on the first turn after resume",options:[{label:"start fresh",detail:"continue with a fresh conversation \u2014 earlier answers may be re-asked"},{label:"stop",detail:"stop here; the session stays resumable"}],recommended_index:1,allow_free_text:!1}]);if((Array.isArray(n)?n.find(g=>g.id==="binding-mismatch"):void 0)?.selected_index!==0){let g=`resume abandoned: binding mismatch on session ${x.session_id} \u2014 the session is preserved`;return t.out(g),t.emit?.({type:"error",message:g,code:"BINDING_MISMATCH"}),u?.release(),2}z("binding_migrate",{sid:x.session_id},x.session_id);let d=x.resume&&"schema"in x.resume?{...x.resume,binding:{}}:void 0;try{D=await it({...x,...d?{resume:d}:{}},{...t,similarity:_e,graphSlot:oe,...Ie(t,oe),...pe?{checkpoint:pe}:{},...vt?{readyAtSpawn:!0}:{},...X>0?{creditsBefore:X}:{}},new Map,o,z,_t)}catch(g){throw z("error",{message:g instanceof Error?g.message:String(g),stack:g instanceof Error?g.stack:void 0},x.session_id),ce(),g}finally{t.chat?.setWorking?.(null),Be()}}if(D.noDefault){let n=pn(D.noDefault);return t.out(n),t.emit?.({type:"error",message:n,code:"NO_DEFAULT_ANSWER",questions:D.noDefault.map(a=>a.id)}),ce(),J(),1}if(D.highRisk)return t.out(`error: ${D.highRisk.length} high-risk decision${D.highRisk.length===1?"":"s"} need a human \u2014 ci mode won't guess. Re-run with --mode agent to pause for review.`),t.emit?.({type:"error",message:`error: high-risk question(s) in ci mode (fail-closed): ${D.highRisk.map(n=>n.id).join(", ")}`,code:"HIGH_RISK_CI"}),ce(),J(),1;if(D.paused?.cause&&!ge){let n=`error: design agent failed: the model service did not answer (${D.paused.cause.message})`;return t.out(n),t.emit?.({type:"error",...ot(D.paused.cause),message:n}),ce(),J(),1}if(D.paused){let n=u;n||(n=f.sessions().create({sid:x.session_id,mode:"agent",created_at:ee.toISOString(),expires_at:Ye(ee),agent_state:D.paused.agent_state,pending:{questions:[],proposals:[]},read_basis:Object.fromEntries((o.resolve(p)?o.edgesInto(o.resolve(p).tip):[]).filter(R=>R.type==="DERIVES"&&typeof R.props.source_id=="string").map(R=>[String(R.props.source_id),o.heads.get(String(R.props.source_id))??null])),assumed:[],corpus_cursor:{remaining:[]},conv_source:te,target_pins:o.resolve(p)?[{ref:p,cid:o.resolve(p).tip}]:[],verb:"design",use_case:p,...o.resolve(p)?.tip?{uc_tip:o.resolve(p).tip}:{},...Q?{force:!0}:{},...H?{user_session_id:H.ids.session_id}:{}}));try{Q&&!n.state.force&&n.save({force:!0}),H&&n.state.user_session_id!==H.ids.session_id&&n.save({user_session_id:H.ids.session_id}),te&&n.state.conv_source!==te&&n.save({conv_source:te});let R=t.chat?.drainHeldReceipts?.()??[];(R.length>0||(n.state.held_receipts?.length??0)>0)&&n.save({held_receipts:R}),Ae!==null&&n.save({force_scope:Ae}),kn(n,D.paused)}catch(R){let C=n.state.checkpoint,G=`error: couldn't persist the pause for session ${n.state.sid}`+(C?` \u2014 last durable checkpoint: seq ${C.seq} @ ${C.ts}`:" \u2014 no durable checkpoint exists")+` (${R instanceof Error?R.message:String(R)})`;return t.out(G),t.emit?.({type:"error",message:G,code:"PAUSE_PERSIST_FAILED",sid:n.state.sid}),1}z("session_paused",{sid:n.state.sid},x.session_id);let a={verb:"design",sid:n.state.sid,...W!=="interactive"?{mode:W}:{}},d=c.command("next.resume_session",a),g=D.paused.cause;if(b||t.out(g?c.text("note.model_unavailable_kept",{...a,detail:g.message}):c.text("note.paused",a)),t.emit?.({type:"session_paused",sid:n.state.sid,mode:W,...d!==null?{resume:d}:{},expires_at:Ge(t.store.sessions(),n.state),pending_questions:D.paused.pending.questions,...g?{cause:ot(g)}:{}}),b){let R=t.chat?.state.credits?.total;t.onSummary?.({state:"paused",reason:g?"the model service did not answer":"ctrl+c",facts:[...g?[g.message]:[],`session ${n.state.sid} saved \u2014 designing ${F.usecase.logical_id??p}`,...Ge(t.store.sessions(),n.state)?[`expires: ${n.state.expires_at}`]:[],...R!==void 0?[`credits used: ${R.toFixed(1)}`]:[]],...Ke(c,a),tracePath:xe})}return J(),3}if(D.crashed&&u?.state.checkpoint){let n=u.state.checkpoint,a={verb:"design",sid:u.state.sid,...W!=="interactive"?{mode:W}:{}},d=c.command("next.resume_session",a);if(z("agent_crashed_resumable",{sid:u.state.sid,seq:n.seq},x.session_id),b||t.out(c.text("note.crashed",{...a,seq:n.seq})),t.emit?.({type:"session_paused",sid:u.state.sid,mode:W,...d!==null?{resume:d}:{},expires_at:Ge(t.store.sessions(),u.state),crashed:!0}),b){let g=t.chat?.state.credits?.total;t.onSummary?.({state:"crashed",facts:[`agent crashed \u2014 session ${u.state.sid} is resumable at checkpoint seq ${n.seq}`,"at most the in-flight turn was lost",...g!==void 0?[`credits used: ${g.toFixed(1)}`]:[]],...Ke(c,a),tracePath:xe})}return u.release(),u=null,J(),3}if(D.error)return t.out(`error: design agent failed: ${D.error}`),t.emit?.({type:"error",message:`error: design agent failed: ${D.error}`,code:D.errorCode??"AGENT_FAILED"}),ce(),J(),1;let xs=O||e.repinsKept===!0&&y&&qn(i,S).repinnable,Le=D.proposal==null&&W!=="interactive"&&xs&&D.verdict!==void 0,As=t.completeAtSpawn===!0&&D.sentComplete===!0;if(D.proposal==null&&W!=="interactive"&&!Le&&!As){let n=`error: the design session stopped before saving anything \u2014 nothing committed (trace: ${ue??"(no local trace)"})`,a=y&&D.verdict?D.verdict:void 0;t.out(n),a&&t.out(`note: the design agent kept the design, but what it was designed against moved since: ${a}`);let d=u?.state.checkpoint?{verb:"design",sid:u.state.sid,...W!=="interactive"?{mode:W}:{}}:null;return t.emit?.({type:"error",message:n,code:"NOTHING_SAVED",...a?{note:a}:{},...d?{next:[Te(c,"next.resume_session",d,{why:"goes on with that session where it stopped"})]}:{}}),ce(),J(),1}let Fe=0;if(D.proposal==null)try{let n=e.resume??x.session_id;Fe=f.recordsSince(se).filter(a=>a.sid===n).reduce((a,d)=>a+d.nodes.filter(g=>g.label!=="source").length,0)}catch{}if(Le?(t.out(`nothing changed \u2014 the design agent kept the design of ${p} as it is`),t.emit?.({type:"nothing_to_change",use_case:p,...D.verdict?{note:D.verdict}:{}})):D.proposal==null&&(t.note??t.out)(Fe>0?`done \u2014 ${Fe} item(s) committed in this session (earlier legs included); nothing new since the resume`:"done \u2014 nothing designed this session (no finalize before the session ended)"),D.assumedDefaults&&t.out(`assumed: ${D.assumedDefaults} default(s) taken while unattended`),Q&&!e.plan&&!Le){let n=e.resume??x.session_id;if(f.recordsSince(se).some(a=>a.sid===n)){let a=K(f),d=a.resolve(p)?.tip,g=d?jn({store:f,graph:a,ucTip:d,by:t.by??{kind:"human",id:"owner"},sid:n}):null;g?.errors?z("design_repin_failed",{errors:g.errors.map(R=>`${R.code}: ${R.detail}`)}):g&&g.moved>0&&z("design_repinned",{moved:g.moved})}}if(u&&t.emit?.({type:"session_complete",sid:e.resume??x.session_id,...M.length>0?{no_start_page:M.map(({test:n})=>({test:n}))}:{}}),H?.event("ASR_SESSION_COMPLETE",{}),u?.complete(x.mode!=="interactive"||D.sentComplete?{ended:"complete"}:hn),Ne&&f.sessions().tidy(),I.length>0){let n=ni(I,t.projectDir??"");t.chat?t.chat.note(n):t.out(n),t.emit?.({type:"variables_summary",file:I[0].file,variables:I.map(({name:a,description:d,secret:g,start_page:R})=>({name:a,description:d,secret:g,...R?{start_page:R}:{}}))})}if(b){let n=t.chat.state.ledger.filter(g=>g.kind==="answer"&&g.receipt.form==="assumed").length??0,a=(D.assumedDefaults??0)+n,d=t.chat.state.credits?.total??D.creditsTotal;t.onSummary?.({state:"complete",facts:[`designed: ${F.usecase.logical_id??p}${D.proposal==null?Fe>0?` (${Fe} item(s) committed across this session)`:" (nothing committed this session)":""}`,...I.length>0?[`${I.length} variable(s) need values \u2014 see .testmuai/variables/assurance.json`]:[],...a>0?[`${a} assumed default(s)`]:[],...d!==void 0?[`credits used: ${d.toFixed(1)}`]:[]],tracePath:xe,...D.proposal==null&&!Le?{designedNothing:!0}:{}})}return e.plan||In(t.store),J(),0}function ni(e,t){if(e.length===0)return"";let r=Qs(t,e[0].file)||e[0].file,s=Math.max(...e.map(c=>c.name.length))+3,m=e.slice().sort((c,_)=>c.name<_.name?-1:1).map(c=>` ${c.name.padEnd(s)}${c.description}${c.secret?" (secret)":""}`);return`variables declared this session \u2014 fill their values before running:
|
|
372
|
+
${r}
|
|
373
|
+
${m.join(`
|
|
374
|
+
`)}
|
|
375
|
+
`}export{ls as a,Js as b,Xs as c,Zs as d,ei as e,qr as f,ni as g};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as o}from"./chunk-LD5B3QFW.js";import{a as i,b as n,c as t}from"./chunk-KU3YHPWZ.js";var l={DERIVES:["reconfirms","units"]};function h(a="extract"){let c=new Set(o(a)),d=Object.fromEntries(Object.keys(n).map(r=>{let e=n[r];return[r,{hashed:[...e.hashed],unhashed:[...e.unhashed??[]],required:[...e.required],enums:Object.fromEntries(Object.entries(e.enums).map(([s,g])=>[s,[...g]])),mintable:c.has(r)}]})),p=Object.fromEntries(Object.keys(t).map(r=>{let e=t[r];return[r,{src:[...e.src],dst:[...e.dst],salient:[...e.salient],props:e.props.filter(s=>!(l[r]??[]).includes(s)),cardinality:e.cardinality,acyclic:e.acyclic,direction:"dependent->dependency"}]}));return{schema_version:i,nodes:d,edges:p,mint_gate:o(a),blob_fingerprint:{algo:"sha256",domain:"assurance.blob\0",prefix:"sha256:"}}}export{l as a,h as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import s from"os";import t from"path";function r(){return t.join(s.homedir(),".testmuai","kaneai","assurance")}function o(n){return t.join(r(),n??"no-context")}function u(n,i,e){return t.join(o(n),"logs",`${i}-${e}.log`)}function c(n,i){return t.join(r(),"shared","logs",`${n}-${i}.log`)}function d(n){return t.join(o(n),"manifest.ndjson")}function l(){return t.join(r(),"telemetry-deadletter.ndjson")}function f(n){return t.join(r(),`identity-${n}.json`)}function j(){return t.join(r(),"bindings.json")}export{r as a,u as b,c,d,l as e,f,j as g};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{eb as u,fb as c}from"./chunk-UEE3RZN4.js";import{b as f}from"./chunk-7V4BQSSV.js";import{existsSync as o,mkdirSync as g,readFileSync as b}from"fs";import{dirname as l,join as m}from"path";function s(t,r){let n=r.startsWith("sha256:")?r.slice(7):r;return m(t,"blobs",n.slice(0,2),n.slice(2))}function F(t,r){return s(t,r)}function p(t){let r=Buffer.concat([Buffer.from("assurance.blob\0","utf8"),t]);return"sha256:"+f(r)}function y(t,r){let n=p(r),i=s(t,n);if(!o(i)){let e=l(i),a=!o(e);g(e,{recursive:!0}),u(i,r),a&&c(l(e))}return n}function S(t,r){let n=s(t,r);return o(n)?b(n):null}export{F as a,p as b,y as c,S as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as F}from"./chunk-
|
|
2
|
+
import{a as F}from"./chunk-2RUSXQ3O.js";import{a as k}from"./chunk-FWGUISUG.js";import{b as $}from"./chunk-ZFM77AQU.js";import{deflateSync as Y}from"zlib";function j(n,s){let e=Buffer.alloc(4);e.writeUInt32BE(s.length);let o=Buffer.concat([Buffer.from(n,"latin1"),s]),i=Buffer.alloc(4);return i.writeUInt32BE(F(o)),Buffer.concat([e,o,i])}var G={1:0,3:2,4:6};function N(n,s){let{width:e,height:o,channels:i}=s;if(n.byteLength!==e*o*i)throw new Error(`pngEncode: raw length ${n.byteLength} != ${e}x${o}x${i}`);let d=Buffer.alloc(13);d.writeUInt32BE(e,0),d.writeUInt32BE(o,4),d[8]=8,d[9]=G[i];let t=e*i,a=Buffer.alloc(o*(t+1));for(let f=0;f<o;f++)a[f*(t+1)]=0,n.copy(a,f*(t+1)+1,f*t,(f+1)*t);return Buffer.concat([Buffer.from([137,80,78,71,13,10,26,10]),j("IHDR",d),j("IDAT",Y(a)),j("IEND",Buffer.alloc(0))])}var U=64,X=16,J=12e6,V=6e6,K=5e3,W=3e4,H="",_=class extends Error{constructor(e,o){super(`${e}: ${o}`);this.code=e}};async function q(n,s,e){let o=n.objs.has(s)?n.objs:n.commonObjs.has(s)?n.commonObjs:null;if(o)try{return o.get(s)??null}catch{return null}if(e.remainingMs<=0)return null;let i=s.startsWith("g_")?n.commonObjs:n.objs,d,t=Date.now();try{return await Promise.race([new Promise(a=>{try{i.get(s,f=>a(f??null))}catch{a(null)}}),new Promise(a=>{d=setTimeout(()=>a(null),Math.min(K,e.remainingMs))})])}finally{clearTimeout(d),e.remainingMs-=Date.now()-t}}async function z(){let n=await import("pdfjs-dist/legacy/build/pdf.mjs");return n.default??n}async function oe(n,s){let e=await z();H=e.version;let o={remainingMs:s?.resolveBudgetMs??W},i,d=e.getDocument({data:new Uint8Array(n),isEvalSupported:!1,verbosity:0});try{i=await d.promise}catch(t){throw t.name==="PasswordException"?new _("PDF_ENCRYPTED","password-protected \u2014 decrypt and re-ingest"):new _("PDF_UNREADABLE",String(t.message??t))}try{let t=[],a=[],f=new Map,D=[],T=new Map,R=0,A=0;for(let u=1;u<=i.numPages;u++){let O=await i.getPage(u);t.push(`[page ${u}]`);let C=await O.getTextContent(),c="",E=null;for(let m of C.items){if(typeof m!="object"||m===null||!("str"in m))continue;let p=m,P=Math.round(p.transform[5]);E!==null&&P!==E&&c.trim()!==""&&(t.push(c.trimEnd()),c=""),c!==""&&!c.endsWith(" ")&&p.str!==""&&!p.str.startsWith(" ")&&P===E&&(c+=" "),c+=p.str,A+=p.str.trim().length,E=P,p.hasEOL&&c.trim()!==""&&(t.push(c.trimEnd()),c="",E=null)}c.trim()!==""&&t.push(c.trimEnd());let B=await O.getOperatorList(),M=0;for(let m=0;m<B.fnArray.length;m++){let p=B.fnArray[m]===e.OPS.paintImageXObject,P=B.fnArray[m]===e.OPS.paintInlineImageXObject;if(!p&&!P)continue;M+=1;let h=`p${u}-${M}`,l=(v,L,w,S)=>{a.push({ref:h,page:u,media_type:"image/png",...L?{blob:L}:{},...S?{appearance:S}:{},delivery:v,...w?{duplicate_of:w}:{}}),t.push(v==="duplicate"&&w?`[img#${h}: image on page ${u} \u2014 same as img#${w}; cite img#${w}]`:`[img#${h} omitted: ${v}]`)};if(P){l("unsupported-image-kind");continue}let r=await q(O,B.argsArray[m][0],o);if(!r?.data||!r.width||!r.height){l("undecodable");continue}let I;if(r.kind===e.ImageKind.RGB_24BPP)I=3;else if(r.kind===e.ImageKind.RGBA_32BPP)I=4;else{l("unsupported-image-kind");continue}let y;try{y=N(Buffer.from(r.data.buffer,r.data.byteOffset,r.data.byteLength),{width:r.width,height:r.height,channels:I})}catch{l("undecodable");continue}let g=$(y);f.set(g,y);let b=k(Buffer.from(r.data.buffer,r.data.byteOffset,r.data.byteLength),{width:r.width,height:r.height,channels:I});if(r.width<U||r.height<U){l("below-dimension-floor",g,void 0,b);continue}let x=T.get(g);if(x!==void 0){l("duplicate",g,x,b);continue}if(y.byteLength>V){l("image-too-large",g,void 0,b);continue}if(R+y.byteLength>J){l("vision-byte-budget-reached",g,void 0,b);continue}if(D.length>=X){l("image-cap-reached",g,void 0,b);continue}T.set(g,h),R+=y.byteLength,D.push(h),a.push({ref:h,page:u,media_type:"image/png",blob:g,appearance:b,delivery:"selected"}),t.push(`[img#${h}: image on page ${u}]`)}}if(A===0&&i.numPages>0)throw new _("PDF_NO_TEXT_LAYER","no extractable text \u2014 image-only or scanned pdfs are not supported yet");return{projection:t.join(`
|
|
3
3
|
`)+`
|
|
4
4
|
`,inventory:a,blobs:f,delivered:D,pages:i.numPages,converter:{name:"pdfjs-dist",version:e.version,policy:"v1"}}}finally{await d.destroy().catch(()=>{})}}export{U as a,X as b,J as c,V as d,H as e,_ as f,oe as g};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as x,b as N,c as S,d as s,q as m}from"./chunk-DBMW3VUN.js";import{a as y}from"./chunk-7V4BQSSV.js";var w=["extract","design","reconcile","all"],B=/\u001b\[[0-?]*[ -\/]*[@-~]|\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)?|\u001b[@-Z\\-_]/g,$=/\r\n?|[\v\f\u0085\u2028\u2029]/g,T=/[\u0000-\u0009\u000b-\u001f\u007f-\u009f]/g,E=/[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/g,R=/<{3,}|>{3,}/g;function b(e){let n=e;for(;/<{3,}|>{3,}/.test(n);)n=n.replace(R,"");return n}function A(e){let n=m(e);return n===null?null:b(n).replace(/ {2,}/g," ").trim()||null}function k(e){if(typeof e!="string")return null;let n=b(e.replace(B,"").replace($,`
|
|
3
|
+
`).replace(/\t/g," ").replace(T,"").replace(E,"")).split(`
|
|
4
|
+
`).map(t=>t.replace(/ +$/,""));for(;n.length>0&&n[0]==="";)n.shift();for(;n.length>0&&n[n.length-1]==="";)n.pop();return n.length===0?null:n.join(`
|
|
5
|
+
`)}var v=e=>typeof e=="string"&&e!==S&&N.test(e),p=e=>Buffer.byteLength(e.title,"utf8")+Buffer.byteLength(e.text,"utf8");function O(e,n){if(typeof e!="object"||e===null||Array.isArray(e))return"is not an object";let t=e,u=Object.keys(t).find(i=>!["stage","title","text","units"].includes(i));if(u!==void 0)return`has a field ${JSON.stringify(u)} a note does not have`;if(!w.includes(t.stage))return`is for ${JSON.stringify(t.stage)}, which is not a stage`;if(typeof t.title!="string"||A(t.title)!==t.title||t.title.length>s.contextTitleChars)return`has a title that is not one clean line of at most ${s.contextTitleChars} characters`;if(typeof t.text!="string"||k(t.text)!==t.text)return"has a text that is not in the stored form of a note";if(Buffer.byteLength(t.text,"utf8")>s.contextNoteBytes)return`has a text of ${Buffer.byteLength(t.text,"utf8")} bytes, the limit is ${s.contextNoteBytes}`;if(t.units!==void 0){if(!Array.isArray(t.units)||t.units.length===0)return"has units that are not a list of unit ids";let i=t.units.find(o=>!v(o));if(i!==void 0)return`names ${JSON.stringify(i)}, which is not a unit id`;if(t.units.some((o,l)=>l>0&&t.units[l-1]>=o))return"has units that are not sorted with no repeat";if(n!==void 0){let o=t.units.find(l=>!n.has(l));if(o!==void 0)return`names the unit ${JSON.stringify(o)}, which this version does not have`}}return null}function _(e,n){if(typeof e!="object"||e===null||Array.isArray(e))return"is not an object";let t=e,u=Object.keys(t).find(o=>!["v","plugin","notes"].includes(o));if(u!==void 0)return`has a field ${JSON.stringify(u)} the notes of a version do not have`;if(t.v!==1)return"is not version 1 of the notes form";if(typeof t.plugin!="string"||!x.test(t.plugin))return"names no plugin";if(!Array.isArray(t.notes)||t.notes.length===0)return"holds no note";if(t.notes.length>s.contextNotes)return`holds ${t.notes.length} notes, the limit is ${s.contextNotes}`;let i=0;for(let o=0;o<t.notes.length;o++){let l=O(t.notes[o],n);if(l!==null)return`note ${o+1} ${l}`;i+=p(t.notes[o])}return i>s.contextBytes?`holds ${i} bytes of notes, the limit is ${s.contextBytes}`:null}var U=e=>Buffer.from(y(e),"utf8");function I(e){if(e===null)return null;try{let n=Buffer.from(e).toString("utf8"),t=JSON.parse(n);return _(t)!==null?null:y(t)===n?t:null}catch{return null}}function F(e,n){if(n===void 0||typeof n.notes!="string")return null;let t=I(e(n.notes));return t!==null&&t.plugin===n.id?t:null}var J=(e,n)=>e===null?[]:e.notes.filter(t=>t.stage===n||t.stage==="all");function D(e,n,t){if(n==null)return{notes:null,dropped:[]};if(!Array.isArray(n))return{notes:null,dropped:[],invalid:"something that is not a list of notes"};let u=[],i=new Map,o=a=>{i.set(a,(i.get(a)??0)+1)},l=0;for(let a of n){if(typeof a!="object"||a===null||Array.isArray(a)){o("not a note");continue}let r=a;if(!w.includes(r.stage)){o("for a stage that is not extract, design, reconcile or all");continue}let c=A(r.title),g=k(r.text);if(c===null||g===null){o("without a title or without a text");continue}if(c.length>s.contextTitleChars){o(`with a title over ${s.contextTitleChars} characters`);continue}if(Buffer.byteLength(g,"utf8")>s.contextNoteBytes){o(`with a text over ${s.contextNoteBytes} bytes`);continue}let d;if(r.units!==void 0&&r.units!==null){if(!Array.isArray(r.units)||!r.units.every(f=>typeof f=="string")){o("whose units are not a list of unit ids");continue}if(r.units.some(f=>!v(f)||!t.has(f))){o("naming a unit this version does not have");continue}r.units.length>0&&(d=[...new Set(r.units)].sort())}if(u.length>=s.contextNotes){o(`past the ${s.contextNotes} notes one version may have`);continue}let h={stage:r.stage,title:c,text:g,...d?{units:d}:{}};if(l+p(h)>s.contextBytes){o(`past the ${s.contextBytes} bytes the notes of one version may take`);continue}l+=p(h),u.push(h)}return{notes:u.length>0?{v:1,plugin:e,notes:u}:null,dropped:[...i].map(([a,r])=>({why:a,count:r}))}}export{A as a,_ as b,U as c,I as d,F as e,J as f,D as g};
|