@unbrained/pm-cli 2026.7.6 → 2026.7.7

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 (666) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/cli/commands/annotation-command.d.ts +1 -0
  3. package/dist/cli/commands/annotation-command.js +29 -2
  4. package/dist/cli/commands/annotation-command.js.map +1 -1
  5. package/dist/cli/commands/comments.js +3 -4
  6. package/dist/cli/commands/comments.js.map +1 -1
  7. package/dist/cli/commands/extension/bundled-catalog.d.ts +3 -0
  8. package/dist/cli/commands/extension/bundled-catalog.js +38 -28
  9. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  10. package/dist/cli/commands/extension/install-sources.js +81 -18
  11. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  12. package/dist/cli/commands/health.js +9 -5
  13. package/dist/cli/commands/health.js.map +1 -1
  14. package/dist/cli/commands/learnings.js +5 -3
  15. package/dist/cli/commands/learnings.js.map +1 -1
  16. package/dist/cli/commands/notes.js +5 -3
  17. package/dist/cli/commands/notes.js.map +1 -1
  18. package/dist/cli/commands/reindex.js +4 -3
  19. package/dist/cli/commands/reindex.js.map +1 -1
  20. package/dist/cli/commands/search.js +3 -3
  21. package/dist/cli/commands/search.js.map +1 -1
  22. package/dist/cli/commands/test.d.ts +9 -0
  23. package/dist/cli/commands/test.js +144 -105
  24. package/dist/cli/commands/test.js.map +1 -1
  25. package/dist/cli/extension-command-help.js +10 -2
  26. package/dist/cli/extension-command-help.js.map +1 -1
  27. package/dist/cli/register-list-query.d.ts +1 -1
  28. package/dist/cli/register-list-query.js +18 -27
  29. package/dist/cli/register-list-query.js.map +1 -1
  30. package/dist/cli/register-operations.d.ts +0 -8
  31. package/dist/cli/register-operations.js +41 -46
  32. package/dist/cli/register-operations.js.map +1 -1
  33. package/dist/cli/register-setup.js +113 -13
  34. package/dist/cli/register-setup.js.map +1 -1
  35. package/dist/cli/registration-helpers.d.ts +5 -1
  36. package/dist/cli/registration-helpers.js +14 -2
  37. package/dist/cli/registration-helpers.js.map +1 -1
  38. package/dist/cli-bundle/chunks/append-F7WPGIQL.js +11 -0
  39. package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js → append-PVCTBVJG.js} +8 -9
  40. package/dist/cli-bundle/chunks/{chunk-EGAP5OWD.js → chunk-2APXX4TZ.js} +16 -14
  41. package/dist/cli-bundle/chunks/chunk-2APXX4TZ.js.map +1 -0
  42. package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js → chunk-2LEJGRQ7.js} +2 -2
  43. package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js → chunk-2TILG6F2.js} +3 -3
  44. package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js → chunk-3G6UMXT3.js} +6 -8
  45. package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js.map → chunk-3G6UMXT3.js.map} +1 -1
  46. package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js → chunk-3TYOW6RR.js} +8 -8
  47. package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js → chunk-3X542TEY.js} +7 -7
  48. package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js → chunk-42LXP4VO.js} +12 -16
  49. package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js.map → chunk-42LXP4VO.js.map} +1 -1
  50. package/dist/cli-bundle/chunks/{chunk-CL36D4PC.js → chunk-43SIHQND.js} +36 -15
  51. package/dist/cli-bundle/chunks/chunk-43SIHQND.js.map +7 -0
  52. package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js → chunk-43UQN754.js} +10 -14
  53. package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js.map → chunk-43UQN754.js.map} +1 -1
  54. package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js → chunk-43YSKY75.js} +4 -6
  55. package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js.map → chunk-43YSKY75.js.map} +1 -1
  56. package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js → chunk-4BKDAEDF.js} +5 -5
  57. package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js.map → chunk-4BKDAEDF.js.map} +2 -2
  58. package/dist/cli-bundle/chunks/{chunk-4LELACOL.js → chunk-4IQKDKGE.js} +15 -23
  59. package/dist/cli-bundle/chunks/{chunk-4LELACOL.js.map → chunk-4IQKDKGE.js.map} +1 -1
  60. package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js → chunk-4MZOKTI2.js} +6 -8
  61. package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js.map → chunk-4MZOKTI2.js.map} +1 -1
  62. package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js → chunk-52NS7JDP.js} +14 -20
  63. package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js.map → chunk-52NS7JDP.js.map} +1 -1
  64. package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js → chunk-565WYS5W.js} +12 -16
  65. package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js.map → chunk-565WYS5W.js.map} +1 -1
  66. package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js → chunk-5FIQ4EX3.js} +12 -18
  67. package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js.map → chunk-5FIQ4EX3.js.map} +1 -1
  68. package/dist/cli-bundle/chunks/{chunk-DMRNBQOI.js → chunk-6G6O3OPQ.js} +256 -36
  69. package/dist/cli-bundle/chunks/chunk-6G6O3OPQ.js.map +1 -0
  70. package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js → chunk-6LCJRGPD.js} +9 -13
  71. package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js.map → chunk-6LCJRGPD.js.map} +1 -1
  72. package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js → chunk-6UQCNWFV.js} +6 -8
  73. package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js.map → chunk-6UQCNWFV.js.map} +1 -1
  74. package/dist/cli-bundle/chunks/{chunk-ZSUS2OD3.js → chunk-6XTSYPPO.js} +1216 -387
  75. package/dist/cli-bundle/chunks/chunk-6XTSYPPO.js.map +7 -0
  76. package/dist/cli-bundle/chunks/chunk-7ML7JONU.js +5434 -0
  77. package/dist/cli-bundle/chunks/chunk-7ML7JONU.js.map +1 -0
  78. package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js → chunk-7PNQA24K.js} +30 -36
  79. package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js.map → chunk-7PNQA24K.js.map} +1 -1
  80. package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js → chunk-7VQ3JJN5.js} +2 -2
  81. package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js → chunk-7Y5N34HX.js} +8 -12
  82. package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js.map → chunk-7Y5N34HX.js.map} +1 -1
  83. package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js → chunk-AGAVEDIE.js} +7 -7
  84. package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js → chunk-AJUON7E6.js} +3 -3
  85. package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js → chunk-ARKHKYYS.js} +13 -21
  86. package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js.map → chunk-ARKHKYYS.js.map} +1 -1
  87. package/dist/cli-bundle/chunks/{chunk-46CUF5L6.js → chunk-C5ACVMOI.js} +99 -51
  88. package/dist/cli-bundle/chunks/chunk-C5ACVMOI.js.map +7 -0
  89. package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js → chunk-CJQM7O7R.js} +16 -20
  90. package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js.map → chunk-CJQM7O7R.js.map} +1 -1
  91. package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js → chunk-D2DCTFTL.js} +10 -12
  92. package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js.map → chunk-D2DCTFTL.js.map} +1 -1
  93. package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js → chunk-DDDWVPID.js} +8 -10
  94. package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js.map → chunk-DDDWVPID.js.map} +1 -1
  95. package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js → chunk-DG6BSXZ7.js} +5 -5
  96. package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js.map → chunk-DG6BSXZ7.js.map} +2 -2
  97. package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js → chunk-DR2V5OIV.js} +3 -3
  98. package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js → chunk-E3LWJUGF.js} +4 -6
  99. package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js.map → chunk-E3LWJUGF.js.map} +1 -1
  100. package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js → chunk-E3YQFSFE.js} +6 -10
  101. package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js.map → chunk-E3YQFSFE.js.map} +1 -1
  102. package/dist/cli-bundle/chunks/{chunk-XG625QP4.js → chunk-EDO7VXSO.js} +2 -2
  103. package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js → chunk-EIUBK2LT.js} +12 -18
  104. package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js.map → chunk-EIUBK2LT.js.map} +1 -1
  105. package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js → chunk-EMXPI36L.js} +14 -20
  106. package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js.map → chunk-EMXPI36L.js.map} +1 -1
  107. package/dist/cli-bundle/chunks/{chunk-MLIYFOE7.js → chunk-EOUVR7JN.js} +12 -8
  108. package/dist/cli-bundle/chunks/chunk-EOUVR7JN.js.map +1 -0
  109. package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js → chunk-EVEPHNXJ.js} +4 -4
  110. package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js → chunk-F6MT7KKE.js} +4 -6
  111. package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js.map → chunk-F6MT7KKE.js.map} +1 -1
  112. package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js → chunk-F6YC2A6X.js} +7 -11
  113. package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js.map → chunk-F6YC2A6X.js.map} +1 -1
  114. package/dist/cli-bundle/chunks/chunk-FILL6BB2.js +5514 -0
  115. package/dist/cli-bundle/chunks/chunk-FILL6BB2.js.map +7 -0
  116. package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js → chunk-FN6SB4HU.js} +2 -2
  117. package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js +5359 -0
  118. package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js.map +1 -0
  119. package/dist/cli-bundle/chunks/{chunk-EKFNL33R.js → chunk-GLS6VMWI.js} +37 -16
  120. package/dist/cli-bundle/chunks/chunk-GLS6VMWI.js.map +1 -0
  121. package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js → chunk-GPIDUMMN.js} +9 -11
  122. package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js.map → chunk-GPIDUMMN.js.map} +1 -1
  123. package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js → chunk-GTM5HQL4.js} +11 -15
  124. package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js.map → chunk-GTM5HQL4.js.map} +1 -1
  125. package/dist/cli-bundle/chunks/{chunk-24YG75HI.js → chunk-H2SMKL2N.js} +8 -8
  126. package/dist/cli-bundle/chunks/{chunk-QLMX7SRD.js → chunk-HHEWQXPD.js} +6 -6
  127. package/dist/cli-bundle/chunks/chunk-HHEWQXPD.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js → chunk-HX6QXV5P.js} +2 -2
  129. package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js → chunk-I74FMIWA.js} +10 -16
  130. package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js.map → chunk-I74FMIWA.js.map} +1 -1
  131. package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js → chunk-IDIBF4E2.js} +20 -24
  132. package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js.map → chunk-IDIBF4E2.js.map} +1 -1
  133. package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js → chunk-II7R6KD4.js} +8 -7
  134. package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js.map → chunk-II7R6KD4.js.map} +1 -1
  135. package/dist/cli-bundle/chunks/chunk-J2VGADNG.js +10320 -0
  136. package/dist/cli-bundle/chunks/chunk-J2VGADNG.js.map +1 -0
  137. package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js → chunk-J7BOLHAV.js} +5 -7
  138. package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js.map → chunk-J7BOLHAV.js.map} +1 -1
  139. package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js → chunk-KTGJ2CBU.js} +4 -6
  140. package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js.map → chunk-KTGJ2CBU.js.map} +1 -1
  141. package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js → chunk-LCFJ7XAM.js} +22 -2
  142. package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js.map → chunk-LCFJ7XAM.js.map} +3 -3
  143. package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js → chunk-LZQU6XJG.js} +28 -34
  144. package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js.map → chunk-LZQU6XJG.js.map} +1 -1
  145. package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js → chunk-M62RO3XK.js} +10 -14
  146. package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js.map → chunk-M62RO3XK.js.map} +1 -1
  147. package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js → chunk-MCEUKJKW.js} +12 -14
  148. package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js.map → chunk-MCEUKJKW.js.map} +1 -1
  149. package/dist/cli-bundle/chunks/{chunk-TKD5VCTD.js → chunk-MHNMCDWR.js} +343 -195
  150. package/dist/cli-bundle/chunks/chunk-MHNMCDWR.js.map +1 -0
  151. package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js → chunk-MRFWUSVA.js} +4 -6
  152. package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js.map → chunk-MRFWUSVA.js.map} +1 -1
  153. package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js → chunk-N6ZHDLUY.js} +6 -8
  154. package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js.map → chunk-N6ZHDLUY.js.map} +1 -1
  155. package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js → chunk-NWWL22C7.js} +7 -9
  156. package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js.map → chunk-NWWL22C7.js.map} +1 -1
  157. package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js → chunk-P3MJJW7P.js} +2 -2
  158. package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js → chunk-PDXJXEZJ.js} +2 -2
  159. package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js → chunk-Q64AYQYW.js} +10 -12
  160. package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js.map → chunk-Q64AYQYW.js.map} +1 -1
  161. package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js → chunk-QDABF2RB.js} +26 -34
  162. package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js.map → chunk-QDABF2RB.js.map} +1 -1
  163. package/dist/cli-bundle/chunks/{chunk-TULGS6X6.js → chunk-QFBSP3NI.js} +529 -46
  164. package/dist/cli-bundle/chunks/chunk-QFBSP3NI.js.map +1 -0
  165. package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js → chunk-RB3KLPAH.js} +10 -14
  166. package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js.map → chunk-RB3KLPAH.js.map} +1 -1
  167. package/dist/cli-bundle/chunks/{chunk-3VHSI5FL.js → chunk-RY7PTTUB.js} +94 -53
  168. package/dist/cli-bundle/chunks/chunk-RY7PTTUB.js.map +1 -0
  169. package/dist/cli-bundle/chunks/{chunk-COSPOP7H.js → chunk-S547WBYG.js} +343 -195
  170. package/dist/cli-bundle/chunks/chunk-S547WBYG.js.map +7 -0
  171. package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js → chunk-S5BNGFN5.js} +24 -32
  172. package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js.map → chunk-S5BNGFN5.js.map} +1 -1
  173. package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js → chunk-S6VC2A2K.js} +8 -12
  174. package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js.map → chunk-S6VC2A2K.js.map} +1 -1
  175. package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js → chunk-SIM5JDON.js} +6 -6
  176. package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js.map → chunk-SIM5JDON.js.map} +1 -1
  177. package/dist/cli-bundle/chunks/{chunk-VPIM42PC.js → chunk-SY75LYXR.js} +11 -7
  178. package/dist/cli-bundle/chunks/chunk-SY75LYXR.js.map +7 -0
  179. package/dist/cli-bundle/chunks/{chunk-K46RF36U.js → chunk-TEISGNSH.js} +7 -7
  180. package/dist/cli-bundle/chunks/chunk-TEISGNSH.js.map +1 -0
  181. package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js → chunk-TEKZOS7M.js} +2 -2
  182. package/dist/cli-bundle/chunks/{chunk-W572BIEB.js → chunk-TGUK6XN6.js} +14 -18
  183. package/dist/cli-bundle/chunks/{chunk-W572BIEB.js.map → chunk-TGUK6XN6.js.map} +1 -1
  184. package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js → chunk-TNC6MZUD.js} +8 -12
  185. package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js.map → chunk-TNC6MZUD.js.map} +1 -1
  186. package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js +10498 -0
  187. package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js.map +7 -0
  188. package/dist/cli-bundle/chunks/{chunk-57NWPFF2.js → chunk-UO7XAZK6.js} +17 -4
  189. package/dist/cli-bundle/chunks/chunk-UO7XAZK6.js.map +1 -0
  190. package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js → chunk-V5ZWKJNY.js} +2 -2
  191. package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js → chunk-VGO73OCK.js} +6 -6
  192. package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js.map → chunk-VGO73OCK.js.map} +1 -1
  193. package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js → chunk-VLEA2UTQ.js} +2 -2
  194. package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js → chunk-W5HXHC7C.js} +7 -9
  195. package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js.map → chunk-W5HXHC7C.js.map} +1 -1
  196. package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js → chunk-WCWVEXGA.js} +2 -2
  197. package/dist/cli-bundle/chunks/chunk-X47MKQXU.js +6690 -0
  198. package/dist/cli-bundle/chunks/chunk-X47MKQXU.js.map +7 -0
  199. package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js → chunk-XBX5CBRQ.js} +5 -7
  200. package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js.map → chunk-XBX5CBRQ.js.map} +1 -1
  201. package/dist/cli-bundle/chunks/{chunk-SCUR7K7N.js → chunk-XC3X7BQR.js} +541 -44
  202. package/dist/cli-bundle/chunks/chunk-XC3X7BQR.js.map +7 -0
  203. package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js → chunk-XHCVAZGM.js} +13 -17
  204. package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js.map → chunk-XHCVAZGM.js.map} +1 -1
  205. package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js → chunk-XPMXPR7K.js} +7 -9
  206. package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js.map → chunk-XPMXPR7K.js.map} +1 -1
  207. package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js → chunk-XS2TMNXR.js} +6 -8
  208. package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js.map → chunk-XS2TMNXR.js.map} +1 -1
  209. package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js → chunk-XXIYUTLK.js} +10 -14
  210. package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js.map → chunk-XXIYUTLK.js.map} +1 -1
  211. package/dist/cli-bundle/chunks/{chunk-EOKXK3R3.js → chunk-XZWL7VNE.js} +1220 -398
  212. package/dist/cli-bundle/chunks/chunk-XZWL7VNE.js.map +1 -0
  213. package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js +6624 -0
  214. package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js → chunk-Y7KYVCZM.js} +12 -18
  216. package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js.map → chunk-Y7KYVCZM.js.map} +1 -1
  217. package/dist/cli-bundle/chunks/{chunk-VIIUS6N6.js → chunk-YCVWWIKY.js} +16 -14
  218. package/dist/cli-bundle/chunks/chunk-YCVWWIKY.js.map +7 -0
  219. package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js → chunk-YH5NBDFA.js} +22 -26
  220. package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js.map → chunk-YH5NBDFA.js.map} +1 -1
  221. package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js +5509 -0
  222. package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js.map +7 -0
  223. package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js → chunk-YPD7SQ5P.js} +7 -6
  224. package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js.map → chunk-YPD7SQ5P.js.map} +2 -2
  225. package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js → chunk-YPMZMKN7.js} +2 -2
  226. package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js → chunk-YTD5GICJ.js} +4 -4
  227. package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js → chunk-ZNEG2UDO.js} +261 -34
  228. package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js.map → chunk-ZNEG2UDO.js.map} +4 -4
  229. package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js → chunk-ZO7CLOY2.js} +3 -3
  230. package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js → close-3YYQ5OG2.js} +5 -9
  231. package/dist/cli-bundle/chunks/close-Z3Q4U7TS.js +12 -0
  232. package/dist/cli-bundle/chunks/close-many-3L2RXH3M.js +22 -0
  233. package/dist/cli-bundle/chunks/close-many-D366FTIG.js +26 -0
  234. package/dist/cli-bundle/chunks/comments-54XDJNFE.js +17 -0
  235. package/dist/cli-bundle/chunks/comments-HGHC2PN6.js +13 -0
  236. package/dist/cli-bundle/chunks/{copy-32ROBIDL.js → copy-44RT5GDW.js} +4 -8
  237. package/dist/cli-bundle/chunks/copy-UGMUGHZA.js +9 -0
  238. package/dist/cli-bundle/chunks/{create-E77SDCUP.js → create-4GWJWPXG.js} +9 -14
  239. package/dist/cli-bundle/chunks/create-AZXCUYKP.js +25 -0
  240. package/dist/cli-bundle/chunks/delete-Y6SXIQ4X.js +10 -0
  241. package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js → delete-YQ2VPXNF.js} +4 -8
  242. package/dist/cli-bundle/chunks/{deps-32SU7HO5.js → deps-BU5EBJDU.js} +4 -8
  243. package/dist/cli-bundle/chunks/deps-FMANWFRP.js +13 -0
  244. package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js → docs-OQBSJNIA.js} +6 -10
  245. package/dist/cli-bundle/chunks/docs-VNPBZXEL.js +14 -0
  246. package/dist/cli-bundle/chunks/files-72HZEBOE.js +18 -0
  247. package/dist/cli-bundle/chunks/{files-PYKR2UUG.js → files-HTSB2KJG.js} +6 -10
  248. package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js → focus-FOG4ALC2.js} +7 -9
  249. package/dist/cli-bundle/chunks/focus-SUTMKXGX.js +10 -0
  250. package/dist/cli-bundle/chunks/{history-compact-3MNXLKAT.js → history-compact-M6IFAMBP.js} +9 -13
  251. package/dist/cli-bundle/chunks/history-compact-NEXRPP2O.js +21 -0
  252. package/dist/cli-bundle/chunks/{history-redact-P6DYF55G.js → history-redact-NQX3OGZP.js} +7 -11
  253. package/dist/cli-bundle/chunks/history-redact-WQJBZ3PX.js +17 -0
  254. package/dist/cli-bundle/chunks/history-repair-CBHMHAJO.js +19 -0
  255. package/dist/cli-bundle/chunks/{history-repair-ZJQFMWPD.js → history-repair-NHOJG7WO.js} +9 -13
  256. package/dist/cli-bundle/chunks/learnings-M64NTSOR.js +13 -0
  257. package/dist/cli-bundle/chunks/{append-BGML6VLD.js → learnings-T63JGKKN.js} +9 -11
  258. package/dist/cli-bundle/chunks/notes-73WE2UV2.js +13 -0
  259. package/dist/cli-bundle/chunks/notes-U7L6HQQ2.js +17 -0
  260. package/dist/cli-bundle/chunks/plan-OSCNYFGC.js +24 -0
  261. package/dist/cli-bundle/chunks/{plan-CHVE7PBR.js → plan-TN537L24.js} +10 -15
  262. package/dist/cli-bundle/chunks/{profile-ZXGSKBJD.js → profile-MHAMXMHQ.js} +9 -13
  263. package/dist/cli-bundle/chunks/{profile-LD23PSI6.js → profile-TIGLAKJ7.js} +9 -13
  264. package/dist/cli-bundle/chunks/{register-list-query-OEYQHFXO.js → register-list-query-OHXD7G5N.js} +41 -33
  265. package/dist/cli-bundle/chunks/register-list-query-OHXD7G5N.js.map +7 -0
  266. package/dist/cli-bundle/chunks/{register-list-query-B42JCCOI.js → register-list-query-ZCRABAPN.js} +42 -34
  267. package/dist/cli-bundle/chunks/register-list-query-ZCRABAPN.js.map +1 -0
  268. package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js → register-mutation-P3G4XP6Q.js} +36 -41
  269. package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js.map → register-mutation-P3G4XP6Q.js.map} +1 -1
  270. package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js → register-mutation-XX4H56PE.js} +34 -39
  271. package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js.map → register-mutation-XX4H56PE.js.map} +1 -1
  272. package/dist/cli-bundle/chunks/{chunk-5BMM6XQY.js → register-operations-V6PIYEDU.js} +79 -46
  273. package/dist/cli-bundle/chunks/register-operations-V6PIYEDU.js.map +1 -0
  274. package/dist/cli-bundle/chunks/{chunk-Z3U3U5KD.js → register-operations-V6VKTG54.js} +78 -45
  275. package/dist/cli-bundle/chunks/register-operations-V6VKTG54.js.map +7 -0
  276. package/dist/cli-bundle/chunks/{register-setup-3ZVVX2VN.js → register-setup-6RVAWT6W.js} +129 -29
  277. package/dist/cli-bundle/chunks/register-setup-6RVAWT6W.js.map +7 -0
  278. package/dist/cli-bundle/chunks/{register-setup-Q6KFNIOZ.js → register-setup-6YVUSQYD.js} +130 -30
  279. package/dist/cli-bundle/chunks/register-setup-6YVUSQYD.js.map +1 -0
  280. package/dist/cli-bundle/chunks/{restore-5RQHAPMA.js → restore-HC3YSWF7.js} +7 -11
  281. package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js +15 -0
  282. package/dist/cli-bundle/chunks/{schema-HBORFC6B.js → schema-DAGSYO6E.js} +6 -10
  283. package/dist/cli-bundle/chunks/{schema-245WW4G2.js → schema-UBXJCQAC.js} +6 -10
  284. package/dist/cli-bundle/chunks/update-CJGG5WMV.js +21 -0
  285. package/dist/cli-bundle/chunks/update-LKD64AFP.js +25 -0
  286. package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js +31 -0
  287. package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js +35 -0
  288. package/dist/cli-bundle/main.js +29 -31
  289. package/dist/cli-bundle/main.js.map +2 -2
  290. package/dist/cli-bundle/sdk-runtime.js +129 -107
  291. package/dist/cli-bundle/sdk-testing.js +7 -8
  292. package/dist/cli-bundle/sdk.js +122 -117
  293. package/dist/cli-bundle/sdk.js.map +2 -2
  294. package/dist/core/history/drift-scan.js +3 -8
  295. package/dist/core/history/drift-scan.js.map +1 -1
  296. package/dist/core/output/mutation-projection.js +11 -5
  297. package/dist/core/output/mutation-projection.js.map +1 -1
  298. package/dist/core/search/cache.js +3 -3
  299. package/dist/core/search/cache.js.map +1 -1
  300. package/dist/core/search/semantic-defaults.d.ts +2 -0
  301. package/dist/core/search/semantic-defaults.js +11 -4
  302. package/dist/core/search/semantic-defaults.js.map +1 -1
  303. package/dist/core/search/vector-stores.d.ts +1 -1
  304. package/dist/core/search/vector-stores.js +33 -7
  305. package/dist/core/search/vector-stores.js.map +1 -1
  306. package/dist/mcp/server.d.ts +1 -1
  307. package/dist/sdk/cli-contracts/flag-contracts.js +7 -7
  308. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  309. package/dist/sdk/cli-contracts/tool-schema.js +9 -7
  310. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  311. package/dist/sdk/index.d.ts +1 -1
  312. package/dist/sdk/index.js +3 -3
  313. package/dist/sdk/index.js.map +1 -1
  314. package/dist/sdk/runtime.d.ts +151 -8
  315. package/dist/sdk/runtime.js +255 -14
  316. package/dist/sdk/runtime.js.map +1 -1
  317. package/dist/sdk/start-task-status.d.ts +13 -0
  318. package/dist/sdk/start-task-status.js +19 -0
  319. package/dist/sdk/start-task-status.js.map +1 -0
  320. package/docs/COMMANDS.md +10 -1
  321. package/docs/SDK.md +35 -0
  322. package/docs/TESTING.md +3 -0
  323. package/package.json +1 -1
  324. package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +0 -18
  325. package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +0 -22
  326. package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +0 -25
  327. package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +0 -21
  328. package/dist/cli-bundle/chunks/append-RKJYPU74.js +0 -15
  329. package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +0 -218
  330. package/dist/cli-bundle/chunks/chunk-2XG4IZON.js.map +0 -7
  331. package/dist/cli-bundle/chunks/chunk-37E72CNS.js +0 -217
  332. package/dist/cli-bundle/chunks/chunk-37E72CNS.js.map +0 -1
  333. package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js +0 -228
  334. package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js.map +0 -1
  335. package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +0 -2330
  336. package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js.map +0 -7
  337. package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js.map +0 -1
  338. package/dist/cli-bundle/chunks/chunk-425E4QL5.js +0 -278
  339. package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +0 -7
  340. package/dist/cli-bundle/chunks/chunk-46CUF5L6.js.map +0 -7
  341. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +0 -87
  342. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +0 -7
  343. package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js +0 -249
  344. package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +0 -7
  345. package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +0 -819
  346. package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js.map +0 -1
  347. package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +0 -279
  348. package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +0 -1
  349. package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +0 -1
  350. package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +0 -268
  351. package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +0 -1
  352. package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +0 -1
  353. package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +0 -1868
  354. package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js.map +0 -7
  355. package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +0 -1749
  356. package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js.map +0 -7
  357. package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +0 -1961
  358. package/dist/cli-bundle/chunks/chunk-64YKRTSV.js.map +0 -1
  359. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +0 -23
  360. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +0 -7
  361. package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js +0 -421
  362. package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +0 -1
  363. package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +0 -1985
  364. package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js.map +0 -7
  365. package/dist/cli-bundle/chunks/chunk-CL36D4PC.js.map +0 -7
  366. package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +0 -7
  367. package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +0 -3461
  368. package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +0 -7
  369. package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +0 -1858
  370. package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js.map +0 -1
  371. package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +0 -1
  372. package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +0 -1932
  373. package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js.map +0 -1
  374. package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +0 -1
  375. package/dist/cli-bundle/chunks/chunk-EKFNL33R.js.map +0 -1
  376. package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +0 -1704
  377. package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js.map +0 -1
  378. package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js.map +0 -1
  379. package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +0 -231
  380. package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js.map +0 -7
  381. package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +0 -2090
  382. package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +0 -1
  383. package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +0 -1570
  384. package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js.map +0 -1
  385. package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +0 -239
  386. package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +0 -1
  387. package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +0 -530
  388. package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js.map +0 -7
  389. package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +0 -1005
  390. package/dist/cli-bundle/chunks/chunk-GZRDYONU.js.map +0 -7
  391. package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +0 -277
  392. package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +0 -7
  393. package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +0 -309
  394. package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +0 -7
  395. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js +0 -371
  396. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +0 -7
  397. package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js +0 -2257
  398. package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +0 -7
  399. package/dist/cli-bundle/chunks/chunk-K46RF36U.js.map +0 -1
  400. package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +0 -371
  401. package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +0 -7
  402. package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +0 -76
  403. package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +0 -1
  404. package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +0 -140
  405. package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +0 -1
  406. package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +0 -1601
  407. package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +0 -1
  408. package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +0 -1031
  409. package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js.map +0 -1
  410. package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +0 -995
  411. package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js.map +0 -1
  412. package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +0 -296
  413. package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +0 -1
  414. package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js.map +0 -1
  415. package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +0 -2043
  416. package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +0 -7
  417. package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +0 -2033
  418. package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +0 -1
  419. package/dist/cli-bundle/chunks/chunk-N745W3B3.js +0 -1604
  420. package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +0 -7
  421. package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +0 -1615
  422. package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js.map +0 -7
  423. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +0 -20
  424. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +0 -1
  425. package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js +0 -143
  426. package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +0 -7
  427. package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js.map +0 -7
  428. package/dist/cli-bundle/chunks/chunk-QX6HM775.js +0 -398
  429. package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +0 -7
  430. package/dist/cli-bundle/chunks/chunk-QZ342C63.js +0 -220
  431. package/dist/cli-bundle/chunks/chunk-QZ342C63.js.map +0 -7
  432. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js +0 -368
  433. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +0 -1
  434. package/dist/cli-bundle/chunks/chunk-RFNYTESG.js +0 -520
  435. package/dist/cli-bundle/chunks/chunk-RFNYTESG.js.map +0 -1
  436. package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +0 -79
  437. package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +0 -7
  438. package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +0 -282
  439. package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +0 -7
  440. package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +0 -274
  441. package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +0 -1
  442. package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js.map +0 -7
  443. package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +0 -1977
  444. package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js.map +0 -7
  445. package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +0 -1041
  446. package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js.map +0 -7
  447. package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +0 -822
  448. package/dist/cli-bundle/chunks/chunk-T42JWV3F.js.map +0 -7
  449. package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +0 -1
  450. package/dist/cli-bundle/chunks/chunk-TULGS6X6.js.map +0 -1
  451. package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +0 -2306
  452. package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js.map +0 -1
  453. package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +0 -7
  454. package/dist/cli-bundle/chunks/chunk-VPIM42PC.js.map +0 -7
  455. package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +0 -368
  456. package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +0 -1
  457. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +0 -84
  458. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +0 -1
  459. package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js +0 -3423
  460. package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +0 -1
  461. package/dist/cli-bundle/chunks/chunk-WLSM645P.js +0 -2247
  462. package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +0 -1
  463. package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +0 -215
  464. package/dist/cli-bundle/chunks/chunk-WRTENIX3.js.map +0 -1
  465. package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +0 -388
  466. package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +0 -1
  467. package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +0 -306
  468. package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +0 -1
  469. package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +0 -424
  470. package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +0 -7
  471. package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +0 -2128
  472. package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +0 -7
  473. package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +0 -7
  474. package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +0 -299
  475. package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +0 -7
  476. package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js.map +0 -7
  477. package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +0 -19
  478. package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +0 -23
  479. package/dist/cli-bundle/chunks/close-GEANHQ2J.js +0 -16
  480. package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +0 -31
  481. package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +0 -27
  482. package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +0 -21
  483. package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +0 -17
  484. package/dist/cli-bundle/chunks/config-D7XQMONX.js +0 -18
  485. package/dist/cli-bundle/chunks/config-T4FHBSYN.js +0 -22
  486. package/dist/cli-bundle/chunks/context-DIU275XI.js +0 -48
  487. package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +0 -44
  488. package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +0 -12
  489. package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +0 -13
  490. package/dist/cli-bundle/chunks/create-4V7SWNBB.js +0 -30
  491. package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +0 -14
  492. package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +0 -17
  493. package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +0 -18
  494. package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +0 -23
  495. package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +0 -27
  496. package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +0 -42
  497. package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +0 -38
  498. package/dist/cli-bundle/chunks/files-EWRQHGIS.js +0 -22
  499. package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +0 -18
  500. package/dist/cli-bundle/chunks/focus-L3YUASOD.js +0 -14
  501. package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +0 -12
  502. package/dist/cli-bundle/chunks/get-7DMITJ3G.js +0 -23
  503. package/dist/cli-bundle/chunks/get-VKQXCXLL.js +0 -19
  504. package/dist/cli-bundle/chunks/health-CVSTAR2F.js +0 -31
  505. package/dist/cli-bundle/chunks/health-TV3GKTFN.js +0 -35
  506. package/dist/cli-bundle/chunks/history-D4JUX5XV.js +0 -20
  507. package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +0 -7
  508. package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +0 -24
  509. package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +0 -1
  510. package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +0 -1
  511. package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +0 -25
  512. package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +0 -7
  513. package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +0 -21
  514. package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +0 -7
  515. package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +0 -1
  516. package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +0 -23
  517. package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +0 -7
  518. package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +0 -1
  519. package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +0 -30
  520. package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +0 -1
  521. package/dist/cli-bundle/chunks/init-J3DPGWQI.js +0 -26
  522. package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +0 -7
  523. package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +0 -21
  524. package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +0 -1
  525. package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +0 -17
  526. package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +0 -7
  527. package/dist/cli-bundle/chunks/list-O5NZVSPN.js +0 -36
  528. package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +0 -1
  529. package/dist/cli-bundle/chunks/list-Z55YCNTC.js +0 -32
  530. package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +0 -7
  531. package/dist/cli-bundle/chunks/next-GBNTGXFC.js +0 -28
  532. package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +0 -7
  533. package/dist/cli-bundle/chunks/next-QKW7PTKE.js +0 -32
  534. package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +0 -1
  535. package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +0 -17
  536. package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +0 -7
  537. package/dist/cli-bundle/chunks/notes-WCGIULVG.js +0 -21
  538. package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +0 -1
  539. package/dist/cli-bundle/chunks/plan-ADISFYH4.js +0 -29
  540. package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +0 -7
  541. package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +0 -1
  542. package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +0 -7
  543. package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +0 -1
  544. package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js.map +0 -1
  545. package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js.map +0 -7
  546. package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +0 -19
  547. package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +0 -7
  548. package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +0 -23
  549. package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +0 -1
  550. package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +0 -7
  551. package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +0 -1
  552. package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +0 -1
  553. package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +0 -19
  554. package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +0 -7
  555. package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +0 -29
  556. package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +0 -1
  557. package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +0 -25
  558. package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +0 -7
  559. package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +0 -1
  560. package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +0 -7
  561. package/dist/cli-bundle/chunks/search-AOZC5SIK.js +0 -34
  562. package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +0 -7
  563. package/dist/cli-bundle/chunks/search-DRXPGHD7.js +0 -38
  564. package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +0 -1
  565. package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +0 -21
  566. package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +0 -1
  567. package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +0 -17
  568. package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +0 -7
  569. package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +0 -14
  570. package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +0 -7
  571. package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +0 -18
  572. package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +0 -1
  573. package/dist/cli-bundle/chunks/test-6CMOCWUC.js +0 -39
  574. package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +0 -7
  575. package/dist/cli-bundle/chunks/test-RI7XHBZL.js +0 -43
  576. package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +0 -1
  577. package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +0 -29
  578. package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +0 -7
  579. package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +0 -33
  580. package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +0 -1
  581. package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +0 -28
  582. package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +0 -1
  583. package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +0 -24
  584. package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +0 -7
  585. package/dist/cli-bundle/chunks/update-QVJDFEAP.js +0 -30
  586. package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +0 -1
  587. package/dist/cli-bundle/chunks/update-VQVHAY6X.js +0 -26
  588. package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +0 -7
  589. package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +0 -37
  590. package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +0 -7
  591. package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +0 -41
  592. package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +0 -1
  593. package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +0 -24
  594. package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +0 -7
  595. package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +0 -28
  596. package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +0 -1
  597. package/dist/cli-bundle/chunks/validate-4NTXSB62.js +0 -36
  598. package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +0 -1
  599. package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +0 -32
  600. package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +0 -7
  601. /package/dist/cli-bundle/chunks/{activity-WJCGCYPU.js.map → append-F7WPGIQL.js.map} +0 -0
  602. /package/dist/cli-bundle/chunks/{activity-Z6QUAUSG.js.map → append-PVCTBVJG.js.map} +0 -0
  603. /package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js.map → chunk-2LEJGRQ7.js.map} +0 -0
  604. /package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js.map → chunk-2TILG6F2.js.map} +0 -0
  605. /package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js.map → chunk-3TYOW6RR.js.map} +0 -0
  606. /package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js.map → chunk-3X542TEY.js.map} +0 -0
  607. /package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js.map → chunk-7VQ3JJN5.js.map} +0 -0
  608. /package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js.map → chunk-AGAVEDIE.js.map} +0 -0
  609. /package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js.map → chunk-AJUON7E6.js.map} +0 -0
  610. /package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js.map → chunk-DR2V5OIV.js.map} +0 -0
  611. /package/dist/cli-bundle/chunks/{chunk-XG625QP4.js.map → chunk-EDO7VXSO.js.map} +0 -0
  612. /package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js.map → chunk-EVEPHNXJ.js.map} +0 -0
  613. /package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js.map → chunk-FN6SB4HU.js.map} +0 -0
  614. /package/dist/cli-bundle/chunks/{chunk-24YG75HI.js.map → chunk-H2SMKL2N.js.map} +0 -0
  615. /package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js.map → chunk-HX6QXV5P.js.map} +0 -0
  616. /package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js.map → chunk-P3MJJW7P.js.map} +0 -0
  617. /package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js.map → chunk-PDXJXEZJ.js.map} +0 -0
  618. /package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js.map → chunk-TEKZOS7M.js.map} +0 -0
  619. /package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js.map → chunk-V5ZWKJNY.js.map} +0 -0
  620. /package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js.map → chunk-VLEA2UTQ.js.map} +0 -0
  621. /package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js.map → chunk-WCWVEXGA.js.map} +0 -0
  622. /package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js.map → chunk-YPMZMKN7.js.map} +0 -0
  623. /package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js.map → chunk-YTD5GICJ.js.map} +0 -0
  624. /package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js.map → chunk-ZO7CLOY2.js.map} +0 -0
  625. /package/dist/cli-bundle/chunks/{aggregate-BDM6EIAR.js.map → close-3YYQ5OG2.js.map} +0 -0
  626. /package/dist/cli-bundle/chunks/{aggregate-VQ2DHU3S.js.map → close-Z3Q4U7TS.js.map} +0 -0
  627. /package/dist/cli-bundle/chunks/{append-RKJYPU74.js.map → close-many-3L2RXH3M.js.map} +0 -0
  628. /package/dist/cli-bundle/chunks/{append-BGML6VLD.js.map → close-many-D366FTIG.js.map} +0 -0
  629. /package/dist/cli-bundle/chunks/{claim-XP5AWZ5H.js.map → comments-54XDJNFE.js.map} +0 -0
  630. /package/dist/cli-bundle/chunks/{claim-RFS7BROJ.js.map → comments-HGHC2PN6.js.map} +0 -0
  631. /package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js.map → copy-44RT5GDW.js.map} +0 -0
  632. /package/dist/cli-bundle/chunks/{close-GEANHQ2J.js.map → copy-UGMUGHZA.js.map} +0 -0
  633. /package/dist/cli-bundle/chunks/{close-many-CMZW7ITN.js.map → create-4GWJWPXG.js.map} +0 -0
  634. /package/dist/cli-bundle/chunks/{close-many-ZFDIG6M7.js.map → create-AZXCUYKP.js.map} +0 -0
  635. /package/dist/cli-bundle/chunks/{comments-XUBPXDYX.js.map → delete-Y6SXIQ4X.js.map} +0 -0
  636. /package/dist/cli-bundle/chunks/{comments-MFSYVNNU.js.map → delete-YQ2VPXNF.js.map} +0 -0
  637. /package/dist/cli-bundle/chunks/{config-T4FHBSYN.js.map → deps-BU5EBJDU.js.map} +0 -0
  638. /package/dist/cli-bundle/chunks/{config-D7XQMONX.js.map → deps-FMANWFRP.js.map} +0 -0
  639. /package/dist/cli-bundle/chunks/{context-DIU275XI.js.map → docs-OQBSJNIA.js.map} +0 -0
  640. /package/dist/cli-bundle/chunks/{context-JCOYB4LZ.js.map → docs-VNPBZXEL.js.map} +0 -0
  641. /package/dist/cli-bundle/chunks/{contracts-BVO7CSLK.js.map → files-72HZEBOE.js.map} +0 -0
  642. /package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js.map → files-HTSB2KJG.js.map} +0 -0
  643. /package/dist/cli-bundle/chunks/{copy-32ROBIDL.js.map → focus-FOG4ALC2.js.map} +0 -0
  644. /package/dist/cli-bundle/chunks/{copy-NAGLGMHZ.js.map → focus-SUTMKXGX.js.map} +0 -0
  645. /package/dist/cli-bundle/chunks/{create-E77SDCUP.js.map → history-compact-M6IFAMBP.js.map} +0 -0
  646. /package/dist/cli-bundle/chunks/{create-4V7SWNBB.js.map → history-compact-NEXRPP2O.js.map} +0 -0
  647. /package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js.map → history-redact-NQX3OGZP.js.map} +0 -0
  648. /package/dist/cli-bundle/chunks/{delete-NQI5OSKN.js.map → history-redact-WQJBZ3PX.js.map} +0 -0
  649. /package/dist/cli-bundle/chunks/{deps-T7SCWXEX.js.map → history-repair-CBHMHAJO.js.map} +0 -0
  650. /package/dist/cli-bundle/chunks/{deps-32SU7HO5.js.map → history-repair-NHOJG7WO.js.map} +0 -0
  651. /package/dist/cli-bundle/chunks/{docs-WL2IWGWV.js.map → learnings-M64NTSOR.js.map} +0 -0
  652. /package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js.map → learnings-T63JGKKN.js.map} +0 -0
  653. /package/dist/cli-bundle/chunks/{eval-NF2J5SHR.js.map → notes-73WE2UV2.js.map} +0 -0
  654. /package/dist/cli-bundle/chunks/{eval-SKDT3MZU.js.map → notes-U7L6HQQ2.js.map} +0 -0
  655. /package/dist/cli-bundle/chunks/{extension-ZISPBRBC.js.map → plan-OSCNYFGC.js.map} +0 -0
  656. /package/dist/cli-bundle/chunks/{extension-LAXKCAYE.js.map → plan-TN537L24.js.map} +0 -0
  657. /package/dist/cli-bundle/chunks/{files-PYKR2UUG.js.map → profile-MHAMXMHQ.js.map} +0 -0
  658. /package/dist/cli-bundle/chunks/{files-EWRQHGIS.js.map → profile-TIGLAKJ7.js.map} +0 -0
  659. /package/dist/cli-bundle/chunks/{focus-4T7TM4MT.js.map → restore-HC3YSWF7.js.map} +0 -0
  660. /package/dist/cli-bundle/chunks/{focus-L3YUASOD.js.map → restore-LFAMMRYZ.js.map} +0 -0
  661. /package/dist/cli-bundle/chunks/{gc-2PCTYYRI.js.map → schema-DAGSYO6E.js.map} +0 -0
  662. /package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js.map → schema-UBXJCQAC.js.map} +0 -0
  663. /package/dist/cli-bundle/chunks/{get-VKQXCXLL.js.map → update-CJGG5WMV.js.map} +0 -0
  664. /package/dist/cli-bundle/chunks/{get-7DMITJ3G.js.map → update-LKD64AFP.js.map} +0 -0
  665. /package/dist/cli-bundle/chunks/{health-CVSTAR2F.js.map → update-many-G4SM7BHC.js.map} +0 -0
  666. /package/dist/cli-bundle/chunks/{health-TV3GKTFN.js.map → update-many-VLIV3D7R.js.map} +0 -0
@@ -1,1932 +0,0 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d4ede2fb-7525-501d-a1f0-77276019f794")}catch(e){}}();
3
- import {
4
- DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
5
- GOVERNANCE_PRESET_DEFAULTS,
6
- GOVERNANCE_PRESET_VALUES,
7
- RUNTIME_FIELD_COMMAND_VALUES,
8
- RUNTIME_FIELD_TYPE_VALUES,
9
- RUNTIME_STATUS_ROLE_VALUES,
10
- RUNTIME_UNKNOWN_FIELD_POLICY_VALUES,
11
- SETTINGS_DEFAULTS,
12
- ensureRuntimeSchemaFileScaffold,
13
- filePathForSchemaSection,
14
- getSettingsPath,
15
- loadRuntimeSchemaFromOptionalFiles,
16
- normalizeItemTypeDefinition,
17
- normalizeRuntimeSchemaSettings,
18
- readFileIfExists,
19
- runCommandHandler,
20
- runCommandOverride,
21
- runOnIndexHooks,
22
- runOnReadHooks,
23
- runOnWriteHooks,
24
- runParserOverride,
25
- runPreflightOverride,
26
- runRendererOverride,
27
- runServiceOverride,
28
- runServiceOverrideSync,
29
- writeFileAtomic
30
- } from "./chunk-57NWPFF2.js";
31
-
32
- // dist/core/extensions/index.js
33
- var activeExtensionHooks = null;
34
- var activeExtensionCommands = null;
35
- var activeExtensionParsers = null;
36
- var activeExtensionPreflight = null;
37
- var activeExtensionServices = null;
38
- var activeExtensionRenderers = null;
39
- var activeExtensionRegistrations = null;
40
- var activeCommandContext = null;
41
- var activeCommandResult = void 0;
42
- var activeAfterCommandAffectedItems = [];
43
- var AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS = /* @__PURE__ */ new Set([
44
- "body",
45
- "comments",
46
- "dependencies",
47
- "docs",
48
- "events",
49
- "files",
50
- "learnings",
51
- "notes",
52
- "reminders",
53
- "test_runs",
54
- "tests"
55
- ]);
56
- function setActiveExtensionHooks(hooks) {
57
- activeExtensionHooks = hooks;
58
- }
59
- function setActiveExtensionCommands(commands) {
60
- activeExtensionCommands = commands;
61
- }
62
- function setActiveExtensionParsers(parsers) {
63
- activeExtensionParsers = parsers;
64
- }
65
- function setActiveExtensionPreflight(preflight) {
66
- activeExtensionPreflight = preflight;
67
- }
68
- function setActiveExtensionServices(services) {
69
- activeExtensionServices = services;
70
- }
71
- function setActiveExtensionRenderers(renderers) {
72
- activeExtensionRenderers = renderers;
73
- }
74
- function setActiveExtensionRegistrations(registrations) {
75
- activeExtensionRegistrations = registrations;
76
- }
77
- function getActiveExtensionRegistrations() {
78
- return activeExtensionRegistrations;
79
- }
80
- function setActiveCommandContext(context) {
81
- activeCommandContext = context;
82
- }
83
- function setActiveCommandResult(result) {
84
- activeCommandResult = result;
85
- }
86
- function getActiveCommandResult() {
87
- return activeCommandResult;
88
- }
89
- function recordAfterCommandAffectedItem(item) {
90
- if (!item || (activeExtensionHooks?.afterCommand?.length ?? 0) === 0) {
91
- return;
92
- }
93
- activeAfterCommandAffectedItems.push(item);
94
- }
95
- function projectAfterCommandItemSnapshot(metadata, changedFields) {
96
- if (!metadata || !metadata.id) {
97
- return {};
98
- }
99
- const snapshot = {
100
- id: metadata.id,
101
- type: metadata.type,
102
- status: metadata.status
103
- };
104
- if (!Array.isArray(changedFields)) {
105
- return snapshot;
106
- }
107
- const source = metadata;
108
- for (const field of changedFields) {
109
- if (typeof field !== "string") {
110
- continue;
111
- }
112
- const actualField = field.startsWith("unset:") ? field.slice("unset:".length) : field;
113
- if (actualField === "id" || actualField === "type" || actualField === "status" || AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS.has(actualField)) {
114
- continue;
115
- }
116
- if (Object.hasOwn(source, actualField) && source[actualField] !== void 0) {
117
- snapshot[actualField] = source[actualField];
118
- }
119
- }
120
- return snapshot;
121
- }
122
- function consumeAfterCommandAffectedItems() {
123
- if (activeAfterCommandAffectedItems.length === 0) {
124
- return void 0;
125
- }
126
- const affected = activeAfterCommandAffectedItems;
127
- activeAfterCommandAffectedItems = [];
128
- return affected;
129
- }
130
- function clearActiveExtensionHooks() {
131
- activeExtensionHooks = null;
132
- activeExtensionCommands = null;
133
- activeExtensionParsers = null;
134
- activeExtensionPreflight = null;
135
- activeExtensionServices = null;
136
- activeExtensionRenderers = null;
137
- activeExtensionRegistrations = null;
138
- activeCommandContext = null;
139
- activeCommandResult = void 0;
140
- activeAfterCommandAffectedItems = [];
141
- }
142
- async function runActiveOnWriteHooks(context) {
143
- if (!activeExtensionHooks) {
144
- return [];
145
- }
146
- return runOnWriteHooks(activeExtensionHooks, context);
147
- }
148
- async function runActiveOnReadHooks(context) {
149
- if (!activeExtensionHooks) {
150
- return [];
151
- }
152
- return runOnReadHooks(activeExtensionHooks, context);
153
- }
154
- function hasActiveOnReadHooks() {
155
- return (activeExtensionHooks?.onRead?.length ?? 0) > 0;
156
- }
157
- async function runActiveOnIndexHooks(context) {
158
- if (!activeExtensionHooks) {
159
- return [];
160
- }
161
- return runOnIndexHooks(activeExtensionHooks, context);
162
- }
163
- function runActiveCommandOverride(result) {
164
- if (!activeExtensionCommands || !activeCommandContext) {
165
- return {
166
- overridden: false,
167
- result,
168
- warnings: []
169
- };
170
- }
171
- return runCommandOverride(activeExtensionCommands, {
172
- command: activeCommandContext.command,
173
- args: [...activeCommandContext.args],
174
- options: activeCommandContext.options ? { ...activeCommandContext.options } : {},
175
- global: activeCommandContext.global ? { ...activeCommandContext.global } : void 0,
176
- pm_root: activeCommandContext.pm_root,
177
- result
178
- });
179
- }
180
- async function runActiveCommandHandler(context) {
181
- if (!activeExtensionCommands) {
182
- return {
183
- handled: false,
184
- result: null,
185
- warnings: []
186
- };
187
- }
188
- return runCommandHandler(activeExtensionCommands, context);
189
- }
190
- async function runActiveParserOverride(context) {
191
- if (!activeExtensionParsers) {
192
- return {
193
- overridden: false,
194
- context: {
195
- command: context.command,
196
- args: [...context.args],
197
- options: { ...context.options },
198
- global: { ...context.global },
199
- pm_root: context.pm_root
200
- },
201
- warnings: []
202
- };
203
- }
204
- return runParserOverride(activeExtensionParsers, context);
205
- }
206
- async function runActivePreflightOverride(context) {
207
- if (!activeExtensionPreflight) {
208
- return {
209
- overridden: false,
210
- context: {
211
- command: context.command,
212
- args: [...context.args],
213
- options: { ...context.options },
214
- global: { ...context.global },
215
- pm_root: context.pm_root
216
- },
217
- decision: { ...context.decision },
218
- warnings: []
219
- };
220
- }
221
- return runPreflightOverride(activeExtensionPreflight, context);
222
- }
223
- function runActiveRendererOverride(format, result) {
224
- if (!activeExtensionRenderers) {
225
- return {
226
- overridden: false,
227
- rendered: null,
228
- warnings: []
229
- };
230
- }
231
- return runRendererOverride(activeExtensionRenderers, {
232
- format,
233
- command: activeCommandContext?.command,
234
- args: activeCommandContext ? [...activeCommandContext.args] : [],
235
- options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},
236
- global: activeCommandContext?.global ? { ...activeCommandContext.global } : void 0,
237
- pm_root: activeCommandContext?.pm_root,
238
- result
239
- });
240
- }
241
- function buildServiceContext(service, payload) {
242
- return {
243
- service,
244
- command: activeCommandContext?.command,
245
- args: activeCommandContext ? [...activeCommandContext.args] : [],
246
- options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},
247
- global: activeCommandContext?.global ? { ...activeCommandContext.global } : void 0,
248
- pm_root: activeCommandContext?.pm_root,
249
- payload
250
- };
251
- }
252
- async function runActiveServiceOverride(service, payload) {
253
- if (!activeExtensionServices) {
254
- return {
255
- handled: false,
256
- result: payload,
257
- warnings: []
258
- };
259
- }
260
- return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));
261
- }
262
- function runActiveServiceOverrideSync(service, payload) {
263
- if (!activeExtensionServices) {
264
- return {
265
- handled: false,
266
- result: payload,
267
- warnings: []
268
- };
269
- }
270
- return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));
271
- }
272
-
273
- // dist/core/shared/errors.js
274
- var PmCliError = class extends Error {
275
- exitCode;
276
- context;
277
- constructor(message, exitCode, context = {}) {
278
- super(message);
279
- this.name = "PmCliError";
280
- this.exitCode = exitCode;
281
- this.context = context;
282
- }
283
- };
284
-
285
- // dist/core/shared/serialization.js
286
- import crypto from "node:crypto";
287
- function sortScalarValue(value) {
288
- if (value === null)
289
- return null;
290
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
291
- return value;
292
- }
293
- if (typeof value === "bigint") {
294
- return value.toString();
295
- }
296
- if (value === void 0) {
297
- return "undefined";
298
- }
299
- if (typeof value === "symbol") {
300
- return value.toString();
301
- }
302
- if (typeof value === "function") {
303
- return `[function:${value.name || "anonymous"}]`;
304
- }
305
- return void 0;
306
- }
307
- function sortPlainObjectKeys(value) {
308
- const sortedKeys = Object.keys(value).sort();
309
- const result = {};
310
- for (const key of sortedKeys) {
311
- const nested = value[key];
312
- if (nested === void 0) {
313
- continue;
314
- }
315
- result[key] = sortObjectKeys(nested);
316
- }
317
- return result;
318
- }
319
- function sortObjectKeys(value) {
320
- const scalarValue = sortScalarValue(value);
321
- if (scalarValue !== void 0) {
322
- return scalarValue;
323
- }
324
- if (Array.isArray(value)) {
325
- return value.map((entry) => sortObjectKeys(entry));
326
- }
327
- if (value instanceof Date) {
328
- return value.toISOString();
329
- }
330
- const maybeJson = value;
331
- if (typeof maybeJson.toJSON === "function") {
332
- const normalized = maybeJson.toJSON();
333
- if (normalized !== value) {
334
- return sortObjectKeys(normalized);
335
- }
336
- }
337
- return sortPlainObjectKeys(value);
338
- }
339
- function stableStringify(value) {
340
- return JSON.stringify(sortObjectKeys(value));
341
- }
342
- function hasUnmatchedEquivalent(leftValue, rightValues, matchedIndexes, equals) {
343
- for (let index = 0; index < rightValues.length; index += 1) {
344
- if (matchedIndexes.has(index)) {
345
- continue;
346
- }
347
- if (equals(leftValue, rightValues[index])) {
348
- matchedIndexes.add(index);
349
- return true;
350
- }
351
- }
352
- return false;
353
- }
354
- function compareRegExpValues(left, right) {
355
- if (!(left instanceof RegExp || right instanceof RegExp)) {
356
- return void 0;
357
- }
358
- return left instanceof RegExp && right instanceof RegExp && left.toString() === right.toString();
359
- }
360
- function compareDateValues(left, right) {
361
- if (!(left instanceof Date || right instanceof Date)) {
362
- return void 0;
363
- }
364
- return left instanceof Date && right instanceof Date && left.getTime() === right.getTime();
365
- }
366
- function compareSetValues(left, right) {
367
- if (!(left instanceof Set || right instanceof Set)) {
368
- return void 0;
369
- }
370
- if (!(left instanceof Set && right instanceof Set) || left.size !== right.size) {
371
- return false;
372
- }
373
- const rightValues = [...right];
374
- const matched = /* @__PURE__ */ new Set();
375
- for (const leftValue of left) {
376
- if (!hasUnmatchedEquivalent(leftValue, rightValues, matched, stableValueEquals)) {
377
- return false;
378
- }
379
- }
380
- return true;
381
- }
382
- function compareMapValues(left, right) {
383
- if (!(left instanceof Map || right instanceof Map)) {
384
- return void 0;
385
- }
386
- if (!(left instanceof Map && right instanceof Map) || left.size !== right.size) {
387
- return false;
388
- }
389
- const rightEntries = [...right.entries()];
390
- const matched = /* @__PURE__ */ new Set();
391
- for (const [leftKey, leftValue] of left.entries()) {
392
- const leftEntry = [leftKey, leftValue];
393
- if (!hasUnmatchedEquivalent(leftEntry, rightEntries, matched, ([candidateKey, candidateValue], [rightKey, rightValue]) => stableValueEquals(candidateKey, rightKey) && stableValueEquals(candidateValue, rightValue))) {
394
- return false;
395
- }
396
- }
397
- return true;
398
- }
399
- function compareArrayValues(left, right) {
400
- if (!(Array.isArray(left) || Array.isArray(right))) {
401
- return void 0;
402
- }
403
- if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {
404
- return false;
405
- }
406
- return left.every((value, index) => stableValueEquals(value, right[index]));
407
- }
408
- function comparePlainObjectValues(left, right) {
409
- const leftKeys = Object.keys(left).sort((a, b) => a.localeCompare(b));
410
- const rightKeys = Object.keys(right).sort((a, b) => a.localeCompare(b));
411
- if (leftKeys.length !== rightKeys.length) {
412
- return false;
413
- }
414
- for (let index = 0; index < leftKeys.length; index += 1) {
415
- const leftKey = leftKeys[index];
416
- if (leftKey !== rightKeys[index]) {
417
- return false;
418
- }
419
- if (!stableValueEquals(left[leftKey], right[leftKey])) {
420
- return false;
421
- }
422
- }
423
- return true;
424
- }
425
- var SPECIALIZED_STABLE_VALUE_COMPARISONS = [
426
- compareRegExpValues,
427
- compareDateValues,
428
- compareSetValues,
429
- compareMapValues,
430
- compareArrayValues
431
- ];
432
- function stableValueEquals(left, right) {
433
- if (Object.is(left, right)) {
434
- return true;
435
- }
436
- if (left === null || right === null || typeof left !== "object" || typeof right !== "object") {
437
- return false;
438
- }
439
- for (const compare of SPECIALIZED_STABLE_VALUE_COMPARISONS) {
440
- const result = compare(left, right);
441
- if (result !== void 0) {
442
- return result;
443
- }
444
- }
445
- return comparePlainObjectValues(left, right);
446
- }
447
- function sha256Hex(value) {
448
- return crypto.createHash("sha256").update(value, "utf8").digest("hex");
449
- }
450
- function orderObject(value, keyOrder) {
451
- const ordered = {};
452
- for (const key of keyOrder) {
453
- const entry = value[key];
454
- if (entry !== void 0) {
455
- ordered[key] = entry;
456
- }
457
- }
458
- const unknownKeys = Object.keys(value).filter((key) => !keyOrder.includes(key)).sort((a, b) => a.localeCompare(b));
459
- for (const key of unknownKeys) {
460
- const entry = value[key];
461
- if (entry !== void 0) {
462
- ordered[key] = entry;
463
- }
464
- }
465
- return ordered;
466
- }
467
-
468
- // dist/core/store/settings-validator.js
469
- var FAIL = { ok: false };
470
- var vString = (input) => typeof input === "string" ? { ok: true, value: input } : FAIL;
471
- var vBoolean = (input) => typeof input === "boolean" ? { ok: true, value: input } : FAIL;
472
- function vNumber(options = {}) {
473
- return (input) => {
474
- if (typeof input !== "number" || !Number.isFinite(input)) {
475
- return FAIL;
476
- }
477
- if (options.int && (!Number.isInteger(input) || !Number.isSafeInteger(input))) {
478
- return FAIL;
479
- }
480
- if (options.positive && input <= 0) {
481
- return FAIL;
482
- }
483
- if (typeof options.min === "number" && input < options.min) {
484
- return FAIL;
485
- }
486
- return { ok: true, value: input };
487
- };
488
- }
489
- function vLiteral(...allowed) {
490
- return (input) => typeof input === "string" && allowed.includes(input) ? { ok: true, value: input } : FAIL;
491
- }
492
- function vArray(item) {
493
- return (input) => {
494
- if (!Array.isArray(input)) {
495
- return FAIL;
496
- }
497
- const value = [];
498
- for (const element of input) {
499
- const result = item(element);
500
- if (!result.ok) {
501
- return FAIL;
502
- }
503
- value.push(result.value);
504
- }
505
- return { ok: true, value };
506
- };
507
- }
508
- function vOptional(inner) {
509
- return (input) => input === void 0 ? { ok: true, value: void 0 } : inner(input);
510
- }
511
- function vRecordOf(valueCheck) {
512
- return (input) => {
513
- if (typeof input !== "object" || input === null || Array.isArray(input)) {
514
- return FAIL;
515
- }
516
- const value = {};
517
- for (const [key, raw] of Object.entries(input)) {
518
- const result = valueCheck(raw);
519
- if (!result.ok) {
520
- return FAIL;
521
- }
522
- value[key] = result.value;
523
- }
524
- return { ok: true, value };
525
- };
526
- }
527
- function vObject(shape) {
528
- return (input) => {
529
- if (typeof input !== "object" || input === null || Array.isArray(input)) {
530
- return FAIL;
531
- }
532
- const record = input;
533
- const value = {};
534
- for (const [key, check] of Object.entries(shape)) {
535
- const result = check(record[key]);
536
- if (!result.ok) {
537
- return FAIL;
538
- }
539
- if (result.value !== void 0) {
540
- value[key] = result.value;
541
- }
542
- }
543
- return { ok: true, value };
544
- };
545
- }
546
- var itemTypeOption = vObject({
547
- key: vString,
548
- values: vArray(vString),
549
- required: vOptional(vBoolean),
550
- aliases: vOptional(vArray(vString)),
551
- description: vOptional(vString)
552
- });
553
- var itemTypeCommandOptionPolicy = vObject({
554
- command: vLiteral("create", "update"),
555
- option: vString,
556
- required: vOptional(vBoolean),
557
- visible: vOptional(vBoolean),
558
- enabled: vOptional(vBoolean)
559
- });
560
- var itemTypeDefinition = vObject({
561
- name: vString,
562
- description: vOptional(vString),
563
- // Per-type create-time default status (config-driven); preserved so inline
564
- // settings.item_types.definitions behave identically to schema/types.json.
565
- default_status: vOptional(vString),
566
- folder: vOptional(vString),
567
- aliases: vOptional(vArray(vString)),
568
- required_create_fields: vOptional(vArray(vString)),
569
- required_create_repeatables: vOptional(vArray(vString)),
570
- options: vOptional(vArray(itemTypeOption)),
571
- command_option_policies: vOptional(vArray(itemTypeCommandOptionPolicy))
572
- });
573
- var runtimeStatusDefinition = vObject({
574
- id: vString,
575
- aliases: vOptional(vArray(vString)),
576
- roles: vOptional(vArray(vLiteral(...RUNTIME_STATUS_ROLE_VALUES))),
577
- description: vOptional(vString),
578
- order: vOptional(vNumber())
579
- });
580
- var runtimeFieldDefinition = vObject({
581
- key: vString,
582
- metadata_key: vOptional(vString),
583
- front_matter_key: vOptional(vString),
584
- cli_flag: vOptional(vString),
585
- cli_aliases: vOptional(vArray(vString)),
586
- description: vOptional(vString),
587
- type: vOptional(vLiteral(...RUNTIME_FIELD_TYPE_VALUES)),
588
- commands: vOptional(vArray(vLiteral(...RUNTIME_FIELD_COMMAND_VALUES))),
589
- repeatable: vOptional(vBoolean),
590
- required: vOptional(vBoolean),
591
- required_on_create: vOptional(vBoolean),
592
- required_types: vOptional(vArray(vString)),
593
- allow_unset: vOptional(vBoolean)
594
- });
595
- var statusTransitionPair = (input) => {
596
- if (!Array.isArray(input) || input.length !== 2) {
597
- return FAIL;
598
- }
599
- const [from, to] = input;
600
- if (typeof from !== "string" || typeof to !== "string") {
601
- return FAIL;
602
- }
603
- return { ok: true, value: [from, to] };
604
- };
605
- var typeWorkflowDefinition = vObject({
606
- type: vString,
607
- allowed_transitions: vArray(statusTransitionPair)
608
- });
609
- var runtimeSchemaSettings = vOptional(vObject({
610
- version: vOptional(vNumber({ int: true })),
611
- files: vOptional(vObject({
612
- types: vOptional(vString),
613
- statuses: vOptional(vString),
614
- fields: vOptional(vString),
615
- workflows: vOptional(vString)
616
- })),
617
- statuses: vOptional(vArray(runtimeStatusDefinition)),
618
- fields: vOptional(vArray(runtimeFieldDefinition)),
619
- workflow: vOptional(vObject({
620
- draft_status: vOptional(vString),
621
- open_status: vOptional(vString),
622
- in_progress_status: vOptional(vString),
623
- blocked_status: vOptional(vString),
624
- close_status: vOptional(vString),
625
- canceled_status: vOptional(vString)
626
- })),
627
- type_workflows: vOptional(vArray(typeWorkflowDefinition)),
628
- unknown_field_policy: vOptional(vLiteral(...RUNTIME_UNKNOWN_FIELD_POLICY_VALUES))
629
- }));
630
- var governanceSettings = vOptional(vObject({
631
- preset: vOptional(vLiteral(...GOVERNANCE_PRESET_VALUES)),
632
- ownership_enforcement: vOptional(vLiteral("none", "warn", "strict")),
633
- create_mode_default: vOptional(vLiteral("progressive", "strict")),
634
- close_validation_default: vOptional(vLiteral("off", "warn", "strict")),
635
- require_close_reason: vOptional(vBoolean),
636
- parent_reference: vOptional(vLiteral("warn", "strict_error")),
637
- metadata_profile: vOptional(vLiteral("core", "strict", "custom")),
638
- force_required_for_stale_lock: vOptional(vBoolean),
639
- create_default_type: vOptional(vString),
640
- workflow_enforcement: vOptional(vLiteral("off", "warn", "strict"))
641
- }));
642
- var extensionPolicyOverride = vObject({
643
- name: vString,
644
- disabled: vOptional(vBoolean),
645
- require_trusted: vOptional(vBoolean),
646
- require_provenance: vOptional(vBoolean),
647
- sandbox_profile: vOptional(vLiteral("none", "restricted", "strict")),
648
- allowed_capabilities: vOptional(vArray(vString)),
649
- blocked_capabilities: vOptional(vArray(vString)),
650
- allowed_surfaces: vOptional(vArray(vString)),
651
- blocked_surfaces: vOptional(vArray(vString)),
652
- allowed_commands: vOptional(vArray(vString)),
653
- blocked_commands: vOptional(vArray(vString)),
654
- allowed_actions: vOptional(vArray(vString)),
655
- blocked_actions: vOptional(vArray(vString)),
656
- allowed_services: vOptional(vArray(vString)),
657
- blocked_services: vOptional(vArray(vString))
658
- });
659
- var pmMaxVersionExceededModeLiteral = vLiteral("block", "warn");
660
- var pmMaxVersionExceededMode = (input) => typeof input === "string" ? pmMaxVersionExceededModeLiteral(input) : vObject({
661
- global: vOptional(pmMaxVersionExceededModeLiteral),
662
- project: vOptional(pmMaxVersionExceededModeLiteral)
663
- })(input);
664
- var extensionPolicy = vOptional(vObject({
665
- mode: vOptional(vLiteral("off", "warn", "enforce")),
666
- trust_mode: vOptional(vLiteral("off", "warn", "enforce")),
667
- pm_max_version_exceeded_mode: vOptional(pmMaxVersionExceededMode),
668
- require_provenance: vOptional(vBoolean),
669
- trusted_extensions: vOptional(vArray(vString)),
670
- default_sandbox_profile: vOptional(vLiteral("none", "restricted", "strict")),
671
- allowed_extensions: vOptional(vArray(vString)),
672
- blocked_extensions: vOptional(vArray(vString)),
673
- allowed_capabilities: vOptional(vArray(vString)),
674
- blocked_capabilities: vOptional(vArray(vString)),
675
- allowed_surfaces: vOptional(vArray(vString)),
676
- blocked_surfaces: vOptional(vArray(vString)),
677
- allowed_commands: vOptional(vArray(vString)),
678
- blocked_commands: vOptional(vArray(vString)),
679
- allowed_actions: vOptional(vArray(vString)),
680
- blocked_actions: vOptional(vArray(vString)),
681
- allowed_services: vOptional(vArray(vString)),
682
- blocked_services: vOptional(vArray(vString)),
683
- extension_overrides: vOptional(vArray(extensionPolicyOverride))
684
- }));
685
- var settingsCheck = vObject({
686
- version: vNumber({ int: true }),
687
- id_prefix: vString,
688
- author_default: vString,
689
- item_format: vOptional(vLiteral("toon", "json_markdown")),
690
- locks: vObject({ ttl_seconds: vNumber({ int: true }), wait_ms: vOptional(vNumber({ int: true, min: 0 })) }),
691
- checkpoints: vOptional(vObject({ retention_days: vOptional(vNumber({ int: true, positive: true })) })),
692
- output: vObject({ default_format: vLiteral("toon", "json") }),
693
- history: vOptional(vObject({
694
- missing_stream: vLiteral("auto_create", "strict_error"),
695
- compact_policy: vOptional(vObject({
696
- enabled: vOptional(vBoolean),
697
- max_entries: vOptional(vNumber({ int: true, positive: true })),
698
- trigger: vOptional(vLiteral("health_warn", "auto"))
699
- }))
700
- })),
701
- validation: vOptional(vObject({
702
- sprint_release_format: vLiteral("warn", "strict_error"),
703
- parent_reference: vOptional(vLiteral("warn", "strict_error")),
704
- metadata_profile: vOptional(vLiteral("core", "strict", "custom")),
705
- metadata_required_fields: vOptional(vArray(vString)),
706
- lifecycle_stale_blocker_reason_patterns: vOptional(vArray(vString)),
707
- lifecycle_closure_like_blocked_reason_patterns: vOptional(vArray(vString)),
708
- lifecycle_closure_like_resolution_patterns: vOptional(vArray(vString)),
709
- lifecycle_closure_like_actual_result_patterns: vOptional(vArray(vString)),
710
- estimate_defaults_by_type: vOptional(vRecordOf(vNumber({ int: true, positive: true })))
711
- })),
712
- governance: governanceSettings,
713
- workflow: vOptional(vObject({ definition_of_done: vArray(vString) })),
714
- testing: vOptional(vObject({ record_results_to_items: vBoolean })),
715
- telemetry: vOptional(vObject({
716
- enabled: vBoolean,
717
- first_run_prompt_completed: vOptional(vBoolean),
718
- capture_level: vOptional(vLiteral("minimal", "redacted", "max")),
719
- endpoint: vOptional(vString),
720
- installation_id: vOptional(vString),
721
- retention_days: vOptional(vNumber({ int: true, positive: true }))
722
- })),
723
- agent_guidance: vOptional(vObject({
724
- prompt_completed: vOptional(vBoolean),
725
- declined: vOptional(vBoolean),
726
- declined_at: vOptional(vString),
727
- template_version: vOptional(vNumber({ int: true, positive: true })),
728
- last_checked_files: vOptional(vArray(vString))
729
- })),
730
- item_types: vOptional(vObject({ definitions: vArray(itemTypeDefinition) })),
731
- schema: runtimeSchemaSettings,
732
- context: vOptional(vObject({
733
- default_depth: vOptional(vLiteral("brief", "standard", "deep")),
734
- activity_limit: vOptional(vNumber({ int: true, positive: true })),
735
- stale_threshold_days: vOptional(vNumber({ int: true, positive: true })),
736
- sections: vOptional(vObject({
737
- hierarchy: vOptional(vBoolean),
738
- activity: vOptional(vBoolean),
739
- progress: vOptional(vBoolean),
740
- recently_created: vOptional(vBoolean),
741
- unparented: vOptional(vBoolean),
742
- blockers: vOptional(vBoolean),
743
- files: vOptional(vBoolean),
744
- workload: vOptional(vBoolean),
745
- staleness: vOptional(vBoolean),
746
- tests: vOptional(vBoolean)
747
- }))
748
- })),
749
- extensions: vObject({
750
- enabled: vArray(vString),
751
- disabled: vArray(vString),
752
- policy: extensionPolicy
753
- }),
754
- search: vObject({
755
- score_threshold: vNumber(),
756
- hybrid_semantic_weight: vOptional(vNumber()),
757
- max_results: vNumber({ int: true }),
758
- embedding_model: vString,
759
- embedding_corpus_max_characters: vOptional(vNumber()),
760
- embedding_batch_size: vNumber({ int: true }),
761
- embedding_timeout_ms: vOptional(vNumber({ int: true })),
762
- scanner_max_batch_retries: vNumber({ int: true }),
763
- provider: vOptional(vString),
764
- corpus_fields: vOptional(vArray(vString)),
765
- mutation_refresh_policy: vOptional(vLiteral("cache_only", "semantic_configured", "semantic_auto")),
766
- query_expansion: vOptional(vObject({
767
- enabled: vOptional(vBoolean),
768
- provider: vOptional(vString)
769
- })),
770
- rerank: vOptional(vObject({
771
- enabled: vOptional(vBoolean),
772
- model: vOptional(vString),
773
- top_k: vOptional(vNumber({ int: true, positive: true }))
774
- })),
775
- // pm-75k9: offline BM25 tuning. Unlike `search.tuning` (intentionally
776
- // stripped for legacy zod parity), bm25 is validated so it persists across
777
- // writeSettings round-trips — these knobs must survive to take effect.
778
- bm25: vOptional(vObject({
779
- k1: vOptional(vNumber()),
780
- b: vOptional(vNumber())
781
- }))
782
- }),
783
- providers: vObject({
784
- openai: vObject({ base_url: vString, api_key: vString, model: vString }),
785
- ollama: vObject({ base_url: vString, model: vString })
786
- }),
787
- vector_store: vObject({
788
- adapter: vOptional(vString),
789
- collection_name: vOptional(vString),
790
- qdrant: vObject({ url: vString, api_key: vString }),
791
- lancedb: vObject({ path: vString })
792
- })
793
- });
794
- function validateSettings(raw) {
795
- const result = settingsCheck(raw);
796
- if (!result.ok) {
797
- return { success: false };
798
- }
799
- return { success: true, data: result.value };
800
- }
801
-
802
- // dist/core/validate/estimate-defaults.js
803
- var DEFAULT_ESTIMATE_MINUTES_BY_TYPE = {
804
- Epic: 2880,
805
- Feature: 480,
806
- Story: 480,
807
- Milestone: 2880,
808
- Task: 120,
809
- Issue: 60,
810
- Bug: 60,
811
- Chore: 30,
812
- Decision: 15,
813
- Plan: 120
814
- };
815
- var FALLBACK_ESTIMATE_MINUTES = 120;
816
- function isHonoredMinutes(value) {
817
- return typeof value === "number" && Number.isFinite(value) && value > 0;
818
- }
819
- function toLowercasedLookup(source) {
820
- const lookup = /* @__PURE__ */ new Map();
821
- for (const [key, value] of Object.entries(source)) {
822
- lookup.set(key.toLowerCase(), value);
823
- }
824
- return lookup;
825
- }
826
- var BUILTIN_LOWERCASED_LOOKUP = toLowercasedLookup(DEFAULT_ESTIMATE_MINUTES_BY_TYPE);
827
- var OVERRIDE_LOOKUP_CACHE = /* @__PURE__ */ new WeakMap();
828
- function lowercasedOverrideLookup(overrides) {
829
- const cached = OVERRIDE_LOOKUP_CACHE.get(overrides);
830
- if (cached) {
831
- return cached;
832
- }
833
- const lookup = toLowercasedLookup(overrides);
834
- OVERRIDE_LOOKUP_CACHE.set(overrides, lookup);
835
- return lookup;
836
- }
837
- function resolveEstimateDefaultMinutes(type, overrides) {
838
- const key = (type ?? "").trim().toLowerCase();
839
- if (key.length === 0) {
840
- return FALLBACK_ESTIMATE_MINUTES;
841
- }
842
- if (overrides) {
843
- const overrideValue = lowercasedOverrideLookup(overrides).get(key);
844
- if (isHonoredMinutes(overrideValue)) {
845
- return Math.floor(overrideValue);
846
- }
847
- }
848
- const builtinValue = BUILTIN_LOWERCASED_LOOKUP.get(key);
849
- if (isHonoredMinutes(builtinValue)) {
850
- return Math.floor(builtinValue);
851
- }
852
- return FALLBACK_ESTIMATE_MINUTES;
853
- }
854
- function normalizeEstimateDefaultOverrides(raw) {
855
- const normalized = {};
856
- if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
857
- return normalized;
858
- }
859
- for (const [rawKey, rawValue] of Object.entries(raw)) {
860
- const key = rawKey.trim();
861
- if (key.length === 0 || !isHonoredMinutes(rawValue)) {
862
- continue;
863
- }
864
- normalized[key] = Math.floor(rawValue);
865
- }
866
- return normalized;
867
- }
868
-
869
- // dist/core/store/settings-read-cache.js
870
- import { stat } from "node:fs/promises";
871
- var settingsReadCacheByRoot = /* @__PURE__ */ new Map();
872
- function normalizeTrackedPaths(paths) {
873
- return [...new Set(paths.map((pathValue) => pathValue.trim()).filter((pathValue) => pathValue.length > 0))].sort((left, right) => left.localeCompare(right));
874
- }
875
- async function readPathSignature(targetPath) {
876
- try {
877
- const targetStats = await stat(targetPath);
878
- return {
879
- path: targetPath,
880
- mtime_ms: targetStats.mtimeMs,
881
- size: targetStats.size
882
- };
883
- } catch {
884
- return {
885
- path: targetPath,
886
- mtime_ms: null,
887
- size: null
888
- };
889
- }
890
- }
891
- async function collectSettingsReadCacheSignatures(paths) {
892
- const normalizedPaths = normalizeTrackedPaths(paths);
893
- const signatures = await Promise.all(normalizedPaths.map((targetPath) => readPathSignature(targetPath)));
894
- signatures.sort((left, right) => left.path.localeCompare(right.path));
895
- return signatures;
896
- }
897
- function settingsReadCacheSignaturesEqual(left, right) {
898
- if (left.length !== right.length) {
899
- return false;
900
- }
901
- for (let index = 0; index < left.length; index += 1) {
902
- const leftEntry = left[index];
903
- const rightEntry = right[index];
904
- if (leftEntry.path !== rightEntry.path || leftEntry.mtime_ms !== rightEntry.mtime_ms || leftEntry.size !== rightEntry.size) {
905
- return false;
906
- }
907
- }
908
- return true;
909
- }
910
- function getSettingsReadCacheEntry(pmRoot) {
911
- return settingsReadCacheByRoot.get(pmRoot);
912
- }
913
- function setSettingsReadCacheEntry(pmRoot, entry) {
914
- const normalizedTrackedPaths = normalizeTrackedPaths(entry.tracked_paths);
915
- const normalizedSignatures = [...entry.signatures].map((signature) => ({
916
- path: signature.path,
917
- mtime_ms: signature.mtime_ms,
918
- size: signature.size
919
- })).sort((left, right) => left.path.localeCompare(right.path));
920
- settingsReadCacheByRoot.set(pmRoot, {
921
- tracked_paths: normalizedTrackedPaths,
922
- signatures: normalizedSignatures,
923
- value: entry.value
924
- });
925
- }
926
- function clearSettingsReadCache(pmRoot) {
927
- if (pmRoot) {
928
- settingsReadCacheByRoot.delete(pmRoot);
929
- return;
930
- }
931
- settingsReadCacheByRoot.clear();
932
- }
933
-
934
- // dist/core/store/settings.js
935
- var SETTINGS_WRITE_OP = "settings:write";
936
- var SETTINGS_PERSIST_SOURCE_SYMBOL = /* @__PURE__ */ Symbol("pm.settings.persist_source");
937
- var MAX_VECTOR_STORE_COLLECTION_NAME_LENGTH = 128;
938
- function resolveGovernanceKnobsFromPreset(preset) {
939
- return structuredClone(GOVERNANCE_PRESET_DEFAULTS[preset]);
940
- }
941
- function normalizeGovernancePreset(value) {
942
- if (value === "minimal" || value === "default" || value === "strict" || value === "custom") {
943
- return value;
944
- }
945
- return SETTINGS_DEFAULTS.governance.preset;
946
- }
947
- function withGovernanceExtras(base, governance) {
948
- const createDefaultType = typeof governance.create_default_type === "string" ? governance.create_default_type.trim() : void 0;
949
- if (createDefaultType && createDefaultType.length > 0) {
950
- base.create_default_type = createDefaultType;
951
- }
952
- if (governance.workflow_enforcement === "off" || governance.workflow_enforcement === "warn" || governance.workflow_enforcement === "strict") {
953
- base.workflow_enforcement = governance.workflow_enforcement;
954
- }
955
- if (governance.require_close_reason === false) {
956
- base.require_close_reason = false;
957
- }
958
- return base;
959
- }
960
- function normalizeGovernanceForPersist(governance) {
961
- if (governance.preset === "custom") {
962
- return withGovernanceExtras({
963
- preset: "custom",
964
- ownership_enforcement: governance.ownership_enforcement,
965
- create_mode_default: governance.create_mode_default,
966
- close_validation_default: governance.close_validation_default,
967
- parent_reference: governance.parent_reference,
968
- metadata_profile: governance.metadata_profile,
969
- force_required_for_stale_lock: governance.force_required_for_stale_lock
970
- }, governance);
971
- }
972
- return withGovernanceExtras({
973
- preset: governance.preset
974
- }, governance);
975
- }
976
- function resolveGovernanceExtras(rawGovernance) {
977
- const createDefaultType = typeof rawGovernance.create_default_type === "string" ? rawGovernance.create_default_type.trim() : void 0;
978
- const extras = {};
979
- if (createDefaultType && createDefaultType.length > 0) {
980
- extras.create_default_type = createDefaultType;
981
- }
982
- if (rawGovernance.workflow_enforcement === "off" || rawGovernance.workflow_enforcement === "warn" || rawGovernance.workflow_enforcement === "strict") {
983
- extras.workflow_enforcement = rawGovernance.workflow_enforcement;
984
- }
985
- if (typeof rawGovernance.require_close_reason === "boolean") {
986
- extras.require_close_reason = rawGovernance.require_close_reason;
987
- }
988
- return extras;
989
- }
990
- function resolveGovernanceKnobs(settings) {
991
- const rawGovernance = settings.governance ?? {};
992
- const preset = normalizeGovernancePreset(rawGovernance.preset);
993
- const extras = resolveGovernanceExtras(rawGovernance);
994
- if (preset === "custom") {
995
- const baseline2 = resolveGovernanceKnobsFromPreset("default");
996
- const requireCloseReason2 = extras.require_close_reason ?? baseline2.require_close_reason;
997
- return {
998
- preset,
999
- ownership_enforcement: rawGovernance.ownership_enforcement ?? baseline2.ownership_enforcement,
1000
- create_mode_default: rawGovernance.create_mode_default ?? baseline2.create_mode_default,
1001
- close_validation_default: rawGovernance.close_validation_default ?? baseline2.close_validation_default,
1002
- parent_reference: rawGovernance.parent_reference ?? baseline2.parent_reference,
1003
- metadata_profile: rawGovernance.metadata_profile ?? baseline2.metadata_profile,
1004
- force_required_for_stale_lock: rawGovernance.force_required_for_stale_lock ?? baseline2.force_required_for_stale_lock,
1005
- ...extras,
1006
- require_close_reason: requireCloseReason2
1007
- };
1008
- }
1009
- const baseline = resolveGovernanceKnobsFromPreset(preset);
1010
- const requireCloseReason = extras.require_close_reason ?? baseline.require_close_reason;
1011
- return {
1012
- preset,
1013
- ...baseline,
1014
- ...extras,
1015
- require_close_reason: requireCloseReason
1016
- };
1017
- }
1018
- function cloneDefaults() {
1019
- return structuredClone(SETTINGS_DEFAULTS);
1020
- }
1021
- function normalizeSearchMutationRefreshPolicy(value) {
1022
- if (value === "cache_only" || value === "semantic_configured" || value === "semantic_auto") {
1023
- return value;
1024
- }
1025
- return SETTINGS_DEFAULTS.search.mutation_refresh_policy;
1026
- }
1027
- function normalizeSearchQueryExpansionEnabled(value) {
1028
- if (typeof value === "boolean") {
1029
- return value;
1030
- }
1031
- return SETTINGS_DEFAULTS.search.query_expansion.enabled;
1032
- }
1033
- function normalizeSearchQueryExpansionProvider(value) {
1034
- if (typeof value !== "string") {
1035
- return SETTINGS_DEFAULTS.search.query_expansion.provider;
1036
- }
1037
- return value.trim();
1038
- }
1039
- function normalizeSearchRerankEnabled(value) {
1040
- if (typeof value === "boolean") {
1041
- return value;
1042
- }
1043
- return SETTINGS_DEFAULTS.search.rerank.enabled;
1044
- }
1045
- function normalizeSearchRerankModel(value) {
1046
- if (typeof value !== "string") {
1047
- return SETTINGS_DEFAULTS.search.rerank.model;
1048
- }
1049
- return value.trim();
1050
- }
1051
- function normalizeSearchRerankTopK(value) {
1052
- if (typeof value === "number" && Number.isFinite(value) && Number.isInteger(value) && value > 0) {
1053
- return value;
1054
- }
1055
- return SETTINGS_DEFAULTS.search.rerank.top_k;
1056
- }
1057
- function normalizeVectorStoreCollectionName(value) {
1058
- if (typeof value !== "string") {
1059
- return SETTINGS_DEFAULTS.vector_store.collection_name;
1060
- }
1061
- const sanitized = value.trim().replaceAll(/[^a-zA-Z0-9_-]/g, "_");
1062
- const truncated = sanitized.slice(0, MAX_VECTOR_STORE_COLLECTION_NAME_LENGTH);
1063
- return truncated.length > 0 ? truncated : SETTINGS_DEFAULTS.vector_store.collection_name;
1064
- }
1065
- function buildSettingsPersistSourceSnapshot(parsedSettings, runtimeSettings) {
1066
- const sourceSchema = parsedSettings.schema;
1067
- const sourceStatuses = Array.isArray(sourceSchema?.statuses) ? sourceSchema?.statuses : void 0;
1068
- const sourceFields = Array.isArray(sourceSchema?.fields) ? sourceSchema?.fields : void 0;
1069
- const sourceTypeWorkflows = Array.isArray(sourceSchema?.type_workflows) ? sourceSchema?.type_workflows : void 0;
1070
- return {
1071
- has_source_item_type_definitions: Array.isArray(parsedSettings.item_types?.definitions),
1072
- source_item_type_definitions: normalizeItemTypeDefinitions(parsedSettings.item_types?.definitions),
1073
- has_source_schema_statuses: sourceStatuses !== void 0,
1074
- source_schema_statuses: sourceStatuses ? structuredClone(sourceStatuses) : [],
1075
- has_source_schema_fields: sourceFields !== void 0,
1076
- source_schema_fields: sourceFields ? structuredClone(sourceFields) : [],
1077
- has_source_schema_type_workflows: sourceTypeWorkflows !== void 0,
1078
- source_schema_type_workflows: sourceTypeWorkflows ? structuredClone(sourceTypeWorkflows) : [],
1079
- runtime_item_type_definitions: normalizeItemTypeDefinitions(runtimeSettings.item_types?.definitions),
1080
- runtime_schema_statuses: structuredClone(runtimeSettings.schema.statuses),
1081
- runtime_schema_fields: structuredClone(runtimeSettings.schema.fields),
1082
- runtime_schema_type_workflows: structuredClone(runtimeSettings.schema.type_workflows ?? [])
1083
- };
1084
- }
1085
- function attachSettingsPersistSourceSnapshot(settings, source) {
1086
- Object.defineProperty(settings, SETTINGS_PERSIST_SOURCE_SYMBOL, {
1087
- value: source,
1088
- writable: true,
1089
- configurable: true,
1090
- enumerable: false
1091
- });
1092
- }
1093
- function getSettingsPersistSourceSnapshot(settings) {
1094
- const candidate = settings[SETTINGS_PERSIST_SOURCE_SYMBOL];
1095
- if (!candidate || typeof candidate !== "object") {
1096
- return void 0;
1097
- }
1098
- return candidate;
1099
- }
1100
- function cloneSettingsReadResult(result) {
1101
- const clonedSettings = structuredClone(result.settings);
1102
- const persistSource = getSettingsPersistSourceSnapshot(result.settings);
1103
- if (persistSource) {
1104
- attachSettingsPersistSourceSnapshot(clonedSettings, structuredClone(persistSource));
1105
- }
1106
- return {
1107
- settings: clonedSettings,
1108
- metadata: {
1109
- has_explicit_item_format: result.metadata.has_explicit_item_format
1110
- },
1111
- warnings: [...result.warnings]
1112
- };
1113
- }
1114
- function resolveSettingsReadTrackedPaths(pmRoot, schema, settingsPath) {
1115
- const normalizedSchema = normalizeRuntimeSchemaSettings(schema);
1116
- return [
1117
- settingsPath,
1118
- filePathForSchemaSection(pmRoot, normalizedSchema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types),
1119
- filePathForSchemaSection(pmRoot, normalizedSchema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses),
1120
- filePathForSchemaSection(pmRoot, normalizedSchema.files.fields, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields),
1121
- filePathForSchemaSection(pmRoot, normalizedSchema.files.workflows, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.workflows)
1122
- ];
1123
- }
1124
- async function cacheSettingsReadResult(pmRoot, trackedPaths, result) {
1125
- const signatures = await collectSettingsReadCacheSignatures(trackedPaths);
1126
- setSettingsReadCacheEntry(pmRoot, {
1127
- tracked_paths: trackedPaths,
1128
- signatures,
1129
- value: cloneSettingsReadResult(result)
1130
- });
1131
- }
1132
- async function cacheSettingsReadResultSafe(pmRoot, trackedPaths, result) {
1133
- try {
1134
- await cacheSettingsReadResult(pmRoot, trackedPaths, result);
1135
- } catch {
1136
- clearSettingsReadCache(pmRoot);
1137
- }
1138
- }
1139
- function findSettingsReadCacheSignature(signatures, targetPath) {
1140
- return signatures.find((signature) => signature.path === targetPath);
1141
- }
1142
- function selectedSettingsReadCacheSignaturesEqual(before, after, targetPaths) {
1143
- for (const targetPath of targetPaths) {
1144
- const beforeSignature = findSettingsReadCacheSignature(before, targetPath);
1145
- const afterSignature = findSettingsReadCacheSignature(after, targetPath);
1146
- if (!beforeSignature || !afterSignature || !settingsReadCacheSignaturesEqual([beforeSignature], [afterSignature])) {
1147
- return false;
1148
- }
1149
- }
1150
- return true;
1151
- }
1152
- async function cacheSettingsReadResultIfStable(pmRoot, trackedPaths, result, stableSignatures, stablePaths) {
1153
- try {
1154
- const currentSignatures = await collectSettingsReadCacheSignatures(trackedPaths);
1155
- if (!selectedSettingsReadCacheSignaturesEqual(stableSignatures, currentSignatures, stablePaths)) {
1156
- clearSettingsReadCache(pmRoot);
1157
- return;
1158
- }
1159
- setSettingsReadCacheEntry(pmRoot, {
1160
- tracked_paths: trackedPaths,
1161
- signatures: currentSignatures,
1162
- value: cloneSettingsReadResult(result)
1163
- });
1164
- } catch {
1165
- clearSettingsReadCache(pmRoot);
1166
- }
1167
- }
1168
- function resolvePersistedFileBackedSchemaSections(settings, source) {
1169
- const normalizedSchema = normalizeRuntimeSchemaSettings(settings.schema);
1170
- const currentItemTypeDefinitions = normalizeItemTypeDefinitions(settings.item_types?.definitions);
1171
- if (!source) {
1172
- return {
1173
- item_type_definitions: currentItemTypeDefinitions,
1174
- schema_statuses: normalizedSchema.statuses,
1175
- schema_fields: normalizedSchema.fields,
1176
- schema_type_workflows: normalizedSchema.type_workflows
1177
- };
1178
- }
1179
- const currentTypeWorkflows = normalizedSchema.type_workflows ?? [];
1180
- const itemTypeDefinitionsUnchanged = stableValueEquals(currentItemTypeDefinitions, source.runtime_item_type_definitions);
1181
- const schemaStatusesUnchanged = stableValueEquals(normalizedSchema.statuses, source.runtime_schema_statuses);
1182
- const schemaFieldsUnchanged = stableValueEquals(normalizedSchema.fields, source.runtime_schema_fields);
1183
- const schemaTypeWorkflowsUnchanged = stableValueEquals(currentTypeWorkflows, source.runtime_schema_type_workflows);
1184
- return {
1185
- item_type_definitions: itemTypeDefinitionsUnchanged ? source.has_source_item_type_definitions ? normalizeItemTypeDefinitions(source.source_item_type_definitions) : [] : currentItemTypeDefinitions,
1186
- schema_statuses: schemaStatusesUnchanged ? source.has_source_schema_statuses ? structuredClone(source.source_schema_statuses) : [] : normalizedSchema.statuses,
1187
- schema_fields: schemaFieldsUnchanged ? source.has_source_schema_fields ? structuredClone(source.source_schema_fields) : [] : normalizedSchema.fields,
1188
- schema_type_workflows: schemaTypeWorkflowsUnchanged ? source.has_source_schema_type_workflows ? structuredClone(source.source_schema_type_workflows) : void 0 : normalizedSchema.type_workflows
1189
- };
1190
- }
1191
- function buildFallbackSettingsReadResult(warning) {
1192
- return {
1193
- settings: cloneDefaults(),
1194
- metadata: {
1195
- has_explicit_item_format: false
1196
- },
1197
- warnings: warning ? [warning] : []
1198
- };
1199
- }
1200
- function hasExplicitItemFormat(raw) {
1201
- if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
1202
- return false;
1203
- }
1204
- const itemFormat = raw.item_format;
1205
- return itemFormat === "toon" || itemFormat === "json_markdown";
1206
- }
1207
- function normalizeStringList(values) {
1208
- return [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
1209
- }
1210
- function normalizeAgentGuidanceSettings(value) {
1211
- const defaults = SETTINGS_DEFAULTS.agent_guidance;
1212
- const templateVersion = value?.template_version;
1213
- return {
1214
- prompt_completed: value?.prompt_completed === true,
1215
- declined: value?.declined === true,
1216
- declined_at: typeof value?.declined_at === "string" ? value.declined_at : defaults.declined_at,
1217
- template_version: typeof templateVersion === "number" && Number.isInteger(templateVersion) && templateVersion > 0 ? templateVersion : defaults.template_version,
1218
- last_checked_files: normalizeStringList(value?.last_checked_files ?? defaults.last_checked_files)
1219
- };
1220
- }
1221
- function normalizeLowerStringList(values) {
1222
- return [...new Set((values ?? []).map((value) => value.trim().toLowerCase()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
1223
- }
1224
- function normalizeExtensionPolicyMode(value) {
1225
- if (value === "off" || value === "warn" || value === "enforce") {
1226
- return value;
1227
- }
1228
- return SETTINGS_DEFAULTS.extensions.policy.mode;
1229
- }
1230
- function normalizeExtensionTrustMode(value) {
1231
- if (value === "off" || value === "warn" || value === "enforce") {
1232
- return value;
1233
- }
1234
- return SETTINGS_DEFAULTS.extensions.policy.trust_mode;
1235
- }
1236
- function normalizeExtensionSandboxProfile(value) {
1237
- if (value === "none" || value === "restricted" || value === "strict") {
1238
- return value;
1239
- }
1240
- return SETTINGS_DEFAULTS.extensions.policy.default_sandbox_profile;
1241
- }
1242
- function normalizeExtensionPolicyOverride(override) {
1243
- const name = override.name.trim().toLowerCase();
1244
- if (name.length === 0) {
1245
- return null;
1246
- }
1247
- const normalized = {
1248
- name
1249
- };
1250
- if (override.disabled === true) {
1251
- normalized.disabled = true;
1252
- }
1253
- if (override.require_trusted === true) {
1254
- normalized.require_trusted = true;
1255
- }
1256
- if (override.require_provenance === true) {
1257
- normalized.require_provenance = true;
1258
- }
1259
- if (override.sandbox_profile !== void 0) {
1260
- normalized.sandbox_profile = normalizeExtensionSandboxProfile(override.sandbox_profile);
1261
- }
1262
- const allowedCapabilities = normalizeLowerStringList(override.allowed_capabilities);
1263
- const blockedCapabilities = normalizeLowerStringList(override.blocked_capabilities);
1264
- const allowedSurfaces = normalizeLowerStringList(override.allowed_surfaces);
1265
- const blockedSurfaces = normalizeLowerStringList(override.blocked_surfaces);
1266
- const allowedCommands = normalizeLowerStringList(override.allowed_commands);
1267
- const blockedCommands = normalizeLowerStringList(override.blocked_commands);
1268
- const allowedActions = normalizeLowerStringList(override.allowed_actions);
1269
- const blockedActions = normalizeLowerStringList(override.blocked_actions);
1270
- const allowedServices = normalizeLowerStringList(override.allowed_services);
1271
- const blockedServices = normalizeLowerStringList(override.blocked_services);
1272
- if (allowedCapabilities.length > 0) {
1273
- normalized.allowed_capabilities = allowedCapabilities;
1274
- }
1275
- if (blockedCapabilities.length > 0) {
1276
- normalized.blocked_capabilities = blockedCapabilities;
1277
- }
1278
- if (allowedSurfaces.length > 0) {
1279
- normalized.allowed_surfaces = allowedSurfaces;
1280
- }
1281
- if (blockedSurfaces.length > 0) {
1282
- normalized.blocked_surfaces = blockedSurfaces;
1283
- }
1284
- if (allowedCommands.length > 0) {
1285
- normalized.allowed_commands = allowedCommands;
1286
- }
1287
- if (blockedCommands.length > 0) {
1288
- normalized.blocked_commands = blockedCommands;
1289
- }
1290
- if (allowedActions.length > 0) {
1291
- normalized.allowed_actions = allowedActions;
1292
- }
1293
- if (blockedActions.length > 0) {
1294
- normalized.blocked_actions = blockedActions;
1295
- }
1296
- if (allowedServices.length > 0) {
1297
- normalized.allowed_services = allowedServices;
1298
- }
1299
- if (blockedServices.length > 0) {
1300
- normalized.blocked_services = blockedServices;
1301
- }
1302
- return normalized;
1303
- }
1304
- function normalizeExtensionPolicyOverrides(overrides) {
1305
- const dedupedByName = /* @__PURE__ */ new Map();
1306
- for (const override of overrides ?? []) {
1307
- const normalized = normalizeExtensionPolicyOverride(override);
1308
- if (!normalized) {
1309
- continue;
1310
- }
1311
- dedupedByName.set(normalized.name, normalized);
1312
- }
1313
- return [...dedupedByName.values()].sort((left, right) => left.name.localeCompare(right.name));
1314
- }
1315
- function normalizePmMaxVersionExceededModeValue(value) {
1316
- return value === "block" || value === "warn" ? value : void 0;
1317
- }
1318
- function normalizePmMaxVersionExceededModeSetting(value) {
1319
- if (typeof value === "string") {
1320
- return normalizePmMaxVersionExceededModeValue(value);
1321
- }
1322
- if (typeof value === "object" && value !== null && !Array.isArray(value)) {
1323
- const global = normalizePmMaxVersionExceededModeValue(value.global);
1324
- const project = normalizePmMaxVersionExceededModeValue(value.project);
1325
- if (global === void 0 && project === void 0) {
1326
- return void 0;
1327
- }
1328
- return {
1329
- ...global !== void 0 ? { global } : {},
1330
- ...project !== void 0 ? { project } : {}
1331
- };
1332
- }
1333
- return void 0;
1334
- }
1335
- function normalizeExtensionPolicyList(policy, key) {
1336
- return normalizeLowerStringList(policy?.[key] ?? SETTINGS_DEFAULTS.extensions.policy[key]);
1337
- }
1338
- function normalizeExtensionPolicySettings(policy) {
1339
- const pmMaxVersionExceededMode2 = normalizePmMaxVersionExceededModeSetting(policy?.pm_max_version_exceeded_mode);
1340
- return {
1341
- mode: normalizeExtensionPolicyMode(policy?.mode),
1342
- trust_mode: normalizeExtensionTrustMode(policy?.trust_mode),
1343
- ...pmMaxVersionExceededMode2 !== void 0 ? { pm_max_version_exceeded_mode: pmMaxVersionExceededMode2 } : {},
1344
- require_provenance: policy?.require_provenance === true,
1345
- trusted_extensions: normalizeExtensionPolicyList(policy, "trusted_extensions"),
1346
- default_sandbox_profile: normalizeExtensionSandboxProfile(policy?.default_sandbox_profile),
1347
- allowed_extensions: normalizeExtensionPolicyList(policy, "allowed_extensions"),
1348
- blocked_extensions: normalizeExtensionPolicyList(policy, "blocked_extensions"),
1349
- allowed_capabilities: normalizeExtensionPolicyList(policy, "allowed_capabilities"),
1350
- blocked_capabilities: normalizeExtensionPolicyList(policy, "blocked_capabilities"),
1351
- allowed_surfaces: normalizeExtensionPolicyList(policy, "allowed_surfaces"),
1352
- blocked_surfaces: normalizeExtensionPolicyList(policy, "blocked_surfaces"),
1353
- allowed_commands: normalizeExtensionPolicyList(policy, "allowed_commands"),
1354
- blocked_commands: normalizeExtensionPolicyList(policy, "blocked_commands"),
1355
- allowed_actions: normalizeExtensionPolicyList(policy, "allowed_actions"),
1356
- blocked_actions: normalizeExtensionPolicyList(policy, "blocked_actions"),
1357
- allowed_services: normalizeExtensionPolicyList(policy, "allowed_services"),
1358
- blocked_services: normalizeExtensionPolicyList(policy, "blocked_services"),
1359
- extension_overrides: normalizeExtensionPolicyOverrides(policy?.extension_overrides ?? SETTINGS_DEFAULTS.extensions.policy.extension_overrides)
1360
- };
1361
- }
1362
- function normalizeValidationMetadataRequiredFields(values) {
1363
- const normalized = [...new Set((values ?? []).map((value) => value.trim().toLowerCase().replaceAll("-", "_")))].filter((value) => value.length > 0).sort((left, right) => left.localeCompare(right));
1364
- return normalized.filter((value) => [
1365
- "author",
1366
- "acceptance_criteria",
1367
- "estimated_minutes",
1368
- "close_reason",
1369
- "reviewer",
1370
- "risk",
1371
- "confidence",
1372
- "sprint",
1373
- "release"
1374
- ].includes(value));
1375
- }
1376
- function normalizeValidationPatternList(values) {
1377
- return [...new Set((values ?? []).map((value) => value.trim().toLowerCase()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
1378
- }
1379
- function valueOrDefault(value, fallback) {
1380
- return value === void 0 ? fallback : value;
1381
- }
1382
- function recordOrEmpty(value) {
1383
- return typeof value === "object" && value !== null && !Array.isArray(value) ? value : {};
1384
- }
1385
- function arrayOrEmpty(value) {
1386
- return Array.isArray(value) ? value : [];
1387
- }
1388
- function buildValidationSettings(settings, defaults, governance) {
1389
- return {
1390
- ...defaults.validation,
1391
- ...settings.validation,
1392
- parent_reference: governance.parent_reference,
1393
- metadata_profile: governance.metadata_profile,
1394
- metadata_required_fields: normalizeValidationMetadataRequiredFields(settings.validation?.metadata_required_fields),
1395
- lifecycle_stale_blocker_reason_patterns: normalizeValidationPatternList(settings.validation?.lifecycle_stale_blocker_reason_patterns ?? defaults.validation.lifecycle_stale_blocker_reason_patterns),
1396
- lifecycle_closure_like_blocked_reason_patterns: normalizeValidationPatternList(settings.validation?.lifecycle_closure_like_blocked_reason_patterns ?? defaults.validation.lifecycle_closure_like_blocked_reason_patterns),
1397
- lifecycle_closure_like_resolution_patterns: normalizeValidationPatternList(settings.validation?.lifecycle_closure_like_resolution_patterns ?? defaults.validation.lifecycle_closure_like_resolution_patterns),
1398
- lifecycle_closure_like_actual_result_patterns: normalizeValidationPatternList(settings.validation?.lifecycle_closure_like_actual_result_patterns ?? defaults.validation.lifecycle_closure_like_actual_result_patterns),
1399
- estimate_defaults_by_type: normalizeEstimateDefaultOverrides(settings.validation?.estimate_defaults_by_type)
1400
- };
1401
- }
1402
- function buildTelemetrySettings(settings, defaults) {
1403
- return {
1404
- enabled: settings.telemetry?.enabled ?? defaults.telemetry.enabled,
1405
- first_run_prompt_completed: settings.telemetry?.first_run_prompt_completed ?? defaults.telemetry.first_run_prompt_completed,
1406
- capture_level: settings.telemetry?.capture_level ?? defaults.telemetry.capture_level,
1407
- endpoint: settings.telemetry?.endpoint ?? defaults.telemetry.endpoint,
1408
- installation_id: settings.telemetry?.installation_id ?? defaults.telemetry.installation_id,
1409
- retention_days: settings.telemetry?.retention_days ?? defaults.telemetry.retention_days
1410
- };
1411
- }
1412
- function buildSearchSettings(settings, defaults) {
1413
- return {
1414
- ...defaults.search,
1415
- ...settings.search,
1416
- mutation_refresh_policy: normalizeSearchMutationRefreshPolicy(settings.search?.mutation_refresh_policy),
1417
- query_expansion: {
1418
- ...defaults.search.query_expansion,
1419
- ...settings.search?.query_expansion,
1420
- enabled: normalizeSearchQueryExpansionEnabled(settings.search?.query_expansion?.enabled),
1421
- provider: normalizeSearchQueryExpansionProvider(settings.search?.query_expansion?.provider)
1422
- },
1423
- rerank: {
1424
- ...defaults.search.rerank,
1425
- ...settings.search?.rerank,
1426
- enabled: normalizeSearchRerankEnabled(settings.search?.rerank?.enabled),
1427
- model: normalizeSearchRerankModel(settings.search?.rerank?.model),
1428
- top_k: normalizeSearchRerankTopK(settings.search?.rerank?.top_k)
1429
- }
1430
- };
1431
- }
1432
- function buildVectorStoreSettings(settings, defaults) {
1433
- return {
1434
- adapter: settings.vector_store.adapter ?? defaults.vector_store.adapter,
1435
- collection_name: normalizeVectorStoreCollectionName(settings.vector_store.collection_name),
1436
- qdrant: { ...defaults.vector_store.qdrant, ...settings.vector_store.qdrant },
1437
- lancedb: { ...defaults.vector_store.lancedb, ...settings.vector_store.lancedb }
1438
- };
1439
- }
1440
- function normalizeSettingsItemFormat(settings, defaults) {
1441
- if (settings.item_format === "json_markdown") {
1442
- return "toon";
1443
- }
1444
- return settings.item_format ?? defaults.item_format;
1445
- }
1446
- function buildContextSettings(settings, defaults) {
1447
- return {
1448
- default_depth: settings.context?.default_depth ?? defaults.context.default_depth,
1449
- activity_limit: settings.context?.activity_limit ?? defaults.context.activity_limit,
1450
- stale_threshold_days: settings.context?.stale_threshold_days ?? defaults.context.stale_threshold_days,
1451
- sections: {
1452
- ...defaults.context.sections,
1453
- ...settings.context?.sections
1454
- }
1455
- };
1456
- }
1457
- function buildProviderSettings(settings, defaults) {
1458
- return {
1459
- openai: { ...defaults.providers.openai, ...settings.providers.openai },
1460
- ollama: { ...defaults.providers.ollama, ...settings.providers.ollama }
1461
- };
1462
- }
1463
- function normalizeItemTypeDefinitions(definitions) {
1464
- const normalized = (definitions ?? []).map((definition) => normalizeItemTypeDefinition(definition)).filter((definition) => definition !== null);
1465
- const dedupedByName = /* @__PURE__ */ new Map();
1466
- for (const definition of normalized) {
1467
- dedupedByName.set(definition.name.toLowerCase(), definition);
1468
- }
1469
- return [...dedupedByName.values()].sort((left, right) => left.name.localeCompare(right.name));
1470
- }
1471
- function mergeSettings(settings) {
1472
- const defaults = cloneDefaults();
1473
- const governance = resolveGovernanceKnobs({
1474
- governance: settings.governance ?? { preset: "default" }
1475
- });
1476
- return {
1477
- ...defaults,
1478
- ...settings,
1479
- item_format: normalizeSettingsItemFormat(settings, defaults),
1480
- locks: { ...defaults.locks, ...settings.locks },
1481
- checkpoints: { ...defaults.checkpoints, ...settings.checkpoints },
1482
- output: { ...defaults.output, ...settings.output },
1483
- history: {
1484
- ...defaults.history,
1485
- ...settings.history,
1486
- compact_policy: {
1487
- ...defaults.history.compact_policy,
1488
- ...settings.history?.compact_policy
1489
- }
1490
- },
1491
- validation: buildValidationSettings(settings, defaults, governance),
1492
- governance,
1493
- workflow: {
1494
- definition_of_done: [...settings.workflow?.definition_of_done ?? defaults.workflow.definition_of_done]
1495
- },
1496
- testing: {
1497
- record_results_to_items: settings.testing?.record_results_to_items ?? defaults.testing.record_results_to_items
1498
- },
1499
- telemetry: buildTelemetrySettings(settings, defaults),
1500
- agent_guidance: normalizeAgentGuidanceSettings(settings.agent_guidance ?? defaults.agent_guidance),
1501
- item_types: {
1502
- definitions: normalizeItemTypeDefinitions(settings.item_types?.definitions)
1503
- },
1504
- schema: normalizeRuntimeSchemaSettings(settings.schema ?? defaults.schema),
1505
- context: buildContextSettings(settings, defaults),
1506
- extensions: {
1507
- enabled: [...settings.extensions.enabled],
1508
- disabled: [...settings.extensions.disabled],
1509
- policy: normalizeExtensionPolicySettings(settings.extensions.policy ?? defaults.extensions.policy)
1510
- },
1511
- search: buildSearchSettings(settings, defaults),
1512
- providers: buildProviderSettings(settings, defaults),
1513
- vector_store: buildVectorStoreSettings(settings, defaults)
1514
- };
1515
- }
1516
- function orderSerializedSettingsSections(ordered) {
1517
- ordered.locks = orderObject(ordered.locks, ["ttl_seconds", "wait_ms"]);
1518
- ordered.checkpoints = orderObject(ordered.checkpoints, ["retention_days"]);
1519
- ordered.output = orderObject(ordered.output, ["default_format"]);
1520
- ordered.history = orderObject(ordered.history, ["missing_stream", "compact_policy"]);
1521
- ordered.validation = orderObject(ordered.validation, [
1522
- "sprint_release_format",
1523
- "parent_reference",
1524
- "metadata_profile",
1525
- "metadata_required_fields",
1526
- "lifecycle_stale_blocker_reason_patterns",
1527
- "lifecycle_closure_like_blocked_reason_patterns",
1528
- "lifecycle_closure_like_resolution_patterns",
1529
- "lifecycle_closure_like_actual_result_patterns",
1530
- "estimate_defaults_by_type"
1531
- ]);
1532
- ordered.governance = orderObject(ordered.governance, [
1533
- "preset",
1534
- "ownership_enforcement",
1535
- "create_mode_default",
1536
- "close_validation_default",
1537
- "require_close_reason",
1538
- "parent_reference",
1539
- "metadata_profile",
1540
- "force_required_for_stale_lock",
1541
- "create_default_type",
1542
- "workflow_enforcement"
1543
- ]);
1544
- ordered.workflow = orderObject(ordered.workflow, ["definition_of_done"]);
1545
- ordered.testing = orderObject(ordered.testing, ["record_results_to_items"]);
1546
- ordered.telemetry = orderObject(ordered.telemetry, [
1547
- "enabled",
1548
- "first_run_prompt_completed",
1549
- "capture_level",
1550
- "endpoint",
1551
- "installation_id",
1552
- "retention_days"
1553
- ]);
1554
- ordered.agent_guidance = orderObject(ordered.agent_guidance, [
1555
- "prompt_completed",
1556
- "declined",
1557
- "declined_at",
1558
- "template_version",
1559
- "last_checked_files"
1560
- ]);
1561
- ordered.item_types = orderObject(ordered.item_types, ["definitions"]);
1562
- ordered.schema = orderObject(ordered.schema, [
1563
- "version",
1564
- "files",
1565
- "statuses",
1566
- "fields",
1567
- "workflow",
1568
- "type_workflows",
1569
- "unknown_field_policy"
1570
- ]);
1571
- ordered.schema.files = orderObject(recordOrEmpty(ordered.schema.files), ["types", "statuses", "fields", "workflows"]);
1572
- ordered.schema.workflow = orderObject(recordOrEmpty(ordered.schema.workflow), ["draft_status", "open_status", "in_progress_status", "blocked_status", "close_status", "canceled_status"]);
1573
- ordered.context = orderObject(ordered.context, [
1574
- "default_depth",
1575
- "activity_limit",
1576
- "stale_threshold_days",
1577
- "sections"
1578
- ]);
1579
- ordered.context.sections = orderObject(recordOrEmpty(ordered.context.sections), ["hierarchy", "activity", "progress", "blockers", "files", "workload", "staleness", "tests"]);
1580
- ordered.extensions = orderObject(ordered.extensions, ["enabled", "disabled", "policy"]);
1581
- ordered.extensions.policy = orderObject(recordOrEmpty(ordered.extensions.policy), [
1582
- "mode",
1583
- "trust_mode",
1584
- "pm_max_version_exceeded_mode",
1585
- "require_provenance",
1586
- "trusted_extensions",
1587
- "default_sandbox_profile",
1588
- "allowed_extensions",
1589
- "blocked_extensions",
1590
- "allowed_capabilities",
1591
- "blocked_capabilities",
1592
- "allowed_surfaces",
1593
- "blocked_surfaces",
1594
- "allowed_commands",
1595
- "blocked_commands",
1596
- "allowed_actions",
1597
- "blocked_actions",
1598
- "allowed_services",
1599
- "blocked_services",
1600
- "extension_overrides"
1601
- ]);
1602
- ordered.extensions.policy.extension_overrides = arrayOrEmpty(ordered.extensions.policy.extension_overrides).map((entry) => orderObject(recordOrEmpty(entry), [
1603
- "name",
1604
- "disabled",
1605
- "require_trusted",
1606
- "require_provenance",
1607
- "sandbox_profile",
1608
- "allowed_capabilities",
1609
- "blocked_capabilities",
1610
- "allowed_surfaces",
1611
- "blocked_surfaces",
1612
- "allowed_commands",
1613
- "blocked_commands",
1614
- "allowed_actions",
1615
- "blocked_actions",
1616
- "allowed_services",
1617
- "blocked_services"
1618
- ]));
1619
- ordered.search = orderObject(ordered.search, [
1620
- "score_threshold",
1621
- "hybrid_semantic_weight",
1622
- "max_results",
1623
- "embedding_model",
1624
- "embedding_corpus_max_characters",
1625
- "embedding_batch_size",
1626
- "embedding_timeout_ms",
1627
- "scanner_max_batch_retries",
1628
- "provider",
1629
- "mutation_refresh_policy",
1630
- "query_expansion",
1631
- "rerank"
1632
- ]);
1633
- ordered.search.query_expansion = orderObject(recordOrEmpty(ordered.search.query_expansion), ["enabled", "provider"]);
1634
- ordered.search.rerank = orderObject(recordOrEmpty(ordered.search.rerank), ["enabled", "model", "top_k"]);
1635
- ordered.providers = orderObject(ordered.providers, ["openai", "ollama"]);
1636
- ordered.providers.openai = orderObject(recordOrEmpty(ordered.providers.openai), ["base_url", "api_key", "model"]);
1637
- ordered.providers.ollama = orderObject(recordOrEmpty(ordered.providers.ollama), ["base_url", "model"]);
1638
- ordered.vector_store = orderObject(ordered.vector_store, [
1639
- "adapter",
1640
- "collection_name",
1641
- "qdrant",
1642
- "lancedb"
1643
- ]);
1644
- ordered.vector_store.qdrant = orderObject(recordOrEmpty(ordered.vector_store.qdrant), ["url", "api_key"]);
1645
- ordered.vector_store.lancedb = orderObject(recordOrEmpty(ordered.vector_store.lancedb), ["path"]);
1646
- }
1647
- function buildSerializeBaseSettings(settings) {
1648
- return {
1649
- ...settings,
1650
- locks: valueOrDefault(settings.locks, SETTINGS_DEFAULTS.locks),
1651
- checkpoints: valueOrDefault(settings.checkpoints, SETTINGS_DEFAULTS.checkpoints),
1652
- output: valueOrDefault(settings.output, SETTINGS_DEFAULTS.output),
1653
- history: valueOrDefault(settings.history, SETTINGS_DEFAULTS.history),
1654
- validation: valueOrDefault(settings.validation, SETTINGS_DEFAULTS.validation),
1655
- workflow: valueOrDefault(settings.workflow, SETTINGS_DEFAULTS.workflow),
1656
- testing: valueOrDefault(settings.testing, SETTINGS_DEFAULTS.testing),
1657
- telemetry: valueOrDefault(settings.telemetry, SETTINGS_DEFAULTS.telemetry),
1658
- agent_guidance: valueOrDefault(settings.agent_guidance, SETTINGS_DEFAULTS.agent_guidance),
1659
- item_types: valueOrDefault(settings.item_types, SETTINGS_DEFAULTS.item_types),
1660
- schema: valueOrDefault(settings.schema, SETTINGS_DEFAULTS.schema),
1661
- context: valueOrDefault(settings.context, SETTINGS_DEFAULTS.context),
1662
- extensions: valueOrDefault(settings.extensions, SETTINGS_DEFAULTS.extensions),
1663
- search: valueOrDefault(settings.search, SETTINGS_DEFAULTS.search),
1664
- providers: valueOrDefault(settings.providers, SETTINGS_DEFAULTS.providers),
1665
- vector_store: valueOrDefault(settings.vector_store, SETTINGS_DEFAULTS.vector_store)
1666
- };
1667
- }
1668
- function buildSerializedValidationSettings(baseSettings, governance) {
1669
- return {
1670
- ...baseSettings.validation,
1671
- parent_reference: governance.parent_reference,
1672
- metadata_profile: governance.metadata_profile,
1673
- metadata_required_fields: normalizeValidationMetadataRequiredFields(baseSettings.validation?.metadata_required_fields),
1674
- lifecycle_stale_blocker_reason_patterns: normalizeValidationPatternList(baseSettings.validation?.lifecycle_stale_blocker_reason_patterns ?? SETTINGS_DEFAULTS.validation.lifecycle_stale_blocker_reason_patterns),
1675
- lifecycle_closure_like_blocked_reason_patterns: normalizeValidationPatternList(baseSettings.validation?.lifecycle_closure_like_blocked_reason_patterns ?? SETTINGS_DEFAULTS.validation.lifecycle_closure_like_blocked_reason_patterns),
1676
- lifecycle_closure_like_resolution_patterns: normalizeValidationPatternList(baseSettings.validation?.lifecycle_closure_like_resolution_patterns ?? SETTINGS_DEFAULTS.validation.lifecycle_closure_like_resolution_patterns),
1677
- lifecycle_closure_like_actual_result_patterns: normalizeValidationPatternList(baseSettings.validation?.lifecycle_closure_like_actual_result_patterns ?? SETTINGS_DEFAULTS.validation.lifecycle_closure_like_actual_result_patterns),
1678
- estimate_defaults_by_type: normalizeEstimateDefaultOverrides(baseSettings.validation?.estimate_defaults_by_type)
1679
- };
1680
- }
1681
- function buildSerializedSearchSettings(baseSettings) {
1682
- return {
1683
- ...SETTINGS_DEFAULTS.search,
1684
- ...baseSettings.search,
1685
- mutation_refresh_policy: normalizeSearchMutationRefreshPolicy(baseSettings.search?.mutation_refresh_policy),
1686
- query_expansion: {
1687
- ...SETTINGS_DEFAULTS.search.query_expansion,
1688
- ...baseSettings.search?.query_expansion,
1689
- enabled: normalizeSearchQueryExpansionEnabled(baseSettings.search?.query_expansion?.enabled),
1690
- provider: normalizeSearchQueryExpansionProvider(baseSettings.search?.query_expansion?.provider)
1691
- },
1692
- rerank: {
1693
- ...SETTINGS_DEFAULTS.search.rerank,
1694
- ...baseSettings.search?.rerank,
1695
- enabled: normalizeSearchRerankEnabled(baseSettings.search?.rerank?.enabled),
1696
- model: normalizeSearchRerankModel(baseSettings.search?.rerank?.model),
1697
- top_k: normalizeSearchRerankTopK(baseSettings.search?.rerank?.top_k)
1698
- }
1699
- };
1700
- }
1701
- function buildSerializedContextSettings(baseSettings) {
1702
- return {
1703
- default_depth: baseSettings.context?.default_depth ?? SETTINGS_DEFAULTS.context.default_depth,
1704
- activity_limit: baseSettings.context?.activity_limit ?? SETTINGS_DEFAULTS.context.activity_limit,
1705
- stale_threshold_days: baseSettings.context?.stale_threshold_days ?? SETTINGS_DEFAULTS.context.stale_threshold_days,
1706
- sections: {
1707
- ...SETTINGS_DEFAULTS.context.sections,
1708
- ...baseSettings.context?.sections
1709
- }
1710
- };
1711
- }
1712
- function buildSerializedVectorStoreSettings(baseSettings) {
1713
- return {
1714
- ...baseSettings.vector_store,
1715
- adapter: baseSettings.vector_store?.adapter ?? SETTINGS_DEFAULTS.vector_store.adapter,
1716
- collection_name: normalizeVectorStoreCollectionName(baseSettings.vector_store?.collection_name),
1717
- qdrant: { ...baseSettings.vector_store?.qdrant },
1718
- lancedb: { ...baseSettings.vector_store?.lancedb }
1719
- };
1720
- }
1721
- function buildNormalizedSettingsForSerialization(baseSettings, governance, normalizedSchema, persistedFileBackedSections) {
1722
- return {
1723
- ...baseSettings,
1724
- item_format: "toon",
1725
- validation: buildSerializedValidationSettings(baseSettings, governance),
1726
- governance,
1727
- agent_guidance: normalizeAgentGuidanceSettings(baseSettings.agent_guidance),
1728
- item_types: {
1729
- definitions: persistedFileBackedSections.item_type_definitions
1730
- },
1731
- schema: {
1732
- ...normalizedSchema,
1733
- statuses: persistedFileBackedSections.schema_statuses,
1734
- fields: persistedFileBackedSections.schema_fields,
1735
- type_workflows: persistedFileBackedSections.schema_type_workflows
1736
- },
1737
- search: buildSerializedSearchSettings(baseSettings),
1738
- context: buildSerializedContextSettings(baseSettings),
1739
- extensions: {
1740
- enabled: normalizeStringList(baseSettings.extensions?.enabled),
1741
- disabled: normalizeStringList(baseSettings.extensions?.disabled),
1742
- policy: normalizeExtensionPolicySettings(baseSettings.extensions?.policy)
1743
- },
1744
- vector_store: buildSerializedVectorStoreSettings(baseSettings)
1745
- };
1746
- }
1747
- function serializeSettings(settings, options = {}) {
1748
- const baseSettings = buildSerializeBaseSettings(settings);
1749
- const governance = resolveGovernanceKnobs(baseSettings);
1750
- const normalizedSchema = normalizeRuntimeSchemaSettings(baseSettings.schema);
1751
- const persistedFileBackedSections = resolvePersistedFileBackedSchemaSections(baseSettings, options.persist_source);
1752
- const normalizedSettings = buildNormalizedSettingsForSerialization(baseSettings, governance, normalizedSchema, persistedFileBackedSections);
1753
- const ordered = orderObject({
1754
- ...normalizedSettings,
1755
- governance: normalizeGovernanceForPersist(governance)
1756
- }, [
1757
- "version",
1758
- "id_prefix",
1759
- "author_default",
1760
- "item_format",
1761
- "locks",
1762
- "checkpoints",
1763
- "output",
1764
- "history",
1765
- "validation",
1766
- "governance",
1767
- "workflow",
1768
- "testing",
1769
- "telemetry",
1770
- "agent_guidance",
1771
- "item_types",
1772
- "schema",
1773
- "context",
1774
- "extensions",
1775
- "search",
1776
- "providers",
1777
- "vector_store"
1778
- ]);
1779
- orderSerializedSettingsSections(ordered);
1780
- return `${JSON.stringify(ordered, null, 2)}
1781
- `;
1782
- }
1783
- async function readSettingsWithMetadata(pmRoot) {
1784
- const settingsPath = getSettingsPath(pmRoot);
1785
- let trackedPathsForFailure = [settingsPath];
1786
- await runActiveOnReadHooks({
1787
- path: settingsPath,
1788
- scope: "project"
1789
- });
1790
- const cachedResult = getSettingsReadCacheEntry(pmRoot);
1791
- if (cachedResult) {
1792
- const currentSignatures = await collectSettingsReadCacheSignatures(cachedResult.tracked_paths);
1793
- if (settingsReadCacheSignaturesEqual(currentSignatures, cachedResult.signatures)) {
1794
- return cloneSettingsReadResult(cachedResult.value);
1795
- }
1796
- }
1797
- const settingsOnlySignatures = await collectSettingsReadCacheSignatures([settingsPath]);
1798
- const raw = await readFileIfExists(settingsPath);
1799
- if (raw === null) {
1800
- const fallback = buildFallbackSettingsReadResult();
1801
- await cacheSettingsReadResultIfStable(pmRoot, [settingsPath], fallback, settingsOnlySignatures, [settingsPath]);
1802
- return fallback;
1803
- }
1804
- const settingsSignaturesAfterRead = await collectSettingsReadCacheSignatures([settingsPath]);
1805
- if (!settingsReadCacheSignaturesEqual(settingsOnlySignatures, settingsSignaturesAfterRead)) {
1806
- clearSettingsReadCache(pmRoot);
1807
- return readSettingsWithMetadata(pmRoot);
1808
- }
1809
- let parsed;
1810
- try {
1811
- parsed = JSON.parse(raw);
1812
- } catch {
1813
- const fallback = buildFallbackSettingsReadResult("settings_read_invalid_json");
1814
- await cacheSettingsReadResultIfStable(pmRoot, [settingsPath], fallback, settingsSignaturesAfterRead, [settingsPath]);
1815
- return fallback;
1816
- }
1817
- const validated = validateSettings(parsed);
1818
- if (!validated.success) {
1819
- const fallback = buildFallbackSettingsReadResult("settings_read_invalid_schema");
1820
- await cacheSettingsReadResultIfStable(pmRoot, [settingsPath], fallback, settingsSignaturesAfterRead, [settingsPath]);
1821
- return fallback;
1822
- }
1823
- try {
1824
- const mergedSettings = mergeSettings(validated.data);
1825
- const trackedPaths = resolveSettingsReadTrackedPaths(pmRoot, mergedSettings.schema, settingsPath);
1826
- trackedPathsForFailure = trackedPaths;
1827
- const signaturesBeforeSchemaLoad = await collectSettingsReadCacheSignatures(trackedPaths);
1828
- const schemaScaffold = await ensureRuntimeSchemaFileScaffold(pmRoot, mergedSettings.schema);
1829
- const loadedSchemaSections = await loadRuntimeSchemaFromOptionalFiles(pmRoot, mergedSettings.schema);
1830
- const signaturesAfterSchemaLoad = await collectSettingsReadCacheSignatures(trackedPaths);
1831
- const settings = {
1832
- ...mergedSettings,
1833
- item_types: {
1834
- definitions: normalizeItemTypeDefinitions([
1835
- ...mergedSettings.item_types.definitions,
1836
- ...arrayOrEmpty(loadedSchemaSections.type_definitions_from_file)
1837
- ])
1838
- },
1839
- schema: loadedSchemaSections.schema
1840
- };
1841
- attachSettingsPersistSourceSnapshot(settings, buildSettingsPersistSourceSnapshot(validated.data, settings));
1842
- const result = {
1843
- settings,
1844
- metadata: {
1845
- has_explicit_item_format: hasExplicitItemFormat(parsed)
1846
- },
1847
- warnings: [
1848
- ...validated.data.item_format === "json_markdown" ? ["settings_item_format_legacy_json_markdown_coerced_to_toon"] : [],
1849
- ...schemaScaffold.created_paths.map((createdPath) => `runtime_schema_bootstrap_created:${createdPath}`),
1850
- ...loadedSchemaSections.warnings
1851
- ]
1852
- };
1853
- if (schemaScaffold.created_paths.length === 0) {
1854
- if (!settingsReadCacheSignaturesEqual(signaturesBeforeSchemaLoad, signaturesAfterSchemaLoad)) {
1855
- clearSettingsReadCache(pmRoot);
1856
- } else {
1857
- setSettingsReadCacheEntry(pmRoot, {
1858
- tracked_paths: trackedPaths,
1859
- signatures: signaturesAfterSchemaLoad,
1860
- value: cloneSettingsReadResult(result)
1861
- });
1862
- }
1863
- } else {
1864
- clearSettingsReadCache(pmRoot);
1865
- }
1866
- return result;
1867
- } catch {
1868
- const fallback = buildFallbackSettingsReadResult("settings_read_merge_failed");
1869
- await cacheSettingsReadResultSafe(pmRoot, trackedPathsForFailure, fallback);
1870
- return fallback;
1871
- }
1872
- }
1873
- async function readSettings(pmRoot) {
1874
- return (await readSettingsWithMetadata(pmRoot)).settings;
1875
- }
1876
- async function writeSettings(pmRoot, settings, op = SETTINGS_WRITE_OP) {
1877
- const settingsPath = getSettingsPath(pmRoot);
1878
- await writeFileAtomic(settingsPath, serializeSettings(settings, {
1879
- persist_source: getSettingsPersistSourceSnapshot(settings)
1880
- }));
1881
- try {
1882
- await runActiveOnWriteHooks({
1883
- path: settingsPath,
1884
- scope: "project",
1885
- op
1886
- });
1887
- } finally {
1888
- clearSettingsReadCache(pmRoot);
1889
- }
1890
- }
1891
-
1892
- export {
1893
- setActiveExtensionHooks,
1894
- setActiveExtensionCommands,
1895
- setActiveExtensionParsers,
1896
- setActiveExtensionPreflight,
1897
- setActiveExtensionServices,
1898
- setActiveExtensionRenderers,
1899
- setActiveExtensionRegistrations,
1900
- getActiveExtensionRegistrations,
1901
- setActiveCommandContext,
1902
- setActiveCommandResult,
1903
- getActiveCommandResult,
1904
- recordAfterCommandAffectedItem,
1905
- projectAfterCommandItemSnapshot,
1906
- consumeAfterCommandAffectedItems,
1907
- clearActiveExtensionHooks,
1908
- runActiveOnWriteHooks,
1909
- runActiveOnReadHooks,
1910
- hasActiveOnReadHooks,
1911
- runActiveOnIndexHooks,
1912
- runActiveCommandOverride,
1913
- runActiveCommandHandler,
1914
- runActiveParserOverride,
1915
- runActivePreflightOverride,
1916
- runActiveRendererOverride,
1917
- runActiveServiceOverride,
1918
- runActiveServiceOverrideSync,
1919
- PmCliError,
1920
- stableStringify,
1921
- stableValueEquals,
1922
- sha256Hex,
1923
- orderObject,
1924
- resolveEstimateDefaultMinutes,
1925
- resolveGovernanceKnobs,
1926
- readSettingsWithMetadata,
1927
- readSettings,
1928
- writeSettings
1929
- };
1930
- //# sourceMappingURL=chunk-E3SZTQ4K.js.map
1931
-
1932
- //# debugId=d4ede2fb-7525-501d-a1f0-77276019f794