@unbrained/pm-cli 2026.7.14 → 2026.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +54 -0
- package/README.md +14 -11
- package/dist/cli/argv-utils.d.ts +1 -4
- package/dist/cli/argv-utils.js +3 -13
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.d.ts +6 -4
- package/dist/cli/bootstrap-args.js +51 -16
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/bundle-integrity.d.ts +49 -0
- package/dist/cli/bundle-integrity.js +111 -0
- package/dist/cli/bundle-integrity.js.map +1 -0
- package/dist/cli/commands/completion.js +7 -2
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +6 -163
- package/dist/cli/commands/config.js +4 -1133
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.d.ts +2 -4
- package/dist/cli/commands/context.js +10 -85
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +3 -2
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +2 -91
- package/dist/cli/commands/extension/describe.js +4 -142
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +2 -36
- package/dist/cli/commands/extension/scaffold.js +4 -2435
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +2 -28
- package/dist/cli/commands/extension/shared.js +4 -130
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +3 -400
- package/dist/cli/commands/extension.js +4 -2183
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +6 -56
- package/dist/cli/commands/gc.js +4 -270
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +18 -5
- package/dist/cli/commands/get.js +117 -58
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.d.ts +6 -184
- package/dist/cli/commands/health.js +4 -1747
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.d.ts +4 -139
- package/dist/cli/commands/history-compact.js +5 -510
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.d.ts +8 -120
- package/dist/cli/commands/history-redact.js +6 -581
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.d.ts +7 -89
- package/dist/cli/commands/history-repair.js +5 -257
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/history.d.ts +1 -2
- package/dist/cli/commands/history.js +6 -48
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +3 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.d.ts +6 -113
- package/dist/cli/commands/init-agent-guidance.js +4 -431
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.d.ts +6 -181
- package/dist/cli/commands/init.js +4 -690
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/next.js +3 -3
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/profile.d.ts +4 -174
- package/dist/cli/commands/profile.js +4 -425
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +4 -19
- package/dist/cli/commands/restore.js +9 -158
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +7 -507
- package/dist/cli/commands/schema.js +5 -1254
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/test.d.ts +2 -4
- package/dist/cli/commands/test.js +7 -97
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +9 -249
- package/dist/cli/commands/validate.js +9 -2150
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/extension-command-help.js +18 -4
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.js +3 -3
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/help-content.js +7 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +20 -30
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +4 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +11 -3
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +4 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +3 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +782 -0
- package/dist/cli-bundle/chunks/{append-PVZJDM6J.js → append-OJQFUQ4T.js} +5 -5
- package/dist/cli-bundle/chunks/append-UZVHUO74.js +11 -0
- package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js → chunk-2IFFUZLC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js → chunk-2JKGO6QX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js → chunk-2NCIPMQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js → chunk-2VPAVL7O.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js → chunk-2WSE6PO2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js → chunk-34L5OT3Y.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js → chunk-3AUGG2DP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js → chunk-3CLU2XZO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-N3CMP4NI.js → chunk-3S5QVM5H.js} +43 -7
- package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js +64 -0
- package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js → chunk-3WM75PWC.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-4223PVZT.js +121 -0
- package/dist/cli-bundle/chunks/chunk-4223PVZT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5URI7TPJ.js → chunk-4XQ3BDV4.js} +281 -164
- package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js → chunk-5JLUII3O.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-MKL4CP2I.js → chunk-5ZSLZLDN.js} +631 -246
- package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Q37E63AM.js → chunk-6CFNAVTF.js} +21 -141
- package/dist/cli-bundle/chunks/chunk-6CFNAVTF.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js → chunk-6N2VXVTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js → chunk-6S3YSUYG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZUKSZVBW.js → chunk-7B67ZL4N.js} +8 -7
- package/dist/cli-bundle/chunks/chunk-7B67ZL4N.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IA3YFTXT.js → chunk-7PIWCHTW.js} +11 -13
- package/dist/cli-bundle/chunks/chunk-7PIWCHTW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BPD26E3P.js → chunk-7Z4LKRS4.js} +291 -81
- package/dist/cli-bundle/chunks/chunk-7Z4LKRS4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js → chunk-AHVTB5I5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js → chunk-APRVSW2O.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js → chunk-B7PE22W6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js → chunk-BCOFWYW4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js → chunk-BEP7WJA2.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js +1114 -0
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js → chunk-BSEQUTQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js.map → chunk-BSEQUTQP.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js → chunk-CRVF2JDM.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js → chunk-DM4H7FP4.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-DUT67M43.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-44LNIULG.js → chunk-DYH63FX7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LWTIRS3Y.js → chunk-E2OJMKML.js} +306 -82
- package/dist/cli-bundle/chunks/chunk-E2OJMKML.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js → chunk-EAB64KLB.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js → chunk-EACOH7AU.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js → chunk-EH2OPHBI.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js.map → chunk-EH2OPHBI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js → chunk-EJEXHTY5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js → chunk-EYLCSJAI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-655STMGA.js → chunk-FMBNM2EN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js → chunk-FNSPG7MU.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-5CT5BW6E.js → chunk-GM5QHQU6.js} +46 -40
- package/dist/cli-bundle/chunks/chunk-GM5QHQU6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FTQLW4JD.js → chunk-GOSLKLFE.js} +418 -24
- package/dist/cli-bundle/chunks/chunk-GOSLKLFE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KB726FMH.js → chunk-H2Z3FYXQ.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js +162 -0
- package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2QIQGYPW.js → chunk-H5APFTHZ.js} +53 -10
- package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js +118 -0
- package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZAYYDNB3.js → chunk-HO4KXD6I.js} +22 -142
- package/dist/cli-bundle/chunks/chunk-HO4KXD6I.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js → chunk-HYB5AZ63.js} +203 -62
- package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js.map → chunk-HYB5AZ63.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js → chunk-IA5FKNII.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JL7WZ4O2.js → chunk-IG3SWA4A.js} +33 -9
- package/dist/cli-bundle/chunks/chunk-IG3SWA4A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js → chunk-IJIICKVW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IGED7NH2.js → chunk-ILX33QXL.js} +668 -251
- package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UGTVWL3E.js → chunk-INU6DKT5.js} +47 -41
- package/dist/cli-bundle/chunks/chunk-INU6DKT5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UB2QYSTO.js → chunk-J5AOEGDC.js} +26 -18
- package/dist/cli-bundle/chunks/chunk-J5AOEGDC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4DY4KPQI.js → chunk-J6364LFM.js} +1330 -937
- package/dist/cli-bundle/chunks/chunk-J6364LFM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DVOLZJ3C.js → chunk-J6EY5V4N.js} +1295 -939
- package/dist/cli-bundle/chunks/chunk-J6EY5V4N.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js +1097 -0
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js → chunk-JOUQZENX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-J4NZOP3I.js → chunk-JXQUXVMI.js} +9 -8
- package/dist/cli-bundle/chunks/chunk-JXQUXVMI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js → chunk-JYFOV7FC.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js → chunk-K2X6U4UA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6OTZMORS.js → chunk-K3WII2ME.js} +27 -27
- package/dist/cli-bundle/chunks/chunk-K3WII2ME.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js → chunk-KG44YSKD.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js → chunk-KPMKHGEA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QASRVKUQ.js → chunk-LPYWLWDS.js} +257 -163
- package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RGXD5JJR.js → chunk-LSG2U345.js} +19 -12
- package/dist/cli-bundle/chunks/chunk-LSG2U345.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MIQDDLB5.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js → chunk-NLDFBC6J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js → chunk-NP22ERDF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js → chunk-NU3IMIEA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js → chunk-NVPZIJVR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js → chunk-ODALILG3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CDJYP7OQ.js → chunk-ONG5V5CI.js} +190 -63
- package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js → chunk-ONREO4ST.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js +61 -0
- package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js → chunk-P74IZQ7A.js} +12 -12
- package/dist/cli-bundle/chunks/chunk-PENXZX3U.js +172 -0
- package/dist/cli-bundle/chunks/chunk-PENXZX3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js → chunk-PGY23YTC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js → chunk-PMOSXADO.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-PNTULOGU.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js → chunk-Q7A43DS4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js → chunk-QEHQ2GVG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js → chunk-QIPLHNP7.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js → chunk-QKECXBBG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js.map → chunk-QKECXBBG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js → chunk-QKJGPFAF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-F7PSHRNO.js → chunk-QKXHFPYM.js} +27 -10
- package/dist/cli-bundle/chunks/chunk-QKXHFPYM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js → chunk-RLCHOOHC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js → chunk-RMLWNPH2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js → chunk-RRM5JYJC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js → chunk-S6MQESFR.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js → chunk-SDQLJWBO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js → chunk-SELVXEZK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DYEX6NFH.js → chunk-TD3LVC7D.js} +438 -23
- package/dist/cli-bundle/chunks/chunk-TD3LVC7D.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js → chunk-TKOVBP6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js → chunk-TQSZFPIS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js → chunk-TSMHDIW4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js → chunk-UFXU44HV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js → chunk-ULTHRDBP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js → chunk-UMOPHQSU.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js.map → chunk-UMOPHQSU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js → chunk-UOHFKBUV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-PHKP3AGR.js → chunk-UWQHLMEB.js} +35 -18
- package/dist/cli-bundle/chunks/chunk-UWQHLMEB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6TTOHMTB.js → chunk-UXONS674.js} +45 -112
- package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js → chunk-UY2ACEMF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-6PKA3SJQ.js → chunk-WQPUU7XD.js} +19 -28
- package/dist/cli-bundle/chunks/chunk-WQPUU7XD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7TQMR6LK.js → chunk-WT3ZEOGH.js} +70 -20
- package/dist/cli-bundle/chunks/chunk-WT3ZEOGH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js → chunk-WUJQK4YV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js → chunk-XSJUSQAE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6MHSBDGD.js → chunk-XXXF6PAQ.js} +50 -117
- package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js → chunk-YAQEBNY7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7QDSYUMF.js → chunk-YAROI3PD.js} +44 -21
- package/dist/cli-bundle/chunks/chunk-YAROI3PD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js → chunk-YBLZ2VE7.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js → chunk-YCQET3OT.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-YUSOJDWM.js +9 -0
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +58 -0
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js → chunk-ZI6VQWQ7.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +68 -0
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-LZECOMHO.js → close-CWODTPKG.js} +5 -5
- package/dist/cli-bundle/chunks/close-W6LI2PKM.js +12 -0
- package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js → close-many-CQFUY7MR.js} +15 -13
- package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +23 -0
- package/dist/cli-bundle/chunks/comments-E3TNTK24.js +13 -0
- package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js → comments-WGLHR7LB.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js → copy-LXVDXH7B.js} +4 -4
- package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +9 -0
- package/dist/cli-bundle/chunks/{create-F53OBTOU.js → create-J5U6ND4K.js} +9 -9
- package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js → create-LBVCYMEG.js} +9 -9
- package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js → delete-PMJBNY5G.js} +4 -4
- package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +10 -0
- package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js → deps-JZ7TMVCB.js} +7 -4
- package/dist/cli-bundle/chunks/{deps-U57I7EAK.js → deps-OA26IS25.js} +7 -4
- package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js → docs-FEWB2DQB.js} +6 -6
- package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +14 -0
- package/dist/cli-bundle/chunks/{files-TBZD7V6H.js → files-6YFBJRBG.js} +6 -6
- package/dist/cli-bundle/chunks/{files-TTY6N2AV.js → files-EFIWKFTM.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js → focus-4QJR7FOQ.js} +5 -5
- package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +10 -0
- package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js → history-compact-CKRPDTJN.js} +6 -10
- package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +16 -0
- package/dist/cli-bundle/chunks/history-redact-BB3TGDAE.js +15 -0
- package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js → history-redact-D225BHOZ.js} +5 -6
- package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +16 -0
- package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js → history-repair-RQXKQHL4.js} +6 -8
- package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js → learnings-JLNLCOL5.js} +7 -7
- package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +13 -0
- package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +13 -0
- package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js → notes-GB47XXQQ.js} +7 -7
- package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +24 -0
- package/dist/cli-bundle/chunks/{plan-2NNEO46V.js → plan-VDCJ2PCN.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js → profile-FAU7NZML.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-U725ATWZ.js → profile-IVXQEL3D.js} +10 -10
- package/dist/cli-bundle/chunks/{register-list-query-BUWCYHBT.js → register-list-query-DKA3EH5D.js} +22 -19
- package/dist/cli-bundle/chunks/register-list-query-DKA3EH5D.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-KTZ6AGE7.js → register-list-query-UL4UKBBN.js} +23 -20
- package/dist/cli-bundle/chunks/register-list-query-UL4UKBBN.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js → register-mutation-ARFHRW55.js} +36 -32
- package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js.map → register-mutation-ARFHRW55.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-4FMGJJF7.js → register-mutation-RBBJ52DK.js} +37 -33
- package/dist/cli-bundle/chunks/register-mutation-RBBJ52DK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js → register-operations-ZIBBRSED.js} +41 -39
- package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js.map → register-operations-ZIBBRSED.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js → register-operations-ZUJ5JWPE.js} +39 -37
- package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js.map → register-operations-ZUJ5JWPE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js → register-setup-BCVLFEYS.js} +29 -17
- package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js.map → register-setup-BCVLFEYS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js → register-setup-TDCGWIOS.js} +19 -18
- package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js.map → register-setup-TDCGWIOS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js → restore-25DLT2Q2.js} +6 -6
- package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +14 -0
- package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js → schema-FNU3WE4O.js} +7 -6
- package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js → schema-NBCM3RAD.js} +7 -6
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js +21 -0
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-Q3UCILNR.js → update-XHSIAIXE.js} +12 -12
- package/dist/cli-bundle/chunks/update-XHSIAIXE.js.map +1 -0
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +32 -0
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +36 -0
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js.map +1 -0
- package/dist/cli-bundle/main.js +826 -43
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/cli-bundle/sdk-runtime.js +70 -57
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +876 -74
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/cli.js +5 -4
- package/dist/cli.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +12 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/history/projection.d.ts +39 -0
- package/dist/core/history/projection.js +164 -0
- package/dist/core/history/projection.js.map +1 -0
- package/dist/core/history/read.d.ts +3 -0
- package/dist/core/history/read.js +55 -0
- package/dist/core/history/read.js.map +1 -0
- package/dist/core/output/output-control.d.ts +18 -0
- package/dist/core/output/output-control.js +26 -0
- package/dist/core/output/output-control.js.map +1 -0
- package/dist/core/output/output.js +20 -8
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/sentry/helpers.js +10 -2
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/shared/command-types.d.ts +2 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/command-types.js.map +1 -1
- package/dist/core/shared/errors.d.ts +11 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -2
- package/dist/mcp/tool-definitions.js +5 -5
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/author-attribution.d.ts +35 -0
- package/dist/sdk/author-attribution.js +118 -0
- package/dist/sdk/author-attribution.js.map +1 -0
- package/dist/sdk/cli-contracts/command-aliases.d.ts +7 -0
- package/dist/sdk/cli-contracts/command-aliases.js +17 -0
- package/dist/sdk/cli-contracts/command-aliases.js.map +1 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +6 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +21 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +3 -3
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts.js +3 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/cli-program.d.ts +8 -0
- package/dist/sdk/cli-program.js +39 -0
- package/dist/sdk/cli-program.js.map +1 -0
- package/dist/sdk/command-line.d.ts +11 -0
- package/dist/sdk/command-line.js +40 -0
- package/dist/sdk/command-line.js.map +1 -0
- package/dist/sdk/config.d.ts +163 -0
- package/dist/sdk/config.js +1087 -0
- package/dist/sdk/config.js.map +1 -0
- package/dist/sdk/context-relevance.d.ts +21 -0
- package/dist/sdk/context-relevance.js +70 -2
- package/dist/sdk/context-relevance.js.map +1 -1
- package/dist/sdk/dependencies.d.ts +15 -2
- package/dist/sdk/dependencies.js +97 -8
- package/dist/sdk/dependencies.js.map +1 -1
- package/dist/{cli/commands → sdk}/extension/bundled-catalog.d.ts +1 -1
- package/dist/{cli/commands → sdk}/extension/bundled-catalog.js +12 -12
- package/dist/sdk/extension/bundled-catalog.js.map +1 -0
- package/dist/sdk/extension/concurrency.d.ts +7 -0
- package/dist/sdk/extension/concurrency.js +26 -0
- package/dist/sdk/extension/concurrency.js.map +1 -0
- package/dist/sdk/extension/describe.d.ts +91 -0
- package/dist/sdk/extension/describe.js +144 -0
- package/dist/sdk/extension/describe.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/doctor.d.ts +3 -3
- package/dist/{cli/commands → sdk}/extension/doctor.js +7 -7
- package/dist/sdk/extension/doctor.js.map +1 -0
- package/dist/sdk/extension/install-runtime.d.ts +26 -0
- package/dist/sdk/extension/install-runtime.js +269 -0
- package/dist/sdk/extension/install-runtime.js.map +1 -0
- package/dist/sdk/extension/install-snapshot.d.ts +23 -0
- package/dist/sdk/extension/install-snapshot.js +66 -0
- package/dist/sdk/extension/install-snapshot.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/install-sources.d.ts +3 -3
- package/dist/{cli/commands → sdk}/extension/install-sources.js +15 -12
- package/dist/sdk/extension/install-sources.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/managed-state.js +6 -6
- package/dist/sdk/extension/managed-state.js.map +1 -0
- package/dist/sdk/extension/scaffold.d.ts +36 -0
- package/dist/sdk/extension/scaffold.js +2436 -0
- package/dist/sdk/extension/scaffold.js.map +1 -0
- package/dist/sdk/extension/shared.d.ts +28 -0
- package/dist/sdk/extension/shared.js +140 -0
- package/dist/sdk/extension/shared.js.map +1 -0
- package/dist/sdk/extension/update-check.d.ts +15 -0
- package/dist/sdk/extension/update-check.js +68 -0
- package/dist/sdk/extension/update-check.js.map +1 -0
- package/dist/sdk/extension.d.ts +367 -0
- package/dist/sdk/extension.js +2174 -0
- package/dist/sdk/extension.js.map +1 -0
- package/dist/sdk/governance/gc.d.ts +56 -0
- package/dist/sdk/governance/gc.js +276 -0
- package/dist/sdk/governance/gc.js.map +1 -0
- package/dist/sdk/governance/health.d.ts +187 -0
- package/dist/sdk/governance/health.js +1796 -0
- package/dist/sdk/governance/health.js.map +1 -0
- package/dist/sdk/governance/validate.d.ts +255 -0
- package/dist/sdk/governance/validate.js +2175 -0
- package/dist/sdk/governance/validate.js.map +1 -0
- package/dist/sdk/history-compact.d.ts +142 -0
- package/dist/sdk/history-compact.js +508 -0
- package/dist/sdk/history-compact.js.map +1 -0
- package/dist/sdk/history-mcp.d.ts +17 -0
- package/dist/sdk/history-mcp.js +68 -0
- package/dist/sdk/history-mcp.js.map +1 -0
- package/dist/sdk/history-read.d.ts +31 -0
- package/dist/sdk/history-read.js +58 -0
- package/dist/sdk/history-read.js.map +1 -0
- package/dist/sdk/history-redact.d.ts +120 -0
- package/dist/sdk/history-redact.js +577 -0
- package/dist/sdk/history-redact.js.map +1 -0
- package/dist/sdk/history-repair.d.ts +89 -0
- package/dist/sdk/history-repair.js +263 -0
- package/dist/sdk/history-repair.js.map +1 -0
- package/dist/sdk/index.d.ts +25 -1
- package/dist/sdk/index.js +27 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/init-agent-guidance.d.ts +113 -0
- package/dist/sdk/init-agent-guidance.js +437 -0
- package/dist/sdk/init-agent-guidance.js.map +1 -0
- package/dist/sdk/init.d.ts +186 -0
- package/dist/sdk/init.js +733 -0
- package/dist/sdk/init.js.map +1 -0
- package/dist/sdk/invocation-author.d.ts +2 -0
- package/dist/sdk/invocation-author.js +39 -0
- package/dist/sdk/invocation-author.js.map +1 -0
- package/dist/sdk/item-children.d.ts +45 -0
- package/dist/sdk/item-children.js +75 -0
- package/dist/sdk/item-children.js.map +1 -0
- package/dist/sdk/item-schedule.d.ts +26 -0
- package/dist/sdk/item-schedule.js +28 -0
- package/dist/sdk/item-schedule.js.map +1 -0
- package/dist/sdk/output.d.ts +7 -0
- package/dist/sdk/output.js +11 -0
- package/dist/sdk/output.js.map +1 -0
- package/dist/sdk/pagination.d.ts +4 -1
- package/dist/sdk/pagination.js +13 -5
- package/dist/sdk/pagination.js.map +1 -1
- package/dist/sdk/profile.d.ts +176 -0
- package/dist/sdk/profile.js +431 -0
- package/dist/sdk/profile.js.map +1 -0
- package/dist/sdk/relationship-analytics.d.ts +108 -0
- package/dist/sdk/relationship-analytics.js +292 -0
- package/dist/sdk/relationship-analytics.js.map +1 -0
- package/dist/sdk/relationship-context.d.ts +67 -0
- package/dist/sdk/relationship-context.js +207 -0
- package/dist/sdk/relationship-context.js.map +1 -0
- package/dist/sdk/relationship-history.d.ts +109 -0
- package/dist/sdk/relationship-history.js +401 -0
- package/dist/sdk/relationship-history.js.map +1 -0
- package/dist/sdk/relationships.d.ts +145 -0
- package/dist/sdk/relationships.js +551 -0
- package/dist/sdk/relationships.js.map +1 -0
- package/dist/sdk/runtime-input.d.ts +10 -0
- package/dist/sdk/runtime-input.js +60 -0
- package/dist/sdk/runtime-input.js.map +1 -0
- package/dist/sdk/runtime.d.ts +31 -8
- package/dist/sdk/runtime.js +61 -57
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/schema.d.ts +507 -0
- package/dist/sdk/schema.js +1269 -0
- package/dist/sdk/schema.js.map +1 -0
- package/dist/{cli/commands → sdk}/templates.d.ts +1 -1
- package/dist/{cli/commands → sdk}/templates.js +9 -9
- package/dist/sdk/templates.js.map +1 -0
- package/dist/{cli/commands → sdk}/test/linked-command-detection.d.ts +10 -2
- package/dist/sdk/test/linked-command-detection.js +525 -0
- package/dist/sdk/test/linked-command-detection.js.map +1 -0
- package/docs/COMMANDS.md +58 -40
- package/docs/EXTENSIONS.md +10 -1
- package/docs/RELATIONSHIP_GRAPH.md +113 -0
- package/docs/RELEASING.md +2 -0
- package/docs/SDK.md +156 -9
- package/docs/SDK_CUSTOMIZATION_PRIMITIVES.md +79 -0
- package/marketplace.json +2 -2
- package/package.json +3 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +76 -16
- package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +8 -0
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/bundle-cli.mjs +66 -23
- package/dist/cli/commands/extension/bundled-catalog.js.map +0 -1
- package/dist/cli/commands/extension/doctor.js.map +0 -1
- package/dist/cli/commands/extension/install-sources.js.map +0 -1
- package/dist/cli/commands/extension/managed-state.js.map +0 -1
- package/dist/cli/commands/templates.js.map +0 -1
- package/dist/cli/commands/test/linked-command-detection.js +0 -248
- package/dist/cli/commands/test/linked-command-detection.js.map +0 -1
- package/dist/cli-bundle/chunks/append-DYQWQK2J.js +0 -11
- package/dist/cli-bundle/chunks/chunk-2GA3NK35.js +0 -530
- package/dist/cli-bundle/chunks/chunk-2GA3NK35.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2QIQGYPW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4DY4KPQI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4WREH7RT.js +0 -554
- package/dist/cli-bundle/chunks/chunk-4WREH7RT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5CT5BW6E.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5URI7TPJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6MHSBDGD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6OTZMORS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6PKA3SJQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6TTOHMTB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7QDSYUMF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7TQMR6LK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js +0 -312
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BPD26E3P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CDJYP7OQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js +0 -858
- package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DVOLZJ3C.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DYEX6NFH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-F7PSHRNO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js +0 -875
- package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FTQLW4JD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IA3YFTXT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IGED7NH2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-J4NZOP3I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JL7WZ4O2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js +0 -309
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LWTIRS3Y.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MKL4CP2I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N3CMP4NI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PHKP3AGR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Q37E63AM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QASRVKUQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RGXD5JJR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UB2QYSTO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UGTVWL3E.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZAYYDNB3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZUKSZVBW.js.map +0 -7
- package/dist/cli-bundle/chunks/close-RI4JQQHU.js +0 -12
- package/dist/cli-bundle/chunks/close-many-LY2XJ52M.js +0 -21
- package/dist/cli-bundle/chunks/comments-35M273DN.js +0 -13
- package/dist/cli-bundle/chunks/copy-NPYM7M7U.js +0 -9
- package/dist/cli-bundle/chunks/delete-ODRWJWAM.js +0 -10
- package/dist/cli-bundle/chunks/docs-G7N4E2JO.js +0 -14
- package/dist/cli-bundle/chunks/focus-U5TRVCRS.js +0 -10
- package/dist/cli-bundle/chunks/history-compact-M7GHYVFN.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-JIHZLHDP.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-NAFCHLH7.js +0 -18
- package/dist/cli-bundle/chunks/learnings-SONGPSHI.js +0 -13
- package/dist/cli-bundle/chunks/notes-BSD53H2W.js +0 -13
- package/dist/cli-bundle/chunks/plan-AWLYGBNV.js +0 -24
- package/dist/cli-bundle/chunks/register-list-query-BUWCYHBT.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-KTZ6AGE7.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-4FMGJJF7.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-66GLMHIX.js +0 -14
- package/dist/cli-bundle/chunks/update-2XGHIVQ2.js +0 -21
- package/dist/cli-bundle/chunks/update-many-75K57FS3.js +0 -34
- package/dist/cli-bundle/chunks/update-many-U42YA445.js +0 -30
- /package/dist/cli-bundle/chunks/{append-PVZJDM6J.js.map → append-OJQFUQ4T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-DYQWQK2J.js.map → append-UZVHUO74.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js.map → chunk-2IFFUZLC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js.map → chunk-2JKGO6QX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js.map → chunk-2NCIPMQP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js.map → chunk-2VPAVL7O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js.map → chunk-2WSE6PO2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js.map → chunk-34L5OT3Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js.map → chunk-3AUGG2DP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js.map → chunk-3CLU2XZO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js.map → chunk-3WM75PWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js.map → chunk-5JLUII3O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js.map → chunk-6N2VXVTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js.map → chunk-6S3YSUYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js.map → chunk-AHVTB5I5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js.map → chunk-APRVSW2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js.map → chunk-B7PE22W6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js.map → chunk-BCOFWYW4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js.map → chunk-BEP7WJA2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js.map → chunk-CRVF2JDM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js.map → chunk-DM4H7FP4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-LZECOMHO.js.map → chunk-DUT67M43.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-44LNIULG.js.map → chunk-DYH63FX7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js.map → chunk-EAB64KLB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js.map → chunk-EACOH7AU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js.map → chunk-EJEXHTY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js.map → chunk-EYLCSJAI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-655STMGA.js.map → chunk-FMBNM2EN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js.map → chunk-FNSPG7MU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KB726FMH.js.map → chunk-H2Z3FYXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js.map → chunk-IA5FKNII.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js.map → chunk-IJIICKVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js.map → chunk-JOUQZENX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js.map → chunk-JYFOV7FC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js.map → chunk-K2X6U4UA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js.map → chunk-KG44YSKD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js.map → chunk-KPMKHGEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js.map → chunk-MIQDDLB5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js.map → chunk-NLDFBC6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js.map → chunk-NP22ERDF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js.map → chunk-NU3IMIEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js.map → chunk-NVPZIJVR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js.map → chunk-ODALILG3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js.map → chunk-ONREO4ST.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js.map → chunk-P74IZQ7A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js.map → chunk-PGY23YTC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js.map → chunk-PMOSXADO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-RI4JQQHU.js.map → chunk-PNTULOGU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js.map → chunk-Q7A43DS4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js.map → chunk-QEHQ2GVG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js.map → chunk-QIPLHNP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js.map → chunk-QKJGPFAF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js.map → chunk-RLCHOOHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js.map → chunk-RMLWNPH2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js.map → chunk-RRM5JYJC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js.map → chunk-S6MQESFR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js.map → chunk-SDQLJWBO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js.map → chunk-SELVXEZK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js.map → chunk-TKOVBP6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js.map → chunk-TQSZFPIS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js.map → chunk-TSMHDIW4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js.map → chunk-UFXU44HV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js.map → chunk-ULTHRDBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js.map → chunk-UOHFKBUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js.map → chunk-UY2ACEMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js.map → chunk-WUJQK4YV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js.map → chunk-XSJUSQAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js.map → chunk-YAQEBNY7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js.map → chunk-YBLZ2VE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js.map → chunk-YCQET3OT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-LY2XJ52M.js.map → chunk-YUSOJDWM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js.map → chunk-ZI6VQWQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js.map → close-CWODTPKG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-35M273DN.js.map → close-W6LI2PKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js.map → close-many-CQFUY7MR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NPYM7M7U.js.map → close-many-DLDDVSH5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-F53OBTOU.js.map → comments-E3TNTK24.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js.map → comments-WGLHR7LB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js.map → copy-LXVDXH7B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ODRWJWAM.js.map → copy-Q5ZJPUKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-U57I7EAK.js.map → create-J5U6ND4K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js.map → create-LBVCYMEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js.map → delete-PMJBNY5G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-G7N4E2JO.js.map → delete-WNHB3LYW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-TTY6N2AV.js.map → deps-JZ7TMVCB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-TBZD7V6H.js.map → deps-OA26IS25.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js.map → docs-FEWB2DQB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-U5TRVCRS.js.map → docs-HA2AIDBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-M7GHYVFN.js.map → files-6YFBJRBG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js.map → files-EFIWKFTM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js.map → focus-4QJR7FOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-JIHZLHDP.js.map → focus-POIW5LTJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js.map → history-compact-CKRPDTJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-NAFCHLH7.js.map → history-compact-FWG2C7FZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-SONGPSHI.js.map → history-redact-BB3TGDAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js.map → history-redact-D225BHOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-BSD53H2W.js.map → history-repair-6GEAM7HE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js.map → history-repair-RQXKQHL4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-2NNEO46V.js.map → learnings-JLNLCOL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-AWLYGBNV.js.map → learnings-RSNLSWDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-U725ATWZ.js.map → notes-2WDH6DXU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js.map → notes-GB47XXQQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-66GLMHIX.js.map → plan-DOVI2VMW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js.map → plan-VDCJ2PCN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js.map → profile-FAU7NZML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js.map → profile-IVXQEL3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-Q3UCILNR.js.map → restore-25DLT2Q2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-2XGHIVQ2.js.map → restore-YPMVUUEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-75K57FS3.js.map → schema-FNU3WE4O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-U42YA445.js.map → schema-NBCM3RAD.js.map} +0 -0
- /package/dist/{cli/commands → sdk}/extension/managed-state.d.ts +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
EXIT_CODE,
|
|
5
5
|
PmCliError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QKECXBBG.js";
|
|
7
7
|
|
|
8
8
|
// dist/core/item/parse.js
|
|
9
9
|
var STDIN_TOKEN = "-";
|
|
@@ -360,6 +360,6 @@ export {
|
|
|
360
360
|
parseOptionalNumber,
|
|
361
361
|
parseOptionalNonNegativeInteger
|
|
362
362
|
};
|
|
363
|
-
//# sourceMappingURL=chunk-
|
|
363
|
+
//# sourceMappingURL=chunk-EJEXHTY5.js.map
|
|
364
364
|
|
|
365
365
|
//# debugId=68569312-3748-55db-9193-5c3ba2955385
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collectUsedExtensionCapabilities,
|
|
3
3
|
normalizeExtensionName
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BSEQUTQP.js";
|
|
5
5
|
|
|
6
6
|
// dist/core/extensions/activation-summary.js
|
|
7
7
|
!(function() {
|
|
@@ -157,4 +157,4 @@ export {
|
|
|
157
157
|
describeExtensionActivation,
|
|
158
158
|
renderExtensionSurfaceMarkdown
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-EYLCSJAI.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
parseAnnotationTextInput,
|
|
3
3
|
resolveAnnotationInput,
|
|
4
4
|
runAnnotationCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QIPLHNP7.js";
|
|
6
6
|
|
|
7
7
|
// dist/cli/commands/notes.js
|
|
8
8
|
!(function() {
|
|
@@ -35,4 +35,4 @@ async function runNotes(id, options, global2) {
|
|
|
35
35
|
export {
|
|
36
36
|
runNotes
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-FMBNM2EN.js.map
|
|
@@ -3,29 +3,29 @@ import {
|
|
|
3
3
|
loadMutationCheckpoint,
|
|
4
4
|
restoreCheckpointItems,
|
|
5
5
|
writeMutationCheckpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UOHFKBUV.js";
|
|
7
7
|
import {
|
|
8
8
|
runRestore
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
runClose
|
|
12
|
-
} from "./chunk-DRNJPEPQ.js";
|
|
13
|
-
import {
|
|
14
|
-
resolveAuthor
|
|
15
|
-
} from "./chunk-YRYYFGV3.js";
|
|
9
|
+
} from "./chunk-6CFNAVTF.js";
|
|
16
10
|
import {
|
|
17
11
|
hasListFilters
|
|
18
12
|
} from "./chunk-KWYX6ZIR.js";
|
|
19
13
|
import {
|
|
20
14
|
runList
|
|
21
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XXXF6PAQ.js";
|
|
16
|
+
import {
|
|
17
|
+
resolveAuthor
|
|
18
|
+
} from "./chunk-YRYYFGV3.js";
|
|
19
|
+
import {
|
|
20
|
+
runClose
|
|
21
|
+
} from "./chunk-2WSE6PO2.js";
|
|
22
22
|
import {
|
|
23
23
|
getActiveExtensionRegistrations,
|
|
24
24
|
isTerminalStatus,
|
|
25
25
|
listAllItemMetadataLight,
|
|
26
26
|
nowIso,
|
|
27
27
|
readSettings
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-XSJUSQAE.js";
|
|
29
29
|
import {
|
|
30
30
|
EXIT_CODE,
|
|
31
31
|
PmCliError,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
resolvePmRoot,
|
|
36
36
|
resolveRuntimeStatusRegistry,
|
|
37
37
|
toErrorMessage
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-BSEQUTQP.js";
|
|
39
39
|
|
|
40
40
|
// dist/cli/commands/close-many.js
|
|
41
41
|
!(function() {
|
|
@@ -404,4 +404,4 @@ export {
|
|
|
404
404
|
runCloseMany,
|
|
405
405
|
_testOnly
|
|
406
406
|
};
|
|
407
|
-
//# sourceMappingURL=chunk-
|
|
407
|
+
//# sourceMappingURL=chunk-FNSPG7MU.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
serializeStatusDefsFile,
|
|
17
17
|
upsertField,
|
|
18
18
|
upsertStatusDef
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-APRVSW2O.js";
|
|
20
20
|
import {
|
|
21
21
|
assertAliasesAvailable,
|
|
22
22
|
assertTypeFolderAvailable,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
removeItemType,
|
|
28
28
|
serializeItemTypesFile,
|
|
29
29
|
upsertItemType
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-SELVXEZK.js";
|
|
31
31
|
import {
|
|
32
32
|
acquireLock,
|
|
33
33
|
getActiveExtensionRegistrations,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
readSettings,
|
|
37
37
|
resolveGovernanceKnobs,
|
|
38
38
|
runActiveOnWriteHooks
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-XSJUSQAE.js";
|
|
40
40
|
import {
|
|
41
41
|
DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
|
|
42
42
|
EXIT_CODE,
|
|
@@ -52,9 +52,9 @@ import {
|
|
|
52
52
|
resolveRuntimeStatusRegistry,
|
|
53
53
|
toDefaultFolder,
|
|
54
54
|
writeFileAtomic
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-BSEQUTQP.js";
|
|
56
56
|
|
|
57
|
-
// dist/
|
|
57
|
+
// dist/sdk/schema.js
|
|
58
58
|
import path from "node:path";
|
|
59
59
|
import { mkdir } from "node:fs/promises";
|
|
60
60
|
|
|
@@ -122,11 +122,11 @@ function inferTypesFromTitles(titles, options = {}) {
|
|
|
122
122
|
return candidates;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
// dist/
|
|
125
|
+
// dist/sdk/schema.js
|
|
126
126
|
!(function() {
|
|
127
127
|
try {
|
|
128
128
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
129
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
129
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "4eb695d7-ffb7-516f-a936-202bed91dbd7");
|
|
130
130
|
} catch (e2) {
|
|
131
131
|
}
|
|
132
132
|
})();
|
|
@@ -154,9 +154,7 @@ function toAuthor(candidate, defaultAuthor) {
|
|
|
154
154
|
}
|
|
155
155
|
async function runSchemaAddType(name, options, global2) {
|
|
156
156
|
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
157
|
-
|
|
158
|
-
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
159
|
-
}
|
|
157
|
+
await ensureInitialized(pmRoot);
|
|
160
158
|
let normalized;
|
|
161
159
|
try {
|
|
162
160
|
normalized = normalizeAddTypeInput({
|
|
@@ -222,7 +220,7 @@ async function runSchemaAddType(name, options, global2) {
|
|
|
222
220
|
path: typesPath,
|
|
223
221
|
definitions: upsert.file.definitions.length
|
|
224
222
|
},
|
|
225
|
-
warnings:
|
|
223
|
+
warnings: finalizeWarnings(warnings),
|
|
226
224
|
generated_at: nowIso()
|
|
227
225
|
};
|
|
228
226
|
}
|
|
@@ -231,6 +229,9 @@ async function ensureInitialized(pmRoot) {
|
|
|
231
229
|
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
232
230
|
}
|
|
233
231
|
}
|
|
232
|
+
function finalizeWarnings(warnings) {
|
|
233
|
+
return [...new Set(warnings)].sort((left, right) => left.localeCompare(right));
|
|
234
|
+
}
|
|
234
235
|
async function countItemsUsingType(pmRoot, settings, schema, typeName) {
|
|
235
236
|
const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
236
237
|
const lowerName = typeName.trim().toLowerCase();
|
|
@@ -248,6 +249,19 @@ async function countItemsUsingStatus(pmRoot, settings, schema, statusId) {
|
|
|
248
249
|
return resolved === normalizedId;
|
|
249
250
|
}).length;
|
|
250
251
|
}
|
|
252
|
+
async function appendRemovedStatusWarnings(warnings, pmRoot, settings, schema, removedId) {
|
|
253
|
+
if (removedId.length === 0 || BUILTIN_STATUS_IDS.has(removedId)) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const usingStatus = await countItemsUsingStatus(pmRoot, settings, schema, removedId);
|
|
257
|
+
if (usingStatus > 0) {
|
|
258
|
+
warnings.push(`items_using_status:${usingStatus}`);
|
|
259
|
+
}
|
|
260
|
+
const referencingSlots = workflowSlotsReferencing(schema.workflow, removedId);
|
|
261
|
+
if (referencingSlots.length > 0) {
|
|
262
|
+
warnings.push(`status_referenced_by_workflow:${referencingSlots.join(",")}`);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
251
265
|
function workflowSlotsReferencing(workflow, statusId) {
|
|
252
266
|
const slots = [
|
|
253
267
|
["draft_status", workflow.draft_status],
|
|
@@ -309,7 +323,7 @@ async function runSchemaRemoveType(name, options, global2) {
|
|
|
309
323
|
path: typesPath,
|
|
310
324
|
definitions: removal.file.definitions.length
|
|
311
325
|
},
|
|
312
|
-
warnings:
|
|
326
|
+
warnings: finalizeWarnings(warnings),
|
|
313
327
|
generated_at: nowIso()
|
|
314
328
|
};
|
|
315
329
|
}
|
|
@@ -443,7 +457,7 @@ async function runSchemaAddStatus(id, options, global2) {
|
|
|
443
457
|
path: statusesPath,
|
|
444
458
|
statuses: upsert.file.statuses.length
|
|
445
459
|
},
|
|
446
|
-
warnings:
|
|
460
|
+
warnings: finalizeWarnings(warnings),
|
|
447
461
|
generated_at: nowIso()
|
|
448
462
|
};
|
|
449
463
|
}
|
|
@@ -473,16 +487,7 @@ async function runSchemaRemoveStatus(id, options, global2) {
|
|
|
473
487
|
}
|
|
474
488
|
if (removal.removed) {
|
|
475
489
|
const removedId = normalizeStatusToken(removal.definition?.id ?? id);
|
|
476
|
-
|
|
477
|
-
const usingStatus = await countItemsUsingStatus(pmRoot, settings, schema, removedId);
|
|
478
|
-
if (usingStatus > 0) {
|
|
479
|
-
warnings.push(`items_using_status:${usingStatus}`);
|
|
480
|
-
}
|
|
481
|
-
const referencingSlots = workflowSlotsReferencing(schema.workflow, removedId);
|
|
482
|
-
if (referencingSlots.length > 0) {
|
|
483
|
-
warnings.push(`status_referenced_by_workflow:${referencingSlots.join(",")}`);
|
|
484
|
-
}
|
|
485
|
-
}
|
|
490
|
+
await appendRemovedStatusWarnings(warnings, pmRoot, settings, schema, removedId);
|
|
486
491
|
await writeFileAtomic(statusesPath, serializeStatusDefsFile(removal.file));
|
|
487
492
|
warnings.push(...await runActiveOnWriteHooks({
|
|
488
493
|
path: statusesPath,
|
|
@@ -501,7 +506,7 @@ async function runSchemaRemoveStatus(id, options, global2) {
|
|
|
501
506
|
path: statusesPath,
|
|
502
507
|
statuses: removal.file.statuses.length
|
|
503
508
|
},
|
|
504
|
-
warnings:
|
|
509
|
+
warnings: finalizeWarnings(warnings),
|
|
505
510
|
generated_at: nowIso()
|
|
506
511
|
};
|
|
507
512
|
}
|
|
@@ -584,9 +589,7 @@ function buildSchemaStatusSummaries(schema) {
|
|
|
584
589
|
}
|
|
585
590
|
async function loadSchemaInspectionContext(global2) {
|
|
586
591
|
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
587
|
-
|
|
588
|
-
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
589
|
-
}
|
|
592
|
+
await ensureInitialized(pmRoot);
|
|
590
593
|
const settings = await readSettings(pmRoot);
|
|
591
594
|
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
592
595
|
const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);
|
|
@@ -749,7 +752,7 @@ async function runSchemaAddField(key, options, global2) {
|
|
|
749
752
|
path: fieldsPath,
|
|
750
753
|
fields: upsert.file.fields.length
|
|
751
754
|
},
|
|
752
|
-
warnings:
|
|
755
|
+
warnings: finalizeWarnings(warnings),
|
|
753
756
|
generated_at: nowIso()
|
|
754
757
|
};
|
|
755
758
|
}
|
|
@@ -821,7 +824,7 @@ async function runSchemaRemoveField(key, options, global2) {
|
|
|
821
824
|
path: fieldsPath,
|
|
822
825
|
fields: removal.file.fields.length
|
|
823
826
|
},
|
|
824
|
-
warnings:
|
|
827
|
+
warnings: finalizeWarnings(warnings),
|
|
825
828
|
generated_at: nowIso()
|
|
826
829
|
};
|
|
827
830
|
}
|
|
@@ -880,7 +883,7 @@ async function runSchemaApplyPreset(preset, options, global2) {
|
|
|
880
883
|
const governance = resolveGovernanceKnobs(settings);
|
|
881
884
|
const registered = [];
|
|
882
885
|
const replaced = [];
|
|
883
|
-
let definitionsCount
|
|
886
|
+
let definitionsCount;
|
|
884
887
|
const releaseLock = await acquireLock(pmRoot, SCHEMA_TYPES_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock, settings.locks.wait_ms);
|
|
885
888
|
try {
|
|
886
889
|
const previousRaw = await readFileIfExists(typesPath);
|
|
@@ -916,23 +919,26 @@ async function runSchemaApplyPreset(preset, options, global2) {
|
|
|
916
919
|
path: typesPath,
|
|
917
920
|
definitions: definitionsCount
|
|
918
921
|
},
|
|
919
|
-
warnings:
|
|
922
|
+
warnings: finalizeWarnings(warnings),
|
|
920
923
|
generated_at: nowIso()
|
|
921
924
|
};
|
|
922
925
|
}
|
|
926
|
+
function resolveSchemaInferenceMinCount(value) {
|
|
927
|
+
if (value === void 0) {
|
|
928
|
+
return 10;
|
|
929
|
+
}
|
|
930
|
+
if (!Number.isInteger(value) || value < 1) {
|
|
931
|
+
throw new PmCliError("--min-count must be a positive integer (>= 1).", EXIT_CODE.USAGE);
|
|
932
|
+
}
|
|
933
|
+
return value;
|
|
934
|
+
}
|
|
923
935
|
async function runSchemaInferTypes(options, global2) {
|
|
924
936
|
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
925
937
|
await ensureInitialized(pmRoot);
|
|
926
938
|
const settings = await readSettings(pmRoot);
|
|
927
939
|
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
928
940
|
const typesPath = typesPathFor(pmRoot, schema);
|
|
929
|
-
|
|
930
|
-
if (options.minCount !== void 0) {
|
|
931
|
-
if (!Number.isInteger(options.minCount) || options.minCount < 1) {
|
|
932
|
-
throw new PmCliError("--min-count must be a positive integer (>= 1).", EXIT_CODE.USAGE);
|
|
933
|
-
}
|
|
934
|
-
minCount = options.minCount;
|
|
935
|
-
}
|
|
941
|
+
const minCount = resolveSchemaInferenceMinCount(options.minCount);
|
|
936
942
|
const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
937
943
|
const items = await listAllItemMetadataLight(pmRoot, settings.item_format, registry.type_to_folder, [], schema);
|
|
938
944
|
const titles = items.map((item) => typeof item.title === "string" ? item.title : "");
|
|
@@ -1017,7 +1023,7 @@ async function runSchemaInferTypes(options, global2) {
|
|
|
1017
1023
|
path: typesPath,
|
|
1018
1024
|
definitions: definitionsCount
|
|
1019
1025
|
},
|
|
1020
|
-
warnings:
|
|
1026
|
+
warnings: finalizeWarnings(warnings),
|
|
1021
1027
|
generated_at: nowIso()
|
|
1022
1028
|
};
|
|
1023
1029
|
}
|
|
@@ -1246,4 +1252,4 @@ export {
|
|
|
1246
1252
|
formatSchemaInferTypesHuman,
|
|
1247
1253
|
_testOnlySchemaCommand
|
|
1248
1254
|
};
|
|
1249
|
-
//# sourceMappingURL=chunk-
|
|
1255
|
+
//# sourceMappingURL=chunk-GM5QHQU6.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../sdk/schema.ts", "../../../../../../../../core/schema/type-inference.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module sdk/schema\n *\n * Owns typed schema customization primitives shared by SDK, CLI, and MCP consumers.\n */\nimport path from \"node:path\";\nimport { mkdir } from \"node:fs/promises\";\nimport {\n pathExists,\n readFileIfExists,\n writeFileAtomic,\n} from \"../core/fs/fs-utils.js\";\nimport { acquireLock } from \"../core/lock/lock.js\";\nimport {\n assertAliasesAvailable,\n assertTypeFolderAvailable,\n buildInvalidTypeHint,\n escapeForDoubleQuotes,\n normalizeAddTypeInput,\n parseItemTypesFile,\n removeItemType,\n serializeItemTypesFile,\n upsertItemType,\n type ItemTypeDefinition,\n} from \"../core/schema/item-types-file.js\";\nimport {\n assertStatusTokensAvailable,\n BUILTIN_STATUS_IDS,\n normalizeAddStatusInput,\n normalizeStatusToken,\n parseStatusDefsFile,\n removeStatusDef,\n serializeStatusDefsFile,\n upsertStatusDef,\n type RuntimeStatusDefinition,\n} from \"../core/schema/status-defs-file.js\";\nimport {\n normalizeAddFieldInput,\n normalizeFieldKey,\n parseFieldsFile,\n removeField,\n serializeFieldsFile,\n upsertField,\n type RuntimeFieldDefinition,\n} from \"../core/schema/fields-file.js\";\nimport {\n normalizeTypePresetName,\n resolveTypePresetDefinitions,\n TYPE_PRESET_NAMES,\n type TypePresetName,\n} from \"../core/schema/type-presets.js\";\nimport {\n inferTypesFromTitles,\n type InferredTypeCandidate,\n} from \"../core/schema/type-inference.js\";\nimport {\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,\n filePathForSchemaSection,\n normalizeRuntimeSchemaSettings,\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n} from \"../core/schema/runtime-schema.js\";\nimport {\n resolveItemTypeRegistry,\n toDefaultFolder,\n type ResolvedItemTypeDefinition,\n} from \"../core/item/type-registry.js\";\nimport { listAllItemMetadataLight } from \"../core/store/item-store.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport type { PmSettings } from \"../types/index.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { nowIso } from \"../core/shared/time.js\";\nimport {\n getActiveExtensionRegistrations,\n runActiveOnWriteHooks,\n} from \"../core/extensions/index.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nimport {\n readSettings,\n resolveGovernanceKnobs,\n} from \"../core/store/settings.js\";\n\n/** Public contract for schema subcommands, shared by SDK and presentation-layer consumers. */\nexport const SCHEMA_SUBCOMMANDS = [\n \"add-type\",\n \"remove-type\",\n \"add-status\",\n \"remove-status\",\n \"add-field\",\n \"remove-field\",\n \"list-fields\",\n \"show-field\",\n \"apply-preset\",\n \"list\",\n \"show\",\n \"show-status\",\n] as const;\n/** Restricts schema subcommand values accepted by command, SDK, and storage contracts. */\nexport type SchemaSubcommand = (typeof SCHEMA_SUBCOMMANDS)[number];\n\nconst SCHEMA_TYPES_LOCK_ID = \"schema-types\";\nconst SCHEMA_STATUSES_LOCK_ID = \"schema-statuses\";\nconst SCHEMA_FIELDS_LOCK_ID = \"schema-fields\";\n\n/** Documents the schema add type command options payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaAddTypeCommandOptions {\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Lifecycle state reported for defaultthe record. */\n defaultStatus?: string;\n /** Value that configures or reports folder for this contract. */\n folder?: string;\n /** Value that configures or reports alias for this contract. */\n alias?: string[];\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Documents the schema remove type command options payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaRemoveTypeCommandOptions {\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Documents the schema add status command options payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaAddStatusCommandOptions {\n /** Value that configures or reports role for this contract. */\n role?: string[];\n /** Value that configures or reports alias for this contract. */\n alias?: string[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports order for this contract. */\n order?: number;\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Documents the schema remove status command options payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaRemoveStatusCommandOptions {\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Documents the schema add type result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaAddTypeResult {\n /** Value that configures or reports action for this contract. */\n action: \"add-type\";\n /** Value that configures or reports registered for this contract. */\n registered: boolean;\n /** Value that configures or reports replaced for this contract. */\n replaced: boolean;\n /** Schema type that determines the shape and validation rules for this value. */\n type: ItemTypeDefinition;\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n definitions: number;\n };\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema remove type result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaRemoveTypeResult {\n /** Value that configures or reports action for this contract. */\n action: \"remove-type\";\n /** Value that configures or reports removed for this contract. */\n removed: boolean;\n /** Schema type that determines the shape and validation rules for this value. */\n type?: ItemTypeDefinition;\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n definitions: number;\n };\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema add status result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaAddStatusResult {\n /** Value that configures or reports action for this contract. */\n action: \"add-status\";\n /** Value that configures or reports registered for this contract. */\n registered: boolean;\n /** Value that configures or reports replaced for this contract. */\n replaced: boolean;\n /** Lifecycle state reported for status. */\n status: RuntimeStatusDefinition;\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n statuses: number;\n };\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema remove status result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaRemoveStatusResult {\n /** Value that configures or reports action for this contract. */\n action: \"remove-status\";\n /** Value that configures or reports removed for this contract. */\n removed: boolean;\n /** Lifecycle state reported for status. */\n status?: RuntimeStatusDefinition;\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n statuses: number;\n };\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema add field command options payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaAddFieldCommandOptions {\n /** Schema type that determines the shape and validation rules for this value. */\n type?: string;\n /** Value that configures or reports commands for this contract. */\n commands?: string[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports cli flag for this contract. */\n cliFlag?: string;\n /** Value that configures or reports alias for this contract. */\n alias?: string[];\n /** Value that configures or reports required for this contract. */\n required?: boolean;\n /** Value that configures or reports required on create for this contract. */\n requiredOnCreate?: boolean;\n /** Value that configures or reports allow unset for this contract. */\n allowUnset?: boolean;\n /** Value that configures or reports required types for this contract. */\n requiredTypes?: string[];\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Documents the schema remove field command options payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaRemoveFieldCommandOptions {\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Documents the schema apply preset command options payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaApplyPresetCommandOptions {\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Documents the schema add type infer command options payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaAddTypeInferCommandOptions {\n /** Number of min entries represented by this result. */\n minCount?: number;\n /** Value that configures or reports apply for this contract. */\n apply?: boolean;\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Documents the schema field summary payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaFieldSummary {\n /** Value that configures or reports key for this contract. */\n key: string;\n /** Schema type that determines the shape and validation rules for this value. */\n type: string;\n /** Value that configures or reports commands for this contract. */\n commands: string[];\n /** Value that configures or reports cli flag for this contract. */\n cli_flag: string;\n /** Value that configures or reports cli aliases for this contract. */\n cli_aliases: string[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports required for this contract. */\n required: boolean;\n /** Value that configures or reports required on create for this contract. */\n required_on_create: boolean;\n /** Value that configures or reports allow unset for this contract. */\n allow_unset: boolean;\n /** Value that configures or reports required types for this contract. */\n required_types: string[];\n}\n\n/** Documents the schema add field result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaAddFieldResult {\n /** Value that configures or reports action for this contract. */\n action: \"add-field\";\n /** Value that configures or reports registered for this contract. */\n registered: boolean;\n /** Value that configures or reports replaced for this contract. */\n replaced: boolean;\n /** Value that configures or reports field for this contract. */\n field: RuntimeFieldDefinition;\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n fields: number;\n };\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema remove field result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaRemoveFieldResult {\n /** Value that configures or reports action for this contract. */\n action: \"remove-field\";\n /** Value that configures or reports removed for this contract. */\n removed: boolean;\n /** Value that configures or reports field for this contract. */\n field?: RuntimeFieldDefinition;\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n fields: number;\n };\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema list fields result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaListFieldsResult {\n /** Value that configures or reports action for this contract. */\n action: \"list-fields\";\n /** Value that configures or reports fields for this contract. */\n fields: SchemaFieldSummary[];\n /** Value that configures or reports counts for this contract. */\n counts: {\n total: number;\n };\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n };\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema show field result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaShowFieldResult {\n /** Value that configures or reports action for this contract. */\n action: \"show-field\";\n /** Value that configures or reports field for this contract. */\n field: SchemaFieldSummary;\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n };\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema apply preset result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaApplyPresetResult {\n /** Value that configures or reports action for this contract. */\n action: \"apply-preset\";\n /** Value that configures or reports preset for this contract. */\n preset: TypePresetName;\n /** Value that configures or reports registered for this contract. */\n registered: string[];\n /** Value that configures or reports replaced for this contract. */\n replaced: string[];\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n definitions: number;\n };\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema add type infer result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaAddTypeInferResult {\n /** Value that configures or reports action for this contract. */\n action: \"infer-types\";\n /** Value that configures or reports applied for this contract. */\n applied: boolean;\n /** Number of min entries represented by this result. */\n min_count: number;\n /** Value that configures or reports candidates for this contract. */\n candidates: InferredTypeCandidate[];\n /** Value that configures or reports registered for this contract. */\n registered: string[];\n /** Value that configures or reports replaced for this contract. */\n replaced: string[];\n /** Value that configures or reports skipped for this contract. */\n skipped: Array<{ name: string; reason: string }>;\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n definitions: number;\n };\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema type summary payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaTypeSummary {\n /** Value that configures or reports name for this contract. */\n name: string;\n /** Value that configures or reports folder for this contract. */\n folder: string;\n /** Value that configures or reports aliases for this contract. */\n aliases: string[];\n /** Lifecycle state reported for defaultthe record. */\n default_status?: string;\n /** Value that configures or reports description for this contract. */\n description?: string;\n}\n\n/** Documents the schema status summary payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaStatusSummary {\n /** Stable identifier used to reference this record across commands and storage. */\n id: string;\n /** Value that configures or reports source for this contract. */\n source: \"builtin\" | \"custom\";\n /** Value that configures or reports roles for this contract. */\n roles: string[];\n /** Value that configures or reports aliases for this contract. */\n aliases: string[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports order for this contract. */\n order?: number;\n}\n\n/** Documents the schema type definition result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaTypeDefinitionResult extends SchemaTypeSummary {\n /** Value that configures or reports source for this contract. */\n source: \"builtin\" | \"custom\" | \"extension\";\n /** Value that configures or reports extension for this contract. */\n extension?: {\n layer: string;\n name: string;\n };\n /** Value that configures or reports required create fields for this contract. */\n required_create_fields: string[];\n /** Value that configures or reports required create repeatables for this contract. */\n required_create_repeatables: string[];\n /** Value that configures or reports options for this contract. */\n options: ResolvedItemTypeDefinition[\"options\"];\n /** Value that configures or reports command option policies for this contract. */\n command_option_policies: ResolvedItemTypeDefinition[\"command_option_policies\"];\n}\n\n/** Documents the schema list result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaListResult {\n /** Value that configures or reports action for this contract. */\n action: \"list\";\n /** Value that configures or reports builtin for this contract. */\n builtin: SchemaTypeSummary[];\n /** Value that configures or reports custom for this contract. */\n custom: SchemaTypeSummary[];\n /** Value that configures or reports extension for this contract. */\n extension: SchemaTypeSummary[];\n /** Value that configures or reports counts for this contract. */\n counts: {\n builtin: number;\n custom: number;\n extension: number;\n total: number;\n };\n /** Value that configures or reports statuses for this contract. */\n statuses: {\n builtin: SchemaStatusSummary[];\n custom: SchemaStatusSummary[];\n counts: {\n builtin: number;\n custom: number;\n total: number;\n };\n };\n /** Value that configures or reports fields for this contract. */\n fields: {\n custom: SchemaFieldSummary[];\n counts: {\n total: number;\n };\n };\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n };\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema show result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaShowResult {\n /** Value that configures or reports action for this contract. */\n action: \"show\";\n /** Schema type that determines the shape and validation rules for this value. */\n type: SchemaTypeDefinitionResult;\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n };\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Documents the schema show status result payload exchanged by command, SDK, and package integrations. */\nexport interface SchemaShowStatusResult {\n /** Value that configures or reports action for this contract. */\n action: \"show-status\";\n /** Lifecycle state reported for status. */\n status: SchemaStatusSummary;\n /** Value that configures or reports file for this contract. */\n file: {\n path: string;\n };\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Restricts schema inspect result values accepted by command, SDK, and storage contracts. */\nexport type SchemaInspectResult =\n | SchemaListResult\n | SchemaShowResult\n | SchemaShowStatusResult\n | SchemaListFieldsResult\n | SchemaShowFieldResult;\n\nfunction toAuthor(\n candidate: string | undefined,\n defaultAuthor: string,\n): string {\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed.length > 0 ? trimmed : \"unknown\";\n}\n\n/* c8 ignore start -- schema command mutation/inspection branches are covered by broader schema integration workflows. */\n/** Implements run schema add type for the public runtime surface of this module. */\nexport async function runSchemaAddType(\n name: string | undefined,\n options: SchemaAddTypeCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaAddTypeResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n let normalized;\n try {\n normalized = normalizeAddTypeInput({\n name,\n description: options.description,\n defaultStatus: options.defaultStatus,\n folder: options.folder,\n aliases: options.alias,\n });\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = filePathForSchemaSection(\n pmRoot,\n schema.files.types,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types,\n );\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_TYPES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n let upsert;\n try {\n const previousRaw = await readFileIfExists(typesPath);\n let parsed;\n try {\n parsed = parseItemTypesFile(previousRaw);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n try {\n assertAliasesAvailable(normalized, parsed);\n // GH-248: reject distinct type names that would slug to the same storage\n // folder (e.g. \"Spike\"/\"Spikes\") so item files never silently share a\n // directory. Same-named upserts (recase/idempotent re-runs) are exempt.\n // reservedFolders covers built-in + extension + settings-resolved custom\n // folders so a slug like \"Tasks\" can't collide with the built-in Task.\n const reservedFolders = new Map<string, string>();\n const resolvedRegistry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n for (const [typeName, folder] of Object.entries(\n resolvedRegistry.type_to_folder,\n )) {\n const folderKey = folder.trim().toLowerCase();\n if (folderKey.length > 0 && !reservedFolders.has(folderKey)) {\n reservedFolders.set(folderKey, typeName);\n }\n }\n assertTypeFolderAvailable(normalized, parsed, reservedFolders);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n upsert = upsertItemType(parsed, normalized);\n // GH-248: an upsert that only differs in case from the existing canonical\n // name silently renames the stored type (e.g. registering \"spike\" over\n // \"Spike\"). Surface it as a non-blocking warning so the operator knows the\n // existing definition was replaced rather than a new type created.\n if (\n upsert.replaced &&\n upsert.previousName !== undefined &&\n upsert.previousName !== upsert.definition.name\n ) {\n warnings.push(\n `type_recased:${upsert.previousName}->${upsert.definition.name}`,\n );\n }\n // writeFileAtomic writes to a temp file then renames, so a failure leaves the\n // existing types.json untouched; no manual rollback is needed.\n await writeFileAtomic(typesPath, serializeItemTypesFile(upsert.file));\n await ensureTypeFolderScaffold(\n pmRoot,\n [upsert.definition],\n warnings,\n \"schema:add-type-folder\",\n );\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: typesPath,\n scope: \"project\",\n op: \"schema:add-type\",\n })),\n );\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"add-type\",\n registered: true,\n replaced: upsert.replaced,\n type: upsert.definition,\n file: {\n path: typesPath,\n definitions: upsert.file.definitions.length,\n },\n warnings: finalizeWarnings(warnings),\n generated_at: nowIso(),\n };\n}\n\nasync function ensureInitialized(pmRoot: string): Promise<void> {\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(\n `Tracker is not initialized at ${pmRoot}. Run pm init first.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n}\n\n/** Deduplicates schema mutation warnings and returns their stable locale-aware order. */\nfunction finalizeWarnings(warnings: string[]): string[] {\n return [...new Set(warnings)].sort((left, right) =>\n left.localeCompare(right),\n );\n}\n\n/** Counts items whose resolved type matches `typeName` (case-insensitive). Uses the lightest existing read path (listAllItemMetadataLight skips the heavy collections cache). All items are counted — not just open ones — so the advisory warning surfaces every item the removed definition would orphan; the count is non-blocking. The caller passes its already-loaded `settings` so we never re-read settings.json from disk here. */\nasync function countItemsUsingType(\n pmRoot: string,\n settings: PmSettings,\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n typeName: string,\n): Promise<number> {\n const registry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const lowerName = typeName.trim().toLowerCase();\n const items = await listAllItemMetadataLight(\n pmRoot,\n settings.item_format,\n registry.type_to_folder,\n [],\n schema,\n );\n return items.filter(\n (item) =>\n typeof item.type === \"string\" && item.type.toLowerCase() === lowerName,\n ).length;\n}\n\n/** Counts items currently set to the status whose id/aliases resolve to `statusId`. Uses listAllItemMetadataLight (the lightest read path). All items are counted regardless of lifecycle phase; the count is advisory only. The caller passes its already-loaded `settings` so we never re-read from disk. */\nasync function countItemsUsingStatus(\n pmRoot: string,\n settings: PmSettings,\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n statusId: string,\n): Promise<number> {\n const registry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const statusRegistry = resolveRuntimeStatusRegistry(schema);\n const normalizedId = normalizeStatusToken(statusId);\n const items = await listAllItemMetadataLight(\n pmRoot,\n settings.item_format,\n registry.type_to_folder,\n [],\n schema,\n );\n return items.filter((item) => {\n const itemStatus = typeof item.status === \"string\" ? item.status : \"\";\n const resolved =\n statusRegistry.alias_to_id.get(normalizeStatusToken(itemStatus)) ??\n normalizeStatusToken(itemStatus);\n return resolved === normalizedId;\n }).length;\n}\n\n/** Adds non-blocking usage and workflow diagnostics for a removed custom status. */\nasync function appendRemovedStatusWarnings(\n warnings: string[],\n pmRoot: string,\n settings: PmSettings,\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n removedId: string,\n): Promise<void> {\n if (removedId.length === 0 || BUILTIN_STATUS_IDS.has(removedId)) {\n return;\n }\n const usingStatus = await countItemsUsingStatus(\n pmRoot,\n settings,\n schema,\n removedId,\n );\n if (usingStatus > 0) {\n warnings.push(`items_using_status:${usingStatus}`);\n }\n const referencingSlots = workflowSlotsReferencing(schema.workflow, removedId);\n if (referencingSlots.length > 0) {\n warnings.push(\n `status_referenced_by_workflow:${referencingSlots.join(\",\")}`,\n );\n }\n}\n\n/** Returns the workflow role-slot names (open_status, close_status, ...) that currently point at `statusId` (normalized). Used to warn before removing a status that a workflow default still references. */\nfunction workflowSlotsReferencing(\n workflow: {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n },\n statusId: string,\n): string[] {\n const slots: Array<[string, string | undefined]> = [\n [\"draft_status\", workflow.draft_status],\n [\"open_status\", workflow.open_status],\n [\"in_progress_status\", workflow.in_progress_status],\n [\"blocked_status\", workflow.blocked_status],\n [\"close_status\", workflow.close_status],\n [\"canceled_status\", workflow.canceled_status],\n ];\n return slots\n .filter(\n ([, value]) =>\n value !== undefined && normalizeStatusToken(value) === statusId,\n )\n .map(([slot]) => slot);\n}\n\n/** Implements run schema remove type for the public runtime surface of this module. */\nexport async function runSchemaRemoveType(\n name: string | undefined,\n options: SchemaRemoveTypeCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaRemoveTypeResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = filePathForSchemaSection(\n pmRoot,\n schema.files.types,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types,\n );\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_TYPES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n let removal;\n try {\n const previousRaw = await readFileIfExists(typesPath);\n let parsed;\n try {\n parsed = parseItemTypesFile(previousRaw);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n try {\n removal = removeItemType(parsed, name);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n if (removal.removed) {\n // Only emit the advisory orphan-count warning once a removable custom\n // definition was actually removed; a no-op/unknown removal would otherwise\n // surface a misleading items_using_type:* warning. The count is\n // non-blocking and reuses the already-loaded settings (no disk re-read).\n const removedName = (removal.definition?.name ?? name ?? \"\").trim();\n if (removedName.length > 0) {\n const usingType = await countItemsUsingType(\n pmRoot,\n settings,\n schema,\n removedName,\n );\n if (usingType > 0) {\n warnings.push(`items_using_type:${usingType}`);\n }\n }\n // writeFileAtomic writes to a temp file then renames, so a failure leaves\n // the existing types.json untouched; no manual rollback is needed.\n await writeFileAtomic(typesPath, serializeItemTypesFile(removal.file));\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: typesPath,\n scope: \"project\",\n op: \"schema:remove-type\",\n })),\n );\n }\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"remove-type\",\n removed: removal.removed,\n ...(removal.definition ? { type: removal.definition } : {}),\n file: {\n path: typesPath,\n definitions: removal.file.definitions.length,\n },\n warnings: finalizeWarnings(warnings),\n generated_at: nowIso(),\n };\n}\n\nfunction statusesPathFor(\n pmRoot: string,\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n): string {\n return filePathForSchemaSection(\n pmRoot,\n schema.files.statuses,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses,\n );\n}\n\nfunction fieldsPathFor(\n pmRoot: string,\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n): string {\n return filePathForSchemaSection(\n pmRoot,\n schema.files.fields,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields,\n );\n}\n\nfunction typesPathFor(\n pmRoot: string,\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n): string {\n return filePathForSchemaSection(\n pmRoot,\n schema.files.types,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types,\n );\n}\n\n/** Creates the storage folder for each item-type definition (resolving the default folder when unset) and runs on-write hooks for newly created folders. Shared with `pm profile apply` so profile-staged types scaffold identically to `pm schema add-type`. Existing folders are skipped, keeping the call idempotent. */\nexport async function ensureTypeFolderScaffold(\n pmRoot: string,\n definitions: readonly ItemTypeDefinition[],\n warnings: string[],\n op: string,\n): Promise<void> {\n for (const definition of definitions) {\n const folder = definition.folder ?? toDefaultFolder(definition.name);\n const target = path.join(pmRoot, folder);\n if (await pathExists(target)) {\n continue;\n }\n await mkdir(target, { recursive: true });\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: target,\n scope: \"project\",\n op,\n })),\n );\n }\n}\n\nfunction toSchemaFieldSummary(\n field: ReturnType<typeof resolveRuntimeFieldRegistry>[\"definitions\"][number],\n): SchemaFieldSummary {\n return {\n key: field.key,\n type: field.type,\n commands: [...field.commands],\n cli_flag: `--${field.cli_flag}`,\n cli_aliases: field.cli_aliases.map((alias) => `--${alias}`),\n ...(field.description ? { description: field.description } : {}),\n required: field.required,\n required_on_create: field.required_on_create,\n allow_unset: field.allow_unset,\n required_types: [...field.required_types],\n };\n}\n\nfunction toExistingStatusDefinition(\n resolvedExisting:\n | ReturnType<typeof resolveRuntimeStatusRegistry>[\"definitions\"][number]\n | undefined,\n): RuntimeStatusDefinition | undefined {\n if (!resolvedExisting) {\n return undefined;\n }\n return {\n id: resolvedExisting.id,\n ...(resolvedExisting.roles.length > 0\n ? { roles: [...resolvedExisting.roles] }\n : {}),\n ...(resolvedExisting.aliases.length > 0\n ? { aliases: [...resolvedExisting.aliases] }\n : {}),\n ...(resolvedExisting.description\n ? { description: resolvedExisting.description }\n : {}),\n ...(typeof resolvedExisting.order === \"number\"\n ? { order: resolvedExisting.order }\n : {}),\n };\n}\n\nfunction buildStatusFileAliasMap(\n statuses: RuntimeStatusDefinition[],\n): Map<string, string> {\n const fileAliasToId = new Map<string, string>();\n for (const definition of statuses) {\n const defId = normalizeStatusToken(definition.id);\n if (defId.length === 0) {\n continue;\n }\n fileAliasToId.set(defId, defId);\n for (const alias of Array.isArray(definition.aliases)\n ? definition.aliases\n : []) {\n const aliasToken = normalizeStatusToken(alias);\n if (aliasToken.length > 0 && !fileAliasToId.has(aliasToken)) {\n fileAliasToId.set(aliasToken, defId);\n }\n }\n }\n return fileAliasToId;\n}\n\n/** Implements run schema add status for the public runtime surface of this module. */\nexport async function runSchemaAddStatus(\n id: string | undefined,\n options: SchemaAddStatusCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaAddStatusResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n let normalized;\n try {\n normalized = normalizeAddStatusInput({\n id,\n roles: options.role,\n aliases: options.alias,\n description: options.description,\n order: options.order,\n });\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const statusesPath = statusesPathFor(pmRoot, schema);\n const statusRegistry = resolveRuntimeStatusRegistry(schema);\n\n // Reject id/alias collisions with a DIFFERENT existing status so a custom\n // status can never shadow a built-in lifecycle token (e.g. --alias open).\n try {\n assertStatusTokensAvailable(normalized, statusRegistry.alias_to_id);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n\n // Seed the upsert from the resolved (settings-or-file) definition so omitting\n // --role/--alias preserves metadata defined in settings.schema.statuses, not\n // only what is already in statuses.json.\n const baseDefinition = toExistingStatusDefinition(\n statusRegistry.by_id.get(normalized.id),\n );\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_STATUSES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n let upsert;\n try {\n const previousRaw = await readFileIfExists(statusesPath);\n let parsed;\n try {\n parsed = parseStatusDefsFile(previousRaw);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n // Re-check collisions against the CURRENT file under the lock: the pre-lock\n // check used the registry loaded before acquiring schema-statuses, so a\n // concurrent add-status could have written a colliding id/alias in between.\n // The lock serializes writes; this serializes the collision decision too.\n const fileAliasToId = buildStatusFileAliasMap(parsed.statuses);\n try {\n assertStatusTokensAvailable(normalized, fileAliasToId);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n upsert = upsertStatusDef(parsed, normalized, baseDefinition);\n // writeFileAtomic writes to a temp file then renames, so a failure leaves\n // the existing statuses.json untouched; no manual rollback is needed.\n await writeFileAtomic(statusesPath, serializeStatusDefsFile(upsert.file));\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: statusesPath,\n scope: \"project\",\n op: \"schema:add-status\",\n })),\n );\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"add-status\",\n registered: true,\n replaced: upsert.replaced,\n status: upsert.definition,\n file: {\n path: statusesPath,\n statuses: upsert.file.statuses.length,\n },\n warnings: finalizeWarnings(warnings),\n generated_at: nowIso(),\n };\n}\n\n/** Implements run schema remove status for the public runtime surface of this module. */\nexport async function runSchemaRemoveStatus(\n id: string | undefined,\n options: SchemaRemoveStatusCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaRemoveStatusResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const statusesPath = statusesPathFor(pmRoot, schema);\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_STATUSES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n let removal;\n try {\n const previousRaw = await readFileIfExists(statusesPath);\n let parsed;\n try {\n parsed = parseStatusDefsFile(previousRaw);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n try {\n removal = removeStatusDef(parsed, id);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n if (removal.removed) {\n // Only emit the advisory orphan-count warning once a removable custom\n // status was actually removed; a no-op/unknown removal would otherwise\n // surface a misleading items_using_status:* warning. The count reuses the\n // already-loaded settings (no disk re-read) and is non-blocking.\n const removedId = normalizeStatusToken(removal.definition?.id ?? id);\n // Removing a status that a workflow default still points at would leave\n // pm close / default pm create resolving to an unregistered status. Warn\n // (non-blocking, consistent with remove-type) so the operator re-points\n // the workflow slot via schema/workflows.json or pm config.\n await appendRemovedStatusWarnings(\n warnings,\n pmRoot,\n settings,\n schema,\n removedId,\n );\n await writeFileAtomic(\n statusesPath,\n serializeStatusDefsFile(removal.file),\n );\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: statusesPath,\n scope: \"project\",\n op: \"schema:remove-status\",\n })),\n );\n }\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"remove-status\",\n removed: removal.removed,\n ...(removal.definition ? { status: removal.definition } : {}),\n file: {\n path: statusesPath,\n statuses: removal.file.statuses.length,\n },\n warnings: finalizeWarnings(warnings),\n generated_at: nowIso(),\n };\n}\n\nfunction toSchemaTypeSummary(\n definition: ResolvedItemTypeDefinition,\n): SchemaTypeSummary {\n return {\n name: definition.name,\n folder: definition.folder,\n aliases: Array.isArray(definition.aliases) ? [...definition.aliases] : [],\n ...(definition.default_status\n ? { default_status: definition.default_status }\n : {}),\n ...(definition.description ? { description: definition.description } : {}),\n };\n}\n\nfunction toSchemaTypeDefinition(\n definition: ResolvedItemTypeDefinition,\n source: SchemaTypeDefinitionResult[\"source\"],\n extensionProvenance?: SchemaTypeDefinitionResult[\"extension\"],\n): SchemaTypeDefinitionResult {\n return {\n ...toSchemaTypeSummary(definition),\n source,\n ...(extensionProvenance ? { extension: extensionProvenance } : {}),\n required_create_fields: [...definition.required_create_fields],\n required_create_repeatables: [...definition.required_create_repeatables],\n options: structuredClone(definition.options),\n command_option_policies: structuredClone(\n definition.command_option_policies,\n ),\n };\n}\n\nfunction toSchemaStatusSummary(\n definition: RuntimeStatusDefinition,\n): SchemaStatusSummary {\n return {\n id: definition.id,\n source: BUILTIN_STATUS_IDS.has(definition.id) ? \"builtin\" : \"custom\",\n roles: Array.isArray(definition.roles) ? [...definition.roles] : [],\n aliases: Array.isArray(definition.aliases) ? [...definition.aliases] : [],\n ...(definition.description ? { description: definition.description } : {}),\n ...(typeof definition.order === \"number\"\n ? { order: definition.order }\n : {}),\n };\n}\n\nfunction classifyTypeSource(\n name: string,\n customNames: Set<string>,\n extensionNames: Set<string>,\n): SchemaTypeDefinitionResult[\"source\"] {\n const lowerName = name.toLowerCase();\n if (extensionNames.has(lowerName)) {\n return \"extension\";\n }\n if (customNames.has(lowerName)) {\n return \"custom\";\n }\n return \"builtin\";\n}\n\nfunction collectExtensionTypeProvenance(): Map<\n string,\n SchemaTypeDefinitionResult[\"extension\"]\n> {\n const provenance = new Map<string, SchemaTypeDefinitionResult[\"extension\"]>();\n const registrations = getActiveExtensionRegistrations();\n for (const registration of registrations?.item_types ?? []) {\n const rawTypes = (registration as { types?: unknown[] }).types;\n if (!Array.isArray(rawTypes)) {\n continue;\n }\n for (const rawType of rawTypes) {\n if (\n typeof rawType !== \"object\" ||\n rawType === null ||\n Array.isArray(rawType)\n ) {\n continue;\n }\n const name = (rawType as { name?: unknown }).name;\n if (typeof name === \"string\" && name.trim().length > 0) {\n provenance.set(name.trim().toLowerCase(), {\n layer: registration.layer,\n name: registration.name,\n });\n }\n }\n }\n return provenance;\n}\n\nfunction buildSchemaStatusSummaries(\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n): { builtin: SchemaStatusSummary[]; custom: SchemaStatusSummary[] } {\n const registry = resolveRuntimeStatusRegistry(schema);\n const builtin: SchemaStatusSummary[] = [];\n const custom: SchemaStatusSummary[] = [];\n for (const definition of registry.definitions) {\n const summary = toSchemaStatusSummary(definition);\n if (summary.source === \"builtin\") {\n builtin.push(summary);\n } else {\n custom.push(summary);\n }\n }\n return { builtin, custom };\n}\n\nasync function loadSchemaInspectionContext(global: GlobalOptions): Promise<{\n pmRoot: string;\n typesPath: string;\n statusesPath: string;\n byType: Record<string, ResolvedItemTypeDefinition>;\n customNames: Set<string>;\n extensionProvenance: Map<string, SchemaTypeDefinitionResult[\"extension\"]>;\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = filePathForSchemaSection(\n pmRoot,\n schema.files.types,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types,\n );\n const statusesPath = statusesPathFor(pmRoot, schema);\n const registry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const extensionProvenance = collectExtensionTypeProvenance();\n const customNames = new Set(\n (settings.item_types?.definitions ?? [])\n .map((definition) => definition.name.trim().toLowerCase())\n .filter((name) => name.length > 0 && !extensionProvenance.has(name)),\n );\n return {\n pmRoot,\n typesPath,\n statusesPath,\n byType: registry.by_type,\n customNames,\n extensionProvenance,\n schema,\n };\n}\n\n/** Implements run schema list for the public runtime surface of this module. */\nexport async function runSchemaList(\n global: GlobalOptions,\n): Promise<SchemaListResult> {\n const context = await loadSchemaInspectionContext(global);\n const builtin: SchemaTypeSummary[] = [];\n const custom: SchemaTypeSummary[] = [];\n const extension: SchemaTypeSummary[] = [];\n for (const definition of Object.values(context.byType).sort((left, right) =>\n left.name.localeCompare(right.name),\n )) {\n const source = classifyTypeSource(\n definition.name,\n context.customNames,\n new Set(context.extensionProvenance.keys()),\n );\n const summary = toSchemaTypeSummary(definition);\n if (source === \"extension\") {\n extension.push(summary);\n } else if (source === \"custom\") {\n custom.push(summary);\n } else {\n builtin.push(summary);\n }\n }\n const statusSummaries = buildSchemaStatusSummaries(context.schema);\n const fieldSummaries = resolveRuntimeFieldRegistry(\n context.schema,\n ).definitions.map(toSchemaFieldSummary);\n return {\n action: \"list\",\n builtin,\n custom,\n extension,\n counts: {\n builtin: builtin.length,\n custom: custom.length,\n extension: extension.length,\n total: builtin.length + custom.length + extension.length,\n },\n statuses: {\n builtin: statusSummaries.builtin,\n custom: statusSummaries.custom,\n counts: {\n builtin: statusSummaries.builtin.length,\n custom: statusSummaries.custom.length,\n total: statusSummaries.builtin.length + statusSummaries.custom.length,\n },\n },\n fields: {\n custom: fieldSummaries,\n counts: {\n total: fieldSummaries.length,\n },\n },\n file: {\n path: context.typesPath,\n },\n generated_at: nowIso(),\n };\n}\n\n/** Implements run schema show for the public runtime surface of this module. */\nexport async function runSchemaShow(\n name: string | undefined,\n global: GlobalOptions,\n): Promise<SchemaShowResult> {\n const typeName = (name ?? \"\").trim();\n if (typeName.length === 0) {\n throw new PmCliError(\"Type name must not be empty.\", EXIT_CODE.USAGE);\n }\n const context = await loadSchemaInspectionContext(global);\n const match = Object.values(context.byType).find(\n (definition) =>\n definition.name.toLowerCase() === typeName.toLowerCase() ||\n definition.aliases.some(\n (alias) => alias.toLowerCase() === typeName.toLowerCase(),\n ),\n );\n if (!match) {\n throw new PmCliError(\n `Unknown item type \"${typeName}\". Run pm schema list to inspect registered types, or pm schema add-type \"${escapeForDoubleQuotes(typeName)}\" to register it.`,\n EXIT_CODE.NOT_FOUND,\n { code: \"unknown_item_type\" },\n );\n }\n return {\n action: \"show\",\n type: toSchemaTypeDefinition(\n match,\n classifyTypeSource(\n match.name,\n context.customNames,\n new Set(context.extensionProvenance.keys()),\n ),\n context.extensionProvenance.get(match.name.toLowerCase()),\n ),\n file: {\n path: context.typesPath,\n },\n generated_at: nowIso(),\n };\n}\n\n/** Implements run schema show status for the public runtime surface of this module. */\nexport async function runSchemaShowStatus(\n id: string | undefined,\n global: GlobalOptions,\n): Promise<SchemaShowStatusResult> {\n const statusToken = normalizeStatusToken(id);\n if (statusToken.length === 0) {\n throw new PmCliError(\"Status id must not be empty.\", EXIT_CODE.USAGE);\n }\n const context = await loadSchemaInspectionContext(global);\n const statusRegistry = resolveRuntimeStatusRegistry(context.schema);\n const resolvedId = statusRegistry.alias_to_id.get(statusToken) ?? statusToken;\n const match = statusRegistry.by_id.get(resolvedId);\n if (!match) {\n throw new PmCliError(\n `Unknown status \"${id}\". Run pm schema list to inspect registered statuses, or pm schema add-status \"${escapeForDoubleQuotes(\n id ?? \"\",\n )}\" to register it.`,\n EXIT_CODE.NOT_FOUND,\n { code: \"unknown_status\" },\n );\n }\n return {\n action: \"show-status\",\n status: toSchemaStatusSummary(match),\n file: {\n path: context.statusesPath,\n },\n generated_at: nowIso(),\n };\n}\n\n/** Implements run schema add field for the public runtime surface of this module. */\nexport async function runSchemaAddField(\n key: string | undefined,\n options: SchemaAddFieldCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaAddFieldResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n let normalized;\n try {\n normalized = normalizeAddFieldInput({\n key,\n type: options.type,\n commands: options.commands,\n description: options.description,\n cliFlag: options.cliFlag,\n aliases: options.alias,\n required: options.required,\n requiredOnCreate: options.requiredOnCreate,\n allowUnset: options.allowUnset,\n requiredTypes: options.requiredTypes,\n });\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const fieldsPath = fieldsPathFor(pmRoot, schema);\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_FIELDS_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n let upsert;\n try {\n const previousRaw = await readFileIfExists(fieldsPath);\n let parsed;\n try {\n parsed = parseFieldsFile(previousRaw);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n upsert = upsertField(parsed, normalized);\n await writeFileAtomic(fieldsPath, serializeFieldsFile(upsert.file));\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: fieldsPath,\n scope: \"project\",\n op: \"schema:add-field\",\n })),\n );\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"add-field\",\n registered: true,\n replaced: upsert.replaced,\n field: upsert.definition,\n file: {\n path: fieldsPath,\n fields: upsert.file.fields.length,\n },\n warnings: finalizeWarnings(warnings),\n generated_at: nowIso(),\n };\n}\n\n/** Counts items carrying a non-empty value for the custom field's metadata key. Advisory only (non-blocking) so remove-field can surface how many items would lose a managed column. Reuses the already-loaded settings (no disk re-read). */\nasync function countItemsUsingField(\n pmRoot: string,\n settings: PmSettings,\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n metadataKey: string,\n): Promise<number> {\n const registry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const items = await listAllItemMetadataLight(\n pmRoot,\n settings.item_format,\n registry.type_to_folder,\n [],\n schema,\n );\n return items.filter((item) => {\n const value = (item as unknown as Record<string, unknown>)[metadataKey];\n if (value === undefined || value === null) {\n return false;\n }\n if (Array.isArray(value)) {\n return value.length > 0;\n }\n if (typeof value === \"string\") {\n return value.trim().length > 0;\n }\n return true;\n }).length;\n}\n\n/** Implements run schema remove field for the public runtime surface of this module. */\nexport async function runSchemaRemoveField(\n key: string | undefined,\n options: SchemaRemoveFieldCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaRemoveFieldResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const fieldsPath = fieldsPathFor(pmRoot, schema);\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_FIELDS_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n let removal;\n try {\n const previousRaw = await readFileIfExists(fieldsPath);\n let parsed;\n try {\n parsed = parseFieldsFile(previousRaw);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n try {\n removal = removeField(parsed, key);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n if (removal.removed) {\n const removedKey = normalizeFieldKey(removal.definition?.key ?? key);\n const metadataKey = normalizeFieldKey(\n removal.definition?.metadata_key ??\n removal.definition?.front_matter_key ??\n removedKey,\n );\n if (metadataKey.length > 0) {\n const usingField = await countItemsUsingField(\n pmRoot,\n settings,\n schema,\n metadataKey,\n );\n if (usingField > 0) {\n warnings.push(`items_using_field:${usingField}`);\n }\n }\n await writeFileAtomic(fieldsPath, serializeFieldsFile(removal.file));\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: fieldsPath,\n scope: \"project\",\n op: \"schema:remove-field\",\n })),\n );\n }\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"remove-field\",\n removed: removal.removed,\n ...(removal.definition ? { field: removal.definition } : {}),\n file: {\n path: fieldsPath,\n fields: removal.file.fields.length,\n },\n warnings: finalizeWarnings(warnings),\n generated_at: nowIso(),\n };\n}\n\n/** Implements run schema list fields for the public runtime surface of this module. */\nexport async function runSchemaListFields(\n global: GlobalOptions,\n): Promise<SchemaListFieldsResult> {\n const context = await loadSchemaInspectionContext(global);\n const fields = resolveRuntimeFieldRegistry(context.schema).definitions.map(\n toSchemaFieldSummary,\n );\n return {\n action: \"list-fields\",\n fields,\n counts: {\n total: fields.length,\n },\n file: {\n path: fieldsPathFor(context.pmRoot, context.schema),\n },\n generated_at: nowIso(),\n };\n}\n\n/** Implements run schema show field for the public runtime surface of this module. */\nexport async function runSchemaShowField(\n key: string | undefined,\n global: GlobalOptions,\n): Promise<SchemaShowFieldResult> {\n const fieldKey = normalizeFieldKey(key);\n if (fieldKey.length === 0) {\n throw new PmCliError(\"Field key must not be empty.\", EXIT_CODE.USAGE);\n }\n const context = await loadSchemaInspectionContext(global);\n const match = resolveRuntimeFieldRegistry(context.schema).by_key.get(\n fieldKey,\n );\n if (!match) {\n throw new PmCliError(\n `Unknown custom field \"${key}\". Run pm schema list-fields to inspect registered fields, or pm schema add-field \"${escapeForDoubleQuotes(\n key ?? \"\",\n )}\" to register it.`,\n EXIT_CODE.NOT_FOUND,\n { code: \"unknown_field\" },\n );\n }\n return {\n action: \"show-field\",\n field: toSchemaFieldSummary(match),\n file: {\n path: fieldsPathFor(context.pmRoot, context.schema),\n },\n generated_at: nowIso(),\n };\n}\n\n/** Implements run schema apply preset for the public runtime surface of this module. */\nexport async function runSchemaApplyPreset(\n preset: string | undefined,\n options: SchemaApplyPresetCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaApplyPresetResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n let presetName: TypePresetName;\n try {\n const normalized = normalizeTypePresetName(preset);\n if (normalized === undefined) {\n throw new Error(\n `Type preset name is required. Allowed: ${TYPE_PRESET_NAMES.join(\", \")}.`,\n );\n }\n presetName = normalized;\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = typesPathFor(pmRoot, schema);\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const registered: string[] = [];\n const replaced: string[] = [];\n let definitionsCount: number;\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_TYPES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n try {\n const previousRaw = await readFileIfExists(typesPath);\n let parsed;\n try {\n parsed = parseItemTypesFile(previousRaw);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n let nextFile = parsed;\n for (const normalized of resolveTypePresetDefinitions(presetName)) {\n const upsert = upsertItemType(nextFile, normalized);\n nextFile = upsert.file;\n (upsert.replaced ? replaced : registered).push(upsert.definition.name);\n }\n definitionsCount = nextFile.definitions.length;\n await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));\n await ensureTypeFolderScaffold(\n pmRoot,\n resolveTypePresetDefinitions(presetName),\n warnings,\n \"schema:apply-preset-folder\",\n );\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: typesPath,\n scope: \"project\",\n op: \"schema:apply-preset\",\n })),\n );\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"apply-preset\",\n preset: presetName,\n registered,\n replaced,\n file: {\n path: typesPath,\n definitions: definitionsCount,\n },\n warnings: finalizeWarnings(warnings),\n generated_at: nowIso(),\n };\n}\n\n/** Validates the positive inference threshold while preserving the command default. */\nfunction resolveSchemaInferenceMinCount(value: number | undefined): number {\n if (value === undefined) {\n return 10;\n }\n if (!Number.isInteger(value) || value < 1) {\n throw new PmCliError(\n \"--min-count must be a positive integer (>= 1).\",\n EXIT_CODE.USAGE,\n );\n }\n return value;\n}\n\n/** Implements run schema infer types for the public runtime surface of this module. */\nexport async function runSchemaInferTypes(\n options: SchemaAddTypeInferCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaAddTypeInferResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = typesPathFor(pmRoot, schema);\n const minCount = resolveSchemaInferenceMinCount(options.minCount);\n\n const registry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const items = await listAllItemMetadataLight(\n pmRoot,\n settings.item_format,\n registry.type_to_folder,\n [],\n schema,\n );\n const titles = items.map((item) =>\n typeof item.title === \"string\" ? item.title : \"\",\n );\n const candidates = inferTypesFromTitles(titles, { minCount });\n\n const warnings: string[] = [];\n const registered: string[] = [];\n const replaced: string[] = [];\n const skipped: Array<{ name: string; reason: string }> = [];\n let definitionsCount: number;\n\n // Dry-run preview by default: only --apply mutates schema/types.json.\n if (!options.apply) {\n let parsed;\n try {\n parsed = parseItemTypesFile(await readFileIfExists(typesPath));\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n definitionsCount = parsed.definitions.length;\n return {\n action: \"infer-types\",\n applied: false,\n min_count: minCount,\n candidates,\n registered,\n replaced,\n skipped,\n file: {\n path: typesPath,\n definitions: definitionsCount,\n },\n warnings,\n generated_at: nowIso(),\n };\n }\n\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_TYPES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n try {\n const previousRaw = await readFileIfExists(typesPath);\n let parsed;\n try {\n parsed = parseItemTypesFile(previousRaw);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n let nextFile = parsed;\n for (const candidate of candidates) {\n if (candidate.shadows_builtin) {\n skipped.push({ name: candidate.name, reason: \"shadows_builtin\" });\n continue;\n }\n let normalized;\n try {\n normalized = normalizeAddTypeInput({ name: candidate.name });\n } catch {\n // A title prefix that does not normalize to a valid type token (rare,\n // given the inference pattern) is skipped rather than aborting the batch.\n skipped.push({ name: candidate.name, reason: \"invalid_type_token\" });\n continue;\n }\n const upsert = upsertItemType(nextFile, normalized);\n nextFile = upsert.file;\n (upsert.replaced ? replaced : registered).push(upsert.definition.name);\n }\n definitionsCount = nextFile.definitions.length;\n await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));\n await ensureTypeFolderScaffold(\n pmRoot,\n nextFile.definitions.filter(\n (definition) =>\n registered.includes(definition.name) ||\n replaced.includes(definition.name),\n ),\n warnings,\n \"schema:infer-types-folder\",\n );\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: typesPath,\n scope: \"project\",\n op: \"schema:infer-types\",\n })),\n );\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"infer-types\",\n applied: true,\n min_count: minCount,\n candidates,\n registered,\n replaced,\n skipped,\n file: {\n path: typesPath,\n definitions: definitionsCount,\n },\n warnings: finalizeWarnings(warnings),\n generated_at: nowIso(),\n };\n}\n\n/** Implements format schema add type human for the public runtime surface of this module. */\nexport function formatSchemaAddTypeHuman(result: SchemaAddTypeResult): string {\n const verb = result.replaced ? \"Updated\" : \"Registered\";\n const aliasSuffix =\n result.type.aliases && result.type.aliases.length > 0\n ? ` (aliases: ${result.type.aliases.join(\", \")})`\n : \"\";\n return `${verb} custom item type \"${result.type.name}\"${aliasSuffix} in ${result.file.path}. Run: pm create \"${escapeForDoubleQuotes(result.type.name)}\" \"<title>\"`;\n}\n\n/** Implements format schema remove type human for the public runtime surface of this module. */\nexport function formatSchemaRemoveTypeHuman(\n result: SchemaRemoveTypeResult,\n): string {\n if (!result.removed) {\n return `No custom item type matched; nothing removed from ${result.file.path}.`;\n }\n const name = result.type?.name ?? \"(unknown)\";\n return `Removed custom item type \"${name}\" from ${result.file.path}.`;\n}\n\n/** Implements format schema add status human for the public runtime surface of this module. */\nexport function formatSchemaAddStatusHuman(\n result: SchemaAddStatusResult,\n): string {\n const verb = result.replaced ? \"Updated\" : \"Registered\";\n const roleSuffix =\n result.status.roles && result.status.roles.length > 0\n ? ` (roles: ${result.status.roles.join(\", \")})`\n : \"\";\n const aliasSuffix =\n result.status.aliases && result.status.aliases.length > 0\n ? ` (aliases: ${result.status.aliases.join(\", \")})`\n : \"\";\n return `${verb} status \"${result.status.id}\"${roleSuffix}${aliasSuffix} in ${result.file.path}.`;\n}\n\n/** Implements format schema remove status human for the public runtime surface of this module. */\nexport function formatSchemaRemoveStatusHuman(\n result: SchemaRemoveStatusResult,\n): string {\n if (!result.removed) {\n return `No custom status matched; nothing removed from ${result.file.path}.`;\n }\n const id = result.status?.id ?? \"(unknown)\";\n return `Removed custom status \"${id}\" from ${result.file.path}.`;\n}\n\n/** Implements format schema list human for the public runtime surface of this module. */\nexport function formatSchemaListHuman(result: SchemaListResult): string {\n const lines = [\n `Schema types: ${result.counts.total} total (${result.counts.builtin} builtin, ${result.counts.custom} custom, ${result.counts.extension} extension)`,\n ];\n for (const [label, entries] of [\n [\"builtin\", result.builtin],\n [\"custom\", result.custom],\n [\"extension\", result.extension],\n ] as const) {\n if (entries.length === 0) {\n continue;\n }\n lines.push(`${label}: ${entries.map((entry) => entry.name).join(\", \")}`);\n }\n lines.push(\n `statuses: ${result.statuses.counts.total} total (${result.statuses.counts.builtin} builtin, ${result.statuses.counts.custom} custom)`,\n );\n for (const [label, entries] of [\n [\"builtin statuses\", result.statuses.builtin],\n [\"custom statuses\", result.statuses.custom],\n ] as const) {\n if (entries.length === 0) {\n continue;\n }\n lines.push(`${label}: ${entries.map((entry) => entry.id).join(\", \")}`);\n }\n lines.push(`custom fields: ${result.fields.counts.total} total`);\n if (result.fields.custom.length > 0) {\n lines.push(\n `fields: ${result.fields.custom.map((field) => `${field.key} (${field.type}, ${field.cli_flag})`).join(\", \")}`,\n );\n }\n lines.push(`Inspect one: pm schema show <Type>`);\n lines.push(`Inspect one status: pm schema show-status <status>`);\n lines.push(`Inspect one field: pm schema show-field <key>`);\n return lines.join(\"\\n\");\n}\n\n/** Implements format schema show human for the public runtime surface of this module. */\nexport function formatSchemaShowHuman(result: SchemaShowResult): string {\n const parts = [\n `type: ${result.type.name}`,\n `source: ${result.type.source}`,\n `folder: ${result.type.folder}`,\n ];\n if (result.type.default_status) {\n parts.push(`default_status: ${result.type.default_status}`);\n }\n if (result.type.aliases.length > 0) {\n parts.push(`aliases: ${result.type.aliases.join(\", \")}`);\n }\n if (result.type.description) {\n parts.push(`description: ${result.type.description}`);\n }\n if (result.type.options.length > 0) {\n parts.push(\n `options: ${result.type.options.map((option) => option.key).join(\", \")}`,\n );\n }\n return parts.join(\"\\n\");\n}\n\n/** Implements format schema show status human for the public runtime surface of this module. */\nexport function formatSchemaShowStatusHuman(\n result: SchemaShowStatusResult,\n): string {\n const parts = [\n `status: ${result.status.id}`,\n `source: ${result.status.source}`,\n ];\n if (result.status.roles.length > 0) {\n parts.push(`roles: ${result.status.roles.join(\", \")}`);\n }\n if (result.status.aliases.length > 0) {\n parts.push(`aliases: ${result.status.aliases.join(\", \")}`);\n }\n if (result.status.description) {\n parts.push(`description: ${result.status.description}`);\n }\n if (typeof result.status.order === \"number\") {\n parts.push(`order: ${result.status.order}`);\n }\n return parts.join(\"\\n\");\n}\n\nfunction formatFieldSummaryLine(field: SchemaFieldSummary): string {\n const flags: string[] = [];\n if (field.required) {\n flags.push(\"required\");\n }\n if (field.required_on_create) {\n flags.push(\"required_on_create\");\n }\n if (!field.allow_unset) {\n flags.push(\"no_unset\");\n }\n const flagSuffix = flags.length > 0 ? ` [${flags.join(\", \")}]` : \"\";\n return `${field.key} (${field.type}) ${field.cli_flag} commands=${field.commands.join(\"/\")}${flagSuffix}`;\n}\n\n/** Implements format schema add field human for the public runtime surface of this module. */\nexport function formatSchemaAddFieldHuman(\n result: SchemaAddFieldResult,\n): string {\n const verb = result.replaced ? \"Updated\" : \"Registered\";\n return `${verb} custom field \"${result.field.key}\" in ${result.file.path}. Use it: pm create \"<title>\" --${(result.field.cli_flag ?? result.field.key).replaceAll(\"_\", \"-\")} <value>`;\n}\n\n/** Implements format schema remove field human for the public runtime surface of this module. */\nexport function formatSchemaRemoveFieldHuman(\n result: SchemaRemoveFieldResult,\n): string {\n if (!result.removed) {\n return `No custom field matched; nothing removed from ${result.file.path}.`;\n }\n const key = result.field?.key ?? \"(unknown)\";\n return `Removed custom field \"${key}\" from ${result.file.path}.`;\n}\n\n/** Implements format schema list fields human for the public runtime surface of this module. */\nexport function formatSchemaListFieldsHuman(\n result: SchemaListFieldsResult,\n): string {\n const lines = [`Custom fields: ${result.counts.total} total`];\n for (const field of result.fields) {\n lines.push(` ${formatFieldSummaryLine(field)}`);\n }\n lines.push(`Inspect one: pm schema show-field <key>`);\n return lines.join(\"\\n\");\n}\n\n/** Implements format schema show field human for the public runtime surface of this module. */\nexport function formatSchemaShowFieldHuman(\n result: SchemaShowFieldResult,\n): string {\n const field = result.field;\n const parts = [\n `field: ${field.key}`,\n `type: ${field.type}`,\n `cli_flag: ${field.cli_flag}`,\n `commands: ${field.commands.join(\", \")}`,\n ];\n if (field.cli_aliases.length > 0) {\n parts.push(`cli_aliases: ${field.cli_aliases.join(\", \")}`);\n }\n if (field.description) {\n parts.push(`description: ${field.description}`);\n }\n if (field.required) {\n parts.push(`required: true`);\n }\n if (field.required_on_create) {\n parts.push(`required_on_create: true`);\n }\n if (!field.allow_unset) {\n parts.push(`allow_unset: false`);\n }\n if (field.required_types.length > 0) {\n parts.push(`required_types: ${field.required_types.join(\", \")}`);\n }\n return parts.join(\"\\n\");\n}\n\n/** Implements format schema apply preset human for the public runtime surface of this module. */\nexport function formatSchemaApplyPresetHuman(\n result: SchemaApplyPresetResult,\n): string {\n const registered =\n result.registered.length > 0\n ? `registered: ${result.registered.join(\", \")}`\n : \"\";\n const replaced =\n result.replaced.length > 0 ? `updated: ${result.replaced.join(\", \")}` : \"\";\n const detail = [registered, replaced]\n .filter((part) => part.length > 0)\n .join(\"; \");\n return `Applied \"${result.preset}\" type preset to ${result.file.path}${detail.length > 0 ? ` (${detail})` : \"\"}.`;\n}\n\n/** Implements format schema infer types human for the public runtime surface of this module. */\nexport function formatSchemaInferTypesHuman(\n result: SchemaAddTypeInferResult,\n): string {\n if (result.candidates.length === 0) {\n return `No title-prefix conventions found with at least ${result.min_count} items. Lower the threshold with --min-count <n>.`;\n }\n const lines = result.applied\n ? [\n `Inferred and registered custom types from title prefixes (min-count ${result.min_count}):`,\n ]\n : [\n `Inferred custom type candidates from title prefixes (min-count ${result.min_count}, dry-run):`,\n ];\n for (const candidate of result.candidates) {\n const note = candidate.shadows_builtin\n ? \" [shadows built-in, skipped]\"\n : \"\";\n lines.push(\n ` ${candidate.name} <- \"${candidate.prefix}\" (${candidate.count} items)${note}`,\n );\n }\n if (!result.applied) {\n lines.push(`Re-run with --apply to register the non-shadowing candidates.`);\n } else {\n if (result.registered.length > 0) {\n lines.push(`registered: ${result.registered.join(\", \")}`);\n }\n if (result.replaced.length > 0) {\n lines.push(`updated: ${result.replaced.join(\", \")}`);\n }\n }\n return lines.join(\"\\n\");\n}\n\n/* c8 ignore stop */\n\n/** Re-export so register-mutation can surface the hint in usage examples without importing the core module directly. */\nexport { buildInvalidTypeHint };\n\n/** Public contract for test only schema command, shared by SDK and presentation-layer consumers. */\nexport const _testOnlySchemaCommand = {\n toAuthor,\n workflowSlotsReferencing,\n};\n", "/**\n * @module core/schema/type-inference\n *\n * Resolves configurable schema, fields, statuses, and workflows for Type Inference.\n */\nimport { matchBuiltinTypeName } from \"./item-types-file.js\";\n\n/**\n * Pure logic for `pm schema add-type --infer`: scan existing item titles for\n * stable `PREFIX-`/`PREFIX:` conventions and propose them as custom item types.\n * The CLI command file (schema.ts) owns IO and the optional registration; this\n * module only derives candidates from a list of titles so it is fully testable\n * and coverage-gated to 100%.\n *\n * Conventions recognized (case-insensitive, first run wins per title):\n * - `INFRA- ...` / `SECURITY-...` (hyphen-delimited prefix)\n * - `BUG: ...` / `SPIKE: ...` (colon-delimited prefix)\n * The prefix token must be a letter-led identifier of letters, digits, and\n * internal hyphens/underscores so it maps cleanly to a single PascalCase type\n * name. Purely numeric or sequence-style prefixes (e.g. `S001-`, `E12-`) are\n * intentionally skipped: they index items, they are not type boundaries.\n */\n\nconst PREFIX_PATTERN = /^([A-Za-z][A-Za-z0-9_-]*?)\\s*[-:]\\s+\\S/;\n\n/** Documents the inferred type candidate payload exchanged by command, SDK, and package integrations. */\nexport interface InferredTypeCandidate {\n /** Suggested PascalCase type name derived from the prefix. */\n name: string;\n /** The normalized prefix token (lowercase) the items share. */\n prefix: string;\n /** How many scanned titles carry this prefix. */\n count: number;\n /** A few example titles (capped) for human/agent review. */\n examples: string[];\n /** True when `name` already resolves to a reserved built-in type. */\n shadows_builtin: boolean;\n}\n\n/** Documents the infer types options payload exchanged by command, SDK, and package integrations. */\nexport interface InferTypesOptions {\n /** Minimum number of titles that must share a prefix to surface it (default 10). */\n minCount?: number;\n /** Maximum example titles retained per candidate (default 3). */\n maxExamples?: number;\n}\n\n/** Extracts the leading prefix token from a title, or undefined when the title has no stable letter-led `PREFIX-`/`PREFIX:` convention. */\nexport function extractTitlePrefix(title: string): string | undefined {\n const match = PREFIX_PATTERN.exec(title.trim());\n if (!match) {\n return undefined;\n }\n const token = match[1];\n // Reject single-character prefixes (e.g. \"S-\", \"E-\"): they are sequence/index\n // markers far more often than genuine type boundaries.\n if (token.length < 2) {\n return undefined;\n }\n // Reject sequence/index-style prefixes — a single leading letter followed by\n // only digits (e.g. \"S001-\", \"E12-\", \"V1-\"). These index items rather than\n // mark a type boundary, matching the convention documented above.\n if (/^[A-Za-z]\\d+$/.test(token)) {\n return undefined;\n }\n return token.toLowerCase();\n}\n\n/** Converts a normalized prefix token into a PascalCase type name. Internal hyphen/underscore runs become word boundaries; each word is capitalized. */\nexport function prefixToTypeName(prefix: string): string {\n return prefix\n .split(/[-_]+/)\n .filter((segment) => segment.length > 0)\n .map(\n (segment) =>\n `${segment.slice(0, 1).toUpperCase()}${segment.slice(1).toLowerCase()}`,\n )\n .join(\"\");\n}\n\n/** Scans titles for shared prefix conventions and returns candidate custom types, sorted by descending frequency then name. Only prefixes carried by at least `minCount` titles are returned. */\nexport function inferTypesFromTitles(\n titles: string[],\n options: InferTypesOptions = {},\n): InferredTypeCandidate[] {\n const minCount =\n typeof options.minCount === \"number\" && options.minCount > 0\n ? Math.trunc(options.minCount)\n : 10;\n const maxExamples =\n typeof options.maxExamples === \"number\" && options.maxExamples > 0\n ? Math.trunc(options.maxExamples)\n : 3;\n const byPrefix = new Map<string, { count: number; examples: string[] }>();\n for (const rawTitle of titles) {\n const title = typeof rawTitle === \"string\" ? rawTitle.trim() : \"\";\n if (title.length === 0) {\n continue;\n }\n const prefix = extractTitlePrefix(title);\n if (prefix === undefined) {\n continue;\n }\n const bucket = byPrefix.get(prefix) ?? { count: 0, examples: [] };\n bucket.count += 1;\n if (bucket.examples.length < maxExamples) {\n bucket.examples.push(title);\n }\n byPrefix.set(prefix, bucket);\n }\n const candidates: InferredTypeCandidate[] = [];\n for (const [prefix, bucket] of byPrefix.entries()) {\n if (bucket.count < minCount) {\n continue;\n }\n const name = prefixToTypeName(prefix);\n candidates.push({\n name,\n prefix,\n count: bucket.count,\n examples: bucket.examples,\n shadows_builtin: matchBuiltinTypeName(name) !== undefined,\n });\n }\n candidates.sort(\n (left, right) =>\n right.count - left.count || left.name.localeCompare(right.name),\n );\n return candidates;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,UAAU;AACjB,SAAS,aAAa;;;;;;;;;;ACiBtB,IAAM,iBAAiB;AAyBjB,SAAU,mBAAmB,OAAa;AAC9C,QAAM,QAAQ,eAAe,KAAK,MAAM,KAAI,CAAE;AAC9C,MAAI,CAAC,OAAO;AACV,WAAO;EACT;AACA,QAAM,QAAQ,MAAM,CAAC;AAGrB,MAAI,MAAM,SAAS,G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