@unbrained/pm-cli 2026.6.16 → 2026.6.17

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.
Files changed (439) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cli/commands/completion.js +96 -10
  3. package/dist/cli/commands/completion.js.map +1 -1
  4. package/dist/cli/commands/create.d.ts +2 -0
  5. package/dist/cli/commands/create.js +34 -13
  6. package/dist/cli/commands/create.js.map +1 -1
  7. package/dist/cli/commands/index.d.ts +3 -1
  8. package/dist/cli/commands/index.js +5 -3
  9. package/dist/cli/commands/index.js.map +1 -1
  10. package/dist/cli/commands/init.d.ts +2 -1
  11. package/dist/cli/commands/init.js +14 -61
  12. package/dist/cli/commands/init.js.map +1 -1
  13. package/dist/cli/commands/lifecycle-transitions.d.ts +23 -0
  14. package/dist/cli/commands/lifecycle-transitions.js +41 -0
  15. package/dist/cli/commands/lifecycle-transitions.js.map +1 -0
  16. package/dist/cli/commands/linked-artifacts.d.ts +5 -0
  17. package/dist/cli/commands/linked-artifacts.js +18 -4
  18. package/dist/cli/commands/linked-artifacts.js.map +1 -1
  19. package/dist/cli/commands/recurrence-parsers.d.ts +9 -0
  20. package/dist/cli/commands/recurrence-parsers.js +19 -2
  21. package/dist/cli/commands/recurrence-parsers.js.map +1 -1
  22. package/dist/cli/commands/repeatable-metadata-parsers.js +28 -4
  23. package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -1
  24. package/dist/cli/commands/scheduling-shortcuts.d.ts +43 -0
  25. package/dist/cli/commands/scheduling-shortcuts.js +87 -0
  26. package/dist/cli/commands/scheduling-shortcuts.js.map +1 -0
  27. package/dist/cli/commands/schema.d.ts +134 -2
  28. package/dist/cli/commands/schema.js +482 -3
  29. package/dist/cli/commands/schema.js.map +1 -1
  30. package/dist/cli/commands/update.js +19 -5
  31. package/dist/cli/commands/update.js.map +1 -1
  32. package/dist/cli/help-content.js +26 -2
  33. package/dist/cli/help-content.js.map +1 -1
  34. package/dist/cli/main.d.ts +19 -0
  35. package/dist/cli/main.js +40 -2
  36. package/dist/cli/main.js.map +1 -1
  37. package/dist/cli/register-mutation.js +168 -62
  38. package/dist/cli/register-mutation.js.map +1 -1
  39. package/dist/cli/register-operations.js +103 -2
  40. package/dist/cli/register-operations.js.map +1 -1
  41. package/dist/cli-bundle/chunks/activity-PZYSZA26.js +18 -0
  42. package/dist/cli-bundle/chunks/{activity-MJGTX4LO.js → activity-SFM4THAU.js} +11 -11
  43. package/dist/cli-bundle/chunks/{aggregate-OUGCDFNC.js → aggregate-Y5ADDKBM.js} +10 -10
  44. package/dist/cli-bundle/chunks/{aggregate-MH3GROKB.js → aggregate-YTAUQLRW.js} +10 -10
  45. package/dist/cli-bundle/chunks/{append-VCRUG2W6.js → append-4M7OVV7M.js} +8 -8
  46. package/dist/cli-bundle/chunks/{append-2Q4BPUBW.js → append-HSPK4L4V.js} +8 -8
  47. package/dist/cli-bundle/chunks/{chunk-F2GC6L3N.js → chunk-26BM6YLO.js} +3 -3
  48. package/dist/cli-bundle/chunks/{chunk-ILHLIA47.js → chunk-2C6FU3D3.js} +3 -3
  49. package/dist/cli-bundle/chunks/{chunk-B5Q7XC4K.js → chunk-2OPYLXDO.js} +4 -4
  50. package/dist/cli-bundle/chunks/{chunk-CBMETQ2U.js → chunk-2S46FKLB.js} +5 -5
  51. package/dist/cli-bundle/chunks/{chunk-MJZUZ2QE.js → chunk-2TMKMTEI.js} +3 -3
  52. package/dist/cli-bundle/chunks/{chunk-M23HXJL3.js → chunk-2VH7DFSJ.js} +2 -2
  53. package/dist/cli-bundle/chunks/{chunk-BJWTFOZM.js → chunk-3ENF4NO4.js} +8 -8
  54. package/dist/cli-bundle/chunks/{chunk-7EILPFMA.js → chunk-3GR2HTYY.js} +2 -2
  55. package/dist/cli-bundle/chunks/{chunk-764O7EUA.js → chunk-3R3FYCBV.js} +3 -3
  56. package/dist/cli-bundle/chunks/{chunk-G3CEIXTV.js → chunk-3UKJX3RP.js} +27 -15
  57. package/dist/cli-bundle/chunks/chunk-3UKJX3RP.js.map +7 -0
  58. package/dist/cli-bundle/chunks/chunk-4RTLBTYS.js +83 -0
  59. package/dist/cli-bundle/chunks/chunk-4RTLBTYS.js.map +1 -0
  60. package/dist/cli-bundle/chunks/{chunk-4VLB4JH2.js → chunk-5FDYWOJT.js} +4 -3
  61. package/dist/cli-bundle/chunks/{chunk-WZCQVABQ.js → chunk-5XGWFUW2.js} +2 -2
  62. package/dist/cli-bundle/chunks/{chunk-667XI4UJ.js → chunk-6BD77FGL.js} +8 -8
  63. package/dist/cli-bundle/chunks/{chunk-KZYVTOG5.js → chunk-6HF6CIY2.js} +9 -9
  64. package/dist/cli-bundle/chunks/{chunk-XLNNCKTN.js → chunk-6PBPD4MN.js} +8 -8
  65. package/dist/cli-bundle/chunks/{chunk-Z3MUNQRV.js → chunk-6VFUEGOA.js} +4 -3
  66. package/dist/cli-bundle/chunks/{chunk-HDIDUME4.js → chunk-AAOXSPAE.js} +19 -67
  67. package/dist/cli-bundle/chunks/chunk-AAOXSPAE.js.map +1 -0
  68. package/dist/cli-bundle/chunks/{chunk-O46LTCXQ.js → chunk-AJCQ5GT6.js} +4 -4
  69. package/dist/cli-bundle/chunks/{chunk-7ZGKNHUL.js → chunk-ALTGYHN3.js} +2 -2
  70. package/dist/cli-bundle/chunks/{chunk-PZD7WPUC.js → chunk-AOJQL33L.js} +28 -16
  71. package/dist/cli-bundle/chunks/chunk-AOJQL33L.js.map +1 -0
  72. package/dist/cli-bundle/chunks/{chunk-SY4PZWIZ.js → chunk-AXLDUGXA.js} +2 -2
  73. package/dist/cli-bundle/chunks/{chunk-YGRPBFMA.js → chunk-BITCVGHT.js} +2 -2
  74. package/dist/cli-bundle/chunks/{chunk-UUKORJSN.js → chunk-CGQTFWYI.js} +4 -4
  75. package/dist/cli-bundle/chunks/{chunk-LV5FFQ7M.js → chunk-CHM2VFVL.js} +3 -1
  76. package/dist/cli-bundle/chunks/{chunk-7AGIXLNK.js → chunk-COVLE33A.js} +3 -3
  77. package/dist/cli-bundle/chunks/{chunk-SY4GKIWT.js → chunk-DDNBWH4W.js} +91 -20
  78. package/dist/cli-bundle/chunks/chunk-DDNBWH4W.js.map +1 -0
  79. package/dist/cli-bundle/chunks/{chunk-2JEGCDYT.js → chunk-F5MSD5HE.js} +2 -2
  80. package/dist/cli-bundle/chunks/{chunk-NIQHNDBZ.js → chunk-FAXB6F6R.js} +7 -7
  81. package/dist/cli-bundle/chunks/{chunk-7K2MXFMX.js → chunk-FPDK5BZQ.js} +15 -14
  82. package/dist/cli-bundle/chunks/chunk-FPDK5BZQ.js.map +1 -0
  83. package/dist/cli-bundle/chunks/{chunk-3XOXWOGA.js → chunk-FPY2TOFI.js} +125 -9
  84. package/dist/cli-bundle/chunks/chunk-FPY2TOFI.js.map +1 -0
  85. package/dist/cli-bundle/chunks/{chunk-TIRZIQRP.js → chunk-G2MOUCTU.js} +5 -5
  86. package/dist/cli-bundle/chunks/{chunk-F7WSO5UX.js → chunk-G57RHEGP.js} +33 -4
  87. package/dist/cli-bundle/chunks/chunk-G57RHEGP.js.map +1 -0
  88. package/dist/cli-bundle/chunks/{chunk-GAVE4MYM.js → chunk-IROHIK2T.js} +3 -3
  89. package/dist/cli-bundle/chunks/{chunk-ZJRDVYZI.js → chunk-JZHL4E3Q.js} +4 -4
  90. package/dist/cli-bundle/chunks/{chunk-4KBK4BA3.js → chunk-KA22USXD.js} +14 -13
  91. package/dist/cli-bundle/chunks/chunk-KA22USXD.js.map +7 -0
  92. package/dist/cli-bundle/chunks/{chunk-KQ3LAMDO.js → chunk-KBC4O7SY.js} +18 -66
  93. package/dist/cli-bundle/chunks/chunk-KBC4O7SY.js.map +7 -0
  94. package/dist/cli-bundle/chunks/{chunk-UBMCSJXX.js → chunk-KCAGIH6K.js} +3 -3
  95. package/dist/cli-bundle/chunks/{chunk-656HPQPO.js → chunk-KO3VM5GS.js} +9 -9
  96. package/dist/cli-bundle/chunks/{chunk-OY3P2I6B.js → chunk-LNH5Q32E.js} +2 -2
  97. package/dist/cli-bundle/chunks/{chunk-GQ4JKNMV.js → chunk-LORM3M2I.js} +3 -3
  98. package/dist/cli-bundle/chunks/{chunk-OCTQJP42.js → chunk-M4AVU7VC.js} +7 -7
  99. package/dist/cli-bundle/chunks/{chunk-3WAULYOY.js → chunk-MIBX6ZRN.js} +3 -3
  100. package/dist/cli-bundle/chunks/{chunk-FXNT5LPX.js → chunk-MMF2E3FM.js} +7 -7
  101. package/dist/cli-bundle/chunks/{chunk-AERT7KT3.js → chunk-MORZOR7W.js} +21 -8
  102. package/dist/cli-bundle/chunks/chunk-MORZOR7W.js.map +1 -0
  103. package/dist/cli-bundle/chunks/{chunk-IMQG4VR3.js → chunk-MUTUZ2HD.js} +9 -9
  104. package/dist/cli-bundle/chunks/{chunk-7L5VOUYP.js → chunk-OGXEBTX3.js} +32 -3
  105. package/dist/cli-bundle/chunks/{chunk-7L5VOUYP.js.map → chunk-OGXEBTX3.js.map} +2 -2
  106. package/dist/cli-bundle/chunks/{chunk-NCIBNERT.js → chunk-OOIH6J5T.js} +2 -2
  107. package/dist/cli-bundle/chunks/{chunk-II7OGE3V.js → chunk-OSBJPPX3.js} +5 -5
  108. package/dist/cli-bundle/chunks/{chunk-HPELHUTG.js → chunk-PJS3WDO2.js} +5 -5
  109. package/dist/cli-bundle/chunks/{chunk-6NQXMGYU.js → chunk-QGPE2H6Z.js} +5 -5
  110. package/dist/cli-bundle/chunks/{chunk-ASM4DVRW.js → chunk-QVTFFLR2.js} +2 -2
  111. package/dist/cli-bundle/chunks/{chunk-FTAZLAR7.js → chunk-QW2F6ARZ.js} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-A576QZDL.js → chunk-QXC3LWB7.js} +3 -3
  113. package/dist/cli-bundle/chunks/{chunk-6BV7ENQL.js → chunk-QXMXRPX5.js} +2 -2
  114. package/dist/cli-bundle/chunks/{chunk-SPYPC5CB.js → chunk-R4AKUPKI.js} +2 -2
  115. package/dist/cli-bundle/chunks/{chunk-UAR2VNCK.js → chunk-RASR23HV.js} +2 -2
  116. package/dist/cli-bundle/chunks/{chunk-YXTLI4XP.js → chunk-SCDCNGCV.js} +7 -7
  117. package/dist/cli-bundle/chunks/{chunk-2IUJBMKS.js → chunk-SCS5PVAA.js} +8 -8
  118. package/dist/cli-bundle/chunks/{chunk-KTVETP66.js → chunk-SJCMTOEU.js} +3 -1
  119. package/dist/cli-bundle/chunks/{chunk-L6FJPOT4.js → chunk-SO2ES46D.js} +8 -8
  120. package/dist/cli-bundle/chunks/{chunk-GYMG7AG6.js → chunk-TBV33CB4.js} +3 -3
  121. package/dist/cli-bundle/chunks/chunk-TEFEXQWI.js +86 -0
  122. package/dist/cli-bundle/chunks/chunk-TEFEXQWI.js.map +7 -0
  123. package/dist/cli-bundle/chunks/{chunk-OLTYNVJR.js → chunk-TWBDDVIF.js} +20 -7
  124. package/dist/cli-bundle/chunks/chunk-TWBDDVIF.js.map +7 -0
  125. package/dist/cli-bundle/chunks/{chunk-XNOY7TCB.js → chunk-UGUJ2UOR.js} +9 -9
  126. package/dist/cli-bundle/chunks/{chunk-E6J2PEK6.js → chunk-UN6P3IJ4.js} +3 -3
  127. package/dist/cli-bundle/chunks/{chunk-ZONXMSVB.js → chunk-V2GYOMEX.js} +2 -2
  128. package/dist/cli-bundle/chunks/{chunk-T5VU7ROQ.js → chunk-VF3KQGNY.js} +4 -4
  129. package/dist/cli-bundle/chunks/{chunk-RKKIH2ZQ.js → chunk-VHG6LUKR.js} +4 -4
  130. package/dist/cli-bundle/chunks/{chunk-H6EH6ENJ.js → chunk-VXHMQDXA.js} +126 -10
  131. package/dist/cli-bundle/chunks/chunk-VXHMQDXA.js.map +7 -0
  132. package/dist/cli-bundle/chunks/{chunk-G2YVUY7I.js → chunk-VXRFAE7W.js} +2 -2
  133. package/dist/cli-bundle/chunks/{chunk-Q5RLUCP3.js → chunk-WQRL4COW.js} +8 -8
  134. package/dist/cli-bundle/chunks/{chunk-IQVB3YDD.js → chunk-XESAPVZ4.js} +99 -21
  135. package/dist/cli-bundle/chunks/chunk-XESAPVZ4.js.map +7 -0
  136. package/dist/cli-bundle/chunks/{chunk-TUB3DZAZ.js → chunk-YLAW3FZN.js} +5 -5
  137. package/dist/cli-bundle/chunks/{claim-NEO7AGWH.js → claim-WGAWJCPY.js} +10 -10
  138. package/dist/cli-bundle/chunks/{claim-4APLUXJW.js → claim-ZI6P4LMU.js} +10 -10
  139. package/dist/cli-bundle/chunks/close-I7PRQ5G7.js +13 -0
  140. package/dist/cli-bundle/chunks/{close-3QABBNGU.js → close-JMVVSIQE.js} +8 -8
  141. package/dist/cli-bundle/chunks/{close-many-MIZLTYGL.js → close-many-IKPJXVOZ.js} +15 -15
  142. package/dist/cli-bundle/chunks/{close-many-Q7Y5AHQI.js → close-many-TXABDCSJ.js} +15 -15
  143. package/dist/cli-bundle/chunks/{comments-DAIQPOMU.js → comments-RLWR2S7W.js} +10 -10
  144. package/dist/cli-bundle/chunks/{comments-IWFSVM4P.js → comments-YAMXKHUX.js} +10 -10
  145. package/dist/cli-bundle/chunks/{config-PXTMAYV3.js → config-7ICYC2WU.js} +47 -9
  146. package/dist/cli-bundle/chunks/config-7ICYC2WU.js.map +7 -0
  147. package/dist/cli-bundle/chunks/{config-IOJELD6O.js → config-NGWN3EXC.js} +48 -10
  148. package/dist/cli-bundle/chunks/config-NGWN3EXC.js.map +1 -0
  149. package/dist/cli-bundle/chunks/{context-QHJSCJW4.js → context-K6QAHN5H.js} +13 -13
  150. package/dist/cli-bundle/chunks/{context-XZS2VFKU.js → context-VGXOOAH2.js} +13 -13
  151. package/dist/cli-bundle/chunks/{contracts-B7U4OJTV.js → contracts-KJGY2AQA.js} +51 -11
  152. package/dist/cli-bundle/chunks/contracts-KJGY2AQA.js.map +1 -0
  153. package/dist/cli-bundle/chunks/{contracts-NSBVLXQ3.js → contracts-KMA6OJY7.js} +50 -10
  154. package/dist/cli-bundle/chunks/{contracts-B7U4OJTV.js.map → contracts-KMA6OJY7.js.map} +7 -1
  155. package/dist/cli-bundle/chunks/{copy-Q64T5FD4.js → copy-Q2PPU4AY.js} +7 -7
  156. package/dist/cli-bundle/chunks/{copy-SG34LCMU.js → copy-SC6UF3PI.js} +7 -7
  157. package/dist/cli-bundle/chunks/{create-IPAX2SNL.js → create-76FE7JVF.js} +14 -14
  158. package/dist/cli-bundle/chunks/create-RTRFW6RE.js +30 -0
  159. package/dist/cli-bundle/chunks/{delete-VH3L7DZ6.js → delete-T6DJSUJI.js} +7 -7
  160. package/dist/cli-bundle/chunks/{delete-TLXR7LJ2.js → delete-XFUX533E.js} +7 -7
  161. package/dist/cli-bundle/chunks/{deps-J3HBBLDB.js → deps-5GWMMS6D.js} +7 -7
  162. package/dist/cli-bundle/chunks/{deps-XV6JJ6IN.js → deps-MCCU633S.js} +7 -7
  163. package/dist/cli-bundle/chunks/{docs-GWDEB7JH.js → docs-HE3HCQ4S.js} +9 -9
  164. package/dist/cli-bundle/chunks/{docs-RCLNSKID.js → docs-SXMOABHR.js} +9 -9
  165. package/dist/cli-bundle/chunks/{extension-7KO2NX2A.js → extension-E23K4QRR.js} +5 -5
  166. package/dist/cli-bundle/chunks/{extension-5RN65LHT.js → extension-PMD3XMLN.js} +5 -5
  167. package/dist/cli-bundle/chunks/{files-3TCQHUHA.js → files-2RSWGPEU.js} +9 -9
  168. package/dist/cli-bundle/chunks/{files-5FDUPSEA.js → files-ZWFJFWBK.js} +9 -9
  169. package/dist/cli-bundle/chunks/{focus-HQXBYPKM.js → focus-KTTB3P3F.js} +8 -8
  170. package/dist/cli-bundle/chunks/{focus-7AQMNRSU.js → focus-ZMDP4FEL.js} +8 -8
  171. package/dist/cli-bundle/chunks/{gc-5B6ABL3Z.js → gc-BXIAKLAH.js} +3 -3
  172. package/dist/cli-bundle/chunks/{gc-2FGKYRJ4.js → gc-C7K6JNUO.js} +3 -3
  173. package/dist/cli-bundle/chunks/{get-FUMVOJQD.js → get-AZQLC4NO.js} +11 -11
  174. package/dist/cli-bundle/chunks/{get-H5BZTW4A.js → get-I65HTAWO.js} +11 -11
  175. package/dist/cli-bundle/chunks/{health-JSVOR6B4.js → health-3MFFPQVZ.js} +13 -13
  176. package/dist/cli-bundle/chunks/{health-LE2ZQGSM.js → health-MYZEOCLI.js} +13 -13
  177. package/dist/cli-bundle/chunks/{history-QO4JVJJP.js → history-73Z6OBFZ.js} +10 -10
  178. package/dist/cli-bundle/chunks/history-BIPHVUMF.js +20 -0
  179. package/dist/cli-bundle/chunks/{history-compact-ID74DOUI.js → history-compact-24VQ63A3.js} +11 -11
  180. package/dist/cli-bundle/chunks/{history-compact-SDFRPZ4V.js → history-compact-UIAR2OI4.js} +11 -11
  181. package/dist/cli-bundle/chunks/{history-redact-Z4P5MM3G.js → history-redact-7YCXEWJD.js} +11 -11
  182. package/dist/cli-bundle/chunks/history-redact-WZZ6GZ2Z.js +21 -0
  183. package/dist/cli-bundle/chunks/{history-repair-CKE7GLZR.js → history-repair-4NOFFG2W.js} +12 -12
  184. package/dist/cli-bundle/chunks/{history-repair-ANHEYWKF.js → history-repair-GQN2X4TR.js} +12 -12
  185. package/dist/cli-bundle/chunks/init-K34V4PZR.js +20 -0
  186. package/dist/cli-bundle/chunks/{init-K6MSMB37.js → init-TDEDNVMM.js} +10 -9
  187. package/dist/cli-bundle/chunks/{learnings-VIS3NOQV.js → learnings-TV2CTGJ3.js} +10 -10
  188. package/dist/cli-bundle/chunks/{learnings-YYNB64GN.js → learnings-U67FTXPB.js} +10 -10
  189. package/dist/cli-bundle/chunks/{list-UHMA3N2K.js → list-MSHYOCFU.js} +10 -10
  190. package/dist/cli-bundle/chunks/{list-7UE44A2R.js → list-VV57WGUD.js} +10 -10
  191. package/dist/cli-bundle/chunks/{notes-IN3UMA7W.js → notes-EUANWWKD.js} +10 -10
  192. package/dist/cli-bundle/chunks/{notes-2HRMV67I.js → notes-GYVNDAL4.js} +10 -10
  193. package/dist/cli-bundle/chunks/{plan-PAWCCAPW.js → plan-4LF4AV63.js} +14 -14
  194. package/dist/cli-bundle/chunks/{plan-I3SVH7FV.js → plan-W27O6DBS.js} +14 -14
  195. package/dist/cli-bundle/chunks/{register-list-query-OTIK4DVA.js → register-list-query-BXLEHJ7L.js} +18 -18
  196. package/dist/cli-bundle/chunks/{register-list-query-N7Z7RTDM.js → register-list-query-C2MS3BVQ.js} +18 -18
  197. package/dist/cli-bundle/chunks/{register-mutation-UFZK6Q57.js → register-mutation-6UCOEQ6L.js} +179 -74
  198. package/dist/cli-bundle/chunks/register-mutation-6UCOEQ6L.js.map +7 -0
  199. package/dist/cli-bundle/chunks/{register-mutation-XFORLS6D.js → register-mutation-HE73PREP.js} +180 -75
  200. package/dist/cli-bundle/chunks/register-mutation-HE73PREP.js.map +1 -0
  201. package/dist/cli-bundle/chunks/{register-operations-6ZCLKRBG.js → register-operations-L6C32FDA.js} +89 -31
  202. package/dist/cli-bundle/chunks/{register-operations-6ZCLKRBG.js.map → register-operations-L6C32FDA.js.map} +2 -2
  203. package/dist/cli-bundle/chunks/{register-operations-ITE7JTH3.js → register-operations-QQEHEX4P.js} +90 -32
  204. package/dist/cli-bundle/chunks/{register-operations-ITE7JTH3.js.map → register-operations-QQEHEX4P.js.map} +1 -1
  205. package/dist/cli-bundle/chunks/{register-setup-7RKGE4BQ.js → register-setup-A7N4PNT3.js} +15 -15
  206. package/dist/cli-bundle/chunks/{register-setup-7UKEFKT6.js → register-setup-WHG3NBP6.js} +15 -15
  207. package/dist/cli-bundle/chunks/{restore-NNVPBBVJ.js → restore-TSWSULYY.js} +11 -11
  208. package/dist/cli-bundle/chunks/restore-XQXICL3V.js +19 -0
  209. package/dist/cli-bundle/chunks/scheduling-shortcuts-NC46K6BD.js +91 -0
  210. package/dist/cli-bundle/chunks/scheduling-shortcuts-NC46K6BD.js.map +7 -0
  211. package/dist/cli-bundle/chunks/scheduling-shortcuts-UGDPQALY.js +88 -0
  212. package/dist/cli-bundle/chunks/scheduling-shortcuts-UGDPQALY.js.map +1 -0
  213. package/dist/cli-bundle/chunks/{schema-3YKCQ3VO.js → schema-7U7JUYGK.js} +779 -10
  214. package/dist/cli-bundle/chunks/schema-7U7JUYGK.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{schema-3HCLXCFX.js → schema-TSBYSEMW.js} +792 -9
  216. package/dist/cli-bundle/chunks/schema-TSBYSEMW.js.map +7 -0
  217. package/dist/cli-bundle/chunks/{search-NQ42NC6A.js → search-OXLSQKHP.js} +11 -11
  218. package/dist/cli-bundle/chunks/{search-V7PZ2ICH.js → search-T3TOFLOQ.js} +11 -11
  219. package/dist/cli-bundle/chunks/{stats-7KD4PJC5.js → stats-5CLG22YZ.js} +8 -8
  220. package/dist/cli-bundle/chunks/{stats-GRHO6RFB.js → stats-XEMUXS42.js} +8 -8
  221. package/dist/cli-bundle/chunks/{telemetry-TRRYZXWT.js → telemetry-23OPBBZT.js} +4 -4
  222. package/dist/cli-bundle/chunks/{telemetry-H5GLXNG5.js → telemetry-I3D7XZ55.js} +4 -4
  223. package/dist/cli-bundle/chunks/{test-6CZNIIGA.js → test-AROS3LIV.js} +15 -14
  224. package/dist/cli-bundle/chunks/{test-7GVQ3VMN.js → test-CECIMKOA.js} +15 -14
  225. package/dist/cli-bundle/chunks/{test-all-ODVADHV6.js → test-all-4DEQPIXH.js} +17 -16
  226. package/dist/cli-bundle/chunks/{test-all-ODVADHV6.js.map → test-all-4DEQPIXH.js.map} +1 -1
  227. package/dist/cli-bundle/chunks/{test-all-3LF2OZD2.js → test-all-6RO6X3SM.js} +15 -14
  228. package/dist/cli-bundle/chunks/{test-all-3LF2OZD2.js.map → test-all-6RO6X3SM.js.map} +1 -1
  229. package/dist/cli-bundle/chunks/{test-runs-LYT6ZTNQ.js → test-runs-AAXVFWKH.js} +5 -5
  230. package/dist/cli-bundle/chunks/{test-runs-RVP6VWN7.js → test-runs-LYBQSYRC.js} +5 -5
  231. package/dist/cli-bundle/chunks/update-MIWEJC76.js +24 -0
  232. package/dist/cli-bundle/chunks/update-P7I5YSRB.js +28 -0
  233. package/dist/cli-bundle/chunks/{update-many-XSEQJ24X.js → update-many-5B4HLVBK.js} +23 -23
  234. package/dist/cli-bundle/chunks/{update-many-FCU6RKTO.js → update-many-G2QOVZSB.js} +23 -23
  235. package/dist/cli-bundle/chunks/{upgrade-FOB5LHO5.js → upgrade-GFIDL62L.js} +5 -5
  236. package/dist/cli-bundle/chunks/{upgrade-A6TL3INC.js → upgrade-QUQYL7D3.js} +5 -5
  237. package/dist/cli-bundle/chunks/{validate-EHL3MI2V.js → validate-ADDZBMM3.js} +20 -19
  238. package/dist/cli-bundle/chunks/{validate-EHL3MI2V.js.map → validate-ADDZBMM3.js.map} +1 -1
  239. package/dist/cli-bundle/chunks/{validate-7BLDG3AT.js → validate-MAS3H6ZP.js} +22 -21
  240. package/dist/cli-bundle/chunks/{validate-7BLDG3AT.js.map → validate-MAS3H6ZP.js.map} +1 -1
  241. package/dist/cli-bundle/main.js +61 -19
  242. package/dist/cli-bundle/main.js.map +2 -2
  243. package/dist/core/config/nested-settings.js +40 -2
  244. package/dist/core/config/nested-settings.js.map +1 -1
  245. package/dist/core/item/parse.d.ts +32 -0
  246. package/dist/core/item/parse.js +61 -2
  247. package/dist/core/item/parse.js.map +1 -1
  248. package/dist/core/schema/fields-file.d.ts +94 -0
  249. package/dist/core/schema/fields-file.js +317 -0
  250. package/dist/core/schema/fields-file.js.map +1 -0
  251. package/dist/core/schema/type-inference.d.ts +34 -0
  252. package/dist/core/schema/type-inference.js +97 -0
  253. package/dist/core/schema/type-inference.js.map +1 -0
  254. package/dist/core/schema/type-presets.d.ts +30 -0
  255. package/dist/core/schema/type-presets.js +96 -0
  256. package/dist/core/schema/type-presets.js.map +1 -0
  257. package/dist/core/store/front-matter-cache.d.ts +13 -0
  258. package/dist/core/store/front-matter-cache.js +21 -11
  259. package/dist/core/store/front-matter-cache.js.map +1 -1
  260. package/dist/mcp/server.js +51 -4
  261. package/dist/mcp/server.js.map +1 -1
  262. package/dist/mcp/tool-definitions.js +49 -8
  263. package/dist/mcp/tool-definitions.js.map +1 -1
  264. package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
  265. package/dist/sdk/cli-contracts/enum-contracts.js +5 -2
  266. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  267. package/dist/sdk/cli-contracts/tool-parameter-tables.js +46 -5
  268. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  269. package/dist/sdk/cli-contracts.d.ts +3 -0
  270. package/dist/sdk/cli-contracts.js +76 -3
  271. package/dist/sdk/cli-contracts.js.map +1 -1
  272. package/docs/COMMANDS.md +35 -3
  273. package/docs/CONFIGURATION.md +83 -0
  274. package/package.json +1 -1
  275. package/dist/cli-bundle/chunks/activity-5P2KQCTH.js +0 -18
  276. package/dist/cli-bundle/chunks/chunk-3XOXWOGA.js.map +0 -1
  277. package/dist/cli-bundle/chunks/chunk-4KBK4BA3.js.map +0 -7
  278. package/dist/cli-bundle/chunks/chunk-7K2MXFMX.js.map +0 -1
  279. package/dist/cli-bundle/chunks/chunk-AERT7KT3.js.map +0 -1
  280. package/dist/cli-bundle/chunks/chunk-F7WSO5UX.js.map +0 -1
  281. package/dist/cli-bundle/chunks/chunk-G3CEIXTV.js.map +0 -7
  282. package/dist/cli-bundle/chunks/chunk-H6EH6ENJ.js.map +0 -7
  283. package/dist/cli-bundle/chunks/chunk-HDIDUME4.js.map +0 -1
  284. package/dist/cli-bundle/chunks/chunk-IQVB3YDD.js.map +0 -7
  285. package/dist/cli-bundle/chunks/chunk-KQ3LAMDO.js.map +0 -7
  286. package/dist/cli-bundle/chunks/chunk-OLTYNVJR.js.map +0 -7
  287. package/dist/cli-bundle/chunks/chunk-PZD7WPUC.js.map +0 -1
  288. package/dist/cli-bundle/chunks/chunk-SY4GKIWT.js.map +0 -1
  289. package/dist/cli-bundle/chunks/close-ILMZR3D7.js +0 -13
  290. package/dist/cli-bundle/chunks/config-IOJELD6O.js.map +0 -1
  291. package/dist/cli-bundle/chunks/config-PXTMAYV3.js.map +0 -7
  292. package/dist/cli-bundle/chunks/contracts-NSBVLXQ3.js.map +0 -7
  293. package/dist/cli-bundle/chunks/create-F5HZX2S4.js +0 -30
  294. package/dist/cli-bundle/chunks/history-SSXGGTVZ.js +0 -20
  295. package/dist/cli-bundle/chunks/history-redact-VBH44Y7F.js +0 -21
  296. package/dist/cli-bundle/chunks/init-7FBQO77A.js +0 -19
  297. package/dist/cli-bundle/chunks/register-mutation-UFZK6Q57.js.map +0 -7
  298. package/dist/cli-bundle/chunks/register-mutation-XFORLS6D.js.map +0 -1
  299. package/dist/cli-bundle/chunks/restore-XXXLQ2XC.js +0 -19
  300. package/dist/cli-bundle/chunks/schema-3HCLXCFX.js.map +0 -7
  301. package/dist/cli-bundle/chunks/schema-3YKCQ3VO.js.map +0 -1
  302. package/dist/cli-bundle/chunks/update-MPGM6SBE.js +0 -28
  303. package/dist/cli-bundle/chunks/update-UN75XW3C.js +0 -24
  304. /package/dist/cli-bundle/chunks/{activity-5P2KQCTH.js.map → activity-PZYSZA26.js.map} +0 -0
  305. /package/dist/cli-bundle/chunks/{activity-MJGTX4LO.js.map → activity-SFM4THAU.js.map} +0 -0
  306. /package/dist/cli-bundle/chunks/{aggregate-OUGCDFNC.js.map → aggregate-Y5ADDKBM.js.map} +0 -0
  307. /package/dist/cli-bundle/chunks/{aggregate-MH3GROKB.js.map → aggregate-YTAUQLRW.js.map} +0 -0
  308. /package/dist/cli-bundle/chunks/{append-VCRUG2W6.js.map → append-4M7OVV7M.js.map} +0 -0
  309. /package/dist/cli-bundle/chunks/{append-2Q4BPUBW.js.map → append-HSPK4L4V.js.map} +0 -0
  310. /package/dist/cli-bundle/chunks/{chunk-F2GC6L3N.js.map → chunk-26BM6YLO.js.map} +0 -0
  311. /package/dist/cli-bundle/chunks/{chunk-ILHLIA47.js.map → chunk-2C6FU3D3.js.map} +0 -0
  312. /package/dist/cli-bundle/chunks/{chunk-B5Q7XC4K.js.map → chunk-2OPYLXDO.js.map} +0 -0
  313. /package/dist/cli-bundle/chunks/{chunk-CBMETQ2U.js.map → chunk-2S46FKLB.js.map} +0 -0
  314. /package/dist/cli-bundle/chunks/{chunk-MJZUZ2QE.js.map → chunk-2TMKMTEI.js.map} +0 -0
  315. /package/dist/cli-bundle/chunks/{chunk-M23HXJL3.js.map → chunk-2VH7DFSJ.js.map} +0 -0
  316. /package/dist/cli-bundle/chunks/{chunk-BJWTFOZM.js.map → chunk-3ENF4NO4.js.map} +0 -0
  317. /package/dist/cli-bundle/chunks/{chunk-7EILPFMA.js.map → chunk-3GR2HTYY.js.map} +0 -0
  318. /package/dist/cli-bundle/chunks/{chunk-764O7EUA.js.map → chunk-3R3FYCBV.js.map} +0 -0
  319. /package/dist/cli-bundle/chunks/{chunk-4VLB4JH2.js.map → chunk-5FDYWOJT.js.map} +0 -0
  320. /package/dist/cli-bundle/chunks/{chunk-WZCQVABQ.js.map → chunk-5XGWFUW2.js.map} +0 -0
  321. /package/dist/cli-bundle/chunks/{chunk-667XI4UJ.js.map → chunk-6BD77FGL.js.map} +0 -0
  322. /package/dist/cli-bundle/chunks/{chunk-KZYVTOG5.js.map → chunk-6HF6CIY2.js.map} +0 -0
  323. /package/dist/cli-bundle/chunks/{chunk-XLNNCKTN.js.map → chunk-6PBPD4MN.js.map} +0 -0
  324. /package/dist/cli-bundle/chunks/{chunk-Z3MUNQRV.js.map → chunk-6VFUEGOA.js.map} +0 -0
  325. /package/dist/cli-bundle/chunks/{chunk-O46LTCXQ.js.map → chunk-AJCQ5GT6.js.map} +0 -0
  326. /package/dist/cli-bundle/chunks/{chunk-7ZGKNHUL.js.map → chunk-ALTGYHN3.js.map} +0 -0
  327. /package/dist/cli-bundle/chunks/{chunk-SY4PZWIZ.js.map → chunk-AXLDUGXA.js.map} +0 -0
  328. /package/dist/cli-bundle/chunks/{chunk-YGRPBFMA.js.map → chunk-BITCVGHT.js.map} +0 -0
  329. /package/dist/cli-bundle/chunks/{chunk-UUKORJSN.js.map → chunk-CGQTFWYI.js.map} +0 -0
  330. /package/dist/cli-bundle/chunks/{chunk-LV5FFQ7M.js.map → chunk-CHM2VFVL.js.map} +0 -0
  331. /package/dist/cli-bundle/chunks/{chunk-7AGIXLNK.js.map → chunk-COVLE33A.js.map} +0 -0
  332. /package/dist/cli-bundle/chunks/{chunk-2JEGCDYT.js.map → chunk-F5MSD5HE.js.map} +0 -0
  333. /package/dist/cli-bundle/chunks/{chunk-NIQHNDBZ.js.map → chunk-FAXB6F6R.js.map} +0 -0
  334. /package/dist/cli-bundle/chunks/{chunk-TIRZIQRP.js.map → chunk-G2MOUCTU.js.map} +0 -0
  335. /package/dist/cli-bundle/chunks/{chunk-GAVE4MYM.js.map → chunk-IROHIK2T.js.map} +0 -0
  336. /package/dist/cli-bundle/chunks/{chunk-ZJRDVYZI.js.map → chunk-JZHL4E3Q.js.map} +0 -0
  337. /package/dist/cli-bundle/chunks/{chunk-UBMCSJXX.js.map → chunk-KCAGIH6K.js.map} +0 -0
  338. /package/dist/cli-bundle/chunks/{chunk-656HPQPO.js.map → chunk-KO3VM5GS.js.map} +0 -0
  339. /package/dist/cli-bundle/chunks/{chunk-OY3P2I6B.js.map → chunk-LNH5Q32E.js.map} +0 -0
  340. /package/dist/cli-bundle/chunks/{chunk-GQ4JKNMV.js.map → chunk-LORM3M2I.js.map} +0 -0
  341. /package/dist/cli-bundle/chunks/{chunk-OCTQJP42.js.map → chunk-M4AVU7VC.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{chunk-3WAULYOY.js.map → chunk-MIBX6ZRN.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{chunk-FXNT5LPX.js.map → chunk-MMF2E3FM.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{chunk-IMQG4VR3.js.map → chunk-MUTUZ2HD.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{chunk-NCIBNERT.js.map → chunk-OOIH6J5T.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{chunk-II7OGE3V.js.map → chunk-OSBJPPX3.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{chunk-HPELHUTG.js.map → chunk-PJS3WDO2.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{chunk-6NQXMGYU.js.map → chunk-QGPE2H6Z.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{chunk-ASM4DVRW.js.map → chunk-QVTFFLR2.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{chunk-FTAZLAR7.js.map → chunk-QW2F6ARZ.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{chunk-A576QZDL.js.map → chunk-QXC3LWB7.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{chunk-6BV7ENQL.js.map → chunk-QXMXRPX5.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{chunk-SPYPC5CB.js.map → chunk-R4AKUPKI.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{chunk-UAR2VNCK.js.map → chunk-RASR23HV.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{chunk-YXTLI4XP.js.map → chunk-SCDCNGCV.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{chunk-2IUJBMKS.js.map → chunk-SCS5PVAA.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{chunk-KTVETP66.js.map → chunk-SJCMTOEU.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{chunk-L6FJPOT4.js.map → chunk-SO2ES46D.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{chunk-GYMG7AG6.js.map → chunk-TBV33CB4.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{chunk-XNOY7TCB.js.map → chunk-UGUJ2UOR.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{chunk-E6J2PEK6.js.map → chunk-UN6P3IJ4.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{chunk-ZONXMSVB.js.map → chunk-V2GYOMEX.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{chunk-T5VU7ROQ.js.map → chunk-VF3KQGNY.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{chunk-RKKIH2ZQ.js.map → chunk-VHG6LUKR.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{chunk-G2YVUY7I.js.map → chunk-VXRFAE7W.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{chunk-Q5RLUCP3.js.map → chunk-WQRL4COW.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{chunk-TUB3DZAZ.js.map → chunk-YLAW3FZN.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{claim-NEO7AGWH.js.map → claim-WGAWJCPY.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{claim-4APLUXJW.js.map → claim-ZI6P4LMU.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{close-ILMZR3D7.js.map → close-I7PRQ5G7.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{close-3QABBNGU.js.map → close-JMVVSIQE.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{close-many-MIZLTYGL.js.map → close-many-IKPJXVOZ.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{close-many-Q7Y5AHQI.js.map → close-many-TXABDCSJ.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{comments-DAIQPOMU.js.map → comments-RLWR2S7W.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{comments-IWFSVM4P.js.map → comments-YAMXKHUX.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{context-QHJSCJW4.js.map → context-K6QAHN5H.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{context-XZS2VFKU.js.map → context-VGXOOAH2.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{copy-Q64T5FD4.js.map → copy-Q2PPU4AY.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{copy-SG34LCMU.js.map → copy-SC6UF3PI.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{create-IPAX2SNL.js.map → create-76FE7JVF.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{create-F5HZX2S4.js.map → create-RTRFW6RE.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{delete-VH3L7DZ6.js.map → delete-T6DJSUJI.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{delete-TLXR7LJ2.js.map → delete-XFUX533E.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{deps-J3HBBLDB.js.map → deps-5GWMMS6D.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{deps-XV6JJ6IN.js.map → deps-MCCU633S.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{docs-GWDEB7JH.js.map → docs-HE3HCQ4S.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{docs-RCLNSKID.js.map → docs-SXMOABHR.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{extension-7KO2NX2A.js.map → extension-E23K4QRR.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{extension-5RN65LHT.js.map → extension-PMD3XMLN.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{files-3TCQHUHA.js.map → files-2RSWGPEU.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{files-5FDUPSEA.js.map → files-ZWFJFWBK.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{focus-HQXBYPKM.js.map → focus-KTTB3P3F.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{focus-7AQMNRSU.js.map → focus-ZMDP4FEL.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{gc-5B6ABL3Z.js.map → gc-BXIAKLAH.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{gc-2FGKYRJ4.js.map → gc-C7K6JNUO.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{get-FUMVOJQD.js.map → get-AZQLC4NO.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{get-H5BZTW4A.js.map → get-I65HTAWO.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{health-JSVOR6B4.js.map → health-3MFFPQVZ.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{health-LE2ZQGSM.js.map → health-MYZEOCLI.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{history-QO4JVJJP.js.map → history-73Z6OBFZ.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{history-SSXGGTVZ.js.map → history-BIPHVUMF.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{history-compact-ID74DOUI.js.map → history-compact-24VQ63A3.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{history-compact-SDFRPZ4V.js.map → history-compact-UIAR2OI4.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{history-redact-Z4P5MM3G.js.map → history-redact-7YCXEWJD.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{history-redact-VBH44Y7F.js.map → history-redact-WZZ6GZ2Z.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{history-repair-CKE7GLZR.js.map → history-repair-4NOFFG2W.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{history-repair-ANHEYWKF.js.map → history-repair-GQN2X4TR.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{init-7FBQO77A.js.map → init-K34V4PZR.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{init-K6MSMB37.js.map → init-TDEDNVMM.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{learnings-VIS3NOQV.js.map → learnings-TV2CTGJ3.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{learnings-YYNB64GN.js.map → learnings-U67FTXPB.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{list-UHMA3N2K.js.map → list-MSHYOCFU.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{list-7UE44A2R.js.map → list-VV57WGUD.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{notes-IN3UMA7W.js.map → notes-EUANWWKD.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{notes-2HRMV67I.js.map → notes-GYVNDAL4.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{plan-PAWCCAPW.js.map → plan-4LF4AV63.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{plan-I3SVH7FV.js.map → plan-W27O6DBS.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{register-list-query-OTIK4DVA.js.map → register-list-query-BXLEHJ7L.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{register-list-query-N7Z7RTDM.js.map → register-list-query-C2MS3BVQ.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{register-setup-7RKGE4BQ.js.map → register-setup-A7N4PNT3.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{register-setup-7UKEFKT6.js.map → register-setup-WHG3NBP6.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{restore-NNVPBBVJ.js.map → restore-TSWSULYY.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{restore-XXXLQ2XC.js.map → restore-XQXICL3V.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{search-NQ42NC6A.js.map → search-OXLSQKHP.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{search-V7PZ2ICH.js.map → search-T3TOFLOQ.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{stats-7KD4PJC5.js.map → stats-5CLG22YZ.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{stats-GRHO6RFB.js.map → stats-XEMUXS42.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{telemetry-TRRYZXWT.js.map → telemetry-23OPBBZT.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{telemetry-H5GLXNG5.js.map → telemetry-I3D7XZ55.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{test-6CZNIIGA.js.map → test-AROS3LIV.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{test-7GVQ3VMN.js.map → test-CECIMKOA.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{test-runs-LYT6ZTNQ.js.map → test-runs-AAXVFWKH.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{test-runs-RVP6VWN7.js.map → test-runs-LYBQSYRC.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{update-UN75XW3C.js.map → update-MIWEJC76.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{update-MPGM6SBE.js.map → update-P7I5YSRB.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{update-many-XSEQJ24X.js.map → update-many-5B4HLVBK.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{update-many-FCU6RKTO.js.map → update-many-G2QOVZSB.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{upgrade-FOB5LHO5.js.map → upgrade-GFIDL62L.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{upgrade-A6TL3INC.js.map → upgrade-QUQYL7D3.js.map} +0 -0
@@ -1,33 +1,41 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="17383821-ce92-5fb0-831e-74292e96ccc4")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f1d1bb61-520e-5d3d-8813-8dc1c6a0c38f")}catch(e){}}();
3
+ import {
4
+ TYPE_PRESET_NAMES,
5
+ normalizeTypePresetName,
6
+ resolveTypePresetDefinitions
7
+ } from "./chunk-4RTLBTYS.js";
3
8
  import {
4
9
  assertAliasesAvailable,
5
10
  assertTypeFolderAvailable,
6
11
  buildInvalidTypeHint,
7
12
  escapeForDoubleQuotes,
13
+ matchBuiltinTypeName,
8
14
  normalizeAddTypeInput,
9
15
  parseItemTypesFile,
10
16
  removeItemType,
11
17
  serializeItemTypesFile,
12
18
  upsertItemType
13
- } from "./chunk-Z3MUNQRV.js";
19
+ } from "./chunk-6VFUEGOA.js";
14
20
  import {
15
21
  acquireLock,
16
22
  listAllFrontMatterLight
17
- } from "./chunk-7K2MXFMX.js";
18
- import "./chunk-2JEGCDYT.js";
19
- import "./chunk-GAVE4MYM.js";
23
+ } from "./chunk-FPDK5BZQ.js";
24
+ import "./chunk-F5MSD5HE.js";
25
+ import "./chunk-IROHIK2T.js";
20
26
  import {
21
27
  resolveItemTypeRegistry
22
- } from "./chunk-ZONXMSVB.js";
28
+ } from "./chunk-V2GYOMEX.js";
23
29
  import {
24
30
  nowIso
25
- } from "./chunk-G2YVUY7I.js";
31
+ } from "./chunk-VXRFAE7W.js";
26
32
  import {
27
33
  DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
28
34
  DEFAULT_RUNTIME_STATUS_DEFINITIONS,
29
35
  EXIT_CODE,
30
36
  PmCliError,
37
+ RUNTIME_FIELD_COMMAND_VALUES,
38
+ RUNTIME_FIELD_TYPE_VALUES,
31
39
  RUNTIME_STATUS_ROLE_VALUES,
32
40
  filePathForSchemaSection,
33
41
  getActiveExtensionRegistrations,
@@ -38,10 +46,11 @@ import {
38
46
  readSettings,
39
47
  resolveGovernanceKnobs,
40
48
  resolvePmRoot,
49
+ resolveRuntimeFieldRegistry,
41
50
  resolveRuntimeStatusRegistry,
42
51
  runActiveOnWriteHooks,
43
52
  writeFileAtomic
44
- } from "./chunk-KTVETP66.js";
53
+ } from "./chunk-SJCMTOEU.js";
45
54
 
46
55
  // dist/core/schema/status-defs-file.js
47
56
  var RUNTIME_STATUS_ROLE_SET = new Set(RUNTIME_STATUS_ROLE_VALUES);
@@ -218,18 +227,320 @@ function assertStatusTokensAvailable(input, resolvedAliasToId) {
218
227
  }
219
228
  }
220
229
 
230
+ // dist/core/schema/fields-file.js
231
+ var RUNTIME_FIELD_TYPE_SET = new Set(RUNTIME_FIELD_TYPE_VALUES);
232
+ var RUNTIME_FIELD_COMMAND_SET = new Set(RUNTIME_FIELD_COMMAND_VALUES);
233
+ var BUILTIN_FIELD_KEYS = /* @__PURE__ */ new Set([
234
+ "id",
235
+ "title",
236
+ "type",
237
+ "status",
238
+ "priority",
239
+ "tags",
240
+ "assignee",
241
+ "parent",
242
+ "description",
243
+ "body",
244
+ "created_at",
245
+ "updated_at",
246
+ "closed_at",
247
+ "author",
248
+ "deadline",
249
+ "estimate",
250
+ "sprint",
251
+ "release",
252
+ "risk",
253
+ "confidence",
254
+ "reviewer",
255
+ "resolution",
256
+ "expected",
257
+ "actual"
258
+ ]);
259
+ var DEFAULT_FIELD_COMMANDS = ["create", "update"];
260
+ function normalizeFieldKey(value) {
261
+ return typeof value === "string" ? value.trim().toLowerCase().replaceAll(/[\s-]+/g, "_") : "";
262
+ }
263
+ function normalizeCliToken(value) {
264
+ if (typeof value !== "string") {
265
+ return "";
266
+ }
267
+ const collapsed = value.trim().toLowerCase().replaceAll(/[\s_]+/g, "-");
268
+ return collapsed.startsWith("--") ? collapsed.slice(2) : collapsed;
269
+ }
270
+ function keyToDefaultCliFlag(key) {
271
+ return key.replaceAll("_", "-");
272
+ }
273
+ function dedupeCliTokens(values, exclude) {
274
+ const seen = /* @__PURE__ */ new Set();
275
+ for (const value of values) {
276
+ const token = normalizeCliToken(value);
277
+ if (token.length > 0 && token !== exclude) {
278
+ seen.add(token);
279
+ }
280
+ }
281
+ return [...seen].sort((left, right) => left.localeCompare(right));
282
+ }
283
+ function dedupeStringList(values) {
284
+ const seen = /* @__PURE__ */ new Set();
285
+ for (const value of values ?? []) {
286
+ const trimmed = value.trim();
287
+ if (trimmed.length > 0) {
288
+ seen.add(trimmed);
289
+ }
290
+ }
291
+ return [...seen].sort((left, right) => left.localeCompare(right));
292
+ }
293
+ function normalizeAddFieldInput(raw) {
294
+ const key = normalizeFieldKey(raw.key);
295
+ if (key.length === 0) {
296
+ throw new Error("Field key must not be empty.");
297
+ }
298
+ if (BUILTIN_FIELD_KEYS.has(key)) {
299
+ throw new Error(`Cannot define custom field "${key}": it shadows a built-in field. Built-in fields are reserved.`);
300
+ }
301
+ const typeCandidate = typeof raw.type === "string" && raw.type.trim().length > 0 ? raw.type.trim().toLowerCase() : "string";
302
+ if (!RUNTIME_FIELD_TYPE_SET.has(typeCandidate)) {
303
+ throw new Error(`Invalid field type "${raw.type}". Allowed: ${RUNTIME_FIELD_TYPE_VALUES.join(", ")}.`);
304
+ }
305
+ const type = typeCandidate;
306
+ let commands;
307
+ if (raw.commands === void 0) {
308
+ commands = [...DEFAULT_FIELD_COMMANDS];
309
+ } else {
310
+ const seen = /* @__PURE__ */ new Set();
311
+ const normalized = [];
312
+ for (const rawCommand of raw.commands) {
313
+ const command = rawCommand.trim().toLowerCase();
314
+ if (command.length === 0) {
315
+ continue;
316
+ }
317
+ if (!RUNTIME_FIELD_COMMAND_SET.has(command)) {
318
+ throw new Error(`Invalid field command "${rawCommand}". Allowed: ${RUNTIME_FIELD_COMMAND_VALUES.join(", ")}.`);
319
+ }
320
+ if (!seen.has(command)) {
321
+ seen.add(command);
322
+ normalized.push(command);
323
+ }
324
+ }
325
+ commands = normalized.length > 0 ? normalized : [...DEFAULT_FIELD_COMMANDS];
326
+ }
327
+ const cliFlagToken = normalizeCliToken(raw.cliFlag);
328
+ const cliFlag = cliFlagToken.length > 0 && cliFlagToken !== keyToDefaultCliFlag(key) ? cliFlagToken : void 0;
329
+ const effectiveFlag = cliFlag ?? keyToDefaultCliFlag(key);
330
+ const cliAliases = dedupeCliTokens(raw.aliases ?? [], effectiveFlag);
331
+ const description = raw.description?.trim();
332
+ return {
333
+ key,
334
+ type,
335
+ commands,
336
+ description: description && description.length > 0 ? description : void 0,
337
+ cliFlag,
338
+ cliAliases,
339
+ required: raw.required === true,
340
+ requiredOnCreate: raw.requiredOnCreate === true,
341
+ // allow_unset defaults to true (omitted) and is only persisted when an
342
+ // operator explicitly disables it with --no-allow-unset (allowUnset === false).
343
+ allowUnset: raw.allowUnset !== false,
344
+ requiredTypes: dedupeStringList(raw.requiredTypes)
345
+ };
346
+ }
347
+ function selectFieldsArray(parsed) {
348
+ if (Array.isArray(parsed)) {
349
+ return parsed;
350
+ }
351
+ if (typeof parsed !== "object" || parsed === null) {
352
+ return void 0;
353
+ }
354
+ const record = parsed;
355
+ if (Array.isArray(record.fields)) {
356
+ return record.fields;
357
+ }
358
+ if (Array.isArray(record.definitions)) {
359
+ return record.definitions;
360
+ }
361
+ return void 0;
362
+ }
363
+ function extractFieldDefinitions(parsed) {
364
+ const candidate = selectFieldsArray(parsed);
365
+ if (!candidate) {
366
+ return [];
367
+ }
368
+ const definitions = [];
369
+ for (const entry of candidate) {
370
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
371
+ continue;
372
+ }
373
+ const record = entry;
374
+ if (typeof record.key !== "string" || record.key.trim().length === 0) {
375
+ continue;
376
+ }
377
+ definitions.push(record);
378
+ }
379
+ return definitions;
380
+ }
381
+ function parseFieldsFile(raw) {
382
+ if (raw === null || raw === void 0 || raw.trim().length === 0) {
383
+ return { fields: [] };
384
+ }
385
+ let parsed;
386
+ try {
387
+ parsed = JSON.parse(raw);
388
+ } catch {
389
+ throw new Error("schema/fields.json contains invalid JSON.");
390
+ }
391
+ return { fields: extractFieldDefinitions(parsed) };
392
+ }
393
+ function serializeFieldsFile(file) {
394
+ return `${JSON.stringify({ fields: file.fields }, null, 2)}
395
+ `;
396
+ }
397
+ function upsertField(file, input) {
398
+ const existing = file.fields.find((definition) => normalizeFieldKey(definition.key) === input.key);
399
+ const replaced = existing !== void 0;
400
+ const fields = file.fields.filter((definition) => normalizeFieldKey(definition.key) !== input.key);
401
+ const next = {
402
+ ...existing ?? {},
403
+ key: input.key,
404
+ type: input.type,
405
+ commands: [...input.commands]
406
+ };
407
+ applyOptionalString(next, "description", input.description);
408
+ applyOptionalString(next, "cli_flag", input.cliFlag);
409
+ if (input.cliAliases.length > 0) {
410
+ next.cli_aliases = [...input.cliAliases];
411
+ } else {
412
+ delete next.cli_aliases;
413
+ }
414
+ applyBooleanFlag(next, "required", input.required);
415
+ applyBooleanFlag(next, "required_on_create", input.requiredOnCreate);
416
+ if (input.allowUnset === false) {
417
+ next.allow_unset = false;
418
+ } else {
419
+ delete next.allow_unset;
420
+ }
421
+ if (input.requiredTypes.length > 0) {
422
+ next.required_types = [...input.requiredTypes];
423
+ } else {
424
+ delete next.required_types;
425
+ }
426
+ fields.push(next);
427
+ fields.sort((left, right) => normalizeFieldKey(left.key).localeCompare(normalizeFieldKey(right.key)));
428
+ return {
429
+ file: { fields },
430
+ definition: next,
431
+ replaced
432
+ };
433
+ }
434
+ function removeField(file, key) {
435
+ const normalizedKey = normalizeFieldKey(key);
436
+ if (normalizedKey.length === 0) {
437
+ throw new Error("Field key must not be empty.");
438
+ }
439
+ const removed = [];
440
+ const fields = file.fields.filter((definition) => {
441
+ if (normalizeFieldKey(definition.key) === normalizedKey) {
442
+ removed.push(definition);
443
+ return false;
444
+ }
445
+ return true;
446
+ });
447
+ if (removed.length === 0) {
448
+ return { file: { fields }, removed: false };
449
+ }
450
+ return { file: { fields }, removed: true, definition: removed[0] };
451
+ }
452
+ function applyOptionalString(definition, key, value) {
453
+ const record = definition;
454
+ if (value !== void 0 && value.length > 0) {
455
+ record[key] = value;
456
+ } else {
457
+ delete record[key];
458
+ }
459
+ }
460
+ function applyBooleanFlag(definition, key, value) {
461
+ const record = definition;
462
+ if (value) {
463
+ record[key] = true;
464
+ } else {
465
+ delete record[key];
466
+ }
467
+ }
468
+
469
+ // dist/core/schema/type-inference.js
470
+ var PREFIX_PATTERN = /^([A-Za-z][A-Za-z0-9_-]*?)\s*[-:]\s+\S/;
471
+ function extractTitlePrefix(title) {
472
+ const match = PREFIX_PATTERN.exec(title.trim());
473
+ if (!match) {
474
+ return void 0;
475
+ }
476
+ const token = match[1];
477
+ if (token.length < 2) {
478
+ return void 0;
479
+ }
480
+ if (/^[A-Za-z]\d+$/.test(token)) {
481
+ return void 0;
482
+ }
483
+ return token.toLowerCase();
484
+ }
485
+ function prefixToTypeName(prefix) {
486
+ return prefix.split(/[-_]+/).filter((segment) => segment.length > 0).map((segment) => `${segment.slice(0, 1).toUpperCase()}${segment.slice(1).toLowerCase()}`).join("");
487
+ }
488
+ function inferTypesFromTitles(titles, options = {}) {
489
+ const minCount = typeof options.minCount === "number" && options.minCount > 0 ? Math.trunc(options.minCount) : 10;
490
+ const maxExamples = typeof options.maxExamples === "number" && options.maxExamples > 0 ? Math.trunc(options.maxExamples) : 3;
491
+ const byPrefix = /* @__PURE__ */ new Map();
492
+ for (const rawTitle of titles) {
493
+ const title = typeof rawTitle === "string" ? rawTitle.trim() : "";
494
+ if (title.length === 0) {
495
+ continue;
496
+ }
497
+ const prefix = extractTitlePrefix(title);
498
+ if (prefix === void 0) {
499
+ continue;
500
+ }
501
+ const bucket = byPrefix.get(prefix) ?? { count: 0, examples: [] };
502
+ bucket.count += 1;
503
+ if (bucket.examples.length < maxExamples) {
504
+ bucket.examples.push(title);
505
+ }
506
+ byPrefix.set(prefix, bucket);
507
+ }
508
+ const candidates = [];
509
+ for (const [prefix, bucket] of byPrefix.entries()) {
510
+ if (bucket.count < minCount) {
511
+ continue;
512
+ }
513
+ const name = prefixToTypeName(prefix);
514
+ candidates.push({
515
+ name,
516
+ prefix,
517
+ count: bucket.count,
518
+ examples: bucket.examples,
519
+ shadows_builtin: matchBuiltinTypeName(name) !== void 0
520
+ });
521
+ }
522
+ candidates.sort((left, right) => right.count - left.count || left.name.localeCompare(right.name));
523
+ return candidates;
524
+ }
525
+
221
526
  // dist/cli/commands/schema.js
222
527
  var SCHEMA_SUBCOMMANDS = [
223
528
  "add-type",
224
529
  "remove-type",
225
530
  "add-status",
226
531
  "remove-status",
532
+ "add-field",
533
+ "remove-field",
534
+ "list-fields",
535
+ "show-field",
536
+ "apply-preset",
227
537
  "list",
228
538
  "show",
229
539
  "show-status"
230
540
  ];
231
541
  var SCHEMA_TYPES_LOCK_ID = "schema-types";
232
542
  var SCHEMA_STATUSES_LOCK_ID = "schema-statuses";
543
+ var SCHEMA_FIELDS_LOCK_ID = "schema-fields";
233
544
  function toAuthor(candidate, defaultAuthor) {
234
545
  const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;
235
546
  const trimmed = resolved.trim();
@@ -398,6 +709,26 @@ async function runSchemaRemoveType(name, options, global) {
398
709
  function statusesPathFor(pmRoot, schema) {
399
710
  return filePathForSchemaSection(pmRoot, schema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses);
400
711
  }
712
+ function fieldsPathFor(pmRoot, schema) {
713
+ return filePathForSchemaSection(pmRoot, schema.files.fields, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields);
714
+ }
715
+ function typesPathFor(pmRoot, schema) {
716
+ return filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);
717
+ }
718
+ function toSchemaFieldSummary(field) {
719
+ return {
720
+ key: field.key,
721
+ type: field.type,
722
+ commands: [...field.commands],
723
+ cli_flag: `--${field.cli_flag}`,
724
+ cli_aliases: field.cli_aliases.map((alias) => `--${alias}`),
725
+ ...field.description ? { description: field.description } : {},
726
+ required: field.required,
727
+ required_on_create: field.required_on_create,
728
+ allow_unset: field.allow_unset,
729
+ required_types: [...field.required_types]
730
+ };
731
+ }
401
732
  async function runSchemaAddStatus(id, options, global) {
402
733
  const pmRoot = resolvePmRoot(process.cwd(), global.path);
403
734
  await ensureInitialized(pmRoot);
@@ -633,6 +964,7 @@ async function loadSchemaInspectionContext(global) {
633
964
  const extensionProvenance = collectExtensionTypeProvenance();
634
965
  const customNames = new Set((settings.item_types?.definitions ?? []).map((definition) => definition.name.trim().toLowerCase()).filter((name) => name.length > 0 && !extensionProvenance.has(name)));
635
966
  return {
967
+ pmRoot,
636
968
  typesPath,
637
969
  statusesPath,
638
970
  byType: registry.by_type,
@@ -658,6 +990,7 @@ async function runSchemaList(global) {
658
990
  }
659
991
  }
660
992
  const statusSummaries = buildSchemaStatusSummaries(context.schema);
993
+ const fieldSummaries = resolveRuntimeFieldRegistry(context.schema).definitions.map(toSchemaFieldSummary);
661
994
  return {
662
995
  action: "list",
663
996
  builtin,
@@ -678,6 +1011,12 @@ async function runSchemaList(global) {
678
1011
  total: statusSummaries.builtin.length + statusSummaries.custom.length
679
1012
  }
680
1013
  },
1014
+ fields: {
1015
+ custom: fieldSummaries,
1016
+ counts: {
1017
+ total: fieldSummaries.length
1018
+ }
1019
+ },
681
1020
  file: {
682
1021
  path: context.typesPath
683
1022
  },
@@ -724,6 +1063,331 @@ async function runSchemaShowStatus(id, global) {
724
1063
  generated_at: nowIso()
725
1064
  };
726
1065
  }
1066
+ async function runSchemaAddField(key, options, global) {
1067
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
1068
+ await ensureInitialized(pmRoot);
1069
+ let normalized;
1070
+ try {
1071
+ normalized = normalizeAddFieldInput({
1072
+ key,
1073
+ type: options.type,
1074
+ commands: options.commands,
1075
+ description: options.description,
1076
+ cliFlag: options.cliFlag,
1077
+ aliases: options.alias,
1078
+ required: options.required,
1079
+ requiredOnCreate: options.requiredOnCreate,
1080
+ allowUnset: options.allowUnset,
1081
+ requiredTypes: options.requiredTypes
1082
+ });
1083
+ } catch (error) {
1084
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
1085
+ }
1086
+ const settings = await readSettings(pmRoot);
1087
+ const schema = normalizeRuntimeSchemaSettings(settings.schema);
1088
+ const fieldsPath = fieldsPathFor(pmRoot, schema);
1089
+ const warnings = [];
1090
+ const author = toAuthor(options.author, settings.author_default);
1091
+ const governance = resolveGovernanceKnobs(settings);
1092
+ const releaseLock = await acquireLock(pmRoot, SCHEMA_FIELDS_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
1093
+ let upsert;
1094
+ try {
1095
+ const previousRaw = await readFileIfExists(fieldsPath);
1096
+ let parsed;
1097
+ try {
1098
+ parsed = parseFieldsFile(previousRaw);
1099
+ } catch (error) {
1100
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
1101
+ }
1102
+ upsert = upsertField(parsed, normalized);
1103
+ await writeFileAtomic(fieldsPath, serializeFieldsFile(upsert.file));
1104
+ warnings.push(...await runActiveOnWriteHooks({
1105
+ path: fieldsPath,
1106
+ scope: "project",
1107
+ op: "schema:add-field"
1108
+ }));
1109
+ } finally {
1110
+ await releaseLock();
1111
+ }
1112
+ return {
1113
+ action: "add-field",
1114
+ registered: true,
1115
+ replaced: upsert.replaced,
1116
+ field: upsert.definition,
1117
+ file: {
1118
+ path: fieldsPath,
1119
+ fields: upsert.file.fields.length
1120
+ },
1121
+ warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
1122
+ generated_at: nowIso()
1123
+ };
1124
+ }
1125
+ async function countItemsUsingField(pmRoot, settings, schema, metadataKey) {
1126
+ const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
1127
+ const items = await listAllFrontMatterLight(pmRoot, settings.item_format, registry.type_to_folder, [], schema);
1128
+ return items.filter((item) => {
1129
+ const value = item[metadataKey];
1130
+ if (value === void 0 || value === null) {
1131
+ return false;
1132
+ }
1133
+ if (Array.isArray(value)) {
1134
+ return value.length > 0;
1135
+ }
1136
+ if (typeof value === "string") {
1137
+ return value.trim().length > 0;
1138
+ }
1139
+ return true;
1140
+ }).length;
1141
+ }
1142
+ async function runSchemaRemoveField(key, options, global) {
1143
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
1144
+ await ensureInitialized(pmRoot);
1145
+ const settings = await readSettings(pmRoot);
1146
+ const schema = normalizeRuntimeSchemaSettings(settings.schema);
1147
+ const fieldsPath = fieldsPathFor(pmRoot, schema);
1148
+ const warnings = [];
1149
+ const author = toAuthor(options.author, settings.author_default);
1150
+ const governance = resolveGovernanceKnobs(settings);
1151
+ const releaseLock = await acquireLock(pmRoot, SCHEMA_FIELDS_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
1152
+ let removal;
1153
+ try {
1154
+ const previousRaw = await readFileIfExists(fieldsPath);
1155
+ let parsed;
1156
+ try {
1157
+ parsed = parseFieldsFile(previousRaw);
1158
+ } catch (error) {
1159
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
1160
+ }
1161
+ try {
1162
+ removal = removeField(parsed, key);
1163
+ } catch (error) {
1164
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
1165
+ }
1166
+ if (removal.removed) {
1167
+ const removedKey = normalizeFieldKey(removal.definition?.key ?? key);
1168
+ const metadataKey = normalizeFieldKey(removal.definition?.metadata_key ?? removal.definition?.front_matter_key ?? removedKey);
1169
+ if (metadataKey.length > 0) {
1170
+ const usingField = await countItemsUsingField(pmRoot, settings, schema, metadataKey);
1171
+ if (usingField > 0) {
1172
+ warnings.push(`items_using_field:${usingField}`);
1173
+ }
1174
+ }
1175
+ await writeFileAtomic(fieldsPath, serializeFieldsFile(removal.file));
1176
+ warnings.push(...await runActiveOnWriteHooks({
1177
+ path: fieldsPath,
1178
+ scope: "project",
1179
+ op: "schema:remove-field"
1180
+ }));
1181
+ }
1182
+ } finally {
1183
+ await releaseLock();
1184
+ }
1185
+ return {
1186
+ action: "remove-field",
1187
+ removed: removal.removed,
1188
+ ...removal.definition ? { field: removal.definition } : {},
1189
+ file: {
1190
+ path: fieldsPath,
1191
+ fields: removal.file.fields.length
1192
+ },
1193
+ warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
1194
+ generated_at: nowIso()
1195
+ };
1196
+ }
1197
+ async function runSchemaListFields(global) {
1198
+ const context = await loadSchemaInspectionContext(global);
1199
+ const fields = resolveRuntimeFieldRegistry(context.schema).definitions.map(toSchemaFieldSummary);
1200
+ return {
1201
+ action: "list-fields",
1202
+ fields,
1203
+ counts: {
1204
+ total: fields.length
1205
+ },
1206
+ file: {
1207
+ path: fieldsPathFor(context.pmRoot, context.schema)
1208
+ },
1209
+ generated_at: nowIso()
1210
+ };
1211
+ }
1212
+ async function runSchemaShowField(key, global) {
1213
+ const fieldKey = normalizeFieldKey(key);
1214
+ if (fieldKey.length === 0) {
1215
+ throw new PmCliError("Field key must not be empty.", EXIT_CODE.USAGE);
1216
+ }
1217
+ const context = await loadSchemaInspectionContext(global);
1218
+ const match = resolveRuntimeFieldRegistry(context.schema).by_key.get(fieldKey);
1219
+ if (!match) {
1220
+ throw new PmCliError(`Unknown custom field "${key}". Run pm schema list-fields to inspect registered fields, or pm schema add-field "${escapeForDoubleQuotes(key ?? "")}" to register it.`, EXIT_CODE.NOT_FOUND, { code: "unknown_field" });
1221
+ }
1222
+ return {
1223
+ action: "show-field",
1224
+ field: toSchemaFieldSummary(match),
1225
+ file: {
1226
+ path: fieldsPathFor(context.pmRoot, context.schema)
1227
+ },
1228
+ generated_at: nowIso()
1229
+ };
1230
+ }
1231
+ async function runSchemaApplyPreset(preset, options, global) {
1232
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
1233
+ await ensureInitialized(pmRoot);
1234
+ let presetName;
1235
+ try {
1236
+ const normalized = normalizeTypePresetName(preset);
1237
+ if (normalized === void 0) {
1238
+ throw new Error(`Type preset name is required. Allowed: ${TYPE_PRESET_NAMES.join(", ")}.`);
1239
+ }
1240
+ presetName = normalized;
1241
+ } catch (error) {
1242
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
1243
+ }
1244
+ const settings = await readSettings(pmRoot);
1245
+ const schema = normalizeRuntimeSchemaSettings(settings.schema);
1246
+ const typesPath = typesPathFor(pmRoot, schema);
1247
+ const warnings = [];
1248
+ const author = toAuthor(options.author, settings.author_default);
1249
+ const governance = resolveGovernanceKnobs(settings);
1250
+ const registered = [];
1251
+ const replaced = [];
1252
+ let definitionsCount = 0;
1253
+ const releaseLock = await acquireLock(pmRoot, SCHEMA_TYPES_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
1254
+ try {
1255
+ const previousRaw = await readFileIfExists(typesPath);
1256
+ let parsed;
1257
+ try {
1258
+ parsed = parseItemTypesFile(previousRaw);
1259
+ } catch (error) {
1260
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
1261
+ }
1262
+ let nextFile = parsed;
1263
+ for (const normalized of resolveTypePresetDefinitions(presetName)) {
1264
+ const upsert = upsertItemType(nextFile, normalized);
1265
+ nextFile = upsert.file;
1266
+ (upsert.replaced ? replaced : registered).push(upsert.definition.name);
1267
+ }
1268
+ definitionsCount = nextFile.definitions.length;
1269
+ await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));
1270
+ warnings.push(...await runActiveOnWriteHooks({
1271
+ path: typesPath,
1272
+ scope: "project",
1273
+ op: "schema:apply-preset"
1274
+ }));
1275
+ } finally {
1276
+ await releaseLock();
1277
+ }
1278
+ return {
1279
+ action: "apply-preset",
1280
+ preset: presetName,
1281
+ registered,
1282
+ replaced,
1283
+ file: {
1284
+ path: typesPath,
1285
+ definitions: definitionsCount
1286
+ },
1287
+ warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
1288
+ generated_at: nowIso()
1289
+ };
1290
+ }
1291
+ async function runSchemaInferTypes(options, global) {
1292
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
1293
+ await ensureInitialized(pmRoot);
1294
+ const settings = await readSettings(pmRoot);
1295
+ const schema = normalizeRuntimeSchemaSettings(settings.schema);
1296
+ const typesPath = typesPathFor(pmRoot, schema);
1297
+ let minCount = 10;
1298
+ if (options.minCount !== void 0) {
1299
+ if (!Number.isInteger(options.minCount) || options.minCount < 1) {
1300
+ throw new PmCliError("--min-count must be a positive integer (>= 1).", EXIT_CODE.USAGE);
1301
+ }
1302
+ minCount = options.minCount;
1303
+ }
1304
+ const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
1305
+ const items = await listAllFrontMatterLight(pmRoot, settings.item_format, registry.type_to_folder, [], schema);
1306
+ const titles = items.map((item) => typeof item.title === "string" ? item.title : "");
1307
+ const candidates = inferTypesFromTitles(titles, { minCount });
1308
+ const warnings = [];
1309
+ const registered = [];
1310
+ const replaced = [];
1311
+ const skipped = [];
1312
+ let definitionsCount;
1313
+ if (!options.apply) {
1314
+ let parsed;
1315
+ try {
1316
+ parsed = parseItemTypesFile(await readFileIfExists(typesPath));
1317
+ } catch (error) {
1318
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
1319
+ }
1320
+ definitionsCount = parsed.definitions.length;
1321
+ return {
1322
+ action: "infer-types",
1323
+ applied: false,
1324
+ min_count: minCount,
1325
+ candidates,
1326
+ registered,
1327
+ replaced,
1328
+ skipped,
1329
+ file: {
1330
+ path: typesPath,
1331
+ definitions: definitionsCount
1332
+ },
1333
+ warnings,
1334
+ generated_at: nowIso()
1335
+ };
1336
+ }
1337
+ const author = toAuthor(options.author, settings.author_default);
1338
+ const governance = resolveGovernanceKnobs(settings);
1339
+ const releaseLock = await acquireLock(pmRoot, SCHEMA_TYPES_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
1340
+ try {
1341
+ const previousRaw = await readFileIfExists(typesPath);
1342
+ let parsed;
1343
+ try {
1344
+ parsed = parseItemTypesFile(previousRaw);
1345
+ } catch (error) {
1346
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
1347
+ }
1348
+ let nextFile = parsed;
1349
+ for (const candidate of candidates) {
1350
+ if (candidate.shadows_builtin) {
1351
+ skipped.push({ name: candidate.name, reason: "shadows_builtin" });
1352
+ continue;
1353
+ }
1354
+ let normalized;
1355
+ try {
1356
+ normalized = normalizeAddTypeInput({ name: candidate.name });
1357
+ } catch {
1358
+ skipped.push({ name: candidate.name, reason: "invalid_type_token" });
1359
+ continue;
1360
+ }
1361
+ const upsert = upsertItemType(nextFile, normalized);
1362
+ nextFile = upsert.file;
1363
+ (upsert.replaced ? replaced : registered).push(upsert.definition.name);
1364
+ }
1365
+ definitionsCount = nextFile.definitions.length;
1366
+ await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));
1367
+ warnings.push(...await runActiveOnWriteHooks({
1368
+ path: typesPath,
1369
+ scope: "project",
1370
+ op: "schema:infer-types"
1371
+ }));
1372
+ } finally {
1373
+ await releaseLock();
1374
+ }
1375
+ return {
1376
+ action: "infer-types",
1377
+ applied: true,
1378
+ min_count: minCount,
1379
+ candidates,
1380
+ registered,
1381
+ replaced,
1382
+ skipped,
1383
+ file: {
1384
+ path: typesPath,
1385
+ definitions: definitionsCount
1386
+ },
1387
+ warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
1388
+ generated_at: nowIso()
1389
+ };
1390
+ }
727
1391
  function formatSchemaAddTypeHuman(result) {
728
1392
  const verb = result.replaced ? "Updated" : "Registered";
729
1393
  const aliasSuffix = result.type.aliases && result.type.aliases.length > 0 ? ` (aliases: ${result.type.aliases.join(", ")})` : "";
@@ -773,8 +1437,13 @@ function formatSchemaListHuman(result) {
773
1437
  }
774
1438
  lines.push(`${label}: ${entries.map((entry) => entry.id).join(", ")}`);
775
1439
  }
1440
+ lines.push(`custom fields: ${result.fields.counts.total} total`);
1441
+ if (result.fields.custom.length > 0) {
1442
+ lines.push(`fields: ${result.fields.custom.map((field) => `${field.key} (${field.type}, ${field.cli_flag})`).join(", ")}`);
1443
+ }
776
1444
  lines.push(`Inspect one: pm schema show <Type>`);
777
1445
  lines.push(`Inspect one status: pm schema show-status <status>`);
1446
+ lines.push(`Inspect one field: pm schema show-field <key>`);
778
1447
  return lines.join("\n");
779
1448
  }
780
1449
  function formatSchemaShowHuman(result) {
@@ -816,6 +1485,94 @@ function formatSchemaShowStatusHuman(result) {
816
1485
  }
817
1486
  return parts.join("\n");
818
1487
  }
1488
+ function formatFieldSummaryLine(field) {
1489
+ const flags = [];
1490
+ if (field.required) {
1491
+ flags.push("required");
1492
+ }
1493
+ if (field.required_on_create) {
1494
+ flags.push("required_on_create");
1495
+ }
1496
+ if (!field.allow_unset) {
1497
+ flags.push("no_unset");
1498
+ }
1499
+ const flagSuffix = flags.length > 0 ? ` [${flags.join(", ")}]` : "";
1500
+ return `${field.key} (${field.type}) ${field.cli_flag} commands=${field.commands.join("/")}${flagSuffix}`;
1501
+ }
1502
+ function formatSchemaAddFieldHuman(result) {
1503
+ const verb = result.replaced ? "Updated" : "Registered";
1504
+ 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>`;
1505
+ }
1506
+ function formatSchemaRemoveFieldHuman(result) {
1507
+ if (!result.removed) {
1508
+ return `No custom field matched; nothing removed from ${result.file.path}.`;
1509
+ }
1510
+ const key = result.field?.key ?? "(unknown)";
1511
+ return `Removed custom field "${key}" from ${result.file.path}.`;
1512
+ }
1513
+ function formatSchemaListFieldsHuman(result) {
1514
+ const lines = [`Custom fields: ${result.counts.total} total`];
1515
+ for (const field of result.fields) {
1516
+ lines.push(` ${formatFieldSummaryLine(field)}`);
1517
+ }
1518
+ lines.push(`Inspect one: pm schema show-field <key>`);
1519
+ return lines.join("\n");
1520
+ }
1521
+ function formatSchemaShowFieldHuman(result) {
1522
+ const field = result.field;
1523
+ const parts = [
1524
+ `field: ${field.key}`,
1525
+ `type: ${field.type}`,
1526
+ `cli_flag: ${field.cli_flag}`,
1527
+ `commands: ${field.commands.join(", ")}`
1528
+ ];
1529
+ if (field.cli_aliases.length > 0) {
1530
+ parts.push(`cli_aliases: ${field.cli_aliases.join(", ")}`);
1531
+ }
1532
+ if (field.description) {
1533
+ parts.push(`description: ${field.description}`);
1534
+ }
1535
+ if (field.required) {
1536
+ parts.push(`required: true`);
1537
+ }
1538
+ if (field.required_on_create) {
1539
+ parts.push(`required_on_create: true`);
1540
+ }
1541
+ if (!field.allow_unset) {
1542
+ parts.push(`allow_unset: false`);
1543
+ }
1544
+ if (field.required_types.length > 0) {
1545
+ parts.push(`required_types: ${field.required_types.join(", ")}`);
1546
+ }
1547
+ return parts.join("\n");
1548
+ }
1549
+ function formatSchemaApplyPresetHuman(result) {
1550
+ const registered = result.registered.length > 0 ? `registered: ${result.registered.join(", ")}` : "";
1551
+ const replaced = result.replaced.length > 0 ? `updated: ${result.replaced.join(", ")}` : "";
1552
+ const detail = [registered, replaced].filter((part) => part.length > 0).join("; ");
1553
+ return `Applied "${result.preset}" type preset to ${result.file.path}${detail.length > 0 ? ` (${detail})` : ""}.`;
1554
+ }
1555
+ function formatSchemaInferTypesHuman(result) {
1556
+ if (result.candidates.length === 0) {
1557
+ return `No title-prefix conventions found with at least ${result.min_count} items. Lower the threshold with --min-count <n>.`;
1558
+ }
1559
+ const lines = result.applied ? [`Inferred and registered custom types from title prefixes (min-count ${result.min_count}):`] : [`Inferred custom type candidates from title prefixes (min-count ${result.min_count}, dry-run):`];
1560
+ for (const candidate of result.candidates) {
1561
+ const note = candidate.shadows_builtin ? " [shadows built-in, skipped]" : "";
1562
+ lines.push(` ${candidate.name} <- "${candidate.prefix}" (${candidate.count} items)${note}`);
1563
+ }
1564
+ if (!result.applied) {
1565
+ lines.push(`Re-run with --apply to register the non-shadowing candidates.`);
1566
+ } else {
1567
+ if (result.registered.length > 0) {
1568
+ lines.push(`registered: ${result.registered.join(", ")}`);
1569
+ }
1570
+ if (result.replaced.length > 0) {
1571
+ lines.push(`updated: ${result.replaced.join(", ")}`);
1572
+ }
1573
+ }
1574
+ return lines.join("\n");
1575
+ }
819
1576
  var _testOnlySchemaCommand = {
820
1577
  toAuthor,
821
1578
  workflowSlotsReferencing
@@ -824,21 +1581,33 @@ export {
824
1581
  SCHEMA_SUBCOMMANDS,
825
1582
  _testOnlySchemaCommand,
826
1583
  buildInvalidTypeHint,
1584
+ formatSchemaAddFieldHuman,
827
1585
  formatSchemaAddStatusHuman,
828
1586
  formatSchemaAddTypeHuman,
1587
+ formatSchemaApplyPresetHuman,
1588
+ formatSchemaInferTypesHuman,
1589
+ formatSchemaListFieldsHuman,
829
1590
  formatSchemaListHuman,
1591
+ formatSchemaRemoveFieldHuman,
830
1592
  formatSchemaRemoveStatusHuman,
831
1593
  formatSchemaRemoveTypeHuman,
1594
+ formatSchemaShowFieldHuman,
832
1595
  formatSchemaShowHuman,
833
1596
  formatSchemaShowStatusHuman,
1597
+ runSchemaAddField,
834
1598
  runSchemaAddStatus,
835
1599
  runSchemaAddType,
1600
+ runSchemaApplyPreset,
1601
+ runSchemaInferTypes,
836
1602
  runSchemaList,
1603
+ runSchemaListFields,
1604
+ runSchemaRemoveField,
837
1605
  runSchemaRemoveStatus,
838
1606
  runSchemaRemoveType,
839
1607
  runSchemaShow,
1608
+ runSchemaShowField,
840
1609
  runSchemaShowStatus
841
1610
  };
842
- //# sourceMappingURL=schema-3YKCQ3VO.js.map
1611
+ //# sourceMappingURL=schema-7U7JUYGK.js.map
843
1612
 
844
- //# debugId=17383821-ce92-5fb0-831e-74292e96ccc4
1613
+ //# debugId=f1d1bb61-520e-5d3d-8813-8dc1c6a0c38f