@unbrained/pm-cli 2026.7.1 → 2026.7.3
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 +3 -3
- package/CHANGELOG.md +25 -0
- package/CONTRIBUTING.md +2 -2
- package/README.md +1 -1
- package/dist/cli/commander-usage.d.ts +2 -0
- package/dist/cli/commander-usage.js +110 -86
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/activity.js +79 -57
- package/dist/cli/commands/activity.js.map +1 -1
- package/dist/cli/commands/aggregate.js +102 -79
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +278 -243
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +176 -114
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.js +157 -129
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments-audit.js +50 -42
- package/dist/cli/commands/comments-audit.js.map +1 -1
- package/dist/cli/commands/config.d.ts +2 -0
- package/dist/cli/commands/config.js +443 -879
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.js +365 -287
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.js +352 -238
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.js +32 -17
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/dedupe-audit.js +46 -39
- package/dist/cli/commands/dedupe-audit.js.map +1 -1
- package/dist/cli/commands/dedupe-merge.js +88 -69
- package/dist/cli/commands/dedupe-merge.js.map +1 -1
- package/dist/cli/commands/extension/doctor.js +56 -67
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/shared.js +21 -15
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/get.js +114 -81
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.d.ts +17 -0
- package/dist/cli/commands/health.js +545 -417
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.js +209 -140
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.js +162 -119
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +120 -85
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.js +32 -19
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.d.ts +8 -2
- package/dist/cli/commands/init.js +263 -162
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.js +152 -102
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.js +60 -40
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/plan.js +373 -298
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/profile.js +23 -15
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/recurrence-parsers.js +43 -25
- package/dist/cli/commands/recurrence-parsers.js.map +1 -1
- package/dist/cli/commands/reindex.d.ts +21 -5
- package/dist/cli/commands/reindex.js +345 -205
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +8 -7
- package/dist/cli/commands/restore.js +105 -69
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.js +33 -30
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +10 -2
- package/dist/cli/commands/search.js +503 -470
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/telemetry.js +98 -87
- package/dist/cli/commands/telemetry.js.map +1 -1
- package/dist/cli/commands/test-all.js +237 -168
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +6 -5
- package/dist/cli/commands/test.js +424 -344
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +57 -42
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +1 -1
- package/dist/cli/commands/update.js +738 -671
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +20 -1
- package/dist/cli/commands/validate.js +478 -343
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +406 -361
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.js +27 -19
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/help-json-payload.js +57 -49
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.d.ts +47 -0
- package/dist/cli/main.js +474 -371
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/migration-gates.js +22 -45
- package/dist/cli/migration-gates.js.map +1 -1
- package/dist/cli/register-list-query.js +299 -310
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +763 -779
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +386 -362
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +120 -101
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +4 -0
- package/dist/cli/registration-helpers.js +45 -56
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js → activity-5YWLSPGE.js} +9 -9
- package/dist/cli-bundle/chunks/activity-BIML7K2D.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js → aggregate-2V2M3JZU.js} +107 -83
- package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js.map → aggregate-2V2M3JZU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{aggregate-JTEF4BP7.js → aggregate-EK7DXML7.js} +108 -84
- package/dist/cli-bundle/chunks/aggregate-EK7DXML7.js.map +1 -0
- package/dist/cli-bundle/chunks/{append-LOVPGVPT.js → append-EZESUVJT.js} +8 -8
- package/dist/cli-bundle/chunks/{append-QCFJSDFL.js → append-JFG4WQMG.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-TP5Q5ZD3.js → chunk-32IUNTG4.js} +158 -119
- package/dist/cli-bundle/chunks/chunk-32IUNTG4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js → chunk-3W2HJKJX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VARHOHYV.js → chunk-4EXFFP7T.js} +86 -52
- package/dist/cli-bundle/chunks/chunk-4EXFFP7T.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js → chunk-4PFVUUYV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JSU5P7VS.js → chunk-4WB6S4YX.js} +308 -184
- package/dist/cli-bundle/chunks/chunk-4WB6S4YX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js → chunk-572FKBRL.js} +61 -102
- package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js → chunk-5E7N4T2Z.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js → chunk-5IZUBZBR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js → chunk-5JIWFWOZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FFMQB7WR.js → chunk-67LARBDL.js} +493 -404
- package/dist/cli-bundle/chunks/chunk-67LARBDL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js → chunk-6CDCWKSX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js → chunk-6KRFL33E.js} +308 -184
- package/dist/cli-bundle/chunks/chunk-6KRFL33E.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js → chunk-6NYJGMTY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js → chunk-7CLLC75T.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-2466X6E4.js → chunk-7LYO6S5A.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js → chunk-A3OQ7TFW.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-5CGRF3L5.js → chunk-AIKU3IIL.js} +153 -90
- package/dist/cli-bundle/chunks/chunk-AIKU3IIL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js → chunk-AJHYQCBJ.js} +39 -5
- package/dist/cli-bundle/chunks/chunk-AJHYQCBJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js → chunk-B4O5S7I3.js} +79 -57
- package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js.map → chunk-B4O5S7I3.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OTUHB4HS.js → chunk-BE2SR6QL.js} +92 -77
- package/dist/cli-bundle/chunks/chunk-BE2SR6QL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js → chunk-BI4R7HI2.js} +75 -53
- package/dist/cli-bundle/chunks/chunk-BI4R7HI2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js → chunk-CXR3CMBQ.js} +33 -6
- package/dist/cli-bundle/chunks/chunk-CXR3CMBQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZETXE4SE.js → chunk-ECU6MMTQ.js} +713 -613
- package/dist/cli-bundle/chunks/chunk-ECU6MMTQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2D4HATP2.js → chunk-EJ2OCBHF.js} +54 -30
- package/dist/cli-bundle/chunks/chunk-EJ2OCBHF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BDTISOSD.js → chunk-EQURFOMH.js} +41 -26
- package/dist/cli-bundle/chunks/chunk-EQURFOMH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js → chunk-ER4ME5U2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js → chunk-ERG65A2L.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IZBR4NRW.js → chunk-F6WNBITZ.js} +157 -113
- package/dist/cli-bundle/chunks/chunk-F6WNBITZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js → chunk-FH2H3CBD.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-JPECA746.js → chunk-FUFFPIYA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CF7RL6FR.js → chunk-FZJM2TXF.js} +110 -73
- package/dist/cli-bundle/chunks/chunk-FZJM2TXF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js → chunk-GUYNUXQT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js → chunk-GVJE5T7Q.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js → chunk-HB4FAT3O.js} +42 -60
- package/dist/cli-bundle/chunks/chunk-HB4FAT3O.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-55SNVXRQ.js → chunk-HQAF23Q2.js} +626 -484
- package/dist/cli-bundle/chunks/chunk-HQAF23Q2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js → chunk-JBZ2NTKX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RMMQ74TG.js → chunk-JPATY4SE.js} +54 -30
- package/dist/cli-bundle/chunks/chunk-JPATY4SE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IPYBJWTE.js → chunk-K5DT2YKM.js} +109 -72
- package/dist/cli-bundle/chunks/chunk-K5DT2YKM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js → chunk-KEZOIPCR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RVUALSJF.js → chunk-KHVGM5CS.js} +466 -365
- package/dist/cli-bundle/chunks/chunk-KHVGM5CS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YITK2PJ6.js → chunk-KS6ATO47.js} +288 -175
- package/dist/cli-bundle/chunks/chunk-KS6ATO47.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7R4QEMZZ.js → chunk-L4SLHV6G.js} +463 -362
- package/dist/cli-bundle/chunks/chunk-L4SLHV6G.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RLDHZHQS.js → chunk-LBE5QFMZ.js} +158 -114
- package/dist/cli-bundle/chunks/chunk-LBE5QFMZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-22WKIL3H.js → chunk-LCWQP6NM.js} +76 -54
- package/dist/cli-bundle/chunks/chunk-LCWQP6NM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KNPEF7QG.js → chunk-LOWVNZBZ.js} +91 -76
- package/dist/cli-bundle/chunks/chunk-LOWVNZBZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js → chunk-MDHWWBNZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js → chunk-MEZZZBYX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V3NOKJF2.js → chunk-MHRS5FUX.js} +288 -175
- package/dist/cli-bundle/chunks/chunk-MHRS5FUX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3XZCOZ5J.js → chunk-NOIEVOK5.js} +391 -313
- package/dist/cli-bundle/chunks/chunk-NOIEVOK5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js → chunk-NZ7QIUP5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-UYUYDGIB.js → chunk-OGLGI22K.js} +115 -67
- package/dist/cli-bundle/chunks/{chunk-UYUYDGIB.js.map → chunk-OGLGI22K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js → chunk-P5L7Z2O6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BZCEN4JA.js → chunk-PULUSQAV.js} +492 -403
- package/dist/cli-bundle/chunks/chunk-PULUSQAV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3VGN2UWE.js → chunk-QCDTQCMW.js} +22 -30
- package/dist/cli-bundle/chunks/chunk-QCDTQCMW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js → chunk-QNNQAAZ5.js} +24 -18
- package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js.map → chunk-QNNQAAZ5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js → chunk-RAHINBVP.js} +60 -101
- package/dist/cli-bundle/chunks/chunk-RAHINBVP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js → chunk-RJH5VQHW.js} +43 -61
- package/dist/cli-bundle/chunks/chunk-RJH5VQHW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js → chunk-SU2E4AWU.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js → chunk-SU3TB4NS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JWXRETDF.js → chunk-SYE6WMV6.js} +626 -484
- package/dist/cli-bundle/chunks/chunk-SYE6WMV6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NWMZWYYB.js → chunk-T3P7PMZP.js} +42 -27
- package/dist/cli-bundle/chunks/chunk-T3P7PMZP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js → chunk-T4XBKJ3F.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js → chunk-T6AXEBOP.js} +23 -17
- package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js.map → chunk-T6AXEBOP.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js → chunk-TQ6AX5SQ.js} +58 -69
- package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js.map → chunk-TQ6AX5SQ.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4XOIEKSD.js → chunk-U3S2B7TA.js} +86 -52
- package/dist/cli-bundle/chunks/chunk-U3S2B7TA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js → chunk-U5TR4N7J.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js → chunk-UMNQZS4H.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js → chunk-WJA3PXW7.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-RGEMWD6Q.js → chunk-WRYERRZX.js} +157 -118
- package/dist/cli-bundle/chunks/chunk-WRYERRZX.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NUHHPVVS.js → chunk-WYOIIFSE.js} +712 -612
- package/dist/cli-bundle/chunks/chunk-WYOIIFSE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4DSGXSBL.js → chunk-XRYSCRZR.js} +116 -68
- package/dist/cli-bundle/chunks/{chunk-4DSGXSBL.js.map → chunk-XRYSCRZR.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js → chunk-YF746GTH.js} +59 -70
- package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js.map → chunk-YF746GTH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js → chunk-YPWUSH72.js} +390 -312
- package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js.map → chunk-YPWUSH72.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js → chunk-YSDFIY7N.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js → chunk-YSGTMDWC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NFDPYAIP.js → chunk-YVKZ3ANP.js} +21 -29
- package/dist/cli-bundle/chunks/chunk-YVKZ3ANP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js → chunk-Z4DGFQDH.js} +80 -58
- package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js.map → chunk-Z4DGFQDH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js → chunk-Z5F6XZXE.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js → chunk-Z7RPDF2Y.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3S2KT7NG.js → chunk-ZFTKYWIF.js} +152 -89
- package/dist/cli-bundle/chunks/chunk-ZFTKYWIF.js.map +7 -0
- package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js → claim-2BGBGSVI.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js → claim-5GU7OE67.js} +8 -8
- package/dist/cli-bundle/chunks/close-6YODBUIV.js +14 -0
- package/dist/cli-bundle/chunks/{close-TQYAAFJP.js → close-AFVKPR57.js} +7 -7
- package/dist/cli-bundle/chunks/{close-many-BG5QQIDQ.js → close-many-7KLOSYLP.js} +186 -122
- package/dist/cli-bundle/chunks/close-many-7KLOSYLP.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-many-LDRVEQY2.js → close-many-JKUJMHLG.js} +187 -123
- package/dist/cli-bundle/chunks/close-many-JKUJMHLG.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js → comments-DNWHEBOS.js} +9 -9
- package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js → comments-RW23R3VE.js} +9 -9
- package/dist/cli-bundle/chunks/config-AUM5WBYA.js +1072 -0
- package/dist/cli-bundle/chunks/config-AUM5WBYA.js.map +7 -0
- package/dist/cli-bundle/chunks/config-OZWSA2NP.js +1062 -0
- package/dist/cli-bundle/chunks/config-OZWSA2NP.js.map +1 -0
- package/dist/cli-bundle/chunks/{context-B6275WPX.js → context-OYXRGY7S.js} +12 -12
- package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js → context-PKCEHQY3.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-HN7ABKLP.js → contracts-L6ODXNUM.js} +320 -199
- package/dist/cli-bundle/chunks/contracts-L6ODXNUM.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-W4FZVVD6.js → contracts-X74F2GSM.js} +321 -200
- package/dist/cli-bundle/chunks/contracts-X74F2GSM.js.map +1 -0
- package/dist/cli-bundle/chunks/{copy-DEM4DATS.js → copy-6XOR3HKN.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js → copy-I4NCLBR4.js} +5 -5
- package/dist/cli-bundle/chunks/{create-RLRJMRTM.js → create-PM45M6PE.js} +12 -12
- package/dist/cli-bundle/chunks/create-Z7YCH3BE.js +28 -0
- package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js → delete-7YXHYG67.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js → delete-LPISP43T.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js → deps-N2T26FME.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js → deps-WATKQDE3.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-GYZNVS26.js → docs-6LQ3GLM7.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-26S44RXU.js → docs-Z3X6JZLT.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js → eval-6DCLG52D.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js → eval-Y3ZCUTHK.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js → extension-BNINIMT7.js} +11 -11
- package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js → extension-QWE4YYK5.js} +11 -11
- package/dist/cli-bundle/chunks/{files-NQHEXUZD.js → files-6SGKHS6O.js} +7 -7
- package/dist/cli-bundle/chunks/{files-MBNICQFM.js → files-FUYPSOFJ.js} +7 -7
- package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js → focus-2Q3K76G2.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-XZW5423D.js → focus-ATLBWXXD.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js → gc-RUYEMNRF.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js → gc-TDWSDR66.js} +3 -3
- package/dist/cli-bundle/chunks/{get-A7MAOHCU.js → get-2WGLX74N.js} +120 -80
- package/dist/cli-bundle/chunks/get-2WGLX74N.js.map +7 -0
- package/dist/cli-bundle/chunks/{get-DSDEKJ3L.js → get-LY6M2JIM.js} +121 -81
- package/dist/cli-bundle/chunks/get-LY6M2JIM.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-3IPFLKXB.js → health-4RKHYS3T.js} +535 -371
- package/dist/cli-bundle/chunks/health-4RKHYS3T.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-GZXGBZ36.js → health-TMFVNYRA.js} +534 -370
- package/dist/cli-bundle/chunks/health-TMFVNYRA.js.map +7 -0
- package/dist/cli-bundle/chunks/history-CGNQJXFE.js +18 -0
- package/dist/cli-bundle/chunks/{history-NERDJNUB.js → history-SGRRS72R.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-2WRZ2WK4.js → history-compact-LOED43R3.js} +213 -134
- package/dist/cli-bundle/chunks/history-compact-LOED43R3.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-compact-HR7BB4LR.js → history-compact-V5DNAQHH.js} +214 -135
- package/dist/cli-bundle/chunks/history-compact-V5DNAQHH.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js → history-redact-IRL7WJ3E.js} +9 -9
- package/dist/cli-bundle/chunks/history-redact-N3JK7VBW.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-XA3LC4GA.js → history-repair-4WVBVHFR.js} +124 -84
- package/dist/cli-bundle/chunks/history-repair-4WVBVHFR.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-LCMOS45X.js → history-repair-PGYQJMGD.js} +123 -83
- package/dist/cli-bundle/chunks/history-repair-PGYQJMGD.js.map +7 -0
- package/dist/cli-bundle/chunks/{init-64XDLQJB.js → init-4GESW7RM.js} +12 -12
- package/dist/cli-bundle/chunks/init-XIDPABA4.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js → learnings-4BHWFFUV.js} +9 -9
- package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js → learnings-4FJY7WIW.js} +9 -9
- package/dist/cli-bundle/chunks/{list-G5Y65VF6.js → list-472TIOVK.js} +8 -8
- package/dist/cli-bundle/chunks/{list-DNBJVO3E.js → list-D7BF5CL2.js} +8 -8
- package/dist/cli-bundle/chunks/{next-FYTQF6HG.js → next-D5STGWI2.js} +71 -46
- package/dist/cli-bundle/chunks/next-D5STGWI2.js.map +1 -0
- package/dist/cli-bundle/chunks/{next-BCERKDUR.js → next-SFQZVX2B.js} +70 -45
- package/dist/cli-bundle/chunks/next-SFQZVX2B.js.map +7 -0
- package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js → notes-6KNOSLIT.js} +9 -9
- package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js → notes-W4UEICGF.js} +9 -9
- package/dist/cli-bundle/chunks/{plan-RKZHQVXR.js → plan-JO6V7BXO.js} +373 -279
- package/dist/cli-bundle/chunks/plan-JO6V7BXO.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-4WXEQCTN.js → plan-MJQW5XK3.js} +372 -278
- package/dist/cli-bundle/chunks/plan-MJQW5XK3.js.map +7 -0
- package/dist/cli-bundle/chunks/{profile-4OMM32CD.js → profile-3TOTMUR4.js} +27 -19
- package/dist/cli-bundle/chunks/profile-3TOTMUR4.js.map +7 -0
- package/dist/cli-bundle/chunks/{profile-QLER5ENE.js → profile-WIQY2KCV.js} +28 -20
- package/dist/cli-bundle/chunks/profile-WIQY2KCV.js.map +1 -0
- package/dist/cli-bundle/chunks/register-list-query-ELBHCCFI.js +416 -0
- package/dist/cli-bundle/chunks/register-list-query-ELBHCCFI.js.map +7 -0
- package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js +406 -0
- package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-KK7PHYYU.js → register-mutation-ROFE2YPC.js} +729 -702
- package/dist/cli-bundle/chunks/register-mutation-ROFE2YPC.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-ENNDUAZG.js → register-mutation-SJWMVIJ2.js} +730 -703
- package/dist/cli-bundle/chunks/register-mutation-SJWMVIJ2.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-HZ6XERQG.js → register-operations-IADFVH53.js} +389 -365
- package/dist/cli-bundle/chunks/register-operations-IADFVH53.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-MEKU3AKC.js +510 -0
- package/dist/cli-bundle/chunks/register-operations-MEKU3AKC.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-ZKJ53RS7.js → register-setup-3QJY43CY.js} +128 -103
- package/dist/cli-bundle/chunks/register-setup-3QJY43CY.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-P67EMBDJ.js → register-setup-AJWUSSQX.js} +129 -104
- package/dist/cli-bundle/chunks/register-setup-AJWUSSQX.js.map +1 -0
- package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js → restore-44IHMMZZ.js} +9 -9
- package/dist/cli-bundle/chunks/restore-EXHU34EU.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js → scheduling-shortcuts-OLHNLAZY.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js → scheduling-shortcuts-TSBK4AY5.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-73HR2OJW.js → schema-IB2NZZWD.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js → schema-VBCELP5G.js} +7 -7
- package/dist/cli-bundle/chunks/{search-AXPXKZER.js → search-7UBETML4.js} +10 -10
- package/dist/cli-bundle/chunks/{search-KILGT37L.js → search-R227JOL6.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js → stats-FAG7COEH.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js → stats-MCK7PLYS.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-GAHHQTOS.js → telemetry-DRPDZMAO.js} +84 -70
- package/dist/cli-bundle/chunks/telemetry-DRPDZMAO.js.map +7 -0
- package/dist/cli-bundle/chunks/{telemetry-BZUF6H7G.js → telemetry-GVVUQSJQ.js} +85 -71
- package/dist/cli-bundle/chunks/telemetry-GVVUQSJQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-PWDIZ255.js → test-QY44WAMR.js} +15 -15
- package/dist/cli-bundle/chunks/{test-ACD52Z3S.js → test-SY76DZTO.js} +15 -15
- package/dist/cli-bundle/chunks/test-all-QD6QAEG7.js +430 -0
- package/dist/cli-bundle/chunks/test-all-QD6QAEG7.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-USPJHXFR.js +427 -0
- package/dist/cli-bundle/chunks/test-all-USPJHXFR.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-UXIXPDKU.js → test-runs-MG5VIGSK.js} +185 -147
- package/dist/cli-bundle/chunks/test-runs-MG5VIGSK.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-PLRAZEFW.js → test-runs-QIR5MJPL.js} +184 -146
- package/dist/cli-bundle/chunks/test-runs-QIR5MJPL.js.map +7 -0
- package/dist/cli-bundle/chunks/update-A7EICML6.js +24 -0
- package/dist/cli-bundle/chunks/{update-KFX2SIAC.js → update-IKJZWLQC.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js → update-many-BEMTDA2X.js} +84 -69
- package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js.map → update-many-BEMTDA2X.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js → update-many-RATAARHU.js} +83 -68
- package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js.map → update-many-RATAARHU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js → upgrade-NWMR3VQL.js} +11 -11
- package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js → upgrade-VU46BLJZ.js} +11 -11
- package/dist/cli-bundle/chunks/{validate-X5W76YJL.js → validate-GAJ6FUSI.js} +451 -321
- package/dist/cli-bundle/chunks/validate-GAJ6FUSI.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-MTUVL5VC.js → validate-NRY6MFXN.js} +450 -320
- package/dist/cli-bundle/chunks/validate-NRY6MFXN.js.map +7 -0
- package/dist/cli-bundle/main.js +1107 -916
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/core/config/nested-settings.js +89 -67
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/governance/metadata-coverage.js +20 -28
- package/dist/core/governance/metadata-coverage.js.map +1 -1
- package/dist/core/history/drift-scan.js +93 -81
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/item/item-type-definition.js +14 -14
- package/dist/core/item/item-type-definition.js.map +1 -1
- package/dist/core/item/type-registry.js +114 -99
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/output/mutation-projection.js +42 -26
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +97 -80
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.js +26 -3
- package/dist/core/schema/status-defs-file.js.map +1 -1
- package/dist/core/search/corpus.js +25 -19
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/semantic-defaults.js +64 -37
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.js +32 -17
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/sentry/helpers.js +31 -28
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/sentry/instrument.js +54 -43
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/memo.d.ts +12 -0
- package/dist/core/shared/memo.js +25 -0
- package/dist/core/shared/memo.js.map +1 -0
- package/dist/core/shared/serialization.js +24 -14
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/shared/time.js +26 -4
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/front-matter-cache.d.ts +5 -0
- package/dist/core/store/front-matter-cache.js +316 -171
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-store.js +33 -26
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings.js +247 -203
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/test/background-runs.js +189 -160
- package/dist/core/test/background-runs.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +71 -99
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/compose.js +51 -42
- package/dist/sdk/compose.js.map +1 -1
- package/docs/AGENT_GUIDE.md +2 -2
- package/docs/ARCHITECTURE.md +2 -2
- package/docs/COMMANDS.md +8 -4
- package/docs/CONFIGURATION.md +1 -1
- package/docs/EXTENSIONS.md +12 -12
- package/docs/ONBOARDING.md +4 -2
- package/docs/README.md +2 -0
- package/docs/examples/starter-extension/README.md +11 -10
- package/marketplace.json +3 -3
- package/package.json +2 -2
- package/packages/pm-beads/extensions/beads/runtime.ts +240 -167
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +65 -58
- package/packages/pm-todos/extensions/todos/runtime.ts +65 -42
- package/plugins/pm-claude/.claude-plugin/plugin.json +2 -2
- package/plugins/pm-claude/README.md +6 -3
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-22WKIL3H.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3J6JRJ3I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3K2M5OYU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VGN2UWE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-AXIDKKAT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BDTISOSD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CF7RL6FR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CWFNTKQJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-HXTQJXWT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IPYBJWTE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IZBR4NRW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JLM7BHI7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KNPEF7QG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MDPEOIGN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NFDPYAIP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NWMZWYYB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OTUHB4HS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RLDHZHQS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-V3NOKJF2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WYDHYJPO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YITK2PJ6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +0 -1
- package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +0 -14
- package/dist/cli-bundle/chunks/close-many-BG5QQIDQ.js.map +0 -7
- package/dist/cli-bundle/chunks/close-many-LDRVEQY2.js.map +0 -1
- package/dist/cli-bundle/chunks/config-DMSU64QO.js +0 -1541
- package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +0 -7
- package/dist/cli-bundle/chunks/config-QH2DICD6.js +0 -1531
- package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +0 -1
- package/dist/cli-bundle/chunks/create-OH3BDGBB.js +0 -28
- package/dist/cli-bundle/chunks/get-A7MAOHCU.js.map +0 -7
- package/dist/cli-bundle/chunks/get-DSDEKJ3L.js.map +0 -1
- package/dist/cli-bundle/chunks/health-3IPFLKXB.js.map +0 -1
- package/dist/cli-bundle/chunks/health-GZXGBZ36.js.map +0 -7
- package/dist/cli-bundle/chunks/history-WSZHY3PN.js +0 -18
- package/dist/cli-bundle/chunks/history-compact-2WRZ2WK4.js.map +0 -7
- package/dist/cli-bundle/chunks/history-compact-HR7BB4LR.js.map +0 -1
- package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-LCMOS45X.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-XA3LC4GA.js.map +0 -1
- package/dist/cli-bundle/chunks/init-PAX32BJA.js +0 -22
- package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +0 -7
- package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-4WXEQCTN.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-RKZHQVXR.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-4OMM32CD.js.map +0 -7
- package/dist/cli-bundle/chunks/profile-QLER5ENE.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js +0 -400
- package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js +0 -410
- package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-C6OWLDSH.js +0 -486
- package/dist/cli-bundle/chunks/register-operations-C6OWLDSH.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-HZ6XERQG.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-YALDGTQR.js +0 -17
- package/dist/cli-bundle/chunks/telemetry-BZUF6H7G.js.map +0 -1
- package/dist/cli-bundle/chunks/telemetry-GAHHQTOS.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js +0 -358
- package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js +0 -361
- package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +0 -1
- package/dist/cli-bundle/chunks/update-AMRSOIWP.js +0 -24
- package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js.map → activity-5YWLSPGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-AW6XVFH6.js.map → activity-BIML7K2D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-LOVPGVPT.js.map → append-EZESUVJT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-QCFJSDFL.js.map → append-JFG4WQMG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js.map → chunk-3W2HJKJX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js.map → chunk-4PFVUUYV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js.map → chunk-5E7N4T2Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js.map → chunk-5IZUBZBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js.map → chunk-5JIWFWOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js.map → chunk-6CDCWKSX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js.map → chunk-6NYJGMTY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js.map → chunk-7CLLC75T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2466X6E4.js.map → chunk-7LYO6S5A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js.map → chunk-A3OQ7TFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js.map → chunk-ER4ME5U2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js.map → chunk-ERG65A2L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js.map → chunk-FH2H3CBD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JPECA746.js.map → chunk-FUFFPIYA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js.map → chunk-GUYNUXQT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js.map → chunk-GVJE5T7Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js.map → chunk-JBZ2NTKX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js.map → chunk-KEZOIPCR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js.map → chunk-MDHWWBNZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js.map → chunk-MEZZZBYX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js.map → chunk-NZ7QIUP5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js.map → chunk-P5L7Z2O6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js.map → chunk-SU2E4AWU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js.map → chunk-SU3TB4NS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js.map → chunk-T4XBKJ3F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js.map → chunk-U5TR4N7J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js.map → chunk-UMNQZS4H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js.map → chunk-WJA3PXW7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js.map → chunk-YSDFIY7N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js.map → chunk-YSGTMDWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js.map → chunk-Z5F6XZXE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js.map → chunk-Z7RPDF2Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js.map → claim-2BGBGSVI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js.map → claim-5GU7OE67.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-E6ZZGCJY.js.map → close-6YODBUIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-TQYAAFJP.js.map → close-AFVKPR57.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js.map → comments-DNWHEBOS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js.map → comments-RW23R3VE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-B6275WPX.js.map → context-OYXRGY7S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js.map → context-PKCEHQY3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-DEM4DATS.js.map → copy-6XOR3HKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js.map → copy-I4NCLBR4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-RLRJMRTM.js.map → create-PM45M6PE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-OH3BDGBB.js.map → create-Z7YCH3BE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js.map → delete-7YXHYG67.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js.map → delete-LPISP43T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js.map → deps-N2T26FME.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js.map → deps-WATKQDE3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-GYZNVS26.js.map → docs-6LQ3GLM7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-26S44RXU.js.map → docs-Z3X6JZLT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js.map → eval-6DCLG52D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js.map → eval-Y3ZCUTHK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js.map → extension-BNINIMT7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js.map → extension-QWE4YYK5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-NQHEXUZD.js.map → files-6SGKHS6O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-MBNICQFM.js.map → files-FUYPSOFJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js.map → focus-2Q3K76G2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-XZW5423D.js.map → focus-ATLBWXXD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js.map → gc-RUYEMNRF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js.map → gc-TDWSDR66.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-WSZHY3PN.js.map → history-CGNQJXFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-NERDJNUB.js.map → history-SGRRS72R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js.map → history-redact-IRL7WJ3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-MP6CH7U5.js.map → history-redact-N3JK7VBW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-64XDLQJB.js.map → init-4GESW7RM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-PAX32BJA.js.map → init-XIDPABA4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js.map → learnings-4BHWFFUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js.map → learnings-4FJY7WIW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-G5Y65VF6.js.map → list-472TIOVK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-DNBJVO3E.js.map → list-D7BF5CL2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js.map → notes-6KNOSLIT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js.map → notes-W4UEICGF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js.map → restore-44IHMMZZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-YALDGTQR.js.map → restore-EXHU34EU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js.map → scheduling-shortcuts-OLHNLAZY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js.map → scheduling-shortcuts-TSBK4AY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-73HR2OJW.js.map → schema-IB2NZZWD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js.map → schema-VBCELP5G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-AXPXKZER.js.map → search-7UBETML4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-KILGT37L.js.map → search-R227JOL6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js.map → stats-FAG7COEH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js.map → stats-MCK7PLYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-PWDIZ255.js.map → test-QY44WAMR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-ACD52Z3S.js.map → test-SY76DZTO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-AMRSOIWP.js.map → update-A7EICML6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-KFX2SIAC.js.map → update-IKJZWLQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js.map → upgrade-NWMR3VQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js.map → upgrade-VU46BLJZ.js.map} +0 -0
|
@@ -6,25 +6,25 @@ import {
|
|
|
6
6
|
} from "./chunk-QZ342C63.js";
|
|
7
7
|
import {
|
|
8
8
|
scanHistoryDrift
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LOWVNZBZ.js";
|
|
10
10
|
import {
|
|
11
11
|
collectStaleVectorizationIds
|
|
12
12
|
} from "./chunk-VPLDQMW2.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-T4XBKJ3F.js";
|
|
14
14
|
import {
|
|
15
15
|
PM_TELEMETRY_SOURCE_CONTEXT_VALUES,
|
|
16
16
|
TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS,
|
|
17
17
|
TELEMETRY_SCHEMA_VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ER4ME5U2.js";
|
|
19
19
|
import {
|
|
20
20
|
buildCapabilityContractMetadata,
|
|
21
21
|
buildRegistrationCollisionRemediation,
|
|
22
22
|
collectUnknownCapabilityGuidance,
|
|
23
23
|
readManagedExtensionState
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TQ6AX5SQ.js";
|
|
25
25
|
import "./chunk-5HIZDR5A.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-JPATY4SE.js";
|
|
27
|
+
import "./chunk-6NYJGMTY.js";
|
|
28
28
|
import {
|
|
29
29
|
buildVectorizationEmbeddingIdentity,
|
|
30
30
|
hasVectorizationEmbeddingIdentityChanged,
|
|
@@ -34,25 +34,25 @@ import {
|
|
|
34
34
|
resolveProviderConfigSource,
|
|
35
35
|
resolveSettingsWithSemanticRuntimeDefaults,
|
|
36
36
|
resolveVectorStores
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-XRYSCRZR.js";
|
|
38
|
+
import "./chunk-NZ7QIUP5.js";
|
|
39
|
+
import "./chunk-T6AXEBOP.js";
|
|
40
|
+
import "./chunk-RAHINBVP.js";
|
|
41
41
|
import {
|
|
42
42
|
collectRegisteredItemFieldNames,
|
|
43
43
|
enforceHistoryStreamPolicyForItems,
|
|
44
44
|
listAllFrontMatter,
|
|
45
45
|
listAllFrontMatterWithBody
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-6KRFL33E.js";
|
|
47
47
|
import {
|
|
48
48
|
effectiveItemFormatVersion,
|
|
49
49
|
findFirstMergeConflictMarker,
|
|
50
50
|
parseItemDocument,
|
|
51
51
|
scanItemFormatVersions
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-3W2HJKJX.js";
|
|
53
53
|
import {
|
|
54
54
|
nowIso
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-AJHYQCBJ.js";
|
|
56
56
|
import {
|
|
57
57
|
EXIT_CODE,
|
|
58
58
|
ITEM_FILE_EXTENSIONS,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
resolvePmRoot,
|
|
74
74
|
runActiveOnReadHooks,
|
|
75
75
|
toNonEmptyStringOrUndefined
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-KHVGM5CS.js";
|
|
77
77
|
|
|
78
78
|
// dist/cli/commands/health.js
|
|
79
79
|
import fs from "node:fs/promises";
|
|
@@ -81,7 +81,7 @@ import path from "node:path";
|
|
|
81
81
|
!(function() {
|
|
82
82
|
try {
|
|
83
83
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
84
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
84
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "d078e1a2-2f92-566c-8ecd-542b2730a9b6");
|
|
85
85
|
} catch (e2) {
|
|
86
86
|
}
|
|
87
87
|
})();
|
|
@@ -188,6 +188,9 @@ async function listItemDocumentPaths(pmRoot, typeToFolder) {
|
|
|
188
188
|
itemPaths.sort((left, right) => normalizeRelativePath(pmRoot, left).localeCompare(normalizeRelativePath(pmRoot, right)));
|
|
189
189
|
return itemPaths;
|
|
190
190
|
}
|
|
191
|
+
function shouldReportHistoryDirectoryUnreadable(error) {
|
|
192
|
+
return !(typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT");
|
|
193
|
+
}
|
|
191
194
|
async function buildIntegrityCheck(pmRoot, typeToFolder, schema) {
|
|
192
195
|
const itemPaths = await listItemDocumentPaths(pmRoot, typeToFolder);
|
|
193
196
|
const itemUnreadable = [];
|
|
@@ -229,7 +232,7 @@ async function buildIntegrityCheck(pmRoot, typeToFolder, schema) {
|
|
|
229
232
|
try {
|
|
230
233
|
historyFiles = (await fs.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((left, right) => left.localeCompare(right));
|
|
231
234
|
} catch (error) {
|
|
232
|
-
if (
|
|
235
|
+
if (shouldReportHistoryDirectoryUnreadable(error)) {
|
|
233
236
|
historyUnreadable.push("history");
|
|
234
237
|
}
|
|
235
238
|
}
|
|
@@ -643,48 +646,50 @@ function summarizeStringList(value, limit) {
|
|
|
643
646
|
truncated: strings.length > limit
|
|
644
647
|
};
|
|
645
648
|
}
|
|
646
|
-
function
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
return {
|
|
650
|
-
version: details.version,
|
|
651
|
-
id_prefix: details.id_prefix,
|
|
652
|
-
locks_ttl_seconds: details.locks_ttl_seconds,
|
|
653
|
-
warnings: summarizeStringList(details.warnings, limit)
|
|
654
|
-
};
|
|
655
|
-
}
|
|
656
|
-
if (check.name === "directories") {
|
|
657
|
-
return {
|
|
658
|
-
required_count: Array.isArray(details.required) ? details.required.length : 0,
|
|
659
|
-
optional_count: Array.isArray(details.optional) ? details.optional.length : 0,
|
|
660
|
-
missing_required: summarizeStringList(details.missing_required, limit),
|
|
661
|
-
missing_optional: summarizeStringList(details.missing_optional, limit),
|
|
662
|
-
missing: summarizeStringList(details.missing, limit),
|
|
663
|
-
strict_directories: details.strict_directories
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
if (check.name === "settings_values") {
|
|
667
|
-
return {
|
|
668
|
-
warnings: summarizeStringList(details.warnings, limit)
|
|
669
|
-
};
|
|
670
|
-
}
|
|
671
|
-
if (check.name === "telemetry") {
|
|
672
|
-
return {
|
|
673
|
-
enabled: details.enabled,
|
|
674
|
-
capture_level: details.capture_level,
|
|
675
|
-
endpoint: details.endpoint,
|
|
676
|
-
queue_exists: details.queue_exists,
|
|
677
|
-
queue_entries: details.queue_entries,
|
|
678
|
-
queue_draining: details.queue_draining,
|
|
679
|
-
queue_invalid_rows: details.queue_invalid_rows,
|
|
680
|
-
queue_rows_total: details.queue_rows_total,
|
|
681
|
-
last_successful_flush_at: details.last_successful_flush_at,
|
|
682
|
-
last_failed_flush_at: details.last_failed_flush_at,
|
|
683
|
-
endpoint_probe: details.endpoint_probe,
|
|
684
|
-
env_overrides: details.env_overrides
|
|
685
|
-
};
|
|
649
|
+
function summarizeActivationMigrationStatus(value) {
|
|
650
|
+
if (typeof value !== "object" || value === null) {
|
|
651
|
+
return null;
|
|
686
652
|
}
|
|
687
|
-
|
|
653
|
+
const status = value;
|
|
654
|
+
return {
|
|
655
|
+
applied_count: status.applied_count,
|
|
656
|
+
pending_count: status.pending_count,
|
|
657
|
+
failed_count: status.failed_count
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
var HEALTH_DETAIL_SUMMARIZERS = {
|
|
661
|
+
settings: (details, limit) => ({
|
|
662
|
+
version: details.version,
|
|
663
|
+
id_prefix: details.id_prefix,
|
|
664
|
+
locks_ttl_seconds: details.locks_ttl_seconds,
|
|
665
|
+
warnings: summarizeStringList(details.warnings, limit)
|
|
666
|
+
}),
|
|
667
|
+
directories: (details, limit) => ({
|
|
668
|
+
required_count: Array.isArray(details.required) ? details.required.length : 0,
|
|
669
|
+
optional_count: Array.isArray(details.optional) ? details.optional.length : 0,
|
|
670
|
+
missing_required: summarizeStringList(details.missing_required, limit),
|
|
671
|
+
missing_optional: summarizeStringList(details.missing_optional, limit),
|
|
672
|
+
missing: summarizeStringList(details.missing, limit),
|
|
673
|
+
strict_directories: details.strict_directories
|
|
674
|
+
}),
|
|
675
|
+
settings_values: (details, limit) => ({
|
|
676
|
+
warnings: summarizeStringList(details.warnings, limit)
|
|
677
|
+
}),
|
|
678
|
+
telemetry: (details) => ({
|
|
679
|
+
enabled: details.enabled,
|
|
680
|
+
capture_level: details.capture_level,
|
|
681
|
+
endpoint: details.endpoint,
|
|
682
|
+
queue_exists: details.queue_exists,
|
|
683
|
+
queue_entries: details.queue_entries,
|
|
684
|
+
queue_draining: details.queue_draining,
|
|
685
|
+
queue_invalid_rows: details.queue_invalid_rows,
|
|
686
|
+
queue_rows_total: details.queue_rows_total,
|
|
687
|
+
last_successful_flush_at: details.last_successful_flush_at,
|
|
688
|
+
last_failed_flush_at: details.last_failed_flush_at,
|
|
689
|
+
endpoint_probe: details.endpoint_probe,
|
|
690
|
+
env_overrides: details.env_overrides
|
|
691
|
+
}),
|
|
692
|
+
extensions: (details, limit) => {
|
|
688
693
|
const activation = typeof details.activation === "object" && details.activation !== null ? details.activation : {};
|
|
689
694
|
return {
|
|
690
695
|
disabled_by_flag: details.disabled_by_flag,
|
|
@@ -701,76 +706,66 @@ function summarizeHealthCheckDetails(check, limit) {
|
|
|
701
706
|
service_override_count: activation.service_override_count,
|
|
702
707
|
renderer_override_count: activation.renderer_override_count,
|
|
703
708
|
registration_counts: activation.registration_counts,
|
|
704
|
-
migration_status:
|
|
705
|
-
applied_count: activation.migration_status.applied_count,
|
|
706
|
-
pending_count: activation.migration_status.pending_count,
|
|
707
|
-
failed_count: activation.migration_status.failed_count
|
|
708
|
-
} : null
|
|
709
|
+
migration_status: summarizeActivationMigrationStatus(activation.migration_status)
|
|
709
710
|
},
|
|
710
711
|
triage: details.triage,
|
|
711
712
|
capability_contract: details.capability_contract,
|
|
712
713
|
capability_guidance: summarizeRecordList(details.capability_guidance, limit)
|
|
713
714
|
};
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
stale_items_after_total: details.stale_items_after_total,
|
|
769
|
-
stale_items_after: summarizeStringList(details.stale_items_after, limit),
|
|
770
|
-
skipped: details.skipped
|
|
771
|
-
};
|
|
772
|
-
}
|
|
773
|
-
return details;
|
|
715
|
+
},
|
|
716
|
+
// Storage details are already compact counters; keep the pre-refactor pass-through shape.
|
|
717
|
+
storage: (details) => details,
|
|
718
|
+
locks: (details) => ({
|
|
719
|
+
active_lock_count: details.active_lock_count,
|
|
720
|
+
stale_lock_count: details.stale_lock_count,
|
|
721
|
+
unreadable_lock_count: details.unreadable_lock_count,
|
|
722
|
+
unparseable_lock_count: details.unparseable_lock_count
|
|
723
|
+
}),
|
|
724
|
+
integrity: (details, limit) => ({
|
|
725
|
+
checked_item_files: details.checked_item_files,
|
|
726
|
+
checked_history_streams: details.checked_history_streams,
|
|
727
|
+
counts: details.counts,
|
|
728
|
+
item_unreadable: summarizeStringList(details.item_unreadable, limit),
|
|
729
|
+
item_conflict_markers: summarizeRecordList(details.item_conflict_markers, limit),
|
|
730
|
+
item_parse_failures: summarizeStringList(details.item_parse_failures, limit),
|
|
731
|
+
history_unreadable: summarizeStringList(details.history_unreadable, limit),
|
|
732
|
+
history_conflict_markers: summarizeRecordList(details.history_conflict_markers, limit),
|
|
733
|
+
history_invalid_json: summarizeRecordList(details.history_invalid_json, limit),
|
|
734
|
+
skipped: details.skipped
|
|
735
|
+
}),
|
|
736
|
+
history_drift: (details, limit) => ({
|
|
737
|
+
checked_items: details.checked_items,
|
|
738
|
+
counts: details.counts,
|
|
739
|
+
drifted_items: summarizeStringList(details.drifted_items, limit),
|
|
740
|
+
missing_streams: summarizeStringList(details.missing_streams, limit),
|
|
741
|
+
unreadable_streams: summarizeStringList(details.unreadable_streams, limit),
|
|
742
|
+
hash_mismatches: summarizeStringList(details.hash_mismatches, limit),
|
|
743
|
+
chain_mismatches: summarizeStringList(details.chain_mismatches, limit),
|
|
744
|
+
skipped: details.skipped
|
|
745
|
+
}),
|
|
746
|
+
vectorization: (details, limit) => ({
|
|
747
|
+
semantic_runtime_available: details.semantic_runtime_available,
|
|
748
|
+
compatibility_mode_auto_defaults: details.compatibility_mode_auto_defaults,
|
|
749
|
+
auto_ollama_defaults_applied: details.auto_ollama_defaults_applied,
|
|
750
|
+
refresh_policy: details.refresh_policy,
|
|
751
|
+
provider_active: details.provider_active,
|
|
752
|
+
vector_store_active: details.vector_store_active,
|
|
753
|
+
items: details.items,
|
|
754
|
+
ledger_entries_before: details.ledger_entries_before,
|
|
755
|
+
stale_items_before_total: details.stale_items_before_total,
|
|
756
|
+
stale_items_before: summarizeStringList(details.stale_items_before, limit),
|
|
757
|
+
refresh_attempted: details.refresh_attempted,
|
|
758
|
+
refresh_skipped_reason: details.refresh_skipped_reason,
|
|
759
|
+
refresh_result: details.refresh_result,
|
|
760
|
+
ledger_entries_after: details.ledger_entries_after,
|
|
761
|
+
stale_items_after_total: details.stale_items_after_total,
|
|
762
|
+
stale_items_after: summarizeStringList(details.stale_items_after, limit),
|
|
763
|
+
skipped: details.skipped
|
|
764
|
+
})
|
|
765
|
+
};
|
|
766
|
+
function summarizeHealthCheckDetails(check, limit) {
|
|
767
|
+
const summarize = HEALTH_DETAIL_SUMMARIZERS[check.name];
|
|
768
|
+
return summarize ? summarize(check.details, limit) : check.details;
|
|
774
769
|
}
|
|
775
770
|
function applyBriefHealthProjection(result) {
|
|
776
771
|
const warningsSummary = summarizeStringList(result.warnings, BRIEF_HEALTH_DETAIL_LIMIT);
|
|
@@ -891,6 +886,92 @@ function parseTelemetryQueue(raw) {
|
|
|
891
886
|
maxAttempts
|
|
892
887
|
};
|
|
893
888
|
}
|
|
889
|
+
function emptyTelemetryQueueSummary() {
|
|
890
|
+
return { validEntries: 0, invalidRows: 0, totalRows: 0, highRetryEntries: 0, maxAttempts: 0 };
|
|
891
|
+
}
|
|
892
|
+
function parseTelemetryRuntimeState(stateRaw) {
|
|
893
|
+
if (!stateRaw || stateRaw.trim().length === 0) {
|
|
894
|
+
return { runtimeState: {}, stateParseFailed: false };
|
|
895
|
+
}
|
|
896
|
+
try {
|
|
897
|
+
const parsed = JSON.parse(stateRaw);
|
|
898
|
+
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
|
|
899
|
+
return { runtimeState: parsed, stateParseFailed: false };
|
|
900
|
+
}
|
|
901
|
+
return { runtimeState: {}, stateParseFailed: true };
|
|
902
|
+
} catch {
|
|
903
|
+
return { runtimeState: {}, stateParseFailed: true };
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
async function maybeProbeTelemetryEndpoint(settings, checkTelemetry) {
|
|
907
|
+
const endpoint = settings.telemetry.endpoint.trim();
|
|
908
|
+
if (!checkTelemetry || !settings.telemetry.enabled || endpoint.length === 0) {
|
|
909
|
+
return void 0;
|
|
910
|
+
}
|
|
911
|
+
const probe = await probeTelemetryEndpointHealth(endpoint);
|
|
912
|
+
return {
|
|
913
|
+
attempted: true,
|
|
914
|
+
...probe
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
function collectTelemetryQueueWarnings(settings, queueSummary, runtimeState) {
|
|
918
|
+
const warnings = [];
|
|
919
|
+
if (queueSummary.invalidRows > 0) {
|
|
920
|
+
warnings.push(`telemetry_queue_invalid_rows:${queueSummary.invalidRows}`);
|
|
921
|
+
}
|
|
922
|
+
if (!settings.telemetry.enabled || queueSummary.validEntries === 0) {
|
|
923
|
+
return warnings;
|
|
924
|
+
}
|
|
925
|
+
const lastSuccess = runtimeState.last_successful_flush_at;
|
|
926
|
+
const lastFailure = runtimeState.last_failed_flush_at;
|
|
927
|
+
const activeFailure = lastFailure && (!lastSuccess || lastFailure > lastSuccess);
|
|
928
|
+
const neverFlushed = !lastSuccess;
|
|
929
|
+
const highWater = queueSummary.validEntries >= TELEMETRY_QUEUE_HIGH_WATER_MARK;
|
|
930
|
+
if (activeFailure || neverFlushed || highWater) {
|
|
931
|
+
warnings.push(`telemetry_queue_pending:${queueSummary.validEntries}`);
|
|
932
|
+
}
|
|
933
|
+
if (queueSummary.highRetryEntries > 0) {
|
|
934
|
+
warnings.push(`telemetry_queue_high_retries:${queueSummary.highRetryEntries}`);
|
|
935
|
+
}
|
|
936
|
+
return warnings;
|
|
937
|
+
}
|
|
938
|
+
function collectTelemetryEndpointWarnings(endpointProbe) {
|
|
939
|
+
if (!endpointProbe || endpointProbe.ok !== false) {
|
|
940
|
+
return [];
|
|
941
|
+
}
|
|
942
|
+
return typeof endpointProbe.status === "number" ? [`telemetry_endpoint_probe_http_status:${endpointProbe.status}`] : ["telemetry_endpoint_probe_failed"];
|
|
943
|
+
}
|
|
944
|
+
function collectTelemetrySchemaWarnings(endpointProbe) {
|
|
945
|
+
const parsedMaxSchemaVersion = Number.parseInt(endpointProbe?.max_schema_version ?? "", 10);
|
|
946
|
+
if (endpointProbe?.ok === true && Number.isInteger(parsedMaxSchemaVersion) && parsedMaxSchemaVersion > TELEMETRY_SCHEMA_VERSION) {
|
|
947
|
+
return [`telemetry_schema_version_behind:${parsedMaxSchemaVersion}`];
|
|
948
|
+
}
|
|
949
|
+
return [];
|
|
950
|
+
}
|
|
951
|
+
function collectTelemetryOtelWarnings(settings, runtimeState) {
|
|
952
|
+
const pendingOtelSpans = typeof runtimeState.pending_otel_spans === "number" ? runtimeState.pending_otel_spans : 0;
|
|
953
|
+
const lastOtelSuccess = runtimeState.last_otel_success_at;
|
|
954
|
+
const lastOtelFailure = runtimeState.last_otel_failure_at;
|
|
955
|
+
const otelExportFailing = settings.telemetry.enabled && pendingOtelSpans > 0 && Boolean(lastOtelFailure) && // >= so a mixed-outcome batch (success + failure share the same attempt
|
|
956
|
+
// timestamp) still surfaces the warning rather than being masked by the tie.
|
|
957
|
+
(!lastOtelSuccess || lastOtelFailure >= lastOtelSuccess);
|
|
958
|
+
return otelExportFailing ? [`telemetry_otel_export_failing:${pendingOtelSpans}`] : [];
|
|
959
|
+
}
|
|
960
|
+
function buildTelemetryEnvOverrideDetails() {
|
|
961
|
+
return {
|
|
962
|
+
telemetry_disabled: telemetryEnvFlagEnabled("PM_TELEMETRY_DISABLED") || telemetryEnvFlagEnabled("PM_NO_TELEMETRY"),
|
|
963
|
+
pm_no_telemetry: telemetryEnvFlagEnabled("PM_NO_TELEMETRY"),
|
|
964
|
+
telemetry_otel_disabled: telemetryEnvFlagEnabled("PM_TELEMETRY_OTEL_DISABLED"),
|
|
965
|
+
telemetry_inline_flush: telemetryEnvFlagEnabled("PM_TELEMETRY_INLINE_FLUSH"),
|
|
966
|
+
telemetry_source_context: telemetrySourceContextOverride()
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
function telemetryQueueHasEntries(settings, queueSummary) {
|
|
970
|
+
return settings.telemetry.enabled && queueSummary.validEntries > 0;
|
|
971
|
+
}
|
|
972
|
+
function isTelemetryQueueDraining(queueHasEntries, warnings) {
|
|
973
|
+
return queueHasEntries && warnings.every((warning) => !warning.startsWith("telemetry_queue_pending:") && !warning.startsWith("telemetry_queue_high_retries:"));
|
|
974
|
+
}
|
|
894
975
|
async function probeTelemetryEndpointHealth(endpoint) {
|
|
895
976
|
let probeUrl = endpoint;
|
|
896
977
|
try {
|
|
@@ -936,74 +1017,19 @@ async function buildTelemetryCheck(settings, options) {
|
|
|
936
1017
|
const queueRaw = await readFileIfExists(queuePath);
|
|
937
1018
|
const queueExists = queueRaw !== null;
|
|
938
1019
|
const queueSizeBytes = queueRaw ? Buffer.byteLength(queueRaw, "utf8") : 0;
|
|
939
|
-
const queueSummary = queueRaw ? parseTelemetryQueue(queueRaw) :
|
|
1020
|
+
const queueSummary = queueRaw ? parseTelemetryQueue(queueRaw) : emptyTelemetryQueueSummary();
|
|
940
1021
|
const stateRaw = await readFileIfExists(statePath);
|
|
941
|
-
|
|
942
|
-
let stateParseFailed = false;
|
|
943
|
-
if (stateRaw && stateRaw.trim().length > 0) {
|
|
944
|
-
try {
|
|
945
|
-
const parsed = JSON.parse(stateRaw);
|
|
946
|
-
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
|
|
947
|
-
runtimeState = parsed;
|
|
948
|
-
} else {
|
|
949
|
-
stateParseFailed = true;
|
|
950
|
-
}
|
|
951
|
-
} catch {
|
|
952
|
-
stateParseFailed = true;
|
|
953
|
-
}
|
|
954
|
-
}
|
|
1022
|
+
const { runtimeState, stateParseFailed } = parseTelemetryRuntimeState(stateRaw);
|
|
955
1023
|
const endpoint = settings.telemetry.endpoint.trim();
|
|
956
1024
|
const endpointDisplay = normalizeEndpointForDisplay(endpoint);
|
|
957
|
-
|
|
958
|
-
if (options.checkTelemetry && settings.telemetry.enabled && endpoint.length > 0) {
|
|
959
|
-
const probe = await probeTelemetryEndpointHealth(endpoint);
|
|
960
|
-
endpointProbe = {
|
|
961
|
-
attempted: true,
|
|
962
|
-
...probe
|
|
963
|
-
};
|
|
964
|
-
}
|
|
1025
|
+
const endpointProbe = await maybeProbeTelemetryEndpoint(settings, options.checkTelemetry);
|
|
965
1026
|
const warnings = [];
|
|
966
1027
|
if (stateParseFailed) {
|
|
967
1028
|
warnings.push("telemetry_state_invalid_json");
|
|
968
1029
|
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}
|
|
972
|
-
const queueHasEntries = settings.telemetry.enabled && queueSummary.validEntries > 0;
|
|
973
|
-
if (queueHasEntries) {
|
|
974
|
-
const lastSuccess = runtimeState.last_successful_flush_at;
|
|
975
|
-
const lastFailure = runtimeState.last_failed_flush_at;
|
|
976
|
-
const activeFailure = lastFailure && (!lastSuccess || lastFailure > lastSuccess);
|
|
977
|
-
const neverFlushed = !lastSuccess;
|
|
978
|
-
const highWater = queueSummary.validEntries >= TELEMETRY_QUEUE_HIGH_WATER_MARK;
|
|
979
|
-
const highRetries = queueSummary.highRetryEntries > 0;
|
|
980
|
-
if (activeFailure || neverFlushed || highWater) {
|
|
981
|
-
warnings.push(`telemetry_queue_pending:${queueSummary.validEntries}`);
|
|
982
|
-
}
|
|
983
|
-
if (highRetries) {
|
|
984
|
-
warnings.push(`telemetry_queue_high_retries:${queueSummary.highRetryEntries}`);
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
if (endpointProbe && !endpointProbe.ok) {
|
|
988
|
-
if (typeof endpointProbe.status === "number") {
|
|
989
|
-
warnings.push(`telemetry_endpoint_probe_http_status:${endpointProbe.status}`);
|
|
990
|
-
} else {
|
|
991
|
-
warnings.push("telemetry_endpoint_probe_failed");
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
const parsedMaxSchemaVersion = Number.parseInt(endpointProbe?.max_schema_version ?? "", 10);
|
|
995
|
-
if (endpointProbe && endpointProbe.ok && Number.isInteger(parsedMaxSchemaVersion) && parsedMaxSchemaVersion > TELEMETRY_SCHEMA_VERSION) {
|
|
996
|
-
warnings.push(`telemetry_schema_version_behind:${parsedMaxSchemaVersion}`);
|
|
997
|
-
}
|
|
1030
|
+
warnings.push(...collectTelemetryQueueWarnings(settings, queueSummary, runtimeState), ...collectTelemetryEndpointWarnings(endpointProbe), ...collectTelemetrySchemaWarnings(endpointProbe), ...collectTelemetryOtelWarnings(settings, runtimeState));
|
|
1031
|
+
const queueHasEntries = telemetryQueueHasEntries(settings, queueSummary);
|
|
998
1032
|
const pendingOtelSpans = typeof runtimeState.pending_otel_spans === "number" ? runtimeState.pending_otel_spans : 0;
|
|
999
|
-
const lastOtelSuccess = runtimeState.last_otel_success_at;
|
|
1000
|
-
const lastOtelFailure = runtimeState.last_otel_failure_at;
|
|
1001
|
-
const otelExportFailing = settings.telemetry.enabled && pendingOtelSpans > 0 && Boolean(lastOtelFailure) && // >= so a mixed-outcome batch (success + failure share the same attempt
|
|
1002
|
-
// timestamp) still surfaces the warning rather than being masked by the tie.
|
|
1003
|
-
(!lastOtelSuccess || lastOtelFailure >= lastOtelSuccess);
|
|
1004
|
-
if (otelExportFailing) {
|
|
1005
|
-
warnings.push(`telemetry_otel_export_failing:${pendingOtelSpans}`);
|
|
1006
|
-
}
|
|
1007
1033
|
return {
|
|
1008
1034
|
check: {
|
|
1009
1035
|
name: "telemetry",
|
|
@@ -1016,7 +1042,7 @@ async function buildTelemetryCheck(settings, options) {
|
|
|
1016
1042
|
queue_path: queuePath,
|
|
1017
1043
|
queue_exists: queueExists,
|
|
1018
1044
|
queue_entries: queueSummary.validEntries,
|
|
1019
|
-
queue_draining: queueHasEntries
|
|
1045
|
+
queue_draining: isTelemetryQueueDraining(queueHasEntries, warnings),
|
|
1020
1046
|
queue_invalid_rows: queueSummary.invalidRows,
|
|
1021
1047
|
queue_rows_total: queueSummary.totalRows,
|
|
1022
1048
|
queue_size_bytes: queueSizeBytes,
|
|
@@ -1033,18 +1059,8 @@ async function buildTelemetryCheck(settings, options) {
|
|
|
1033
1059
|
last_otel_success_at: runtimeState.last_otel_success_at ?? null,
|
|
1034
1060
|
last_otel_failure_at: runtimeState.last_otel_failure_at ?? null,
|
|
1035
1061
|
last_otel_failure_error: runtimeState.last_otel_failure_error ?? null,
|
|
1036
|
-
endpoint_probe: endpointProbe ?? {
|
|
1037
|
-
|
|
1038
|
-
},
|
|
1039
|
-
/* c8 ignore start -- env-override combinations are validated through runtime integration suites */
|
|
1040
|
-
env_overrides: {
|
|
1041
|
-
telemetry_disabled: telemetryEnvFlagEnabled("PM_TELEMETRY_DISABLED") || telemetryEnvFlagEnabled("PM_NO_TELEMETRY"),
|
|
1042
|
-
pm_no_telemetry: telemetryEnvFlagEnabled("PM_NO_TELEMETRY"),
|
|
1043
|
-
telemetry_otel_disabled: telemetryEnvFlagEnabled("PM_TELEMETRY_OTEL_DISABLED"),
|
|
1044
|
-
telemetry_inline_flush: telemetryEnvFlagEnabled("PM_TELEMETRY_INLINE_FLUSH"),
|
|
1045
|
-
telemetry_source_context: telemetrySourceContextOverride()
|
|
1046
|
-
}
|
|
1047
|
-
/* c8 ignore stop */
|
|
1062
|
+
endpoint_probe: endpointProbe ?? { attempted: false },
|
|
1063
|
+
env_overrides: buildTelemetryEnvOverrideDetails()
|
|
1048
1064
|
}
|
|
1049
1065
|
},
|
|
1050
1066
|
warnings
|
|
@@ -1127,71 +1143,128 @@ async function buildHistoryDriftCheck(pmRoot, items) {
|
|
|
1127
1143
|
warnings
|
|
1128
1144
|
};
|
|
1129
1145
|
}
|
|
1130
|
-
|
|
1146
|
+
function buildVectorizationRuntimeSnapshot(settings) {
|
|
1131
1147
|
const runtimeDefaults = resolveSettingsWithSemanticRuntimeDefaults(settings);
|
|
1132
1148
|
const providerResolution = resolveEmbeddingProviders(runtimeDefaults.settings);
|
|
1133
1149
|
const vectorStoreResolution = resolveVectorStores(runtimeDefaults.settings);
|
|
1134
1150
|
const runtimeEmbeddingIdentity = providerResolution.active ? buildVectorizationEmbeddingIdentity(providerResolution.active.name, providerResolution.active.model) : null;
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1151
|
+
return {
|
|
1152
|
+
runtimeDefaults,
|
|
1153
|
+
providerResolution,
|
|
1154
|
+
vectorStoreResolution,
|
|
1155
|
+
runtimeEmbeddingIdentity,
|
|
1156
|
+
semanticRuntimeAvailable: Boolean(providerResolution.active && vectorStoreResolution.active)
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
function emptyVectorizationRefreshResult() {
|
|
1160
|
+
return {
|
|
1139
1161
|
refreshed: [],
|
|
1140
1162
|
skipped: [],
|
|
1141
1163
|
warnings: []
|
|
1142
1164
|
};
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
});
|
|
1165
|
+
}
|
|
1166
|
+
async function refreshStaleVectorizationItems(params) {
|
|
1167
|
+
if (!params.refreshPolicy.enabled || !params.snapshot.semanticRuntimeAvailable || params.staleBefore.length === 0) {
|
|
1168
|
+
return emptyVectorizationRefreshResult();
|
|
1148
1169
|
}
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1170
|
+
return refreshSemanticEmbeddingsForMutatedItems(params.pmRoot, params.staleBefore, {
|
|
1171
|
+
settings: params.snapshot.runtimeDefaults.settings,
|
|
1172
|
+
apply_runtime_defaults: false
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
function vectorizationEmbeddingIdentityChanged(params) {
|
|
1176
|
+
return params.strictVectorizationWarnings && params.semanticRuntimeAvailable && Boolean(params.ledgerBefore.embedding && params.runtimeEmbeddingIdentity && hasVectorizationEmbeddingIdentityChanged(params.ledgerBefore.embedding, params.runtimeEmbeddingIdentity));
|
|
1177
|
+
}
|
|
1178
|
+
function collectVectorizationWarnings(params) {
|
|
1179
|
+
const warningSet = /* @__PURE__ */ new Set([...params.ledgerBefore.warnings, ...params.ledgerAfter.warnings]);
|
|
1180
|
+
if (params.strictVectorizationWarnings) {
|
|
1181
|
+
for (const warning of params.refreshResult.warnings) {
|
|
1156
1182
|
warningSet.add(warning);
|
|
1157
1183
|
}
|
|
1158
1184
|
}
|
|
1159
|
-
if (embeddingIdentityChanged) {
|
|
1185
|
+
if (params.embeddingIdentityChanged) {
|
|
1160
1186
|
warningSet.add("vectorization_embedding_identity_changed");
|
|
1161
1187
|
}
|
|
1162
|
-
if (strictVectorizationWarnings && semanticRuntimeAvailable && staleAfter.length > 0) {
|
|
1163
|
-
warningSet.add(`vectorization_stale_items_remaining:${staleAfter.length}`);
|
|
1188
|
+
if (params.strictVectorizationWarnings && params.semanticRuntimeAvailable && params.staleAfter.length > 0) {
|
|
1189
|
+
warningSet.add(`vectorization_stale_items_remaining:${params.staleAfter.length}`);
|
|
1190
|
+
}
|
|
1191
|
+
return [...warningSet].sort((left, right) => left.localeCompare(right));
|
|
1192
|
+
}
|
|
1193
|
+
function resolveVectorizationRefreshSkippedReason(refreshPolicy, semanticRuntimeAvailable, staleBefore) {
|
|
1194
|
+
if (refreshPolicy.enabled && semanticRuntimeAvailable && staleBefore.length > 0) {
|
|
1195
|
+
return null;
|
|
1196
|
+
}
|
|
1197
|
+
if (!refreshPolicy.enabled) {
|
|
1198
|
+
return "refresh_disabled";
|
|
1164
1199
|
}
|
|
1165
|
-
|
|
1200
|
+
return semanticRuntimeAvailable ? "no_stale_items" : "semantic_runtime_unavailable";
|
|
1201
|
+
}
|
|
1202
|
+
function buildVectorizationProviderDetails(settings, snapshot) {
|
|
1203
|
+
const activeProvider = snapshot.providerResolution.active?.name ?? null;
|
|
1204
|
+
const activeVectorStore = snapshot.vectorStoreResolution.active?.name ?? null;
|
|
1205
|
+
return {
|
|
1206
|
+
provider_active: activeProvider,
|
|
1207
|
+
// GH-244: surface the persisted (possibly empty) configured value and
|
|
1208
|
+
// how the active resolution was sourced, so a config audit can tell
|
|
1209
|
+
// "auto-detected" apart from a genuine misconfiguration when
|
|
1210
|
+
// settings.search.provider / vector_store.adapter are empty strings.
|
|
1211
|
+
provider_configured: typeof settings.search?.provider === "string" ? settings.search.provider : null,
|
|
1212
|
+
provider_source: resolveProviderConfigSource(activeProvider, settings.search?.provider ?? null),
|
|
1213
|
+
vector_store_active: activeVectorStore,
|
|
1214
|
+
vector_store_configured: typeof settings.vector_store?.adapter === "string" ? settings.vector_store.adapter : null,
|
|
1215
|
+
vector_store_source: resolveProviderConfigSource(activeVectorStore, settings.vector_store?.adapter ?? null)
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
function buildVectorizationRefreshPolicyDetails(refreshPolicy) {
|
|
1219
|
+
return {
|
|
1220
|
+
enabled: refreshPolicy.enabled,
|
|
1221
|
+
check_only: refreshPolicy.checkOnly,
|
|
1222
|
+
no_refresh: refreshPolicy.noRefresh,
|
|
1223
|
+
refresh_vectors: refreshPolicy.refreshVectors
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
function vectorizationRefreshAttempted(refreshPolicy, semanticRuntimeAvailable, staleBefore) {
|
|
1227
|
+
return refreshPolicy.enabled && staleBefore.length > 0 && semanticRuntimeAvailable;
|
|
1228
|
+
}
|
|
1229
|
+
async function buildVectorizationCheck(pmRoot, settings, items, refreshPolicy, verboseStaleItems) {
|
|
1230
|
+
const snapshot = buildVectorizationRuntimeSnapshot(settings);
|
|
1231
|
+
const ledgerBefore = await readVectorizationStatusLedger(pmRoot);
|
|
1232
|
+
const staleBefore = snapshot.semanticRuntimeAvailable ? collectStaleVectorizationIds(items, ledgerBefore.entries) : [];
|
|
1233
|
+
const refreshResult = await refreshStaleVectorizationItems({ pmRoot, snapshot, refreshPolicy, staleBefore });
|
|
1234
|
+
const ledgerAfter = await readVectorizationStatusLedger(pmRoot);
|
|
1235
|
+
const staleAfter = snapshot.semanticRuntimeAvailable ? collectStaleVectorizationIds(items, ledgerAfter.entries) : [];
|
|
1236
|
+
const strictVectorizationWarnings = !snapshot.runtimeDefaults.auto_ollama_defaults_applied;
|
|
1237
|
+
const embeddingIdentityChanged = vectorizationEmbeddingIdentityChanged({
|
|
1238
|
+
strictVectorizationWarnings,
|
|
1239
|
+
semanticRuntimeAvailable: snapshot.semanticRuntimeAvailable,
|
|
1240
|
+
ledgerBefore,
|
|
1241
|
+
runtimeEmbeddingIdentity: snapshot.runtimeEmbeddingIdentity
|
|
1242
|
+
});
|
|
1243
|
+
const warnings = collectVectorizationWarnings({
|
|
1244
|
+
ledgerBefore,
|
|
1245
|
+
ledgerAfter,
|
|
1246
|
+
refreshResult,
|
|
1247
|
+
strictVectorizationWarnings,
|
|
1248
|
+
semanticRuntimeAvailable: snapshot.semanticRuntimeAvailable,
|
|
1249
|
+
embeddingIdentityChanged,
|
|
1250
|
+
staleAfter
|
|
1251
|
+
});
|
|
1166
1252
|
const staleBeforeDetail = selectStaleItemDetail(staleBefore, verboseStaleItems);
|
|
1167
1253
|
const staleAfterDetail = selectStaleItemDetail(staleAfter, verboseStaleItems);
|
|
1254
|
+
const refreshAttempted = vectorizationRefreshAttempted(refreshPolicy, snapshot.semanticRuntimeAvailable, staleBefore);
|
|
1168
1255
|
return {
|
|
1169
1256
|
check: {
|
|
1170
1257
|
name: "vectorization",
|
|
1171
1258
|
status: warnings.length === 0 ? "ok" : "warn",
|
|
1172
1259
|
details: {
|
|
1173
|
-
semantic_runtime_available: semanticRuntimeAvailable,
|
|
1174
|
-
compatibility_mode_auto_defaults: runtimeDefaults.auto_ollama_defaults_applied,
|
|
1175
|
-
auto_ollama_defaults_applied: runtimeDefaults.auto_ollama_defaults_applied,
|
|
1176
|
-
refresh_policy:
|
|
1177
|
-
|
|
1178
|
-
check_only: refreshPolicy.checkOnly,
|
|
1179
|
-
no_refresh: refreshPolicy.noRefresh,
|
|
1180
|
-
refresh_vectors: refreshPolicy.refreshVectors
|
|
1181
|
-
},
|
|
1182
|
-
provider_active: providerResolution.active?.name ?? null,
|
|
1183
|
-
// GH-244: surface the persisted (possibly empty) configured value and
|
|
1184
|
-
// how the active resolution was sourced, so a config audit can tell
|
|
1185
|
-
// "auto-detected" apart from a genuine misconfiguration when
|
|
1186
|
-
// settings.search.provider / vector_store.adapter are empty strings.
|
|
1187
|
-
provider_configured: typeof settings.search?.provider === "string" ? settings.search.provider : null,
|
|
1188
|
-
provider_source: resolveProviderConfigSource(providerResolution.active?.name ?? null, settings.search?.provider ?? null),
|
|
1189
|
-
vector_store_active: vectorStoreResolution.active?.name ?? null,
|
|
1190
|
-
vector_store_configured: typeof settings.vector_store?.adapter === "string" ? settings.vector_store.adapter : null,
|
|
1191
|
-
vector_store_source: resolveProviderConfigSource(vectorStoreResolution.active?.name ?? null, settings.vector_store?.adapter ?? null),
|
|
1260
|
+
semantic_runtime_available: snapshot.semanticRuntimeAvailable,
|
|
1261
|
+
compatibility_mode_auto_defaults: snapshot.runtimeDefaults.auto_ollama_defaults_applied,
|
|
1262
|
+
auto_ollama_defaults_applied: snapshot.runtimeDefaults.auto_ollama_defaults_applied,
|
|
1263
|
+
refresh_policy: buildVectorizationRefreshPolicyDetails(refreshPolicy),
|
|
1264
|
+
...buildVectorizationProviderDetails(settings, snapshot),
|
|
1192
1265
|
embedding_identity_changed: embeddingIdentityChanged,
|
|
1193
1266
|
embedding_identity_before: ledgerBefore.embedding ?? null,
|
|
1194
|
-
embedding_identity_runtime: runtimeEmbeddingIdentity ?? null,
|
|
1267
|
+
embedding_identity_runtime: snapshot.runtimeEmbeddingIdentity ?? null,
|
|
1195
1268
|
items: items.length,
|
|
1196
1269
|
ledger_entries_before: Object.keys(ledgerBefore.entries).length,
|
|
1197
1270
|
stale_items_detail_mode: verboseStaleItems ? "full" : "summary",
|
|
@@ -1199,8 +1272,8 @@ async function buildVectorizationCheck(pmRoot, settings, items, refreshPolicy, v
|
|
|
1199
1272
|
stale_items_before_total: staleBeforeDetail.total,
|
|
1200
1273
|
stale_items_before: staleBeforeDetail.values,
|
|
1201
1274
|
stale_items_before_truncated: staleBeforeDetail.truncated,
|
|
1202
|
-
refresh_attempted:
|
|
1203
|
-
refresh_skipped_reason: refreshPolicy.
|
|
1275
|
+
refresh_attempted: refreshAttempted,
|
|
1276
|
+
refresh_skipped_reason: resolveVectorizationRefreshSkippedReason(refreshPolicy, snapshot.semanticRuntimeAvailable, staleBefore),
|
|
1204
1277
|
refresh_result: refreshResult,
|
|
1205
1278
|
ledger_entries_after: Object.keys(ledgerAfter.entries).length,
|
|
1206
1279
|
stale_items_after_total: staleAfterDetail.total,
|
|
@@ -1238,17 +1311,7 @@ function resolveVectorRefreshPolicy(options) {
|
|
|
1238
1311
|
refreshVectors
|
|
1239
1312
|
};
|
|
1240
1313
|
}
|
|
1241
|
-
|
|
1242
|
-
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
1243
|
-
const settingsPath = getSettingsPath(pmRoot);
|
|
1244
|
-
if (!await pathExists(settingsPath)) {
|
|
1245
|
-
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
1246
|
-
}
|
|
1247
|
-
const { settings, warnings: settingsReadWarnings } = await readSettingsWithMetadata(pmRoot);
|
|
1248
|
-
const normalizedSettingsReadWarnings = [...new Set(settingsReadWarnings)];
|
|
1249
|
-
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
1250
|
-
const strictDirectories = options.strictDirectories === true;
|
|
1251
|
-
const refreshPolicy = resolveVectorRefreshPolicy(options);
|
|
1314
|
+
function resolveHealthDirectoryLists(typeRegistry) {
|
|
1252
1315
|
const optionalBuiltinDirs = new Set(PM_OPTIONAL_TYPE_SUBDIRS.filter((entry) => entry.length > 0));
|
|
1253
1316
|
const requiredDirSet = new Set(PM_CORE_REQUIRED_SUBDIRS.filter((entry) => entry.length > 0));
|
|
1254
1317
|
const optionalDirSet = /* @__PURE__ */ new Set();
|
|
@@ -1259,41 +1322,202 @@ async function runHealth(global2, options = {}) {
|
|
|
1259
1322
|
}
|
|
1260
1323
|
requiredDirSet.add(folder);
|
|
1261
1324
|
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1325
|
+
return {
|
|
1326
|
+
requiredDirs: [...requiredDirSet].sort((left, right) => left.localeCompare(right)),
|
|
1327
|
+
optionalDirs: [...optionalDirSet].sort((left, right) => left.localeCompare(right)),
|
|
1328
|
+
optionalDirSet
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
async function scanHealthDirectories(pmRoot, typeRegistry, strictDirectories) {
|
|
1332
|
+
const { requiredDirs, optionalDirs, optionalDirSet } = resolveHealthDirectoryLists(typeRegistry);
|
|
1264
1333
|
const missingRequiredDirs = [];
|
|
1265
1334
|
const missingOptionalDirs = [];
|
|
1266
1335
|
const hookWarnings = [];
|
|
1267
1336
|
for (const relativeDir of [...requiredDirs, ...optionalDirs]) {
|
|
1268
1337
|
const directoryPath = path.join(pmRoot, relativeDir);
|
|
1269
|
-
hookWarnings.push(...await runActiveOnReadHooks({
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
}
|
|
1273
|
-
if (
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
missingRequiredDirs.push(relativeDir);
|
|
1278
|
-
}
|
|
1338
|
+
hookWarnings.push(...await runActiveOnReadHooks({ path: directoryPath, scope: "project" }));
|
|
1339
|
+
if (await isDirectory(directoryPath)) {
|
|
1340
|
+
continue;
|
|
1341
|
+
}
|
|
1342
|
+
if (optionalDirSet.has(relativeDir)) {
|
|
1343
|
+
missingOptionalDirs.push(relativeDir);
|
|
1344
|
+
} else {
|
|
1345
|
+
missingRequiredDirs.push(relativeDir);
|
|
1279
1346
|
}
|
|
1280
1347
|
}
|
|
1281
|
-
|
|
1348
|
+
return {
|
|
1349
|
+
requiredDirs,
|
|
1350
|
+
optionalDirs,
|
|
1351
|
+
missingRequiredDirs,
|
|
1352
|
+
missingOptionalDirs,
|
|
1353
|
+
missingDirs: strictDirectories ? [...missingRequiredDirs, ...missingOptionalDirs] : [...missingRequiredDirs],
|
|
1354
|
+
hookWarnings
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1357
|
+
function resolveHealthSkipPolicy(options) {
|
|
1358
|
+
const summaryMode = options.summary === true && options.full !== true;
|
|
1359
|
+
const fastProjectionCheckOnly = options.checkOnly === true && (options.brief === true || options.summary === true) && options.full !== true;
|
|
1360
|
+
return {
|
|
1361
|
+
summaryMode,
|
|
1362
|
+
skipIntegrity: (options.skipIntegrity === true || fastProjectionCheckOnly) && options.full !== true,
|
|
1363
|
+
skipDrift: (options.skipDrift === true || fastProjectionCheckOnly) && options.full !== true,
|
|
1364
|
+
skipVectors: (options.skipVectors === true || fastProjectionCheckOnly) && options.full !== true
|
|
1365
|
+
};
|
|
1366
|
+
}
|
|
1367
|
+
async function readHealthItems(params) {
|
|
1368
|
+
if (params.skipPolicy.skipDrift && params.skipPolicy.skipVectors) {
|
|
1369
|
+
return listAllFrontMatter(params.pmRoot, params.settings.item_format, params.typeRegistry.type_to_folder, params.itemReadWarnings, params.settings.schema);
|
|
1370
|
+
}
|
|
1371
|
+
return listAllFrontMatterWithBody(params.pmRoot, params.settings.item_format, params.typeRegistry.type_to_folder, params.itemReadWarnings, params.settings.schema);
|
|
1372
|
+
}
|
|
1373
|
+
function buildSkippedHealthCheck(name) {
|
|
1374
|
+
return { check: { name, status: "ok", details: { skipped: true } }, warnings: [] };
|
|
1375
|
+
}
|
|
1376
|
+
function buildSettingsHealthCheck(settingsPath, settings, normalizedSettingsReadWarnings) {
|
|
1377
|
+
return {
|
|
1378
|
+
name: "settings",
|
|
1379
|
+
/* c8 ignore next -- settings read-warning status split is covered in broader read-settings integration tests */
|
|
1380
|
+
status: normalizedSettingsReadWarnings.length === 0 ? "ok" : "warn",
|
|
1381
|
+
details: {
|
|
1382
|
+
path: settingsPath,
|
|
1383
|
+
version: settings.version,
|
|
1384
|
+
id_prefix: settings.id_prefix,
|
|
1385
|
+
locks_ttl_seconds: settings.locks.ttl_seconds,
|
|
1386
|
+
warnings: normalizedSettingsReadWarnings
|
|
1387
|
+
}
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
function buildDirectoriesHealthCheck(directoryState, strictDirectories) {
|
|
1391
|
+
return {
|
|
1392
|
+
name: "directories",
|
|
1393
|
+
status: directoryState.missingDirs.length === 0 ? "ok" : "warn",
|
|
1394
|
+
details: {
|
|
1395
|
+
required: directoryState.requiredDirs,
|
|
1396
|
+
optional: directoryState.optionalDirs,
|
|
1397
|
+
missing_required: directoryState.missingRequiredDirs,
|
|
1398
|
+
missing_optional: directoryState.missingOptionalDirs,
|
|
1399
|
+
missing: directoryState.missingDirs,
|
|
1400
|
+
strict_directories: strictDirectories
|
|
1401
|
+
}
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
function buildSettingsValuesHealthCheck(settingWarnings) {
|
|
1405
|
+
return {
|
|
1406
|
+
name: "settings_values",
|
|
1407
|
+
status: settingWarnings.length === 0 ? "ok" : "warn",
|
|
1408
|
+
details: { warnings: settingWarnings }
|
|
1409
|
+
};
|
|
1410
|
+
}
|
|
1411
|
+
function buildStorageHealthCheck(items, settings, historySummary) {
|
|
1412
|
+
return {
|
|
1413
|
+
name: "storage",
|
|
1414
|
+
status: historySummary.over_threshold.length === 0 ? "ok" : "warn",
|
|
1415
|
+
details: {
|
|
1416
|
+
items: items.length,
|
|
1417
|
+
history_streams: historySummary.count,
|
|
1418
|
+
...historySummary.max_entries !== null ? {
|
|
1419
|
+
compact_policy: {
|
|
1420
|
+
enabled: settings.history.compact_policy.enabled,
|
|
1421
|
+
max_entries: historySummary.max_entries,
|
|
1422
|
+
trigger: settings.history.compact_policy.trigger,
|
|
1423
|
+
over_threshold_count: historySummary.over_threshold.length,
|
|
1424
|
+
over_threshold: historySummary.over_threshold
|
|
1425
|
+
}
|
|
1426
|
+
} : {}
|
|
1427
|
+
}
|
|
1428
|
+
};
|
|
1429
|
+
}
|
|
1430
|
+
function collectHealthWarnings(params) {
|
|
1431
|
+
const warnings = [
|
|
1432
|
+
...params.directoryState.missingDirs.map((dir) => `missing_directory:${dir}`),
|
|
1433
|
+
...params.normalizedSettingsReadWarnings,
|
|
1434
|
+
...params.settingWarnings,
|
|
1435
|
+
...params.normalizedItemReadWarnings,
|
|
1436
|
+
...params.telemetryCheck.warnings,
|
|
1437
|
+
...params.extensionCheck.warnings,
|
|
1438
|
+
...params.historyPolicyWarnings,
|
|
1439
|
+
...params.historySummary.warnings,
|
|
1440
|
+
...params.locksCheck.warnings,
|
|
1441
|
+
...params.integrityCheck.warnings,
|
|
1442
|
+
...params.historyDriftCheck.warnings,
|
|
1443
|
+
...params.vectorizationCheck.warnings,
|
|
1444
|
+
...params.directoryState.hookWarnings
|
|
1445
|
+
];
|
|
1446
|
+
return [...new Set(warnings)];
|
|
1447
|
+
}
|
|
1448
|
+
function extractHistoryDriftedCount(historyDriftCheck) {
|
|
1449
|
+
const counts = historyDriftCheck.check.details.counts;
|
|
1450
|
+
return typeof counts?.drifted === "number" ? counts.drifted : 0;
|
|
1451
|
+
}
|
|
1452
|
+
function buildHealthRemediationSources(params) {
|
|
1453
|
+
return {
|
|
1454
|
+
settings: params.normalizedSettingsReadWarnings,
|
|
1455
|
+
directories: params.directoryState.missingDirs.map((dir) => `missing_directory:${dir}`),
|
|
1456
|
+
settings_values: params.settingWarnings,
|
|
1457
|
+
telemetry: params.telemetryCheck.warnings,
|
|
1458
|
+
extensions: params.extensionCheck.warnings,
|
|
1459
|
+
storage: params.historySummary.over_threshold.map((id) => `history_stream_over_compact_threshold:${id}`),
|
|
1460
|
+
locks: params.locksCheck.warnings,
|
|
1461
|
+
integrity: params.integrityCheck.warnings,
|
|
1462
|
+
history_drift: params.historyDriftCheck.warnings,
|
|
1463
|
+
vectorization: params.vectorizationCheck.warnings
|
|
1464
|
+
};
|
|
1465
|
+
}
|
|
1466
|
+
function rewriteBulkHealthRemediation(params) {
|
|
1467
|
+
if (params.check.name === "history_drift" && params.historyDriftedCount > 1) {
|
|
1468
|
+
for (const code of Object.keys(params.remediationMap)) {
|
|
1469
|
+
params.remediationMap[code] = "pm history-repair --all";
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
if (params.check.name === "storage" && params.overThresholdCount > 1) {
|
|
1473
|
+
for (const code of Object.keys(params.remediationMap)) {
|
|
1474
|
+
params.remediationMap[code] = "pm history-compact --all-streams";
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
function attachHealthRemediationMaps(params) {
|
|
1479
|
+
for (const check of params.checks) {
|
|
1480
|
+
const remediationMap = buildRemediationMap(params.remediationSources[check.name]);
|
|
1481
|
+
rewriteBulkHealthRemediation({
|
|
1482
|
+
check,
|
|
1483
|
+
remediationMap,
|
|
1484
|
+
historyDriftedCount: params.historyDriftedCount,
|
|
1485
|
+
overThresholdCount: params.overThresholdCount
|
|
1486
|
+
});
|
|
1487
|
+
if (Object.keys(remediationMap).length > 0) {
|
|
1488
|
+
check.details = { ...check.details, remediation_map: remediationMap };
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
function projectHealthResult(result, options, summaryMode) {
|
|
1493
|
+
if (summaryMode) {
|
|
1494
|
+
return applySummaryHealthProjection(result);
|
|
1495
|
+
}
|
|
1496
|
+
return options.brief === true ? applyBriefHealthProjection(result) : result;
|
|
1497
|
+
}
|
|
1498
|
+
async function runHealth(global2, options = {}) {
|
|
1499
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
1500
|
+
const settingsPath = getSettingsPath(pmRoot);
|
|
1501
|
+
if (!await pathExists(settingsPath)) {
|
|
1502
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
1503
|
+
}
|
|
1504
|
+
const { settings, warnings: settingsReadWarnings } = await readSettingsWithMetadata(pmRoot);
|
|
1505
|
+
const normalizedSettingsReadWarnings = [...new Set(settingsReadWarnings)];
|
|
1506
|
+
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
1507
|
+
const strictDirectories = options.strictDirectories === true;
|
|
1508
|
+
const refreshPolicy = resolveVectorRefreshPolicy(options);
|
|
1509
|
+
const directoryState = await scanHealthDirectories(pmRoot, typeRegistry, strictDirectories);
|
|
1282
1510
|
const settingWarnings = validateSettingsValues(settings);
|
|
1283
1511
|
const telemetryCheck = await buildTelemetryCheck(settings, {
|
|
1284
1512
|
checkTelemetry: options.checkTelemetry === true
|
|
1285
1513
|
});
|
|
1286
1514
|
const extensionCheck = await buildExtensionCheck(pmRoot, settings, Boolean(global2.noExtensions));
|
|
1287
|
-
const
|
|
1288
|
-
const fastProjectionCheckOnly = options.checkOnly === true && (options.brief === true || options.summary === true) && options.full !== true;
|
|
1289
|
-
const skipIntegrity = (options.skipIntegrity === true || fastProjectionCheckOnly) && options.full !== true;
|
|
1290
|
-
const skipDrift = (options.skipDrift === true || fastProjectionCheckOnly) && options.full !== true;
|
|
1291
|
-
const skipVectors = (options.skipVectors === true || fastProjectionCheckOnly) && options.full !== true;
|
|
1515
|
+
const skipPolicy = resolveHealthSkipPolicy(options);
|
|
1292
1516
|
const itemReadWarnings = [];
|
|
1293
|
-
const items =
|
|
1517
|
+
const items = await readHealthItems({ pmRoot, settings, typeRegistry, skipPolicy, itemReadWarnings });
|
|
1294
1518
|
const itemsWithBody = items;
|
|
1295
1519
|
const normalizedItemReadWarnings = [...new Set(itemReadWarnings)];
|
|
1296
|
-
const historyPolicy = skipDrift ? { warnings: [] } : await enforceHistoryStreamPolicyForItems({
|
|
1520
|
+
const historyPolicy = skipPolicy.skipDrift ? { warnings: [] } : await enforceHistoryStreamPolicyForItems({
|
|
1297
1521
|
pmRoot,
|
|
1298
1522
|
settings,
|
|
1299
1523
|
itemIds: items.map((item) => item.id),
|
|
@@ -1301,110 +1525,52 @@ async function runHealth(global2, options = {}) {
|
|
|
1301
1525
|
});
|
|
1302
1526
|
const historySummary = await countHistoryStreams(pmRoot, settings.history.compact_policy);
|
|
1303
1527
|
const locksCheck = await buildLocksCheck(pmRoot);
|
|
1304
|
-
const integrityCheck = skipIntegrity ?
|
|
1305
|
-
const historyDriftCheck = skipDrift ?
|
|
1306
|
-
const vectorizationCheck = skipVectors ?
|
|
1528
|
+
const integrityCheck = skipPolicy.skipIntegrity ? buildSkippedHealthCheck("integrity") : await buildIntegrityCheck(pmRoot, typeRegistry.type_to_folder, settings.schema);
|
|
1529
|
+
const historyDriftCheck = skipPolicy.skipDrift ? buildSkippedHealthCheck("history_drift") : await buildHistoryDriftCheck(pmRoot, itemsWithBody);
|
|
1530
|
+
const vectorizationCheck = skipPolicy.skipVectors ? buildSkippedHealthCheck("vectorization") : await buildVectorizationCheck(pmRoot, settings, itemsWithBody, refreshPolicy, options.verboseStaleItems === true);
|
|
1307
1531
|
const checks = [
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
status: normalizedSettingsReadWarnings.length === 0 ? "ok" : "warn",
|
|
1312
|
-
details: {
|
|
1313
|
-
path: settingsPath,
|
|
1314
|
-
version: settings.version,
|
|
1315
|
-
id_prefix: settings.id_prefix,
|
|
1316
|
-
locks_ttl_seconds: settings.locks.ttl_seconds,
|
|
1317
|
-
warnings: normalizedSettingsReadWarnings
|
|
1318
|
-
}
|
|
1319
|
-
},
|
|
1320
|
-
{
|
|
1321
|
-
name: "directories",
|
|
1322
|
-
status: missingDirs.length === 0 ? "ok" : "warn",
|
|
1323
|
-
details: {
|
|
1324
|
-
required: requiredDirs,
|
|
1325
|
-
optional: optionalDirs,
|
|
1326
|
-
missing_required: missingRequiredDirs,
|
|
1327
|
-
missing_optional: missingOptionalDirs,
|
|
1328
|
-
missing: missingDirs,
|
|
1329
|
-
strict_directories: strictDirectories
|
|
1330
|
-
}
|
|
1331
|
-
},
|
|
1332
|
-
{
|
|
1333
|
-
name: "settings_values",
|
|
1334
|
-
status: settingWarnings.length === 0 ? "ok" : "warn",
|
|
1335
|
-
details: {
|
|
1336
|
-
warnings: settingWarnings
|
|
1337
|
-
}
|
|
1338
|
-
},
|
|
1532
|
+
buildSettingsHealthCheck(settingsPath, settings, normalizedSettingsReadWarnings),
|
|
1533
|
+
buildDirectoriesHealthCheck(directoryState, strictDirectories),
|
|
1534
|
+
buildSettingsValuesHealthCheck(settingWarnings),
|
|
1339
1535
|
telemetryCheck.check,
|
|
1340
1536
|
extensionCheck.check,
|
|
1341
|
-
|
|
1342
|
-
name: "storage",
|
|
1343
|
-
status: historySummary.over_threshold.length === 0 ? "ok" : "warn",
|
|
1344
|
-
details: {
|
|
1345
|
-
items: items.length,
|
|
1346
|
-
history_streams: historySummary.count,
|
|
1347
|
-
...historySummary.max_entries !== null ? {
|
|
1348
|
-
compact_policy: {
|
|
1349
|
-
enabled: settings.history.compact_policy.enabled,
|
|
1350
|
-
max_entries: historySummary.max_entries,
|
|
1351
|
-
trigger: settings.history.compact_policy.trigger,
|
|
1352
|
-
over_threshold_count: historySummary.over_threshold.length,
|
|
1353
|
-
over_threshold: historySummary.over_threshold
|
|
1354
|
-
}
|
|
1355
|
-
} : {}
|
|
1356
|
-
}
|
|
1357
|
-
},
|
|
1537
|
+
buildStorageHealthCheck(items, settings, historySummary),
|
|
1358
1538
|
locksCheck.check,
|
|
1359
1539
|
integrityCheck.check,
|
|
1360
1540
|
historyDriftCheck.check,
|
|
1361
1541
|
vectorizationCheck.check
|
|
1362
1542
|
];
|
|
1363
|
-
const
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
if (check.name === "history_drift" && historyDriftedCount > 1) {
|
|
1395
|
-
for (const code of Object.keys(remediationMap)) {
|
|
1396
|
-
remediationMap[code] = "pm history-repair --all";
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
if (check.name === "storage" && historySummary.over_threshold.length > 1) {
|
|
1400
|
-
for (const code of Object.keys(remediationMap)) {
|
|
1401
|
-
remediationMap[code] = "pm history-compact --all-streams";
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
if (Object.keys(remediationMap).length > 0) {
|
|
1405
|
-
check.details = { ...check.details, remediation_map: remediationMap };
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1543
|
+
const normalizedWarnings = collectHealthWarnings({
|
|
1544
|
+
directoryState,
|
|
1545
|
+
normalizedSettingsReadWarnings,
|
|
1546
|
+
settingWarnings,
|
|
1547
|
+
normalizedItemReadWarnings,
|
|
1548
|
+
telemetryCheck,
|
|
1549
|
+
extensionCheck,
|
|
1550
|
+
historyPolicyWarnings: historyPolicy.warnings,
|
|
1551
|
+
historySummary,
|
|
1552
|
+
locksCheck,
|
|
1553
|
+
integrityCheck,
|
|
1554
|
+
historyDriftCheck,
|
|
1555
|
+
vectorizationCheck
|
|
1556
|
+
});
|
|
1557
|
+
attachHealthRemediationMaps({
|
|
1558
|
+
checks,
|
|
1559
|
+
remediationSources: buildHealthRemediationSources({
|
|
1560
|
+
directoryState,
|
|
1561
|
+
normalizedSettingsReadWarnings,
|
|
1562
|
+
settingWarnings,
|
|
1563
|
+
telemetryCheck,
|
|
1564
|
+
extensionCheck,
|
|
1565
|
+
historySummary,
|
|
1566
|
+
locksCheck,
|
|
1567
|
+
integrityCheck,
|
|
1568
|
+
historyDriftCheck,
|
|
1569
|
+
vectorizationCheck
|
|
1570
|
+
}),
|
|
1571
|
+
historyDriftedCount: extractHistoryDriftedCount(historyDriftCheck),
|
|
1572
|
+
overThresholdCount: historySummary.over_threshold.length
|
|
1573
|
+
});
|
|
1408
1574
|
const blockingWarnings = normalizedWarnings.filter((warning) => !isAdvisoryHealthWarning(warning));
|
|
1409
1575
|
const result = {
|
|
1410
1576
|
ok: blockingWarnings.length === 0,
|
|
@@ -1412,14 +1578,12 @@ async function runHealth(global2, options = {}) {
|
|
|
1412
1578
|
warnings: normalizedWarnings,
|
|
1413
1579
|
generated_at: nowIso()
|
|
1414
1580
|
};
|
|
1415
|
-
|
|
1416
|
-
return applySummaryHealthProjection(result);
|
|
1417
|
-
}
|
|
1418
|
-
return options.brief === true ? applyBriefHealthProjection(result) : result;
|
|
1581
|
+
return projectHealthResult(result, options, skipPolicy.summaryMode);
|
|
1419
1582
|
}
|
|
1420
1583
|
var _testOnlyHealthCommand = {
|
|
1421
1584
|
buildExtensionHealthTriageSummary,
|
|
1422
1585
|
buildCapabilityContractMetadata,
|
|
1586
|
+
buildVectorizationProviderDetails,
|
|
1423
1587
|
collectUnknownCapabilityGuidance,
|
|
1424
1588
|
isAdvisoryHealthWarning,
|
|
1425
1589
|
isDirectory,
|
|
@@ -1441,4 +1605,4 @@ export {
|
|
|
1441
1605
|
_testOnlyHealthCommand,
|
|
1442
1606
|
runHealth
|
|
1443
1607
|
};
|
|
1444
|
-
//# sourceMappingURL=health-
|
|
1608
|
+
//# sourceMappingURL=health-TMFVNYRA.js.map
|