@maycombhq/atticus 2.0.0-beta.2 → 2.0.0-beta.22
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/bin.js +8 -4
- package/dist/chunk-23XVSEV5.js +49 -0
- package/dist/{chunk-ZDPAS56H.js → chunk-24OXGB3P.js} +8 -2
- package/dist/{chunk-7EOBHUMC.js → chunk-24XLDU72.js} +4 -3
- package/dist/{chunk-CR3MTH32.js → chunk-2F4CYZKJ.js} +86 -11
- package/dist/{chunk-6IU67AEK.js → chunk-2GF7OLF3.js} +23 -15
- package/dist/chunk-2IIMFOPM.js +41 -0
- package/dist/chunk-2LGRMVCA.js +617 -0
- package/dist/{chunk-XPCM366L.js → chunk-2MMCFP5C.js} +10 -8
- package/dist/{chunk-JBTK5OP2.js → chunk-2Q56PQPS.js} +6 -4
- package/dist/{chunk-Z6LF7HQN.js → chunk-2Q5EDGEO.js} +7 -5
- package/dist/{chunk-3USYZGRF.js → chunk-2RLKFUUL.js} +38 -27
- package/dist/chunk-2SKB4O2E.js +59 -0
- package/dist/{chunk-SP2I63OO.js → chunk-34S2WGOB.js} +87 -4
- package/dist/{chunk-GQ4N4WKF.js → chunk-3NFFJL5D.js} +33 -27
- package/dist/{chunk-SJRGMG6A.js → chunk-3NWDLGG6.js} +28 -25
- package/dist/{chunk-4WBVUHXN.js → chunk-3RM4UK6W.js} +20 -18
- package/dist/chunk-42SIDKEU.js +583 -0
- package/dist/{chunk-GLUX4EEP.js → chunk-4EURQWQD.js} +20 -15
- package/dist/chunk-4U276ICE.js +39 -0
- package/dist/{chunk-ZMFPW66A.js → chunk-53T4O55J.js} +4 -3
- package/dist/{chunk-6J5OKA4Y.js → chunk-57TDNMI3.js} +17 -15
- package/dist/chunk-5BD2KYLE.js +57 -0
- package/dist/{chunk-7EFILTCI.js → chunk-5F7GFN2F.js} +28 -0
- package/dist/chunk-5NMKONLP.js +95 -0
- package/dist/{chunk-7ZUIMTOU.js → chunk-5SJZW52K.js} +26 -24
- package/dist/{chunk-4RS5KZQD.js → chunk-63YRMR6J.js} +6 -5
- package/dist/chunk-66PPNOON.js +62 -0
- package/dist/chunk-6H3Z5JHH.js +64 -0
- package/dist/{chunk-CEXSU4S6.js → chunk-6MUGR4LS.js} +775 -89
- package/dist/{chunk-QSXK2RGH.js → chunk-6OJQOPUN.js} +5 -3
- package/dist/{chunk-MVZVGYXH.js → chunk-6PPOWY5E.js} +84 -14
- package/dist/{chunk-7EKXJZ2Y.js → chunk-6ZGLAACW.js} +299 -38
- package/dist/chunk-6ZJ5A7AF.js +222 -0
- package/dist/{chunk-L24C55VN.js → chunk-745DAZ4L.js} +142 -30
- package/dist/{chunk-Q4D5X7QB.js → chunk-7ASNL4Q4.js} +46 -24
- package/dist/chunk-7BR7IPOH.js +35 -0
- package/dist/{chunk-7WD63HU2.js → chunk-7DOR27HL.js} +6 -6
- package/dist/chunk-7FTTA3HD.js +341 -0
- package/dist/{chunk-OLQJTJJU.js → chunk-7GJS6DNX.js} +12 -3
- package/dist/{chunk-7JUKDRSZ.js → chunk-7IGKHZ4Z.js} +347 -226
- package/dist/{chunk-G2B4ZQGH.js → chunk-7IOWA5D5.js} +11 -6
- package/dist/{chunk-EBEW3XXQ.js → chunk-7JITZFJC.js} +7 -5
- package/dist/chunk-7MJSQTL5.js +174 -0
- package/dist/{chunk-I4JRCD6M.js → chunk-7UOMVMFG.js} +25 -17
- package/dist/{chunk-YY6ZQQBP.js → chunk-AFWUDXEM.js} +19 -7
- package/dist/chunk-AFZ3QA6W.js +47 -0
- package/dist/chunk-AJQ72EBM.js +420 -0
- package/dist/chunk-AJYXNTNZ.js +317 -0
- package/dist/chunk-AVTBS4OW.js +49 -0
- package/dist/{chunk-FHH4I4ZV.js → chunk-BDKC6H5P.js} +12 -6
- package/dist/{chunk-IPKHE5D6.js → chunk-BEVTIBRH.js} +1526 -875
- package/dist/chunk-BHT7QK4G.js +162 -0
- package/dist/{chunk-6JUBZBMW.js → chunk-BIGDQDHD.js} +6 -4
- package/dist/{chunk-2BFCZ3RK.js → chunk-BO4KX37X.js} +20 -18
- package/dist/chunk-BPK5P77O.js +115 -0
- package/dist/chunk-BQ4SQQC6.js +59 -0
- package/dist/chunk-BQGDB6ZL.js +7342 -0
- package/dist/{chunk-2ANOROX3.js → chunk-BTGPE6CR.js} +11 -9
- package/dist/chunk-BTY3HZBO.js +93 -0
- package/dist/{chunk-DPZHZQKE.js → chunk-BXYMYEJ4.js} +44 -10
- package/dist/{chunk-2RMYG36Q.js → chunk-C3RY6KU6.js} +309 -346
- package/dist/chunk-C4R4JLHE.js +40 -0
- package/dist/chunk-CADWLE2T.js +18 -0
- package/dist/chunk-CBGGOQWU.js +82 -0
- package/dist/chunk-CMDXGQTS.js +47 -0
- package/dist/{chunk-MC3H7736.js → chunk-CQDGOPGH.js} +58 -18
- package/dist/{chunk-HFQCFSJR.js → chunk-CX4RZ2KS.js} +4 -3
- package/dist/{chunk-PAMPPUR6.js → chunk-CXJ6FUKN.js} +1852 -207
- package/dist/{chunk-ABWHYWNI.js → chunk-D73UEXYW.js} +3 -3
- package/dist/chunk-DCZWQLYT.js +1205 -0
- package/dist/chunk-DLOBCJL6.js +48 -0
- package/dist/{chunk-4BN53TG3.js → chunk-DOBQKHIF.js} +31 -23
- package/dist/chunk-E3ISYXO3.js +423 -0
- package/dist/{chunk-7SW2QWLU.js → chunk-E6ZIEVOI.js} +16 -13
- package/dist/chunk-EBL2R3YG.js +43 -0
- package/dist/{chunk-AIOQPLA5.js → chunk-EGQRREQH.js} +41 -15
- package/dist/chunk-EHA7RMZ3.js +58 -0
- package/dist/{chunk-M766ZJ6W.js → chunk-EIPTLPFC.js} +38 -27
- package/dist/chunk-EMRIQUND.js +517 -0
- package/dist/{chunk-DFBCSHVT.js → chunk-EPCJQQWD.js} +6 -4
- package/dist/{chunk-RZPYKDWS.js → chunk-F3P7N7SF.js} +1 -1
- package/dist/{chunk-R77KLRB3.js → chunk-FFLNS6VP.js} +21 -18
- package/dist/chunk-FFTRTL6R.js +26 -0
- package/dist/{chunk-IHMLFRVV.js → chunk-FPJPLKDW.js} +62 -16
- package/dist/{chunk-JCZIKA4C.js → chunk-FSMSFDLD.js} +5 -4
- package/dist/{chunk-AVJDSJ2F.js → chunk-FUJM6RTF.js} +8 -7
- package/dist/chunk-FZOJFH7Q.js +132 -0
- package/dist/{chunk-QRAOANID.js → chunk-G6X77UJZ.js} +23 -21
- package/dist/{chunk-3ALD2W2A.js → chunk-GCWRWSU7.js} +10 -4
- package/dist/chunk-GIW4ZVDB.js +39 -0
- package/dist/{chunk-B2WLAWNJ.js → chunk-GUX3PTYM.js} +3 -3
- package/dist/{chunk-DPUYDDQG.js → chunk-GZY6RUZ6.js} +25 -3
- package/dist/chunk-H4VO6WG3.js +10 -0
- package/dist/{chunk-MMOSZPWJ.js → chunk-H5HBGNXU.js} +5 -4
- package/dist/chunk-H7KM7LZE.js +229 -0
- package/dist/{chunk-AA6YULYB.js → chunk-HNM2YQT2.js} +7 -7
- package/dist/{chunk-3C7EYRFZ.js → chunk-HYU5VLGA.js} +1 -1
- package/dist/{chunk-XY3P7JW7.js → chunk-IDKCWSM5.js} +1032 -172
- package/dist/chunk-IFKEI4SA.js +237 -0
- package/dist/{chunk-F7HYOUFF.js → chunk-IGOE6KPG.js} +67 -22
- package/dist/{chunk-TDD55CJH.js → chunk-IH2XURVQ.js} +6 -5
- package/dist/chunk-INQHESFB.js +38 -0
- package/dist/chunk-IP74LCOQ.js +57 -0
- package/dist/chunk-IPHHDDC6.js +45 -0
- package/dist/{chunk-T6AIP7H5.js → chunk-ISUAAMGS.js} +110 -153
- package/dist/{chunk-A7UPUQFY.js → chunk-IUPG3UKI.js} +624 -319
- package/dist/{chunk-L6SGQIR3.js → chunk-IVBOQAGB.js} +7 -3
- package/dist/{chunk-27NKUS3X.js → chunk-J2JAKCIW.js} +2205 -796
- package/dist/{chunk-V2YTAIQO.js → chunk-J3IOLXWM.js} +24 -7
- package/dist/chunk-JA5FI3QV.js +142 -0
- package/dist/chunk-JAVI7JSP.js +49 -0
- package/dist/{chunk-HLJAXMM4.js → chunk-JB5LINEM.js} +6 -2
- package/dist/{chunk-2VHF7OXM.js → chunk-JENSEMXF.js} +1 -1
- package/dist/{chunk-6BVONWJ7.js → chunk-JJF6HALY.js} +4 -3
- package/dist/chunk-JLUCKAEL.js +38 -0
- package/dist/chunk-JRBFANFE.js +221 -0
- package/dist/{chunk-R6XF6UR3.js → chunk-KDNTAPLX.js} +4 -4
- package/dist/chunk-KFAVQZSX.js +33 -0
- package/dist/chunk-KJXD4PNL.js +50 -0
- package/dist/chunk-KN5BXMWN.js +44 -0
- package/dist/{chunk-PCVDV3UZ.js → chunk-KQGURXFU.js} +9 -7
- package/dist/{chunk-WY6PP6AA.js → chunk-KXITGYLF.js} +40 -6
- package/dist/{chunk-66YVAGGM.js → chunk-L27SV425.js} +22 -20
- package/dist/{chunk-NE2W3OO7.js → chunk-LDLL7LB3.js} +24 -22
- package/dist/chunk-LFGTYX5U.js +379 -0
- package/dist/{chunk-EYWIDJFU.js → chunk-LGBMTVNT.js} +7 -5
- package/dist/{chunk-Q5AMFEWD.js → chunk-LGFL54FP.js} +3 -2
- package/dist/{chunk-6TACQN3N.js → chunk-LJXMYKZJ.js} +7 -5
- package/dist/{chunk-BKVWTZ6A.js → chunk-LKOR5UET.js} +29 -26
- package/dist/chunk-LNBQOP7D.js +294 -0
- package/dist/{chunk-O3WI5KWW.js → chunk-LO6P2VYG.js} +2 -2
- package/dist/chunk-LQJPN536.js +122 -0
- package/dist/{chunk-YEDDOYSC.js → chunk-LYBNHMVZ.js} +29 -5
- package/dist/{chunk-A3GY6SOA.js → chunk-LZ7NUC62.js} +20 -18
- package/dist/chunk-M32BLWDH.js +37 -0
- package/dist/{chunk-VYDBJ73M.js → chunk-M3NANSDZ.js} +17 -15
- package/dist/chunk-MFHL5URL.js +31 -0
- package/dist/chunk-MFR5OPBD.js +109 -0
- package/dist/{chunk-DE76JROX.js → chunk-MG4ZL5RW.js} +32 -20
- package/dist/{chunk-N7IXEHK3.js → chunk-MO6P2JZH.js} +10 -8
- package/dist/{chunk-65NYPGRC.js → chunk-MUWDB4R4.js} +1 -1
- package/dist/chunk-MZCGSXVR.js +34 -0
- package/dist/{chunk-MGYZM27B.js → chunk-N3XIYPU3.js} +51 -23
- package/dist/chunk-NDCF4R6S.js +172 -0
- package/dist/{chunk-DHPACDG7.js → chunk-NR2UJWOC.js} +10 -8
- package/dist/chunk-NXJ5URP6.js +51 -0
- package/dist/{chunk-UNM6ZOKP.js → chunk-NY2XSR5K.js} +147 -18
- package/dist/{chunk-5GDRCDQB.js → chunk-O45HFTFS.js} +3 -2
- package/dist/{chunk-ONLS5QA5.js → chunk-O4GXGGBX.js} +14 -12
- package/dist/chunk-O5PXQR67.js +249 -0
- package/dist/{chunk-PRPPGYZG.js → chunk-O66DM6DJ.js} +6 -4
- package/dist/{chunk-KEM4SDDP.js → chunk-O7FDLW7L.js} +11 -8
- package/dist/{chunk-T2UYZSCQ.js → chunk-O7XLYEFA.js} +169 -29
- package/dist/{chunk-FITWGOJ2.js → chunk-OHNCWBKF.js} +4 -4
- package/dist/{chunk-652QWTLZ.js → chunk-OHVTTOPS.js} +3 -3
- package/dist/chunk-OMI6FPPN.js +43 -0
- package/dist/chunk-ONUPY3H6.js +53 -0
- package/dist/chunk-OTLDSZDV.js +69 -0
- package/dist/chunk-OUBGGKDU.js +22 -0
- package/dist/chunk-OWNCM4ZN.js +330 -0
- package/dist/{chunk-YISXLPHN.js → chunk-P2V7QW4D.js} +235 -35
- package/dist/{chunk-CNUKCS2T.js → chunk-P32RUW3B.js} +1632 -93
- package/dist/{chunk-BWZ77RQT.js → chunk-PAQ2AS5E.js} +1 -1
- package/dist/{chunk-ZMAINWBW.js → chunk-PBPBMP2B.js} +4 -3
- package/dist/{chunk-ZVM6AKKM.js → chunk-PJSJPMJI.js} +3 -3
- package/dist/{chunk-EFHQ3TWP.js → chunk-PKBHS4AA.js} +233 -56
- package/dist/{chunk-GT4I4ZWM.js → chunk-PMUAJGLI.js} +20 -16
- package/dist/chunk-PPD7HTDP.js +152 -0
- package/dist/chunk-PSOFBQWB.js +42 -0
- package/dist/{chunk-S2A7YC3Q.js → chunk-Q2TECDIT.js} +10694 -8896
- package/dist/chunk-Q4K5WB2W.js +42 -0
- package/dist/{chunk-UGLN7QHV.js → chunk-Q6DFNVRJ.js} +14 -12
- package/dist/chunk-QA4O2GGC.js +265 -0
- package/dist/chunk-QAXW2N3B.js +1216 -0
- package/dist/chunk-QBNWF5ZU.js +19 -0
- package/dist/chunk-QFWA2DPH.js +224 -0
- package/dist/{chunk-23W7VWKR.js → chunk-QKUJMING.js} +1363 -114
- package/dist/{chunk-NXFPS2LR.js → chunk-R44CYFPV.js} +16 -13
- package/dist/{chunk-CKSITVS4.js → chunk-R7NYHMUU.js} +2687 -786
- package/dist/chunk-REWWDVQB.js +162 -0
- package/dist/{chunk-JMSCMUCA.js → chunk-RGERPOIV.js} +145 -21
- package/dist/{chunk-6JCPI55B.js → chunk-RLDGWLQ7.js} +49 -7
- package/dist/chunk-RUGXBPWI.js +384 -0
- package/dist/{chunk-CPA6HPVR.js → chunk-RXPJMEOW.js} +18 -12
- package/dist/{chunk-3HI6Z55Y.js → chunk-S4PMJU6H.js} +339 -43
- package/dist/chunk-S5LSDXV4.js +40 -0
- package/dist/chunk-S7FCV7S5.js +51 -0
- package/dist/{chunk-5GGOLAKC.js → chunk-SDKLKB6I.js} +28 -26
- package/dist/chunk-SFSPGFCV.js +62 -0
- package/dist/{chunk-ZNCEKR4J.js → chunk-SFUP7TTO.js} +12 -8
- package/dist/{chunk-64EQYWCA.js → chunk-SLXZOMA6.js} +69 -19
- package/dist/chunk-SQV37XO2.js +273 -0
- package/dist/{chunk-K65BJIMT.js → chunk-SU74NDMQ.js} +19 -17
- package/dist/chunk-SYV5LHML.js +165 -0
- package/dist/chunk-T4YPZIQN.js +36 -0
- package/dist/chunk-T6DQR5TV.js +323 -0
- package/dist/{chunk-JIITQXFB.js → chunk-THDMSZ3R.js} +3075 -802
- package/dist/{chunk-JGZCG5VM.js → chunk-TNR75OXT.js} +7 -7
- package/dist/{chunk-D3PO4DOZ.js → chunk-TUULXQRW.js} +174 -15
- package/dist/chunk-TYQBFTBR.js +516 -0
- package/dist/chunk-U76OWS3Q.js +49 -0
- package/dist/{chunk-YYQN46FY.js → chunk-UCROWG2D.js} +27 -24
- package/dist/{chunk-6M5NK3K3.js → chunk-UF4AZOZB.js} +50 -10
- package/dist/chunk-UF4GLFBX.js +345 -0
- package/dist/{chunk-OT2O76OS.js → chunk-UGUP3ZM6.js} +240 -39
- package/dist/chunk-UNAGJYET.js +45 -0
- package/dist/{chunk-5WG5YP4T.js → chunk-UOR2DTHH.js} +16 -14
- package/dist/{chunk-S3QNRWYR.js → chunk-UPOY4YSQ.js} +14 -12
- package/dist/{chunk-EPTBZ3GP.js → chunk-UPS2DGFC.js} +1 -1
- package/dist/{chunk-4AK7IBVP.js → chunk-UUU4CLJG.js} +4 -2
- package/dist/{chunk-W3BQAZ3Q.js → chunk-UWMJKX5U.js} +14 -12
- package/dist/{chunk-QZSX3F7C.js → chunk-UWOJLHFT.js} +27 -23
- package/dist/chunk-VBTP56CE.js +535 -0
- package/dist/chunk-VCTWPLAO.js +211 -0
- package/dist/chunk-VNU26RCO.js +1215 -0
- package/dist/{chunk-CSZ4C5N6.js → chunk-VTZMAJ3W.js} +93 -10
- package/dist/{chunk-TXLH6WHQ.js → chunk-VW62D6QE.js} +14 -12
- package/dist/{chunk-CAQZUNOH.js → chunk-VY72R2XZ.js} +610 -3
- package/dist/{chunk-2DIQQJCB.js → chunk-VZALIKIF.js} +18 -15
- package/dist/{chunk-TYAID7B7.js → chunk-W62H2XSO.js} +25 -23
- package/dist/{chunk-HVUPKCGJ.js → chunk-W7VWI2YH.js} +9 -6
- package/dist/{chunk-TANFV3MZ.js → chunk-WERM6KPJ.js} +7 -4
- package/dist/{chunk-BOHJZTEQ.js → chunk-WF7B67YE.js} +208 -87
- package/dist/{chunk-7FBGJFEE.js → chunk-WG5U3F5V.js} +14 -12
- package/dist/{chunk-4NDAAFQT.js → chunk-WJF2CS6M.js} +8 -5
- package/dist/{chunk-XAKWMCXI.js → chunk-WKUJ3KPV.js} +4 -4
- package/dist/chunk-WMTRHUI5.js +103 -0
- package/dist/chunk-WNKPRSGI.js +36 -0
- package/dist/chunk-WXFLMQSR.js +223 -0
- package/dist/{chunk-RRTKKSLQ.js → chunk-X3WY6MN3.js} +8 -6
- package/dist/{chunk-ZCJDOK2S.js → chunk-X4CXA2IL.js} +47 -23
- package/dist/{chunk-UBBC2XSG.js → chunk-X5F3Q5LV.js} +560 -105
- package/dist/{chunk-C6EKFH7J.js → chunk-XD75VZIH.js} +9 -7
- package/dist/chunk-XERYFDB5.js +297 -0
- package/dist/chunk-XI2LCCYQ.js +420 -0
- package/dist/chunk-Y2EQNWKV.js +933 -0
- package/dist/{chunk-LR3R6Z2A.js → chunk-YHCMZC2J.js} +7 -7
- package/dist/chunk-YYY3AZFE.js +122 -0
- package/dist/{chunk-GDLULHTC.js → chunk-Z5IA3WDR.js} +19 -31
- package/dist/{chunk-T6XQL73F.js → chunk-ZFFYNRIO.js} +63 -23
- package/dist/{chunk-EDS2L2LD.js → chunk-ZFL7NY4F.js} +56 -27
- package/dist/{chunk-YMZ3TNYB.js → chunk-ZGULQAPZ.js} +7 -4
- package/dist/{chunk-4SKZDI62.js → chunk-ZIUFM5HT.js} +3 -1
- package/dist/{chunk-DKJA76CJ.js → chunk-ZJFRMSJT.js} +15 -13
- package/dist/chunk-ZJXLNDH4.js +239 -0
- package/dist/chunk-ZQ3ON2VQ.js +252 -0
- package/dist/{chunk-HITVBIJS.js → chunk-ZQ7SKESZ.js} +150 -415
- package/dist/{chunk-6QSERWXH.js → chunk-ZQXZ2SES.js} +24 -21
- package/dist/chunk-ZX57KSEQ.js +39 -0
- package/dist/{chunk-I3E7CX4H.js → chunk-ZZK56BLP.js} +5 -3
- package/dist/files.json +664 -368
- package/dist/packages/naysayer/constitution/constitution.yaml +19 -0
- package/dist/packages/sdk/npm/index.js +6194 -2542
- package/dist/packages/ui/dist/assets/{elk-api-tma0MCuh.js → elk-api-CIf-0gz5.js} +2 -2
- package/dist/packages/ui/dist/assets/index-CoK_Dl0D.js +47 -0
- package/dist/packages/ui/dist/assets/index-Dw20IRhQ.css +1 -0
- package/dist/packages/ui/dist/index.html +3 -2
- package/package.json +5 -5
- package/dist/chunk-2BF2EYJV.js +0 -174
- package/dist/chunk-42EVSKME.js +0 -37
- package/dist/chunk-4BKGMUIK.js +0 -53
- package/dist/chunk-5KLGBXG5.js +0 -48
- package/dist/chunk-6BNC6EQ4.js +0 -41
- package/dist/chunk-6D2CQ5II.js +0 -41
- package/dist/chunk-7AVHLZGD.js +0 -45
- package/dist/chunk-D46WUV3T.js +0 -33
- package/dist/chunk-E36QOJMD.js +0 -47
- package/dist/chunk-FQXYPF7E.js +0 -147
- package/dist/chunk-GBRFVT63.js +0 -45
- package/dist/chunk-ICY36XCH.js +0 -34
- package/dist/chunk-J4K3KVLD.js +0 -131
- package/dist/chunk-JZU3H6UQ.js +0 -54
- package/dist/chunk-NN2ZQEB4.js +0 -38
- package/dist/chunk-PCOCACY3.js +0 -385
- package/dist/chunk-RTEYOSJY.js +0 -29
- package/dist/chunk-RUVFXE2L.js +0 -666
- package/dist/chunk-RVH5SUW5.js +0 -69
- package/dist/chunk-VN3DP4LQ.js +0 -43
- package/dist/chunk-W5BVQF44.js +0 -36
- package/dist/chunk-WVPJSRRJ.js +0 -52
- package/dist/chunk-XPTOBS2D.js +0 -48
- package/dist/packages/ui/dist/assets/index-B54fm9FQ.js +0 -29
- package/dist/packages/ui/dist/assets/index-DD_hufQz.css +0 -1
|
@@ -7,26 +7,28 @@ import {
|
|
|
7
7
|
PlannerError,
|
|
8
8
|
draftedStories,
|
|
9
9
|
workItemsOf
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-R7NYHMUU.js";
|
|
11
|
+
import "./chunk-IVBOQAGB.js";
|
|
12
|
+
import "./chunk-ISUAAMGS.js";
|
|
13
|
+
import "./chunk-S4PMJU6H.js";
|
|
14
|
+
import "./chunk-IDKCWSM5.js";
|
|
15
|
+
import "./chunk-UUU4CLJG.js";
|
|
15
16
|
import {
|
|
16
17
|
workItemsCsv
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-7IGKHZ4Z.js";
|
|
19
|
+
import "./chunk-J2JAKCIW.js";
|
|
20
|
+
import "./chunk-745DAZ4L.js";
|
|
21
|
+
import "./chunk-CXJ6FUKN.js";
|
|
22
|
+
import "./chunk-QKUJMING.js";
|
|
23
|
+
import "./chunk-6ZGLAACW.js";
|
|
24
|
+
import "./chunk-CQDGOPGH.js";
|
|
25
|
+
import "./chunk-3NFFJL5D.js";
|
|
26
|
+
import "./chunk-PKBHS4AA.js";
|
|
27
|
+
import "./chunk-P32RUW3B.js";
|
|
28
|
+
import "./chunk-QA4O2GGC.js";
|
|
29
|
+
import "./chunk-Q2TECDIT.js";
|
|
30
|
+
import "./chunk-TUULXQRW.js";
|
|
31
|
+
import "./chunk-BQGDB6ZL.js";
|
|
30
32
|
import "./chunk-TV45EUGM.js";
|
|
31
33
|
|
|
32
34
|
// packages/cli/dist/export-commands.js
|
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
import { createRequire as __atticusCreateRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __atticusFileURLToPath } from "node:url";
|
|
3
|
+
var require = __atticusCreateRequire(import.meta.url);
|
|
4
|
+
var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
|
|
5
|
+
var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
|
|
6
|
+
import {
|
|
7
|
+
termNoteOffer
|
|
8
|
+
} from "./chunk-O5PXQR67.js";
|
|
9
|
+
import "./chunk-4EURQWQD.js";
|
|
10
|
+
import {
|
|
11
|
+
routeQuestions
|
|
12
|
+
} from "./chunk-JA5FI3QV.js";
|
|
13
|
+
import "./chunk-OHNCWBKF.js";
|
|
14
|
+
import "./chunk-LO6P2VYG.js";
|
|
15
|
+
import "./chunk-O7FDLW7L.js";
|
|
16
|
+
import "./chunk-PJSJPMJI.js";
|
|
17
|
+
import {
|
|
18
|
+
waitingQuestions
|
|
19
|
+
} from "./chunk-IVBOQAGB.js";
|
|
20
|
+
import "./chunk-ISUAAMGS.js";
|
|
21
|
+
import "./chunk-J2JAKCIW.js";
|
|
22
|
+
import "./chunk-745DAZ4L.js";
|
|
23
|
+
import "./chunk-CXJ6FUKN.js";
|
|
24
|
+
import "./chunk-QKUJMING.js";
|
|
25
|
+
import "./chunk-6ZGLAACW.js";
|
|
26
|
+
import "./chunk-CQDGOPGH.js";
|
|
27
|
+
import "./chunk-3NFFJL5D.js";
|
|
28
|
+
import {
|
|
29
|
+
gitUser
|
|
30
|
+
} from "./chunk-PKBHS4AA.js";
|
|
31
|
+
import "./chunk-P32RUW3B.js";
|
|
32
|
+
import "./chunk-QA4O2GGC.js";
|
|
33
|
+
import {
|
|
34
|
+
HOSTS_STEP,
|
|
35
|
+
QuestionError,
|
|
36
|
+
QuestionScopeLevel,
|
|
37
|
+
QuestionState,
|
|
38
|
+
TARGETS_STEP_ID,
|
|
39
|
+
TOPICS_STEP_ID,
|
|
40
|
+
acceptProposal,
|
|
41
|
+
answerByWords,
|
|
42
|
+
answerQuestion,
|
|
43
|
+
answerWords,
|
|
44
|
+
changesDirOf,
|
|
45
|
+
checkedProposals,
|
|
46
|
+
external_exports,
|
|
47
|
+
listQuestions,
|
|
48
|
+
proposalOf,
|
|
49
|
+
proposalsRelOf,
|
|
50
|
+
questionsRelOf,
|
|
51
|
+
readQuestion,
|
|
52
|
+
topicOfQuestion
|
|
53
|
+
} from "./chunk-Q2TECDIT.js";
|
|
54
|
+
import {
|
|
55
|
+
writeFileAtomic
|
|
56
|
+
} from "./chunk-TUULXQRW.js";
|
|
57
|
+
import {
|
|
58
|
+
require_dist
|
|
59
|
+
} from "./chunk-BQGDB6ZL.js";
|
|
60
|
+
import {
|
|
61
|
+
__toESM
|
|
62
|
+
} from "./chunk-TV45EUGM.js";
|
|
63
|
+
|
|
64
|
+
// packages/cli/dist/question-commands.js
|
|
65
|
+
import { readFile, stat } from "node:fs/promises";
|
|
66
|
+
import { isAbsolute, join, resolve } from "node:path";
|
|
67
|
+
import { parseArgs } from "node:util";
|
|
68
|
+
|
|
69
|
+
// packages/cli/dist/question-sheet.js
|
|
70
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
71
|
+
import { createHash } from "node:crypto";
|
|
72
|
+
var SHEET_VERSION = 1;
|
|
73
|
+
function askedFingerprint(q) {
|
|
74
|
+
const key = JSON.stringify([
|
|
75
|
+
q.question.trim(),
|
|
76
|
+
q.options.map((o) => [o.label, o.means, o.changes]),
|
|
77
|
+
[...q.evidence].sort(),
|
|
78
|
+
q.scope,
|
|
79
|
+
q.state
|
|
80
|
+
]);
|
|
81
|
+
return createHash("sha256").update(key).digest("hex").slice(0, 16);
|
|
82
|
+
}
|
|
83
|
+
var RULE_STEPS = /* @__PURE__ */ new Set([TARGETS_STEP_ID, HOSTS_STEP]);
|
|
84
|
+
var sentence = (s) => /[.!?]$/.test(s.trim()) ? s.trim() : `${s.trim()}.`;
|
|
85
|
+
function answerSheet(questions, at) {
|
|
86
|
+
const open = questions.filter((q) => q.state === "open");
|
|
87
|
+
const doc = {
|
|
88
|
+
schemaVersion: SHEET_VERSION,
|
|
89
|
+
written: at,
|
|
90
|
+
questions: open.map((q) => ({
|
|
91
|
+
id: q.id,
|
|
92
|
+
repo: q.repo,
|
|
93
|
+
question: q.question.trim(),
|
|
94
|
+
...q.options.length ? {
|
|
95
|
+
options: q.options.map((o, i) => `${i + 1}. ${o.label}: ${sentence(o.means)} It would change: ${sentence(o.changes)}`)
|
|
96
|
+
} : {},
|
|
97
|
+
evidence: q.evidence,
|
|
98
|
+
scope: q.scope.level === "repo" ? "repo" : `repo-type ${q.scope.id}`,
|
|
99
|
+
asked: askedFingerprint(q),
|
|
100
|
+
answer: null,
|
|
101
|
+
...RULE_STEPS.has(q.askedBy.step) ? { match: null } : {}
|
|
102
|
+
}))
|
|
103
|
+
};
|
|
104
|
+
return [
|
|
105
|
+
"# Atticus answer sheet (ADR 0153): every open question, to answer in one sitting.",
|
|
106
|
+
"# Fill in answer: with an option's number, or your own words in quotes. Leave it empty to skip.",
|
|
107
|
+
"# Optional per entry: scope: repo | repo-type (with type: <repo type>), and for a target or",
|
|
108
|
+
'# hosts question match: "<host pattern or /path/**>" so one answer covers every call it matches.',
|
|
109
|
+
"# Then: atticus questions sheet --apply <this file>. It answers as you, through the question files;",
|
|
110
|
+
"# this sheet is a working file: don't commit it.",
|
|
111
|
+
(0, import_yaml.stringify)(doc, { lineWidth: 0 })
|
|
112
|
+
].join("\n");
|
|
113
|
+
}
|
|
114
|
+
var Entry = external_exports.object({
|
|
115
|
+
id: external_exports.string(),
|
|
116
|
+
asked: external_exports.string().optional(),
|
|
117
|
+
answer: external_exports.union([external_exports.number(), external_exports.string(), external_exports.null()]).optional(),
|
|
118
|
+
scope: external_exports.string().nullable().optional(),
|
|
119
|
+
type: external_exports.string().nullable().optional(),
|
|
120
|
+
match: external_exports.string().nullable().optional()
|
|
121
|
+
});
|
|
122
|
+
var Sheet = external_exports.object({
|
|
123
|
+
schemaVersion: external_exports.literal(SHEET_VERSION),
|
|
124
|
+
questions: external_exports.array(external_exports.unknown())
|
|
125
|
+
});
|
|
126
|
+
async function applySheet(root, text, o) {
|
|
127
|
+
let data;
|
|
128
|
+
try {
|
|
129
|
+
data = (0, import_yaml.parse)(text);
|
|
130
|
+
} catch (e) {
|
|
131
|
+
return { outcomes: [], problem: `It doesn't read: ${e.message.split("\n")[0]}` };
|
|
132
|
+
}
|
|
133
|
+
const sheet = Sheet.safeParse(data);
|
|
134
|
+
if (!sheet.success)
|
|
135
|
+
return {
|
|
136
|
+
outcomes: [],
|
|
137
|
+
problem: "It isn't an answer sheet Atticus wrote (schemaVersion 1, with questions): write one with atticus questions sheet."
|
|
138
|
+
};
|
|
139
|
+
const outcomes = [];
|
|
140
|
+
for (const [i, raw] of sheet.data.questions.entries()) {
|
|
141
|
+
const e = Entry.safeParse(raw);
|
|
142
|
+
if (!e.success) {
|
|
143
|
+
outcomes.push({
|
|
144
|
+
id: `entry ${i + 1}`,
|
|
145
|
+
status: "refused",
|
|
146
|
+
why: "it has no question id; leave the sheet's ids as they were written"
|
|
147
|
+
});
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
const { id } = e.data;
|
|
151
|
+
const given = e.data.answer;
|
|
152
|
+
if (given === void 0 || given === null || typeof given === "string" && !given.trim()) {
|
|
153
|
+
outcomes.push({ id, status: "skipped", why: "left blank" });
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
const q = await readQuestion(root, id).catch(() => void 0);
|
|
157
|
+
if (!q) {
|
|
158
|
+
outcomes.push({ id, status: "refused", why: `there is no question ${id}` });
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (q.state !== "open") {
|
|
162
|
+
outcomes.push({
|
|
163
|
+
id,
|
|
164
|
+
status: "skipped",
|
|
165
|
+
why: `it is ${q.state} already${q.answer ? ` (${answerWords(q)}, by ${answerByWords(q.answer.by)})` : ""}`
|
|
166
|
+
});
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
if (e.data.asked !== askedFingerprint(q)) {
|
|
170
|
+
outcomes.push({
|
|
171
|
+
id,
|
|
172
|
+
status: "refused",
|
|
173
|
+
why: "the question changed since the sheet was written (its words, options or evidence): write a new sheet and read it again"
|
|
174
|
+
});
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
const scope = e.data.scope?.trim().split(/\s+/)[0];
|
|
178
|
+
if (scope && !QuestionScopeLevel.safeParse(scope).success) {
|
|
179
|
+
outcomes.push({
|
|
180
|
+
id,
|
|
181
|
+
status: "refused",
|
|
182
|
+
why: "scope is repo (this repo only) or repo-type (every repo of its type)"
|
|
183
|
+
});
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
const option = typeof given === "number" ? given : /^\s*\d+\s*$/.test(given) ? Number(given) : void 0;
|
|
187
|
+
const typeFromScope = e.data.scope?.trim().split(/\s+/)[1];
|
|
188
|
+
const repoType = e.data.type?.trim() || typeFromScope;
|
|
189
|
+
const match = e.data.match?.trim() || void 0;
|
|
190
|
+
try {
|
|
191
|
+
const r = await answerQuestion(root, id, {
|
|
192
|
+
...option !== void 0 ? { option } : { text: String(given) },
|
|
193
|
+
...scope ? { scope } : {},
|
|
194
|
+
...repoType ? { repoType } : {},
|
|
195
|
+
...match ? { match } : {},
|
|
196
|
+
by: o.by,
|
|
197
|
+
at: o.at
|
|
198
|
+
});
|
|
199
|
+
outcomes.push({
|
|
200
|
+
id,
|
|
201
|
+
status: "answered",
|
|
202
|
+
answer: answerWords(r.question) ?? "",
|
|
203
|
+
question: r.question,
|
|
204
|
+
rerun: r.question.rerun
|
|
205
|
+
});
|
|
206
|
+
} catch (x) {
|
|
207
|
+
if (!(x instanceof QuestionError))
|
|
208
|
+
throw x;
|
|
209
|
+
outcomes.push({ id, status: "refused", why: x.message });
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return { outcomes };
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// packages/cli/dist/question-commands.js
|
|
216
|
+
var RULE_STEPS2 = /* @__PURE__ */ new Set([TARGETS_STEP_ID, HOSTS_STEP]);
|
|
217
|
+
var plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
|
|
218
|
+
var sentence2 = (s) => /[.!?]$/.test(s.trim()) ? s.trim() : `${s.trim()}.`;
|
|
219
|
+
function scopeWords(s, short = false, change = false) {
|
|
220
|
+
const what = change ? "this change" : "this repo";
|
|
221
|
+
if (s.level === "repo")
|
|
222
|
+
return short ? what : `${what} (${s.id})`;
|
|
223
|
+
return `every repo of type ${s.id}`;
|
|
224
|
+
}
|
|
225
|
+
async function isChange(root, id) {
|
|
226
|
+
return stat(join(changesDirOf(root), id, "change.yaml")).then(() => true, () => false);
|
|
227
|
+
}
|
|
228
|
+
function aboutLines(about) {
|
|
229
|
+
if (!about)
|
|
230
|
+
return [];
|
|
231
|
+
const o = about.owner;
|
|
232
|
+
return [
|
|
233
|
+
"team" in o ? ` Owner: ${o.team}${o.name ? ` (${o.name})` : ""}` : "change" in o ? ` Owner: the people of ${o.change}: ${o.people.join(", ")}` : ` Owner: none (${o.none})`,
|
|
234
|
+
...about.restsOn.length ? [
|
|
235
|
+
` Ask it first: ${about.restsOn.join(", ")} ${about.restsOn.length === 1 ? "is a change in flight that rests" : "are changes in flight that rest"} on it.`
|
|
236
|
+
] : [],
|
|
237
|
+
...about.joins ? [` Its answer joins ${plural(about.joins, "call")}.`] : []
|
|
238
|
+
];
|
|
239
|
+
}
|
|
240
|
+
function proposalLines(q, p) {
|
|
241
|
+
const what = p.answer.option !== void 0 ? `option ${p.answer.option}, ${q.options[p.answer.option - 1]?.label ?? "?"}` : `"${p.answer.text}"`;
|
|
242
|
+
return [
|
|
243
|
+
` Proposed by ${p.by} (not answered yet): ${what}. ${sentence2(p.why)}`,
|
|
244
|
+
...p.cites.map((c) => ` Cites ${c.repo ?? q.repo} ${c.file}:${c.line}: "${c.quote}" (checked: it is on that line)`),
|
|
245
|
+
` Accept it as your answer: atticus questions answer ${q.id} --accept-proposal`
|
|
246
|
+
];
|
|
247
|
+
}
|
|
248
|
+
function ruleLine(q, change = false) {
|
|
249
|
+
const a = q.answer;
|
|
250
|
+
const where = a.scope.level === "repo" ? `${change ? "this change" : "this repo"}, ${a.scope.id}` : scopeWords(a.scope);
|
|
251
|
+
const what = a.match.startsWith("/") ? `whose path is under ${a.match}` : `on a host matching ${a.match}`;
|
|
252
|
+
return `It answers by rule: every call ${what}, in ${where}, reads this answer, the calls found later too.`;
|
|
253
|
+
}
|
|
254
|
+
function ruleOfferLine(id, r) {
|
|
255
|
+
const others = r.ids.length - 1;
|
|
256
|
+
return ` Answer once for all ${r.ids.length}: atticus questions answer ${id} --option <n> --match "${r.match}" covers the ${plural(r.calls, "call")} of these ${r.ids.length} questions, and the other ${others === 1 ? "one retires" : `${others} retire`} on the next verify --write (${r.ids.filter((x) => x !== id).join(", ")}).`;
|
|
257
|
+
}
|
|
258
|
+
function questionLines(q, o = {}) {
|
|
259
|
+
const lines = [
|
|
260
|
+
`${q.id} ${q.state} ${q.repo} (asked by ${q.askedBy.command} on ${q.askedBy.at.slice(0, 10)})`,
|
|
261
|
+
` ${q.question}`,
|
|
262
|
+
...aboutLines(o.about),
|
|
263
|
+
...q.options.map((o2, i) => ` ${i + 1}. ${o2.label}: ${sentence2(o2.means)} It would change: ${sentence2(o2.changes)}`),
|
|
264
|
+
` Evidence: ${q.evidence.join(", ")}`,
|
|
265
|
+
...q.state === "open" && o.about?.rule ? [ruleOfferLine(q.id, o.about.rule)] : []
|
|
266
|
+
];
|
|
267
|
+
if (q.answer)
|
|
268
|
+
lines.push(` Answered by ${answerByWords(q.answer.by)} on ${q.answer.at.slice(0, 10)}: ${answerWords(q)} (${scopeWords(q.answer.scope, true, o.change)})${q.answer.match ? `, by rule: ${q.answer.match}` : ""}`, ...q.answer.proposal ? [
|
|
269
|
+
` It was ${q.answer.proposal.by}'s proposal (${q.answer.proposal.at.slice(0, 10)}), confirmed by ${answerByWords(q.answer.by)}; it cited ${q.answer.proposal.cites.map((c) => `${c.repo ?? q.repo} ${c.file}:${c.line}`).join(", ")}.`
|
|
270
|
+
] : []);
|
|
271
|
+
else if (q.state === "open")
|
|
272
|
+
lines.push(...o.about?.proposal ? proposalLines(q, o.about.proposal) : [], ` Proposed scope: ${scopeWords(q.scope, false, o.change)}`, ` Answer: atticus questions answer ${q.id}${q.options.length ? " --option <n>, or" : ""} --text "your own words"${RULE_STEPS2.has(q.askedBy.step) ? ' (add --match "<host pattern or /path/**>" for every call it covers)' : ""}`);
|
|
273
|
+
return lines;
|
|
274
|
+
}
|
|
275
|
+
async function questionsFiles(root, argv, io, deps = {}) {
|
|
276
|
+
const { values, positionals } = parseArgs({
|
|
277
|
+
args: argv,
|
|
278
|
+
allowPositionals: true,
|
|
279
|
+
strict: false,
|
|
280
|
+
options: {
|
|
281
|
+
root: { type: "string" },
|
|
282
|
+
json: { type: "boolean" },
|
|
283
|
+
state: { type: "string" },
|
|
284
|
+
option: { type: "string" },
|
|
285
|
+
text: { type: "string" },
|
|
286
|
+
scope: { type: "string" },
|
|
287
|
+
type: { type: "string" },
|
|
288
|
+
by: { type: "string" },
|
|
289
|
+
mine: { type: "boolean" },
|
|
290
|
+
"accept-proposal": { type: "boolean" },
|
|
291
|
+
match: { type: "string" },
|
|
292
|
+
apply: { type: "string" },
|
|
293
|
+
out: { type: "string" },
|
|
294
|
+
target: { type: "string" },
|
|
295
|
+
"add-system": { type: "string" },
|
|
296
|
+
name: { type: "string" }
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
const str = (v) => typeof v === "string" ? v : void 0;
|
|
300
|
+
const [, command, id] = positionals;
|
|
301
|
+
if (command === "list") {
|
|
302
|
+
const state = str(values.state);
|
|
303
|
+
if (state !== void 0 && !QuestionState.safeParse(state).success) {
|
|
304
|
+
io.err("--state is open, answered or retired.");
|
|
305
|
+
return 2;
|
|
306
|
+
}
|
|
307
|
+
const listed = await listQuestions(root, state ? { state } : {});
|
|
308
|
+
for (const p of listed.problems)
|
|
309
|
+
io.err(`${p.file} isn't a valid question: ${p.message}`);
|
|
310
|
+
const mine = values.mine === true ? str(values.by)?.trim() || (await gitUser(root)).handle : void 0;
|
|
311
|
+
const routed = await routeQuestions(root, listed.questions, mine ? { mine } : {});
|
|
312
|
+
for (const p of routed.problems)
|
|
313
|
+
io.err(`${p.file}: ${p.message}`);
|
|
314
|
+
const r = { ...listed, questions: routed.questions };
|
|
315
|
+
const waiting = !state || state === "open" ? await waitingQuestions(root) : [];
|
|
316
|
+
if (values.json === true) {
|
|
317
|
+
io.out(JSON.stringify({ ...r, about: routed.about, ...routed.me ? { me: routed.me } : {}, waiting }, null, 2));
|
|
318
|
+
return r.problems.length ? 1 : 0;
|
|
319
|
+
}
|
|
320
|
+
if (routed.me)
|
|
321
|
+
io.out(routed.me.teams.length ? `The questions for ${routed.me.handle}'s ${routed.me.teams.length === 1 ? "team" : "teams"}: ${routed.me.teams.map((t) => t.name ? `${t.id} (${t.name})` : t.id).join(", ")}.` : r.questions.length ? `The questions of the changes that name ${routed.me.handle} under owners in change.yaml; ${routed.me.handle} is on no team in org-pack/roles.yaml.` : `${routed.me.handle} is on no team in org-pack/roles.yaml and no change names them under owners, so no question is theirs: add them under a team's people (roles.yaml schemaVersion 2), or list every question without --mine.`);
|
|
322
|
+
const changes = /* @__PURE__ */ new Set();
|
|
323
|
+
for (const q of r.questions)
|
|
324
|
+
if (await isChange(root, q.repo))
|
|
325
|
+
changes.add(q.repo);
|
|
326
|
+
for (const q of r.questions)
|
|
327
|
+
for (const l of questionLines(q, { change: changes.has(q.repo), about: routed.about[q.id] }))
|
|
328
|
+
io.out(l);
|
|
329
|
+
const what = state ? `${state} ` : "";
|
|
330
|
+
const yours = routed.me ? " for your teams" : "";
|
|
331
|
+
io.out(r.questions.length ? `${plural(r.questions.length, `${what}question`)}${yours}.` : `No ${what}questions${yours}.`);
|
|
332
|
+
if (waiting.length) {
|
|
333
|
+
io.out(`${plural(waiting.length, "more question")} ${waiting.length === 1 ? "waits" : "wait"}, asked once the open ones are answered:`);
|
|
334
|
+
for (const w of waiting)
|
|
335
|
+
io.out(` ${w.change}, ${w.stage} stage: ${w.question}${w.evidence.length ? ` (${w.evidence.join(", ")})` : ""}`);
|
|
336
|
+
for (const rerun of [...new Set(waiting.map((w) => w.rerun))])
|
|
337
|
+
io.out(`Run the stage again after answering: ${rerun}`);
|
|
338
|
+
}
|
|
339
|
+
return r.problems.length ? 1 : 0;
|
|
340
|
+
}
|
|
341
|
+
if (command === "show") {
|
|
342
|
+
if (!id) {
|
|
343
|
+
io.err("questions show needs a question id, for example: atticus questions show q-1a2b3c4d5e6f");
|
|
344
|
+
return 2;
|
|
345
|
+
}
|
|
346
|
+
const all = await listQuestions(root);
|
|
347
|
+
const q = all.questions.find((x) => x.id === id);
|
|
348
|
+
if (!q) {
|
|
349
|
+
const bad = all.problems.find((p2) => p2.file.endsWith(`/${id}.yaml`));
|
|
350
|
+
if (bad)
|
|
351
|
+
io.err(bad.message.startsWith("written by a newer Atticus") ? `${bad.file} was ${bad.message}.` : `${bad.file} isn't a valid question: ${bad.message}`);
|
|
352
|
+
else
|
|
353
|
+
io.err(`No question ${id}: atticus questions list shows them.`);
|
|
354
|
+
return 1;
|
|
355
|
+
}
|
|
356
|
+
const p = q.state === "open" ? await proposalOf(root, q.id) : void 0;
|
|
357
|
+
const proposal = p?.ok && p.proposal ? { ...p.proposal, file: p.file } : void 0;
|
|
358
|
+
if (values.json === true) {
|
|
359
|
+
const picks = q.state === "open" && (q.askedBy.step === TARGETS_STEP_ID || q.askedBy.step === TOPICS_STEP_ID) ? await (await import("./chunk-KFAVQZSX.js")).pickerOf(root) : void 0;
|
|
360
|
+
const rule = q.state === "open" && q.askedBy.step === TARGETS_STEP_ID ? (await routeQuestions(root, [q])).about[q.id]?.rule : void 0;
|
|
361
|
+
io.out(JSON.stringify({
|
|
362
|
+
...q,
|
|
363
|
+
...proposal ? { proposal } : {},
|
|
364
|
+
...picks ? { picks } : {},
|
|
365
|
+
...rule ? { rule } : {}
|
|
366
|
+
}, null, 2));
|
|
367
|
+
} else {
|
|
368
|
+
const routed = await routeQuestions(root, [q]);
|
|
369
|
+
const about = routed.about[q.id];
|
|
370
|
+
for (const l of questionLines(q, {
|
|
371
|
+
change: await isChange(root, q.repo),
|
|
372
|
+
...about ? { about: { ...about, ...proposal ? { proposal } : {} } } : {}
|
|
373
|
+
}))
|
|
374
|
+
io.out(l);
|
|
375
|
+
if (p && !p.ok && !p.stale)
|
|
376
|
+
io.out(` A proposed answer is on file (${p.file}) but doesn't check, so it isn't shown: ${p.problems.join(" ")}`);
|
|
377
|
+
}
|
|
378
|
+
return 0;
|
|
379
|
+
}
|
|
380
|
+
if (command === "proposed") {
|
|
381
|
+
const all = await checkedProposals(root);
|
|
382
|
+
const dir = `${proposalsRelOf(root)}/questions`;
|
|
383
|
+
if (values.json === true) {
|
|
384
|
+
io.out(JSON.stringify({ dir, proposals: all }, null, 2));
|
|
385
|
+
return all.some((p) => !p.ok && !p.stale) ? 1 : 0;
|
|
386
|
+
}
|
|
387
|
+
if (!all.length) {
|
|
388
|
+
io.out(`No proposed answers yet. /atticus-propose writes one per open question to ${dir}/<question id>.yaml.`);
|
|
389
|
+
return 0;
|
|
390
|
+
}
|
|
391
|
+
for (const p of all) {
|
|
392
|
+
if (p.ok)
|
|
393
|
+
io.out(`${p.id} checked: every line it cites says what it quotes (${p.file}).`);
|
|
394
|
+
else if (p.stale)
|
|
395
|
+
io.out(`${p.id} nothing to propose: ${p.problems.join(" ")}`);
|
|
396
|
+
else {
|
|
397
|
+
io.out(`${p.id} doesn't check, so nobody sees it (${p.file}):`);
|
|
398
|
+
for (const x of p.problems)
|
|
399
|
+
io.out(` ${x}`);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
const bad = all.filter((p) => !p.ok && !p.stale).length;
|
|
403
|
+
const ok = all.filter((p) => p.ok).length;
|
|
404
|
+
io.out(bad ? `${plural(bad, "proposal")} ${bad === 1 ? "doesn't" : "don't"} check: fix each citation from the file's line, or remove the proposal.` : `${plural(ok, "proposal")} checked. A person accepts each with atticus questions answer <id> --accept-proposal, or on the Questions page.`);
|
|
405
|
+
return bad ? 1 : 0;
|
|
406
|
+
}
|
|
407
|
+
if (command === "sheet") {
|
|
408
|
+
const at = (deps.now ?? /* @__PURE__ */ new Date()).toISOString();
|
|
409
|
+
const apply = str(values.apply);
|
|
410
|
+
if (apply !== void 0) {
|
|
411
|
+
const file2 = isAbsolute(apply) ? apply : resolve(apply);
|
|
412
|
+
const text = await readFile(file2, "utf8").catch(() => void 0);
|
|
413
|
+
if (text === void 0) {
|
|
414
|
+
io.err(`There is no answer sheet at ${apply}: write one with atticus questions sheet.`);
|
|
415
|
+
return 1;
|
|
416
|
+
}
|
|
417
|
+
const by = str(values.by)?.trim() || (await gitUser(root)).handle;
|
|
418
|
+
const r = await applySheet(root, text, { by, at });
|
|
419
|
+
if (r.problem) {
|
|
420
|
+
io.err(`${apply} can't be applied: ${r.problem}`);
|
|
421
|
+
return 2;
|
|
422
|
+
}
|
|
423
|
+
if (values.json === true) {
|
|
424
|
+
io.out(JSON.stringify(r, null, 2));
|
|
425
|
+
return r.outcomes.some((x) => x.status === "refused") ? 1 : 0;
|
|
426
|
+
}
|
|
427
|
+
for (const x of r.outcomes)
|
|
428
|
+
io.out(x.status === "answered" ? `Answered ${x.id}: ${x.answer} (as ${by}${x.question.answer?.match ? `, by rule: ${x.question.answer.match}` : ""}).` : x.status === "skipped" ? `Skipped ${x.id}: ${x.why}.` : `Refused ${x.id}: ${sentence2(x.why)}`);
|
|
429
|
+
const done = r.outcomes.filter((x) => x.status === "answered");
|
|
430
|
+
const refused = r.outcomes.filter((x) => x.status === "refused").length;
|
|
431
|
+
const skipped = r.outcomes.filter((x) => x.status === "skipped").length;
|
|
432
|
+
io.out(`${plural(done.length, "question")} answered, ${skipped} skipped, ${refused} refused. Wrote each answer to ${questionsRelOf(root)}/<id>.yaml; commit them for review.`);
|
|
433
|
+
const reruns = [...new Set(done.map((x) => x.status === "answered" ? x.rerun : ""))].filter(Boolean);
|
|
434
|
+
for (const rerun of reruns)
|
|
435
|
+
io.out(`Next: ${rerun}`);
|
|
436
|
+
return refused ? 1 : 0;
|
|
437
|
+
}
|
|
438
|
+
const open = (await listQuestions(root, { state: "open" })).questions;
|
|
439
|
+
const routed = await routeQuestions(root, open);
|
|
440
|
+
const out = str(values.out) ?? "questions-sheet.yaml";
|
|
441
|
+
const file = isAbsolute(out) ? out : join(root, out);
|
|
442
|
+
await writeFileAtomic(file, answerSheet(routed.questions, at));
|
|
443
|
+
io.out(open.length ? `Wrote ${plural(open.length, "open question")} to ${out}, in the order to ask them. Fill in the answers you know, leave the rest empty, then run: atticus questions sheet --apply ${out}` : `No open questions: wrote an empty sheet to ${out}.`);
|
|
444
|
+
return 0;
|
|
445
|
+
}
|
|
446
|
+
if (command === "answer") {
|
|
447
|
+
if (!id) {
|
|
448
|
+
io.err("questions answer needs a question id, for example: atticus questions answer q-1a2b3c4d5e6f --option 1");
|
|
449
|
+
return 2;
|
|
450
|
+
}
|
|
451
|
+
const opt = str(values.option);
|
|
452
|
+
let text = str(values.text)?.trim() || void 0;
|
|
453
|
+
const accept = values["accept-proposal"] === true;
|
|
454
|
+
const target = str(values.target)?.trim() || void 0;
|
|
455
|
+
const addSystem = str(values["add-system"]);
|
|
456
|
+
if (addSystem !== void 0 && addSystem !== "vendor" && addSystem !== "internal") {
|
|
457
|
+
io.err("--add-system is vendor (an outside vendor) or internal (another team's system).");
|
|
458
|
+
return 2;
|
|
459
|
+
}
|
|
460
|
+
if (addSystem !== void 0 && !target) {
|
|
461
|
+
io.err("--add-system goes with --target <the system's name>.");
|
|
462
|
+
return 2;
|
|
463
|
+
}
|
|
464
|
+
let added;
|
|
465
|
+
let beforeWrite;
|
|
466
|
+
if (target) {
|
|
467
|
+
if (opt !== void 0 || text !== void 0 || accept) {
|
|
468
|
+
io.err("--target names the answer: give it alone, not with --option, --text or --accept-proposal.");
|
|
469
|
+
return 2;
|
|
470
|
+
}
|
|
471
|
+
const { readQuestion: readQuestion2 } = await import("./chunk-VY72R2XZ.js");
|
|
472
|
+
const { targetAnswerOf, pickerOf, pickerText, offerLine } = await import("./chunk-KFAVQZSX.js");
|
|
473
|
+
const q0 = await readQuestion2(root, id).catch(() => void 0);
|
|
474
|
+
if (!q0) {
|
|
475
|
+
io.err(`There is no question ${id}.`);
|
|
476
|
+
return 1;
|
|
477
|
+
}
|
|
478
|
+
const r = await targetAnswerOf(root, q0, target, {
|
|
479
|
+
...addSystem ? { addSystem } : {},
|
|
480
|
+
...str(values.name) ? { name: str(values.name) } : {}
|
|
481
|
+
});
|
|
482
|
+
if ("problem" in r) {
|
|
483
|
+
io.err(r.problem);
|
|
484
|
+
if (r.offer)
|
|
485
|
+
io.err(offerLine(id, target, r.offer));
|
|
486
|
+
else if (q0.askedBy.step === TARGETS_STEP_ID || q0.askedBy.step === TOPICS_STEP_ID) {
|
|
487
|
+
io.err("The repos, systems and teams --target takes:");
|
|
488
|
+
for (const l of pickerText(await pickerOf(root)))
|
|
489
|
+
io.err(` ${l}`);
|
|
490
|
+
}
|
|
491
|
+
return 2;
|
|
492
|
+
}
|
|
493
|
+
text = r.text;
|
|
494
|
+
if (r.write) {
|
|
495
|
+
const writeSystem = r.write;
|
|
496
|
+
beforeWrite = async () => {
|
|
497
|
+
const sys = await writeSystem();
|
|
498
|
+
added = sys.added ? `Wrote the system ${sys.id} (boundary ${sys.boundary}${sys.owner ? `, owner ${sys.owner}` : ""}${q0.askedBy.step !== TARGETS_STEP_ID ? `, topic ${topicOfQuestion(q0) ?? ""}` : ""}) into ${sys.profile}; review it in the same pull request.` : sys.topics?.length ? `Wrote ${sys.topics.join(", ")} under topics of ${sys.id} in ${sys.profile}, so the next write lands it there; review it in the same pull request.` : `${sys.profile} already has ${sys.id}${q0.askedBy.step !== TARGETS_STEP_ID ? `, with ${topicOfQuestion(q0) ?? "the topic"} among its topics` : ""}.`;
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
if (accept && (opt !== void 0 || text !== void 0)) {
|
|
503
|
+
io.err("--accept-proposal takes the proposed answer: give it alone, or answer with --option or --text instead.");
|
|
504
|
+
return 2;
|
|
505
|
+
}
|
|
506
|
+
if (!accept && opt === void 0 === (text === void 0)) {
|
|
507
|
+
io.err('Answer with --option <n> or --text "your own words" (--target <repo, system or team id> for where a call goes): one of them.');
|
|
508
|
+
return 2;
|
|
509
|
+
}
|
|
510
|
+
const option = opt === void 0 ? void 0 : Number(opt);
|
|
511
|
+
if (option !== void 0 && (!Number.isInteger(option) || option < 1)) {
|
|
512
|
+
io.err("--option is the number of an option, counting from 1.");
|
|
513
|
+
return 2;
|
|
514
|
+
}
|
|
515
|
+
const scope = str(values.scope);
|
|
516
|
+
if (scope !== void 0 && !QuestionScopeLevel.safeParse(scope).success) {
|
|
517
|
+
io.err("--scope is repo (this repo only) or repo-type (every repo of its type).");
|
|
518
|
+
return 2;
|
|
519
|
+
}
|
|
520
|
+
try {
|
|
521
|
+
const by = str(values.by)?.trim() || (await gitUser(root)).handle;
|
|
522
|
+
const at = (deps.now ?? /* @__PURE__ */ new Date()).toISOString();
|
|
523
|
+
const match = str(values.match)?.trim() || void 0;
|
|
524
|
+
const scoped = {
|
|
525
|
+
...scope ? { scope } : {},
|
|
526
|
+
...str(values.type) ? { repoType: str(values.type) } : {},
|
|
527
|
+
// ADR 0153 (Q2): the rule the answer covers, for a target or hosts question.
|
|
528
|
+
...match ? { match } : {}
|
|
529
|
+
};
|
|
530
|
+
const r = accept ? await acceptProposal(root, id, { ...scoped, by, at }) : await answerQuestion(root, id, {
|
|
531
|
+
...option !== void 0 ? { option } : {},
|
|
532
|
+
...text !== void 0 ? { text } : {},
|
|
533
|
+
...scoped,
|
|
534
|
+
...beforeWrite ? { beforeWrite } : {},
|
|
535
|
+
by,
|
|
536
|
+
at
|
|
537
|
+
});
|
|
538
|
+
const q = r.question;
|
|
539
|
+
if (added)
|
|
540
|
+
io.out(added);
|
|
541
|
+
io.out(`Answered ${q.id}: ${answerWords(q)} (for ${q.answer.scope.level === "repo" ? `${await isChange(root, q.repo) ? "this change" : "this repo"}, ${q.repo}` : scopeWords(q.answer.scope)}). Wrote ${questionsRelOf(root)}/${q.id}.yaml; commit it for review.`);
|
|
542
|
+
if (accept)
|
|
543
|
+
io.out(`It was the assistant's proposal; you accepted it, so it is recorded as answered by ${answerByWords(q.answer.by)}, with the proposal it came from.`);
|
|
544
|
+
if (q.answer.match)
|
|
545
|
+
io.out(ruleLine(q, await isChange(root, q.repo)));
|
|
546
|
+
const offer = termNoteOffer(q);
|
|
547
|
+
if (offer)
|
|
548
|
+
io.out(offer);
|
|
549
|
+
if (r.skill)
|
|
550
|
+
io.out(r.skill.written ? `Also wrote it under Answers in ${r.skill.path}; review it in the same pull request.` : `${r.skill.path} isn't there yet, so the answer is kept in the question file, with that path.`);
|
|
551
|
+
if (r.hosts)
|
|
552
|
+
io.out(r.hosts.added ? `Wrote ${r.hosts.host} under hosts for ${r.hosts.repo}${r.hosts.basePath ? `, with basePath ${r.hosts.basePath},` : ""} in ${r.hosts.manifest}; review it in the same pull request.` : `${r.hosts.repo} already lists ${r.hosts.host} under hosts in ${r.hosts.manifest}.`);
|
|
553
|
+
if (r.covered?.length)
|
|
554
|
+
io.out(`The rule answers ${plural(r.covered.length, "more open question")} too, retired as answered by it: ${r.covered.join(", ")}.`);
|
|
555
|
+
if (r.system)
|
|
556
|
+
io.out(r.system.added ? `Wrote the system ${r.system.id} (boundary ${r.system.boundary}, alias ${r.system.host}) into ${r.system.profile}, so the calls to ${r.system.host} go to it; review it in the same pull request, and give it a better name and an owner there if you like.` : `${r.system.profile} already has ${r.system.id}, which names ${r.system.host}.`);
|
|
557
|
+
io.out(`Next: ${q.rerun}`);
|
|
558
|
+
return 0;
|
|
559
|
+
} catch (e) {
|
|
560
|
+
if (!(e instanceof QuestionError))
|
|
561
|
+
throw e;
|
|
562
|
+
io.err(e.message);
|
|
563
|
+
if (/opens the list of every repo/.test(e.message)) {
|
|
564
|
+
const { pickerOf, pickerText } = await import("./chunk-KFAVQZSX.js");
|
|
565
|
+
for (const l of pickerText(await pickerOf(root)))
|
|
566
|
+
io.err(` ${l}`);
|
|
567
|
+
}
|
|
568
|
+
return e.code === "bad-answer" ? 2 : 1;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
io.err(`atticus questions ${command ?? ""} isn't a command: it is questions list, show, proposed, propose, answer or sheet (atticus questions alone lists the knowledge gaps).`);
|
|
572
|
+
io.err('Usage: atticus questions list [--state open|answered|retired] [--mine] [--json], atticus questions show <id> [--json], atticus questions proposed [--json], or atticus questions answer <id> --option <n> | --text "..." | --target <id> [--add-system vendor|internal] [--name "..."] | --accept-proposal [--scope repo|repo-type] [--type <repo type>] [--match <host pattern or /path/**>], or atticus questions sheet [--out <file>] | --apply <file>');
|
|
573
|
+
return 2;
|
|
574
|
+
}
|
|
575
|
+
export {
|
|
576
|
+
aboutLines,
|
|
577
|
+
proposalLines,
|
|
578
|
+
questionLines,
|
|
579
|
+
questionsFiles,
|
|
580
|
+
ruleLine,
|
|
581
|
+
ruleOfferLine,
|
|
582
|
+
scopeWords
|
|
583
|
+
};
|