@unbrained/pm-cli 2026.7.19 → 2026.7.20
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/.claude-plugin/marketplace.json +2 -2
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +36 -0
- package/dist/cli/commands/append.js +13 -6
- package/dist/cli/commands/append.js.map +1 -1
- package/dist/cli/commands/calendar.d.ts +1 -1
- package/dist/cli/commands/calendar.js +2 -2
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/comments.js +2 -5
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/completion.js +11 -3
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/context.d.ts +1 -1
- package/dist/cli/commands/context.js +2 -2
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.js +4 -3
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/copy.js +5 -3
- package/dist/cli/commands/copy.js.map +1 -1
- package/dist/cli/commands/create.d.ts +3 -1
- package/dist/cli/commands/create.js +5 -3
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/merge.d.ts +8 -0
- package/dist/cli/commands/merge.js +12 -0
- package/dist/cli/commands/merge.js.map +1 -0
- package/dist/cli/commands/plan.d.ts +1 -1
- package/dist/cli/commands/plan.js +2 -2
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/update-many.d.ts +5 -0
- package/dist/cli/commands/update-many.js +81 -6
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +5 -1
- package/dist/cli/commands/update.js +50 -4
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/register-list-query.js +14 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +61 -2
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +5 -3
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/registration-helpers.js +4 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +365 -333
- package/dist/cli-bundle/chunks/{append-MBXHNWSX.js → append-E6V54WOQ.js} +5 -5
- package/dist/cli-bundle/chunks/append-NNJ3EFIT.js +11 -0
- package/dist/cli-bundle/chunks/{chunk-M4B4RK4J.js → chunk-2BO4CA46.js} +14 -238
- package/dist/cli-bundle/chunks/{chunk-M4B4RK4J.js.map → chunk-2BO4CA46.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MQOSMBWV.js → chunk-3AO5VSDR.js} +25 -6
- package/dist/cli-bundle/chunks/chunk-3AO5VSDR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ODEIDKGW.js → chunk-3LPFHE3P.js} +596 -154
- package/dist/cli-bundle/chunks/chunk-3LPFHE3P.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YGEA4CLH.js → chunk-3MCTMJXI.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-N7FCFJ76.js → chunk-3P7UJQOX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7B7IHMLH.js → chunk-3VY6MIEO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3EZZTFL2.js → chunk-4F6BWJ4J.js} +51 -43
- package/dist/cli-bundle/chunks/chunk-4F6BWJ4J.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VA3H7VVC.js → chunk-4L23AGQ7.js} +9 -7
- package/dist/cli-bundle/chunks/chunk-4L23AGQ7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5S6IZXK7.js → chunk-4U4Z6AHI.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-UOIFZ66L.js → chunk-4XGJLADW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-SUNZKVAH.js → chunk-5IZJWSDB.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-QQ77W23U.js → chunk-5NTE36LD.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-EVAN5VJA.js → chunk-5OK4UGFV.js} +5 -8
- package/dist/cli-bundle/chunks/{chunk-EVAN5VJA.js.map → chunk-5OK4UGFV.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H3YKUVDR.js → chunk-5UX66S6U.js} +26 -7
- package/dist/cli-bundle/chunks/chunk-5UX66S6U.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KGPLSHJD.js → chunk-6C2ZZX5Z.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q5NHJ6RO.js → chunk-6JUTHVQS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NTS2RKHN.js → chunk-6VIJ7UA5.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-BBGR4FKQ.js → chunk-6XMUURSS.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-6XMUURSS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-XVB6BATY.js → chunk-72LQ4TKV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WCBB6VI3.js → chunk-7AVEY74G.js} +8 -5
- package/dist/cli-bundle/chunks/chunk-7AVEY74G.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YG56M3NE.js → chunk-7DOJC3HS.js} +8 -8
- package/dist/cli-bundle/chunks/chunk-7DOJC3HS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KZ5AC6B5.js → chunk-7WCE6Y64.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VQOG2ETB.js → chunk-AF2CCM5U.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-P24ZU5QV.js → chunk-AOEOYL3S.js} +49 -12
- package/dist/cli-bundle/chunks/chunk-AOEOYL3S.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-BZKE2O5V.js → chunk-BKIAH72N.js} +8 -6
- package/dist/cli-bundle/chunks/chunk-BKIAH72N.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RWAIRGBC.js → chunk-C3KD7U3T.js} +12 -243
- package/dist/cli-bundle/chunks/chunk-C3KD7U3T.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CFHAODHQ.js +334 -0
- package/dist/cli-bundle/chunks/chunk-CFHAODHQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TELI67UP.js → chunk-CQTQKUUV.js} +6 -9
- package/dist/cli-bundle/chunks/{chunk-TELI67UP.js.map → chunk-CQTQKUUV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZUCBPXNA.js → chunk-D6NXDNP3.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-D6NXDNP3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EAV3P54W.js → chunk-DAQ45GCS.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-6V4T4RD3.js → chunk-DVDBQA3B.js} +79 -22
- package/dist/cli-bundle/chunks/chunk-DVDBQA3B.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-E6LEMURX.js +249 -0
- package/dist/cli-bundle/chunks/chunk-E6LEMURX.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZF52NVRT.js → chunk-E7ICD63T.js} +131 -179
- package/dist/cli-bundle/chunks/chunk-E7ICD63T.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RX53WHFI.js → chunk-EJDGV4GR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-IXG5CMBR.js → chunk-FDHPAVVB.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-KAE727L2.js → chunk-FSRHYUDA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-FSRHYUDA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-46Z6FAVP.js → chunk-G3COA6GS.js} +51 -43
- package/dist/cli-bundle/chunks/chunk-G3COA6GS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A4FVWFZY.js → chunk-GFQP7HAZ.js} +8 -6
- package/dist/cli-bundle/chunks/chunk-GFQP7HAZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-2XPDCXK5.js → chunk-GIQSU6S2.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-GIQSU6S2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-V4QHAMI5.js → chunk-GROYI4RB.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-77XFQRTD.js → chunk-GSJSM5BJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QYGK2XQ3.js → chunk-GTLCVJOE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VSQE43NO.js → chunk-GV2262OF.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-N2TEEOXJ.js → chunk-GVI6FAFG.js} +8 -6
- package/dist/cli-bundle/chunks/chunk-GVI6FAFG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-A5EQPNV7.js → chunk-GVT754PX.js} +44 -3
- package/dist/cli-bundle/chunks/chunk-GVT754PX.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Y2VSGFT4.js → chunk-HB3P4M52.js} +22 -7
- package/dist/cli-bundle/chunks/chunk-HB3P4M52.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-STBCBDKF.js → chunk-HCEBZNC3.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-EEECAV5M.js → chunk-HEWM6CEN.js} +80 -25
- package/dist/cli-bundle/chunks/chunk-HEWM6CEN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GKCEEXMA.js → chunk-HQ3SB4CN.js} +21 -6
- package/dist/cli-bundle/chunks/{chunk-GKCEEXMA.js.map → chunk-HQ3SB4CN.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-U6RYD446.js → chunk-HRW7GF6T.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-D35WYXWC.js → chunk-HYW67VJ5.js} +6 -3
- package/dist/cli-bundle/chunks/chunk-HYW67VJ5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OKWJUL6F.js → chunk-I577UHC7.js} +16 -9
- package/dist/cli-bundle/chunks/{chunk-OKWJUL6F.js.map → chunk-I577UHC7.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XDWXPG2E.js → chunk-IAQE32BI.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-66SRNEBK.js → chunk-IJNK6WW2.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-INSTSQNZ.js +623 -0
- package/dist/cli-bundle/chunks/chunk-INSTSQNZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-A3GAQLBH.js → chunk-IX677TRO.js} +75 -12
- package/dist/cli-bundle/chunks/chunk-IX677TRO.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RLLOZAM2.js → chunk-IY6VZ3IW.js} +29 -8
- package/dist/cli-bundle/chunks/chunk-IY6VZ3IW.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SVAWG7EE.js → chunk-J4FBIFU6.js} +45 -4
- package/dist/cli-bundle/chunks/chunk-J4FBIFU6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AGEBQRBG.js → chunk-JAPE62Y5.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-UWAQI3B7.js → chunk-JGUKMMRS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UU6EP25G.js → chunk-JH2ZSLO3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GRDK25BN.js → chunk-JHJSFOAM.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-FQO5THHM.js → chunk-JM6YAXTR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-E7KBMWEF.js → chunk-JSLT7WVE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FIUTBFC6.js → chunk-K4CI6Y45.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IEMXESIS.js → chunk-KSPWRNVP.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-3QNUDDY2.js → chunk-KZEANWJS.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-3QNUDDY2.js.map → chunk-KZEANWJS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BFJP4VYC.js → chunk-L7BH7IWU.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-2UCG5H6B.js → chunk-LPEYZRUR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FQF6VVPH.js → chunk-MYSS5H2A.js} +9 -7
- package/dist/cli-bundle/chunks/{chunk-FQF6VVPH.js.map → chunk-MYSS5H2A.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IR3GOO6E.js → chunk-NHT3F4WZ.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-6BNV3G6C.js → chunk-NLR32VFS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BDC4TW4B.js → chunk-OV7MSW3I.js} +15 -13
- package/dist/cli-bundle/chunks/chunk-OV7MSW3I.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EI3UIMZM.js → chunk-OWXOPDHD.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-P7JTWYLH.js +246 -0
- package/dist/cli-bundle/chunks/chunk-P7JTWYLH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AQUNTB7G.js → chunk-PEQGTJ5Q.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QFG4MB7P.js → chunk-POG76WWZ.js} +28 -7
- package/dist/cli-bundle/chunks/chunk-POG76WWZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MI3346YW.js → chunk-QANSTTC7.js} +129 -170
- package/dist/cli-bundle/chunks/chunk-QANSTTC7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-T6MOTLOJ.js → chunk-QJKL5PHS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SBW7EQC4.js → chunk-QLZ643FM.js} +76 -13
- package/dist/cli-bundle/chunks/chunk-QLZ643FM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-XKVHL3MB.js → chunk-QWRVBJ4D.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-R3EWPG4A.js +106 -0
- package/dist/cli-bundle/chunks/chunk-R3EWPG4A.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-R5U2VZ3K.js +344 -0
- package/dist/cli-bundle/chunks/chunk-R5U2VZ3K.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VFA5EIEN.js → chunk-R7QV7ICM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-NPEYH6CE.js → chunk-RDV4ZFYS.js} +12 -10
- package/dist/cli-bundle/chunks/{chunk-NPEYH6CE.js.map → chunk-RDV4ZFYS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-K2L6FZBX.js → chunk-RJO3YAFM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YIC5NGXF.js → chunk-RMF7LMBS.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-YIC5NGXF.js.map → chunk-RMF7LMBS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MRXAHR4B.js → chunk-RZJLNXFG.js} +50 -13
- package/dist/cli-bundle/chunks/chunk-RZJLNXFG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-DJAGYYCQ.js → chunk-SC2HMDGB.js} +19 -3
- package/dist/cli-bundle/chunks/chunk-SC2HMDGB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SGJB6PXA.js → chunk-SF3DT5HJ.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-SG74J6MV.js +604 -0
- package/dist/cli-bundle/chunks/chunk-SG74J6MV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Q3K5XPAQ.js → chunk-SR3JOATZ.js} +18 -2
- package/dist/cli-bundle/chunks/chunk-SR3JOATZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DUDLSQFG.js → chunk-SSKOQNMS.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-DUDLSQFG.js.map → chunk-SSKOQNMS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-UNNCT5QY.js → chunk-SZVB53Y3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-JBW2S2C6.js → chunk-T44FMVRL.js} +613 -157
- package/dist/cli-bundle/chunks/chunk-T44FMVRL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GFZB5CLP.js → chunk-T6PPNM7V.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-UE7LK3RE.js → chunk-THAOZG4U.js} +9 -7
- package/dist/cli-bundle/chunks/chunk-THAOZG4U.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IGBBTPM5.js → chunk-TOBGV45Y.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-TOBGV45Y.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-W6IEJXNC.js → chunk-TVYYO5A7.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-TYHJDFYW.js +109 -0
- package/dist/cli-bundle/chunks/chunk-TYHJDFYW.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DOASIOQR.js → chunk-UQLXSG72.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IDUTGRDM.js → chunk-URXVHN3L.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-URXVHN3L.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7CHWLT2J.js → chunk-UVN66B3M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q6JPYR7I.js → chunk-UX6SSO2I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JPWUZOMR.js → chunk-UZDQXNUB.js} +75 -20
- package/dist/cli-bundle/chunks/chunk-UZDQXNUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OK7VSX3N.js → chunk-UZLJOEAC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-4PSJVGRE.js → chunk-VDO2JMD4.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-IRJ6F23W.js → chunk-VQIHNHMJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FQODDTE7.js → chunk-WUVEBQW6.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-FQODDTE7.js.map → chunk-WUVEBQW6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Q4PSG2GV.js → chunk-WVA4DVNV.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-Q4PSG2GV.js.map → chunk-WVA4DVNV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4M6RZJXF.js → chunk-WWNL6WMH.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-WWNL6WMH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3KPNOZOH.js → chunk-X6K5XTTN.js} +78 -21
- package/dist/cli-bundle/chunks/chunk-X6K5XTTN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-G33XIMRT.js → chunk-XJF7CDNH.js} +17 -10
- package/dist/cli-bundle/chunks/{chunk-G33XIMRT.js.map → chunk-XJF7CDNH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-AR24KW26.js → chunk-YBT7O4KT.js} +17 -112
- package/dist/cli-bundle/chunks/chunk-YBT7O4KT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CZA2DXCV.js → chunk-YQQNAKW3.js} +17 -105
- package/dist/cli-bundle/chunks/chunk-YQQNAKW3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OKPZDH43.js → chunk-YQWCZ5AC.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-OKPZDH43.js.map → chunk-YQWCZ5AC.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LT5UWU7H.js → chunk-ZOJ3LR7O.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3HSRP6T2.js → chunk-ZOY5K4D3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XXWDEQ6O.js → chunk-ZV2NTVMJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-UW6HCMP2.js → chunk-ZYPFOO3L.js} +9 -9
- package/dist/cli-bundle/chunks/close-O5QVZ6ET.js +12 -0
- package/dist/cli-bundle/chunks/{close-7NWA3GLA.js → close-QEMOYZN3.js} +5 -5
- package/dist/cli-bundle/chunks/close-many-SDA426VT.js +24 -0
- package/dist/cli-bundle/chunks/{close-many-YALQ7AXS.js → close-many-UTZANOCQ.js} +15 -14
- package/dist/cli-bundle/chunks/{comments-SQIQ5WYR.js → comments-LZN6FXXC.js} +7 -7
- package/dist/cli-bundle/chunks/comments-VBQ345ND.js +13 -0
- package/dist/cli-bundle/chunks/{copy-YDAMENCP.js → copy-DKTSSCK7.js} +4 -4
- package/dist/cli-bundle/chunks/copy-M7DDI6LS.js +9 -0
- package/dist/cli-bundle/chunks/{create-JSL6CXU3.js → create-GG4RBCGC.js} +11 -11
- package/dist/cli-bundle/chunks/create-JBC5KUW6.js +29 -0
- package/dist/cli-bundle/chunks/{delete-IGVOZEU2.js → delete-LCS3VPDH.js} +4 -4
- package/dist/cli-bundle/chunks/delete-MD7YXQLH.js +10 -0
- package/dist/cli-bundle/chunks/{deps-BQAXUQAK.js → deps-DELOO4TL.js} +6 -6
- package/dist/cli-bundle/chunks/{deps-CBPPSS6J.js → deps-FI4O6NQS.js} +6 -6
- package/dist/cli-bundle/chunks/docs-2UYBP5D6.js +14 -0
- package/dist/cli-bundle/chunks/{docs-NS2AZWCN.js → docs-6Z2MP526.js} +6 -6
- package/dist/cli-bundle/chunks/{files-XUUBQ76I.js → files-HEUGSJZL.js} +6 -6
- package/dist/cli-bundle/chunks/{files-PVWEPT5J.js → files-HKEAN5MA.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-DHBHKK3E.js → focus-7SOUT5PZ.js} +5 -5
- package/dist/cli-bundle/chunks/focus-DRQ6FQH6.js +10 -0
- package/dist/cli-bundle/chunks/history-compact-65YVN5DB.js +17 -0
- package/dist/cli-bundle/chunks/{history-compact-3TNPYVFG.js → history-compact-7NDVP3PT.js} +7 -6
- package/dist/cli-bundle/chunks/{history-redact-KKFDICCF.js → history-redact-7YBL4XSG.js} +5 -4
- package/dist/cli-bundle/chunks/{history-redact-ELRL73XN.js → history-redact-IZGNJBU4.js} +5 -4
- package/dist/cli-bundle/chunks/{history-repair-J7WKZFAG.js → history-repair-7M4PYQUH.js} +8 -6
- package/dist/cli-bundle/chunks/history-repair-GNGETJLI.js +18 -0
- package/dist/cli-bundle/chunks/learnings-3YXDRWFT.js +13 -0
- package/dist/cli-bundle/chunks/{learnings-X4D6JCCG.js → learnings-ALC6IMNL.js} +7 -7
- package/dist/cli-bundle/chunks/notes-7JMLQ447.js +13 -0
- package/dist/cli-bundle/chunks/{notes-UQC6VS6N.js → notes-JFCLTC5C.js} +7 -7
- package/dist/cli-bundle/chunks/plan-KOIPWVOZ.js +26 -0
- package/dist/cli-bundle/chunks/{plan-5GKRBJJO.js → plan-T3XB3WTK.js} +12 -12
- package/dist/cli-bundle/chunks/{profile-5PQAPCLF.js → profile-OILJHKUW.js} +12 -11
- package/dist/cli-bundle/chunks/{profile-CW4BD3FO.js → profile-RJXA7PGS.js} +12 -11
- package/dist/cli-bundle/chunks/{register-list-query-PHIPDFP2.js → register-list-query-CFVG75P3.js} +30 -21
- package/dist/cli-bundle/chunks/{register-list-query-PHIPDFP2.js.map → register-list-query-CFVG75P3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-list-query-HTDQE6VI.js → register-list-query-E7UVY4TN.js} +29 -20
- package/dist/cli-bundle/chunks/{register-list-query-HTDQE6VI.js.map → register-list-query-E7UVY4TN.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-BLEWM5I6.js → register-mutation-4VJTXBZW.js} +86 -32
- package/dist/cli-bundle/chunks/register-mutation-4VJTXBZW.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-OTYHR7J6.js → register-mutation-IQ55E25C.js} +78 -33
- package/dist/cli-bundle/chunks/register-mutation-IQ55E25C.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-AMCUFYEW.js → register-operations-AR7RMX4W.js} +42 -38
- package/dist/cli-bundle/chunks/register-operations-AR7RMX4W.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-MRLHOZYR.js → register-operations-NOLZGORC.js} +41 -37
- package/dist/cli-bundle/chunks/register-operations-NOLZGORC.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-ZVKTDL4G.js → register-setup-BB77VUEE.js} +17 -16
- package/dist/cli-bundle/chunks/{register-setup-ZVKTDL4G.js.map → register-setup-BB77VUEE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-N2FOSWAG.js → register-setup-EYZ7VTPZ.js} +15 -14
- package/dist/cli-bundle/chunks/{register-setup-N2FOSWAG.js.map → register-setup-EYZ7VTPZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/restore-L6IAGOD7.js +15 -0
- package/dist/cli-bundle/chunks/{restore-HEQAG6EK.js → restore-ZH65GZFB.js} +7 -6
- package/dist/cli-bundle/chunks/{schema-Q5DAWJ2S.js → schema-4ERWM5QJ.js} +7 -6
- package/dist/cli-bundle/chunks/{schema-MAXAIHEC.js → schema-55DL3Q52.js} +7 -6
- package/dist/cli-bundle/chunks/{update-DWFXXJKP.js → update-FW6FKDOP.js} +15 -15
- package/dist/cli-bundle/chunks/update-TJHSPRPT.js +23 -0
- package/dist/cli-bundle/chunks/update-many-NNALYQCN.js +35 -0
- package/dist/cli-bundle/chunks/update-many-PWXX5WHO.js +39 -0
- package/dist/cli-bundle/main.js +62 -59
- package/dist/cli-bundle/main.js.map +1 -1
- package/dist/cli-bundle/sdk-runtime.js +62 -59
- package/dist/cli-bundle/sdk-testing.js +8 -8
- package/dist/cli-bundle/sdk.js +327 -57
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/core/config/nested-settings.d.ts +2 -0
- package/dist/core/config/nested-settings.js +18 -2
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +38 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +1 -1
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/item/id.d.ts +19 -2
- package/dist/core/item/id.js +27 -6
- package/dist/core/item/id.js.map +1 -1
- package/dist/core/item/parse.d.ts +7 -0
- package/dist/core/item/parse.js +48 -2
- package/dist/core/item/parse.js.map +1 -1
- package/dist/core/schema/item-types-file.d.ts +2 -2
- package/dist/core/schema/item-types-file.js +2 -2
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-schema.d.ts +3 -3
- package/dist/core/schema/runtime-schema.js +2 -2
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/type-workflows.d.ts +2 -2
- package/dist/core/schema/type-workflows.js +2 -2
- package/dist/core/schema/type-workflows.js.map +1 -1
- package/dist/core/shared/constants.js +5 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +4 -0
- package/dist/core/store/settings-validator.js +8 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +8 -2
- package/dist/core/store/settings.js.map +1 -1
- package/dist/sdk/annotations.js +24 -2
- package/dist/sdk/annotations.js.map +1 -1
- package/dist/sdk/cli-bootstrap.d.ts +1 -1
- package/dist/sdk/cli-bootstrap.js +3 -3
- package/dist/sdk/cli-bootstrap.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +22 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +3 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +17 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +512 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +21 -11
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +13 -3
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -0
- package/dist/sdk/cli-contracts/tool-schema.js +14 -10
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +69 -0
- package/dist/sdk/cli-contracts/typed-action-inputs.js +5 -0
- package/dist/sdk/cli-contracts/typed-action-inputs.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +4 -3
- package/dist/sdk/cli-contracts.js +5 -5
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/extension/describe.d.ts +1 -1
- package/dist/sdk/extension/describe.js +2 -2
- package/dist/sdk/extension/describe.js.map +1 -1
- package/dist/sdk/extension/install-runtime.js +5 -3
- package/dist/sdk/extension/install-runtime.js.map +1 -1
- package/dist/sdk/extension.d.ts +2 -2
- package/dist/sdk/extension.js +2 -2
- package/dist/sdk/extension.js.map +1 -1
- package/dist/sdk/governance/gc.d.ts +14 -1
- package/dist/sdk/governance/gc.js +38 -2
- package/dist/sdk/governance/gc.js.map +1 -1
- package/dist/sdk/governance/storage-integrity.d.ts +84 -0
- package/dist/sdk/governance/storage-integrity.js +240 -0
- package/dist/sdk/governance/storage-integrity.js.map +1 -0
- package/dist/sdk/governance/validate.d.ts +3 -1
- package/dist/sdk/governance/validate.js +56 -2
- package/dist/sdk/governance/validate.js.map +1 -1
- package/dist/sdk/history-read.d.ts +1 -1
- package/dist/sdk/history-read.js +2 -2
- package/dist/sdk/history-read.js.map +1 -1
- package/dist/sdk/history-repair.d.ts +36 -0
- package/dist/sdk/history-repair.js +69 -4
- package/dist/sdk/history-repair.js.map +1 -1
- package/dist/sdk/index.d.ts +5 -2
- package/dist/sdk/index.js +5 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/init.js +3 -3
- package/dist/sdk/init.js.map +1 -1
- package/dist/sdk/item-transaction.d.ts +131 -0
- package/dist/sdk/item-transaction.js +280 -0
- package/dist/sdk/item-transaction.js.map +1 -0
- package/dist/sdk/merge/driver.d.ts +75 -0
- package/dist/sdk/merge/driver.js +166 -0
- package/dist/sdk/merge/driver.js.map +1 -0
- package/dist/sdk/merge/index.d.ts +11 -0
- package/dist/sdk/merge/index.js +15 -0
- package/dist/sdk/merge/index.js.map +1 -0
- package/dist/sdk/merge/install.d.ts +90 -0
- package/dist/sdk/merge/install.js +318 -0
- package/dist/sdk/merge/install.js.map +1 -0
- package/dist/sdk/merge/three-way.d.ts +126 -0
- package/dist/sdk/merge/three-way.js +545 -0
- package/dist/sdk/merge/three-way.js.map +1 -0
- package/dist/sdk/query/list.d.ts +19 -2
- package/dist/sdk/query/list.js +5 -2
- package/dist/sdk/query/list.js.map +1 -1
- package/dist/sdk/runtime.d.ts +17 -14
- package/dist/sdk/runtime.js +5 -5
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/schema.d.ts +2 -2
- package/dist/sdk/schema.js +29 -2
- package/dist/sdk/schema.js.map +1 -1
- package/dist/sdk/stats.d.ts +1 -1
- package/dist/sdk/stats.js +2 -2
- package/dist/sdk/stats.js.map +1 -1
- package/dist/sdk/workspace-transaction-gc.d.ts +46 -0
- package/dist/sdk/workspace-transaction-gc.js +155 -0
- package/dist/sdk/workspace-transaction-gc.js.map +1 -0
- package/dist/sdk/workspace.d.ts +28 -4
- package/dist/sdk/workspace.js +61 -15
- package/dist/sdk/workspace.js.map +1 -1
- package/dist/types.d.ts +11 -7
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +58 -47
- package/docs/COMMANDS.md +7 -0
- package/docs/CONFIGURATION.md +2 -0
- package/docs/MERGE_SAFETY.md +99 -0
- package/docs/README.md +1 -0
- package/docs/SDK.md +56 -0
- package/marketplace.json +2 -2
- package/package.json +3 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/dist/cli-bundle/chunks/append-XUYF7NON.js +0 -11
- package/dist/cli-bundle/chunks/chunk-2XPDCXK5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3EZZTFL2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3KPNOZOH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-46Z6FAVP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4M6RZJXF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6V4T4RD3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-A3GAQLBH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-A4FVWFZY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-A5EQPNV7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AR24KW26.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BBGR4FKQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BDC4TW4B.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BZKE2O5V.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CZA2DXCV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-D35WYXWC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DJAGYYCQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EEECAV5M.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-H3YKUVDR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IDUTGRDM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IGBBTPM5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JBW2S2C6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JPWUZOMR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KAE727L2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MI3346YW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MQOSMBWV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MRXAHR4B.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N2TEEOXJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ODEIDKGW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-P24ZU5QV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Q3K5XPAQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QFG4MB7P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RLLOZAM2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RWAIRGBC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SBW7EQC4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SVAWG7EE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UE7LK3RE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VA3H7VVC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WCBB6VI3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Y2VSGFT4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YG56M3NE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZF52NVRT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZUCBPXNA.js.map +0 -7
- package/dist/cli-bundle/chunks/close-ZZCDDWJT.js +0 -12
- package/dist/cli-bundle/chunks/close-many-QCZHFCON.js +0 -23
- package/dist/cli-bundle/chunks/comments-FMQNYPSZ.js +0 -13
- package/dist/cli-bundle/chunks/copy-GI3RCVZP.js +0 -9
- package/dist/cli-bundle/chunks/create-LXMLYJNM.js +0 -29
- package/dist/cli-bundle/chunks/delete-5DFAXJNI.js +0 -10
- package/dist/cli-bundle/chunks/docs-KCWPLQOV.js +0 -14
- package/dist/cli-bundle/chunks/focus-3EJVFI3D.js +0 -10
- package/dist/cli-bundle/chunks/history-compact-JHYVDYLW.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-REMI7DDI.js +0 -16
- package/dist/cli-bundle/chunks/learnings-O6V5WDCV.js +0 -13
- package/dist/cli-bundle/chunks/notes-ZSZREWZA.js +0 -13
- package/dist/cli-bundle/chunks/plan-EZW2YDDY.js +0 -26
- package/dist/cli-bundle/chunks/register-mutation-BLEWM5I6.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-OTYHR7J6.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-AMCUFYEW.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-MRLHOZYR.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-A55MLFAI.js +0 -14
- package/dist/cli-bundle/chunks/update-5DTSCWVF.js +0 -23
- package/dist/cli-bundle/chunks/update-many-6T4ZLZS7.js +0 -34
- package/dist/cli-bundle/chunks/update-many-MYRK6VBJ.js +0 -38
- /package/dist/cli-bundle/chunks/{append-MBXHNWSX.js.map → append-E6V54WOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-XUYF7NON.js.map → append-NNJ3EFIT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YGEA4CLH.js.map → chunk-3MCTMJXI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N7FCFJ76.js.map → chunk-3P7UJQOX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7B7IHMLH.js.map → chunk-3VY6MIEO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5S6IZXK7.js.map → chunk-4U4Z6AHI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UOIFZ66L.js.map → chunk-4XGJLADW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SUNZKVAH.js.map → chunk-5IZJWSDB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QQ77W23U.js.map → chunk-5NTE36LD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KGPLSHJD.js.map → chunk-6C2ZZX5Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q5NHJ6RO.js.map → chunk-6JUTHVQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NTS2RKHN.js.map → chunk-6VIJ7UA5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XVB6BATY.js.map → chunk-72LQ4TKV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KZ5AC6B5.js.map → chunk-7WCE6Y64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VQOG2ETB.js.map → chunk-AF2CCM5U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EAV3P54W.js.map → chunk-DAQ45GCS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RX53WHFI.js.map → chunk-EJDGV4GR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IXG5CMBR.js.map → chunk-FDHPAVVB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-V4QHAMI5.js.map → chunk-GROYI4RB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-77XFQRTD.js.map → chunk-GSJSM5BJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QYGK2XQ3.js.map → chunk-GTLCVJOE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VSQE43NO.js.map → chunk-GV2262OF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-STBCBDKF.js.map → chunk-HCEBZNC3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-U6RYD446.js.map → chunk-HRW7GF6T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XDWXPG2E.js.map → chunk-IAQE32BI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-66SRNEBK.js.map → chunk-IJNK6WW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AGEBQRBG.js.map → chunk-JAPE62Y5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UWAQI3B7.js.map → chunk-JGUKMMRS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UU6EP25G.js.map → chunk-JH2ZSLO3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GRDK25BN.js.map → chunk-JHJSFOAM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FQO5THHM.js.map → chunk-JM6YAXTR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E7KBMWEF.js.map → chunk-JSLT7WVE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FIUTBFC6.js.map → chunk-K4CI6Y45.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IEMXESIS.js.map → chunk-KSPWRNVP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BFJP4VYC.js.map → chunk-L7BH7IWU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2UCG5H6B.js.map → chunk-LPEYZRUR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IR3GOO6E.js.map → chunk-NHT3F4WZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6BNV3G6C.js.map → chunk-NLR32VFS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EI3UIMZM.js.map → chunk-OWXOPDHD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AQUNTB7G.js.map → chunk-PEQGTJ5Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T6MOTLOJ.js.map → chunk-QJKL5PHS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XKVHL3MB.js.map → chunk-QWRVBJ4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VFA5EIEN.js.map → chunk-R7QV7ICM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K2L6FZBX.js.map → chunk-RJO3YAFM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SGJB6PXA.js.map → chunk-SF3DT5HJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UNNCT5QY.js.map → chunk-SZVB53Y3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GFZB5CLP.js.map → chunk-T6PPNM7V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W6IEJXNC.js.map → chunk-TVYYO5A7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DOASIOQR.js.map → chunk-UQLXSG72.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7CHWLT2J.js.map → chunk-UVN66B3M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q6JPYR7I.js.map → chunk-UX6SSO2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OK7VSX3N.js.map → chunk-UZLJOEAC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4PSJVGRE.js.map → chunk-VDO2JMD4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IRJ6F23W.js.map → chunk-VQIHNHMJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LT5UWU7H.js.map → chunk-ZOJ3LR7O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3HSRP6T2.js.map → chunk-ZOY5K4D3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XXWDEQ6O.js.map → chunk-ZV2NTVMJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UW6HCMP2.js.map → chunk-ZYPFOO3L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-ZZCDDWJT.js.map → close-O5QVZ6ET.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-7NWA3GLA.js.map → close-QEMOYZN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-QCZHFCON.js.map → close-many-SDA426VT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-YALQ7AXS.js.map → close-many-UTZANOCQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-SQIQ5WYR.js.map → comments-LZN6FXXC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-FMQNYPSZ.js.map → comments-VBQ345ND.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-YDAMENCP.js.map → copy-DKTSSCK7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-GI3RCVZP.js.map → copy-M7DDI6LS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-JSL6CXU3.js.map → create-GG4RBCGC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-LXMLYJNM.js.map → create-JBC5KUW6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-IGVOZEU2.js.map → delete-LCS3VPDH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-5DFAXJNI.js.map → delete-MD7YXQLH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-BQAXUQAK.js.map → deps-DELOO4TL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-CBPPSS6J.js.map → deps-FI4O6NQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-KCWPLQOV.js.map → docs-2UYBP5D6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-NS2AZWCN.js.map → docs-6Z2MP526.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-XUUBQ76I.js.map → files-HEUGSJZL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-PVWEPT5J.js.map → files-HKEAN5MA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-DHBHKK3E.js.map → focus-7SOUT5PZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-3EJVFI3D.js.map → focus-DRQ6FQH6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-JHYVDYLW.js.map → history-compact-65YVN5DB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-3TNPYVFG.js.map → history-compact-7NDVP3PT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-KKFDICCF.js.map → history-redact-7YBL4XSG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-ELRL73XN.js.map → history-redact-IZGNJBU4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-J7WKZFAG.js.map → history-repair-7M4PYQUH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-REMI7DDI.js.map → history-repair-GNGETJLI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-O6V5WDCV.js.map → learnings-3YXDRWFT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-X4D6JCCG.js.map → learnings-ALC6IMNL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-ZSZREWZA.js.map → notes-7JMLQ447.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-UQC6VS6N.js.map → notes-JFCLTC5C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-EZW2YDDY.js.map → plan-KOIPWVOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-5GKRBJJO.js.map → plan-T3XB3WTK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-5PQAPCLF.js.map → profile-OILJHKUW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-CW4BD3FO.js.map → profile-RJXA7PGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-A55MLFAI.js.map → restore-L6IAGOD7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-HEQAG6EK.js.map → restore-ZH65GZFB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-Q5DAWJ2S.js.map → schema-4ERWM5QJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-MAXAIHEC.js.map → schema-55DL3Q52.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-DWFXXJKP.js.map → update-FW6FKDOP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-5DTSCWVF.js.map → update-TJHSPRPT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-6T4ZLZS7.js.map → update-many-NNALYQCN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-MYRK6VBJ.js.map → update-many-PWXX5WHO.js.map} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runUpdate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AOEOYL3S.js";
|
|
4
4
|
import {
|
|
5
5
|
buildCapabilityContractMetadata,
|
|
6
6
|
buildRegistrationCollisionRemediation,
|
|
7
7
|
collectUnknownCapabilityGuidance,
|
|
8
8
|
readManagedExtensionState,
|
|
9
9
|
runInit
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-E7ICD63T.js";
|
|
11
11
|
import {
|
|
12
12
|
collectStaleVectorizationIds,
|
|
13
13
|
runNext
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YBT7O4KT.js";
|
|
15
15
|
import {
|
|
16
16
|
buildVectorizationEmbeddingIdentity,
|
|
17
17
|
hasVectorizationEmbeddingIdentityChanged,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
resolveProviderConfigSource,
|
|
22
22
|
resolveSettingsWithSemanticRuntimeDefaults,
|
|
23
23
|
resolveVectorStores
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GVI6FAFG.js";
|
|
25
25
|
import {
|
|
26
26
|
scanHistoryDrift
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-L7BH7IWU.js";
|
|
28
28
|
import {
|
|
29
29
|
ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
30
30
|
ACTIVITY_FLAG_CONTRACTS,
|
|
@@ -81,6 +81,7 @@ import {
|
|
|
81
81
|
LEARNINGS_FLAG_CONTRACTS,
|
|
82
82
|
LIST_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
83
83
|
LIST_FILTER_FLAG_CONTRACTS,
|
|
84
|
+
MERGE_FLAG_CONTRACTS,
|
|
84
85
|
NEXT_FLAG_CONTRACTS,
|
|
85
86
|
NOTES_FLAG_CONTRACTS,
|
|
86
87
|
PACKAGE_FLAG_CONTRACTS,
|
|
@@ -116,10 +117,13 @@ import {
|
|
|
116
117
|
UPGRADE_FLAG_CONTRACTS,
|
|
117
118
|
VALIDATE_FLAG_CONTRACTS,
|
|
118
119
|
compactFlagAliasContracts
|
|
119
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-HEWM6CEN.js";
|
|
121
|
+
import {
|
|
122
|
+
auditMergeAttributeFence
|
|
123
|
+
} from "./chunk-R5U2VZ3K.js";
|
|
120
124
|
import {
|
|
121
125
|
wrapOwnershipConflict
|
|
122
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-HQ3SB4CN.js";
|
|
123
127
|
import {
|
|
124
128
|
LINKED_TEST_PM_CONTEXT_MODE_VALUES,
|
|
125
129
|
LINKED_TEST_PROTECTED_ENV_KEYS,
|
|
@@ -136,38 +140,38 @@ import {
|
|
|
136
140
|
parseLinkedTestRegexList,
|
|
137
141
|
parseLinkedTestStringList,
|
|
138
142
|
runCreate
|
|
139
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-KZEANWJS.js";
|
|
140
144
|
import {
|
|
141
145
|
collectDanglingDependencyReferences
|
|
142
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-IJNK6WW2.js";
|
|
143
147
|
import {
|
|
144
148
|
runDocs
|
|
145
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-UX6SSO2I.js";
|
|
146
150
|
import {
|
|
147
151
|
runFiles
|
|
148
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-FDHPAVVB.js";
|
|
149
153
|
import {
|
|
150
154
|
isRemoteLinkedArtifactReference
|
|
151
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-RJO3YAFM.js";
|
|
152
156
|
import {
|
|
153
157
|
createStdinTokenResolver,
|
|
154
158
|
parseCsvKv,
|
|
155
159
|
parseOptionalNumber
|
|
156
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-GVT754PX.js";
|
|
157
161
|
import {
|
|
158
162
|
computeContentFieldUtilization
|
|
159
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-RMF7LMBS.js";
|
|
160
164
|
import {
|
|
161
165
|
computeMetadataCoverage,
|
|
162
166
|
groupItemsByDimension,
|
|
163
167
|
lifecycleClassifierFromStatusRegistry
|
|
164
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-3P7UJQOX.js";
|
|
165
169
|
import {
|
|
166
170
|
parseLimit
|
|
167
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-UVN66B3M.js";
|
|
168
172
|
import {
|
|
169
173
|
readHistoryEntries
|
|
170
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-C3KD7U3T.js";
|
|
171
175
|
import {
|
|
172
176
|
resolveAuthor
|
|
173
177
|
} from "./chunk-YRYYFGV3.js";
|
|
@@ -197,7 +201,7 @@ import {
|
|
|
197
201
|
stableValueEquals,
|
|
198
202
|
toItemRecord,
|
|
199
203
|
writeSettings
|
|
200
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-IY6VZ3IW.js";
|
|
201
205
|
import {
|
|
202
206
|
DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS,
|
|
203
207
|
DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS,
|
|
@@ -244,7 +248,7 @@ import {
|
|
|
244
248
|
statusIsTerminal,
|
|
245
249
|
toNonEmptyStringOrUndefined,
|
|
246
250
|
writeFileAtomic
|
|
247
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-7AVEY74G.js";
|
|
248
252
|
|
|
249
253
|
// dist/core/telemetry/observability.js
|
|
250
254
|
!(function() {
|
|
@@ -2800,7 +2804,7 @@ function buildMcpToolContracts() {
|
|
|
2800
2804
|
!(function() {
|
|
2801
2805
|
try {
|
|
2802
2806
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
2803
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
2807
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e2a3f9a4-25be-548f-aadd-df720e43f41c");
|
|
2804
2808
|
} catch (e2) {
|
|
2805
2809
|
}
|
|
2806
2810
|
})();
|
|
@@ -2992,6 +2996,7 @@ var CORE_COMMAND_FLAG_CONTRACT_ENTRIES = [
|
|
|
2992
2996
|
["history-compact", HISTORY_COMPACT_FLAG_CONTRACTS],
|
|
2993
2997
|
["history-redact", HISTORY_REDACT_FLAG_CONTRACTS],
|
|
2994
2998
|
["history-repair", HISTORY_REPAIR_FLAG_CONTRACTS],
|
|
2999
|
+
["merge", MERGE_FLAG_CONTRACTS],
|
|
2995
3000
|
["schema", SCHEMA_FLAG_CONTRACTS],
|
|
2996
3001
|
["profile", PROFILE_FLAG_CONTRACTS],
|
|
2997
3002
|
["plan", PLAN_FLAG_CONTRACTS],
|
|
@@ -4303,13 +4308,147 @@ function runRemind(title, options, global2) {
|
|
|
4303
4308
|
return runCreate(createOptions, global2);
|
|
4304
4309
|
}
|
|
4305
4310
|
|
|
4311
|
+
// dist/sdk/workspace-transaction-gc.js
|
|
4312
|
+
import fs from "node:fs/promises";
|
|
4313
|
+
import path2 from "node:path";
|
|
4314
|
+
!(function() {
|
|
4315
|
+
try {
|
|
4316
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
4317
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b27c5042-bbfb-5427-a76b-084acd5e06de");
|
|
4318
|
+
} catch (e2) {
|
|
4319
|
+
}
|
|
4320
|
+
})();
|
|
4321
|
+
var MILLISECONDS_PER_DAY2 = 24 * 60 * 60 * 1e3;
|
|
4322
|
+
var TERMINAL_JOURNAL_STATUSES = /* @__PURE__ */ new Set(["committed", "compensated"]);
|
|
4323
|
+
function isErrno(error, code) {
|
|
4324
|
+
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
4325
|
+
}
|
|
4326
|
+
function readJournalStatusAndTimestamp(raw) {
|
|
4327
|
+
let parsed;
|
|
4328
|
+
try {
|
|
4329
|
+
parsed = JSON.parse(raw);
|
|
4330
|
+
} catch {
|
|
4331
|
+
return { status: null, updatedAt: null };
|
|
4332
|
+
}
|
|
4333
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
4334
|
+
return { status: null, updatedAt: null };
|
|
4335
|
+
}
|
|
4336
|
+
const record = parsed;
|
|
4337
|
+
return {
|
|
4338
|
+
status: typeof record.status === "string" ? record.status : null,
|
|
4339
|
+
updatedAt: typeof record.updatedAt === "string" ? record.updatedAt : null
|
|
4340
|
+
};
|
|
4341
|
+
}
|
|
4342
|
+
function classifyWorkspaceTransactionJournal(file, status, updatedAt, nowMs2, retentionMs) {
|
|
4343
|
+
const updatedAtMs = updatedAt === null ? Number.NaN : Date.parse(updatedAt);
|
|
4344
|
+
if (status === null || !Number.isFinite(updatedAtMs)) {
|
|
4345
|
+
return {
|
|
4346
|
+
entry: {
|
|
4347
|
+
file,
|
|
4348
|
+
status,
|
|
4349
|
+
age_seconds: null,
|
|
4350
|
+
stale: false,
|
|
4351
|
+
reason: "unparseable"
|
|
4352
|
+
},
|
|
4353
|
+
remove: false
|
|
4354
|
+
};
|
|
4355
|
+
}
|
|
4356
|
+
const ageMs = nowMs2 - updatedAtMs;
|
|
4357
|
+
if (!TERMINAL_JOURNAL_STATUSES.has(status)) {
|
|
4358
|
+
return {
|
|
4359
|
+
entry: {
|
|
4360
|
+
file,
|
|
4361
|
+
status,
|
|
4362
|
+
age_seconds: Math.floor(ageMs / 1e3),
|
|
4363
|
+
stale: false,
|
|
4364
|
+
reason: "active"
|
|
4365
|
+
},
|
|
4366
|
+
remove: false
|
|
4367
|
+
};
|
|
4368
|
+
}
|
|
4369
|
+
if (!(ageMs > retentionMs)) {
|
|
4370
|
+
return {
|
|
4371
|
+
entry: {
|
|
4372
|
+
file,
|
|
4373
|
+
status,
|
|
4374
|
+
age_seconds: Math.floor(ageMs / 1e3),
|
|
4375
|
+
stale: false,
|
|
4376
|
+
reason: "fresh"
|
|
4377
|
+
},
|
|
4378
|
+
remove: false
|
|
4379
|
+
};
|
|
4380
|
+
}
|
|
4381
|
+
return {
|
|
4382
|
+
entry: {
|
|
4383
|
+
file,
|
|
4384
|
+
status,
|
|
4385
|
+
age_seconds: Math.floor(ageMs / 1e3),
|
|
4386
|
+
stale: true
|
|
4387
|
+
},
|
|
4388
|
+
remove: true
|
|
4389
|
+
};
|
|
4390
|
+
}
|
|
4391
|
+
async function processWorkspaceTransactionJournal(absolutePath, relativePath, fileName, options) {
|
|
4392
|
+
const warnings = options.hooks?.onRead ? await options.hooks.onRead(absolutePath) : [];
|
|
4393
|
+
const journal = readJournalStatusAndTimestamp(await fs.readFile(absolutePath, "utf8"));
|
|
4394
|
+
const decision = classifyWorkspaceTransactionJournal(relativePath, journal.status, journal.updatedAt, options.nowMs, options.retentionMs);
|
|
4395
|
+
if (decision.entry.reason === "unparseable") {
|
|
4396
|
+
warnings.push(`transaction_journal_unparseable:${fileName}`);
|
|
4397
|
+
}
|
|
4398
|
+
if (decision.remove && !options.dryRun) {
|
|
4399
|
+
await fs.rm(absolutePath, { force: true });
|
|
4400
|
+
if (options.hooks?.onWrite) {
|
|
4401
|
+
warnings.push(...await options.hooks.onWrite(absolutePath));
|
|
4402
|
+
}
|
|
4403
|
+
}
|
|
4404
|
+
return { decision, warnings };
|
|
4405
|
+
}
|
|
4406
|
+
async function runWorkspaceTransactionGc(pmRoot, options) {
|
|
4407
|
+
const { dryRun, hooks } = options;
|
|
4408
|
+
const nowMs2 = options.now ?? Date.now();
|
|
4409
|
+
const retentionMs = Math.max(0, options.retentionDays) * MILLISECONDS_PER_DAY2;
|
|
4410
|
+
const journalsDir = path2.join(pmRoot, "transactions", "sdk");
|
|
4411
|
+
const result = {
|
|
4412
|
+
scanned: 0,
|
|
4413
|
+
removed: [],
|
|
4414
|
+
retained: [],
|
|
4415
|
+
warnings: [],
|
|
4416
|
+
entries: []
|
|
4417
|
+
};
|
|
4418
|
+
let files;
|
|
4419
|
+
try {
|
|
4420
|
+
files = (await fs.readdir(journalsDir)).filter((file) => file.endsWith(".json")).sort((left, right) => left.localeCompare(right));
|
|
4421
|
+
} catch (error) {
|
|
4422
|
+
if (isErrno(error, "ENOENT")) {
|
|
4423
|
+
return result;
|
|
4424
|
+
}
|
|
4425
|
+
throw error;
|
|
4426
|
+
}
|
|
4427
|
+
for (const file of files) {
|
|
4428
|
+
const absPath = path2.join(journalsDir, file);
|
|
4429
|
+
const relPath = `transactions/sdk/${file}`;
|
|
4430
|
+
const fileResult = await processWorkspaceTransactionJournal(absPath, relPath, file, { dryRun, hooks, nowMs: nowMs2, retentionMs });
|
|
4431
|
+
result.warnings.push(...fileResult.warnings);
|
|
4432
|
+
result.scanned += 1;
|
|
4433
|
+
const { decision } = fileResult;
|
|
4434
|
+
if (!decision.remove) {
|
|
4435
|
+
result.retained.push(relPath);
|
|
4436
|
+
result.entries.push(decision.entry);
|
|
4437
|
+
continue;
|
|
4438
|
+
}
|
|
4439
|
+
result.removed.push(relPath);
|
|
4440
|
+
result.entries.push(decision.entry);
|
|
4441
|
+
}
|
|
4442
|
+
return result;
|
|
4443
|
+
}
|
|
4444
|
+
|
|
4306
4445
|
// dist/sdk/governance/gc.js
|
|
4307
|
-
import
|
|
4308
|
-
import
|
|
4446
|
+
import fs4 from "node:fs/promises";
|
|
4447
|
+
import path5 from "node:path";
|
|
4309
4448
|
|
|
4310
4449
|
// dist/core/checkpoint/checkpoint-gc.js
|
|
4311
|
-
import
|
|
4312
|
-
import
|
|
4450
|
+
import fs2 from "node:fs/promises";
|
|
4451
|
+
import path3 from "node:path";
|
|
4313
4452
|
!(function() {
|
|
4314
4453
|
try {
|
|
4315
4454
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -4317,8 +4456,8 @@ import path2 from "node:path";
|
|
|
4317
4456
|
} catch (e2) {
|
|
4318
4457
|
}
|
|
4319
4458
|
})();
|
|
4320
|
-
var
|
|
4321
|
-
function
|
|
4459
|
+
var MILLISECONDS_PER_DAY3 = 864e5;
|
|
4460
|
+
function isErrno2(error, code) {
|
|
4322
4461
|
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
4323
4462
|
}
|
|
4324
4463
|
function readCheckpointCreatedAt(raw) {
|
|
@@ -4337,9 +4476,9 @@ function readCheckpointCreatedAt(raw) {
|
|
|
4337
4476
|
async function collectCheckpointFiles(checkpointsDir, warnings) {
|
|
4338
4477
|
let dirEntries;
|
|
4339
4478
|
try {
|
|
4340
|
-
dirEntries = await
|
|
4479
|
+
dirEntries = await fs2.readdir(checkpointsDir, { withFileTypes: true });
|
|
4341
4480
|
} catch (error) {
|
|
4342
|
-
if (
|
|
4481
|
+
if (isErrno2(error, "ENOENT")) {
|
|
4343
4482
|
return [];
|
|
4344
4483
|
}
|
|
4345
4484
|
throw error;
|
|
@@ -4347,12 +4486,12 @@ async function collectCheckpointFiles(checkpointsDir, warnings) {
|
|
|
4347
4486
|
const files = [];
|
|
4348
4487
|
for (const entry of dirEntries) {
|
|
4349
4488
|
if (entry.isDirectory()) {
|
|
4350
|
-
const subdir =
|
|
4489
|
+
const subdir = path3.join(checkpointsDir, entry.name);
|
|
4351
4490
|
let nested;
|
|
4352
4491
|
try {
|
|
4353
|
-
nested = await
|
|
4492
|
+
nested = await fs2.readdir(subdir);
|
|
4354
4493
|
} catch (error) {
|
|
4355
|
-
if (!
|
|
4494
|
+
if (!isErrno2(error, "ENOENT")) {
|
|
4356
4495
|
warnings.push(`checkpoint_subdir_unreadable:${entry.name}`);
|
|
4357
4496
|
}
|
|
4358
4497
|
continue;
|
|
@@ -4371,8 +4510,8 @@ async function collectCheckpointFiles(checkpointsDir, warnings) {
|
|
|
4371
4510
|
async function runCheckpointGc(pmRoot, options) {
|
|
4372
4511
|
const { dryRun, hooks } = options;
|
|
4373
4512
|
const nowMs2 = options.now ?? Date.now();
|
|
4374
|
-
const retentionMs = Math.max(0, options.retentionDays) *
|
|
4375
|
-
const checkpointsDir =
|
|
4513
|
+
const retentionMs = Math.max(0, options.retentionDays) * MILLISECONDS_PER_DAY3;
|
|
4514
|
+
const checkpointsDir = path3.join(pmRoot, "checkpoints");
|
|
4376
4515
|
const result = {
|
|
4377
4516
|
scanned: 0,
|
|
4378
4517
|
removed: [],
|
|
@@ -4382,7 +4521,7 @@ async function runCheckpointGc(pmRoot, options) {
|
|
|
4382
4521
|
};
|
|
4383
4522
|
const files = await collectCheckpointFiles(checkpointsDir, result.warnings);
|
|
4384
4523
|
for (const relName of files) {
|
|
4385
|
-
const absPath =
|
|
4524
|
+
const absPath = path3.join(checkpointsDir, relName);
|
|
4386
4525
|
const relPath = `checkpoints/${relName}`;
|
|
4387
4526
|
result.scanned += 1;
|
|
4388
4527
|
if (hooks?.onRead) {
|
|
@@ -4390,9 +4529,9 @@ async function runCheckpointGc(pmRoot, options) {
|
|
|
4390
4529
|
}
|
|
4391
4530
|
let raw;
|
|
4392
4531
|
try {
|
|
4393
|
-
raw = await
|
|
4532
|
+
raw = await fs2.readFile(absPath, "utf8");
|
|
4394
4533
|
} catch (readError) {
|
|
4395
|
-
if (
|
|
4534
|
+
if (isErrno2(readError, "ENOENT")) {
|
|
4396
4535
|
result.scanned -= 1;
|
|
4397
4536
|
continue;
|
|
4398
4537
|
}
|
|
@@ -4436,9 +4575,9 @@ async function runCheckpointGc(pmRoot, options) {
|
|
|
4436
4575
|
}
|
|
4437
4576
|
if (!dryRun) {
|
|
4438
4577
|
try {
|
|
4439
|
-
await
|
|
4578
|
+
await fs2.unlink(absPath);
|
|
4440
4579
|
} catch (unlinkError) {
|
|
4441
|
-
if (!
|
|
4580
|
+
if (!isErrno2(unlinkError, "ENOENT")) {
|
|
4442
4581
|
result.warnings.push(`checkpoint_remove_failed:${relName}`);
|
|
4443
4582
|
result.retained.push(relPath);
|
|
4444
4583
|
result.entries.push(entry);
|
|
@@ -4456,8 +4595,8 @@ async function runCheckpointGc(pmRoot, options) {
|
|
|
4456
4595
|
}
|
|
4457
4596
|
|
|
4458
4597
|
// dist/core/lock/lock-gc.js
|
|
4459
|
-
import
|
|
4460
|
-
import
|
|
4598
|
+
import fs3 from "node:fs/promises";
|
|
4599
|
+
import path4 from "node:path";
|
|
4461
4600
|
!(function() {
|
|
4462
4601
|
try {
|
|
4463
4602
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -4482,7 +4621,7 @@ function parseLock(raw) {
|
|
|
4482
4621
|
}
|
|
4483
4622
|
return { id, owner, created_at, ttl_seconds };
|
|
4484
4623
|
}
|
|
4485
|
-
function
|
|
4624
|
+
function isErrno3(error, code) {
|
|
4486
4625
|
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
4487
4626
|
}
|
|
4488
4627
|
function classifyLockContent(file, raw, nowMs2) {
|
|
@@ -4537,7 +4676,7 @@ function classifyLockContent(file, raw, nowMs2) {
|
|
|
4537
4676
|
}
|
|
4538
4677
|
async function scanLockHealth(pmRoot, now) {
|
|
4539
4678
|
const nowMs2 = now ?? Date.now();
|
|
4540
|
-
const locksDir =
|
|
4679
|
+
const locksDir = path4.join(pmRoot, "locks");
|
|
4541
4680
|
const scan = {
|
|
4542
4681
|
scanned: 0,
|
|
4543
4682
|
active_lock_count: 0,
|
|
@@ -4547,10 +4686,10 @@ async function scanLockHealth(pmRoot, now) {
|
|
|
4547
4686
|
};
|
|
4548
4687
|
let dirEntries;
|
|
4549
4688
|
try {
|
|
4550
|
-
const rawDir = await
|
|
4689
|
+
const rawDir = await fs3.readdir(locksDir);
|
|
4551
4690
|
dirEntries = rawDir.filter((f) => f.endsWith(".lock")).sort();
|
|
4552
4691
|
} catch (error) {
|
|
4553
|
-
if (
|
|
4692
|
+
if (isErrno3(error, "ENOENT")) {
|
|
4554
4693
|
return scan;
|
|
4555
4694
|
}
|
|
4556
4695
|
throw error;
|
|
@@ -4558,9 +4697,9 @@ async function scanLockHealth(pmRoot, now) {
|
|
|
4558
4697
|
for (const file of dirEntries) {
|
|
4559
4698
|
let raw;
|
|
4560
4699
|
try {
|
|
4561
|
-
raw = await
|
|
4700
|
+
raw = await fs3.readFile(path4.join(locksDir, file), "utf8");
|
|
4562
4701
|
} catch (readError) {
|
|
4563
|
-
if (
|
|
4702
|
+
if (isErrno3(readError, "ENOENT")) {
|
|
4564
4703
|
continue;
|
|
4565
4704
|
}
|
|
4566
4705
|
scan.scanned += 1;
|
|
@@ -4582,7 +4721,7 @@ async function scanLockHealth(pmRoot, now) {
|
|
|
4582
4721
|
async function runLockGc(pmRoot, options) {
|
|
4583
4722
|
const { dryRun, hooks } = options;
|
|
4584
4723
|
const nowMs2 = options.now ?? Date.now();
|
|
4585
|
-
const locksDir =
|
|
4724
|
+
const locksDir = path4.join(pmRoot, "locks");
|
|
4586
4725
|
const result = {
|
|
4587
4726
|
scanned: 0,
|
|
4588
4727
|
removed: [],
|
|
@@ -4592,17 +4731,17 @@ async function runLockGc(pmRoot, options) {
|
|
|
4592
4731
|
};
|
|
4593
4732
|
let dirEntries;
|
|
4594
4733
|
try {
|
|
4595
|
-
const raw = await
|
|
4734
|
+
const raw = await fs3.readdir(locksDir);
|
|
4596
4735
|
dirEntries = raw.filter((f) => f.endsWith(".lock")).sort();
|
|
4597
4736
|
} catch (error) {
|
|
4598
|
-
if (
|
|
4737
|
+
if (isErrno3(error, "ENOENT")) {
|
|
4599
4738
|
return result;
|
|
4600
4739
|
}
|
|
4601
4740
|
throw error;
|
|
4602
4741
|
}
|
|
4603
4742
|
for (const file of dirEntries) {
|
|
4604
4743
|
result.scanned += 1;
|
|
4605
|
-
const absPath =
|
|
4744
|
+
const absPath = path4.join(locksDir, file);
|
|
4606
4745
|
const relPath = `locks/${file}`;
|
|
4607
4746
|
if (hooks?.onRead) {
|
|
4608
4747
|
const hookWarnings = await hooks.onRead(absPath);
|
|
@@ -4610,9 +4749,9 @@ async function runLockGc(pmRoot, options) {
|
|
|
4610
4749
|
}
|
|
4611
4750
|
let raw;
|
|
4612
4751
|
try {
|
|
4613
|
-
raw = await
|
|
4752
|
+
raw = await fs3.readFile(absPath, "utf8");
|
|
4614
4753
|
} catch (readError) {
|
|
4615
|
-
if (
|
|
4754
|
+
if (isErrno3(readError, "ENOENT")) {
|
|
4616
4755
|
result.scanned -= 1;
|
|
4617
4756
|
continue;
|
|
4618
4757
|
}
|
|
@@ -4650,9 +4789,9 @@ async function runLockGc(pmRoot, options) {
|
|
|
4650
4789
|
}
|
|
4651
4790
|
if (!dryRun) {
|
|
4652
4791
|
try {
|
|
4653
|
-
await
|
|
4792
|
+
await fs3.unlink(absPath);
|
|
4654
4793
|
} catch (unlinkError) {
|
|
4655
|
-
if (!
|
|
4794
|
+
if (!isErrno3(unlinkError, "ENOENT")) {
|
|
4656
4795
|
result.warnings.push(`lock_remove_failed:${file}`);
|
|
4657
4796
|
result.retained.push(relPath);
|
|
4658
4797
|
result.entries.push(classified.entry);
|
|
@@ -4674,7 +4813,7 @@ async function runLockGc(pmRoot, options) {
|
|
|
4674
4813
|
!(function() {
|
|
4675
4814
|
try {
|
|
4676
4815
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
4677
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
4816
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "de71886f-021a-569d-b39a-a2f2818ee3e9");
|
|
4678
4817
|
} catch (e2) {
|
|
4679
4818
|
}
|
|
4680
4819
|
})();
|
|
@@ -4683,7 +4822,8 @@ var GC_SCOPE_VALUES = [
|
|
|
4683
4822
|
"embeddings",
|
|
4684
4823
|
"runtime",
|
|
4685
4824
|
"locks",
|
|
4686
|
-
"checkpoints"
|
|
4825
|
+
"checkpoints",
|
|
4826
|
+
"transactions"
|
|
4687
4827
|
];
|
|
4688
4828
|
var GC_TARGETS = [
|
|
4689
4829
|
{
|
|
@@ -4732,18 +4872,18 @@ var GC_TARGETS = [
|
|
|
4732
4872
|
kind: "file"
|
|
4733
4873
|
}
|
|
4734
4874
|
];
|
|
4735
|
-
function
|
|
4875
|
+
function isErrno4(error, code) {
|
|
4736
4876
|
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
4737
4877
|
}
|
|
4738
4878
|
async function removeCacheFile(pmRoot, target, dryRun) {
|
|
4739
4879
|
const relativePath = target.relativePath;
|
|
4740
|
-
const absolutePath =
|
|
4880
|
+
const absolutePath = path5.join(pmRoot, relativePath);
|
|
4741
4881
|
const warnings = await runActiveOnReadHooks({
|
|
4742
4882
|
path: absolutePath,
|
|
4743
4883
|
scope: "project"
|
|
4744
4884
|
});
|
|
4745
4885
|
try {
|
|
4746
|
-
const stats = await
|
|
4886
|
+
const stats = await fs4.stat(absolutePath);
|
|
4747
4887
|
if (target.kind === "file" && !stats.isFile()) {
|
|
4748
4888
|
return {
|
|
4749
4889
|
removed: false,
|
|
@@ -4763,9 +4903,9 @@ async function removeCacheFile(pmRoot, target, dryRun) {
|
|
|
4763
4903
|
};
|
|
4764
4904
|
}
|
|
4765
4905
|
if (target.kind === "file") {
|
|
4766
|
-
await
|
|
4906
|
+
await fs4.unlink(absolutePath);
|
|
4767
4907
|
} else {
|
|
4768
|
-
await
|
|
4908
|
+
await fs4.rm(absolutePath, { recursive: true, force: true });
|
|
4769
4909
|
}
|
|
4770
4910
|
const writeWarnings = await runActiveOnWriteHooks({
|
|
4771
4911
|
path: absolutePath,
|
|
@@ -4777,7 +4917,7 @@ async function removeCacheFile(pmRoot, target, dryRun) {
|
|
|
4777
4917
|
warnings: [...warnings, ...writeWarnings]
|
|
4778
4918
|
};
|
|
4779
4919
|
} catch (error) {
|
|
4780
|
-
if (
|
|
4920
|
+
if (isErrno4(error, "ENOENT")) {
|
|
4781
4921
|
return {
|
|
4782
4922
|
removed: false,
|
|
4783
4923
|
warnings
|
|
@@ -4819,6 +4959,9 @@ function buildGcGuidance(params) {
|
|
|
4819
4959
|
if (!params.dryRun && params.removed.some((entry) => entry.startsWith("checkpoints/"))) {
|
|
4820
4960
|
guidance.push('Aged rollback checkpoints were removed; their "pm update-many"/"pm close-many --rollback" windows are no longer recoverable.');
|
|
4821
4961
|
}
|
|
4962
|
+
if (!params.dryRun && params.removed.some((entry) => entry.startsWith("transactions/"))) {
|
|
4963
|
+
guidance.push("Aged terminal workspace-transaction journals were removed; replaying those transactionIds re-executes their idempotent steps instead of short-circuiting.");
|
|
4964
|
+
}
|
|
4822
4965
|
return guidance;
|
|
4823
4966
|
}
|
|
4824
4967
|
async function runGc(global2, options = {}) {
|
|
@@ -4864,6 +5007,31 @@ async function runGc(global2, options = {}) {
|
|
|
4864
5007
|
retained: lockResult.retained.length
|
|
4865
5008
|
};
|
|
4866
5009
|
}
|
|
5010
|
+
let transactionsSummary;
|
|
5011
|
+
if (scopes.includes("transactions")) {
|
|
5012
|
+
const retentionDays = settings.checkpoints.retention_days;
|
|
5013
|
+
const transactionResult = await runWorkspaceTransactionGc(pmRoot, {
|
|
5014
|
+
dryRun,
|
|
5015
|
+
retentionDays,
|
|
5016
|
+
hooks: {
|
|
5017
|
+
onRead: (journalPath) => runActiveOnReadHooks({ path: journalPath, scope: "project" }),
|
|
5018
|
+
onWrite: (journalPath) => runActiveOnWriteHooks({
|
|
5019
|
+
path: journalPath,
|
|
5020
|
+
scope: "project",
|
|
5021
|
+
op: "gc:transaction_journal_remove"
|
|
5022
|
+
})
|
|
5023
|
+
}
|
|
5024
|
+
});
|
|
5025
|
+
removed.push(...transactionResult.removed);
|
|
5026
|
+
retained.push(...transactionResult.retained);
|
|
5027
|
+
warnings.push(...transactionResult.warnings);
|
|
5028
|
+
transactionsSummary = {
|
|
5029
|
+
scanned: transactionResult.scanned,
|
|
5030
|
+
removed: transactionResult.removed.length,
|
|
5031
|
+
retained: transactionResult.retained.length,
|
|
5032
|
+
retention_days: retentionDays
|
|
5033
|
+
};
|
|
5034
|
+
}
|
|
4867
5035
|
let checkpointsSummary;
|
|
4868
5036
|
if (scopes.includes("checkpoints")) {
|
|
4869
5037
|
const retentionDays = settings.checkpoints.retention_days;
|
|
@@ -4907,6 +5075,7 @@ async function runGc(global2, options = {}) {
|
|
|
4907
5075
|
warnings,
|
|
4908
5076
|
...locksSummary ? { locks: locksSummary } : {},
|
|
4909
5077
|
...checkpointsSummary ? { checkpoints: checkpointsSummary } : {},
|
|
5078
|
+
...transactionsSummary ? { transactions: transactionsSummary } : {},
|
|
4910
5079
|
guidance,
|
|
4911
5080
|
generated_at: nowIso()
|
|
4912
5081
|
};
|
|
@@ -4922,8 +5091,8 @@ async function runGc(global2, options = {}) {
|
|
|
4922
5091
|
})();
|
|
4923
5092
|
|
|
4924
5093
|
// dist/sdk/author-attribution.js
|
|
4925
|
-
import
|
|
4926
|
-
import
|
|
5094
|
+
import fs5 from "node:fs/promises";
|
|
5095
|
+
import path6 from "node:path";
|
|
4927
5096
|
!(function() {
|
|
4928
5097
|
try {
|
|
4929
5098
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -4979,10 +5148,10 @@ var inspectHistoryAuthorStream = (itemId, raw, sampleLimit = 20) => {
|
|
|
4979
5148
|
};
|
|
4980
5149
|
};
|
|
4981
5150
|
var scanHistoryAuthorAttribution = async (pmRoot, sampleLimit = 20) => {
|
|
4982
|
-
const historyDirectory =
|
|
5151
|
+
const historyDirectory = path6.join(pmRoot, "history");
|
|
4983
5152
|
let fileNames;
|
|
4984
5153
|
try {
|
|
4985
|
-
fileNames = (await
|
|
5154
|
+
fileNames = (await fs5.readdir(historyDirectory)).filter((fileName) => fileName.endsWith(".jsonl")).sort((left, right) => left.localeCompare(right));
|
|
4986
5155
|
} catch {
|
|
4987
5156
|
fileNames = [];
|
|
4988
5157
|
}
|
|
@@ -4996,7 +5165,7 @@ var scanHistoryAuthorAttribution = async (pmRoot, sampleLimit = 20) => {
|
|
|
4996
5165
|
for (const fileName of fileNames) {
|
|
4997
5166
|
let raw;
|
|
4998
5167
|
try {
|
|
4999
|
-
raw = await
|
|
5168
|
+
raw = await fs5.readFile(path6.join(historyDirectory, fileName), "utf8");
|
|
5000
5169
|
} catch {
|
|
5001
5170
|
continue;
|
|
5002
5171
|
}
|
|
@@ -5024,14 +5193,14 @@ var scanHistoryAuthorAttribution = async (pmRoot, sampleLimit = 20) => {
|
|
|
5024
5193
|
};
|
|
5025
5194
|
|
|
5026
5195
|
// dist/sdk/governance/health.js
|
|
5027
|
-
import
|
|
5028
|
-
import
|
|
5196
|
+
import fs6 from "node:fs/promises";
|
|
5197
|
+
import path7 from "node:path";
|
|
5029
5198
|
|
|
5030
5199
|
// dist/core/diagnostics/remediation.js
|
|
5031
5200
|
!(function() {
|
|
5032
5201
|
try {
|
|
5033
5202
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5034
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5203
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "70a08ddd-31a3-56c2-b57b-d13e29b9e40e");
|
|
5035
5204
|
} catch (e2) {
|
|
5036
5205
|
}
|
|
5037
5206
|
})();
|
|
@@ -5141,6 +5310,42 @@ var REMEDIATION_REGISTRY = Object.freeze([
|
|
|
5141
5310
|
command: "pm history-repair <id>",
|
|
5142
5311
|
summary: "A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain."
|
|
5143
5312
|
},
|
|
5313
|
+
// --- pm validate: storage_integrity (post-merge corruption detection) ---
|
|
5314
|
+
{
|
|
5315
|
+
code: "validate_storage_unreadable_items",
|
|
5316
|
+
command: "pm validate --check-storage-integrity --verbose-diagnostics",
|
|
5317
|
+
summary: "An on-disk item file cannot be parsed (for example a botched merge resolution with stale TOON count headers); repair or restore the file at the reported path \u2014 list commands silently skip it while pm get hard-errors."
|
|
5318
|
+
},
|
|
5319
|
+
{
|
|
5320
|
+
code: "validate_storage_duplicate_item_ids",
|
|
5321
|
+
command: "pm validate --check-storage-integrity --verbose-diagnostics",
|
|
5322
|
+
summary: "One item id is claimed by multiple item documents \u2014 usually two branches minting the same id for different items before merging (GH-600). Keep one document, recreate the other item under a fresh id (pm copy, then delete the colliding file), and consider raising ids.token_length for concurrent multi-agent work."
|
|
5323
|
+
},
|
|
5324
|
+
{
|
|
5325
|
+
code: "validate_storage_history_conflict_markers",
|
|
5326
|
+
command: "pm merge driver history <base> <ours> <theirs>",
|
|
5327
|
+
summary: "A history stream contains unresolved Git conflict markers; re-merge it with the pm history merge driver (or resolve the markers by hand), then run pm history-repair for the item."
|
|
5328
|
+
},
|
|
5329
|
+
{
|
|
5330
|
+
code: "validate_storage_unparseable_history",
|
|
5331
|
+
command: "pm history-repair <id>",
|
|
5332
|
+
summary: "A history stream's newest line is not valid JSONL; repair or restore the stream before further mutations."
|
|
5333
|
+
},
|
|
5334
|
+
{
|
|
5335
|
+
code: "validate_storage_resurrected_items",
|
|
5336
|
+
command: "pm delete <id>",
|
|
5337
|
+
summary: "A live item's newest history operation is a delete: a delete/modify merge silently resurrected it. Decide the winner \u2014 re-delete the item, or keep it and append a mutation documenting the revival."
|
|
5338
|
+
},
|
|
5339
|
+
{
|
|
5340
|
+
code: "validate_storage_unparseable_config",
|
|
5341
|
+
command: "pm merge driver json <base> <ours> <theirs>",
|
|
5342
|
+
summary: "settings.json or a schema file cannot be parsed, so pm silently falls back to defaults; re-merge it with the pm JSON merge driver or fix the file by hand, then rerun pm validate."
|
|
5343
|
+
},
|
|
5344
|
+
{
|
|
5345
|
+
code: "validate_merge_fence_drift",
|
|
5346
|
+
command: "pm merge install",
|
|
5347
|
+
summary: "The committed .gitattributes merge fence no longer matches the active schema's type folders or tracker JSONL stores; rerun pm merge install (and commit .gitattributes) so every tracker artifact keeps its field-aware merge driver."
|
|
5348
|
+
},
|
|
5144
5349
|
// --- pm health (integrity) + pm validate (format_version): item format version ---
|
|
5145
5350
|
{
|
|
5146
5351
|
code: "integrity_item_outdated_format_version",
|
|
@@ -5414,8 +5619,8 @@ function buildRemediationCommands(warnings) {
|
|
|
5414
5619
|
var PM_TELEMETRY_SOURCE_CONTEXT_SET2 = new Set(PM_TELEMETRY_SOURCE_CONTEXT_VALUES);
|
|
5415
5620
|
var STALE_VECTORIZATION_SUMMARY_LIMIT = 25;
|
|
5416
5621
|
var BRIEF_HEALTH_DETAIL_LIMIT = 8;
|
|
5417
|
-
var TELEMETRY_QUEUE_RELATIVE_PATH2 =
|
|
5418
|
-
var TELEMETRY_STATE_RELATIVE_PATH2 =
|
|
5622
|
+
var TELEMETRY_QUEUE_RELATIVE_PATH2 = path7.join("runtime", "telemetry", "events.jsonl");
|
|
5623
|
+
var TELEMETRY_STATE_RELATIVE_PATH2 = path7.join("runtime", "telemetry", "state.json");
|
|
5419
5624
|
var TELEMETRY_ENDPOINT_PROBE_TIMEOUT_MS = 2500;
|
|
5420
5625
|
var TELEMETRY_QUEUE_HIGH_WATER_MARK = 500;
|
|
5421
5626
|
var TELEMETRY_QUEUE_HIGH_RETRY_THRESHOLD = TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS - 3;
|
|
@@ -5447,29 +5652,29 @@ function isExpectedUnmanagedExtension(name, directory) {
|
|
|
5447
5652
|
}
|
|
5448
5653
|
async function isDirectory(targetPath) {
|
|
5449
5654
|
try {
|
|
5450
|
-
const stats = await
|
|
5655
|
+
const stats = await fs6.stat(targetPath);
|
|
5451
5656
|
return stats.isDirectory();
|
|
5452
5657
|
} catch {
|
|
5453
5658
|
return false;
|
|
5454
5659
|
}
|
|
5455
5660
|
}
|
|
5456
5661
|
async function countHistoryStreams(pmRoot, compactPolicy) {
|
|
5457
|
-
const historyDir =
|
|
5662
|
+
const historyDir = path7.join(pmRoot, "history");
|
|
5458
5663
|
if (!await isDirectory(historyDir)) {
|
|
5459
5664
|
return { count: 0, warnings: [], over_threshold: [], max_entries: null };
|
|
5460
5665
|
}
|
|
5461
|
-
const historyFiles = (await
|
|
5666
|
+
const historyFiles = (await fs6.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((left, right) => left.localeCompare(right));
|
|
5462
5667
|
const policyActive = compactPolicy.enabled;
|
|
5463
5668
|
const maxEntries = policyActive ? compactPolicy.max_entries : null;
|
|
5464
5669
|
const warnings = [];
|
|
5465
5670
|
const overThreshold = [];
|
|
5466
5671
|
for (const fileName of historyFiles) {
|
|
5467
|
-
const streamPath =
|
|
5672
|
+
const streamPath = path7.join(historyDir, fileName);
|
|
5468
5673
|
warnings.push(...await runActiveOnReadHooks({ path: streamPath, scope: "project" }));
|
|
5469
5674
|
if (!policyActive) {
|
|
5470
5675
|
continue;
|
|
5471
5676
|
}
|
|
5472
|
-
const raw = await
|
|
5677
|
+
const raw = await fs6.readFile(streamPath, "utf8");
|
|
5473
5678
|
let entries = 0;
|
|
5474
5679
|
for (const line of raw.split(/\r?\n/)) {
|
|
5475
5680
|
if (line.trim().length > 0) {
|
|
@@ -5491,16 +5696,16 @@ async function countHistoryStreams(pmRoot, compactPolicy) {
|
|
|
5491
5696
|
};
|
|
5492
5697
|
}
|
|
5493
5698
|
function normalizeRelativePath(pmRoot, targetPath) {
|
|
5494
|
-
return
|
|
5699
|
+
return path7.relative(pmRoot, targetPath).replaceAll("\\", "/");
|
|
5495
5700
|
}
|
|
5496
5701
|
async function listItemDocumentPaths(pmRoot, typeToFolder) {
|
|
5497
5702
|
const folders = [...new Set(Object.values(typeToFolder))].sort((left, right) => left.localeCompare(right));
|
|
5498
5703
|
const itemPaths = [];
|
|
5499
5704
|
for (const folder of folders) {
|
|
5500
|
-
const directoryPath =
|
|
5705
|
+
const directoryPath = path7.join(pmRoot, folder);
|
|
5501
5706
|
let entries = [];
|
|
5502
5707
|
try {
|
|
5503
|
-
entries = await
|
|
5708
|
+
entries = await fs6.readdir(directoryPath);
|
|
5504
5709
|
} catch (error) {
|
|
5505
5710
|
if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
|
|
5506
5711
|
continue;
|
|
@@ -5511,7 +5716,7 @@ async function listItemDocumentPaths(pmRoot, typeToFolder) {
|
|
|
5511
5716
|
if (!ITEM_FILE_EXTENSIONS.some((extension) => entry.toLowerCase().endsWith(extension))) {
|
|
5512
5717
|
continue;
|
|
5513
5718
|
}
|
|
5514
|
-
itemPaths.push(
|
|
5719
|
+
itemPaths.push(path7.join(directoryPath, entry));
|
|
5515
5720
|
}
|
|
5516
5721
|
}
|
|
5517
5722
|
itemPaths.sort((left, right) => normalizeRelativePath(pmRoot, left).localeCompare(normalizeRelativePath(pmRoot, right)));
|
|
@@ -5531,7 +5736,7 @@ async function buildIntegrityCheck(pmRoot, typeToFolder, schema) {
|
|
|
5531
5736
|
const relativePath = normalizeRelativePath(pmRoot, itemPath);
|
|
5532
5737
|
let raw = "";
|
|
5533
5738
|
try {
|
|
5534
|
-
raw = await
|
|
5739
|
+
raw = await fs6.readFile(itemPath, "utf8");
|
|
5535
5740
|
} catch {
|
|
5536
5741
|
itemUnreadable.push(relativePath);
|
|
5537
5742
|
continue;
|
|
@@ -5560,13 +5765,13 @@ async function buildIntegrityCheck(pmRoot, typeToFolder, schema) {
|
|
|
5560
5765
|
}
|
|
5561
5766
|
}
|
|
5562
5767
|
const formatVersionScan = scanItemFormatVersions(formatVersionEntries);
|
|
5563
|
-
const historyDir =
|
|
5768
|
+
const historyDir = path7.join(pmRoot, "history");
|
|
5564
5769
|
const historyUnreadable = [];
|
|
5565
5770
|
const historyConflictMarkers = [];
|
|
5566
5771
|
const historyInvalidJson = [];
|
|
5567
5772
|
let historyFiles = [];
|
|
5568
5773
|
try {
|
|
5569
|
-
historyFiles = (await
|
|
5774
|
+
historyFiles = (await fs6.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((left, right) => left.localeCompare(right));
|
|
5570
5775
|
} catch (error) {
|
|
5571
5776
|
if (shouldReportHistoryDirectoryUnreadable(error)) {
|
|
5572
5777
|
historyUnreadable.push("history");
|
|
@@ -5574,10 +5779,10 @@ async function buildIntegrityCheck(pmRoot, typeToFolder, schema) {
|
|
|
5574
5779
|
}
|
|
5575
5780
|
for (const fileName of historyFiles) {
|
|
5576
5781
|
const itemId = fileName.slice(0, -".jsonl".length);
|
|
5577
|
-
const historyPath =
|
|
5782
|
+
const historyPath = path7.join(historyDir, fileName);
|
|
5578
5783
|
let raw = "";
|
|
5579
5784
|
try {
|
|
5580
|
-
raw = await
|
|
5785
|
+
raw = await fs6.readFile(historyPath, "utf8");
|
|
5581
5786
|
} catch {
|
|
5582
5787
|
historyUnreadable.push(itemId);
|
|
5583
5788
|
continue;
|
|
@@ -6371,8 +6576,8 @@ async function probeTelemetryEndpointHealth(endpoint) {
|
|
|
6371
6576
|
}
|
|
6372
6577
|
async function buildTelemetryCheck(settings, options) {
|
|
6373
6578
|
const globalPmRoot = resolveGlobalPmRoot(process.cwd());
|
|
6374
|
-
const queuePath2 =
|
|
6375
|
-
const statePath =
|
|
6579
|
+
const queuePath2 = path7.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2);
|
|
6580
|
+
const statePath = path7.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2);
|
|
6376
6581
|
const queueRaw = await readFileIfExists(queuePath2);
|
|
6377
6582
|
const queueExists = queueRaw !== null;
|
|
6378
6583
|
const queueSizeBytes = queueRaw ? Buffer.byteLength(queueRaw, "utf8") : 0;
|
|
@@ -6703,7 +6908,7 @@ async function scanHealthDirectories(pmRoot, typeRegistry, strictDirectories) {
|
|
|
6703
6908
|
const missingOptionalDirs = [];
|
|
6704
6909
|
const hookWarnings = [];
|
|
6705
6910
|
for (const relativeDir of [...requiredDirs, ...optionalDirs]) {
|
|
6706
|
-
const directoryPath =
|
|
6911
|
+
const directoryPath = path7.join(pmRoot, relativeDir);
|
|
6707
6912
|
hookWarnings.push(...await runActiveOnReadHooks({
|
|
6708
6913
|
path: directoryPath,
|
|
6709
6914
|
scope: "project"
|
|
@@ -7011,8 +7216,8 @@ var _testOnlyHealthCommand = {
|
|
|
7011
7216
|
})();
|
|
7012
7217
|
|
|
7013
7218
|
// dist/sdk/stats.js
|
|
7014
|
-
import
|
|
7015
|
-
import
|
|
7219
|
+
import fs7 from "node:fs/promises";
|
|
7220
|
+
import path8 from "node:path";
|
|
7016
7221
|
|
|
7017
7222
|
// dist/core/history/history-storage-stats.js
|
|
7018
7223
|
!(function() {
|
|
@@ -7110,7 +7315,7 @@ function computeHistoryStorageStats(streams, options) {
|
|
|
7110
7315
|
!(function() {
|
|
7111
7316
|
try {
|
|
7112
7317
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
7113
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
7318
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "afed0a81-eee3-5a32-9ebb-79f6f64301c5");
|
|
7114
7319
|
} catch (e2) {
|
|
7115
7320
|
}
|
|
7116
7321
|
})();
|
|
@@ -7133,7 +7338,7 @@ function countNonEmptyLines(raw) {
|
|
|
7133
7338
|
return raw.split(/\r?\n/u).filter((line) => line.trim().length > 0).length;
|
|
7134
7339
|
}
|
|
7135
7340
|
async function readHistoryStreamContents(pmRoot) {
|
|
7136
|
-
const historyDir =
|
|
7341
|
+
const historyDir = path8.join(pmRoot, "history");
|
|
7137
7342
|
if (!await pathExists(historyDir)) {
|
|
7138
7343
|
return [];
|
|
7139
7344
|
}
|
|
@@ -7141,10 +7346,10 @@ async function readHistoryStreamContents(pmRoot) {
|
|
|
7141
7346
|
path: historyDir,
|
|
7142
7347
|
scope: "project"
|
|
7143
7348
|
});
|
|
7144
|
-
const historyFiles = (await
|
|
7349
|
+
const historyFiles = (await fs7.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((a, b) => a.localeCompare(b));
|
|
7145
7350
|
const streams = [];
|
|
7146
7351
|
for (const file of historyFiles) {
|
|
7147
|
-
const historyPath =
|
|
7352
|
+
const historyPath = path8.join(historyDir, file);
|
|
7148
7353
|
const raw = await readFileIfExists(historyPath);
|
|
7149
7354
|
if (raw === null) {
|
|
7150
7355
|
continue;
|
|
@@ -7226,8 +7431,8 @@ async function runStats(global2, options = {}) {
|
|
|
7226
7431
|
})();
|
|
7227
7432
|
|
|
7228
7433
|
// dist/sdk/telemetry.js
|
|
7229
|
-
import
|
|
7230
|
-
import
|
|
7434
|
+
import fs8 from "node:fs/promises";
|
|
7435
|
+
import path9 from "node:path";
|
|
7231
7436
|
!(function() {
|
|
7232
7437
|
try {
|
|
7233
7438
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -7235,9 +7440,9 @@ import path8 from "node:path";
|
|
|
7235
7440
|
} catch (e2) {
|
|
7236
7441
|
}
|
|
7237
7442
|
})();
|
|
7238
|
-
var TELEMETRY_QUEUE_RELATIVE_PATH3 =
|
|
7239
|
-
var TELEMETRY_STATE_RELATIVE_PATH3 =
|
|
7240
|
-
var TELEMETRY_RUNTIME_RELATIVE_PATH =
|
|
7443
|
+
var TELEMETRY_QUEUE_RELATIVE_PATH3 = path9.join("runtime", "telemetry", "events.jsonl");
|
|
7444
|
+
var TELEMETRY_STATE_RELATIVE_PATH3 = path9.join("runtime", "telemetry", "state.json");
|
|
7445
|
+
var TELEMETRY_RUNTIME_RELATIVE_PATH = path9.join("runtime", "telemetry");
|
|
7241
7446
|
var DEFAULT_STATS_LIMIT = 20;
|
|
7242
7447
|
var TELEMETRY_SUBCOMMANDS = [
|
|
7243
7448
|
"status",
|
|
@@ -7454,8 +7659,8 @@ var readTelemetryRuntimeState = async (statePath) => {
|
|
|
7454
7659
|
var nullableTelemetryStateValue = (value) => value ?? null;
|
|
7455
7660
|
var buildTelemetryStatusSummary = async (globalPmRoot) => {
|
|
7456
7661
|
const settings = await readSettings(globalPmRoot);
|
|
7457
|
-
const queuePath2 =
|
|
7458
|
-
const statePath =
|
|
7662
|
+
const queuePath2 = path9.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH3);
|
|
7663
|
+
const statePath = path9.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH3);
|
|
7459
7664
|
const queueRaw = await readFileIfExists(queuePath2);
|
|
7460
7665
|
const queue = parseTelemetryQueue2(queueRaw);
|
|
7461
7666
|
const runtimeState = await readTelemetryRuntimeState(statePath);
|
|
@@ -7533,9 +7738,9 @@ var runTelemetryClear = async (_options, context) => {
|
|
|
7533
7738
|
if (settingsChanged) {
|
|
7534
7739
|
await writeSettings(context.globalPmRoot, settings, "telemetry:clear");
|
|
7535
7740
|
}
|
|
7536
|
-
const telemetryRuntimePath =
|
|
7741
|
+
const telemetryRuntimePath = path9.join(context.globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);
|
|
7537
7742
|
const existed = await pathExists(telemetryRuntimePath);
|
|
7538
|
-
await
|
|
7743
|
+
await fs8.rm(telemetryRuntimePath, { recursive: true, force: true });
|
|
7539
7744
|
return {
|
|
7540
7745
|
action: "telemetry",
|
|
7541
7746
|
subcommand: "clear",
|
|
@@ -7559,8 +7764,8 @@ var runTelemetry = async (options, _global) => {
|
|
|
7559
7764
|
const globalPmRoot = resolveGlobalPmRoot(process.cwd());
|
|
7560
7765
|
return TELEMETRY_COMMAND_HANDLERS[subcommand](options, {
|
|
7561
7766
|
globalPmRoot,
|
|
7562
|
-
queuePath:
|
|
7563
|
-
statePath:
|
|
7767
|
+
queuePath: path9.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH3),
|
|
7768
|
+
statePath: path9.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH3)
|
|
7564
7769
|
});
|
|
7565
7770
|
};
|
|
7566
7771
|
|
|
@@ -8040,7 +8245,7 @@ function firstPositionalToken(tokens, flagsWithValue = /* @__PURE__ */ new Set()
|
|
|
8040
8245
|
import { spawn as spawn2 } from "node:child_process";
|
|
8041
8246
|
import { cp, mkdir as mkdir2, mkdtemp, readdir as readdir2, rm as rm2 } from "node:fs/promises";
|
|
8042
8247
|
import { tmpdir } from "node:os";
|
|
8043
|
-
import
|
|
8248
|
+
import path10 from "node:path";
|
|
8044
8249
|
|
|
8045
8250
|
// dist/core/test/item-test-run-tracking.js
|
|
8046
8251
|
!(function() {
|
|
@@ -9049,7 +9254,7 @@ async function copyIntoSandboxIfPresent(sourcePath, targetPath, recursive = fals
|
|
|
9049
9254
|
if (!await pathExists(sourcePath)) {
|
|
9050
9255
|
return;
|
|
9051
9256
|
}
|
|
9052
|
-
await mkdir2(
|
|
9257
|
+
await mkdir2(path10.dirname(targetPath), { recursive: true });
|
|
9053
9258
|
try {
|
|
9054
9259
|
if (recursive) {
|
|
9055
9260
|
await cp(sourcePath, targetPath, { recursive: true, force: true });
|
|
@@ -9065,9 +9270,9 @@ async function copyIntoSandboxIfPresent(sourcePath, targetPath, recursive = fals
|
|
|
9065
9270
|
}
|
|
9066
9271
|
async function seedLinkedTestSandbox(sandboxPmPath, sandboxGlobalPath, sourceRoots) {
|
|
9067
9272
|
await copyIntoSandboxIfPresent(getSettingsPath(sourceRoots.projectPmRoot), getSettingsPath(sandboxPmPath));
|
|
9068
|
-
await copyIntoSandboxIfPresent(
|
|
9273
|
+
await copyIntoSandboxIfPresent(path10.join(sourceRoots.projectPmRoot, "extensions"), path10.join(sandboxPmPath, "extensions"), true);
|
|
9069
9274
|
await copyIntoSandboxIfPresent(getSettingsPath(sourceRoots.globalPmRoot), getSettingsPath(sandboxGlobalPath));
|
|
9070
|
-
await copyIntoSandboxIfPresent(
|
|
9275
|
+
await copyIntoSandboxIfPresent(path10.join(sourceRoots.globalPmRoot, "extensions"), path10.join(sandboxGlobalPath, "extensions"), true);
|
|
9071
9276
|
}
|
|
9072
9277
|
async function seedLinkedTestTrackerData(sourceRoot, sandboxRoot) {
|
|
9073
9278
|
if (!await pathExists(sourceRoot)) {
|
|
@@ -9078,8 +9283,8 @@ async function seedLinkedTestTrackerData(sourceRoot, sandboxRoot) {
|
|
|
9078
9283
|
if (LINKED_TEST_TRACKER_DIRS_TO_SKIP.has(entry.name)) {
|
|
9079
9284
|
continue;
|
|
9080
9285
|
}
|
|
9081
|
-
const sourcePath =
|
|
9082
|
-
const targetPath =
|
|
9286
|
+
const sourcePath = path10.join(sourceRoot, entry.name);
|
|
9287
|
+
const targetPath = path10.join(sandboxRoot, entry.name);
|
|
9083
9288
|
if (entry.isDirectory()) {
|
|
9084
9289
|
await copyIntoSandboxIfPresent(sourcePath, targetPath, true);
|
|
9085
9290
|
continue;
|
|
@@ -9099,7 +9304,7 @@ async function countLinkedTestItemFiles(pmRoot) {
|
|
|
9099
9304
|
if (!entry.isDirectory() || LINKED_TEST_ITEM_COUNT_DIRS_TO_SKIP.has(entry.name)) {
|
|
9100
9305
|
continue;
|
|
9101
9306
|
}
|
|
9102
|
-
const folderPath =
|
|
9307
|
+
const folderPath = path10.join(pmRoot, entry.name);
|
|
9103
9308
|
let files;
|
|
9104
9309
|
try {
|
|
9105
9310
|
files = await readdir2(folderPath, { withFileTypes: true });
|
|
@@ -9294,10 +9499,10 @@ ${stderr}`;
|
|
|
9294
9499
|
function createLinkedTestSandboxLayout(sandboxRoot) {
|
|
9295
9500
|
return {
|
|
9296
9501
|
root: sandboxRoot,
|
|
9297
|
-
schemaProjectPmPath:
|
|
9298
|
-
schemaGlobalPmPath:
|
|
9299
|
-
trackerProjectPmPath:
|
|
9300
|
-
trackerGlobalPmPath:
|
|
9502
|
+
schemaProjectPmPath: path10.join(sandboxRoot, "schema", "project", ".agents", "pm"),
|
|
9503
|
+
schemaGlobalPmPath: path10.join(sandboxRoot, "schema", "global"),
|
|
9504
|
+
trackerProjectPmPath: path10.join(sandboxRoot, "tracker", "project", ".agents", "pm"),
|
|
9505
|
+
trackerGlobalPmPath: path10.join(sandboxRoot, "tracker", "global")
|
|
9301
9506
|
};
|
|
9302
9507
|
}
|
|
9303
9508
|
async function initializeLinkedTestSandboxes(layout) {
|
|
@@ -9497,7 +9702,7 @@ async function runSingleLinkedTest(params) {
|
|
|
9497
9702
|
}
|
|
9498
9703
|
async function runLinkedTests(tests, defaultTimeoutSeconds, options) {
|
|
9499
9704
|
const results = [];
|
|
9500
|
-
const sandboxRoot = await mkdtemp(
|
|
9705
|
+
const sandboxRoot = await mkdtemp(path10.join(tmpdir(), "pm-linked-test-"));
|
|
9501
9706
|
const layout = createLinkedTestSandboxLayout(sandboxRoot);
|
|
9502
9707
|
const runLevelPmContextMode = parsePmContextMode(options?.pmContext);
|
|
9503
9708
|
const progressMode = options?.progress === true ? "always" : "auto";
|
|
@@ -10236,10 +10441,10 @@ var runTestAll = async (options, global2) => {
|
|
|
10236
10441
|
import os2 from "node:os";
|
|
10237
10442
|
|
|
10238
10443
|
// dist/core/test/background-runs.js
|
|
10239
|
-
import
|
|
10444
|
+
import fs9 from "node:fs/promises";
|
|
10240
10445
|
import { spawn as spawn3 } from "node:child_process";
|
|
10241
10446
|
import { createHash, randomBytes } from "node:crypto";
|
|
10242
|
-
import
|
|
10447
|
+
import path11 from "node:path";
|
|
10243
10448
|
!(function() {
|
|
10244
10449
|
try {
|
|
10245
10450
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -10284,7 +10489,7 @@ function buildBackgroundTestRunFingerprint(kind, commandArgs, pmRoot) {
|
|
|
10284
10489
|
const payload = {
|
|
10285
10490
|
kind,
|
|
10286
10491
|
command: normalizeCommandArgs(commandArgs),
|
|
10287
|
-
pm_root:
|
|
10492
|
+
pm_root: path11.resolve(pmRoot)
|
|
10288
10493
|
};
|
|
10289
10494
|
return createHash("sha256").update(JSON.stringify(payload)).digest("hex");
|
|
10290
10495
|
}
|
|
@@ -10339,8 +10544,8 @@ async function listBackgroundRunRecordPaths(pmRoot) {
|
|
|
10339
10544
|
if (!await pathExists(recordsRoot)) {
|
|
10340
10545
|
return [];
|
|
10341
10546
|
}
|
|
10342
|
-
const entries = await
|
|
10343
|
-
return entries.filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) =>
|
|
10547
|
+
const entries = await fs9.readdir(recordsRoot, { withFileTypes: true });
|
|
10548
|
+
return entries.filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => path11.join(recordsRoot, entry.name)).sort((left, right) => right.localeCompare(left));
|
|
10344
10549
|
}
|
|
10345
10550
|
function parseLinuxRssStatus(raw) {
|
|
10346
10551
|
const match = raw.match(/^VmRSS:\s+(\d+)\s+kB$/m);
|
|
@@ -10354,7 +10559,7 @@ async function readLinuxRssBytes(pid) {
|
|
|
10354
10559
|
return void 0;
|
|
10355
10560
|
}
|
|
10356
10561
|
try {
|
|
10357
|
-
const raw = await
|
|
10562
|
+
const raw = await fs9.readFile(`/proc/${pid}/status`, "utf8");
|
|
10358
10563
|
return parseLinuxRssStatus(raw);
|
|
10359
10564
|
} catch {
|
|
10360
10565
|
return void 0;
|
|
@@ -10382,7 +10587,7 @@ async function readLinuxCpuSeconds(pid) {
|
|
|
10382
10587
|
return {};
|
|
10383
10588
|
}
|
|
10384
10589
|
try {
|
|
10385
|
-
const raw = await
|
|
10590
|
+
const raw = await fs9.readFile(`/proc/${pid}/stat`, "utf8");
|
|
10386
10591
|
return parseLinuxCpuStat(raw);
|
|
10387
10592
|
} catch {
|
|
10388
10593
|
return {};
|
|
@@ -10518,18 +10723,18 @@ function tailLines(value, limit) {
|
|
|
10518
10723
|
async function resolveBackgroundCliEntry(cwd) {
|
|
10519
10724
|
const configured = process.env.PM_BACKGROUND_CLI_ENTRY?.trim();
|
|
10520
10725
|
if (configured && configured.length > 0) {
|
|
10521
|
-
const resolvedConfigured =
|
|
10726
|
+
const resolvedConfigured = path11.resolve(cwd, configured);
|
|
10522
10727
|
if (await pathExists(resolvedConfigured)) {
|
|
10523
10728
|
return resolvedConfigured;
|
|
10524
10729
|
}
|
|
10525
10730
|
}
|
|
10526
|
-
const distEntry =
|
|
10731
|
+
const distEntry = path11.resolve(cwd, "dist", "cli.js");
|
|
10527
10732
|
if (await pathExists(distEntry)) {
|
|
10528
10733
|
return distEntry;
|
|
10529
10734
|
}
|
|
10530
10735
|
const argvEntry = process.argv[1]?.trim();
|
|
10531
10736
|
if (argvEntry && argvEntry.length > 0) {
|
|
10532
|
-
const resolvedArgvEntry =
|
|
10737
|
+
const resolvedArgvEntry = path11.resolve(cwd, argvEntry);
|
|
10533
10738
|
if (await pathExists(resolvedArgvEntry)) {
|
|
10534
10739
|
return resolvedArgvEntry;
|
|
10535
10740
|
}
|
|
@@ -10586,8 +10791,8 @@ async function startBackgroundTestRun(options) {
|
|
|
10586
10791
|
const stdoutPath = getTestRunStdoutPath(options.pmRoot, runId);
|
|
10587
10792
|
const stderrPath = getTestRunStderrPath(options.pmRoot, runId);
|
|
10588
10793
|
const resultPath = getTestRunResultPath(options.pmRoot, runId);
|
|
10589
|
-
await
|
|
10590
|
-
await
|
|
10794
|
+
await fs9.writeFile(stdoutPath, "", "utf8");
|
|
10795
|
+
await fs9.writeFile(stderrPath, "", "utf8");
|
|
10591
10796
|
const record = {
|
|
10592
10797
|
id: runId,
|
|
10593
10798
|
kind: options.kind,
|
|
@@ -10666,7 +10871,7 @@ async function spawnBackgroundTestRunWorker(options) {
|
|
|
10666
10871
|
}
|
|
10667
10872
|
async function appendFileOrdered(queue, filePath, text) {
|
|
10668
10873
|
await queue;
|
|
10669
|
-
await
|
|
10874
|
+
await fs9.appendFile(filePath, text, "utf8");
|
|
10670
10875
|
}
|
|
10671
10876
|
function resolvePositiveEnvInteger(name, fallback) {
|
|
10672
10877
|
const parsed = Number.parseInt(process.env[name] ?? "", 10);
|
|
@@ -11262,10 +11467,10 @@ async function runTestRunsWorker(runId, global2) {
|
|
|
11262
11467
|
})();
|
|
11263
11468
|
|
|
11264
11469
|
// dist/sdk/governance/validate.js
|
|
11265
|
-
import
|
|
11470
|
+
import fs11 from "node:fs/promises";
|
|
11266
11471
|
import { realpathSync } from "node:fs";
|
|
11267
11472
|
import { execFile } from "node:child_process";
|
|
11268
|
-
import
|
|
11473
|
+
import path13 from "node:path";
|
|
11269
11474
|
import { promisify } from "node:util";
|
|
11270
11475
|
|
|
11271
11476
|
// dist/core/validate/fix-planning.js
|
|
@@ -11606,8 +11811,8 @@ function buildMissingLinkedPathRows(rows, lookup) {
|
|
|
11606
11811
|
});
|
|
11607
11812
|
}
|
|
11608
11813
|
}
|
|
11609
|
-
return [...buckets.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([
|
|
11610
|
-
path:
|
|
11814
|
+
return [...buckets.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([path14, bucket]) => ({
|
|
11815
|
+
path: path14,
|
|
11611
11816
|
classification: bucket.classification,
|
|
11612
11817
|
items: [...bucket.owners.values()].map((owner) => {
|
|
11613
11818
|
const metadata = lookup(owner.item_id);
|
|
@@ -11637,11 +11842,211 @@ function summarizeMissingLinkedPathRows(rows) {
|
|
|
11637
11842
|
return lines;
|
|
11638
11843
|
}
|
|
11639
11844
|
|
|
11845
|
+
// dist/sdk/governance/storage-integrity.js
|
|
11846
|
+
import fs10 from "node:fs/promises";
|
|
11847
|
+
import path12 from "node:path";
|
|
11848
|
+
!(function() {
|
|
11849
|
+
try {
|
|
11850
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
11851
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "99fdc5e7-d08b-54a7-8169-1385c91f8ed6");
|
|
11852
|
+
} catch (e2) {
|
|
11853
|
+
}
|
|
11854
|
+
})();
|
|
11855
|
+
async function listItemFilesOnDisk(pmRoot, typeToFolder) {
|
|
11856
|
+
const folders = [...new Set(Object.values(typeToFolder))];
|
|
11857
|
+
const found = [];
|
|
11858
|
+
await Promise.all(folders.map(async (folder) => {
|
|
11859
|
+
let entries;
|
|
11860
|
+
try {
|
|
11861
|
+
entries = await fs10.readdir(path12.join(pmRoot, folder));
|
|
11862
|
+
} catch {
|
|
11863
|
+
return;
|
|
11864
|
+
}
|
|
11865
|
+
for (const entry of entries) {
|
|
11866
|
+
for (const extension of ITEM_FILE_EXTENSIONS) {
|
|
11867
|
+
if (entry.toLowerCase().endsWith(extension)) {
|
|
11868
|
+
found.push({
|
|
11869
|
+
relativePath: `${folder}/${entry}`,
|
|
11870
|
+
id: entry.slice(0, -extension.length)
|
|
11871
|
+
});
|
|
11872
|
+
break;
|
|
11873
|
+
}
|
|
11874
|
+
}
|
|
11875
|
+
}
|
|
11876
|
+
}));
|
|
11877
|
+
return found.sort((left, right) => left.relativePath.localeCompare(right.relativePath));
|
|
11878
|
+
}
|
|
11879
|
+
function scanHistoryStreamContent(accumulator, raw) {
|
|
11880
|
+
const { id, relativePath, liveItemIds, out } = accumulator;
|
|
11881
|
+
out.scanned += 1;
|
|
11882
|
+
const conflictMarker = findFirstMergeConflictMarker(raw);
|
|
11883
|
+
if (conflictMarker) {
|
|
11884
|
+
out.conflictMarkers.push({
|
|
11885
|
+
id,
|
|
11886
|
+
path: relativePath,
|
|
11887
|
+
line: conflictMarker.line,
|
|
11888
|
+
detail: `unresolved merge conflict marker ${conflictMarker.marker}`
|
|
11889
|
+
});
|
|
11890
|
+
return;
|
|
11891
|
+
}
|
|
11892
|
+
let latestEntry = null;
|
|
11893
|
+
const lines = raw.split(/\r?\n/).map((line, index) => ({ content: line.trim(), number: index + 1 })).filter((line) => line.content.length > 0);
|
|
11894
|
+
for (const line of lines) {
|
|
11895
|
+
try {
|
|
11896
|
+
const parsed = JSON.parse(line.content);
|
|
11897
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
11898
|
+
throw new TypeError("history entry must be an object");
|
|
11899
|
+
}
|
|
11900
|
+
latestEntry = parsed;
|
|
11901
|
+
} catch {
|
|
11902
|
+
out.unparseable.push({
|
|
11903
|
+
id,
|
|
11904
|
+
path: relativePath,
|
|
11905
|
+
line: line.number,
|
|
11906
|
+
detail: "history line is not a valid JSON object"
|
|
11907
|
+
});
|
|
11908
|
+
return;
|
|
11909
|
+
}
|
|
11910
|
+
}
|
|
11911
|
+
if (latestEntry === null) {
|
|
11912
|
+
return;
|
|
11913
|
+
}
|
|
11914
|
+
if (latestEntry.op === "delete" && liveItemIds.has(id)) {
|
|
11915
|
+
out.resurrected.push({
|
|
11916
|
+
id,
|
|
11917
|
+
deleted_at: typeof latestEntry.ts === "string" ? latestEntry.ts : "",
|
|
11918
|
+
deleted_by: typeof latestEntry.author === "string" ? latestEntry.author : ""
|
|
11919
|
+
});
|
|
11920
|
+
}
|
|
11921
|
+
if (latestEntry.op === "history_repair" && Array.isArray(latestEntry.patch) && latestEntry.patch.length > 0) {
|
|
11922
|
+
out.repairReconciliations += 1;
|
|
11923
|
+
}
|
|
11924
|
+
}
|
|
11925
|
+
async function scanHistoryStreams(pmRoot, liveItemIds) {
|
|
11926
|
+
const out = {
|
|
11927
|
+
conflictMarkers: [],
|
|
11928
|
+
unparseable: [],
|
|
11929
|
+
resurrected: [],
|
|
11930
|
+
repairReconciliations: 0,
|
|
11931
|
+
scanned: 0
|
|
11932
|
+
};
|
|
11933
|
+
let entries;
|
|
11934
|
+
try {
|
|
11935
|
+
entries = await fs10.readdir(path12.join(pmRoot, "history"));
|
|
11936
|
+
} catch {
|
|
11937
|
+
return out;
|
|
11938
|
+
}
|
|
11939
|
+
for (const entry of entries.sort((left, right) => left.localeCompare(right))) {
|
|
11940
|
+
if (!entry.endsWith(".jsonl")) {
|
|
11941
|
+
continue;
|
|
11942
|
+
}
|
|
11943
|
+
const raw = await fs10.readFile(path12.join(pmRoot, "history", entry), "utf8");
|
|
11944
|
+
scanHistoryStreamContent({
|
|
11945
|
+
id: entry.slice(0, -".jsonl".length),
|
|
11946
|
+
relativePath: `history/${entry}`,
|
|
11947
|
+
liveItemIds,
|
|
11948
|
+
out
|
|
11949
|
+
}, raw);
|
|
11950
|
+
}
|
|
11951
|
+
return out;
|
|
11952
|
+
}
|
|
11953
|
+
function describeUnparseableJson(raw) {
|
|
11954
|
+
const conflictMarker = findFirstMergeConflictMarker(raw);
|
|
11955
|
+
if (conflictMarker) {
|
|
11956
|
+
return `unresolved merge conflict marker ${conflictMarker.marker} at line ${conflictMarker.line}`;
|
|
11957
|
+
}
|
|
11958
|
+
try {
|
|
11959
|
+
JSON.parse(raw);
|
|
11960
|
+
return null;
|
|
11961
|
+
} catch (error) {
|
|
11962
|
+
return `invalid JSON (${String(error)})`;
|
|
11963
|
+
}
|
|
11964
|
+
}
|
|
11965
|
+
async function scanConfigFiles(pmRoot) {
|
|
11966
|
+
const unparseable = [];
|
|
11967
|
+
let scanned = 0;
|
|
11968
|
+
const settingsRaw = await readFileIfExists(getSettingsPath(pmRoot));
|
|
11969
|
+
if (settingsRaw !== null) {
|
|
11970
|
+
scanned += 1;
|
|
11971
|
+
const detail = describeUnparseableJson(settingsRaw);
|
|
11972
|
+
if (detail !== null) {
|
|
11973
|
+
unparseable.push({ path: "settings.json", detail });
|
|
11974
|
+
}
|
|
11975
|
+
}
|
|
11976
|
+
let schemaEntries;
|
|
11977
|
+
try {
|
|
11978
|
+
schemaEntries = await fs10.readdir(path12.join(pmRoot, "schema"));
|
|
11979
|
+
} catch {
|
|
11980
|
+
return { scanned, unparseable };
|
|
11981
|
+
}
|
|
11982
|
+
for (const entry of schemaEntries.sort((left, right) => left.localeCompare(right))) {
|
|
11983
|
+
if (!entry.endsWith(".json")) {
|
|
11984
|
+
continue;
|
|
11985
|
+
}
|
|
11986
|
+
const raw = await fs10.readFile(path12.join(pmRoot, "schema", entry), "utf8");
|
|
11987
|
+
scanned += 1;
|
|
11988
|
+
const detail = describeUnparseableJson(raw);
|
|
11989
|
+
if (detail !== null) {
|
|
11990
|
+
unparseable.push({ path: `schema/${entry}`, detail });
|
|
11991
|
+
}
|
|
11992
|
+
}
|
|
11993
|
+
return { scanned, unparseable };
|
|
11994
|
+
}
|
|
11995
|
+
async function scanStorageIntegrity(pmRoot, parsedItemIds, typeToFolder, itemParseOptions = {}) {
|
|
11996
|
+
const itemFiles = await listItemFilesOnDisk(pmRoot, typeToFolder);
|
|
11997
|
+
const idsOnDisk = new Set(itemFiles.map((file) => file.id));
|
|
11998
|
+
const pathsById = /* @__PURE__ */ new Map();
|
|
11999
|
+
for (const file of itemFiles) {
|
|
12000
|
+
const paths = pathsById.get(file.id);
|
|
12001
|
+
if (paths === void 0) {
|
|
12002
|
+
pathsById.set(file.id, [file.relativePath]);
|
|
12003
|
+
} else {
|
|
12004
|
+
paths.push(file.relativePath);
|
|
12005
|
+
}
|
|
12006
|
+
}
|
|
12007
|
+
const duplicateItemIds = [...pathsById.entries()].filter(([, paths]) => paths.length > 1).map(([id, paths]) => ({
|
|
12008
|
+
id,
|
|
12009
|
+
paths: [...paths].sort((left, right) => left.localeCompare(right))
|
|
12010
|
+
})).sort((left, right) => left.id.localeCompare(right.id));
|
|
12011
|
+
const unreadableItemFiles = (await Promise.all(itemFiles.map(async (file) => {
|
|
12012
|
+
if (!parsedItemIds.has(file.id)) {
|
|
12013
|
+
return { path: file.relativePath, id: file.id };
|
|
12014
|
+
}
|
|
12015
|
+
try {
|
|
12016
|
+
const absolutePath = path12.join(pmRoot, file.relativePath);
|
|
12017
|
+
parseItemDocument(await fs10.readFile(absolutePath, "utf8"), {
|
|
12018
|
+
format: absolutePath.toLowerCase().endsWith(".md") ? "json_markdown" : "toon",
|
|
12019
|
+
schema: itemParseOptions.schema,
|
|
12020
|
+
extensionFieldNames: itemParseOptions.extensionFieldNames
|
|
12021
|
+
});
|
|
12022
|
+
return null;
|
|
12023
|
+
} catch {
|
|
12024
|
+
return { path: file.relativePath, id: file.id };
|
|
12025
|
+
}
|
|
12026
|
+
}))).filter((row) => row !== null);
|
|
12027
|
+
const historyScan = await scanHistoryStreams(pmRoot, idsOnDisk);
|
|
12028
|
+
const configScan = await scanConfigFiles(pmRoot);
|
|
12029
|
+
return {
|
|
12030
|
+
item_files_on_disk: itemFiles.length,
|
|
12031
|
+
item_ids_on_disk: idsOnDisk.size,
|
|
12032
|
+
parsed_items: parsedItemIds.size,
|
|
12033
|
+
unreadable_item_files: unreadableItemFiles,
|
|
12034
|
+
duplicate_item_ids: duplicateItemIds,
|
|
12035
|
+
history_streams_scanned: historyScan.scanned,
|
|
12036
|
+
history_conflict_marker_streams: historyScan.conflictMarkers,
|
|
12037
|
+
history_unparseable_streams: historyScan.unparseable,
|
|
12038
|
+
resurrected_items: historyScan.resurrected,
|
|
12039
|
+
history_repair_reconciliations: historyScan.repairReconciliations,
|
|
12040
|
+
config_files_scanned: configScan.scanned,
|
|
12041
|
+
unparseable_config_files: configScan.unparseable
|
|
12042
|
+
};
|
|
12043
|
+
}
|
|
12044
|
+
|
|
11640
12045
|
// dist/sdk/governance/validate.js
|
|
11641
12046
|
!(function() {
|
|
11642
12047
|
try {
|
|
11643
12048
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
11644
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
12049
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "af61454c-5bb7-5a6f-897e-e5efd97ee0b5");
|
|
11645
12050
|
} catch (e2) {
|
|
11646
12051
|
}
|
|
11647
12052
|
})();
|
|
@@ -11951,16 +12356,16 @@ function resolveFileScanMode(scanMode) {
|
|
|
11951
12356
|
throw new PmCliError(`Unknown --scan-mode value "${scanMode}". Supported values: ${VALIDATE_FILE_SCAN_MODES.join(", ")}.`, EXIT_CODE.USAGE);
|
|
11952
12357
|
}
|
|
11953
12358
|
function resolveWorkspaceRoot(pmRoot) {
|
|
11954
|
-
const resolvedPmRoot =
|
|
12359
|
+
const resolvedPmRoot = path13.resolve(pmRoot);
|
|
11955
12360
|
const normalizedPmRoot = resolvedPmRoot.replaceAll("\\", "/");
|
|
11956
12361
|
if (normalizedPmRoot.endsWith("/.agents/pm")) {
|
|
11957
|
-
return
|
|
12362
|
+
return path13.dirname(path13.dirname(resolvedPmRoot));
|
|
11958
12363
|
}
|
|
11959
|
-
const resolvedCwd =
|
|
12364
|
+
const resolvedCwd = path13.resolve(process.cwd());
|
|
11960
12365
|
const canonicalPmRoot = realpathForWorkspaceRoot(resolvedPmRoot);
|
|
11961
12366
|
const canonicalCwd = realpathForWorkspaceRoot(resolvedCwd);
|
|
11962
|
-
const relativeFromPmRoot =
|
|
11963
|
-
const cwdInsidePmRoot = relativeFromPmRoot.length === 0 || !relativeFromPmRoot.startsWith("..") && !
|
|
12367
|
+
const relativeFromPmRoot = path13.relative(canonicalPmRoot, canonicalCwd);
|
|
12368
|
+
const cwdInsidePmRoot = relativeFromPmRoot.length === 0 || !relativeFromPmRoot.startsWith("..") && !path13.isAbsolute(relativeFromPmRoot);
|
|
11964
12369
|
if (cwdInsidePmRoot) {
|
|
11965
12370
|
return resolvedPmRoot;
|
|
11966
12371
|
}
|
|
@@ -11970,14 +12375,14 @@ function realpathForWorkspaceRoot(inputPath) {
|
|
|
11970
12375
|
try {
|
|
11971
12376
|
return realpathSync.native(inputPath);
|
|
11972
12377
|
} catch {
|
|
11973
|
-
return
|
|
12378
|
+
return path13.resolve(inputPath);
|
|
11974
12379
|
}
|
|
11975
12380
|
}
|
|
11976
12381
|
async function listFilesRecursive(basePath, relativePath, output) {
|
|
11977
|
-
const targetDirectory = relativePath.length > 0 ?
|
|
12382
|
+
const targetDirectory = relativePath.length > 0 ? path13.join(basePath, relativePath) : basePath;
|
|
11978
12383
|
let entries;
|
|
11979
12384
|
try {
|
|
11980
|
-
entries = await
|
|
12385
|
+
entries = await fs11.readdir(targetDirectory, { withFileTypes: true });
|
|
11981
12386
|
} catch (error) {
|
|
11982
12387
|
if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
|
|
11983
12388
|
return;
|
|
@@ -11988,7 +12393,7 @@ async function listFilesRecursive(basePath, relativePath, output) {
|
|
|
11988
12393
|
if (entry.name.startsWith(".")) {
|
|
11989
12394
|
continue;
|
|
11990
12395
|
}
|
|
11991
|
-
const childRelative = relativePath.length > 0 ?
|
|
12396
|
+
const childRelative = relativePath.length > 0 ? path13.join(relativePath, entry.name) : entry.name;
|
|
11992
12397
|
if (entry.isDirectory()) {
|
|
11993
12398
|
if (DIRECTORY_IGNORE_SET.has(entry.name)) {
|
|
11994
12399
|
continue;
|
|
@@ -12008,9 +12413,9 @@ async function collectDefaultProjectFileCandidates(workspaceRoot) {
|
|
|
12008
12413
|
await listFilesRecursive(workspaceRoot, directory, discovered);
|
|
12009
12414
|
}
|
|
12010
12415
|
for (const candidate of FILE_SCAN_ROOT_FILES) {
|
|
12011
|
-
const absolute =
|
|
12416
|
+
const absolute = path13.join(workspaceRoot, candidate);
|
|
12012
12417
|
try {
|
|
12013
|
-
const stats = await
|
|
12418
|
+
const stats = await fs11.stat(absolute);
|
|
12014
12419
|
if (stats.isFile()) {
|
|
12015
12420
|
discovered.push(normalizeRelativePath2(candidate));
|
|
12016
12421
|
}
|
|
@@ -12040,7 +12445,7 @@ function resolvePmInternalCandidatePrefixes(pmRoot, workspaceRoot) {
|
|
|
12040
12445
|
if (configuredDefault.length > 0) {
|
|
12041
12446
|
prefixes.add(configuredDefault);
|
|
12042
12447
|
}
|
|
12043
|
-
const relativePmRoot = normalizeRelativeDirectoryPath(
|
|
12448
|
+
const relativePmRoot = normalizeRelativeDirectoryPath(path13.relative(workspaceRoot, pmRoot));
|
|
12044
12449
|
if (relativePmRoot.length > 0 && !relativePmRoot.startsWith("..")) {
|
|
12045
12450
|
prefixes.add(relativePmRoot);
|
|
12046
12451
|
}
|
|
@@ -12159,6 +12564,9 @@ function resolveRequestedChecks(options) {
|
|
|
12159
12564
|
if (options.checkCommandReferences) {
|
|
12160
12565
|
requested.add("command_references");
|
|
12161
12566
|
}
|
|
12567
|
+
if (options.checkStorageIntegrity) {
|
|
12568
|
+
requested.add("storage_integrity");
|
|
12569
|
+
}
|
|
12162
12570
|
if (requested.size === 0) {
|
|
12163
12571
|
if (options.autoFix) {
|
|
12164
12572
|
requested.add("metadata");
|
|
@@ -12176,6 +12584,7 @@ function resolveRequestedChecks(options) {
|
|
|
12176
12584
|
requested.add("command_references");
|
|
12177
12585
|
requested.add("history_drift");
|
|
12178
12586
|
requested.add("format_version");
|
|
12587
|
+
requested.add("storage_integrity");
|
|
12179
12588
|
}
|
|
12180
12589
|
return requested;
|
|
12181
12590
|
}
|
|
@@ -12520,30 +12929,30 @@ function resolveLifecycleDependencyCycleSamplePath(component, graph) {
|
|
|
12520
12929
|
return [start, start];
|
|
12521
12930
|
}
|
|
12522
12931
|
const componentSet = new Set(component);
|
|
12523
|
-
const
|
|
12932
|
+
const path14 = [start];
|
|
12524
12933
|
const visited = /* @__PURE__ */ new Set([start]);
|
|
12525
12934
|
const search = (current) => {
|
|
12526
12935
|
const neighbors = (graph.get(current) ?? []).filter((candidate) => componentSet.has(candidate));
|
|
12527
12936
|
for (const next of neighbors) {
|
|
12528
|
-
if (next === start &&
|
|
12529
|
-
|
|
12937
|
+
if (next === start && path14.length > 1) {
|
|
12938
|
+
path14.push(start);
|
|
12530
12939
|
return true;
|
|
12531
12940
|
}
|
|
12532
12941
|
if (visited.has(next)) {
|
|
12533
12942
|
continue;
|
|
12534
12943
|
}
|
|
12535
12944
|
visited.add(next);
|
|
12536
|
-
|
|
12945
|
+
path14.push(next);
|
|
12537
12946
|
if (search(next)) {
|
|
12538
12947
|
return true;
|
|
12539
12948
|
}
|
|
12540
|
-
|
|
12949
|
+
path14.pop();
|
|
12541
12950
|
visited.delete(next);
|
|
12542
12951
|
}
|
|
12543
12952
|
return false;
|
|
12544
12953
|
};
|
|
12545
12954
|
if (search(start)) {
|
|
12546
|
-
return [...
|
|
12955
|
+
return [...path14];
|
|
12547
12956
|
}
|
|
12548
12957
|
return [...component, start];
|
|
12549
12958
|
}
|
|
@@ -12801,12 +13210,12 @@ function linkedArtifactPathExceedsFilesystemLimits(artifactPath) {
|
|
|
12801
13210
|
return normalized.length > LINKED_ARTIFACT_MAX_PATH_LENGTH || normalized.split(/[\\/]/).some((segment) => segment.length > LINKED_ARTIFACT_MAX_SEGMENT_LENGTH);
|
|
12802
13211
|
}
|
|
12803
13212
|
async function linkedArtifactIsMissing(workspaceRoot, artifactPath) {
|
|
12804
|
-
const absolutePath =
|
|
13213
|
+
const absolutePath = path13.isAbsolute(artifactPath) ? artifactPath : path13.resolve(workspaceRoot, artifactPath);
|
|
12805
13214
|
if (linkedArtifactPathExceedsFilesystemLimits(absolutePath)) {
|
|
12806
13215
|
return false;
|
|
12807
13216
|
}
|
|
12808
13217
|
try {
|
|
12809
|
-
const stats = await
|
|
13218
|
+
const stats = await fs11.stat(absolutePath);
|
|
12810
13219
|
return !stats.isFile() && !stats.isDirectory();
|
|
12811
13220
|
} catch (error) {
|
|
12812
13221
|
const code = typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
@@ -13300,6 +13709,49 @@ var _testOnlyValidateCommand = {
|
|
|
13300
13709
|
summarizeDuplicateIssueCodes,
|
|
13301
13710
|
toMeaningfulString
|
|
13302
13711
|
};
|
|
13712
|
+
async function buildStorageIntegrityCheck(pmRoot, items, typeToFolder, settings) {
|
|
13713
|
+
const scan = await scanStorageIntegrity(pmRoot, new Set(items.map((item) => item.id)), typeToFolder, {
|
|
13714
|
+
schema: settings.schema,
|
|
13715
|
+
extensionFieldNames: collectRegisteredItemFieldNames(getActiveExtensionRegistrations())
|
|
13716
|
+
});
|
|
13717
|
+
const warnings = [];
|
|
13718
|
+
if (scan.unreadable_item_files.length > 0) {
|
|
13719
|
+
warnings.push(`validate_storage_unreadable_items:${scan.unreadable_item_files.length}`);
|
|
13720
|
+
}
|
|
13721
|
+
if (scan.duplicate_item_ids.length > 0) {
|
|
13722
|
+
warnings.push(`validate_storage_duplicate_item_ids:${scan.duplicate_item_ids.length}`);
|
|
13723
|
+
}
|
|
13724
|
+
if (scan.history_conflict_marker_streams.length > 0) {
|
|
13725
|
+
warnings.push(`validate_storage_history_conflict_markers:${scan.history_conflict_marker_streams.length}`);
|
|
13726
|
+
}
|
|
13727
|
+
if (scan.history_unparseable_streams.length > 0) {
|
|
13728
|
+
warnings.push(`validate_storage_unparseable_history:${scan.history_unparseable_streams.length}`);
|
|
13729
|
+
}
|
|
13730
|
+
if (scan.resurrected_items.length > 0) {
|
|
13731
|
+
warnings.push(`validate_storage_resurrected_items:${scan.resurrected_items.length}`);
|
|
13732
|
+
}
|
|
13733
|
+
if (scan.unparseable_config_files.length > 0) {
|
|
13734
|
+
warnings.push(`validate_storage_unparseable_config:${scan.unparseable_config_files.length}`);
|
|
13735
|
+
}
|
|
13736
|
+
const errorCount = warnings.length;
|
|
13737
|
+
const fenceAudit = await auditMergeAttributeFence(pmRoot, [
|
|
13738
|
+
...new Set(Object.values(typeToFolder))
|
|
13739
|
+
]);
|
|
13740
|
+
if (fenceAudit.status === "drift") {
|
|
13741
|
+
warnings.push(`validate_merge_fence_drift:${fenceAudit.missing_patterns.length + fenceAudit.stale_patterns.length}`);
|
|
13742
|
+
}
|
|
13743
|
+
return {
|
|
13744
|
+
check: {
|
|
13745
|
+
name: "storage_integrity",
|
|
13746
|
+
// Corruption findings fail the check; fence drift alone is a warning —
|
|
13747
|
+
// the workspace data is intact, but future merges of uncovered paths
|
|
13748
|
+
// would fall back to git's default text driver.
|
|
13749
|
+
status: errorCount > 0 ? "error" : warnings.length > 0 ? "warn" : "ok",
|
|
13750
|
+
details: { ...scan, merge_fence: fenceAudit }
|
|
13751
|
+
},
|
|
13752
|
+
warnings
|
|
13753
|
+
};
|
|
13754
|
+
}
|
|
13303
13755
|
function recordValidateCheck(state, built, fixHintsEnabled) {
|
|
13304
13756
|
if (fixHintsEnabled) {
|
|
13305
13757
|
attachValidateFixHints(built.check, built.warnings);
|
|
@@ -13350,6 +13802,9 @@ async function executeRequestedValidateChecks(params) {
|
|
|
13350
13802
|
if (params.requestedChecks.has("format_version")) {
|
|
13351
13803
|
recordValidateCheck(state, buildFormatVersionCheck(params.items, fullDiagnostics), fixHintsEnabled);
|
|
13352
13804
|
}
|
|
13805
|
+
if (params.requestedChecks.has("storage_integrity")) {
|
|
13806
|
+
recordValidateCheck(state, await buildStorageIntegrityCheck(params.pmRoot, params.items, resolveItemTypeRegistry(params.settings, getActiveExtensionRegistrations()).type_to_folder, params.settings), fixHintsEnabled);
|
|
13807
|
+
}
|
|
13353
13808
|
return state;
|
|
13354
13809
|
}
|
|
13355
13810
|
function planValidateFixes(options, state, settings) {
|
|
@@ -13501,6 +13956,7 @@ export {
|
|
|
13501
13956
|
runMeet,
|
|
13502
13957
|
runEvent,
|
|
13503
13958
|
runRemind,
|
|
13959
|
+
runWorkspaceTransactionGc,
|
|
13504
13960
|
runGc,
|
|
13505
13961
|
inspectHistoryAuthorStream,
|
|
13506
13962
|
scanHistoryAuthorAttribution,
|
|
@@ -13529,4 +13985,4 @@ export {
|
|
|
13529
13985
|
runValidate2,
|
|
13530
13986
|
resolveStartTaskInProgressStatus
|
|
13531
13987
|
};
|
|
13532
|
-
//# sourceMappingURL=chunk-
|
|
13988
|
+
//# sourceMappingURL=chunk-T44FMVRL.js.map
|