@unbrained/pm-cli 2026.6.7 → 2026.6.8

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 (460) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +42 -0
  4. package/CONTRIBUTING.md +1 -1
  5. package/README.md +1 -1
  6. package/dist/cli/bootstrap-args.js +30 -13
  7. package/dist/cli/bootstrap-args.js.map +1 -1
  8. package/dist/cli/commands/close-many.js +9 -3
  9. package/dist/cli/commands/close-many.js.map +1 -1
  10. package/dist/cli/commands/close.js +15 -3
  11. package/dist/cli/commands/close.js.map +1 -1
  12. package/dist/cli/commands/comments-audit.js +4 -3
  13. package/dist/cli/commands/comments-audit.js.map +1 -1
  14. package/dist/cli/commands/completion.js +40 -33
  15. package/dist/cli/commands/completion.js.map +1 -1
  16. package/dist/cli/commands/extension/scaffold.js +6 -14
  17. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  18. package/dist/cli/commands/gc.js +10 -2
  19. package/dist/cli/commands/gc.js.map +1 -1
  20. package/dist/cli/commands/health.js +10 -2
  21. package/dist/cli/commands/health.js.map +1 -1
  22. package/dist/cli/commands/index.d.ts +1 -1
  23. package/dist/cli/commands/index.js +3 -3
  24. package/dist/cli/commands/index.js.map +1 -1
  25. package/dist/cli/commands/init.d.ts +1 -0
  26. package/dist/cli/commands/init.js +48 -2
  27. package/dist/cli/commands/init.js.map +1 -1
  28. package/dist/cli/commands/list.d.ts +11 -2
  29. package/dist/cli/commands/list.js +104 -2
  30. package/dist/cli/commands/list.js.map +1 -1
  31. package/dist/cli/commands/normalize.js +6 -4
  32. package/dist/cli/commands/normalize.js.map +1 -1
  33. package/dist/cli/commands/schema.d.ts +13 -2
  34. package/dist/cli/commands/schema.js +66 -12
  35. package/dist/cli/commands/schema.js.map +1 -1
  36. package/dist/cli/commands/search.d.ts +10 -2
  37. package/dist/cli/commands/search.js +94 -5
  38. package/dist/cli/commands/search.js.map +1 -1
  39. package/dist/cli/commands/upgrade.js +4 -12
  40. package/dist/cli/commands/upgrade.js.map +1 -1
  41. package/dist/cli/main.js +7 -18
  42. package/dist/cli/main.js.map +1 -1
  43. package/dist/cli/register-list-query.js +5 -3
  44. package/dist/cli/register-list-query.js.map +1 -1
  45. package/dist/cli/register-mutation.js +33 -24
  46. package/dist/cli/register-mutation.js.map +1 -1
  47. package/dist/cli/register-setup.js +4 -2
  48. package/dist/cli/register-setup.js.map +1 -1
  49. package/dist/cli/registration-helpers.js +7 -3
  50. package/dist/cli/registration-helpers.js.map +1 -1
  51. package/dist/cli-bundle/chunks/activity-A3QKFSSF.js +16 -0
  52. package/dist/cli-bundle/chunks/{activity-YVB3QRTE.js → activity-Q7XMIZIH.js} +11 -11
  53. package/dist/cli-bundle/chunks/{aggregate-LH66F75F.js → aggregate-GBSHSXOB.js} +10 -10
  54. package/dist/cli-bundle/chunks/{aggregate-OHSWFQJM.js → aggregate-HKQJZUBG.js} +10 -10
  55. package/dist/cli-bundle/chunks/{append-2PPYFAG5.js → append-3RFOU7P5.js} +8 -8
  56. package/dist/cli-bundle/chunks/{append-AUGT5W6J.js → append-OM74OJVT.js} +8 -8
  57. package/dist/cli-bundle/chunks/{chunk-HRMHZ4RV.js → chunk-2BYKYPWY.js} +2 -2
  58. package/dist/cli-bundle/chunks/{chunk-TP4DDY27.js → chunk-2HMD3JM2.js} +6 -6
  59. package/dist/cli-bundle/chunks/{chunk-4CHEG6UK.js → chunk-2YPVCD7T.js} +8 -8
  60. package/dist/cli-bundle/chunks/{chunk-WAA7UI6M.js → chunk-3E3MDBTB.js} +10 -14
  61. package/dist/cli-bundle/chunks/chunk-3E3MDBTB.js.map +7 -0
  62. package/dist/cli-bundle/chunks/{chunk-UJUT6AHZ.js → chunk-3TXWDGPU.js} +48 -12
  63. package/dist/cli-bundle/chunks/chunk-3TXWDGPU.js.map +7 -0
  64. package/dist/cli-bundle/chunks/{chunk-UT6WFXW2.js → chunk-4TI3532H.js} +2 -2
  65. package/dist/cli-bundle/chunks/{chunk-KNGVP5WJ.js → chunk-4WYBLB6J.js} +3 -3
  66. package/dist/cli-bundle/chunks/{chunk-V6EYFTRL.js → chunk-5NVJA7IW.js} +7 -7
  67. package/dist/cli-bundle/chunks/{chunk-42LOFGJS.js → chunk-5WO2VKFA.js} +108 -9
  68. package/dist/cli-bundle/chunks/chunk-5WO2VKFA.js.map +7 -0
  69. package/dist/cli-bundle/chunks/{chunk-QQL5QSTZ.js → chunk-7NQIY7Z6.js} +6 -5
  70. package/dist/cli-bundle/chunks/chunk-7NQIY7Z6.js.map +1 -0
  71. package/dist/cli-bundle/chunks/{chunk-KR6R465K.js → chunk-7WXGR44E.js} +5 -5
  72. package/dist/cli-bundle/chunks/{chunk-KR6R465K.js.map → chunk-7WXGR44E.js.map} +2 -2
  73. package/dist/cli-bundle/chunks/{chunk-WYEXLDDY.js → chunk-AEMKH5WQ.js} +3 -3
  74. package/dist/cli-bundle/chunks/{chunk-XS3O2TFJ.js → chunk-ALSRBNYB.js} +8 -8
  75. package/dist/cli-bundle/chunks/chunk-ALSRBNYB.js.map +1 -0
  76. package/dist/cli-bundle/chunks/{chunk-OKSKJKHX.js → chunk-AXBUHLW7.js} +9 -9
  77. package/dist/cli-bundle/chunks/{chunk-UEWA73ZZ.js → chunk-BFJPMUF5.js} +5 -5
  78. package/dist/cli-bundle/chunks/{chunk-B5RF3IP7.js → chunk-BKQMJXWY.js} +3 -3
  79. package/dist/cli-bundle/chunks/{chunk-HV5SSZXF.js → chunk-CBJXWXI5.js} +2 -2
  80. package/dist/cli-bundle/chunks/{chunk-NHR2QXXZ.js → chunk-D7WK2PKB.js} +20 -8
  81. package/dist/cli-bundle/chunks/chunk-D7WK2PKB.js.map +1 -0
  82. package/dist/cli-bundle/chunks/{chunk-MWRS7Z4P.js → chunk-DV27WDA7.js} +15 -13
  83. package/dist/cli-bundle/chunks/chunk-DV27WDA7.js.map +7 -0
  84. package/dist/cli-bundle/chunks/{chunk-LI65XLJR.js → chunk-EPWT7BEA.js} +8 -8
  85. package/dist/cli-bundle/chunks/{chunk-LMTOY5HE.js → chunk-ETZZU5QF.js} +2 -2
  86. package/dist/cli-bundle/chunks/{chunk-XYNT7UFP.js → chunk-F33AQIB4.js} +6 -6
  87. package/dist/cli-bundle/chunks/{chunk-XYNT7UFP.js.map → chunk-F33AQIB4.js.map} +1 -1
  88. package/dist/cli-bundle/chunks/{chunk-LIN2BPJ7.js → chunk-F33VC5EX.js} +2 -2
  89. package/dist/cli-bundle/chunks/{chunk-SFFVGNHC.js → chunk-FGRJZVXD.js} +3 -3
  90. package/dist/cli-bundle/chunks/{chunk-HLC3KTLP.js → chunk-FO2TYSQZ.js} +2 -2
  91. package/dist/cli-bundle/chunks/{chunk-3A2CMEM7.js → chunk-HOA3GMB6.js} +4 -4
  92. package/dist/cli-bundle/chunks/{chunk-HMMMWBK2.js → chunk-HP35AVFS.js} +2 -2
  93. package/dist/cli-bundle/chunks/{chunk-AVJD6VTA.js → chunk-J4DKAGTM.js} +3 -3
  94. package/dist/cli-bundle/chunks/{chunk-YO3THIJF.js → chunk-JS47EKLP.js} +7 -7
  95. package/dist/cli-bundle/chunks/{chunk-2IXCHCLM.js → chunk-K62SNVVE.js} +2 -2
  96. package/dist/cli-bundle/chunks/{chunk-IMCJBN2Q.js → chunk-KBKJVXUS.js} +19 -7
  97. package/dist/cli-bundle/chunks/chunk-KBKJVXUS.js.map +7 -0
  98. package/dist/cli-bundle/chunks/{chunk-CLD3XNCH.js → chunk-KCGMABHM.js} +14 -12
  99. package/dist/cli-bundle/chunks/chunk-KCGMABHM.js.map +1 -0
  100. package/dist/cli-bundle/chunks/{chunk-H7EO3QA3.js → chunk-KN4WSESY.js} +5 -5
  101. package/dist/cli-bundle/chunks/{chunk-C5W2UH56.js → chunk-KP4KIUQT.js} +3 -3
  102. package/dist/cli-bundle/chunks/{chunk-YPH4ESA2.js → chunk-KS2U7BZ3.js} +11 -6
  103. package/dist/cli-bundle/chunks/chunk-KS2U7BZ3.js.map +1 -0
  104. package/dist/cli-bundle/chunks/{chunk-GPXQBR3H.js → chunk-KVXIQDJG.js} +12 -12
  105. package/dist/cli-bundle/chunks/{chunk-NQL32HQ5.js → chunk-L3LYL3ID.js} +12 -12
  106. package/dist/cli-bundle/chunks/{chunk-WCQZBDDH.js → chunk-M7UBTVFT.js} +3 -3
  107. package/dist/cli-bundle/chunks/{chunk-3EOBJOF4.js → chunk-MSH23UWO.js} +4 -4
  108. package/dist/cli-bundle/chunks/{chunk-UAQOQ7IE.js → chunk-N4SQZ7L3.js} +2 -2
  109. package/dist/cli-bundle/chunks/{chunk-FY6Z3FYY.js → chunk-NDSMKB2I.js} +3 -3
  110. package/dist/cli-bundle/chunks/{chunk-2IF7WLB7.js → chunk-NGEEXR2R.js} +2 -2
  111. package/dist/cli-bundle/chunks/{chunk-UIIQC5YO.js → chunk-NLVCMVC7.js} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-LQHBENVW.js → chunk-NUKHZZNM.js} +3 -3
  113. package/dist/cli-bundle/chunks/{chunk-YBZW2QQ7.js → chunk-ODN53S6H.js} +6 -6
  114. package/dist/cli-bundle/chunks/{chunk-LXO6V66E.js → chunk-OTY2YEH5.js} +12 -12
  115. package/dist/cli-bundle/chunks/{chunk-6RZXO5M2.js → chunk-OVSSE2JP.js} +8 -8
  116. package/dist/cli-bundle/chunks/{chunk-4GHZR3BA.js → chunk-PQDH3S54.js} +10 -14
  117. package/dist/cli-bundle/chunks/chunk-PQDH3S54.js.map +1 -0
  118. package/dist/cli-bundle/chunks/{chunk-R3V3YCMH.js → chunk-QF4OPBAG.js} +9 -9
  119. package/dist/cli-bundle/chunks/{chunk-FHHBD7PN.js → chunk-QFVASU44.js} +2 -2
  120. package/dist/cli-bundle/chunks/{chunk-SQPKRA54.js → chunk-QQPZYP73.js} +12 -12
  121. package/dist/cli-bundle/chunks/{chunk-5AXMRKN5.js → chunk-QWNUDGFQ.js} +8 -8
  122. package/dist/cli-bundle/chunks/{chunk-TYJJOTUA.js → chunk-R4XIE7NQ.js} +54 -8
  123. package/dist/cli-bundle/chunks/chunk-R4XIE7NQ.js.map +1 -0
  124. package/dist/cli-bundle/chunks/{chunk-O7HSSFCC.js → chunk-RISLL7XH.js} +10 -5
  125. package/dist/cli-bundle/chunks/{chunk-O7HSSFCC.js.map → chunk-RISLL7XH.js.map} +2 -2
  126. package/dist/cli-bundle/chunks/{chunk-6J4K6JLA.js → chunk-SDLEYY6A.js} +3 -3
  127. package/dist/cli-bundle/chunks/{chunk-TINUJMWN.js → chunk-SM3RMWGO.js} +109 -10
  128. package/dist/cli-bundle/chunks/chunk-SM3RMWGO.js.map +1 -0
  129. package/dist/cli-bundle/chunks/{chunk-MOYM2C3J.js → chunk-TBLBEOEX.js} +9 -9
  130. package/dist/cli-bundle/chunks/{chunk-WR5567FH.js → chunk-TXKENAQP.js} +5 -4
  131. package/dist/cli-bundle/chunks/chunk-TXKENAQP.js.map +7 -0
  132. package/dist/cli-bundle/chunks/{chunk-TNPBPNII.js → chunk-UEXNNF3K.js} +7 -7
  133. package/dist/cli-bundle/chunks/{chunk-RVPTZKBC.js → chunk-UMMJAJB2.js} +9 -9
  134. package/dist/cli-bundle/chunks/{chunk-THDEID2Z.js → chunk-URJEZOLB.js} +2 -2
  135. package/dist/cli-bundle/chunks/{chunk-M2PW7EZU.js → chunk-VXBUXLVD.js} +7 -7
  136. package/dist/cli-bundle/chunks/chunk-VXBUXLVD.js.map +7 -0
  137. package/dist/cli-bundle/chunks/{chunk-UYQ7HXH4.js → chunk-XEKZCBCS.js} +3 -3
  138. package/dist/cli-bundle/chunks/{chunk-2OJHLWBZ.js → chunk-XLSQ3QLT.js} +2 -2
  139. package/dist/cli-bundle/chunks/{chunk-X7UHMKPE.js → chunk-XNGMIVQY.js} +3 -3
  140. package/dist/cli-bundle/chunks/{chunk-B2KZGPM2.js → chunk-XZS4MV37.js} +2 -2
  141. package/dist/cli-bundle/chunks/{chunk-GNIUOLZ2.js → chunk-YEFOCDIK.js} +7 -7
  142. package/dist/cli-bundle/chunks/{chunk-X4IZKYHP.js → chunk-YJAKN2N2.js} +46 -10
  143. package/dist/cli-bundle/chunks/chunk-YJAKN2N2.js.map +1 -0
  144. package/dist/cli-bundle/chunks/{chunk-GUZBNB3G.js → chunk-Z2HXAFFH.js} +2 -2
  145. package/dist/cli-bundle/chunks/{chunk-CKLBZHS7.js → chunk-Z55JACL2.js} +53 -7
  146. package/dist/cli-bundle/chunks/chunk-Z55JACL2.js.map +7 -0
  147. package/dist/cli-bundle/chunks/{claim-KW743OSW.js → claim-NHBIIBOW.js} +10 -10
  148. package/dist/cli-bundle/chunks/{claim-BJ4QMPJC.js → claim-RNEBQCOO.js} +10 -10
  149. package/dist/cli-bundle/chunks/close-UNTFXVM3.js +13 -0
  150. package/dist/cli-bundle/chunks/{close-SYHSRZDC.js → close-ZMXL2WDS.js} +8 -8
  151. package/dist/cli-bundle/chunks/{close-many-LAC5VR4G.js → close-many-CDPQGQUB.js} +24 -18
  152. package/dist/cli-bundle/chunks/close-many-CDPQGQUB.js.map +1 -0
  153. package/dist/cli-bundle/chunks/{close-many-DBLEYFOY.js → close-many-IQV5C2SI.js} +23 -17
  154. package/dist/cli-bundle/chunks/close-many-IQV5C2SI.js.map +7 -0
  155. package/dist/cli-bundle/chunks/{comments-JEO6HHVM.js → comments-EFVBHWPT.js} +10 -10
  156. package/dist/cli-bundle/chunks/{comments-YT2PQ5DD.js → comments-J5Q4IJPH.js} +10 -10
  157. package/dist/cli-bundle/chunks/{config-RZRVS3ZV.js → config-72253M2O.js} +10 -11
  158. package/dist/cli-bundle/chunks/config-72253M2O.js.map +1 -0
  159. package/dist/cli-bundle/chunks/{config-YJSAAADD.js → config-VFYA6BMI.js} +9 -10
  160. package/dist/cli-bundle/chunks/config-VFYA6BMI.js.map +7 -0
  161. package/dist/cli-bundle/chunks/{context-LGYEEKAW.js → context-AVLO4IFH.js} +13 -13
  162. package/dist/cli-bundle/chunks/{context-ZUH5IOOI.js → context-WMSI2D65.js} +13 -13
  163. package/dist/cli-bundle/chunks/{contracts-YXJ6NXKH.js → contracts-D4BN3VSQ.js} +4 -4
  164. package/dist/cli-bundle/chunks/{contracts-ZIBXROPE.js → contracts-RGPOBLPL.js} +4 -4
  165. package/dist/cli-bundle/chunks/{copy-YPWEIAPD.js → copy-H6TXHK7S.js} +7 -7
  166. package/dist/cli-bundle/chunks/{copy-BZALX5MQ.js → copy-WXE3OOLZ.js} +7 -7
  167. package/dist/cli-bundle/chunks/create-EZWAMUKR.js +27 -0
  168. package/dist/cli-bundle/chunks/{create-CF7EVRX7.js → create-PUAIJEZ7.js} +13 -13
  169. package/dist/cli-bundle/chunks/{delete-KR4VBWVE.js → delete-PKR2JHLH.js} +7 -7
  170. package/dist/cli-bundle/chunks/{delete-XLZRTRKR.js → delete-WBME6WG5.js} +7 -7
  171. package/dist/cli-bundle/chunks/{deps-2YTXD3VM.js → deps-4BQEDV4L.js} +7 -7
  172. package/dist/cli-bundle/chunks/{deps-GZMFMTGS.js → deps-KWHQRO75.js} +7 -7
  173. package/dist/cli-bundle/chunks/{docs-SLROFEQ4.js → docs-364GT3ZR.js} +9 -9
  174. package/dist/cli-bundle/chunks/{docs-ZHISRR2D.js → docs-SCNBUGSV.js} +9 -9
  175. package/dist/cli-bundle/chunks/{extension-XYCUXICD.js → extension-CRE7JM47.js} +5 -5
  176. package/dist/cli-bundle/chunks/{extension-3C7OOI4F.js → extension-KK2UPXJD.js} +5 -5
  177. package/dist/cli-bundle/chunks/{files-FUWF2FYJ.js → files-3GESQAWL.js} +9 -9
  178. package/dist/cli-bundle/chunks/{files-J4I5IU4O.js → files-66EHM5ZR.js} +9 -9
  179. package/dist/cli-bundle/chunks/{gc-34NXSNSN.js → gc-D5IWOKQH.js} +13 -5
  180. package/dist/cli-bundle/chunks/gc-D5IWOKQH.js.map +1 -0
  181. package/dist/cli-bundle/chunks/{gc-SPIIZX3A.js → gc-MOQDND5J.js} +12 -4
  182. package/dist/cli-bundle/chunks/gc-MOQDND5J.js.map +7 -0
  183. package/dist/cli-bundle/chunks/{get-SZKNRHMA.js → get-7J2ZCBV5.js} +11 -11
  184. package/dist/cli-bundle/chunks/{get-VITKYP6S.js → get-WXSLXV3K.js} +11 -11
  185. package/dist/cli-bundle/chunks/{health-7G3EPM57.js → health-B6AEM7BV.js} +21 -14
  186. package/dist/cli-bundle/chunks/health-B6AEM7BV.js.map +1 -0
  187. package/dist/cli-bundle/chunks/{health-4SNTA2TF.js → health-YMZGOMVX.js} +20 -13
  188. package/dist/cli-bundle/chunks/health-YMZGOMVX.js.map +7 -0
  189. package/dist/cli-bundle/chunks/{history-SDAWYZR3.js → history-TJTO5GCR.js} +10 -10
  190. package/dist/cli-bundle/chunks/history-ZERISU2L.js +20 -0
  191. package/dist/cli-bundle/chunks/{history-compact-POTZGG7K.js → history-compact-CKNN6UKW.js} +11 -11
  192. package/dist/cli-bundle/chunks/{history-compact-DMW536VH.js → history-compact-N2Q7IR3T.js} +11 -11
  193. package/dist/cli-bundle/chunks/history-redact-GODBYT5A.js +19 -0
  194. package/dist/cli-bundle/chunks/{history-redact-EPJ7GENL.js → history-redact-JUXUOH54.js} +11 -11
  195. package/dist/cli-bundle/chunks/{history-repair-YNESJRT6.js → history-repair-CCCPBNTF.js} +11 -11
  196. package/dist/cli-bundle/chunks/{history-repair-IJ7LLBET.js → history-repair-TDBBSRVK.js} +11 -11
  197. package/dist/cli-bundle/chunks/{init-YHVBTEET.js → init-6ZPKD3YN.js} +9 -9
  198. package/dist/cli-bundle/chunks/init-CBZHXBR3.js +17 -0
  199. package/dist/cli-bundle/chunks/{learnings-T4PF24YN.js → learnings-U7U2FNIO.js} +10 -10
  200. package/dist/cli-bundle/chunks/{learnings-4YBMIVCZ.js → learnings-WYNTYQ5T.js} +10 -10
  201. package/dist/cli-bundle/chunks/list-7MTPPZHC.js +20 -0
  202. package/dist/cli-bundle/chunks/{list-3KEVBOYW.js → list-JGP7ODML.js} +10 -10
  203. package/dist/cli-bundle/chunks/{notes-GJKALVZM.js → notes-P25YVTEG.js} +10 -10
  204. package/dist/cli-bundle/chunks/{notes-FLUCNJSH.js → notes-QIF6A7XS.js} +10 -10
  205. package/dist/cli-bundle/chunks/{plan-YYMIL3HV.js → plan-RACB5PI6.js} +13 -13
  206. package/dist/cli-bundle/chunks/{plan-T5MMZLI3.js → plan-SSBJFWXA.js} +13 -13
  207. package/dist/cli-bundle/chunks/{register-list-query-I65EZ3HB.js → register-list-query-5IXDPUZ6.js} +23 -21
  208. package/dist/cli-bundle/chunks/register-list-query-5IXDPUZ6.js.map +1 -0
  209. package/dist/cli-bundle/chunks/{register-list-query-OECMHO4G.js → register-list-query-GQAEIG4K.js} +22 -20
  210. package/dist/cli-bundle/chunks/register-list-query-GQAEIG4K.js.map +7 -0
  211. package/dist/cli-bundle/chunks/{register-mutation-2FLXORLR.js → register-mutation-FAS4YG63.js} +41 -37
  212. package/dist/cli-bundle/chunks/{register-mutation-2FLXORLR.js.map → register-mutation-FAS4YG63.js.map} +1 -1
  213. package/dist/cli-bundle/chunks/{register-mutation-5GPDEKHR.js → register-mutation-YZCUILGO.js} +40 -36
  214. package/dist/cli-bundle/chunks/{register-mutation-5GPDEKHR.js.map → register-mutation-YZCUILGO.js.map} +2 -2
  215. package/dist/cli-bundle/chunks/{register-operations-GQKT35H5.js → register-operations-IBYWNJN5.js} +30 -30
  216. package/dist/cli-bundle/chunks/{register-operations-BNGAUMGK.js → register-operations-S2BOLUPF.js} +30 -30
  217. package/dist/cli-bundle/chunks/{register-setup-EJY44FPH.js → register-setup-ABA2JPWO.js} +19 -18
  218. package/dist/cli-bundle/chunks/{register-setup-EJY44FPH.js.map → register-setup-ABA2JPWO.js.map} +2 -2
  219. package/dist/cli-bundle/chunks/{register-setup-DNDCGZ4O.js → register-setup-JRZ4UMWZ.js} +20 -19
  220. package/dist/cli-bundle/chunks/register-setup-JRZ4UMWZ.js.map +1 -0
  221. package/dist/cli-bundle/chunks/restore-3JRX27QW.js +17 -0
  222. package/dist/cli-bundle/chunks/{restore-DDJGVZIN.js → restore-K72ZNPEP.js} +11 -11
  223. package/dist/cli-bundle/chunks/{schema-B7NQ6XVP.js → schema-3VKRDBLC.js} +76 -20
  224. package/dist/cli-bundle/chunks/schema-3VKRDBLC.js.map +7 -0
  225. package/dist/cli-bundle/chunks/{schema-HEGYH6CE.js → schema-UL4B2JX5.js} +77 -21
  226. package/dist/cli-bundle/chunks/schema-UL4B2JX5.js.map +1 -0
  227. package/dist/cli-bundle/chunks/{search-JNEZJV7H.js → search-632WJ7GO.js} +103 -14
  228. package/dist/cli-bundle/chunks/search-632WJ7GO.js.map +7 -0
  229. package/dist/cli-bundle/chunks/{search-DVVQ4UO2.js → search-EQDHSE4G.js} +104 -15
  230. package/dist/cli-bundle/chunks/search-EQDHSE4G.js.map +1 -0
  231. package/dist/cli-bundle/chunks/{stats-SYTJRR4Z.js → stats-O4UTMJMC.js} +7 -7
  232. package/dist/cli-bundle/chunks/{stats-7JDIJRDH.js → stats-WLJ3XBF5.js} +7 -7
  233. package/dist/cli-bundle/chunks/{telemetry-4HHWD5Y7.js → telemetry-EUVHFSQU.js} +4 -4
  234. package/dist/cli-bundle/chunks/{telemetry-EGWP7ZUX.js → telemetry-NRVWX25E.js} +4 -4
  235. package/dist/cli-bundle/chunks/{test-IIELLSZX.js → test-GXUBQNUC.js} +14 -14
  236. package/dist/cli-bundle/chunks/test-XN7RJL5Z.js +32 -0
  237. package/dist/cli-bundle/chunks/{test-all-IHTUJRRC.js → test-all-UTFXC7S2.js} +14 -14
  238. package/dist/cli-bundle/chunks/{test-all-7DNCMML7.js → test-all-XM6OKI3L.js} +14 -14
  239. package/dist/cli-bundle/chunks/{test-runs-5FEMBV3A.js → test-runs-7FHCPEA3.js} +5 -5
  240. package/dist/cli-bundle/chunks/{test-runs-RNKZ37PS.js → test-runs-IK6E2HNX.js} +5 -5
  241. package/dist/cli-bundle/chunks/update-LFBSEW3N.js +21 -0
  242. package/dist/cli-bundle/chunks/update-U4B4OMHZ.js +25 -0
  243. package/dist/cli-bundle/chunks/{update-many-BSZZZYXY.js → update-many-5KD33MKY.js} +22 -22
  244. package/dist/cli-bundle/chunks/{update-many-BWKJJEBF.js → update-many-N3YTM7K4.js} +22 -22
  245. package/dist/cli-bundle/chunks/{upgrade-YWI5DJFA.js → upgrade-5SRFLUNW.js} +8 -15
  246. package/dist/cli-bundle/chunks/upgrade-5SRFLUNW.js.map +7 -0
  247. package/dist/cli-bundle/chunks/{upgrade-RSE5PC44.js → upgrade-FFXGO43H.js} +9 -16
  248. package/dist/cli-bundle/chunks/upgrade-FFXGO43H.js.map +1 -0
  249. package/dist/cli-bundle/chunks/{validate-UCEOB7S6.js → validate-CRWXZILW.js} +16 -16
  250. package/dist/cli-bundle/chunks/{validate-NK3WKB7C.js → validate-T3LPWSZG.js} +16 -16
  251. package/dist/cli-bundle/main.js +51 -62
  252. package/dist/cli-bundle/main.js.map +3 -3
  253. package/dist/core/config/nested-settings.d.ts +0 -2
  254. package/dist/core/config/nested-settings.js +2 -4
  255. package/dist/core/config/nested-settings.js.map +1 -1
  256. package/dist/core/diagnostics/remediation.js +7 -2
  257. package/dist/core/diagnostics/remediation.js.map +1 -1
  258. package/dist/core/fs/fs-utils.js +29 -4
  259. package/dist/core/fs/fs-utils.js.map +1 -1
  260. package/dist/core/packages/root.d.ts +10 -0
  261. package/dist/core/packages/root.js +24 -2
  262. package/dist/core/packages/root.js.map +1 -1
  263. package/dist/core/schema/runtime-schema.js +3 -6
  264. package/dist/core/schema/runtime-schema.js.map +1 -1
  265. package/dist/core/search/background-refresh.d.ts +0 -8
  266. package/dist/core/search/background-refresh.js +2 -9
  267. package/dist/core/search/background-refresh.js.map +1 -1
  268. package/dist/core/search/vector-stores.js +6 -8
  269. package/dist/core/search/vector-stores.js.map +1 -1
  270. package/dist/core/sentry/instrument.js +4 -17
  271. package/dist/core/sentry/instrument.js.map +1 -1
  272. package/dist/core/store/paths.js +17 -3
  273. package/dist/core/store/paths.js.map +1 -1
  274. package/dist/core/telemetry/runtime.d.ts +1 -0
  275. package/dist/core/telemetry/runtime.js +3 -3
  276. package/dist/core/telemetry/runtime.js.map +1 -1
  277. package/dist/mcp/server.js +76 -13
  278. package/dist/mcp/server.js.map +1 -1
  279. package/dist/sdk/cli-contracts/commander-types.js +4 -4
  280. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  281. package/dist/sdk/cli-contracts/tool-parameter-tables.js +3 -3
  282. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  283. package/dist/sdk/cli-contracts.js +10 -8
  284. package/dist/sdk/cli-contracts.js.map +1 -1
  285. package/docs/AGENT_GUIDE.md +3 -1
  286. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  287. package/docs/COMMANDS.md +6 -4
  288. package/docs/CONFIGURATION.md +6 -0
  289. package/docs/EXTENSIONS.md +0 -5
  290. package/docs/RELEASING.md +17 -0
  291. package/marketplace.json +1 -1
  292. package/package.json +1 -1
  293. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  294. package/plugins/pm-claude/README.md +3 -3
  295. package/plugins/pm-claude/commands/pm-init.md +1 -1
  296. package/dist/cli-bundle/chunks/activity-5UROHJ3D.js +0 -16
  297. package/dist/cli-bundle/chunks/chunk-42LOFGJS.js.map +0 -7
  298. package/dist/cli-bundle/chunks/chunk-4GHZR3BA.js.map +0 -1
  299. package/dist/cli-bundle/chunks/chunk-CKLBZHS7.js.map +0 -7
  300. package/dist/cli-bundle/chunks/chunk-CLD3XNCH.js.map +0 -1
  301. package/dist/cli-bundle/chunks/chunk-IMCJBN2Q.js.map +0 -7
  302. package/dist/cli-bundle/chunks/chunk-M2PW7EZU.js.map +0 -7
  303. package/dist/cli-bundle/chunks/chunk-MWRS7Z4P.js.map +0 -7
  304. package/dist/cli-bundle/chunks/chunk-NHR2QXXZ.js.map +0 -1
  305. package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js.map +0 -1
  306. package/dist/cli-bundle/chunks/chunk-TINUJMWN.js.map +0 -1
  307. package/dist/cli-bundle/chunks/chunk-TYJJOTUA.js.map +0 -1
  308. package/dist/cli-bundle/chunks/chunk-UJUT6AHZ.js.map +0 -7
  309. package/dist/cli-bundle/chunks/chunk-WAA7UI6M.js.map +0 -7
  310. package/dist/cli-bundle/chunks/chunk-WR5567FH.js.map +0 -7
  311. package/dist/cli-bundle/chunks/chunk-X4IZKYHP.js.map +0 -1
  312. package/dist/cli-bundle/chunks/chunk-XS3O2TFJ.js.map +0 -1
  313. package/dist/cli-bundle/chunks/chunk-YPH4ESA2.js.map +0 -1
  314. package/dist/cli-bundle/chunks/close-P4ZBKODL.js +0 -13
  315. package/dist/cli-bundle/chunks/close-many-DBLEYFOY.js.map +0 -7
  316. package/dist/cli-bundle/chunks/close-many-LAC5VR4G.js.map +0 -1
  317. package/dist/cli-bundle/chunks/config-RZRVS3ZV.js.map +0 -1
  318. package/dist/cli-bundle/chunks/config-YJSAAADD.js.map +0 -7
  319. package/dist/cli-bundle/chunks/create-4DS2QWQC.js +0 -27
  320. package/dist/cli-bundle/chunks/gc-34NXSNSN.js.map +0 -1
  321. package/dist/cli-bundle/chunks/gc-SPIIZX3A.js.map +0 -7
  322. package/dist/cli-bundle/chunks/health-4SNTA2TF.js.map +0 -7
  323. package/dist/cli-bundle/chunks/health-7G3EPM57.js.map +0 -1
  324. package/dist/cli-bundle/chunks/history-YDUEILKP.js +0 -20
  325. package/dist/cli-bundle/chunks/history-redact-KASLLPE7.js +0 -19
  326. package/dist/cli-bundle/chunks/init-IGSS4GNH.js +0 -17
  327. package/dist/cli-bundle/chunks/list-E44O2K64.js +0 -20
  328. package/dist/cli-bundle/chunks/register-list-query-I65EZ3HB.js.map +0 -1
  329. package/dist/cli-bundle/chunks/register-list-query-OECMHO4G.js.map +0 -7
  330. package/dist/cli-bundle/chunks/register-setup-DNDCGZ4O.js.map +0 -1
  331. package/dist/cli-bundle/chunks/restore-SJSASGZP.js +0 -17
  332. package/dist/cli-bundle/chunks/schema-B7NQ6XVP.js.map +0 -7
  333. package/dist/cli-bundle/chunks/schema-HEGYH6CE.js.map +0 -1
  334. package/dist/cli-bundle/chunks/search-DVVQ4UO2.js.map +0 -1
  335. package/dist/cli-bundle/chunks/search-JNEZJV7H.js.map +0 -7
  336. package/dist/cli-bundle/chunks/test-ML5RLWXE.js +0 -32
  337. package/dist/cli-bundle/chunks/update-6C67X4KS.js +0 -21
  338. package/dist/cli-bundle/chunks/update-VF26YPT3.js +0 -25
  339. package/dist/cli-bundle/chunks/upgrade-RSE5PC44.js.map +0 -1
  340. package/dist/cli-bundle/chunks/upgrade-YWI5DJFA.js.map +0 -7
  341. /package/dist/cli-bundle/chunks/{activity-5UROHJ3D.js.map → activity-A3QKFSSF.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{activity-YVB3QRTE.js.map → activity-Q7XMIZIH.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{aggregate-LH66F75F.js.map → aggregate-GBSHSXOB.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{aggregate-OHSWFQJM.js.map → aggregate-HKQJZUBG.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{append-2PPYFAG5.js.map → append-3RFOU7P5.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{append-AUGT5W6J.js.map → append-OM74OJVT.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{chunk-HRMHZ4RV.js.map → chunk-2BYKYPWY.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{chunk-TP4DDY27.js.map → chunk-2HMD3JM2.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{chunk-4CHEG6UK.js.map → chunk-2YPVCD7T.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{chunk-UT6WFXW2.js.map → chunk-4TI3532H.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{chunk-KNGVP5WJ.js.map → chunk-4WYBLB6J.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{chunk-V6EYFTRL.js.map → chunk-5NVJA7IW.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{chunk-WYEXLDDY.js.map → chunk-AEMKH5WQ.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{chunk-OKSKJKHX.js.map → chunk-AXBUHLW7.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{chunk-UEWA73ZZ.js.map → chunk-BFJPMUF5.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{chunk-B5RF3IP7.js.map → chunk-BKQMJXWY.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{chunk-HV5SSZXF.js.map → chunk-CBJXWXI5.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{chunk-LI65XLJR.js.map → chunk-EPWT7BEA.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{chunk-LMTOY5HE.js.map → chunk-ETZZU5QF.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{chunk-LIN2BPJ7.js.map → chunk-F33VC5EX.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{chunk-SFFVGNHC.js.map → chunk-FGRJZVXD.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{chunk-HLC3KTLP.js.map → chunk-FO2TYSQZ.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{chunk-3A2CMEM7.js.map → chunk-HOA3GMB6.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{chunk-HMMMWBK2.js.map → chunk-HP35AVFS.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{chunk-AVJD6VTA.js.map → chunk-J4DKAGTM.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{chunk-YO3THIJF.js.map → chunk-JS47EKLP.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{chunk-2IXCHCLM.js.map → chunk-K62SNVVE.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{chunk-H7EO3QA3.js.map → chunk-KN4WSESY.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{chunk-C5W2UH56.js.map → chunk-KP4KIUQT.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{chunk-GPXQBR3H.js.map → chunk-KVXIQDJG.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{chunk-NQL32HQ5.js.map → chunk-L3LYL3ID.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{chunk-WCQZBDDH.js.map → chunk-M7UBTVFT.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{chunk-3EOBJOF4.js.map → chunk-MSH23UWO.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{chunk-UAQOQ7IE.js.map → chunk-N4SQZ7L3.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{chunk-FY6Z3FYY.js.map → chunk-NDSMKB2I.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{chunk-2IF7WLB7.js.map → chunk-NGEEXR2R.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{chunk-UIIQC5YO.js.map → chunk-NLVCMVC7.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{chunk-LQHBENVW.js.map → chunk-NUKHZZNM.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{chunk-YBZW2QQ7.js.map → chunk-ODN53S6H.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{chunk-LXO6V66E.js.map → chunk-OTY2YEH5.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{chunk-6RZXO5M2.js.map → chunk-OVSSE2JP.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{chunk-R3V3YCMH.js.map → chunk-QF4OPBAG.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{chunk-FHHBD7PN.js.map → chunk-QFVASU44.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{chunk-SQPKRA54.js.map → chunk-QQPZYP73.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{chunk-5AXMRKN5.js.map → chunk-QWNUDGFQ.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{chunk-6J4K6JLA.js.map → chunk-SDLEYY6A.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{chunk-MOYM2C3J.js.map → chunk-TBLBEOEX.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{chunk-TNPBPNII.js.map → chunk-UEXNNF3K.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{chunk-RVPTZKBC.js.map → chunk-UMMJAJB2.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{chunk-THDEID2Z.js.map → chunk-URJEZOLB.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{chunk-UYQ7HXH4.js.map → chunk-XEKZCBCS.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{chunk-2OJHLWBZ.js.map → chunk-XLSQ3QLT.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{chunk-X7UHMKPE.js.map → chunk-XNGMIVQY.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{chunk-B2KZGPM2.js.map → chunk-XZS4MV37.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{chunk-GNIUOLZ2.js.map → chunk-YEFOCDIK.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{chunk-GUZBNB3G.js.map → chunk-Z2HXAFFH.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{claim-KW743OSW.js.map → claim-NHBIIBOW.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{claim-BJ4QMPJC.js.map → claim-RNEBQCOO.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{close-P4ZBKODL.js.map → close-UNTFXVM3.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{close-SYHSRZDC.js.map → close-ZMXL2WDS.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{comments-JEO6HHVM.js.map → comments-EFVBHWPT.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{comments-YT2PQ5DD.js.map → comments-J5Q4IJPH.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{context-LGYEEKAW.js.map → context-AVLO4IFH.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{context-ZUH5IOOI.js.map → context-WMSI2D65.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{contracts-YXJ6NXKH.js.map → contracts-D4BN3VSQ.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{contracts-ZIBXROPE.js.map → contracts-RGPOBLPL.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{copy-YPWEIAPD.js.map → copy-H6TXHK7S.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{copy-BZALX5MQ.js.map → copy-WXE3OOLZ.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{create-4DS2QWQC.js.map → create-EZWAMUKR.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{create-CF7EVRX7.js.map → create-PUAIJEZ7.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{delete-KR4VBWVE.js.map → delete-PKR2JHLH.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{delete-XLZRTRKR.js.map → delete-WBME6WG5.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{deps-2YTXD3VM.js.map → deps-4BQEDV4L.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{deps-GZMFMTGS.js.map → deps-KWHQRO75.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{docs-SLROFEQ4.js.map → docs-364GT3ZR.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{docs-ZHISRR2D.js.map → docs-SCNBUGSV.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{extension-XYCUXICD.js.map → extension-CRE7JM47.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{extension-3C7OOI4F.js.map → extension-KK2UPXJD.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{files-FUWF2FYJ.js.map → files-3GESQAWL.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{files-J4I5IU4O.js.map → files-66EHM5ZR.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{get-SZKNRHMA.js.map → get-7J2ZCBV5.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{get-VITKYP6S.js.map → get-WXSLXV3K.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{history-SDAWYZR3.js.map → history-TJTO5GCR.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{history-YDUEILKP.js.map → history-ZERISU2L.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{history-compact-POTZGG7K.js.map → history-compact-CKNN6UKW.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{history-compact-DMW536VH.js.map → history-compact-N2Q7IR3T.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{history-redact-KASLLPE7.js.map → history-redact-GODBYT5A.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{history-redact-EPJ7GENL.js.map → history-redact-JUXUOH54.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{history-repair-YNESJRT6.js.map → history-repair-CCCPBNTF.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{history-repair-IJ7LLBET.js.map → history-repair-TDBBSRVK.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{init-YHVBTEET.js.map → init-6ZPKD3YN.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{init-IGSS4GNH.js.map → init-CBZHXBR3.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{learnings-T4PF24YN.js.map → learnings-U7U2FNIO.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{learnings-4YBMIVCZ.js.map → learnings-WYNTYQ5T.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{list-E44O2K64.js.map → list-7MTPPZHC.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{list-3KEVBOYW.js.map → list-JGP7ODML.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{notes-GJKALVZM.js.map → notes-P25YVTEG.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{notes-FLUCNJSH.js.map → notes-QIF6A7XS.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{plan-YYMIL3HV.js.map → plan-RACB5PI6.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{plan-T5MMZLI3.js.map → plan-SSBJFWXA.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{register-operations-GQKT35H5.js.map → register-operations-IBYWNJN5.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{register-operations-BNGAUMGK.js.map → register-operations-S2BOLUPF.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{restore-SJSASGZP.js.map → restore-3JRX27QW.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{restore-DDJGVZIN.js.map → restore-K72ZNPEP.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{stats-SYTJRR4Z.js.map → stats-O4UTMJMC.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{stats-7JDIJRDH.js.map → stats-WLJ3XBF5.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{telemetry-4HHWD5Y7.js.map → telemetry-EUVHFSQU.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{telemetry-EGWP7ZUX.js.map → telemetry-NRVWX25E.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{test-IIELLSZX.js.map → test-GXUBQNUC.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{test-ML5RLWXE.js.map → test-XN7RJL5Z.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{test-all-IHTUJRRC.js.map → test-all-UTFXC7S2.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{test-all-7DNCMML7.js.map → test-all-XM6OKI3L.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{test-runs-5FEMBV3A.js.map → test-runs-7FHCPEA3.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{test-runs-RNKZ37PS.js.map → test-runs-IK6E2HNX.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{update-6C67X4KS.js.map → update-LFBSEW3N.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{update-VF26YPT3.js.map → update-U4B4OMHZ.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{update-many-BSZZZYXY.js.map → update-many-5KD33MKY.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{update-many-BWKJJEBF.js.map → update-many-N3YTM7K4.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{validate-UCEOB7S6.js.map → validate-CRWXZILW.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{validate-NK3WKB7C.js.map → validate-T3LPWSZG.js.map} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../../core/telemetry/observability.ts", "../../../../../../../../core/telemetry/runtime.ts"],
4
- "sourcesContent": ["import { EXIT_CODE, type TelemetryErrorCategory } from \"../shared/constants.js\";\n\nexport type TelemetryResolutionStage = \"parse\" | \"preflight\" | \"execute\" | \"unknown\";\n\nexport type TelemetryCommandResolution =\n | \"success\"\n | \"nonexistent_command\"\n | \"invalid_option\"\n | \"missing_required_option\"\n | \"missing_required_argument\"\n | \"invalid_usage\"\n | \"validation_failed\"\n | \"health_findings\"\n | \"validation_findings\"\n | \"conflict\"\n | \"runtime_failed\"\n | \"unknown_failed\";\n\nexport interface TelemetryCommandTaxonomy {\n command_path: string;\n command_root: string;\n command_leaf: string;\n command_depth: number;\n command_family: \"setup\" | \"query\" | \"mutation\" | \"testing\" | \"extension\" | \"diagnostics\" | \"other\";\n}\n\ninterface InferTelemetryErrorCodeParams {\n ok: boolean;\n errorCode?: string;\n errorMessage?: string;\n exitCode?: number;\n}\n\nconst SETUP_ROOT_COMMANDS = new Set([\"init\", \"config\", \"completion\", \"completion-statuses\", \"completion-tags\", \"completion-types\"]);\nconst QUERY_ROOT_COMMANDS = new Set([\n \"list\",\n \"list-all\",\n \"list-open\",\n \"list-in-progress\",\n \"list-blocked\",\n \"list-closed\",\n \"list-canceled\",\n \"list-draft\",\n \"search\",\n \"get\",\n \"context\",\n \"calendar\",\n \"history\",\n \"activity\",\n \"aggregate\",\n \"deps\",\n \"contracts\",\n \"stats\",\n \"dedupe-audit\",\n]);\nconst MUTATION_ROOT_COMMANDS = new Set([\n \"create\",\n \"update\",\n \"update-many\",\n \"close-many\",\n \"append\",\n \"close\",\n \"delete\",\n \"restore\",\n \"claim\",\n \"release\",\n \"comments\",\n \"notes\",\n \"learnings\",\n \"files\",\n \"docs\",\n \"start-task\",\n \"pause-task\",\n \"close-task\",\n]);\nconst TESTING_ROOT_COMMANDS = new Set([\"test\", \"test-all\", \"test-runs\", \"test-verify\", \"trace-test\", \"test-ping\"]);\nconst DIAGNOSTICS_ROOT_COMMANDS = new Set([\"health\", \"validate\", \"normalize\", \"reindex\", \"gc\", \"telemetry\", \"extension-doctor\"]);\n\nfunction normalizeCommandPath(commandPath: string): string {\n return commandPath\n .trim()\n .replaceAll(/\\s+/g, \" \")\n .toLowerCase();\n}\n\nfunction normalizeErrorCode(errorCode: string | undefined): string | undefined {\n const normalized = errorCode?.trim().toLowerCase();\n return normalized && normalized.length > 0 ? normalized : undefined;\n}\n\nexport function deriveTelemetryCommandTaxonomy(commandPath: string): TelemetryCommandTaxonomy {\n const normalizedPath = normalizeCommandPath(commandPath);\n const tokens = normalizedPath.length > 0 ? normalizedPath.split(\" \") : [\"<unknown>\"];\n const root = tokens[0] ?? \"<unknown>\";\n const leaf = tokens[tokens.length - 1] ?? root;\n\n let family: TelemetryCommandTaxonomy[\"command_family\"] = \"other\";\n if (SETUP_ROOT_COMMANDS.has(root)) {\n family = \"setup\";\n } else if (QUERY_ROOT_COMMANDS.has(root)) {\n family = \"query\";\n } else if (MUTATION_ROOT_COMMANDS.has(root)) {\n family = \"mutation\";\n } else if (TESTING_ROOT_COMMANDS.has(root)) {\n family = \"testing\";\n } else if (root === \"extension\") {\n family = \"extension\";\n } else if (DIAGNOSTICS_ROOT_COMMANDS.has(root)) {\n family = \"diagnostics\";\n }\n\n return {\n command_path: normalizedPath.length > 0 ? normalizedPath : \"<unknown>\",\n command_root: root,\n command_leaf: leaf,\n command_depth: tokens.length,\n command_family: family,\n };\n}\n\nexport function inferTelemetryErrorCode(params: InferTelemetryErrorCodeParams): string | undefined {\n if (params.ok) {\n return undefined;\n }\n\n const explicit = normalizeErrorCode(params.errorCode);\n if (explicit) {\n return explicit;\n }\n\n const message = (params.errorMessage ?? \"\").trim().toLowerCase();\n if (message.includes(\"unknown command\")) {\n return \"unknown_command\";\n }\n if (message.includes(\"unknown option\")) {\n return \"unknown_option\";\n }\n if (message.includes(\"missing required options\") || message.includes(\"missing required option\")) {\n return \"missing_required_option\";\n }\n if (message.includes(\"missing required argument\")) {\n return \"missing_required_argument\";\n }\n if (message.includes(\"no update flags provided\")) {\n return \"no_update_fields\";\n }\n if (message.includes(\"is assigned to\") && message.includes(\"use --force\")) {\n return \"ownership_conflict\";\n }\n if (message.includes(\"is locked\")) {\n return \"lock_conflict\";\n }\n if (message.includes(\"already terminal\") && message.includes(\"use --force\")) {\n return \"terminal_state_conflict\";\n }\n if (message.includes(\"tracker is not initialized\")) {\n return \"tracker_not_initialized\";\n }\n if (message.includes(\" not found\")) {\n return \"item_not_found\";\n }\n if (\n message.includes(\"use \\\"pm close <id> <text>\\\" to close an item\") ||\n (message.includes(\"invalid --status value\") && message.includes(\"\\\"closed\\\"\"))\n ) {\n return \"close_through_update\";\n }\n if (message.startsWith(\"invalid \") || message.includes(\" must be \") || message.includes(\" requires \")) {\n return \"invalid_argument_value\";\n }\n if (message.includes(\"strict create mode requires concrete values for --\")) {\n return \"missing_required_option\";\n }\n if (message.includes(\"either as positional\") && message.includes(\"not both\")) {\n return \"invalid_command_usage\";\n }\n\n const exitCode = Number.isFinite(params.exitCode) ? Math.max(0, Math.trunc(params.exitCode ?? 0)) : undefined;\n if (exitCode === EXIT_CODE.USAGE) {\n return \"invalid_command_usage\";\n }\n if (exitCode === EXIT_CODE.NOT_FOUND) {\n return \"item_not_found\";\n }\n if (exitCode === EXIT_CODE.CONFLICT) {\n return \"lock_conflict\";\n }\n if (exitCode === EXIT_CODE.DEPENDENCY_FAILED) {\n return \"dependency_failed\";\n }\n return \"command_failed\";\n}\n\nexport function deriveTelemetryCommandResolution(params: {\n ok: boolean;\n errorCode?: string;\n errorCategory?: TelemetryErrorCategory;\n}): TelemetryCommandResolution {\n if (params.ok) {\n return \"success\";\n }\n\n const normalizedCode = normalizeErrorCode(params.errorCode);\n if (normalizedCode === \"unknown_command\") {\n return \"nonexistent_command\";\n }\n if (normalizedCode === \"unknown_option\") {\n return \"invalid_option\";\n }\n if (normalizedCode === \"missing_required_option\") {\n return \"missing_required_option\";\n }\n if (normalizedCode === \"missing_required_argument\") {\n return \"missing_required_argument\";\n }\n if (normalizedCode === \"health_findings\") {\n return \"health_findings\";\n }\n if (normalizedCode === \"validation_findings\") {\n return \"validation_findings\";\n }\n\n if (params.errorCategory === \"usage\") {\n return \"invalid_usage\";\n }\n if (params.errorCategory === \"validation\") {\n return \"validation_failed\";\n }\n if (params.errorCategory === \"conflict\") {\n return \"conflict\";\n }\n if (params.errorCategory === \"runtime\") {\n return \"runtime_failed\";\n }\n return \"unknown_failed\";\n}\n", "import crypto from \"node:crypto\";\nimport { spawn } from \"node:child_process\";\nimport { mkdirSync, rmSync, statSync } from \"node:fs\";\nimport { mkdir, readdir, rm, stat } from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport type { GlobalOptions } from \"../shared/command-types.js\";\nimport { resolvePmPackageRootFromModule } from \"../packages/root.js\";\nimport { appendLineAtomic, readFileIfExists, writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { resolveTelemetryErrorCategory, type TelemetryErrorCategory } from \"../shared/constants.js\";\nimport { nowIso } from \"../shared/time.js\";\nimport { resolveGlobalPmRoot } from \"../store/paths.js\";\nimport { readSettings, writeSettings } from \"../store/settings.js\";\nimport {\n deriveTelemetryCommandResolution,\n deriveTelemetryCommandTaxonomy,\n inferTelemetryErrorCode,\n type TelemetryCommandResolution,\n type TelemetryCommandTaxonomy,\n type TelemetryResolutionStage,\n} from \"./observability.js\";\n\nconst TELEMETRY_QUEUE_RELATIVE_PATH = path.join(\"runtime\", \"telemetry\", \"events.jsonl\");\nconst TELEMETRY_STATE_RELATIVE_PATH = path.join(\"runtime\", \"telemetry\", \"state.json\");\nconst TELEMETRY_SCHEMA_VERSION = 1;\nconst TELEMETRY_CLIENT_SCHEMA_VERSION = 1;\nconst TELEMETRY_FLUSH_BATCH_SIZE = 100;\nconst TELEMETRY_MAX_RETRY_DELAY_MS = 3_600_000;\nconst TELEMETRY_RETRY_BASE_DELAY_MS = 30_000;\nconst TELEMETRY_HTTP_TIMEOUT_MS = 5_000;\nconst MILLISECONDS_PER_DAY = 86_400_000;\nconst TELEMETRY_MAX_EVENT_BYTES = 65_536;\nconst TELEMETRY_SANITIZE_MAX_DEPTH = 6;\nconst TELEMETRY_SANITIZE_MAX_ARRAY_ITEMS = 20;\nconst TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS = 15;\nconst TELEMETRY_RESULT_PREVIEW_MAX_BYTES = 8_192;\nconst TELEMETRY_QUEUE_REWRITE_RETRY_DELAYS_MS = [25, 50, 100, 200] as const;\nconst TELEMETRY_QUEUE_TMP_ORPHAN_MAX_AGE_MS = 60 * 60 * 1000;\nconst TELEMETRY_FLUSH_LOCK_STALE_MS = 60_000;\nconst TELEMETRY_FLUSH_SPAWN_LOCK_STALE_MS = 60_000;\nconst OTEL_TRACES_ENDPOINT_ENV = \"OTEL_EXPORTER_OTLP_TRACES_ENDPOINT\";\nconst OTEL_BASE_ENDPOINT_ENV = \"OTEL_EXPORTER_OTLP_ENDPOINT\";\nconst OTEL_SERVICE_NAME_ENV = \"OTEL_SERVICE_NAME\";\nconst PM_TELEMETRY_DISABLED_ENV = \"PM_TELEMETRY_DISABLED\";\nconst PM_NO_TELEMETRY_ENV = \"PM_NO_TELEMETRY\";\nconst PM_TELEMETRY_DISABLED_VALUES = new Set([\"1\", \"true\", \"yes\", \"on\"]);\nconst PM_TELEMETRY_OTEL_DISABLED_ENV = \"PM_TELEMETRY_OTEL_DISABLED\";\nconst PM_TELEMETRY_OTEL_DISABLED_VALUES = new Set([\"1\", \"true\", \"yes\", \"on\"]);\nconst PM_TELEMETRY_INLINE_FLUSH_ENV = \"PM_TELEMETRY_INLINE_FLUSH\";\nconst PM_TELEMETRY_FLUSH_CHILD_ENV = \"PM_TELEMETRY_FLUSH_CHILD\";\nconst PM_TELEMETRY_SOURCE_CONTEXT_ENV = \"PM_TELEMETRY_SOURCE_CONTEXT\";\nconst PM_TELEMETRY_SOURCE_CONTEXT_VALUES = [\"user\", \"automation\", \"test\", \"dogfood\", \"audit_smoke\"] as const;\n\nlet _lastFlushPromise: Promise<void> = Promise.resolve();\nlet _queueMutationPromise: Promise<unknown> = Promise.resolve();\n\n/** Wait for the most recent background flush to settle. Test-only helper. */\nexport async function waitForPendingFlush(): Promise<void> {\n await _lastFlushPromise;\n await _queueMutationPromise;\n}\nconst PM_TELEMETRY_SOURCE_CONTEXT_SET = new Set<string>(PM_TELEMETRY_SOURCE_CONTEXT_VALUES);\nconst BOOLEAN_TRUE_VALUES = new Set([\"1\", \"true\", \"yes\", \"on\"]);\nconst PROCESS_SESSION_ID = crypto.randomUUID();\n\nconst SENSITIVE_KEYWORDS = [\n \"token\",\n \"secret\",\n \"password\",\n \"passwd\",\n \"api_key\",\n \"apikey\",\n \"authorization\",\n \"cookie\",\n \"session\",\n \"credentials\",\n \"bearer\",\n] as const;\nconst SENSITIVE_INLINE_KEY_PATTERN =\n \"(?:token|secret|password|passwd|api[_-]?key|apikey|authorization|cookie|session|credentials|bearer)\";\nconst INLINE_SENSITIVE_ASSIGNMENT_PATTERN = new RegExp(\n `\\\\b(${SENSITIVE_INLINE_KEY_PATTERN})\\\\s*([:=])\\\\s*([^\\\\s,;]+)`,\n \"giu\",\n);\nconst INLINE_SENSITIVE_FLAG_PATTERN = new RegExp(\n `(--${SENSITIVE_INLINE_KEY_PATTERN})(=|\\\\s+)([^\\\\s,;]+)`,\n \"giu\",\n);\nconst ABSOLUTE_PATH_TOKEN_PATTERN = /(^|[\\s\"'`(=])\\/(?:[^\\s\"'`),;]+)/g;\nconst BEARER_TOKEN_PATTERN = /bearer\\s+[a-z0-9._=-]+/giu;\nconst PRIVATE_IP_PATTERN =\n /\\b(?:10\\.(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)|172\\.(?:1[6-9]|2\\d|3[01])\\.(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)|192\\.168\\.(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d))\\b/g;\n\ninterface TelemetryEvent {\n schema_version: number;\n event_id: string;\n event_type: \"command_start\" | \"command_finish\" | \"command_error\";\n occurred_at: string;\n installation_id: string;\n session_id: string;\n command: string;\n payload: Record<string, unknown>;\n}\n\ninterface QueuedTelemetryEvent {\n client_schema_version?: number;\n event: TelemetryEvent;\n attempts: number;\n last_attempt_at?: string;\n next_attempt_after?: string;\n}\n\ninterface TelemetryRuntimeState {\n last_attempted_flush_at?: string;\n last_successful_flush_at?: string;\n last_failed_flush_at?: string;\n last_failed_flush_error?: string;\n endpoint?: string;\n queue_entries?: number;\n}\n\ntype TelemetryCaptureLevel = \"minimal\" | \"redacted\" | \"max\";\ntype TelemetrySourceContext = (typeof PM_TELEMETRY_SOURCE_CONTEXT_VALUES)[number];\ntype TelemetrySourceContextSource = \"inferred\" | \"env_override\";\n\ninterface ResolvedTelemetrySourceContext {\n source_context: TelemetrySourceContext;\n source_context_source: TelemetrySourceContextSource;\n}\n\nexport interface ActiveTelemetryCommand {\n started_at: string;\n started_at_ms: number;\n command: string;\n command_taxonomy: TelemetryCommandTaxonomy;\n pm_version: string;\n source_context: TelemetrySourceContext;\n source_context_source: TelemetrySourceContextSource;\n installation_id: string;\n pm_root_hash: string;\n cwd_hash: string;\n endpoint: string;\n retention_days: number;\n global_pm_root: string;\n capture_level: TelemetryCaptureLevel;\n otel_traces_endpoint?: string;\n otel_trace_id?: string;\n otel_span_id?: string;\n}\n\nexport interface TelemetryCommandContext {\n command: string;\n pm_version: string;\n args: string[];\n options: Record<string, unknown>;\n global: GlobalOptions;\n pm_root: string;\n}\n\nexport interface TelemetryCommandOutcome {\n ok: boolean;\n error?: string;\n result?: unknown;\n exit_code?: number;\n error_code?: string;\n error_category?: TelemetryErrorCategory;\n command_resolution?: TelemetryCommandResolution;\n resolution_stage?: TelemetryResolutionStage;\n}\n\nexport interface TelemetryErrorEventContext {\n command: string;\n args: string[];\n options: Record<string, unknown>;\n global: GlobalOptions;\n pm_version: string;\n pm_root: string;\n error_code: string;\n error_message: string;\n exit_code: number;\n error_category?: TelemetryErrorCategory;\n command_resolution?: TelemetryCommandResolution;\n resolution_stage?: TelemetryResolutionStage;\n}\n\n\nfunction queuePath(globalPmRoot: string): string {\n return path.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH);\n}\n\nfunction telemetryRuntimeDirectory(globalPmRoot: string): string {\n return path.dirname(queuePath(globalPmRoot));\n}\n\nfunction runtimeStatePath(globalPmRoot: string): string {\n return path.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH);\n}\n\nfunction flushLockPath(globalPmRoot: string): string {\n return path.join(globalPmRoot, \"runtime\", \"telemetry\", \"flush.lock\");\n}\n\nfunction flushSpawnLockPath(globalPmRoot: string): string {\n return path.join(globalPmRoot, \"runtime\", \"telemetry\", \"flush.spawn.lock\");\n}\n\nfunction telemetryFlushRunnerPath(): string {\n return path.join(resolvePmPackageRootFromModule(import.meta.url, [\"../../..\"]), \"dist\", \"cli\", \"telemetry-flush.js\");\n}\n\nfunction shouldFlushInline(): boolean {\n if (parseBooleanTrueLike(process.env[PM_TELEMETRY_INLINE_FLUSH_ENV])) {\n return true;\n }\n if (parseBooleanTrueLike(process.env[PM_TELEMETRY_FLUSH_CHILD_ENV])) {\n return true;\n }\n const nodeEnv = (process.env.NODE_ENV ?? \"\").trim().toLowerCase();\n return typeof process.env.VITEST === \"string\" || typeof process.env.VITEST_WORKER_ID === \"string\" || nodeEnv === \"test\";\n}\n\nasync function readRuntimeState(globalPmRoot: string): Promise<TelemetryRuntimeState> {\n const raw = await readFileIfExists(runtimeStatePath(globalPmRoot));\n if (!raw || raw.trim().length === 0) {\n return {};\n }\n try {\n const parsed = JSON.parse(raw) as TelemetryRuntimeState;\n if (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n return {};\n }\n return parsed;\n } catch {\n return {};\n }\n}\n\nasync function writeRuntimeState(globalPmRoot: string, patch: TelemetryRuntimeState): Promise<void> {\n try {\n const current = await readRuntimeState(globalPmRoot);\n const next: TelemetryRuntimeState = {\n ...current,\n ...patch,\n };\n const normalized = Object.fromEntries(\n Object.entries(next)\n .filter(([, value]) => value !== undefined)\n .sort((left, right) => left[0].localeCompare(right[0])),\n );\n await writeFileAtomic(runtimeStatePath(globalPmRoot), `${JSON.stringify(normalized, null, 2)}\\n`);\n } catch {\n // Runtime state persistence is best effort and must not block command execution.\n }\n}\n\nfunction isSensitiveKey(key: string): boolean {\n const normalized = key.trim().toLowerCase().replaceAll(\"-\", \"_\").replaceAll(/[^a-z0-9_]+/g, \"_\");\n const tokens = normalized.split(\"_\").filter((token) => token.length > 0);\n return SENSITIVE_KEYWORDS.some(\n (keyword) => normalized === keyword || normalized.endsWith(`_${keyword}`) || tokens.includes(keyword),\n );\n}\n\nfunction redactInlineSensitiveAssignments(input: string): string {\n const withoutAssignments = input.replaceAll(\n INLINE_SENSITIVE_ASSIGNMENT_PATTERN,\n (_match: string, key: string, delimiter: string): string => `${key}${delimiter}[redacted]`,\n );\n return withoutAssignments.replaceAll(\n INLINE_SENSITIVE_FLAG_PATTERN,\n (_match: string, flag: string, delimiter: string): string => `${flag}${delimiter}[redacted]`,\n );\n}\n\nfunction redactAbsolutePathTokens(input: string): string {\n return input.replaceAll(\n ABSOLUTE_PATH_TOKEN_PATTERN,\n (_match: string, prefix: string): string => `${prefix}[redacted_path]`,\n );\n}\n\nfunction isAsciiLetterOrDigitCode(code: number): boolean {\n const isUpper = code >= 65 && code <= 90;\n const isLower = code >= 97 && code <= 122;\n const isDigit = code >= 48 && code <= 57;\n return isUpper || isLower || isDigit;\n}\n\nfunction isEmailLocalCharacter(character: string | undefined): boolean {\n if (!character) {\n return false;\n }\n const code = character.charCodeAt(0);\n if (isAsciiLetterOrDigitCode(code)) {\n return true;\n }\n return character === \".\" || character === \"_\" || character === \"%\" || character === \"+\" || character === \"-\";\n}\n\nfunction isEmailDomainCharacter(character: string | undefined): boolean {\n if (!character) {\n return false;\n }\n const code = character.charCodeAt(0);\n if (isAsciiLetterOrDigitCode(code)) {\n return true;\n }\n return character === \".\" || character === \"-\";\n}\n\nfunction looksLikeEmailToken(token: string): boolean {\n const atIndex = token.indexOf(\"@\");\n if (atIndex <= 0 || atIndex !== token.lastIndexOf(\"@\") || atIndex === token.length - 1) {\n return false;\n }\n const localPart = token.slice(0, atIndex);\n const domainPart = token.slice(atIndex + 1);\n const lastDot = domainPart.lastIndexOf(\".\");\n if (lastDot <= 0 || lastDot === domainPart.length - 1) {\n return false;\n }\n if (domainPart.length - (lastDot + 1) < 2) {\n return false;\n }\n for (const character of localPart) {\n if (!isEmailLocalCharacter(character)) {\n return false;\n }\n }\n for (const character of domainPart) {\n if (!isEmailDomainCharacter(character)) {\n return false;\n }\n }\n return true;\n}\n\nfunction redactEmailTokens(input: string): string {\n let redacted = \"\";\n let cursor = 0;\n while (cursor < input.length) {\n const atIndex = input.indexOf(\"@\", cursor);\n if (atIndex < 0) {\n redacted += input.slice(cursor);\n break;\n }\n let start = atIndex - 1;\n while (start >= cursor && isEmailLocalCharacter(input[start])) {\n start -= 1;\n }\n start += 1;\n let end = atIndex + 1;\n while (end < input.length && isEmailDomainCharacter(input[end])) {\n end += 1;\n }\n const candidate = input.slice(start, end);\n if (looksLikeEmailToken(candidate)) {\n redacted += input.slice(cursor, start);\n redacted += \"[redacted_email]\";\n cursor = end;\n continue;\n }\n redacted += input.slice(cursor, atIndex + 1);\n cursor = atIndex + 1;\n }\n return redacted;\n}\n\nfunction sanitizeCommonSensitiveTokens(input: string): string {\n const withoutEmails = redactEmailTokens(input);\n const withoutBearer = withoutEmails.replaceAll(BEARER_TOKEN_PATTERN, \"bearer [redacted_token]\");\n return withoutBearer.replaceAll(PRIVATE_IP_PATTERN, \"[redacted_ip]\");\n}\n\nfunction sanitizeStringRedacted(input: string): string {\n const withoutCommonSensitiveTokens = sanitizeCommonSensitiveTokens(input);\n const withoutInlineSecrets = redactInlineSensitiveAssignments(withoutCommonSensitiveTokens);\n const withoutAbsolutePaths = redactAbsolutePathTokens(withoutInlineSecrets);\n const trimmed = withoutAbsolutePaths.trim();\n if (trimmed.startsWith(\"/\") && trimmed.length > 1) {\n return \"[redacted_path]\";\n }\n if (withoutAbsolutePaths.length > 512) {\n return `${withoutAbsolutePaths.slice(0, 509)}...`;\n }\n return withoutAbsolutePaths;\n}\n\nfunction sanitizeStringMax(input: string): string {\n const withoutCommonSensitiveTokens = sanitizeCommonSensitiveTokens(input);\n const withoutInlineSecrets = redactInlineSensitiveAssignments(withoutCommonSensitiveTokens);\n const withoutAbsolutePaths = redactAbsolutePathTokens(withoutInlineSecrets);\n const trimmed = withoutAbsolutePaths.trim();\n if (trimmed.startsWith(\"/\") && trimmed.length > 1) {\n return \"[redacted_path]\";\n }\n if (withoutAbsolutePaths.length > 2048) {\n return `${withoutAbsolutePaths.slice(0, 2045)}...`;\n }\n return withoutAbsolutePaths;\n}\n\nfunction sanitizeString(input: string, captureLevel: Exclude<TelemetryCaptureLevel, \"minimal\"> = \"redacted\"): string {\n if (captureLevel === \"max\") {\n return sanitizeStringMax(input);\n }\n return sanitizeStringRedacted(input);\n}\n\nfunction sanitizeValue(\n value: unknown,\n keyHint?: string,\n captureLevel: Exclude<TelemetryCaptureLevel, \"minimal\"> = \"redacted\",\n depth = 0,\n): unknown {\n if (keyHint && isSensitiveKey(keyHint)) {\n return \"[redacted]\";\n }\n if (value === null || value === undefined) {\n return value;\n }\n if (typeof value === \"string\") {\n return sanitizeString(value, captureLevel);\n }\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n return value;\n }\n if (depth >= TELEMETRY_SANITIZE_MAX_DEPTH) {\n return \"[depth_truncated]\";\n }\n if (Array.isArray(value)) {\n return value.slice(0, TELEMETRY_SANITIZE_MAX_ARRAY_ITEMS).map((entry) => sanitizeValue(entry, undefined, captureLevel, depth + 1));\n }\n if (typeof value === \"object\") {\n const record = value as Record<string, unknown>;\n const sanitized: Record<string, unknown> = {};\n for (const [key, nested] of Object.entries(record)) {\n sanitized[key] = sanitizeValue(nested, key, captureLevel, depth + 1);\n }\n return sanitized;\n }\n return String(value);\n}\n\nfunction sanitizeCommandArgs(\n args: string[],\n captureLevel: Exclude<TelemetryCaptureLevel, \"minimal\"> = \"redacted\",\n): string[] {\n const sanitized: string[] = [];\n let nextIsSensitiveValue = false;\n for (const rawArg of args) {\n const arg = sanitizeString(rawArg, captureLevel);\n if (nextIsSensitiveValue) {\n sanitized.push(\"[redacted]\");\n nextIsSensitiveValue = false;\n continue;\n }\n if (arg.startsWith(\"--\")) {\n const withoutPrefix = arg.slice(2);\n const delimiterIndex = withoutPrefix.indexOf(\"=\");\n if (delimiterIndex >= 0) {\n const key = withoutPrefix.slice(0, delimiterIndex);\n const value = withoutPrefix.slice(delimiterIndex + 1);\n if (isSensitiveKey(key)) {\n sanitized.push(`--${key}=[redacted]`);\n } else {\n sanitized.push(`--${key}=${sanitizeString(value, captureLevel)}`);\n }\n continue;\n }\n if (isSensitiveKey(withoutPrefix)) {\n sanitized.push(`--${withoutPrefix}`);\n nextIsSensitiveValue = true;\n continue;\n }\n }\n sanitized.push(arg);\n }\n return sanitized;\n}\n\nfunction normalizeCaptureLevel(value: string | undefined): TelemetryCaptureLevel {\n const normalized = value?.trim().toLowerCase();\n if (normalized === \"minimal\" || normalized === \"redacted\" || normalized === \"max\") {\n return normalized;\n }\n return \"redacted\";\n}\n\nfunction parseBooleanTrueLike(value: string | undefined): boolean {\n return BOOLEAN_TRUE_VALUES.has((value ?? \"\").trim().toLowerCase());\n}\n\nfunction normalizePmVersion(value: string | undefined): string {\n const trimmed = value?.trim() ?? \"\";\n return trimmed.length > 0 ? trimmed : \"0.0.0\";\n}\n\nfunction normalizeTelemetryErrorCode(value: string | undefined): string | undefined {\n const normalized = value?.trim();\n return normalized && normalized.length > 0 ? normalized : undefined;\n}\n\nfunction normalizeTelemetryExitCode(exitCode: number | undefined, ok: boolean): number {\n if (Number.isFinite(exitCode)) {\n return Math.max(0, Math.trunc(exitCode ?? 0));\n }\n return ok ? 0 : 1;\n}\n\nfunction normalizeTelemetryErrorCategory(params: {\n ok: boolean;\n errorCode?: string;\n errorCategory?: TelemetryErrorCategory;\n}): TelemetryErrorCategory | undefined {\n if (params.ok) {\n return undefined;\n }\n if (typeof params.errorCategory === \"string\" && params.errorCategory.trim().length > 0) {\n return params.errorCategory;\n }\n if (typeof params.errorCode === \"string\" && params.errorCode.trim().length > 0) {\n return resolveTelemetryErrorCategory(params.errorCode);\n }\n return \"unknown\";\n}\n\nfunction resolveTelemetrySourceContext(globalOptions: GlobalOptions): ResolvedTelemetrySourceContext {\n const override = (process.env[PM_TELEMETRY_SOURCE_CONTEXT_ENV] ?? \"\").trim().toLowerCase();\n if (PM_TELEMETRY_SOURCE_CONTEXT_SET.has(override)) {\n return {\n source_context: override as TelemetrySourceContext,\n source_context_source: \"env_override\",\n };\n }\n const nodeEnv = (process.env.NODE_ENV ?? \"\").trim().toLowerCase();\n if (typeof process.env.VITEST === \"string\" || typeof process.env.VITEST_WORKER_ID === \"string\" || nodeEnv === \"test\") {\n return {\n source_context: \"test\",\n source_context_source: \"inferred\",\n };\n }\n const nonTty = process.stdin.isTTY !== true || process.stdout.isTTY !== true;\n const ci = parseBooleanTrueLike(process.env.CI);\n const scriptLikeMode = globalOptions.json === true || globalOptions.quiet === true;\n if (nonTty || ci || scriptLikeMode) {\n return {\n source_context: \"automation\",\n source_context_source: \"inferred\",\n };\n }\n return {\n source_context: \"user\",\n source_context_source: \"inferred\",\n };\n}\n\nfunction hashWithInstallationId(installationId: string, value: string): string {\n return crypto.createHash(\"sha256\").update(`${installationId}:${value}`).digest(\"hex\");\n}\n\nfunction normalizeForHash(value: unknown, depth = 0): unknown {\n if (value === null || value === undefined) {\n return value;\n }\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return value;\n }\n if (depth >= TELEMETRY_SANITIZE_MAX_DEPTH) {\n return \"[depth_truncated]\";\n }\n if (Array.isArray(value)) {\n return value.slice(0, TELEMETRY_SANITIZE_MAX_ARRAY_ITEMS).map((entry) => normalizeForHash(entry, depth + 1));\n }\n if (typeof value === \"object\") {\n const record = value as Record<string, unknown>;\n const normalized: Record<string, unknown> = {};\n const sortedKeys = Object.keys(record).sort((left, right) => left.localeCompare(right));\n for (const key of sortedKeys) {\n normalized[key] = normalizeForHash(record[key], depth + 1);\n }\n return normalized;\n }\n return String(value);\n}\n\nfunction hashTelemetryValue(installationId: string, value: unknown): string {\n return hashWithInstallationId(installationId, JSON.stringify(normalizeForHash(value)));\n}\n\nfunction hashCommandArgs(installationId: string, args: string[]): { hashes: string[]; digest: string } {\n return {\n hashes: args.map((arg) => hashWithInstallationId(installationId, arg)),\n digest: hashWithInstallationId(installationId, args.join(\"\\u0000\")),\n };\n}\n\nfunction hashTelemetryErrorFingerprint(\n installationId: string,\n command: string,\n errorCode: string | undefined,\n errorMessage: string | undefined,\n): string {\n const normalizedMessage = sanitizeString(errorMessage ?? \"\", \"redacted\");\n const fingerprintSource = `${command}\\u0000${errorCode ?? \"unknown_error\"}\\u0000${normalizedMessage}`;\n return hashWithInstallationId(installationId, fingerprintSource);\n}\n\nfunction telemetryDisabledByEnvironment(): boolean {\n return (\n PM_TELEMETRY_DISABLED_VALUES.has((process.env[PM_TELEMETRY_DISABLED_ENV] ?? \"\").trim().toLowerCase()) ||\n PM_TELEMETRY_DISABLED_VALUES.has((process.env[PM_NO_TELEMETRY_ENV] ?? \"\").trim().toLowerCase())\n );\n}\n\nfunction resolveOtelTracesEndpoint(): string | null {\n if (PM_TELEMETRY_OTEL_DISABLED_VALUES.has((process.env[PM_TELEMETRY_OTEL_DISABLED_ENV] ?? \"\").trim().toLowerCase())) {\n return null;\n }\n\n const directEndpoint = (process.env[OTEL_TRACES_ENDPOINT_ENV] ?? \"\").trim();\n if (directEndpoint.length > 0) {\n try {\n return new URL(directEndpoint).toString();\n } catch {\n return null;\n }\n }\n\n const baseEndpoint = (process.env[OTEL_BASE_ENDPOINT_ENV] ?? \"\").trim();\n if (baseEndpoint.length === 0) {\n return null;\n }\n\n try {\n const url = new URL(baseEndpoint);\n const normalizedPath = url.pathname.replace(/\\/+$/, \"\");\n if (!normalizedPath.endsWith(\"/v1/traces\")) {\n url.pathname = `${normalizedPath.length === 0 ? \"\" : normalizedPath}/v1/traces`;\n }\n return url.toString();\n } catch {\n return null;\n }\n}\n\nfunction isoToUnixNano(iso: string): string {\n const parsedMs = Date.parse(iso);\n const epochMs = Number.isNaN(parsedMs) ? Date.now() : parsedMs;\n return `${BigInt(epochMs) * 1_000_000n}`;\n}\n\nfunction otlpStringAttribute(key: string, value: string): { key: string; value: { stringValue: string } } {\n return {\n key,\n value: { stringValue: value },\n };\n}\n\nfunction otlpBoolAttribute(key: string, value: boolean): { key: string; value: { boolValue: boolean } } {\n return {\n key,\n value: { boolValue: value },\n };\n}\n\nfunction otlpIntAttribute(key: string, value: number): { key: string; value: { intValue: string } } {\n return {\n key,\n value: { intValue: String(Math.max(0, Math.trunc(value))) },\n };\n}\n\nasync function exportLocalOtelSpan(\n activeCommand: ActiveTelemetryCommand,\n outcome: { ok: boolean; error?: string; exit_code?: number; error_code?: string; error_category?: TelemetryErrorCategory },\n finishedAtIso: string,\n durationMs: number,\n): Promise<void> {\n if (\n typeof activeCommand.otel_traces_endpoint !== \"string\" ||\n activeCommand.otel_traces_endpoint.trim().length === 0 ||\n typeof activeCommand.otel_trace_id !== \"string\" ||\n activeCommand.otel_trace_id.length === 0 ||\n typeof activeCommand.otel_span_id !== \"string\" ||\n activeCommand.otel_span_id.length === 0\n ) {\n return;\n }\n\n const serviceNameCandidate = sanitizeString((process.env[OTEL_SERVICE_NAME_ENV] ?? \"\").trim());\n const serviceName = serviceNameCandidate.length > 0 ? serviceNameCandidate : \"pm-cli\";\n const normalizedExitCode = normalizeTelemetryExitCode(outcome.exit_code, outcome.ok);\n const normalizedErrorCode = normalizeTelemetryErrorCode(outcome.error_code);\n const normalizedErrorCategory = normalizeTelemetryErrorCategory({\n ok: outcome.ok,\n errorCode: normalizedErrorCode,\n errorCategory: outcome.error_category,\n });\n const attributes: Array<\n | ReturnType<typeof otlpStringAttribute>\n | ReturnType<typeof otlpBoolAttribute>\n | ReturnType<typeof otlpIntAttribute>\n > = [\n otlpStringAttribute(\"pm.command\", sanitizeString(activeCommand.command)),\n otlpStringAttribute(\"pm.version\", activeCommand.pm_version),\n otlpStringAttribute(\"pm.source_context\", activeCommand.source_context),\n otlpStringAttribute(\"pm.source_context_source\", activeCommand.source_context_source),\n otlpStringAttribute(\"pm.installation_id\", activeCommand.installation_id),\n otlpStringAttribute(\"pm.session_id\", PROCESS_SESSION_ID),\n otlpStringAttribute(\"pm.pm_root_hash\", activeCommand.pm_root_hash),\n otlpStringAttribute(\"pm.cwd_hash\", activeCommand.cwd_hash),\n otlpBoolAttribute(\"pm.ok\", outcome.ok),\n otlpIntAttribute(\"pm.exit_code\", normalizedExitCode),\n otlpIntAttribute(\"pm.duration_ms\", durationMs),\n ];\n if (typeof normalizedErrorCode === \"string\") {\n attributes.push(otlpStringAttribute(\"pm.error_code\", normalizedErrorCode));\n }\n if (typeof normalizedErrorCategory === \"string\") {\n attributes.push(otlpStringAttribute(\"pm.error_category\", normalizedErrorCategory));\n }\n if (typeof outcome.error === \"string\" && outcome.error.trim().length > 0) {\n attributes.push(otlpStringAttribute(\"pm.error\", sanitizeString(outcome.error)));\n }\n\n const payload = {\n resourceSpans: [\n {\n resource: {\n attributes: [otlpStringAttribute(\"service.name\", serviceName)],\n },\n scopeSpans: [\n {\n scope: {\n name: \"pm-cli.telemetry\",\n version: \"1\",\n },\n spans: [\n {\n traceId: activeCommand.otel_trace_id,\n spanId: activeCommand.otel_span_id,\n name: `pm.command.${sanitizeString(activeCommand.command)}`,\n kind: 1,\n startTimeUnixNano: isoToUnixNano(activeCommand.started_at),\n endTimeUnixNano: isoToUnixNano(finishedAtIso),\n attributes,\n status: {\n code: outcome.ok ? 1 : 2,\n message: outcome.ok ? \"\" : sanitizeString(outcome.error ?? \"command_failed\"),\n },\n },\n ],\n },\n ],\n },\n ],\n };\n\n const response = await fetch(activeCommand.otel_traces_endpoint, {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(payload),\n signal: AbortSignal.timeout(TELEMETRY_HTTP_TIMEOUT_MS),\n });\n if (!response.ok) {\n throw new Error(`local_otel_export_http_${response.status}`);\n }\n}\n\nfunction summarizeResult(\n result: unknown,\n captureLevel: Exclude<TelemetryCaptureLevel, \"minimal\"> = \"redacted\",\n): Record<string, unknown> {\n if (result === null || result === undefined) {\n return { type: \"nullish\" };\n }\n if (typeof result === \"string\") {\n return { type: \"string\", value: sanitizeString(result, captureLevel) };\n }\n if (typeof result === \"number\" || typeof result === \"boolean\") {\n return { type: typeof result, value: result };\n }\n if (Array.isArray(result)) {\n return {\n type: \"array\",\n length: result.length,\n sample: result.slice(0, 5).map((entry) => sanitizeValue(entry, undefined, captureLevel)),\n };\n }\n if (typeof result === \"object\") {\n const record = result as Record<string, unknown>;\n const keys = Object.keys(record).sort((left, right) => left.localeCompare(right));\n const sanitized: Record<string, unknown> = {};\n let previewBytes = 0;\n for (const key of keys.slice(0, 25)) {\n const sanitizedValue = sanitizeValue(record[key], key, captureLevel);\n const entrySize = JSON.stringify(sanitizedValue)?.length ?? 0;\n if (previewBytes + entrySize > TELEMETRY_RESULT_PREVIEW_MAX_BYTES) {\n sanitized[key] = \"[preview_truncated]\";\n break;\n }\n previewBytes += entrySize;\n sanitized[key] = sanitizedValue;\n }\n return {\n type: \"object\",\n key_count: keys.length,\n keys_preview: keys.slice(0, 50),\n preview: sanitized,\n };\n }\n return { type: typeof result, value: String(result) };\n}\n\nfunction buildCommandStartPayload(params: {\n captureLevel: TelemetryCaptureLevel;\n context: TelemetryCommandContext;\n pmVersion: string;\n sourceContext: ResolvedTelemetrySourceContext;\n pmRootHash: string;\n cwdHash: string;\n installationId: string;\n}): Record<string, unknown> {\n const { captureLevel, context, pmVersion, sourceContext, pmRootHash, cwdHash, installationId } = params;\n const commandTaxonomy = deriveTelemetryCommandTaxonomy(context.command);\n const hashedArgs = hashCommandArgs(installationId, context.args);\n const commandInvocationDigest = hashWithInstallationId(installationId, `${context.command}\\u0000${context.args.join(\"\\u0000\")}`);\n const commandOptionsDigest = hashTelemetryValue(installationId, context.options);\n const globalOptionsDigest = hashTelemetryValue(installationId, context.global);\n if (captureLevel === \"minimal\") {\n return {\n capture_level: captureLevel,\n pm_version: pmVersion,\n source_context: sourceContext.source_context,\n source_context_source: sourceContext.source_context_source,\n command_taxonomy: commandTaxonomy,\n command_args_digest: hashedArgs.digest,\n command_invocation_digest: commandInvocationDigest,\n command_options_digest: commandOptionsDigest,\n global_options_digest: globalOptionsDigest,\n };\n }\n return {\n pm_version: pmVersion,\n source_context: sourceContext.source_context,\n source_context_source: sourceContext.source_context_source,\n command_taxonomy: commandTaxonomy,\n command_args: sanitizeCommandArgs(context.args, captureLevel),\n command_args_hashes: hashedArgs.hashes,\n command_args_digest: hashedArgs.digest,\n command_invocation_digest: commandInvocationDigest,\n command_options: sanitizeValue(context.options, undefined, captureLevel) as Record<string, unknown>,\n command_options_digest: commandOptionsDigest,\n global_options: sanitizeValue(context.global, undefined, captureLevel) as Record<string, unknown>,\n global_options_digest: globalOptionsDigest,\n pm_root_hash: pmRootHash,\n cwd_hash: cwdHash,\n capture_level: captureLevel,\n runtime: {\n node: process.version,\n platform: process.platform,\n arch: process.arch,\n hostname_hash: hashWithInstallationId(installationId, os.hostname()),\n stdin_tty: process.stdin.isTTY === true,\n stdout_tty: process.stdout.isTTY === true,\n },\n };\n}\n\nfunction buildCommandFinishPayload(params: {\n captureLevel: TelemetryCaptureLevel;\n pmVersion: string;\n sourceContext: ResolvedTelemetrySourceContext;\n outcome: TelemetryCommandOutcome;\n durationMs: number;\n startedAt: string;\n command: string;\n installationId: string;\n commandTaxonomy: TelemetryCommandTaxonomy;\n exitCode: number;\n errorCode?: string;\n errorCategory?: TelemetryErrorCategory;\n commandResolution: TelemetryCommandResolution;\n resolutionStage: TelemetryResolutionStage;\n}): Record<string, unknown> {\n const {\n captureLevel,\n pmVersion,\n sourceContext,\n outcome,\n durationMs,\n startedAt,\n command,\n installationId,\n commandTaxonomy,\n exitCode,\n errorCode,\n errorCategory,\n commandResolution,\n resolutionStage,\n } = params;\n const errorFingerprint =\n outcome.ok === false\n ? hashTelemetryErrorFingerprint(installationId, command, errorCode, outcome.error)\n : undefined;\n if (captureLevel === \"minimal\") {\n return {\n capture_level: captureLevel,\n pm_version: pmVersion,\n source_context: sourceContext.source_context,\n source_context_source: sourceContext.source_context_source,\n command_taxonomy: commandTaxonomy,\n command_resolution: commandResolution,\n resolution_stage: resolutionStage,\n ok: outcome.ok,\n exit_code: exitCode,\n error_code: errorCode,\n error_category: errorCategory,\n error: outcome.error ? sanitizeString(outcome.error, \"redacted\") : undefined,\n error_fingerprint: errorFingerprint,\n duration_ms: durationMs,\n };\n }\n return {\n capture_level: captureLevel,\n pm_version: pmVersion,\n source_context: sourceContext.source_context,\n source_context_source: sourceContext.source_context_source,\n command_taxonomy: commandTaxonomy,\n command_resolution: commandResolution,\n resolution_stage: resolutionStage,\n ok: outcome.ok,\n exit_code: exitCode,\n error_code: errorCode,\n error_category: errorCategory,\n error: outcome.error ? sanitizeString(outcome.error, captureLevel) : undefined,\n error_fingerprint: errorFingerprint,\n duration_ms: durationMs,\n started_at: startedAt,\n result_summary: summarizeResult(outcome.result, captureLevel),\n };\n}\n\nfunction buildCommandErrorPayload(params: {\n captureLevel: TelemetryCaptureLevel;\n pmVersion: string;\n sourceContext: ResolvedTelemetrySourceContext;\n command: string;\n commandTaxonomy: TelemetryCommandTaxonomy;\n commandResolution: TelemetryCommandResolution;\n resolutionStage: TelemetryResolutionStage;\n args: string[];\n options: Record<string, unknown>;\n pmRootHash: string;\n cwdHash: string;\n installationId: string;\n errorCode: string;\n errorMessage: string;\n errorCategory: TelemetryErrorCategory;\n exitCode: number;\n}): Record<string, unknown> {\n const {\n captureLevel,\n pmVersion,\n sourceContext,\n command,\n commandTaxonomy,\n commandResolution,\n resolutionStage,\n args,\n options,\n pmRootHash,\n cwdHash,\n installationId,\n errorCode,\n errorMessage,\n errorCategory,\n exitCode,\n } = params;\n const attemptedArgHashes = hashCommandArgs(installationId, args);\n const attemptedCommandDigest = hashWithInstallationId(installationId, command);\n const attemptedOptionsDigest = hashTelemetryValue(installationId, options);\n const errorFingerprint = hashTelemetryErrorFingerprint(installationId, command, errorCode, errorMessage);\n if (captureLevel === \"minimal\") {\n return {\n capture_level: captureLevel,\n pm_version: pmVersion,\n source_context: sourceContext.source_context,\n source_context_source: sourceContext.source_context_source,\n command_taxonomy: commandTaxonomy,\n command_resolution: commandResolution,\n resolution_stage: resolutionStage,\n attempted_command_digest: attemptedCommandDigest,\n attempted_args_digest: attemptedArgHashes.digest,\n attempted_options_digest: attemptedOptionsDigest,\n error_code: errorCode,\n error_category: errorCategory,\n exit_code: exitCode,\n error: sanitizeString(errorMessage, \"redacted\"),\n error_fingerprint: errorFingerprint,\n };\n }\n\n return {\n capture_level: captureLevel,\n pm_version: pmVersion,\n source_context: sourceContext.source_context,\n source_context_source: sourceContext.source_context_source,\n command_taxonomy: commandTaxonomy,\n command_resolution: commandResolution,\n resolution_stage: resolutionStage,\n attempted_command: sanitizeString(command, captureLevel),\n attempted_command_digest: attemptedCommandDigest,\n attempted_args: sanitizeCommandArgs(args, captureLevel),\n attempted_args_hashes: attemptedArgHashes.hashes,\n attempted_args_digest: attemptedArgHashes.digest,\n attempted_options: sanitizeValue(options, undefined, captureLevel) as Record<string, unknown>,\n attempted_options_digest: attemptedOptionsDigest,\n error_code: errorCode,\n error_category: errorCategory,\n exit_code: exitCode,\n error: sanitizeString(errorMessage, captureLevel),\n error_fingerprint: errorFingerprint,\n pm_root_hash: pmRootHash,\n cwd_hash: cwdHash,\n runtime: {\n node: process.version,\n platform: process.platform,\n arch: process.arch,\n hostname_hash: hashWithInstallationId(installationId, os.hostname()),\n stdin_tty: process.stdin.isTTY === true,\n stdout_tty: process.stdout.isTTY === true,\n },\n };\n}\n\nasync function ensureInstallationId(\n globalPmRoot: string,\n): Promise<{ installationId: string; endpoint: string; retentionDays: number }> {\n const settings = await readSettings(globalPmRoot);\n let changed = false;\n if (settings.telemetry.installation_id.trim().length === 0) {\n settings.telemetry.installation_id = crypto.randomUUID();\n changed = true;\n }\n if (changed) {\n await writeSettings(globalPmRoot, settings, \"telemetry:install_id\");\n }\n return {\n installationId: settings.telemetry.installation_id,\n endpoint: settings.telemetry.endpoint,\n retentionDays: Math.max(1, Math.trunc(settings.telemetry.retention_days)),\n };\n}\n\nasync function enqueueTelemetryEvent(globalPmRoot: string, event: TelemetryEvent): Promise<void> {\n const queued: QueuedTelemetryEvent = {\n client_schema_version: TELEMETRY_CLIENT_SCHEMA_VERSION,\n event,\n attempts: 0,\n };\n let serialized = JSON.stringify(queued);\n if (serialized.length > TELEMETRY_MAX_EVENT_BYTES) {\n const trimmed = { ...event, payload: { ...event.payload, result_summary: { truncated: true, reason: \"payload_size_exceeded\", original_bytes: serialized.length } } };\n const trimmedQueued: QueuedTelemetryEvent = {\n client_schema_version: TELEMETRY_CLIENT_SCHEMA_VERSION,\n event: trimmed,\n attempts: 0,\n };\n serialized = JSON.stringify(trimmedQueued);\n }\n await withQueueMutation(async () => {\n await appendLineAtomic(queuePath(globalPmRoot), serialized);\n });\n}\n\nfunction parseQueueLines(raw: string): QueuedTelemetryEvent[] {\n const entries: QueuedTelemetryEvent[] = [];\n for (const line of raw.split(\"\\n\")) {\n const trimmed = line.trim();\n if (trimmed.length === 0) {\n continue;\n }\n try {\n const parsed = JSON.parse(trimmed) as QueuedTelemetryEvent;\n if (\n parsed &&\n typeof parsed === \"object\" &&\n parsed.event &&\n typeof parsed.event === \"object\" &&\n typeof parsed.attempts === \"number\" &&\n (\n parsed.client_schema_version === undefined ||\n (typeof parsed.client_schema_version === \"number\" && Number.isFinite(parsed.client_schema_version))\n )\n ) {\n entries.push(parsed);\n }\n } catch {\n // Drop malformed lines to preserve queue forward progress.\n }\n }\n return entries;\n}\n\nfunction nextRetryIso(attempts: number): string {\n const delay = Math.min(TELEMETRY_RETRY_BASE_DELAY_MS * 2 ** Math.max(attempts - 1, 0), TELEMETRY_MAX_RETRY_DELAY_MS);\n return new Date(Date.now() + delay).toISOString();\n}\n\nfunction isDueForRetry(entry: QueuedTelemetryEvent): boolean {\n if (typeof entry.next_attempt_after !== \"string\" || entry.next_attempt_after.trim().length === 0) {\n return true;\n }\n const dueAtMs = Date.parse(entry.next_attempt_after);\n if (Number.isNaN(dueAtMs)) {\n return true;\n }\n return dueAtMs <= Date.now();\n}\n\nfunction retentionCutoffMs(retentionDays: number): number {\n const normalizedDays = Number.isFinite(retentionDays) ? Math.max(1, Math.trunc(retentionDays)) : 1;\n return Date.now() - normalizedDays * MILLISECONDS_PER_DAY;\n}\n\nfunction isExpiredQueueEntry(entry: QueuedTelemetryEvent, cutoffMs: number): boolean {\n const occurredAt = entry.event?.occurred_at;\n if (typeof occurredAt !== \"string\" || occurredAt.trim().length === 0) {\n return false;\n }\n const occurredAtMs = Date.parse(occurredAt);\n if (Number.isNaN(occurredAtMs)) {\n return false;\n }\n return occurredAtMs < cutoffMs;\n}\n\nfunction pruneExpiredQueueEntries(\n entries: QueuedTelemetryEvent[],\n retentionDays: number,\n): { entries: QueuedTelemetryEvent[]; prunedCount: number } {\n const cutoffMs = retentionCutoffMs(retentionDays);\n const retained: QueuedTelemetryEvent[] = [];\n let prunedCount = 0;\n for (const entry of entries) {\n const serializedSize = JSON.stringify(entry).length;\n const oversized = serializedSize > TELEMETRY_MAX_EVENT_BYTES;\n if (oversized || isExpiredQueueEntry(entry, cutoffMs) || entry.attempts >= TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS) {\n prunedCount += 1;\n continue;\n }\n retained.push(entry);\n }\n return { entries: retained, prunedCount };\n}\n\nasync function rewriteQueue(globalPmRoot: string, entries: QueuedTelemetryEvent[]): Promise<void> {\n const serialized = entries.map((entry) => JSON.stringify(entry)).join(\"\\n\");\n const contents = serialized.length > 0 ? `${serialized}\\n` : \"\";\n for (let attempt = 0; ; attempt += 1) {\n try {\n await writeFileAtomic(queuePath(globalPmRoot), contents);\n return;\n } catch (error: unknown) {\n const retryDelay = TELEMETRY_QUEUE_REWRITE_RETRY_DELAYS_MS[attempt];\n if (retryDelay === undefined || !isRetryableQueueRewriteError(error)) {\n throw error;\n }\n await sleep(retryDelay);\n }\n }\n}\n\nfunction isRetryableQueueRewriteError(error: unknown): boolean {\n if (typeof error !== \"object\" || error === null || !(\"code\" in error)) {\n return false;\n }\n const code = (error as { code?: unknown }).code;\n return code === \"EACCES\" || code === \"EBUSY\" || code === \"EPERM\";\n}\n\nfunction sleep(milliseconds: number): Promise<void> {\n return new Promise((resolve) => {\n setTimeout(resolve, milliseconds);\n });\n}\n\nasync function cleanupTelemetryQueueTempOrphans(\n globalPmRoot: string,\n maxAgeMs = TELEMETRY_QUEUE_TMP_ORPHAN_MAX_AGE_MS,\n): Promise<void> {\n try {\n const dirPath = telemetryRuntimeDirectory(globalPmRoot);\n const entries = await readdir(dirPath, { withFileTypes: true });\n const cutoffMs = Date.now() - Math.max(0, maxAgeMs);\n await Promise.all(\n entries\n .filter((entry) => entry.isFile() && /^\\.events\\.jsonl\\.\\d+\\.\\d+\\.[a-f0-9]+\\.tmp$/.test(entry.name))\n .map(async (entry) => {\n const candidate = path.join(dirPath, entry.name);\n const candidateStats = await stat(candidate);\n if (candidateStats.mtimeMs < cutoffMs) {\n await rm(candidate, { force: true });\n }\n }),\n );\n } catch {\n // Telemetry cleanup is best-effort and must not affect command execution.\n }\n}\n\nasync function withQueueMutation<T>(operation: () => Promise<T>): Promise<T> {\n const run = _queueMutationPromise.catch(() => {}).then(operation);\n _queueMutationPromise = run.catch(() => {});\n return run;\n}\n\nasync function readCurrentQueueEntries(globalPmRoot: string): Promise<QueuedTelemetryEvent[]> {\n const raw = await readFileIfExists(queuePath(globalPmRoot));\n if (raw === null || raw.trim().length === 0) {\n return [];\n }\n return parseQueueLines(raw);\n}\n\nasync function removeFlushedEntriesFromCurrentQueue(\n globalPmRoot: string,\n flushedIds: ReadonlySet<string>,\n retentionDays: number,\n): Promise<QueuedTelemetryEvent[]> {\n return withQueueMutation(async () => {\n const currentEntries = await readCurrentQueueEntries(globalPmRoot);\n const { entries: retainedEntries } = pruneExpiredQueueEntries(currentEntries, retentionDays);\n const remaining = retainedEntries.filter((entry) => !flushedIds.has(entry.event.event_id));\n await rewriteQueue(globalPmRoot, remaining);\n return remaining;\n });\n}\n\nasync function markFailedEntriesInCurrentQueue(\n globalPmRoot: string,\n failedIds: ReadonlySet<string>,\n attemptTime: string,\n retentionDays: number,\n): Promise<QueuedTelemetryEvent[]> {\n return withQueueMutation(async () => {\n const currentEntries = await readCurrentQueueEntries(globalPmRoot);\n const { entries: retainedEntries } = pruneExpiredQueueEntries(currentEntries, retentionDays);\n const retried = retainedEntries.map((entry) => {\n if (!failedIds.has(entry.event.event_id)) {\n return entry;\n }\n const attempts = entry.attempts + 1;\n return {\n ...entry,\n attempts,\n last_attempt_at: attemptTime,\n next_attempt_after: nextRetryIso(attempts),\n };\n });\n await rewriteQueue(globalPmRoot, retried);\n return retried;\n });\n}\n\nasync function flushQueue(globalPmRoot: string, endpoint: string, retentionDays: number): Promise<void> {\n await cleanupTelemetryQueueTempOrphans(globalPmRoot);\n const normalizedEndpoint = endpoint.trim();\n if (normalizedEndpoint.length === 0) {\n return;\n }\n const raw = await readFileIfExists(queuePath(globalPmRoot));\n if (raw === null || raw.trim().length === 0) {\n await writeRuntimeState(globalPmRoot, {\n endpoint: normalizedEndpoint,\n queue_entries: 0,\n });\n return;\n }\n const queueEntries = parseQueueLines(raw);\n if (queueEntries.length === 0) {\n await writeRuntimeState(globalPmRoot, {\n endpoint: normalizedEndpoint,\n queue_entries: 0,\n });\n return;\n }\n const { entries: retainedEntries, prunedCount } = pruneExpiredQueueEntries(queueEntries, retentionDays);\n if (retainedEntries.length === 0) {\n if (prunedCount > 0) {\n await rewriteQueue(globalPmRoot, []);\n }\n await writeRuntimeState(globalPmRoot, {\n endpoint: normalizedEndpoint,\n queue_entries: 0,\n });\n return;\n }\n const dueEntries = retainedEntries.filter((entry) => isDueForRetry(entry)).slice(0, TELEMETRY_FLUSH_BATCH_SIZE);\n if (dueEntries.length === 0) {\n if (prunedCount > 0) {\n await rewriteQueue(globalPmRoot, retainedEntries);\n }\n await writeRuntimeState(globalPmRoot, {\n endpoint: normalizedEndpoint,\n queue_entries: retainedEntries.length,\n });\n return;\n }\n const dueIds = new Set(dueEntries.map((entry) => entry.event.event_id));\n const attemptTime = nowIso();\n const requestHeaders: Record<string, string> = {\n \"content-type\": \"application/json\",\n };\n const ingestKey = process.env.PM_TELEMETRY_INGEST_KEY?.trim();\n if (ingestKey) {\n requestHeaders[\"x-pm-telemetry-key\"] = ingestKey;\n }\n\n try {\n const response = await fetch(normalizedEndpoint, {\n method: \"POST\",\n headers: requestHeaders,\n body: JSON.stringify({\n schema_version: TELEMETRY_SCHEMA_VERSION,\n events: dueEntries.map((entry) => entry.event),\n }),\n signal: AbortSignal.timeout(TELEMETRY_HTTP_TIMEOUT_MS),\n });\n if (!response.ok) {\n throw new Error(`telemetry_flush_http_${response.status}`);\n }\n } catch (error: unknown) {\n const retried = await markFailedEntriesInCurrentQueue(globalPmRoot, dueIds, attemptTime, retentionDays);\n const errorMessage = (() => {\n if (error instanceof Error) {\n return sanitizeString(error.message, \"redacted\");\n }\n return \"telemetry_flush_failed\";\n })();\n await writeRuntimeState(globalPmRoot, {\n endpoint: normalizedEndpoint,\n queue_entries: retried.length,\n last_attempted_flush_at: attemptTime,\n last_failed_flush_at: attemptTime,\n last_failed_flush_error: errorMessage,\n });\n return;\n }\n\n try {\n const remaining = await removeFlushedEntriesFromCurrentQueue(globalPmRoot, dueIds, retentionDays);\n await writeRuntimeState(globalPmRoot, {\n endpoint: normalizedEndpoint,\n queue_entries: remaining.length,\n last_attempted_flush_at: attemptTime,\n last_successful_flush_at: attemptTime,\n last_failed_flush_at: undefined,\n last_failed_flush_error: undefined,\n });\n } catch (error: unknown) {\n const errorMessage = (() => {\n if (error instanceof Error) {\n return sanitizeString(error.message, \"redacted\");\n }\n return \"telemetry_flush_failed\";\n })();\n const currentEntries = await readCurrentQueueEntries(globalPmRoot).catch(() => retainedEntries);\n await writeRuntimeState(globalPmRoot, {\n endpoint: normalizedEndpoint,\n queue_entries: currentEntries.length,\n last_attempted_flush_at: attemptTime,\n last_failed_flush_at: attemptTime,\n last_failed_flush_error: errorMessage,\n });\n }\n}\n\nasync function acquireTelemetryFlushLock(globalPmRoot: string): Promise<boolean> {\n const lockPath = flushLockPath(globalPmRoot);\n await mkdir(path.dirname(lockPath), { recursive: true });\n try {\n await mkdir(lockPath);\n return true;\n } catch (error: unknown) {\n if (typeof error !== \"object\" || error === null || !(\"code\" in error) || (error as { code?: unknown }).code !== \"EEXIST\") {\n throw error;\n }\n }\n\n try {\n const lockStats = await stat(lockPath);\n if (Date.now() - lockStats.mtimeMs < TELEMETRY_FLUSH_LOCK_STALE_MS) {\n return false;\n }\n await rm(lockPath, { recursive: true, force: true });\n await mkdir(lockPath);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction isFreshDirectoryLock(lockPath: string, staleMs: number): boolean {\n try {\n return Date.now() - statSync(lockPath).mtimeMs < staleMs;\n } catch {\n return false;\n }\n}\n\nfunction removeDirectoryLockBestEffort(lockPath: string): void {\n try {\n rmSync(lockPath, { recursive: true, force: true });\n } catch {\n // Flush scheduling is best effort and must never fail user commands.\n }\n}\n\nfunction errorCode(error: unknown): string | undefined {\n if (typeof error !== \"object\" || error === null || !(\"code\" in error)) {\n return undefined;\n }\n const code = (error as { code?: unknown }).code;\n return typeof code === \"string\" ? code : undefined;\n}\n\nfunction createDirectoryLock(lockPath: string): boolean {\n try {\n mkdirSync(lockPath);\n return true;\n } catch (error: unknown) {\n const code = errorCode(error);\n if (code === \"EEXIST\") {\n return false;\n }\n if (code !== \"ENOENT\") {\n return false;\n }\n }\n\n try {\n mkdirSync(path.dirname(lockPath), { recursive: true });\n mkdirSync(lockPath);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction acquireTelemetryFlushSpawnGate(globalPmRoot: string): boolean {\n if (isFreshDirectoryLock(flushLockPath(globalPmRoot), TELEMETRY_FLUSH_LOCK_STALE_MS)) {\n return false;\n }\n\n const lockPath = flushSpawnLockPath(globalPmRoot);\n try {\n if (Date.now() - statSync(lockPath).mtimeMs < TELEMETRY_FLUSH_SPAWN_LOCK_STALE_MS) {\n return false;\n }\n removeDirectoryLockBestEffort(lockPath);\n } catch (error: unknown) {\n if (errorCode(error) !== \"ENOENT\") {\n return false;\n }\n }\n\n return createDirectoryLock(lockPath);\n}\n\nfunction releaseTelemetryFlushSpawnGate(globalPmRoot: string): void {\n removeDirectoryLockBestEffort(flushSpawnLockPath(globalPmRoot));\n}\n\nexport const _testOnly = {\n acquireTelemetryFlushSpawnGate,\n releaseTelemetryFlushSpawnGate,\n flushLockPath,\n flushSpawnLockPath,\n};\n\nasync function flushQueueWithProcessLock(globalPmRoot: string, endpoint: string, retentionDays: number): Promise<void> {\n const acquired = await acquireTelemetryFlushLock(globalPmRoot);\n releaseTelemetryFlushSpawnGate(globalPmRoot);\n if (!acquired) {\n return;\n }\n try {\n await flushQueue(globalPmRoot, endpoint, retentionDays);\n } finally {\n await rm(flushLockPath(globalPmRoot), { recursive: true, force: true }).catch(() => {});\n }\n}\n\nfunction scheduleTelemetryFlush(globalPmRoot: string, endpoint: string, retentionDays: number): void {\n if (shouldFlushInline()) {\n const previousFlush = _lastFlushPromise;\n const nextFlush = flushQueue(globalPmRoot, endpoint, retentionDays).catch(() => {});\n _lastFlushPromise = Promise.allSettled([previousFlush, nextFlush]).then(() => {});\n return;\n }\n\n try {\n const acquiredSpawnGate = acquireTelemetryFlushSpawnGate(globalPmRoot);\n if (!acquiredSpawnGate) {\n return;\n }\n const child = spawn(process.execPath, [telemetryFlushRunnerPath()], {\n detached: true,\n stdio: \"ignore\",\n env: {\n ...process.env,\n PM_GLOBAL_PATH: globalPmRoot,\n [PM_TELEMETRY_FLUSH_CHILD_ENV]: \"1\",\n },\n });\n child.unref();\n } catch {\n releaseTelemetryFlushSpawnGate(globalPmRoot);\n // Flush scheduling is best effort and must not keep the CLI alive.\n }\n}\n\nexport async function flushTelemetryQueueNow(globalPmRoot = resolveGlobalPmRoot(process.cwd())): Promise<void> {\n if (telemetryDisabledByEnvironment()) {\n return;\n }\n try {\n const settings = await readSettings(globalPmRoot);\n if (!settings.telemetry.enabled) {\n return;\n }\n const { endpoint, retentionDays } = await ensureInstallationId(globalPmRoot);\n await flushQueueWithProcessLock(globalPmRoot, endpoint, retentionDays);\n } catch {\n // Telemetry workers are best effort and must never fail user commands.\n }\n}\n\nexport async function startTelemetryCommand(context: TelemetryCommandContext): Promise<ActiveTelemetryCommand | null> {\n if (telemetryDisabledByEnvironment()) {\n return null;\n }\n if (\n context.command === \"telemetry\" &&\n context.args.some((token) => token.trim().toLowerCase() === \"clear\")\n ) {\n return null;\n }\n try {\n const globalPmRoot = resolveGlobalPmRoot(process.cwd());\n const settings = await readSettings(globalPmRoot);\n if (!settings.telemetry.enabled) {\n return null;\n }\n const captureLevel = normalizeCaptureLevel(settings.telemetry.capture_level);\n const { installationId, endpoint, retentionDays } = await ensureInstallationId(globalPmRoot);\n const pmVersion = normalizePmVersion(context.pm_version);\n const sourceContext = resolveTelemetrySourceContext(context.global);\n const pmRootHash = hashWithInstallationId(installationId, context.pm_root);\n const cwdHash = hashWithInstallationId(installationId, process.cwd());\n const otelTracesEndpoint = resolveOtelTracesEndpoint();\n const occurredAt = nowIso();\n const event: TelemetryEvent = {\n schema_version: TELEMETRY_SCHEMA_VERSION,\n event_id: crypto.randomUUID(),\n event_type: \"command_start\",\n occurred_at: occurredAt,\n installation_id: installationId,\n session_id: PROCESS_SESSION_ID,\n command: context.command,\n payload: buildCommandStartPayload({\n captureLevel,\n context,\n pmVersion,\n sourceContext,\n pmRootHash,\n cwdHash,\n installationId,\n }),\n };\n await enqueueTelemetryEvent(globalPmRoot, event);\n scheduleTelemetryFlush(globalPmRoot, endpoint, retentionDays);\n const commandTaxonomy = deriveTelemetryCommandTaxonomy(context.command);\n return {\n started_at: occurredAt,\n started_at_ms: Date.now(),\n command: context.command,\n command_taxonomy: commandTaxonomy,\n pm_version: pmVersion,\n source_context: sourceContext.source_context,\n source_context_source: sourceContext.source_context_source,\n installation_id: installationId,\n pm_root_hash: pmRootHash,\n cwd_hash: cwdHash,\n endpoint,\n retention_days: retentionDays,\n global_pm_root: globalPmRoot,\n capture_level: captureLevel,\n otel_traces_endpoint: otelTracesEndpoint ?? undefined,\n otel_trace_id: otelTracesEndpoint ? crypto.randomBytes(16).toString(\"hex\") : undefined,\n otel_span_id: otelTracesEndpoint ? crypto.randomBytes(8).toString(\"hex\") : undefined,\n };\n } catch {\n // Telemetry must never block command execution.\n return null;\n }\n}\n\nexport async function finishTelemetryCommand(\n activeCommand: ActiveTelemetryCommand | null,\n outcome: TelemetryCommandOutcome,\n): Promise<void> {\n if (!activeCommand) {\n return;\n }\n try {\n const finishedAt = nowIso();\n const durationMs = Math.max(0, Date.now() - activeCommand.started_at_ms);\n const normalizedErrorCode = normalizeTelemetryErrorCode(\n inferTelemetryErrorCode({\n ok: outcome.ok,\n errorCode: outcome.error_code,\n errorMessage: outcome.error,\n exitCode: outcome.exit_code,\n }),\n );\n const normalizedErrorCategory = normalizeTelemetryErrorCategory({\n ok: outcome.ok,\n errorCode: normalizedErrorCode,\n errorCategory: outcome.error_category,\n });\n const normalizedExitCode = normalizeTelemetryExitCode(outcome.exit_code, outcome.ok);\n const commandResolution =\n outcome.command_resolution ??\n deriveTelemetryCommandResolution({\n ok: outcome.ok,\n errorCode: normalizedErrorCode,\n errorCategory: normalizedErrorCategory,\n });\n const resolutionStage = outcome.resolution_stage ?? \"execute\";\n const event: TelemetryEvent = {\n schema_version: TELEMETRY_SCHEMA_VERSION,\n event_id: crypto.randomUUID(),\n event_type: \"command_finish\",\n occurred_at: finishedAt,\n installation_id: activeCommand.installation_id,\n session_id: PROCESS_SESSION_ID,\n command: activeCommand.command,\n payload: buildCommandFinishPayload({\n captureLevel: activeCommand.capture_level,\n pmVersion: activeCommand.pm_version,\n sourceContext: {\n source_context: activeCommand.source_context,\n source_context_source: activeCommand.source_context_source,\n },\n outcome,\n durationMs,\n startedAt: activeCommand.started_at,\n command: activeCommand.command,\n installationId: activeCommand.installation_id,\n commandTaxonomy: activeCommand.command_taxonomy,\n exitCode: normalizedExitCode,\n errorCode: normalizedErrorCode,\n errorCategory: normalizedErrorCategory,\n commandResolution,\n resolutionStage,\n }),\n };\n await enqueueTelemetryEvent(activeCommand.global_pm_root, event);\n scheduleTelemetryFlush(activeCommand.global_pm_root, activeCommand.endpoint, activeCommand.retention_days);\n void exportLocalOtelSpan(\n activeCommand,\n {\n ...outcome,\n exit_code: normalizedExitCode,\n error_code: normalizedErrorCode,\n error_category: normalizedErrorCategory,\n },\n finishedAt,\n durationMs,\n ).catch(() => {});\n } catch {\n // Telemetry must never block command execution.\n }\n}\n\nexport async function emitTelemetryErrorEvent(context: TelemetryErrorEventContext): Promise<void> {\n if (telemetryDisabledByEnvironment()) {\n return;\n }\n try {\n const globalPmRoot = resolveGlobalPmRoot(process.cwd());\n const settings = await readSettings(globalPmRoot);\n if (!settings.telemetry.enabled) {\n return;\n }\n const captureLevel = normalizeCaptureLevel(settings.telemetry.capture_level);\n const { installationId, endpoint, retentionDays } = await ensureInstallationId(globalPmRoot);\n const pmVersion = normalizePmVersion(context.pm_version);\n const sourceContext = resolveTelemetrySourceContext(context.global);\n const pmRootHash = hashWithInstallationId(installationId, context.pm_root);\n const cwdHash = hashWithInstallationId(installationId, process.cwd());\n const occurredAt = nowIso();\n const normalizedErrorCode =\n normalizeTelemetryErrorCode(\n inferTelemetryErrorCode({\n ok: false,\n errorCode: context.error_code,\n errorMessage: context.error_message,\n exitCode: context.exit_code,\n }),\n ) ?? \"unknown_error\";\n const normalizedErrorCategory =\n context.error_category ?? resolveTelemetryErrorCategory(normalizedErrorCode);\n const normalizedExitCode = normalizeTelemetryExitCode(context.exit_code, false);\n const normalizedCommand = context.command.trim().length > 0 ? context.command : \"<unknown>\";\n const commandTaxonomy = deriveTelemetryCommandTaxonomy(normalizedCommand);\n const commandResolution =\n context.command_resolution ??\n deriveTelemetryCommandResolution({\n ok: false,\n errorCode: normalizedErrorCode,\n errorCategory: normalizedErrorCategory,\n });\n const resolutionStage = context.resolution_stage ?? \"unknown\";\n\n const event: TelemetryEvent = {\n schema_version: TELEMETRY_SCHEMA_VERSION,\n event_id: crypto.randomUUID(),\n event_type: \"command_error\",\n occurred_at: occurredAt,\n installation_id: installationId,\n session_id: PROCESS_SESSION_ID,\n command: sanitizeString(normalizedCommand, \"redacted\"),\n payload: buildCommandErrorPayload({\n captureLevel,\n pmVersion,\n sourceContext,\n command: normalizedCommand,\n commandTaxonomy,\n commandResolution,\n resolutionStage,\n args: context.args,\n options: context.options,\n pmRootHash,\n cwdHash,\n installationId,\n errorCode: normalizedErrorCode,\n errorCategory: normalizedErrorCategory,\n exitCode: normalizedExitCode,\n errorMessage: context.error_message,\n }),\n };\n await enqueueTelemetryEvent(globalPmRoot, event);\n scheduleTelemetryFlush(globalPmRoot, endpoint, retentionDays);\n } catch {\n // Telemetry must never block command execution.\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,sBAAsB,oBAAI,IAAI,CAAC,QAAQ,UAAU,cAAc,uBAAuB,mBAAmB,kBAAkB,CAAC;AAClI,IAAM,sBAAsB,oBAAI,IAAI;EAClC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD,IAAM,yBAAyB,oBAAI,IAAI;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD,IAAM,wBAAwB,oBAAI,IAAI,CAAC,QAAQ,YAAY,aAAa,eAAe,cAAc,WAAW,CAAC;AACjH,IAAM,4BAA4B,oBAAI,IAAI,CAAC,UAAU,YAAY,aAAa,WAAW,MAAM,aAAa,kBAAkB,CAAC;AAE/H,SAAS,qBAAqB,aAAmB;AAC/C,SAAO,YACJ,KAAI,EACJ,WAAW,QAAQ,GAAG,EACtB,YAAW;AAChB;AAEA,SAAS,mBAAmBA,YAA6B;AACvD,QAAM,aAAaA,YAAW,KAAI,EAAG,YAAW;AAChD,SAAO,cAAc,WAAW,SAAS,IAAI,aAAa;AAC5D;AAEM,SAAU,+BAA+B,aAAmB;AAChE,QAAM,iBAAiB,qBAAqB,WAAW;AACvD,QAAM,SAAS,eAAe,SAAS,IAAI,eAAe,MAAM,GAAG,IAAI,CAAC,WAAW;AACnF,QAAM,OAAO,OAAO,CAAC,KAAK;AAC1B,QAAM,OAAO,OAAO,OAAO,SAAS,CAAC,KAAK;AAE1C,MAAI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