@testmuai/kane-cli 0.7.1 → 0.8.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-U37VZDCW.js +8 -0
- package/dist/{ChromeProfilePicker-4CDSPBWL.js → ChromeProfilePicker-AUU7JF6F.js} +1 -1
- package/dist/{CliFeedbackPrompt-TLRVBA4E.js → CliFeedbackPrompt-4W74Y3UF.js} +1 -1
- package/dist/{CliUploadProgress-WGGFLUSF.js → CliUploadProgress-6HL7WTEX.js} +1 -1
- package/dist/ConfigView-6BSCZP5Y.js +2 -0
- package/dist/EvidenceViewOffer-62XHEEGW.js +2 -0
- package/dist/FolderPicker-S7U2EN2M.js +2 -0
- package/dist/{HelpView-FBCX32U7.js → HelpView-TU7ED43J.js} +1 -1
- package/dist/{InfoBox-KK2ICVS4.js → InfoBox-JLTMKVDE.js} +1 -1
- package/dist/{LinksBox-KKRANMR3.js → LinksBox-LREUUJDV.js} +1 -1
- package/dist/{ProfilesView-DGPXSAQN.js → ProfilesView-W3GX2N2E.js} +1 -1
- package/dist/{ProjectPicker-ESQSL4TT.js → ProjectPicker-SYQUJK2J.js} +1 -1
- package/dist/{SaveSessionPrompt-AQGP5W6E.js → SaveSessionPrompt-MR5NJMRP.js} +1 -1
- package/dist/SingleShotApp-XOKVOM7C.js +2 -0
- package/dist/{SummaryBox-BFZJW2KK.js → SummaryBox-UAYSVFB7.js} +1 -1
- package/dist/TestMdRunView-7UVSDAF4.js +2 -0
- package/dist/{WhoamiView-JABY3I5Q.js → WhoamiView-2YU76ASQ.js} +1 -1
- package/dist/adbkit-apkreader-ORZBGCJQ.js +184 -0
- package/dist/app-client-OEXESV4U.js +2 -0
- package/dist/app-download-AEEFQ63M.js +2 -0
- package/dist/{auth-76LVI6B5.js → auth-HET3TBRI.js} +1 -1
- package/dist/bind-STKXOUYI.js +12 -0
- package/dist/bootstrap-44YKVWWE.js +2 -0
- package/dist/bridge-5Z3BIB77.js +2 -0
- package/dist/{changelog-PSWPPOAF.js → changelog-7OWRHFHZ.js} +1 -1
- package/dist/chat-committer-ZWWCLJFD.js +2 -0
- package/dist/chat-controller-T2FAI55V.js +2 -0
- package/dist/{chunk-C4G7RVJ6.js → chunk-27U4PLPX.js} +1 -1
- package/dist/{chunk-V36ATG7A.js → chunk-2BGUUWNF.js} +2 -2
- package/dist/chunk-2KDGIZED.js +4 -0
- package/dist/chunk-2UIHS2FH.js +2 -0
- package/dist/chunk-2YEHV2CX.js +2 -0
- package/dist/{chunk-NRTHYROA.js → chunk-3LJWYRAA.js} +1 -1
- package/dist/chunk-3PECJD6S.js +11 -0
- package/dist/chunk-3POR47RC.js +8 -0
- package/dist/{chunk-KVQOBPAZ.js → chunk-3Q6WAK6P.js} +1 -1
- package/dist/chunk-4JOD47QI.js +2 -0
- package/dist/chunk-56PAQAX5.js +19 -0
- package/dist/{chunk-FCMLIK7P.js → chunk-5DBK6QNS.js} +1 -1
- package/dist/chunk-5DT7PIGB.js +5 -0
- package/dist/chunk-65ZTD5SJ.js +7 -0
- package/dist/chunk-6IA6QMPH.js +2 -0
- package/dist/{chunk-5KFS3GAZ.js → chunk-6KPPGMO2.js} +1 -1
- package/dist/{chunk-F6ZOJXYU.js → chunk-6O3DDOP2.js} +1 -1
- package/dist/chunk-6XX4LEVJ.js +2 -0
- package/dist/{chunk-KT6G7AF2.js → chunk-766WGMBU.js} +1 -1
- package/dist/chunk-7BZSCUPP.js +10 -0
- package/dist/{chunk-UBFKZEX3.js → chunk-7JWKHKFU.js} +2 -2
- package/dist/{chunk-PMHJRT3A.js → chunk-7KORP5FF.js} +1 -1
- package/dist/chunk-7Q6M6P4X.js +26 -0
- package/dist/{chunk-AM5S4KG4.js → chunk-AFPHLUQ5.js} +1 -1
- package/dist/chunk-AW2XUHH4.js +2 -0
- package/dist/chunk-BKHXPBWN.js +2 -0
- package/dist/chunk-BRHNRCEZ.js +3 -0
- package/dist/chunk-BRIEBB2U.js +2 -0
- package/dist/{chunk-NJPTOKW5.js → chunk-C7HSWZP6.js} +1 -1
- package/dist/{chunk-JEUA4UWK.js → chunk-CLGC7VEO.js} +1 -1
- package/dist/chunk-CTW2VQKS.js +6 -0
- package/dist/{chunk-L4JIMNKW.js → chunk-CUM23TLF.js} +1 -1
- package/dist/chunk-DBIBROYW.js +5 -0
- package/dist/{chunk-L7VREJTG.js → chunk-DCY6R5DP.js} +1 -1
- package/dist/{chunk-X3ICV5M5.js → chunk-DO5HAO3H.js} +1 -1
- package/dist/chunk-DPUV6OSP.js +2 -0
- package/dist/{chunk-M7WQM4UA.js → chunk-DUAXZYAD.js} +1 -1
- package/dist/{chunk-HPMS5KO6.js → chunk-DZGCXKKI.js} +3 -3
- package/dist/chunk-EDSZJZFG.js +4 -0
- package/dist/{chunk-OIYGGEUL.js → chunk-ELM6MXGJ.js} +1 -1
- package/dist/{chunk-R2RGSO4B.js → chunk-EWCAFKLX.js} +1 -1
- package/dist/chunk-EYOCNMUM.js +2 -0
- package/dist/{chunk-73C4PRYU.js → chunk-FEJXWJ3L.js} +1 -1
- package/dist/{chunk-BAL64WSI.js → chunk-FMRSMN34.js} +1 -1
- package/dist/chunk-FNH55WSR.js +19 -0
- package/dist/chunk-FQLIW3LM.js +2 -0
- package/dist/{chunk-JRMDGLLT.js → chunk-G7VQCS4J.js} +1 -1
- package/dist/chunk-GCBKDX2J.js +2 -0
- package/dist/{chunk-AAONIIQV.js → chunk-GFKCTYCA.js} +1 -1
- package/dist/chunk-GKYPNSQP.js +26 -0
- package/dist/chunk-GPG3FIN3.js +21 -0
- package/dist/chunk-GZPK6FRP.js +7 -0
- package/dist/{chunk-NOCIMJSN.js → chunk-HCKH44I2.js} +1 -1
- package/dist/chunk-HEAIJCGZ.js +2 -0
- package/dist/{chunk-3FN5VJMV.js → chunk-HMYMSRA4.js} +1 -1
- package/dist/chunk-I7TIGB7K.js +2 -0
- package/dist/chunk-IDX3TOPY.js +6 -0
- package/dist/{chunk-CVOGP253.js → chunk-IMR64OCZ.js} +1 -1
- package/dist/{chunk-IBNC444G.js → chunk-IOD3HQVW.js} +1 -1
- package/dist/chunk-IOFZSQAA.js +2 -0
- package/dist/chunk-IP2O264K.js +3 -0
- package/dist/{chunk-CSQ46PJ7.js → chunk-JJHG3BWO.js} +1 -1
- package/dist/{chunk-5JTUL6XL.js → chunk-JZ26R6UL.js} +1 -1
- package/dist/chunk-KBM3XHAM.js +2 -0
- package/dist/{chunk-SY3HLQMV.js → chunk-KCCSWEGA.js} +1 -1
- package/dist/chunk-KFSUPQAG.js +66 -0
- package/dist/chunk-KRKGZ2ZW.js +47 -0
- package/dist/chunk-KU6IXFGZ.js +9 -0
- package/dist/chunk-L7MXYCD7.js +2 -0
- package/dist/chunk-MA34UWKX.js +4 -0
- package/dist/chunk-MBF3FP5P.js +5 -0
- package/dist/chunk-MSGW4JDG.js +2 -0
- package/dist/chunk-MXHHMIO2.js +349 -0
- package/dist/chunk-N2P4MI32.js +2 -0
- package/dist/{chunk-CDQX6HGJ.js → chunk-NX7TM662.js} +1 -1
- package/dist/chunk-OMQCD3KR.js +2 -0
- package/dist/{chunk-QROUKGKU.js → chunk-OS4VSIHT.js} +1 -1
- package/dist/chunk-OTTGS2TE.js +2 -0
- package/dist/chunk-QGKPLOUI.js +2 -0
- package/dist/{chunk-JKTFTF24.js → chunk-QRZRSAZH.js} +1 -1
- package/dist/{chunk-WJ5HDEVH.js → chunk-QSDH5P7C.js} +1 -1
- package/dist/{chunk-322JEJEH.js → chunk-QW6EZC53.js} +1 -1
- package/dist/{chunk-2XMJ6YAE.js → chunk-R5T4RLF5.js} +1 -1
- package/dist/chunk-R7QAS6LZ.js +4 -0
- package/dist/{chunk-LR5XO2KD.js → chunk-RC52N7PC.js} +1 -1
- package/dist/{chunk-33QXD75Y.js → chunk-RFR4ZKIC.js} +3 -3
- package/dist/{chunk-3LWTUMDG.js → chunk-RLRNLIRS.js} +1 -1
- package/dist/{chunk-XDHZMCTA.js → chunk-SDPRO2LE.js} +2 -2
- package/dist/chunk-T5Y6MOLM.js +4 -0
- package/dist/{chunk-4OPQJ7PE.js → chunk-TFPPEOAK.js} +1 -1
- package/dist/chunk-TH47OOBV.js +4 -0
- package/dist/{chunk-XVDJ423L.js → chunk-TKGUT425.js} +1 -1
- package/dist/{chunk-OHRS3H7Z.js → chunk-TRJUD3XJ.js} +1 -1
- package/dist/chunk-TYLYFERW.js +10 -0
- package/dist/chunk-TZXXJWHA.js +2 -0
- package/dist/chunk-UD7KKHPW.js +5 -0
- package/dist/{chunk-APAIWBIH.js → chunk-UDIQOJEL.js} +1 -1
- package/dist/chunk-UV462FZR.js +2 -0
- package/dist/{chunk-323MLBYA.js → chunk-UXDL4XDL.js} +1 -1
- package/dist/chunk-V2R3LCA3.js +12 -0
- package/dist/chunk-VAYBKR76.js +4 -0
- package/dist/{chunk-AH7ZZIZY.js → chunk-VRVFPMCR.js} +1 -1
- package/dist/chunk-W2JFDDIB.js +2 -0
- package/dist/chunk-W4B5LOEX.js +4 -0
- package/dist/{chunk-36OC3TFE.js → chunk-W5TTF7GB.js} +2 -2
- package/dist/chunk-WXHQYYD5.js +2 -0
- package/dist/{chunk-6HEGD6H2.js → chunk-XO5ZH3ZR.js} +1 -1
- package/dist/chunk-XWKUZJCP.js +2 -0
- package/dist/{chunk-2KBD6JZX.js → chunk-YFYCCTSL.js} +1 -1
- package/dist/{chunk-ZM5PVRJK.js → chunk-YJELGSKJ.js} +1 -1
- package/dist/chunk-YRFMPIU2.js +4 -0
- package/dist/{chunk-2XGDWUJ5.js → chunk-ZGBSGZZM.js} +1 -1
- package/dist/{chunk-NBKQT7LJ.js → chunk-ZIUAOEUC.js} +1 -1
- package/dist/chunk-ZMNJBUAO.js +2 -0
- package/dist/chunk-ZVHCQMJ6.js +13 -0
- package/dist/committer-SWEWEYNX.js +2 -0
- package/dist/{config-R3GF2FZA.js → config-RS47F5SC.js} +1 -1
- package/dist/{controller-client-RD2YEMAH.js → controller-client-OB4WD2C4.js} +1 -1
- package/dist/{cover-cmd-TXICWHUU.js → cover-cmd-HDZZWJXG.js} +1 -1
- package/dist/{credentials-XN4ROCQ3.js → credentials-OH6AVI6N.js} +1 -1
- package/dist/deps-resolve-XC5S53DG.js +2 -0
- package/dist/descriptor-OEUZZCOK.js +2 -0
- package/dist/design-committer-VYT6NU3T.js +2 -0
- package/dist/dispatch-SE5GY3Z2.js +2 -0
- package/dist/doctor-FSECFZUU.js +2 -0
- package/dist/docx-convert-JMUMT5C4.js +2 -0
- package/dist/{dossier-QZV74XOS.js → dossier-KTLTGT2X.js} +1 -1
- package/dist/evidence-OYPHZUKI.js +2 -0
- package/dist/evolve-cmd-BCPNXAMV.js +2 -0
- package/dist/exec-P2IKJRRR.js +2 -0
- package/dist/exit-manager-3FVBTNYR.js +2 -0
- package/dist/explain-UAAQWHYR.js +2 -0
- package/dist/{explain-cmd-X7JZLSZZ.js → explain-cmd-3GEKR7O5.js} +1 -1
- package/dist/{explain-cmd-RZW6QJYM.js → explain-cmd-EX24XKD6.js} +1 -1
- package/dist/extract-bind-LLEASZAK.js +10 -0
- package/dist/extract-cmd-UZMEZMGP.js +5 -0
- package/dist/feeder-C3TOJPKK.js +2 -0
- package/dist/{gaps-cmd-BWCRLLBK.js → gaps-cmd-IVXFPFAQ.js} +1 -1
- package/dist/{gate-YHBPWEM5.js → gate-54BRAE7N.js} +1 -1
- package/dist/{generate-headless-BSTDLZZY.js → generate-headless-D3SVQ2AI.js} +3 -3
- package/dist/{headless-io-BL3TEAX5.js → headless-io-66RG5NN5.js} +1 -1
- package/dist/host-7GZPBA74.js +2 -0
- package/dist/identity-ADZ4PAJF.js +2 -0
- package/dist/index.js +85 -69
- package/dist/ingest-EX72IEQT.js +2 -0
- package/dist/ingest-cmd-EAE7N5RC.js +2 -0
- package/dist/{interactive-bind-43HGDF5K.js → interactive-bind-ORMN2REX.js} +7 -6
- package/dist/{lifecycle-cmd-D6TVTYRK.js → lifecycle-cmd-O2324GN6.js} +1 -1
- package/dist/{list-cmd-XCAV2FKA.js → list-cmd-N4KMA34H.js} +1 -1
- package/dist/list-commands-MRXL5HGS.js +2 -0
- package/dist/locks-cmd-CSVSWY2Y.js +2 -0
- package/dist/logical-ids-TEBCQJGO.js +2 -0
- package/dist/login-flow-QJQM3RHT.js +2 -0
- package/dist/maintenance-cmd-6XSVO6FO.js +2 -0
- package/dist/mobile-prompts-TOX35ER6.js +2 -0
- package/dist/pdf-convert-OZIRUADA.js +2 -0
- package/dist/persist-recorded-session-TLDQ5HKP.js +3 -0
- package/dist/phase-seed-VFHIH6FL.js +2 -0
- package/dist/pipeline-UOM4LNAI.js +2 -0
- package/dist/prepare-target-QYWIJIVQ.js +2 -0
- package/dist/readmodel-XOYGGQ3S.js +2 -0
- package/dist/reconcile-cmd-3H34KVVD.js +2 -0
- package/dist/reconcile-deps-XIH75ZLY.js +4 -0
- package/dist/reconcile-engine-UKWPG2LV.js +2 -0
- package/dist/{recording-banner-TALO7PUR.js → recording-banner-4M7XHVGI.js} +1 -1
- package/dist/records-IOZTZUZV.js +2 -0
- package/dist/registry-PYOTKZYZ.js +2 -0
- package/dist/{require-project-folder-R347LFDQ.js → require-project-folder-4UPQNEBJ.js} +1 -1
- package/dist/resolve-run-intent-X72V3KJA.js +7 -0
- package/dist/{resolver-IDCGRPFJ.js → resolver-UBOZLFFE.js} +1 -1
- package/dist/revert-NQ7GEVSE.js +2 -0
- package/dist/review-cmd-DQRKQUMG.js +4 -0
- package/dist/run-2COODVX2.js +2 -0
- package/dist/run-URPGHOQM.js +2 -0
- package/dist/run-channel-RGH4WIQX.js +2 -0
- package/dist/{run-test-md-DFNIGYB7.js → run-test-md-76ZPKXO6.js} +3 -3
- package/dist/session-target-UWROGOCY.js +2 -0
- package/dist/sessions-GIEXOCE4.js +2 -0
- package/dist/{sessions-cmd-AQWLL5ZN.js → sessions-cmd-ZZIZN2VB.js} +4 -4
- package/dist/{skill-installer-ANXTCXQV.js → skill-installer-CIS6GAYF.js} +1 -1
- package/dist/spawner-J67QR4QP.js +2 -0
- package/dist/structured-answers-5EY2AZN7.js +5 -0
- package/dist/tcg-generate-BDTRKY2A.js +2 -0
- package/dist/testmd-actions-77ELR5UU.js +2 -0
- package/dist/token-refresh-4BPAPXKK.js +2 -0
- package/dist/types-6E2HTDKJ.js +2 -0
- package/dist/{validate-basic-O2DP2XJL.js → validate-basic-2GVSQ2R5.js} +1 -1
- package/dist/verdicts-TRSTJLCL.js +2 -0
- package/dist/{version-check-RNR3JCQ5.js → version-check-O6PYTI4T.js} +1 -1
- package/dist/{view-cmd-YSEGA5PI.js → view-cmd-KPJTP4DI.js} +1 -1
- package/dist/walk-session-CHJXHZMO.js +2 -0
- package/dist/with-telemetry-CQCWLVOC.js +2 -0
- package/package.json +12 -6
- package/dist/ChatSurface-D66CACLX.js +0 -8
- package/dist/ConfigView-DBANTBXC.js +0 -2
- package/dist/EvidenceViewOffer-DNCQ3A6R.js +0 -2
- package/dist/FolderPicker-W7RCIFEL.js +0 -2
- package/dist/SingleShotApp-SMCAIKCE.js +0 -2
- package/dist/TestMdRunView-FMKZJ3A3.js +0 -2
- package/dist/bind-AACBTSAA.js +0 -12
- package/dist/bootstrap-CNOZ5VRB.js +0 -2
- package/dist/bridge-T4HL4TG7.js +0 -2
- package/dist/chat-committer-4BQBOKI4.js +0 -2
- package/dist/chat-controller-NNTMKEPG.js +0 -2
- package/dist/chunk-2SREGETM.js +0 -4
- package/dist/chunk-3STZLM5J.js +0 -4
- package/dist/chunk-5YPBPZUR.js +0 -2
- package/dist/chunk-6UJDOAYR.js +0 -26
- package/dist/chunk-BQHKBOSF.js +0 -11
- package/dist/chunk-DQ54MH7F.js +0 -13
- package/dist/chunk-DXV6MBTD.js +0 -8
- package/dist/chunk-EV3EHXEI.js +0 -4
- package/dist/chunk-F7WKDMX7.js +0 -47
- package/dist/chunk-FPFOW6BS.js +0 -2
- package/dist/chunk-GVIPTX6T.js +0 -6
- package/dist/chunk-GW5DWAXY.js +0 -2
- package/dist/chunk-HJERKSBK.js +0 -349
- package/dist/chunk-IQDWBTRJ.js +0 -3
- package/dist/chunk-IXVOXJP6.js +0 -6
- package/dist/chunk-KNDSQ4PS.js +0 -2
- package/dist/chunk-KRXSXQBU.js +0 -12
- package/dist/chunk-LQZ2BU7Q.js +0 -2
- package/dist/chunk-NAC7SFBE.js +0 -5
- package/dist/chunk-NAE7MBR2.js +0 -23
- package/dist/chunk-NRC2G4Y5.js +0 -5
- package/dist/chunk-O56PUUNL.js +0 -9
- package/dist/chunk-QM4S2APK.js +0 -2
- package/dist/chunk-RKWJG3WW.js +0 -19
- package/dist/chunk-RNSSM2BK.js +0 -11
- package/dist/chunk-SE6WNCYU.js +0 -4
- package/dist/chunk-SRDHPKJT.js +0 -2
- package/dist/chunk-SWESH2J7.js +0 -10
- package/dist/chunk-T63R6QT4.js +0 -4
- package/dist/chunk-UI7KULSI.js +0 -7
- package/dist/chunk-UPPEOQJQ.js +0 -3
- package/dist/chunk-URQUQWGW.js +0 -62
- package/dist/chunk-UX2B7L6K.js +0 -2
- package/dist/chunk-VOHQA2SP.js +0 -2
- package/dist/chunk-W5DOU2DV.js +0 -2
- package/dist/chunk-W6VD2XFO.js +0 -19
- package/dist/chunk-WAOCHXJ5.js +0 -2
- package/dist/chunk-WWNSD6FA.js +0 -6
- package/dist/chunk-ZLCZDAEX.js +0 -6
- package/dist/committer-2EJPVVCQ.js +0 -2
- package/dist/descriptor-KXDJ4XYD.js +0 -2
- package/dist/design-committer-BQUWD6AC.js +0 -2
- package/dist/docx-convert-ZBVQO2LG.js +0 -2
- package/dist/evidence-V23FPVXQ.js +0 -2
- package/dist/evolve-cmd-PZCPXDMR.js +0 -2
- package/dist/exit-manager-HNFATGSM.js +0 -2
- package/dist/explain-UE4IACQH.js +0 -2
- package/dist/extract-bind-BFY7IRL4.js +0 -10
- package/dist/extract-cmd-U3MGK2LP.js +0 -6
- package/dist/feeder-XGTFV7TZ.js +0 -2
- package/dist/ingest-AL6CABJT.js +0 -2
- package/dist/ingest-cmd-O6OWWZT4.js +0 -2
- package/dist/list-commands-747UTUSS.js +0 -2
- package/dist/locks-cmd-QAULI5LV.js +0 -2
- package/dist/logical-ids-4G4FAHNJ.js +0 -2
- package/dist/login-flow-CV76ENHV.js +0 -2
- package/dist/maintenance-cmd-ZRB4NTGG.js +0 -2
- package/dist/pdf-convert-S7VYE6AV.js +0 -2
- package/dist/persist-recorded-session-MDPWWUA7.js +0 -3
- package/dist/phase-seed-52LRE3LH.js +0 -2
- package/dist/pipeline-LM5JAK7F.js +0 -2
- package/dist/readmodel-X7L7W2BA.js +0 -2
- package/dist/reconcile-cmd-DGCSDML6.js +0 -2
- package/dist/records-5SVUXJBW.js +0 -2
- package/dist/revert-DXXYXJGN.js +0 -2
- package/dist/review-cmd-2QF5HTI7.js +0 -4
- package/dist/run-52UIBPXD.js +0 -2
- package/dist/run-VRVH4VO3.js +0 -2
- package/dist/sessions-BLXZVK5U.js +0 -2
- package/dist/spawner-AH5FTUYU.js +0 -2
- package/dist/structured-answers-QHFGZPSS.js +0 -5
- package/dist/tcg-generate-WKCBBKI5.js +0 -2
- package/dist/testmd-actions-RPYG6TJG.js +0 -2
- package/dist/token-refresh-NIDUOTRM.js +0 -2
- package/dist/verdicts-TJH3O5UW.js +0 -2
- package/dist/walk-session-HXW4OSA2.js +0 -2
- package/dist/with-telemetry-PNP6CAVM.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as J,b as Q,c as X,d as ee}from"./chunk-SWESH2J7.js";import{a as z,c as G,d as pe,f as Z}from"./chunk-3LWTUMDG.js";import{a as P,b as ue,d as fe}from"./chunk-QROUKGKU.js";import"./chunk-OHRS3H7Z.js";import"./chunk-AM5S4KG4.js";import"./chunk-5JTUL6XL.js";import{a as H}from"./chunk-JEUA4UWK.js";import{a as L,b as V,c as N,d as j,e as de,g as O,h as q}from"./chunk-36OC3TFE.js";import{a as le}from"./chunk-JFAFKHDX.js";import"./chunk-ZLCZDAEX.js";import{d as ae,f as ce}from"./chunk-SE6WNCYU.js";import"./chunk-DNNZ353O.js";import"./chunk-Q2F5QB2W.js";import"./chunk-QM4S2APK.js";import"./chunk-NVGBE2DR.js";import"./chunk-CH273NAE.js";import{a as I}from"./chunk-GW5DWAXY.js";import"./chunk-T63R6QT4.js";import"./chunk-3STZLM5J.js";import"./chunk-L4JIMNKW.js";import{f as F}from"./chunk-M7WQM4UA.js";import"./chunk-WWNSD6FA.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-UR6MHSHU.js";import{existsSync as we,statSync as ye}from"fs";import{basename as Y,resolve as W}from"path";var me=new Set(["interactive","agent","ci","override"]);function Re(e,n){if(e.mode!==void 0&&!me.has(e.mode))return{error:`--mode must be interactive | agent | ci | override, got '${e.mode}'`};let r=e.mode,t="reconcile without a TTY needs an explicit mode \u2014 pass --mode agent|ci|override, or --plan for a preview";return r==="interactive"&&!n?{error:t}:r||(n?"interactive":e.plan?"override":{error:t})}function ke(e,n,r,t){let i=W(n,r);if(!we(i)||!ye(i).isFile())return{error:`--from '${r}' is not a file \u2014 pass the changed source document`};let o=ae(i);if(!o.ok)return{error:`--from '${r}' is not an ingestable document \u2014 allowed: ${o.allowlist.join(", ")}`};let c=I(e);if(!c.heads.has(t))return{error:`unknown source '${t}' \u2014 see \`kane-cli context list --type source\``};if(c.heads.get(t)==null)return{error:`source '${t}' is retired \u2014 restore it first with \`kane-cli context revert\`, then reconcile`};let l=null;try{l=ce(i)}catch{}return l!==null&&l!==t&&c.heads.get(l)!=null?{error:`'${Y(i)}' already backs live source '${l}' \u2014 did you mean --source-id ${l}? To truly move these bytes under '${t}', retire '${l}' first`}:{sourceId:t,filePath:i}}function x(e){return e==null?"(none)":e.slice(0,19)}function T(e,n,r,t=!1){if(e.out(`reconcile ${n.source_id}: head ${n.head.status} \u2014 ${x(n.head.before)} \u2192 ${x(n.head.after)}`),t||(e.out(`note: ${n.note}`),e.out(`skipped arms: ${n.skipped_arms}`)),n.changed&&e.out(n.held?`extract ran in override mode; ${r?.defaultsTaken??0} default(s) auto-taken; matched-but-changed and new proposals HELD for your verdict (staged \u2014 nothing committed)`:`extract ran in override mode; ${r?.defaultsTaken??0} default(s) auto-taken; matched-but-changed proposals auto-committed as edits`),t){let i=n.changeset??[],o=(l,h)=>{let y=i.filter(s=>s.kind===l).length;return y>0?`${y} ${h}`:null},c=[o("ADD","add"),o("MODIFY","modify"),o("ARCHIVE","archive")].filter(Boolean);n.changed&&e.out(`changeset: ${i.length} item(s)${c.length?` \u2014 ${c.join(" \xB7 ")}`:""}`),e.out(`plan: ${n.rows.length} row(s) \u2014 each gets a card below`);return}if(n.changed){let i=n.changeset??[];e.out(`changeset: ${i.length} item(s)`);for(let o of i)if(o.kind==="MODIFY")e.out(` [MODIFY] ${H(o.ref)} \u2014 ${o.summary} (${x(o.old_cid)} \u2192 ${o.new_cid===null?"(staged)":x(o.new_cid)})`);else if(o.kind==="ADD")e.out(` [ADD] ${H(o.ref)}`);else{e.out(` [ARCHIVE] ${H(o.ref)} \u2014 ${o.why}`);let c=ne(o.impact,"retiring drops");c&&e.out(` ${c}`)}}e.out(`plan: ${n.rows.length} row(s)`);for(let i of n.rows){e.out(` [${i.kind}] ${H(i.ref)} \u2014 ${i.reason}`);let o=ne(i.impact,"approving marks");o&&e.out(` ${o}`),e.out(` provenance: ${i.provenance}`),e.out(` action: ${i.action}`)}}function ne(e,n){if(!e||e.stale_refs.length===0)return null;let r=e.direct_refs??[];return`impact: ${n} ${e.stale_refs.length} item(s) stale`+(r.length>0?` \u2014 ${r.length} directly touched: ${r.join(", ")}`:"")}function E(e){return e==="interactive"?"override":e}async function A(e,n,r,t,i,o,c=[],l="override",h,y,s,f,v){let p;try{p=q(e)}catch($){return P(t,$ instanceof Error?$.message:String($)),1}try{if(!r){let{runWalkSession:$}=await import("./walk-session-HXW4OSA2.js");return await $({dir:e,rows:n,archive:c,held:h??null,childMode:l,runDesign:f??null,mark:o,markA:s,...y?{archiveState:y}:{},signals:R=>C(e,R.ref,R.verdict,R.reason),...v?{script:v}:{}})}return await _e(e,n,r,t,i,o,c,l,h,y)}finally{p()}}var M=e=>`${e} high-risk item(s) need a human \u2014 ci mode won't guess. Walk interactively or use --mode agent.`;function K(e,n,r){let t=n.rows;e({type:"reconcile_plan",source_id:n.source_id,plan_path:r,rows:t.map(i=>({kind:i.kind,ref:i.ref,why:i.reason})),archive:n.changeset.filter(i=>i.kind==="ARCHIVE").map(i=>({ref:i.ref,why:i.why}))})}function re(e={}){return{type:"reconcile_summary",applied:0,skipped:0,deferred:0,plan_only:0,failed:0,paused:0,stale_created:0,...e}}var te=re();async function U(e,n,r,t,i,o,c,l,h){K(i,n,r);let y=n.changeset.filter(v=>v.kind==="ARCHIVE"&&h?.[v.ref]===void 0),s=n.rows,f;try{f=q(e)}catch(v){return i({type:"error",message:v instanceof Error?v.message:String(v)}),i(re()),2}try{return await $e(e,n,r,t,i,o,c,s,y,l)}finally{f()}}async function $e(e,n,r,t,i,o,c,l,h,y){let s=0,f=0,v=0,p=0,$=0,R=0,d=0,k=new Set,w=(u,a)=>{try{y?.(u,a)}catch{}};for(let[u,a]of l.entries()){i({type:"reconcile_row_start",kind:a.kind,ref:a.ref,...a.impact?{stale:a.impact.stale_refs.length,direct:a.impact.direct_refs?.length??0}:{}});let g=(m,D,S)=>i({type:"reconcile_row_end",kind:a.kind,ref:a.ref,outcome:m,...D!==void 0?{exit_code:D}:{},...S?{detail:S}:{}});if(a.applied){f++,g("skipped");continue}if(a.kind==="REMOVE"){$++,g("plan-only");continue}if(a.held_ref&&n.held){let m=new Set;if(a.kind==="MODIFY"&&a.impact){let S=I(e);for(let se of a.impact.stale_refs){let oe=S.resolve(se);oe&&S.stale(oe.tip)==="fresh"&&m.add(se)}}let D=J(e,n.held,a.held_ref,ie);if(!D.ok){v++,d===0&&(d=1),g("failed",1,D.message);continue}if(D.kind==="ADD"){let S=await t(D.ref,{yes:!0,mode:c});if(S!==0){S===3?(p++,d===0&&(d=3),g("paused",3)):(v++,d===0&&(d=1),g("failed",S));continue}}s++,D.kind!=="ADD"&&a.impact&&(R+=m.size),w(u,"approved"),C(e,a.ref,D.kind==="ADD"?"gap-resolved-create":"gap-resolved-evolve"),g("applied");continue}let _=z(I(e),a.ref);if(!_.ok){f++,g("skipped");continue}let b=_.target;if(k.has(b.ucTip)){f++,g("skipped");continue}if(a.kind==="ADD"){let m=await t(b.seamRef,{yes:!0,mode:c});if(m===3){p++,d===0&&(d=3),g("paused",3);continue}if(m!==0){v++,d===0&&(d=1),g("failed",m);continue}k.add(b.ucTip),s++,w(u,"approved"),C(e,a.ref,"gap-resolved-create"),g("applied")}else{let m=await G(e,b,{yes:!0,mode:c},o,t,"batch");m.outcome==="evolved"?(k.add(b.ucTip),s++,w(u,"approved"),C(e,a.ref,"gap-resolved-evolve"),g("applied")):m.outcome==="paused"?(p++,d===0&&(d=m.code),g("paused",m.code)):m.outcome==="failed"?(v++,d===0&&(d=1),g("failed",m.code)):(f++,g("skipped"))}}return h.length>0&&(i({type:"reconcile_paused",plan_path:r,pending:h.map(u=>({ref:u.ref,why:u.why}))}),p+=h.length,d===0&&(d=3)),i(re({applied:s,skipped:f,plan_only:$,failed:v,paused:p,stale_created:R})),d}var ie={kind:"human",id:process.env.USER??"operator"};function C(e,n,r,t){le(e,{ts:new Date().toISOString(),command:"reconcile-walk",id:n,verdict:r,polarity:"preference",by:ie,target:n,...t!==void 0?{reason:t}:{}})}async function _e(e,n,r,t,i,o,c=[],l="override",h,y){let s=0,f=0,v=0,p=0,$=0,R=0,d=0,k=new Set;for(let[w,u]of n.entries()){if(u.applied){t.out(`skipped ${u.ref} \u2014 already applied (${u.applied.outcome} at ${u.applied.at})`),f++;continue}let a=m=>{try{o?.(w,m)}catch(D){P(t,`could not record applied state for ${u.ref}: ${D instanceof Error?D.message:String(D)}`)}};if(u.kind==="REMOVE"){t.out(`REMOVE ${u.ref} \u2014 plan-only in this release (not executed)`),p++;continue}if(u.held_ref&&h){let m=J(e,h,u.held_ref,ie);if(!m.ok){P(t,`held ${u.ref}: ${m.message}`),$++,d===0&&(d=1);continue}if(t.out(`committed ${m.ref} (${u.kind==="ADD"?"minted":"updated \u2014 old\u2192new redirect"})`),m.kind==="ADD"){let D=await i(m.ref,{yes:r,mode:l});if(D===3){t.out(`design session for ${m.ref} paused \u2014 resume with the "kane-cli design tests --resume <session>" command printed above`),R++,d===0&&(d=3),a("approved");continue}if(D!==0){P(t,`design run for ${m.ref} ended with exit code ${D}`),$++,d===0&&(d=1),a("approved");continue}}s++,a("approved"),C(e,u.ref,u.kind==="ADD"?"gap-resolved-create":"gap-resolved-evolve");continue}let g=I(e),_=z(g,u.ref);if(!_.ok){t.out(`skipped ${u.ref} \u2014 ${_.message}`),f++;continue}let b=_.target;if(k.has(b.ucTip)){t.out(`skipped ${u.ref} \u2014 use-case ${b.display} already handled in this walk`),f++;continue}if(u.kind==="ADD"){let m=await i(b.seamRef,{yes:r,mode:l});if(m===3){t.out(`design session for ${b.display} paused \u2014 resume with the "kane-cli design tests --resume <session>" command printed above; this row lands when that session completes`),R++,d===0&&(d=3);continue}if(m!==0){P(t,`design run for ${b.display} ended with exit code ${m}`),$++,d===0&&(d=1);continue}k.add(b.ucTip),s++,a("approved"),C(e,u.ref,"gap-resolved-create")}else{let m=await G(e,b,{yes:!0,mode:l},t,i,"batch");m.outcome==="evolved"?(k.add(b.ucTip),s++,a("approved"),C(e,u.ref,"gap-resolved-evolve")):m.outcome==="paused"?(R++,d===0&&(d=m.code)):m.outcome==="failed"?($++,d===0&&(d=m.code)):f++}}for(let w of c)if(w.kind==="ARCHIVE"&&y?.[w.ref]===void 0){t.out(`[ARCHIVE] ${w.ref} \u2014 ${w.why}`);{let u=ne(w.impact,"retiring drops");u&&t.out(` ${u}`)}t.out(" plan-only \u2014 retire belongs to the interactive session (never headless)"),p++}return t.out(`reconcile walk: ${s} applied, ${f} skipped, ${v} deferred, ${p} plan-only`+($>0?`, ${$} failed`:"")+(R>0?`, ${R} paused`:"")),d}async function he(e,n,r,t,i,o=!1,c=!1){let l=i.seams??{reingest:X(e,r),reextract:ee(e,{stage:o})},h=null,y={reingest:l.reingest,reextract:async f=>h=await l.reextract(f)},s;try{t.out(`reconciling ${n}: re-reading the source and comparing against the graph\u2026`),s=await(i.buildPlan??Q)(e,n,y)}catch(f){return P(t,`reconcile failed: ${f instanceof Error?f.message:String(f)}`),null}return s.changed&&T(t,s,h,c),s}async function Pe(e,n,r,t,i){let o=V(e,n);if("error"in o)return P(t,o.error),2;let{plan:c,path:l}=o,h=r==="override"||r==="ci";if(n===void 0&&r==="interactive"&&t.isTTY&&!await t.confirm(`apply plan ${Y(l)} for ${c.source_id} (created ${c.created})?`))return t.out(`not applying ${Y(l)}`),0;let y=i.runDesignForUc??Z,s=i.runDesignForUc??null,f=i.sessionScript,v=(k,w)=>O(l,k,w),p=(k,w)=>j(l,k,w),$=F(e);if($===c.head_pin){if(r==="agent"){let w=i.emitEvent??(()=>{});return U(e,B(c),l,y,w,t,E(r),v,c.archive_state)}let k=N(c);return r==="ci"&&k.length>0?(P(t,M(k.length)),2):(t.out(`applying stored plan ${Y(l)} for ${c.source_id} (${c.rows.length} row(s))`),A(e,c.rows,h,t,y,v,c.changeset??[],E(r),c.held,c.archive_state,p,s,f))}if(t.out(`graph moved since this plan (${x(c.head_pin)} \u2192 ${x($)}) \u2014 recomputing`),c.held)return ve(e,c,t,i,r,y,!1);let R=await he(e,c.source_id,c.backing_path,t,i,!1,r==="interactive");if(!R)return 1;if(!R.changed)return T(t,R,null),0;if(r==="agent"){let k=i.emitEvent??(()=>{});return U(e,R,null,y,k,t,E(r))}let d=R.changeset.filter(k=>k.kind==="ARCHIVE");return r==="ci"&&d.length>0?(P(t,M(d.length)),2):A(e,R.rows,h,t,y,void 0,R.changeset,E(r),R.held,void 0,void 0,s,f)}function B(e,n=!1){return{source_id:e.source_id,changed:!0,head:{status:"unchanged",before:e.head_pin,after:e.head_pin},note:e.note,skipped_arms:e.skipped_arms,changeset:e.changeset??[],rows:n?e.rows.filter(r=>r.applied===void 0):e.rows,...e.held?{held:e.held}:{}}}async function be(e,n,r,t,i,o,c){let l=t.runDesignForUc??null,h=t.sessionScript,y=de(e,n);if(y===null)return null;if("error"in y)return P(r,y.error),2;let{plan:s,path:f}=y,v=s.rows.filter(d=>d.applied===void 0),p=N(s),$=t.emitEvent??(()=>{});if(v.length===0&&p.length===0){r.out(`already reconciled \u2014 plan ${s.created} applied ${s.rows.length} row(s)`);let d=pe(I(e)).staleCount;return d>0&&r.out(`${d} item(s) still stale \u2014 kane-cli maintain evolve --from-stale`),i==="agent"&&(K($,B(s),f),$({...te})),0}let R=F(e);return R!==s.head_pin?(r.out(`plan ${s.created} superseded \u2014 graph moved (${x(s.head_pin)} \u2192 ${x(R)}); recomputing`),ve(e,s,r,t,i,o,c)):(r.out(`resuming plan ${s.created} \u2014 ${v.length} pending row(s)${p.length>0?`, ${p.length} undecided archive item(s)`:""}`),c?(T(r,B(s),null),r.out(`plan stored: ${f}`),0):i==="agent"?U(e,B(s),f,o,$,r,E(i),(d,k)=>O(f,d,k),s.archive_state):i==="ci"&&p.length>0?(P(r,M(p.length)),2):A(e,s.rows,i==="override"||i==="ci",r,o,(d,k)=>O(f,d,k),s.changeset??[],E(i),s.held,s.archive_state,(d,k)=>j(f,d,k),l,h))}async function ve(e,n,r,t,i,o,c){let l=t.runDesignForUc??null,h=t.sessionScript,y;if(n.held){let u=I(e),a=new Set(n.rows.filter(_=>_.held_ref!==void 0&&_.applied!==void 0).map(_=>_.held_ref)),g=[];for(let _ of n.held.rows){if(a.has(_.temp_ref))continue;if(!_.matched_cid){g.push(_);continue}let b=u.tipOf(_.matched_cid);if(u.superseded.get(b)===null){r.out(`dropped held "${_.title}" \u2014 its use-case was retired meanwhile`);continue}g.push(b===_.matched_cid?_:{..._,matched_cid:b,uc:{..._.uc,matches_existing:{cid:b}}})}y={source_id:n.held.source_id,rows:g}}let s=t.seams??{reingest:X(e,n.backing_path),reextract:ee(e,{stage:y!==void 0})},f;try{f=await(t.buildPlan??Q)(e,n.source_id,s,{resumeHeld:y})}catch(u){return P(r,`reconcile failed: ${u instanceof Error?u.message:String(u)}`),1}T(r,f,null,i==="interactive"&&!c);let v=F(e),p=null;if(v!=null){let u={},a=new Set(f.changeset.filter(g=>g.kind==="ARCHIVE").map(g=>g.ref));for(let[g,_]of Object.entries(n.archive_state??{}))a.has(g)&&(u[g]=_);p=L(e,{version:2,source_id:f.source_id,backing_path:n.backing_path,head_pin:v,created:new Date().toISOString().replace(/[:.]/g,"-"),skipped_arms:f.skipped_arms,note:f.note,changeset:f.changeset,rows:f.rows,...f.held?{held:f.held}:{},...Object.keys(u).length>0?{archive_state:u}:{}}),r.out(`plan stored: ${p}`)}if(c)return 0;let $=t.emitEvent??(()=>{}),R=p?V(e,p).plan.archive_state:void 0,d=p?(u,a)=>O(p,u,a):void 0,k=p?(u,a)=>j(p,u,a):void 0;if(i==="agent")return U(e,f,p,o,$,r,E(i),d,R);let w=f.changeset.filter(u=>u.kind==="ARCHIVE"&&R?.[u.ref]===void 0);return i==="ci"&&w.length>0?(P(r,M(w.length)),2):A(e,f.rows,i==="override"||i==="ci",r,o,d,f.changeset,E(i),f.held,R,k,l,h)}async function ge(e,n,r={},t=process.cwd()){let{telemetryBootstrap:i,telemetryEnvName:o}=await import("./bootstrap-CNOZ5VRB.js"),c=i({verb:"reconcile",mode:typeof e.mode=="string"?e.mode:"interactive",contextRoot:W(t,".context"),env:o(),applyPlanPath:typeof e.apply=="string"?W(t,e.apply):void 0,write:!0,longSession:!0});n.out(c.banner());let l=await De(e,n,r,t);return l===1&&n.out(c.supportFooter()),await c.end({exit_code:l}),l}async function De(e,n,r={},t=process.cwd()){let i=e.apply!==void 0&&e.apply!==!1,o=typeof e.apply=="string"?e.apply:void 0;if(e.plan&&i)return P(n,"pass --plan OR --apply, not both"),2;if((e.from!==void 0||!i)&&(!e.from||!e.sourceId))return P(n,"reconcile needs --from <file> AND --source-id <id> \u2014 see `kane-cli context list --type source` for ids"),2;if(e.from&&o!==void 0)return P(n,"pass --from OR --apply <path>, not both \u2014 a stored plan names its own source"),2;let l=ue(t,n);if(!l)return 2;if(e.mode!==void 0&&!me.has(e.mode))return P(n,`--mode must be interactive | agent | ci | override, got '${e.mode}'`),2;let h=e.mode==="agent"||e.mode==="ci"||e.mode==="override";if(i&&!h&&!n.isTTY)return P(n,"refusing to apply without a TTY to confirm \u2014 pass --mode override|ci"),2;let y=!e.plan,s="override";if(e.from){let a=Re(e,n.isTTY);if(typeof a=="object")return P(n,a.error),2;s=a}let f=s==="override"||s==="ci";if(i&&!e.from){let a=e.mode??"interactive";return Pe(l,o===void 0?void 0:W(t,o),a,n,r)}let v=ke(l,t,e.from,e.sourceId);if("error"in v)return P(n,v.error),2;let p=await he(l,v.sourceId,v.filePath,n,r,!!e.plan||s==="interactive",s==="interactive"&&!e.plan);if(!p)return 1;let $=r.runDesignForUc??Z,R=r.runDesignForUc??null,d=r.sessionScript;if(!p.changed){let a=await be(l,v.sourceId,n,r,s,$,!!e.plan);if(a!==null)return a;if(T(n,p,null),s==="agent"){let g=r.emitEvent??(()=>{});K(g,p,null),g({...te})}return 0}let k=F(l),w=null;if(k!=null?w=L(l,{version:2,source_id:p.source_id,backing_path:v.filePath,head_pin:k,created:new Date().toISOString().replace(/[:.]/g,"-"),skipped_arms:p.skipped_arms,note:p.note,changeset:p.changeset,rows:p.rows,...p.held?{held:p.held}:{}}):P(n,"no chain head after extract \u2014 plan not stored"),s==="agent"){let a=r.emitEvent??(()=>{});if(!y)return K(a,p,w),a({...te}),0;let g=w?(_,b)=>O(w,_,b):void 0;return U(l,p,w,$,a,n,E(s),g)}if(!y)return w&&n.out(`plan stored: ${w}`),0;let u=p.changeset.filter(a=>a.kind==="ARCHIVE");if(s==="ci"&&u.length>0)return w&&n.out(`plan stored: ${w}`),P(n,M(u.length)),2;if(w){n.out(`plan stored: ${w}`);let a=w;return A(l,Ee(l,a)??p.rows,f,n,$,(g,_)=>O(a,g,_),p.changeset,E(s),p.held,void 0,void 0,R,d)}return A(l,p.rows,f,n,$,void 0,p.changeset,E(s),p.held,void 0,void 0,R,d)}function Ee(e,n){let r=V(e,n);return"error"in r?null:r.plan.rows}async function Ye(e,n={},r,t=process.cwd()){if(e.mode==="agent"){let{makeHeadlessIO:i}=await import("./headless-io-BL3TEAX5.js"),o=r?i("ndjson","reconcile",r):i("ndjson","reconcile"),c={out:o.out,err:h=>o.event({type:"error",message:h}),isTTY:!1,confirm:async()=>!1,ask:async()=>""},l=2;try{l=await ge(e,c,{...n,emitEvent:h=>o.event(h)},t)}catch(h){o.event({type:"error",message:h instanceof Error?h.message:String(h)})}return o.done(l)}return ge(e,fe(),n,t)}export{E as childModeFor,Ye as reconcileCommand,Re as resolveReconcileMode,ge as runReconcileCommand,ke as validateReconcileInputs};
|
package/dist/records-5SVUXJBW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-M7WQM4UA.js";import"./chunk-WWNSD6FA.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-UR6MHSHU.js";export{c as AppendBusyError,b as AppendCasError,a as ChainError,i as appendRecord,j as appendRecordRaw,f as latestHash,d as readRecords,g as readRecordsFrom,e as readTail,h as recordsSince};
|
package/dist/revert-DXXYXJGN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{d as _,i as k}from"./chunk-M7WQM4UA.js";import"./chunk-WWNSD6FA.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-UR6MHSHU.js";function j(w){let{contextDir:v,graph:y,seq:r,by:d}=w,{records:l,hashes:$}=_(v);if(!Number.isInteger(r)||r<1||r>l.length)return{record:null,warnings:[],errors:[{code:"UNKNOWN_SEQ",detail:`no record ${r} (chain has ${l.length})`}]};let i=l[r-1],p=l.slice(0,r-1),c=w.reason??`revert of record ${r}`,t=[],u=[],f=[],g=[],m={},b=new Set(i.nodes.map(e=>e.cid));for(let e of i.nodes){if(y.superseded.has(e.cid)){t.push(`${e.cid} was already superseded after record ${r} \u2014 left as is`);continue}u.push({kind:"node",old:e.cid,new:null,reason:c,by:d})}for(let e of i.supersessions){if(e.kind==="edge"){t.push(`edge retraction ${e.ecid} cannot be auto-restored \u2014 re-extract to re-evidence`);continue}if(l.slice(r).some(n=>n.supersessions.some(s=>s.kind==="node"&&s.old===e.old))){t.push(`supersession of ${e.old.slice(0,19)} was changed again after record ${r} \u2014 later state kept`);continue}let o;for(let n of p)for(let s of n.supersessions)s.kind==="node"&&s.old===e.old&&(o=s.new===s.old?void 0:s.new);o===void 0?u.push({kind:"node",old:e.old,new:e.old,reason:c,by:d}):u.push({kind:"node",old:e.old,new:o,reason:c,by:d})}let h=l.slice(r);for(let e of Object.keys(i.source_head_moves)){if(h.some(n=>e in n.source_head_moves)){t.push(`head of ${e} was moved again after record ${r} \u2014 later state kept`);continue}let o=null;for(let n of p)e in n.source_head_moves&&(o=n.source_head_moves[e]);m[e]=o}let R=new Set;for(let e of i.review){if(R.has(e.id)||b.has(e.id))continue;if(R.add(e.id),h.some(s=>s.review.some(a=>a.id===e.id))){t.push(`trust of ${e.id.slice(0,19)} was reviewed again after record ${r} \u2014 later state kept`);continue}let o=null,n=null;for(let s of p)for(let a of s.review)a.id===e.id&&(o=a.resolution==="reset"?null:a.resolution,n=a.reason);o==="approved"||o==="edited"?f.push({id:e.id,kind:"review-item",resolution:"approved",edit:null,reason:c,by:d}):o==="rejected"?f.push({id:e.id,kind:"review-item",resolution:"rejected",edit:null,reason:n??c,by:d}):f.push({id:e.id,kind:"review-item",resolution:"reset",edit:null,reason:c,by:d})}for(let e of i.names??[]){if(h.some(n=>(n.names??[]).some(s=>s.slug===e.slug))){t.push(`slug "${e.slug}" was reassigned after record ${r} \u2014 later state kept`);continue}let o;for(let n of p)for(let s of n.names??[])s.slug===e.slug&&(o=s.cid);o!==void 0?g.push({cid:o,slug:e.slug,by:d}):t.push(`slug "${e.slug}" was first assigned by record ${r} \u2014 unassignment unsupported, reassign manually`)}return u.length===0&&f.length===0&&g.length===0&&Object.keys(m).length===0?{record:null,warnings:t,errors:[{code:"NOTHING_TO_REVERT",detail:`record ${r} left no compensable facts`}]}:(i.extraction_of&&t.push(`extraction cache for ${i.extraction_of.slice(0,19)} stays \u2014 re-extract with --force`),{record:k(v,{ts:new Date().toISOString(),proposal_id:null,nodes:[],edges:[],review:f,supersessions:u,...g.length>0?{names:g}:{},source_head_moves:m},{expectPrev:$[$.length-1]??null}).record,warnings:t,errors:null})}export{j as commitRevert};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as x}from"./chunk-QROUKGKU.js";import"./chunk-ZLCZDAEX.js";import"./chunk-CH273NAE.js";import{a as O}from"./chunk-GW5DWAXY.js";import"./chunk-T63R6QT4.js";import{o as V}from"./chunk-3STZLM5J.js";import"./chunk-L4JIMNKW.js";import{d as N}from"./chunk-M7WQM4UA.js";import"./chunk-WWNSD6FA.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-UR6MHSHU.js";import{readFileSync as M}from"fs";var P=new Set(["derived","skipped","archived","drift"]),q={kind:"human",id:process.env.USER??"operator"};function $(r,t){return r.nameOf.get(t)??t.slice(0,19)}function A(r,t){let o=r.getNode(t)?.content??{},h=r.derivesInto(t)[0]?.props.anchor;return{cid:t,uc:{temp_ref:t,title:String(o.title??o.text??""),summary:o.summary!==void 0?String(o.summary):void 0,risk:String(o.risk??"med"),cite:{anchor:typeof h=="string"?h:"\u2014",quote:""},depends_on_hint:[],matches_existing:null}}}function G(r,t){let o=new Set,{records:h}=N(r);for(let i of h){if(i.proposal_id==null)continue;let u=new Set(i.review.map(e=>e.id));for(let e of i.nodes)u.has(e.cid)||o.add(e.cid)}for(let i of[...o])(t.trust.get(i)!=="derived"||t.superseded.has(i))&&o.delete(i);return o}var U=new Set(["approved","edited","rejected","skipped","supersede"]);function D(r){let t;try{t=JSON.parse(r)}catch(i){return{errors:[`not valid JSON: ${i instanceof Error?i.message:String(i)}`]}}if(!Array.isArray(t))return{errors:['expected a top-level array of {"ref", "resolution", ...} entries']};let o=[],h=[];return t.forEach((i,u)=>{if(i==null||typeof i!="object"||Array.isArray(i)){o.push(`[${u}]: not an object`);return}let e=i;(typeof e.ref!="string"||!e.ref.trim())&&o.push(`[${u}]: "ref" (slug or cid) is required`),(typeof e.resolution!="string"||!U.has(e.resolution))&&o.push(`[${u}]: "resolution" must be one of approved | edited | rejected | skipped | supersede`),e.resolution==="supersede"&&(typeof e.supersede_target!="string"||!e.supersede_target.trim())&&o.push(`[${u}]: resolution "supersede" requires "supersede_target" (slug or cid)`),e.edit!==void 0&&(e.edit==null||typeof e.edit!="object"||Array.isArray(e.edit))&&o.push(`[${u}]: "edit" must be an object ({title?, summary?, risk?})`),o.length===0&&h.push(e)}),o.length>0?{errors:o}:{entries:h}}async function Q(r,t,o,h=process.cwd()){let i=r.queue??"derived";if(!P.has(i))return t.out(`unknown queue ${i} \u2014 one of: derived | skipped | archived | drift`),2;if(r.mode!=null&&r.mode!=="agent"&&r.mode!=="ci")return(t.err??t.out)(`error: review --mode must be agent | ci, got '${r.mode}'`),2;r.mode==="agent"&&(r={...r,json:!0});let u=x(h,t);if(!u)return 2;let e=O(u),m=n=>(t.err??t.out)(n);if(r.allowArchive&&!r.because?.trim())return m('error: --allow-archive requires --because "<reason>" (the audit trail on the record)'),2;if(r.mode==="ci"&&r.allowArchive)return m("error: ci mode never archives \u2014 nothing committed"),2;if((r.approve?.length??0)>0||(r.skip?.length??0)>0||(r.defer?.length??0)>0){if(r.verdicts)return m("error: --approve/--skip/--defer and --verdicts are mutually exclusive"),2;let n=new Map,c=[];for(let d of r.approve??[]){let f=e.resolve(d),g=f&&!e.superseded.has(f.tip)?f.tip:null;if(!g){c.push(`${d}: names nothing in the graph`);continue}n.set(g,{resolution:"approved"})}for(let d of[...r.skip??[],...r.defer??[]])e.resolve(d)||c.push(`${d}: names nothing in the graph`);if(c.length>0){for(let d of c)m(`error: ${d}`);return m("error: nothing committed (structured verdicts are atomic \u2014 fix every offender and re-run)"),2}if(n.size===0)return t.out("nothing changed \u2014 every ref was skipped/deferred"),0;let l=V({contextDir:u,graph:e,verdicts:n,by:q});if(l.errors){for(let d of l.errors)m(`${d.code}: ${d.detail}`);return 1}return t.out(`review: committed record ${l.record.seq} \u2014 ${n.size} approved`),0}if(r.verdicts){let n=s=>(t.err??t.out)(s),c;try{c=M(r.verdicts,"utf8")}catch{return n(`error: cannot read verdicts file ${r.verdicts}`),2}let l=D(c);if("errors"in l){for(let s of l.errors)n(`error: --verdicts ${r.verdicts}: ${s}`);return 2}let d=new Set([...e.trust.entries()].filter(([s,a])=>(a==="derived"||a==="archived")&&!e.superseded.has(s)).map(([s])=>s)),f=new Map,g=[];for(let s of l.entries){let a=e.resolve(s.ref),p=a&&!e.superseded.has(a.tip)?a.tip:null;if(!p){g.push(`${s.ref}: names nothing in the graph`);continue}if(!d.has(p)){g.push(`${s.ref}: not in a review queue (trust: ${e.trust.get(p)??"?"})`);continue}if(f.has(p)){g.push(`${s.ref}: duplicate \u2014 an earlier entry already resolves to this node (${$(e,p)})`);continue}f.set(p,{resolution:s.resolution,...s.reason?{reason:s.reason}:{},...s.edit?{edit:s.edit}:{},...s.supersede_target?{supersedeTarget:s.supersede_target}:{}})}if(g.length>0){for(let s of g)n(`error: --verdicts: ${s}`);return n("error: nothing committed (the verdicts file is atomic \u2014 fix every offender and re-run)"),2}let y=[...f.entries()].filter(([,s])=>s.resolution==="rejected"||s.resolution==="supersede");if(y.length>0&&r.mode==="ci")return n(`error: ci mode never archives \u2014 ${y.length} retiring verdict(s) (rejected/supersede) present, nothing committed`),2;if(y.length>0&&r.allowArchive){let{archiveImpact:s}=await import("./feeder-XGTFV7TZ.js");for(let[a,p]of y){let R=p.resolution==="supersede"?(()=>{let j=p.supersedeTarget?e.resolve(p.supersedeTarget):null;return j&&!e.superseded.has(j.tip)?j.tip:null})():a;if(R===null)continue;let C=s(e,R),I=p.resolution==="supersede"?`supersede (retires ${$(e,R)})`:`archive ${$(e,R)}`;n(`${I}: ${C.design_children} design child(ren) affected`)}for(let[,a]of y)a.reason||(a.reason=r.because)}let E=y.length>0&&!r.allowArchive,S=V({contextDir:u,graph:e,verdicts:f,by:q,...E?{holdArchives:!0}:{}});if(S.errors){if(S.errors[0]?.code==="NO_VERDICTS")return n("nothing changed \u2014 every item was skipped"),0;for(let s of S.errors)n(`${s.code}: ${s.detail}`);return 1}E&&t.out(`${y.length} archive(s) held for interactive confirmation (re-run with --allow-archive --because "<reason>" to apply headlessly)`);let _=new Map;for(let s of f.values())_.set(s.resolution,(_.get(s.resolution)??0)+1);if(r.json)for(let[s,a]of f.entries())t.out(JSON.stringify({ref:$(e,s),cid:s,resolution:a.resolution}));else{let s=[..._.entries()].map(([a,p])=>`${p} ${a}`).join(", ");t.out(`review: committed record ${S.record.seq} \u2014 ${s}`)}return 0}if(i==="drift"){let n=e.staleList().filter(({state:c})=>c!=="superseded").map(({cid:c,state:l})=>({ref:$(e,c),cid:c,state:l,title:String(e.getNode(c)?.content.title??e.getNode(c)?.content.source_id??""),pinned_sources:[...new Set(e.derivesInto(c).map(d=>String(d.props.source_id)))]}));if(r.json){for(let c of n)t.out(JSON.stringify(c));return 0}if(n.length===0)return t.out("drift queue is empty \u2014 every node's evidence matches the current source snapshots"),0;t.out(`${n.length} item(s) whose evidence changed (re-extract the source to re-approve):`);for(let c of n)t.out(` [${c.state}] ${c.ref} \xB7 ${c.title} \xB7 sources: ${c.pinned_sources.join(", ")||"\u2014"}`);return 0}if(!t.isTTY)return t.out("review: verdict queues need a TTY (drift listing works anywhere, or pass --verdicts <file.json>)"),2;let v,w;if(i==="archived")v=[...e.trust.entries()].filter(([n,c])=>c==="archived"&&!e.superseded.has(n)).map(([n])=>A(e,n)),w="skipped";else{let n=G(u,e),c=[...e.trust.entries()].filter(([d,f])=>f==="derived"&&!e.superseded.has(d)).map(([d])=>d),l=i==="skipped"?c.filter(d=>n.has(d)):c;l.sort((d,f)=>Number(n.has(f))-Number(n.has(d))),v=l.map(d=>A(e,d)),w="skipped"}if(v.length===0)return t.out(`${i} queue is empty`),0;t.out(`${v.length} node(s) in the ${i} queue \u2014 approve promotes, reject ${i==="archived"?"re-archives":"archives"}, edit mints a new version, skip leaves it for later`);let T=await o(v,e,w),k=V({contextDir:u,graph:e,verdicts:T,by:q});if(k.errors){if(k.errors[0]?.code==="NO_VERDICTS")return t.out("nothing changed \u2014 every item was skipped"),0;for(let n of k.errors)t.out(`${n.code}: ${n.detail}`);return 1}let b=k.record;return t.out(`committed record ${b.seq}: ${b.review.length} review fact(s), ${b.supersessions.length} supersession(s), ${b.nodes.length} new version(s)`),0}async function F(r,t,o){let[{render:h},i,{ReviewChecklist:u}]=await Promise.all([import("./build-JIKYOZUH.js"),import("./react-QWOAB3TB.js"),import("./ui-JEJGTURD.js")]),e=i.default??i;return new Promise(m=>{let v=h(e.createElement(u,{items:r.map(w=>({uc:w.uc})),defaultResolution:o,onSubmit:w=>{v.unmount(),m(w)}}))})}async function B(r){let{bothTTY:t}=await import("./headless-io-BL3TEAX5.js");return Q(r,{out:o=>process.stdout.write(o+`
|
|
3
|
-
`),err:o=>process.stderr.write(o+`
|
|
4
|
-
`),confirm:async()=>!1,isTTY:t()},F)}export{D as parseVerdictsFile,B as reviewCommand,Q as runReviewCommand};
|
package/dist/run-52UIBPXD.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-HJERKSBK.js";import"./chunk-IBNC444G.js";import"./chunk-KHU7C6EE.js";import"./chunk-KVQOBPAZ.js";import"./chunk-AM5S4KG4.js";import"./chunk-5JTUL6XL.js";import"./chunk-O56PUUNL.js";import"./chunk-NRC2G4Y5.js";import"./chunk-BQHKBOSF.js";import"./chunk-2XGDWUJ5.js";import"./chunk-BB2W35TW.js";import"./chunk-VGFTNLQQ.js";import"./chunk-L2TV4G56.js";import"./chunk-JFAFKHDX.js";import"./chunk-5KFS3GAZ.js";import"./chunk-EV3EHXEI.js";import"./chunk-F7WKDMX7.js";import"./chunk-VOHQA2SP.js";import"./chunk-XDHZMCTA.js";import"./chunk-AAONIIQV.js";import"./chunk-YKTYVJBN.js";import"./chunk-CVOGP253.js";import"./chunk-427OQS2N.js";import"./chunk-ZLCZDAEX.js";import"./chunk-SE6WNCYU.js";import"./chunk-DNNZ353O.js";import"./chunk-Q2F5QB2W.js";import"./chunk-GVIPTX6T.js";import"./chunk-ZPDM6FO7.js";import"./chunk-NVGBE2DR.js";import"./chunk-CH273NAE.js";import"./chunk-L5LI2JF4.js";import"./chunk-GW5DWAXY.js";import"./chunk-T63R6QT4.js";import"./chunk-3STZLM5J.js";import"./chunk-L4JIMNKW.js";import"./chunk-M7WQM4UA.js";import"./chunk-WWNSD6FA.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-5EOX4MEY.js";import"./chunk-C4G7RVJ6.js";import"./chunk-UR6MHSHU.js";export{a as runDesign};
|
package/dist/run-VRVH4VO3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h}from"./chunk-KRXSXQBU.js";import"./chunk-UPPEOQJQ.js";import"./chunk-36OC3TFE.js";import{d as a}from"./chunk-O56PUUNL.js";import"./chunk-NRC2G4Y5.js";import"./chunk-BQHKBOSF.js";import"./chunk-2XGDWUJ5.js";import"./chunk-BB2W35TW.js";import"./chunk-VGFTNLQQ.js";import"./chunk-L2TV4G56.js";import"./chunk-JFAFKHDX.js";import"./chunk-5KFS3GAZ.js";import"./chunk-EV3EHXEI.js";import"./chunk-F7WKDMX7.js";import"./chunk-VOHQA2SP.js";import"./chunk-UX2B7L6K.js";import"./chunk-XDHZMCTA.js";import"./chunk-AAONIIQV.js";import"./chunk-YKTYVJBN.js";import"./chunk-CVOGP253.js";import"./chunk-427OQS2N.js";import"./chunk-ZLCZDAEX.js";import"./chunk-SE6WNCYU.js";import"./chunk-DNNZ353O.js";import"./chunk-Q2F5QB2W.js";import"./chunk-GVIPTX6T.js";import"./chunk-NVGBE2DR.js";import"./chunk-CH273NAE.js";import"./chunk-GW5DWAXY.js";import"./chunk-T63R6QT4.js";import"./chunk-3STZLM5J.js";import"./chunk-L4JIMNKW.js";import"./chunk-M7WQM4UA.js";import"./chunk-WWNSD6FA.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-5EOX4MEY.js";import"./chunk-C4G7RVJ6.js";import"./chunk-UR6MHSHU.js";export{g as dedupPreFlags,c as deliveredImagesWire,e as displaySourceName,b as extractProtocolCtx,a as resolveAnswers,h as runExtract,d as sessionSourceRef,f as sourceBanner};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-GVIPTX6T.js";import"./chunk-UR6MHSHU.js";export{a as SessionError,f as cleanSessions,b as createSession,e as listSessions,d as peekSession,c as resumeSession};
|
package/dist/spawner-AH5FTUYU.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-UX2B7L6K.js";import"./chunk-XDHZMCTA.js";import"./chunk-C4G7RVJ6.js";import"./chunk-UR6MHSHU.js";export{c as buildAgentEnv,b as findAssuranceAgent,a as platformPackageName,d as resolveAgentAuthEnv};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as m,g as k}from"./chunk-AAONIIQV.js";import{d as g}from"./chunk-GVIPTX6T.js";import"./chunk-M7WQM4UA.js";import"./chunk-WWNSD6FA.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-UR6MHSHU.js";import{join as w}from"path";import{existsSync as y}from"fs";function x(e){return(e.answer?.length??0)>0||(e.approve?.length??0)>0||(e.skip?.length??0)>0||(e.defer?.length??0)>0}function h(e){if(!x(e))return{ok:!0,value:null};let t=[],r=new Set;for(let o of e.answer??[]){let u=o.indexOf("="),c=u>0?o.slice(0,u).trim():"",n=u>0?o.slice(u+1):"";if(!c||!n)return{ok:!1,error:`--answer needs <id>=<option-number-or-text>, got '${o}'`};if(r.has(c))return{ok:!1,error:`--answer target '${c}' given twice \u2014 one answer per id`};if(r.add(c),/^\d+$/.test(n.trim())){let p=Number(n.trim());if(p<1)return{ok:!1,error:`--answer option numbers are 1-based (got '${c}=${n.trim()}')`};t.push({target:c,optionIndex:p-1})}else t.push({target:c,freeText:n})}let i=o=>[...new Set((o??[]).map(u=>u.trim()).filter(Boolean))],s=i(e.approve),a=i(e.skip),d=i(e.defer);for(let[o,u]of[s,a,d].entries())for(let c of u)if([s,a,d].some((p,f)=>f!==o&&p.includes(c)))return{ok:!1,error:`handle '${c}' appears in more than one of --approve/--skip/--defer`};return{ok:!0,value:{answers:t,approve:s,skip:a,defer:d}}}function E(e,t){if(!x(e))return null;let r=t==="extract"?"extract":"design",i=h(e);return i.ok?e.resume?e.mode!=="agent"?`${r}: --answer/--approve/--skip/--defer are the structured agent-mode resume surface \u2014 add --mode agent (interactively, just answer in the session)`:null:`${r}: --answer/--approve/--skip/--defer address a paused session's pending panels \u2014 pair them with --resume <sid>`:`${r}: ${i.error}`}function P(e,t){if(e.archetype==="pause-card")return null;if(e.archetype==="walk-card"){let s=e.body.card??{},a=new Set([e.id]);for(let d of["temp_ref","ref","cid"]){let o=s[d];typeof o=="string"&&o&&a.add(o)}for(let[d,o]of[["approve",t.approve],["skip",t.skip],["defer",t.defer]]){let u=o.find(c=>a.has(c));if(u)return{kind:"verdict",panelId:e.id,ref:u,v:d}}return null}if(e.archetype==="ask"){let s=e.body.questions??[];for(let a=0;a<s.length;a++){let d=t.answers.find(o=>o.target===s[a].id||o.target===e.id);if(d)return d.optionIndex!==void 0?d.optionIndex<0||d.optionIndex>=(s[a].options?.length??0)?null:{kind:"answer",panelId:e.id,qIndex:a,optionIndex:d.optionIndex}:{kind:"answer",panelId:e.id,qIndex:a,freeText:d.freeText??""}}return null}let r=t.answers.find(s=>s.target===e.id);if(!r)return null;let i=e.body.options;return r.optionIndex!==void 0?!Array.isArray(i)||r.optionIndex<0||r.optionIndex>=i.length?null:{kind:"answer",panelId:e.id,qIndex:0,optionIndex:r.optionIndex}:{kind:"answer",panelId:e.id,qIndex:0,freeText:r.freeText??""}}function v(e,t){let r=g(e,t);if(!r)return null;let i=r.pending.questions;try{if(y(w(e,"sessions",t,m))){let a=k(e,t).kane?.pending.questions??[];a.length>0&&(i=a)}}catch{}return{questions:i,panels:[],appliedEvents:r.applied_events??[]}}function I(e){let t=e.questions.map(o=>o.id),r=[],i=[],s=[];for(let o of e.panels){if(s.push(o.id),o.archetype==="ask")for(let u of o.body.questions??[])r.push(u.id);if(o.archetype==="walk-card"){let u=o.body.card??{};for(let c of["temp_ref","ref","cid"]){let n=u[c];typeof n=="string"&&n&&i.push(n)}}}let a=(o,u)=>u.length>0?`${o}: ${u.join(", ")}`:null,d=[a("questions",[...new Set([...t,...r])]),a("panels",s),a("verdict handles",i)].filter(o=>o!==null);return d.length>0?`addressable pending ids \u2014 ${d.join(" \xB7 ")}`:"this session has NO pending panels or questions"}function $(e,t,r,i){let s=[],a=new Map(t.questions.map(n=>[n.id,n])),d=new Map(t.panels.map(n=>[n.id,n])),o=new Map,u=new Set;for(let n of t.panels){if(n.archetype==="ask")for(let p of n.body.questions??[])o.set(p.id,p);if(n.archetype==="walk-card"){let p=n.body.card??{};u.add(n.id);for(let f of["temp_ref","ref","cid"]){let l=p[f];typeof l=="string"&&l&&u.add(l)}}}let c=()=>{let n=t.questions[0],p=n?` --answer ${n.id}=${n.recommendedOptionIndex+1}`:"";return`try: ${i}${p}`};for(let n of e.answers){let p=a.get(n.target)??o.get(n.target);if(p){let l=p.options?.length??0;if(n.optionIndex!==void 0&&(n.optionIndex<0||n.optionIndex>=l))return{ok:!1,error:`error: --answer ${n.target}=${n.optionIndex+1} is out of range \u2014 '${n.target}' has ${l} option(s) (numbers are 1-based)`};continue}let f=d.get(n.target);if(f){let l=f.body.options;if(n.optionIndex!==void 0&&Array.isArray(l)&&(n.optionIndex<0||n.optionIndex>=l.length))return{ok:!1,error:`error: --answer ${n.target}=${n.optionIndex+1} is out of range \u2014 the panel has ${l.length} option(s) (numbers are 1-based)`};continue}if(t.appliedEvents.includes(`resolveq:${r}:${n.target}`)||t.appliedEvents.includes(`assumed:${r}:${n.target}`)){s.push(`note: '${n.target}' was already answered \u2014 --answer ${n.target}=\u2026 is a no-op`);continue}return{ok:!1,error:`error: unknown --answer target '${n.target}' \u2014 ${I(t)}
|
|
3
|
-
${c()}`}}for(let[n,p]of[["--approve",e.approve],["--skip",e.skip],["--defer",e.defer]])for(let f of p){if(u.has(f))continue;let l=u.size>0?`addressable verdict handles: ${[...u].join(", ")}`:"this session has NO pending walk/review cards";return{ok:!1,error:`error: unknown ${n} handle '${f}' \u2014 ${l}
|
|
4
|
-
${c()}`}}return{ok:!0,notes:s}}function S(e,t){let r=[],i=[];for(let s of e){let a=t.answers.find(o=>o.target===s.id);if(!a)continue;i.push(s.id);let d=a.optionIndex!==void 0?s.options[a.optionIndex]?.label??`option ${a.optionIndex+1}`:a.freeText??"";r.push(`- ${s.question} [${s.id}] \u2192 ${d}`)}return r.length===0?{statement:null,matchedQids:[]}:{statement:["Structured resume answers (applied via --answer flags \u2014 these ARE the human's decisions; do not re-ask them):",...r].join(`
|
|
5
|
-
`),matchedQids:i}}var b=/^kane-cli (context extract|design tests) --resume [A-Za-z0-9][A-Za-z0-9._-]*( --mode (agent|interactive|ci|override))?( --answer \S+=\d+)*$/;function A(e){try{let t=typeof e.resume=="string"?e.resume:null;if(!t)return[];let r=[{cmd:t,why:"resume the paused session",title:"Resume the session"}],i=Array.isArray(e.pending_questions)?e.pending_questions.filter(s=>s&&typeof s.id=="string"&&!/\s/.test(s.id)):[];if(i.length>0){let s=i.map(d=>{let o=typeof d.recommended_index=="number"&&d.recommended_index>=0?d.recommended_index:0;return` --answer ${d.id}=${o+1}`}).join(""),a=`${t}${s}`;b.test(a)&&r.push({cmd:a,why:`answer the ${i.length} pending question(s) non-interactively \u2014 --answer <question-id>=<option number (1-based) or free text>, repeatable; shown with each question's recommended option`,title:"Answer via structured flags"})}return r}catch{return[]}}function O(e){let t=null;return{encoding:e.encoding,out:e.out,progress:e.progress,event:r=>{if(r.type==="session_paused"&&!("next"in r)&&typeof r.resume=="string"){let i=A(r);if(i.length>0){t=i,e.event({...r,next:i});return}}e.event(r)},done:(r,i,s)=>e.done(r,i,s??(r===3&&t?t:void 0))}}function R(e,t){return e==="design"?`kane-cli design tests --resume ${t} --mode agent`:`kane-cli context extract --resume ${t} --mode agent`}function Q(e){let t=h(e.opts);if(!t.ok)return{kind:"refuse",error:`error: ${t.error}`,code:"STRUCTURED_FLAGS_USAGE"};if(!t.value)return{kind:"none"};let r=e.opts.resume;if(!r)return{kind:"refuse",error:"error: structured resume flags need --resume <sid>",code:"STRUCTURED_FLAGS_USAGE"};let i=v(e.contextDir,r);if(!i)return{kind:"none"};let s=$(t.value,i,r,R(e.verb,r));if(!s.ok)return{kind:"refuse",error:s.error,code:"STRUCTURED_TARGET_UNKNOWN"};let{statement:a,matchedQids:d}=S(i.questions,t.value);return{kind:"apply",answers:t.value,statement:a,matchedQids:d,notes:s.notes}}export{b as STRUCTURED_RESUME_RE,S as composeAnswerStatement,E as gateStructuredFlags,x as hasStructuredFlags,P as matchPanelInput,h as parseStructuredAnswers,Q as prepareStructuredResume,v as readPendingSets,R as resumeExample,A as structuredNextItems,$ as validateStructuredTargets,O as withStructuredNext};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{d as a}from"./chunk-NAE7MBR2.js";import"./chunk-3MSXQU2C.js";import"./chunk-L7VREJTG.js";import"./chunk-UBFKZEX3.js";import"./chunk-NRTHYROA.js";import"./chunk-CSQ46PJ7.js";import"./chunk-URQUQWGW.js";import"./chunk-OIYGGEUL.js";import"./chunk-2XMJ6YAE.js";import"./chunk-C5UNZ6ZY.js";import"./chunk-NAC7SFBE.js";import"./chunk-6UJDOAYR.js";import"./chunk-33QXD75Y.js";import"./chunk-ZM5PVRJK.js";import"./chunk-RKWJG3WW.js";import"./chunk-2YQ6TW77.js";import"./chunk-NJPTOKW5.js";import"./chunk-S3DAAAE5.js";import"./chunk-2KBD6JZX.js";import"./chunk-DQ54MH7F.js";import"./chunk-FCMLIK7P.js";import"./chunk-CJJXT5DO.js";import"./chunk-QM4S2APK.js";import"./chunk-ZPDM6FO7.js";import"./chunk-EHN5HTUD.js";import"./chunk-NVGBE2DR.js";import"./chunk-CH273NAE.js";import"./chunk-RNSSM2BK.js";import"./chunk-3FN5VJMV.js";import"./chunk-L5LI2JF4.js";import"./chunk-NBKQT7LJ.js";import"./chunk-IXVOXJP6.js";import"./chunk-UI7KULSI.js";import"./chunk-TDPWFYTJ.js";import"./chunk-DXV6MBTD.js";import"./chunk-LQZ2BU7Q.js";import"./chunk-R2RGSO4B.js";import"./chunk-5Y2G4NC7.js";import"./chunk-XVDJ423L.js";import"./chunk-6HEGD6H2.js";import"./chunk-BAL64WSI.js";import"./chunk-KT6G7AF2.js";import"./chunk-RFHMDQXZ.js";import"./chunk-FPFOW6BS.js";import"./chunk-WAOCHXJ5.js";import"./chunk-GW5DWAXY.js";import"./chunk-T63R6QT4.js";import"./chunk-3STZLM5J.js";import"./chunk-L4JIMNKW.js";import"./chunk-M7WQM4UA.js";import"./chunk-WWNSD6FA.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-LR5XO2KD.js";import"./chunk-JKTFTF24.js";import"./chunk-323MLBYA.js";import"./chunk-YCCUBQY4.js";import"./chunk-KNDSQ4PS.js";import"./chunk-W6VD2XFO.js";import"./chunk-5EOX4MEY.js";import"./chunk-HPMS5KO6.js";import"./chunk-2WVKOZ6W.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-JRMDGLLT.js";import"./chunk-VE3SUJMA.js";import"./chunk-E47GFYXA.js";import"./chunk-F6ZOJXYU.js";import"./chunk-APAIWBIH.js";import"./chunk-73C4PRYU.js";import{a as o}from"./chunk-DFS4RMVP.js";import"./chunk-CDQX6HGJ.js";import"./chunk-4OPQJ7PE.js";import"./chunk-C4G7RVJ6.js";import{a as t}from"./chunk-HCBYKLMW.js";import{c as n}from"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import{e as r}from"./chunk-UR6MHSHU.js";var e=r(t(),1);async function p(i){let c=i.scenarioLimit!==void 0||i.perScenarioLimit!==void 0?{scenarioLimit:i.scenarioLimit,perScenarioLimit:i.perScenarioLimit}:void 0,{waitUntilExit:m}=n((0,e.jsx)(o,{children:(0,e.jsx)(a,{initialChatMode:"generate",initialObjective:i.objective,initialGenerateLimits:c})}),{exitOnCtrlC:!1});await m()}export{p as runGenerate};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i,n as j,o as k,p as l,q as m}from"./chunk-6UJDOAYR.js";import"./chunk-33QXD75Y.js";import"./chunk-ZM5PVRJK.js";import"./chunk-RKWJG3WW.js";import"./chunk-2YQ6TW77.js";import"./chunk-L5LI2JF4.js";import"./chunk-DXV6MBTD.js";import"./chunk-6HEGD6H2.js";import"./chunk-KT6G7AF2.js";import"./chunk-FPFOW6BS.js";import"./chunk-WAOCHXJ5.js";import"./chunk-KNDSQ4PS.js";import"./chunk-W6VD2XFO.js";import"./chunk-5EOX4MEY.js";import"./chunk-NLCCBXXV.js";import"./chunk-RZ4F3BHX.js";import"./chunk-JRMDGLLT.js";import"./chunk-F6ZOJXYU.js";import"./chunk-4OPQJ7PE.js";import"./chunk-C4G7RVJ6.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{i as ExportError,c as assertOrgMatchOrExit,j as exportTestmd,b as metaMatchesOrg,a as readMetaIfExists,d as resolveCurrentOrgId,l as resolveSyncAuth,h as runDeleteAction,k as runExportAction,e as runListAction,f as runListTui,g as runStatusAction,m as runSyncAction};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-6HEGD6H2.js";import"./chunk-KT6G7AF2.js";import"./chunk-RZ4F3BHX.js";import"./chunk-JRMDGLLT.js";import"./chunk-C4G7RVJ6.js";import"./chunk-UR6MHSHU.js";export{a as refreshOAuthToken};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as S}from"./chunk-UPPEOQJQ.js";import{a as x,b as P,c as C,d as V,e as j}from"./chunk-NRC2G4Y5.js";import"./chunk-BB2W35TW.js";import"./chunk-YKTYVJBN.js";import{a as R,b as D}from"./chunk-DNNZ353O.js";import"./chunk-NVGBE2DR.js";import{a as y}from"./chunk-GW5DWAXY.js";import"./chunk-T63R6QT4.js";import{c as b,o as f,p as k}from"./chunk-3STZLM5J.js";import"./chunk-L4JIMNKW.js";import"./chunk-M7WQM4UA.js";import{e as w}from"./chunk-WWNSD6FA.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import"./chunk-C4G7RVJ6.js";import"./chunk-UR6MHSHU.js";function I(o,t){return{contextDir:o,rootSid:t,locks:w(o,t),probe:S(o,{resolveAlias:i=>P(i),embed:(i,s)=>C(i,s),readVector:(i,s)=>V(o,i,s),writeVector:(i,s,n)=>j(o,i,s,n)})}}var N=new Set(["archive"]);async function Y(o,t,i,s){let n=y(o.contextDir);if(i.v==="defer")return{outcome:"deferred"};if(t.kind==="MODIFY_HELD"){if(!t.heldPayload)return{outcome:"failed",detail:`${t.ref} carries no held payload`};let e=t.heldPayload;if(i.v==="keep_current"){if(!e.event_id)return{outcome:"failed",detail:`this held row has no durable event id \u2014 resume the owner to drop it: kane-cli context extract --resume ${e.sid}`};let{commitChatTurn:r}=await import("./chat-committer-4BQBOKI4.js"),u=r({contextDir:o.contextDir,graph:n,ops:[{kind:"resolve_question",questionId:`drop-held:${e.sid}:${e.tempRef}`,resolution:"deferred",eventId:e.event_id}],by:s});return u.errors?{outcome:"failed",detail:u.errors.map(d=>`${d.code}: ${d.detail}`).join("; ")}:(o.signals?.({ref:t.ref,verdict:"held-dropped"}),{outcome:"committed",detail:"held payload dropped (recorded) \u2014 the owner's resume will not re-present it"})}if(i.v==="approve"){let r=e.content._held??null;if(!r?.source_id||!r.source_cid||!r.anchor||!r.quote)return{outcome:"failed",detail:`this held row carries no committable provenance \u2014 resume the owner to apply it: kane-cli context extract --resume ${e.sid}`};{let a=n.mediaOf(r.source_cid),m=R(o.contextDir,n,r.source_cid),g=a.format==="image"?null:m?D(m):null;if(a.format!=="image"&&g===null)return{outcome:"failed",detail:`the pinned source ${r.source_id} (${r.source_cid.slice(0,19)}) has no citable text to verify this held row against \u2014 resume the owner: kane-cli context extract --resume ${e.sid}`};let _=b(a,{anchor:r.anchor,quote:r.quote},g);if(_.length>0)return{outcome:"failed",detail:`held provenance does not verify against the pinned source (${_.map($=>`${$.code}: ${$.detail}`).join("; ")}) \u2014 resume the owner: kane-cli context extract --resume ${e.sid}`}}let{commitProposal:u}=await import("./committer-2EJPVVCQ.js"),{_held:d,...c}=e.content,q={version:1,read_basis:n.latestHash,source:{source_id:r.source_id,source_cid:r.source_cid},use_cases:[{temp_ref:e.tempRef,title:String(c.title??e.tempRef),...c.summary!==void 0?{summary:c.summary}:{},risk:String(c.risk??"med"),cite:{anchor:r.anchor,quote:r.quote},depends_on_hint:[],matches_existing:null}]},l=await x(I(o.contextDir,o.rootSid??`review-${process.pid}`),{verb:"maintain",ucTargets:[],newBuCandidates:[{tempRef:e.tempRef,title:String(c.title??e.tempRef),probeText:`${String(c.title??"")} ${String(c.summary??"")}`.trim()}],sourcePins:[{source_id:r.source_id,source_cid:r.source_cid}],readBasis:n.latestHash,...e.event_id?{eventIds:[e.event_id]}:{}},a=>{let m=u({contextDir:o.contextDir,graph:a.graph,proposal:q,proposalId:null,verdicts:new Map([[e.tempRef,{resolution:"skipped"}]]),by:s,autoName:!0,allowStaleBasis:!0,eventIds:e.event_id?[e.event_id]:a.eventIds("maintain",1),sid:a.sid,probeHits:a.probeHits});return m.errors!==null?{errors:m.errors}:{result:m,record:m.record}}),h=l.ok&&"result"in l?l.result:{record:null,errors:l.ok?null:l.kind==="validation"?l.errors:[{code:l.kind==="contended"?l.err.code:"UNSETTLED",detail:l.kind==="contended"?`held by ${l.err.holder?.owner_sid??"another session"}`:"concurrent activity kept moving the store"}]};return h.errors?{outcome:"failed",detail:h.errors.map(a=>`${a.code}: ${a.detail}`).join("; ")}:(o.signals?.({ref:t.ref,verdict:"held-applied"}),{outcome:"committed",detail:`held payload committed (derived) by ${s.id}`})}return{outcome:"failed",detail:`verdict ${i.v} does not apply to a MODIFY_HELD card`}}let v=n.resolve(t.ref);if(!v)return{outcome:"failed",detail:`${t.ref} names nothing in the graph`};let p=n.tipOf(v.cid);if(i.v==="archive"){if(!i.because||!i.because.trim())return{outcome:"failed",detail:"archive requires --because (a reason the record keeps)"};let e=f({contextDir:o.contextDir,graph:n,verdicts:new Map([[p,{resolution:"rejected",reason:i.because}]]),by:s});return e.errors?{outcome:"failed",detail:e.errors.map(r=>`${r.code}: ${r.detail}`).join("; ")}:(o.signals?.({ref:t.ref,verdict:"archived",reason:i.because}),{outcome:"retired"})}if(i.v==="approve"){let e=f({contextDir:o.contextDir,graph:n,verdicts:new Map([[p,{resolution:"approved"}]]),by:s});return e.errors?{outcome:"failed",detail:e.errors.map(r=>`${r.code}: ${r.detail}`).join("; ")}:(o.signals?.({ref:t.ref,verdict:"approved"}),{outcome:"applied"})}if(i.v==="merge"||i.v==="keep_both"){if(t.kind!=="PAIR"||!t.pair)return{outcome:"failed",detail:`${t.ref} is not a PAIR card`};let e=n.resolve(t.pair.candidate_cid);if(!e)return{outcome:"failed",detail:`pair candidate ${t.pair.candidate_ref} names nothing`};let r=n.tipOf(e.cid);if(i.v==="merge"){let d=k({contextDir:o.contextDir,graph:n,survivor:r,merged:p,reason:`pair merge: duplicate of ${t.pair.candidate_ref} (score ${t.pair.score})`,by:s});return d.errors?{outcome:"failed",detail:d.errors.map(c=>`${c.code}: ${c.detail}`).join("; ")}:(o.signals?.({ref:t.ref,verdict:"pair-merged",reason:t.pair.candidate_ref}),{outcome:"committed",detail:`merged into ${t.pair.candidate_ref} \u2014 survivor stays derived`})}let u=f({contextDir:o.contextDir,graph:n,verdicts:new Map([[p,{resolution:"approved"}],[r,{resolution:"approved"}]]),by:s});return u.errors?{outcome:"failed",detail:u.errors.map(d=>`${d.code}: ${d.detail}`).join("; ")}:(o.signals?.({ref:t.ref,verdict:"pair-kept-both",reason:t.pair.candidate_ref}),{outcome:"applied",detail:"both promoted as distinct"})}return{outcome:"failed",detail:`verdict ${i.v} does not apply to a ${t.kind} card`}}export{N as requiresBecause,Y as submitReview};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as le}from"./chunk-SWESH2J7.js";import{a as X,c as z,d as se}from"./chunk-3LWTUMDG.js";import{c as ae}from"./chunk-AH7ZZIZY.js";import"./chunk-QROUKGKU.js";import"./chunk-OHRS3H7Z.js";import"./chunk-AM5S4KG4.js";import"./chunk-5JTUL6XL.js";import{b as Q,c as oe,d as ie}from"./chunk-W5DOU2DV.js";import{a as U}from"./chunk-JEUA4UWK.js";import"./chunk-JFAFKHDX.js";import"./chunk-AAONIIQV.js";import"./chunk-ZLCZDAEX.js";import"./chunk-DNNZ353O.js";import"./chunk-QM4S2APK.js";import"./chunk-NVGBE2DR.js";import"./chunk-CH273NAE.js";import{a as _}from"./chunk-GW5DWAXY.js";import{b as ne}from"./chunk-T63R6QT4.js";import"./chunk-3STZLM5J.js";import"./chunk-L4JIMNKW.js";import{i as re}from"./chunk-M7WQM4UA.js";import"./chunk-WWNSD6FA.js";import"./chunk-IAHKTEET.js";import"./chunk-5YPBPZUR.js";import{a as G}from"./chunk-YCCUBQY4.js";import{y as l}from"./chunk-C4G7RVJ6.js";import{a as j}from"./chunk-HCBYKLMW.js";import{a as $,b as s,k as H}from"./chunk-C44QQJR4.js";import{a as xe}from"./chunk-6YGTRKDT.js";import{e as V}from"./chunk-UR6MHSHU.js";var S=V(xe(),1);function ce(e,v,R){let{ref:A,reason:d,by:y}=R;if(!d||d.trim().length===0)return{record:null,errors:[{code:"REASON_REQUIRED",detail:"archiving a node needs a reason \u2014 it becomes the tombstone's provenance"}]};let x=v.resolve(A);if(!x)return{record:null,errors:[{code:"UNKNOWN_REF",detail:`no node '${A}' in the graph`}]};let r=v.tipOf(x.cid);if(v.superseded.has(r))return{record:null,errors:[{code:"ALREADY_ARCHIVED",detail:`${A} is already superseded at its tip (${r.slice(0,19)}\u2026)`}]};let o=re(e,{ts:new Date().toISOString(),proposal_id:null,nodes:[],edges:[],review:[],supersessions:[{kind:"node",old:r,new:null,reason:d,by:y}],source_head_moves:{}},{expectPrev:v.latestHash});return ne(e),{record:o.record,errors:null}}function de(e){let v=e.by??{kind:"human",id:process.env.USER??"operator"},R=e.mode==="interactive"?"override":e.mode,A={out:()=>{},err:()=>{},isTTY:!1,confirm:async()=>!0},d={applied:0,committed:0,retired:0,skipped:0,deferred:0,failed:0},y=new Map;for(let r of e.planRows)if(r.held_ref&&e.held){let o=e.held.rows.find(a=>a.temp_ref===r.held_ref);if(!o)continue;let k={kind:o.kind,ref:o.temp_ref,title:o.title,why:o.why,origin:"content-change",...r.impact?{impact:r.impact}:{}};y.set(k.ref,{card:k,source:"held",heldRef:o.temp_ref})}else if(r.kind==="MODIFY"){let o={kind:"MODIFY",ref:r.ref,title:r.ref,why:`${r.reason}: ${r.provenance}`,origin:r.origin??"structural-stale",...r.impact?{impact:r.impact}:{}};y.set(o.ref,{card:o,source:"row",row:r})}else if(r.kind==="ADD"){let o={kind:"ADD",ref:r.ref,title:r.ref,why:r.reason,origin:r.origin??"content-change"};y.set(o.ref,{card:o,source:"row",row:r})}for(let r of e.archive){if(r.kind!=="ARCHIVE")continue;let o={kind:"ARCHIVE",ref:r.ref,title:r.ref,why:r.why,provenance:r.why,...r.impact?{impact:r.impact}:{}};y.set(o.ref,{card:o,source:"archive",row:r})}for(let r of e.reviewFeeder?.()??[]){if(y.has(r.ref))continue;let o={kind:r.kind==="MODIFY_HELD"?"MODIFY":r.kind,ref:r.ref,title:r.title,why:r.why,...r.impact?{impact:r.impact}:{},...r.pair?{pair:r.pair}:{},...r.held?{held:!0}:{},...r.kind==="MODIFY_HELD"?{heldPayload:!0}:{}};y.set(o.ref,{card:o,source:"review",reviewCard:r})}let x=r=>(d.failed++,{outcome:"failed",detail:r});return{cards:()=>[...y.values()].map(r=>r.card),async submit(r,o){let k=y.get(r);if(!k)return x(`no card ${r}`);if(k.source==="review"){if(k.reviewCard.kind==="PAIR"&&o.v==="approve")return x(`${r} is a PAIR card \u2014 approve is not in its grammar (merge / keep both / defer); words ride a defer note`);let{submitReview:c}=await import("./verdicts-TJH3O5UW.js"),w=o.v==="approve"?{v:"approve"}:o.v==="archive"?{v:"archive",because:o.because??""}:o.v==="skip"&&k.reviewCard.kind==="MODIFY_HELD"?{v:"keep_current"}:o.v==="defer"||o.v==="skip"?{v:"defer"}:o.v==="merge"?{v:"merge"}:{v:"keep_both"},b=await c({contextDir:e.contextDir,signals:i=>e.signals({ref:i.ref,verdict:i.verdict,...i.reason?{reason:i.reason}:{}})},k.reviewCard,w,v);return b.outcome==="failed"?(d.failed++,b):b.outcome==="deferred"?(d.deferred++,o.v==="defer"&&o.note?(e.signals({ref:r,verdict:"deferred-with-note",reason:o.note}),{...b,detail:`steering noted: "${o.note}" \u2014 decide ${k.reviewCard.kind==="PAIR"?"merge / keep both":"the verdict"} when it re-offers`}):b):b.outcome==="retired"?(d.retired++,b):b.outcome==="committed"?(d.committed++,b):(d.applied++,b)}if(o.v==="merge"||o.v==="keep_both")return x(`${r} is a ${k.card.kind} card \u2014 ${o.v} applies to review cards only`);if(o.v==="skip")return d.skipped++,e.signals({ref:r,verdict:"gap-dismissed"}),{outcome:"skipped"};if(o.v==="defer")return d.deferred++,o.note?(e.signals({ref:r,verdict:"deferred-with-note",reason:o.note}),{outcome:"deferred",detail:`steering noted: "${o.note}"`}):{outcome:"deferred"};if(o.v==="archive"){if(k.source!=="archive")return x(`${r} is not an ARCHIVE card`);let c=_(e.contextDir),w=c.resolve(k.row.ref);if(w&&c.superseded.has(c.tipOf(w.cid)))return d.skipped++,{outcome:"skipped",detail:"already retired \u2014 nothing to do"};let b=ce(e.contextDir,_(e.contextDir),{ref:k.row.ref,reason:`reconcile retire: ${k.row.why}`,by:v});return b.errors?x(b.errors.map(i=>`${i.code}: ${i.detail}`).join("; ")):(d.retired++,e.signals({ref:r,verdict:"gap-resolved-archive",reason:k.row.why}),{outcome:"retired"})}if(k.source==="archive")return x(`${r} takes archive/skip/defer, not approve`);if(k.source==="held"){let c=le(e.contextDir,e.held,k.heldRef,v,o.edits);if(!c.ok)return x(c.message);if(c.kind==="ADD"){let w=await e.runDesign(c.ref,{yes:!0,mode:R,...o.steering?{because:o.steering}:{}});return w!==0?(d.failed++,{outcome:"failed",landed:!0,detail:`committed ${c.ref}, but its design run exited ${w} \u2014 finish with kane-cli design tests --use-case ${c.ref}`}):(d.applied++,e.signals({ref:r,verdict:"gap-resolved-create",...o.steering?{reason:o.steering}:{}}),{outcome:"applied",detail:c.ref})}if(o.steering){let w=_(e.contextDir),b=X(w,c.ref);if(!b.ok)return d.committed++,{outcome:"committed",detail:`committed ${c.ref}, but steering could not resolve it (${b.message}) \u2014 steer via kane-cli maintain evolve ${c.ref}`};let i=await z(e.contextDir,b.target,{yes:!0,mode:R,because:o.steering},A,e.runDesign,"batch");if(i.outcome==="no-design"){let u=await e.runDesign(b.target.seamRef,{yes:!0,mode:R,because:o.steering});return u!==0?(d.failed++,{outcome:"failed",landed:!0,detail:`committed ${c.ref}, but its steered design run exited ${u} \u2014 finish with kane-cli design tests --use-case ${b.target.seamRef}`}):(d.applied++,e.signals({ref:r,verdict:"gap-resolved-create",reason:o.steering}),{outcome:"applied",detail:c.ref})}return i.outcome==="failed"||i.outcome==="paused"?(d.failed++,{outcome:"failed",landed:!0,detail:`committed ${c.ref}, but the steering evolve ${i.outcome} (exit ${i.code}) \u2014 finish with kane-cli maintain evolve ${c.ref}`}):i.outcome==="declined"?(d.committed++,{outcome:"committed",detail:`committed ${c.ref} \u2014 the steering evolve was declined; re-run kane-cli maintain evolve ${c.ref}`}):(d.applied++,e.signals({ref:r,verdict:"gap-resolved-evolve",reason:o.steering}),{outcome:"applied",detail:c.ref})}return d.committed++,e.signals({ref:r,verdict:"gap-resolved-evolve"}),{outcome:"committed",detail:c.ref}}let a=_(e.contextDir),g=X(a,k.row.ref);if(!g.ok)return x(g.message);if(k.card.kind==="ADD"){let c=await e.runDesign(g.target.seamRef,{yes:!0,mode:R});return c!==0?x(`design run exited ${c}`):(d.applied++,e.signals({ref:r,verdict:"gap-resolved-create"}),{outcome:"applied"})}let C=await z(e.contextDir,g.target,{yes:!0,mode:R,...o.steering?{because:o.steering}:{}},A,e.runDesign,"batch");return C.outcome==="evolved"?(d.applied++,e.signals({ref:r,verdict:"gap-resolved-evolve",...o.steering?{reason:o.steering}:{}}),{outcome:"applied"}):C.outcome==="failed"||C.outcome==="paused"?x(`evolve ${C.outcome} (exit ${C.code})`):(d.skipped++,{outcome:"skipped",detail:C.outcome})},summary:()=>({...d})}}var f=V(j(),1);function L(e){return e.kind==="REVIEW"?[{v:"approve",label:"approve",detail:"mark it reviewed and trusted"},{v:"archive",label:"archive",detail:"reject it \u2014 asks for a reason; impact shown above"},{v:"defer",label:"defer",detail:"not now \u2014 stays queued"}]:e.kind==="PAIR"?[{v:"merge",label:"merge",detail:"duplicate \u2014 fold into the older item (it stays unreviewed)"},{v:"keep_both",label:"keep both",detail:"genuinely distinct \u2014 promote both"},{v:"defer",label:"defer",detail:"not now \u2014 stays queued"}]:e.kind==="ARCHIVE"?[{v:"archive",label:"retire",detail:"hidden from now on; history is kept and it can be reverted"},{v:"skip",label:"skip",detail:"keep it \u2014 decided, never re-offered"},{v:"defer",label:"defer",detail:"not now \u2014 the plan re-offers it"}]:e.heldPayload?[{v:"approve",label:"approve update",detail:"commit the held payload \u2014 impact preview above"},{v:"skip",label:"keep current",detail:"drop the held payload (the owner's disk state stays untouched)"},{v:"defer",label:"defer",detail:"not now \u2014 stays held"}]:[{v:"approve",label:"approve",detail:e.kind==="ADD"?"commit + design it":"commit the updated version (old\u2192new redirect)"},{v:"skip",label:e.origin==="content-change"?"reject":"skip",detail:e.origin==="content-change"?"drop the staged proposal \u2014 nothing committed":"leave it as is"},{v:"defer",label:"defer",detail:"not now \u2014 the plan keeps it staged"}]}function Y(e){return e.kind==="ARCHIVE"?null:L(e).length}var ye={ADD:{color:l.green??"green"},MODIFY:{color:"yellow"},ARCHIVE:{color:l.red},REVIEW:{color:"cyan"},PAIR:{color:"magenta"}},Re=60,$e=100;function ue({card:e,position:v,sel:R=0,focused:A=!1,freeText:d=null,editorIntent:y="steer"}){let{stdout:x}=H(),r=x?.columns??80,o=r<Re,k=Math.min(r-1,$e),a=L(e),g=Y(e),C=ye[e.kind],c=E=>A&&R===E?(0,f.jsx)(s,{color:l.assuranceAccent,children:"\u276F"}):" ",w=e.impact,b=w&&"stale_refs"in w&&w.stale_refs.length>0?`${e.kind==="ARCHIVE"?"retiring leaves":"approving marks"} ${w.stale_refs.length} item(s) stale`+((w.direct_refs?.length??0)>0?` \u2014 ${w.direct_refs.length} directly touched: ${w.direct_refs.join(", ")}`:""):w&&"design_children"in w?`${e.kind==="REVIEW"?"archiving drops":"merging folds"} ${w.design_children} design child(ren)`:null,i=`? reconcile \u2014 item ${v.n} of ${v.of}`,u=g!==null?"\u2191\u2193 \xB7 \u23CE select \xB7 1-9 \xB7 type = adjust \xB7 esc \xB7 nothing to undo":"\u2191\u2193 \xB7 \u23CE select \xB7 1-9 \xB7 esc \xB7 nothing to undo",I=(0,f.jsxs)($,{flexDirection:"column",children:[(0,f.jsx)($,{paddingLeft:2,children:(0,f.jsxs)(s,{bold:!0,children:[(0,f.jsx)(s,{color:C.color,children:`[${e.kind}]`}),` ${U(e.title)}`]})}),(0,f.jsx)($,{paddingLeft:2,children:(0,f.jsx)(s,{color:l.muted,children:e.why})}),b?(0,f.jsx)($,{paddingLeft:2,children:(0,f.jsx)(s,{color:l.muted,children:`impact: ${b}`})}):null,e.kind==="ARCHIVE"&&e.provenance&&e.provenance!==e.why?(0,f.jsx)($,{paddingLeft:2,children:(0,f.jsx)(s,{color:l.muted,children:e.provenance})}):null,(0,f.jsx)(s,{children:" "}),a.map((E,T)=>(0,f.jsxs)(s,{children:[c(T),` ${T+1}. ${E.label}`,(0,f.jsx)(s,{color:l.dim,children:` \u2014 ${E.detail}`})]},`o-${T}`)),g!==null||d&&y==="because"?d?(0,f.jsxs)($,{flexDirection:"column",children:[(0,f.jsxs)($,{children:[(0,f.jsxs)(s,{children:[(0,f.jsx)(s,{color:l.assuranceAccent,children:"\u276F"})," ",(0,f.jsx)(s,{color:l.dim,children:"\u270E "})]}),(0,f.jsx)(G,{value:d.value,onChange:d.onChange,onSubmit:d.onSubmit,onCancel:d.onCancel,placeholder:y==="because"?"why archive it?":"say what to adjust"})]}),(0,f.jsx)(s,{color:l.muted,children:y==="because"?" submits as: archive \xB7 your reason goes on the record":e.kind==="PAIR"?" submits as: defer \xB7 your note parks with the card (it re-offers)":" submits as: approve \xB7 your words steer the re-design"})]}):g!==null?(0,f.jsxs)(s,{children:[c(g)," ",(0,f.jsx)(s,{color:l.dim,children:e.kind==="PAIR"?"\u270E defer with a note \u2014 say what you noticed":"\u270E approve with changes \u2014 say what to adjust"})]}):null:null]});if(o)return(0,f.jsxs)($,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,f.jsx)(s,{bold:!0,color:l.assuranceAccent,children:i}),I,(0,f.jsx)(s,{color:l.muted,children:u})]});let D=Math.max(2,k-(3+i.length+1)),W=Math.max(2,k-(3+u.length+1));return(0,f.jsxs)($,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,f.jsxs)(s,{color:l.assuranceAccent,children:["\u2500\u2500 ",(0,f.jsx)(s,{bold:!0,children:i}),` ${"\u2500".repeat(D)}`]}),(0,f.jsx)(s,{children:" "}),I,(0,f.jsx)(s,{children:" "}),(0,f.jsxs)(s,{color:l.assuranceAccent,children:["\u2500\u2500 ",(0,f.jsx)(s,{color:l.muted,children:u}),` ${"\u2500".repeat(W)}`]})]})}var B=V(j(),1);function K({mark:e,markColor:v,color:R,indent:A=2,reserve:d=0,children:y}){let{stdout:x}=H(),r=(x?.columns??80)-d,o=A+e.length+1;return(0,B.jsxs)($,{children:[(0,B.jsx)($,{width:o,flexShrink:0,children:(0,B.jsx)(s,{color:v,children:`${" ".repeat(A)}${e}`})}),(0,B.jsx)($,{width:Math.max(20,r-o),children:(0,B.jsx)(s,{color:R,children:y})})]})}var p=V(j(),1);function me(e){return e.landed?"committed":e.outcome}var Ce={applied:{mark:"\u2714",color:"green"},committed:{mark:"\u2714",color:"green"},retired:{mark:"\u2714",color:"green"},skipped:{mark:"\xB7",color:"dim"},deferred:{mark:"\u2013",color:"dim"},failed:{mark:"\u2717",color:"red"}},q=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function De(e){return e.v==="archive"?"Retiring\u2026":e.v==="approve"&&e.steering?"Approving with your changes \u2014 committing, then re-designing\u2026":"Applying \u2014 committing\u2026"}function Te({controller:e,cards:v,note:R,markOutcome:A,routeChat:d,listEvolveTargets:y,barSubject:x,onFinish:r,onCtrlC:o,pauseRef:k}){let[a,g]=(0,S.useState)(v.length>0?{at:"card",idx:0,sel:0,editor:null}:{at:"done-panel",sel:0}),C=(0,S.useRef)(0),c=(0,S.useRef)(a);c.current=a;let w=(0,S.useRef)([]),[b,i]=(0,S.useState)(0),u=a.at==="busy"||a.at==="evolving";(0,S.useEffect)(()=>{if(!u)return;let t=setInterval(()=>i(n=>n+1),120);return()=>clearInterval(t)},[u]);let I=(0,S.useRef)(!1),D=()=>{R((0,p.jsx)(s,{color:l.dim,children:"walk paused \u2014 every verdict so far is committed; re-run the same command to continue"})),r(3)},W=()=>{if(I.current)return;I.current=!0;let t=c.current;if(t.at==="busy"||t.at==="evolving"){R((0,p.jsx)(s,{color:l.dim,children:"finishing the current item, then pausing\u2026"}));return}if(t.at==="done-panel"||t.at==="picker"||t.at==="why"||t.at==="view"){r(C.current);return}D()};k&&(k.current=W);let E=a.at==="card"||a.at==="busy"?v[a.idx]:null,T=()=>[{key:"finish",label:"finish"},...y?[{key:"evolve",label:"evolve another use-case\u2026"}]:[],...w.current.length>0?[{key:"view",label:"view what changed"}]:[]],P=()=>{let t=y?.()??[];if(t.length===0){R((0,p.jsx)(s,{color:l.dim,children:"nothing is stale \u2014 no evolve targets right now"})),g({at:"done-panel",sel:0});return}g({at:"picker",items:t,sel:0})},M=t=>{let n=t+1;if(n<v.length)g({at:"card",idx:n,sel:0,editor:null});else{let m=e.summary();R((0,p.jsx)(s,{color:l.dim,children:`reconcile walk: ${m.applied} applied, ${m.committed} committed, ${m.retired} retired, ${m.skipped} skipped, ${m.deferred} deferred`+(m.failed>0?`, ${m.failed} failed`:"")})),g({at:"done-panel",sel:0})}},N=(0,S.useRef)(!1),O=(t,n)=>{if(N.current)return;N.current=!0;let m=v[t];g({at:"busy",idx:t,label:De(n),startedAt:Date.now()}),e.submit(m.ref,n).catch(h=>({outcome:"failed",detail:h instanceof Error?h.message:String(h)})).then(h=>{let F=Ce[h.outcome]??{mark:"\xB7",color:"dim"},be=h.outcome!=="failed"&&h.outcome!=="skipped"&&h.outcome!=="deferred"&&m.impact&&"stale_refs"in m.impact&&m.impact.stale_refs.length>0?` \xB7 ${m.impact.stale_refs.length} item(s) now stale`:"",te=`${h.outcome} [${m.kind}] ${U(m.title)}${h.detail?` \u2014 ${U(h.detail)}`:""}${be}`;if(w.current.push({mark:F.mark,color:F.color,line:te}),R((0,p.jsx)(K,{mark:F.mark,markColor:F.color==="green"?l.green:F.color==="red"?l.red:l.dim,color:F.color==="dim"?l.dim:void 0,children:te})),h.outcome==="failed"&&(C.current=C.current===0?1:C.current),A(m.ref,me(h)),N.current=!1,I.current){D();return}M(t)})},pe=(t,n)=>{g({at:"evolving",title:t.title,startedAt:Date.now()}),d(`${t.key} ${n}`).catch(m=>`\u2717 evolve failed: ${m instanceof Error?m.message:String(m)}`).then(m=>{let h=m.startsWith("\u2713");if(w.current.push({mark:h?"\u2714":"\u2717",color:h?"green":"red",line:m.replace(/^[✓✗]\s*/,"")}),R((0,p.jsx)(K,{mark:h?"\u2714":"\u2717",markColor:h?l.green:l.red,children:m.replace(/^[✓✗]\s*/,"")})),I.current){r(C.current);return}g({at:"done-panel",sel:0})})},fe=(0,S.useMemo)(()=>({isFocused:()=>{let t=c.current;return t.at==="card"&&t.editor===null||t.at==="done-panel"||t.at==="picker"||t.at==="view"},onMove:t=>{g(n=>{if(n.at==="card"){let m=v[n.idx],h=Y(m)??L(m).length-1;return{...n,sel:Math.max(0,Math.min(h,n.sel+t))}}return n.at==="done-panel"?{...n,sel:Math.max(0,Math.min(T().length-1,n.sel+t))}:n.at==="picker"?{...n,sel:Math.max(0,Math.min(n.items.length-1,n.sel+t))}:n})},onSelect:()=>{let t=c.current;if(t.at==="card"){let n=v[t.idx],m=Y(n);if(m!==null&&t.sel===m){g({...t,editor:"",editorIntent:"steer"});return}let h=L(n)[t.sel];if(h?.v==="archive"&&n.kind==="REVIEW"){g({...t,editor:"",editorIntent:"because"});return}h&&O(t.idx,{v:h.v});return}if(t.at==="done-panel"){let n=T()[t.sel];n?.key==="finish"?r(C.current):n?.key==="evolve"?P():n?.key==="view"&&g({at:"view"});return}if(t.at==="picker"){let n=t.items[t.sel];n&&g({at:"why",item:n,text:""});return}},onDigit:t=>{let n=c.current;if(n.at==="card"){let m=v[n.idx],h=L(m)[t-1];if(h?.v==="archive"&&m.kind==="REVIEW"){g({...n,editor:"",editorIntent:"because"});return}h&&O(n.idx,{v:h.v});return}n.at==="done-panel"&&t-1<T().length&&g({...n,sel:t-1}),n.at==="picker"&&t-1<n.items.length&&g({...n,sel:t-1})},onType:t=>{g(n=>n.at!=="card"||Y(v[n.idx])===null?n:{...n,editor:(n.editor??"")+t,editorIntent:n.editorIntent??"steer"})},isMulti:()=>!1,onSpace:()=>{},onBack:()=>{let t=c.current;(t.at==="picker"||t.at==="view")&&g({at:"done-panel",sel:0})}}),[v]);(0,S.useEffect)(()=>{a.at==="done"&&r(C.current)},[a.at]);let ge=a.at==="card"||a.at==="done-panel"||a.at==="picker"||a.at==="why"||a.at==="view",ve=a.at==="card"||a.at==="busy"?`${x?`${x} \xB7 `:""}item ${a.idx+1} of ${v.length}`:x,J=t=>Math.floor((Date.now()-t)/1e3),{stdout:he}=H(),Z=Math.min((he?.columns??80)-1,100),ee=`view \xB7 this run's changes \xB7 ${w.current.length}`,ke=Math.max(2,Z-(3+ee.length+1)),we=Math.max(2,Z-12);return(0,p.jsxs)($,{flexDirection:"column",children:[(0,p.jsx)(ie,{onToggleThinking:()=>{},onCtrlC:()=>{o(),W()},panel:fe}),a.at==="card"&&E?(0,p.jsx)(ue,{card:E,position:{n:a.idx+1,of:v.length},sel:a.sel,focused:a.editor===null,editorIntent:a.editorIntent??"steer",freeText:a.editor!==null?{value:a.editor,onChange:t=>g(n=>n.at==="card"?{...n,editor:t}:n),onSubmit:t=>{let n=c.current;if(n.at!=="card")return;let m=t.trim();if(!m){g({...n,editor:null,editorIntent:void 0});return}let h=v[n.idx];n.editorIntent==="because"?O(n.idx,{v:"archive",because:m}):h.kind==="PAIR"?O(n.idx,{v:"defer",note:m}):O(n.idx,{v:"approve",steering:m})},onCancel:()=>g(t=>t.at==="card"?{...t,editor:null,editorIntent:void 0}:t)}:null}):null,a.at==="busy"?(0,p.jsxs)(s,{color:l.assuranceAccent,children:[`${q[b%q.length]} ${a.label} `,(0,p.jsx)(s,{color:l.dim,children:`(${J(a.startedAt)}s)`})]}):null,a.at==="evolving"?(0,p.jsxs)(s,{color:l.assuranceAccent,children:[`${q[b%q.length]} Evolving ${a.title}\u2026 `,(0,p.jsx)(s,{color:l.dim,children:`(${J(a.startedAt)}s)`})]}):null,a.at==="done-panel"?(0,p.jsx)(Q,{headline:(()=>{let t=e.summary();return`reconcile done \u2014 ${t.applied+t.committed} applied \xB7 ${t.retired} retired \xB7 ${t.skipped} skipped \xB7 ${t.deferred} deferred${t.failed>0?` \xB7 ${t.failed} failed`:""}`})(),rows:T(),sel:a.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select"}):null,a.at==="picker"?(0,p.jsx)(Q,{ask:!0,headline:"evolve which use-case?",rows:a.items.map(t=>({key:t.key,label:t.title,detail:t.badge})),sel:a.sel,focused:!0,legend:"\u2191\u2193 \xB7 \u23CE select \xB7 esc back"}):null,a.at==="why"?(0,p.jsxs)($,{flexDirection:"column",borderStyle:"round",borderColor:l.assuranceAccent,paddingX:1,children:[(0,p.jsxs)($,{children:[(0,p.jsxs)(s,{children:[(0,p.jsx)(s,{color:l.assuranceAccent,children:"\u25B8"})," ",(0,p.jsx)(s,{color:l.dim,children:"\u270E "})]}),(0,p.jsx)(G,{value:a.text,onChange:t=>g(n=>n.at==="why"?{...n,text:t}:n),onSubmit:t=>{let n=c.current;n.at==="why"&&(t.trim()?pe(n.item,t.trim()):g({at:"picker",items:[n.item],sel:0}))},onCancel:()=>{c.current.at==="why"&&P()},placeholder:`what should change about ${a.item.title}?`})]}),(0,p.jsx)(s,{color:l.muted,children:" \u23CE submit \xB7 esc back"})]}):null,a.at==="view"?(0,p.jsxs)($,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,p.jsxs)(s,{color:l.assuranceAccent,children:["\u2500\u2500 ",(0,p.jsx)(s,{bold:!0,children:ee}),` ${"\u2500".repeat(ke)}`]}),(0,p.jsx)(s,{children:" "}),w.current.map((t,n)=>(0,p.jsx)(K,{mark:t.mark,markColor:t.color==="green"?l.green:t.color==="red"?l.red:l.dim,color:t.color==="dim"?l.dim:void 0,indent:0,reserve:0,children:t.line},`vc-${n}`)),(0,p.jsx)(s,{children:" "}),(0,p.jsxs)(s,{color:l.assuranceAccent,children:["\u2500\u2500 ",(0,p.jsx)(s,{color:l.muted,children:"esc back"}),` ${"\u2500".repeat(we)}`]})]}):null,(0,p.jsx)(oe,{verb:"maintain",subject:ve,state:ge?"idle":void 0,hints:"ctrl+c exit"})]})}async function nt(e){let v={current:null},R=i=>{v.current?.append(i)},A=null,d=async(i,u)=>{let[{runDesign:I},{resolveAgentAuthEnv:D},{runAgent:W},{preflightTurn:E}]=await Promise.all([import("./run-52UIBPXD.js"),import("./spawner-AH5FTUYU.js"),import("./bridge-T4HL4TG7.js"),import("./turn-preflight-JGYT7LXP.js")]);A??=await D();let T=A;return I({useCase:i,force:!0,mode:u.mode??"override",...u.because?{because:u.because}:{},...u.changeDelta!==void 0?{changeDelta:u.changeDelta}:{},...u.priorDesign!==void 0?{priorDesign:u.priorDesign}:{}},{contextDir:e.dir,agent:W,preflightTurn:()=>E(T),ask:async()=>[],out:()=>{},progress:()=>{},isTTY:!1,auth:T})},y=e.runDesign??d,x=de({contextDir:e.dir,held:e.held,archive:e.archive,planRows:e.rows,runDesign:y,mode:"interactive",signals:e.signals,reviewFeeder:()=>{try{return ae({contextDir:e.dir},_(e.dir))}catch{return[]}}}),r=new Set(e.rows.filter(i=>i.applied!==void 0).map(i=>i.held_ref??i.ref)),o=x.cards().filter(i=>!r.has(i.ref)&&!(i.kind==="ARCHIVE"&&e.archiveState?.[i.ref]!==void 0)),k=i=>e.rows.findIndex(u=>(u.held_ref??u.ref)===i),a=(i,u)=>{try{if(o.find(W=>W.ref===i)?.kind==="ARCHIVE"){u==="retired"?e.markA?.(i,"retired"):u==="skipped"&&e.markA?.(i,"skipped");return}let D=k(i);if(D<0)return;u==="applied"||u==="committed"?e.mark?.(D,"approved"):u==="skipped"&&e.mark?.(D,"skipped")}catch{}},g=async i=>{let[{openGraph:u},{resolveParentUc:I,evolveOneUc:D}]=await Promise.all([import("./readmodel-X7L7W2BA.js"),import("./evolve-cmd-PZCPXDMR.js")]),[W,...E]=i.split(/\s+/),T=u(e.dir),P=I(T,W);if(!P.ok)return`couldn't resolve '${W}' \u2014 start with a use-case id (uc-\u2026): ${P.message}`;if(E.length===0)return`say what to change: \`${W} <your words>\` \u2014 the words become the redesign's change delta`;let M=E.join(" "),N={out:()=>{},err:()=>{},isTTY:!1,confirm:async()=>!0},O=await D(e.dir,P.target,{yes:!0,mode:"override",because:M},N,y,"batch");return O.outcome==="evolved"?(e.signals({ref:P.target.display,verdict:"gap-resolved-evolve",reason:M}),`\u2713 redesigned ${P.target.display} \u2014 "${M}"`):`\u2717 evolve ${O.outcome} for ${P.target.display} (exit ${O.code})`},C=e.listEvolveTargets??(()=>{let i=_(e.dir);return se(i).targets.map(u=>({key:u.display,title:u.display,badge:"stale"}))});if(e.script){let i=0;for(let u of o){let I=await e.script(u),D=await x.submit(u.ref,I);D.outcome==="failed"&&i===0&&(i=1),a(u.ref,me(D))}return i}let[{render:c},{ScrollbackProvider:w},{ScrollbackTap:b}]=await Promise.all([import("./build-JIKYOZUH.js"),import("./scrollback-JLPJR25X.js"),import("./ScrollbackTap-Q3IOKNMS.js")]);return new Promise(i=>{let u=!1,I=M=>{u||(u=!0,(async()=>{process.removeListener("SIGINT",T),await v.current?.flush();try{P.unmount()}catch{}i(M)})())},D=0,W={current:null},E=()=>{if(D+=1,D>=2){process.removeListener("SIGINT",T);try{P.unmount()}catch{}i(130)}},T=()=>{E(),W.current?.()};process.on("SIGINT",T);let P=c((0,p.jsxs)(w,{children:[(0,p.jsx)(b,{into:v}),(0,p.jsx)(Te,{controller:x,cards:o,note:R,markOutcome:a,routeChat:g,listEvolveTargets:C,barSubject:e.barSubject,onFinish:I,onCtrlC:E,pauseRef:W})]}),{exitOnCtrlC:!1})})}export{Te as WalkSessionSurface,me as outcomeToMark,nt as runWalkSession};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-2SREGETM.js";import"./chunk-IQDWBTRJ.js";import"./chunk-GVIPTX6T.js";import"./chunk-BKM2LWU2.js";import"./chunk-2XMJ6YAE.js";import"./chunk-W6VD2XFO.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-C4G7RVJ6.js";import"./chunk-UR6MHSHU.js";export{a as withTelemetry};
|