@unbrained/pm-cli 2026.11.16 → 2026.11.18

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 (434) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/cli/main.js +2 -2
  3. package/dist/cli/register-mutation.js +3 -2
  4. package/dist/cli/runtime/invocation-rewrites.js +2 -0
  5. package/dist/cli-bundle/bundle-manifest.json +1 -1
  6. package/dist/cli-bundle/chunks/chunk-2VH6COJE.js +125 -0
  7. package/dist/cli-bundle/chunks/{chunk-NHNM3GIP.js → chunk-5OFMWP3Q.js} +3 -3
  8. package/dist/cli-bundle/chunks/chunk-7ETRLLK3.js +31 -0
  9. package/dist/cli-bundle/chunks/chunk-7LCJA54R.js +2 -0
  10. package/dist/cli-bundle/chunks/chunk-7UUPLMCU.js +115 -0
  11. package/dist/cli-bundle/chunks/chunk-AGU7632B.js +3 -0
  12. package/dist/cli-bundle/chunks/{chunk-J257NZRD.js → chunk-CGTVDSAR.js} +11 -11
  13. package/dist/cli-bundle/chunks/chunk-CR5GC3VO.js +9 -0
  14. package/dist/cli-bundle/chunks/{chunk-KGOGLKL2.js → chunk-FJQCORYR.js} +2 -2
  15. package/dist/cli-bundle/chunks/chunk-H64BNM4A.js +8 -0
  16. package/dist/cli-bundle/chunks/{chunk-2D26HRXB.js → chunk-HQYIKAC6.js} +2 -2
  17. package/dist/cli-bundle/chunks/chunk-JBPXNG6P.js +2 -0
  18. package/dist/cli-bundle/chunks/{chunk-4I7YG3VZ.js → chunk-L2ZLH3LZ.js} +2 -2
  19. package/dist/cli-bundle/chunks/chunk-LGWP5D7V.js +2 -0
  20. package/dist/cli-bundle/chunks/{chunk-I3T2FVUA.js → chunk-MUGGRKK3.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-FZ4XWWLO.js → chunk-OD2I3SFQ.js} +43 -43
  22. package/dist/cli-bundle/chunks/chunk-QK7RAN7R.js +2 -0
  23. package/dist/cli-bundle/chunks/{chunk-2WNORBVN.js → chunk-S3RMFLEG.js} +83 -83
  24. package/dist/cli-bundle/chunks/chunk-SSZBVRIN.js +6 -0
  25. package/dist/cli-bundle/chunks/chunk-T3E3WNHO.js +2 -0
  26. package/dist/cli-bundle/chunks/{chunk-DZWRNL6R.js → chunk-TA5VN4ME.js} +2 -2
  27. package/dist/cli-bundle/chunks/chunk-TS2CZE3O.js +2 -0
  28. package/dist/cli-bundle/chunks/{chunk-F7P42FL5.js → chunk-VETSGCF4.js} +4 -4
  29. package/dist/cli-bundle/chunks/{chunk-VJLZHOTP.js → chunk-WKHS4QC6.js} +2 -2
  30. package/dist/cli-bundle/chunks/chunk-XDIJK6VW.js +8 -0
  31. package/dist/cli-bundle/chunks/{chunk-NYN5OR2T.js → chunk-Y4LXVPA5.js} +2 -2
  32. package/dist/cli-bundle/chunks/chunk-YJI2Y5N6.js +2 -0
  33. package/dist/cli-bundle/chunks/{indexed-receipt-blobs-HNLN6UXH.js → indexed-receipt-blobs-ELEMA7IW.js} +2 -2
  34. package/dist/cli-bundle/chunks/{item-revision-PSOL5I4H.js → item-revision-BV5BUBCR.js} +2 -2
  35. package/dist/cli-bundle/chunks/item-transaction-E2ST3A3X.js +2 -0
  36. package/dist/cli-bundle/chunks/{mutation-actor-BDBBH3ZS.js → mutation-actor-DDYJW5B4.js} +2 -2
  37. package/dist/cli-bundle/chunks/mutation-admission-5AWMXMCB.js +2 -0
  38. package/dist/cli-bundle/chunks/{register-list-query-AESCVO6H.js → register-list-query-RJT7YBRF.js} +2 -2
  39. package/dist/cli-bundle/chunks/register-mutation-6KTMJGYF.js +21 -0
  40. package/dist/cli-bundle/chunks/register-operations-W24TA3HZ.js +2 -0
  41. package/dist/cli-bundle/chunks/register-setup-QK67WUX6.js +2 -0
  42. package/dist/cli-bundle/chunks/{settlement-hook-MVVVUIVZ.js → settlement-hook-E5LHZ4RD.js} +2 -2
  43. package/dist/cli-bundle/chunks/{stage-RMU3JAWM.js → stage-XGWW3T64.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/chunk-3H3SVHAT.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-DFBHW7HP.js → chunk-5JVB42Z7.js} +3 -3
  46. package/dist/cli-bundle/focused-chunks/{chunk-ONM2R32I.js → chunk-6OZ7BKWJ.js} +54 -54
  47. package/dist/cli-bundle/focused-chunks/{chunk-HHMMIHZP.js → chunk-7RF2YPZ5.js} +2 -2
  48. package/dist/cli-bundle/focused-chunks/chunk-7Z2NYAK4.js +2 -0
  49. package/dist/cli-bundle/focused-chunks/chunk-A2CLYPDA.js +102 -0
  50. package/dist/cli-bundle/focused-chunks/{chunk-7SEPCQV2.js → chunk-DH4DHL6V.js} +2 -2
  51. package/dist/cli-bundle/focused-chunks/{chunk-UBBTBNUY.js → chunk-DWCFZVT2.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/{chunk-DZMP3VYQ.js → chunk-EO4XM3XJ.js} +2 -2
  53. package/dist/cli-bundle/focused-chunks/chunk-EZXLY6S4.js +2 -0
  54. package/dist/cli-bundle/focused-chunks/{chunk-KRNF3WTC.js → chunk-FPPYE6CY.js} +2 -2
  55. package/dist/cli-bundle/focused-chunks/chunk-HO2YUD4P.js +91 -0
  56. package/dist/cli-bundle/focused-chunks/{chunk-BEHIMEV2.js → chunk-ICEHI4SN.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/chunk-IGMFXB5W.js +2 -0
  58. package/dist/cli-bundle/focused-chunks/{chunk-PDXSMSO5.js → chunk-IXYBN6D2.js} +3 -3
  59. package/dist/cli-bundle/focused-chunks/{chunk-PEL4SQXV.js → chunk-LZR3JKYT.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/chunk-MTBC32ZR.js +8 -0
  61. package/dist/cli-bundle/focused-chunks/chunk-OAIAZHRG.js +2 -0
  62. package/dist/cli-bundle/focused-chunks/{chunk-SFATIM77.js → chunk-ONHUG7IL.js} +9 -9
  63. package/dist/cli-bundle/focused-chunks/chunk-OPY43DNJ.js +2 -0
  64. package/dist/cli-bundle/focused-chunks/chunk-PNCCTZKI.js +44 -0
  65. package/dist/cli-bundle/focused-chunks/chunk-T3NMYMW4.js +27 -0
  66. package/dist/cli-bundle/focused-chunks/chunk-XS2YZCT5.js +2 -0
  67. package/dist/cli-bundle/focused-chunks/chunk-ZFUZ4YYN.js +8 -0
  68. package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-ADMQXF3N.js → indexed-receipt-blobs-ZTRFCPH7.js} +2 -2
  69. package/dist/cli-bundle/focused-chunks/item-revision-NS2V4WON.js +2 -0
  70. package/dist/cli-bundle/focused-chunks/item-transaction-NENC4HYI.js +2 -0
  71. package/dist/cli-bundle/focused-chunks/mutation-actor-2SVBO324.js +2 -0
  72. package/dist/cli-bundle/focused-chunks/mutation-admission-DZIBDJAE.js +2 -0
  73. package/dist/cli-bundle/focused-chunks/{settlement-hook-5U2M75BY.js → settlement-hook-OUBUN45C.js} +2 -2
  74. package/dist/cli-bundle/focused-chunks/stage-LVAGKCEE.js +2 -0
  75. package/dist/cli-bundle/main.js +27 -27
  76. package/dist/cli-bundle/sdk-authoring.js +1 -1
  77. package/dist/cli-bundle/sdk-contracts.js +2 -2
  78. package/dist/cli-bundle/sdk-core.js +1 -1
  79. package/dist/cli-bundle/sdk-governance.js +1 -1
  80. package/dist/cli-bundle/sdk-graph.js +1 -1
  81. package/dist/cli-bundle/sdk-merge.js +58 -58
  82. package/dist/cli-bundle/sdk-query.js +1 -1
  83. package/dist/cli-bundle/sdk-runtime.js +1 -1
  84. package/dist/cli-bundle/sdk-testing.js +1 -1
  85. package/dist/cli-bundle/sdk.js +4 -4
  86. package/dist/core/extensions/extension-hook-runtime.d.ts +14 -2
  87. package/dist/core/extensions/extension-hook-runtime.js +1 -1
  88. package/dist/core/extensions/extension-types.d.ts +14 -0
  89. package/dist/core/extensions/extension-types.js +1 -1
  90. package/dist/core/extensions/index.d.ts +1 -1
  91. package/dist/core/extensions/index.js +1 -1
  92. package/dist/core/fs/file-glob.js +2 -0
  93. package/dist/core/policy/workflow-policy-store.js +1 -1
  94. package/dist/core/shared/secret-rules.d.ts +83 -4
  95. package/dist/core/shared/secret-rules.js +5 -4
  96. package/dist/core/store/item-mutation-precondition.d.ts +32 -1
  97. package/dist/core/store/item-mutation-precondition.js +1 -1
  98. package/dist/core/store/item-store.js +1 -1
  99. package/dist/core/store/transaction-coordinator-scope.js +2 -0
  100. package/dist/sdk/authoring.d.ts +1 -1
  101. package/dist/sdk/authoring.js +1 -1
  102. package/dist/sdk/cli-bootstrap.js +1 -1
  103. package/dist/sdk/item-transaction.js +1 -1
  104. package/dist/sdk/lifecycle/copy.js +1 -1
  105. package/dist/sdk/lifecycle/create.js +1 -1
  106. package/dist/sdk/lifecycle/restore.js +1 -1
  107. package/dist/sdk/linked-artifacts.js +2 -2
  108. package/dist/sdk/mutation-guard.d.ts +25 -4
  109. package/dist/sdk/mutation-guard.js +1 -1
  110. package/dist/sdk/package-import-adapters.d.ts +14 -1
  111. package/dist/sdk/package-import-adapters.js +1 -1
  112. package/dist/sdk/public-surface.json +1 -1
  113. package/dist/sdk/testing.d.ts +21 -3
  114. package/dist/sdk/testing.js +2 -2
  115. package/dist/sdk/workspace-transaction.js +2 -2
  116. package/docs/COMMANDS.md +33 -0
  117. package/docs/DEFECT_RECURRENCE.md +3 -2
  118. package/docs/EXTENSIONS.md +1 -1
  119. package/docs/MIGRATION_CLI_SIMPLIFICATION.md +1 -1
  120. package/docs/MUTATION_INTEGRITY.md +187 -7
  121. package/docs/SDK.md +40 -3
  122. package/docs/WORKFLOW_POLICIES.md +23 -0
  123. package/marketplace.json +1 -1
  124. package/node_modules/@opentelemetry/core/build/esm/version.d.ts +1 -1
  125. package/node_modules/@opentelemetry/core/build/esm/version.js +1 -1
  126. package/node_modules/@opentelemetry/core/build/esnext/version.d.ts +1 -1
  127. package/node_modules/@opentelemetry/core/build/esnext/version.js +1 -1
  128. package/node_modules/@opentelemetry/core/build/src/version.d.ts +1 -1
  129. package/node_modules/@opentelemetry/core/build/src/version.js +1 -1
  130. package/node_modules/@opentelemetry/core/package.json +2 -2
  131. package/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/execAsync.d.ts +1 -0
  132. package/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/execAsync.js +1 -0
  133. package/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js +3 -2
  134. package/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js +3 -2
  135. package/node_modules/@opentelemetry/resources/build/esm/version.d.ts +1 -1
  136. package/node_modules/@opentelemetry/resources/build/esm/version.js +1 -1
  137. package/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/execAsync.d.ts +1 -0
  138. package/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/execAsync.js +1 -0
  139. package/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/getMachineId-bsd.js +3 -2
  140. package/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/machine-id/getMachineId-darwin.js +3 -2
  141. package/node_modules/@opentelemetry/resources/build/esnext/version.d.ts +1 -1
  142. package/node_modules/@opentelemetry/resources/build/esnext/version.js +1 -1
  143. package/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.d.ts +1 -0
  144. package/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js +2 -1
  145. package/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js +2 -1
  146. package/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js +2 -1
  147. package/node_modules/@opentelemetry/resources/build/src/version.d.ts +1 -1
  148. package/node_modules/@opentelemetry/resources/build/src/version.js +1 -1
  149. package/node_modules/@opentelemetry/resources/package.json +3 -3
  150. package/node_modules/@opentelemetry/sdk-trace/build/esm/version.d.ts +1 -1
  151. package/node_modules/@opentelemetry/sdk-trace/build/esm/version.js +1 -1
  152. package/node_modules/@opentelemetry/sdk-trace/build/esnext/version.d.ts +1 -1
  153. package/node_modules/@opentelemetry/sdk-trace/build/esnext/version.js +1 -1
  154. package/node_modules/@opentelemetry/sdk-trace/build/src/version.d.ts +1 -1
  155. package/node_modules/@opentelemetry/sdk-trace/build/src/version.js +1 -1
  156. package/node_modules/@opentelemetry/sdk-trace/package.json +5 -5
  157. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/version.d.ts +1 -1
  158. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/version.js +1 -1
  159. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/version.d.ts +1 -1
  160. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/version.js +1 -1
  161. package/node_modules/@opentelemetry/sdk-trace-base/build/src/version.d.ts +1 -1
  162. package/node_modules/@opentelemetry/sdk-trace-base/build/src/version.js +1 -1
  163. package/node_modules/@opentelemetry/sdk-trace-base/package.json +7 -7
  164. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.cjs +18202 -0
  165. package/node_modules/@opentelemetry/semantic-conventions/{build/src/experimental_attributes.js → dist/experimental_attributes.d.cts} +3328 -1993
  166. package/node_modules/@opentelemetry/semantic-conventions/{build/esnext/experimental_attributes.js → dist/experimental_attributes.d.mts} +3328 -1935
  167. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.mjs +16385 -0
  168. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.cjs +325 -0
  169. package/node_modules/@opentelemetry/semantic-conventions/{build/esnext/experimental_events.js → dist/experimental_events.d.cts} +37 -41
  170. package/node_modules/@opentelemetry/semantic-conventions/{build/esm/experimental_events.js → dist/experimental_events.d.mts} +37 -41
  171. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.mjs +295 -0
  172. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.cjs +4929 -0
  173. package/node_modules/@opentelemetry/semantic-conventions/{build/esnext/experimental_metrics.js → dist/experimental_metrics.d.cts} +955 -597
  174. package/node_modules/@opentelemetry/semantic-conventions/{build/esm/experimental_metrics.js → dist/experimental_metrics.d.mts} +955 -597
  175. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.mjs +4419 -0
  176. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.cjs +2619 -0
  177. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.d.cts +7 -0
  178. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.d.mts +7 -0
  179. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.mjs +7 -0
  180. package/node_modules/@opentelemetry/semantic-conventions/dist/index.cjs +670 -0
  181. package/node_modules/@opentelemetry/semantic-conventions/dist/index.d.cts +6 -0
  182. package/node_modules/@opentelemetry/semantic-conventions/dist/index.d.mts +6 -0
  183. package/node_modules/@opentelemetry/semantic-conventions/dist/index.mjs +6 -0
  184. package/node_modules/@opentelemetry/semantic-conventions/dist/internal/utils.cjs +20 -0
  185. package/node_modules/@opentelemetry/semantic-conventions/dist/internal/utils.mjs +20 -0
  186. package/node_modules/@opentelemetry/semantic-conventions/dist/resource/SemanticResourceAttributes.cjs +1326 -0
  187. package/node_modules/@opentelemetry/semantic-conventions/{build/esnext/resource/SemanticResourceAttributes.d.ts → dist/resource/SemanticResourceAttributes.d.cts} +600 -597
  188. package/node_modules/@opentelemetry/semantic-conventions/{build/src/resource/SemanticResourceAttributes.d.ts → dist/resource/SemanticResourceAttributes.d.mts} +600 -597
  189. package/node_modules/@opentelemetry/semantic-conventions/dist/resource/SemanticResourceAttributes.mjs +1188 -0
  190. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.cjs +2038 -0
  191. package/node_modules/@opentelemetry/semantic-conventions/{build/esm/stable_attributes.js → dist/stable_attributes.d.cts} +327 -220
  192. package/node_modules/@opentelemetry/semantic-conventions/{build/esnext/stable_attributes.js → dist/stable_attributes.d.mts} +327 -220
  193. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.mjs +1841 -0
  194. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_events.cjs +9 -0
  195. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_events.d.cts +8 -0
  196. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_events.d.mts +8 -0
  197. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_events.mjs +9 -0
  198. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.cjs +378 -0
  199. package/node_modules/@opentelemetry/semantic-conventions/{build/src/stable_metrics.js → dist/stable_metrics.d.cts} +69 -63
  200. package/node_modules/@opentelemetry/semantic-conventions/{build/esm/stable_metrics.js → dist/stable_metrics.d.mts} +69 -59
  201. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.mjs +326 -0
  202. package/node_modules/@opentelemetry/semantic-conventions/dist/trace/SemanticAttributes.cjs +2508 -0
  203. package/node_modules/@opentelemetry/semantic-conventions/{build/esnext/trace/SemanticAttributes.d.ts → dist/trace/SemanticAttributes.d.cts} +1097 -1094
  204. package/node_modules/@opentelemetry/semantic-conventions/{build/src/trace/SemanticAttributes.d.ts → dist/trace/SemanticAttributes.d.mts} +1097 -1094
  205. package/node_modules/@opentelemetry/semantic-conventions/dist/trace/SemanticAttributes.mjs +2236 -0
  206. package/node_modules/@opentelemetry/semantic-conventions/package.json +27 -42
  207. package/node_modules/@sentry/core/build/cjs/client.js +14 -5
  208. package/node_modules/@sentry/core/build/cjs/integrations/express/patch-layer.js +15 -1
  209. package/node_modules/@sentry/core/build/cjs/integrations/http/client-subscriptions.js +10 -1
  210. package/node_modules/@sentry/core/build/cjs/scope.js +0 -1
  211. package/node_modules/@sentry/core/build/cjs/tracing/openai/utils.js +1 -7
  212. package/node_modules/@sentry/core/build/cjs/tracing/sentrySpan.js +11 -0
  213. package/node_modules/@sentry/core/build/cjs/utils/envelope.js +1 -1
  214. package/node_modules/@sentry/core/build/cjs/utils/sql.js +1 -1
  215. package/node_modules/@sentry/core/build/cjs/utils/tunnel.js +9 -0
  216. package/node_modules/@sentry/core/build/cjs/utils/version.js +1 -1
  217. package/node_modules/@sentry/core/build/esm/client.js +14 -5
  218. package/node_modules/@sentry/core/build/esm/integrations/express/patch-layer.js +15 -1
  219. package/node_modules/@sentry/core/build/esm/integrations/http/client-subscriptions.js +10 -1
  220. package/node_modules/@sentry/core/build/esm/package.json +1 -1
  221. package/node_modules/@sentry/core/build/esm/scope.js +0 -1
  222. package/node_modules/@sentry/core/build/esm/tracing/openai/utils.js +1 -7
  223. package/node_modules/@sentry/core/build/esm/tracing/sentrySpan.js +11 -0
  224. package/node_modules/@sentry/core/build/esm/utils/envelope.js +1 -1
  225. package/node_modules/@sentry/core/build/esm/utils/sql.js +1 -1
  226. package/node_modules/@sentry/core/build/esm/utils/tunnel.js +9 -1
  227. package/node_modules/@sentry/core/build/esm/utils/version.js +1 -1
  228. package/node_modules/@sentry/core/build/types/types/datacategory.d.ts +1 -1
  229. package/node_modules/@sentry/core/build/types/utils/tunnel.d.ts +1 -0
  230. package/node_modules/@sentry/core/build/types-ts3.8/types/datacategory.d.ts +1 -1
  231. package/node_modules/@sentry/core/build/types-ts3.8/utils/tunnel.d.ts +1 -0
  232. package/node_modules/@sentry/core/package.json +1 -1
  233. package/node_modules/@sentry/node/build/cjs/integrations/tracing/redis/index.js +1 -1
  234. package/node_modules/@sentry/node/build/esm/package.json +1 -1
  235. package/node_modules/@sentry/node/package.json +6 -6
  236. package/node_modules/@sentry/node-core/build/cjs/integrations/anr/index.js +1 -1
  237. package/node_modules/@sentry/node-core/build/cjs/integrations/contextlines.js +6 -4
  238. package/node_modules/@sentry/node-core/build/cjs/integrations/local-variables/local-variables-async.js +1 -1
  239. package/node_modules/@sentry/node-core/build/cjs/integrations/modules.js +21 -2
  240. package/node_modules/@sentry/node-core/build/cjs/integrations/node-fetch/undici-instrumentation.js +8 -0
  241. package/node_modules/@sentry/node-core/build/esm/integrations/anr/index.js +1 -1
  242. package/node_modules/@sentry/node-core/build/esm/integrations/anr/worker-script.js +2 -2
  243. package/node_modules/@sentry/node-core/build/esm/integrations/contextlines.js +7 -5
  244. package/node_modules/@sentry/node-core/build/esm/integrations/local-variables/local-variables-async.js +1 -1
  245. package/node_modules/@sentry/node-core/build/esm/integrations/local-variables/worker-script.js +1 -1
  246. package/node_modules/@sentry/node-core/build/esm/integrations/node-fetch/undici-instrumentation.js +8 -0
  247. package/node_modules/@sentry/node-core/build/esm/package.json +1 -1
  248. package/node_modules/@sentry/node-core/package.json +9 -9
  249. package/node_modules/@sentry/opentelemetry/build/esm/package.json +1 -1
  250. package/node_modules/@sentry/opentelemetry/package.json +6 -6
  251. package/node_modules/@sentry/server-utils/build/THIRD-PARTY-LICENSES.txt +32 -32
  252. package/node_modules/@sentry/server-utils/build/cjs/integrations/tracing-channel/express/instrumentation.js +12 -1
  253. package/node_modules/@sentry/server-utils/build/esm/integrations/tracing-channel/express/instrumentation.js +13 -2
  254. package/node_modules/@sentry/server-utils/build/esm/package.json +1 -1
  255. package/node_modules/@sentry/server-utils/build/types/integrations/tracing-channel/express/types.d.ts +1 -1
  256. package/node_modules/@sentry/server-utils/build/types-ts3.8/integrations/tracing-channel/express/types.d.ts +1 -1
  257. package/node_modules/@sentry/server-utils/package.json +2 -2
  258. package/node_modules/debug/package.json +1 -1
  259. package/node_modules/es-module-lexer/dist/lexer.asm.js +2 -2
  260. package/node_modules/es-module-lexer/dist/lexer.cjs +1 -1
  261. package/node_modules/es-module-lexer/dist/lexer.js +2 -2
  262. package/node_modules/es-module-lexer/dist/lexer.minimal.asm.js +2 -2
  263. package/node_modules/es-module-lexer/dist/lexer.minimal.cjs +1 -1
  264. package/node_modules/es-module-lexer/dist/lexer.minimal.js +2 -2
  265. package/node_modules/es-module-lexer/package.json +1 -1
  266. package/node_modules/import-in-the-middle/CHANGELOG.md +35 -0
  267. package/node_modules/import-in-the-middle/README.md +15 -1
  268. package/node_modules/import-in-the-middle/create-hook.mjs +370 -155
  269. package/node_modules/import-in-the-middle/index.d.ts +8 -2
  270. package/node_modules/import-in-the-middle/index.js +80 -53
  271. package/node_modules/import-in-the-middle/lib/get-esm-exports.mjs +37 -3
  272. package/node_modules/import-in-the-middle/lib/get-exports.mjs +33 -40
  273. package/node_modules/import-in-the-middle/lib/register.js +81 -16
  274. package/node_modules/import-in-the-middle/package.json +9 -5
  275. package/node_modules/supports-color/browser.js +21 -2
  276. package/node_modules/supports-color/index.js +41 -24
  277. package/node_modules/supports-color/license +1 -1
  278. package/node_modules/supports-color/package.json +11 -6
  279. package/node_modules/supports-color/readme.md +8 -7
  280. package/package.json +4 -6
  281. package/packages/pm-beads/package.json +1 -1
  282. package/packages/pm-calendar/package.json +1 -1
  283. package/packages/pm-command-kit/package.json +1 -1
  284. package/packages/pm-digital-twin/package.json +1 -1
  285. package/packages/pm-governance-audit/package.json +1 -1
  286. package/packages/pm-guide-shell/package.json +1 -1
  287. package/packages/pm-kanban/package.json +1 -1
  288. package/packages/pm-lifecycle-hooks/package.json +1 -1
  289. package/packages/pm-linked-test-adapters/package.json +1 -1
  290. package/packages/pm-search-advanced/package.json +1 -1
  291. package/packages/pm-templates/package.json +1 -1
  292. package/packages/pm-todos/package.json +1 -1
  293. package/packages/pm-vcs/package.json +1 -1
  294. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  295. package/plugins/pm-claude/package.json +1 -1
  296. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  297. package/plugins/pm-codex/package.json +1 -1
  298. package/plugins/pm-codex/plugin.json +1 -1
  299. package/runtime-dependencies.json +1 -1
  300. package/dist/cli-bundle/chunks/chunk-4WIVCOA7.js +0 -2
  301. package/dist/cli-bundle/chunks/chunk-A3WCP4TU.js +0 -6
  302. package/dist/cli-bundle/chunks/chunk-AB5S6TWE.js +0 -124
  303. package/dist/cli-bundle/chunks/chunk-BV7J3LRH.js +0 -114
  304. package/dist/cli-bundle/chunks/chunk-E4BQRZF2.js +0 -10
  305. package/dist/cli-bundle/chunks/chunk-ERD2RYWM.js +0 -31
  306. package/dist/cli-bundle/chunks/chunk-IGEBFNWE.js +0 -2
  307. package/dist/cli-bundle/chunks/chunk-IYICNCK2.js +0 -2
  308. package/dist/cli-bundle/chunks/chunk-JD3XWF66.js +0 -3
  309. package/dist/cli-bundle/chunks/chunk-JLHD7OQ2.js +0 -2
  310. package/dist/cli-bundle/chunks/chunk-LC4DJVXR.js +0 -2
  311. package/dist/cli-bundle/chunks/chunk-OFZQEQ6X.js +0 -2
  312. package/dist/cli-bundle/chunks/chunk-QGL5IAP4.js +0 -8
  313. package/dist/cli-bundle/chunks/chunk-R24NZ2TB.js +0 -8
  314. package/dist/cli-bundle/chunks/chunk-VO2HSB5F.js +0 -2
  315. package/dist/cli-bundle/chunks/item-transaction-55QTCU2M.js +0 -2
  316. package/dist/cli-bundle/chunks/mutation-admission-WUN7JYVJ.js +0 -2
  317. package/dist/cli-bundle/chunks/register-mutation-SKCEP5QU.js +0 -20
  318. package/dist/cli-bundle/chunks/register-operations-ZT4OYCF3.js +0 -2
  319. package/dist/cli-bundle/chunks/register-setup-JVWNS2TY.js +0 -2
  320. package/dist/cli-bundle/focused-chunks/chunk-3WVMEA2A.js +0 -6
  321. package/dist/cli-bundle/focused-chunks/chunk-5UVJOAUP.js +0 -91
  322. package/dist/cli-bundle/focused-chunks/chunk-5WQ3LNUK.js +0 -78
  323. package/dist/cli-bundle/focused-chunks/chunk-6E4X7MQA.js +0 -26
  324. package/dist/cli-bundle/focused-chunks/chunk-7XHE335U.js +0 -2
  325. package/dist/cli-bundle/focused-chunks/chunk-CZFZCSOX.js +0 -2
  326. package/dist/cli-bundle/focused-chunks/chunk-HPC2M6JD.js +0 -6
  327. package/dist/cli-bundle/focused-chunks/chunk-HR5FEUUL.js +0 -2
  328. package/dist/cli-bundle/focused-chunks/chunk-J7ESCE7M.js +0 -24
  329. package/dist/cli-bundle/focused-chunks/chunk-KWZLY35A.js +0 -2
  330. package/dist/cli-bundle/focused-chunks/chunk-M4IA4LC6.js +0 -8
  331. package/dist/cli-bundle/focused-chunks/chunk-NASE6JC2.js +0 -2
  332. package/dist/cli-bundle/focused-chunks/chunk-QJ647CQE.js +0 -2
  333. package/dist/cli-bundle/focused-chunks/chunk-ZCN35TCK.js +0 -2
  334. package/dist/cli-bundle/focused-chunks/chunk-ZSQ2FT22.js +0 -44
  335. package/dist/cli-bundle/focused-chunks/item-revision-GNKYO6GZ.js +0 -2
  336. package/dist/cli-bundle/focused-chunks/item-transaction-AUUQHR5Z.js +0 -2
  337. package/dist/cli-bundle/focused-chunks/mutation-actor-OBRD7HFZ.js +0 -2
  338. package/dist/cli-bundle/focused-chunks/mutation-admission-6TX3EOJX.js +0 -2
  339. package/dist/cli-bundle/focused-chunks/stage-LERF2YJU.js +0 -2
  340. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.d.ts +0 -14984
  341. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +0 -14991
  342. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.d.ts +0 -291
  343. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.d.ts +0 -4053
  344. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.d.ts +0 -7
  345. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.js +0 -13
  346. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.d.ts +0 -6
  347. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.js +0 -16
  348. package/node_modules/@opentelemetry/semantic-conventions/build/esm/internal/utils.d.ts +0 -7
  349. package/node_modules/@opentelemetry/semantic-conventions/build/esm/internal/utils.js +0 -23
  350. package/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/SemanticResourceAttributes.d.ts +0 -1453
  351. package/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/SemanticResourceAttributes.js +0 -1250
  352. package/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/index.d.ts +0 -2
  353. package/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/index.js +0 -10
  354. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.d.ts +0 -1726
  355. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.d.ts +0 -5
  356. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.js +0 -12
  357. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_metrics.d.ts +0 -308
  358. package/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/SemanticAttributes.d.ts +0 -2664
  359. package/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/SemanticAttributes.js +0 -2360
  360. package/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/index.d.ts +0 -2
  361. package/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/index.js +0 -10
  362. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.d.ts +0 -2
  363. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +0 -7
  364. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.d.ts +0 -14984
  365. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.d.ts +0 -291
  366. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.d.ts +0 -4053
  367. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.d.ts +0 -7
  368. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.js +0 -13
  369. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.d.ts +0 -6
  370. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.js +0 -16
  371. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/internal/utils.d.ts +0 -7
  372. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/internal/utils.js +0 -23
  373. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/resource/SemanticResourceAttributes.js +0 -1250
  374. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/resource/index.d.ts +0 -2
  375. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/resource/index.js +0 -10
  376. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.d.ts +0 -1726
  377. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.d.ts +0 -5
  378. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.js +0 -12
  379. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_metrics.d.ts +0 -308
  380. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_metrics.js +0 -315
  381. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/trace/SemanticAttributes.js +0 -2360
  382. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/trace/index.d.ts +0 -2
  383. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/trace/index.js +0 -10
  384. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.d.ts +0 -2
  385. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +0 -7
  386. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.d.ts +0 -14984
  387. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.d.ts +0 -291
  388. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js +0 -301
  389. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.d.ts +0 -4053
  390. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +0 -4072
  391. package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.d.ts +0 -7
  392. package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.js +0 -29
  393. package/node_modules/@opentelemetry/semantic-conventions/build/src/index.d.ts +0 -6
  394. package/node_modules/@opentelemetry/semantic-conventions/build/src/index.js +0 -32
  395. package/node_modules/@opentelemetry/semantic-conventions/build/src/internal/utils.d.ts +0 -7
  396. package/node_modules/@opentelemetry/semantic-conventions/build/src/internal/utils.js +0 -27
  397. package/node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js +0 -1255
  398. package/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.d.ts +0 -2
  399. package/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js +0 -26
  400. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.d.ts +0 -1726
  401. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +0 -1759
  402. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.d.ts +0 -5
  403. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js +0 -15
  404. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_metrics.d.ts +0 -308
  405. package/node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js +0 -2368
  406. package/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.d.ts +0 -2
  407. package/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js +0 -26
  408. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.d.ts +0 -2
  409. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +0 -10
  410. package/node_modules/fdir/LICENSE +0 -7
  411. package/node_modules/fdir/README.md +0 -91
  412. package/node_modules/fdir/dist/index.cjs +0 -588
  413. package/node_modules/fdir/dist/index.d.cts +0 -155
  414. package/node_modules/fdir/dist/index.d.mts +0 -155
  415. package/node_modules/fdir/dist/index.mjs +0 -570
  416. package/node_modules/fdir/package.json +0 -106
  417. package/node_modules/picomatch/LICENSE +0 -21
  418. package/node_modules/picomatch/README.md +0 -743
  419. package/node_modules/picomatch/index.js +0 -17
  420. package/node_modules/picomatch/lib/constants.js +0 -184
  421. package/node_modules/picomatch/lib/parse.js +0 -1425
  422. package/node_modules/picomatch/lib/picomatch.js +0 -361
  423. package/node_modules/picomatch/lib/scan.js +0 -403
  424. package/node_modules/picomatch/lib/utils.js +0 -72
  425. package/node_modules/picomatch/package.json +0 -83
  426. package/node_modules/picomatch/posix.js +0 -3
  427. package/node_modules/tinyglobby/LICENSE +0 -21
  428. package/node_modules/tinyglobby/README.md +0 -25
  429. package/node_modules/tinyglobby/dist/index.cjs +0 -335
  430. package/node_modules/tinyglobby/dist/index.d.cts +0 -148
  431. package/node_modules/tinyglobby/dist/index.d.mts +0 -148
  432. package/node_modules/tinyglobby/dist/index.mjs +0 -307
  433. package/node_modules/tinyglobby/package.json +0 -70
  434. /package/node_modules/import-in-the-middle/{register-hooks.d.ts → register-hooks.d.mts} +0 -0
@@ -1,4 +1,4 @@
1
- import{A as u,E as p,z as h}from"./chunk-PDXSMSO5.js";import{readFile as b,realpath as y,stat as _,writeFile as $}from"node:fs/promises";import l from"node:path";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="38df9536-d87a-52ac-958d-091a17c9da9c")}catch{}})();var d="# pm-cli:runtime-cache:start",f="# pm-cli:runtime-cache:end",E=".agents/pm";async function m(n){let e=l.resolve(n),t=[];for(;;)try{let i=await y(e);if(!(await _(i)).isDirectory())throw Object.assign(new Error("Initialization path ancestry must be a directory."),{code:"ENOTDIR"});return l.join(i,...t)}catch(i){if(!p(i)||l.dirname(e)===e)throw i;t.unshift(l.basename(e)),e=l.dirname(e)}}var R=["runtime/","search/","locks/","transactions/","checkpoints/"],T=["search/eval-queries.json"];async function w(n){try{return await n()}catch(e){throw e instanceof Error&&"code"in e&&typeof e.code=="string"&&["EACCES","EPERM","EROFS"].includes(e.code)?new u("The workspace .gitignore is not writable.",h.GENERIC_FAILURE,{code:"init_gitignore_unwritable",reason:e.code.toLowerCase(),required:"Grant the current user read and write access to the workspace .gitignore before initialization.",why:"pm init must publish its managed runtime-cache ignore fence without replacing unrelated entries.",nextSteps:["Grant read and write access to the workspace .gitignore and rerun pm init.","If the workspace is intentionally read-only, initialize pm in a writable workspace or clone."]}):e}}function I(n){let e=n.split(l.sep).join("/").replace(/^\.\/+/,""),t=e.length;for(;t>0&&e[t-1]==="/";)t-=1;return e.slice(0,t)}function k(n){let e=n.replaceAll("\\","/");return l.isAbsolute(n)||e===".."||e.startsWith("../")}function G(n=E){let e=I(n);if(/[\r\n]/u.test(e))throw new u("A tracker path containing a line break cannot be represented safely in .gitignore.",h.USAGE,{code:"invalid_argument_value",required:"a tracker path without line breaks",nextSteps:["Choose a tracker path without carriage returns or newlines and rerun pm init."]});let t=e.replace(/[\\*?[\]#! \t]/gu,"\\$&");return[d,...R.map(i=>i==="search/"?`${t}/${i}*`:`${t}/${i}`),...T.map(i=>`!${t}/${i}`),f].join(`
1
+ import{A as u,E as p,z as h}from"./chunk-IXYBN6D2.js";import{readFile as b,realpath as y,stat as _,writeFile as $}from"node:fs/promises";import l from"node:path";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="38df9536-d87a-52ac-958d-091a17c9da9c")}catch{}})();var d="# pm-cli:runtime-cache:start",f="# pm-cli:runtime-cache:end",E=".agents/pm";async function m(n){let e=l.resolve(n),t=[];for(;;)try{let i=await y(e);if(!(await _(i)).isDirectory())throw Object.assign(new Error("Initialization path ancestry must be a directory."),{code:"ENOTDIR"});return l.join(i,...t)}catch(i){if(!p(i)||l.dirname(e)===e)throw i;t.unshift(l.basename(e)),e=l.dirname(e)}}var R=["runtime/","search/","locks/","transactions/","checkpoints/"],T=["search/eval-queries.json"];async function w(n){try{return await n()}catch(e){throw e instanceof Error&&"code"in e&&typeof e.code=="string"&&["EACCES","EPERM","EROFS"].includes(e.code)?new u("The workspace .gitignore is not writable.",h.GENERIC_FAILURE,{code:"init_gitignore_unwritable",reason:e.code.toLowerCase(),required:"Grant the current user read and write access to the workspace .gitignore before initialization.",why:"pm init must publish its managed runtime-cache ignore fence without replacing unrelated entries.",nextSteps:["Grant read and write access to the workspace .gitignore and rerun pm init.","If the workspace is intentionally read-only, initialize pm in a writable workspace or clone."]}):e}}function I(n){let e=n.split(l.sep).join("/").replace(/^\.\/+/,""),t=e.length;for(;t>0&&e[t-1]==="/";)t-=1;return e.slice(0,t)}function k(n){let e=n.replaceAll("\\","/");return l.isAbsolute(n)||e===".."||e.startsWith("../")}function G(n=E){let e=I(n);if(/[\r\n]/u.test(e))throw new u("A tracker path containing a line break cannot be represented safely in .gitignore.",h.USAGE,{code:"invalid_argument_value",required:"a tracker path without line breaks",nextSteps:["Choose a tracker path without carriage returns or newlines and rerun pm init."]});let t=e.replace(/[\\*?[\]#! \t]/gu,"\\$&");return[d,...R.map(i=>i==="search/"?`${t}/${i}*`:`${t}/${i}`),...T.map(i=>`!${t}/${i}`),f].join(`
2
2
  `)}function O(n,e,t){let i=e.replace(/[\\*?[\]#! \t]/gu,"\\$&"),o=[...new Set([e,i])].flatMap(s=>R.flatMap(c=>[`${s}/${c}`,`!${s}/${c}`])),a=[],r=!1;for(let s of n)o.some(c=>s.startsWith(c))?(r||a.push(...t),r=!0):a.push(s);return r||a.push(...t),a}function P(n){let e=[],t=-1,i=0,o=0;for(let a of n.split(`
3
3
  `)){let r=a.endsWith("\r")?a.slice(0,-1):a;r===d?(t=o,i=o+a.length+1):r===f&&t>=0&&(e.push({index:t,end:o+r.length,lines:n.slice(i,o).split(/\r?\n/u).filter(s=>s.length>0)}),t=-1),o+=a.length+1}return e}function v(n,e){let t=n.includes(`\r
4
4
  `)?`\r
@@ -6,4 +6,4 @@ import{A as u,E as p,z as h}from"./chunk-PDXSMSO5.js";import{readFile as b,realp
6
6
  `,i=G(e).split(`
7
7
  `).slice(1,-1),o=P(n),a=o.flatMap(c=>c.lines),r=[d,...O(a,e,i),f].join(t);if(o.length===0){let c=n.length===0?"":n.endsWith(`
8
8
  `)?t:`${t}${t}`;return`${n}${c}${r}${t}`}let s=n;for(let[c,g]of[...o.entries()].reverse())s=`${s.slice(0,g.index)}${c===0?r:""}${s.slice(g.end)}`;return s}async function S(n,e={}){let t=l.join(n,".gitignore"),i=E;if(e.pmRoot!==void 0){let r=I(l.relative(await m(n),await m(e.pmRoot)));if(k(r))return{path:t,changed:!1};i=r}let o="";try{o=await w(()=>b(t,"utf8"))}catch(r){if(!(r instanceof Error&&"code"in r&&p(r)))throw r}let a=v(o,i);return a===o?{path:t,changed:!1}:(await w(()=>$(t,a,"utf8")),{path:t,changed:!0})}export{R as a,k as b,S as c};
9
- //# sourceMappingURL=chunk-7SEPCQV2.js.map
9
+ //# sourceMappingURL=chunk-DH4DHL6V.js.map
@@ -1,6 +1,6 @@
1
- import{c as T}from"./chunk-6E4X7MQA.js";import{a,d as I}from"./chunk-5WQ3LNUK.js";import{_ as w,j as g,k as v,l as E}from"./chunk-3WVMEA2A.js";import{A as u,C as m,m as k,z as f}from"./chunk-PDXSMSO5.js";import C from"node:fs/promises";import p from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="74b72dd8-0877-55a4-9c80-d043f19e1f96")}catch{}})();var P=["extensions","docs","examples","assets","prompts"],U=Object.freeze({extensions:Object.freeze([".agents/pm/extensions","extensions",".custom/pm-extensions",".custom/pm-extension"]),docs:Object.freeze(["docs","documentation"]),examples:Object.freeze(["examples","docs/examples"]),assets:Object.freeze(["assets",".agents/pm/assets"]),prompts:Object.freeze(["prompts",".agents/pm/prompts"])});function R(e){return P.includes(e)}function q(e,t){if(t==null)return[];let n=Array.isArray(t)?t:[t],r=[];for(let o of n){if(typeof o!="string"||o.trim().length===0)throw new u(`Package manifest field pm.${e} must contain string paths.`,f.USAGE);r.push(o.trim())}return[...new Set(r)].sort((o,i)=>o.localeCompare(i))}function G(e){if(e==null)return{};if(typeof e!="object"||Array.isArray(e))throw new u("Package manifest field pm must be an object.",f.USAGE);let t={},n=e;for(let[r,o]of Object.entries(n)){if(!R(r))continue;let i=q(r,o);i.length>0&&(t[r]=i)}return t}function c(e,t){let n=e[t];return typeof n=="string"&&n.trim().length>0?n.trim():void 0}function S(e){if(!Array.isArray(e))return;let t=e.map(n=>typeof n=="string"?n.trim():"").filter(n=>n.length>0);return t.length>0?[...new Set(t)].sort((n,r)=>n.localeCompare(r)):void 0}function x(e){if(typeof e=="string"&&e.trim().length>0)return e.trim();if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let t=e.url;return typeof t=="string"&&t.trim().length>0?t.trim():void 0}}function J(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={docs:c(t,"docs"),npm:c(t,"npm"),repository:c(t,"repository"),report:c(t,"report")};return Object.values(n).some(r=>typeof r=="string")?n:void 0}function K(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={image:c(t,"image"),video:c(t,"video")};return Object.values(n).some(r=>typeof r=="string")?n:void 0}function V(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={display_name:c(t,"display_name")??c(t,"displayName"),category:c(t,"category"),summary:c(t,"summary"),links:J(t.links),media:K(t.media),tags:S(t.tags)};return Object.values(n).some(r=>r!==void 0)?n:void 0}async function Y(e){let t=p.join(e,"package.json");if(!await m(t))return{source:"convention",resources:{}};let n;try{n=JSON.parse(await C.readFile(t,"utf8"))}catch(l){throw new u(`Failed to parse package manifest at "${t}": ${String(l)}`,f.USAGE)}if(typeof n!="object"||n===null||Array.isArray(n))throw new u(`Package manifest at "${t}" must be a JSON object.`,f.USAGE);let r=n,o=r.pm,i=o!=null,s=typeof o=="object"&&o!==null&&!Array.isArray(o)?o:{};return{source:i?"pm":"convention",package_json_path:t,package_name:typeof r.name=="string"?r.name:void 0,package_version:typeof r.version=="string"?r.version:void 0,package_private:r.private===!0,package_description:typeof r.description=="string"?r.description:void 0,package_keywords:S(r.keywords),package_homepage:typeof r.homepage=="string"?r.homepage:void 0,package_repository_url:x(r.repository),package_bugs_url:x(r.bugs),aliases:S(s.aliases),resources:G(o),catalog:V(s.catalog)}}async function j(e){if(!await m(e))return[];let t=await C.readdir(e,{withFileTypes:!0}),n=[];for(let r of t){if(!r.isDirectory())continue;let o=p.join(e,r.name);await m(p.join(o,"manifest.json"))&&n.push(o)}return n.sort((r,o)=>r.localeCompare(o))}async function he(e){if(await m(p.join(e,"manifest.json")))return[e];let t=(await Y(e)).resources.extensions??[],n=new Set;for(let r of t){if(r.includes("*")||r.startsWith("!"))throw new u(`Package extension entry "${r}" uses a glob/exclusion pattern. pm package installs currently require concrete extension paths or directories.`,f.USAGE);let o=p.resolve(e,r);if(!w(e,o))throw new u(`Package extension entry "${r}" resolves outside package root.`,f.USAGE);if(await m(p.join(o,"manifest.json"))){n.add(o);continue}for(let i of await j(o))n.add(i)}if(t.length===0)for(let r of U.extensions)for(let o of await j(p.join(e,r)))n.add(o);return[...n].sort((r,o)=>r.localeCompare(o))}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3984f1ef-1703-5a83-a4fa-ec1cdc738572")}catch{}})();var D=[["commands","Commands"],["command_overrides","Command overrides"],["flag_commands","Flag commands"],["item_types","Item types"],["item_fields","Item fields"],["migrations","Migrations"],["profiles","Profiles"],["importers","Importers"],["exporters","Exporters"],["search_providers","Search providers"],["vector_store_adapters","Vector store adapters"],["assurance_providers","Assurance measurement providers"],["hooks","Lifecycle hooks"],["parser_overrides","Parser overrides"],["service_overrides","Service overrides"],["renderer_overrides","Renderer overrides"]];function A(e){return"#".repeat(e)}function $(e){if(!e.includes("`"))return`\`${e}\``;let t=0,n=0;for(let i of e)n=i==="`"?n+1:0,t=Math.max(t,n);let r="`".repeat(t+1),o=e.startsWith("`")||e.endsWith("`")?" ":"";return`${r}${o}${e}${o}${r}`}function B(e){return e.length===0?"Capabilities: _none registered_":`Capabilities: ${e.map($).join(", ")}`}function W(e,t,n){let r=[`${A(t)} ${e}`,""];return n.length===0?(r.push("_None._",""),r):(r.push(...n.map(o=>`- ${$(o)}`),""),r)}function H(e,t,n){return e===0&&!n?[]:[`${A(t)} Preflight overrides`,"",e>0?`- ${e} registered (this surface carries no per-entry identifier)`:"_None._",""]}function be(e,t={}){let n=t.headingLevel??2;if(!Number.isInteger(n)||n<1||n>6)throw new RangeError(`headingLevel must be an integer in [1, 6], received ${String(t.headingLevel)}`);let r=Math.min(n+1,6),o=t.includeEmpty===!0,i=t.title??"Extension surfaces",s=[`${A(n)} ${i}`,""];(o||e.capabilities.length>0)&&s.push(B(e.capabilities),"");for(let[l,d]of D){let y=e[l]??[];y.length===0&&!o||s.push(...W(d,r,y))}return s.push(...H(e.preflight_overrides,r,o)),!(e.preflight_overrides>0||D.some(([l])=>(e[l]?.length??0)>0))&&!o&&s.push("_This extension registers no surfaces._",""),`${s.join(`
1
+ import{c as T}from"./chunk-T3NMYMW4.js";import{_ as w,cc as a,fc as I,j as g,k as v,l as E}from"./chunk-A2CLYPDA.js";import{A as u,C as m,m as k,z as f}from"./chunk-IXYBN6D2.js";import C from"node:fs/promises";import p from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="74b72dd8-0877-55a4-9c80-d043f19e1f96")}catch{}})();var P=["extensions","docs","examples","assets","prompts"],U=Object.freeze({extensions:Object.freeze([".agents/pm/extensions","extensions",".custom/pm-extensions",".custom/pm-extension"]),docs:Object.freeze(["docs","documentation"]),examples:Object.freeze(["examples","docs/examples"]),assets:Object.freeze(["assets",".agents/pm/assets"]),prompts:Object.freeze(["prompts",".agents/pm/prompts"])});function R(e){return P.includes(e)}function q(e,t){if(t==null)return[];let n=Array.isArray(t)?t:[t],r=[];for(let o of n){if(typeof o!="string"||o.trim().length===0)throw new u(`Package manifest field pm.${e} must contain string paths.`,f.USAGE);r.push(o.trim())}return[...new Set(r)].sort((o,i)=>o.localeCompare(i))}function G(e){if(e==null)return{};if(typeof e!="object"||Array.isArray(e))throw new u("Package manifest field pm must be an object.",f.USAGE);let t={},n=e;for(let[r,o]of Object.entries(n)){if(!R(r))continue;let i=q(r,o);i.length>0&&(t[r]=i)}return t}function c(e,t){let n=e[t];return typeof n=="string"&&n.trim().length>0?n.trim():void 0}function S(e){if(!Array.isArray(e))return;let t=e.map(n=>typeof n=="string"?n.trim():"").filter(n=>n.length>0);return t.length>0?[...new Set(t)].sort((n,r)=>n.localeCompare(r)):void 0}function x(e){if(typeof e=="string"&&e.trim().length>0)return e.trim();if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let t=e.url;return typeof t=="string"&&t.trim().length>0?t.trim():void 0}}function J(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={docs:c(t,"docs"),npm:c(t,"npm"),repository:c(t,"repository"),report:c(t,"report")};return Object.values(n).some(r=>typeof r=="string")?n:void 0}function K(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={image:c(t,"image"),video:c(t,"video")};return Object.values(n).some(r=>typeof r=="string")?n:void 0}function V(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={display_name:c(t,"display_name")??c(t,"displayName"),category:c(t,"category"),summary:c(t,"summary"),links:J(t.links),media:K(t.media),tags:S(t.tags)};return Object.values(n).some(r=>r!==void 0)?n:void 0}async function Y(e){let t=p.join(e,"package.json");if(!await m(t))return{source:"convention",resources:{}};let n;try{n=JSON.parse(await C.readFile(t,"utf8"))}catch(l){throw new u(`Failed to parse package manifest at "${t}": ${String(l)}`,f.USAGE)}if(typeof n!="object"||n===null||Array.isArray(n))throw new u(`Package manifest at "${t}" must be a JSON object.`,f.USAGE);let r=n,o=r.pm,i=o!=null,s=typeof o=="object"&&o!==null&&!Array.isArray(o)?o:{};return{source:i?"pm":"convention",package_json_path:t,package_name:typeof r.name=="string"?r.name:void 0,package_version:typeof r.version=="string"?r.version:void 0,package_private:r.private===!0,package_description:typeof r.description=="string"?r.description:void 0,package_keywords:S(r.keywords),package_homepage:typeof r.homepage=="string"?r.homepage:void 0,package_repository_url:x(r.repository),package_bugs_url:x(r.bugs),aliases:S(s.aliases),resources:G(o),catalog:V(s.catalog)}}async function j(e){if(!await m(e))return[];let t=await C.readdir(e,{withFileTypes:!0}),n=[];for(let r of t){if(!r.isDirectory())continue;let o=p.join(e,r.name);await m(p.join(o,"manifest.json"))&&n.push(o)}return n.sort((r,o)=>r.localeCompare(o))}async function he(e){if(await m(p.join(e,"manifest.json")))return[e];let t=(await Y(e)).resources.extensions??[],n=new Set;for(let r of t){if(r.includes("*")||r.startsWith("!"))throw new u(`Package extension entry "${r}" uses a glob/exclusion pattern. pm package installs currently require concrete extension paths or directories.`,f.USAGE);let o=p.resolve(e,r);if(!w(e,o))throw new u(`Package extension entry "${r}" resolves outside package root.`,f.USAGE);if(await m(p.join(o,"manifest.json"))){n.add(o);continue}for(let i of await j(o))n.add(i)}if(t.length===0)for(let r of U.extensions)for(let o of await j(p.join(e,r)))n.add(o);return[...n].sort((r,o)=>r.localeCompare(o))}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3984f1ef-1703-5a83-a4fa-ec1cdc738572")}catch{}})();var D=[["commands","Commands"],["command_overrides","Command overrides"],["flag_commands","Flag commands"],["item_types","Item types"],["item_fields","Item fields"],["migrations","Migrations"],["profiles","Profiles"],["importers","Importers"],["exporters","Exporters"],["search_providers","Search providers"],["vector_store_adapters","Vector store adapters"],["assurance_providers","Assurance measurement providers"],["hooks","Lifecycle hooks"],["parser_overrides","Parser overrides"],["service_overrides","Service overrides"],["renderer_overrides","Renderer overrides"]];function A(e){return"#".repeat(e)}function $(e){if(!e.includes("`"))return`\`${e}\``;let t=0,n=0;for(let i of e)n=i==="`"?n+1:0,t=Math.max(t,n);let r="`".repeat(t+1),o=e.startsWith("`")||e.endsWith("`")?" ":"";return`${r}${o}${e}${o}${r}`}function B(e){return e.length===0?"Capabilities: _none registered_":`Capabilities: ${e.map($).join(", ")}`}function W(e,t,n){let r=[`${A(t)} ${e}`,""];return n.length===0?(r.push("_None._",""),r):(r.push(...n.map(o=>`- ${$(o)}`),""),r)}function H(e,t,n){return e===0&&!n?[]:[`${A(t)} Preflight overrides`,"",e>0?`- ${e} registered (this surface carries no per-entry identifier)`:"_None._",""]}function be(e,t={}){let n=t.headingLevel??2;if(!Number.isInteger(n)||n<1||n>6)throw new RangeError(`headingLevel must be an integer in [1, 6], received ${String(t.headingLevel)}`);let r=Math.min(n+1,6),o=t.includeEmpty===!0,i=t.title??"Extension surfaces",s=[`${A(n)} ${i}`,""];(o||e.capabilities.length>0)&&s.push(B(e.capabilities),"");for(let[l,d]of D){let y=e[l]??[];y.length===0&&!o||s.push(...W(d,r,y))}return s.push(...H(e.preflight_overrides,r,o)),!(e.preflight_overrides>0||D.some(([l])=>(e[l]?.length??0)>0))&&!o&&s.push("_This extension registers no surfaces._",""),`${s.join(`
2
2
  `).trimEnd()}
3
3
  `}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="abb182c9-6d6c-5be4-a2ad-c91b00a098d0")}catch{}})();var X=["agile","ops","research"],Q={agile:[{name:"Story",description:"User-facing outcome or capability slice expressed from a stakeholder perspective.",defaultStatus:"open",folder:"stories",aliases:["user-story"]},{name:"Spike",description:"Time-boxed investigation used to reduce uncertainty before implementation.",defaultStatus:"open",folder:"spikes",aliases:["research-spike"]}],ops:[{name:"Incident",description:"Operational disruption, degradation, or support escalation with recovery tracking.",defaultStatus:"open",folder:"incidents",aliases:["outage"]},{name:"Runbook",description:"Repeatable operational procedure, diagnostic path, or response playbook.",defaultStatus:"open",folder:"runbooks",aliases:["playbook"]}],research:[{name:"Experiment",description:"Validated-learning activity with hypothesis, method, and outcome tracking.",defaultStatus:"open",folder:"experiments",aliases:["study"]},{name:"Hypothesis",description:"Testable claim or assumption that should be supported, rejected, or refined.",defaultStatus:"open",folder:"hypotheses",aliases:["assumption"]}]};function Se(e){if(e===void 0)return;let t=e.trim().toLowerCase().replaceAll("-","_");if(t.length===0)throw new Error("Type preset name must not be empty.");if(t==="agile"||t==="ops"||t==="research")return t;throw new Error(`Invalid type preset "${e}". Allowed: ${X.join(", ")}.`)}function Ae(e){return Q[e].map(t=>T(t))}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1abceae0-299e-5fff-aa8c-46c015115571")}catch{}})();var Z=new Set(v),ee=new Set(E),F=new Set([...k.filter(e=>e!=="severity"),"id","title","type","status","priority","tags","assignee","parent","description","body","created_at","updated_at","closed_at","completed_at","author","deadline","estimate","sprint","release","risk","confidence","reviewer","resolution","expected","actual"]),te=["create","update"];function z(e){if(typeof e!="string")return"";let t=e.trim().toLowerCase().replaceAll(/[\s_]+/g,"-");return t.startsWith("--")?t.slice(2):t}function N(e){return e.replaceAll("_","-")}function re(e,t){let n=new Set;for(let r of e){let o=z(r);o.length>0&&o!==t&&n.add(o)}return[...n].sort((r,o)=>r.localeCompare(o))}function ne(e){let t=new Set;for(let n of e??[]){let r=n.trim();r.length>0&&t.add(r)}return[...t].sort((n,r)=>n.localeCompare(r))}function oe(e){let t=new Set,n=[];for(let r of e??[]){let o=r.trim().toLowerCase();if(o.length!==0){if(!ee.has(o))throw new Error(`Invalid field command "${r}". Allowed: ${E.join(", ")}.`);t.has(o)||(t.add(o),n.push(o))}}return e===void 0||n.length===0?[...te]:n}function je(e){let t=a(e.key);if(t.length===0)throw new Error("Field key must not be empty.");if(t.includes(","))throw new Error(`Field key "${t}" must not contain commas: commas separate field names in list flags such as --unset and --fields.`);if(F.has(t))throw new Error(`Cannot define custom field "${t}": custom schema field "${t}" collides with built-in item metadata "${t}". Rename the custom field with a project-specific prefix. Reserved fields: ${[...F].sort((b,M)=>b.localeCompare(M)).join(", ")}.`);let n=typeof e.type=="string"&&e.type.trim().length>0?e.type.trim().toLowerCase():"string";if(!Z.has(n))throw new Error(`Invalid field type "${e.type}". Allowed: ${v.join(", ")}.`);let r=n,o=oe(e.commands),i=z(e.cliFlag),s=i.length>0&&i!==N(t)?i:void 0,l=s??N(t),d=re(e.aliases??[],l),y=[l,...d].find(b=>b.includes(","));if(y!==void 0)throw new Error(`Field flag "${y}" must not contain commas.`);let _=e.description?.trim();return{key:t,type:r,commands:o,description:_&&_.length>0?_:void 0,cliFlag:s,cliAliases:d,required:e.required===!0,requiredOnCreate:e.requiredOnCreate===!0,allowUnset:e.allowUnset!==!1,requiredTypes:ne(e.requiredTypes)}}function ie(e){if(Array.isArray(e))return e;if(typeof e!="object"||e===null)return;let t=e;if(Array.isArray(t.fields))return t.fields;if(Array.isArray(t.definitions))return t.definitions}function se(e){let t=ie(e);if(!t)return[];let n=[];for(let r of t){if(typeof r!="object"||r===null||Array.isArray(r))continue;let o=r;typeof o.key!="string"||o.key.trim().length===0||n.push(o)}return n}function Ce(e){if(e==null||e.trim().length===0)return{fields:[]};let t;try{t=JSON.parse(e)}catch{throw new Error("schema/fields.json contains invalid JSON.")}return{fields:se(t)}}function De(e){return`${JSON.stringify({fields:e.fields},null,2)}
4
4
  `}function $e(e,t){let n=e.fields.find(s=>a(s.key)===t.key),r=n!==void 0,o=e.fields.filter(s=>a(s.key)!==t.key),i={...n,key:t.key,type:t.type,commands:[...t.commands]};return O(i,"description",t.description),O(i,"cli_flag",t.cliFlag),t.cliAliases.length>0?i.cli_aliases=[...t.cliAliases]:delete i.cli_aliases,L(i,"required",t.required),L(i,"required_on_create",t.requiredOnCreate),t.allowUnset===!1?i.allow_unset=!1:delete i.allow_unset,t.requiredTypes.length>0?i.required_types=[...t.requiredTypes]:delete i.required_types,o.push(i),o.sort((s,l)=>a(s.key).localeCompare(a(l.key))),{file:{fields:o},definition:i,replaced:r}}function Fe(e,t){let n=a(t);if(n.length===0)throw new Error("Field key must not be empty.");let r=[],o=e.fields.filter(i=>a(i.key)===n?(r.push(i),!1):!0);return r.length===0?{file:{fields:o},removed:!1}:{file:{fields:o},removed:!0,definition:r[0]}}function O(e,t,n){let r=e;n!==void 0&&n.length>0?r[t]=n:delete r[t]}function L(e,t,n){let r=e;n?r[t]=!0:delete r[t]}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b1e4c04e-0ade-5d24-95e3-b8dca3832c5a")}catch{}})();var ae=new Set(g),h=new Set(I.map(e=>a(e.id)).filter(e=>e.length>0));function le(e){let t=new Set;for(let n of e){let r=a(n);r.length>0&&t.add(r)}return[...t].sort((n,r)=>n.localeCompare(r))}function Pe(e){let t=a(e.id);if(t.length===0)throw new Error("Status id must not be empty.");if(h.has(t))throw new Error(`Cannot add-status the built-in status "${t}". Built-in statuses are reserved: ${[...h].join(", ")}.`);let n;if(e.roles!==void 0){n=[];let s=new Set;for(let l of e.roles){let d=typeof l=="string"?l.trim().toLowerCase():"";if(d.length!==0){if(!ae.has(d))throw new Error(`Invalid status role "${l}". Allowed roles: ${g.join(", ")}.`);s.has(d)||(s.add(d),n.push(d))}}if(n.length===0)throw new Error(`Status role must include at least one lifecycle role. Allowed roles: ${g.join(", ")}.`)}let r=e.aliases===void 0?void 0:le(e.aliases).filter(s=>s!==t),o=e.description?.trim(),i=typeof e.order=="number"&&Number.isFinite(e.order)?Math.trunc(e.order):void 0;return{id:t,roles:n,aliases:r,description:o&&o.length>0?o:void 0,order:i}}function de(e){if(Array.isArray(e))return e;if(typeof e!="object"||e===null)return;let t=e;if(Array.isArray(t.statuses))return t.statuses;if(Array.isArray(t.definitions))return t.definitions}function ce(e){let t=de(e);if(!t)return[];let n=[];for(let r of t){if(typeof r!="object"||r===null||Array.isArray(r))continue;let o=r;typeof o.id!="string"||o.id.trim().length===0||n.push(o)}return n}function Ue(e){if(e==null||e.trim().length===0)return{statuses:[]};let t;try{t=JSON.parse(e)}catch{throw new Error("schema/statuses.json contains invalid JSON.")}return{statuses:ce(t)}}function Re(e){return`${JSON.stringify({statuses:e.statuses},null,2)}
5
5
  `}function qe(e,t,n){let r=e.statuses.slice(),o=r.findIndex(l=>a(l.id)===t.id),i=o>=0?r[o]:n,s={...i,id:t.id};return t.roles!==void 0&&(t.roles.length>0?s.roles=[...t.roles]:s.roles!==void 0&&delete s.roles),t.aliases!==void 0&&(t.aliases.length>0?s.aliases=[...t.aliases]:s.aliases!==void 0&&delete s.aliases),t.description!==void 0&&(s.description=t.description),t.order!==void 0&&(s.order=t.order),o>=0?r[o]=s:r.push(s),{file:{statuses:r},definition:s,replaced:i!==void 0}}function Ge(e,t){let n=a(t);if(n.length===0)throw new Error("Status id must not be empty.");if(h.has(n))throw new Error(`Cannot remove built-in status "${n}". Built-in statuses are reserved: ${[...h].join(", ")}.`);let r=e.statuses.slice(),o=r.findIndex(s=>a(s.id)===n);if(o<0)return{file:{statuses:r},removed:!1};let[i]=r.splice(o,1);return{file:{statuses:r},removed:!0,definition:i}}function Je(e,t){let n=[e.id,...e.aliases??[]];for(let r of n){let o=a(r);if(o.length===0)continue;let i=t.get(o);if(i!==void 0&&i!==e.id)throw new Error(`Status token "${o}" already belongs to status "${i}". Choose a different id/alias to avoid shadowing it.`)}}export{P as a,U as b,Y as c,he as d,X as e,Q as f,Se as g,Ae as h,je as i,Ce as j,De as k,$e as l,Fe as m,h as n,Pe as o,Ue as p,Re as q,qe as r,Ge as s,Je as t,be as u};
6
- //# sourceMappingURL=chunk-UBBTBNUY.js.map
6
+ //# sourceMappingURL=chunk-DWCFZVT2.js.map
@@ -1,4 +1,4 @@
1
- import{f as $,i as h,j as le,k as ce,l as de,o as g,p as pe,q as me,r as fe}from"./chunk-UBBTBNUY.js";import{_ as ye,a as ee,b as te}from"./chunk-KRNF3WTC.js";import{c as y,f as se,g as ie,i as ae}from"./chunk-6E4X7MQA.js";import{B as ne,F as oe,fb as re}from"./chunk-BEHIMEV2.js";import{a as k,d as ue}from"./chunk-5WQ3LNUK.js";import{F as J,J as Q,K as E,Tb as Z,Ub as L,Vb as D,Wb as x,bb as C,fa as I,g as H}from"./chunk-3WVMEA2A.js";import{A as m,a as U,e as V,f as X,g as G,i as Y,z as p}from"./chunk-PDXSMSO5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d449d43b-5192-58dc-bdc0-0ec5e8922353")}catch{}})();var Pt=U,qt=V,jt=Y,zt=X,Kt=G;function he(e,t,n,r){let o=e.flag.slice(2).replace(/[-_]([a-z])/gu,(i,a)=>a.toUpperCase()),s=n.has(o);return{long:t,...r?{short:r}:{},description:e.description??`Standard pm ${e.flag} option.`,...e.required===!0?{required:!0}:{},...e.list===!0?{list:!0}:{},...e.repeatable===!0?{repeatable:!0}:{},value_type:s?"string":"boolean",...s?{value_name:e.value_name??"value"}:{}}}function ge(e,t=[]){let n=new Set(t.flatMap(o=>o.keys)),r=[];for(let o of ne(e.map(s=>({...s})))){r.push(he(o,o.flag,n,o.short));for(let s of o.aliases??[])r.push(he(o,s,n))}return r}var Wt=ge(oe,ee),Bt=ge(re,te);(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="59d16a38-d6df-5695-96e3-28b6e384f76b")}catch{}})();var b=["agile","ops","research"],R={agile:{name:"agile",title:"Agile delivery",summary:"Story/Spike delivery with a review stage, story points, and acceptance ownership.",types:$.agile,statuses:[{id:"review",roles:["active"],aliases:["in-review"],description:"Work is implementation-complete and awaiting peer review."}],fields:[{key:"story_points",type:"number",commands:["create","update","list"],description:"Relative estimation size for a story or spike.",aliases:["points"]},{key:"acceptance_owner",type:"string",commands:["create","update","list"],description:"Stakeholder accountable for accepting the delivered story.",aliases:["acceptor"]}],workflows:[{type:"Story",allowed_transitions:[["open","in_progress"],["in_progress","review"],["review","in_progress"],["review","closed"],["in_progress","blocked"],["blocked","in_progress"]]}],config:[{key:"search_provider",value:"bm25",summary:"Offline BM25 lexical search works without an embedding service."},{key:"search_max_results",value:"20",summary:"Sprint-sized result cap for quick triage."}],templates:[{name:"story",options:{type:"Story",priority:"2",tags:"story",acceptanceCriteria:"Story delivers the stated user outcome with tests and docs updated.",body:`## As a
1
+ import{f as $,i as h,j as le,k as ce,l as de,o as g,p as pe,q as me,r as fe}from"./chunk-DWCFZVT2.js";import{_ as ye,a as ee,b as te}from"./chunk-FPPYE6CY.js";import{c as y,f as se,g as ie,i as ae}from"./chunk-T3NMYMW4.js";import{B as ne,F as oe,fb as re}from"./chunk-ICEHI4SN.js";import{$a as C,F as J,J as Q,K as E,Ob as Z,Pb as L,Qb as D,Rb as x,cc as k,fa as I,fc as ue,g as H}from"./chunk-A2CLYPDA.js";import{A as m,a as U,e as V,f as X,g as G,i as Y,z as p}from"./chunk-IXYBN6D2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d449d43b-5192-58dc-bdc0-0ec5e8922353")}catch{}})();var Pt=U,qt=V,jt=Y,zt=X,Kt=G;function he(e,t,n,r){let o=e.flag.slice(2).replace(/[-_]([a-z])/gu,(i,a)=>a.toUpperCase()),s=n.has(o);return{long:t,...r?{short:r}:{},description:e.description??`Standard pm ${e.flag} option.`,...e.required===!0?{required:!0}:{},...e.list===!0?{list:!0}:{},...e.repeatable===!0?{repeatable:!0}:{},value_type:s?"string":"boolean",...s?{value_name:e.value_name??"value"}:{}}}function ge(e,t=[]){let n=new Set(t.flatMap(o=>o.keys)),r=[];for(let o of ne(e.map(s=>({...s})))){r.push(he(o,o.flag,n,o.short));for(let s of o.aliases??[])r.push(he(o,s,n))}return r}var Wt=ge(oe,ee),Bt=ge(re,te);(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="59d16a38-d6df-5695-96e3-28b6e384f76b")}catch{}})();var b=["agile","ops","research"],R={agile:{name:"agile",title:"Agile delivery",summary:"Story/Spike delivery with a review stage, story points, and acceptance ownership.",types:$.agile,statuses:[{id:"review",roles:["active"],aliases:["in-review"],description:"Work is implementation-complete and awaiting peer review."}],fields:[{key:"story_points",type:"number",commands:["create","update","list"],description:"Relative estimation size for a story or spike.",aliases:["points"]},{key:"acceptance_owner",type:"string",commands:["create","update","list"],description:"Stakeholder accountable for accepting the delivered story.",aliases:["acceptor"]}],workflows:[{type:"Story",allowed_transitions:[["open","in_progress"],["in_progress","review"],["review","in_progress"],["review","closed"],["in_progress","blocked"],["blocked","in_progress"]]}],config:[{key:"search_provider",value:"bm25",summary:"Offline BM25 lexical search works without an embedding service."},{key:"search_max_results",value:"20",summary:"Sprint-sized result cap for quick triage."}],templates:[{name:"story",options:{type:"Story",priority:"2",tags:"story",acceptanceCriteria:"Story delivers the stated user outcome with tests and docs updated.",body:`## As a
2
2
 
3
3
  ## I want
4
4
 
@@ -23,4 +23,4 @@ import{f as $,i as h,j as le,k as ce,l as de,o as g,p as pe,q as me,r as fe}from
23
23
 
24
24
  ## Conclusion
25
25
  `}}],packages:[{spec:"search-advanced",reason:"Semantic retrieval over experiments and findings."},{spec:"templates",reason:"Consistent experiment and hypothesis scaffolds."},{spec:"beads",reason:"Import structured prior work into the tracker."}]}};function Me(e){if(e===void 0)return;let t=f(e);if(t.length===0)throw new Error("Profile name must not be empty.");if(b.includes(t))return t;throw new Error(`Invalid profile "${e}". Allowed: ${b.join(", ")}.`)}function Xt(e){let t=Me(e);if(t===void 0)throw new Error(`Profile name is required. Allowed: ${b.join(", ")}.`);return R[t]}function Gt(){return b.map(e=>R[e])}function f(e){return e.trim().toLowerCase().replaceAll("-","_")}function _e(e){return e.map(t=>t.definition.name).join(", ")}function Pe(e=[]){let t=b.map(s=>({definition:R[s],source:"builtin"})),n=new Set(b.map(s=>f(s))),r=new Set(n),o=[];for(let s of e){let i=f(s.profile.name);if(n.has(i)){o.push(`Extension "${s.name}" profile "${s.profile.name}" uses a name reserved by a built-in archetype and was ignored.`);continue}if(r.has(i)){o.push(`Profile "${s.profile.name}" from extension "${s.name}" duplicates an already-registered profile and was ignored.`);continue}r.add(i),t.push({definition:s.profile,source:"extension",package:s.name})}return{profiles:t,warnings:o}}function Yt(e,t=[]){let{profiles:n,warnings:r}=Pe(t);if(typeof e!="string"||e.trim().length===0)throw new Error(`Profile name is required. Allowed: ${_e(n)}.`);let o=f(e),s=n.find(i=>f(i.definition.name)===o);if(s===void 0)throw new Error(`Invalid profile "${e}". Allowed: ${_e(n)}.`);return{resolved:s,warnings:r}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ab26bcb3-fb2a-5f2f-96e7-7965787b924e")}catch{}})();function qe(e){return{types:e.types.length,statuses:e.statuses.length,fields:e.fields.length,workflows:e.workflows.length,config:e.config.length,templates:e.templates.length,packages:e.packages.length}}function en(e){return{name:e.name,title:e.title,summary:e.summary,composition:qe(e),types:e.types.map(t=>F(()=>y(t).name,()=>String(t.name??""))),statuses:e.statuses.map(t=>F(()=>g(t).id,()=>String(t.id??""))),fields:e.fields.map(t=>F(()=>h(t).key,()=>String(t.key??""))),workflows:e.workflows.map(t=>t.type),config:e.config.map(t=>`${t.key}=${t.value}`),templates:e.templates.map(t=>t.name),packages:e.packages.map(t=>({spec:t.spec,reason:t.reason}))}}function F(e,t){try{return e()}catch{return t()}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="42c9df66-4303-5d06-b931-0a276894e5e5")}catch{}})();var je=[{key:"context_default_depth",path:"context.default_depth",kind:"string",choices:J,summary:"Default context depth."},{key:"context_activity_limit",path:"context.activity_limit",kind:"integer",min:1,max:Number.MAX_SAFE_INTEGER,decimal_only:!0,summary:"Default context activity row limit; positive decimal integer."},{key:"context_stale_threshold_days",path:"context.stale_threshold_days",kind:"integer",min:1,max:Number.MAX_SAFE_INTEGER,decimal_only:!0,summary:"Days before context marks an item stale; positive decimal integer."},...["hierarchy","activity","progress","recently_created","unparented","blockers","files","workload","staleness","tests"].map(e=>({key:`context_sections_${e}`,path:`context.sections.${e}`,kind:"boolean",summary:`Include ${e} in default context output.`})),{key:"context_next_ranking_policy",path:"context.next_ranking_policy",kind:"string",choices:["priority_floor","weighted"],summary:"Ready-queue order for pm next with the built-in scorer: priority_floor (resume in-progress work, then priority tiers, relevance within a tier) or weighted (blended relevance order). An extension context_relevance scorer keeps its own order."},{key:"search_provider",path:"search.provider",kind:"string",summary:"Search embedding provider name (e.g. openai, ollama, or an extension provider)."},{key:"search_default_mode",path:"search.default_mode",kind:"string",choices:["auto","keyword","semantic","hybrid"],summary:"Mode a bare pm search runs in: auto (hybrid when semantic search is explicitly configured and runnable, else keyword), or a pinned keyword, semantic, or hybrid."},{key:"search_mutation_refresh_policy",path:"search.mutation_refresh_policy",kind:"string",choices:["cache_only","semantic_configured","semantic_auto"],summary:"Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto."},{key:"search_query_expansion_enabled",path:"search.query_expansion.enabled",kind:"boolean",summary:"Enable or disable query expansion for semantic/hybrid search."},{key:"search_query_expansion_provider",path:"search.query_expansion.provider",kind:"string",summary:"Query expansion provider name (built-in openai/ollama or extension provider)."},{key:"search_rerank_enabled",path:"search.rerank.enabled",kind:"boolean",summary:"Enable or disable post-retrieval reranking for hybrid search."},{key:"search_rerank_model",path:"search.rerank.model",kind:"string",summary:"Rerank model name override used by built-in providers."},{key:"search_rerank_top_k",path:"search.rerank.top_k",kind:"integer",min:1,summary:"Number of top hybrid candidates to rerank when rerank is enabled."},{key:"search_embedding_model",path:"search.embedding_model",kind:"string",summary:"Default embedding model name (overrides provider-specific model when set)."},{key:"search_embedding_corpus_max_characters",path:"search.embedding_corpus_max_characters",kind:"integer",min:1,summary:"Maximum semantic corpus characters per item before truncation."},{key:"search_embedding_batch_size",path:"search.embedding_batch_size",kind:"integer",min:1,summary:"Number of items embedded per request batch."},{key:"search_embedding_timeout_ms",path:"search.embedding_timeout_ms",kind:"integer",min:1,summary:"Per-request embedding timeout in milliseconds."},{key:"search_score_threshold",path:"search.score_threshold",kind:"number",summary:"Minimum score for a hit to be returned (0 keeps all matches)."},{key:"search_hybrid_semantic_weight",path:"search.hybrid_semantic_weight",kind:"ratio",summary:"Hybrid mode semantic weight in [0, 1] (1-weight goes to keyword)."},{key:"search_max_results",path:"search.max_results",kind:"integer",min:1,summary:"Default upper bound on search hits when --limit is not supplied."},{key:"search_bm25_k1",path:"search.bm25.k1",kind:"number",min:0,summary:"Offline BM25 term-frequency saturation (k1); higher saturates repeated terms slower (default 1.2)."},{key:"search_bm25_b",path:"search.bm25.b",kind:"ratio",summary:"Offline BM25 document-length normalization (b) in [0, 1]; 0 disables, 1 fully normalizes (default 0.75)."},{key:"openai_base_url",path:"providers.openai.base_url",kind:"string",summary:"OpenAI-compatible API base URL (LM Studio/vLLM also use this)."},{key:"openai_api_key",path:"providers.openai.api_key",kind:"string",summary:"OpenAI-compatible API key."},{key:"openai_model",path:"providers.openai.model",kind:"string",summary:"OpenAI-compatible embedding model name."},{key:"ollama_base_url",path:"providers.ollama.base_url",kind:"string",summary:"Ollama API base URL (typically http://localhost:11434)."},{key:"ollama_model",path:"providers.ollama.model",kind:"string",summary:"Ollama embedding model name (e.g. nomic-embed-text)."},{key:"vector_store_adapter",path:"vector_store.adapter",kind:"string",summary:"Vector store adapter name (lancedb, qdrant, or an extension adapter)."},{key:"vector_store_collection_name",path:"vector_store.collection_name",kind:"string",non_empty:!0,summary:"Vector collection/table name shared by Qdrant and LanceDB adapters."},{key:"qdrant_url",path:"vector_store.qdrant.url",kind:"string",summary:"Qdrant HTTP API URL."},{key:"qdrant_api_key",path:"vector_store.qdrant.api_key",kind:"string",summary:"Qdrant API key (empty if running unauthenticated)."},{key:"lancedb_path",path:"vector_store.lancedb.path",kind:"string",summary:"LanceDB storage path (relative to pm root or absolute)."},{key:"id_prefix",path:"id_prefix",kind:"string",non_empty:!0,summary:'Prefix for generated item IDs (e.g. "pm" produces pm-xxxx).'},{key:"author_default",path:"author_default",kind:"string",non_empty:!0,summary:"Default author recorded on mutations when --author is not supplied."},{key:"agent_identity_probes_enabled",path:"agent_identity.probes_enabled",kind:"boolean",summary:"Allow privacy-bounded local harness provenance probes; no network or subprocess access is permitted."},{key:"mutation_guard_require_attributed_author",path:"mutation_guard.require_attributed_author",kind:"boolean",summary:"Reject mutations whose effective author resolves to unknown."},{key:"mutation_guard_secret_guard",path:"mutation_guard.secret_guard",kind:"string",choices:["off","advise","block"],summary:"Detect credential-shaped mutation content: off, advise, or block."},{key:"mutation_guard_stale_in_progress_hours",path:"mutation_guard.stale_in_progress_hours",kind:"integer",min:1,summary:"Age threshold for unclaimed in-progress work surfaced by health."},{key:"governance_duplicate_detection_mode",path:"governance.duplicate_detection_mode",kind:"string",choices:["off","advisory","strict"],summary:"Create/copy duplicate governance: off, advisory, or strict explicit-bypass enforcement."},{key:"governance_duplicate_detection_threshold",path:"governance.duplicate_detection_threshold",kind:"ratio",summary:"Minimum shared similarity score in [0, 1] for create/copy duplicate governance."},{key:"governance_duplicate_detection_limit",path:"governance.duplicate_detection_limit",kind:"integer",min:0,max:20,summary:"Maximum likely duplicates returned by create/copy governance (0-20)."},{key:"output_default_format",path:"output.default_format",kind:"string",choices:["toon","json"],summary:"Default output format for commands that support it: toon or json."},{key:"ux_deprecation_hints",path:"ux.deprecation_hints",kind:"boolean",summary:"Emit one stderr migration hint for deprecated command aliases."},{key:"locks_ttl_seconds",path:"locks.ttl_seconds",kind:"integer",min:1,summary:"Claim/lock time-to-live in seconds before a stale lock can be reclaimed."},{key:"locks_wait_ms",path:"locks.wait_ms",kind:"integer",min:0,summary:"Wait budget in milliseconds before a contended lock fails with lock_conflict; item-store mutations, restore and the hierarchy lock treat it as a no-progress window that each observed owner handoff restarts (120 s total cap), other locks as a fixed total; 0 fails fast. PM_LOCK_WAIT_MS overrides per invocation."},{key:"ids_token_length",path:"ids.token_length",kind:"integer",min:4,max:12,summary:"Random base36 token length for newly minted item ids (4-12, default 4). Raise it to shrink cross-branch id collision odds in concurrent multi-agent workflows (pm-pibw)."},{key:"checkpoints_retention_days",path:"checkpoints.retention_days",kind:"integer",min:1,summary:"Age in days above which pm gc --scope checkpoints prunes bulk-mutation rollback checkpoints."},{key:"schema_unknown_field_policy",path:"schema.unknown_field_policy",kind:"string",choices:["allow","warn","reject"],summary:"How item I/O handles metadata keys not in the field registry: allow, warn, or reject."},{key:"history_compact_policy_enabled",path:"history.compact_policy.enabled",kind:"boolean",summary:"Enable the history-compaction advisory: pm health warns on over-threshold streams."},{key:"history_compact_policy_max_entries",path:"history.compact_policy.max_entries",kind:"integer",min:1,summary:"Entry count above which a history stream is flagged (and the default pm history-compact --all-over threshold)."},{key:"history_compact_policy_trigger",path:"history.compact_policy.trigger",kind:"string",choices:["health_warn","auto"],summary:"History-compaction policy intent: health_warn (advisory only) or auto (scheduled sweeps expected)."}],ze=new Map(je.flatMap(e=>[[e.key,e],[e.path.toLowerCase().replaceAll("-","_"),e]]));function A(e){if(typeof e!="string")return;let t=e.trim().toLowerCase().replaceAll("-","_");if(t.length!==0)return ze.get(t)}function Ke(e,t){let n=t.trim().toLowerCase();return n==="true"||n==="1"||n==="yes"||n==="on"?{ok:!0,parsed:{descriptor:e,value:!0}}:n==="false"||n==="0"||n==="no"||n==="off"?{ok:!0,parsed:{descriptor:e,value:!1}}:{ok:!1,error:{message:`Config set ${e.key} requires a boolean value (true|false), got "${t}"`}}}function We(e,t,n){return e.key==="context_default_depth"&&(n=n.toLowerCase()),e.non_empty===!0&&n.length===0?{ok:!1,error:{message:`Config set ${e.key} requires a non-empty value`}}:e.choices&&!e.choices.includes(n)?{ok:!1,error:{message:`Config set ${e.key} must be one of ${e.choices.join("|")}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function ke(e,t){let n=[e.min===void 0?"":`minimum ${e.min}`,e.max===void 0?"":`maximum ${e.max}`].filter(Boolean).join(", ");return{message:`Config set ${e.key} requires non-empty decimal integer digits${n?` (${n})`:""}, got "${t}"`}}function Be(e,t,n){if(e.decimal_only&&!/^\d+$/u.test(n))return{ok:!1,error:ke(e,t)};if(n.length===0)return{ok:!1,error:{message:`Config set ${e.key} requires a non-empty value`}};let r=Number(n);return Number.isFinite(r)?{ok:!0,value:r}:{ok:!1,error:e.decimal_only?ke(e,t):{message:`Config set ${e.key} requires a finite number, got "${t}"`}}}function Ue(e,t,n){return!Number.isInteger(n)||n<0?{ok:!1,error:{message:`Config set ${e.key} requires a non-negative integer, got "${t}"`}}:e.min!==void 0&&n<e.min?{ok:!1,error:{message:`Config set ${e.key} requires an integer >= ${e.min}, got "${t}" (the runtime silently ignores 0 here and falls back to the default)`}}:e.max!==void 0&&n>e.max?{ok:!1,error:{message:`Config set ${e.key} requires an integer <= ${e.max}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function Ve(e,t,n){return n<0||n>1?{ok:!1,error:{message:`Config set ${e.key} requires a number in [0, 1], got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function Xe(e,t,n){return e.min!==void 0&&n<e.min?{ok:!1,error:{message:`Config set ${e.key} requires a number >= ${e.min}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function T(e,t){if(typeof t!="string")return{ok:!1,error:{message:`Config set ${e.key} requires a string value`}};let n=t.trim();if(e.kind==="boolean")return Ke(e,t);if(e.kind==="string")return We(e,t,n);let r=Be(e,t,n);return r.ok?e.kind==="integer"?Ue(e,t,r.value):e.kind==="ratio"?Ve(e,t,r.value):Xe(e,t,r.value):{ok:!1,error:r.error}}function be(e,t){let n=t.path.split("."),r=e;for(let o of n){if(typeof r!="object"||r===null)return null;let s=Object.getOwnPropertyDescriptor(r,o);if(!s||!Object.hasOwn(s,"value"))return null;r=s.value}return typeof r=="string"||typeof r=="number"||typeof r=="boolean"?r:null}function on(e,t,n){let r=t.path.split(".");if(r.some(i=>i.length===0||["__proto__","constructor","prototype"].includes(i)))throw new Error("Unsafe settings path");let o=e;for(let i=0;i<r.length-1;i+=1){let a=r[i],c=Object.getOwnPropertyDescriptor(o,a)?.value;if(typeof c!="object"||c===null||Array.isArray(c)){let d={};Object.defineProperty(o,a,{value:d,writable:!0,enumerable:!0,configurable:!0}),o=d}else o=c}let s=r[r.length-1];return Object.getOwnPropertyDescriptor(o,s)?.value===n?!1:(Object.defineProperty(o,s,{value:n,writable:!0,enumerable:!0,configurable:!0}),!0)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0b04624c-2096-55dc-9dde-b8c76ead72d6")}catch{}})();var hn=["profile","types","statuses","fields","workflows","config","templates","packages"],gn=["profile_name_empty","profile_name_not_normalized","profile_title_empty","profile_summary_empty","type_invalid","type_duplicate","status_invalid","status_duplicate","field_invalid","field_duplicate","field_mcp_input_collision","workflow_type_empty","workflow_type_unknown","workflow_duplicate_type","workflow_transition_malformed","workflow_status_unknown","config_key_unknown","config_value_invalid","config_duplicate","template_type_unknown","package_spec_empty"],Ge=new Set(ue.flatMap(e=>[k(e.id),...(e.aliases??[]).map(t=>k(t))]).filter(e=>e.length>0)),we=new Set(H.map(e=>e.toLowerCase()));function Ye(e,t){e.name.trim().length===0?t.push({severity:"error",code:"profile_name_empty",dimension:"profile",message:"Profile name must not be empty; profile resolution requires a non-blank name."}):e.name!==f(e.name)&&t.push({severity:"warning",code:"profile_name_not_normalized",dimension:"profile",target:e.name,message:`Profile name "${e.name}" is not in canonical form; resolution folds it to "${f(e.name)}" (lowercase, hyphens as underscores).`}),e.title.trim().length===0&&t.push({severity:"warning",code:"profile_title_empty",dimension:"profile",message:"Profile title is empty; list and show surfaces will render a blank title."}),e.summary.trim().length===0&&t.push({severity:"warning",code:"profile_summary_empty",dimension:"profile",message:"Profile summary is empty; list and show surfaces will render a blank archetype description."})}function He(e,t){let n=new Set,r=new Set;for(let[o,s]of e.types.entries()){let i;try{i=y(s).name}catch(c){t.push({severity:"error",code:"type_invalid",dimension:"types",target:typeof s.name=="string"?s.name:`#${o}`,message:I(c)});continue}let a=i.toLowerCase();if(r.has(a)){t.push({severity:"error",code:"type_duplicate",dimension:"types",target:i,message:`Item type "${i}" is declared more than once; the later definition silently overwrites the earlier upsert.`});continue}r.add(a),n.add(a)}return n}function Je(e,t){let n=new Set,r=new Set;for(let[o,s]of e.statuses.entries()){let i;try{i=g(s)}catch(a){t.push({severity:"error",code:"status_invalid",dimension:"statuses",target:typeof s.id=="string"?s.id:`#${o}`,message:I(a)});continue}if(r.has(i.id)){t.push({severity:"error",code:"status_duplicate",dimension:"statuses",target:i.id,message:`Status "${i.id}" is declared more than once; the later definition silently overwrites the earlier upsert.`});continue}r.add(i.id),n.add(i.id);for(let a of i.aliases??[])n.add(k(a))}return n}function Qe(e,t){let n=new Set;for(let[r,o]of e.fields.entries()){let s;try{s=h(o).key}catch(a){t.push({severity:"error",code:"field_invalid",dimension:"fields",target:typeof o.key=="string"?o.key:`#${r}`,message:I(a)});continue}if(n.has(s)){t.push({severity:"error",code:"field_duplicate",dimension:"fields",target:s,message:`Field "${s}" is declared more than once; the later definition silently overwrites the earlier upsert.`});continue}n.add(s);let i=ye(s);i&&t.push({severity:"warning",code:"field_mcp_input_collision",dimension:"fields",target:s,message:`Field "${s}" collides with canonical MCP property "${i.property}" owned by ${i.owner}; callers must pass the custom value through ${i.nested_path}.`})}}function Ze(e,t,n,r){let o=new Set;for(let[s,i]of e.workflows.entries()){let a=i.type.trim().toLowerCase();if(a.length===0){r.push({severity:"error",code:"workflow_type_empty",dimension:"workflows",target:`#${s}`,message:"Workflow has an empty type; the workflow resolver drops entries without a type."});continue}let c=o.has(a);o.add(a),c?r.push({severity:"warning",code:"workflow_duplicate_type",dimension:"workflows",target:i.type,message:`Workflow type "${i.type}" is declared more than once; the later transition set wins.`}):!we.has(a)&&!t.has(a)&&r.push({severity:"warning",code:"workflow_type_unknown",dimension:"workflows",target:i.type,message:`Workflow governs type "${i.type}" which is neither a built-in type nor declared by this profile; it has no effect unless that type already exists.`});let d=new Set;for(let l of i.allowed_transitions){let u=k(l[0]),B=k(l[1]);if(u.length===0||B.length===0){r.push({severity:"error",code:"workflow_transition_malformed",dimension:"workflows",target:i.type,message:`Workflow "${i.type}" has a transition with an empty status; the workflow resolver silently drops it.`});continue}for(let _ of[u,B])Ge.has(_)||n.has(_)||d.has(_)||(d.add(_),r.push({severity:"warning",code:"workflow_status_unknown",dimension:"workflows",target:_,message:`Workflow "${i.type}" references status "${_}" which is neither a built-in status nor declared by this profile; transitions to or from it are unreachable.`}))}}}function et(e,t){let n=new Set;for(let r of e.config){let o=A(r.key);if(o===void 0){t.push({severity:"error",code:"config_key_unknown",dimension:"config",target:r.key,message:`Config knob "${r.key}" is not a recognized setting; apply rejects it with a usage error.`});continue}n.has(o.key)?t.push({severity:"error",code:"config_duplicate",dimension:"config",target:o.key,message:`Config knob "${o.key}" is set more than once; the later value silently overwrites the earlier one.`}):n.add(o.key);let s=T(o,r.value);s.ok||t.push({severity:"error",code:"config_value_invalid",dimension:"config",target:r.key,message:s.error.message})}}function tt(e,t,n){for(let r of e.templates){let o=r.options.type;if(typeof o!="string"||o.trim().length===0)continue;let s=o.trim().toLowerCase();!we.has(s)&&!t.has(s)&&n.push({severity:"warning",code:"template_type_unknown",dimension:"templates",target:r.name,message:`Template "${r.name}" creates type "${o}" which is neither a built-in type nor declared by this profile.`})}}function nt(e,t){for(let[n,r]of e.packages.entries())r.spec.trim().length===0&&t.push({severity:"warning",code:"package_spec_empty",dimension:"packages",target:`#${n}`,message:"Package recommendation has an empty spec; it cannot be surfaced as an install hint."})}function _n(e){let t=[];Ye(e,t);let n=He(e,t),r=Je(e,t);Qe(e,t),Ze(e,n,r,t),et(e,t),tt(e,n,t),nt(e,t);let o=t.filter(i=>i.severity==="error").length,s=t.length-o;return{profile:e.name,ok:o===0,findings:t,errorCount:o,warningCount:s}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="be2b507d-2797-570c-b211-46d950edcbde")}catch{}})();function M(e,t,n,r,o){let s=e,i=[];for(let a of t){let c=r(s),d=o(s,a),l=r(d.file);s=d.file;let u=c===l?"unchanged":d.replaced?"update":"add";i.push({key:n(a),status:u})}return{file:s,changes:i,changed:i.some(a=>a.status!=="unchanged")}}function ve(e){return JSON.stringify(e.map(t=>t.join("\0")).sort())}function ot(e,t){let n=e.map(o=>({...o})),r=[];for(let o of t){let s=n.findIndex(a=>a.type===o.type),i={type:o.type,allowed_transitions:o.allowed_transitions};s<0?(n.push(i),r.push({type:o.type,status:"add"})):ve(n[s].allowed_transitions)===ve(o.allowed_transitions)?r.push({type:o.type,status:"unchanged"}):(n[s]=i,r.push({type:o.type,status:"update"}))}return{changes:r,result:n,changed:r.some(o=>o.status!=="unchanged")}}function rt(e,t){let n=[];for(let r of e.config){let o=A(r.key);if(o===void 0)throw new Error(`Profile "${e.name}" references unknown config key "${r.key}".`);let s=T(o,r.value);if(!s.ok)throw new Error(`Profile "${e.name}" config ${r.key}: ${s.error.message}`);let i=be(t,o),a=i===null?"add":i===s.parsed.value?"unchanged":"update";n.push({key:o.key,path:o.path,value:s.parsed.value,status:a})}return{changes:n,changed:n.some(r=>r.status!=="unchanged")}}function Se(e){let t=Object.entries(e).sort(([n],[r])=>n.localeCompare(r));return JSON.stringify(t)}function st(e,t){let n=[];for(let r of e.templates){let o=t.get(r.name),s;o===void 0?s="add":Se(o)===Se(r.options)?s="unchanged":s="update",n.push({name:r.name,options:r.options,status:s})}return{changes:n,changed:n.some(r=>r.status!=="unchanged")}}function On(e,t){let n=M(se(t.typesRaw),e.types,l=>y(l).name,ae,(l,u)=>ie(l,y(u))),r=M(pe(t.statusesRaw),e.statuses,l=>g(l).id,me,(l,u)=>fe(l,g(u))),o=M(le(t.fieldsRaw),e.fields,l=>h(l).key,ce,(l,u)=>de(l,h(u))),s=ot(t.workflows,e.workflows),i=rt(e,t.settings),a=st(e,t.templates),c=e.packages.map(l=>({spec:l.spec,reason:l.reason,status:t.installedPackages.has(l.spec)?"installed":"recommended"})),d=n.changed||r.changed||o.changed||s.changed||i.changed||a.changed;return{profile:{name:e.name,title:e.title,summary:e.summary},types:n,statuses:r,fields:o,workflows:s,config:i,templates:a,packages:c,changed:d}}import{isDeepStrictEqual as it}from"node:util";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ab4e2ed3-e7e8-5a7a-a13e-7b8dce750dc4")}catch{}})();var at=new Set(["__proto__","prototype","constructor"]),$e=Symbol("looseOptionOccurrences");function w(e){return e.trim().toLowerCase().replaceAll(/-([a-z0-9])/g,(t,n)=>n.toUpperCase())}function P(e){return at.has(e)}function Ae(e){let t=(typeof e.value_type=="string"?e.value_type:void 0)??(typeof e.type=="string"?e.type:void 0);return Z(t)}function Te(e){let t=[],n=E(e.long)??"",r=typeof e.short=="string"?e.short.trim():"";if(n.startsWith("--")){let o=w(n.slice(2));o.length>0&&!P(o)&&t.push(o)}if(r.startsWith("-")&&!r.startsWith("--")){let o=w(r.slice(1));o.length>0&&!P(o)&&t.push(o)}return[...new Set(t)]}function S(e){let t=E(e.long)??"";if(t.startsWith("--")){let n=w(t.slice(2));if(n.length>0&&!P(n))return n}return Te(e)[0]??null}function O(e){let t=E(e.long)??"";if(t.startsWith("--")&&t.length>2)return t;let n=typeof e.short=="string"?e.short.trim():"";return n.startsWith("-")&&!n.startsWith("--")&&n.length>1?n:null}function lt(e,t){return[...(t.definitions??e).map(n=>O(n)).filter(n=>n!==null),...t.inheritedFlags??[]]}function ct(e,t,n,r){let o=r.length>0?` Expected one of: ${[...new Set(r)].join(", ")}.`:"";throw new m(`Unknown option '${e}' for extension command '${n}'.${o}`,p.USAGE,{code:"unknown_option",flag:t,required:`Use a flag the command accepts; run pm contracts --command ${n} --flags-only --json to list them.`})}function dt(e,t){throw new m(`Option '${e}' is disabled for extension command '${t}'.`,p.USAGE,{code:"extension_option_disabled",flag:e,required:`Remove ${e}; the command declares it with enabled: false.`,why:"A disabled declaration keeps the flag in the contract while refusing every value for it.",examples:[`pm ${t} --help`],nextSteps:[`Run pm contracts --command ${t} --flags-only --json to list the flags this command accepts.`]})}function ut(e,t,n,r){let o=L(e),s=o.value_arity==="none"?n:o.value_arity==="optional"?`${n} [${o.value_name}]`:`${n} <${o.value_name}>`;throw new m(`Missing required option '${n}' for extension command '${r}'.`,p.USAGE,{code:"missing_required_option",flag:n,field:t,required:`Pass ${s}.`,why:"The command declares this flag as required, so pm refuses the invocation before the extension handler runs.",examples:[`pm ${r} ${s}`],nextSteps:[`Run pm contracts --command ${r} --flags-only --json to read each flag's sdk_option key.`],recovery:{missing:[n]}})}function pt(e){return typeof e=="string"||e==null?e:String(e)}function mt(e){if(typeof e=="number")return e;if(typeof e=="string"&&e.trim().length>0){let t=Number(e);return Number.isFinite(t)?t:e}return e}function Ne(e){if(typeof e=="boolean")return e;if(typeof e=="string"){let t=e.trim().toLowerCase();if(t==="true"||t==="1")return!0;if(t==="false"||t==="0")return!1}return e}var ft={string:pt,number:mt,boolean:Ne};function v(e,t){return Array.isArray(e)?e.map(n=>v(n,t)):ft[t](e)}function j(e,t,n){let r=n?(Array.isArray(e)?e.flat(1/0):[e]).filter(o=>o!=null&&o!==""):D(e);return t?r.map(o=>v(o,t)):r}function yt(e,t){return j(t,null,e.repeatable===!0).length>0}function ht(e,t,n,r){return n?j(e,t,r):t?v(e,t):e}function gt(e,t,n){let r=Le(e,t);return r.length===0?n:r.map(o=>o.value)}function Ce(e){return L(e).value_arity==="none"}function z(e,t,n,r,o){let s=O(e),i=o?` for extension command '${o}'`:"",a=n===!0?"no value":JSON.stringify(n);throw new m(`Option '${s}'${i} expects ${r}; received ${a}.`,p.USAGE,{code:"extension_flag_value_invalid",flag:s,required:`Pass ${s} ${t==="number"?"<number>":"<true|false|1|0>"}.`,why:`The flag declares value_type ${t} with value_validation strict, so a malformed token is refused before the extension handler runs.`,nextSteps:[`Re-run with a valid ${t} value for ${s}.`,`Run pm ${o??"<command>"} --help to review the declared flag contract.`]})}function K(e,t){return e.value_validation==="strict"&&t!=="string"}function Le(e,t){let n=e[$e];if(!n)return[];let r=new Set(t);return n.filter(o=>r.has(o.key))}function _t(e,t,n,r){if(Ce(e))for(let o of Le(n,t)){if(o.attached!==!0)continue;let s=e.list===!0&&e.repeatable!==!0?D(o.value):[o.value];for(let i of s){let a=x(v(i,"boolean"),"boolean");a!==null&&z(e,"boolean",i,a.expected,r)}}}function kt(e,t,n,r,o){let s=Array.isArray(n)?n.flat(1/0):[n],i=r?s:s.flatMap(a=>typeof a=="string"?a.split(","):[a]);for(let a of i)if(typeof a=="string"&&a.trim().length===0){let c=x(a,t);z(e,t,a,c.expected,o)}}function W(e,t,n,r){if(!K(e,n))return t;let o=n==="boolean"&&Ce(e),s=i=>{let a=x(i,n);return a===null?i:o&&typeof i=="string"?!0:z(e,n,i,a.expected,r)};return Array.isArray(t)?t.map(s):s(t)}function bt(e,t,n,r){for(let o of n)if(!(o===t||!Object.hasOwn(e,o))){if(Object.hasOwn(e,t)){if(r){let s=e[t],i=e[o];e[t]=[...Array.isArray(s)?s:[s],...Array.isArray(i)?i:[i]].filter(a=>a!=null)}delete e[o];continue}e[t]=e[o],delete e[o]}}function De(e,t,n=e,r){if(t.length===0)return e;let o=Object.create(null);for(let[i,a]of Object.entries(e))o[i]=a;let s=new Set(t.map(i=>S(i)).filter(i=>i!==null));for(let i of t){let a=S(i);if(a){let c=Te(i).filter(d=>d===a||!s.has(d));wt(o,i,a,c,n,r)}}return o}function wt(e,t,n,r,o,s){let i=t.list===!0,a=Ae(t);a&&!i&&vt(e,t,n,r,a,s),bt(e,n,r,i);let c=t.repeatable===!0;if(!Object.hasOwn(e,n)){t.default!==void 0&&(e[n]=ht(t.default,a,i,c));return}if(a==="boolean"&&K(t,a)&&_t(t,r,o,s),i){e[n]=St(t,r,o,e[n],a,c,s);return}a&&(e[n]=W(t,v(e[n],a),a,s))}function vt(e,t,n,r,o,s){for(let i of r)i!==n&&Object.hasOwn(e,i)&&W(t,v(e[i],o),o,s)}function St(e,t,n,r,o,s,i){let a=gt(n,t,r);o&&K(e,o)&&kt(e,o,a,s,i);let c=j(a,o,s);return o?W(e,c,o,i):c}function Tn(e){return S(e)}function Oe(e){return e.trim().toLowerCase().split(/\s+/u).filter(t=>t.length>0).join(" ")}function Nn(e,t){let n=Oe(t);if(n.length===0)return[];let r=C(n);return e.flags.filter(o=>C(Oe(o.target_command))===r).flatMap(o=>[...o.flags])}function Ot(e,t,n,r){let o=O(e),[s,i]=n;throw new m(`Options '${s}' and '${i}' both set ${o} for extension command '${r}' with different values.`,p.USAGE,{code:"extension_option_spelling_conflict",required:`Pass ${o} once, under the handler key '${t}'.`,why:`'${s}' and '${i}' are spellings of the same declared flag, and pm refuses to choose between two different values.`,nextSteps:[`Remove '${s}' or '${i}' and pass one value as '${t}'.`,`Run pm contracts --command ${r} --flags-only --json to read each flag's sdk_option key.`]})}function Cn(e,t,n,r={}){if(t.length===0)return e;let o=t.map(l=>l.repeatable===!0&&l.list!==!0?{...l,list:!0}:l),s=$t(o),i=Nt(e,s,n),a=new Set([...s.long.values()].map(({handlerKey:l})=>l)),c=Object.create(null),d=Object.create(null);for(let[l,u]of Object.entries(i))a.has(l)?c[l]=u:u===void 0||r.undeclaredKeys==="pass"||It(l)?d[l]=u:ct(l,xt(l),n,lt(o,{}));return Fe(c,o,n),Object.assign(d,De(c,o,Re(c,s),n))}function Re(e,t){let n=new Set([...t.long.values()].map(({handlerKey:s})=>s)),r=Object.entries(e).filter(([s])=>n.has(s)).flatMap(([s,i])=>(Array.isArray(i)?i.flat(1/0):[i]).map(a=>({consumed:1,key:s,value:a,attached:!0}))),o=Object.create(null);return Object.defineProperty(o,$e,{value:r}),o}function Fe(e,t,n){for(let r of t){let o=S(r);if(o===null)continue;let s=O(r),i=e[o],a=Object.hasOwn(e,o);r.enabled===!1&&a&&dt(s,n);let c=a&&(r.list!==!0||yt(r,i));r.required===!0&&r.enabled!==!1&&!c&&ut(r,o,s,n),r.list!==!0&&Array.isArray(i)&&Et(s,n)}}function Et(e,t){throw new m(`Option '${e}' for extension command '${t}' takes one value; received an array.`,p.USAGE,{code:"extension_flag_value_invalid",flag:e,required:`Pass one value for ${e}, or ask the package to declare it with list: true or repeatable: true.`,why:"The flag is not declared list or repeatable, so pm refuses an array before the extension handler runs instead of handing it a value of the wrong shape.",nextSteps:[`Run pm contracts --command ${t} --flags-only --json to read each flag's value contract.`]})}var Ee=new Set([...[...Q].flatMap(e=>{let t=e.replace(/^--/u,"");return[t,...t.startsWith("no-")?[t.slice(3)]:[]].flatMap(n=>[w(n),n.replaceAll("-","_")])}),"force","subcommand","inputResponses","requestState"]);function It(e){return Ee.has(e)||Ee.has(w(e.replace(/^-{1,2}/u,"")))}function xt(e){return`--${e.replace(/^-+/u,"").replace(/([a-z0-9])([A-Z])/gu,"$1-$2").replaceAll("_","-").toLowerCase()}`}function $t(e){let t={long:new Map,short:new Map},n=(r,o,s)=>{o.length>0&&!r.has(o)&&r.set(o,s)};for(let r of e){let o=S(r);if(o===null)continue;let s={handlerKey:o,definition:r};n(t.long,o,s);let i=typeof r.short=="string"?r.short.trim():"";i.startsWith("-")&&!i.startsWith("--")&&n(t.short,i.slice(1),s)}return t}function q(e,t){return e.long.get(t)??e.short.get(t.replace(/^-(?!-)/u,""))??e.long.get(w(t.replace(/^-{1,2}/u,"")))}function At(e,t,n,r){let o=/^(?:--)?no-(.+)$/u.exec(t)?.[1];if(o===void 0||q(e,t)!==void 0)return{spelling:t,value:n};let s=q(e,o);return s===void 0||Ae(s.definition)!=="boolean"?{spelling:t,value:n}:(s.definition.list===!0||s.definition.repeatable===!0)&&Array.isArray(n)?{spelling:o,value:n.flat(1/0).map(i=>Ie(t,s.definition,i,r))}:s.definition.list===!0&&n!==void 0?{spelling:o,value:Ie(t,s.definition,n,r)}:{spelling:o,value:n===void 0?n:N(t,s.definition,n,r)}}function Ie(e,t,n,r){let o=s=>s.trim().length===0?s:String(N(e,t,s.trim(),r));return n==null?n:typeof n!="string"?N(e,t,n,r):n.trim().length===0?n:t.repeatable===!0||!n.includes(",")?N(e,t,n,r):n.split(",").map(o).join(",")}function N(e,t,n,r){let o=Ne(n);return typeof o=="boolean"?!o:Tt(e,t,n,r)}function Tt(e,t,n,r){let o=O(t);throw new m(`Option '${e}' for extension command '${r}' negates ${o} and expects true, false, 1, or 0; received ${JSON.stringify(n)}.`,p.USAGE,{code:"extension_flag_value_invalid",flag:o,required:`Pass ${o} as true or false, or '${e}' as true.`,why:`'${e}' is the negated spelling of the boolean ${o}, so only a boolean value can be inverted before the extension handler runs.`,nextSteps:[`Run pm contracts --command ${r} --flags-only --json to read each flag's value contract.`]})}function Nt(e,t,n){let r=Object.create(null),o=new Map;for(let[s,i]of Object.entries(e)){let{spelling:a,value:c}=At(t,s,i,n),d=q(t,a);if(d===void 0)r[a]=c;else if(c!==void 0){let l=o.get(d.handlerKey);l===void 0?(o.set(d.handlerKey,a),r[d.handlerKey]=c):it(xe(d.definition,d.handlerKey,r[d.handlerKey],t,n),xe(d.definition,d.handlerKey,c,t,n))||Ot(d.definition,d.handlerKey,[l,a],n)}}return r}function xe(e,t,n,r,o){let s={[t]:n};return Fe(s,[e],o),De(s,[e],Re(s,r),o)[t]}export{Pt as a,qt as b,jt as c,zt as d,Kt as e,ge as f,Wt as g,Bt as h,b as i,R as j,Me as k,Xt as l,Gt as m,Pe as n,Yt as o,qe as p,en as q,je as r,A as s,T as t,be as u,on as v,hn as w,gn as x,_n as y,On as z,Tn as A,Nn as B,Cn as C};
26
- //# sourceMappingURL=chunk-DZMP3VYQ.js.map
26
+ //# sourceMappingURL=chunk-EO4XM3XJ.js.map
@@ -0,0 +1,2 @@
1
+ import{ca as l}from"./chunk-FPPYE6CY.js";import{mb as r}from"./chunk-ICEHI4SN.js";import{Bg as S,Cg as N,Eg as E,sb as n}from"./chunk-A2CLYPDA.js";(function(){try{var T=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new T.Error().stack;e&&(T._sentryDebugIds=T._sentryDebugIds||{},T._sentryDebugIds[e]="c162c9b5-2566-5a1b-ae26-dafa8b206b27")}catch{}})();var u=new Set(["--author","--expect-hash","--follow","--help","--lean","--token-accounting","--output-include","--output-limit","--output-budget","--output-format","--output-session","--output-cursor","--output-row-contract","--no-changed-fields","--no-extensions","--no-pager","--pm-path","--profile","--quiet","--interval-ms"]),p=new Set([...S,...N]),I=new Set(["--brief","--format","--full","--full-changed-fields","--id-only","--no-truncate","--stream"]),d=new Set(["--body-file","--file","--stdin-json"]),m=new Set(["--global","--local","--project"]),P=new Set(["--activity-limit","--default-depth","--section-activity","--section-blockers","--section-files","--section-hierarchy","--section-progress","--section-staleness","--section-tests","--section-workload","--stale-threshold-days"]),f=new Set(["action","fullChangedFields","idOnly","path","pmExecutable","timeoutMs"]),M=new Set(["configAction","id","name","query","reason","subcommand","target","text"]),G={assurance:{id:"<id>",kind:"<kind>",preset:"[kind]|[id]",subcommand:"<action>"},event:{title:"<title>"},files:{lookupPath:"lookup <path...>"},meet:{title:"<title>"},"item-reopen":{id:"<id>",reason:"<reason>"},merge:{subcommand:"<subcommand>"},remind:{title:"<title>"},workspace:{name:"<name>",subcommand:"snapshot",snapshotAction:"<snapshot-action>",target:"<target>"}},F={append:{"--text":"body"},assurance:{"--tree":"treeId","--owner":"owner","--apply":"apply","--enforcement":"enforcement"},init:{"--id-prefix":"idPrefix","--no-merge-fence":"mergeFence","--workspace":"workspace"},create:{"--no-inherit-focus":"inheritFocus","--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},plan:{"--no-inherit-focus":"inheritFocus"},update:{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},"update-many":{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},files:{"--note":"addNote","--note-conflict":"noteConflict","--full-history":"full"},docs:{"--note":"addNote","--note-conflict":"noteConflict","--full-history":"full"},test:{"--full-history":"full"},comments:{"--full-history":"full"},notes:{"--file":"text","--full-history":"full"},learnings:{"--file":"text","--full-history":"full"},gc:{"--scope":"gcScope"},contracts:{"--action":"contractAction"},schema:{"--no-allow-unset":"allowUnset","--type":"fieldTypeScope"},"history-author-acknowledge":{"--event":"historyEvent","--all-actionable":"allActionable"},"extension-init":{"--capability":"capability"},"package-init":{"--capability":"capability"},"extension-install":{"--gh":"github"},"package-install":{"--gh":"github"},"extension-adopt":{"--gh":"github"},"package-adopt":{"--gh":"github"},extension:{"--gh":"github","--scaffold":"init"},package:{"--gh":"github","--scaffold":"init"},install:{"--gh":"github"}},D={"--pm-path":"path"},c={stats:{"--analytics":["measurements","metric","measurementLimit","observe","improvementDirection","measurementSource","measurementItem","measurementRevision","author","message","provenanceCoverage","fleetAttribution","since","eventLimit","minimumSample"]}};function h(T){return T.startsWith("extension-")?`extension ${T.slice(10)}`:T.startsWith("package-")?`package ${T.slice(8)}`:T.startsWith("item-")?`item ${T.slice(5)}`:T}function R(T,e){let t=F[T]?.[e]??D[e];return t!==void 0?t:e.replace(/^--/,"").replaceAll("_","-").replace(/-([a-z])/g,(i,_)=>_.toUpperCase())}function g(T){let e=new Set;return T.filter(({flag:t})=>!t.startsWith("--")||e.has(t)?!1:(e.add(t),!0))}function y(T,e){return e.find(({aliases:t})=>t?.includes(T))?.flag}function b(T,e,t,i){let _=c[T]?.[e.flag];if(_!==void 0&&_.every(A=>i.has(A)))return{surface:"cli",input:e.flag,counterpart:_[0],disposition:"shared",reason:"The validated CLI JSON object fans out across strict SDK parameters."};let O=R(T,e.flag);if(i.has(O))return{surface:"cli",input:e.flag,counterpart:O,disposition:"shared",reason:"The CLI flag maps directly to a strict SDK action parameter."};let C=y(e.flag,t);if(C!==void 0){let A=R(T,C);if(i.has(A))return{surface:"cli",input:e.flag,counterpart:A,disposition:"compatibility_alias",reason:`Compatibility spelling for ${C}.`}}return u.has(e.flag)?{surface:"cli",input:e.flag,disposition:"cli_transport",reason:"CLI process transport is supplied by the in-process SDK host."}:I.has(e.flag)?{surface:"cli",input:e.flag,disposition:"cli_presentation",reason:"CLI rendering or mutation projection does not alter the SDK result envelope."}:d.has(e.flag)?{surface:"cli",input:e.flag,disposition:"cli_adapter",reason:"Local file or stdin adaptation is a CLI boundary concern."}:P.has(e.flag)?{surface:"cli",input:e.flag,counterpart:"key",disposition:"compatibility_alias",reason:"CLI config shorthand normalizes to the SDK configAction/key/value contract."}:m.has(e.flag)?{surface:"cli",input:e.flag,counterpart:"scope",disposition:"cli_scope_selector",reason:"Mutually exclusive CLI scope switches normalize to the SDK scope parameter."}:{surface:"cli",input:e.flag,counterpart:O,disposition:"unclassified",reason:"The CLI flag has no strict SDK parameter or approved boundary classification."}}function U(T,e,t){let i=Object.entries(c[T]??{}).find(([C,A])=>A.includes(e)&&t.some(({input:a,disposition:s})=>a===C&&s==="shared"));if(i!==void 0)return{surface:"sdk",input:e,counterpart:i[0],disposition:"shared",reason:"The strict SDK parameter is reachable through the validated CLI JSON object."};let _=t.find(({counterpart:C,disposition:A})=>C===e&&(A==="shared"||A==="compatibility_alias"||A==="cli_scope_selector"));if(_!==void 0)return{surface:"sdk",input:e,counterpart:_.input,disposition:"shared",reason:"The strict SDK parameter is reachable from the CLI contract."};let O=G[T]?.[e];return O!==void 0?{surface:"sdk",input:e,counterpart:O,disposition:"shared",reason:"The strict SDK parameter maps to a canonical CLI positional argument."}:f.has(e)?{surface:"sdk",input:e,disposition:"sdk_transport",reason:"The SDK host supplies in-process transport and workspace selection."}:M.has(e)?{surface:"sdk",input:e,disposition:"cli_positional",reason:"The CLI accepts this SDK parameter as a positional command argument."}:{surface:"sdk",input:e,disposition:"sdk_native",reason:"The typed SDK exposes this structured input without a canonical CLI long flag."}}function v(T={}){let e=T.actions??n,t=T.resolveFlags??r,i=T.resolveParameters??l;return e.map(_=>{let O=h(_),C=g(t(O)).filter(({flag:o})=>E(_)!==void 0||!p.has(o)),A=new Set(i(_)??[]),a=C.map(o=>b(_,o,C,A)),s=[...A].sort((o,L)=>o.localeCompare(L)).map(o=>U(_,o,a));return{action:_,command:O,cli:a,sdk:s,unclassified:[...a,...s].filter(({disposition:o})=>o==="unclassified")}})}(function(){try{var T=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new T.Error().stack;e&&(T._sentryDebugIds=T._sentryDebugIds||{},T._sentryDebugIds[e]="62489699-d1d6-505e-8a23-53922081c6e7")}catch{}})();export{v as a};
2
+ //# sourceMappingURL=chunk-EZXLY6S4.js.map