@unbrained/pm-cli 2026.7.3 → 2026.7.4

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 (461) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/CONTRIBUTING.md +36 -7
  3. package/README.md +0 -4
  4. package/dist/cli/commands/calendar.js +3 -3
  5. package/dist/cli/commands/calendar.js.map +1 -1
  6. package/dist/cli/commands/completion.js +231 -345
  7. package/dist/cli/commands/completion.js.map +1 -1
  8. package/dist/cli/commands/create.d.ts +2 -59
  9. package/dist/cli/commands/create.js +8 -24
  10. package/dist/cli/commands/create.js.map +1 -1
  11. package/dist/cli/commands/extension/scaffold.js +54 -133
  12. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  13. package/dist/cli/commands/files.js +3 -3
  14. package/dist/cli/commands/files.js.map +1 -1
  15. package/dist/cli/commands/history-compact.js +9 -18
  16. package/dist/cli/commands/history-compact.js.map +1 -1
  17. package/dist/cli/commands/history-repair.js +9 -19
  18. package/dist/cli/commands/history-repair.js.map +1 -1
  19. package/dist/cli/commands/init-agent-guidance.js +133 -97
  20. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  21. package/dist/cli/commands/init.js +3 -3
  22. package/dist/cli/commands/init.js.map +1 -1
  23. package/dist/cli/commands/item-filter-options.d.ts +2 -0
  24. package/dist/cli/commands/item-filter-options.js +2 -2
  25. package/dist/cli/commands/item-filter-options.js.map +1 -1
  26. package/dist/cli/commands/mutation-command-options.d.ts +78 -0
  27. package/dist/cli/commands/mutation-command-options.js +10 -0
  28. package/dist/cli/commands/mutation-command-options.js.map +1 -0
  29. package/dist/cli/commands/reindex.js +3 -3
  30. package/dist/cli/commands/reindex.js.map +1 -1
  31. package/dist/cli/commands/shared-unset-fields.d.ts +19 -0
  32. package/dist/cli/commands/shared-unset-fields.js +31 -2
  33. package/dist/cli/commands/shared-unset-fields.js.map +1 -1
  34. package/dist/cli/commands/update.d.ts +2 -59
  35. package/dist/cli/commands/update.js +26 -97
  36. package/dist/cli/commands/update.js.map +1 -1
  37. package/dist/cli/commands/validate.js +4 -4
  38. package/dist/cli/commands/validate.js.map +1 -1
  39. package/dist/cli/register-list-query.js +4 -2
  40. package/dist/cli/register-list-query.js.map +1 -1
  41. package/dist/cli/registration-helpers.js +12 -6
  42. package/dist/cli/registration-helpers.js.map +1 -1
  43. package/dist/cli-bundle/chunks/activity-IDS5GSYG.js +16 -0
  44. package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js → activity-OENQCYZD.js} +9 -9
  45. package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js → aggregate-EC4LWS3U.js} +8 -8
  46. package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js → aggregate-RCB3QJJE.js} +8 -8
  47. package/dist/cli-bundle/chunks/{append-JFG4WQMG.js → append-ADBOI3A6.js} +6 -6
  48. package/dist/cli-bundle/chunks/{append-EZESUVJT.js → append-XLEKVVWB.js} +6 -6
  49. package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js → chunk-2LRMWMZ6.js} +7 -7
  50. package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js → chunk-2ONH3WG6.js} +32 -13
  51. package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js.map → chunk-2ONH3WG6.js.map} +1 -1
  52. package/dist/cli-bundle/chunks/{chunk-4EXFFP7T.js → chunk-2VK677OA.js} +42 -34
  53. package/dist/cli-bundle/chunks/chunk-2VK677OA.js.map +7 -0
  54. package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js → chunk-3C5T3ZEO.js} +2 -2
  55. package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js → chunk-3MLQZI3H.js} +2 -2
  56. package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js → chunk-4EVY7CQN.js} +2 -2
  57. package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js → chunk-4IW7STMB.js} +7 -7
  58. package/dist/cli-bundle/chunks/{chunk-MHRS5FUX.js → chunk-4KPQQ42D.js} +143 -100
  59. package/dist/cli-bundle/chunks/chunk-4KPQQ42D.js.map +1 -0
  60. package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js → chunk-4OXNQHKQ.js} +3 -3
  61. package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js → chunk-4PJYRA3V.js} +31 -12
  62. package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js.map → chunk-4PJYRA3V.js.map} +3 -3
  63. package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js → chunk-4SHME4VR.js} +2 -2
  64. package/dist/cli-bundle/chunks/{chunk-WYOIIFSE.js → chunk-5FYY76HR.js} +28 -99
  65. package/dist/cli-bundle/chunks/chunk-5FYY76HR.js.map +7 -0
  66. package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js → chunk-6QY2NA2M.js} +3 -3
  67. package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js → chunk-6YB7HG2J.js} +2 -2
  68. package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js → chunk-724VLYDJ.js} +2 -2
  69. package/dist/cli-bundle/chunks/{chunk-SYE6WMV6.js → chunk-75VMARGO.js} +11 -11
  70. package/dist/cli-bundle/chunks/chunk-75VMARGO.js.map +1 -0
  71. package/dist/cli-bundle/chunks/{chunk-RAHINBVP.js → chunk-7745CXNI.js} +62 -97
  72. package/dist/cli-bundle/chunks/chunk-7745CXNI.js.map +7 -0
  73. package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js → chunk-7G5SUU6F.js} +6 -6
  74. package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js → chunk-7ITQSEBL.js} +3 -3
  75. package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js → chunk-A222YWOQ.js} +7 -7
  76. package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js → chunk-A2W3XKAD.js} +2 -2
  77. package/dist/cli-bundle/chunks/{chunk-YSDFIY7N.js → chunk-AOP2EMK3.js} +3 -3
  78. package/dist/cli-bundle/chunks/{chunk-U3S2B7TA.js → chunk-AZMPKLIA.js} +42 -34
  79. package/dist/cli-bundle/chunks/chunk-AZMPKLIA.js.map +1 -0
  80. package/dist/cli-bundle/chunks/{chunk-KHVGM5CS.js → chunk-BDDYM4LH.js} +151 -171
  81. package/dist/cli-bundle/chunks/chunk-BDDYM4LH.js.map +7 -0
  82. package/dist/cli-bundle/chunks/{chunk-6KRFL33E.js → chunk-CN4OAA2G.js} +4 -4
  83. package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js → chunk-CQFZRLXQ.js} +3 -3
  84. package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js → chunk-CQISNF3Z.js} +7 -7
  85. package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js → chunk-D2LDM35X.js} +3 -3
  86. package/dist/cli-bundle/chunks/{chunk-NZ7QIUP5.js → chunk-DEIDJQZK.js} +57 -136
  87. package/dist/cli-bundle/chunks/chunk-DEIDJQZK.js.map +7 -0
  88. package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js → chunk-DJ5S2LDY.js} +7 -7
  89. package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js → chunk-EB4BBEZD.js} +6 -6
  90. package/dist/cli-bundle/chunks/{chunk-ERG65A2L.js → chunk-EH23N5FX.js} +2 -2
  91. package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js → chunk-FDNJMYZB.js} +6 -6
  92. package/dist/cli-bundle/chunks/{chunk-CXR3CMBQ.js → chunk-FMWQRMHS.js} +2 -2
  93. package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js → chunk-HL742IBM.js} +4 -4
  94. package/dist/cli-bundle/chunks/{chunk-YF746GTH.js → chunk-J4KNRDI3.js} +6 -6
  95. package/dist/cli-bundle/chunks/{chunk-KS6ATO47.js → chunk-JYLFF7GJ.js} +143 -100
  96. package/dist/cli-bundle/chunks/chunk-JYLFF7GJ.js.map +7 -0
  97. package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js → chunk-JZJJEJBR.js} +6 -6
  98. package/dist/cli-bundle/chunks/{chunk-XRYSCRZR.js → chunk-KKHIQOTN.js} +4 -4
  99. package/dist/cli-bundle/chunks/{chunk-572FKBRL.js → chunk-LLQLLAKU.js} +61 -96
  100. package/dist/cli-bundle/chunks/chunk-LLQLLAKU.js.map +1 -0
  101. package/dist/cli-bundle/chunks/{chunk-6CDCWKSX.js → chunk-M34MVAOP.js} +58 -137
  102. package/dist/cli-bundle/chunks/chunk-M34MVAOP.js.map +1 -0
  103. package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js → chunk-M6PR5BC6.js} +4 -4
  104. package/dist/cli-bundle/chunks/{chunk-HQAF23Q2.js → chunk-MTB4PRA3.js} +10 -10
  105. package/dist/cli-bundle/chunks/chunk-MTB4PRA3.js.map +7 -0
  106. package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js → chunk-MZ4NH46V.js} +2 -2
  107. package/dist/cli-bundle/chunks/{chunk-AJHYQCBJ.js → chunk-MZG6I2Q2.js} +2 -2
  108. package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js → chunk-N2LOJUBB.js} +2 -2
  109. package/dist/cli-bundle/chunks/{chunk-WRYERRZX.js → chunk-NGDK3KEZ.js} +5 -5
  110. package/dist/cli-bundle/chunks/{chunk-HB4FAT3O.js → chunk-NHDR3UCW.js} +12 -8
  111. package/dist/cli-bundle/chunks/{chunk-HB4FAT3O.js.map → chunk-NHDR3UCW.js.map} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js → chunk-NHKXOMZ5.js} +2 -2
  113. package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js → chunk-OTSP6UEX.js} +7 -7
  114. package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js → chunk-PUVPC5DL.js} +4 -4
  115. package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js → chunk-PV5JS7MP.js} +3 -3
  116. package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js → chunk-Q2266G4S.js} +3 -3
  117. package/dist/cli-bundle/chunks/{chunk-67LARBDL.js → chunk-Q3XVLRCJ.js} +9 -9
  118. package/dist/cli-bundle/chunks/{chunk-RJH5VQHW.js → chunk-QFXFKYNQ.js} +13 -9
  119. package/dist/cli-bundle/chunks/chunk-QFXFKYNQ.js.map +1 -0
  120. package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js → chunk-R7EMP4JG.js} +9 -9
  121. package/dist/cli-bundle/chunks/{chunk-JPATY4SE.js → chunk-SBNT6SLO.js} +5 -5
  122. package/dist/cli-bundle/chunks/{chunk-L4SLHV6G.js → chunk-SL2ANJSV.js} +151 -171
  123. package/dist/cli-bundle/chunks/chunk-SL2ANJSV.js.map +1 -0
  124. package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js → chunk-T5RTYLZJ.js} +3 -3
  125. package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js → chunk-TGYDJEJH.js} +4 -4
  126. package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js → chunk-TO4KCIOT.js} +3 -3
  127. package/dist/cli-bundle/chunks/{chunk-FUFFPIYA.js → chunk-TUV7SIWZ.js} +2 -2
  128. package/dist/cli-bundle/chunks/{chunk-TQ6AX5SQ.js → chunk-UGDONITK.js} +6 -6
  129. package/dist/cli-bundle/chunks/{chunk-4WB6S4YX.js → chunk-UYLA5ROU.js} +4 -4
  130. package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js → chunk-V655JQ5J.js} +6 -6
  131. package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js → chunk-W5X3AHJN.js} +2 -2
  132. package/dist/cli-bundle/chunks/{chunk-32IUNTG4.js → chunk-WBWRQS32.js} +5 -5
  133. package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js → chunk-WOOB7PV7.js} +3 -3
  134. package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js → chunk-WSDIALO4.js} +2 -2
  135. package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js → chunk-WTXDLBSZ.js} +2 -2
  136. package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js → chunk-XBIYI23P.js} +6 -6
  137. package/dist/cli-bundle/chunks/{chunk-ECU6MMTQ.js → chunk-XFO2NJY6.js} +29 -100
  138. package/dist/cli-bundle/chunks/chunk-XFO2NJY6.js.map +1 -0
  139. package/dist/cli-bundle/chunks/{chunk-OGLGI22K.js → chunk-XQCWTSLO.js} +4 -4
  140. package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js → chunk-Y2VSCQ77.js} +4 -4
  141. package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js → chunk-YZR7UMZ6.js} +2 -2
  142. package/dist/cli-bundle/chunks/{chunk-EJ2OCBHF.js → chunk-YZWXMDNH.js} +5 -5
  143. package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js → chunk-ZIEGTQCY.js} +3 -3
  144. package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js → chunk-ZZWMJVW2.js} +4 -4
  145. package/dist/cli-bundle/chunks/{claim-5GU7OE67.js → claim-D6L33A5Y.js} +8 -8
  146. package/dist/cli-bundle/chunks/{claim-2BGBGSVI.js → claim-YAFUTPVK.js} +8 -8
  147. package/dist/cli-bundle/chunks/close-KLDLHAOP.js +14 -0
  148. package/dist/cli-bundle/chunks/{close-AFVKPR57.js → close-TGYXG7TV.js} +7 -7
  149. package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js → close-many-4QSWKCRU.js} +14 -14
  150. package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js → close-many-SNA6LNZH.js} +14 -14
  151. package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js → comments-QC6ARR5X.js} +8 -8
  152. package/dist/cli-bundle/chunks/{comments-RW23R3VE.js → comments-ZHVYGUVC.js} +8 -8
  153. package/dist/cli-bundle/chunks/{config-AUM5WBYA.js → config-O6W2EU2G.js} +7 -7
  154. package/dist/cli-bundle/chunks/{config-OZWSA2NP.js → config-XQRFJXJP.js} +7 -7
  155. package/dist/cli-bundle/chunks/{context-PKCEHQY3.js → context-IHE3IXN5.js} +12 -12
  156. package/dist/cli-bundle/chunks/{context-OYXRGY7S.js → context-WSYWBEUL.js} +12 -12
  157. package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js → contracts-CVBINC7C.js} +3 -3
  158. package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js → contracts-NLCDIZAT.js} +3 -3
  159. package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js → copy-7MUQC44A.js} +5 -5
  160. package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js → copy-ANWXDJVC.js} +5 -5
  161. package/dist/cli-bundle/chunks/create-AJ6HUR5W.js +28 -0
  162. package/dist/cli-bundle/chunks/{create-PM45M6PE.js → create-JIA2IFCO.js} +12 -12
  163. package/dist/cli-bundle/chunks/{delete-7YXHYG67.js → delete-5OLYWQIC.js} +5 -5
  164. package/dist/cli-bundle/chunks/{delete-LPISP43T.js → delete-INHKCIRN.js} +5 -5
  165. package/dist/cli-bundle/chunks/{deps-N2T26FME.js → deps-CCSWGZW7.js} +5 -5
  166. package/dist/cli-bundle/chunks/{deps-WATKQDE3.js → deps-IYEID3QX.js} +5 -5
  167. package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js → docs-3XZK22WF.js} +7 -7
  168. package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js → docs-PKO7OEIM.js} +7 -7
  169. package/dist/cli-bundle/chunks/{eval-6DCLG52D.js → eval-5XYP6NMY.js} +10 -10
  170. package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js → eval-O4WGQYDI.js} +10 -10
  171. package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js → extension-PVGRRZZG.js} +11 -11
  172. package/dist/cli-bundle/chunks/{extension-BNINIMT7.js → extension-T7JNTAAA.js} +11 -11
  173. package/dist/cli-bundle/chunks/{files-6SGKHS6O.js → files-7IU56S6R.js} +10 -10
  174. package/dist/cli-bundle/chunks/files-7IU56S6R.js.map +1 -0
  175. package/dist/cli-bundle/chunks/{files-FUYPSOFJ.js → files-W7HH5EOD.js} +9 -9
  176. package/dist/cli-bundle/chunks/{files-FUYPSOFJ.js.map → files-W7HH5EOD.js.map} +1 -1
  177. package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js → focus-6FA5KYRY.js} +6 -6
  178. package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js → focus-CQ63JFDG.js} +6 -6
  179. package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js → gc-3BG67KTO.js} +3 -3
  180. package/dist/cli-bundle/chunks/{gc-TDWSDR66.js → gc-PEZYGNVB.js} +3 -3
  181. package/dist/cli-bundle/chunks/{get-LY6M2JIM.js → get-J6CSJ4SX.js} +10 -10
  182. package/dist/cli-bundle/chunks/{get-2WGLX74N.js → get-KJTKGNEQ.js} +10 -10
  183. package/dist/cli-bundle/chunks/{health-4RKHYS3T.js → health-32UQICEL.js} +15 -15
  184. package/dist/cli-bundle/chunks/{health-TMFVNYRA.js → health-ZUZG5ULV.js} +15 -15
  185. package/dist/cli-bundle/chunks/history-IOH6FKG7.js +18 -0
  186. package/dist/cli-bundle/chunks/{history-SGRRS72R.js → history-W6QVR6FA.js} +8 -8
  187. package/dist/cli-bundle/chunks/{history-compact-V5DNAQHH.js → history-compact-F355EGL4.js} +20 -27
  188. package/dist/cli-bundle/chunks/history-compact-F355EGL4.js.map +1 -0
  189. package/dist/cli-bundle/chunks/{history-compact-LOED43R3.js → history-compact-JQ6ZGYSJ.js} +19 -26
  190. package/dist/cli-bundle/chunks/history-compact-JQ6ZGYSJ.js.map +7 -0
  191. package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js → history-redact-TUWOUYX5.js} +9 -9
  192. package/dist/cli-bundle/chunks/history-redact-VVDOARNO.js +19 -0
  193. package/dist/cli-bundle/chunks/{history-repair-4WVBVHFR.js → history-repair-MPCAIKYE.js} +20 -28
  194. package/dist/cli-bundle/chunks/history-repair-MPCAIKYE.js.map +1 -0
  195. package/dist/cli-bundle/chunks/{history-repair-PGYQJMGD.js → history-repair-ZKS3LKPV.js} +19 -27
  196. package/dist/cli-bundle/chunks/history-repair-ZKS3LKPV.js.map +7 -0
  197. package/dist/cli-bundle/chunks/init-CZLEEE6Q.js +22 -0
  198. package/dist/cli-bundle/chunks/{init-4GESW7RM.js → init-MAA6UMNQ.js} +12 -12
  199. package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js → learnings-EYC3OKS2.js} +8 -8
  200. package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js → learnings-HKJJUVTA.js} +8 -8
  201. package/dist/cli-bundle/chunks/{list-D7BF5CL2.js → list-HFD5737R.js} +8 -8
  202. package/dist/cli-bundle/chunks/{list-472TIOVK.js → list-KN3TL5Y5.js} +8 -8
  203. package/dist/cli-bundle/chunks/{next-SFQZVX2B.js → next-DQUMFAHG.js} +13 -13
  204. package/dist/cli-bundle/chunks/{next-D5STGWI2.js → next-JUEYC5HE.js} +13 -13
  205. package/dist/cli-bundle/chunks/{notes-W4UEICGF.js → notes-XATYT43P.js} +8 -8
  206. package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js → notes-ZG6RLZXB.js} +8 -8
  207. package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js → plan-5NWQL2DH.js} +12 -12
  208. package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js → plan-DVVLX7LK.js} +12 -12
  209. package/dist/cli-bundle/chunks/{profile-WIQY2KCV.js → profile-54DZ4CLB.js} +8 -8
  210. package/dist/cli-bundle/chunks/{profile-3TOTMUR4.js → profile-PLIQVEOY.js} +8 -8
  211. package/dist/cli-bundle/chunks/{register-list-query-GAPQ6DM3.js → register-list-query-PNRAHNIQ.js} +21 -21
  212. package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js.map → register-list-query-PNRAHNIQ.js.map} +1 -7
  213. package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js → register-list-query-WRS6ACUW.js} +20 -20
  214. package/dist/cli-bundle/chunks/register-list-query-WRS6ACUW.js.map +7 -0
  215. package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js → register-mutation-ET6E4VLE.js} +32 -32
  216. package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js → register-mutation-K2MNRWGI.js} +32 -32
  217. package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js → register-operations-6DQRUTIX.js} +30 -30
  218. package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js → register-operations-73UDWMVB.js} +30 -30
  219. package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js → register-setup-FXZJ2CEJ.js} +15 -15
  220. package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js → register-setup-LYYCMQFV.js} +15 -15
  221. package/dist/cli-bundle/chunks/restore-L27TMMCF.js +17 -0
  222. package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js → restore-R6YJHQK3.js} +9 -9
  223. package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js → scheduling-shortcuts-LE4S7OI7.js} +12 -12
  224. package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js → scheduling-shortcuts-OGODPUBL.js} +12 -12
  225. package/dist/cli-bundle/chunks/{schema-VBCELP5G.js → schema-ICCD3HOP.js} +7 -7
  226. package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js → schema-RHH23PQX.js} +7 -7
  227. package/dist/cli-bundle/chunks/{search-R227JOL6.js → search-HDDKOPFE.js} +10 -10
  228. package/dist/cli-bundle/chunks/{search-7UBETML4.js → search-Z2VGP2Q5.js} +10 -10
  229. package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js → stats-DHMRXHOB.js} +6 -6
  230. package/dist/cli-bundle/chunks/{stats-FAG7COEH.js → stats-ETFP37MB.js} +6 -6
  231. package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js → telemetry-NUZNKDCP.js} +4 -4
  232. package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js → telemetry-ZRBM22QD.js} +4 -4
  233. package/dist/cli-bundle/chunks/{test-SY76DZTO.js → test-H36PM746.js} +15 -15
  234. package/dist/cli-bundle/chunks/{test-QY44WAMR.js → test-XNKTIP4Y.js} +15 -15
  235. package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js → test-all-APCBSXQI.js} +15 -15
  236. package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js → test-all-KIK3OYBY.js} +15 -15
  237. package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js → test-runs-5SLLV3XU.js} +4 -4
  238. package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js → test-runs-L3WKLO67.js} +4 -4
  239. package/dist/cli-bundle/chunks/update-RQKI3AMW.js +24 -0
  240. package/dist/cli-bundle/chunks/{update-IKJZWLQC.js → update-ZM7NJWHY.js} +15 -15
  241. package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js → update-many-GFCQG6ZQ.js} +22 -22
  242. package/dist/cli-bundle/chunks/{update-many-RATAARHU.js → update-many-XGTJ7QIU.js} +22 -22
  243. package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js → upgrade-KJ3JGELR.js} +11 -11
  244. package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js → upgrade-RBRQ7PQU.js} +11 -11
  245. package/dist/cli-bundle/chunks/{validate-NRY6MFXN.js → validate-EW6TGC7R.js} +21 -21
  246. package/dist/cli-bundle/chunks/validate-EW6TGC7R.js.map +7 -0
  247. package/dist/cli-bundle/chunks/{validate-GAJ6FUSI.js → validate-T6PR5WAL.js} +22 -22
  248. package/dist/cli-bundle/chunks/validate-T6PR5WAL.js.map +1 -0
  249. package/dist/cli-bundle/main.js +15 -15
  250. package/dist/core/extensions/extension-types.d.ts +1 -2
  251. package/dist/core/extensions/extension-types.js +2 -2
  252. package/dist/core/extensions/extension-types.js.map +1 -1
  253. package/dist/core/history/history-rewrite.d.ts +10 -0
  254. package/dist/core/history/history-rewrite.js +27 -3
  255. package/dist/core/history/history-rewrite.js.map +1 -1
  256. package/dist/core/item/type-registry.d.ts +1 -0
  257. package/dist/core/item/type-registry.js +153 -177
  258. package/dist/core/item/type-registry.js.map +1 -1
  259. package/dist/sdk/cli-contracts/flag-contracts.js +4 -2
  260. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  261. package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
  262. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  263. package/dist/sdk/cli-contracts/tool-schema.js +55 -94
  264. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  265. package/dist/sdk/package-import-adapters.d.ts +90 -2
  266. package/dist/sdk/package-import-adapters.js +274 -2
  267. package/dist/sdk/package-import-adapters.js.map +1 -1
  268. package/dist/sdk/runtime.d.ts +1 -1
  269. package/dist/sdk/runtime.js +3 -3
  270. package/dist/sdk/runtime.js.map +1 -1
  271. package/package.json +4 -3
  272. package/packages/pm-beads/extensions/beads/runtime-loader.ts +27 -40
  273. package/packages/pm-beads/extensions/beads/runtime.ts +106 -223
  274. package/packages/pm-calendar/extensions/calendar/runtime.ts +21 -18
  275. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +9 -11
  276. package/packages/pm-todos/extensions/todos/runtime-loader.ts +48 -76
  277. package/packages/pm-todos/extensions/todos/runtime.ts +61 -257
  278. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +73 -31
  279. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +80 -34
  280. package/scripts/install.ps1 +7 -7
  281. package/dist/cli-bundle/chunks/activity-BIML7K2D.js +0 -16
  282. package/dist/cli-bundle/chunks/chunk-4EXFFP7T.js.map +0 -7
  283. package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +0 -1
  284. package/dist/cli-bundle/chunks/chunk-6CDCWKSX.js.map +0 -1
  285. package/dist/cli-bundle/chunks/chunk-ECU6MMTQ.js.map +0 -1
  286. package/dist/cli-bundle/chunks/chunk-HQAF23Q2.js.map +0 -7
  287. package/dist/cli-bundle/chunks/chunk-KHVGM5CS.js.map +0 -7
  288. package/dist/cli-bundle/chunks/chunk-KS6ATO47.js.map +0 -7
  289. package/dist/cli-bundle/chunks/chunk-L4SLHV6G.js.map +0 -1
  290. package/dist/cli-bundle/chunks/chunk-MHRS5FUX.js.map +0 -1
  291. package/dist/cli-bundle/chunks/chunk-NZ7QIUP5.js.map +0 -7
  292. package/dist/cli-bundle/chunks/chunk-RAHINBVP.js.map +0 -7
  293. package/dist/cli-bundle/chunks/chunk-RJH5VQHW.js.map +0 -1
  294. package/dist/cli-bundle/chunks/chunk-SYE6WMV6.js.map +0 -1
  295. package/dist/cli-bundle/chunks/chunk-U3S2B7TA.js.map +0 -1
  296. package/dist/cli-bundle/chunks/chunk-WYOIIFSE.js.map +0 -7
  297. package/dist/cli-bundle/chunks/close-6YODBUIV.js +0 -14
  298. package/dist/cli-bundle/chunks/create-Z7YCH3BE.js +0 -28
  299. package/dist/cli-bundle/chunks/files-6SGKHS6O.js.map +0 -1
  300. package/dist/cli-bundle/chunks/history-CGNQJXFE.js +0 -18
  301. package/dist/cli-bundle/chunks/history-compact-LOED43R3.js.map +0 -7
  302. package/dist/cli-bundle/chunks/history-compact-V5DNAQHH.js.map +0 -1
  303. package/dist/cli-bundle/chunks/history-redact-N3JK7VBW.js +0 -19
  304. package/dist/cli-bundle/chunks/history-repair-4WVBVHFR.js.map +0 -1
  305. package/dist/cli-bundle/chunks/history-repair-PGYQJMGD.js.map +0 -7
  306. package/dist/cli-bundle/chunks/init-XIDPABA4.js +0 -22
  307. package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js.map +0 -1
  308. package/dist/cli-bundle/chunks/restore-EXHU34EU.js +0 -17
  309. package/dist/cli-bundle/chunks/update-A7EICML6.js +0 -24
  310. package/dist/cli-bundle/chunks/validate-GAJ6FUSI.js.map +0 -1
  311. package/dist/cli-bundle/chunks/validate-NRY6MFXN.js.map +0 -7
  312. /package/dist/cli-bundle/chunks/{activity-BIML7K2D.js.map → activity-IDS5GSYG.js.map} +0 -0
  313. /package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js.map → activity-OENQCYZD.js.map} +0 -0
  314. /package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js.map → aggregate-EC4LWS3U.js.map} +0 -0
  315. /package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js.map → aggregate-RCB3QJJE.js.map} +0 -0
  316. /package/dist/cli-bundle/chunks/{append-JFG4WQMG.js.map → append-ADBOI3A6.js.map} +0 -0
  317. /package/dist/cli-bundle/chunks/{append-EZESUVJT.js.map → append-XLEKVVWB.js.map} +0 -0
  318. /package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js.map → chunk-2LRMWMZ6.js.map} +0 -0
  319. /package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js.map → chunk-3C5T3ZEO.js.map} +0 -0
  320. /package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js.map → chunk-3MLQZI3H.js.map} +0 -0
  321. /package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js.map → chunk-4EVY7CQN.js.map} +0 -0
  322. /package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js.map → chunk-4IW7STMB.js.map} +0 -0
  323. /package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js.map → chunk-4OXNQHKQ.js.map} +0 -0
  324. /package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js.map → chunk-4SHME4VR.js.map} +0 -0
  325. /package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js.map → chunk-6QY2NA2M.js.map} +0 -0
  326. /package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js.map → chunk-6YB7HG2J.js.map} +0 -0
  327. /package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js.map → chunk-724VLYDJ.js.map} +0 -0
  328. /package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js.map → chunk-7G5SUU6F.js.map} +0 -0
  329. /package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js.map → chunk-7ITQSEBL.js.map} +0 -0
  330. /package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js.map → chunk-A222YWOQ.js.map} +0 -0
  331. /package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js.map → chunk-A2W3XKAD.js.map} +0 -0
  332. /package/dist/cli-bundle/chunks/{chunk-YSDFIY7N.js.map → chunk-AOP2EMK3.js.map} +0 -0
  333. /package/dist/cli-bundle/chunks/{chunk-6KRFL33E.js.map → chunk-CN4OAA2G.js.map} +0 -0
  334. /package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js.map → chunk-CQFZRLXQ.js.map} +0 -0
  335. /package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js.map → chunk-CQISNF3Z.js.map} +0 -0
  336. /package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js.map → chunk-D2LDM35X.js.map} +0 -0
  337. /package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js.map → chunk-DJ5S2LDY.js.map} +0 -0
  338. /package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js.map → chunk-EB4BBEZD.js.map} +0 -0
  339. /package/dist/cli-bundle/chunks/{chunk-ERG65A2L.js.map → chunk-EH23N5FX.js.map} +0 -0
  340. /package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js.map → chunk-FDNJMYZB.js.map} +0 -0
  341. /package/dist/cli-bundle/chunks/{chunk-CXR3CMBQ.js.map → chunk-FMWQRMHS.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js.map → chunk-HL742IBM.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{chunk-YF746GTH.js.map → chunk-J4KNRDI3.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js.map → chunk-JZJJEJBR.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{chunk-XRYSCRZR.js.map → chunk-KKHIQOTN.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js.map → chunk-M6PR5BC6.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js.map → chunk-MZ4NH46V.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{chunk-AJHYQCBJ.js.map → chunk-MZG6I2Q2.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js.map → chunk-N2LOJUBB.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{chunk-WRYERRZX.js.map → chunk-NGDK3KEZ.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js.map → chunk-NHKXOMZ5.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js.map → chunk-OTSP6UEX.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js.map → chunk-PUVPC5DL.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js.map → chunk-PV5JS7MP.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js.map → chunk-Q2266G4S.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{chunk-67LARBDL.js.map → chunk-Q3XVLRCJ.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js.map → chunk-R7EMP4JG.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{chunk-JPATY4SE.js.map → chunk-SBNT6SLO.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js.map → chunk-T5RTYLZJ.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js.map → chunk-TGYDJEJH.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js.map → chunk-TO4KCIOT.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{chunk-FUFFPIYA.js.map → chunk-TUV7SIWZ.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{chunk-TQ6AX5SQ.js.map → chunk-UGDONITK.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{chunk-4WB6S4YX.js.map → chunk-UYLA5ROU.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js.map → chunk-V655JQ5J.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js.map → chunk-W5X3AHJN.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{chunk-32IUNTG4.js.map → chunk-WBWRQS32.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js.map → chunk-WOOB7PV7.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js.map → chunk-WSDIALO4.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js.map → chunk-WTXDLBSZ.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js.map → chunk-XBIYI23P.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{chunk-OGLGI22K.js.map → chunk-XQCWTSLO.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js.map → chunk-Y2VSCQ77.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js.map → chunk-YZR7UMZ6.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{chunk-EJ2OCBHF.js.map → chunk-YZWXMDNH.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js.map → chunk-ZIEGTQCY.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js.map → chunk-ZZWMJVW2.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{claim-5GU7OE67.js.map → claim-D6L33A5Y.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{claim-2BGBGSVI.js.map → claim-YAFUTPVK.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{close-6YODBUIV.js.map → close-KLDLHAOP.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{close-AFVKPR57.js.map → close-TGYXG7TV.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js.map → close-many-4QSWKCRU.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js.map → close-many-SNA6LNZH.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js.map → comments-QC6ARR5X.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{comments-RW23R3VE.js.map → comments-ZHVYGUVC.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{config-AUM5WBYA.js.map → config-O6W2EU2G.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{config-OZWSA2NP.js.map → config-XQRFJXJP.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{context-PKCEHQY3.js.map → context-IHE3IXN5.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{context-OYXRGY7S.js.map → context-WSYWBEUL.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js.map → contracts-CVBINC7C.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js.map → contracts-NLCDIZAT.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js.map → copy-7MUQC44A.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js.map → copy-ANWXDJVC.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{create-Z7YCH3BE.js.map → create-AJ6HUR5W.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{create-PM45M6PE.js.map → create-JIA2IFCO.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{delete-7YXHYG67.js.map → delete-5OLYWQIC.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{delete-LPISP43T.js.map → delete-INHKCIRN.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{deps-N2T26FME.js.map → deps-CCSWGZW7.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{deps-WATKQDE3.js.map → deps-IYEID3QX.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js.map → docs-3XZK22WF.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js.map → docs-PKO7OEIM.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{eval-6DCLG52D.js.map → eval-5XYP6NMY.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js.map → eval-O4WGQYDI.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js.map → extension-PVGRRZZG.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{extension-BNINIMT7.js.map → extension-T7JNTAAA.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js.map → focus-6FA5KYRY.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js.map → focus-CQ63JFDG.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js.map → gc-3BG67KTO.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{gc-TDWSDR66.js.map → gc-PEZYGNVB.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{get-LY6M2JIM.js.map → get-J6CSJ4SX.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{get-2WGLX74N.js.map → get-KJTKGNEQ.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{health-4RKHYS3T.js.map → health-32UQICEL.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{health-TMFVNYRA.js.map → health-ZUZG5ULV.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{history-CGNQJXFE.js.map → history-IOH6FKG7.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{history-SGRRS72R.js.map → history-W6QVR6FA.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js.map → history-redact-TUWOUYX5.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{history-redact-N3JK7VBW.js.map → history-redact-VVDOARNO.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{init-XIDPABA4.js.map → init-CZLEEE6Q.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{init-4GESW7RM.js.map → init-MAA6UMNQ.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js.map → learnings-EYC3OKS2.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js.map → learnings-HKJJUVTA.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{list-D7BF5CL2.js.map → list-HFD5737R.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{list-472TIOVK.js.map → list-KN3TL5Y5.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{next-SFQZVX2B.js.map → next-DQUMFAHG.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{next-D5STGWI2.js.map → next-JUEYC5HE.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{notes-W4UEICGF.js.map → notes-XATYT43P.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js.map → notes-ZG6RLZXB.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js.map → plan-5NWQL2DH.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js.map → plan-DVVLX7LK.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{profile-WIQY2KCV.js.map → profile-54DZ4CLB.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{profile-3TOTMUR4.js.map → profile-PLIQVEOY.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js.map → register-mutation-ET6E4VLE.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js.map → register-mutation-K2MNRWGI.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js.map → register-operations-6DQRUTIX.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js.map → register-operations-73UDWMVB.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js.map → register-setup-FXZJ2CEJ.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js.map → register-setup-LYYCMQFV.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{restore-EXHU34EU.js.map → restore-L27TMMCF.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js.map → restore-R6YJHQK3.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js.map → scheduling-shortcuts-LE4S7OI7.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js.map → scheduling-shortcuts-OGODPUBL.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{schema-VBCELP5G.js.map → schema-ICCD3HOP.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js.map → schema-RHH23PQX.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{search-R227JOL6.js.map → search-HDDKOPFE.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{search-7UBETML4.js.map → search-Z2VGP2Q5.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js.map → stats-DHMRXHOB.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{stats-FAG7COEH.js.map → stats-ETFP37MB.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js.map → telemetry-NUZNKDCP.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js.map → telemetry-ZRBM22QD.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{test-SY76DZTO.js.map → test-H36PM746.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{test-QY44WAMR.js.map → test-XNKTIP4Y.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js.map → test-all-APCBSXQI.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js.map → test-all-KIK3OYBY.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js.map → test-runs-5SLLV3XU.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js.map → test-runs-L3WKLO67.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{update-A7EICML6.js.map → update-RQKI3AMW.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{update-IKJZWLQC.js.map → update-ZM7NJWHY.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js.map → update-many-GFCQG6ZQ.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{update-many-RATAARHU.js.map → update-many-XGTJ7QIU.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js.map → upgrade-KJ3JGELR.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js.map → upgrade-RBRQ7PQU.js.map} +0 -0
@@ -5,16 +5,12 @@ import { fileURLToPath, pathToFileURL } from "node:url";
5
5
  /**
6
6
  * This file is auto-generated by scripts/gen-package-runtime-loaders.mjs.
7
7
  * Do not edit directly.
8
- * This file is shipped with the package extension and intentionally avoids
9
- * static SDK imports so project-local installed extensions can load it.
10
8
  */
11
-
12
9
  const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
13
10
  const CURRENT_EXTENSION_ROOT = path.dirname(fileURLToPath(import.meta.url));
14
11
  const EXTENSION_NAME = "beads";
15
12
  const PACKAGE_NAME = "pm-beads";
16
13
  const DIAGNOSTIC_NAME = "beads";
17
-
18
14
  export type PackageRuntimeModule = Record<string, unknown>;
19
15
 
20
16
  function isRecord(value: unknown): value is Record<string, unknown> {
@@ -42,15 +38,11 @@ function isMissingRuntimeModuleError(error: unknown, modulePath: string): boolea
42
38
  }
43
39
 
44
40
  function resolvePackageRootCandidates(): string[] {
45
- const candidates: string[] = [];
46
41
  const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
47
- if (typeof envRoot === "string" && envRoot.trim().length > 0) {
48
- candidates.push(path.resolve(envRoot.trim()));
49
- }
42
+ const candidates = typeof envRoot === "string" && envRoot.trim().length > 0 ? [path.resolve(envRoot.trim())] : [];
50
43
  const argvEntry = typeof process.argv[1] === "string" ? process.argv[1].trim() : "";
51
44
  if (argvEntry.length > 0) {
52
- const resolvedEntry = path.resolve(argvEntry);
53
- const entryDir = path.dirname(resolvedEntry);
45
+ const entryDir = path.dirname(path.resolve(argvEntry));
54
46
  candidates.push(path.resolve(entryDir, ".."));
55
47
  candidates.push(path.resolve(entryDir, "../.."));
56
48
  candidates.push(path.resolve(entryDir, "../../.."));
@@ -58,41 +50,36 @@ function resolvePackageRootCandidates(): string[] {
58
50
  return [...new Set(candidates)];
59
51
  }
60
52
 
61
- export async function loadPackageRuntimeModule(): Promise<PackageRuntimeModule> {
62
- const attempted: string[] = [];
63
- for (const packageRoot of resolvePackageRootCandidates()) {
64
- const modulePaths = [
65
- path.join(packageRoot, ".agents", "pm", "extensions", EXTENSION_NAME, "runtime.ts"),
66
- path.join(packageRoot, "packages", PACKAGE_NAME, "extensions", EXTENSION_NAME, "runtime.ts"),
67
- ];
68
- for (const modulePath of modulePaths) {
69
- attempted.push(modulePath);
70
- if (!existsSync(modulePath)) {
71
- continue;
72
- }
73
- try {
74
- return await import(pathToFileURL(modulePath).href) as PackageRuntimeModule;
75
- } catch (error: unknown) {
76
- if (isMissingRuntimeModuleError(error, modulePath)) {
77
- continue;
78
- }
79
- throw error;
80
- }
53
+ function runtimePaths(packageRoot: string): string[] {
54
+ return [
55
+ path.join(packageRoot, ".agents", "pm", "extensions", EXTENSION_NAME, "runtime.ts"),
56
+ path.join(packageRoot, "packages", PACKAGE_NAME, "extensions", EXTENSION_NAME, "runtime.ts"),
57
+ ];
58
+ }
59
+
60
+ async function tryRuntime(modulePath: string, attempted: string[]): Promise<PackageRuntimeModule | undefined> {
61
+ attempted.push(modulePath);
62
+ if (!existsSync(modulePath)) {
63
+ return undefined;
64
+ }
65
+ try {
66
+ return await import(pathToFileURL(modulePath).href) as PackageRuntimeModule;
67
+ } catch (error: unknown) {
68
+ if (isMissingRuntimeModuleError(error, modulePath)) {
69
+ return undefined;
81
70
  }
71
+ throw error;
82
72
  }
73
+ }
83
74
 
84
- const localRuntimePath = path.join(CURRENT_EXTENSION_ROOT, "runtime.ts");
85
- attempted.push(localRuntimePath);
86
- if (existsSync(localRuntimePath)) {
87
- try {
88
- return await import(pathToFileURL(localRuntimePath).href) as PackageRuntimeModule;
89
- } catch (error: unknown) {
90
- if (!isMissingRuntimeModuleError(error, localRuntimePath)) {
91
- throw error;
92
- }
75
+ export async function loadPackageRuntimeModule(): Promise<PackageRuntimeModule> {
76
+ const attempted: string[] = [];
77
+ for (const modulePath of [...resolvePackageRootCandidates().flatMap(runtimePaths), path.join(CURRENT_EXTENSION_ROOT, "runtime.ts")]) {
78
+ const loaded = await tryRuntime(modulePath, attempted);
79
+ if (loaded) {
80
+ return loaded;
93
81
  }
94
82
  }
95
-
96
83
  throw new Error(
97
84
  `Unable to resolve packaged ${DIAGNOSTIC_NAME} extension runtime module. ` +
98
85
  `Tried: ${attempted.join(", ")}. Ensure the installed extension includes runtime.ts or PM_CLI_PACKAGE_ROOT points to an installed pm package root.`,
@@ -10,11 +10,10 @@ import type {
10
10
  ItemMetadata,
11
11
  ItemStatus,
12
12
  ItemType,
13
- LinkedDoc,
14
- LinkedFile,
15
- LinkedTest,
16
- LogNote,
17
13
  PmSettings,
14
+ ToImportLinkedArtifactsOptions,
15
+ ToImportLinkedTestsOptions,
16
+ ToImportLogEntriesOptions,
18
17
  } from "@unbrained/pm-cli/sdk";
19
18
 
20
19
  const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
@@ -142,6 +141,10 @@ interface BeadsSdkModule {
142
141
  runActiveOnReadHooks: (context: { path: string; scope: "project" | "global" }) => Promise<string[]>;
143
142
  selectImportAuthor: (explicitAuthor: string | undefined, settingsAuthor: string) => string;
144
143
  toEstimatedMinutesValue: (value: unknown) => number | undefined;
144
+ toImportLinkedDocs: (value: unknown, options?: ToImportLinkedArtifactsOptions) => ItemMetadata["docs"];
145
+ toImportLinkedFiles: (value: unknown, options?: ToImportLinkedArtifactsOptions) => ItemMetadata["files"];
146
+ toImportLinkedTests: (value: unknown, options?: ToImportLinkedTestsOptions) => ItemMetadata["tests"];
147
+ toImportLogEntries: (value: unknown, options: ToImportLogEntriesOptions) => ItemMetadata["comments"];
145
148
  toImportPriority: (value: unknown) => 0 | 1 | 2 | 3 | 4;
146
149
  toImportStatus: (value: unknown) => ItemStatus;
147
150
  toImportTags: (value: unknown) => string[];
@@ -173,6 +176,10 @@ const BEADS_SDK_FUNCTION_EXPORTS = [
173
176
  "runActiveOnReadHooks",
174
177
  "selectImportAuthor",
175
178
  "toEstimatedMinutesValue",
179
+ "toImportLinkedDocs",
180
+ "toImportLinkedFiles",
181
+ "toImportLinkedTests",
182
+ "toImportLogEntries",
176
183
  "toImportPriority",
177
184
  "toImportStatus",
178
185
  "toImportTags",
@@ -241,6 +248,10 @@ const {
241
248
  runActiveOnReadHooks,
242
249
  selectImportAuthor,
243
250
  toEstimatedMinutesValue,
251
+ toImportLinkedDocs,
252
+ toImportLinkedFiles,
253
+ toImportLinkedTests,
254
+ toImportLogEntries,
244
255
  toImportPriority,
245
256
  toImportStatus,
246
257
  toImportTags,
@@ -255,6 +266,41 @@ const toEstimatedMinutes = toEstimatedMinutesValue;
255
266
  const toPriority = toImportPriority;
256
267
  const toTags = toImportTags;
257
268
 
269
+ const BEADS_DEPENDENCY_KIND_ALIASES = new Map<string, Dependency["kind"]>([
270
+ ["parent-child", "parent_child"],
271
+ ["child-of", "child_of"],
272
+ ["related-to", "related_to"],
273
+ ["relates-to", "related_to"],
274
+ ["discovered-from", "discovered_from"],
275
+ ["blocked-by", "blocked_by"],
276
+ ["incident-from", "incident_from"],
277
+ ]);
278
+
279
+ const BEADS_LOG_ENTRY_OPTIONS = {
280
+ allowScalar: true,
281
+ textKeys: ["text", "comment", "note", "learning"],
282
+ toIsoString,
283
+ } satisfies Partial<ToImportLogEntriesOptions>;
284
+
285
+ const BEADS_FILE_OPTIONS = {
286
+ allowScalar: true,
287
+ pathKeys: ["path", "file"],
288
+ } satisfies ToImportLinkedArtifactsOptions;
289
+
290
+ const BEADS_DOC_OPTIONS = {
291
+ allowScalar: true,
292
+ pathKeys: ["path", "doc"],
293
+ } satisfies ToImportLinkedArtifactsOptions;
294
+
295
+ const BEADS_TEST_OPTIONS = {
296
+ allowScalar: true,
297
+ commandKeys: ["command", "test"],
298
+ requireCommand: true,
299
+ integerTimeout: true,
300
+ timeoutMinimum: 0,
301
+ timeoutExclusiveMinimum: true,
302
+ } satisfies ToImportLinkedTestsOptions;
303
+
258
304
  function toIsoString(value: unknown): string | undefined {
259
305
  const raw = toNonEmptyString(value);
260
306
  if (!raw) {
@@ -307,26 +353,15 @@ function toDependencyKind(value: unknown): { kind: Dependency["kind"]; sourceKin
307
353
  return preserveIfChanged(normalized as Dependency["kind"]);
308
354
  }
309
355
 
310
- switch (normalized) {
311
- case "parent-child":
312
- return preserveIfChanged("parent_child");
313
- case "child-of":
314
- return preserveIfChanged("child_of");
315
- case "related-to":
316
- case "relates-to":
317
- return preserveIfChanged("related_to");
318
- case "discovered-from":
319
- return preserveIfChanged("discovered_from");
320
- case "blocked-by":
321
- return preserveIfChanged("blocked_by");
322
- case "incident-from":
323
- return preserveIfChanged("incident_from");
324
- default:
325
- return {
326
- kind: "related",
327
- sourceKind: raw,
328
- };
356
+ const aliasKind = BEADS_DEPENDENCY_KIND_ALIASES.get(normalized);
357
+ if (aliasKind) {
358
+ return preserveIfChanged(aliasKind);
329
359
  }
360
+
361
+ return {
362
+ kind: "related",
363
+ sourceKind: raw,
364
+ };
330
365
  }
331
366
 
332
367
  function normalizeImportedId(id: string, prefix: string, preserveSourceIds: boolean): string {
@@ -345,219 +380,55 @@ function toDependencies(
345
380
 
346
381
  const dependencies: Dependency[] = [];
347
382
  for (const entry of value) {
348
- if (typeof entry === "string") {
349
- const id = toNonEmptyString(entry);
350
- if (!id) {
351
- continue;
352
- }
353
- dependencies.push({
354
- id: normalizeImportedId(id, prefix, preserveSourceIds),
355
- kind: "related",
356
- created_at: fallbackCreatedAt,
357
- });
358
- continue;
359
- }
360
- if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
361
- continue;
362
- }
363
- const candidate = entry as Record<string, unknown>;
364
- const id = toNonEmptyString(candidate.id) ?? toNonEmptyString(candidate.item_id) ?? toNonEmptyString(candidate.depends_on_id);
365
- if (!id) {
366
- continue;
367
- }
368
- const dependencyKind = toDependencyKind(candidate.type ?? candidate.kind);
369
- dependencies.push({
370
- id: normalizeImportedId(id, prefix, preserveSourceIds),
371
- kind: dependencyKind.kind,
372
- created_at: toIsoString(candidate.created_at) ?? fallbackCreatedAt,
373
- author: toNonEmptyString(candidate.author) ?? toNonEmptyString(candidate.created_by),
374
- source_kind: dependencyKind.sourceKind,
375
- });
383
+ const dependency = toDependency(entry, fallbackCreatedAt, prefix, preserveSourceIds);
384
+ if (dependency) dependencies.push(dependency);
376
385
  }
377
386
 
378
387
  return dependencies.length > 0 ? dependencies : undefined;
379
388
  }
380
389
 
381
- function toLogEntries(value: unknown, fallbackCreatedAt: string, fallbackAuthor: string): LogNote[] | undefined {
382
- if (typeof value === "string") {
383
- const text = toNonEmptyString(value);
384
- if (!text) {
385
- return undefined;
386
- }
387
- return [
388
- {
389
- created_at: fallbackCreatedAt,
390
- author: fallbackAuthor,
391
- text,
392
- },
393
- ];
394
- }
395
- if (!Array.isArray(value)) {
396
- return undefined;
397
- }
398
-
399
- const entries: LogNote[] = [];
400
- for (const entry of value) {
401
- if (typeof entry === "string") {
402
- const text = toNonEmptyString(entry);
403
- if (!text) {
404
- continue;
405
- }
406
- entries.push({
407
- created_at: fallbackCreatedAt,
408
- author: fallbackAuthor,
409
- text,
410
- });
411
- continue;
412
- }
413
- if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
414
- continue;
415
- }
416
- const candidate = entry as Record<string, unknown>;
417
- const text =
418
- toNonEmptyString(candidate.text) ??
419
- toNonEmptyString(candidate.comment) ??
420
- toNonEmptyString(candidate.note) ??
421
- toNonEmptyString(candidate.learning);
422
- if (!text) {
423
- continue;
424
- }
425
- entries.push({
426
- created_at: toIsoString(candidate.created_at) ?? fallbackCreatedAt,
427
- author: toNonEmptyString(candidate.author) ?? fallbackAuthor,
428
- text,
429
- });
430
- }
431
-
432
- return entries.length > 0 ? entries : undefined;
433
- }
434
-
435
- function toLinkedFiles(value: unknown): LinkedFile[] | undefined {
436
- if (typeof value === "string") {
437
- const p = toNonEmptyString(value);
438
- if (!p) return undefined;
439
- return [{ path: p, scope: "project" }];
440
- }
441
- if (!Array.isArray(value)) {
442
- return undefined;
443
- }
444
-
445
- const files: LinkedFile[] = [];
446
- for (const entry of value) {
447
- if (typeof entry === "string") {
448
- const p = toNonEmptyString(entry);
449
- if (p) files.push({ path: p, scope: "project" });
450
- continue;
451
- }
452
- if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
453
- continue;
454
- }
455
- const candidate = entry as Record<string, unknown>;
456
- const p = toNonEmptyString(candidate.path) ?? toNonEmptyString(candidate.file);
457
- if (!p) continue;
458
-
459
- files.push({
460
- path: p,
461
- scope: toNonEmptyString(candidate.scope) === "global" ? "global" : "project",
462
- note: toNonEmptyString(candidate.note),
463
- });
464
- }
465
-
466
- return files.length > 0 ? files : undefined;
467
- }
468
-
469
- function toLinkedTests(value: unknown): LinkedTest[] | undefined {
390
+ function toDependency(
391
+ value: unknown,
392
+ fallbackCreatedAt: string,
393
+ prefix: string,
394
+ preserveSourceIds: boolean,
395
+ ): Dependency | undefined {
470
396
  if (typeof value === "string") {
471
- const c = toNonEmptyString(value);
472
- if (!c) return undefined;
473
- return [{ command: c, scope: "project" }];
474
- }
475
- if (!Array.isArray(value)) {
476
- return undefined;
397
+ return toDependencyFromString(value, fallbackCreatedAt, prefix, preserveSourceIds);
477
398
  }
478
-
479
- const tests: LinkedTest[] = [];
480
- for (const entry of value) {
481
- if (typeof entry === "string") {
482
- const c = toNonEmptyString(entry);
483
- if (c) tests.push({ command: c, scope: "project" });
484
- continue;
485
- }
486
- const linkedTest = toLinkedTestFromRecord(entry);
487
- if (linkedTest) {
488
- tests.push(linkedTest);
489
- }
490
- }
491
-
492
- return tests.length > 0 ? tests : undefined;
493
- }
494
-
495
- function toLinkedTestTimeout(value: unknown): number | undefined {
496
- if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
497
- return value;
498
- }
499
- if (typeof value !== "string") {
500
- return undefined;
501
- }
502
- const trimmed = value.trim();
503
- if (!trimmed) {
504
- return undefined;
505
- }
506
- const parsed = Number(trimmed);
507
- return Number.isFinite(parsed) && parsed >= 0 ? parsed : undefined;
508
- }
509
-
510
- function toLinkedTestFromRecord(value: unknown): LinkedTest | undefined {
511
399
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
512
400
  return undefined;
513
401
  }
514
402
  const candidate = value as Record<string, unknown>;
515
- const command = toNonEmptyString(candidate.command) ?? toNonEmptyString(candidate.test);
516
- const p = toNonEmptyString(candidate.path);
517
- if (!command && !p) {
403
+ const id = toNonEmptyString(candidate.id) ?? toNonEmptyString(candidate.item_id) ?? toNonEmptyString(candidate.depends_on_id);
404
+ if (!id) {
518
405
  return undefined;
519
406
  }
407
+ const dependencyKind = toDependencyKind(candidate.type ?? candidate.kind);
520
408
  return {
521
- command,
522
- path: p,
523
- scope: toNonEmptyString(candidate.scope) === "global" ? "global" : "project",
524
- timeout_seconds: toLinkedTestTimeout(candidate.timeout_seconds),
525
- note: toNonEmptyString(candidate.note),
409
+ id: normalizeImportedId(id, prefix, preserveSourceIds),
410
+ kind: dependencyKind.kind,
411
+ created_at: toIsoString(candidate.created_at) ?? fallbackCreatedAt,
412
+ author: toNonEmptyString(candidate.author) ?? toNonEmptyString(candidate.created_by),
413
+ source_kind: dependencyKind.sourceKind,
526
414
  };
527
415
  }
528
416
 
529
- function toLinkedDocs(value: unknown): LinkedDoc[] | undefined {
530
- if (typeof value === "string") {
531
- const p = toNonEmptyString(value);
532
- if (!p) return undefined;
533
- return [{ path: p, scope: "project" }];
534
- }
535
- if (!Array.isArray(value)) {
417
+ function toDependencyFromString(
418
+ value: string,
419
+ fallbackCreatedAt: string,
420
+ prefix: string,
421
+ preserveSourceIds: boolean,
422
+ ): Dependency | undefined {
423
+ const id = toNonEmptyString(value);
424
+ if (!id) {
536
425
  return undefined;
537
426
  }
538
-
539
- const docs: LinkedDoc[] = [];
540
- for (const entry of value) {
541
- if (typeof entry === "string") {
542
- const p = toNonEmptyString(entry);
543
- if (p) docs.push({ path: p, scope: "project" });
544
- continue;
545
- }
546
- if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
547
- continue;
548
- }
549
- const candidate = entry as Record<string, unknown>;
550
- const p = toNonEmptyString(candidate.path) ?? toNonEmptyString(candidate.doc);
551
- if (!p) continue;
552
-
553
- docs.push({
554
- path: p,
555
- scope: toNonEmptyString(candidate.scope) === "global" ? "global" : "project",
556
- note: toNonEmptyString(candidate.note),
557
- });
558
- }
559
-
560
- return docs.length > 0 ? docs : undefined;
427
+ return {
428
+ id: normalizeImportedId(id, prefix, preserveSourceIds),
429
+ kind: "related",
430
+ created_at: fallbackCreatedAt,
431
+ };
561
432
  }
562
433
 
563
434
  const selectAuthor = selectImportAuthor;
@@ -714,12 +585,24 @@ async function importBeadsRecord(record: BeadsRecord, lineNumber: number, runtim
714
585
  external_ref: toNonEmptyString(record.external_ref),
715
586
  close_reason: toNonEmptyString(record.close_reason),
716
587
  dependencies: toDependencies(record.dependencies, createdAt, runtime.settings.id_prefix, runtime.preserveSourceIds),
717
- comments: toLogEntries(record.comments, createdAt, runtime.author),
718
- notes: toLogEntries(record.notes, createdAt, runtime.author),
719
- learnings: toLogEntries(record.learnings, createdAt, runtime.author),
720
- files: toLinkedFiles(record.files),
721
- tests: toLinkedTests(record.tests),
722
- docs: toLinkedDocs(record.docs),
588
+ comments: toImportLogEntries(record.comments, {
589
+ ...BEADS_LOG_ENTRY_OPTIONS,
590
+ fallbackCreatedAt: createdAt,
591
+ fallbackAuthor: runtime.author,
592
+ }),
593
+ notes: toImportLogEntries(record.notes, {
594
+ ...BEADS_LOG_ENTRY_OPTIONS,
595
+ fallbackCreatedAt: createdAt,
596
+ fallbackAuthor: runtime.author,
597
+ }),
598
+ learnings: toImportLogEntries(record.learnings, {
599
+ ...BEADS_LOG_ENTRY_OPTIONS,
600
+ fallbackCreatedAt: createdAt,
601
+ fallbackAuthor: runtime.author,
602
+ }),
603
+ files: toImportLinkedFiles(record.files, BEADS_FILE_OPTIONS),
604
+ tests: toImportLinkedTests(record.tests, BEADS_TEST_OPTIONS),
605
+ docs: toImportLinkedDocs(record.docs, BEADS_DOC_OPTIONS),
723
606
  });
724
607
  const afterDocument = runtime.sdk.canonicalDocument({
725
608
  metadata: frontMatter,
@@ -62,39 +62,41 @@ function isCalendarResult(value: unknown): value is CalendarResult {
62
62
  );
63
63
  }
64
64
 
65
+ function readObjectPayload(payload: unknown): Record<string, unknown> | null {
66
+ if (typeof payload !== "object" || payload === null || Array.isArray(payload)) {
67
+ return null;
68
+ }
69
+ return payload as Record<string, unknown>;
70
+ }
71
+
65
72
  function readPayloadFormat(payload: unknown): "toon" | "json" {
66
- if (typeof payload === "object" && payload !== null) {
67
- const format = (payload as { format?: unknown }).format;
68
- if (format === "json") {
69
- return "json";
70
- }
73
+ const record = readObjectPayload(payload);
74
+ if (record?.format === "json") {
75
+ return "json";
71
76
  }
72
77
  return "toon";
73
78
  }
74
79
 
75
80
  function readPayloadResult(payload: unknown): unknown {
76
- if (typeof payload === "object" && payload !== null && "result" in payload) {
77
- return (payload as { result?: unknown }).result;
81
+ const record = readObjectPayload(payload);
82
+ if (!record || !Object.hasOwn(record, "result")) {
83
+ return payload;
78
84
  }
79
- return payload;
85
+ return record.result;
80
86
  }
81
87
 
82
88
  function readPayloadCommandOptions(payload: unknown): CalendarOptions {
83
- if (typeof payload === "object" && payload !== null) {
84
- const commandOptions = (payload as { command_options?: unknown }).command_options;
85
- if (typeof commandOptions === "object" && commandOptions !== null) {
86
- return commandOptions as CalendarOptions;
87
- }
89
+ const commandOptions = readObjectPayload(payload)?.command_options;
90
+ if (typeof commandOptions === "object" && commandOptions !== null && !Array.isArray(commandOptions)) {
91
+ return commandOptions as CalendarOptions;
88
92
  }
89
93
  return {};
90
94
  }
91
95
 
92
96
  function readPayloadGlobalOptions(payload: unknown): GlobalOptions {
93
- if (typeof payload === "object" && payload !== null) {
94
- const global = (payload as { global?: unknown }).global;
95
- if (typeof global === "object" && global !== null) {
96
- return global as GlobalOptions;
97
- }
97
+ const global = readObjectPayload(payload)?.global;
98
+ if (typeof global === "object" && global !== null && !Array.isArray(global)) {
99
+ return global as GlobalOptions;
98
100
  }
99
101
  return {};
100
102
  }
@@ -137,6 +139,7 @@ export function renderCalendarPackageOutput(context: ServiceOverrideContext): st
137
139
  */
138
140
  export const _testOnly = {
139
141
  readPayloadFormat,
142
+ readPayloadResult,
140
143
  readPayloadCommandOptions,
141
144
  readPayloadGlobalOptions,
142
145
  };
@@ -211,21 +211,19 @@ async function buildCompletionRuntimeConfig(
211
211
  };
212
212
  }
213
213
 
214
+ function payloadRecord(payload: unknown): Record<string, unknown> | undefined {
215
+ return typeof payload === "object" && payload !== null && !Array.isArray(payload)
216
+ ? (payload as Record<string, unknown>)
217
+ : undefined;
218
+ }
219
+
214
220
  function readPayloadFormat(payload: unknown): "toon" | "json" {
215
- if (typeof payload === "object" && payload !== null) {
216
- const format = (payload as { format?: unknown }).format;
217
- if (format === "json") {
218
- return "json";
219
- }
220
- }
221
- return "toon";
221
+ return payloadRecord(payload)?.format === "json" ? "json" : "toon";
222
222
  }
223
223
 
224
224
  function readPayloadResult(payload: unknown): unknown {
225
- if (typeof payload === "object" && payload !== null && "result" in payload) {
226
- return (payload as { result?: unknown }).result;
227
- }
228
- return payload;
225
+ const record = payloadRecord(payload);
226
+ return record && Object.hasOwn(record, "result") ? record.result : payload;
229
227
  }
230
228
 
231
229
  function collectTagsFromItems(items: Array<{ metadata: { tags?: string[] } }>): string[] {