@unbrained/pm-cli 2026.7.21 → 2026.7.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +25 -0
- package/dist/cli/bundle-integrity.js +3 -3
- package/dist/cli/bundle-integrity.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +5 -0
- package/dist/cli/commands/contracts.js +8 -6
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/copy.js +36 -20
- package/dist/cli/commands/copy.js.map +1 -1
- package/dist/cli/commands/create.js +48 -24
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/merge.d.ts +1 -1
- package/dist/cli/commands/merge.js +3 -3
- package/dist/cli/commands/merge.js.map +1 -1
- package/dist/cli/commands/restore.js +40 -22
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/update.js +12 -9
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/extension-command-help.js +3 -4
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/main.d.ts +3 -2
- package/dist/cli/main.js +6 -6
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +33 -21
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +63 -37
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +2 -0
- package/dist/cli/registration-helpers.js +3 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +349 -341
- package/dist/cli-bundle/chunks/{append-7OVFYR3C.js → append-CYMA7RJT.js} +5 -5
- package/dist/cli-bundle/chunks/append-H53CAPMP.js +11 -0
- package/dist/cli-bundle/chunks/{chunk-PFNHX655.js → chunk-2P7OK4WG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-EJDGV4GR.js → chunk-3EBGHNNQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DZRV2OPA.js → chunk-3EDFN3VV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZOY5K4D3.js → chunk-3PWJWLLQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VXOOB6YX.js → chunk-3SJAR3CY.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-GTLCVJOE.js → chunk-3WVKMF2A.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-LAV26CQG.js → chunk-42SYYKA4.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-NLR32VFS.js → chunk-4IXLNV7W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BKIAH72N.js → chunk-4LTPHDKA.js} +39 -23
- package/dist/cli-bundle/chunks/chunk-4LTPHDKA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ABWCF646.js → chunk-4YTQVO3V.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-E5XMKOSB.js → chunk-5EBRMHI6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-IY6VZ3IW.js → chunk-5FAG2JUC.js} +320 -62
- package/dist/cli-bundle/chunks/chunk-5FAG2JUC.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GKX4NJ7U.js → chunk-5K5LHZZX.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-T6PPNM7V.js → chunk-5K7BOAB6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-4QOB7L7I.js → chunk-5MUZ54G2.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-SF3DT5HJ.js → chunk-5QME4KX2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RMF7LMBS.js → chunk-6PDGFY3P.js} +27 -17
- package/dist/cli-bundle/chunks/{chunk-RMF7LMBS.js.map → chunk-6PDGFY3P.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TRSHFPRZ.js → chunk-6PM6CPPP.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-O4BCOJTZ.js → chunk-7AHRY3ZB.js} +21 -16
- package/dist/cli-bundle/chunks/chunk-7AHRY3ZB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OR42SO64.js → chunk-7B36A3VT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QWRVBJ4D.js → chunk-7OR2YKKD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FPBMLYPI.js → chunk-7QUV54XX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WWNL6WMH.js → chunk-7WXW6JHG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BXNDKOR2.js → chunk-A2VL5SVG.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-AXGDUXJW.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-IAQE32BI.js → chunk-B2AVNGG3.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-K36WV5J6.js → chunk-B7O44UBR.js} +71 -8
- package/dist/cli-bundle/chunks/chunk-B7O44UBR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HCEBZNC3.js → chunk-BRMPF2RM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-Z7VWXXJM.js → chunk-BTNKMF2A.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-KH44WBAT.js → chunk-CD4643VW.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-OWXOPDHD.js → chunk-CJEEC5O4.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-PZC2FUOQ.js → chunk-CTPKCZCF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7W2UAXXT.js → chunk-D4OBQVL3.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-EWJWSNRU.js → chunk-DM4TYC2A.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-VJQG4BIM.js → chunk-DSFTAQ7T.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-AELMUANP.js → chunk-DVB6SQU7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KBLZ3AA5.js → chunk-E3ZWOFSO.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-EP25DV6P.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-GTK4DTEW.js → chunk-F4VCB4WY.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-V22ZPOKN.js → chunk-F4XAQUQA.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-QOOTOD3W.js → chunk-FGR6IBAF.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-JSLT7WVE.js → chunk-FKBMT2Q6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QIH77CAG.js → chunk-G5RLSSIX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P7MTHPJQ.js → chunk-GEKRVH3G.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2L6ZP22J.js → chunk-GSP6IZFU.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ATBCUC7Y.js → chunk-H3MDK2VU.js} +48 -30
- package/dist/cli-bundle/chunks/chunk-H3MDK2VU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZVZGXPQ5.js → chunk-HYZZM3Q2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XJTABV3X.js → chunk-IBWG3OSH.js} +22 -17
- package/dist/cli-bundle/chunks/chunk-IBWG3OSH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4XGJLADW.js → chunk-IHY5SX7O.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UCBDQI5E.js → chunk-IMU7JLUI.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-Z75ONV25.js → chunk-IPAQAJWB.js} +77 -7
- package/dist/cli-bundle/chunks/chunk-IPAQAJWB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7RW4JCU2.js → chunk-IQCD6OO3.js} +25 -13
- package/dist/cli-bundle/chunks/chunk-IQCD6OO3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YQWCZ5AC.js → chunk-J3ZKFEDM.js} +38 -22
- package/dist/cli-bundle/chunks/chunk-J3ZKFEDM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PEQGTJ5Q.js → chunk-JCLXCGIL.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GROYI4RB.js → chunk-JLTHOYR7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-JHJSFOAM.js → chunk-JMPVHM44.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MATHDCGG.js → chunk-JWYG36RV.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-ZTVA4KLN.js → chunk-KEGVMZNA.js} +28 -16
- package/dist/cli-bundle/chunks/chunk-KEGVMZNA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VLRGDBLY.js → chunk-KEHOPUHH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-K55VMLSS.js → chunk-KJ4ZF35M.js} +63 -13
- package/dist/cli-bundle/chunks/chunk-KJ4ZF35M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CPX275C6.js → chunk-KPCZL2YK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-POG76WWZ.js → chunk-L7DZV6EZ.js} +319 -61
- package/dist/cli-bundle/chunks/chunk-L7DZV6EZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FO6OSVEN.js → chunk-LANV45W2.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-LVC72YRD.js → chunk-LC5ZUXWE.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-SY4SFZSD.js → chunk-LE522OXA.js} +55 -30
- package/dist/cli-bundle/chunks/chunk-LE522OXA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TVYYO5A7.js → chunk-MBHYQYCS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FJIFFBJX.js → chunk-MROP2RNT.js} +66 -74
- package/dist/cli-bundle/chunks/chunk-MROP2RNT.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7656MAUL.js → chunk-MUAJHL2R.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-R3P6FZJW.js → chunk-N6QCY2AX.js} +43 -25
- package/dist/cli-bundle/chunks/chunk-N6QCY2AX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7WCE6Y64.js → chunk-NUQCSV4P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SZVB53Y3.js → chunk-O3GFE2PX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OY7DMU5P.js → chunk-O43LEUSD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AMJPSANK.js → chunk-O7RH6BWP.js} +103 -44
- package/dist/cli-bundle/chunks/chunk-O7RH6BWP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NUF7ROFH.js → chunk-OODR5KYF.js} +26 -27
- package/dist/cli-bundle/chunks/chunk-OODR5KYF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LZYP423P.js → chunk-OZ25YD4Q.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VZIZB6QH.js → chunk-PKYKQCTJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-UZLJOEAC.js → chunk-PMRED6QZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ADBTSVGK.js → chunk-PPATPPI6.js} +65 -73
- package/dist/cli-bundle/chunks/chunk-PPATPPI6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-K4CI6Y45.js → chunk-PWGJCP2V.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UVN66B3M.js → chunk-Q3Z2Y5WJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RNPZYNHS.js → chunk-Q6YZ3VCI.js} +104 -45
- package/dist/cli-bundle/chunks/chunk-Q6YZ3VCI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7DOJC3HS.js → chunk-QE5EUHKN.js} +28 -18
- package/dist/cli-bundle/chunks/chunk-QE5EUHKN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AS4SAZ5R.js → chunk-QKMMWESK.js} +25 -26
- package/dist/cli-bundle/chunks/chunk-QKMMWESK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-R7QV7ICM.js → chunk-QSXN2FAN.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-5NTE36LD.js → chunk-RBECHH5K.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JXCW2TI2.js → chunk-RPNC7M63.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-ICDAQ4TD.js → chunk-S2QQNTA6.js} +26 -14
- package/dist/cli-bundle/chunks/chunk-S2QQNTA6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JFD5LPMI.js → chunk-SP3BAXFF.js} +29 -17
- package/dist/cli-bundle/chunks/chunk-SP3BAXFF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-F2LBF7XJ.js → chunk-SUSFH6F7.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-VHXHVTUU.js → chunk-TDOPC7UY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HYW67VJ5.js → chunk-TLF52ZDP.js} +30 -25
- package/dist/cli-bundle/chunks/chunk-TLF52ZDP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FSE2IKJQ.js → chunk-TWHG646K.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OCUBRA6D.js → chunk-U7U7WGEC.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-PONKZPCJ.js → chunk-UFRVIIJ2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-VNTCM3VW.js → chunk-VKX2VZZH.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-7AVEY74G.js → chunk-VTOCZ343.js} +29 -24
- package/dist/cli-bundle/chunks/chunk-VTOCZ343.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6JUTHVQS.js → chunk-W2JDNTN3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PQSEQD6E.js → chunk-W35PHE44.js} +62 -12
- package/dist/cli-bundle/chunks/chunk-W35PHE44.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4QSQ6XDK.js → chunk-WT4KXBUD.js} +68 -31
- package/dist/cli-bundle/chunks/chunk-WT4KXBUD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RPESLSO5.js → chunk-XC5RVKHH.js} +69 -32
- package/dist/cli-bundle/chunks/chunk-XC5RVKHH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QG4GFLQ6.js → chunk-XD6UF2NB.js} +42 -24
- package/dist/cli-bundle/chunks/chunk-XD6UF2NB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AF2CCM5U.js → chunk-XKRVX4B3.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JGUKMMRS.js → chunk-XN4NQZJK.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3P7UJQOX.js → chunk-YKFMLQNK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YCIUJJOD.js → chunk-YKWKMGL7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TOBGV45Y.js → chunk-YUKIFPWK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-72LQ4TKV.js → chunk-YYEZEP3E.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-X3W65QK3.js → chunk-ZEY3XSZQ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-MWQ2HC2A.js → chunk-ZKOQHLJP.js} +59 -34
- package/dist/cli-bundle/chunks/chunk-ZKOQHLJP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QJIKE24M.js → chunk-ZQ3UMKWE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4PUUNQDV.js → chunk-ZVVEWHWK.js} +58 -33
- package/dist/cli-bundle/chunks/chunk-ZVVEWHWK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OG5DVFMA.js → chunk-ZXE6SNKO.js} +5 -5
- package/dist/cli-bundle/chunks/close-GAUIGOQC.js +12 -0
- package/dist/cli-bundle/chunks/{close-QEMOYZN3.js → close-SJIEKNY4.js} +5 -5
- package/dist/cli-bundle/chunks/{close-many-RZVTUGBG.js → close-many-B6AIC5OQ.js} +15 -14
- package/dist/cli-bundle/chunks/close-many-QCINT6I2.js +24 -0
- package/dist/cli-bundle/chunks/comments-4SK5EUEJ.js +13 -0
- package/dist/cli-bundle/chunks/{comments-TPU7QRBL.js → comments-DM5KV2RS.js} +7 -7
- package/dist/cli-bundle/chunks/copy-4KCCLTYQ.js +10 -0
- package/dist/cli-bundle/chunks/{copy-DKTSSCK7.js → copy-HEP5SZHB.js} +5 -4
- package/dist/cli-bundle/chunks/create-BDKQFPRE.js +30 -0
- package/dist/cli-bundle/chunks/{create-EIFBIVNQ.js → create-VCGBCYL2.js} +11 -10
- package/dist/cli-bundle/chunks/delete-JWDXPR3H.js +10 -0
- package/dist/cli-bundle/chunks/{delete-LCS3VPDH.js → delete-ZSPBTVJD.js} +4 -4
- package/dist/cli-bundle/chunks/{deps-YG7UF3VR.js → deps-BZTWWOIE.js} +6 -6
- package/dist/cli-bundle/chunks/{deps-UH5EQQUY.js → deps-OVAJOQIE.js} +6 -6
- package/dist/cli-bundle/chunks/{docs-G32TK6XS.js → docs-3GFMSWLL.js} +6 -6
- package/dist/cli-bundle/chunks/docs-SY2NPT6Y.js +14 -0
- package/dist/cli-bundle/chunks/{files-4ALMCSKB.js → files-2SEL4QIU.js} +6 -6
- package/dist/cli-bundle/chunks/{files-3H32UQ4K.js → files-FYMMJGNN.js} +6 -6
- package/dist/cli-bundle/chunks/focus-4A27YJ2Z.js +10 -0
- package/dist/cli-bundle/chunks/{focus-7SOUT5PZ.js → focus-TEUJKTAT.js} +5 -5
- package/dist/cli-bundle/chunks/history-compact-7QOKL2NB.js +16 -0
- package/dist/cli-bundle/chunks/{history-compact-77BT2LUB.js → history-compact-U7A37VR6.js} +6 -6
- package/dist/cli-bundle/chunks/{history-redact-LJPZPNFA.js → history-redact-TNKUO4ZE.js} +4 -4
- package/dist/cli-bundle/chunks/{history-redact-PWTTJ3XS.js → history-redact-ZWRUWQY3.js} +4 -4
- package/dist/cli-bundle/chunks/{history-repair-I7CBNCV3.js → history-repair-6IU5VWHN.js} +7 -7
- package/dist/cli-bundle/chunks/history-repair-GWCGJUM2.js +17 -0
- package/dist/cli-bundle/chunks/learnings-DDFAUUX3.js +13 -0
- package/dist/cli-bundle/chunks/{learnings-KTYW3AL7.js → learnings-GOEZXMKL.js} +7 -7
- package/dist/cli-bundle/chunks/{notes-ZERD3KB2.js → notes-BZWODAEK.js} +7 -7
- package/dist/cli-bundle/chunks/notes-OBJ6FL36.js +13 -0
- package/dist/cli-bundle/chunks/{plan-OFJUBIM5.js → plan-V57VQTAG.js} +12 -11
- package/dist/cli-bundle/chunks/plan-ZMOBD6FX.js +27 -0
- package/dist/cli-bundle/chunks/{profile-3THJPIQY.js → profile-BG3N4ETA.js} +9 -9
- package/dist/cli-bundle/chunks/{profile-XEZAMMBW.js → profile-XLM45FKV.js} +9 -9
- package/dist/cli-bundle/chunks/{register-list-query-BR435Q2H.js → register-list-query-EYYNTGMF.js} +48 -38
- package/dist/cli-bundle/chunks/register-list-query-EYYNTGMF.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-RWTWLOBE.js → register-list-query-WGXJPXXY.js} +47 -37
- package/dist/cli-bundle/chunks/register-list-query-WGXJPXXY.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-HLWC2WNP.js → register-mutation-3YSDDVOL.js} +131 -105
- package/dist/cli-bundle/chunks/register-mutation-3YSDDVOL.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-ZJX5AZM5.js → register-mutation-VDGUMMUY.js} +131 -105
- package/dist/cli-bundle/chunks/register-mutation-VDGUMMUY.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-744YBJMV.js → register-operations-H4URGAHX.js} +36 -35
- package/dist/cli-bundle/chunks/{register-operations-744YBJMV.js.map → register-operations-H4URGAHX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-UEBJH6AN.js → register-operations-HSO7X77D.js} +34 -33
- package/dist/cli-bundle/chunks/{register-operations-UEBJH6AN.js.map → register-operations-HSO7X77D.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-5DA4UZXI.js → register-setup-HZ2KKXK4.js} +13 -13
- package/dist/cli-bundle/chunks/{register-setup-6H25M3BH.js → register-setup-WCBKJ3H3.js} +13 -13
- package/dist/cli-bundle/chunks/{restore-6TDVSATY.js → restore-3NGRFDPX.js} +7 -6
- package/dist/cli-bundle/chunks/restore-LNVNUWHE.js +15 -0
- package/dist/cli-bundle/chunks/{schema-TPVTIJPO.js → schema-LMFZ742C.js} +6 -6
- package/dist/cli-bundle/chunks/{schema-HFXFSGPG.js → schema-O34O33UW.js} +6 -6
- package/dist/cli-bundle/chunks/update-BN6VZSYX.js +24 -0
- package/dist/cli-bundle/chunks/{update-LJZCL5SI.js → update-FDLPLKOB.js} +14 -13
- package/dist/cli-bundle/chunks/update-many-WCKOPN3K.js +35 -0
- package/dist/cli-bundle/chunks/update-many-WCKOPN3K.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-X6DVGOMM.js +39 -0
- package/dist/cli-bundle/chunks/update-many-X6DVGOMM.js.map +1 -0
- package/dist/cli-bundle/main.js +65 -64
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +53 -52
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +362 -56
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/cli.js +10 -4
- package/dist/cli.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +7 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/search/background-refresh.d.ts +3 -1
- package/dist/core/search/background-refresh.js +34 -6
- package/dist/core/search/background-refresh.js.map +1 -1
- package/dist/core/search/cache.js +28 -5
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/shared/constants.d.ts +2 -0
- package/dist/core/shared/constants.js +29 -24
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/store/item-metadata-cache.d.ts +32 -1
- package/dist/core/store/item-metadata-cache.js +289 -21
- package/dist/core/store/item-metadata-cache.js.map +1 -1
- package/dist/core/store/item-store.js +71 -34
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings.js +9 -3
- package/dist/core/store/settings.js.map +1 -1
- package/dist/sdk/cli-bootstrap.js +68 -76
- package/dist/sdk/cli-bootstrap.js.map +1 -1
- package/dist/sdk/compile-cache.d.ts +16 -0
- package/dist/sdk/compile-cache.js +73 -0
- package/dist/sdk/compile-cache.js.map +1 -0
- package/dist/sdk/context-relevance.d.ts +16 -1
- package/dist/sdk/context-relevance.js +20 -8
- package/dist/sdk/context-relevance.js.map +1 -1
- package/dist/sdk/context-signal-store.d.ts +77 -0
- package/dist/sdk/context-signal-store.js +201 -0
- package/dist/sdk/context-signal-store.js.map +1 -0
- package/dist/sdk/dependency-provenance.d.ts +12 -0
- package/dist/sdk/dependency-provenance.js +38 -0
- package/dist/sdk/dependency-provenance.js.map +1 -0
- package/dist/sdk/governance/storage-integrity.d.ts +1 -1
- package/dist/sdk/governance/storage-integrity.js +47 -6
- package/dist/sdk/governance/storage-integrity.js.map +1 -1
- package/dist/sdk/graph/assembly.d.ts +2 -0
- package/dist/sdk/graph/assembly.js +51 -4
- package/dist/sdk/graph/assembly.js.map +1 -1
- package/dist/sdk/graph/run.js +12 -13
- package/dist/sdk/graph/run.js.map +1 -1
- package/dist/sdk/index.d.ts +5 -0
- package/dist/sdk/index.js +7 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/item-metadata-index.d.ts +11 -0
- package/dist/sdk/item-metadata-index.js +15 -0
- package/dist/sdk/item-metadata-index.js.map +1 -0
- package/dist/sdk/merge/index.d.ts +1 -0
- package/dist/sdk/merge/index.js +3 -2
- package/dist/sdk/merge/index.js.map +1 -1
- package/dist/sdk/merge/install.js +25 -9
- package/dist/sdk/merge/install.js.map +1 -1
- package/dist/sdk/merge/reconcile.d.ts +46 -0
- package/dist/sdk/merge/reconcile.js +46 -0
- package/dist/sdk/merge/reconcile.js.map +1 -0
- package/dist/sdk/query/list.d.ts +5 -4
- package/dist/sdk/query/list.js +22 -14
- package/dist/sdk/query/list.js.map +1 -1
- package/dist/sdk/relationship-history.d.ts +30 -0
- package/dist/sdk/relationship-history.js +75 -7
- package/dist/sdk/relationship-history.js.map +1 -1
- package/dist/sdk/relationship-migration.d.ts +42 -0
- package/dist/sdk/relationship-migration.js +78 -0
- package/dist/sdk/relationship-migration.js.map +1 -0
- package/dist/sdk/structured-mutations.js +4 -25
- package/dist/sdk/structured-mutations.js.map +1 -1
- package/docs/COMMANDS.md +26 -3
- package/docs/CONFIGURATION.md +1 -1
- package/docs/MERGE_SAFETY.md +14 -5
- package/docs/PERFORMANCE.md +28 -0
- package/docs/RELATIONSHIP_GRAPH.md +47 -1
- package/docs/SDK.md +78 -5
- package/marketplace.json +2 -2
- package/package.json +2 -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-DFETHAZL.js +0 -11
- package/dist/cli-bundle/chunks/chunk-4PUUNQDV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4QSQ6XDK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7AVEY74G.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7DOJC3HS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7RW4JCU2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ADBTSVGK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AMJPSANK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AS4SAZ5R.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ATBCUC7Y.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BKIAH72N.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FJIFFBJX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-HYW67VJ5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ICDAQ4TD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IY6VZ3IW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JFD5LPMI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-K36WV5J6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-K55VMLSS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MWQ2HC2A.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NUF7ROFH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-O4BCOJTZ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-POG76WWZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PQSEQD6E.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QG4GFLQ6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-R3P6FZJW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RNPZYNHS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RPESLSO5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SY4SFZSD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XJTABV3X.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YQWCZ5AC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Z75ONV25.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZTVA4KLN.js.map +0 -7
- package/dist/cli-bundle/chunks/close-O5QVZ6ET.js +0 -12
- package/dist/cli-bundle/chunks/close-many-5RZXVN4J.js +0 -23
- package/dist/cli-bundle/chunks/comments-Z4KV6FU3.js +0 -13
- package/dist/cli-bundle/chunks/copy-M7DDI6LS.js +0 -9
- package/dist/cli-bundle/chunks/create-RGSPN5GD.js +0 -29
- package/dist/cli-bundle/chunks/delete-MD7YXQLH.js +0 -10
- package/dist/cli-bundle/chunks/docs-JWWNRC27.js +0 -14
- package/dist/cli-bundle/chunks/focus-DRQ6FQH6.js +0 -10
- package/dist/cli-bundle/chunks/history-compact-VCKGTX64.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-YTDZRK5E.js +0 -17
- package/dist/cli-bundle/chunks/learnings-CYNOICKR.js +0 -13
- package/dist/cli-bundle/chunks/notes-FGO63FXL.js +0 -13
- package/dist/cli-bundle/chunks/plan-SGCDDTYR.js +0 -26
- package/dist/cli-bundle/chunks/register-list-query-BR435Q2H.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-RWTWLOBE.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-HLWC2WNP.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-ZJX5AZM5.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-RSL7C7LO.js +0 -14
- package/dist/cli-bundle/chunks/update-SIA7LH5Y.js +0 -23
- package/dist/cli-bundle/chunks/update-many-BDBZVGQL.js +0 -38
- package/dist/cli-bundle/chunks/update-many-MOY3A5B3.js +0 -34
- /package/dist/cli-bundle/chunks/{append-7OVFYR3C.js.map → append-CYMA7RJT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-DFETHAZL.js.map → append-H53CAPMP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PFNHX655.js.map → chunk-2P7OK4WG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EJDGV4GR.js.map → chunk-3EBGHNNQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DZRV2OPA.js.map → chunk-3EDFN3VV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZOY5K4D3.js.map → chunk-3PWJWLLQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VXOOB6YX.js.map → chunk-3SJAR3CY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GTLCVJOE.js.map → chunk-3WVKMF2A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LAV26CQG.js.map → chunk-42SYYKA4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NLR32VFS.js.map → chunk-4IXLNV7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ABWCF646.js.map → chunk-4YTQVO3V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E5XMKOSB.js.map → chunk-5EBRMHI6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GKX4NJ7U.js.map → chunk-5K5LHZZX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T6PPNM7V.js.map → chunk-5K7BOAB6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4QOB7L7I.js.map → chunk-5MUZ54G2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SF3DT5HJ.js.map → chunk-5QME4KX2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TRSHFPRZ.js.map → chunk-6PM6CPPP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OR42SO64.js.map → chunk-7B36A3VT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QWRVBJ4D.js.map → chunk-7OR2YKKD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FPBMLYPI.js.map → chunk-7QUV54XX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WWNL6WMH.js.map → chunk-7WXW6JHG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BXNDKOR2.js.map → chunk-A2VL5SVG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-QEMOYZN3.js.map → chunk-AXGDUXJW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IAQE32BI.js.map → chunk-B2AVNGG3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HCEBZNC3.js.map → chunk-BRMPF2RM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z7VWXXJM.js.map → chunk-BTNKMF2A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KH44WBAT.js.map → chunk-CD4643VW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OWXOPDHD.js.map → chunk-CJEEC5O4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PZC2FUOQ.js.map → chunk-CTPKCZCF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7W2UAXXT.js.map → chunk-D4OBQVL3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EWJWSNRU.js.map → chunk-DM4TYC2A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VJQG4BIM.js.map → chunk-DSFTAQ7T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AELMUANP.js.map → chunk-DVB6SQU7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KBLZ3AA5.js.map → chunk-E3ZWOFSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-O5QVZ6ET.js.map → chunk-EP25DV6P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GTK4DTEW.js.map → chunk-F4VCB4WY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-V22ZPOKN.js.map → chunk-F4XAQUQA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QOOTOD3W.js.map → chunk-FGR6IBAF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JSLT7WVE.js.map → chunk-FKBMT2Q6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QIH77CAG.js.map → chunk-G5RLSSIX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P7MTHPJQ.js.map → chunk-GEKRVH3G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2L6ZP22J.js.map → chunk-GSP6IZFU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZVZGXPQ5.js.map → chunk-HYZZM3Q2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4XGJLADW.js.map → chunk-IHY5SX7O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UCBDQI5E.js.map → chunk-IMU7JLUI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PEQGTJ5Q.js.map → chunk-JCLXCGIL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GROYI4RB.js.map → chunk-JLTHOYR7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JHJSFOAM.js.map → chunk-JMPVHM44.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MATHDCGG.js.map → chunk-JWYG36RV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VLRGDBLY.js.map → chunk-KEHOPUHH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CPX275C6.js.map → chunk-KPCZL2YK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FO6OSVEN.js.map → chunk-LANV45W2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LVC72YRD.js.map → chunk-LC5ZUXWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TVYYO5A7.js.map → chunk-MBHYQYCS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7656MAUL.js.map → chunk-MUAJHL2R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7WCE6Y64.js.map → chunk-NUQCSV4P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SZVB53Y3.js.map → chunk-O3GFE2PX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OY7DMU5P.js.map → chunk-O43LEUSD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LZYP423P.js.map → chunk-OZ25YD4Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VZIZB6QH.js.map → chunk-PKYKQCTJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UZLJOEAC.js.map → chunk-PMRED6QZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K4CI6Y45.js.map → chunk-PWGJCP2V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UVN66B3M.js.map → chunk-Q3Z2Y5WJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R7QV7ICM.js.map → chunk-QSXN2FAN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5NTE36LD.js.map → chunk-RBECHH5K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JXCW2TI2.js.map → chunk-RPNC7M63.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F2LBF7XJ.js.map → chunk-SUSFH6F7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VHXHVTUU.js.map → chunk-TDOPC7UY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FSE2IKJQ.js.map → chunk-TWHG646K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OCUBRA6D.js.map → chunk-U7U7WGEC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PONKZPCJ.js.map → chunk-UFRVIIJ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VNTCM3VW.js.map → chunk-VKX2VZZH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6JUTHVQS.js.map → chunk-W2JDNTN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AF2CCM5U.js.map → chunk-XKRVX4B3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JGUKMMRS.js.map → chunk-XN4NQZJK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3P7UJQOX.js.map → chunk-YKFMLQNK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YCIUJJOD.js.map → chunk-YKWKMGL7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TOBGV45Y.js.map → chunk-YUKIFPWK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-72LQ4TKV.js.map → chunk-YYEZEP3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X3W65QK3.js.map → chunk-ZEY3XSZQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QJIKE24M.js.map → chunk-ZQ3UMKWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OG5DVFMA.js.map → chunk-ZXE6SNKO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-5RZXVN4J.js.map → close-GAUIGOQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-RZVTUGBG.js.map → close-SJIEKNY4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-TPU7QRBL.js.map → close-many-B6AIC5OQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-Z4KV6FU3.js.map → close-many-QCINT6I2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-M7DDI6LS.js.map → comments-4SK5EUEJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-DKTSSCK7.js.map → comments-DM5KV2RS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-RGSPN5GD.js.map → copy-4KCCLTYQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-EIFBIVNQ.js.map → copy-HEP5SZHB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-MD7YXQLH.js.map → create-BDKQFPRE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-LCS3VPDH.js.map → create-VCGBCYL2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-YG7UF3VR.js.map → delete-JWDXPR3H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-UH5EQQUY.js.map → delete-ZSPBTVJD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-JWWNRC27.js.map → deps-BZTWWOIE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-G32TK6XS.js.map → deps-OVAJOQIE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-3H32UQ4K.js.map → docs-3GFMSWLL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-4ALMCSKB.js.map → docs-SY2NPT6Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-DRQ6FQH6.js.map → files-2SEL4QIU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-7SOUT5PZ.js.map → files-FYMMJGNN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-VCKGTX64.js.map → focus-4A27YJ2Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-77BT2LUB.js.map → focus-TEUJKTAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-PWTTJ3XS.js.map → history-compact-7QOKL2NB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-LJPZPNFA.js.map → history-compact-U7A37VR6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-I7CBNCV3.js.map → history-redact-TNKUO4ZE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-YTDZRK5E.js.map → history-redact-ZWRUWQY3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-KTYW3AL7.js.map → history-repair-6IU5VWHN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-CYNOICKR.js.map → history-repair-GWCGJUM2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-FGO63FXL.js.map → learnings-DDFAUUX3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-ZERD3KB2.js.map → learnings-GOEZXMKL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-OFJUBIM5.js.map → notes-BZWODAEK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-SGCDDTYR.js.map → notes-OBJ6FL36.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-3THJPIQY.js.map → plan-V57VQTAG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-XEZAMMBW.js.map → plan-ZMOBD6FX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-6TDVSATY.js.map → profile-BG3N4ETA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-RSL7C7LO.js.map → profile-XLM45FKV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-5DA4UZXI.js.map → register-setup-HZ2KKXK4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-6H25M3BH.js.map → register-setup-WCBKJ3H3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-TPVTIJPO.js.map → restore-3NGRFDPX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-HFXFSGPG.js.map → restore-LNVNUWHE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-LJZCL5SI.js.map → schema-LMFZ742C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SIA7LH5Y.js.map → schema-O34O33UW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-MOY3A5B3.js.map → update-BN6VZSYX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-BDBZVGQL.js.map → update-FDLPLKOB.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../sdk/search-refresh-worker.ts", "../../../../../../../sdk/telemetry-flush.ts", "../../../../../../../sdk/define.ts", "../../../../../../../sdk/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module sdk/search-refresh-worker\n *\n * Owns the detached semantic-refresh worker entry used by custom mutation hosts.\n */\nimport { runSemanticRefreshWorker } from \"../core/search/background-refresh.js\";\nimport { refreshSemanticEmbeddingsForMutatedItems } from \"../core/search/cache.js\";\nimport { resolvePmRoot } from \"../core/store/paths.js\";\n\n/** Drain the active workspace's pending semantic-refresh queue. */\nexport async function runSearchRefreshWorkerEntrypoint(): Promise<void> {\n const pmRoot = resolvePmRoot(process.cwd(), process.env.PM_PATH);\n await runSemanticRefreshWorker(pmRoot, (root, itemIds) =>\n refreshSemanticEmbeddingsForMutatedItems(root, itemIds, {\n apply_runtime_defaults: true,\n }),\n );\n}\n", "/**\n * @module sdk/telemetry-flush\n *\n * Owns explicit telemetry queue draining for embedded and detached hosts.\n */\nimport { flushTelemetryQueueNow } from \"../core/telemetry/runtime.js\";\n\n/** Flush the durable telemetry queue immediately. */\nexport async function flushTelemetryQueue(): Promise<void> {\n await flushTelemetryQueueNow();\n}\n", "/**\n * @module sdk/define\n *\n * Authoring-time typed builders for every extension registration surface.\n *\n * These `define*` helpers are the third leg of the SDK ergonomics tripod:\n * {@link ../core/extensions/loader.js#ExtensionApi | `api.register*`} registers\n * a definition at activation, the `assert*`/`run*` testing helpers verify and\n * invoke it, and these builders let authors *write* the definition with full\n * type-checking and editor inference before it ever reaches `activate`.\n *\n * Every builder is a zero-cost identity function that returns its argument\n * unchanged — exactly like the SDK's {@link ./index.js#defineExtension} and the\n * wider `defineConfig`/`defineComponent` ecosystem convention. Extensions are\n * authored fully in TypeScript (ADR pm-2c28); these builders are where that type\n * safety is anchored at the definition site. Their value is entirely at the type\n * level:\n *\n * - A bare `const cmd = { ... }` satisfies the registration type only\n * structurally and widens its literals; `const cmd = defineCommand({ ... })`\n * checks the object against the contract *and* preserves the narrow literal\n * type, while inferring the nested handler's `context` parameter from the\n * builder signature.\n * - Definitions can be colocated, exported, reused, and unit-tested apart from\n * the `activate` call instead of being trapped as inline literals.\n *\n * Object-definition builders use a generic constraint (`<T extends Def>`) so the\n * narrow literal type survives the round-trip, mirroring `defineExtension`.\n * Function-definition builders are intentionally non-generic: a generic\n * constrained to a whole function type suppresses contextual typing of a bare\n * arrow's parameter (it would fall back to implicit `any`), whereas the\n * non-generic signature lets TypeScript type the handler parameter from the\n * declared function type.\n */\nimport type {\n AfterCommandHook,\n BeforeCommandHook,\n CommandDefinition,\n CommandOverride,\n Exporter,\n ExtensionManifest,\n FlagDefinition,\n Importer,\n OnIndexHook,\n OnReadHook,\n OnWriteHook,\n ParserOverride,\n PreflightOverride,\n RendererOverride,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SearchProviderDefinition,\n ServiceOverride,\n VectorStoreAdapterDefinition,\n} from \"../core/extensions/loader.js\";\nimport type { ProjectProfileDefinition } from \"../core/profile/profile-presets.js\";\n\n/**\n * Type an extension's in-module manifest mirror (the `manifest` export / field).\n *\n * Completes the `define*` family: the manifest is the one authoring surface that\n * otherwise had no builder. Contract-checks the object against\n * {@link ExtensionManifest} where it is authored, catching a missing required\n * field or a mistyped key at edit time instead of at load time. Pair with\n * {@link ./compose.js#deriveExtensionCapabilities | `deriveExtensionCapabilities`}\n * to keep `capabilities` matched to the surfaces the extension actually registers.\n */\nexport function defineExtensionManifest<TManifest extends ExtensionManifest>(\n manifest: TManifest,\n): TManifest {\n return manifest;\n}\n\n/**\n * Type a project-profile definition for the profile registry.\n *\n * A profile bundles item types, statuses, fields, per-type workflows, config\n * knobs, create templates, and package recommendations into one declarative\n * archetype that `pm profile apply` stages idempotently. This builder checks the\n * object against {@link ProjectProfileDefinition} where it is authored — catching\n * an invalid field type or a malformed workflow at edit time — while preserving\n * the literal `name`/`types`/`statuses` so a package's archetype stays strongly\n * typed at the definition site, mirroring {@link defineItemType}. It is the\n * authoring anchor a first-party or third-party profile package builds on.\n */\nexport function defineProjectProfile<TProfile extends ProjectProfileDefinition>(\n profile: TProfile,\n): TProfile {\n return profile;\n}\n\n/**\n * Type a command definition for `api.registerCommand(definition)`.\n *\n * Checks the object against {@link CommandDefinition} and infers the `run`\n * handler's `context` parameter while preserving the literal `name`/`action`\n * types. Pass the result straight to `registerCommand`, or export it so the\n * command can be invoked in tests via `runRegisteredCommandForTest`.\n */\nexport function defineCommand<TDefinition extends CommandDefinition>(\n definition: TDefinition,\n): TDefinition {\n return definition;\n}\n\n/**\n * Type a single flag definition for a `api.registerFlags(command, flags)` array.\n *\n * Authors compose builders into the array\n * (`api.registerFlags(\"list\", [defineFlag({ long: \"--mine\" })])`) to get\n * per-flag contract checking — `value_type`, `list`, and `default` included —\n * instead of validating a loosely-typed literal array all at once.\n */\nexport function defineFlag<TFlag extends FlagDefinition>(flag: TFlag): TFlag {\n return flag;\n}\n\n/**\n * Type a custom item-type definition for `api.registerItemTypes([...])`.\n *\n * Preserves the literal `name`/`folder`/`aliases` so a project archetype's\n * domain types stay strongly typed where the definition is declared and reused.\n */\nexport function defineItemType<TType extends SchemaItemTypeDefinition>(\n type: TType,\n): TType {\n return type;\n}\n\n/**\n * Type a custom item-metadata field definition for `api.registerItemFields([...])`.\n *\n * Checks `name`/`type`/`optional` against {@link SchemaFieldDefinition} while\n * keeping the field's extra metadata (the contract carries an index signature)\n * intact.\n */\nexport function defineItemField<TField extends SchemaFieldDefinition>(\n field: TField,\n): TField {\n return field;\n}\n\n/**\n * Type a schema migration definition for `api.registerMigration(definition)`.\n *\n * Preserves the literal `id` and, when `run` is provided, infers the migration\n * runner's context, so the same definition can be registered and later exercised\n * through `runRegisteredMigrationForTest`.\n */\nexport function defineMigration<TMigration extends SchemaMigrationDefinition>(\n migration: TMigration,\n): TMigration {\n return migration;\n}\n\n/**\n * Type a search-provider definition for `api.registerSearchProvider(provider)`.\n *\n * Infers the `query`/`embed`/`embedBatch` operation contexts and result shapes\n * so a custom retrieval backend is type-checked at the definition site and\n * reusable in `runRegisteredSearchProviderForTest`.\n */\nexport function defineSearchProvider<\n TProvider extends SearchProviderDefinition,\n>(provider: TProvider): TProvider {\n return provider;\n}\n\n/**\n * Type a vector-store adapter definition for `api.registerVectorStoreAdapter(adapter)`.\n *\n * Infers the `query`/`upsert`/`delete` operation contexts so a package that owns\n * its own semantic index storage gets contract checking before activation and a\n * definition it can drive through `runRegisteredVectorStoreAdapterForTest`.\n */\nexport function defineVectorStoreAdapter<\n TAdapter extends VectorStoreAdapterDefinition,\n>(adapter: TAdapter): TAdapter {\n return adapter;\n}\n\n/**\n * Type a command-override handler for `api.registerCommand(command, override)`.\n *\n * The non-generic signature lets TypeScript contextually type the override's\n * `context` parameter from {@link CommandOverride}, so a bare arrow authored in\n * a `.js` package still gets a fully-typed argument.\n */\nexport function defineCommandOverride(\n override: CommandOverride,\n): CommandOverride {\n return override;\n}\n\n/**\n * Type a parser-override handler for `api.registerParser(command, override)`.\n *\n * Contextually types the `context` parameter and the returned\n * {@link ParserOverride} delta so an argument-rewriting override is checked\n * where it is written.\n */\nexport function defineParserOverride(override: ParserOverride): ParserOverride {\n return override;\n}\n\n/**\n * Type a preflight-override handler for `api.registerPreflight(override)`.\n *\n * Contextually types the `context` parameter and the returned gate decision so a\n * package's pre-run validation override is checked at the definition site.\n */\nexport function definePreflightOverride(\n override: PreflightOverride,\n): PreflightOverride {\n return override;\n}\n\n/**\n * Type a service-override handler for `api.registerService(service, override)`.\n *\n * Contextually types the `context` parameter from {@link ServiceOverride} so a\n * package overriding a built-in service (output formatting, embeddings, and the\n * like) keeps its handler argument typed without an explicit annotation.\n */\nexport function defineServiceOverride(\n override: ServiceOverride,\n): ServiceOverride {\n return override;\n}\n\n/**\n * Type a renderer-override handler for `api.registerRenderer(format, renderer)`.\n *\n * Contextually types the `context` parameter and the `string | null | undefined`\n * return contract so a custom output renderer is checked where it is authored.\n */\nexport function defineRendererOverride(\n renderer: RendererOverride,\n): RendererOverride {\n return renderer;\n}\n\n/**\n * Type an importer handler for `api.registerImporter(name, importer, options)`.\n *\n * Contextually types the {@link Importer} `context` (registration, args,\n * options, pm root) so the bridge from an external system into the pm context\n * graph is type-checked and reusable in `runRegisteredImporterForTest`.\n */\nexport function defineImporter(importer: Importer): Importer {\n return importer;\n}\n\n/**\n * Type an exporter handler for `api.registerExporter(name, exporter, options)`.\n *\n * Contextually types the {@link Exporter} `context` so the bridge from the pm\n * context graph out to an external system is checked at the definition site and\n * reusable in `runRegisteredExporterForTest`.\n */\nexport function defineExporter(exporter: Exporter): Exporter {\n return exporter;\n}\n\n/**\n * Type a `before_command` hook for `api.hooks.beforeCommand(hook)`.\n *\n * Contextually types the {@link BeforeCommandHook} `context` so a hook that\n * inspects or annotates a command before it runs keeps its argument typed when\n * authored as a standalone, exportable, testable value.\n */\nexport function defineBeforeCommandHook(\n hook: BeforeCommandHook,\n): BeforeCommandHook {\n return hook;\n}\n\n/**\n * Type an `after_command` hook for `api.hooks.afterCommand(hook)`.\n *\n * Contextually types the {@link AfterCommandHook} `context` — including the\n * `affected` items pm mutated — so the natural place to react to every change\n * (\"project management = context management\") is checked where it is written.\n */\nexport function defineAfterCommandHook(\n hook: AfterCommandHook,\n): AfterCommandHook {\n return hook;\n}\n\n/**\n * Type an `on_write` hook for `api.hooks.onWrite(hook)`.\n *\n * Contextually types the {@link OnWriteHook} `context` so a hook reacting to\n * item persistence keeps its argument typed without an explicit annotation.\n */\nexport function defineOnWriteHook(hook: OnWriteHook): OnWriteHook {\n return hook;\n}\n\n/**\n * Type an `on_read` hook for `api.hooks.onRead(hook)`.\n *\n * Contextually types the {@link OnReadHook} `context` so a hook augmenting items\n * as they are read is type-checked at the definition site.\n */\nexport function defineOnReadHook(hook: OnReadHook): OnReadHook {\n return hook;\n}\n\n/**\n * Type an `on_index` hook for `api.hooks.onIndex(hook)`.\n *\n * Contextually types the {@link OnIndexHook} `context` so a hook participating\n * in index/search refresh keeps its argument typed even without TypeScript\n * annotations.\n */\nexport function defineOnIndexHook(hook: OnIndexHook): OnIndexHook {\n return hook;\n}\n", "/**\n * @module sdk/index\n *\n * Defines public SDK APIs and package-author helpers for Index.\n */\nexport {\n isErrnoError,\n limitAnnotationEntries,\n parseAnnotationTextInput,\n readAnnotationEntries,\n resolveAnnotationInput,\n resolveAnnotationIndex,\n runAnnotationCommand,\n wrapOwnershipConflict,\n type AnnotationCommandConfig,\n type AnnotationCommandOptions,\n type AnnotationCommandResult,\n type AnnotationEntry,\n type AnnotationInput,\n type AnnotationSourceOptions,\n type OwnershipConflictGuidance,\n} from \"./annotations.js\";\nexport {\n inspectHistoryAuthorStream,\n scanHistoryAuthorAttribution,\n type HistoryAuthorAttributionScan,\n type UnknownAuthorHistoryEvent,\n} from \"./author-attribution.js\";\nexport { createPmCliProgram } from \"./cli-program.js\";\nexport { runSearchRefreshWorkerEntrypoint } from \"./search-refresh-worker.js\";\nexport { flushTelemetryQueue } from \"./telemetry-flush.js\";\nexport {\n EXECUTABLE_COMMAND_ALIASES,\n applyBootstrapPagerPolicy,\n coalesceRepeatedListFlags,\n listAliasPluralKeys,\n mergeLinkedTestTwoTokenEntries,\n normalizeBootstrapInvocation,\n normalizeLegacyExtensionActionSyntax,\n parseBootstrapCommandName,\n parseBootstrapGlobalOptions,\n parseBootstrapHelpRequest,\n parseBootstrapTypeValue,\n stripGlobalBootstrapTokens,\n type BootstrapGlobalOptions,\n type BootstrapHelpRequest,\n type BootstrapInvocationNormalizationResult,\n type BootstrapNormalizationEvent,\n} from \"./cli-bootstrap.js\";\nexport {\n quoteCommandArg,\n quoteWindowsCommandArg,\n renderPmCommand,\n} from \"./command-line.js\";\nexport {\n runGc,\n type GcCheckpointsSummary,\n type GcLocksSummary,\n} from \"./governance/gc.js\";\nexport {\n _testOnlyHealthCommand,\n runHealth,\n type HealthCheck,\n} from \"./governance/health.js\";\nexport {\n _testOnlyValidateCommand,\n runValidate,\n type ValidateCheck,\n type ValidateFixesSummary,\n type ValidateMutationServices,\n} from \"./governance/validate.js\";\nexport { runExtension } from \"./extension.js\";\nexport {\n runWithActiveExtensions,\n type ActiveExtensionScopeOptions,\n} from \"./runtime.js\";\nexport { applyInvocationAuthorOverride } from \"./invocation-author.js\";\nexport { describeItemOwnershipConflict } from \"./ownership-source.js\";\nexport { discoverNearbyPmRoot } from \"./tracker-root-discovery.js\";\nexport {\n _testOnly as _testOnlyTemplates,\n type TemplateSource,\n} from \"./templates.js\";\nexport {\n runConfig,\n _testOnlyConfigCommand,\n type NestedSettingResultValue,\n} from \"./config.js\";\nexport {\n INIT_AGENT_GUIDANCE_MODE_VALUES,\n runInitAgentGuidance,\n _testOnly as _testOnlyInitAgentGuidance,\n type InitAgentGuidanceMode,\n type InitAgentGuidanceSummary,\n type RunInitAgentGuidanceOptions,\n type RunInitAgentGuidanceResult,\n} from \"./init-agent-guidance.js\";\nexport {\n runInit,\n summarizeInitResult,\n _testOnly as _testOnlyInit,\n type InitAgentGuidanceResult,\n type InitConciseResult,\n type InitInstalledPackagesSummary,\n type InitRegisteredTypePresetSummary,\n type InitTargetResolution,\n type InitTypePresetName,\n} from \"./init.js\";\nexport {\n PROFILE_SUBCOMMANDS,\n formatProfileApplyHuman,\n formatProfileLintHuman,\n formatProfileListHuman,\n formatProfileShowHuman,\n runProfileApply,\n runProfileLint,\n runProfileList,\n runProfileShow,\n type ProfileApplyDimension,\n type ProfileComposition,\n type ProfileListEntry,\n} from \"./profile.js\";\nimport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_TRUST_MODES,\n} from \"../core/extensions/loader.js\";\nexport { RESERVED_ITEM_FIELD_NAMES } from \"../core/extensions/item-fields.js\";\nexport {\n PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,\n PM_PACKAGE_RESOURCE_KINDS,\n collectPackageExtensionDirectories,\n readPmPackageManifest,\n type PmPackageCatalogLinkMap,\n type PmPackageCatalogMediaMap,\n type PmPackageCatalogMetadata,\n type PmPackageManifest,\n type PmPackageResourceKind,\n type PmPackageResourceMap,\n} from \"../core/packages/manifest.js\";\nexport type {\n CommanderOptionAliasContract,\n CommanderOptionRegistrationContract,\n} from \"./cli-contracts.js\";\nexport {\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,\n APPEND_FLAG_CONTRACTS,\n CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,\n CALENDAR_FLAG_CONTRACTS,\n CLAIM_FLAG_CONTRACTS,\n CLOSE_FLAG_CONTRACTS,\n CLOSE_MANY_FLAG_CONTRACTS,\n CLOSE_TASK_FLAG_CONTRACTS,\n COMMENTS_FLAG_CONTRACTS,\n COMPLETION_FLAG_CONTRACTS,\n CONFIG_FLAG_CONTRACTS,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n CONTEXT_FLAG_CONTRACTS,\n CONTRACTS_FLAG_CONTRACTS,\n COPY_FLAG_CONTRACTS,\n CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS,\n CREATE_FLAG_CONTRACTS,\n DELETE_FLAG_CONTRACTS,\n DEPS_FLAG_CONTRACTS,\n DOCS_FLAG_CONTRACTS,\n EVAL_FLAG_CONTRACTS,\n EXTENSION_ACTIVATE_FLAG_CONTRACTS,\n EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,\n EXTENSION_ADOPT_FLAG_CONTRACTS,\n EXTENSION_CATALOG_FLAG_CONTRACTS,\n EXTENSION_DEACTIVATE_FLAG_CONTRACTS,\n EXTENSION_DESCRIBE_FLAG_CONTRACTS,\n EXTENSION_DOCTOR_FLAG_CONTRACTS,\n EXTENSION_EXPLORE_FLAG_CONTRACTS,\n EXTENSION_FLAG_CONTRACTS,\n EXTENSION_INIT_FLAG_CONTRACTS,\n EXTENSION_INSTALL_FLAG_CONTRACTS,\n EXTENSION_MANAGE_FLAG_CONTRACTS,\n EXTENSION_RELOAD_FLAG_CONTRACTS,\n EXTENSION_SCOPE_FLAG_CONTRACTS,\n EXTENSION_UNINSTALL_FLAG_CONTRACTS,\n FILES_FLAG_CONTRACTS,\n FOCUS_FLAG_CONTRACTS,\n GC_FLAG_CONTRACTS,\n GET_FLAG_CONTRACTS,\n GLOBAL_FLAG_CONTRACTS,\n GUIDE_FLAG_CONTRACTS,\n HEALTH_FLAG_CONTRACTS,\n HISTORY_COMPACT_FLAG_CONTRACTS,\n HISTORY_FLAG_CONTRACTS,\n HISTORY_REDACT_FLAG_CONTRACTS,\n HISTORY_REPAIR_FLAG_CONTRACTS,\n INIT_FLAG_CONTRACTS,\n INSTALL_FLAG_CONTRACTS,\n LEARNINGS_FLAG_CONTRACTS,\n LIST_COMMANDER_STRING_OPTION_CONTRACTS,\n LIST_FILTER_FLAG_CONTRACTS,\n MEET_FLAG_CONTRACTS,\n NEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n NEXT_FLAG_CONTRACTS,\n NOTES_FLAG_CONTRACTS,\n PACKAGE_FLAG_CONTRACTS,\n PACKAGE_INIT_FLAG_CONTRACTS,\n PAUSE_TASK_FLAG_CONTRACTS,\n PLAN_FLAG_CONTRACTS,\n PM_CORE_COMMAND_NAMES,\n PM_EXTENSION_CAPABILITY_CONTRACTS,\n PM_EXTENSION_POLICY_MODE_CONTRACTS,\n PM_EXTENSION_POLICY_SURFACE_CONTRACTS,\n PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,\n PM_EXTENSION_SERVICE_NAME_CONTRACTS,\n PM_EXTENSION_TRUST_MODE_CONTRACTS,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,\n PM_TOOL_ACTIONS,\n PM_TOOL_ACTION_PARAMETER_CONTRACTS,\n PM_TOOL_PARAMETERS_SCHEMA,\n PM_TOOL_PARAMETERS_SCHEMA_MAJOR,\n PM_TOOL_PARAMETERS_SCHEMA_VERSION,\n PROFILE_FLAG_CONTRACTS,\n REINDEX_FLAG_CONTRACTS,\n RELEASE_FLAG_CONTRACTS,\n REMIND_FLAG_CONTRACTS,\n RESTORE_FLAG_CONTRACTS,\n SCHEMA_FLAG_CONTRACTS,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,\n SEARCH_FLAG_CONTRACTS,\n START_TASK_FLAG_CONTRACTS,\n STATS_FLAG_CONTRACTS,\n SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,\n TELEMETRY_FLAG_CONTRACTS,\n TEST_ALL_FLAG_CONTRACTS,\n TEST_FLAG_CONTRACTS,\n TEST_RUNS_FLAG_CONTRACTS,\n TOOL_ACTIVITY_OPTION_CONTRACTS,\n TOOL_AGGREGATE_OPTION_CONTRACTS,\n TOOL_CALENDAR_OPTION_CONTRACTS,\n TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_CONTEXT_OPTION_CONTRACTS,\n TOOL_CREATE_OPTION_CONTRACTS,\n TOOL_DEPS_OPTION_CONTRACTS,\n TOOL_LIST_FILTER_OPTION_CONTRACTS,\n TOOL_SEARCH_FILTER_OPTION_CONTRACTS,\n TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,\n TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_UPDATE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,\n UPDATE_FLAG_CONTRACTS,\n UPDATE_MANY_FLAG_CONTRACTS,\n UPGRADE_FLAG_CONTRACTS,\n compactFlagAliasContracts,\n isPmExtensionCapabilityContract,\n isPmExtensionPolicyModeContract,\n isPmExtensionPolicySurfaceContract,\n isPmExtensionServiceNameContract,\n isPmToolAction,\n readFirstStringFromCommanderOptions,\n readFirstValueFromCommanderOptions,\n readStringArrayFromCommanderOptions,\n resolveSubcommandFlagContractsForCommand,\n toCompletionFlagString,\n withFlagAliasMetadata,\n} from \"./cli-contracts.js\";\nexport type {\n CliFlagContract,\n OptionsFromContracts,\n PmActionSchemaContract,\n PmBulkMutationControlOptions,\n PmBulkMutationFilterOptions,\n PmCloseActionOptions,\n PmCloseManyActionOptions,\n PmCreateActionOptions,\n PmMutationAttributionOptions,\n PmOptionScalar,\n PmUpdateActionOptions,\n PmUpdateManyActionOptions,\n PmExtensionCapabilityContract,\n PmExtensionPolicyModeContract,\n PmExtensionPolicySurfaceContract,\n PmExtensionSandboxProfileContract,\n PmExtensionServiceNameContract,\n PmExtensionTrustModeContract,\n PmToolAction,\n ToolOptionFlagContract,\n} from \"./cli-contracts.js\";\nexport * from \"./compose.js\";\nexport * from \"./context-relevance.js\";\nexport * from \"./context-packing.js\";\nexport * from \"./context-usage.js\";\nexport * from \"./history-compact.js\";\nexport * from \"./history-read.js\";\nexport * from \"./history-redact.js\";\nexport * from \"./history-repair.js\";\nexport * from \"./item-children.js\";\nexport * from \"./item-schedule.js\";\nexport * from \"./merge/index.js\";\nexport {\n runDeps,\n type DepsCollapseMode,\n type DepsFormat,\n type DepsGraphEdge,\n type DepsGraphNode,\n type DepsGraphResult,\n type DepsTreeNode,\n} from \"./dependencies.js\";\nexport * from \"./graph/index.js\";\nexport { runDocs } from \"./docs.js\";\nexport {\n runFiles,\n runFilesDiscover,\n type FilesDiscoveryCandidate,\n} from \"./files.js\";\nexport {\n applyPathMigrations,\n applyStandaloneNote,\n artifactKey,\n dedupeLinkedArtifacts,\n ensureScope,\n expandAddGlobEntries,\n normalizeLinkedPath,\n parseAddEntries,\n parseAddGlobEntries,\n parseMigrateEntries,\n parseRemoveEntries,\n renameArtifactsResultKey,\n runLinkedArtifacts,\n sortLinkedArtifacts,\n validateLinkedPaths,\n type AddGlobEntry,\n type LinkedArtifact,\n type LinkedArtifactCommandOptions,\n type LinkedArtifactKindConfig,\n type LinkedArtifactResult,\n type LinkedPathValidation,\n type PathMigration,\n} from \"./linked-artifacts.js\";\nexport * from \"./pagination.js\";\nexport * from \"./query/item-filter-options.js\";\nexport * from \"./query/parsers.js\";\nexport * from \"./output.js\";\nexport * from \"./relationship-analytics.js\";\nexport * from \"./relationship-context.js\";\nexport * from \"./relationship-history.js\";\nexport * from \"./workspace-transaction.js\";\nexport * from \"./workspace-transaction-gc.js\";\nexport * from \"./item-transaction.js\";\nexport * from \"./structured-mutations.js\";\nexport * from \"./runtime-primitives.js\";\nexport * from \"./error-runtime.js\";\nexport * from \"./relationships.js\";\nexport * from \"./actionability.js\";\nexport type {\n PlanCommandOptions,\n PlanCommandResult,\n PlanDispatchInput,\n PlanResultPlan,\n PlanShowDepth,\n PlanStepSummary,\n PlanSubcommand,\n PlanTemplateName,\n} from \"../cli/commands/plan.js\";\nexport {\n PLAN_SHOW_DEPTH_VALUES,\n PLAN_SUBCOMMANDS,\n PLAN_TEMPLATE_NAMES,\n} from \"../cli/commands/plan.js\";\nexport * from \"./define.js\";\nexport {\n BASELINE_ITEM_FORMAT_VERSION,\n BUILTIN_ITEM_TYPE_VALUES,\n CONFIDENCE_TEXT_VALUES,\n CURRENT_ITEM_FORMAT_VERSION,\n DEPENDENCY_KIND_VALUES,\n EXIT_CODE,\n ISSUE_SEVERITY_VALUES,\n ITEM_TYPE_VALUES,\n PM_CLI_EXPECTED_ERROR_NAME,\n PmCliError,\n PmClient,\n RISK_VALUES,\n STATUS_VALUES,\n acquireLock,\n appendHistoryEntry,\n canonicalDocument,\n classifyItemFormatVersion,\n clearWorkspaceContractsCache,\n commitImportedItem,\n createHistoryEntry,\n createPmCliExpectedError,\n effectiveItemFormatVersion,\n emptyImportedDocument,\n ensureTrackerInitialized,\n generateItemId,\n getActiveExtensionRegistrations,\n getContracts,\n getHistoryPath,\n getItemPath,\n getSettingsPath,\n getWorkspaceContracts,\n isPmCliExpectedError,\n isTimestampLiteral,\n listAllItemMetadata,\n loadCreateTemplateOptions,\n locateItem,\n normalizeItemMetadata,\n normalizeItemFormatVersion,\n normalizeItemId,\n normalizeRawItemId,\n normalizeStatusInput,\n nowIso,\n parseTags,\n pathExists,\n readBooleanOption,\n readCsvListOption,\n readFileIfExists,\n readLocatedItem,\n readRequiredString,\n readSettings,\n readStringOption,\n removeFileIfExists,\n renderCalendarMarkdown,\n renderCalendarToon,\n renderGuideMarkdown,\n resolveCalendarOutputFormat,\n resolveGuideOutputFormat,\n resolveItemTypeRegistry,\n resolvePmRoot,\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n runAction,\n runActiveOnReadHooks,\n runActiveOnWriteHooks,\n runCalendar,\n runCompletion,\n runGuide,\n runList,\n runReindex,\n runSearch,\n runTemplatesList,\n runTemplatesSave,\n runTemplatesShow,\n runTestRunsList,\n runTestRunsLogs,\n runTestRunsResume,\n runTestRunsStatus,\n runTestRunsStop,\n scanItemFormatVersions,\n selectImportAuthor,\n serializeItemDocument,\n splitFrontMatter,\n toEstimatedMinutesValue,\n toImportBoolean,\n toImportConfidence,\n toImportInteger,\n toImportLinkedDocs,\n toImportLinkedFiles,\n toImportLinkedTests,\n toImportLogEntries,\n toImportNormalizedEnum,\n toImportNumberMap,\n toImportPriority,\n toImportStatus,\n toImportStringList,\n toImportStringMap,\n toImportTags,\n toNonEmptyImportString,\n writeFileAtomic,\n aggregate,\n append,\n claim,\n claimNext,\n close,\n closeTask,\n comments,\n config,\n context,\n copy,\n create,\n deleteItem,\n deps,\n docs,\n extension,\n extensionActivate,\n extensionDeactivate,\n extensionList,\n files,\n filesDiscover,\n focus,\n gc,\n get,\n graph,\n health,\n historyCompact,\n historyCompactBulk,\n historyRedact,\n historyRepair,\n historyRepairAll,\n init,\n learnings,\n list,\n next,\n notes,\n packageActivate,\n packageCatalog,\n packageDeactivate,\n packageDescribe,\n packageDoctor,\n packageInstall,\n packageLifecycle,\n packageList,\n packageManage,\n packageReload,\n packageUninstall,\n pauseTask,\n profile,\n profileApply,\n profileLint,\n profileList,\n profileShow,\n release,\n restore,\n schema,\n schemaAddField,\n schemaAddStatus,\n schemaAddType,\n schemaApplyPreset,\n schemaInferTypes,\n schemaList,\n schemaListFields,\n schemaRemoveField,\n schemaRemoveStatus,\n schemaRemoveType,\n schemaShow,\n schemaShowField,\n schemaShowStatus,\n search,\n startTask,\n stats,\n update,\n upgrade,\n validate,\n type AggregateOptions,\n type AggregateResult,\n type AggregateRow,\n type AppendCommandOptions,\n type AppendResult,\n type BlockerEntry,\n type CalendarOptions,\n type CalendarResult,\n type ClaimResult,\n type CloseResult,\n type CloseTaskResult,\n type CommitImportedItemParams,\n type CommitImportedItemResult,\n type CommentsCommandOptions,\n type CommentsResult,\n type ConfigCommandOptions,\n type ConfigResult,\n type CompletionResult,\n type CompletionShell,\n type ContractsCommandOptions,\n type ContractsResult,\n type ContextFocusItem,\n type ContextOptions,\n type ContextOutputFormat,\n type ContextResult,\n type CopyResult,\n type CreatePmCliExpectedErrorOptions,\n type CreateResult,\n type CreateTemplateOptions,\n type Dependency,\n type DeleteResult,\n type DepsCommandOptions,\n type DepsResult,\n type DocsCommandOptions,\n type DocsResult,\n type ExtensionCommandOptions,\n type ExtensionCommandResult,\n type FilesCommandOptions,\n type FilesDiscoverOptions,\n type FilesDiscoverResult,\n type FilesResult,\n type FocusResult,\n type GcCommandOptions,\n type GcResult,\n type GetContractsOptions,\n type GetOptions,\n type GetResult,\n type GuideDepth,\n type GuideOptions,\n type GuideOutputFormat,\n type GuideResult,\n type HealthResult,\n type ImportLinkedScope,\n type InitCommandOptions,\n type InitResult,\n type ItemFormatVersionScanEntry,\n type ItemFormatVersionScanResult,\n type ItemFormatVersionStatus,\n type LearningsCommandOptions,\n type LearningsResult,\n type LinkedDoc,\n type LinkedFile,\n type LinkedTest,\n type ListedItem,\n type ListCompactResult,\n type ListFullResult,\n type ListOptions,\n type ListProjectedItem,\n type ListProjectedItemCore,\n type ListResult,\n type ListResultItem,\n type ListSortField,\n type ListSortOrder,\n type ListTreeItem,\n type ListTreeMetadata,\n type ListVerboseResult,\n type LogNote,\n type NextActionableItem,\n type NextBlockerRef,\n type NextOptions,\n type NextOutputFormat,\n type NextRecommendation,\n type NextResult,\n type NotesCommandOptions,\n type NotesResult,\n type PackageCommandOptions,\n type PackageCommandResult,\n type PauseTaskResult,\n type PmActionInput,\n type PmActionName,\n type PmActionOptions,\n type PmClientCloseActionOptions,\n type PmClientFullMutationOptions,\n type PmClientMutationOptions,\n type PmClientOptions,\n type PmClientRunArgs,\n type PmCliExpectedError,\n type ProfileApplyCommandOptions,\n type ProfileApplyResult,\n type ProfileLintResult,\n type ProfileListResult,\n type ProfileResult,\n type ProfileShowResult,\n type ProfileSubcommand,\n type ReindexOptions,\n type ReindexResult,\n type ReleaseResult,\n type RestoreResult,\n type RunHealthOptions,\n type SchemaAddFieldCommandOptions,\n type SchemaAddFieldResult,\n type SchemaAddStatusCommandOptions,\n type SchemaAddStatusResult,\n type SchemaAddTypeCommandOptions,\n type SchemaAddTypeInferCommandOptions,\n type SchemaAddTypeInferResult,\n type SchemaAddTypeResult,\n type SchemaApplyPresetCommandOptions,\n type SchemaApplyPresetResult,\n type SchemaInspectResult,\n type SchemaListFieldsResult,\n type SchemaListResult,\n type SchemaRemoveFieldCommandOptions,\n type SchemaRemoveFieldResult,\n type SchemaRemoveStatusCommandOptions,\n type SchemaRemoveStatusResult,\n type SchemaRemoveTypeCommandOptions,\n type SchemaRemoveTypeResult,\n type SchemaShowFieldResult,\n type SchemaShowResult,\n type SchemaShowStatusResult,\n type SchemaResult,\n type SchemaSubcommand,\n type SearchCompactResult,\n type SearchHit,\n type SearchHitHighlight,\n type SearchMatchMode,\n type SearchOptions,\n type ClaimNextOptions,\n type SearchResult,\n type SearchResultItem,\n type SearchVerboseResult,\n type StartTaskResult,\n type StatsCommandOptions,\n type StatsResult,\n type TemplatesListResult,\n type TemplatesSaveResult,\n type TemplatesShowResult,\n type TestRunsListCommandOptions,\n type TestRunsLogsCommandOptions,\n type TestRunsResumeCommandOptions,\n type TestRunsStopCommandOptions,\n type ToImportLinkedArtifactsOptions,\n type ToImportLinkedTestsOptions,\n type ToImportLogEntriesOptions,\n type UpdateResult,\n type UpgradeCommandOptions,\n type UpgradeResult,\n type ValidateCommandOptions,\n type ValidateResult,\n type WorkspaceContracts,\n type WorkspaceContractsOptions,\n} from \"./runtime.js\";\nexport { runStats } from \"./stats.js\";\nexport {\n DEFAULT_EVAL_QUERIES_RELATIVE_PATH,\n runEval,\n type EvalOptions,\n type EvalQueryReport,\n type EvalResult,\n} from \"./eval.js\";\nexport {\n runTelemetry,\n TELEMETRY_SUBCOMMANDS,\n type TelemetryCommandOptions,\n type TelemetrySubcommand,\n} from \"./telemetry.js\";\nexport {\n classifyLinkedTestFailure,\n countFailureCategories,\n extractReferencedPmItemIdsFromCommand,\n resolveLinkedTestFailureExitCode,\n runLinkedTests,\n runTest,\n summarizeContextPreflight,\n type LinkedTestFailureCategory,\n type TestCommandOptions,\n type TestResult,\n type TestRunResult,\n} from \"./test/execution.js\";\nexport {\n runTestAll,\n type TestAllCommandOptions,\n type TestAllItemResult,\n type TestAllResult,\n} from \"./test/batch.js\";\nexport {\n LINKED_TEST_ENV_NAME_PATTERN,\n LINKED_TEST_PM_CONTEXT_MODE_VALUES,\n LINKED_TEST_PROTECTED_ENV_KEYS,\n parseLinkedTestAssertionEqualsMap,\n parseLinkedTestAssertionGteMap,\n parseLinkedTestBoolean,\n parseLinkedTestContextMode,\n parseLinkedTestEnvClear,\n parseLinkedTestEnvSet,\n parseLinkedTestJsonEntries,\n parseLinkedTestMinLines,\n parseLinkedTestRegexList,\n parseLinkedTestStringList,\n type LinkedTestPmContextMode,\n} from \"./test/parsers.js\";\nexport {\n runStartBackgroundRun,\n runTestRunsWorker,\n type StartBackgroundRunCommandOptions,\n type StartBackgroundRunResult,\n} from \"./test/runs.js\";\nexport {\n BUILTIN_PROFILES,\n listProfiles,\n normalizeProfileName,\n PROFILE_NAMES,\n resolveProfile,\n type ProfileConfigEntry,\n type ProfileName,\n type ProfilePackageRecommendation,\n type ProfileTemplateEntry,\n type ProfileTemplateOptions,\n type ProjectProfileDefinition,\n type ProjectProfileRegistrationInput,\n} from \"../core/profile/profile-presets.js\";\nexport {\n planProfileApplication,\n type ProfileApplicationPlan,\n type ProfileChangeStatus,\n type ProfileComponentChange,\n type ProfileConfigChange,\n type ProfileConfigPlan,\n type ProfileCurrentState,\n type ProfilePackagePlan,\n type ProfileSchemaPlan,\n type ProfileTemplateChange,\n type ProfileTemplatePlan,\n type ProfileWorkflowChange,\n type ProfileWorkflowPlan,\n} from \"../core/profile/profile-plan.js\";\nexport {\n describeProfileComposition,\n describeProjectProfile,\n type ProjectProfileComposition,\n type ProjectProfileDescription,\n type ProjectProfilePackageSummary,\n} from \"../core/profile/profile-describe.js\";\nexport {\n lintProjectProfile,\n PROFILE_LINT_CODES,\n PROFILE_LINT_DIMENSIONS,\n type ProfileLintCode,\n type ProfileLintDimension,\n type ProfileLintSeverity,\n type ProjectProfileLintFinding,\n type ProjectProfileLintReport,\n} from \"../core/profile/profile-lint.js\";\nexport {\n assertExtensionBlueprint,\n assertExtensionCapabilityUsage,\n assertExtensionDeactivated,\n assertExtensionManifestCompatible,\n assertExtensionManifestMatchesBlueprint,\n assertExtensionPreflight,\n assertPackageManifest,\n assertProjectProfile,\n assertRegisteredCommandContract,\n assertRegisteredCommandOverride,\n assertRegisteredExporter,\n assertRegisteredFlags,\n assertRegisteredHook,\n assertRegisteredImporter,\n assertRegisteredItemField,\n assertRegisteredItemType,\n assertRegisteredMigration,\n assertRegisteredParserOverride,\n assertRegisteredPreflightOverride,\n assertRegisteredProfile,\n assertRegisteredRendererOverride,\n assertRegisteredSearchProvider,\n assertRegisteredServiceOverride,\n assertRegisteredVectorStoreAdapter,\n activateExtensionForTest,\n createExtensionTestHarness,\n deactivateExtensionForTest,\n describeExtensionActivation,\n runRegisteredCommandForTest,\n runRegisteredCommandOverrideForTest,\n runRegisteredExporterForTest,\n runRegisteredHookForTest,\n runRegisteredImporterForTest,\n runRegisteredMigrationForTest,\n runRegisteredParserOverrideForTest,\n runRegisteredPreflightOverrideForTest,\n runRegisteredRendererOverrideForTest,\n runRegisteredSearchProviderForTest,\n runRegisteredServiceOverrideForTest,\n runRegisteredVectorStoreAdapterForTest,\n type ActivateExtensionForTestOptions,\n type AssertProjectProfileOptions,\n type DeactivateExtensionForTestOptions,\n type DescribeExtensionActivationOptions,\n type ExtensionActivationSummary,\n type RenderExtensionHarnessMarkdownOptions,\n type RunRegisteredCommandForTestOptions,\n type RunRegisteredExporterForTestOptions,\n type RunRegisteredHookForTestOptions,\n type RunRegisteredImporterForTestOptions,\n type RunRegisteredMigrationForTestOptions,\n type RunRegisteredSearchProviderForTestOptions,\n type RunRegisteredVectorStoreAdapterForTestOptions,\n type SearchProviderOperationContexts,\n type SearchProviderOperationResults,\n type VectorStoreAdapterOperationContexts,\n type VectorStoreAdapterOperationResults,\n type ExtensionCapabilityUsageAssertion,\n type ExtensionCapabilityUsageExpectation,\n type ExtensionDeactivationExpectation,\n type ExtensionManifestBlueprintMatch,\n type ExtensionTestHarness,\n type PackageManifestExpectation,\n type PackageManifestResourceExpectation,\n type RegisteredCommandContractAssertion,\n type RegisteredCommandContractExpectation,\n type RegisteredCommandOverrideExpectation,\n type RegisteredExporterExpectation,\n type RegisteredFlagsExpectation,\n type RegisteredHookExpectation,\n type RegisteredHookKind,\n type RegisteredImporterExpectation,\n type RegisteredItemFieldAssertion,\n type RegisteredItemFieldExpectation,\n type RegisteredItemTypeAssertion,\n type RegisteredItemTypeExpectation,\n type RegisteredMigrationExpectation,\n type RegisteredParserOverrideExpectation,\n type RegisteredPreflightOverrideExpectation,\n type RegisteredProfileAssertion,\n type RegisteredProfileExpectation,\n type RegisteredRendererOverrideExpectation,\n type RegisteredSearchProviderExpectation,\n type RegisteredServiceOverrideExpectation,\n type RegisteredVectorStoreAdapterExpectation,\n} from \"./testing.js\";\n\n/**\n * Canonical extension capability names accepted by pm.\n *\n * Extension manifests should declare one or more of these values in\n * `capabilities`.\n */\nexport const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;\n/** Restricts extension capability values accepted by command, SDK, and storage contracts. */\nexport type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];\n\n/** Canonical extension governance policy modes and registration surfaces. */\nexport const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;\n/** Public contract for extension policy surfaces, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;\n/** Public contract for extension trust modes, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;\n/** Public contract for extension sandbox profiles, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;\n/** Restricts extension policy mode values accepted by command, SDK, and storage contracts. */\nexport type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];\n/** Restricts extension policy surface values accepted by command, SDK, and storage contracts. */\nexport type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];\n/** Restricts extension trust mode values accepted by command, SDK, and storage contracts. */\nexport type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];\n/** Restricts extension sandbox profile values accepted by command, SDK, and storage contracts. */\nexport type ExtensionSandboxProfile =\n (typeof EXTENSION_SANDBOX_PROFILES)[number];\n\n/** Versioned capability contract metadata emitted by runtime diagnostics. */\nexport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n};\n\n/** Least-privilege capability reconciliation helpers: map declared capabilities against the registration surfaces a package actually exercises at activation. */\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"../core/extensions/capability-usage.js\";\n\n/**\n * Render an extension/package activation summary\n * ({@link describeExtensionActivation} / {@link describeExtensionBlueprint}) to a\n * deterministic Markdown reference document — the author-facing *render* leg of\n * the describe verb, for drift-free package READMEs.\n */\nexport {\n renderExtensionSurfaceMarkdown,\n type ExtensionSurfaceMarkdownOptions,\n} from \"../core/extensions/activation-summary-markdown.js\";\n\nexport type {\n AfterCommandAffectedItem,\n AfterCommandHook,\n AfterCommandHookContext,\n BeforeCommandHook,\n BeforeCommandHookContext,\n CommandDefinition,\n ExtensionCommandArgumentDefinition,\n CommandHandler,\n CommandHandlerContext,\n CommandHandlerResult,\n CommandOverride,\n CommandOverrideContext,\n ExtensionServiceName,\n Exporter,\n ExtensionActivationResult,\n ExtensionApi,\n ExtensionCommandRegistry,\n ExtensionDeactivationFailure,\n ExtensionDeactivationOptions,\n ExtensionDeactivationResult,\n ExtensionDiagnostic,\n ExtensionDiscoveryResult,\n ExtensionHookRegistry,\n ExtensionSelfIdentity,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionManifestEngines,\n ExtensionGovernancePolicy,\n ExtensionPolicyOverride,\n ExtensionProvenanceMetadata,\n ExtensionRuntimePermissionDeclaration,\n ExtensionSearchMode,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceRegistry,\n FlagValueType,\n FlagDefinition,\n ImportExportContext,\n ImportExportRegistrationOptions,\n Importer,\n OnIndexHook,\n OnIndexHookContext,\n OnReadHook,\n OnReadHookContext,\n OnWriteHook,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverride,\n ParserOverrideContext,\n ParserOverrideDelta,\n PreflightOverride,\n PreflightOverrideContext,\n PreflightOverrideDelta,\n PreflightRuntimeDecision,\n RegisteredExtensionExporter,\n RegisteredExtensionFlagDefinitions,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionProjectProfile,\n RegisteredExtensionSchemaMigrationDefinition,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionServiceOverride,\n RegisteredExtensionVectorStoreAdapter,\n RendererOverride,\n RendererOverrideContext,\n SchemaFieldDefinition,\n SchemaItemTypeCommandOptionPolicyDefinition,\n SchemaItemTypeOptionDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SchemaMigrationRunContext,\n SchemaMigrationRunner,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderDefinition,\n SearchProviderHit,\n SearchProviderQueryContext,\n SearchProviderQueryResult,\n ServiceOverride,\n ServiceOverrideContext,\n VectorStoreAdapterDefinition,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n VectorStoreUpsertPoint,\n} from \"../core/extensions/loader.js\";\n\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type {\n ItemDocument,\n ItemMetadata,\n ItemStatus,\n ItemType,\n PmSettings,\n} from \"../types/index.js\";\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["profile"]
|
|
3
|
+
"sources": ["../../../../../../../sdk/search-refresh-worker.ts", "../../../../../../../sdk/telemetry-flush.ts", "../../../../../../../sdk/compile-cache.ts", "../../../../../../../sdk/context-signal-store.ts", "../../../../../../../sdk/relationship-migration.ts", "../../../../../../../sdk/define.ts", "../../../../../../../sdk/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module sdk/search-refresh-worker\n *\n * Owns the detached semantic-refresh worker entry used by custom mutation hosts.\n */\nimport { runSemanticRefreshWorker } from \"../core/search/background-refresh.js\";\nimport { refreshSemanticEmbeddingsForMutatedItems } from \"../core/search/cache.js\";\nimport { resolvePmRoot } from \"../core/store/paths.js\";\n\n/** Drain the active workspace's pending semantic-refresh queue. */\nexport async function runSearchRefreshWorkerEntrypoint(): Promise<void> {\n const pmRoot = resolvePmRoot(process.cwd(), process.env.PM_PATH);\n await runSemanticRefreshWorker(pmRoot, (root, itemIds) =>\n refreshSemanticEmbeddingsForMutatedItems(root, itemIds, {\n apply_runtime_defaults: true,\n }),\n );\n}\n", "/**\n * @module sdk/telemetry-flush\n *\n * Owns explicit telemetry queue draining for embedded and detached hosts.\n */\nimport { flushTelemetryQueueNow } from \"../core/telemetry/runtime.js\";\n\n/** Flush the durable telemetry queue immediately. */\nexport async function flushTelemetryQueue(): Promise<void> {\n await flushTelemetryQueueNow();\n}\n", "/**\n * @module sdk/compile-cache\n *\n * Provides a bounded, host-reusable lifecycle primitive for pm-owned Node\n * compile-cache generations.\n */\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nconst COMPILE_CACHE_CONCURRENT_GRACE_MS = 5 * 60 * 1000;\nconst COMPILE_CACHE_MAX_GENERATIONS = 3;\n\n/** Result of pruning superseded pm compile-cache generations. */\nexport interface CompileCachePruneResult {\n /** Generation retained for the current pm build. */\n retained: string;\n /** Deterministically sorted generation names removed from the cache root. */\n removed: string[];\n}\n\n/** Convert an optional package version into a safe compile-cache generation key. */\nexport function resolveCompileCacheGeneration(\n packageVersion: string | undefined,\n): string {\n return (packageVersion?.trim() || \"development\")\n .replace(/[^a-zA-Z0-9._-]/g, \"_\")\n .replace(/^\\./, \"_\");\n}\n\n/**\n * Retain the current and recently active generations in an exclusively\n * pm-owned compile-cache root, then remove stale entries beyond the bounded\n * generation budget. A short freshness grace protects concurrently starting\n * pm versions from deleting one another's active cache directories.\n */\nexport function pruneCompileCacheGenerations(\n cacheRoot: string,\n currentGeneration: string,\n): CompileCachePruneResult {\n const normalizedGeneration = currentGeneration.trim();\n if (!/^[a-zA-Z0-9_-][a-zA-Z0-9._-]*$/.test(normalizedGeneration)) {\n throw new TypeError(\n \"Compile-cache generation must be a safe non-empty filename token.\",\n );\n }\n fs.mkdirSync(cacheRoot, { recursive: true });\n const currentPath = path.join(cacheRoot, normalizedGeneration);\n fs.mkdirSync(currentPath, { recursive: true });\n const touchedAt = new Date();\n fs.utimesSync(currentPath, touchedAt, touchedAt);\n const candidates = fs\n .readdirSync(cacheRoot)\n .filter((name) => name !== normalizedGeneration)\n .flatMap((name) => {\n try {\n return [\n { name, mtimeMs: fs.statSync(path.join(cacheRoot, name)).mtimeMs },\n ];\n } catch (error) {\n if (\n error instanceof Error &&\n \"code\" in error &&\n error.code === \"ENOENT\"\n ) {\n return [];\n }\n throw error;\n }\n })\n .sort(\n (left, right) =>\n right.mtimeMs - left.mtimeMs || left.name.localeCompare(right.name),\n );\n const fresh = candidates.filter(\n (entry) =>\n touchedAt.getTime() - entry.mtimeMs <\n COMPILE_CACHE_CONCURRENT_GRACE_MS,\n );\n const staleRetention = Math.max(\n 0,\n COMPILE_CACHE_MAX_GENERATIONS - 1 - fresh.length,\n );\n const removed = candidates\n .filter(\n (entry) =>\n touchedAt.getTime() - entry.mtimeMs >= COMPILE_CACHE_CONCURRENT_GRACE_MS,\n )\n .slice(staleRetention)\n .map((entry) => entry.name)\n .sort((left, right) => left.localeCompare(right));\n for (const name of removed) {\n fs.rmSync(path.join(cacheRoot, name), {\n recursive: true,\n force: true,\n maxRetries: 3,\n retryDelay: 50,\n });\n }\n return { retained: normalizedGeneration, removed };\n}\n", "/**\n * @module sdk/context-signal-store\n *\n * Rebuildable, cursor-stamped feature-store primitives for context relevance.\n * Snapshots are derived read artifacts: callers retain authoritative items and\n * history, while stale, absent, or corrupt snapshots rebuild transparently.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { randomUUID } from \"node:crypto\";\nimport {\n buildItemContextRelevanceCandidates,\n CONTEXT_RELEVANCE_SIGNAL_NAMES,\n type BuildItemContextRelevanceCandidatesOptions,\n type ContextRelevanceCandidate,\n type ContextRelevanceSignalName,\n type ContextRelevanceSignals,\n} from \"./context-relevance.js\";\nimport type { ItemMetadata } from \"../types/index.js\";\n\n/** Current serialized feature-store envelope version. */\nexport const CONTEXT_SIGNAL_STORE_FORMAT_VERSION = 1;\n\n/** Current canonical signal-vector version. */\nexport const CONTEXT_SIGNAL_SET_VERSION = 1;\n\nconst STORED_CONTEXT_SIGNAL_NAMES = CONTEXT_RELEVANCE_SIGNAL_NAMES.slice(1) as readonly Exclude<\n ContextRelevanceSignalName,\n \"structural\"\n>[];\n\n/** Authoritative substrate used to derive one snapshot. */\nexport type ContextSignalSnapshotSource = \"derived_index\" | \"scan_fallback\";\n\n/** One immutable item signal row. */\nexport interface ContextSignalSnapshotItem {\n /** Stable item identifier. */\n id: string;\n /** Canonical normalized signal vector. */\n signals: ContextRelevanceSignals;\n}\n\n/** Rebuildable, deterministic context-signal snapshot. */\nexport interface ContextSignalSnapshot {\n /** Serialized envelope version. */\n format_version: number;\n /** Signal algorithm version. */\n signal_set_version: number;\n /** Authoritative history or derived-index cursor folded into this snapshot. */\n source_cursor: string;\n /** Stable clock supplied by the caller. */\n generated_at: string;\n /** Read substrate used for the fold. */\n source: ContextSignalSnapshotSource;\n /** Item rows sorted by canonical id. */\n items: readonly ContextSignalSnapshotItem[];\n}\n\n/** Pluggable persistence boundary for context-signal snapshots. */\nexport interface ContextSignalStoreAdapter {\n /** Read the serialized snapshot, or null when none exists. */\n read(): Promise<unknown | null>;\n /** Atomically replace the serialized snapshot. */\n write(snapshot: ContextSignalSnapshot): Promise<void>;\n}\n\n/** Options required to fold authoritative items into a snapshot. */\nexport interface BuildContextSignalSnapshotOptions\n extends BuildItemContextRelevanceCandidatesOptions {\n /** Authoritative history or derived-index cursor. */\n sourceCursor: string;\n /** Substrate used to load the authoritative items. */\n source: ContextSignalSnapshotSource;\n}\n\n/** Result of a feature-store read with explicit degradation metadata. */\nexport interface ContextSignalStoreReadResult {\n /** Valid snapshot used for candidate assembly. */\n snapshot: ContextSignalSnapshot;\n /** Candidates joined to the caller's authoritative item objects. */\n candidates: ContextRelevanceCandidate<ItemMetadata>[];\n /** Whether the persisted snapshot was reused or rebuilt. */\n cache_status: \"fresh\" | \"rebuilt\";\n /** Non-fatal recovery diagnostics. */\n warnings: readonly string[];\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction isNormalizedSignal(value: unknown): value is number {\n return typeof value === \"number\" && Number.isFinite(value) && value >= 0 && value <= 1;\n}\n\nfunction compactSignals(signals: ContextRelevanceSignals): ContextRelevanceSignals {\n const compact: ContextRelevanceSignals = {};\n for (const name of STORED_CONTEXT_SIGNAL_NAMES) {\n const value = signals[name];\n if (value === undefined) continue;\n if (!isNormalizedSignal(value)) {\n throw new TypeError(`Context relevance signal ${name} must be a finite number from 0 to 1`);\n }\n compact[name] = value;\n }\n return compact;\n}\n\nfunction parseSnapshotItem(value: unknown): ContextSignalSnapshotItem | null {\n if (!isRecord(value) || typeof value.id !== \"string\" || !isRecord(value.signals)) {\n return null;\n }\n const signals: Record<string, number> = {};\n const supportedSignals = new Set<string>(STORED_CONTEXT_SIGNAL_NAMES);\n for (const [name, signal] of Object.entries(value.signals)) {\n if (!supportedSignals.has(name) || !isNormalizedSignal(signal)) {\n return null;\n }\n signals[name] = signal;\n }\n return { id: value.id, signals: signals as ContextRelevanceSignals };\n}\n\n/** Validate an untrusted serialized snapshot without accepting partial envelopes. */\nexport function parseContextSignalSnapshot(value: unknown): ContextSignalSnapshot | null {\n if (\n !isRecord(value) ||\n value.format_version !== CONTEXT_SIGNAL_STORE_FORMAT_VERSION ||\n value.signal_set_version !== CONTEXT_SIGNAL_SET_VERSION ||\n typeof value.source_cursor !== \"string\" ||\n value.source_cursor.trim().length === 0 ||\n typeof value.generated_at !== \"string\" ||\n !Number.isFinite(Date.parse(value.generated_at)) ||\n (value.source !== \"derived_index\" && value.source !== \"scan_fallback\") ||\n !Array.isArray(value.items)\n ) {\n return null;\n }\n const items = value.items.map(parseSnapshotItem);\n if (items.some((item) => item === null)) {\n return null;\n }\n const validItems = items as ContextSignalSnapshotItem[];\n if (\n new Set(validItems.map((item) => item.id)).size !== validItems.length ||\n validItems.some((item) => item.id.trim().length === 0)\n ) {\n return null;\n }\n return {\n format_version: CONTEXT_SIGNAL_STORE_FORMAT_VERSION,\n signal_set_version: CONTEXT_SIGNAL_SET_VERSION,\n source_cursor: value.source_cursor,\n generated_at: value.generated_at,\n source: value.source,\n items: validItems.sort((left, right) => left.id.localeCompare(right.id)),\n };\n}\n\n/** Fold authoritative items into a deterministic, immutable signal snapshot. */\nexport function buildContextSignalSnapshot(\n items: readonly ItemMetadata[],\n options: BuildContextSignalSnapshotOptions,\n): ContextSignalSnapshot {\n if (typeof options.sourceCursor !== \"string\" || options.sourceCursor.trim().length === 0) {\n throw new TypeError(\"Context signal source cursor must be non-empty\");\n }\n if (!Number.isFinite(Date.parse(options.now))) {\n throw new TypeError(\"Context signal snapshot clock must be a valid timestamp\");\n }\n const rows = buildItemContextRelevanceCandidates(items, options)\n .map(({ id, signals }) => ({\n id,\n signals: compactSignals(signals),\n }))\n .sort((left, right) => left.id.localeCompare(right.id));\n return Object.freeze({\n format_version: CONTEXT_SIGNAL_STORE_FORMAT_VERSION,\n signal_set_version: CONTEXT_SIGNAL_SET_VERSION,\n source_cursor: options.sourceCursor,\n generated_at: options.now,\n source: options.source,\n items: Object.freeze(rows.map((row) => Object.freeze(row))),\n });\n}\n\n/** Filesystem adapter using same-directory atomic replacement. */\nexport class JsonFileContextSignalStoreAdapter implements ContextSignalStoreAdapter {\n private readonly filePath: string;\n\n /** Create an adapter for an explicit derived-state file path. */\n constructor(filePath: string) {\n if (typeof filePath !== \"string\" || filePath.trim().length === 0) {\n throw new TypeError(\"Context signal store path must be non-empty\");\n }\n this.filePath = path.resolve(filePath);\n }\n\n /** Read and decode the JSON snapshot, returning null when it does not exist. */\n async read(): Promise<unknown | null> {\n try {\n return JSON.parse(await fs.readFile(this.filePath, \"utf8\")) as unknown;\n } catch (error: unknown) {\n if (isRecord(error) && error.code === \"ENOENT\") {\n return null;\n }\n throw error;\n }\n }\n\n /** Write a complete snapshot through a unique same-directory temporary file. */\n async write(snapshot: ContextSignalSnapshot): Promise<void> {\n const directory = path.dirname(this.filePath);\n await fs.mkdir(directory, { recursive: true });\n const temporaryPath = path.join(directory, `.${path.basename(this.filePath)}.${randomUUID()}.tmp`);\n try {\n await fs.writeFile(temporaryPath, `${JSON.stringify(snapshot)}\\n`, { encoding: \"utf8\", flag: \"wx\" });\n await fs.rename(temporaryPath, this.filePath);\n } finally {\n try {\n await fs.rm(temporaryPath, { force: true });\n } catch {\n // The complete snapshot is already committed; temporary-file cleanup is best effort.\n }\n }\n }\n}\n\n/** Cursor-aware feature store that self-heals from absent, stale, or corrupt state. */\nexport class ContextSignalStore {\n private readonly adapter: ContextSignalStoreAdapter;\n\n /** Bind the store to a caller-selected persistence adapter. */\n constructor(adapter: ContextSignalStoreAdapter) {\n this.adapter = adapter;\n }\n\n /** Read matching signals or rebuild them from authoritative items. */\n async readOrRebuild(\n items: readonly ItemMetadata[],\n options: BuildContextSignalSnapshotOptions,\n ): Promise<ContextSignalStoreReadResult> {\n const warnings: string[] = [];\n let snapshot: ContextSignalSnapshot | null = null;\n try {\n const serialized = await this.adapter.read();\n snapshot = parseContextSignalSnapshot(serialized);\n if (serialized !== null && snapshot === null) {\n warnings.push(\"context_signal_store_invalid\");\n }\n } catch {\n warnings.push(\"context_signal_store_invalid\");\n }\n const authoritativeIds = items.map((item) => item.id).sort((left, right) => left.localeCompare(right));\n const snapshotIds = snapshot?.items.map((item) => item.id) ?? [];\n const fresh =\n snapshot !== null &&\n snapshot.source_cursor === options.sourceCursor &&\n snapshot.source === options.source &&\n snapshotIds.length === authoritativeIds.length &&\n snapshotIds.every((id, index) => id === authoritativeIds[index]);\n let resolvedSnapshot: ContextSignalSnapshot;\n if (fresh && snapshot !== null) {\n resolvedSnapshot = snapshot;\n } else {\n if (snapshot !== null) {\n warnings.push(\"context_signal_store_stale\");\n }\n resolvedSnapshot = buildContextSignalSnapshot(items, options);\n try {\n await this.adapter.write(resolvedSnapshot);\n } catch {\n warnings.push(\"context_signal_store_write_failed\");\n }\n }\n const signalsById = new Map(resolvedSnapshot.items.map((item) => [item.id, item.signals]));\n return {\n snapshot: resolvedSnapshot,\n candidates: items.map((item) => ({ id: item.id, item, signals: signalsById.get(item.id) })),\n cache_status: fresh ? \"fresh\" : \"rebuilt\",\n warnings,\n };\n }\n}\n", "/**\n * @module sdk/relationship-migration\n *\n * Plans deterministic, resumable migration of legacy item hierarchy and\n * dependency fields into the immutable relationship-event platform. Planning\n * is storage-independent and side-effect free: callers can inspect governance\n * evidence, persist the event batch through {@link RelationshipEventStore}, or\n * feed the same plan into another conforming durable adapter.\n */\nimport { createHash } from \"node:crypto\";\nimport {\n assembleWorkspaceRelationshipGraph,\n type WorkspaceRelationshipItem,\n} from \"./graph/assembly.js\";\nimport type { RelationshipEventInput } from \"./relationship-history.js\";\nimport type { RelationshipKindRegistry } from \"./relationships.js\";\n\n/** Controls for deterministic legacy relationship-event planning. */\nexport interface RelationshipEventBackfillOptions {\n /** Stable migration identity retained in generated event and relationship ids. */\n migrationId: string;\n /** Attributable actor responsible for the migration. */\n author: string;\n /** Valid event timestamp shared by the deterministic migration batch. */\n timestamp: string;\n /** Optional custom relationship ontology used during legacy normalization. */\n registry?: RelationshipKindRegistry;\n /** Event ids already committed by an earlier partial or concurrent run. */\n existingEventIds?: Iterable<string>;\n}\n\n/** Deterministic migration plan plus compact governance evidence. */\nexport interface RelationshipEventBackfillPlan {\n /** Caller-provided stable migration identity. */\n migration_id: string;\n /** SHA-256 identity of the complete normalized plan before resume filtering. */\n fingerprint: string;\n /** Fixed node universe required when opening a relationship event store. */\n nodes: readonly string[];\n /** Missing deterministic events that remain to be committed. */\n events: readonly RelationshipEventInput[];\n /** Total unique normalized edges represented by the complete plan. */\n edge_count: number;\n /** Events omitted because their deterministic ids already exist. */\n skipped_existing_count: number;\n /** Duplicate raw dependency identities found before graph deduplication. */\n duplicate_dependency_rows: number;\n /** Missing internal references retained as explicit placeholder nodes. */\n dangling_reference_count: number;\n}\n\n/** Validate and normalize one required migration text field. */\nfunction requiredMigrationText(value: unknown, field: string): string {\n if (typeof value !== \"string\" || value.trim().length === 0)\n throw new TypeError(`Relationship backfill ${field} must be non-empty`);\n return value.trim();\n}\n\n/**\n * Convert legacy item relationship fields into an immutable deterministic event\n * batch. Input order does not affect ids, fingerprints, or event order.\n * Dangling internal targets and external dependency targets become explicit\n * nodes so replay never silently drops contextual edges.\n */\nexport function planRelationshipEventBackfill(\n items: readonly WorkspaceRelationshipItem[],\n options: RelationshipEventBackfillOptions,\n): RelationshipEventBackfillPlan {\n const migrationId = requiredMigrationText(options.migrationId, \"migrationId\");\n const author = requiredMigrationText(options.author, \"author\");\n const parsedTimestamp = Date.parse(options.timestamp);\n if (!Number.isFinite(parsedTimestamp))\n throw new TypeError(\"Relationship backfill timestamp must be valid\");\n const timestamp = new Date(parsedTimestamp).toISOString();\n const assembly = assembleWorkspaceRelationshipGraph(\n items,\n undefined,\n options.registry,\n );\n const nodes = assembly.graph.nodes();\n const completeEvents = assembly.graph.edges().map((edge) => {\n const digest = createHash(\"sha256\")\n .update(\n JSON.stringify([\n migrationId,\n edge.kind,\n edge.source,\n edge.target,\n edge.createdAt ?? null,\n edge.author ?? null,\n edge.payload ?? null,\n ]),\n )\n .digest(\"hex\")\n .slice(0, 24);\n return Object.freeze({\n eventId: `backfill:${migrationId}:${digest}`,\n relationshipId: `migration:${migrationId}:${digest}`,\n action: \"add\" as const,\n edge,\n author,\n timestamp,\n reason: `Backfill ${migrationId} from legacy item metadata`,\n });\n });\n const fingerprint = createHash(\"sha256\")\n .update(JSON.stringify({ migrationId, nodes, events: completeEvents }))\n .digest(\"hex\");\n const existingEventIds = new Set(\n [...(options.existingEventIds ?? [])]\n .filter((id): id is string => typeof id === \"string\")\n .map((id) => id.trim())\n .filter(Boolean),\n );\n const events = completeEvents.filter(\n (event) => !existingEventIds.has(event.eventId),\n );\n return Object.freeze({\n migration_id: migrationId,\n fingerprint,\n nodes,\n events: Object.freeze(events),\n edge_count: completeEvents.length,\n skipped_existing_count: completeEvents.length - events.length,\n duplicate_dependency_rows: assembly.duplicateRows.length,\n dangling_reference_count:\n assembly.dangling.active.length + assembly.dangling.legacy_terminal.length,\n });\n}\n", "/**\n * @module sdk/define\n *\n * Authoring-time typed builders for every extension registration surface.\n *\n * These `define*` helpers are the third leg of the SDK ergonomics tripod:\n * {@link ../core/extensions/loader.js#ExtensionApi | `api.register*`} registers\n * a definition at activation, the `assert*`/`run*` testing helpers verify and\n * invoke it, and these builders let authors *write* the definition with full\n * type-checking and editor inference before it ever reaches `activate`.\n *\n * Every builder is a zero-cost identity function that returns its argument\n * unchanged — exactly like the SDK's {@link ./index.js#defineExtension} and the\n * wider `defineConfig`/`defineComponent` ecosystem convention. Extensions are\n * authored fully in TypeScript (ADR pm-2c28); these builders are where that type\n * safety is anchored at the definition site. Their value is entirely at the type\n * level:\n *\n * - A bare `const cmd = { ... }` satisfies the registration type only\n * structurally and widens its literals; `const cmd = defineCommand({ ... })`\n * checks the object against the contract *and* preserves the narrow literal\n * type, while inferring the nested handler's `context` parameter from the\n * builder signature.\n * - Definitions can be colocated, exported, reused, and unit-tested apart from\n * the `activate` call instead of being trapped as inline literals.\n *\n * Object-definition builders use a generic constraint (`<T extends Def>`) so the\n * narrow literal type survives the round-trip, mirroring `defineExtension`.\n * Function-definition builders are intentionally non-generic: a generic\n * constrained to a whole function type suppresses contextual typing of a bare\n * arrow's parameter (it would fall back to implicit `any`), whereas the\n * non-generic signature lets TypeScript type the handler parameter from the\n * declared function type.\n */\nimport type {\n AfterCommandHook,\n BeforeCommandHook,\n CommandDefinition,\n CommandOverride,\n Exporter,\n ExtensionManifest,\n FlagDefinition,\n Importer,\n OnIndexHook,\n OnReadHook,\n OnWriteHook,\n ParserOverride,\n PreflightOverride,\n RendererOverride,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SearchProviderDefinition,\n ServiceOverride,\n VectorStoreAdapterDefinition,\n} from \"../core/extensions/loader.js\";\nimport type { ProjectProfileDefinition } from \"../core/profile/profile-presets.js\";\n\n/**\n * Type an extension's in-module manifest mirror (the `manifest` export / field).\n *\n * Completes the `define*` family: the manifest is the one authoring surface that\n * otherwise had no builder. Contract-checks the object against\n * {@link ExtensionManifest} where it is authored, catching a missing required\n * field or a mistyped key at edit time instead of at load time. Pair with\n * {@link ./compose.js#deriveExtensionCapabilities | `deriveExtensionCapabilities`}\n * to keep `capabilities` matched to the surfaces the extension actually registers.\n */\nexport function defineExtensionManifest<TManifest extends ExtensionManifest>(\n manifest: TManifest,\n): TManifest {\n return manifest;\n}\n\n/**\n * Type a project-profile definition for the profile registry.\n *\n * A profile bundles item types, statuses, fields, per-type workflows, config\n * knobs, create templates, and package recommendations into one declarative\n * archetype that `pm profile apply` stages idempotently. This builder checks the\n * object against {@link ProjectProfileDefinition} where it is authored — catching\n * an invalid field type or a malformed workflow at edit time — while preserving\n * the literal `name`/`types`/`statuses` so a package's archetype stays strongly\n * typed at the definition site, mirroring {@link defineItemType}. It is the\n * authoring anchor a first-party or third-party profile package builds on.\n */\nexport function defineProjectProfile<TProfile extends ProjectProfileDefinition>(\n profile: TProfile,\n): TProfile {\n return profile;\n}\n\n/**\n * Type a command definition for `api.registerCommand(definition)`.\n *\n * Checks the object against {@link CommandDefinition} and infers the `run`\n * handler's `context` parameter while preserving the literal `name`/`action`\n * types. Pass the result straight to `registerCommand`, or export it so the\n * command can be invoked in tests via `runRegisteredCommandForTest`.\n */\nexport function defineCommand<TDefinition extends CommandDefinition>(\n definition: TDefinition,\n): TDefinition {\n return definition;\n}\n\n/**\n * Type a single flag definition for a `api.registerFlags(command, flags)` array.\n *\n * Authors compose builders into the array\n * (`api.registerFlags(\"list\", [defineFlag({ long: \"--mine\" })])`) to get\n * per-flag contract checking — `value_type`, `list`, and `default` included —\n * instead of validating a loosely-typed literal array all at once.\n */\nexport function defineFlag<TFlag extends FlagDefinition>(flag: TFlag): TFlag {\n return flag;\n}\n\n/**\n * Type a custom item-type definition for `api.registerItemTypes([...])`.\n *\n * Preserves the literal `name`/`folder`/`aliases` so a project archetype's\n * domain types stay strongly typed where the definition is declared and reused.\n */\nexport function defineItemType<TType extends SchemaItemTypeDefinition>(\n type: TType,\n): TType {\n return type;\n}\n\n/**\n * Type a custom item-metadata field definition for `api.registerItemFields([...])`.\n *\n * Checks `name`/`type`/`optional` against {@link SchemaFieldDefinition} while\n * keeping the field's extra metadata (the contract carries an index signature)\n * intact.\n */\nexport function defineItemField<TField extends SchemaFieldDefinition>(\n field: TField,\n): TField {\n return field;\n}\n\n/**\n * Type a schema migration definition for `api.registerMigration(definition)`.\n *\n * Preserves the literal `id` and, when `run` is provided, infers the migration\n * runner's context, so the same definition can be registered and later exercised\n * through `runRegisteredMigrationForTest`.\n */\nexport function defineMigration<TMigration extends SchemaMigrationDefinition>(\n migration: TMigration,\n): TMigration {\n return migration;\n}\n\n/**\n * Type a search-provider definition for `api.registerSearchProvider(provider)`.\n *\n * Infers the `query`/`embed`/`embedBatch` operation contexts and result shapes\n * so a custom retrieval backend is type-checked at the definition site and\n * reusable in `runRegisteredSearchProviderForTest`.\n */\nexport function defineSearchProvider<\n TProvider extends SearchProviderDefinition,\n>(provider: TProvider): TProvider {\n return provider;\n}\n\n/**\n * Type a vector-store adapter definition for `api.registerVectorStoreAdapter(adapter)`.\n *\n * Infers the `query`/`upsert`/`delete` operation contexts so a package that owns\n * its own semantic index storage gets contract checking before activation and a\n * definition it can drive through `runRegisteredVectorStoreAdapterForTest`.\n */\nexport function defineVectorStoreAdapter<\n TAdapter extends VectorStoreAdapterDefinition,\n>(adapter: TAdapter): TAdapter {\n return adapter;\n}\n\n/**\n * Type a command-override handler for `api.registerCommand(command, override)`.\n *\n * The non-generic signature lets TypeScript contextually type the override's\n * `context` parameter from {@link CommandOverride}, so a bare arrow authored in\n * a `.js` package still gets a fully-typed argument.\n */\nexport function defineCommandOverride(\n override: CommandOverride,\n): CommandOverride {\n return override;\n}\n\n/**\n * Type a parser-override handler for `api.registerParser(command, override)`.\n *\n * Contextually types the `context` parameter and the returned\n * {@link ParserOverride} delta so an argument-rewriting override is checked\n * where it is written.\n */\nexport function defineParserOverride(override: ParserOverride): ParserOverride {\n return override;\n}\n\n/**\n * Type a preflight-override handler for `api.registerPreflight(override)`.\n *\n * Contextually types the `context` parameter and the returned gate decision so a\n * package's pre-run validation override is checked at the definition site.\n */\nexport function definePreflightOverride(\n override: PreflightOverride,\n): PreflightOverride {\n return override;\n}\n\n/**\n * Type a service-override handler for `api.registerService(service, override)`.\n *\n * Contextually types the `context` parameter from {@link ServiceOverride} so a\n * package overriding a built-in service (output formatting, embeddings, and the\n * like) keeps its handler argument typed without an explicit annotation.\n */\nexport function defineServiceOverride(\n override: ServiceOverride,\n): ServiceOverride {\n return override;\n}\n\n/**\n * Type a renderer-override handler for `api.registerRenderer(format, renderer)`.\n *\n * Contextually types the `context` parameter and the `string | null | undefined`\n * return contract so a custom output renderer is checked where it is authored.\n */\nexport function defineRendererOverride(\n renderer: RendererOverride,\n): RendererOverride {\n return renderer;\n}\n\n/**\n * Type an importer handler for `api.registerImporter(name, importer, options)`.\n *\n * Contextually types the {@link Importer} `context` (registration, args,\n * options, pm root) so the bridge from an external system into the pm context\n * graph is type-checked and reusable in `runRegisteredImporterForTest`.\n */\nexport function defineImporter(importer: Importer): Importer {\n return importer;\n}\n\n/**\n * Type an exporter handler for `api.registerExporter(name, exporter, options)`.\n *\n * Contextually types the {@link Exporter} `context` so the bridge from the pm\n * context graph out to an external system is checked at the definition site and\n * reusable in `runRegisteredExporterForTest`.\n */\nexport function defineExporter(exporter: Exporter): Exporter {\n return exporter;\n}\n\n/**\n * Type a `before_command` hook for `api.hooks.beforeCommand(hook)`.\n *\n * Contextually types the {@link BeforeCommandHook} `context` so a hook that\n * inspects or annotates a command before it runs keeps its argument typed when\n * authored as a standalone, exportable, testable value.\n */\nexport function defineBeforeCommandHook(\n hook: BeforeCommandHook,\n): BeforeCommandHook {\n return hook;\n}\n\n/**\n * Type an `after_command` hook for `api.hooks.afterCommand(hook)`.\n *\n * Contextually types the {@link AfterCommandHook} `context` — including the\n * `affected` items pm mutated — so the natural place to react to every change\n * (\"project management = context management\") is checked where it is written.\n */\nexport function defineAfterCommandHook(\n hook: AfterCommandHook,\n): AfterCommandHook {\n return hook;\n}\n\n/**\n * Type an `on_write` hook for `api.hooks.onWrite(hook)`.\n *\n * Contextually types the {@link OnWriteHook} `context` so a hook reacting to\n * item persistence keeps its argument typed without an explicit annotation.\n */\nexport function defineOnWriteHook(hook: OnWriteHook): OnWriteHook {\n return hook;\n}\n\n/**\n * Type an `on_read` hook for `api.hooks.onRead(hook)`.\n *\n * Contextually types the {@link OnReadHook} `context` so a hook augmenting items\n * as they are read is type-checked at the definition site.\n */\nexport function defineOnReadHook(hook: OnReadHook): OnReadHook {\n return hook;\n}\n\n/**\n * Type an `on_index` hook for `api.hooks.onIndex(hook)`.\n *\n * Contextually types the {@link OnIndexHook} `context` so a hook participating\n * in index/search refresh keeps its argument typed even without TypeScript\n * annotations.\n */\nexport function defineOnIndexHook(hook: OnIndexHook): OnIndexHook {\n return hook;\n}\n", "/**\n * @module sdk/index\n *\n * Defines public SDK APIs and package-author helpers for Index.\n */\nexport {\n isErrnoError,\n limitAnnotationEntries,\n parseAnnotationTextInput,\n readAnnotationEntries,\n resolveAnnotationInput,\n resolveAnnotationIndex,\n runAnnotationCommand,\n wrapOwnershipConflict,\n type AnnotationCommandConfig,\n type AnnotationCommandOptions,\n type AnnotationCommandResult,\n type AnnotationEntry,\n type AnnotationInput,\n type AnnotationSourceOptions,\n type OwnershipConflictGuidance,\n} from \"./annotations.js\";\nexport {\n inspectHistoryAuthorStream,\n scanHistoryAuthorAttribution,\n type HistoryAuthorAttributionScan,\n type UnknownAuthorHistoryEvent,\n} from \"./author-attribution.js\";\nexport { createPmCliProgram } from \"./cli-program.js\";\nexport { runSearchRefreshWorkerEntrypoint } from \"./search-refresh-worker.js\";\nexport { flushTelemetryQueue } from \"./telemetry-flush.js\";\nexport {\n EXECUTABLE_COMMAND_ALIASES,\n applyBootstrapPagerPolicy,\n coalesceRepeatedListFlags,\n listAliasPluralKeys,\n mergeLinkedTestTwoTokenEntries,\n normalizeBootstrapInvocation,\n normalizeLegacyExtensionActionSyntax,\n parseBootstrapCommandName,\n parseBootstrapGlobalOptions,\n parseBootstrapHelpRequest,\n parseBootstrapTypeValue,\n stripGlobalBootstrapTokens,\n type BootstrapGlobalOptions,\n type BootstrapHelpRequest,\n type BootstrapInvocationNormalizationResult,\n type BootstrapNormalizationEvent,\n} from \"./cli-bootstrap.js\";\nexport {\n quoteCommandArg,\n quoteWindowsCommandArg,\n renderPmCommand,\n} from \"./command-line.js\";\nexport {\n runGc,\n type GcCheckpointsSummary,\n type GcLocksSummary,\n} from \"./governance/gc.js\";\nexport {\n _testOnlyHealthCommand,\n runHealth,\n type HealthCheck,\n} from \"./governance/health.js\";\nexport {\n _testOnlyValidateCommand,\n runValidate,\n type ValidateCheck,\n type ValidateFixesSummary,\n type ValidateMutationServices,\n} from \"./governance/validate.js\";\nexport { runExtension } from \"./extension.js\";\nexport {\n runWithActiveExtensions,\n type ActiveExtensionScopeOptions,\n} from \"./runtime.js\";\nexport { applyInvocationAuthorOverride } from \"./invocation-author.js\";\nexport { describeItemOwnershipConflict } from \"./ownership-source.js\";\nexport { discoverNearbyPmRoot } from \"./tracker-root-discovery.js\";\nexport {\n _testOnly as _testOnlyTemplates,\n type TemplateSource,\n} from \"./templates.js\";\nexport {\n runConfig,\n _testOnlyConfigCommand,\n type NestedSettingResultValue,\n} from \"./config.js\";\nexport {\n INIT_AGENT_GUIDANCE_MODE_VALUES,\n runInitAgentGuidance,\n _testOnly as _testOnlyInitAgentGuidance,\n type InitAgentGuidanceMode,\n type InitAgentGuidanceSummary,\n type RunInitAgentGuidanceOptions,\n type RunInitAgentGuidanceResult,\n} from \"./init-agent-guidance.js\";\nexport {\n runInit,\n summarizeInitResult,\n _testOnly as _testOnlyInit,\n type InitAgentGuidanceResult,\n type InitConciseResult,\n type InitInstalledPackagesSummary,\n type InitRegisteredTypePresetSummary,\n type InitTargetResolution,\n type InitTypePresetName,\n} from \"./init.js\";\nexport {\n PROFILE_SUBCOMMANDS,\n formatProfileApplyHuman,\n formatProfileLintHuman,\n formatProfileListHuman,\n formatProfileShowHuman,\n runProfileApply,\n runProfileLint,\n runProfileList,\n runProfileShow,\n type ProfileApplyDimension,\n type ProfileComposition,\n type ProfileListEntry,\n} from \"./profile.js\";\nimport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_TRUST_MODES,\n} from \"../core/extensions/loader.js\";\nexport { RESERVED_ITEM_FIELD_NAMES } from \"../core/extensions/item-fields.js\";\nexport {\n PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,\n PM_PACKAGE_RESOURCE_KINDS,\n collectPackageExtensionDirectories,\n readPmPackageManifest,\n type PmPackageCatalogLinkMap,\n type PmPackageCatalogMediaMap,\n type PmPackageCatalogMetadata,\n type PmPackageManifest,\n type PmPackageResourceKind,\n type PmPackageResourceMap,\n} from \"../core/packages/manifest.js\";\nexport type {\n CommanderOptionAliasContract,\n CommanderOptionRegistrationContract,\n} from \"./cli-contracts.js\";\nexport {\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,\n APPEND_FLAG_CONTRACTS,\n CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,\n CALENDAR_FLAG_CONTRACTS,\n CLAIM_FLAG_CONTRACTS,\n CLOSE_FLAG_CONTRACTS,\n CLOSE_MANY_FLAG_CONTRACTS,\n CLOSE_TASK_FLAG_CONTRACTS,\n COMMENTS_FLAG_CONTRACTS,\n COMPLETION_FLAG_CONTRACTS,\n CONFIG_FLAG_CONTRACTS,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n CONTEXT_FLAG_CONTRACTS,\n CONTRACTS_FLAG_CONTRACTS,\n COPY_FLAG_CONTRACTS,\n CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS,\n CREATE_FLAG_CONTRACTS,\n DELETE_FLAG_CONTRACTS,\n DEPS_FLAG_CONTRACTS,\n DOCS_FLAG_CONTRACTS,\n EVAL_FLAG_CONTRACTS,\n EXTENSION_ACTIVATE_FLAG_CONTRACTS,\n EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,\n EXTENSION_ADOPT_FLAG_CONTRACTS,\n EXTENSION_CATALOG_FLAG_CONTRACTS,\n EXTENSION_DEACTIVATE_FLAG_CONTRACTS,\n EXTENSION_DESCRIBE_FLAG_CONTRACTS,\n EXTENSION_DOCTOR_FLAG_CONTRACTS,\n EXTENSION_EXPLORE_FLAG_CONTRACTS,\n EXTENSION_FLAG_CONTRACTS,\n EXTENSION_INIT_FLAG_CONTRACTS,\n EXTENSION_INSTALL_FLAG_CONTRACTS,\n EXTENSION_MANAGE_FLAG_CONTRACTS,\n EXTENSION_RELOAD_FLAG_CONTRACTS,\n EXTENSION_SCOPE_FLAG_CONTRACTS,\n EXTENSION_UNINSTALL_FLAG_CONTRACTS,\n FILES_FLAG_CONTRACTS,\n FOCUS_FLAG_CONTRACTS,\n GC_FLAG_CONTRACTS,\n GET_FLAG_CONTRACTS,\n GLOBAL_FLAG_CONTRACTS,\n GUIDE_FLAG_CONTRACTS,\n HEALTH_FLAG_CONTRACTS,\n HISTORY_COMPACT_FLAG_CONTRACTS,\n HISTORY_FLAG_CONTRACTS,\n HISTORY_REDACT_FLAG_CONTRACTS,\n HISTORY_REPAIR_FLAG_CONTRACTS,\n INIT_FLAG_CONTRACTS,\n INSTALL_FLAG_CONTRACTS,\n LEARNINGS_FLAG_CONTRACTS,\n LIST_COMMANDER_STRING_OPTION_CONTRACTS,\n LIST_FILTER_FLAG_CONTRACTS,\n MEET_FLAG_CONTRACTS,\n NEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n NEXT_FLAG_CONTRACTS,\n NOTES_FLAG_CONTRACTS,\n PACKAGE_FLAG_CONTRACTS,\n PACKAGE_INIT_FLAG_CONTRACTS,\n PAUSE_TASK_FLAG_CONTRACTS,\n PLAN_FLAG_CONTRACTS,\n PM_CORE_COMMAND_NAMES,\n PM_EXTENSION_CAPABILITY_CONTRACTS,\n PM_EXTENSION_POLICY_MODE_CONTRACTS,\n PM_EXTENSION_POLICY_SURFACE_CONTRACTS,\n PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,\n PM_EXTENSION_SERVICE_NAME_CONTRACTS,\n PM_EXTENSION_TRUST_MODE_CONTRACTS,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,\n PM_TOOL_ACTIONS,\n PM_TOOL_ACTION_PARAMETER_CONTRACTS,\n PM_TOOL_PARAMETERS_SCHEMA,\n PM_TOOL_PARAMETERS_SCHEMA_MAJOR,\n PM_TOOL_PARAMETERS_SCHEMA_VERSION,\n PROFILE_FLAG_CONTRACTS,\n REINDEX_FLAG_CONTRACTS,\n RELEASE_FLAG_CONTRACTS,\n REMIND_FLAG_CONTRACTS,\n RESTORE_FLAG_CONTRACTS,\n SCHEMA_FLAG_CONTRACTS,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,\n SEARCH_FLAG_CONTRACTS,\n START_TASK_FLAG_CONTRACTS,\n STATS_FLAG_CONTRACTS,\n SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,\n TELEMETRY_FLAG_CONTRACTS,\n TEST_ALL_FLAG_CONTRACTS,\n TEST_FLAG_CONTRACTS,\n TEST_RUNS_FLAG_CONTRACTS,\n TOOL_ACTIVITY_OPTION_CONTRACTS,\n TOOL_AGGREGATE_OPTION_CONTRACTS,\n TOOL_CALENDAR_OPTION_CONTRACTS,\n TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_CONTEXT_OPTION_CONTRACTS,\n TOOL_CREATE_OPTION_CONTRACTS,\n TOOL_DEPS_OPTION_CONTRACTS,\n TOOL_LIST_FILTER_OPTION_CONTRACTS,\n TOOL_SEARCH_FILTER_OPTION_CONTRACTS,\n TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,\n TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_UPDATE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,\n UPDATE_FLAG_CONTRACTS,\n UPDATE_MANY_FLAG_CONTRACTS,\n UPGRADE_FLAG_CONTRACTS,\n compactFlagAliasContracts,\n isPmExtensionCapabilityContract,\n isPmExtensionPolicyModeContract,\n isPmExtensionPolicySurfaceContract,\n isPmExtensionServiceNameContract,\n isPmToolAction,\n readFirstStringFromCommanderOptions,\n readFirstValueFromCommanderOptions,\n readStringArrayFromCommanderOptions,\n resolveSubcommandFlagContractsForCommand,\n toCompletionFlagString,\n withFlagAliasMetadata,\n} from \"./cli-contracts.js\";\nexport type {\n CliFlagContract,\n OptionsFromContracts,\n PmActionSchemaContract,\n PmBulkMutationControlOptions,\n PmBulkMutationFilterOptions,\n PmCloseActionOptions,\n PmCloseManyActionOptions,\n PmCreateActionOptions,\n PmMutationAttributionOptions,\n PmOptionScalar,\n PmUpdateActionOptions,\n PmUpdateManyActionOptions,\n PmExtensionCapabilityContract,\n PmExtensionPolicyModeContract,\n PmExtensionPolicySurfaceContract,\n PmExtensionSandboxProfileContract,\n PmExtensionServiceNameContract,\n PmExtensionTrustModeContract,\n PmToolAction,\n ToolOptionFlagContract,\n} from \"./cli-contracts.js\";\nexport * from \"./compose.js\";\nexport * from \"./compile-cache.js\";\nexport * from \"./context-relevance.js\";\nexport * from \"./context-signal-store.js\";\nexport * from \"./context-packing.js\";\nexport * from \"./context-usage.js\";\nexport * from \"./dependency-provenance.js\";\nexport * from \"./history-compact.js\";\nexport * from \"./history-read.js\";\nexport * from \"./history-redact.js\";\nexport * from \"./history-repair.js\";\nexport * from \"./item-children.js\";\nexport * from \"./item-schedule.js\";\nexport * from \"./merge/index.js\";\nexport {\n runDeps,\n type DepsCollapseMode,\n type DepsFormat,\n type DepsGraphEdge,\n type DepsGraphNode,\n type DepsGraphResult,\n type DepsTreeNode,\n} from \"./dependencies.js\";\nexport * from \"./graph/index.js\";\nexport { runDocs } from \"./docs.js\";\nexport {\n runFiles,\n runFilesDiscover,\n type FilesDiscoveryCandidate,\n} from \"./files.js\";\nexport {\n applyPathMigrations,\n applyStandaloneNote,\n artifactKey,\n dedupeLinkedArtifacts,\n ensureScope,\n expandAddGlobEntries,\n normalizeLinkedPath,\n parseAddEntries,\n parseAddGlobEntries,\n parseMigrateEntries,\n parseRemoveEntries,\n renameArtifactsResultKey,\n runLinkedArtifacts,\n sortLinkedArtifacts,\n validateLinkedPaths,\n type AddGlobEntry,\n type LinkedArtifact,\n type LinkedArtifactCommandOptions,\n type LinkedArtifactKindConfig,\n type LinkedArtifactResult,\n type LinkedPathValidation,\n type PathMigration,\n} from \"./linked-artifacts.js\";\nexport * from \"./pagination.js\";\nexport * from \"./query/item-filter-options.js\";\nexport * from \"./query/parsers.js\";\nexport * from \"./output.js\";\nexport * from \"./relationship-analytics.js\";\nexport * from \"./relationship-context.js\";\nexport * from \"./relationship-history.js\";\nexport * from \"./relationship-migration.js\";\nexport * from \"./workspace-transaction.js\";\nexport * from \"./workspace-transaction-gc.js\";\nexport * from \"./item-transaction.js\";\nexport * from \"./item-metadata-index.js\";\nexport * from \"./structured-mutations.js\";\nexport * from \"./runtime-primitives.js\";\nexport * from \"./error-runtime.js\";\nexport * from \"./relationships.js\";\nexport * from \"./actionability.js\";\nexport type {\n PlanCommandOptions,\n PlanCommandResult,\n PlanDispatchInput,\n PlanResultPlan,\n PlanShowDepth,\n PlanStepSummary,\n PlanSubcommand,\n PlanTemplateName,\n} from \"../cli/commands/plan.js\";\nexport {\n PLAN_SHOW_DEPTH_VALUES,\n PLAN_SUBCOMMANDS,\n PLAN_TEMPLATE_NAMES,\n} from \"../cli/commands/plan.js\";\nexport * from \"./define.js\";\nexport {\n BASELINE_ITEM_FORMAT_VERSION,\n BUILTIN_ITEM_TYPE_VALUES,\n CONFIDENCE_TEXT_VALUES,\n CURRENT_ITEM_FORMAT_VERSION,\n DEPENDENCY_KIND_VALUES,\n EXIT_CODE,\n ISSUE_SEVERITY_VALUES,\n ITEM_TYPE_VALUES,\n PM_CLI_EXPECTED_ERROR_NAME,\n PmCliError,\n PmClient,\n RISK_VALUES,\n STATUS_VALUES,\n acquireLock,\n appendHistoryEntry,\n canonicalDocument,\n classifyItemFormatVersion,\n clearWorkspaceContractsCache,\n commitImportedItem,\n createHistoryEntry,\n createPmCliExpectedError,\n effectiveItemFormatVersion,\n emptyImportedDocument,\n ensureTrackerInitialized,\n generateItemId,\n getActiveExtensionRegistrations,\n getContracts,\n getHistoryPath,\n getItemPath,\n getSettingsPath,\n getWorkspaceContracts,\n isPmCliExpectedError,\n isTimestampLiteral,\n listAllItemMetadata,\n loadCreateTemplateOptions,\n locateItem,\n normalizeItemMetadata,\n normalizeItemFormatVersion,\n normalizeItemId,\n normalizeRawItemId,\n normalizeStatusInput,\n nowIso,\n parseTags,\n pathExists,\n readBooleanOption,\n readCsvListOption,\n readFileIfExists,\n readLocatedItem,\n readRequiredString,\n readSettings,\n readStringOption,\n removeFileIfExists,\n renderCalendarMarkdown,\n renderCalendarToon,\n renderGuideMarkdown,\n resolveCalendarOutputFormat,\n resolveGuideOutputFormat,\n resolveItemTypeRegistry,\n resolvePmRoot,\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n runAction,\n runActiveOnReadHooks,\n runActiveOnWriteHooks,\n runCalendar,\n runCompletion,\n runGuide,\n runList,\n runReindex,\n runSearch,\n runTemplatesList,\n runTemplatesSave,\n runTemplatesShow,\n runTestRunsList,\n runTestRunsLogs,\n runTestRunsResume,\n runTestRunsStatus,\n runTestRunsStop,\n scanItemFormatVersions,\n selectImportAuthor,\n serializeItemDocument,\n splitFrontMatter,\n toEstimatedMinutesValue,\n toImportBoolean,\n toImportConfidence,\n toImportInteger,\n toImportLinkedDocs,\n toImportLinkedFiles,\n toImportLinkedTests,\n toImportLogEntries,\n toImportNormalizedEnum,\n toImportNumberMap,\n toImportPriority,\n toImportStatus,\n toImportStringList,\n toImportStringMap,\n toImportTags,\n toNonEmptyImportString,\n writeFileAtomic,\n aggregate,\n append,\n claim,\n claimNext,\n close,\n closeTask,\n comments,\n config,\n context,\n copy,\n create,\n deleteItem,\n deps,\n docs,\n extension,\n extensionActivate,\n extensionDeactivate,\n extensionList,\n files,\n filesDiscover,\n focus,\n gc,\n get,\n graph,\n health,\n historyCompact,\n historyCompactBulk,\n historyRedact,\n historyRepair,\n historyRepairAll,\n init,\n learnings,\n list,\n next,\n notes,\n packageActivate,\n packageCatalog,\n packageDeactivate,\n packageDescribe,\n packageDoctor,\n packageInstall,\n packageLifecycle,\n packageList,\n packageManage,\n packageReload,\n packageUninstall,\n pauseTask,\n profile,\n profileApply,\n profileLint,\n profileList,\n profileShow,\n release,\n restore,\n schema,\n schemaAddField,\n schemaAddStatus,\n schemaAddType,\n schemaApplyPreset,\n schemaInferTypes,\n schemaList,\n schemaListFields,\n schemaRemoveField,\n schemaRemoveStatus,\n schemaRemoveType,\n schemaShow,\n schemaShowField,\n schemaShowStatus,\n search,\n startTask,\n stats,\n update,\n upgrade,\n validate,\n type AggregateOptions,\n type AggregateResult,\n type AggregateRow,\n type AppendCommandOptions,\n type AppendResult,\n type BlockerEntry,\n type CalendarOptions,\n type CalendarResult,\n type ClaimResult,\n type CloseResult,\n type CloseTaskResult,\n type CommitImportedItemParams,\n type CommitImportedItemResult,\n type CommentsCommandOptions,\n type CommentsResult,\n type ConfigCommandOptions,\n type ConfigResult,\n type CompletionResult,\n type CompletionShell,\n type ContractsCommandOptions,\n type ContractsResult,\n type ContextFocusItem,\n type ContextOptions,\n type ContextOutputFormat,\n type ContextResult,\n type CopyResult,\n type CreatePmCliExpectedErrorOptions,\n type CreateResult,\n type CreateTemplateOptions,\n type Dependency,\n type DeleteResult,\n type DepsCommandOptions,\n type DepsResult,\n type DocsCommandOptions,\n type DocsResult,\n type ExtensionCommandOptions,\n type ExtensionCommandResult,\n type FilesCommandOptions,\n type FilesDiscoverOptions,\n type FilesDiscoverResult,\n type FilesResult,\n type FocusResult,\n type GcCommandOptions,\n type GcResult,\n type GetContractsOptions,\n type GetOptions,\n type GetResult,\n type GuideDepth,\n type GuideOptions,\n type GuideOutputFormat,\n type GuideResult,\n type HealthResult,\n type ImportLinkedScope,\n type InitCommandOptions,\n type InitResult,\n type ItemFormatVersionScanEntry,\n type ItemFormatVersionScanResult,\n type ItemFormatVersionStatus,\n type LearningsCommandOptions,\n type LearningsResult,\n type LinkedDoc,\n type LinkedFile,\n type LinkedTest,\n type ListedItem,\n type ListCompactResult,\n type ListFullResult,\n type ListOptions,\n type ListProjectedItem,\n type ListProjectedItemCore,\n type ListResult,\n type ListResultItem,\n type ListSortField,\n type ListSortOrder,\n type ListTreeItem,\n type ListTreeMetadata,\n type ListVerboseResult,\n type LogNote,\n type NextActionableItem,\n type NextBlockerRef,\n type NextOptions,\n type NextOutputFormat,\n type NextRecommendation,\n type NextResult,\n type NotesCommandOptions,\n type NotesResult,\n type PackageCommandOptions,\n type PackageCommandResult,\n type PauseTaskResult,\n type PmActionInput,\n type PmActionName,\n type PmActionOptions,\n type PmClientCloseActionOptions,\n type PmClientFullMutationOptions,\n type PmClientMutationOptions,\n type PmClientOptions,\n type PmClientRunArgs,\n type PmCliExpectedError,\n type ProfileApplyCommandOptions,\n type ProfileApplyResult,\n type ProfileLintResult,\n type ProfileListResult,\n type ProfileResult,\n type ProfileShowResult,\n type ProfileSubcommand,\n type ReindexOptions,\n type ReindexResult,\n type ReleaseResult,\n type RestoreResult,\n type RunHealthOptions,\n type SchemaAddFieldCommandOptions,\n type SchemaAddFieldResult,\n type SchemaAddStatusCommandOptions,\n type SchemaAddStatusResult,\n type SchemaAddTypeCommandOptions,\n type SchemaAddTypeInferCommandOptions,\n type SchemaAddTypeInferResult,\n type SchemaAddTypeResult,\n type SchemaApplyPresetCommandOptions,\n type SchemaApplyPresetResult,\n type SchemaInspectResult,\n type SchemaListFieldsResult,\n type SchemaListResult,\n type SchemaRemoveFieldCommandOptions,\n type SchemaRemoveFieldResult,\n type SchemaRemoveStatusCommandOptions,\n type SchemaRemoveStatusResult,\n type SchemaRemoveTypeCommandOptions,\n type SchemaRemoveTypeResult,\n type SchemaShowFieldResult,\n type SchemaShowResult,\n type SchemaShowStatusResult,\n type SchemaResult,\n type SchemaSubcommand,\n type SearchCompactResult,\n type SearchHit,\n type SearchHitHighlight,\n type SearchMatchMode,\n type SearchOptions,\n type ClaimNextOptions,\n type SearchResult,\n type SearchResultItem,\n type SearchVerboseResult,\n type StartTaskResult,\n type StatsCommandOptions,\n type StatsResult,\n type TemplatesListResult,\n type TemplatesSaveResult,\n type TemplatesShowResult,\n type TestRunsListCommandOptions,\n type TestRunsLogsCommandOptions,\n type TestRunsResumeCommandOptions,\n type TestRunsStopCommandOptions,\n type ToImportLinkedArtifactsOptions,\n type ToImportLinkedTestsOptions,\n type ToImportLogEntriesOptions,\n type UpdateResult,\n type UpgradeCommandOptions,\n type UpgradeResult,\n type ValidateCommandOptions,\n type ValidateResult,\n type WorkspaceContracts,\n type WorkspaceContractsOptions,\n} from \"./runtime.js\";\nexport { runStats } from \"./stats.js\";\nexport {\n DEFAULT_EVAL_QUERIES_RELATIVE_PATH,\n runEval,\n type EvalOptions,\n type EvalQueryReport,\n type EvalResult,\n} from \"./eval.js\";\nexport {\n runTelemetry,\n TELEMETRY_SUBCOMMANDS,\n type TelemetryCommandOptions,\n type TelemetrySubcommand,\n} from \"./telemetry.js\";\nexport {\n classifyLinkedTestFailure,\n countFailureCategories,\n extractReferencedPmItemIdsFromCommand,\n resolveLinkedTestFailureExitCode,\n runLinkedTests,\n runTest,\n summarizeContextPreflight,\n type LinkedTestFailureCategory,\n type TestCommandOptions,\n type TestResult,\n type TestRunResult,\n} from \"./test/execution.js\";\nexport {\n runTestAll,\n type TestAllCommandOptions,\n type TestAllItemResult,\n type TestAllResult,\n} from \"./test/batch.js\";\nexport {\n LINKED_TEST_ENV_NAME_PATTERN,\n LINKED_TEST_PM_CONTEXT_MODE_VALUES,\n LINKED_TEST_PROTECTED_ENV_KEYS,\n parseLinkedTestAssertionEqualsMap,\n parseLinkedTestAssertionGteMap,\n parseLinkedTestBoolean,\n parseLinkedTestContextMode,\n parseLinkedTestEnvClear,\n parseLinkedTestEnvSet,\n parseLinkedTestJsonEntries,\n parseLinkedTestMinLines,\n parseLinkedTestRegexList,\n parseLinkedTestStringList,\n type LinkedTestPmContextMode,\n} from \"./test/parsers.js\";\nexport {\n runStartBackgroundRun,\n runTestRunsWorker,\n type StartBackgroundRunCommandOptions,\n type StartBackgroundRunResult,\n} from \"./test/runs.js\";\nexport {\n BUILTIN_PROFILES,\n listProfiles,\n normalizeProfileName,\n PROFILE_NAMES,\n resolveProfile,\n type ProfileConfigEntry,\n type ProfileName,\n type ProfilePackageRecommendation,\n type ProfileTemplateEntry,\n type ProfileTemplateOptions,\n type ProjectProfileDefinition,\n type ProjectProfileRegistrationInput,\n} from \"../core/profile/profile-presets.js\";\nexport {\n planProfileApplication,\n type ProfileApplicationPlan,\n type ProfileChangeStatus,\n type ProfileComponentChange,\n type ProfileConfigChange,\n type ProfileConfigPlan,\n type ProfileCurrentState,\n type ProfilePackagePlan,\n type ProfileSchemaPlan,\n type ProfileTemplateChange,\n type ProfileTemplatePlan,\n type ProfileWorkflowChange,\n type ProfileWorkflowPlan,\n} from \"../core/profile/profile-plan.js\";\nexport {\n describeProfileComposition,\n describeProjectProfile,\n type ProjectProfileComposition,\n type ProjectProfileDescription,\n type ProjectProfilePackageSummary,\n} from \"../core/profile/profile-describe.js\";\nexport {\n lintProjectProfile,\n PROFILE_LINT_CODES,\n PROFILE_LINT_DIMENSIONS,\n type ProfileLintCode,\n type ProfileLintDimension,\n type ProfileLintSeverity,\n type ProjectProfileLintFinding,\n type ProjectProfileLintReport,\n} from \"../core/profile/profile-lint.js\";\nexport {\n assertExtensionBlueprint,\n assertExtensionCapabilityUsage,\n assertExtensionDeactivated,\n assertExtensionManifestCompatible,\n assertExtensionManifestMatchesBlueprint,\n assertExtensionPreflight,\n assertPackageManifest,\n assertProjectProfile,\n assertRegisteredCommandContract,\n assertRegisteredCommandOverride,\n assertRegisteredExporter,\n assertRegisteredFlags,\n assertRegisteredHook,\n assertRegisteredImporter,\n assertRegisteredItemField,\n assertRegisteredItemType,\n assertRegisteredMigration,\n assertRegisteredParserOverride,\n assertRegisteredPreflightOverride,\n assertRegisteredProfile,\n assertRegisteredRendererOverride,\n assertRegisteredSearchProvider,\n assertRegisteredServiceOverride,\n assertRegisteredVectorStoreAdapter,\n activateExtensionForTest,\n createExtensionTestHarness,\n deactivateExtensionForTest,\n describeExtensionActivation,\n runRegisteredCommandForTest,\n runRegisteredCommandOverrideForTest,\n runRegisteredExporterForTest,\n runRegisteredHookForTest,\n runRegisteredImporterForTest,\n runRegisteredMigrationForTest,\n runRegisteredParserOverrideForTest,\n runRegisteredPreflightOverrideForTest,\n runRegisteredRendererOverrideForTest,\n runRegisteredSearchProviderForTest,\n runRegisteredServiceOverrideForTest,\n runRegisteredVectorStoreAdapterForTest,\n type ActivateExtensionForTestOptions,\n type AssertProjectProfileOptions,\n type DeactivateExtensionForTestOptions,\n type DescribeExtensionActivationOptions,\n type ExtensionActivationSummary,\n type RenderExtensionHarnessMarkdownOptions,\n type RunRegisteredCommandForTestOptions,\n type RunRegisteredExporterForTestOptions,\n type RunRegisteredHookForTestOptions,\n type RunRegisteredImporterForTestOptions,\n type RunRegisteredMigrationForTestOptions,\n type RunRegisteredSearchProviderForTestOptions,\n type RunRegisteredVectorStoreAdapterForTestOptions,\n type SearchProviderOperationContexts,\n type SearchProviderOperationResults,\n type VectorStoreAdapterOperationContexts,\n type VectorStoreAdapterOperationResults,\n type ExtensionCapabilityUsageAssertion,\n type ExtensionCapabilityUsageExpectation,\n type ExtensionDeactivationExpectation,\n type ExtensionManifestBlueprintMatch,\n type ExtensionTestHarness,\n type PackageManifestExpectation,\n type PackageManifestResourceExpectation,\n type RegisteredCommandContractAssertion,\n type RegisteredCommandContractExpectation,\n type RegisteredCommandOverrideExpectation,\n type RegisteredExporterExpectation,\n type RegisteredFlagsExpectation,\n type RegisteredHookExpectation,\n type RegisteredHookKind,\n type RegisteredImporterExpectation,\n type RegisteredItemFieldAssertion,\n type RegisteredItemFieldExpectation,\n type RegisteredItemTypeAssertion,\n type RegisteredItemTypeExpectation,\n type RegisteredMigrationExpectation,\n type RegisteredParserOverrideExpectation,\n type RegisteredPreflightOverrideExpectation,\n type RegisteredProfileAssertion,\n type RegisteredProfileExpectation,\n type RegisteredRendererOverrideExpectation,\n type RegisteredSearchProviderExpectation,\n type RegisteredServiceOverrideExpectation,\n type RegisteredVectorStoreAdapterExpectation,\n} from \"./testing.js\";\n\n/**\n * Canonical extension capability names accepted by pm.\n *\n * Extension manifests should declare one or more of these values in\n * `capabilities`.\n */\nexport const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;\n/** Restricts extension capability values accepted by command, SDK, and storage contracts. */\nexport type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];\n\n/** Canonical extension governance policy modes and registration surfaces. */\nexport const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;\n/** Public contract for extension policy surfaces, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;\n/** Public contract for extension trust modes, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;\n/** Public contract for extension sandbox profiles, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;\n/** Restricts extension policy mode values accepted by command, SDK, and storage contracts. */\nexport type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];\n/** Restricts extension policy surface values accepted by command, SDK, and storage contracts. */\nexport type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];\n/** Restricts extension trust mode values accepted by command, SDK, and storage contracts. */\nexport type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];\n/** Restricts extension sandbox profile values accepted by command, SDK, and storage contracts. */\nexport type ExtensionSandboxProfile =\n (typeof EXTENSION_SANDBOX_PROFILES)[number];\n\n/** Versioned capability contract metadata emitted by runtime diagnostics. */\nexport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n};\n\n/** Least-privilege capability reconciliation helpers: map declared capabilities against the registration surfaces a package actually exercises at activation. */\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"../core/extensions/capability-usage.js\";\n\n/**\n * Render an extension/package activation summary\n * ({@link describeExtensionActivation} / {@link describeExtensionBlueprint}) to a\n * deterministic Markdown reference document — the author-facing *render* leg of\n * the describe verb, for drift-free package READMEs.\n */\nexport {\n renderExtensionSurfaceMarkdown,\n type ExtensionSurfaceMarkdownOptions,\n} from \"../core/extensions/activation-summary-markdown.js\";\n\nexport type {\n AfterCommandAffectedItem,\n AfterCommandHook,\n AfterCommandHookContext,\n BeforeCommandHook,\n BeforeCommandHookContext,\n CommandDefinition,\n ExtensionCommandArgumentDefinition,\n CommandHandler,\n CommandHandlerContext,\n CommandHandlerResult,\n CommandOverride,\n CommandOverrideContext,\n ExtensionServiceName,\n Exporter,\n ExtensionActivationResult,\n ExtensionApi,\n ExtensionCommandRegistry,\n ExtensionDeactivationFailure,\n ExtensionDeactivationOptions,\n ExtensionDeactivationResult,\n ExtensionDiagnostic,\n ExtensionDiscoveryResult,\n ExtensionHookRegistry,\n ExtensionSelfIdentity,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionManifestEngines,\n ExtensionGovernancePolicy,\n ExtensionPolicyOverride,\n ExtensionProvenanceMetadata,\n ExtensionRuntimePermissionDeclaration,\n ExtensionSearchMode,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceRegistry,\n FlagValueType,\n FlagDefinition,\n ImportExportContext,\n ImportExportRegistrationOptions,\n Importer,\n OnIndexHook,\n OnIndexHookContext,\n OnReadHook,\n OnReadHookContext,\n OnWriteHook,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverride,\n ParserOverrideContext,\n ParserOverrideDelta,\n PreflightOverride,\n PreflightOverrideContext,\n PreflightOverrideDelta,\n PreflightRuntimeDecision,\n RegisteredExtensionExporter,\n RegisteredExtensionFlagDefinitions,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionProjectProfile,\n RegisteredExtensionSchemaMigrationDefinition,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionServiceOverride,\n RegisteredExtensionVectorStoreAdapter,\n RendererOverride,\n RendererOverrideContext,\n SchemaFieldDefinition,\n SchemaItemTypeCommandOptionPolicyDefinition,\n SchemaItemTypeOptionDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SchemaMigrationRunContext,\n SchemaMigrationRunner,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderDefinition,\n SearchProviderHit,\n SearchProviderQueryContext,\n SearchProviderQueryResult,\n ServiceOverride,\n ServiceOverrideContext,\n VectorStoreAdapterDefinition,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n VectorStoreUpsertPoint,\n} from \"../core/extensions/loader.js\";\n\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type {\n ItemDocument,\n ItemMetadata,\n ItemStatus,\n ItemType,\n PmSettings,\n} from \"../types/index.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC3D,SAAO;AACT;AAQM,SAAU,wBACd,UAA2B;AAE3B,SAAO;AACT;AASM,SAAU,sBACd,UAAyB;AAEzB,SAAO;AACT;AAQM,SAAU,uBACd,UAA0B;AAE1B,SAAO;AACT;AASM,SAAU,eAAe,UAAkB;AAC/C,SAAO;AACT;AASM,SAAU,eAAe,UAAkB;AAC/C,SAAO;AACT;AASM,SAAU,wBACd,MAAuB;AAEvB,SAAO;AACT;AASM,SAAU,uBACd,MAAsB;AAEtB,SAAO;AACT;AAQM,SAAU,kBAAkB,MAAiB;AACjD,SAAO;AACT;AAQM,SAAU,iBAAiB,MAAgB;AAC/C,SAAO;AACT;AASM,SAAU,kBAAkB,MAAiB;AACjD,SAAO;AACT;;;;;;;;;;ACilBO,IAAM,yBAAyB;AAK/B,IAAM,yBAAyB;AAE/B,IAAM,4BAA4B;AAElC,IAAM,wBAAwB;AAE9B,IAAM,6BAA6B;",
|
|
6
|
+
"names": ["fs", "path", "path", "fs", "profile"]
|
|
7
7
|
}
|
package/dist/cli.js
CHANGED
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* Bootstraps the executable pm CLI entrypoint and startup optimizations.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
8
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="820a74b6-6438-5658-92f2-232f1a7d38b1")}catch(e){}}();
|
|
9
9
|
import fs from "node:fs";
|
|
10
10
|
import * as nodeModule from "node:module";
|
|
11
11
|
import os from "node:os";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
import { runCliWithBundleIntegrity, } from "./cli/bundle-integrity.js";
|
|
15
|
+
import { pruneCompileCacheGenerations, resolveCompileCacheGeneration, } from "./sdk/compile-cache.js";
|
|
15
16
|
function enableNodeCompileCache() {
|
|
16
17
|
const { enableCompileCache } = nodeModule;
|
|
17
18
|
if (typeof enableCompileCache !== "function" ||
|
|
@@ -21,9 +22,14 @@ function enableNodeCompileCache() {
|
|
|
21
22
|
const userCacheKey = typeof process.getuid === "function"
|
|
22
23
|
? String(process.getuid())
|
|
23
24
|
: os.userInfo().username.replace(/[^a-zA-Z0-9._-]/g, "_");
|
|
24
|
-
const
|
|
25
|
-
|
|
25
|
+
const configuredCacheDir = process.env.PM_CLI_COMPILE_CACHE_DIR;
|
|
26
|
+
const defaultCacheRoot = path.join(os.tmpdir(), `pm-cli-node-compile-cache-${userCacheKey}`);
|
|
27
|
+
const generation = resolveCompileCacheGeneration(readPackageVersionForPath(fileURLToPath(import.meta.url)));
|
|
28
|
+
const cacheDir = configuredCacheDir ?? path.join(defaultCacheRoot, generation);
|
|
26
29
|
try {
|
|
30
|
+
if (configuredCacheDir === undefined) {
|
|
31
|
+
pruneCompileCacheGenerations(defaultCacheRoot, generation);
|
|
32
|
+
}
|
|
27
33
|
enableCompileCache(cacheDir);
|
|
28
34
|
}
|
|
29
35
|
catch {
|
|
@@ -87,4 +93,4 @@ if (!printFastVersionIfRequested()) {
|
|
|
87
93
|
await runCliWithBundleIntegrity(process.argv.slice(2), cliEntrypointPath, () => import("./cli-bundle/main.js"), process.stderr.write.bind(process.stderr));
|
|
88
94
|
}
|
|
89
95
|
//# sourceMappingURL=cli.js.map
|
|
90
|
-
//# debugId=
|
|
96
|
+
//# debugId=820a74b6-6438-5658-92f2-232f1a7d38b1
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sources":["cli.ts"],"sourceRoot":"/","sourcesContent":["#!/usr/bin/env node\n/**\n * @module cli\n *\n * Bootstraps the executable pm CLI entrypoint and startup optimizations.\n */\nimport fs from \"node:fs\";\nimport * as nodeModule from \"node:module\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport {\n runCliWithBundleIntegrity,\n} from \"./cli/bundle-integrity.js\";\n\ntype NodeModuleWithCompileCache = typeof nodeModule & {\n enableCompileCache?: (cacheDir?: string) => {\n status?: number;\n message?: string;\n };\n};\n\nfunction enableNodeCompileCache(): void {\n const { enableCompileCache } = nodeModule as NodeModuleWithCompileCache;\n if (\n typeof enableCompileCache !== \"function\" ||\n process.env.PM_CLI_DISABLE_COMPILE_CACHE === \"1\"\n ) {\n return;\n }\n const userCacheKey =\n typeof process.getuid === \"function\"\n ? String(process.getuid())\n : os.userInfo().username.replace(/[^a-zA-Z0-9._-]/g, \"_\");\n const
|
|
1
|
+
{"version":3,"file":"cli.js","sources":["cli.ts"],"sourceRoot":"/","sourcesContent":["#!/usr/bin/env node\n/**\n * @module cli\n *\n * Bootstraps the executable pm CLI entrypoint and startup optimizations.\n */\nimport fs from \"node:fs\";\nimport * as nodeModule from \"node:module\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport {\n runCliWithBundleIntegrity,\n} from \"./cli/bundle-integrity.js\";\nimport {\n pruneCompileCacheGenerations,\n resolveCompileCacheGeneration,\n} from \"./sdk/compile-cache.js\";\n\ntype NodeModuleWithCompileCache = typeof nodeModule & {\n enableCompileCache?: (cacheDir?: string) => {\n status?: number;\n message?: string;\n };\n};\n\nfunction enableNodeCompileCache(): void {\n const { enableCompileCache } = nodeModule as NodeModuleWithCompileCache;\n if (\n typeof enableCompileCache !== \"function\" ||\n process.env.PM_CLI_DISABLE_COMPILE_CACHE === \"1\"\n ) {\n return;\n }\n const userCacheKey =\n typeof process.getuid === \"function\"\n ? String(process.getuid())\n : os.userInfo().username.replace(/[^a-zA-Z0-9._-]/g, \"_\");\n const configuredCacheDir = process.env.PM_CLI_COMPILE_CACHE_DIR;\n const defaultCacheRoot = path.join(\n os.tmpdir(),\n `pm-cli-node-compile-cache-${userCacheKey}`,\n );\n const generation = resolveCompileCacheGeneration(\n readPackageVersionForPath(fileURLToPath(import.meta.url)),\n );\n const cacheDir = configuredCacheDir ?? path.join(defaultCacheRoot, generation);\n try {\n if (configuredCacheDir === undefined) {\n pruneCompileCacheGenerations(defaultCacheRoot, generation);\n }\n enableCompileCache(cacheDir);\n } catch {\n // Compile caching is a startup optimization only; never block CLI execution.\n }\n}\n\nfunction findPackageJson(startPath: string): string | undefined {\n let current = path.dirname(path.resolve(startPath));\n while (true) {\n const candidate = path.join(current, \"package.json\");\n if (fs.existsSync(candidate)) {\n return candidate;\n }\n const parent = path.dirname(current);\n if (parent === current) {\n return undefined;\n }\n current = parent;\n }\n}\n\nfunction printFastVersionIfRequested(): boolean {\n const args = process.argv.slice(2);\n const versionArgs = args.filter((arg) => arg !== \"--no-extensions\");\n if (\n versionArgs.length !== 1 ||\n (versionArgs[0] !== \"--version\" && versionArgs[0] !== \"-V\")\n ) {\n return false;\n }\n const version = readPackageVersionForPath(fileURLToPath(import.meta.url));\n if (version === undefined) {\n return false;\n }\n console.log(version);\n return true;\n}\n\nfunction readPackageVersionForPath(startPath: string): string | undefined {\n const packageJsonPath = findPackageJson(startPath);\n if (!packageJsonPath) {\n return undefined;\n }\n try {\n const parsed = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\")) as {\n version?: unknown;\n };\n if (typeof parsed.version !== \"string\") {\n return undefined;\n }\n return parsed.version;\n } catch {\n return undefined;\n }\n}\n\n/** Public contract for test only, shared by SDK and presentation-layer consumers. */\nexport const _testOnly = {\n enableNodeCompileCache,\n findPackageJson,\n printFastVersionIfRequested,\n readPackageVersionForPath,\n};\n\nif (!printFastVersionIfRequested()) {\n enableNodeCompileCache();\n const cliEntrypointPath = fileURLToPath(import.meta.url);\n await runCliWithBundleIntegrity(\n process.argv.slice(2),\n cli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@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
/** Registry of every non-extension `pm health` / `pm validate` warning code and its remediation. Extension findings keep their richer, contextual `details.triage.remediation` produced by the extension health triage and are intentionally excluded here (see pm-0hnu: "all non-extension checks"). */
|
|
21
21
|
|
|
22
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
22
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="836f71d5-acd0-5c77-ae31-9ae98914727c")}catch(e){}}();
|
|
23
23
|
export const REMEDIATION_REGISTRY = Object.freeze([
|
|
24
24
|
// --- pm health: directories ---
|
|
25
25
|
{
|
|
@@ -28,6 +28,11 @@ export const REMEDIATION_REGISTRY = Object.freeze([
|
|
|
28
28
|
summary: "Recreate missing tracker directories (pm init is idempotent and restores the scaffold).",
|
|
29
29
|
},
|
|
30
30
|
// --- pm health: settings (read/parse) ---
|
|
31
|
+
{
|
|
32
|
+
code: "settings_read_fs_error",
|
|
33
|
+
command: "pm config list --json",
|
|
34
|
+
summary: "settings.json could not be read as a regular file and pm fell back to defaults; repair the reported path or permissions, then re-run.",
|
|
35
|
+
},
|
|
31
36
|
{
|
|
32
37
|
code: "settings_read_invalid_json",
|
|
33
38
|
command: "pm config list --json",
|
|
@@ -444,4 +449,4 @@ export function buildRemediationCommands(warnings) {
|
|
|
444
449
|
return Object.values(buildRemediationMap(warnings));
|
|
445
450
|
}
|
|
446
451
|
//# sourceMappingURL=remediation.js.map
|
|
447
|
-
//# debugId=
|
|
452
|
+
//# debugId=836f71d5-acd0-5c77-ae31-9ae98914727c
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remediation.js","sources":["core/diagnostics/remediation.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Shared machine-executable remediation registry.\n *\n * `pm health` and `pm validate` both emit stable, colon-delimited warning tokens\n * (for example `history_drift_missing_stream:pm-abcd` or\n * `validate_resolution_missing_fields:3`). Agents that gate on these commands\n * previously had to hardcode the mapping from a warning code to the `pm` command\n * that fixes it. This module is the single source of truth for that mapping so\n * `pm health --json` (per-check `remediation_map`) and `pm validate --fix-hints`\n * (per-check `fix_hints`) can both surface executable remediation without any\n * duplicated, drift-prone lookup tables.\n *\n * Semantics of {@link RemediationEntry.command}: the suggested next `pm` command\n * an operator/agent should run to resolve findings with that code. Per-item\n * findings use an `<id>` placeholder (callers that have the concrete id may\n * substitute it); findings whose only fix is a manual file edit point at the\n * most useful diagnostic/repair command and describe the manual step in\n * {@link RemediationEntry.summary}.\n */\n\n/** Maps a stable diagnostic warning code to the command and summary that resolve it. */\nexport interface RemediationEntry {\n /** Stable warning-code prefix this entry resolves. A warning matches when it equals this code or begins with `<code>:`. Registry codes are mutually exclusive under that colon-boundary rule (no code is a `:`-delimited prefix of another — e.g. `settings:id_prefix_empty` is distinct from a bare `settings`, which is intentionally not registered), so `resolveRemediation` uses first-match with no ordering dependency. */\n readonly code: string;\n /** Executable `pm` command (or imperative) that resolves the finding. May contain an `<id>` placeholder. */\n readonly command: string;\n /** One-line description of what the command does / which manual step it covers. */\n readonly summary: string;\n}\n\n/** Registry of every non-extension `pm health` / `pm validate` warning code and its remediation. Extension findings keep their richer, contextual `details.triage.remediation` produced by the extension health triage and are intentionally excluded here (see pm-0hnu: \"all non-extension checks\"). */\nexport const REMEDIATION_REGISTRY: readonly RemediationEntry[] = Object.freeze([\n // --- pm health: directories ---\n {\n code: \"missing_directory\",\n command: \"pm init\",\n summary:\n \"Recreate missing tracker directories (pm init is idempotent and restores the scaffold).\",\n },\n // --- pm health: settings (read/parse) ---\n {\n code: \"settings_read_invalid_json\",\n command: \"pm config list --json\",\n summary:\n \"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run.\",\n },\n {\n code: \"settings_read_invalid_schema\",\n command: \"pm config list --json\",\n summary:\n \"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run.\",\n },\n {\n code: \"settings_read_merge_failed\",\n command: \"pm config list --json\",\n summary:\n \"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files.\",\n },\n // --- pm health: settings_values ---\n {\n code: \"settings:id_prefix_empty\",\n command: \"pm config list --json\",\n summary:\n 'id_prefix is empty; set a non-empty \"id_prefix\" in settings.json so generated item ids are well-formed.',\n },\n {\n code: \"settings:locks_ttl_non_positive\",\n command: \"pm config list --json\",\n summary:\n 'locks.ttl_seconds must be positive; set a positive \"locks.ttl_seconds\" in settings.json.',\n },\n // --- pm health: telemetry (advisory) ---\n {\n code: \"telemetry_state_invalid_json\",\n command: \"pm health --check-telemetry\",\n summary:\n \"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_invalid_rows\",\n command: \"pm health --check-telemetry\",\n summary:\n \"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_pending\",\n command: \"pm health --check-telemetry\",\n summary:\n \"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only.\",\n },\n {\n code: \"telemetry_queue_high_retries\",\n command: \"pm telemetry flush\",\n summary:\n \"Some queued telemetry events are near retry exhaustion; flush now and verify endpoint reachability before entries are dropped.\",\n },\n {\n code: \"telemetry_endpoint_probe_failed\",\n command: \"pm health --check-telemetry\",\n summary:\n \"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_http_status\",\n command: \"pm health --check-telemetry\",\n summary:\n \"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_schema_version_behind\",\n command: \"pm health --check-telemetry\",\n summary:\n \"Client schema is behind server; upgrade pm-cli to emit the latest event shape.\",\n },\n {\n code: \"telemetry_otel_export_failing\",\n command: \"pm health --check-telemetry\",\n summary:\n \"OTLP trace spans are queued but the traces endpoint export is failing; spans retry automatically on the next reachable command, or set PM_TELEMETRY_OTEL_DISABLED=1 to skip OTLP export. Advisory only.\",\n },\n // --- pm health: integrity ---\n {\n code: \"integrity_item_unreadable\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary:\n \"An item file could not be read; restore or repair the file at the reported path.\",\n },\n {\n code: \"integrity_item_parse_failed\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary:\n \"An item file failed to parse; fix the malformed item metadata at the reported path.\",\n },\n {\n code: \"integrity_item_conflict_marker\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary:\n \"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line.\",\n },\n {\n code: \"integrity_history_unreadable\",\n command: \"pm history-repair <id>\",\n summary:\n \"A history stream could not be read; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_invalid_json\",\n command: \"pm history-repair <id>\",\n summary:\n \"A history stream contains invalid JSON; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_conflict_marker\",\n command: \"pm history-repair <id>\",\n summary:\n \"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain.\",\n },\n // --- pm validate: storage_integrity (post-merge corruption detection) ---\n {\n code: \"validate_storage_unreadable_items\",\n command: \"pm validate --check-storage-integrity --verbose-diagnostics\",\n summary:\n \"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 — list commands silently skip it while pm get hard-errors.\",\n },\n {\n code: \"validate_storage_duplicate_item_ids\",\n command: \"pm validate --check-storage-integrity --verbose-diagnostics\",\n summary:\n \"One item id is claimed by multiple item documents — 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.\",\n },\n {\n code: \"validate_storage_history_conflict_markers\",\n command: \"pm merge driver history <base> <ours> <theirs>\",\n summary:\n \"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.\",\n },\n {\n code: \"validate_storage_unparseable_history\",\n command: \"pm history-repair <id>\",\n summary:\n \"A history stream's newest line is not valid JSONL; repair or restore the stream before further mutations.\",\n },\n {\n code: \"validate_storage_resurrected_items\",\n command: \"pm delete <id>\",\n summary:\n \"A live item's newest history operation is a delete: a delete/modify merge silently resurrected it. Decide the winner — re-delete the item, or keep it and append a mutation documenting the revival.\",\n },\n {\n code: \"validate_storage_unparseable_config\",\n command: \"pm merge driver json <base> <ours> <theirs>\",\n summary:\n \"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.\",\n },\n {\n code: \"validate_merge_fence_drift\",\n command: \"pm merge install\",\n summary:\n \"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.\",\n },\n // --- pm health (integrity) + pm validate (format_version): item format version ---\n {\n code: \"integrity_item_outdated_format_version\",\n command: \"pm validate --verbose-diagnostics\",\n summary:\n \"An item predates the current storage format version; a pm storage migration rewrites it. Use --verbose-diagnostics to list the affected items.\",\n },\n {\n code: \"integrity_item_ahead_format_version\",\n command: \"npm install -g @unbrained/pm-cli@latest\",\n summary:\n \"An item was written by a newer pm format version than this runtime supports; upgrade pm to read and validate it safely.\",\n },\n // --- pm health: history_drift ---\n // `pm health` rewrites these commands to `pm history-repair --all` in the\n // per-check remediation_map when more than one stream is drifted.\n {\n code: \"history_drift_missing_stream\",\n command: \"pm history-repair <id>\",\n summary:\n \"The item has no history stream; re-anchor the chain to rebuild it (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_unreadable_stream\",\n command: \"pm history-repair <id>\",\n summary:\n \"The item's history stream is unreadable; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_hash_mismatch\",\n command: \"pm history-repair <id>\",\n summary:\n \"The item's content hash no longer matches its history; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_chain_mismatch\",\n command: \"pm history-repair <id>\",\n summary:\n \"The item's history chain is broken; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n // --- pm health: storage (history compaction policy) ---\n {\n code: \"history_stream_over_compact_threshold\",\n command: \"pm history-compact <id>\",\n summary:\n \"The history stream exceeds the configured compaction threshold; compact it (pm history-compact --all-streams sweeps every over-threshold stream in one pass).\",\n },\n {\n code: \"history_unknown_author_events\",\n command: \"pm validate --check-history-drift --fix-hints\",\n summary:\n \"Historical mutations lack attributable authorship. Configure PM_AUTHOR, pass global --author, or set author_default so future audit events are attributable.\",\n },\n // --- pm health: locks ---\n {\n code: \"locks_stale_count\",\n command: \"pm gc --scope locks\",\n summary:\n \"Stale item-claim locks (embedded ttl elapsed) can block mutations; sweep them — gc retains active and unparseable locks.\",\n },\n {\n code: \"locks_unreadable\",\n command: \"pm gc --scope locks --dry-run\",\n summary:\n \"Some lock files could not be read; preview the sweep and inspect the unreadable files manually — gc never deletes what it cannot read.\",\n },\n // --- pm health: extensions ---\n // Most extension findings keep their richer, contextual\n // `details.triage.remediation` and are intentionally absent here. The\n // partial-coverage code is the exception: it is not a per-extension triage\n // result but a system-wide adoption gap (unmanaged installs the update-health\n // scan had to skip), so it has a single deterministic fix and belongs in the\n // shared registry like any other health finding (pm-bdvm).\n {\n code: \"extension_update_health_partial_coverage\",\n command: \"pm extension --adopt-all --project\",\n summary:\n \"Update-health coverage is partial because unmanaged extensions were skipped; adopt the existing installs into managed metadata so the update scan covers them (use --global for global-scope extensions, or pm package --adopt-all when working with packages).\",\n },\n // --- pm health: vectorization ---\n {\n code: \"vectorization_stale_items_remaining\",\n command: \"pm health --refresh-vectors\",\n summary:\n \"Some items have stale embeddings; refresh vectors so semantic search results stay current.\",\n },\n {\n code: \"vectorization_embedding_identity_changed\",\n command: \"pm reindex --mode semantic\",\n summary:\n \"Embedding provider/model changed since the last index; run a semantic reindex to rebuild vectors.\",\n },\n // --- pm validate: metadata ---\n // Note: validate_metadata_missing_author has no entry on purpose. `pm update\n // --author` sets the mutation/audit author (history), not the item's\n // `metadata.author` item-metadata field, and there is no CLI flag that writes\n // that field — so emitting a command here would record an audit entry without\n // clearing the finding. A missing item author must be restored at the source.\n {\n code: \"validate_metadata_missing_acceptance_criteria\",\n command: 'pm update <id> --acceptance-criteria \"<criteria>\"',\n summary:\n \"Backfill the missing acceptance criteria on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_estimate\",\n command: 'pm update <id> --estimate \"<estimate>\"',\n summary: \"Backfill the missing estimate on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_close_reason\",\n command: 'pm update <id> --close-reason \"<reason>\"',\n summary:\n \"Backfill the missing close reason on the reported closed item(s).\",\n },\n {\n code: \"validate_metadata_missing_reviewer\",\n command: 'pm update <id> --reviewer \"<name>\"',\n summary: \"Backfill the missing reviewer on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_risk\",\n command: 'pm update <id> --risk \"<level>\"',\n summary: \"Backfill the missing risk on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_confidence\",\n command: 'pm update <id> --confidence \"<level>\"',\n summary: \"Backfill the missing confidence on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_sprint\",\n command: 'pm update <id> --sprint \"<sprint>\"',\n summary: \"Backfill the missing sprint on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_release\",\n command: 'pm update <id> --release \"<release>\"',\n summary: \"Backfill the missing release on the reported item(s).\",\n },\n {\n code: \"validate_metadata_custom_profile_missing_required_fields\",\n command: 'pm config set metadata-required-fields --criterion \"<field>\"',\n summary:\n \"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items.\",\n },\n {\n code: \"validate_metadata_duplicate_issue_codes\",\n command: 'pm update <id> --title \"<distinct title>\"',\n summary:\n \"Two or more items share one logical issue code (GH-235); give each a distinct title so the derived code is unique, or close the redundant item with pm close <id> --duplicate-of <canonical-id> (closed-as-duplicate items are excluded from the check).\",\n },\n // --- pm validate: resolution ---\n {\n code: \"validate_resolution_missing_fields\",\n command: 'pm update <id> --resolution \"<how resolved>\"',\n summary:\n \"Backfill resolution / expected_result / actual_result on the reported closed item(s).\",\n },\n // --- pm validate: lifecycle ---\n {\n code: \"validate_lifecycle_active_closure_like_metadata\",\n command: \"pm update <id> --unset <closure-like-field>\",\n summary:\n \"Clear the closure-like field the validator flags on this active item — the detail row names it (resolution / actual-result / blocked-reason) — or close the item if it is actually done.\",\n },\n {\n code: \"validate_lifecycle_active_terminal_parent\",\n command: \"pm update <id> --parent <active-parent-id>\",\n summary:\n \"Reopen the terminal parent or move the active child under a non-terminal parent.\",\n },\n {\n code: \"validate_lifecycle_stale_blockers\",\n command: \"pm update <id> --unset blocked-by --unset blocked-reason\",\n summary:\n \"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles_error\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary:\n \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary:\n \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n {\n code: \"validate_hierarchy_parent_cycle_error\",\n command: \"pm update <id> --parent <other-id>\",\n summary:\n \"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent).\",\n },\n {\n code: \"validate_hierarchy_parent_cycle\",\n command: \"pm update <id> --parent <other-id>\",\n summary:\n \"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent).\",\n },\n // --- pm validate: files ---\n {\n code: \"validate_files_missing_linked_paths\",\n command: \"pm <files|docs> <id> --remove <path>\",\n summary:\n \"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc).\",\n },\n {\n code: \"validate_files_orphaned_paths\",\n command: \"pm <files|docs> <id> --add <path>\",\n summary:\n \"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace.\",\n },\n {\n code: \"validate_files_tracked_all_strict_forces_pm_internals\",\n command: \"pm validate --check-files --include-pm-internals\",\n summary:\n \"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode.\",\n },\n // --- pm validate: history_drift ---\n {\n code: \"validate_history_drift_missing_streams\",\n command: \"pm history-repair <id>\",\n summary:\n \"Re-anchor the history chains of the items missing a history stream.\",\n },\n {\n code: \"validate_history_drift_unreadable_streams\",\n command: \"pm history-repair <id>\",\n summary:\n \"Re-anchor the history chains of the items with an unreadable history stream.\",\n },\n {\n code: \"validate_history_drift_hash_mismatches\",\n command: \"pm history-repair <id>\",\n summary:\n \"Re-anchor the history chains of the items whose content hash drifted.\",\n },\n {\n code: \"validate_history_drift_chain_mismatches\",\n command: \"pm history-repair <id>\",\n summary:\n \"Re-anchor the history chains of the items with a broken history chain.\",\n },\n {\n code: \"validate_history_unknown_author_events\",\n command: \"pm config project set author_default <stable-agent-id>\",\n summary:\n \"Historical mutations lack attributable authorship. Set a stable default or use invocation-wide --author for future events; existing audit history remains append-only.\",\n },\n // --- pm validate: command_references ---\n {\n code: \"validate_command_references_stale_pm_ids\",\n command:\n 'pm update <id> --replace-tests --test \"command=<corrected-command>\" [--test ...]',\n summary:\n \"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call.\",\n },\n {\n code: \"validate_format_version_outdated_items\",\n command: \"pm validate --verbose-diagnostics\",\n summary:\n \"One or more items predate the current storage format version; a pm storage migration rewrites them. Use --verbose-diagnostics to list the affected items.\",\n },\n {\n code: \"validate_format_version_ahead_items\",\n command: \"npm install -g @unbrained/pm-cli@latest\",\n summary:\n \"One or more items were written by a newer pm format version than this runtime supports; upgrade pm to read and validate them safely.\",\n },\n]);\n\n/**\n * Resolve the remediation entry for a warning token, or `undefined` when no\n * entry is registered. A warning matches an entry when it equals the entry code\n * or begins with `<code>:` (the colon boundary keeps sibling codes such as\n * `validate_lifecycle_dependency_cycles` and\n * `validate_lifecycle_dependency_cycles_error` disjoint).\n *\n * First match is intentional and correct: registry codes are mutually exclusive\n * under the colon-boundary rule, so at most one entry can ever match a warning\n * and order is irrelevant. That invariant is enforced by a test (see\n * remediation-registry.spec.ts \"keeps every registry code mutually exclusive\"),\n * which is why this stays a simple linear scan rather than a longest-prefix\n * search — a longest-prefix tie-break is unreachable with disjoint codes.\n *\n * Accepts unknown input defensively (this is an exported helper SDK consumers\n * may call from untyped JS): a non-string `warning` resolves to `undefined`.\n */\nexport function resolveRemediation(\n warning: string,\n): RemediationEntry | undefined {\n if (typeof warning !== \"string\") {\n return undefined;\n }\n const normalized = warning.trim();\n for (const entry of REMEDIATION_REGISTRY) {\n if (normalized === entry.code || normalized.startsWith(`${entry.code}:`)) {\n return entry;\n }\n }\n return undefined;\n}\n\n/** Build a compact `remediation_map` (code -> command) for a set of warning tokens. First match wins per code; unknown codes are skipped. Used by `pm health --json` per-check details and as the source of deduped executable commands for `pm validate --fix-hints`. */\nexport function buildRemediationMap(\n warnings: Iterable<string>,\n): Record<string, string> {\n const map: Record<string, string> = {};\n for (const warning of warnings) {\n const entry = resolveRemediation(warning);\n if (\n entry !== undefined &&\n !Object.prototype.hasOwnProperty.call(map, entry.code)\n ) {\n map[entry.code] = entry.command;\n }\n }\n return map;\n}\n\n/** Build a deduped, ordered list of executable remediation commands for a set of warning tokens (one command per distinct matched code). Used by `pm validate --fix-hints` for checks that do not already emit per-row remediation commands. */\nexport function buildRemediationCommands(warnings: Iterable<string>): string[] {\n return Object.values(buildRemediationMap(warnings));\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAYH,ySAAyS;;;AACzS,MAAM,CAAC,MAAM,oBAAoB,GAAgC,MAAM,CAAC,MAAM,CAAC;IAC7E,iCAAiC;IACjC;QACE,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,SAAS;QAClB,OAAO,EACL,yFAAyF;KAC5F;IACD,2CAA2C;IAC3C;QACE,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,uHAAuH;KAC1H;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,yHAAyH;KAC5H;IACD;QACE,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,6GAA6G;KAChH;IACD,qCAAqC;IACrC;QACE,IAAI,EAAE,0BAA0B;QAChC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,yGAAyG;KAC5G;IACD;QACE,IAAI,EAAE,iCAAiC;QACvC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,0FAA0F;KAC7F;IACD,0CAA0C;IAC1C;QACE,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,6BAA6B;QACtC,OAAO,EACL,0FAA0F;KAC7F;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,6BAA6B;QACtC,OAAO,EACL,8FAA8F;KACjG;IACD;QACE,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,6BAA6B;QACtC,OAAO,EACL,qGAAqG;KACxG;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,oBAAoB;QAC7B,OAAO,EACL,gIAAgI;KACnI;IACD;QACE,IAAI,EAAE,iCAAiC;QACvC,OAAO,EAAE,6BAA6B;QACtC,OAAO,EACL,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,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC1C,IACE,KAAK,KAAK,SAAS;YACnB,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EACtD,CAAC;YACD,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;QAClC,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,gPAAgP;AAChP,MAAM,UAAU,wBAAwB,CAAC,QAA0B;IACjE,OAAO,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;AACtD,CAAC","debugId":"70a08ddd-31a3-56c2-b57b-d13e29b9e40e"}
|
|
1
|
+
{"version":3,"file":"remediation.js","sources":["core/diagnostics/remediation.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Shared machine-executable remediation registry.\n *\n * `pm health` and `pm validate` both emit stable, colon-delimited warning tokens\n * (for example `history_drift_missing_stream:pm-abcd` or\n * `validate_resolution_missing_fields:3`). Agents that gate on these commands\n * previously had to hardcode the mapping from a warning code to the `pm` command\n * that fixes it. This module is the single source of truth for that mapping so\n * `pm health --json` (per-check `remediation_map`) and `pm validate --fix-hints`\n * (per-check `fix_hints`) can both surface executable remediation without any\n * duplicated, drift-prone lookup tables.\n *\n * Semantics of {@link RemediationEntry.command}: the suggested next `pm` command\n * an operator/agent should run to resolve findings with that code. Per-item\n * findings use an `<id>` placeholder (callers that have the concrete id may\n * substitute it); findings whose only fix is a manual file edit point at the\n * most useful diagnostic/repair command and describe the manual step in\n * {@link RemediationEntry.summary}.\n */\n\n/** Maps a stable diagnostic warning code to the command and summary that resolve it. */\nexport interface RemediationEntry {\n /** Stable warning-code prefix this entry resolves. A warning matches when it equals this code or begins with `<code>:`. Registry codes are mutually exclusive under that colon-boundary rule (no code is a `:`-delimited prefix of another — e.g. `settings:id_prefix_empty` is distinct from a bare `settings`, which is intentionally not registered), so `resolveRemediation` uses first-match with no ordering dependency. */\n readonly code: string;\n /** Executable `pm` command (or imperative) that resolves the finding. May contain an `<id>` placeholder. */\n readonly command: string;\n /** One-line description of what the command does / which manual step it covers. */\n readonly summary: string;\n}\n\n/** Registry of every non-extension `pm health` / `pm validate` warning code and its remediation. Extension findings keep their richer, contextual `details.triage.remediation` produced by the extension health triage and are intentionally excluded here (see pm-0hnu: \"all non-extension checks\"). */\nexport const REMEDIATION_REGISTRY: readonly RemediationEntry[] = Object.freeze([\n // --- pm health: directories ---\n {\n code: \"missing_directory\",\n command: \"pm init\",\n summary:\n \"Recreate missing tracker directories (pm init is idempotent and restores the scaffold).\",\n },\n // --- pm health: settings (read/parse) ---\n {\n code: \"settings_read_fs_error\",\n command: \"pm config list --json\",\n summary:\n \"settings.json could not be read as a regular file and pm fell back to defaults; repair the reported path or permissions, then re-run.\",\n },\n {\n code: \"settings_read_invalid_json\",\n command: \"pm config list --json\",\n summary:\n \"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run.\",\n },\n {\n code: \"settings_read_invalid_schema\",\n command: \"pm config list --json\",\n summary:\n \"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run.\",\n },\n {\n code: \"settings_read_merge_failed\",\n command: \"pm config list --json\",\n summary:\n \"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files.\",\n },\n // --- pm health: settings_values ---\n {\n code: \"settings:id_prefix_empty\",\n command: \"pm config list --json\",\n summary:\n 'id_prefix is empty; set a non-empty \"id_prefix\" in settings.json so generated item ids are well-formed.',\n },\n {\n code: \"settings:locks_ttl_non_positive\",\n command: \"pm config list --json\",\n summary:\n 'locks.ttl_seconds must be positive; set a positive \"locks.ttl_seconds\" in settings.json.',\n },\n // --- pm health: telemetry (advisory) ---\n {\n code: \"telemetry_state_invalid_json\",\n command: \"pm health --check-telemetry\",\n summary:\n \"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_invalid_rows\",\n command: \"pm health --check-telemetry\",\n summary:\n \"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_pending\",\n command: \"pm health --check-telemetry\",\n summary:\n \"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only.\",\n },\n {\n code: \"telemetry_queue_high_retries\",\n command: \"pm telemetry flush\",\n summary:\n \"Some queued telemetry events are near retry exhaustion; flush now and verify endpoint reachability before entries are dropped.\",\n },\n {\n code: \"telemetry_endpoint_probe_failed\",\n command: \"pm health --check-telemetry\",\n summary:\n \"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_http_status\",\n command: \"pm health --check-telemetry\",\n summary:\n \"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_schema_version_behind\",\n command: \"pm health --check-telemetry\",\n summary:\n \"Client schema is behind server; upgrade pm-cli to emit the latest event shape.\",\n },\n {\n code: \"telemetry_otel_export_failing\",\n command: \"pm health --check-telemetry\",\n summary:\n \"OTLP trace spans are queued but the traces endpoint export is failing; spans retry automatically on the next reachable command, or set PM_TELEMETRY_OTEL_DISABLED=1 to skip OTLP export. Advisory only.\",\n },\n // --- pm health: integrity ---\n {\n code: \"integrity_item_unreadable\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary:\n \"An item file could not be read; restore or repair the file at the reported path.\",\n },\n {\n code: \"integrity_item_parse_failed\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary:\n \"An item file failed to parse; fix the malformed item metadata at the reported path.\",\n },\n {\n code: \"integrity_item_conflict_marker\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary:\n \"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line.\",\n },\n {\n code: \"integrity_history_unreadable\",\n command: \"pm history-repair <id>\",\n summary:\n \"A history stream could not be read; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_invalid_json\",\n command: \"pm history-repair <id>\",\n summary:\n \"A history stream contains invalid JSON; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_conflict_marker\",\n command: \"pm history-repair <id>\",\n summary:\n \"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain.\",\n },\n // --- pm validate: storage_integrity (post-merge corruption detection) ---\n {\n code: \"validate_storage_unreadable_items\",\n command: \"pm validate --check-storage-integrity --verbose-diagnostics\",\n summary:\n \"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 — list commands silently skip it while pm get hard-errors.\",\n },\n {\n code: \"validate_storage_duplicate_item_ids\",\n command: \"pm validate --check-storage-integrity --verbose-diagnostics\",\n summary:\n \"One item id is claimed by multiple item documents — 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.\",\n },\n {\n code: \"validate_storage_history_conflict_markers\",\n command: \"pm merge driver history <base> <ours> <theirs>\",\n summary:\n \"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.\",\n },\n {\n code: \"validate_storage_unparseable_history\",\n command: \"pm history-repair <id>\",\n summary:\n \"A history stream's newest line is not valid JSONL; repair or restore the stream before further mutations.\",\n },\n {\n code: \"validate_storage_resurrected_items\",\n command: \"pm delete <id>\",\n summary:\n \"A live item's newest history operation is a delete: a delete/modify merge silently resurrected it. Decide the winner — re-delete the item, or keep it and append a mutation documenting the revival.\",\n },\n {\n code: \"validate_storage_unparseable_config\",\n command: \"pm merge driver json <base> <ours> <theirs>\",\n summary:\n \"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.\",\n },\n {\n code: \"validate_merge_fence_drift\",\n command: \"pm merge install\",\n summary:\n \"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.\",\n },\n // --- pm health (integrity) + pm validate (format_version): item format version ---\n {\n code: \"integrity_item_outdated_format_version\",\n command: \"pm validate --verbose-diagnostics\",\n summary:\n \"An item predates the current storage format version; a pm storage migration rewrites it. Use --verbose-diagnostics to list the affected items.\",\n },\n {\n code: \"integrity_item_ahead_format_version\",\n command: \"npm install -g @unbrained/pm-cli@latest\",\n summary:\n \"An item was written by a newer pm format version than this runtime supports; upgrade pm to read and validate it safely.\",\n },\n // --- pm health: history_drift ---\n // `pm health` rewrites these commands to `pm history-repair --all` in the\n // per-check remediation_map when more than one stream is drifted.\n {\n code: \"history_drift_missing_stream\",\n command: \"pm history-repair <id>\",\n summary:\n \"The item has no history stream; re-anchor the chain to rebuild it (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_unreadable_stream\",\n command: \"pm history-repair <id>\",\n summary:\n \"The item's history stream is unreadable; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_hash_mismatch\",\n command: \"pm history-repair <id>\",\n summary:\n \"The item's content hash no longer matches its history; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_chain_mismatch\",\n command: \"pm history-repair <id>\",\n summary:\n \"The item's history chain is broken; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n // --- pm health: storage (history compaction policy) ---\n {\n code: \"history_stream_over_compact_threshold\",\n command: \"pm history-compact <id>\",\n summary:\n \"The history stream exceeds the configured compaction threshold; compact it (pm history-compact --all-streams sweeps every over-threshold stream in one pass).\",\n },\n {\n code: \"history_unknown_author_events\",\n command: \"pm validate --check-history-drift --fix-hints\",\n summary:\n \"Historical mutations lack attributable authorship. Configure PM_AUTHOR, pass global --author, or set author_default so future audit events are attributable.\",\n },\n // --- pm health: locks ---\n {\n code: \"locks_stale_count\",\n command: \"pm gc --scope locks\",\n summary:\n \"Stale item-claim locks (embedded ttl elapsed) can block mutations; sweep them — gc retains active and unparseable locks.\",\n },\n {\n code: \"locks_unreadable\",\n command: \"pm gc --scope locks --dry-run\",\n summary:\n \"Some lock files could not be read; preview the sweep and inspect the unreadable files manually — gc never deletes what it cannot read.\",\n },\n // --- pm health: extensions ---\n // Most extension findings keep their richer, contextual\n // `details.triage.remediation` and are intentionally absent here. The\n // partial-coverage code is the exception: it is not a per-extension triage\n // result but a system-wide adoption gap (unmanaged installs the update-health\n // scan had to skip), so it has a single deterministic fix and belongs in the\n // shared registry like any other health finding (pm-bdvm).\n {\n code: \"extension_update_health_partial_coverage\",\n command: \"pm extension --adopt-all --project\",\n summary:\n \"Update-health coverage is partial because unmanaged extensions were skipped; adopt the existing installs into managed metadata so the update scan covers them (use --global for global-scope extensions, or pm package --adopt-all when working with packages).\",\n },\n // --- pm health: vectorization ---\n {\n code: \"vectorization_stale_items_remaining\",\n command: \"pm health --refresh-vectors\",\n summary:\n \"Some items have stale embeddings; refresh vectors so semantic search results stay current.\",\n },\n {\n code: \"vectorization_embedding_identity_changed\",\n command: \"pm reindex --mode semantic\",\n summary:\n \"Embedding provider/model changed since the last index; run a semantic reindex to rebuild vectors.\",\n },\n // --- pm validate: metadata ---\n // Note: validate_metadata_missing_author has no entry on purpose. `pm update\n // --author` sets the mutation/audit author (history), not the item's\n // `metadata.author` item-metadata field, and there is no CLI flag that writes\n // that field — so emitting a command here would record an audit entry without\n // clearing the finding. A missing item author must be restored at the source.\n {\n code: \"validate_metadata_missing_acceptance_criteria\",\n command: 'pm update <id> --acceptance-criteria \"<criteria>\"',\n summary:\n \"Backfill the missing acceptance criteria on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_estimate\",\n command: 'pm update <id> --estimate \"<estimate>\"',\n summary: \"Backfill the missing estimate on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_close_reason\",\n command: 'pm update <id> --close-reason \"<reason>\"',\n summary:\n \"Backfill the missing close reason on the reported closed item(s).\",\n },\n {\n code: \"validate_metadata_missing_reviewer\",\n command: 'pm update <id> --reviewer \"<name>\"',\n summary: \"Backfill the missing reviewer on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_risk\",\n command: 'pm update <id> --risk \"<level>\"',\n summary: \"Backfill the missing risk on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_confidence\",\n command: 'pm update <id> --confidence \"<level>\"',\n summary: \"Backfill the missing confidence on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_sprint\",\n command: 'pm update <id> --sprint \"<sprint>\"',\n summary: \"Backfill the missing sprint on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_release\",\n command: 'pm update <id> --release \"<release>\"',\n summary: \"Backfill the missing release on the reported item(s).\",\n },\n {\n code: \"validate_metadata_custom_profile_missing_required_fields\",\n command: 'pm config set metadata-required-fields --criterion \"<field>\"',\n summary:\n \"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items.\",\n },\n {\n code: \"validate_metadata_duplicate_issue_codes\",\n command: 'pm update <id> --title \"<distinct title>\"',\n summary:\n \"Two or more items share one logical issue code (GH-235); give each a distinct title so the derived code is unique, or close the redundant item with pm close <id> --duplicate-of <canonical-id> (closed-as-duplicate items are excluded from the check).\",\n },\n // --- pm validate: resolution ---\n {\n code: \"validate_resolution_missing_fields\",\n command: 'pm update <id> --resolution \"<how resolved>\"',\n summary:\n \"Backfill resolution / expected_result / actual_result on the reported closed item(s).\",\n },\n // --- pm validate: lifecycle ---\n {\n code: \"validate_lifecycle_active_closure_like_metadata\",\n command: \"pm update <id> --unset <closure-like-field>\",\n summary:\n \"Clear the closure-like field the validator flags on this active item — the detail row names it (resolution / actual-result / blocked-reason) — or close the item if it is actually done.\",\n },\n {\n code: \"validate_lifecycle_active_terminal_parent\",\n command: \"pm update <id> --parent <active-parent-id>\",\n summary:\n \"Reopen the terminal parent or move the active child under a non-terminal parent.\",\n },\n {\n code: \"validate_lifecycle_stale_blockers\",\n command: \"pm update <id> --unset blocked-by --unset blocked-reason\",\n summary:\n \"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles_error\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary:\n \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary:\n \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n {\n code: \"validate_hierarchy_parent_cycle_error\",\n command: \"pm update <id> --parent <other-id>\",\n summary:\n \"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent).\",\n },\n {\n code: \"validate_hierarchy_parent_cycle\",\n command: \"pm update <id> --parent <other-id>\",\n summary:\n \"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent).\",\n },\n // --- pm validate: files ---\n {\n code: \"validate_files_missing_linked_paths\",\n command: \"pm <files|docs> <id> --remove <path>\",\n summary:\n \"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc).\",\n },\n {\n code: \"validate_files_orphaned_paths\",\n command: \"pm <files|docs> <id> --add <path>\",\n summary:\n \"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace.\",\n },\n {\n code: \"validate_files_tracked_all_strict_forces_pm_internals\",\n command: \"pm validate --check-files --include-pm-internals\",\n summary:\n \"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode.\",\n },\n // --- pm validate: history_drift ---\n {\n code: \"validate_history_drift_missing_streams\",\n command: \"pm history-repair <id>\",\n summary:\n \"Re-anchor the history chains of the items missing a history stream.\",\n },\n {\n code: \"validate_history_drift_unreadable_streams\",\n command: \"pm history-repair <id>\",\n summary:\n \"Re-anchor the history chains of the items with an unreadable history stream.\",\n },\n {\n code: \"validate_history_drift_hash_mismatches\",\n command: \"pm history-repair <id>\",\n summary:\n \"Re-anchor the history chains of the items whose content hash drifted.\",\n },\n {\n code: \"validate_history_drift_chain_mismatches\",\n command: \"pm history-repair <id>\",\n summary:\n \"Re-anchor the history chains of the items with a broken history chain.\",\n },\n {\n code: \"validate_history_unknown_author_events\",\n command: \"pm config project set author_default <stable-agent-id>\",\n summary:\n \"Historical mutations lack attributable authorship. Set a stable default or use invocation-wide --author for future events; existing audit history remains append-only.\",\n },\n // --- pm validate: command_references ---\n {\n code: \"validate_command_references_stale_pm_ids\",\n command:\n 'pm update <id> --replace-tests --test \"command=<corrected-command>\" [--test ...]',\n summary:\n \"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call.\",\n },\n {\n code: \"validate_format_version_outdated_items\",\n command: \"pm validate --verbose-diagnostics\",\n summary:\n \"One or more items predate the current storage format version; a pm storage migration rewrites them. Use --verbose-diagnostics to list the affected items.\",\n },\n {\n code: \"validate_format_version_ahead_items\",\n command: \"npm install -g @unbrained/pm-cli@latest\",\n summary:\n \"One or more items were written by a newer pm format version than this runtime supports; upgrade pm to read and validate them safely.\",\n },\n]);\n\n/**\n * Resolve the remediation entry for a warning token, or `undefined` when no\n * entry is registered. A warning matches an entry when it equals the entry code\n * or begins with `<code>:` (the colon boundary keeps sibling codes such as\n * `validate_lifecycle_dependency_cycles` and\n * `validate_lifecycle_dependency_cycles_error` disjoint).\n *\n * First match is intentional and correct: registry codes are mutually exclusive\n * under the colon-boundary rule, so at most one entry can ever match a warning\n * and order is irrelevant. That invariant is enforced by a test (see\n * remediation-registry.spec.ts \"keeps every registry code mutually exclusive\"),\n * which is why this stays a simple linear scan rather than a longest-prefix\n * search — a longest-prefix tie-break is unreachable with disjoint codes.\n *\n * Accepts unknown input defensively (this is an exported helper SDK consumers\n * may call from untyped JS): a non-string `warning` resolves to `undefined`.\n */\nexport function resolveRemediation(\n warning: string,\n): RemediationEntry | undefined {\n if (typeof warning !== \"string\") {\n return undefined;\n }\n const normalized = warning.trim();\n for (const entry of REMEDIATION_REGISTRY) {\n if (normalized === entry.code || normalized.startsWith(`${entry.code}:`)) {\n return entry;\n }\n }\n return undefined;\n}\n\n/** Build a compact `remediation_map` (code -> command) for a set of warning tokens. First match wins per code; unknown codes are skipped. Used by `pm health --json` per-check details and as the source of deduped executable commands for `pm validate --fix-hints`. */\nexport function buildRemediationMap(\n warnings: Iterable<string>,\n): Record<string, string> {\n const map: Record<string, string> = {};\n for (const warning of warnings) {\n const entry = resolveRemediation(warning);\n if (\n entry !== undefined &&\n !Object.prototype.hasOwnProperty.call(map, entry.code)\n ) {\n map[entry.code] = entry.command;\n }\n }\n return map;\n}\n\n/** Build a deduped, ordered list of executable remediation commands for a set of warning tokens (one command per distinct matched code). Used by `pm validate --fix-hints` for checks that do not already emit per-row remediation commands. */\nexport function buildRemediationCommands(warnings: Iterable<string>): string[] {\n return Object.values(buildRemediationMap(warnings));\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAYH,ySAAyS;;;AACzS,MAAM,CAAC,MAAM,oBAAoB,GAAgC,MAAM,CAAC,MAAM,CAAC;IAC7E,iCAAiC;IACjC;QACE,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,SAAS;QAClB,OAAO,EACL,yFAAyF;KAC5F;IACD,2CAA2C;IAC3C;QACE,IAAI,EAAE,wBAAwB;QAC9B,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,uIAAuI;KAC1I;IACD;QACE,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,uHAAuH;KAC1H;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,OAA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OAAO,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;AACtD,CAAC","debugId":"836f71d5-acd0-5c77-ae31-9ae98914727c"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** Shared lock id for any process that rewrites the local vector store. Reindex and the background mutation-refresh worker both acquire this so they never write concurrently and corrupt the store. Exported so `pm reindex` reuses the same id rather than duplicating the literal. */
|
|
2
2
|
export declare const REINDEX_LOCK_ID = "reindex";
|
|
3
|
+
/** Delay before a settings-failed worker dispatches one replacement child, preventing a tight retry loop while preserving eventual queue recovery. */
|
|
4
|
+
export declare const SEARCH_REFRESH_RETRY_DELAY_MS = 30000;
|
|
3
5
|
/** Mutation search refresh runs inline (blocking) under test runners, inside the background worker child itself, or when explicitly requested. Otherwise the semantic refresh is dispatched to a detached child so mutations return without waiting on embeddings. Mirrors the telemetry-flush inline gate so the full test suite stays deterministic. */
|
|
4
6
|
export declare function shouldRunSearchRefreshInForeground(): boolean;
|
|
5
7
|
/** Merge mutated item ids into the persistent pending-refresh queue. */
|
|
@@ -23,5 +25,5 @@ type SemanticRefreshFn = (pmRoot: string, itemIds: string[]) => Promise<{
|
|
|
23
25
|
warnings: string[];
|
|
24
26
|
}>;
|
|
25
27
|
/** Drain the pending queue and refresh semantic vectors under the reindex lock so the local vector store is never rewritten concurrently. If the lock is held by another worker we exit immediately — that holder drains our enqueued ids. After releasing we re-check the queue once and re-dispatch if a sibling enqueued ids during our final window, guaranteeing eventual processing. */
|
|
26
|
-
export declare function runSemanticRefreshWorker(pmRoot: string, refresh: SemanticRefreshFn): Promise<SemanticRefreshWorkerResult>;
|
|
28
|
+
export declare function runSemanticRefreshWorker(pmRoot: string, refresh: SemanticRefreshFn, scheduleRetry?: (root: string) => void): Promise<SemanticRefreshWorkerResult>;
|
|
27
29
|
export {};
|