@unbrained/pm-cli 2026.6.24 → 2026.7.1

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 (744) hide show
  1. package/AGENTS.md +2 -0
  2. package/CHANGELOG.md +113 -1
  3. package/CONTRIBUTING.md +30 -0
  4. package/README.md +16 -3
  5. package/dist/cli/bootstrap-args.js +89 -79
  6. package/dist/cli/bootstrap-args.js.map +1 -1
  7. package/dist/cli/commander-usage.js +3 -3
  8. package/dist/cli/commander-usage.js.map +1 -1
  9. package/dist/cli/commands/aggregate.js +8 -7
  10. package/dist/cli/commands/aggregate.js.map +1 -1
  11. package/dist/cli/commands/calendar.js +63 -62
  12. package/dist/cli/commands/calendar.js.map +1 -1
  13. package/dist/cli/commands/close.d.ts +2 -4
  14. package/dist/cli/commands/close.js +5 -17
  15. package/dist/cli/commands/close.js.map +1 -1
  16. package/dist/cli/commands/completion.js +158 -9
  17. package/dist/cli/commands/completion.js.map +1 -1
  18. package/dist/cli/commands/config.d.ts +1 -1
  19. package/dist/cli/commands/config.js +2 -2
  20. package/dist/cli/commands/config.js.map +1 -1
  21. package/dist/cli/commands/context.d.ts +31 -4
  22. package/dist/cli/commands/context.js +33 -10
  23. package/dist/cli/commands/context.js.map +1 -1
  24. package/dist/cli/commands/contracts.js +48 -8
  25. package/dist/cli/commands/contracts.js.map +1 -1
  26. package/dist/cli/commands/create.d.ts +1 -6
  27. package/dist/cli/commands/create.js +491 -587
  28. package/dist/cli/commands/create.js.map +1 -1
  29. package/dist/cli/commands/extension/bundled-catalog.js +59 -46
  30. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  31. package/dist/cli/commands/extension/describe.d.ts +15 -0
  32. package/dist/cli/commands/extension/describe.js +48 -2
  33. package/dist/cli/commands/extension/describe.js.map +1 -1
  34. package/dist/cli/commands/extension/doctor.js +129 -75
  35. package/dist/cli/commands/extension/doctor.js.map +1 -1
  36. package/dist/cli/commands/extension/install-sources.js +37 -7
  37. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  38. package/dist/cli/commands/extension/managed-state.js +101 -57
  39. package/dist/cli/commands/extension/managed-state.js.map +1 -1
  40. package/dist/cli/commands/extension/scaffold.d.ts +38 -8
  41. package/dist/cli/commands/extension/scaffold.js +1956 -242
  42. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  43. package/dist/cli/commands/extension.d.ts +28 -3
  44. package/dist/cli/commands/extension.js +1181 -880
  45. package/dist/cli/commands/extension.js.map +1 -1
  46. package/dist/cli/commands/index.d.ts +3 -1
  47. package/dist/cli/commands/index.js +5 -3
  48. package/dist/cli/commands/index.js.map +1 -1
  49. package/dist/cli/commands/item-filter-options.d.ts +63 -0
  50. package/dist/cli/commands/item-filter-options.js +10 -0
  51. package/dist/cli/commands/item-filter-options.js.map +1 -0
  52. package/dist/cli/commands/legacy-none-tokens.d.ts +14 -0
  53. package/dist/cli/commands/legacy-none-tokens.js +31 -2
  54. package/dist/cli/commands/legacy-none-tokens.js.map +1 -1
  55. package/dist/cli/commands/linked-artifacts.d.ts +7 -0
  56. package/dist/cli/commands/linked-artifacts.js +12 -2
  57. package/dist/cli/commands/linked-artifacts.js.map +1 -1
  58. package/dist/cli/commands/list-filter-shared.js +55 -48
  59. package/dist/cli/commands/list-filter-shared.js.map +1 -1
  60. package/dist/cli/commands/list.d.ts +16 -39
  61. package/dist/cli/commands/list.js +127 -118
  62. package/dist/cli/commands/list.js.map +1 -1
  63. package/dist/cli/commands/next.d.ts +98 -0
  64. package/dist/cli/commands/next.js +304 -0
  65. package/dist/cli/commands/next.js.map +1 -0
  66. package/dist/cli/commands/profile.d.ts +208 -0
  67. package/dist/cli/commands/profile.js +418 -0
  68. package/dist/cli/commands/profile.js.map +1 -0
  69. package/dist/cli/commands/repeatable-metadata-parsers.js +12 -13
  70. package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -1
  71. package/dist/cli/commands/schema.d.ts +7 -0
  72. package/dist/cli/commands/schema.js +9 -3
  73. package/dist/cli/commands/schema.js.map +1 -1
  74. package/dist/cli/commands/search.d.ts +2 -39
  75. package/dist/cli/commands/search.js +196 -172
  76. package/dist/cli/commands/search.js.map +1 -1
  77. package/dist/cli/commands/shared-unset-fields.d.ts +30 -0
  78. package/dist/cli/commands/shared-unset-fields.js +161 -0
  79. package/dist/cli/commands/shared-unset-fields.js.map +1 -0
  80. package/dist/cli/commands/stats.js +15 -3
  81. package/dist/cli/commands/stats.js.map +1 -1
  82. package/dist/cli/commands/test.js +115 -125
  83. package/dist/cli/commands/test.js.map +1 -1
  84. package/dist/cli/commands/update.d.ts +1 -6
  85. package/dist/cli/commands/update.js +37 -232
  86. package/dist/cli/commands/update.js.map +1 -1
  87. package/dist/cli/commands/validate.js +20 -5
  88. package/dist/cli/commands/validate.js.map +1 -1
  89. package/dist/cli/extension-command-options.js +48 -21
  90. package/dist/cli/extension-command-options.js.map +1 -1
  91. package/dist/cli/help-content.js +26 -2
  92. package/dist/cli/help-content.js.map +1 -1
  93. package/dist/cli/help-json-payload.js +3 -3
  94. package/dist/cli/help-json-payload.js.map +1 -1
  95. package/dist/cli/main.js +27 -12
  96. package/dist/cli/main.js.map +1 -1
  97. package/dist/cli/register-list-query.js +42 -3
  98. package/dist/cli/register-list-query.js.map +1 -1
  99. package/dist/cli/register-mutation.js +86 -2
  100. package/dist/cli/register-mutation.js.map +1 -1
  101. package/dist/cli/register-setup.js +67 -6
  102. package/dist/cli/register-setup.js.map +1 -1
  103. package/dist/cli/registration-helpers.d.ts +9 -1
  104. package/dist/cli/registration-helpers.js +149 -123
  105. package/dist/cli/registration-helpers.js.map +1 -1
  106. package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +16 -0
  107. package/dist/cli-bundle/chunks/{activity-N7RVTLBQ.js → activity-DBLQVIP6.js} +9 -11
  108. package/dist/cli-bundle/chunks/{aggregate-63NWNIBR.js → aggregate-JTEF4BP7.js} +17 -18
  109. package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +1 -0
  110. package/dist/cli-bundle/chunks/{aggregate-YHCYX2EV.js → aggregate-SDF7DUOD.js} +16 -17
  111. package/dist/cli-bundle/chunks/aggregate-SDF7DUOD.js.map +7 -0
  112. package/dist/cli-bundle/chunks/{append-VLQQDHMJ.js → append-LOVPGVPT.js} +8 -10
  113. package/dist/cli-bundle/chunks/{append-VLQQDHMJ.js.map → append-LOVPGVPT.js.map} +1 -1
  114. package/dist/cli-bundle/chunks/{append-PUKREFV5.js → append-QCFJSDFL.js} +10 -12
  115. package/dist/cli-bundle/chunks/{append-PUKREFV5.js.map → append-QCFJSDFL.js.map} +1 -1
  116. package/dist/cli-bundle/chunks/{chunk-ABYCA5VX.js → chunk-22WKIL3H.js} +9 -11
  117. package/dist/cli-bundle/chunks/{chunk-ABYCA5VX.js.map → chunk-22WKIL3H.js.map} +1 -1
  118. package/dist/cli-bundle/chunks/{chunk-A66VYUOV.js → chunk-2466X6E4.js} +9 -11
  119. package/dist/cli-bundle/chunks/{chunk-A66VYUOV.js.map → chunk-2466X6E4.js.map} +1 -1
  120. package/dist/cli-bundle/chunks/{chunk-F32L4HR6.js → chunk-27BXPBAY.js} +3 -3
  121. package/dist/cli-bundle/chunks/{schema-QO5I4FBL.js → chunk-2D4HATP2.js} +136 -66
  122. package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +1 -0
  123. package/dist/cli-bundle/chunks/{chunk-J7I4C5ZB.js → chunk-3J6JRJ3I.js} +153 -125
  124. package/dist/cli-bundle/chunks/chunk-3J6JRJ3I.js.map +7 -0
  125. package/dist/cli-bundle/chunks/{chunk-OHDQNKJB.js → chunk-3K2M5OYU.js} +106 -34
  126. package/dist/cli-bundle/chunks/chunk-3K2M5OYU.js.map +7 -0
  127. package/dist/cli-bundle/chunks/{chunk-XVYKWZNL.js → chunk-3S2KT7NG.js} +127 -127
  128. package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +7 -0
  129. package/dist/cli-bundle/chunks/{chunk-5BBEWX6C.js → chunk-3VGN2UWE.js} +2 -2
  130. package/dist/cli-bundle/chunks/{chunk-N5B6WZC5.js → chunk-3XZCOZ5J.js} +115 -123
  131. package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +1 -0
  132. package/dist/cli-bundle/chunks/chunk-4A3BJ675.js +799 -0
  133. package/dist/cli-bundle/chunks/chunk-4A3BJ675.js.map +1 -0
  134. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +87 -0
  135. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +7 -0
  136. package/dist/cli-bundle/chunks/{chunk-HZF5RLKX.js → chunk-4DSGXSBL.js} +5 -7
  137. package/dist/cli-bundle/chunks/{chunk-HZF5RLKX.js.map → chunk-4DSGXSBL.js.map} +1 -1
  138. package/dist/cli-bundle/chunks/{chunk-JV27C7OZ.js → chunk-4DUVCVLZ.js} +4 -6
  139. package/dist/cli-bundle/chunks/{chunk-JV27C7OZ.js.map → chunk-4DUVCVLZ.js.map} +1 -1
  140. package/dist/cli-bundle/chunks/{chunk-IAP5KYBQ.js → chunk-4XOIEKSD.js} +563 -506
  141. package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +1 -0
  142. package/dist/cli-bundle/chunks/{context-5LB7UGKE.js → chunk-55SNVXRQ.js} +79 -82
  143. package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +7 -0
  144. package/dist/cli-bundle/chunks/{chunk-BFFO3AIB.js → chunk-5CGRF3L5.js} +128 -128
  145. package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +1 -0
  146. package/dist/cli-bundle/chunks/{chunk-JKL6HRMV.js → chunk-5QFDBI4F.js} +1260 -1046
  147. package/dist/cli-bundle/chunks/chunk-5QFDBI4F.js.map +7 -0
  148. package/dist/cli-bundle/chunks/{chunk-LU36E6GU.js → chunk-64HNBBFQ.js} +8 -12
  149. package/dist/cli-bundle/chunks/{chunk-LU36E6GU.js.map → chunk-64HNBBFQ.js.map} +1 -1
  150. package/dist/cli-bundle/chunks/chunk-6AQZPVHQ.js +2444 -0
  151. package/dist/cli-bundle/chunks/chunk-6AQZPVHQ.js.map +1 -0
  152. package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js +17 -0
  153. package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js.map +7 -0
  154. package/dist/cli-bundle/chunks/{chunk-VSAABFGQ.js → chunk-7R4QEMZZ.js} +1490 -734
  155. package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +1 -0
  156. package/dist/cli-bundle/chunks/{chunk-M6TUBOGW.js → chunk-A7FPBAQS.js} +19 -12
  157. package/dist/cli-bundle/chunks/chunk-A7FPBAQS.js.map +1 -0
  158. package/dist/cli-bundle/chunks/{chunk-GQYJEEFX.js → chunk-AVEE5EHK.js} +53 -54
  159. package/dist/cli-bundle/chunks/chunk-AVEE5EHK.js.map +1 -0
  160. package/dist/cli-bundle/chunks/{chunk-FMWW2JDU.js → chunk-AXIDKKAT.js} +2 -2
  161. package/dist/cli-bundle/chunks/{chunk-TIM4OD74.js → chunk-BDTISOSD.js} +2 -2
  162. package/dist/cli-bundle/chunks/{chunk-C4C3EJCJ.js → chunk-BHO33VBQ.js} +509 -363
  163. package/dist/cli-bundle/chunks/chunk-BHO33VBQ.js.map +7 -0
  164. package/dist/cli-bundle/chunks/{chunk-6W3Y65PL.js → chunk-BZCEN4JA.js} +198 -177
  165. package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +7 -0
  166. package/dist/cli-bundle/chunks/{chunk-RRP6D345.js → chunk-CF7RL6FR.js} +12 -16
  167. package/dist/cli-bundle/chunks/{chunk-RRP6D345.js.map → chunk-CF7RL6FR.js.map} +1 -1
  168. package/dist/cli-bundle/chunks/{chunk-HC2S36NB.js → chunk-CWFNTKQJ.js} +154 -126
  169. package/dist/cli-bundle/chunks/chunk-CWFNTKQJ.js.map +1 -0
  170. package/dist/cli-bundle/chunks/chunk-CZVISY5A.js +87 -0
  171. package/dist/cli-bundle/chunks/chunk-CZVISY5A.js.map +7 -0
  172. package/dist/cli-bundle/chunks/{chunk-CZIFFMZI.js → chunk-DDPTYJIM.js} +2 -2
  173. package/dist/cli-bundle/chunks/{chunk-AYPQUFCX.js → chunk-EJUDVUYZ.js} +3 -3
  174. package/dist/cli-bundle/chunks/{chunk-EOGBMLCE.js → chunk-EVMTBV6V.js} +3 -3
  175. package/dist/cli-bundle/chunks/{chunk-RAWA3Y7O.js → chunk-FFMQB7WR.js} +199 -178
  176. package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +1 -0
  177. package/dist/cli-bundle/chunks/{chunk-CG3KP6I5.js → chunk-G7I7DEZA.js} +4 -4
  178. package/dist/cli-bundle/chunks/{chunk-MEXZ5XUM.js → chunk-GJ326ZKX.js} +53 -54
  179. package/dist/cli-bundle/chunks/chunk-GJ326ZKX.js.map +7 -0
  180. package/dist/cli-bundle/chunks/chunk-HPPFYYOV.js +119 -0
  181. package/dist/cli-bundle/chunks/chunk-HPPFYYOV.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{chunk-OF7V47P3.js → chunk-HXTQJXWT.js} +2172 -2146
  183. package/dist/cli-bundle/chunks/chunk-HXTQJXWT.js.map +1 -0
  184. package/dist/cli-bundle/chunks/{chunk-F4BNR2IN.js → chunk-HYTGA6GI.js} +3 -3
  185. package/dist/cli-bundle/chunks/{chunk-2WCYE3IF.js → chunk-HZZEHPRG.js} +2 -2
  186. package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js +14 -0
  187. package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js.map +1 -0
  188. package/dist/cli-bundle/chunks/{chunk-YV2OSAMS.js → chunk-IJYK2T43.js} +2 -2
  189. package/dist/cli-bundle/chunks/{chunk-4XDGYFHL.js → chunk-IPYBJWTE.js} +10 -14
  190. package/dist/cli-bundle/chunks/{chunk-4XDGYFHL.js.map → chunk-IPYBJWTE.js.map} +1 -1
  191. package/dist/cli-bundle/chunks/{chunk-6EBNFQOR.js → chunk-IZBR4NRW.js} +10 -14
  192. package/dist/cli-bundle/chunks/{chunk-6EBNFQOR.js.map → chunk-IZBR4NRW.js.map} +1 -1
  193. package/dist/cli-bundle/chunks/{chunk-VFJYVXHL.js → chunk-JLM7BHI7.js} +7 -9
  194. package/dist/cli-bundle/chunks/{chunk-VFJYVXHL.js.map → chunk-JLM7BHI7.js.map} +1 -1
  195. package/dist/cli-bundle/chunks/{chunk-6EL7SW5C.js → chunk-JMP4E6D7.js} +114 -122
  196. package/dist/cli-bundle/chunks/chunk-JMP4E6D7.js.map +7 -0
  197. package/dist/cli-bundle/chunks/{chunk-QOUOMPHO.js → chunk-JPECA746.js} +2 -2
  198. package/dist/cli-bundle/chunks/{chunk-KJZOSF7J.js → chunk-JSU5P7VS.js} +100 -35
  199. package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +1 -0
  200. package/dist/cli-bundle/chunks/{context-55VEOYI3.js → chunk-JWXRETDF.js} +79 -82
  201. package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +1 -0
  202. package/dist/cli-bundle/chunks/{chunk-OQ2E64FH.js → chunk-KNPEF7QG.js} +4 -4
  203. package/dist/cli-bundle/chunks/{chunk-3BKH2CL3.js → chunk-L5OEFZQG.js} +3 -3
  204. package/dist/cli-bundle/chunks/{chunk-DTABLLVE.js → chunk-LB6TP6MC.js} +5 -7
  205. package/dist/cli-bundle/chunks/{chunk-DTABLLVE.js.map → chunk-LB6TP6MC.js.map} +2 -2
  206. package/dist/cli-bundle/chunks/{chunk-TSI32UEL.js → chunk-MAUKX7JC.js} +6 -8
  207. package/dist/cli-bundle/chunks/{chunk-TSI32UEL.js.map → chunk-MAUKX7JC.js.map} +1 -1
  208. package/dist/cli-bundle/chunks/{chunk-SMXSDY7J.js → chunk-MDPEOIGN.js} +2221 -2172
  209. package/dist/cli-bundle/chunks/chunk-MDPEOIGN.js.map +7 -0
  210. package/dist/cli-bundle/chunks/{chunk-5S4ZGDB2.js → chunk-N74UMG5H.js} +2 -2
  211. package/dist/cli-bundle/chunks/{chunk-IXAZI443.js → chunk-NFDPYAIP.js} +2 -2
  212. package/dist/cli-bundle/chunks/{chunk-SKC4UTRP.js → chunk-NKZAN7BD.js} +3 -3
  213. package/dist/cli-bundle/chunks/chunk-NOLPZMSV.js +116 -0
  214. package/dist/cli-bundle/chunks/chunk-NOLPZMSV.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{chunk-L7UXKP2I.js → chunk-NU2UEROZ.js} +1257 -1029
  216. package/dist/cli-bundle/chunks/chunk-NU2UEROZ.js.map +1 -0
  217. package/dist/cli-bundle/chunks/{chunk-HBAEFWX3.js → chunk-NUHHPVVS.js} +65 -335
  218. package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +7 -0
  219. package/dist/cli-bundle/chunks/{chunk-JPJDP4VU.js → chunk-NWMZWYYB.js} +2 -2
  220. package/dist/cli-bundle/chunks/{chunk-MWMHZOZZ.js → chunk-OGXLACHC.js} +10 -14
  221. package/dist/cli-bundle/chunks/{chunk-MWMHZOZZ.js.map → chunk-OGXLACHC.js.map} +1 -1
  222. package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js +379 -0
  223. package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-KKX4Z2SE.js → chunk-OTUHB4HS.js} +4 -4
  225. package/dist/cli-bundle/chunks/{chunk-ZLWRPBOW.js → chunk-QCWF6IYD.js} +510 -364
  226. package/dist/cli-bundle/chunks/chunk-QCWF6IYD.js.map +1 -0
  227. package/dist/cli-bundle/chunks/{chunk-PRVTGX64.js → chunk-RGEMWD6Q.js} +11 -23
  228. package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +7 -0
  229. package/dist/cli-bundle/chunks/chunk-RH5ZBYFD.js +809 -0
  230. package/dist/cli-bundle/chunks/chunk-RH5ZBYFD.js.map +7 -0
  231. package/dist/cli-bundle/chunks/{chunk-ALQKV6U7.js → chunk-RLDHZHQS.js} +12 -16
  232. package/dist/cli-bundle/chunks/{chunk-ALQKV6U7.js.map → chunk-RLDHZHQS.js.map} +1 -1
  233. package/dist/cli-bundle/chunks/{schema-C6QA367T.js → chunk-RMMQ74TG.js} +144 -67
  234. package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +7 -0
  235. package/dist/cli-bundle/chunks/{chunk-EYPINTFR.js → chunk-RVUALSJF.js} +1516 -753
  236. package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +7 -0
  237. package/dist/cli-bundle/chunks/chunk-SDR5J34Q.js +2468 -0
  238. package/dist/cli-bundle/chunks/chunk-SDR5J34Q.js.map +7 -0
  239. package/dist/cli-bundle/chunks/{chunk-WB5BYQMF.js → chunk-SLMUGTK3.js} +4 -4
  240. package/dist/cli-bundle/chunks/{chunk-SUREE24M.js → chunk-TP5Q5ZD3.js} +12 -24
  241. package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +1 -0
  242. package/dist/cli-bundle/chunks/{chunk-UACWNBL2.js → chunk-UYUYDGIB.js} +7 -9
  243. package/dist/cli-bundle/chunks/{chunk-UACWNBL2.js.map → chunk-UYUYDGIB.js.map} +1 -1
  244. package/dist/cli-bundle/chunks/{chunk-V4UYNSEM.js → chunk-UZIWVBE6.js} +6 -8
  245. package/dist/cli-bundle/chunks/{chunk-V4UYNSEM.js.map → chunk-UZIWVBE6.js.map} +1 -1
  246. package/dist/cli-bundle/chunks/{chunk-EWRSXOIZ.js → chunk-V3NOKJF2.js} +11 -13
  247. package/dist/cli-bundle/chunks/{chunk-EWRSXOIZ.js.map → chunk-V3NOKJF2.js.map} +1 -1
  248. package/dist/cli-bundle/chunks/{chunk-XXKV4UWE.js → chunk-VARHOHYV.js} +571 -507
  249. package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +7 -0
  250. package/dist/cli-bundle/chunks/{chunk-AEACLRVH.js → chunk-VICZWYGZ.js} +18 -11
  251. package/dist/cli-bundle/chunks/chunk-VICZWYGZ.js.map +7 -0
  252. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +84 -0
  253. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +1 -0
  254. package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js +382 -0
  255. package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js.map +7 -0
  256. package/dist/cli-bundle/chunks/{chunk-GDUMGZK3.js → chunk-W4ULYO7Z.js} +11 -13
  257. package/dist/cli-bundle/chunks/{chunk-GDUMGZK3.js.map → chunk-W4ULYO7Z.js.map} +1 -1
  258. package/dist/cli-bundle/chunks/{chunk-I6QMJ2XT.js → chunk-WYDHYJPO.js} +2 -2
  259. package/dist/cli-bundle/chunks/{chunk-ALKFCIIB.js → chunk-YITK2PJ6.js} +9 -11
  260. package/dist/cli-bundle/chunks/{chunk-ALKFCIIB.js.map → chunk-YITK2PJ6.js.map} +1 -1
  261. package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js +84 -0
  262. package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js.map +1 -0
  263. package/dist/cli-bundle/chunks/{chunk-LNEDHJNQ.js → chunk-ZETXE4SE.js} +66 -329
  264. package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +1 -0
  265. package/dist/cli-bundle/chunks/{chunk-KIEAK7YE.js → chunk-ZRP4VG5U.js} +2 -2
  266. package/dist/cli-bundle/chunks/{claim-FZZZCAY6.js → claim-EMQLYPRW.js} +10 -12
  267. package/dist/cli-bundle/chunks/{claim-FZZZCAY6.js.map → claim-EMQLYPRW.js.map} +1 -1
  268. package/dist/cli-bundle/chunks/{claim-XK5QBZE3.js → claim-T3GCKV7C.js} +8 -10
  269. package/dist/cli-bundle/chunks/{claim-XK5QBZE3.js.map → claim-T3GCKV7C.js.map} +1 -1
  270. package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +14 -0
  271. package/dist/cli-bundle/chunks/{close-QHMVWM7M.js → close-TQYAAFJP.js} +7 -8
  272. package/dist/cli-bundle/chunks/{close-many-OIXJE2JZ.js → close-many-BG5QQIDQ.js} +16 -18
  273. package/dist/cli-bundle/chunks/{close-many-OIXJE2JZ.js.map → close-many-BG5QQIDQ.js.map} +1 -1
  274. package/dist/cli-bundle/chunks/{close-many-SUU5BS2C.js → close-many-LDRVEQY2.js} +18 -20
  275. package/dist/cli-bundle/chunks/{close-many-SUU5BS2C.js.map → close-many-LDRVEQY2.js.map} +1 -1
  276. package/dist/cli-bundle/chunks/{comments-5YM62D75.js → comments-QCKR2YY2.js} +11 -13
  277. package/dist/cli-bundle/chunks/{comments-5YM62D75.js.map → comments-QCKR2YY2.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{comments-RH3IBIRH.js → comments-YUXJRZPQ.js} +9 -11
  279. package/dist/cli-bundle/chunks/{comments-RH3IBIRH.js.map → comments-YUXJRZPQ.js.map} +1 -1
  280. package/dist/cli-bundle/chunks/{config-NCNNWF6R.js → config-DMSU64QO.js} +18 -387
  281. package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +7 -0
  282. package/dist/cli-bundle/chunks/{config-SW3U7XP2.js → config-QH2DICD6.js} +18 -380
  283. package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +1 -0
  284. package/dist/cli-bundle/chunks/context-B6275WPX.js +46 -0
  285. package/dist/cli-bundle/chunks/context-OCZ3FJ4Z.js +42 -0
  286. package/dist/cli-bundle/chunks/{contracts-SY6PDFIK.js → contracts-HN7ABKLP.js} +72 -15
  287. package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +7 -0
  288. package/dist/cli-bundle/chunks/{contracts-JXFGBOYT.js → contracts-W4FZVVD6.js} +72 -15
  289. package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +1 -0
  290. package/dist/cli-bundle/chunks/{copy-N3GE6FYS.js → copy-BTJOSKKT.js} +7 -11
  291. package/dist/cli-bundle/chunks/{copy-N3GE6FYS.js.map → copy-BTJOSKKT.js.map} +1 -1
  292. package/dist/cli-bundle/chunks/{copy-IEDBJOOX.js → copy-DEM4DATS.js} +9 -13
  293. package/dist/cli-bundle/chunks/{copy-IEDBJOOX.js.map → copy-DEM4DATS.js.map} +1 -1
  294. package/dist/cli-bundle/chunks/create-OH3BDGBB.js +28 -0
  295. package/dist/cli-bundle/chunks/{create-O4VONGPG.js → create-RLRJMRTM.js} +12 -14
  296. package/dist/cli-bundle/chunks/{delete-LPEIF7RU.js → delete-BHK7VB2Z.js} +5 -7
  297. package/dist/cli-bundle/chunks/{delete-LPEIF7RU.js.map → delete-BHK7VB2Z.js.map} +1 -1
  298. package/dist/cli-bundle/chunks/{delete-724EQ6OS.js → delete-LSVHAB4Y.js} +7 -9
  299. package/dist/cli-bundle/chunks/{delete-724EQ6OS.js.map → delete-LSVHAB4Y.js.map} +1 -1
  300. package/dist/cli-bundle/chunks/{deps-RSBU4SIU.js → deps-4UDFJRUA.js} +8 -11
  301. package/dist/cli-bundle/chunks/{deps-RSBU4SIU.js.map → deps-4UDFJRUA.js.map} +1 -1
  302. package/dist/cli-bundle/chunks/{deps-T3Y6Y7RT.js → deps-XHYXWEPT.js} +6 -9
  303. package/dist/cli-bundle/chunks/{deps-T3Y6Y7RT.js.map → deps-XHYXWEPT.js.map} +1 -1
  304. package/dist/cli-bundle/chunks/{docs-IFS7HZPP.js → docs-26S44RXU.js} +8 -9
  305. package/dist/cli-bundle/chunks/{docs-IFS7HZPP.js.map → docs-26S44RXU.js.map} +1 -1
  306. package/dist/cli-bundle/chunks/{docs-75ZLCO3G.js → docs-GYZNVS26.js} +10 -11
  307. package/dist/cli-bundle/chunks/{docs-75ZLCO3G.js.map → docs-GYZNVS26.js.map} +1 -1
  308. package/dist/cli-bundle/chunks/{eval-L2KD7W3M.js → eval-PGRVIJQU.js} +12 -14
  309. package/dist/cli-bundle/chunks/{eval-L2KD7W3M.js.map → eval-PGRVIJQU.js.map} +1 -1
  310. package/dist/cli-bundle/chunks/{eval-QGR7JCQO.js → eval-UYF3ZPVO.js} +10 -12
  311. package/dist/cli-bundle/chunks/{eval-QGR7JCQO.js.map → eval-UYF3ZPVO.js.map} +1 -1
  312. package/dist/cli-bundle/chunks/{extension-YQF4CPIR.js → extension-CPSLJQVE.js} +12 -7
  313. package/dist/cli-bundle/chunks/{extension-3JYWJ5K2.js → extension-CXJ6RELI.js} +12 -7
  314. package/dist/cli-bundle/chunks/{files-EPEJMJHQ.js → files-MBNICQFM.js} +9 -11
  315. package/dist/cli-bundle/chunks/{files-EPEJMJHQ.js.map → files-MBNICQFM.js.map} +1 -1
  316. package/dist/cli-bundle/chunks/{files-5BQWDRDT.js → files-NQHEXUZD.js} +11 -13
  317. package/dist/cli-bundle/chunks/{files-5BQWDRDT.js.map → files-NQHEXUZD.js.map} +1 -1
  318. package/dist/cli-bundle/chunks/{focus-RWGKD76E.js → focus-DWYIG7GU.js} +10 -14
  319. package/dist/cli-bundle/chunks/{focus-RWGKD76E.js.map → focus-DWYIG7GU.js.map} +1 -1
  320. package/dist/cli-bundle/chunks/{focus-DQVJAPOE.js → focus-XZW5423D.js} +8 -12
  321. package/dist/cli-bundle/chunks/{focus-DQVJAPOE.js.map → focus-XZW5423D.js.map} +1 -1
  322. package/dist/cli-bundle/chunks/{gc-BEJMQT64.js → gc-7GQYOS2G.js} +3 -3
  323. package/dist/cli-bundle/chunks/{gc-JEFQDJPA.js → gc-LPVMKJQJ.js} +3 -3
  324. package/dist/cli-bundle/chunks/{get-LQG6PEVG.js → get-A7MAOHCU.js} +10 -13
  325. package/dist/cli-bundle/chunks/{get-LQG6PEVG.js.map → get-A7MAOHCU.js.map} +1 -1
  326. package/dist/cli-bundle/chunks/{get-WVN75H42.js → get-DSDEKJ3L.js} +12 -15
  327. package/dist/cli-bundle/chunks/{get-WVN75H42.js.map → get-DSDEKJ3L.js.map} +1 -1
  328. package/dist/cli-bundle/chunks/{health-JJJOY7DJ.js → health-3IPFLKXB.js} +17 -17
  329. package/dist/cli-bundle/chunks/{health-P67NZ6TT.js → health-GZXGBZ36.js} +17 -17
  330. package/dist/cli-bundle/chunks/{history-RUKPKNY7.js → history-NERDJNUB.js} +8 -10
  331. package/dist/cli-bundle/chunks/history-WSZHY3PN.js +18 -0
  332. package/dist/cli-bundle/chunks/{history-compact-NQ7VPRVT.js → history-compact-2WRZ2WK4.js} +11 -14
  333. package/dist/cli-bundle/chunks/{history-compact-NQ7VPRVT.js.map → history-compact-2WRZ2WK4.js.map} +1 -1
  334. package/dist/cli-bundle/chunks/{history-compact-ZAOWR7GD.js → history-compact-HR7BB4LR.js} +13 -16
  335. package/dist/cli-bundle/chunks/{history-compact-ZAOWR7GD.js.map → history-compact-HR7BB4LR.js.map} +1 -1
  336. package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +19 -0
  337. package/dist/cli-bundle/chunks/{history-redact-YY4XYVEP.js → history-redact-O3NBCNWC.js} +9 -11
  338. package/dist/cli-bundle/chunks/{history-repair-EHL4ODQY.js → history-repair-LCMOS45X.js} +11 -14
  339. package/dist/cli-bundle/chunks/{history-repair-EHL4ODQY.js.map → history-repair-LCMOS45X.js.map} +1 -1
  340. package/dist/cli-bundle/chunks/{history-repair-YSQH6SY6.js → history-repair-XA3LC4GA.js} +13 -16
  341. package/dist/cli-bundle/chunks/{history-repair-YSQH6SY6.js.map → history-repair-XA3LC4GA.js.map} +1 -1
  342. package/dist/cli-bundle/chunks/{init-HBFGYS66.js → init-64XDLQJB.js} +12 -11
  343. package/dist/cli-bundle/chunks/init-PAX32BJA.js +22 -0
  344. package/dist/cli-bundle/chunks/{learnings-KFQO7GEZ.js → learnings-JR6MA5TI.js} +9 -11
  345. package/dist/cli-bundle/chunks/{learnings-KFQO7GEZ.js.map → learnings-JR6MA5TI.js.map} +1 -1
  346. package/dist/cli-bundle/chunks/{learnings-J555ZFPD.js → learnings-LPKCSJX7.js} +11 -13
  347. package/dist/cli-bundle/chunks/{learnings-J555ZFPD.js.map → learnings-LPKCSJX7.js.map} +1 -1
  348. package/dist/cli-bundle/chunks/{list-C7R33MD5.js → list-DNBJVO3E.js} +10 -10
  349. package/dist/cli-bundle/chunks/{list-DSN6UNFB.js → list-G5Y65VF6.js} +10 -10
  350. package/dist/cli-bundle/chunks/next-BCERKDUR.js +277 -0
  351. package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +7 -0
  352. package/dist/cli-bundle/chunks/next-FYTQF6HG.js +274 -0
  353. package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +1 -0
  354. package/dist/cli-bundle/chunks/{notes-V4VNIQL4.js → notes-2BMU3VVQ.js} +9 -11
  355. package/dist/cli-bundle/chunks/{notes-V4VNIQL4.js.map → notes-2BMU3VVQ.js.map} +1 -1
  356. package/dist/cli-bundle/chunks/{notes-VYJFN2A3.js → notes-6KTGO2OJ.js} +11 -13
  357. package/dist/cli-bundle/chunks/{notes-VYJFN2A3.js.map → notes-6KTGO2OJ.js.map} +1 -1
  358. package/dist/cli-bundle/chunks/{plan-RBHQ5PO7.js → plan-4WXEQCTN.js} +15 -18
  359. package/dist/cli-bundle/chunks/{plan-RBHQ5PO7.js.map → plan-4WXEQCTN.js.map} +1 -1
  360. package/dist/cli-bundle/chunks/{plan-DHRSVSHR.js → plan-RKZHQVXR.js} +17 -20
  361. package/dist/cli-bundle/chunks/{plan-DHRSVSHR.js.map → plan-RKZHQVXR.js.map} +1 -1
  362. package/dist/cli-bundle/chunks/profile-4OMM32CD.js +1235 -0
  363. package/dist/cli-bundle/chunks/profile-4OMM32CD.js.map +7 -0
  364. package/dist/cli-bundle/chunks/profile-QLER5ENE.js +1197 -0
  365. package/dist/cli-bundle/chunks/profile-QLER5ENE.js.map +1 -0
  366. package/dist/cli-bundle/chunks/{register-list-query-OM3E2KMY.js → register-list-query-7LV46VAU.js} +45 -21
  367. package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +1 -0
  368. package/dist/cli-bundle/chunks/{register-list-query-CCMHGZTF.js → register-list-query-SNG5PGA4.js} +44 -20
  369. package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +7 -0
  370. package/dist/cli-bundle/chunks/{register-mutation-N3CDEGZU.js → register-mutation-ENNDUAZG.js} +106 -40
  371. package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +1 -0
  372. package/dist/cli-bundle/chunks/{register-mutation-UXTTWL6N.js → register-mutation-KK7PHYYU.js} +105 -39
  373. package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +7 -0
  374. package/dist/cli-bundle/chunks/{register-operations-UDIFMQKD.js → register-operations-C6OWLDSH.js} +32 -34
  375. package/dist/cli-bundle/chunks/{register-operations-UDIFMQKD.js.map → register-operations-C6OWLDSH.js.map} +1 -1
  376. package/dist/cli-bundle/chunks/{register-operations-R2FLOCRI.js → register-operations-HZ6XERQG.js} +30 -32
  377. package/dist/cli-bundle/chunks/{register-operations-R2FLOCRI.js.map → register-operations-HZ6XERQG.js.map} +1 -1
  378. package/dist/cli-bundle/chunks/{register-setup-G5LTSFYK.js → register-setup-P67EMBDJ.js} +68 -25
  379. package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +1 -0
  380. package/dist/cli-bundle/chunks/{register-setup-TWHKICM2.js → register-setup-ZKJ53RS7.js} +67 -24
  381. package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +7 -0
  382. package/dist/cli-bundle/chunks/{restore-LL2WLEDG.js → restore-4MHZFJ2E.js} +9 -11
  383. package/dist/cli-bundle/chunks/restore-YALDGTQR.js +17 -0
  384. package/dist/cli-bundle/chunks/{scheduling-shortcuts-M4H2ZI64.js → scheduling-shortcuts-LB6DOLRL.js} +14 -16
  385. package/dist/cli-bundle/chunks/{scheduling-shortcuts-M4H2ZI64.js.map → scheduling-shortcuts-LB6DOLRL.js.map} +1 -1
  386. package/dist/cli-bundle/chunks/{scheduling-shortcuts-255GI3BU.js → scheduling-shortcuts-UTOYKLXQ.js} +12 -14
  387. package/dist/cli-bundle/chunks/{scheduling-shortcuts-255GI3BU.js.map → scheduling-shortcuts-UTOYKLXQ.js.map} +1 -1
  388. package/dist/cli-bundle/chunks/schema-73HR2OJW.js +75 -0
  389. package/dist/cli-bundle/chunks/schema-U6LJKSIR.js +71 -0
  390. package/dist/cli-bundle/chunks/{search-2EI6EAXH.js → search-AXPXKZER.js} +10 -12
  391. package/dist/cli-bundle/chunks/{search-QBFBLQRO.js → search-KILGT37L.js} +10 -12
  392. package/dist/cli-bundle/chunks/{stats-TKC6CAKB.js → stats-PSYVVTNZ.js} +21 -13
  393. package/dist/cli-bundle/chunks/stats-PSYVVTNZ.js.map +1 -0
  394. package/dist/cli-bundle/chunks/{stats-TCW2SZQG.js → stats-W5KNVJWQ.js} +20 -12
  395. package/dist/cli-bundle/chunks/stats-W5KNVJWQ.js.map +7 -0
  396. package/dist/cli-bundle/chunks/{telemetry-BT2VSWU2.js → telemetry-BZUF6H7G.js} +4 -4
  397. package/dist/cli-bundle/chunks/{telemetry-LQ6FRTUT.js → telemetry-GAHHQTOS.js} +4 -4
  398. package/dist/cli-bundle/chunks/test-ACD52Z3S.js +35 -0
  399. package/dist/cli-bundle/chunks/test-ACD52Z3S.js.map +7 -0
  400. package/dist/cli-bundle/chunks/{test-NV2DRPUS.js → test-PWDIZ255.js} +15 -16
  401. package/dist/cli-bundle/chunks/test-PWDIZ255.js.map +1 -0
  402. package/dist/cli-bundle/chunks/{test-all-DZ76VTPQ.js → test-all-L2MDDUCA.js} +20 -22
  403. package/dist/cli-bundle/chunks/{test-all-DZ76VTPQ.js.map → test-all-L2MDDUCA.js.map} +1 -1
  404. package/dist/cli-bundle/chunks/{test-all-REW67LXT.js → test-all-RBZ6DLU2.js} +18 -20
  405. package/dist/cli-bundle/chunks/{test-all-REW67LXT.js.map → test-all-RBZ6DLU2.js.map} +1 -1
  406. package/dist/cli-bundle/chunks/{test-runs-PX73DMMI.js → test-runs-PLRAZEFW.js} +5 -6
  407. package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +7 -0
  408. package/dist/cli-bundle/chunks/{test-runs-FQ5WNQLP.js → test-runs-UXIXPDKU.js} +6 -7
  409. package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +1 -0
  410. package/dist/cli-bundle/chunks/update-AMRSOIWP.js +24 -0
  411. package/dist/cli-bundle/chunks/update-AMRSOIWP.js.map +7 -0
  412. package/dist/cli-bundle/chunks/update-KFX2SIAC.js +28 -0
  413. package/dist/cli-bundle/chunks/update-KFX2SIAC.js.map +1 -0
  414. package/dist/cli-bundle/chunks/{update-many-Q5ZEI64S.js → update-many-RNSBX2TA.js} +35 -36
  415. package/dist/cli-bundle/chunks/{update-many-Q5ZEI64S.js.map → update-many-RNSBX2TA.js.map} +1 -1
  416. package/dist/cli-bundle/chunks/{update-many-2ILP6E4Y.js → update-many-Z5GJS5LC.js} +33 -34
  417. package/dist/cli-bundle/chunks/{update-many-2ILP6E4Y.js.map → update-many-Z5GJS5LC.js.map} +1 -1
  418. package/dist/cli-bundle/chunks/{upgrade-FOZKQTQF.js → upgrade-BRL6KCOJ.js} +13 -8
  419. package/dist/cli-bundle/chunks/{upgrade-FOZKQTQF.js.map → upgrade-BRL6KCOJ.js.map} +1 -1
  420. package/dist/cli-bundle/chunks/{upgrade-DHL74PQH.js → upgrade-HAK6JG2O.js} +11 -6
  421. package/dist/cli-bundle/chunks/{upgrade-DHL74PQH.js.map → upgrade-HAK6JG2O.js.map} +1 -1
  422. package/dist/cli-bundle/chunks/{validate-HYZNIB6W.js → validate-MTUVL5VC.js} +38 -28
  423. package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +7 -0
  424. package/dist/cli-bundle/chunks/{validate-54SYJ7QW.js → validate-X5W76YJL.js} +39 -29
  425. package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +1 -0
  426. package/dist/cli-bundle/main.js +95 -724
  427. package/dist/cli-bundle/main.js.map +4 -4
  428. package/dist/core/config/positional-value.d.ts +2 -0
  429. package/dist/core/config/positional-value.js +2 -2
  430. package/dist/core/config/positional-value.js.map +1 -1
  431. package/dist/core/extensions/activation-summary-markdown.d.ts +71 -0
  432. package/dist/core/extensions/activation-summary-markdown.js +151 -0
  433. package/dist/core/extensions/activation-summary-markdown.js.map +1 -0
  434. package/dist/core/extensions/activation-summary.d.ts +2 -0
  435. package/dist/core/extensions/activation-summary.js +3 -2
  436. package/dist/core/extensions/activation-summary.js.map +1 -1
  437. package/dist/core/extensions/capability-usage.d.ts +1 -1
  438. package/dist/core/extensions/capability-usage.js +4 -3
  439. package/dist/core/extensions/capability-usage.js.map +1 -1
  440. package/dist/core/extensions/extension-policy.d.ts +18 -3
  441. package/dist/core/extensions/extension-policy.js +116 -106
  442. package/dist/core/extensions/extension-policy.js.map +1 -1
  443. package/dist/core/extensions/extension-registries.js +3 -2
  444. package/dist/core/extensions/extension-registries.js.map +1 -1
  445. package/dist/core/extensions/extension-types.d.ts +21 -1
  446. package/dist/core/extensions/extension-types.js +3 -2
  447. package/dist/core/extensions/extension-types.js.map +1 -1
  448. package/dist/core/extensions/loader.js +439 -232
  449. package/dist/core/extensions/loader.js.map +1 -1
  450. package/dist/core/fs/fs-utils.js +27 -2
  451. package/dist/core/fs/fs-utils.js.map +1 -1
  452. package/dist/core/item/actionability.d.ts +57 -0
  453. package/dist/core/item/actionability.js +178 -0
  454. package/dist/core/item/actionability.js.map +1 -0
  455. package/dist/core/item/item-format.js +523 -410
  456. package/dist/core/item/item-format.js.map +1 -1
  457. package/dist/core/item/type-registry.js +18 -45
  458. package/dist/core/item/type-registry.js.map +1 -1
  459. package/dist/core/profile/profile-describe.d.ts +64 -0
  460. package/dist/core/profile/profile-describe.js +83 -0
  461. package/dist/core/profile/profile-describe.js.map +1 -0
  462. package/dist/core/profile/profile-lint.d.ts +53 -0
  463. package/dist/core/profile/profile-lint.js +422 -0
  464. package/dist/core/profile/profile-lint.js.map +1 -0
  465. package/dist/core/profile/profile-plan.d.ts +145 -0
  466. package/dist/core/profile/profile-plan.js +0 -0
  467. package/dist/core/profile/profile-plan.js.map +1 -0
  468. package/dist/core/profile/profile-presets.d.ts +218 -0
  469. package/dist/core/profile/profile-presets.js +325 -0
  470. package/dist/core/profile/profile-presets.js.map +1 -0
  471. package/dist/core/schema/fields-file.js +25 -25
  472. package/dist/core/schema/fields-file.js.map +1 -1
  473. package/dist/core/schema/item-types-file.js +3 -3
  474. package/dist/core/schema/item-types-file.js.map +1 -1
  475. package/dist/core/schema/runtime-schema.js +4 -4
  476. package/dist/core/schema/runtime-schema.js.map +1 -1
  477. package/dist/core/schema/status-defs-file.js +3 -3
  478. package/dist/core/schema/status-defs-file.js.map +1 -1
  479. package/dist/core/shared/serialization.js +83 -62
  480. package/dist/core/shared/serialization.js.map +1 -1
  481. package/dist/core/store/item-store.d.ts +1 -0
  482. package/dist/core/store/item-store.js +16 -8
  483. package/dist/core/store/item-store.js.map +1 -1
  484. package/dist/core/store/paths.js +4 -32
  485. package/dist/core/store/paths.js.map +1 -1
  486. package/dist/core/store/settings.js +14 -14
  487. package/dist/core/store/settings.js.map +1 -1
  488. package/dist/core/telemetry/observability.js +50 -54
  489. package/dist/core/telemetry/observability.js.map +1 -1
  490. package/dist/core/telemetry/runtime.js +11 -2
  491. package/dist/core/telemetry/runtime.js.map +1 -1
  492. package/dist/core/test/background-runs.js +3 -2
  493. package/dist/core/test/background-runs.js.map +1 -1
  494. package/dist/core/validate/linked-artifact-reference.d.ts +24 -0
  495. package/dist/core/validate/linked-artifact-reference.js +41 -0
  496. package/dist/core/validate/linked-artifact-reference.js.map +1 -0
  497. package/dist/mcp/server.js +540 -420
  498. package/dist/mcp/server.js.map +1 -1
  499. package/dist/mcp/tool-definitions.js +33 -2
  500. package/dist/mcp/tool-definitions.js.map +1 -1
  501. package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
  502. package/dist/sdk/cli-contracts/commander-types.js +15 -2
  503. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  504. package/dist/sdk/cli-contracts/enum-contracts.d.ts +3 -3
  505. package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
  506. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  507. package/dist/sdk/cli-contracts/flag-contracts.d.ts +149 -0
  508. package/dist/sdk/cli-contracts/flag-contracts.js +1514 -0
  509. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -0
  510. package/dist/sdk/cli-contracts/string-lists.d.ts +14 -0
  511. package/dist/sdk/cli-contracts/string-lists.js +20 -0
  512. package/dist/sdk/cli-contracts/string-lists.js.map +1 -0
  513. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -1
  514. package/dist/sdk/cli-contracts/tool-option-contracts.js +51 -109
  515. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  516. package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +17 -0
  517. package/dist/sdk/cli-contracts/tool-parameter-tables.js +54 -5
  518. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  519. package/dist/sdk/cli-contracts/tool-schema.d.ts +74 -0
  520. package/dist/sdk/cli-contracts/tool-schema.js +871 -0
  521. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -0
  522. package/dist/sdk/cli-contracts.d.ts +13 -193
  523. package/dist/sdk/cli-contracts.js +5 -2277
  524. package/dist/sdk/cli-contracts.js.map +1 -1
  525. package/dist/sdk/compose.d.ts +11 -5
  526. package/dist/sdk/compose.js +240 -124
  527. package/dist/sdk/compose.js.map +1 -1
  528. package/dist/sdk/define.d.ts +14 -0
  529. package/dist/sdk/define.js +17 -2
  530. package/dist/sdk/define.js.map +1 -1
  531. package/dist/sdk/index.d.ts +14 -3
  532. package/dist/sdk/index.js +14 -3
  533. package/dist/sdk/index.js.map +1 -1
  534. package/dist/sdk/testing.d.ts +82 -2
  535. package/dist/sdk/testing.js +74 -3
  536. package/dist/sdk/testing.js.map +1 -1
  537. package/docs/AGENT_GUIDE.md +2 -0
  538. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  539. package/docs/COMMANDS.md +37 -0
  540. package/docs/EXTENSIONS.md +12 -13
  541. package/docs/RELEASING.md +8 -4
  542. package/docs/SDK.md +184 -17
  543. package/docs/TESTING.md +12 -0
  544. package/docs/examples/policy-restricted-extension/README.md +6 -0
  545. package/docs/examples/policy-restricted-extension/index.ts +40 -0
  546. package/docs/examples/policy-restricted-extension/manifest.json +2 -2
  547. package/docs/examples/starter-extension/README.md +14 -2
  548. package/docs/examples/starter-extension/{index.js → index.ts} +51 -6
  549. package/docs/examples/starter-extension/manifest.json +2 -2
  550. package/package.json +20 -7
  551. package/packages/pm-beads/extensions/beads/index.ts +3 -3
  552. package/packages/pm-beads/extensions/beads/manifest.json +2 -2
  553. package/packages/pm-beads/extensions/beads/runtime-loader.ts +19 -7
  554. package/packages/pm-beads/extensions/beads/runtime.ts +155 -37
  555. package/packages/pm-calendar/extensions/calendar/index.ts +3 -3
  556. package/packages/pm-calendar/extensions/calendar/manifest.json +2 -2
  557. package/packages/pm-calendar/extensions/calendar/runtime.ts +2 -2
  558. package/packages/pm-command-kit/extensions/command-kit/index.ts +1 -1
  559. package/packages/pm-command-kit/extensions/command-kit/manifest.json +2 -2
  560. package/packages/pm-governance-audit/extensions/governance-audit/index.ts +2 -2
  561. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +2 -2
  562. package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +1 -1
  563. package/packages/pm-guide-shell/extensions/guide-shell/index.ts +2 -2
  564. package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +2 -2
  565. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +1 -1
  566. package/packages/pm-kanban/README.md +97 -0
  567. package/packages/pm-kanban/extensions/kanban/index.ts +191 -0
  568. package/packages/pm-kanban/extensions/kanban/manifest.json +19 -0
  569. package/packages/pm-kanban/package.json +57 -0
  570. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +1 -1
  571. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +2 -2
  572. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +2 -2
  573. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +2 -2
  574. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +1 -1
  575. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +2 -2
  576. package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +2 -2
  577. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +1 -1
  578. package/packages/pm-templates/extensions/templates/index.ts +2 -2
  579. package/packages/pm-templates/extensions/templates/manifest.json +2 -2
  580. package/packages/pm-templates/extensions/templates/runtime.ts +1 -1
  581. package/packages/pm-todos/extensions/todos/index.ts +3 -3
  582. package/packages/pm-todos/extensions/todos/manifest.json +2 -2
  583. package/packages/pm-todos/extensions/todos/runtime-loader.ts +19 -7
  584. package/packages/pm-todos/extensions/todos/runtime.ts +177 -43
  585. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +2 -2
  586. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +2 -2
  587. package/scripts/bundle-cli.mjs +1 -1
  588. package/dist/cli-bundle/chunks/activity-54TXGJ2T.js +0 -18
  589. package/dist/cli-bundle/chunks/aggregate-63NWNIBR.js.map +0 -1
  590. package/dist/cli-bundle/chunks/aggregate-YHCYX2EV.js.map +0 -7
  591. package/dist/cli-bundle/chunks/chunk-6EL7SW5C.js.map +0 -7
  592. package/dist/cli-bundle/chunks/chunk-6W3Y65PL.js.map +0 -7
  593. package/dist/cli-bundle/chunks/chunk-AEACLRVH.js.map +0 -7
  594. package/dist/cli-bundle/chunks/chunk-B74BP6IS.js +0 -78
  595. package/dist/cli-bundle/chunks/chunk-B74BP6IS.js.map +0 -7
  596. package/dist/cli-bundle/chunks/chunk-BFFO3AIB.js.map +0 -1
  597. package/dist/cli-bundle/chunks/chunk-C4C3EJCJ.js.map +0 -7
  598. package/dist/cli-bundle/chunks/chunk-EYPINTFR.js.map +0 -7
  599. package/dist/cli-bundle/chunks/chunk-FBLT6WGK.js +0 -75
  600. package/dist/cli-bundle/chunks/chunk-FBLT6WGK.js.map +0 -1
  601. package/dist/cli-bundle/chunks/chunk-GQYJEEFX.js.map +0 -1
  602. package/dist/cli-bundle/chunks/chunk-HBAEFWX3.js.map +0 -7
  603. package/dist/cli-bundle/chunks/chunk-HC2S36NB.js.map +0 -1
  604. package/dist/cli-bundle/chunks/chunk-IAP5KYBQ.js.map +0 -1
  605. package/dist/cli-bundle/chunks/chunk-INPHFO33.js +0 -764
  606. package/dist/cli-bundle/chunks/chunk-INPHFO33.js.map +0 -7
  607. package/dist/cli-bundle/chunks/chunk-IOT6WRL5.js +0 -86
  608. package/dist/cli-bundle/chunks/chunk-IOT6WRL5.js.map +0 -7
  609. package/dist/cli-bundle/chunks/chunk-ISEKN64V.js +0 -35
  610. package/dist/cli-bundle/chunks/chunk-ISEKN64V.js.map +0 -7
  611. package/dist/cli-bundle/chunks/chunk-J3NMWFIN.js +0 -115
  612. package/dist/cli-bundle/chunks/chunk-J3NMWFIN.js.map +0 -1
  613. package/dist/cli-bundle/chunks/chunk-J7I4C5ZB.js.map +0 -7
  614. package/dist/cli-bundle/chunks/chunk-JKL6HRMV.js.map +0 -7
  615. package/dist/cli-bundle/chunks/chunk-KJZOSF7J.js.map +0 -1
  616. package/dist/cli-bundle/chunks/chunk-L7UXKP2I.js.map +0 -1
  617. package/dist/cli-bundle/chunks/chunk-LNEDHJNQ.js.map +0 -1
  618. package/dist/cli-bundle/chunks/chunk-M6TUBOGW.js.map +0 -1
  619. package/dist/cli-bundle/chunks/chunk-MEXZ5XUM.js.map +0 -7
  620. package/dist/cli-bundle/chunks/chunk-N5B6WZC5.js.map +0 -1
  621. package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js +0 -761
  622. package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js.map +0 -1
  623. package/dist/cli-bundle/chunks/chunk-NVXGVEFD.js +0 -83
  624. package/dist/cli-bundle/chunks/chunk-NVXGVEFD.js.map +0 -1
  625. package/dist/cli-bundle/chunks/chunk-OF7V47P3.js.map +0 -1
  626. package/dist/cli-bundle/chunks/chunk-OHDQNKJB.js.map +0 -7
  627. package/dist/cli-bundle/chunks/chunk-PEL2NLQE.js +0 -118
  628. package/dist/cli-bundle/chunks/chunk-PEL2NLQE.js.map +0 -7
  629. package/dist/cli-bundle/chunks/chunk-PRVTGX64.js.map +0 -7
  630. package/dist/cli-bundle/chunks/chunk-RAWA3Y7O.js.map +0 -1
  631. package/dist/cli-bundle/chunks/chunk-SMXSDY7J.js.map +0 -7
  632. package/dist/cli-bundle/chunks/chunk-SUREE24M.js.map +0 -1
  633. package/dist/cli-bundle/chunks/chunk-TKPP4GOO.js +0 -654
  634. package/dist/cli-bundle/chunks/chunk-TKPP4GOO.js.map +0 -1
  635. package/dist/cli-bundle/chunks/chunk-VSAABFGQ.js.map +0 -1
  636. package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js +0 -32
  637. package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js.map +0 -1
  638. package/dist/cli-bundle/chunks/chunk-XVYKWZNL.js.map +0 -7
  639. package/dist/cli-bundle/chunks/chunk-XXKV4UWE.js.map +0 -7
  640. package/dist/cli-bundle/chunks/chunk-ZLWRPBOW.js.map +0 -1
  641. package/dist/cli-bundle/chunks/chunk-ZV7IQ23N.js +0 -657
  642. package/dist/cli-bundle/chunks/chunk-ZV7IQ23N.js.map +0 -7
  643. package/dist/cli-bundle/chunks/close-JEBZXONN.js +0 -15
  644. package/dist/cli-bundle/chunks/config-NCNNWF6R.js.map +0 -7
  645. package/dist/cli-bundle/chunks/config-SW3U7XP2.js.map +0 -1
  646. package/dist/cli-bundle/chunks/context-55VEOYI3.js.map +0 -1
  647. package/dist/cli-bundle/chunks/context-5LB7UGKE.js.map +0 -7
  648. package/dist/cli-bundle/chunks/contracts-JXFGBOYT.js.map +0 -1
  649. package/dist/cli-bundle/chunks/contracts-SY6PDFIK.js.map +0 -7
  650. package/dist/cli-bundle/chunks/create-CLSCHGJJ.js +0 -30
  651. package/dist/cli-bundle/chunks/history-ALTM2RRP.js +0 -20
  652. package/dist/cli-bundle/chunks/history-redact-5YGLWUDH.js +0 -21
  653. package/dist/cli-bundle/chunks/init-C4CRHW22.js +0 -21
  654. package/dist/cli-bundle/chunks/register-list-query-CCMHGZTF.js.map +0 -7
  655. package/dist/cli-bundle/chunks/register-list-query-OM3E2KMY.js.map +0 -1
  656. package/dist/cli-bundle/chunks/register-mutation-N3CDEGZU.js.map +0 -1
  657. package/dist/cli-bundle/chunks/register-mutation-UXTTWL6N.js.map +0 -7
  658. package/dist/cli-bundle/chunks/register-setup-G5LTSFYK.js.map +0 -1
  659. package/dist/cli-bundle/chunks/register-setup-TWHKICM2.js.map +0 -7
  660. package/dist/cli-bundle/chunks/restore-LQHXBAY5.js +0 -19
  661. package/dist/cli-bundle/chunks/schema-C6QA367T.js.map +0 -7
  662. package/dist/cli-bundle/chunks/schema-QO5I4FBL.js.map +0 -1
  663. package/dist/cli-bundle/chunks/stats-TCW2SZQG.js.map +0 -7
  664. package/dist/cli-bundle/chunks/stats-TKC6CAKB.js.map +0 -1
  665. package/dist/cli-bundle/chunks/test-WA6RZGM2.js +0 -36
  666. package/dist/cli-bundle/chunks/test-runs-FQ5WNQLP.js.map +0 -1
  667. package/dist/cli-bundle/chunks/test-runs-PX73DMMI.js.map +0 -7
  668. package/dist/cli-bundle/chunks/update-BSKMQOYH.js +0 -28
  669. package/dist/cli-bundle/chunks/update-FIGYNQ2I.js +0 -24
  670. package/dist/cli-bundle/chunks/validate-54SYJ7QW.js.map +0 -1
  671. package/dist/cli-bundle/chunks/validate-HYZNIB6W.js.map +0 -7
  672. package/docs/examples/policy-restricted-extension/index.js +0 -21
  673. package/packages/pm-beads/extensions/beads/index.js +0 -64
  674. package/packages/pm-beads/extensions/beads/runtime-loader.js +0 -86
  675. package/packages/pm-beads/extensions/beads/runtime.js +0 -482
  676. package/packages/pm-calendar/extensions/calendar/index.js +0 -150
  677. package/packages/pm-calendar/extensions/calendar/runtime.js +0 -126
  678. package/packages/pm-command-kit/extensions/command-kit/index.js +0 -181
  679. package/packages/pm-governance-audit/extensions/governance-audit/index.js +0 -177
  680. package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +0 -153
  681. package/packages/pm-guide-shell/extensions/guide-shell/index.js +0 -98
  682. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +0 -294
  683. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +0 -18
  684. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.js +0 -124
  685. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +0 -110
  686. package/packages/pm-search-advanced/extensions/search-advanced/index.js +0 -258
  687. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +0 -361
  688. package/packages/pm-templates/extensions/templates/index.js +0 -132
  689. package/packages/pm-templates/extensions/templates/runtime.js +0 -35
  690. package/packages/pm-todos/extensions/todos/index.js +0 -81
  691. package/packages/pm-todos/extensions/todos/runtime-loader.js +0 -86
  692. package/packages/pm-todos/extensions/todos/runtime.js +0 -545
  693. /package/dist/cli-bundle/chunks/{activity-54TXGJ2T.js.map → activity-AW6XVFH6.js.map} +0 -0
  694. /package/dist/cli-bundle/chunks/{activity-N7RVTLBQ.js.map → activity-DBLQVIP6.js.map} +0 -0
  695. /package/dist/cli-bundle/chunks/{chunk-F32L4HR6.js.map → chunk-27BXPBAY.js.map} +0 -0
  696. /package/dist/cli-bundle/chunks/{chunk-5BBEWX6C.js.map → chunk-3VGN2UWE.js.map} +0 -0
  697. /package/dist/cli-bundle/chunks/{chunk-FMWW2JDU.js.map → chunk-AXIDKKAT.js.map} +0 -0
  698. /package/dist/cli-bundle/chunks/{chunk-TIM4OD74.js.map → chunk-BDTISOSD.js.map} +0 -0
  699. /package/dist/cli-bundle/chunks/{chunk-CZIFFMZI.js.map → chunk-DDPTYJIM.js.map} +0 -0
  700. /package/dist/cli-bundle/chunks/{chunk-AYPQUFCX.js.map → chunk-EJUDVUYZ.js.map} +0 -0
  701. /package/dist/cli-bundle/chunks/{chunk-EOGBMLCE.js.map → chunk-EVMTBV6V.js.map} +0 -0
  702. /package/dist/cli-bundle/chunks/{chunk-CG3KP6I5.js.map → chunk-G7I7DEZA.js.map} +0 -0
  703. /package/dist/cli-bundle/chunks/{chunk-F4BNR2IN.js.map → chunk-HYTGA6GI.js.map} +0 -0
  704. /package/dist/cli-bundle/chunks/{chunk-2WCYE3IF.js.map → chunk-HZZEHPRG.js.map} +0 -0
  705. /package/dist/cli-bundle/chunks/{chunk-YV2OSAMS.js.map → chunk-IJYK2T43.js.map} +0 -0
  706. /package/dist/cli-bundle/chunks/{chunk-QOUOMPHO.js.map → chunk-JPECA746.js.map} +0 -0
  707. /package/dist/cli-bundle/chunks/{chunk-OQ2E64FH.js.map → chunk-KNPEF7QG.js.map} +0 -0
  708. /package/dist/cli-bundle/chunks/{chunk-3BKH2CL3.js.map → chunk-L5OEFZQG.js.map} +0 -0
  709. /package/dist/cli-bundle/chunks/{chunk-5S4ZGDB2.js.map → chunk-N74UMG5H.js.map} +0 -0
  710. /package/dist/cli-bundle/chunks/{chunk-IXAZI443.js.map → chunk-NFDPYAIP.js.map} +0 -0
  711. /package/dist/cli-bundle/chunks/{chunk-SKC4UTRP.js.map → chunk-NKZAN7BD.js.map} +0 -0
  712. /package/dist/cli-bundle/chunks/{chunk-JPJDP4VU.js.map → chunk-NWMZWYYB.js.map} +0 -0
  713. /package/dist/cli-bundle/chunks/{chunk-KKX4Z2SE.js.map → chunk-OTUHB4HS.js.map} +0 -0
  714. /package/dist/cli-bundle/chunks/{chunk-WB5BYQMF.js.map → chunk-SLMUGTK3.js.map} +0 -0
  715. /package/dist/cli-bundle/chunks/{chunk-I6QMJ2XT.js.map → chunk-WYDHYJPO.js.map} +0 -0
  716. /package/dist/cli-bundle/chunks/{chunk-KIEAK7YE.js.map → chunk-ZRP4VG5U.js.map} +0 -0
  717. /package/dist/cli-bundle/chunks/{close-JEBZXONN.js.map → close-E6ZZGCJY.js.map} +0 -0
  718. /package/dist/cli-bundle/chunks/{close-QHMVWM7M.js.map → close-TQYAAFJP.js.map} +0 -0
  719. /package/dist/cli-bundle/chunks/{create-O4VONGPG.js.map → context-B6275WPX.js.map} +0 -0
  720. /package/dist/cli-bundle/chunks/{create-CLSCHGJJ.js.map → context-OCZ3FJ4Z.js.map} +0 -0
  721. /package/dist/cli-bundle/chunks/{extension-YQF4CPIR.js.map → create-OH3BDGBB.js.map} +0 -0
  722. /package/dist/cli-bundle/chunks/{extension-3JYWJ5K2.js.map → create-RLRJMRTM.js.map} +0 -0
  723. /package/dist/cli-bundle/chunks/{history-ALTM2RRP.js.map → extension-CPSLJQVE.js.map} +0 -0
  724. /package/dist/cli-bundle/chunks/{history-RUKPKNY7.js.map → extension-CXJ6RELI.js.map} +0 -0
  725. /package/dist/cli-bundle/chunks/{gc-BEJMQT64.js.map → gc-7GQYOS2G.js.map} +0 -0
  726. /package/dist/cli-bundle/chunks/{gc-JEFQDJPA.js.map → gc-LPVMKJQJ.js.map} +0 -0
  727. /package/dist/cli-bundle/chunks/{health-JJJOY7DJ.js.map → health-3IPFLKXB.js.map} +0 -0
  728. /package/dist/cli-bundle/chunks/{health-P67NZ6TT.js.map → health-GZXGBZ36.js.map} +0 -0
  729. /package/dist/cli-bundle/chunks/{history-redact-YY4XYVEP.js.map → history-NERDJNUB.js.map} +0 -0
  730. /package/dist/cli-bundle/chunks/{history-redact-5YGLWUDH.js.map → history-WSZHY3PN.js.map} +0 -0
  731. /package/dist/cli-bundle/chunks/{init-C4CRHW22.js.map → history-redact-MP6CH7U5.js.map} +0 -0
  732. /package/dist/cli-bundle/chunks/{init-HBFGYS66.js.map → history-redact-O3NBCNWC.js.map} +0 -0
  733. /package/dist/cli-bundle/chunks/{list-C7R33MD5.js.map → init-64XDLQJB.js.map} +0 -0
  734. /package/dist/cli-bundle/chunks/{list-DSN6UNFB.js.map → init-PAX32BJA.js.map} +0 -0
  735. /package/dist/cli-bundle/chunks/{restore-LL2WLEDG.js.map → list-DNBJVO3E.js.map} +0 -0
  736. /package/dist/cli-bundle/chunks/{restore-LQHXBAY5.js.map → list-G5Y65VF6.js.map} +0 -0
  737. /package/dist/cli-bundle/chunks/{search-2EI6EAXH.js.map → restore-4MHZFJ2E.js.map} +0 -0
  738. /package/dist/cli-bundle/chunks/{search-QBFBLQRO.js.map → restore-YALDGTQR.js.map} +0 -0
  739. /package/dist/cli-bundle/chunks/{test-NV2DRPUS.js.map → schema-73HR2OJW.js.map} +0 -0
  740. /package/dist/cli-bundle/chunks/{test-WA6RZGM2.js.map → schema-U6LJKSIR.js.map} +0 -0
  741. /package/dist/cli-bundle/chunks/{update-BSKMQOYH.js.map → search-AXPXKZER.js.map} +0 -0
  742. /package/dist/cli-bundle/chunks/{update-FIGYNQ2I.js.map → search-KILGT37L.js.map} +0 -0
  743. /package/dist/cli-bundle/chunks/{telemetry-BT2VSWU2.js.map → telemetry-BZUF6H7G.js.map} +0 -0
  744. /package/dist/cli-bundle/chunks/{telemetry-LQ6FRTUT.js.map → telemetry-GAHHQTOS.js.map} +0 -0
@@ -1,9 +1,10 @@
1
1
  // dist/core/fs/fs-utils.js
2
2
 
3
- !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]="1dd79a7a-ea00-583f-a03c-d08dc95ce458")}catch(e){}}();
3
+ !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]="03ed13d8-75ea-5f3b-b089-a7347a59acca")}catch(e){}}();
4
4
  import * as fs from "node:fs/promises";
5
5
  import path from "node:path";
6
6
  import crypto from "node:crypto";
7
+ var WINDOWS_RENAME_RETRY_DELAYS_MS = [10, 25, 50, 100];
7
8
  async function ensureDir(dirPath) {
8
9
  await fs.mkdir(dirPath, { recursive: true });
9
10
  }
@@ -33,6 +34,26 @@ async function writeFileAtomic(targetPath, contents) {
33
34
  try {
34
35
  await fs.rename(tempPath, targetPath);
35
36
  } catch (error) {
37
+ if (process.platform === "win32" && (isErrno(error, "EPERM") || isErrno(error, "EBUSY"))) {
38
+ let lastError = error;
39
+ for (const delayMs of WINDOWS_RENAME_RETRY_DELAYS_MS) {
40
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
41
+ try {
42
+ await fs.rename(tempPath, targetPath);
43
+ return;
44
+ } catch (retryError) {
45
+ lastError = retryError;
46
+ if (!isErrno(retryError, "EPERM") && !isErrno(retryError, "EBUSY")) {
47
+ break;
48
+ }
49
+ }
50
+ }
51
+ try {
52
+ await fs.unlink(tempPath);
53
+ } catch {
54
+ }
55
+ throw lastError;
56
+ }
36
57
  if (isErrno(error, "EXDEV")) {
37
58
  try {
38
59
  await fs.copyFile(tempPath, targetPath);
@@ -171,6 +192,7 @@ var KNOWN_EXTENSION_POLICY_SURFACES = [
171
192
  "schema.itemfields",
172
193
  "schema.itemtypes",
173
194
  "schema.migrations",
195
+ "schema.profiles",
174
196
  "parser.override",
175
197
  "preflight.override",
176
198
  "services.override",
@@ -608,6 +630,794 @@ function resolveTelemetryErrorCategory(errorCode) {
608
630
  return "unknown";
609
631
  }
610
632
 
633
+ // dist/types.js
634
+ var BUILTIN_ITEM_TYPE_VALUES = [
635
+ "Epic",
636
+ "Feature",
637
+ "Task",
638
+ "Chore",
639
+ "Issue",
640
+ "Decision",
641
+ "Event",
642
+ "Reminder",
643
+ "Milestone",
644
+ "Meeting",
645
+ "Plan"
646
+ ];
647
+ var ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;
648
+ var STATUS_VALUES = [
649
+ "draft",
650
+ "open",
651
+ "in_progress",
652
+ "blocked",
653
+ "closed",
654
+ "canceled"
655
+ ];
656
+ var RUNTIME_STATUS_ROLE_VALUES = [
657
+ "draft",
658
+ "active",
659
+ "blocked",
660
+ "terminal",
661
+ "terminal_done",
662
+ "terminal_canceled",
663
+ "default_open",
664
+ "default_close",
665
+ "default_cancel"
666
+ ];
667
+ var RUNTIME_FIELD_TYPE_VALUES = ["string", "number", "boolean", "string_array"];
668
+ var RUNTIME_FIELD_COMMAND_VALUES = ["create", "update", "update_many", "list", "search", "calendar", "context"];
669
+ var RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = ["allow", "warn", "reject"];
670
+ var DEPENDENCY_KIND_VALUES = [
671
+ "blocks",
672
+ "parent",
673
+ "child",
674
+ "parent_child",
675
+ "child_of",
676
+ "related",
677
+ "related_to",
678
+ "discovered_from",
679
+ "blocked_by",
680
+ "incident_from",
681
+ "epic",
682
+ "supersedes",
683
+ "task"
684
+ ];
685
+ var SCOPE_VALUES = ["project", "global"];
686
+ var RISK_VALUES = ["low", "medium", "high", "critical"];
687
+ var ISSUE_SEVERITY_VALUES = ["low", "medium", "high", "critical"];
688
+ var CONFIDENCE_TEXT_VALUES = ["low", "medium", "high"];
689
+ var GOVERNANCE_PRESET_VALUES = ["minimal", "default", "strict", "custom"];
690
+ var RECURRENCE_FREQUENCY_VALUES = ["daily", "weekly", "monthly", "yearly"];
691
+ var RECURRENCE_WEEKDAY_VALUES = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
692
+ function weekdayOrderIndex(value) {
693
+ return RECURRENCE_WEEKDAY_VALUES.indexOf(value);
694
+ }
695
+ var PLAN_MODE_VALUES = [
696
+ "draft",
697
+ "research",
698
+ "review",
699
+ "approved",
700
+ "executing",
701
+ "paused",
702
+ "completed",
703
+ "superseded"
704
+ ];
705
+ var PLAN_STEP_STATUS_VALUES = [
706
+ "pending",
707
+ "in_progress",
708
+ "completed",
709
+ "blocked",
710
+ "skipped",
711
+ "superseded"
712
+ ];
713
+ var PLAN_HARNESS_VALUES = ["codex", "claude-code", "cursor", "generic"];
714
+ var PLAN_STEP_LINK_KIND_VALUES = [
715
+ "related",
716
+ "blocks",
717
+ "blocked_by",
718
+ "depends_on",
719
+ "discovered_from",
720
+ "implements",
721
+ "verifies",
722
+ "supersedes"
723
+ ];
724
+ var CONTEXT_DEPTH_VALUES = ["brief", "standard", "deep", "full"];
725
+ var CONTEXT_SECTION_VALUES = [
726
+ "hierarchy",
727
+ "activity",
728
+ "progress",
729
+ "recently_created",
730
+ "unparented",
731
+ "blockers",
732
+ "files",
733
+ "workload",
734
+ "staleness",
735
+ "tests"
736
+ ];
737
+
738
+ // dist/core/item/item-type-definition.js
739
+ function normalizeItemTypeStringList(values) {
740
+ return [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
741
+ }
742
+ function normalizeItemTypeOption(option) {
743
+ const key = option.key.trim();
744
+ if (key.length === 0) {
745
+ return null;
746
+ }
747
+ const aliases = normalizeItemTypeStringList(option.aliases);
748
+ const description = option.description?.trim();
749
+ return {
750
+ key,
751
+ values: normalizeItemTypeStringList(option.values),
752
+ required: option.required === true ? true : void 0,
753
+ aliases: aliases.length > 0 ? aliases : void 0,
754
+ description: description && description.length > 0 ? description : void 0
755
+ };
756
+ }
757
+ var keepPolicyCommand = (command) => command;
758
+ var strictPolicyCommand = (command) => {
759
+ const normalized = command.trim().toLowerCase();
760
+ return normalized === "create" || normalized === "update" ? normalized : null;
761
+ };
762
+ function normalizeItemTypeCommandOptionPolicy(policy, resolvePolicyCommand) {
763
+ const command = resolvePolicyCommand(policy.command);
764
+ if (command === null) {
765
+ return null;
766
+ }
767
+ const option = policy.option.trim();
768
+ if (option.length === 0) {
769
+ return null;
770
+ }
771
+ return {
772
+ command,
773
+ option,
774
+ required: policy.required,
775
+ visible: policy.visible,
776
+ enabled: policy.enabled
777
+ };
778
+ }
779
+ function normalizeItemTypeCommandOptionPolicies(policies, resolvePolicyCommand) {
780
+ const dedupedByKey = /* @__PURE__ */ new Map();
781
+ for (const policy of policies ?? []) {
782
+ const normalized = normalizeItemTypeCommandOptionPolicy(policy, resolvePolicyCommand);
783
+ if (!normalized) {
784
+ continue;
785
+ }
786
+ dedupedByKey.set(`${normalized.command}:${normalized.option.toLowerCase()}`, normalized);
787
+ }
788
+ return [...dedupedByKey.values()].sort((left, right) => left.command === right.command ? left.option.localeCompare(right.option) : left.command.localeCompare(right.command));
789
+ }
790
+ function normalizeItemTypeDefinition(definition, options = {}) {
791
+ const resolvePolicyCommand = options.resolvePolicyCommand ?? keepPolicyCommand;
792
+ const name = definition.name.trim();
793
+ if (name.length === 0) {
794
+ return null;
795
+ }
796
+ const hasRequiredCreateFields = definition.required_create_fields !== void 0;
797
+ const hasRequiredCreateRepeatables = definition.required_create_repeatables !== void 0;
798
+ const hasOptions = definition.options !== void 0;
799
+ const hasCommandOptionPolicies = definition.command_option_policies !== void 0;
800
+ const folder = definition.folder?.trim();
801
+ const description = definition.description?.trim();
802
+ const defaultStatus = definition.default_status?.trim();
803
+ const aliases = normalizeItemTypeStringList(definition.aliases);
804
+ const normalizedOptions = (definition.options ?? []).map((option) => normalizeItemTypeOption(option)).filter((option) => option !== null).sort((left, right) => left.key.localeCompare(right.key));
805
+ const commandOptionPolicies = normalizeItemTypeCommandOptionPolicies(definition.command_option_policies, resolvePolicyCommand);
806
+ return {
807
+ name,
808
+ description: description && description.length > 0 ? description : void 0,
809
+ default_status: defaultStatus && defaultStatus.length > 0 ? defaultStatus : void 0,
810
+ folder: folder && folder.length > 0 ? folder : void 0,
811
+ aliases: aliases.length > 0 ? aliases : void 0,
812
+ required_create_fields: hasRequiredCreateFields ? normalizeItemTypeStringList(definition.required_create_fields) : void 0,
813
+ required_create_repeatables: hasRequiredCreateRepeatables ? normalizeItemTypeStringList(definition.required_create_repeatables) : void 0,
814
+ options: hasOptions ? normalizedOptions : void 0,
815
+ command_option_policies: hasCommandOptionPolicies ? commandOptionPolicies : void 0
816
+ };
817
+ }
818
+
819
+ // dist/core/item/type-registry.js
820
+ var DEFAULT_REQUIRED_CREATE_FIELDS = [
821
+ "title",
822
+ "description",
823
+ "status",
824
+ "priority",
825
+ "tags",
826
+ "body",
827
+ "deadline",
828
+ "estimatedMinutes",
829
+ "acceptanceCriteria",
830
+ "author",
831
+ "message",
832
+ "assignee"
833
+ ];
834
+ var DEFAULT_REQUIRED_CREATE_REPEATABLES = ["dep", "comment", "note", "learning", "file", "test", "doc"];
835
+ var COMMON_MUTATION_COMMAND_OPTION_KEYS = [
836
+ "deadline",
837
+ "estimatedMinutes",
838
+ "acceptanceCriteria",
839
+ "definitionOfReady",
840
+ "order",
841
+ "goal",
842
+ "objective",
843
+ "value",
844
+ "impact",
845
+ "outcome",
846
+ "whyNow",
847
+ "assignee",
848
+ "parent",
849
+ "reviewer",
850
+ "risk",
851
+ "confidence",
852
+ "sprint",
853
+ "release",
854
+ "blockedBy",
855
+ "blockedReason",
856
+ "unblockNote",
857
+ "reporter",
858
+ "severity",
859
+ "environment",
860
+ "reproSteps",
861
+ "resolution",
862
+ "expectedResult",
863
+ "actualResult",
864
+ "affectedVersion",
865
+ "fixedVersion",
866
+ "component",
867
+ "regression",
868
+ "customerImpact"
869
+ ];
870
+ var CREATE_COMMAND_OPTION_KEYS = [
871
+ "title",
872
+ "description",
873
+ "type",
874
+ "status",
875
+ "priority",
876
+ "tags",
877
+ "body",
878
+ ...COMMON_MUTATION_COMMAND_OPTION_KEYS,
879
+ "author",
880
+ "message",
881
+ "dep",
882
+ "comment",
883
+ "note",
884
+ "learning",
885
+ "file",
886
+ "test",
887
+ "doc",
888
+ "reminder",
889
+ "event",
890
+ "typeOption",
891
+ "field"
892
+ ];
893
+ var UPDATE_COMMAND_OPTION_KEYS = [
894
+ "title",
895
+ "description",
896
+ "body",
897
+ "status",
898
+ "closeReason",
899
+ "priority",
900
+ "type",
901
+ "tags",
902
+ ...COMMON_MUTATION_COMMAND_OPTION_KEYS,
903
+ "author",
904
+ "message",
905
+ "comment",
906
+ "note",
907
+ "learning",
908
+ "file",
909
+ "test",
910
+ "doc",
911
+ "reminder",
912
+ "event",
913
+ "typeOption",
914
+ "field",
915
+ "allowAuditUpdate",
916
+ "force"
917
+ ];
918
+ var SHARED_COMMAND_OPTION_ALIASES = {
919
+ "close-reason": "closeReason",
920
+ close_reason: "closeReason",
921
+ "estimated-minutes": "estimatedMinutes",
922
+ estimated_minutes: "estimatedMinutes",
923
+ estimate: "estimatedMinutes",
924
+ "acceptance-criteria": "acceptanceCriteria",
925
+ acceptance_criteria: "acceptanceCriteria",
926
+ ac: "acceptanceCriteria",
927
+ "definition-of-ready": "definitionOfReady",
928
+ definition_of_ready: "definitionOfReady",
929
+ rank: "order",
930
+ "why-now": "whyNow",
931
+ why_now: "whyNow",
932
+ "blocked-by": "blockedBy",
933
+ blocked_by: "blockedBy",
934
+ "blocked-reason": "blockedReason",
935
+ blocked_reason: "blockedReason",
936
+ "unblock-note": "unblockNote",
937
+ unblock_note: "unblockNote",
938
+ "repro-steps": "reproSteps",
939
+ repro_steps: "reproSteps",
940
+ "expected-result": "expectedResult",
941
+ expected_result: "expectedResult",
942
+ "actual-result": "actualResult",
943
+ actual_result: "actualResult",
944
+ "affected-version": "affectedVersion",
945
+ affected_version: "affectedVersion",
946
+ "fixed-version": "fixedVersion",
947
+ fixed_version: "fixedVersion",
948
+ "customer-impact": "customerImpact",
949
+ customer_impact: "customerImpact",
950
+ "type-option": "typeOption",
951
+ type_option: "typeOption",
952
+ type_options: "typeOption"
953
+ };
954
+ var CREATE_COMMAND_OPTION_ALIASES = {
955
+ ...SHARED_COMMAND_OPTION_ALIASES
956
+ };
957
+ var UPDATE_COMMAND_OPTION_ALIASES = {
958
+ ...SHARED_COMMAND_OPTION_ALIASES,
959
+ "allow-audit-update": "allowAuditUpdate",
960
+ allow_audit_update: "allowAuditUpdate"
961
+ };
962
+ var CREATE_COMMAND_OPTION_FLAG_LABELS = {
963
+ title: "--title",
964
+ description: "--description",
965
+ type: "--type",
966
+ status: "--status",
967
+ priority: "--priority",
968
+ tags: "--tags",
969
+ body: "--body",
970
+ deadline: "--deadline",
971
+ estimatedMinutes: "--estimate/--estimated-minutes",
972
+ acceptanceCriteria: "--acceptance-criteria/--ac",
973
+ definitionOfReady: "--definition-of-ready",
974
+ order: "--order/--rank",
975
+ goal: "--goal",
976
+ objective: "--objective",
977
+ value: "--value",
978
+ impact: "--impact",
979
+ outcome: "--outcome",
980
+ whyNow: "--why-now",
981
+ author: "--author",
982
+ message: "--message",
983
+ assignee: "--assignee",
984
+ parent: "--parent",
985
+ reviewer: "--reviewer",
986
+ risk: "--risk",
987
+ confidence: "--confidence",
988
+ sprint: "--sprint",
989
+ release: "--release",
990
+ blockedBy: "--blocked-by",
991
+ blockedReason: "--blocked-reason",
992
+ unblockNote: "--unblock-note",
993
+ reporter: "--reporter",
994
+ severity: "--severity",
995
+ environment: "--environment",
996
+ reproSteps: "--repro-steps",
997
+ resolution: "--resolution",
998
+ expectedResult: "--expected-result",
999
+ actualResult: "--actual-result",
1000
+ affectedVersion: "--affected-version",
1001
+ fixedVersion: "--fixed-version",
1002
+ component: "--component",
1003
+ regression: "--regression",
1004
+ customerImpact: "--customer-impact",
1005
+ dep: "--dep",
1006
+ comment: "--comment",
1007
+ note: "--note",
1008
+ learning: "--learning",
1009
+ file: "--file",
1010
+ test: "--test",
1011
+ doc: "--doc",
1012
+ reminder: "--reminder",
1013
+ event: "--event",
1014
+ typeOption: "--type-option"
1015
+ };
1016
+ var UPDATE_COMMAND_OPTION_FLAG_LABELS = {
1017
+ title: "--title",
1018
+ description: "--description",
1019
+ body: "--body",
1020
+ status: "--status",
1021
+ closeReason: "--close-reason",
1022
+ priority: "--priority",
1023
+ type: "--type",
1024
+ tags: "--tags",
1025
+ deadline: "--deadline",
1026
+ estimatedMinutes: "--estimate/--estimated-minutes",
1027
+ acceptanceCriteria: "--acceptance-criteria/--ac",
1028
+ definitionOfReady: "--definition-of-ready",
1029
+ order: "--order/--rank",
1030
+ goal: "--goal",
1031
+ objective: "--objective",
1032
+ value: "--value",
1033
+ impact: "--impact",
1034
+ outcome: "--outcome",
1035
+ whyNow: "--why-now",
1036
+ assignee: "--assignee",
1037
+ parent: "--parent",
1038
+ reviewer: "--reviewer",
1039
+ risk: "--risk",
1040
+ confidence: "--confidence",
1041
+ sprint: "--sprint",
1042
+ release: "--release",
1043
+ blockedBy: "--blocked-by",
1044
+ blockedReason: "--blocked-reason",
1045
+ unblockNote: "--unblock-note",
1046
+ reporter: "--reporter",
1047
+ severity: "--severity",
1048
+ environment: "--environment",
1049
+ reproSteps: "--repro-steps",
1050
+ resolution: "--resolution",
1051
+ expectedResult: "--expected-result",
1052
+ actualResult: "--actual-result",
1053
+ affectedVersion: "--affected-version",
1054
+ fixedVersion: "--fixed-version",
1055
+ component: "--component",
1056
+ regression: "--regression",
1057
+ customerImpact: "--customer-impact",
1058
+ comment: "--comment",
1059
+ note: "--note",
1060
+ learning: "--learning",
1061
+ file: "--file",
1062
+ test: "--test",
1063
+ doc: "--doc",
1064
+ reminder: "--reminder",
1065
+ event: "--event",
1066
+ typeOption: "--type-option",
1067
+ allowAuditUpdate: "--allow-audit-update",
1068
+ author: "--author",
1069
+ message: "--message",
1070
+ force: "--force"
1071
+ };
1072
+ function normalizeCommandOptionToken(value) {
1073
+ return value.trim().replace(/^--+/, "").toLowerCase();
1074
+ }
1075
+ function commandOptionKeys(command) {
1076
+ return command === "create" ? CREATE_COMMAND_OPTION_KEYS : UPDATE_COMMAND_OPTION_KEYS;
1077
+ }
1078
+ function commandOptionAliases(command) {
1079
+ return command === "create" ? CREATE_COMMAND_OPTION_ALIASES : UPDATE_COMMAND_OPTION_ALIASES;
1080
+ }
1081
+ function canonicalizeCommandOptionKey(command, rawOption) {
1082
+ const normalizedToken = normalizeCommandOptionToken(rawOption);
1083
+ if (normalizedToken.length === 0) {
1084
+ return void 0;
1085
+ }
1086
+ const aliased = commandOptionAliases(command)[normalizedToken];
1087
+ if (aliased) {
1088
+ return aliased;
1089
+ }
1090
+ return commandOptionKeys(command).find((candidate) => candidate.toLowerCase() === normalizedToken);
1091
+ }
1092
+ function commandOptionFlagLabel(command, optionKey) {
1093
+ const labels = command === "create" ? CREATE_COMMAND_OPTION_FLAG_LABELS : UPDATE_COMMAND_OPTION_FLAG_LABELS;
1094
+ return labels[optionKey] ?? `--${optionKey.replace(/([A-Z])/g, "-$1").toLowerCase()}`;
1095
+ }
1096
+ function toDefaultFolder(name) {
1097
+ const normalized = toSlugToken(name);
1098
+ if (normalized.length === 0) {
1099
+ return "items";
1100
+ }
1101
+ return normalized.endsWith("s") ? normalized : `${normalized}s`;
1102
+ }
1103
+ function toSlugToken(value) {
1104
+ const trimmed = value.trim().toLowerCase();
1105
+ let slug = "";
1106
+ let pendingDash = false;
1107
+ for (const character of trimmed) {
1108
+ const code = character.charCodeAt(0);
1109
+ const isAlpha = code >= 97 && code <= 122;
1110
+ const isDigit = code >= 48 && code <= 57;
1111
+ if (isAlpha || isDigit) {
1112
+ if (pendingDash && slug.length > 0) {
1113
+ slug += "-";
1114
+ }
1115
+ slug += character;
1116
+ pendingDash = false;
1117
+ continue;
1118
+ }
1119
+ if (slug.length > 0) {
1120
+ pendingDash = true;
1121
+ }
1122
+ }
1123
+ return slug;
1124
+ }
1125
+ function normalizeTypeDefinition(definition) {
1126
+ return normalizeItemTypeDefinition(definition, { resolvePolicyCommand: strictPolicyCommand });
1127
+ }
1128
+ function coerceTypeDefinitionFromUnknown(raw) {
1129
+ if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
1130
+ return null;
1131
+ }
1132
+ const record = raw;
1133
+ const name = typeof record.name === "string" ? record.name : "";
1134
+ if (name.trim().length === 0) {
1135
+ return null;
1136
+ }
1137
+ const folder = typeof record.folder === "string" ? record.folder : void 0;
1138
+ const description = typeof record.description === "string" ? record.description : void 0;
1139
+ const defaultStatus = typeof record.default_status === "string" ? record.default_status : void 0;
1140
+ const aliases = Array.isArray(record.aliases) ? record.aliases.filter((value) => typeof value === "string") : void 0;
1141
+ const requiredCreateFields = Array.isArray(record.required_create_fields) ? record.required_create_fields.filter((value) => typeof value === "string") : void 0;
1142
+ const requiredCreateRepeatables = Array.isArray(record.required_create_repeatables) ? record.required_create_repeatables.filter((value) => typeof value === "string") : void 0;
1143
+ let options;
1144
+ if (Array.isArray(record.options)) {
1145
+ options = [];
1146
+ for (const entry of record.options) {
1147
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
1148
+ continue;
1149
+ }
1150
+ const optionRecord = entry;
1151
+ if (typeof optionRecord.key !== "string") {
1152
+ continue;
1153
+ }
1154
+ options.push({
1155
+ key: optionRecord.key,
1156
+ values: Array.isArray(optionRecord.values) ? optionRecord.values.filter((value) => typeof value === "string") : [],
1157
+ required: optionRecord.required === void 0 ? void 0 : Boolean(optionRecord.required),
1158
+ aliases: Array.isArray(optionRecord.aliases) ? optionRecord.aliases.filter((value) => typeof value === "string") : void 0,
1159
+ description: typeof optionRecord.description === "string" ? optionRecord.description : void 0
1160
+ });
1161
+ }
1162
+ }
1163
+ let commandOptionPolicies;
1164
+ if (Array.isArray(record.command_option_policies)) {
1165
+ commandOptionPolicies = [];
1166
+ for (const entry of record.command_option_policies) {
1167
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
1168
+ continue;
1169
+ }
1170
+ const policyRecord = entry;
1171
+ if (typeof policyRecord.command !== "string" || typeof policyRecord.option !== "string") {
1172
+ continue;
1173
+ }
1174
+ const normalizedCommand = policyRecord.command.trim().toLowerCase();
1175
+ if (normalizedCommand !== "create" && normalizedCommand !== "update") {
1176
+ continue;
1177
+ }
1178
+ commandOptionPolicies.push({
1179
+ command: normalizedCommand,
1180
+ option: policyRecord.option,
1181
+ required: policyRecord.required === void 0 ? void 0 : Boolean(policyRecord.required),
1182
+ visible: policyRecord.visible === void 0 ? void 0 : Boolean(policyRecord.visible),
1183
+ enabled: policyRecord.enabled === void 0 ? void 0 : Boolean(policyRecord.enabled)
1184
+ });
1185
+ }
1186
+ }
1187
+ return {
1188
+ name,
1189
+ description,
1190
+ default_status: defaultStatus,
1191
+ folder,
1192
+ aliases,
1193
+ required_create_fields: requiredCreateFields,
1194
+ required_create_repeatables: requiredCreateRepeatables,
1195
+ options,
1196
+ command_option_policies: commandOptionPolicies
1197
+ };
1198
+ }
1199
+ function applyTypeDefinitions(source, target) {
1200
+ for (const rawDefinition of source) {
1201
+ const normalizedDefinition = normalizeTypeDefinition(rawDefinition);
1202
+ if (!normalizedDefinition) {
1203
+ continue;
1204
+ }
1205
+ const lowerName = normalizedDefinition.name.toLowerCase();
1206
+ const existing = target.get(lowerName);
1207
+ const keepName = existing?.name ?? normalizedDefinition.name;
1208
+ const folder = normalizedDefinition.folder ?? existing?.folder ?? toDefaultFolder(keepName);
1209
+ const aliases = normalizeItemTypeStringList([
1210
+ ...existing?.aliases ?? [],
1211
+ ...normalizedDefinition.aliases ?? []
1212
+ ]);
1213
+ const requiredCreateFields = normalizedDefinition.required_create_fields ? normalizeItemTypeStringList(normalizedDefinition.required_create_fields) : existing?.required_create_fields ?? [];
1214
+ const requiredCreateRepeatables = normalizedDefinition.required_create_repeatables ? normalizeItemTypeStringList(normalizedDefinition.required_create_repeatables) : existing?.required_create_repeatables ?? [];
1215
+ const options = normalizedDefinition.options ? normalizedDefinition.options : existing?.options ? [...existing.options] : [];
1216
+ const commandOptionPolicies = normalizedDefinition.command_option_policies ? normalizedDefinition.command_option_policies : existing?.command_option_policies ? [...existing.command_option_policies] : [];
1217
+ const defaultStatus = normalizedDefinition.default_status ?? existing?.default_status;
1218
+ const description = normalizedDefinition.description ?? existing?.description;
1219
+ target.set(lowerName, {
1220
+ name: keepName,
1221
+ ...description ? { description } : {},
1222
+ ...defaultStatus ? { default_status: defaultStatus } : {},
1223
+ folder,
1224
+ aliases,
1225
+ required_create_fields: requiredCreateFields,
1226
+ required_create_repeatables: requiredCreateRepeatables,
1227
+ options,
1228
+ command_option_policies: commandOptionPolicies
1229
+ });
1230
+ }
1231
+ }
1232
+ function collectExtensionTypeDefinitions(registrations) {
1233
+ if (!registrations) {
1234
+ return [];
1235
+ }
1236
+ const definitions = [];
1237
+ for (const registration of registrations.item_types ?? []) {
1238
+ const typeDefinitionsRaw = registration.types;
1239
+ if (!Array.isArray(typeDefinitionsRaw)) {
1240
+ continue;
1241
+ }
1242
+ for (const rawDefinition of typeDefinitionsRaw) {
1243
+ const normalized = coerceTypeDefinitionFromUnknown(rawDefinition);
1244
+ if (normalized) {
1245
+ definitions.push(normalized);
1246
+ }
1247
+ }
1248
+ }
1249
+ return definitions;
1250
+ }
1251
+ function resolveItemTypeRegistry(settings, extensionRegistrations = null) {
1252
+ const byLowerName = /* @__PURE__ */ new Map();
1253
+ for (const builtin of ITEM_TYPE_VALUES) {
1254
+ byLowerName.set(builtin.toLowerCase(), {
1255
+ name: builtin,
1256
+ folder: TYPE_TO_FOLDER[builtin],
1257
+ aliases: [],
1258
+ required_create_fields: [...DEFAULT_REQUIRED_CREATE_FIELDS],
1259
+ required_create_repeatables: [...DEFAULT_REQUIRED_CREATE_REPEATABLES],
1260
+ options: [],
1261
+ command_option_policies: []
1262
+ });
1263
+ }
1264
+ applyTypeDefinitions(settings.item_types?.definitions ?? [], byLowerName);
1265
+ applyTypeDefinitions(collectExtensionTypeDefinitions(extensionRegistrations), byLowerName);
1266
+ const definitions = [...byLowerName.values()].sort((left, right) => left.name.localeCompare(right.name));
1267
+ const byType = {};
1268
+ const aliasToType = {};
1269
+ const typeToFolder = {};
1270
+ for (const definition of definitions) {
1271
+ byType[definition.name] = definition;
1272
+ typeToFolder[definition.name] = definition.folder;
1273
+ aliasToType[definition.name.toLowerCase()] = definition.name;
1274
+ for (const alias of definition.aliases) {
1275
+ aliasToType[alias.toLowerCase()] = definition.name;
1276
+ }
1277
+ }
1278
+ const folders = [...new Set(definitions.map((definition) => definition.folder))].sort((left, right) => left.localeCompare(right));
1279
+ return {
1280
+ types: definitions.map((definition) => definition.name),
1281
+ folders,
1282
+ type_to_folder: typeToFolder,
1283
+ by_type: byType,
1284
+ alias_to_type: aliasToType
1285
+ };
1286
+ }
1287
+ function resolveTypeName(rawType, registry) {
1288
+ if (rawType === void 0) {
1289
+ return void 0;
1290
+ }
1291
+ return registry.alias_to_type[rawType.trim().toLowerCase()];
1292
+ }
1293
+ function resolveTypeDefinition(typeName, registry) {
1294
+ const resolvedName = resolveTypeName(typeName, registry);
1295
+ if (!resolvedName) {
1296
+ return void 0;
1297
+ }
1298
+ return registry.by_type[resolvedName];
1299
+ }
1300
+ function resolveCommandOptionPolicyState(typeDefinition, command, baseRequiredOptions) {
1301
+ const errors = [];
1302
+ const required = /* @__PURE__ */ new Set();
1303
+ const hidden = /* @__PURE__ */ new Set();
1304
+ const disabled = /* @__PURE__ */ new Set();
1305
+ for (const rawBase of baseRequiredOptions) {
1306
+ const canonical = canonicalizeCommandOptionKey(command, rawBase);
1307
+ if (!canonical) {
1308
+ errors.push(`Unsupported base required option "${rawBase}" for command "${command}" on type "${typeDefinition.name}"`);
1309
+ continue;
1310
+ }
1311
+ required.add(canonical);
1312
+ }
1313
+ for (const policy of typeDefinition.command_option_policies) {
1314
+ if (policy.command !== command) {
1315
+ continue;
1316
+ }
1317
+ const canonical = canonicalizeCommandOptionKey(command, policy.option);
1318
+ if (!canonical) {
1319
+ errors.push(`Unsupported command_option_policies option "${policy.option}" for command "${command}" on type "${typeDefinition.name}"`);
1320
+ continue;
1321
+ }
1322
+ if (policy.required !== void 0) {
1323
+ if (policy.required) {
1324
+ required.add(canonical);
1325
+ } else {
1326
+ required.delete(canonical);
1327
+ }
1328
+ }
1329
+ if (policy.visible !== void 0) {
1330
+ if (policy.visible) {
1331
+ hidden.delete(canonical);
1332
+ } else {
1333
+ hidden.add(canonical);
1334
+ }
1335
+ }
1336
+ if (policy.enabled !== void 0) {
1337
+ if (policy.enabled) {
1338
+ disabled.delete(canonical);
1339
+ } else {
1340
+ disabled.add(canonical);
1341
+ }
1342
+ }
1343
+ }
1344
+ for (const option of required) {
1345
+ if (disabled.has(option)) {
1346
+ errors.push(`Option "${option}" cannot be both required and disabled for command "${command}" on type "${typeDefinition.name}"`);
1347
+ }
1348
+ }
1349
+ return {
1350
+ required: [...required],
1351
+ hidden: [...hidden].sort((left, right) => left.localeCompare(right)),
1352
+ disabled: [...disabled].sort((left, right) => left.localeCompare(right)),
1353
+ errors
1354
+ };
1355
+ }
1356
+ function validateTypeOptions(typeName, rawTypeOptions, registry) {
1357
+ const typeDefinition = resolveTypeDefinition(typeName, registry);
1358
+ if (!typeDefinition) {
1359
+ return {
1360
+ normalized: void 0,
1361
+ errors: [`Unknown type "${typeName}"`]
1362
+ };
1363
+ }
1364
+ const errors = [];
1365
+ const optionByAlias = /* @__PURE__ */ new Map();
1366
+ for (const option of typeDefinition.options) {
1367
+ optionByAlias.set(option.key.toLowerCase(), option);
1368
+ for (const alias of option.aliases ?? []) {
1369
+ optionByAlias.set(alias.toLowerCase(), option);
1370
+ }
1371
+ }
1372
+ const normalized = {};
1373
+ for (const [rawKey, rawValue] of Object.entries(rawTypeOptions ?? {})) {
1374
+ const trimmedKey = rawKey.trim();
1375
+ const trimmedValue = rawValue.trim();
1376
+ if (trimmedKey.length === 0) {
1377
+ errors.push("type option keys must not be empty");
1378
+ continue;
1379
+ }
1380
+ if (trimmedValue.length === 0) {
1381
+ errors.push(`type option "${trimmedKey}" must not be empty`);
1382
+ continue;
1383
+ }
1384
+ const optionDefinition = optionByAlias.get(trimmedKey.toLowerCase());
1385
+ if (!optionDefinition) {
1386
+ const allowed = typeDefinition.options.map((option) => option.key).join(", ");
1387
+ errors.push(typeDefinition.options.length > 0 ? `Unknown type option "${trimmedKey}" for type "${typeDefinition.name}". Allowed: ${allowed}` : `Type "${typeDefinition.name}" does not define any configurable type options`);
1388
+ continue;
1389
+ }
1390
+ const allowedValues = optionDefinition.values;
1391
+ let resolvedValue = trimmedValue;
1392
+ if (allowedValues.length > 0) {
1393
+ const valueLookup = new Map(allowedValues.map((value) => [value.toLowerCase(), value]));
1394
+ const canonical = valueLookup.get(trimmedValue.toLowerCase());
1395
+ if (!canonical) {
1396
+ errors.push(`Invalid value "${trimmedValue}" for type option "${optionDefinition.key}". Allowed: ${allowedValues.join(", ")}`);
1397
+ continue;
1398
+ }
1399
+ resolvedValue = canonical;
1400
+ }
1401
+ normalized[optionDefinition.key] = resolvedValue;
1402
+ }
1403
+ for (const option of typeDefinition.options) {
1404
+ if (option.required && !(option.key in normalized)) {
1405
+ errors.push(`Missing required type option "${option.key}" for type "${typeDefinition.name}"`);
1406
+ }
1407
+ }
1408
+ const sortedKeys = Object.keys(normalized).sort((left, right) => left.localeCompare(right));
1409
+ if (sortedKeys.length === 0) {
1410
+ return {
1411
+ normalized: void 0,
1412
+ errors
1413
+ };
1414
+ }
1415
+ return {
1416
+ normalized: Object.fromEntries(sortedKeys.map((key) => [key, normalized[key]])),
1417
+ errors
1418
+ };
1419
+ }
1420
+
611
1421
  // dist/core/store/paths.js
612
1422
  import { statSync } from "node:fs";
613
1423
  import os from "node:os";
@@ -655,54 +1465,25 @@ function resolvePmRoot(cwd, cliPath) {
655
1465
  return nestedRoot;
656
1466
  }
657
1467
  }
658
- return resolved;
659
- }
660
- const discoveredRoot = discoverPmRootFromAncestors(cwd);
661
- if (discoveredRoot) {
662
- return discoveredRoot;
663
- }
664
- const selected = PM_DIRNAME;
665
- return path4.resolve(cwd, selected);
666
- }
667
- function resolveGlobalPmRoot(cwd) {
668
- const envPath = process.env.PM_GLOBAL_PATH?.trim();
669
- const selected = envPath && envPath.length > 0 ? envPath : path4.join(os.homedir(), ".pm-cli");
670
- return path4.resolve(cwd, selected);
671
- }
672
- function getSettingsPath(pmRoot) {
673
- return path4.join(pmRoot, SETTINGS_FILENAME);
674
- }
675
- function deriveDefaultTypeFolder(type) {
676
- const normalized = toSlugToken(type);
677
- if (normalized.length === 0) {
678
- return "items";
679
- }
680
- return normalized.endsWith("s") ? normalized : `${normalized}s`;
681
- }
682
- function toSlugToken(value) {
683
- const trimmed = value.trim().toLowerCase();
684
- let slug = "";
685
- let pendingDash = false;
686
- for (const character of trimmed) {
687
- const code = character.charCodeAt(0);
688
- const isAlpha = code >= 97 && code <= 122;
689
- const isDigit = code >= 48 && code <= 57;
690
- if (isAlpha || isDigit) {
691
- if (pendingDash && slug.length > 0) {
692
- slug += "-";
693
- }
694
- slug += character;
695
- pendingDash = false;
696
- continue;
697
- }
698
- if (slug.length > 0) {
699
- pendingDash = true;
700
- }
1468
+ return resolved;
701
1469
  }
702
- return slug;
1470
+ const discoveredRoot = discoverPmRootFromAncestors(cwd);
1471
+ if (discoveredRoot) {
1472
+ return discoveredRoot;
1473
+ }
1474
+ const selected = PM_DIRNAME;
1475
+ return path4.resolve(cwd, selected);
1476
+ }
1477
+ function resolveGlobalPmRoot(cwd) {
1478
+ const envPath = process.env.PM_GLOBAL_PATH?.trim();
1479
+ const selected = envPath && envPath.length > 0 ? envPath : path4.join(os.homedir(), ".pm-cli");
1480
+ return path4.resolve(cwd, selected);
1481
+ }
1482
+ function getSettingsPath(pmRoot) {
1483
+ return path4.join(pmRoot, SETTINGS_FILENAME);
703
1484
  }
704
1485
  function getTypeDirPath(pmRoot, type, typeToFolder = TYPE_TO_FOLDER) {
705
- const folder = typeToFolder[type] ?? deriveDefaultTypeFolder(type);
1486
+ const folder = typeToFolder[type] ?? toDefaultFolder(type);
706
1487
  return path4.join(pmRoot, folder);
707
1488
  }
708
1489
  function getItemPath(pmRoot, type, id, itemFormat = "toon", typeToFolder = TYPE_TO_FOLDER) {
@@ -806,6 +1587,51 @@ function asRecordLoose(value) {
806
1587
  return value;
807
1588
  }
808
1589
 
1590
+ // dist/core/shared/levenshtein.js
1591
+ function levenshteinDistanceWithinLimit(left, right, limit) {
1592
+ if (left === right) {
1593
+ return 0;
1594
+ }
1595
+ if (Math.abs(left.length - right.length) > limit) {
1596
+ return null;
1597
+ }
1598
+ const width = right.length + 1;
1599
+ const beforePrevious = new Array(width);
1600
+ const previous = new Array(width);
1601
+ const current = new Array(width);
1602
+ for (let column = 0; column < width; column += 1) {
1603
+ beforePrevious[column] = 0;
1604
+ previous[column] = column;
1605
+ }
1606
+ for (let row = 1; row <= left.length; row += 1) {
1607
+ current[0] = row;
1608
+ let rowMin = current[0];
1609
+ for (let column = 1; column <= right.length; column += 1) {
1610
+ const cost = left[row - 1] === right[column - 1] ? 0 : 1;
1611
+ const substitution = previous[column - 1] + cost;
1612
+ const insertion = current[column - 1] + 1;
1613
+ const deletion = previous[column] + 1;
1614
+ let candidate = Math.min(substitution, insertion, deletion);
1615
+ if (row > 1 && column > 1 && left[row - 1] === right[column - 2] && left[row - 2] === right[column - 1]) {
1616
+ candidate = Math.min(candidate, beforePrevious[column - 2] + 1);
1617
+ }
1618
+ current[column] = candidate;
1619
+ if (candidate < rowMin) {
1620
+ rowMin = candidate;
1621
+ }
1622
+ }
1623
+ if (rowMin > limit) {
1624
+ return null;
1625
+ }
1626
+ for (let column = 0; column < width; column += 1) {
1627
+ beforePrevious[column] = previous[column];
1628
+ previous[column] = current[column];
1629
+ }
1630
+ }
1631
+ const result = previous[right.length];
1632
+ return result <= limit ? result : null;
1633
+ }
1634
+
809
1635
  // dist/core/extensions/extension-registries.js
810
1636
  function createEmptyExtensionHookRegistry() {
811
1637
  return {
@@ -849,6 +1675,7 @@ function createEmptyExtensionRegistrationRegistry() {
849
1675
  item_fields: [],
850
1676
  item_types: [],
851
1677
  migrations: [],
1678
+ profiles: [],
852
1679
  importers: [],
853
1680
  exporters: [],
854
1681
  search_providers: [],
@@ -1329,51 +2156,6 @@ function isFlagDefaultValueCoercible(value, kind) {
1329
2156
  return typeof value === "string" && ["true", "false", "1", "0"].includes(value.trim().toLowerCase());
1330
2157
  }
1331
2158
 
1332
- // dist/core/shared/levenshtein.js
1333
- function levenshteinDistanceWithinLimit(left, right, limit) {
1334
- if (left === right) {
1335
- return 0;
1336
- }
1337
- if (Math.abs(left.length - right.length) > limit) {
1338
- return null;
1339
- }
1340
- const width = right.length + 1;
1341
- const beforePrevious = new Array(width);
1342
- const previous = new Array(width);
1343
- const current = new Array(width);
1344
- for (let column = 0; column < width; column += 1) {
1345
- beforePrevious[column] = 0;
1346
- previous[column] = column;
1347
- }
1348
- for (let row = 1; row <= left.length; row += 1) {
1349
- current[0] = row;
1350
- let rowMin = current[0];
1351
- for (let column = 1; column <= right.length; column += 1) {
1352
- const cost = left[row - 1] === right[column - 1] ? 0 : 1;
1353
- const substitution = previous[column - 1] + cost;
1354
- const insertion = current[column - 1] + 1;
1355
- const deletion = previous[column] + 1;
1356
- let candidate = Math.min(substitution, insertion, deletion);
1357
- if (row > 1 && column > 1 && left[row - 1] === right[column - 2] && left[row - 2] === right[column - 1]) {
1358
- candidate = Math.min(candidate, beforePrevious[column - 2] + 1);
1359
- }
1360
- current[column] = candidate;
1361
- if (candidate < rowMin) {
1362
- rowMin = candidate;
1363
- }
1364
- }
1365
- if (rowMin > limit) {
1366
- return null;
1367
- }
1368
- for (let column = 0; column < width; column += 1) {
1369
- beforePrevious[column] = previous[column];
1370
- previous[column] = current[column];
1371
- }
1372
- }
1373
- const result = previous[right.length];
1374
- return result <= limit ? result : null;
1375
- }
1376
-
1377
2159
  // dist/core/extensions/item-field-types.js
1378
2160
  var KNOWN_ITEM_FIELD_TYPES = ["string", "number", "boolean", "array", "object"];
1379
2161
  function normalizeItemFieldType(value) {
@@ -1717,34 +2499,15 @@ function collectExtensionPolicyOverrides(rawOverrides) {
1717
2499
  }
1718
2500
  return overridesByName;
1719
2501
  }
1720
- function normalizeExtensionPolicy(settings) {
1721
- const policy = settings.extensions.policy;
1722
- const mode = normalizePolicyMode(policy?.mode);
1723
- const trustMode = normalizePolicyTrustMode(policy?.trust_mode);
1724
- const pmMaxVersionExceededMode2 = normalizePmMaxVersionExceededMode(policy?.pm_max_version_exceeded_mode);
1725
- const requireProvenance = policy?.require_provenance === true;
1726
- const trustedExtensions = normalizePolicyStringSet(policy?.trusted_extensions);
1727
- const defaultSandboxProfile = normalizePolicySandboxProfile(policy?.default_sandbox_profile);
1728
- const allowedExtensions = normalizePolicyStringSet(policy?.allowed_extensions);
1729
- const blockedExtensions = normalizePolicyStringSet(policy?.blocked_extensions);
1730
- const allowedCapabilities = normalizePolicyStringSet(policy?.allowed_capabilities);
1731
- const blockedCapabilities = normalizePolicyStringSet(policy?.blocked_capabilities);
1732
- const allowedSurfaces = normalizePolicySurfaceSet(policy?.allowed_surfaces);
1733
- const blockedSurfaces = normalizePolicySurfaceSet(policy?.blocked_surfaces);
1734
- const allowedCommands = normalizePolicyStringSet(policy?.allowed_commands);
1735
- const blockedCommands = normalizePolicyStringSet(policy?.blocked_commands);
1736
- const allowedActions = normalizePolicyStringSet(policy?.allowed_actions);
1737
- const blockedActions = normalizePolicyStringSet(policy?.blocked_actions);
1738
- const allowedServices = normalizePolicyStringSet(policy?.allowed_services);
1739
- const blockedServices = normalizePolicyStringSet(policy?.blocked_services);
1740
- const overridesByName = collectExtensionPolicyOverrides(policy?.extension_overrides);
2502
+ function collectExtensionPolicyWarnings(normalized) {
1741
2503
  const warnings = [];
1742
- for (const capability of toSortedList([...allowedCapabilities, ...blockedCapabilities])) {
2504
+ const sortedOverrides = [...normalized.overridesByName.values()].sort((left, right) => left.name.localeCompare(right.name));
2505
+ for (const capability of toSortedList([...normalized.allowedCapabilities, ...normalized.blockedCapabilities])) {
1743
2506
  if (!isKnownExtensionCapability(capability)) {
1744
2507
  warnings.push(`extension_policy_unknown_capability:${capability}`);
1745
2508
  }
1746
2509
  }
1747
- for (const override of [...overridesByName.values()].sort((left, right) => left.name.localeCompare(right.name))) {
2510
+ for (const override of sortedOverrides) {
1748
2511
  for (const capability of toSortedList([...override.allowedCapabilities, ...override.blockedCapabilities])) {
1749
2512
  if (!isKnownExtensionCapability(capability)) {
1750
2513
  warnings.push(`extension_policy_unknown_capability:${override.name}:${capability}`);
@@ -1752,39 +2515,54 @@ function normalizeExtensionPolicy(settings) {
1752
2515
  }
1753
2516
  }
1754
2517
  const knownSurfaces = new Set(KNOWN_EXTENSION_POLICY_SURFACES);
1755
- for (const surface of toSortedList([...allowedSurfaces, ...blockedSurfaces])) {
2518
+ for (const surface of toSortedList([...normalized.allowedSurfaces, ...normalized.blockedSurfaces])) {
1756
2519
  if (!knownSurfaces.has(surface)) {
1757
2520
  warnings.push(`extension_policy_unknown_surface:${surface}`);
1758
2521
  }
1759
2522
  }
1760
- for (const override of [...overridesByName.values()].sort((left, right) => left.name.localeCompare(right.name))) {
2523
+ for (const override of sortedOverrides) {
1761
2524
  for (const surface of toSortedList([...override.allowedSurfaces, ...override.blockedSurfaces])) {
1762
2525
  if (!knownSurfaces.has(surface)) {
1763
2526
  warnings.push(`extension_policy_unknown_surface:${override.name}:${surface}`);
1764
2527
  }
1765
2528
  }
1766
2529
  }
2530
+ return [...new Set(warnings)].sort((left, right) => left.localeCompare(right));
2531
+ }
2532
+ function normalizeExtensionPolicy(settings) {
2533
+ const policy = settings.extensions?.policy ?? {};
2534
+ const allowedCapabilities = normalizePolicyStringSet(policy.allowed_capabilities);
2535
+ const blockedCapabilities = normalizePolicyStringSet(policy.blocked_capabilities);
2536
+ const allowedSurfaces = normalizePolicySurfaceSet(policy.allowed_surfaces);
2537
+ const blockedSurfaces = normalizePolicySurfaceSet(policy.blocked_surfaces);
2538
+ const overridesByName = collectExtensionPolicyOverrides(policy.extension_overrides);
1767
2539
  return {
1768
- mode,
1769
- trustMode,
1770
- pmMaxVersionExceededMode: pmMaxVersionExceededMode2,
1771
- requireProvenance,
1772
- trustedExtensions,
1773
- defaultSandboxProfile,
1774
- allowedExtensions,
1775
- blockedExtensions,
2540
+ mode: normalizePolicyMode(policy.mode),
2541
+ trustMode: normalizePolicyTrustMode(policy.trust_mode),
2542
+ pmMaxVersionExceededMode: normalizePmMaxVersionExceededMode(policy.pm_max_version_exceeded_mode),
2543
+ requireProvenance: policy.require_provenance === true,
2544
+ trustedExtensions: normalizePolicyStringSet(policy.trusted_extensions),
2545
+ defaultSandboxProfile: normalizePolicySandboxProfile(policy.default_sandbox_profile),
2546
+ allowedExtensions: normalizePolicyStringSet(policy.allowed_extensions),
2547
+ blockedExtensions: normalizePolicyStringSet(policy.blocked_extensions),
1776
2548
  allowedCapabilities,
1777
2549
  blockedCapabilities,
1778
2550
  allowedSurfaces,
1779
2551
  blockedSurfaces,
1780
- allowedCommands,
1781
- blockedCommands,
1782
- allowedActions,
1783
- blockedActions,
1784
- allowedServices,
1785
- blockedServices,
2552
+ allowedCommands: normalizePolicyStringSet(policy.allowed_commands),
2553
+ blockedCommands: normalizePolicyStringSet(policy.blocked_commands),
2554
+ allowedActions: normalizePolicyStringSet(policy.allowed_actions),
2555
+ blockedActions: normalizePolicyStringSet(policy.blocked_actions),
2556
+ allowedServices: normalizePolicyStringSet(policy.allowed_services),
2557
+ blockedServices: normalizePolicyStringSet(policy.blocked_services),
1786
2558
  overridesByName,
1787
- warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right))
2559
+ warnings: collectExtensionPolicyWarnings({
2560
+ allowedCapabilities,
2561
+ blockedCapabilities,
2562
+ allowedSurfaces,
2563
+ blockedSurfaces,
2564
+ overridesByName
2565
+ })
1788
2566
  };
1789
2567
  }
1790
2568
  function serializeExtensionPolicy(policy) {
@@ -1995,55 +2773,28 @@ function evaluateExtensionPolicyForExtension(policy, extension) {
1995
2773
  if (policy.mode === "off" && policy.trustMode === "off") {
1996
2774
  return { allowed: true, warning: null };
1997
2775
  }
2776
+ const violations = [];
1998
2777
  const reason = resolvePolicyExtensionReason(policy, extension);
1999
- const trustReason = resolvePolicyTrustReason(policy, extension);
2000
- const sandboxReason = resolvePolicySandboxReason(policy, extension);
2001
- const extensionEnforced = reason && policy.mode === "enforce";
2002
- const trustEnforced = trustReason && policy.trustMode === "enforce";
2003
- const sandboxEnforced = sandboxReason && policy.mode === "enforce";
2004
- if (!reason && !trustReason && !sandboxReason) {
2005
- return { allowed: true, warning: null };
2006
- }
2007
- if (extensionEnforced) {
2008
- return {
2009
- allowed: false,
2010
- warning: buildPolicyWarning("blocked", "extension", extension, reason)
2011
- };
2778
+ if (reason) {
2779
+ violations.push({ reason, scope: "extension", mode: policy.mode });
2012
2780
  }
2013
- if (trustEnforced) {
2014
- return {
2015
- allowed: false,
2016
- warning: buildPolicyWarning("blocked", "trust", extension, trustReason)
2017
- };
2018
- }
2019
- if (sandboxEnforced) {
2020
- return {
2021
- allowed: false,
2022
- warning: buildPolicyWarning("blocked", "extension", extension, sandboxReason)
2023
- };
2781
+ const trustReason = resolvePolicyTrustReason(policy, extension);
2782
+ if (trustReason) {
2783
+ violations.push({ reason: trustReason, scope: "trust", mode: policy.trustMode });
2024
2784
  }
2025
- if (reason && policy.mode === "warn") {
2026
- return {
2027
- allowed: true,
2028
- warning: buildPolicyWarning("violation", "extension", extension, reason)
2029
- };
2785
+ const sandboxReason = resolvePolicySandboxReason(policy, extension);
2786
+ if (sandboxReason) {
2787
+ violations.push({ reason: sandboxReason, scope: "extension", mode: policy.mode });
2030
2788
  }
2031
- if (trustReason && policy.trustMode === "warn") {
2032
- return {
2033
- allowed: true,
2034
- warning: buildPolicyWarning("violation", "trust", extension, trustReason)
2035
- };
2789
+ const enforced = violations.find((violation) => violation.mode === "enforce");
2790
+ if (enforced) {
2791
+ return { allowed: false, warning: buildPolicyWarning("blocked", enforced.scope, extension, enforced.reason) };
2036
2792
  }
2037
- if (sandboxReason && policy.mode === "warn") {
2038
- return {
2039
- allowed: true,
2040
- warning: buildPolicyWarning("violation", "extension", extension, sandboxReason)
2041
- };
2793
+ const warned = violations.find((violation) => violation.mode === "warn");
2794
+ if (warned) {
2795
+ return { allowed: true, warning: buildPolicyWarning("violation", warned.scope, extension, warned.reason) };
2042
2796
  }
2043
- return {
2044
- allowed: true,
2045
- warning: null
2046
- };
2797
+ return { allowed: true, warning: null };
2047
2798
  }
2048
2799
  function evaluateExtensionPolicyForCapability(policy, extension, capability) {
2049
2800
  if (policy.mode === "off") {
@@ -2058,19 +2809,15 @@ function evaluateExtensionPolicyForCapability(policy, extension, capability) {
2058
2809
  warning: buildPolicyWarning(policy.mode === "warn" ? "violation" : "blocked", "capability", extension, reason, { capability: capability.trim().toLowerCase() })
2059
2810
  };
2060
2811
  }
2061
- function evaluateExtensionPolicyForRegistration(policy, extension, surface, method, capability, details) {
2062
- if (policy.mode === "off") {
2063
- return { allowed: true, warning: null };
2064
- }
2812
+ function resolveRegistrationPolicyReason(policy, extension, surface, capability, detail) {
2065
2813
  const capabilityReason = typeof capability === "string" ? resolvePolicyCapabilityReason(policy, extension, capability) : null;
2066
2814
  const surfaceReason = resolvePolicySurfaceReason(policy, extension, surface);
2067
- const commandReason = details?.command ? resolvePolicyCommandReason(policy, extension, details.command) : null;
2068
- const actionReason = details?.action ? resolvePolicyActionReason(policy, extension, details.action) : null;
2069
- const serviceReason = details?.service ? resolvePolicyServiceReason(policy, extension, details.service) : null;
2070
- const reason = capabilityReason ?? surfaceReason ?? commandReason ?? actionReason ?? serviceReason;
2071
- if (!reason) {
2072
- return { allowed: true, warning: null };
2073
- }
2815
+ const commandReason = detail.command ? resolvePolicyCommandReason(policy, extension, detail.command) : null;
2816
+ const actionReason = detail.action ? resolvePolicyActionReason(policy, extension, detail.action) : null;
2817
+ const serviceReason = detail.service ? resolvePolicyServiceReason(policy, extension, detail.service) : null;
2818
+ return capabilityReason ?? surfaceReason ?? commandReason ?? actionReason ?? serviceReason;
2819
+ }
2820
+ function buildRegistrationPolicyWarningDetails(method, surface, capability, detail) {
2074
2821
  const warningDetails = {
2075
2822
  method: normalizePolicyName(method).replace(/\s+/g, "_"),
2076
2823
  surface
@@ -2078,16 +2825,27 @@ function evaluateExtensionPolicyForRegistration(policy, extension, surface, meth
2078
2825
  if (capability) {
2079
2826
  warningDetails.capability = capability;
2080
2827
  }
2081
- if (details?.command) {
2082
- warningDetails.command = normalizeCommandName(details.command);
2828
+ if (detail.command) {
2829
+ warningDetails.command = normalizeCommandName(detail.command);
2830
+ }
2831
+ if (detail.action) {
2832
+ warningDetails.action = normalizePolicyName(detail.action).replace(/\s+/g, "-");
2083
2833
  }
2084
- if (details?.action) {
2085
- warningDetails.action = normalizePolicyName(details.action).replace(/\s+/g, "-");
2834
+ if (detail.service) {
2835
+ warningDetails.service = normalizePolicyName(detail.service);
2086
2836
  }
2087
- if (details?.service) {
2088
- warningDetails.service = normalizePolicyName(details.service);
2837
+ return warningDetails;
2838
+ }
2839
+ function evaluateExtensionPolicyForRegistration(policy, extension, surface, method, capability, details) {
2840
+ if (policy.mode === "off") {
2841
+ return { allowed: true, warning: null };
2089
2842
  }
2090
- const warning = buildPolicyWarning(policy.mode === "warn" ? "violation" : "blocked", "registration", extension, reason, warningDetails);
2843
+ const detail = details ?? {};
2844
+ const reason = resolveRegistrationPolicyReason(policy, extension, surface, capability, detail);
2845
+ if (!reason) {
2846
+ return { allowed: true, warning: null };
2847
+ }
2848
+ const warning = buildPolicyWarning(policy.mode === "warn" ? "violation" : "blocked", "registration", extension, reason, buildRegistrationPolicyWarningDetails(method, surface, capability, detail));
2091
2849
  return {
2092
2850
  allowed: policy.mode === "warn",
2093
2851
  warning
@@ -2134,33 +2892,134 @@ function parseManifestEngines(value) {
2134
2892
  }
2135
2893
  return Object.keys(engines).length > 0 ? engines : void 0;
2136
2894
  }
2137
- function parseManifest(raw) {
2138
- if (typeof raw !== "object" || raw === null) {
2895
+ function parseRequiredManifestString(candidate, field) {
2896
+ const value = candidate[field];
2897
+ if (typeof value !== "string" || value.trim().length === 0) {
2139
2898
  return null;
2140
2899
  }
2141
- const candidate = raw;
2142
- if (typeof candidate.name !== "string" || candidate.name.trim().length === 0) {
2900
+ return value.trim();
2901
+ }
2902
+ function parseOptionalIntegerValue(value) {
2903
+ if (value === void 0 || value === null) {
2904
+ return void 0;
2905
+ }
2906
+ if (typeof value !== "number" || !Number.isInteger(value)) {
2143
2907
  return null;
2144
2908
  }
2145
- if (typeof candidate.version !== "string" || candidate.version.trim().length === 0) {
2909
+ return value;
2910
+ }
2911
+ function parseOptionalBooleanValue(value) {
2912
+ if (value === void 0 || value === null) {
2913
+ return void 0;
2914
+ }
2915
+ if (typeof value !== "boolean") {
2146
2916
  return null;
2147
2917
  }
2148
- if (typeof candidate.entry !== "string" || candidate.entry.trim().length === 0) {
2918
+ return value;
2919
+ }
2920
+ function parseManifestPriority(candidate) {
2921
+ const value = parseOptionalIntegerValue(candidate.priority);
2922
+ return value === void 0 ? DEFAULT_EXTENSION_PRIORITY : value;
2923
+ }
2924
+ function parseManifestSandboxProfile(candidate) {
2925
+ const value = candidate.sandbox_profile;
2926
+ if (value === void 0 || value === null) {
2927
+ return void 0;
2928
+ }
2929
+ if (typeof value !== "string") {
2149
2930
  return null;
2150
2931
  }
2151
- let priority = DEFAULT_EXTENSION_PRIORITY;
2152
- if ("priority" in candidate && candidate.priority !== void 0 && candidate.priority !== null) {
2153
- if (typeof candidate.priority !== "number" || !Number.isInteger(candidate.priority)) {
2154
- return null;
2155
- }
2156
- priority = candidate.priority;
2932
+ const normalizedProfile = normalizePolicySandboxProfile(value);
2933
+ if (normalizedProfile !== value.trim().toLowerCase()) {
2934
+ return null;
2157
2935
  }
2158
- let manifestVersion;
2159
- if ("manifest_version" in candidate && candidate.manifest_version !== void 0 && candidate.manifest_version !== null) {
2160
- if (typeof candidate.manifest_version !== "number" || !Number.isInteger(candidate.manifest_version)) {
2161
- return null;
2162
- }
2163
- manifestVersion = candidate.manifest_version;
2936
+ return normalizedProfile;
2937
+ }
2938
+ function optionalTrimmedString(value) {
2939
+ return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
2940
+ }
2941
+ function parseManifestProvenance(value) {
2942
+ if (value === void 0 || value === null) {
2943
+ return void 0;
2944
+ }
2945
+ const provenanceRecord = asRecordLoose(value);
2946
+ if (!provenanceRecord) {
2947
+ return null;
2948
+ }
2949
+ const source = optionalTrimmedString(provenanceRecord.source);
2950
+ const signature = optionalTrimmedString(provenanceRecord.signature);
2951
+ const attestation = optionalTrimmedString(provenanceRecord.attestation);
2952
+ const verified = provenanceRecord.verified === void 0 || provenanceRecord.verified === null ? void 0 : typeof provenanceRecord.verified === "boolean" ? provenanceRecord.verified : null;
2953
+ if (verified === null) {
2954
+ return null;
2955
+ }
2956
+ return {
2957
+ ...source ? { source } : {},
2958
+ ...signature ? { signature } : {},
2959
+ ...attestation ? { attestation } : {},
2960
+ ...typeof verified === "boolean" ? { verified } : {}
2961
+ };
2962
+ }
2963
+ function parseManifestPermissions(value) {
2964
+ if (value === void 0 || value === null) {
2965
+ return void 0;
2966
+ }
2967
+ const permissionsRecord = asRecordLoose(value);
2968
+ if (!permissionsRecord) {
2969
+ return null;
2970
+ }
2971
+ const fsRead = parseOptionalBooleanValue(permissionsRecord.fs_read);
2972
+ const fsWrite = parseOptionalBooleanValue(permissionsRecord.fs_write);
2973
+ const network = parseOptionalBooleanValue(permissionsRecord.network);
2974
+ const envRead = parseOptionalBooleanValue(permissionsRecord.env_read);
2975
+ const envWrite = parseOptionalBooleanValue(permissionsRecord.env_write);
2976
+ const processSpawn = parseOptionalBooleanValue(permissionsRecord.process_spawn);
2977
+ if ([fsRead, fsWrite, network, envRead, envWrite, processSpawn].includes(null)) {
2978
+ return null;
2979
+ }
2980
+ return {
2981
+ ...typeof fsRead === "boolean" ? { fs_read: fsRead } : {},
2982
+ ...typeof fsWrite === "boolean" ? { fs_write: fsWrite } : {},
2983
+ ...typeof network === "boolean" ? { network } : {},
2984
+ ...typeof envRead === "boolean" ? { env_read: envRead } : {},
2985
+ ...typeof envWrite === "boolean" ? { env_write: envWrite } : {},
2986
+ ...typeof processSpawn === "boolean" ? { process_spawn: processSpawn } : {}
2987
+ };
2988
+ }
2989
+ function parseManifestCapabilities(value) {
2990
+ if (value === void 0 || value === null) {
2991
+ return { capabilities: [], legacy_aliases: [] };
2992
+ }
2993
+ if (!Array.isArray(value) || value.some((entry) => typeof entry !== "string")) {
2994
+ return null;
2995
+ }
2996
+ const normalizedCapabilities = normalizeManifestCapabilities(value);
2997
+ return { capabilities: normalizedCapabilities.capabilities, legacy_aliases: normalizedCapabilities.legacy_aliases };
2998
+ }
2999
+ function parseManifestActivation(value) {
3000
+ if (value === void 0 || value === null) {
3001
+ return void 0;
3002
+ }
3003
+ const activationRecord = asRecordLoose(value);
3004
+ if (!activationRecord) {
3005
+ return null;
3006
+ }
3007
+ const rawCommands = activationRecord.commands;
3008
+ if (rawCommands === void 0 || rawCommands === null) {
3009
+ return void 0;
3010
+ }
3011
+ if (!Array.isArray(rawCommands) || rawCommands.some((entry) => typeof entry !== "string")) {
3012
+ return null;
3013
+ }
3014
+ const commands = [
3015
+ ...new Set(rawCommands.map((entry) => normalizeCommandName(entry)).filter((entry) => entry.length > 0))
3016
+ ].sort((left, right) => left.localeCompare(right));
3017
+ return commands.length > 0 ? { commands } : void 0;
3018
+ }
3019
+ function parseManifestMetadata(candidate) {
3020
+ const manifestVersion = parseOptionalIntegerValue(candidate.manifest_version);
3021
+ if (manifestVersion === null) {
3022
+ return null;
2164
3023
  }
2165
3024
  const pmMinVersion = parseOptionalManifestString(candidate, "pm_min_version");
2166
3025
  if (pmMinVersion === null) {
@@ -2174,124 +3033,85 @@ function parseManifest(raw) {
2174
3033
  if (engines === null) {
2175
3034
  return null;
2176
3035
  }
2177
- let trusted;
2178
- if ("trusted" in candidate && candidate.trusted !== void 0 && candidate.trusted !== null) {
2179
- if (typeof candidate.trusted !== "boolean") {
2180
- return null;
2181
- }
2182
- trusted = candidate.trusted;
3036
+ const trusted = parseOptionalBooleanValue(candidate.trusted);
3037
+ if (trusted === null) {
3038
+ return null;
2183
3039
  }
2184
- let sandboxProfile;
2185
- if ("sandbox_profile" in candidate && candidate.sandbox_profile !== void 0 && candidate.sandbox_profile !== null) {
2186
- if (typeof candidate.sandbox_profile !== "string") {
2187
- return null;
2188
- }
2189
- const normalizedProfile = normalizePolicySandboxProfile(candidate.sandbox_profile);
2190
- if (normalizedProfile !== candidate.sandbox_profile.trim().toLowerCase()) {
2191
- return null;
2192
- }
2193
- sandboxProfile = normalizedProfile;
3040
+ const sandboxProfile = parseManifestSandboxProfile(candidate);
3041
+ if (sandboxProfile === null) {
3042
+ return null;
2194
3043
  }
2195
- let provenance;
2196
- if ("provenance" in candidate && candidate.provenance !== void 0 && candidate.provenance !== null) {
2197
- const provenanceRecord = asRecordLoose(candidate.provenance);
2198
- if (!provenanceRecord) {
2199
- return null;
2200
- }
2201
- const source = typeof provenanceRecord.source === "string" && provenanceRecord.source.trim().length > 0 ? provenanceRecord.source.trim() : void 0;
2202
- const signature = typeof provenanceRecord.signature === "string" && provenanceRecord.signature.trim().length > 0 ? provenanceRecord.signature.trim() : void 0;
2203
- const attestation = typeof provenanceRecord.attestation === "string" && provenanceRecord.attestation.trim().length > 0 ? provenanceRecord.attestation.trim() : void 0;
2204
- const verified = provenanceRecord.verified === void 0 || provenanceRecord.verified === null ? void 0 : typeof provenanceRecord.verified === "boolean" ? provenanceRecord.verified : null;
2205
- if (verified === null) {
2206
- return null;
2207
- }
2208
- provenance = {
2209
- ...source ? { source } : {},
2210
- ...signature ? { signature } : {},
2211
- ...attestation ? { attestation } : {},
2212
- ...typeof verified === "boolean" ? { verified } : {}
2213
- };
3044
+ const provenance = parseManifestProvenance(candidate.provenance);
3045
+ if (provenance === null) {
3046
+ return null;
2214
3047
  }
2215
- let permissions;
2216
- if ("permissions" in candidate && candidate.permissions !== void 0 && candidate.permissions !== null) {
2217
- const permissionsRecord = asRecordLoose(candidate.permissions);
2218
- if (!permissionsRecord) {
2219
- return null;
2220
- }
2221
- const parseOptionalBoolean = (value) => {
2222
- if (value === void 0 || value === null) {
2223
- return void 0;
2224
- }
2225
- if (typeof value !== "boolean") {
2226
- return null;
2227
- }
2228
- return value;
2229
- };
2230
- const fsRead = parseOptionalBoolean(permissionsRecord.fs_read);
2231
- const fsWrite = parseOptionalBoolean(permissionsRecord.fs_write);
2232
- const network = parseOptionalBoolean(permissionsRecord.network);
2233
- const envRead = parseOptionalBoolean(permissionsRecord.env_read);
2234
- const envWrite = parseOptionalBoolean(permissionsRecord.env_write);
2235
- const processSpawn = parseOptionalBoolean(permissionsRecord.process_spawn);
2236
- if ([fsRead, fsWrite, network, envRead, envWrite, processSpawn].includes(null)) {
2237
- return null;
2238
- }
2239
- permissions = {
2240
- ...typeof fsRead === "boolean" ? { fs_read: fsRead } : {},
2241
- ...typeof fsWrite === "boolean" ? { fs_write: fsWrite } : {},
2242
- ...typeof network === "boolean" ? { network } : {},
2243
- ...typeof envRead === "boolean" ? { env_read: envRead } : {},
2244
- ...typeof envWrite === "boolean" ? { env_write: envWrite } : {},
2245
- ...typeof processSpawn === "boolean" ? { process_spawn: processSpawn } : {}
2246
- };
3048
+ const permissions = parseManifestPermissions(candidate.permissions);
3049
+ if (permissions === null) {
3050
+ return null;
2247
3051
  }
2248
- let capabilities = [];
2249
- let legacyCapabilityAliases = [];
2250
- if ("capabilities" in candidate && candidate.capabilities !== void 0 && candidate.capabilities !== null) {
2251
- if (!Array.isArray(candidate.capabilities) || candidate.capabilities.some((value) => typeof value !== "string")) {
2252
- return null;
2253
- }
2254
- const normalizedCapabilities = normalizeManifestCapabilities(candidate.capabilities);
2255
- capabilities = normalizedCapabilities.capabilities;
2256
- legacyCapabilityAliases = normalizedCapabilities.legacy_aliases;
3052
+ const capabilities = parseManifestCapabilities(candidate.capabilities);
3053
+ if (capabilities === null) {
3054
+ return null;
2257
3055
  }
2258
- let activation;
2259
- if ("activation" in candidate && candidate.activation !== void 0 && candidate.activation !== null) {
2260
- const activationRecord = asRecordLoose(candidate.activation);
2261
- if (!activationRecord) {
2262
- return null;
2263
- }
2264
- const rawCommands = activationRecord.commands;
2265
- if (rawCommands !== void 0 && rawCommands !== null) {
2266
- if (!Array.isArray(rawCommands) || rawCommands.some((value) => typeof value !== "string")) {
2267
- return null;
2268
- }
2269
- const commands = [
2270
- ...new Set(rawCommands.map((value) => normalizeCommandName(value)).filter((value) => value.length > 0))
2271
- ].sort((left, right) => left.localeCompare(right));
2272
- if (commands.length > 0) {
2273
- activation = {
2274
- commands
2275
- };
2276
- }
2277
- }
3056
+ const activation = parseManifestActivation(candidate.activation);
3057
+ if (activation === null) {
3058
+ return null;
2278
3059
  }
2279
3060
  return {
2280
- name: candidate.name.trim(),
2281
- version: candidate.version.trim(),
2282
- entry: candidate.entry.trim(),
2283
- priority,
2284
3061
  manifest_version: manifestVersion,
2285
3062
  pm_min_version: pmMinVersion,
2286
3063
  pm_max_version: pmMaxVersion,
2287
3064
  engines,
2288
3065
  trusted,
2289
- provenance,
2290
3066
  sandbox_profile: sandboxProfile,
3067
+ provenance,
2291
3068
  permissions,
2292
- activation,
2293
- capabilities,
2294
- legacy_capability_aliases: legacyCapabilityAliases.length > 0 ? legacyCapabilityAliases : void 0
3069
+ capabilities: capabilities.capabilities,
3070
+ legacy_capability_aliases: capabilities.legacy_aliases,
3071
+ activation
3072
+ };
3073
+ }
3074
+ function parseManifest(raw) {
3075
+ if (typeof raw !== "object" || raw === null) {
3076
+ return null;
3077
+ }
3078
+ const candidate = raw;
3079
+ const name = parseRequiredManifestString(candidate, "name");
3080
+ if (name === null) {
3081
+ return null;
3082
+ }
3083
+ const version = parseRequiredManifestString(candidate, "version");
3084
+ if (version === null) {
3085
+ return null;
3086
+ }
3087
+ const entry = parseRequiredManifestString(candidate, "entry");
3088
+ if (entry === null) {
3089
+ return null;
3090
+ }
3091
+ const priority = parseManifestPriority(candidate);
3092
+ if (priority === null) {
3093
+ return null;
3094
+ }
3095
+ const metadata = parseManifestMetadata(candidate);
3096
+ if (metadata === null) {
3097
+ return null;
3098
+ }
3099
+ return {
3100
+ name,
3101
+ version,
3102
+ entry,
3103
+ priority,
3104
+ manifest_version: metadata.manifest_version,
3105
+ pm_min_version: metadata.pm_min_version,
3106
+ pm_max_version: metadata.pm_max_version,
3107
+ engines: metadata.engines,
3108
+ trusted: metadata.trusted,
3109
+ provenance: metadata.provenance,
3110
+ sandbox_profile: metadata.sandbox_profile,
3111
+ permissions: metadata.permissions,
3112
+ activation: metadata.activation,
3113
+ capabilities: metadata.capabilities,
3114
+ legacy_capability_aliases: metadata.legacy_capability_aliases.length > 0 ? metadata.legacy_capability_aliases : void 0
2295
3115
  };
2296
3116
  }
2297
3117
  function shouldEnable(name, enabled, disabled) {
@@ -2420,26 +3240,50 @@ async function scanExtensionLayer(layer, extensionsRoot, enabled, disabled, pmMa
2420
3240
  }
2421
3241
  return { diagnostics, warnings, candidates };
2422
3242
  }
3243
+ function buildUnavailableExtensionScan(layer, directory, manifestPath, warning) {
3244
+ return {
3245
+ diagnostic: {
3246
+ layer,
3247
+ directory,
3248
+ manifest_path: manifestPath,
3249
+ name: null,
3250
+ version: null,
3251
+ entry: null,
3252
+ priority: null,
3253
+ entry_path: null,
3254
+ enabled: null,
3255
+ status: "warn"
3256
+ },
3257
+ warnings: [warning],
3258
+ candidate: null
3259
+ };
3260
+ }
3261
+ function collectScannedExtensionWarnings(layer, manifest, entryWithinDirectory, entryExists, pmVersionCompatibility, pmMaxVersionCompatibility) {
3262
+ const extensionWarnings = [];
3263
+ if (Array.isArray(manifest.legacy_capability_aliases) && manifest.legacy_capability_aliases.length > 0) {
3264
+ extensionWarnings.push(formatLegacyExtensionCapabilityAliasWarning(layer, manifest.name, manifest.legacy_capability_aliases));
3265
+ }
3266
+ for (const capability of collectUnknownExtensionCapabilities(manifest.capabilities)) {
3267
+ extensionWarnings.push(formatUnknownExtensionCapabilityWarning(layer, manifest.name, capability));
3268
+ }
3269
+ if (!entryWithinDirectory) {
3270
+ extensionWarnings.push(`extension_entry_outside_extension:${layer}:${manifest.name}`);
3271
+ } else if (!entryExists) {
3272
+ extensionWarnings.push(`extension_entry_missing:${layer}:${manifest.name}`);
3273
+ }
3274
+ if (pmVersionCompatibility.warning) {
3275
+ extensionWarnings.push(pmVersionCompatibility.warning);
3276
+ }
3277
+ if (pmMaxVersionCompatibility.warning) {
3278
+ extensionWarnings.push(pmMaxVersionCompatibility.warning);
3279
+ }
3280
+ return extensionWarnings;
3281
+ }
2423
3282
  async function scanExtensionDirectory(layer, extensionsRoot, directory, enabled, disabled, managedSourcePackages, pmMaxVersionExceededMode2) {
2424
3283
  const extensionDir = path5.join(extensionsRoot, directory);
2425
3284
  const manifestPath = path5.join(extensionDir, "manifest.json");
2426
3285
  if (!await pathExists(manifestPath)) {
2427
- return {
2428
- diagnostic: {
2429
- layer,
2430
- directory,
2431
- manifest_path: manifestPath,
2432
- name: null,
2433
- version: null,
2434
- entry: null,
2435
- priority: null,
2436
- entry_path: null,
2437
- enabled: null,
2438
- status: "warn"
2439
- },
2440
- warnings: [`extension_manifest_missing:${layer}:${directory}`],
2441
- candidate: null
2442
- };
3286
+ return buildUnavailableExtensionScan(layer, directory, manifestPath, `extension_manifest_missing:${layer}:${directory}`);
2443
3287
  }
2444
3288
  let manifest = null;
2445
3289
  try {
@@ -2449,48 +3293,16 @@ async function scanExtensionDirectory(layer, extensionsRoot, directory, enabled,
2449
3293
  manifest = null;
2450
3294
  }
2451
3295
  if (!manifest) {
2452
- return {
2453
- diagnostic: {
2454
- layer,
2455
- directory,
2456
- manifest_path: manifestPath,
2457
- name: null,
2458
- version: null,
2459
- entry: null,
2460
- priority: null,
2461
- entry_path: null,
2462
- enabled: null,
2463
- status: "warn"
2464
- },
2465
- warnings: [`extension_manifest_invalid:${layer}:${directory}`],
2466
- candidate: null
2467
- };
3296
+ return buildUnavailableExtensionScan(layer, directory, manifestPath, `extension_manifest_invalid:${layer}:${directory}`);
2468
3297
  }
2469
3298
  const entryPath = path5.resolve(extensionDir, manifest.entry);
2470
3299
  const entryWithinDirectoryByPath = isPathWithinDirectory(extensionDir, entryPath);
2471
3300
  const entryExists = entryWithinDirectoryByPath ? await pathExists(entryPath) : false;
2472
3301
  const entryWithinDirectory = entryWithinDirectoryByPath && entryExists ? await isCanonicalPathWithinDirectory(extensionDir, entryPath) : entryWithinDirectoryByPath;
2473
3302
  const enabledForLoad = shouldEnable(manifest.name, enabled, disabled);
2474
- const extensionWarnings = [];
2475
- if (Array.isArray(manifest.legacy_capability_aliases) && manifest.legacy_capability_aliases.length > 0) {
2476
- extensionWarnings.push(formatLegacyExtensionCapabilityAliasWarning(layer, manifest.name, manifest.legacy_capability_aliases));
2477
- }
2478
- for (const capability of collectUnknownExtensionCapabilities(manifest.capabilities)) {
2479
- extensionWarnings.push(formatUnknownExtensionCapabilityWarning(layer, manifest.name, capability));
2480
- }
2481
- if (!entryWithinDirectory) {
2482
- extensionWarnings.push(`extension_entry_outside_extension:${layer}:${manifest.name}`);
2483
- } else if (!entryExists) {
2484
- extensionWarnings.push(`extension_entry_missing:${layer}:${manifest.name}`);
2485
- }
2486
3303
  const pmVersionCompatibility = await evaluatePmMinVersionCompatibility(layer, manifest);
2487
- if (pmVersionCompatibility.warning) {
2488
- extensionWarnings.push(pmVersionCompatibility.warning);
2489
- }
2490
3304
  const pmMaxVersionCompatibility = await evaluatePmMaxVersionCompatibility(layer, manifest, pmMaxVersionExceededMode2);
2491
- if (pmMaxVersionCompatibility.warning) {
2492
- extensionWarnings.push(pmMaxVersionCompatibility.warning);
2493
- }
3305
+ const extensionWarnings = collectScannedExtensionWarnings(layer, manifest, entryWithinDirectory, entryExists, pmVersionCompatibility, pmMaxVersionCompatibility);
2494
3306
  const extensionReady = entryWithinDirectory && entryExists && pmVersionCompatibility.allowed && pmMaxVersionCompatibility.allowed;
2495
3307
  const sourcePackage = managedSourcePackages.get(`directory:${directory}`) ?? managedSourcePackages.get(`name:${manifest.name}`);
2496
3308
  return {
@@ -3078,6 +3890,86 @@ function validateMigrationDefinition(definition) {
3078
3890
  throw new TypeError("registerMigration definition.run must be a function when provided");
3079
3891
  }
3080
3892
  }
3893
+ var PROJECT_PROFILE_DIMENSIONS = [
3894
+ "types",
3895
+ "statuses",
3896
+ "fields",
3897
+ "workflows",
3898
+ "config",
3899
+ "templates",
3900
+ "packages"
3901
+ ];
3902
+ function validateProjectProfileEntryShape(dimension, index, entry) {
3903
+ const at = `registerProfile profile.${dimension}[${index}]`;
3904
+ if (dimension === "types") {
3905
+ if (entry.name !== void 0 && typeof entry.name !== "string") {
3906
+ throw new TypeError(`${at}.name must be a string when provided`);
3907
+ }
3908
+ return;
3909
+ }
3910
+ if (dimension === "workflows") {
3911
+ if (typeof entry.type !== "string") {
3912
+ throw new TypeError(`${at}.type must be a string`);
3913
+ }
3914
+ if (!Array.isArray(entry.allowed_transitions)) {
3915
+ throw new TypeError(`${at}.allowed_transitions must be an array`);
3916
+ }
3917
+ for (const [pairIndex, pair] of entry.allowed_transitions.entries()) {
3918
+ if (!Array.isArray(pair)) {
3919
+ throw new TypeError(`${at}.allowed_transitions[${pairIndex}] must be a [from, to] array`);
3920
+ }
3921
+ }
3922
+ return;
3923
+ }
3924
+ if (dimension === "templates") {
3925
+ if (typeof entry.name !== "string") {
3926
+ throw new TypeError(`${at}.name must be a string`);
3927
+ }
3928
+ if (typeof entry.options !== "object" || entry.options === null || Array.isArray(entry.options)) {
3929
+ throw new TypeError(`${at}.options must be an object`);
3930
+ }
3931
+ return;
3932
+ }
3933
+ if (dimension === "packages") {
3934
+ if (typeof entry.spec !== "string") {
3935
+ throw new TypeError(`${at}.spec must be a string`);
3936
+ }
3937
+ }
3938
+ }
3939
+ function validateProjectProfileDefinition(profile) {
3940
+ const record = asRegistrationRecord("registerProfile profile", profile);
3941
+ assertNonEmptyString("registerProfile profile.name", record.name);
3942
+ assertNonEmptyString("registerProfile profile.title", record.title);
3943
+ if (record.summary !== void 0 && typeof record.summary !== "string") {
3944
+ throw new TypeError("registerProfile profile.summary must be a string when provided");
3945
+ }
3946
+ for (const dimension of PROJECT_PROFILE_DIMENSIONS) {
3947
+ const value = record[dimension];
3948
+ if (value === void 0) {
3949
+ continue;
3950
+ }
3951
+ if (!Array.isArray(value)) {
3952
+ throw new TypeError(`registerProfile profile.${dimension} must be an array when provided`);
3953
+ }
3954
+ for (const [index, entry] of value.entries()) {
3955
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
3956
+ throw new TypeError(`registerProfile profile.${dimension}[${index}] must be an object`);
3957
+ }
3958
+ validateProjectProfileEntryShape(dimension, index, entry);
3959
+ }
3960
+ }
3961
+ }
3962
+ function applyProjectProfileDefaults(profile) {
3963
+ if (profile.summary === void 0) {
3964
+ profile.summary = "";
3965
+ }
3966
+ for (const dimension of PROJECT_PROFILE_DIMENSIONS) {
3967
+ if (profile[dimension] === void 0) {
3968
+ profile[dimension] = [];
3969
+ }
3970
+ }
3971
+ return profile;
3972
+ }
3081
3973
  function attachRuntimeDefinition(entry, runtimeDefinition) {
3082
3974
  Object.defineProperty(entry, "runtime_definition", {
3083
3975
  value: runtimeDefinition,
@@ -3160,69 +4052,70 @@ function createExtensionApi(extension, hooks, commands, parsers, preflight, serv
3160
4052
  received: sanitizeRegistrationValue(received),
3161
4053
  hint
3162
4054
  });
3163
- const registerCommand = (commandOrDefinition, override) => {
3164
- assertExtensionCapability(extension, "commands", "registerCommand");
3165
- if (typeof commandOrDefinition === "string") {
3166
- const normalizedCommand2 = normalizeCommandName(commandOrDefinition);
3167
- if (normalizedCommand2.length === 0) {
3168
- throw createRegistrationValidationError("registerCommand requires a non-empty command name", registerCommandTrace("override", commandOrDefinition, 'registerCommand("<command>", (context) => unknown)', commandOrDefinition, "Provide a non-empty command path as the first argument."));
3169
- }
3170
- if (typeof override !== "function") {
3171
- const trace = registerCommandTrace("override", normalizedCommand2, 'registerCommand("<command>", (context) => unknown)', { command: commandOrDefinition, override }, "Provide a function as the second registerCommand argument.");
3172
- throw createRegistrationValidationError(`registerCommand requires an override function when command name is provided (command="${normalizedCommand2}", registration_index=${trace.registration_index})`, trace);
3173
- }
3174
- if (!allowRegistration("commands.override", "registerCommand", "commands", { command: normalizedCommand2 })) {
3175
- return;
3176
- }
3177
- commands.overrides.push({
3178
- layer: extension.layer,
3179
- name: extension.name,
3180
- command: normalizedCommand2,
3181
- run: override
3182
- });
3183
- return;
3184
- }
3185
- if (typeof commandOrDefinition !== "object" || commandOrDefinition === null) {
3186
- throw createRegistrationValidationError("registerCommand requires a command definition object", registerCommandTrace("definition", void 0, "{ name: string; run: (context) => unknown; }", commandOrDefinition, 'Use registerCommand({ name: "command path", run: (context) => ... }).'));
4055
+ const registerCommandOverride = (command, override) => {
4056
+ const normalizedCommand = normalizeCommandName(command);
4057
+ if (normalizedCommand.length === 0) {
4058
+ throw createRegistrationValidationError("registerCommand requires a non-empty command name", registerCommandTrace("override", command, 'registerCommand("<command>", (context) => unknown)', command, "Provide a non-empty command path as the first argument."));
3187
4059
  }
3188
- if (typeof commandOrDefinition.name !== "string") {
3189
- throw createRegistrationValidationError("registerCommand requires a command definition name", registerCommandTrace("definition", void 0, "{ name: string; run: (context) => unknown; }", commandOrDefinition, "Set command definition.name to a non-empty string command path."));
4060
+ if (typeof override !== "function") {
4061
+ const trace = registerCommandTrace("override", normalizedCommand, 'registerCommand("<command>", (context) => unknown)', { command, override }, "Provide a function as the second registerCommand argument.");
4062
+ throw createRegistrationValidationError(`registerCommand requires an override function when command name is provided (command="${normalizedCommand}", registration_index=${trace.registration_index})`, trace);
3190
4063
  }
3191
- const normalizedCommand = normalizeCommandName(commandOrDefinition.name);
3192
- if (normalizedCommand.length === 0) {
3193
- throw createRegistrationValidationError("registerCommand requires a non-empty command definition name", registerCommandTrace("definition", commandOrDefinition.name, "{ name: string; run: (context) => unknown; }", commandOrDefinition, "Ensure command definition.name contains a non-empty command path."));
4064
+ if (!allowRegistration("commands.override", "registerCommand", "commands", { command: normalizedCommand })) {
4065
+ return;
3194
4066
  }
3195
- const runHandler = typeof commandOrDefinition.run === "function" ? commandOrDefinition.run : void 0;
3196
- const legacyHandler = typeof commandOrDefinition.handler === "function" ? commandOrDefinition.handler : void 0;
4067
+ commands.overrides.push({
4068
+ layer: extension.layer,
4069
+ name: extension.name,
4070
+ command: normalizedCommand,
4071
+ run: override
4072
+ });
4073
+ };
4074
+ const resolveCommandDefinitionRunHandler = (definition, normalizedCommand) => {
4075
+ const runHandler = typeof definition.run === "function" ? definition.run : void 0;
4076
+ const legacyHandler = typeof definition.handler === "function" ? definition.handler : void 0;
3197
4077
  if (!runHandler && legacyHandler) {
3198
4078
  activationWarnings.push(`extension_command_definition_legacy_handler_alias:${extension.layer}:${extension.name}:${normalizedCommand}`);
3199
4079
  }
3200
- const resolvedHandler = runHandler ?? legacyHandler;
4080
+ return runHandler ?? legacyHandler;
4081
+ };
4082
+ const registerCommandDefinition = (definition) => {
4083
+ if (typeof definition !== "object" || definition === null) {
4084
+ throw createRegistrationValidationError("registerCommand requires a command definition object", registerCommandTrace("definition", void 0, "{ name: string; run: (context) => unknown; }", definition, 'Use registerCommand({ name: "command path", run: (context) => ... }).'));
4085
+ }
4086
+ if (typeof definition.name !== "string") {
4087
+ throw createRegistrationValidationError("registerCommand requires a command definition name", registerCommandTrace("definition", void 0, "{ name: string; run: (context) => unknown; }", definition, "Set command definition.name to a non-empty string command path."));
4088
+ }
4089
+ const normalizedCommand = normalizeCommandName(definition.name);
4090
+ if (normalizedCommand.length === 0) {
4091
+ throw createRegistrationValidationError("registerCommand requires a non-empty command definition name", registerCommandTrace("definition", definition.name, "{ name: string; run: (context) => unknown; }", definition, "Ensure command definition.name contains a non-empty command path."));
4092
+ }
4093
+ const resolvedHandler = resolveCommandDefinitionRunHandler(definition, normalizedCommand);
3201
4094
  if (typeof resolvedHandler !== "function") {
3202
- const trace = registerCommandTrace("definition", normalizedCommand, "{ name: string; run: (context) => unknown; }", commandOrDefinition, "Define command definition.run as a function.");
4095
+ const trace = registerCommandTrace("definition", normalizedCommand, "{ name: string; run: (context) => unknown; }", definition, "Define command definition.run as a function.");
3203
4096
  throw createRegistrationValidationError(`registerCommand requires a command definition run handler (command="${normalizedCommand}", registration_index=${trace.registration_index})`, trace);
3204
4097
  }
3205
4098
  try {
3206
- assertOptionalStringField("registerCommand definition.action", commandOrDefinition.action);
3207
- assertOptionalStringField("registerCommand definition.description", commandOrDefinition.description);
3208
- assertOptionalStringField("registerCommand definition.intent", commandOrDefinition.intent);
3209
- const action = resolveCommandDefinitionAction(normalizedCommand, commandOrDefinition.action);
4099
+ assertOptionalStringField("registerCommand definition.action", definition.action);
4100
+ assertOptionalStringField("registerCommand definition.description", definition.description);
4101
+ assertOptionalStringField("registerCommand definition.intent", definition.intent);
4102
+ const action = resolveCommandDefinitionAction(normalizedCommand, definition.action);
3210
4103
  if (!allowRegistration("commands.handler", "registerCommand", "commands", { command: normalizedCommand, action })) {
3211
4104
  return;
3212
4105
  }
3213
- const description = commandOrDefinition.description?.trim();
3214
- const intent = commandOrDefinition.intent?.trim();
3215
- const examples = normalizeOptionalStringArrayField("registerCommand definition.examples", commandOrDefinition.examples);
3216
- const failureHints = normalizeOptionalStringArrayField("registerCommand definition.failure_hints", commandOrDefinition.failure_hints);
3217
- const argumentsDefinition = normalizeCommandDefinitionArguments(commandOrDefinition.arguments);
3218
- if (commandOrDefinition.flags !== void 0) {
4106
+ const description = definition.description?.trim();
4107
+ const intent = definition.intent?.trim();
4108
+ const examples = normalizeOptionalStringArrayField("registerCommand definition.examples", definition.examples);
4109
+ const failureHints = normalizeOptionalStringArrayField("registerCommand definition.failure_hints", definition.failure_hints);
4110
+ const argumentsDefinition = normalizeCommandDefinitionArguments(definition.arguments);
4111
+ if (definition.flags !== void 0) {
3219
4112
  assertExtensionCapability(extension, "schema", "registerCommand flags");
3220
- validateFlagDefinitions(commandOrDefinition.flags);
4113
+ validateFlagDefinitions(definition.flags);
3221
4114
  registrations.flags.push({
3222
4115
  layer: extension.layer,
3223
4116
  name: extension.name,
3224
4117
  target_command: normalizedCommand,
3225
- flags: normalizeRegistrationRecordList("registerCommand definition.flags", commandOrDefinition.flags)
4118
+ flags: normalizeRegistrationRecordList("registerCommand definition.flags", definition.flags)
3226
4119
  });
3227
4120
  }
3228
4121
  const registration = {
@@ -3244,7 +4137,7 @@ function createExtensionApi(extension, hooks, commands, parsers, preflight, serv
3244
4137
  registrations.commands.push(registration);
3245
4138
  } catch (error) {
3246
4139
  const reason = formatUnknownError(error);
3247
- const trace = registerCommandTrace("definition", normalizedCommand, "{ name: string; run: (context) => unknown; action?: string; arguments?: object[]; flags?: object[]; }", commandOrDefinition, "Use schema-style metadata (action/arguments/flags/examples/intent) with valid values.");
4140
+ const trace = registerCommandTrace("definition", normalizedCommand, "{ name: string; run: (context) => unknown; action?: string; arguments?: object[]; flags?: object[]; }", definition, "Use schema-style metadata (action/arguments/flags/examples/intent) with valid values.");
3248
4141
  throw createRegistrationValidationError(`registerCommand definition metadata invalid (command="${normalizedCommand}", registration_index=${trace.registration_index}): ${reason}`, trace);
3249
4142
  }
3250
4143
  commands.handlers.push({
@@ -3254,6 +4147,14 @@ function createExtensionApi(extension, hooks, commands, parsers, preflight, serv
3254
4147
  run: resolvedHandler
3255
4148
  });
3256
4149
  };
4150
+ const registerCommand = (commandOrDefinition, override) => {
4151
+ assertExtensionCapability(extension, "commands", "registerCommand");
4152
+ if (typeof commandOrDefinition === "string") {
4153
+ registerCommandOverride(commandOrDefinition, override);
4154
+ return;
4155
+ }
4156
+ registerCommandDefinition(commandOrDefinition);
4157
+ };
3257
4158
  const registerParser = (command, override) => {
3258
4159
  assertExtensionCapability(extension, "parser", "registerParser");
3259
4160
  if (!allowRegistration("parser.override", "registerParser", "parser")) {
@@ -3379,6 +4280,19 @@ function createExtensionApi(extension, hooks, commands, parsers, preflight, serv
3379
4280
  definition: normalizeRegistrationRecord("registerMigration definition", definition)
3380
4281
  }, runtimeDefinition));
3381
4282
  };
4283
+ const registerProfile = (profile) => {
4284
+ assertExtensionCapability(extension, "schema", "registerProfile");
4285
+ if (!allowRegistration("schema.profiles", "registerProfile", "schema")) {
4286
+ return;
4287
+ }
4288
+ const snapshot = cloneRuntimeRegistrationValue(profile);
4289
+ validateProjectProfileDefinition(snapshot);
4290
+ registrations.profiles.push({
4291
+ layer: extension.layer,
4292
+ name: extension.name,
4293
+ profile: applyProjectProfileDefaults(snapshot)
4294
+ });
4295
+ };
3382
4296
  const applyImportExportCommandMetadata = (method, commandPath, options) => {
3383
4297
  if (options === void 0) {
3384
4298
  return;
@@ -3577,6 +4491,7 @@ function createExtensionApi(extension, hooks, commands, parsers, preflight, serv
3577
4491
  registerItemFields,
3578
4492
  registerItemTypes,
3579
4493
  registerMigration,
4494
+ registerProfile,
3580
4495
  registerRenderer,
3581
4496
  registerImporter,
3582
4497
  registerExporter,
@@ -3602,6 +4517,7 @@ function getRegistrationCounts(registrations) {
3602
4517
  item_fields: itemFieldCount,
3603
4518
  item_types: itemTypeCount,
3604
4519
  migrations: registrations.migrations.length,
4520
+ profiles: registrations.profiles.length,
3605
4521
  importers: registrations.importers.length,
3606
4522
  exporters: registrations.exporters.length,
3607
4523
  search_providers: registrations.search_providers.length,
@@ -3827,6 +4743,7 @@ function attributeCapabilityUsage(activation) {
3827
4743
  record(registrations.item_fields, "schema");
3828
4744
  record(registrations.item_types, "schema");
3829
4745
  record(registrations.migrations, "schema");
4746
+ record(registrations.profiles, "schema");
3830
4747
  record(registrations.importers, "importers");
3831
4748
  record(registrations.exporters, "importers");
3832
4749
  record(registrations.search_providers, "search");
@@ -4069,154 +4986,49 @@ function runActiveRendererOverride(format, result) {
4069
4986
  overridden: false,
4070
4987
  rendered: null,
4071
4988
  warnings: []
4072
- };
4073
- }
4074
- return runRendererOverride(activeExtensionRenderers, {
4075
- format,
4076
- command: activeCommandContext?.command,
4077
- args: activeCommandContext ? [...activeCommandContext.args] : [],
4078
- options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},
4079
- global: activeCommandContext?.global ? { ...activeCommandContext.global } : void 0,
4080
- pm_root: activeCommandContext?.pm_root,
4081
- result
4082
- });
4083
- }
4084
- function buildServiceContext(service, payload) {
4085
- return {
4086
- service,
4087
- command: activeCommandContext?.command,
4088
- args: activeCommandContext ? [...activeCommandContext.args] : [],
4089
- options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},
4090
- global: activeCommandContext?.global ? { ...activeCommandContext.global } : void 0,
4091
- pm_root: activeCommandContext?.pm_root,
4092
- payload
4093
- };
4094
- }
4095
- async function runActiveServiceOverride(service, payload) {
4096
- if (!activeExtensionServices) {
4097
- return {
4098
- handled: false,
4099
- result: payload,
4100
- warnings: []
4101
- };
4102
- }
4103
- return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));
4104
- }
4105
- function runActiveServiceOverrideSync(service, payload) {
4106
- if (!activeExtensionServices) {
4107
- return {
4108
- handled: false,
4109
- result: payload,
4110
- warnings: []
4111
- };
4112
- }
4113
- return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));
4114
- }
4115
-
4116
- // dist/types.js
4117
- var BUILTIN_ITEM_TYPE_VALUES = [
4118
- "Epic",
4119
- "Feature",
4120
- "Task",
4121
- "Chore",
4122
- "Issue",
4123
- "Decision",
4124
- "Event",
4125
- "Reminder",
4126
- "Milestone",
4127
- "Meeting",
4128
- "Plan"
4129
- ];
4130
- var ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;
4131
- var STATUS_VALUES = [
4132
- "draft",
4133
- "open",
4134
- "in_progress",
4135
- "blocked",
4136
- "closed",
4137
- "canceled"
4138
- ];
4139
- var RUNTIME_STATUS_ROLE_VALUES = [
4140
- "draft",
4141
- "active",
4142
- "blocked",
4143
- "terminal",
4144
- "terminal_done",
4145
- "terminal_canceled",
4146
- "default_open",
4147
- "default_close",
4148
- "default_cancel"
4149
- ];
4150
- var RUNTIME_FIELD_TYPE_VALUES = ["string", "number", "boolean", "string_array"];
4151
- var RUNTIME_FIELD_COMMAND_VALUES = ["create", "update", "update_many", "list", "search", "calendar", "context"];
4152
- var RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = ["allow", "warn", "reject"];
4153
- var DEPENDENCY_KIND_VALUES = [
4154
- "blocks",
4155
- "parent",
4156
- "child",
4157
- "parent_child",
4158
- "child_of",
4159
- "related",
4160
- "related_to",
4161
- "discovered_from",
4162
- "blocked_by",
4163
- "incident_from",
4164
- "epic",
4165
- "supersedes",
4166
- "task"
4167
- ];
4168
- var SCOPE_VALUES = ["project", "global"];
4169
- var RISK_VALUES = ["low", "medium", "high", "critical"];
4170
- var ISSUE_SEVERITY_VALUES = ["low", "medium", "high", "critical"];
4171
- var CONFIDENCE_TEXT_VALUES = ["low", "medium", "high"];
4172
- var GOVERNANCE_PRESET_VALUES = ["minimal", "default", "strict", "custom"];
4173
- var RECURRENCE_FREQUENCY_VALUES = ["daily", "weekly", "monthly", "yearly"];
4174
- var RECURRENCE_WEEKDAY_VALUES = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
4175
- function weekdayOrderIndex(value) {
4176
- return RECURRENCE_WEEKDAY_VALUES.indexOf(value);
4989
+ };
4990
+ }
4991
+ return runRendererOverride(activeExtensionRenderers, {
4992
+ format,
4993
+ command: activeCommandContext?.command,
4994
+ args: activeCommandContext ? [...activeCommandContext.args] : [],
4995
+ options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},
4996
+ global: activeCommandContext?.global ? { ...activeCommandContext.global } : void 0,
4997
+ pm_root: activeCommandContext?.pm_root,
4998
+ result
4999
+ });
5000
+ }
5001
+ function buildServiceContext(service, payload) {
5002
+ return {
5003
+ service,
5004
+ command: activeCommandContext?.command,
5005
+ args: activeCommandContext ? [...activeCommandContext.args] : [],
5006
+ options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},
5007
+ global: activeCommandContext?.global ? { ...activeCommandContext.global } : void 0,
5008
+ pm_root: activeCommandContext?.pm_root,
5009
+ payload
5010
+ };
5011
+ }
5012
+ async function runActiveServiceOverride(service, payload) {
5013
+ if (!activeExtensionServices) {
5014
+ return {
5015
+ handled: false,
5016
+ result: payload,
5017
+ warnings: []
5018
+ };
5019
+ }
5020
+ return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));
5021
+ }
5022
+ function runActiveServiceOverrideSync(service, payload) {
5023
+ if (!activeExtensionServices) {
5024
+ return {
5025
+ handled: false,
5026
+ result: payload,
5027
+ warnings: []
5028
+ };
5029
+ }
5030
+ return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));
4177
5031
  }
4178
- var PLAN_MODE_VALUES = [
4179
- "draft",
4180
- "research",
4181
- "review",
4182
- "approved",
4183
- "executing",
4184
- "paused",
4185
- "completed",
4186
- "superseded"
4187
- ];
4188
- var PLAN_STEP_STATUS_VALUES = [
4189
- "pending",
4190
- "in_progress",
4191
- "completed",
4192
- "blocked",
4193
- "skipped",
4194
- "superseded"
4195
- ];
4196
- var PLAN_HARNESS_VALUES = ["codex", "claude-code", "cursor", "generic"];
4197
- var PLAN_STEP_LINK_KIND_VALUES = [
4198
- "related",
4199
- "blocks",
4200
- "blocked_by",
4201
- "depends_on",
4202
- "discovered_from",
4203
- "implements",
4204
- "verifies",
4205
- "supersedes"
4206
- ];
4207
- var CONTEXT_DEPTH_VALUES = ["brief", "standard", "deep", "full"];
4208
- var CONTEXT_SECTION_VALUES = [
4209
- "hierarchy",
4210
- "activity",
4211
- "progress",
4212
- "recently_created",
4213
- "unparented",
4214
- "blockers",
4215
- "files",
4216
- "workload",
4217
- "staleness",
4218
- "tests"
4219
- ];
4220
5032
 
4221
5033
  // dist/core/schema/runtime-schema.js
4222
5034
  import path6 from "node:path";
@@ -4375,7 +5187,7 @@ function normalizeRuntimeFieldDefinition(definition) {
4375
5187
  function normalizeRuntimeSchemaSettings(schema) {
4376
5188
  const files = {
4377
5189
  ...DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
4378
- ...schema?.files ?? {}
5190
+ ...schema?.files
4379
5191
  };
4380
5192
  const statusesSource = schema?.statuses && schema.statuses.length > 0 ? schema.statuses : DEFAULT_RUNTIME_STATUS_DEFINITIONS;
4381
5193
  const normalizedStatuses = (() => {
@@ -4640,7 +5452,7 @@ async function loadRuntimeSchemaFromOptionalFiles(pmRoot, schema) {
4640
5452
  fields: [...normalizedSchema.fields, ...loadedFields ?? []],
4641
5453
  workflow: {
4642
5454
  ...normalizedSchema.workflow,
4643
- ...loadedWorkflow ?? {}
5455
+ ...loadedWorkflow
4644
5456
  },
4645
5457
  type_workflows: [...normalizedSchema.type_workflows ?? [], ...loadedTypeWorkflows ?? []]
4646
5458
  });
@@ -4838,74 +5650,73 @@ function sortObjectKeys(value) {
4838
5650
  function stableStringify(value) {
4839
5651
  return JSON.stringify(sortObjectKeys(value));
4840
5652
  }
4841
- function stableValueEquals(left, right) {
4842
- if (Object.is(left, right)) {
4843
- return true;
5653
+ function hasUnmatchedEquivalent(leftValue, rightValues, matchedIndexes, equals) {
5654
+ for (let index = 0; index < rightValues.length; index += 1) {
5655
+ if (matchedIndexes.has(index)) {
5656
+ continue;
5657
+ }
5658
+ if (equals(leftValue, rightValues[index])) {
5659
+ matchedIndexes.add(index);
5660
+ return true;
5661
+ }
4844
5662
  }
4845
- if (left === null || right === null || typeof left !== "object" || typeof right !== "object") {
4846
- return false;
5663
+ return false;
5664
+ }
5665
+ function compareRegExpValues(left, right) {
5666
+ if (!(left instanceof RegExp || right instanceof RegExp)) {
5667
+ return void 0;
5668
+ }
5669
+ return left instanceof RegExp && right instanceof RegExp && left.toString() === right.toString();
5670
+ }
5671
+ function compareDateValues(left, right) {
5672
+ if (!(left instanceof Date || right instanceof Date)) {
5673
+ return void 0;
4847
5674
  }
4848
- if (left instanceof RegExp || right instanceof RegExp) {
4849
- return left instanceof RegExp && right instanceof RegExp && left.toString() === right.toString();
5675
+ return left instanceof Date && right instanceof Date && left.getTime() === right.getTime();
5676
+ }
5677
+ function compareSetValues(left, right) {
5678
+ if (!(left instanceof Set || right instanceof Set)) {
5679
+ return void 0;
4850
5680
  }
4851
- if (left instanceof Date || right instanceof Date) {
4852
- return left instanceof Date && right instanceof Date && left.getTime() === right.getTime();
5681
+ if (!(left instanceof Set && right instanceof Set) || left.size !== right.size) {
5682
+ return false;
4853
5683
  }
4854
- if (left instanceof Set || right instanceof Set) {
4855
- if (!(left instanceof Set && right instanceof Set) || left.size !== right.size) {
5684
+ const rightValues = [...right];
5685
+ const matched = /* @__PURE__ */ new Set();
5686
+ for (const leftValue of left) {
5687
+ if (!hasUnmatchedEquivalent(leftValue, rightValues, matched, stableValueEquals)) {
4856
5688
  return false;
4857
5689
  }
4858
- const rightValues = [...right];
4859
- const matched = /* @__PURE__ */ new Set();
4860
- for (const leftValue of left) {
4861
- let found = false;
4862
- for (let index = 0; index < rightValues.length; index += 1) {
4863
- if (matched.has(index)) {
4864
- continue;
4865
- }
4866
- if (stableValueEquals(leftValue, rightValues[index])) {
4867
- matched.add(index);
4868
- found = true;
4869
- break;
4870
- }
4871
- }
4872
- if (!found) {
4873
- return false;
4874
- }
4875
- }
4876
- return true;
4877
5690
  }
4878
- if (left instanceof Map || right instanceof Map) {
4879
- if (!(left instanceof Map && right instanceof Map) || left.size !== right.size) {
4880
- return false;
4881
- }
4882
- const rightEntries = [...right.entries()];
4883
- const matched = /* @__PURE__ */ new Set();
4884
- for (const [leftKey, leftValue] of left.entries()) {
4885
- let found = false;
4886
- for (let index = 0; index < rightEntries.length; index += 1) {
4887
- if (matched.has(index)) {
4888
- continue;
4889
- }
4890
- const [rightKey, rightValue] = rightEntries[index];
4891
- if (stableValueEquals(leftKey, rightKey) && stableValueEquals(leftValue, rightValue)) {
4892
- matched.add(index);
4893
- found = true;
4894
- break;
4895
- }
4896
- }
4897
- if (!found) {
4898
- return false;
4899
- }
4900
- }
4901
- return true;
5691
+ return true;
5692
+ }
5693
+ function compareMapValues(left, right) {
5694
+ if (!(left instanceof Map || right instanceof Map)) {
5695
+ return void 0;
5696
+ }
5697
+ if (!(left instanceof Map && right instanceof Map) || left.size !== right.size) {
5698
+ return false;
4902
5699
  }
4903
- if (Array.isArray(left) || Array.isArray(right)) {
4904
- if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {
5700
+ const rightEntries = [...right.entries()];
5701
+ const matched = /* @__PURE__ */ new Set();
5702
+ for (const [leftKey, leftValue] of left.entries()) {
5703
+ const leftEntry = [leftKey, leftValue];
5704
+ if (!hasUnmatchedEquivalent(leftEntry, rightEntries, matched, ([candidateKey, candidateValue], [rightKey, rightValue]) => stableValueEquals(candidateKey, rightKey) && stableValueEquals(candidateValue, rightValue))) {
4905
5705
  return false;
4906
5706
  }
4907
- return left.every((value, index) => stableValueEquals(value, right[index]));
4908
5707
  }
5708
+ return true;
5709
+ }
5710
+ function compareArrayValues(left, right) {
5711
+ if (!(Array.isArray(left) || Array.isArray(right))) {
5712
+ return void 0;
5713
+ }
5714
+ if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {
5715
+ return false;
5716
+ }
5717
+ return left.every((value, index) => stableValueEquals(value, right[index]));
5718
+ }
5719
+ function comparePlainObjectValues(left, right) {
4909
5720
  const leftKeys = Object.keys(left).sort((a, b) => a.localeCompare(b));
4910
5721
  const rightKeys = Object.keys(right).sort((a, b) => a.localeCompare(b));
4911
5722
  if (leftKeys.length !== rightKeys.length) {
@@ -4922,6 +5733,28 @@ function stableValueEquals(left, right) {
4922
5733
  }
4923
5734
  return true;
4924
5735
  }
5736
+ var SPECIALIZED_STABLE_VALUE_COMPARISONS = [
5737
+ compareRegExpValues,
5738
+ compareDateValues,
5739
+ compareSetValues,
5740
+ compareMapValues,
5741
+ compareArrayValues
5742
+ ];
5743
+ function stableValueEquals(left, right) {
5744
+ if (Object.is(left, right)) {
5745
+ return true;
5746
+ }
5747
+ if (left === null || right === null || typeof left !== "object" || typeof right !== "object") {
5748
+ return false;
5749
+ }
5750
+ for (const compare of SPECIALIZED_STABLE_VALUE_COMPARISONS) {
5751
+ const result = compare(left, right);
5752
+ if (result !== void 0) {
5753
+ return result;
5754
+ }
5755
+ }
5756
+ return comparePlainObjectValues(left, right);
5757
+ }
4925
5758
  function sha256Hex(value) {
4926
5759
  return crypto2.createHash("sha256").update(value, "utf8").digest("hex");
4927
5760
  }
@@ -5274,87 +6107,6 @@ function validateSettings(raw) {
5274
6107
  return { success: true, data: result.value };
5275
6108
  }
5276
6109
 
5277
- // dist/core/item/item-type-definition.js
5278
- function normalizeItemTypeStringList(values) {
5279
- return [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
5280
- }
5281
- function normalizeItemTypeOption(option) {
5282
- const key = option.key.trim();
5283
- if (key.length === 0) {
5284
- return null;
5285
- }
5286
- const aliases = normalizeItemTypeStringList(option.aliases);
5287
- const description = option.description?.trim();
5288
- return {
5289
- key,
5290
- values: normalizeItemTypeStringList(option.values),
5291
- required: option.required === true ? true : void 0,
5292
- aliases: aliases.length > 0 ? aliases : void 0,
5293
- description: description && description.length > 0 ? description : void 0
5294
- };
5295
- }
5296
- var keepPolicyCommand = (command) => command;
5297
- var strictPolicyCommand = (command) => {
5298
- const normalized = command.trim().toLowerCase();
5299
- return normalized === "create" || normalized === "update" ? normalized : null;
5300
- };
5301
- function normalizeItemTypeCommandOptionPolicy(policy, resolvePolicyCommand) {
5302
- const command = resolvePolicyCommand(policy.command);
5303
- if (command === null) {
5304
- return null;
5305
- }
5306
- const option = policy.option.trim();
5307
- if (option.length === 0) {
5308
- return null;
5309
- }
5310
- return {
5311
- command,
5312
- option,
5313
- required: policy.required,
5314
- visible: policy.visible,
5315
- enabled: policy.enabled
5316
- };
5317
- }
5318
- function normalizeItemTypeCommandOptionPolicies(policies, resolvePolicyCommand) {
5319
- const dedupedByKey = /* @__PURE__ */ new Map();
5320
- for (const policy of policies ?? []) {
5321
- const normalized = normalizeItemTypeCommandOptionPolicy(policy, resolvePolicyCommand);
5322
- if (!normalized) {
5323
- continue;
5324
- }
5325
- dedupedByKey.set(`${normalized.command}:${normalized.option.toLowerCase()}`, normalized);
5326
- }
5327
- return [...dedupedByKey.values()].sort((left, right) => left.command === right.command ? left.option.localeCompare(right.option) : left.command.localeCompare(right.command));
5328
- }
5329
- function normalizeItemTypeDefinition(definition, options = {}) {
5330
- const resolvePolicyCommand = options.resolvePolicyCommand ?? keepPolicyCommand;
5331
- const name = definition.name.trim();
5332
- if (name.length === 0) {
5333
- return null;
5334
- }
5335
- const hasRequiredCreateFields = definition.required_create_fields !== void 0;
5336
- const hasRequiredCreateRepeatables = definition.required_create_repeatables !== void 0;
5337
- const hasOptions = definition.options !== void 0;
5338
- const hasCommandOptionPolicies = definition.command_option_policies !== void 0;
5339
- const folder = definition.folder?.trim();
5340
- const description = definition.description?.trim();
5341
- const defaultStatus = definition.default_status?.trim();
5342
- const aliases = normalizeItemTypeStringList(definition.aliases);
5343
- const normalizedOptions = (definition.options ?? []).map((option) => normalizeItemTypeOption(option)).filter((option) => option !== null).sort((left, right) => left.key.localeCompare(right.key));
5344
- const commandOptionPolicies = normalizeItemTypeCommandOptionPolicies(definition.command_option_policies, resolvePolicyCommand);
5345
- return {
5346
- name,
5347
- description: description && description.length > 0 ? description : void 0,
5348
- default_status: defaultStatus && defaultStatus.length > 0 ? defaultStatus : void 0,
5349
- folder: folder && folder.length > 0 ? folder : void 0,
5350
- aliases: aliases.length > 0 ? aliases : void 0,
5351
- required_create_fields: hasRequiredCreateFields ? normalizeItemTypeStringList(definition.required_create_fields) : void 0,
5352
- required_create_repeatables: hasRequiredCreateRepeatables ? normalizeItemTypeStringList(definition.required_create_repeatables) : void 0,
5353
- options: hasOptions ? normalizedOptions : void 0,
5354
- command_option_policies: hasCommandOptionPolicies ? commandOptionPolicies : void 0
5355
- };
5356
- }
5357
-
5358
6110
  // dist/core/validate/estimate-defaults.js
5359
6111
  var DEFAULT_ESTIMATE_MINUTES_BY_TYPE = {
5360
6112
  Epic: 2880,
@@ -5957,19 +6709,19 @@ function mergeSettings(settings) {
5957
6709
  ...settings,
5958
6710
  item_format: settings.item_format === "json_markdown" ? "toon" : settings.item_format ?? defaults.item_format,
5959
6711
  locks: { ...defaults.locks, ...settings.locks },
5960
- checkpoints: { ...defaults.checkpoints, ...settings.checkpoints ?? {} },
6712
+ checkpoints: { ...defaults.checkpoints, ...settings.checkpoints },
5961
6713
  output: { ...defaults.output, ...settings.output },
5962
6714
  history: {
5963
6715
  ...defaults.history,
5964
- ...settings.history ?? {},
6716
+ ...settings.history,
5965
6717
  compact_policy: {
5966
6718
  ...defaults.history.compact_policy,
5967
- ...settings.history?.compact_policy ?? {}
6719
+ ...settings.history?.compact_policy
5968
6720
  }
5969
6721
  },
5970
6722
  validation: {
5971
6723
  ...defaults.validation,
5972
- ...settings.validation ?? {},
6724
+ ...settings.validation,
5973
6725
  parent_reference: governance.parent_reference,
5974
6726
  metadata_profile: governance.metadata_profile,
5975
6727
  metadata_required_fields: normalizeValidationMetadataRequiredFields(settings.validation?.metadata_required_fields),
@@ -6005,7 +6757,7 @@ function mergeSettings(settings) {
6005
6757
  stale_threshold_days: settings.context?.stale_threshold_days ?? defaults.context.stale_threshold_days,
6006
6758
  sections: {
6007
6759
  ...defaults.context.sections,
6008
- ...settings.context?.sections ?? {}
6760
+ ...settings.context?.sections
6009
6761
  }
6010
6762
  },
6011
6763
  extensions: {
@@ -6019,13 +6771,13 @@ function mergeSettings(settings) {
6019
6771
  mutation_refresh_policy: normalizeSearchMutationRefreshPolicy(settings.search?.mutation_refresh_policy),
6020
6772
  query_expansion: {
6021
6773
  ...defaults.search.query_expansion,
6022
- ...settings.search?.query_expansion ?? {},
6774
+ ...settings.search?.query_expansion,
6023
6775
  enabled: normalizeSearchQueryExpansionEnabled(settings.search?.query_expansion?.enabled),
6024
6776
  provider: normalizeSearchQueryExpansionProvider(settings.search?.query_expansion?.provider)
6025
6777
  },
6026
6778
  rerank: {
6027
6779
  ...defaults.search.rerank,
6028
- ...settings.search?.rerank ?? {},
6780
+ ...settings.search?.rerank,
6029
6781
  enabled: normalizeSearchRerankEnabled(settings.search?.rerank?.enabled),
6030
6782
  model: normalizeSearchRerankModel(settings.search?.rerank?.model),
6031
6783
  top_k: normalizeSearchRerankTopK(settings.search?.rerank?.top_k)
@@ -6097,13 +6849,13 @@ function serializeSettings(settings, options = {}) {
6097
6849
  mutation_refresh_policy: normalizeSearchMutationRefreshPolicy(baseSettings.search?.mutation_refresh_policy),
6098
6850
  query_expansion: {
6099
6851
  ...SETTINGS_DEFAULTS.search.query_expansion,
6100
- ...baseSettings.search?.query_expansion ?? {},
6852
+ ...baseSettings.search?.query_expansion,
6101
6853
  enabled: normalizeSearchQueryExpansionEnabled(baseSettings.search?.query_expansion?.enabled),
6102
6854
  provider: normalizeSearchQueryExpansionProvider(baseSettings.search?.query_expansion?.provider)
6103
6855
  },
6104
6856
  rerank: {
6105
6857
  ...SETTINGS_DEFAULTS.search.rerank,
6106
- ...baseSettings.search?.rerank ?? {},
6858
+ ...baseSettings.search?.rerank,
6107
6859
  enabled: normalizeSearchRerankEnabled(baseSettings.search?.rerank?.enabled),
6108
6860
  model: normalizeSearchRerankModel(baseSettings.search?.rerank?.model),
6109
6861
  top_k: normalizeSearchRerankTopK(baseSettings.search?.rerank?.top_k)
@@ -6115,7 +6867,7 @@ function serializeSettings(settings, options = {}) {
6115
6867
  stale_threshold_days: baseSettings.context?.stale_threshold_days ?? SETTINGS_DEFAULTS.context.stale_threshold_days,
6116
6868
  sections: {
6117
6869
  ...SETTINGS_DEFAULTS.context.sections,
6118
- ...baseSettings.context?.sections ?? {}
6870
+ ...baseSettings.context?.sections
6119
6871
  }
6120
6872
  },
6121
6873
  extensions: {
@@ -6127,8 +6879,8 @@ function serializeSettings(settings, options = {}) {
6127
6879
  ...baseSettings.vector_store,
6128
6880
  adapter: baseSettings.vector_store?.adapter ?? SETTINGS_DEFAULTS.vector_store.adapter,
6129
6881
  collection_name: normalizeVectorStoreCollectionName(baseSettings.vector_store?.collection_name),
6130
- qdrant: { ...baseSettings.vector_store?.qdrant ?? {} },
6131
- lancedb: { ...baseSettings.vector_store?.lancedb ?? {} }
6882
+ qdrant: { ...baseSettings.vector_store?.qdrant },
6883
+ lancedb: { ...baseSettings.vector_store?.lancedb }
6132
6884
  }
6133
6885
  };
6134
6886
  const ordered = orderObject({
@@ -6429,6 +7181,33 @@ export {
6429
7181
  EMPTY_CANONICAL_DOCUMENT,
6430
7182
  EXIT_CODE,
6431
7183
  resolveTelemetryErrorCategory,
7184
+ BUILTIN_ITEM_TYPE_VALUES,
7185
+ STATUS_VALUES,
7186
+ RUNTIME_STATUS_ROLE_VALUES,
7187
+ RUNTIME_FIELD_TYPE_VALUES,
7188
+ RUNTIME_FIELD_COMMAND_VALUES,
7189
+ DEPENDENCY_KIND_VALUES,
7190
+ SCOPE_VALUES,
7191
+ RISK_VALUES,
7192
+ ISSUE_SEVERITY_VALUES,
7193
+ CONFIDENCE_TEXT_VALUES,
7194
+ RECURRENCE_FREQUENCY_VALUES,
7195
+ RECURRENCE_WEEKDAY_VALUES,
7196
+ weekdayOrderIndex,
7197
+ PLAN_MODE_VALUES,
7198
+ PLAN_STEP_STATUS_VALUES,
7199
+ PLAN_HARNESS_VALUES,
7200
+ PLAN_STEP_LINK_KIND_VALUES,
7201
+ CONTEXT_DEPTH_VALUES,
7202
+ CONTEXT_SECTION_VALUES,
7203
+ canonicalizeCommandOptionKey,
7204
+ commandOptionFlagLabel,
7205
+ toDefaultFolder,
7206
+ resolveItemTypeRegistry,
7207
+ resolveTypeName,
7208
+ resolveTypeDefinition,
7209
+ resolveCommandOptionPolicyState,
7210
+ validateTypeOptions,
6432
7211
  ITEM_FILE_EXTENSIONS,
6433
7212
  resolvePmRoot,
6434
7213
  resolveGlobalPmRoot,
@@ -6498,29 +7277,6 @@ export {
6498
7277
  runActiveRendererOverride,
6499
7278
  runActiveServiceOverride,
6500
7279
  runActiveServiceOverrideSync,
6501
- BUILTIN_ITEM_TYPE_VALUES,
6502
- ITEM_TYPE_VALUES,
6503
- STATUS_VALUES,
6504
- RUNTIME_STATUS_ROLE_VALUES,
6505
- RUNTIME_FIELD_TYPE_VALUES,
6506
- RUNTIME_FIELD_COMMAND_VALUES,
6507
- DEPENDENCY_KIND_VALUES,
6508
- SCOPE_VALUES,
6509
- RISK_VALUES,
6510
- ISSUE_SEVERITY_VALUES,
6511
- CONFIDENCE_TEXT_VALUES,
6512
- RECURRENCE_FREQUENCY_VALUES,
6513
- RECURRENCE_WEEKDAY_VALUES,
6514
- weekdayOrderIndex,
6515
- PLAN_MODE_VALUES,
6516
- PLAN_STEP_STATUS_VALUES,
6517
- PLAN_HARNESS_VALUES,
6518
- PLAN_STEP_LINK_KIND_VALUES,
6519
- CONTEXT_DEPTH_VALUES,
6520
- CONTEXT_SECTION_VALUES,
6521
- normalizeItemTypeStringList,
6522
- strictPolicyCommand,
6523
- normalizeItemTypeDefinition,
6524
7280
  DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
6525
7281
  DEFAULT_RUNTIME_STATUS_DEFINITIONS,
6526
7282
  normalizeRuntimeSchemaSettings,
@@ -6543,6 +7299,6 @@ export {
6543
7299
  readSettings,
6544
7300
  writeSettings
6545
7301
  };
6546
- //# sourceMappingURL=chunk-VSAABFGQ.js.map
7302
+ //# sourceMappingURL=chunk-7R4QEMZZ.js.map
6547
7303
 
6548
- //# debugId=1dd79a7a-ea00-583f-a03c-d08dc95ce458
7304
+ //# debugId=03ed13d8-75ea-5f3b-b089-a7347a59acca