@unbrained/pm-cli 2026.7.17 → 2026.7.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 (264) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +13 -0
  3. package/dist/cli/commands/close.d.ts +1 -1
  4. package/dist/cli/commands/close.js +3 -3
  5. package/dist/cli/commands/close.js.map +1 -1
  6. package/dist/cli/commands/completion.js +47 -5
  7. package/dist/cli/commands/completion.js.map +1 -1
  8. package/dist/cli/commands/context.d.ts +2 -2
  9. package/dist/cli/commands/context.js +42 -28
  10. package/dist/cli/commands/context.js.map +1 -1
  11. package/dist/cli/commands/contracts.js +5 -3
  12. package/dist/cli/commands/contracts.js.map +1 -1
  13. package/dist/cli/commands/graph.d.ts +7 -0
  14. package/dist/cli/commands/graph.js +11 -0
  15. package/dist/cli/commands/graph.js.map +1 -0
  16. package/dist/cli/commands/index.d.ts +1 -0
  17. package/dist/cli/commands/index.js +3 -2
  18. package/dist/cli/commands/index.js.map +1 -1
  19. package/dist/cli/commands/next.d.ts +1 -1
  20. package/dist/cli/commands/next.js +3 -3
  21. package/dist/cli/commands/next.js.map +1 -1
  22. package/dist/cli/main.js +3 -2
  23. package/dist/cli/main.js.map +1 -1
  24. package/dist/cli/register-list-query.js +49 -7
  25. package/dist/cli/register-list-query.js.map +1 -1
  26. package/dist/cli/register-mutation.js +7 -3
  27. package/dist/cli/register-mutation.js.map +1 -1
  28. package/dist/cli-bundle/bundle-manifest.json +157 -149
  29. package/dist/cli-bundle/chunks/{chunk-N7I2DGLP.js → chunk-35FHWD4C.js} +4 -4
  30. package/dist/cli-bundle/chunks/{chunk-37V5MXAU.js.map → chunk-35FHWD4C.js.map} +1 -7
  31. package/dist/cli-bundle/chunks/{chunk-MSGETE6I.js → chunk-3CUQZNQ6.js} +67 -509
  32. package/dist/cli-bundle/chunks/chunk-3CUQZNQ6.js.map +7 -0
  33. package/dist/cli-bundle/chunks/chunk-3QDR6ZLU.js +800 -0
  34. package/dist/cli-bundle/chunks/chunk-3QDR6ZLU.js.map +7 -0
  35. package/dist/cli-bundle/chunks/{chunk-QNUAZYGW.js → chunk-43UMFKCK.js} +3 -3
  36. package/dist/cli-bundle/chunks/{chunk-HF63SBLC.js → chunk-6VHUGVNP.js} +39 -16
  37. package/dist/cli-bundle/chunks/chunk-6VHUGVNP.js.map +1 -0
  38. package/dist/cli-bundle/chunks/{chunk-B6SH2YNN.js → chunk-7R6UIHYY.js} +2 -2
  39. package/dist/cli-bundle/chunks/{chunk-NCAFUBJX.js → chunk-7UCY6DR5.js} +183 -12
  40. package/dist/cli-bundle/chunks/chunk-7UCY6DR5.js.map +1 -0
  41. package/dist/cli-bundle/chunks/{chunk-23TCGBRK.js → chunk-ADXDCAKP.js} +2 -2
  42. package/dist/cli-bundle/chunks/{chunk-7LTCLTRG.js → chunk-AXRT7K5V.js} +16 -3
  43. package/dist/cli-bundle/chunks/chunk-AXRT7K5V.js.map +7 -0
  44. package/dist/cli-bundle/chunks/{chunk-P56LKFQX.js → chunk-BDA35QG5.js} +34 -4
  45. package/dist/cli-bundle/chunks/chunk-BDA35QG5.js.map +7 -0
  46. package/dist/cli-bundle/chunks/{chunk-2MPMKJF2.js → chunk-DHNG452T.js} +2 -2
  47. package/dist/cli-bundle/chunks/{chunk-AFSV5HBB.js → chunk-E4FXM2XB.js} +2 -2
  48. package/dist/cli-bundle/chunks/{chunk-QKVVV6QO.js → chunk-EWIT5WIC.js} +3 -3
  49. package/dist/cli-bundle/chunks/chunk-EX7OQT3Y.js +783 -0
  50. package/dist/cli-bundle/chunks/chunk-EX7OQT3Y.js.map +1 -0
  51. package/dist/cli-bundle/chunks/{chunk-LLODAQMP.js → chunk-F3VC3GOV.js} +41 -18
  52. package/dist/cli-bundle/chunks/chunk-F3VC3GOV.js.map +7 -0
  53. package/dist/cli-bundle/chunks/{chunk-S46R2M3W.js → chunk-GKPCTQYG.js} +1709 -5
  54. package/dist/cli-bundle/chunks/chunk-GKPCTQYG.js.map +7 -0
  55. package/dist/cli-bundle/chunks/{chunk-HXVHBERL.js → chunk-HPAYDSR2.js} +2 -2
  56. package/dist/cli-bundle/chunks/{chunk-XNPMDSQQ.js → chunk-HYTOJW2Q.js} +2 -2
  57. package/dist/cli-bundle/chunks/{chunk-V3VBXQQV.js → chunk-I3INI567.js} +516 -429
  58. package/dist/cli-bundle/chunks/chunk-I3INI567.js.map +7 -0
  59. package/dist/cli-bundle/chunks/{chunk-V7MP6YTN.js → chunk-IL5SPRMH.js} +2 -2
  60. package/dist/cli-bundle/chunks/{chunk-YQCWK2MB.js → chunk-L5BTTDU5.js} +68 -503
  61. package/dist/cli-bundle/chunks/chunk-L5BTTDU5.js.map +1 -0
  62. package/dist/cli-bundle/chunks/{chunk-SIJV365F.js → chunk-NCVT6XEL.js} +17 -4
  63. package/dist/cli-bundle/chunks/chunk-NCVT6XEL.js.map +1 -0
  64. package/dist/cli-bundle/chunks/{chunk-DCC2AQBD.js → chunk-OGVTB5VO.js} +32 -31
  65. package/dist/cli-bundle/chunks/chunk-OGVTB5VO.js.map +7 -0
  66. package/dist/cli-bundle/chunks/{chunk-6XAZB6SE.js → chunk-QPGQNLPI.js} +1660 -7
  67. package/dist/cli-bundle/chunks/chunk-QPGQNLPI.js.map +1 -0
  68. package/dist/cli-bundle/chunks/{chunk-KOEZCHRF.js → chunk-QRZNCRNA.js} +2 -2
  69. package/dist/cli-bundle/chunks/{chunk-G6KM4YKY.js → chunk-RXPQ5Q23.js} +3 -3
  70. package/dist/cli-bundle/chunks/{chunk-7CTQ7WW5.js → chunk-SIPOACV5.js} +514 -427
  71. package/dist/cli-bundle/chunks/chunk-SIPOACV5.js.map +1 -0
  72. package/dist/cli-bundle/chunks/{chunk-XYJK6GIQ.js → chunk-TGBTLGPX.js} +2 -2
  73. package/dist/cli-bundle/chunks/{chunk-37V5MXAU.js → chunk-TLWJP5BF.js} +3 -3
  74. package/dist/cli-bundle/chunks/chunk-TLWJP5BF.js.map +7 -0
  75. package/dist/cli-bundle/chunks/{chunk-3D4YVTNG.js → chunk-TZAE66GQ.js} +2 -2
  76. package/dist/cli-bundle/chunks/{chunk-S6FF7VW6.js → chunk-WQXRZMFN.js} +187 -16
  77. package/dist/cli-bundle/chunks/chunk-WQXRZMFN.js.map +7 -0
  78. package/dist/cli-bundle/chunks/{chunk-SPFZV2GR.js → chunk-XPUTSGJU.js} +32 -31
  79. package/dist/cli-bundle/chunks/chunk-XPUTSGJU.js.map +1 -0
  80. package/dist/cli-bundle/chunks/{chunk-CFSUNEL7.js → chunk-XWBD6DSR.js} +3 -3
  81. package/dist/cli-bundle/chunks/{chunk-MNV226E4.js → chunk-XWYQ2LT4.js} +2 -2
  82. package/dist/cli-bundle/chunks/{chunk-I7GY4X6Y.js → chunk-YFE7JHX3.js} +26 -5
  83. package/dist/cli-bundle/chunks/chunk-YFE7JHX3.js.map +1 -0
  84. package/dist/cli-bundle/chunks/{chunk-FZGM3PNA.js → chunk-YIIIAKCE.js} +2 -2
  85. package/dist/cli-bundle/chunks/{close-BEP7MHF3.js → close-GPD7DTJV.js} +3 -3
  86. package/dist/cli-bundle/chunks/{close-Y6QFUJQN.js → close-X3CF6FQP.js} +3 -3
  87. package/dist/cli-bundle/chunks/{close-many-JJFW7KTT.js → close-many-J7A5EHOQ.js} +5 -5
  88. package/dist/cli-bundle/chunks/{close-many-QJ6FKJUE.js → close-many-NQLYGPYW.js} +5 -5
  89. package/dist/cli-bundle/chunks/{deps-EVTOQMKW.js → deps-MQ4ZIGZB.js} +13 -4
  90. package/dist/cli-bundle/chunks/{deps-5NC4IZH7.js → deps-NIIKXLPB.js} +13 -4
  91. package/dist/cli-bundle/chunks/{profile-U2B6Y7GE.js → profile-AVCIIZID.js} +3 -3
  92. package/dist/cli-bundle/chunks/{profile-AGUKS52S.js → profile-LFYO3HHX.js} +3 -3
  93. package/dist/cli-bundle/chunks/{register-list-query-A5KRJ5J2.js → register-list-query-MZUF2EEC.js} +41 -13
  94. package/dist/cli-bundle/chunks/register-list-query-MZUF2EEC.js.map +1 -0
  95. package/dist/cli-bundle/chunks/{register-list-query-NEYP3TXO.js → register-list-query-UKMF55FT.js} +40 -12
  96. package/dist/cli-bundle/chunks/register-list-query-UKMF55FT.js.map +7 -0
  97. package/dist/cli-bundle/chunks/{register-mutation-6LOPBAHC.js → register-mutation-2PBW2GEX.js} +15 -13
  98. package/dist/cli-bundle/chunks/register-mutation-2PBW2GEX.js.map +1 -0
  99. package/dist/cli-bundle/chunks/{register-mutation-GCZOALNJ.js → register-mutation-T6RVNJC4.js} +14 -12
  100. package/dist/cli-bundle/chunks/{register-mutation-GCZOALNJ.js.map → register-mutation-T6RVNJC4.js.map} +2 -2
  101. package/dist/cli-bundle/chunks/{register-operations-6ZZIF27A.js → register-operations-KHZYR6MG.js} +11 -11
  102. package/dist/cli-bundle/chunks/{register-operations-REDIAEGI.js → register-operations-WPQ2LWZJ.js} +11 -11
  103. package/dist/cli-bundle/chunks/{register-setup-J3JS2ZVT.js → register-setup-PGDNOXDQ.js} +5 -5
  104. package/dist/cli-bundle/chunks/{register-setup-BHPMN5SK.js → register-setup-TDN7WAO6.js} +5 -5
  105. package/dist/cli-bundle/chunks/{update-SA6AG23P.js → update-SQYZA3ZW.js} +4 -4
  106. package/dist/cli-bundle/chunks/{update-PQQHLYCC.js → update-XZJYS5X7.js} +4 -4
  107. package/dist/cli-bundle/chunks/{update-many-RQVTFJPD.js → update-many-R24B3GBK.js} +6 -6
  108. package/dist/cli-bundle/chunks/{update-many-TV3L3KBX.js → update-many-WQ3R3J6N.js} +6 -6
  109. package/dist/cli-bundle/main.js +25 -9
  110. package/dist/cli-bundle/main.js.map +2 -2
  111. package/dist/cli-bundle/sdk-runtime.js +19 -16
  112. package/dist/cli-bundle/sdk.js +95 -305
  113. package/dist/cli-bundle/sdk.js.map +4 -4
  114. package/dist/core/item/actionability.d.ts +12 -0
  115. package/dist/core/item/actionability.js +39 -4
  116. package/dist/core/item/actionability.js.map +1 -1
  117. package/dist/core/sentry/instrument.d.ts +11 -0
  118. package/dist/core/sentry/instrument.js +21 -2
  119. package/dist/core/sentry/instrument.js.map +1 -1
  120. package/dist/mcp/server.d.ts +16 -18
  121. package/dist/mcp/server.js +84 -31
  122. package/dist/mcp/server.js.map +1 -1
  123. package/dist/mcp/tool-definitions.js +17 -4
  124. package/dist/mcp/tool-definitions.js.map +1 -1
  125. package/dist/sdk/actionability.d.ts +10 -0
  126. package/dist/sdk/actionability.js +14 -0
  127. package/dist/sdk/actionability.js.map +1 -0
  128. package/dist/sdk/cli-contracts/enum-contracts.d.ts +6 -2
  129. package/dist/sdk/cli-contracts/enum-contracts.js +19 -2
  130. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  131. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  132. package/dist/sdk/cli-contracts/flag-contracts.js +21 -2
  133. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  134. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +2 -0
  135. package/dist/sdk/cli-contracts/tool-option-contracts.js +16 -2
  136. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  137. package/dist/sdk/cli-contracts/tool-parameter-tables.js +80 -3
  138. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  139. package/dist/sdk/cli-contracts/tool-schema.d.ts +20 -0
  140. package/dist/sdk/cli-contracts/tool-schema.js +97 -9
  141. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  142. package/dist/sdk/cli-contracts.d.ts +2 -2
  143. package/dist/sdk/cli-contracts.js +4 -4
  144. package/dist/sdk/cli-contracts.js.map +1 -1
  145. package/dist/sdk/dependencies.d.ts +42 -53
  146. package/dist/sdk/dependencies.js +177 -125
  147. package/dist/sdk/dependencies.js.map +1 -1
  148. package/dist/sdk/governance/validate.js +3 -3
  149. package/dist/sdk/governance/validate.js.map +1 -1
  150. package/dist/sdk/graph/analytics.d.ts +124 -0
  151. package/dist/sdk/graph/analytics.js +464 -0
  152. package/dist/sdk/graph/analytics.js.map +1 -0
  153. package/dist/sdk/graph/assembly.d.ts +97 -0
  154. package/dist/sdk/graph/assembly.js +146 -0
  155. package/dist/sdk/graph/assembly.js.map +1 -0
  156. package/dist/sdk/graph/cache.d.ts +66 -0
  157. package/dist/sdk/graph/cache.js +148 -0
  158. package/dist/sdk/graph/cache.js.map +1 -0
  159. package/dist/sdk/graph/governance.d.ts +108 -0
  160. package/dist/sdk/graph/governance.js +360 -0
  161. package/dist/sdk/graph/governance.js.map +1 -0
  162. package/dist/sdk/graph/index.d.ts +16 -0
  163. package/dist/sdk/graph/index.js +20 -0
  164. package/dist/sdk/graph/index.js.map +1 -0
  165. package/dist/sdk/graph/remediation.d.ts +52 -0
  166. package/dist/sdk/graph/remediation.js +148 -0
  167. package/dist/sdk/graph/remediation.js.map +1 -0
  168. package/dist/sdk/graph/run.d.ts +295 -0
  169. package/dist/sdk/graph/run.js +468 -0
  170. package/dist/sdk/graph/run.js.map +1 -0
  171. package/dist/sdk/graph/traversal.d.ts +77 -0
  172. package/dist/sdk/graph/traversal.js +262 -0
  173. package/dist/sdk/graph/traversal.js.map +1 -0
  174. package/dist/sdk/index.d.ts +4 -2
  175. package/dist/sdk/index.js +6 -4
  176. package/dist/sdk/index.js.map +1 -1
  177. package/dist/sdk/query/list.d.ts +8 -0
  178. package/dist/sdk/query/list.js +19 -3
  179. package/dist/sdk/query/list.js.map +1 -1
  180. package/dist/sdk/relationship-context.d.ts +42 -0
  181. package/dist/sdk/relationship-context.js +99 -20
  182. package/dist/sdk/relationship-context.js.map +1 -1
  183. package/dist/sdk/relationships.d.ts +13 -0
  184. package/dist/sdk/relationships.js +30 -2
  185. package/dist/sdk/relationships.js.map +1 -1
  186. package/dist/sdk/runtime-input.d.ts +41 -0
  187. package/dist/sdk/runtime-input.js +422 -2
  188. package/dist/sdk/runtime-input.js.map +1 -1
  189. package/dist/sdk/runtime.d.ts +12 -23
  190. package/dist/sdk/runtime.js +19 -371
  191. package/dist/sdk/runtime.js.map +1 -1
  192. package/dist/sdk/test/linked-command-detection.js +12 -3
  193. package/dist/sdk/test/linked-command-detection.js.map +1 -1
  194. package/docs/AGENT_GUIDE.md +1 -0
  195. package/docs/COMMANDS.md +19 -1
  196. package/docs/RELATIONSHIP_GRAPH.md +99 -3
  197. package/docs/SDK.md +17 -3
  198. package/marketplace.json +2 -2
  199. package/package.json +1 -1
  200. package/packages/pm-beads/package.json +1 -1
  201. package/packages/pm-calendar/package.json +1 -1
  202. package/packages/pm-command-kit/package.json +1 -1
  203. package/packages/pm-governance-audit/package.json +1 -1
  204. package/packages/pm-guide-shell/package.json +1 -1
  205. package/packages/pm-kanban/package.json +1 -1
  206. package/packages/pm-lifecycle-hooks/package.json +1 -1
  207. package/packages/pm-linked-test-adapters/package.json +1 -1
  208. package/packages/pm-search-advanced/package.json +1 -1
  209. package/packages/pm-templates/package.json +1 -1
  210. package/packages/pm-todos/package.json +1 -1
  211. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  212. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  213. package/dist/cli-bundle/chunks/chunk-6XAZB6SE.js.map +0 -1
  214. package/dist/cli-bundle/chunks/chunk-7CTQ7WW5.js.map +0 -1
  215. package/dist/cli-bundle/chunks/chunk-7LTCLTRG.js.map +0 -7
  216. package/dist/cli-bundle/chunks/chunk-DCC2AQBD.js.map +0 -7
  217. package/dist/cli-bundle/chunks/chunk-HF63SBLC.js.map +0 -1
  218. package/dist/cli-bundle/chunks/chunk-I7GY4X6Y.js.map +0 -1
  219. package/dist/cli-bundle/chunks/chunk-LLODAQMP.js.map +0 -7
  220. package/dist/cli-bundle/chunks/chunk-MSGETE6I.js.map +0 -7
  221. package/dist/cli-bundle/chunks/chunk-N7I2DGLP.js.map +0 -1
  222. package/dist/cli-bundle/chunks/chunk-NCAFUBJX.js.map +0 -1
  223. package/dist/cli-bundle/chunks/chunk-P56LKFQX.js.map +0 -7
  224. package/dist/cli-bundle/chunks/chunk-S46R2M3W.js.map +0 -7
  225. package/dist/cli-bundle/chunks/chunk-S6FF7VW6.js.map +0 -7
  226. package/dist/cli-bundle/chunks/chunk-SIJV365F.js.map +0 -1
  227. package/dist/cli-bundle/chunks/chunk-SPFZV2GR.js.map +0 -1
  228. package/dist/cli-bundle/chunks/chunk-V3VBXQQV.js.map +0 -7
  229. package/dist/cli-bundle/chunks/chunk-YQCWK2MB.js.map +0 -1
  230. package/dist/cli-bundle/chunks/register-list-query-A5KRJ5J2.js.map +0 -1
  231. package/dist/cli-bundle/chunks/register-list-query-NEYP3TXO.js.map +0 -7
  232. package/dist/cli-bundle/chunks/register-mutation-6LOPBAHC.js.map +0 -1
  233. /package/dist/cli-bundle/chunks/{chunk-QNUAZYGW.js.map → chunk-43UMFKCK.js.map} +0 -0
  234. /package/dist/cli-bundle/chunks/{chunk-B6SH2YNN.js.map → chunk-7R6UIHYY.js.map} +0 -0
  235. /package/dist/cli-bundle/chunks/{chunk-23TCGBRK.js.map → chunk-ADXDCAKP.js.map} +0 -0
  236. /package/dist/cli-bundle/chunks/{chunk-2MPMKJF2.js.map → chunk-DHNG452T.js.map} +0 -0
  237. /package/dist/cli-bundle/chunks/{chunk-AFSV5HBB.js.map → chunk-E4FXM2XB.js.map} +0 -0
  238. /package/dist/cli-bundle/chunks/{chunk-QKVVV6QO.js.map → chunk-EWIT5WIC.js.map} +0 -0
  239. /package/dist/cli-bundle/chunks/{chunk-HXVHBERL.js.map → chunk-HPAYDSR2.js.map} +0 -0
  240. /package/dist/cli-bundle/chunks/{chunk-XNPMDSQQ.js.map → chunk-HYTOJW2Q.js.map} +0 -0
  241. /package/dist/cli-bundle/chunks/{chunk-V7MP6YTN.js.map → chunk-IL5SPRMH.js.map} +0 -0
  242. /package/dist/cli-bundle/chunks/{chunk-KOEZCHRF.js.map → chunk-QRZNCRNA.js.map} +0 -0
  243. /package/dist/cli-bundle/chunks/{chunk-G6KM4YKY.js.map → chunk-RXPQ5Q23.js.map} +0 -0
  244. /package/dist/cli-bundle/chunks/{chunk-XYJK6GIQ.js.map → chunk-TGBTLGPX.js.map} +0 -0
  245. /package/dist/cli-bundle/chunks/{chunk-3D4YVTNG.js.map → chunk-TZAE66GQ.js.map} +0 -0
  246. /package/dist/cli-bundle/chunks/{chunk-CFSUNEL7.js.map → chunk-XWBD6DSR.js.map} +0 -0
  247. /package/dist/cli-bundle/chunks/{chunk-MNV226E4.js.map → chunk-XWYQ2LT4.js.map} +0 -0
  248. /package/dist/cli-bundle/chunks/{chunk-FZGM3PNA.js.map → chunk-YIIIAKCE.js.map} +0 -0
  249. /package/dist/cli-bundle/chunks/{close-BEP7MHF3.js.map → close-GPD7DTJV.js.map} +0 -0
  250. /package/dist/cli-bundle/chunks/{close-Y6QFUJQN.js.map → close-X3CF6FQP.js.map} +0 -0
  251. /package/dist/cli-bundle/chunks/{close-many-JJFW7KTT.js.map → close-many-J7A5EHOQ.js.map} +0 -0
  252. /package/dist/cli-bundle/chunks/{close-many-QJ6FKJUE.js.map → close-many-NQLYGPYW.js.map} +0 -0
  253. /package/dist/cli-bundle/chunks/{deps-EVTOQMKW.js.map → deps-MQ4ZIGZB.js.map} +0 -0
  254. /package/dist/cli-bundle/chunks/{deps-5NC4IZH7.js.map → deps-NIIKXLPB.js.map} +0 -0
  255. /package/dist/cli-bundle/chunks/{profile-U2B6Y7GE.js.map → profile-AVCIIZID.js.map} +0 -0
  256. /package/dist/cli-bundle/chunks/{profile-AGUKS52S.js.map → profile-LFYO3HHX.js.map} +0 -0
  257. /package/dist/cli-bundle/chunks/{register-operations-6ZZIF27A.js.map → register-operations-KHZYR6MG.js.map} +0 -0
  258. /package/dist/cli-bundle/chunks/{register-operations-REDIAEGI.js.map → register-operations-WPQ2LWZJ.js.map} +0 -0
  259. /package/dist/cli-bundle/chunks/{register-setup-J3JS2ZVT.js.map → register-setup-PGDNOXDQ.js.map} +0 -0
  260. /package/dist/cli-bundle/chunks/{register-setup-BHPMN5SK.js.map → register-setup-TDN7WAO6.js.map} +0 -0
  261. /package/dist/cli-bundle/chunks/{update-SA6AG23P.js.map → update-SQYZA3ZW.js.map} +0 -0
  262. /package/dist/cli-bundle/chunks/{update-PQQHLYCC.js.map → update-XZJYS5X7.js.map} +0 -0
  263. /package/dist/cli-bundle/chunks/{update-many-RQVTFJPD.js.map → update-many-R24B3GBK.js.map} +0 -0
  264. /package/dist/cli-bundle/chunks/{update-many-TV3L3KBX.js.map → update-many-WQ3R3J6N.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sources":["mcp/server.ts"],"sourceRoot":"/","sourcesContent":["#!/usr/bin/env node\n/**\n * @module mcp/server\n *\n * Runs the MCP server adapter that exposes pm actions and contracts to external agents.\n */\nimport { realpathSync } from \"node:fs\";\nimport readline from \"node:readline\";\nimport { fileURLToPath } from \"node:url\";\nimport { resolvePmCliVersion } from \"../core/packages/root.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { decodeHtmlEntitiesInOptions } from \"../core/shared/html-entity-decode.js\";\nimport { levenshteinDistanceWithinLimit } from \"../core/shared/levenshtein.js\";\nimport { asRecordClone } from \"../core/shared/primitives.js\";\nimport { createSerialQueue } from \"../core/shared/serial-queue.js\";\nimport {\n readRequiredString,\n runAction,\n type PmActionInput,\n} from \"../sdk/runtime.js\";\nimport { TOOLS } from \"./tool-definitions.js\";\n\ninterface JsonRpcRequest {\n jsonrpc?: string;\n id?: string | number | null;\n method?: string;\n params?: Record<string, unknown>;\n}\n\ntype ToolHandler = (args: Record<string, unknown>) => Promise<unknown>;\n\nconst PM_PACKAGE_ROOT_ENV = \"PM_CLI_PACKAGE_ROOT\";\n\nfunction resolvePmPackageRoot(): string {\n return fileURLToPath(new URL(\"../..\", import.meta.url));\n}\n\nif (\n typeof process.env[PM_PACKAGE_ROOT_ENV] !== \"string\" ||\n process.env[PM_PACKAGE_ROOT_ENV]?.trim().length === 0\n) {\n process.env[PM_PACKAGE_ROOT_ENV] = resolvePmPackageRoot();\n}\n\n// Reflect the real package.json version so agents/telemetry can identify the\n// build serving requests (was hard-coded \"1.0.0\"; see pm-2nvw).\nconst PM_MCP_SERVER_VERSION =\n resolvePmCliVersion(import.meta.url, [\"../..\"]) ?? \"0.0.0\";\n\n// Tool definitions (TOOLS) live in ./tool-definitions.ts so the `pm contracts`\n// golden-file snapshot can import the surface without loading the server\n// runtime (pm-4os2). This file owns dispatch, normalization, and transport.\n\n// pm-qxwu: TOOL_SCHEMA_BASE keeps additionalProperties:true so legitimate\n// passthrough keeps working, which means a typo'd top-level arg (e.g.\n// \"fullChangedField\" missing the trailing \"s\") is silently swallowed and the\n// agent gets default behavior with no signal. We precompute the declared\n// top-level property keys for each tool and, on every tools/call, warn (without\n// rejecting) when an unexpected top-level key appears. The warning is surfaced\n// to stderr and additively in structuredContent.warnings.\nconst TOOL_DECLARED_KEYS: Map<string, string[]> = new Map(\n TOOLS.map((tool) => {\n const schema = tool.inputSchema as { properties?: Record<string, unknown> };\n const properties = schema.properties ?? {};\n return [tool.name, Object.keys(properties)] as const;\n }),\n);\n\nfunction nearestDeclaredKey(\n unexpected: string,\n declared: string[],\n): string | undefined {\n // Cheap did-you-mean: budget grows with key length but stays small so we only\n // suggest genuine near-misses (a single typo / transposition for short keys).\n const limit = Math.max(1, Math.min(3, Math.floor(unexpected.length / 4) + 1));\n let best: { key: string; distance: number } | undefined;\n for (const candidate of declared) {\n const distance = levenshteinDistanceWithinLimit(\n unexpected,\n candidate,\n limit,\n );\n if (distance === null) {\n continue;\n }\n if (best === undefined || distance < best.distance) {\n best = { key: candidate, distance };\n }\n }\n return best?.key;\n}\n\n// pm_run is the explicit catch-all passthrough tool: extension/package actions\n// accept arbitrary top-level keys (see extensionOptionsFromArgs), so unexpected\n// keys there are by-design rather than typos and must not be flagged.\nconst UNEXPECTED_KEY_WARNING_EXEMPT_TOOLS = new Set([\"pm_run\"]);\n\nfunction detectUnexpectedTopLevelKeys(\n toolName: string,\n args: Record<string, unknown>,\n): string[] {\n if (typeof args !== \"object\" || args === null || Array.isArray(args)) {\n return [];\n }\n if (UNEXPECTED_KEY_WARNING_EXEMPT_TOOLS.has(toolName)) {\n return [];\n }\n const declared = TOOL_DECLARED_KEYS.get(toolName);\n if (declared === undefined) {\n return [];\n }\n const declaredSet = new Set(declared);\n const warnings: string[] = [];\n for (const key of Object.keys(args)) {\n if (declaredSet.has(key)) {\n continue;\n }\n const suggestion = nearestDeclaredKey(key, declared);\n warnings.push(\n suggestion !== undefined\n ? `Unexpected top-level argument \"${key}\" for ${toolName} (did you mean \"${suggestion}\"?). It was passed through unchanged; declared arguments are: ${declared.join(\", \")}.`\n : `Unexpected top-level argument \"${key}\" for ${toolName}. It was passed through unchanged; declared arguments are: ${declared.join(\", \")}.`,\n );\n }\n return warnings;\n}\n\nconst HANDLERS: Record<string, ToolHandler> = {\n pm_run: (args) => runAction(args as PmActionInput),\n pm_context: (args) => runAction({ ...args, action: \"context\" }),\n pm_next: (args) => runAction({ ...args, action: \"next\" }),\n pm_search: (args) => runAction({ ...args, action: \"search\" }),\n pm_list: (args) => runAction({ ...args, action: \"list\" }),\n pm_get: (args) => runAction({ ...args, action: \"get\" }),\n pm_create: (args) => runAction({ ...args, action: \"create\" }),\n pm_copy: (args) => runAction({ ...args, action: \"copy\" }),\n pm_focus: (args) => runAction({ ...args, action: \"focus\" }),\n pm_update: (args) => runAction({ ...args, action: \"update\" }),\n pm_append: (args) => runAction({ ...args, action: \"append\" }),\n pm_claim: (args) => runAction({ ...args, action: \"claim\" }),\n pm_release: (args) => runAction({ ...args, action: \"release\" }),\n pm_close: (args) => runAction({ ...args, action: \"close\" }),\n pm_comments: (args) => runAction({ ...args, action: \"comments\" }),\n pm_files: (args) => runAction({ ...args, action: \"files\" }),\n pm_docs: (args) => runAction({ ...args, action: \"docs\" }),\n pm_notes: (args) => runAction({ ...args, action: \"notes\" }),\n pm_learnings: (args) => runAction({ ...args, action: \"learnings\" }),\n pm_deps: (args) => runAction({ ...args, action: \"deps\" }),\n pm_test: (args) => runAction({ ...args, action: \"test\" }),\n pm_validate: (args) => runAction({ ...args, action: \"validate\" }),\n pm_health: (args) => runAction({ ...args, action: \"health\" }),\n pm_contracts: (args) => runAction({ ...args, action: \"contracts\" }),\n pm_schema: (args) => runAction({ ...args, action: \"schema\" }),\n pm_profile: (args) => runAction({ ...args, action: \"profile\" }),\n pm_config: (args) => runAction({ ...args, action: \"config\" }),\n pm_plan: (args) => runAction({ ...args, action: \"plan\" }),\n};\n\nfunction resultContent(\n result: unknown,\n warnings?: string[],\n): Record<string, unknown> {\n // pm-qxwu: warnings is additive — existing fields (content, structuredContent.result)\n // are never removed or renamed. The warnings array only appears when non-empty.\n const structuredContent: Record<string, unknown> =\n warnings !== undefined && warnings.length > 0\n ? { result, warnings }\n : { result };\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(result, null, 2),\n },\n ],\n structuredContent,\n };\n}\n\nfunction errorContent(error: unknown): Record<string, unknown> {\n const code = error instanceof PmCliError ? error.exitCode : 1;\n const message = error instanceof Error ? error.message : String(error);\n return {\n isError: true,\n content: [\n {\n type: \"text\",\n text: JSON.stringify({ error: message, code }, null, 2),\n },\n ],\n // Keep `result` present on the error envelope so consumers can read\n // `structuredContent.result` uniformly across success and failure (pm-l40h).\n structuredContent: { result: null, error: message, code },\n };\n}\n\n/** Implements handle request for the public runtime surface of this module. */\nexport async function handleRequest(\n request: JsonRpcRequest,\n): Promise<Record<string, unknown> | undefined> {\n if (!request.id && request.method?.startsWith(\"notifications/\")) {\n return undefined;\n }\n if (request.method === \"ping\") {\n return {};\n }\n if (request.method === \"initialize\") {\n return {\n protocolVersion: \"2025-06-18\",\n capabilities: { tools: {} },\n serverInfo: { name: \"pm-mcp\", version: PM_MCP_SERVER_VERSION },\n instructions:\n \"You have access to native pm CLI tools for git-based project management. \" +\n \"Use pm_next to pick the next actionable item, or pm_context or pm_search before creating new work. \" +\n \"Prefer narrow tools (pm_next, pm_context, pm_list, pm_get, pm_search, pm_create, pm_copy, pm_focus, pm_update, pm_append, pm_claim, pm_release, pm_close, pm_comments, pm_files, pm_docs, pm_notes, pm_learnings, pm_deps, pm_test, pm_validate, pm_health, pm_contracts, pm_schema, pm_profile, pm_config, pm_plan) over pm_run when they cover the operation. \" +\n \"Use pm_plan for agent harness Plan workflows: it provides Codex/Claude/Cursor-style planning with durable steps, dependencies, decisions, discoveries, validation, and materialization. \" +\n \"Use pm_schema and pm_config for workspace configuration: pm_schema manages custom item types/statuses and pm_config reads or writes settings keys. \" +\n \"Use pm_run with an explicit action for active package-owned operations, plus activity, aggregate, history, stats, test-all, and gc. \" +\n \"Use history-redact for audited history-stream redaction workflows, history-repair to re-anchor a drifted history chain, and history-compact to checkpoint/prune long history streams while preserving replay integrity. \" +\n \"Set author to 'claude-code-agent' on all mutations. \" +\n \"Do not pass path during real repository tracking — only pass path for sandbox or test runs.\",\n };\n }\n if (request.method === \"tools/list\") {\n return { tools: TOOLS };\n }\n if (request.method === \"tools/call\") {\n const params = asRecordClone(request.params);\n const name = readRequiredString(params, \"name\");\n const handler = Object.prototype.hasOwnProperty.call(HANDLERS, name)\n ? HANDLERS[name]\n : undefined;\n if (!handler) {\n throw new PmCliError(`Unknown pm MCP tool: ${name}`, 64);\n }\n // pm-ydkl: defensive HTML-entity decode for free-text fields. Claude / the\n // Anthropic MCP SDK HTML-encodes `<` / `>` (and friends) in tool arguments\n // before they reach pm-cli, which would otherwise leak `&lt;type&gt;` into\n // stored pm comments / notes / item bodies. Direct CLI calls are not\n // affected; decoding at the MCP boundary normalizes the agent path while\n // leaving normal text untouched.\n const args = decodeHtmlEntitiesInOptions(asRecordClone(params.arguments));\n // pm-qxwu: non-breaking detection of typo'd / unexpected top-level keys.\n // additionalProperties stays true so passthrough still works; we only warn.\n const warnings = detectUnexpectedTopLevelKeys(name, args);\n for (const warning of warnings) {\n console.error(`[pm-mcp] ${warning}`);\n }\n // cwd is applied inside the serialized activation cycle (see withActiveExtensions),\n // so the chdir/restore is exclusive per request and cannot race a concurrent caller.\n const result = await handler(args);\n return resultContent(result, warnings);\n }\n throw new PmCliError(\n `Unsupported MCP method: ${request.method ?? \"(missing)\"}`,\n 64,\n );\n}\n\nfunction writeResponse(\n id: JsonRpcRequest[\"id\"],\n payload: Record<string, unknown>,\n): void {\n process.stdout.write(\n `${JSON.stringify({ jsonrpc: \"2.0\", id, result: payload })}\\n`,\n );\n}\n\nfunction writeError(id: JsonRpcRequest[\"id\"], error: unknown): void {\n const code = error instanceof PmCliError ? error.exitCode : -32603;\n const message = error instanceof Error ? error.message : String(error);\n process.stdout.write(\n `${JSON.stringify({ jsonrpc: \"2.0\", id, error: { code, message } })}\\n`,\n );\n}\n\n// pm-3puw: parse one JSON-RPC line, dispatch it, and write the response. Kept\n// as a standalone async unit so the stdio loop can enqueue it onto a serial\n// queue (process lines in arrival order) and tests can drive it directly.\n/** Implements process rpc line for the public runtime surface of this module. */\nexport async function processRpcLine(line: string): Promise<void> {\n if (line.trim().length === 0) {\n return;\n }\n let request: JsonRpcRequest;\n try {\n request = JSON.parse(line) as JsonRpcRequest;\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n writeError(null, new PmCliError(`Parse error: ${message}`, -32700));\n return;\n }\n if (\n typeof request !== \"object\" ||\n request === null ||\n Array.isArray(request)\n ) {\n writeError(\n null,\n new PmCliError(\"Invalid JSON-RPC request: expected an object\", -32600),\n );\n return;\n }\n const shouldRespond = Object.prototype.hasOwnProperty.call(request, \"id\");\n try {\n const result = await handleRequest(request);\n if (shouldRespond && result !== undefined) {\n writeResponse(request.id, result);\n }\n } catch (error) {\n if (!shouldRespond) {\n return;\n }\n if (request.method === \"tools/call\") {\n writeResponse(request.id, errorContent(error));\n } else {\n writeError(request.id, error);\n }\n }\n}\n\n/** Implements start mcp server for the public runtime surface of this module. */\nexport function startMcpServer(): void {\n const rl = readline.createInterface({\n input: process.stdin,\n crlfDelay: Infinity,\n });\n // pm-3puw: serialize line handling so pipelined requests are processed in\n // arrival order. The previous fire-and-forget handler ran requests\n // concurrently, so a client that pipelined two mutations on the same item\n // (without awaiting the first response) hit a lock conflict on the second.\n const queue = createSerialQueue();\n rl.on(\"line\", (line) => {\n void queue.enqueue(() => processRpcLine(line));\n });\n}\n\n// npm bin entries are symlinks (node_modules/.bin/pm-mcp -> dist/mcp/server.js),\n// so argv[1] must be realpath-resolved before comparing against this module's\n// path — a plain equality check made the published `pm-mcp` bin exit 0 without\n// ever starting the server (pm-qtbc).\n/** Implements check whether invoked as mcp main module for the public runtime surface of this module. */\nexport function isInvokedAsMcpMainModule(\n argvPath: string | undefined,\n moduleUrl: string,\n): boolean {\n if (!argvPath) {\n return false;\n }\n const selfPath = fileURLToPath(moduleUrl);\n if (argvPath === selfPath) {\n return true;\n }\n try {\n return realpathSync(argvPath) === realpathSync(selfPath);\n } catch {\n return false;\n }\n}\n\ntype RuntimeTestHooks = NonNullable<\n typeof globalThis.__pmCliActionRunnerTestHooks\n>;\ntype RuntimeTestHookKey = keyof RuntimeTestHooks;\n\nfunction readRuntimeTestHook<Key extends RuntimeTestHookKey>(\n key: Key,\n): RuntimeTestHooks[Key] {\n const runtimeTestHooks = globalThis.__pmCliActionRunnerTestHooks;\n if (runtimeTestHooks === undefined) {\n throw new PmCliError(\n `MCP runtime test hook \"${String(key)}\" is only available in test environments.`,\n 64,\n );\n }\n return runtimeTestHooks[key];\n}\n\n/** Public contract for test only, shared by SDK and presentation-layer consumers. */\nexport const _testOnly = {\n get closeManyOptionsFromFlat() {\n return readRuntimeTestHook(\"closeManyOptionsFromFlat\");\n },\n detectUnexpectedTopLevelKeys,\n errorContent,\n get extensionOptionsFromArgs() {\n return readRuntimeTestHook(\"extensionOptionsFromArgs\");\n },\n get globalOptions() {\n return readRuntimeTestHook(\"globalOptions\");\n },\n get mutationListOptions() {\n return readRuntimeTestHook(\"mutationListOptions\");\n },\n nearestDeclaredKey,\n get normalizeActionName() {\n return readRuntimeTestHook(\"normalizeActionName\");\n },\n get normalizeCommandPath() {\n return readRuntimeTestHook(\"normalizeCommandPath\");\n },\n get normalizeMcpOptionsArrays() {\n return readRuntimeTestHook(\"normalizeMcpOptionsArrays\");\n },\n get normalizeMcpUpdateOptions() {\n return readRuntimeTestHook(\"normalizeMcpUpdateOptions\");\n },\n get optionsWithAuthor() {\n return readRuntimeTestHook(\"optionsWithAuthor\");\n },\n get readRequiredString() {\n return readRuntimeTestHook(\"readRequiredString\");\n },\n get readScalarString() {\n return readRuntimeTestHook(\"readScalarString\");\n },\n get readScalarStringAllowBlank() {\n return readRuntimeTestHook(\"readScalarStringAllowBlank\");\n },\n get readStringArray() {\n return readRuntimeTestHook(\"readStringArray\");\n },\n runAction,\n get updateManyOptionsFromFlat() {\n return readRuntimeTestHook(\"updateManyOptionsFromFlat\");\n },\n get withAddNoteOption() {\n return readRuntimeTestHook(\"withAddNoteOption\");\n },\n get withFilesDiscoveryOptions() {\n return readRuntimeTestHook(\"withFilesDiscoveryOptions\");\n },\n get withMutationCompaction() {\n return readRuntimeTestHook(\"withMutationCompaction\");\n },\n writeError,\n};\n\n/* c8 ignore start */\nif (isInvokedAsMcpMainModule(process.argv[1], import.meta.url)) {\n startMcpServer();\n}\n/* c8 ignore stop */\n"],"names":[],"mappings":";AACA;;;;GAIG;;;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;A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;IAClD,CAAC;IACD,IAAI,kBAAkB;QACpB,OAAO,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;IACnD,CAAC;IACD,IAAI,gBAAgB;QAClB,OAAO,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;IACjD,CAAC;IACD,IAAI,0BAA0B;QAC5B,OAAO,mBAAmB,CAAC,4BAA4B,CAAC,CAAC;IAC3D,CAAC;IACD,IAAI,eAAe;QACjB,OAAO,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IACD,SAAS;IACT,IAAI,yBAAyB;QAC3B,OAAO,mBAAmB,CAAC,2BAA2B,CAAC,CAAC;IAC1D,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,yBAAyB;QAC3B,OAAO,mBAAmB,CAAC,2BAA2B,CAAC,CAAC;IAC1D,CAAC;IACD,IAAI,sBAAsB;QACxB,OAAO,mBAAmB,CAAC,wBAAwB,CAAC,CAAC;IACvD,CAAC;IACD,UAAU;CACX,CAAC;AAEF,qBAAqB;AACrB,IAAI,wBAAwB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC/D,cAAc,EAAE,CAAC;AACnB,CAAC;AACD,oBAAoB","debugId":"29c83e65-32f6-5773-ad8b-bc5fcbe29fc1"}
1
+ {"version":3,"file":"server.js","sources":["mcp/server.ts"],"sourceRoot":"/","sourcesContent":["#!/usr/bin/env node\n/**\n * @module mcp/server\n *\n * Runs the MCP server adapter that exposes pm actions and contracts to external agents.\n */\nimport { realpathSync } from \"node:fs\";\nimport readline from \"node:readline\";\nimport { fileURLToPath } from \"node:url\";\nimport { resolvePmCliVersion } from \"../core/packages/root.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { decodeHtmlEntitiesInOptions } from \"../core/shared/html-entity-decode.js\";\nimport { levenshteinDistanceWithinLimit } from \"../core/shared/levenshtein.js\";\nimport { asRecordClone } from \"../core/shared/primitives.js\";\nimport { createSerialQueue } from \"../core/shared/serial-queue.js\";\nimport { pmToolActionNestedOptionKeys } from \"../sdk/cli-contracts/tool-schema.js\";\nimport {\n readRequiredString,\n runAction,\n type PmActionInput,\n} from \"../sdk/runtime.js\";\nimport { TOOLS } from \"./tool-definitions.js\";\n\ninterface JsonRpcRequest {\n jsonrpc?: string;\n id?: string | number | null;\n method?: string;\n params?: Record<string, unknown>;\n}\n\ntype ToolHandler = (args: Record<string, unknown>) => Promise<unknown>;\n\nconst PM_PACKAGE_ROOT_ENV = \"PM_CLI_PACKAGE_ROOT\";\n\nfunction resolvePmPackageRoot(): string {\n return fileURLToPath(new URL(\"../..\", import.meta.url));\n}\n\nif (\n typeof process.env[PM_PACKAGE_ROOT_ENV] !== \"string\" ||\n process.env[PM_PACKAGE_ROOT_ENV]?.trim().length === 0\n) {\n process.env[PM_PACKAGE_ROOT_ENV] = resolvePmPackageRoot();\n}\n\n// Reflect the real package.json version so agents/telemetry can identify the\n// build serving requests (was hard-coded \"1.0.0\"; see pm-2nvw).\nconst PM_MCP_SERVER_VERSION =\n resolvePmCliVersion(import.meta.url, [\"../..\"]) ?? \"0.0.0\";\n\n// Tool definitions (TOOLS) live in ./tool-definitions.ts so the `pm contracts`\n// golden-file snapshot can import the surface without loading the server\n// runtime (pm-4os2). This file owns dispatch, normalization, and transport.\n\n// pm-qxwu: TOOL_SCHEMA_BASE keeps additionalProperties:true so legitimate\n// passthrough keeps working, which means a typo'd top-level arg (e.g.\n// \"fullChangedField\" missing the trailing \"s\") is silently swallowed and the\n// agent gets default behavior with no signal. We precompute the declared\n// top-level property keys for each tool and, on every tools/call, warn (without\n// rejecting) when an unexpected top-level key appears. The warning is surfaced\n// to stderr and additively in structuredContent.warnings.\nconst TOOL_DECLARED_KEYS: Map<string, string[]> = new Map(\n TOOLS.map((tool) => {\n const schema = tool.inputSchema as { properties?: Record<string, unknown> };\n const properties = schema.properties ?? {};\n return [tool.name, Object.keys(properties)] as const;\n }),\n);\n\nfunction nearestDeclaredKey(\n unexpected: string,\n declared: string[],\n): string | undefined {\n // Cheap did-you-mean: budget grows with key length but stays small so we only\n // suggest genuine near-misses (a single typo / transposition for short keys).\n const limit = Math.max(1, Math.min(3, Math.floor(unexpected.length / 4) + 1));\n let best: { key: string; distance: number } | undefined;\n for (const candidate of declared) {\n const distance = levenshteinDistanceWithinLimit(\n unexpected,\n candidate,\n limit,\n );\n if (distance === null) {\n continue;\n }\n if (best === undefined || distance < best.distance) {\n best = { key: candidate, distance };\n }\n }\n return best?.key;\n}\n\n// pm_run is the explicit catch-all passthrough tool: extension/package actions\n// accept arbitrary top-level keys (see extensionOptionsFromArgs), so unexpected\n// keys there are by-design rather than typos and must not be flagged.\nconst UNEXPECTED_KEY_WARNING_EXEMPT_TOOLS = new Set([\"pm_run\"]);\n\nfunction detectUnexpectedTopLevelKeys(\n toolName: string,\n args: Record<string, unknown>,\n): string[] {\n if (typeof args !== \"object\" || args === null || Array.isArray(args)) {\n return [];\n }\n if (UNEXPECTED_KEY_WARNING_EXEMPT_TOOLS.has(toolName)) {\n return [];\n }\n const declared = TOOL_DECLARED_KEYS.get(toolName);\n if (declared === undefined) {\n return [];\n }\n const declaredSet = new Set(declared);\n const warnings: string[] = [];\n for (const key of Object.keys(args)) {\n if (declaredSet.has(key)) {\n continue;\n }\n const suggestion = nearestDeclaredKey(key, declared);\n warnings.push(\n suggestion !== undefined\n ? `Unexpected top-level argument \"${key}\" for ${toolName} (did you mean \"${suggestion}\"?). It was passed through unchanged; declared arguments are: ${declared.join(\", \")}.`\n : `Unexpected top-level argument \"${key}\" for ${toolName}. It was passed through unchanged; declared arguments are: ${declared.join(\", \")}.`,\n );\n }\n return warnings;\n}\n\n// Fixed pm action behind each narrow tool. Also consulted by nested-option\n// validation (pm-upi0) to resolve the invoked action's contract keys.\nconst NARROW_TOOL_ACTIONS: Record<string, string> = {\n pm_context: \"context\",\n pm_next: \"next\",\n pm_search: \"search\",\n pm_list: \"list\",\n pm_get: \"get\",\n pm_create: \"create\",\n pm_copy: \"copy\",\n pm_focus: \"focus\",\n pm_update: \"update\",\n pm_append: \"append\",\n pm_claim: \"claim\",\n pm_release: \"release\",\n pm_close: \"close\",\n pm_comments: \"comments\",\n pm_files: \"files\",\n pm_docs: \"docs\",\n pm_notes: \"notes\",\n pm_learnings: \"learnings\",\n pm_deps: \"deps\",\n pm_graph: \"graph\",\n pm_test: \"test\",\n pm_validate: \"validate\",\n pm_health: \"health\",\n pm_contracts: \"contracts\",\n pm_schema: \"schema\",\n pm_profile: \"profile\",\n pm_config: \"config\",\n pm_plan: \"plan\",\n};\n\nconst HANDLERS: Record<string, ToolHandler> = {\n pm_run: (args) => runAction(args as PmActionInput),\n ...Object.fromEntries(\n Object.entries(NARROW_TOOL_ACTIONS).map(([tool, action]) => [\n tool,\n (args: Record<string, unknown>) => runAction({ ...args, action }),\n ]),\n ),\n};\n\n/** Resolve the pm action a tools/call invocation will dispatch, when knowable. */\nfunction resolveInvokedAction(\n toolName: string,\n args: Record<string, unknown>,\n): string | undefined {\n if (toolName === \"pm_run\") {\n return typeof args.action === \"string\" ? args.action : undefined;\n }\n return NARROW_TOOL_ACTIONS[toolName];\n}\n\n// pm-upi0: the pm-qxwu top-level detection cannot see inside the `options`\n// object, so a mutation-shaped key on a read tool (pm_deps options.dep) is\n// silently dropped before dispatch and the agent builds on state it never\n// created. Warn (without rejecting) on every options key absent from the\n// invoked action's contract; extension- and package-owned actions have no\n// contract table and keep arbitrary passthrough options.\nfunction detectUnexpectedOptionKeys(\n toolName: string,\n action: string | undefined,\n args: Record<string, unknown>,\n): string[] {\n const options = args.options;\n if (\n action === undefined ||\n typeof options !== \"object\" ||\n options === null ||\n Array.isArray(options)\n ) {\n return [];\n }\n const declared = pmToolActionNestedOptionKeys(action);\n if (declared === undefined) {\n return [];\n }\n const declaredSet = new Set(declared);\n const warnings: string[] = [];\n for (const key of Object.keys(options)) {\n if (declaredSet.has(key)) {\n continue;\n }\n const suggestion = nearestDeclaredKey(key, declared);\n warnings.push(\n suggestion !== undefined\n ? `Unknown option \"${key}\" for ${toolName} action \"${action}\" (did you mean \"${suggestion}\"?). The ${action} contract does not read it, so it has no effect; declared keys are: ${declared.join(\", \")}.`\n : `Unknown option \"${key}\" for ${toolName} action \"${action}\". The ${action} contract does not read it, so it has no effect; declared keys are: ${declared.join(\", \")}.`,\n );\n }\n return warnings;\n}\n\nfunction resultContent(\n result: unknown,\n warnings?: string[],\n): Record<string, unknown> {\n // pm-qxwu: warnings is additive — existing fields (content, structuredContent.result)\n // are never removed or renamed. The warnings array only appears when non-empty.\n const structuredContent: Record<string, unknown> =\n warnings !== undefined && warnings.length > 0\n ? { result, warnings }\n : { result };\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(result, null, 2),\n },\n ],\n structuredContent,\n };\n}\n\nfunction errorContent(error: unknown): Record<string, unknown> {\n const code = error instanceof PmCliError ? error.exitCode : 1;\n const message = error instanceof Error ? error.message : String(error);\n return {\n isError: true,\n content: [\n {\n type: \"text\",\n text: JSON.stringify({ error: message, code }, null, 2),\n },\n ],\n // Keep `result` present on the error envelope so consumers can read\n // `structuredContent.result` uniformly across success and failure (pm-l40h).\n structuredContent: { result: null, error: message, code },\n };\n}\n\n/** Implements handle request for the public runtime surface of this module. */\nexport async function handleRequest(\n request: JsonRpcRequest,\n): Promise<Record<string, unknown> | undefined> {\n if (!request.id && request.method?.startsWith(\"notifications/\")) {\n return undefined;\n }\n if (request.method === \"ping\") {\n return {};\n }\n if (request.method === \"initialize\") {\n return {\n protocolVersion: \"2025-06-18\",\n capabilities: { tools: {} },\n serverInfo: { name: \"pm-mcp\", version: PM_MCP_SERVER_VERSION },\n instructions:\n \"You have access to native pm CLI tools for git-based project management. \" +\n \"Use pm_next to pick the next actionable item, or pm_context or pm_search before creating new work. \" +\n \"Prefer narrow tools (pm_next, pm_context, pm_list, pm_get, pm_search, pm_create, pm_copy, pm_focus, pm_update, pm_append, pm_claim, pm_release, pm_close, pm_comments, pm_files, pm_docs, pm_notes, pm_learnings, pm_deps, pm_graph, pm_test, pm_validate, pm_health, pm_contracts, pm_schema, pm_profile, pm_config, pm_plan) over pm_run when they cover the operation. \" +\n \"Use pm_plan for agent harness Plan workflows: it provides Codex/Claude/Cursor-style planning with durable steps, dependencies, decisions, discoveries, validation, and materialization. \" +\n \"Use pm_schema and pm_config for workspace configuration: pm_schema manages custom item types/statuses and pm_config reads or writes settings keys. \" +\n \"Use pm_run with an explicit action for active package-owned operations, plus activity, aggregate, history, stats, test-all, and gc. \" +\n \"Use history-redact for audited history-stream redaction workflows, history-repair to re-anchor a drifted history chain, and history-compact to checkpoint/prune long history streams while preserving replay integrity. \" +\n \"Set author to 'claude-code-agent' on all mutations. \" +\n \"Do not pass path during real repository tracking — only pass path for sandbox or test runs.\",\n };\n }\n if (request.method === \"tools/list\") {\n return { tools: TOOLS };\n }\n if (request.method === \"tools/call\") {\n const params = asRecordClone(request.params);\n const name = readRequiredString(params, \"name\");\n const handler = Object.prototype.hasOwnProperty.call(HANDLERS, name)\n ? HANDLERS[name]\n : undefined;\n if (!handler) {\n throw new PmCliError(`Unknown pm MCP tool: ${name}`, 64);\n }\n // pm-ydkl: defensive HTML-entity decode for free-text fields. Claude / the\n // Anthropic MCP SDK HTML-encodes `<` / `>` (and friends) in tool arguments\n // before they reach pm-cli, which would otherwise leak `&lt;type&gt;` into\n // stored pm comments / notes / item bodies. Direct CLI calls are not\n // affected; decoding at the MCP boundary normalizes the agent path while\n // leaving normal text untouched.\n const args = decodeHtmlEntitiesInOptions(asRecordClone(params.arguments));\n // pm-qxwu: non-breaking detection of typo'd / unexpected top-level keys.\n // additionalProperties stays true so passthrough still works; we only warn.\n // pm-upi0 extends the same mechanism into the nested options object.\n const warnings = [\n ...detectUnexpectedTopLevelKeys(name, args),\n ...detectUnexpectedOptionKeys(\n name,\n resolveInvokedAction(name, args),\n args,\n ),\n ];\n for (const warning of warnings) {\n console.error(`[pm-mcp] ${warning}`);\n }\n // cwd is applied inside the serialized activation cycle (see withActiveExtensions),\n // so the chdir/restore is exclusive per request and cannot race a concurrent caller.\n const result = await handler(args);\n return resultContent(result, warnings);\n }\n throw new PmCliError(\n `Unsupported MCP method: ${request.method ?? \"(missing)\"}`,\n 64,\n );\n}\n\nfunction writeResponse(\n id: JsonRpcRequest[\"id\"],\n payload: Record<string, unknown>,\n): void {\n process.stdout.write(\n `${JSON.stringify({ jsonrpc: \"2.0\", id, result: payload })}\\n`,\n );\n}\n\nfunction writeError(id: JsonRpcRequest[\"id\"], error: unknown): void {\n const code = error instanceof PmCliError ? error.exitCode : -32603;\n const message = error instanceof Error ? error.message : String(error);\n process.stdout.write(\n `${JSON.stringify({ jsonrpc: \"2.0\", id, error: { code, message } })}\\n`,\n );\n}\n\n// pm-3puw: parse one JSON-RPC line, dispatch it, and write the response. Kept\n// as a standalone async unit so the stdio loop can enqueue it onto a serial\n// queue (process lines in arrival order) and tests can drive it directly.\n/** Implements process rpc line for the public runtime surface of this module. */\nexport async function processRpcLine(line: string): Promise<void> {\n if (line.trim().length === 0) {\n return;\n }\n let request: JsonRpcRequest;\n try {\n request = JSON.parse(line) as JsonRpcRequest;\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n writeError(null, new PmCliError(`Parse error: ${message}`, -32700));\n return;\n }\n if (\n typeof request !== \"object\" ||\n request === null ||\n Array.isArray(request)\n ) {\n writeError(\n null,\n new PmCliError(\"Invalid JSON-RPC request: expected an object\", -32600),\n );\n return;\n }\n const shouldRespond = Object.prototype.hasOwnProperty.call(request, \"id\");\n try {\n const result = await handleRequest(request);\n if (shouldRespond && result !== undefined) {\n writeResponse(request.id, result);\n }\n } catch (error) {\n if (!shouldRespond) {\n return;\n }\n if (request.method === \"tools/call\") {\n writeResponse(request.id, errorContent(error));\n } else {\n writeError(request.id, error);\n }\n }\n}\n\n/** Implements start mcp server for the public runtime surface of this module. */\nexport function startMcpServer(): void {\n const rl = readline.createInterface({\n input: process.stdin,\n crlfDelay: Infinity,\n });\n // pm-3puw: serialize line handling so pipelined requests are processed in\n // arrival order. The previous fire-and-forget handler ran requests\n // concurrently, so a client that pipelined two mutations on the same item\n // (without awaiting the first response) hit a lock conflict on the second.\n const queue = createSerialQueue();\n rl.on(\"line\", (line) => {\n void queue.enqueue(() => processRpcLine(line));\n });\n}\n\n// npm bin entries are symlinks (node_modules/.bin/pm-mcp -> dist/mcp/server.js),\n// so argv[1] must be realpath-resolved before comparing against this module's\n// path — a plain equality check made the published `pm-mcp` bin exit 0 without\n// ever starting the server (pm-qtbc).\n/** Implements check whether invoked as mcp main module for the public runtime surface of this module. */\nexport function isInvokedAsMcpMainModule(\n argvPath: string | undefined,\n moduleUrl: string,\n): boolean {\n if (!argvPath) {\n return false;\n }\n const selfPath = fileURLToPath(moduleUrl);\n if (argvPath === selfPath) {\n return true;\n }\n try {\n return realpathSync(argvPath) === realpathSync(selfPath);\n } catch {\n return false;\n }\n}\n\ntype RuntimeTestHooks = NonNullable<\n typeof globalThis.__pmCliActionRunnerTestHooks\n>;\ntype RuntimeTestHookKey = keyof RuntimeTestHooks;\n\nfunction readRuntimeTestHook<Key extends RuntimeTestHookKey>(\n key: Key,\n): RuntimeTestHooks[Key] {\n const runtimeTestHooks = globalThis.__pmCliActionRunnerTestHooks;\n if (runtimeTestHooks === undefined) {\n throw new PmCliError(\n `MCP runtime test hook \"${String(key)}\" is only available in test environments.`,\n 64,\n );\n }\n return runtimeTestHooks[key];\n}\n\n/** Public contract for test only, shared by SDK and presentation-layer consumers. */\nexport const _testOnly = {\n get closeManyOptionsFromFlat() {\n return readRuntimeTestHook(\"closeManyOptionsFromFlat\");\n },\n detectUnexpectedOptionKeys,\n detectUnexpectedTopLevelKeys,\n errorContent,\n get extensionOptionsFromArgs() {\n return readRuntimeTestHook(\"extensionOptionsFromArgs\");\n },\n get globalOptions() {\n return readRuntimeTestHook(\"globalOptions\");\n },\n get mutationListOptions() {\n return readRuntimeTestHook(\"mutationListOptions\");\n },\n nearestDeclaredKey,\n get normalizeActionName() {\n return readRuntimeTestHook(\"normalizeActionName\");\n },\n get normalizeCommandPath() {\n return readRuntimeTestHook(\"normalizeCommandPath\");\n },\n get normalizeMcpOptionsArrays() {\n return readRuntimeTestHook(\"normalizeMcpOptionsArrays\");\n },\n get normalizeMcpUpdateOptions() {\n return readRuntimeTestHook(\"normalizeMcpUpdateOptions\");\n },\n get optionsWithAuthor() {\n return readRuntimeTestHook(\"optionsWithAuthor\");\n },\n get readRequiredString() {\n return readRuntimeTestHook(\"readRequiredString\");\n },\n get readScalarString() {\n return readRuntimeTestHook(\"readScalarString\");\n },\n get readScalarStringAllowBlank() {\n return readRuntimeTestHook(\"readScalarStringAllowBlank\");\n },\n get readStringArray() {\n return readRuntimeTestHook(\"readStringArray\");\n },\n runAction,\n get updateManyOptionsFromFlat() {\n return readRuntimeTestHook(\"updateManyOptionsFromFlat\");\n },\n get withAddNoteOption() {\n return readRuntimeTestHook(\"withAddNoteOption\");\n },\n get withFilesDiscoveryOptions() {\n return readRuntimeTestHook(\"withFilesDiscoveryOptions\");\n },\n get withMutationCompaction() {\n return readRuntimeTestHook(\"withMutationCompaction\");\n },\n writeError,\n};\n\n/* c8 ignore start */\nif (isInvokedAsMcpMainModule(process.argv[1], import.meta.url)) {\n startMcpServer();\n}\n/* c8 ignore stop */\n"],"names":[],"mappings":";AACA;;;;GAIG;;;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BA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AAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IACD,SAAS;IACT,IAAI,yBAAyB;QAC3B,OAAO,mBAAmB,CAAC,2BAA2B,CAAC,CAAC;IAC1D,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,yBAAyB;QAC3B,OAAO,mBAAmB,CAAC,2BAA2B,CAAC,CAAC;IAC1D,CAAC;IACD,IAAI,sBAAsB;QACxB,OAAO,mBAAmB,CAAC,wBAAwB,CAAC,CAAC;IACvD,CAAC;IACD,UAAU;CACX,CAAC;AAEF,qBAAqB;AACrB,IAAI,wBAAwB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC/D,cAAc,EAAE,CAAC;AACnB,CAAC;AACD,oBAAoB","debugId":"1783660a-269d-5a07-bea8-66359c895c7c"}
@@ -4,8 +4,8 @@
4
4
  * Defines the Tool Definitions module for pm CLI source.
5
5
  */
6
6
 
7
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="478bf194-a9d0-5c6a-b70e-d15164927fda")}catch(e){}}();
8
- import { PM_TOOL_ACTIONS } from "../sdk/cli-contracts/enum-contracts.js";
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3cdd51a1-c5ae-500e-b228-b3f2cf101aae")}catch(e){}}();
8
+ import { GRAPH_SUBCOMMAND_VALUES, PM_TOOL_ACTIONS, } from "../sdk/cli-contracts/enum-contracts.js";
9
9
  import { COPY_FLAG_CONTRACTS } from "../sdk/cli-contracts/flag-contracts.js";
10
10
  import { RUNTIME_STATUS_ROLE_VALUES } from "../types.js";
11
11
  const TOOL_SCHEMA_BASE = {
@@ -336,11 +336,24 @@ export const TOOLS = [
336
336
  },
337
337
  {
338
338
  name: "pm_deps",
339
- description: "Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with depth, node, edge, token, and cursor bounds.",
339
+ description: "Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with direction, kind, depth, node, edge, token, and cursor bounds; context returns a counts-first summary, per-node roles/reasons, root evidence pointers, and enumerated missing references.",
340
340
  inputSchema: objectSchema({ id: idSchema, options: { type: "object" } }, [
341
341
  "id",
342
342
  ]),
343
343
  },
344
+ {
345
+ name: "pm_graph",
346
+ description: "Run bounded workspace relationship-graph queries: ancestors/descendants (hierarchy), predecessors/successors (ordering), paths, impact (blast radius), analyze (execution + knowledge analytics), audit (governance findings), communities (label-propagation clusters), redundancy (transitively implied edges), dominators (structural bottlenecks), and plan (dry-run remediation proposals derived from the audit). Traversals, paths, impact, and dominators require id; paths also requires target. Options support kind, maxDepth, limit, after, direction, maxPaths, sample, exemptIsolate, and counts-first summary.",
347
+ inputSchema: objectSchema({
348
+ subcommand: {
349
+ type: "string",
350
+ enum: [...GRAPH_SUBCOMMAND_VALUES],
351
+ },
352
+ id: idSchema,
353
+ target: idSchema,
354
+ options: { type: "object" },
355
+ }, ["subcommand"]),
356
+ },
344
357
  {
345
358
  name: "pm_test",
346
359
  description: "List, add, remove, or run linked tests for a pm item.",
@@ -571,4 +584,4 @@ export function buildMcpToolContracts() {
571
584
  }).sort((left, right) => left.name.localeCompare(right.name));
572
585
  }
573
586
  //# sourceMappingURL=tool-definitions.js.map
574
- //# debugId=478bf194-a9d0-5c6a-b70e-d15164927fda
587
+ //# debugId=3cdd51a1-c5ae-500e-b228-b3f2cf101aae
@@ -1 +1 @@
1
- {"version":3,"file":"tool-definitions.js","sources":["mcp/tool-definitions.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module mcp/tool-definitions\n *\n * Defines the Tool Definitions module for pm CLI source.\n */\nimport { PM_TOOL_ACTIONS } from \"../sdk/cli-contracts/enum-contracts.js\";\nimport { COPY_FLAG_CONTRACTS } from \"../sdk/cli-contracts/flag-contracts.js\";\nimport { RUNTIME_STATUS_ROLE_VALUES } from \"../types.js\";\n\n/**\n * Static MCP tool surface for the pm MCP server.\n *\n * Kept as a dependency-light data module (only the enum contract import) so the\n * `pm contracts` command can snapshot the tool surface into the contract\n * golden file (pm-4os2) without importing the full MCP server runtime, and so\n * the server itself stays the single consumer of the dispatch handlers.\n */\nexport interface ToolDefinition {\n /** Value that configures or reports name for this contract. */\n name: string;\n /** Value that configures or reports description for this contract. */\n description: string;\n /** Value that configures or reports input schema for this contract. */\n inputSchema: Record<string, unknown>;\n}\n\nconst TOOL_SCHEMA_BASE = {\n type: \"object\",\n properties: {\n cwd: {\n type: \"string\",\n description:\n \"Workspace directory to run the native pm operation in. Defaults to the MCP server process cwd.\",\n },\n path: {\n type: \"string\",\n description:\n \"Optional pm data root, equivalent to PM_PATH/global --path. Leave unset for real repository tracking.\",\n },\n author: {\n type: \"string\",\n description:\n \"Mutation author. Defaults to PM_AUTHOR or pm settings when supported by the underlying operation.\",\n },\n },\n additionalProperties: true,\n} as const;\n\nconst idSchema = {\n type: \"string\",\n description: \"pm item id, for example pm-abc1.\",\n};\n\n// pm-fd8n: derive the pm_run action enumeration from the canonical\n// PM_TOOL_ACTIONS contract instead of a hand-maintained prose list, so the\n// MCP-facing description can never drift from the actual supported actions.\nconst PM_RUN_ACTION_DESCRIPTION =\n `Operation name (one of): ${PM_TOOL_ACTIONS.join(\", \")}. ` +\n \"Package-owned actions are available dynamically when their provider package is installed.\";\n\nconst LIST_TOP_LEVEL_OPTION_PROPERTIES: Record<string, unknown> = {\n status: { type: \"string\", description: \"Alias for options.status.\" },\n type: { type: \"string\", description: \"Alias for options.type.\" },\n tag: { type: \"string\", description: \"Alias for options.tag.\" },\n priority: { type: \"string\", description: \"Alias for options.priority.\" },\n limit: {\n type: [\"string\", \"number\"],\n description: \"Alias for options.limit.\",\n },\n offset: {\n type: [\"string\", \"number\"],\n description: \"Alias for options.offset.\",\n },\n};\n\nconst SEARCH_TOP_LEVEL_OPTION_PROPERTIES: Record<string, unknown> = {\n mode: { type: \"string\", description: \"Alias for options.mode.\" },\n status: { type: \"string\", description: \"Alias for options.status.\" },\n type: { type: \"string\", description: \"Alias for options.type.\" },\n tag: { type: \"string\", description: \"Alias for options.tag.\" },\n priority: { type: \"string\", description: \"Alias for options.priority.\" },\n limit: {\n type: [\"string\", \"number\"],\n description: \"Alias for options.limit.\",\n },\n};\n\nconst COPY_TOP_LEVEL_OPTION_PROPERTIES: Record<string, unknown> = Object.fromEntries(\n COPY_FLAG_CONTRACTS.filter(({ flag }) => flag !== \"--author\").map(({ flag }) => [\n flag.slice(2),\n { type: \"string\", description: `Alias for options.${flag.slice(2).replaceAll(\"-\", \"_\")}.` },\n ]),\n);\n\nfunction objectSchema(\n properties: Record<string, unknown>,\n required: string[] = [],\n): Record<string, unknown> {\n return {\n ...TOOL_SCHEMA_BASE,\n properties: {\n ...TOOL_SCHEMA_BASE.properties,\n ...properties,\n },\n required,\n };\n}\n\n/** Public contract for tools, shared by SDK and presentation-layer consumers. */\nexport const TOOLS: ToolDefinition[] = [\n {\n name: \"pm_run\",\n description:\n \"Run any supported pm operation natively through the pm library. Use this for commands not covered by narrower pm_* tools.\",\n inputSchema: objectSchema(\n {\n action: {\n type: \"string\",\n description: PM_RUN_ACTION_DESCRIPTION,\n },\n id: idSchema,\n query: {\n type: \"string\",\n description: \"Search query for action=search.\",\n },\n reason: {\n type: \"string\",\n description: \"Close reason for action=close.\",\n },\n force: {\n type: \"boolean\",\n description:\n \"Force ownership/terminal-state override when supported.\",\n },\n // pm-v68d: the schema-specific subcommand enum and add-type/add-status\n // properties migrated to the dedicated pm_schema tool. action=schema\n // still accepts them as passthrough, but agents should prefer pm_schema.\n subcommand: {\n type: \"string\",\n description:\n \"Subcommand selector for actions that take one (for example telemetry, or schema — prefer the dedicated pm_schema tool for schema operations).\",\n },\n options: {\n type: \"object\",\n description: \"Underlying pm command options using camelCase keys.\",\n },\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"For mutation actions, return the full changed_fields array instead of the default changed_field_count.\",\n },\n idOnly: {\n type: \"boolean\",\n description:\n \"For single-item mutation actions, return only id and status.\",\n },\n },\n [\"action\"],\n ),\n },\n {\n name: \"pm_context\",\n description:\n \"Return the agent-oriented project context snapshot. \" +\n \"Pass options.depth=brief|standard|deep|full (full = every section with no per-section row cap), \" +\n \"options.parent='<id>' to scope the snapshot to one item's subtree (the item plus all descendants), \" +\n \"options.fields='id,title,priority' to project focus rows to a field subset for low-token reads, \" +\n \"or options.section=['hierarchy','progress',...] to pick sections.\",\n inputSchema: objectSchema({ options: { type: \"object\" } }),\n },\n {\n name: \"pm_next\",\n description:\n \"Recommend the next actionable work item: the single highest-priority READY item \" +\n \"(active status, no open blockers, no open children; completed containers surface only when no concrete leaf work is ready) plus the ranked ready and blocked queues. \" +\n \"The recommended item carries a rationale and each blocked item lists the open blockers gating it. \" +\n \"Pass options.parent='<id>' to scope to one subtree, options.limit=N to cap ready rows, \" +\n \"options.readyOnly=true to omit the blocked list, or filters (options.type/tag/priority/assignee/sprint/release). \" +\n \"The most token-efficient 'what should I do now?' read for agents.\",\n inputSchema: objectSchema({ options: { type: \"object\" } }),\n },\n {\n name: \"pm_search\",\n description:\n \"Search pm items with keyword, semantic, or hybrid search. \" +\n \"Defaults to a compact projection for token efficiency. \" +\n \"Pass options.mode=keyword|semantic|hybrid, options.limit=N to cap hits, \" +\n \"options.status='all' for no lifecycle restriction, \" +\n \"options.fields='id,title,score' for a custom projection, or options.full=true for full item bodies (can be large). \" +\n \"The result echoes the applied filters and projection mode in query_summary.\",\n inputSchema: objectSchema(\n {\n query: { type: \"string\" },\n options: { type: \"object\" },\n ...SEARCH_TOP_LEVEL_OPTION_PROPERTIES,\n },\n [\"query\"],\n ),\n },\n {\n name: \"pm_list\",\n description:\n \"List pm items with status/type/tag/priority filters. Defaults to compact projection for token efficiency. \" +\n \"options.status accepts CSV (all,open,in_progress). \" +\n \"Pass options.compact=false or options.includeBody=true for full bodies/comments. \" +\n \"Pass options.brief=true for ultra-terse (id/status/type/title only). \" +\n \"Pass options.fields='id,title,priority' for custom projection. \" +\n \"Pass options.limit=N to cap row count. \" +\n \"The result echoes the applied filters and projection mode in query_summary.\",\n inputSchema: objectSchema({\n options: { type: \"object\" },\n ...LIST_TOP_LEVEL_OPTION_PROPERTIES,\n }),\n },\n {\n name: \"pm_get\",\n description:\n \"Read one pm item with shared SDK projections. Pass options.depth='brief' or options.fields='id,title,status' for low-token inspection, options.fields='id,schedule.start_at' for schedule context, or options.at='7' / an ISO timestamp for a verified mutation-free historical read. Parent results include bounded child counts, samples, and continuation metadata.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n options: {\n type: \"object\",\n description:\n \"Get options such as depth=brief|standard|deep|full, fields=id,title,status, or at=<version|ISO timestamp>.\",\n },\n },\n [\"id\"],\n ),\n },\n {\n name: \"pm_create\",\n description:\n \"Create a pm item natively and write pm history. \" +\n \"Output is compact by default (changed_fields replaced with changed_field_count for token efficiency); pass fullChangedFields=true for the full changed_fields array.\",\n inputSchema: objectSchema(\n {\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"Return full changed_fields instead of changed_field_count.\",\n },\n allowMissingParent: {\n type: \"boolean\",\n description:\n \"Allow unresolved parent references and emit a validation warning.\",\n },\n options: {\n type: \"object\",\n description: \"Create options. title and description are required.\",\n },\n },\n [\"options\"],\n ),\n },\n {\n name: \"pm_copy\",\n description:\n \"Copy an existing pm item into a new id while resetting lifecycle fields. \" +\n \"Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n ...COPY_TOP_LEVEL_OPTION_PROPERTIES,\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"Return full changed_fields instead of changed_field_count.\",\n },\n idOnly: {\n type: \"boolean\",\n description: \"Return only id and status.\",\n },\n options: {\n type: \"object\",\n description:\n \"Copy options such as title override, author, and message.\",\n },\n },\n [\"id\"],\n ),\n },\n {\n name: \"pm_focus\",\n description:\n \"Set, clear, or show the session focused item. When focused, pm_create defaults its parent to the focused item \" +\n \"(an explicit parent still overrides). Pass id to focus an item, options.clear=true to clear, or neither to show current focus.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n clear: {\n type: \"boolean\",\n description: \"Clear the focused item (cannot be combined with id).\",\n },\n options: {\n type: \"object\",\n description: \"Focus options such as clear (boolean).\",\n },\n },\n [],\n ),\n },\n {\n name: \"pm_update\",\n description:\n \"Update pm item metadata/body/dependencies/log seeds natively. \" +\n \"Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields delta.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"Return full changed_fields instead of changed_field_count.\",\n },\n options: { type: \"object\" },\n },\n [\"id\", \"options\"],\n ),\n },\n {\n name: \"pm_append\",\n description:\n \"Append markdown text to a pm item body and write pm history. Useful for seeding evidence/log entries before close. \" +\n \"Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n body: {\n type: \"string\",\n description:\n \"Markdown text to append to the item body. Required here or as options.body.\",\n },\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"Return full changed_fields instead of changed_field_count.\",\n },\n options: {\n type: \"object\",\n description: \"Append options such as body, author, and message.\",\n },\n },\n [\"id\"],\n ),\n },\n {\n name: \"pm_claim\",\n description: \"Claim a pm item.\",\n inputSchema: objectSchema(\n { id: idSchema, force: { type: \"boolean\" }, options: { type: \"object\" } },\n [\"id\"],\n ),\n },\n {\n name: \"pm_release\",\n description: \"Release a pm item claim.\",\n inputSchema: objectSchema(\n { id: idSchema, force: { type: \"boolean\" }, options: { type: \"object\" } },\n [\"id\"],\n ),\n },\n {\n name: \"pm_close\",\n description:\n \"Close a pm item with optional close reason and optional close validation (reason requirement follows governance settings). \" +\n \"Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n reason: {\n type: \"string\",\n description:\n \"Close reason text when provided or required by governance settings.\",\n },\n duplicateOf: {\n type: \"string\",\n description:\n \"Canonical item id when closing this item as a duplicate.\",\n },\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"Return full changed_fields instead of changed_field_count.\",\n },\n idOnly: { type: \"boolean\", description: \"Return only id and status.\" },\n options: { type: \"object\" },\n },\n [\"id\"],\n ),\n },\n {\n name: \"pm_comments\",\n description:\n \"List, add, edit, or delete comments on a pm item. Use options.add to append, options.edit=<1-based index> with replacement text to fix a comment, or options.delete=<1-based index> to remove one. \" +\n \"List calls default to the most recent 20 comments with total_count/has_more metadata for token efficiency. \" +\n \"Pass options.limit=N to choose a page size, options.limit=0 for summary-only metadata, or options.full=true for full history.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_files\",\n description:\n \"List, add, remove, or validate linked files for a pm item.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_docs\",\n description: \"List, add, or remove linked docs for a pm item.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_notes\",\n description:\n \"List or add structured notes on a pm item. Use options.add to append a note; omit it to list existing notes.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_learnings\",\n description:\n \"List or add learnings on a pm item. Use options.add to capture a learning/insight; omit it to list existing learnings.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_deps\",\n description:\n \"Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with depth, node, edge, token, and cursor bounds.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_test\",\n description: \"List, add, remove, or run linked tests for a pm item.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_validate\",\n description: \"Run pm validation checks.\",\n inputSchema: objectSchema({ options: { type: \"object\" } }),\n },\n {\n name: \"pm_health\",\n description:\n \"Run pm health diagnostics. Pass options.brief=true for compact low-token details, options.skipIntegrity=true, options.skipDrift=true, options.skipVectors=true for a fast status-only check, or options.full=true for the complete deep check.\",\n inputSchema: objectSchema({ options: { type: \"object\" } }),\n },\n {\n name: \"pm_contracts\",\n description:\n \"Inspect pm command, flag, schema, and availability contracts.\",\n inputSchema: objectSchema({ options: { type: \"object\" } }),\n },\n {\n name: \"pm_schema\",\n description:\n \"Inspect or modify the workspace item-type/status/field schema (pm schema). \" +\n \"subcommand selects the operation; name carries the item type name (show/add-type/remove-type), status id (show-status/add-status/remove-status), or field key (show-field/add-field/remove-field). \" +\n \"apply-preset adopts a domain type preset; add-type with infer=true derives types from title-prefix conventions. \" +\n \"Schema mutations write workspace config files, not item history.\",\n inputSchema: objectSchema(\n {\n subcommand: {\n type: \"string\",\n enum: [\n \"list\",\n \"show\",\n \"show-status\",\n \"add-type\",\n \"remove-type\",\n \"add-status\",\n \"remove-status\",\n \"add-field\",\n \"remove-field\",\n \"list-fields\",\n \"show-field\",\n \"apply-preset\",\n ],\n description: \"Schema subcommand to run.\",\n },\n name: {\n type: \"string\",\n description:\n \"Item type name (show/add-type/remove-type), status id (show-status/add-status/remove-status), or custom field key (show-field/add-field/remove-field). Required for those subcommands.\",\n },\n description: {\n type: \"string\",\n description:\n \"Custom item type, status, or field description for add-type/add-status/add-field.\",\n },\n defaultStatus: {\n type: \"string\",\n description: \"Default status for add-type.\",\n },\n folder: { type: \"string\", description: \"Storage folder for add-type.\" },\n alias: {\n type: \"array\",\n items: { type: \"string\" },\n description:\n \"Aliases for add-type/add-status, or extra CLI flag aliases for add-field.\",\n },\n role: {\n type: \"array\",\n items: { type: \"string\", enum: [...RUNTIME_STATUS_ROLE_VALUES] },\n description: `Lifecycle roles for add-status: ${RUNTIME_STATUS_ROLE_VALUES.join(\", \")}.`,\n },\n order: {\n type: \"number\",\n description: \"Display/sort order for add-status.\",\n },\n fieldType: {\n type: \"string\",\n enum: [\"string\", \"number\", \"boolean\", \"string_array\"],\n description: \"Value type for a custom field (add-field).\",\n },\n commands: {\n type: \"array\",\n items: { type: \"string\" },\n description:\n \"Commands a custom field is wired onto (add-field): create, update, update_many, list, search, calendar, context.\",\n },\n cliFlag: {\n type: \"string\",\n description:\n \"Override the auto-derived CLI flag for a custom field (add-field).\",\n },\n required: {\n type: \"boolean\",\n description: \"Mark a custom field as always required (add-field).\",\n },\n requiredOnCreate: {\n type: \"boolean\",\n description:\n \"Mark a custom field as required at create time (add-field).\",\n },\n allowUnset: {\n type: \"boolean\",\n description:\n \"Whether a custom field may be cleared via --unset (add-field); defaults to true.\",\n },\n requiredTypes: {\n type: \"array\",\n items: { type: \"string\" },\n description:\n \"Restrict a custom field's requirement to specific item types (add-field).\",\n },\n typePreset: {\n type: \"string\",\n enum: [\"agile\", \"ops\", \"research\"],\n description: \"Domain type preset to adopt (apply-preset).\",\n },\n infer: {\n type: \"boolean\",\n description:\n \"Infer item types from title-prefix conventions (add-type); previews unless apply is true.\",\n },\n minCount: {\n type: \"number\",\n description:\n \"Minimum items sharing a prefix for add-type inference (default 10).\",\n },\n apply: {\n type: \"boolean\",\n description:\n \"Register inferred types (add-type infer); without it the call previews only.\",\n },\n force: {\n type: \"boolean\",\n description:\n \"Override removal guardrails for destructive schema changes when supported.\",\n },\n options: {\n type: \"object\",\n description: \"Additional schema options using camelCase keys.\",\n },\n },\n [\"subcommand\"],\n ),\n },\n {\n name: \"pm_profile\",\n description:\n \"List, show, apply, or lint project profiles (pm profile) — archetype bundles that stage item types, statuses, fields, per-type workflows, config knobs, create templates, and recommended packages. \" +\n \"subcommand selects the operation; name carries the profile name (agile, ops, research) for show/apply/lint. \" +\n \"apply stages every dimension idempotently; dryRun previews the diff without writing; lint reports author-time consistency findings (graded error/warning) without touching the tracker. Profile staging writes workspace config/schema files, not item history.\",\n inputSchema: objectSchema(\n {\n subcommand: {\n type: \"string\",\n enum: [\"list\", \"show\", \"apply\", \"lint\"],\n description: \"Profile subcommand to run.\",\n },\n name: {\n type: \"string\",\n description:\n \"Profile name for show/apply/lint. Required for those subcommands. Built-ins are agile, ops, and research; an active extension can contribute additional archetype names that resolve here too.\",\n },\n dryRun: {\n type: \"boolean\",\n description:\n \"Preview the apply diff without writing any files (apply).\",\n },\n author: { type: \"string\", description: \"Mutation author for apply.\" },\n force: {\n type: \"boolean\",\n description: \"Force ownership/lock override for apply.\",\n },\n options: {\n type: \"object\",\n description: \"Additional profile options using camelCase keys.\",\n },\n },\n [\"subcommand\"],\n ),\n },\n {\n name: \"pm_config\",\n description:\n \"Read or write pm workspace configuration (pm config). \" +\n \"configAction selects get/set/list/export; key/value address a single setting for get/set. \" +\n \"scope chooses the project (default) or global settings file.\",\n inputSchema: objectSchema(\n {\n configAction: {\n type: \"string\",\n enum: [\"get\", \"set\", \"list\", \"export\"],\n description:\n \"Config operation to perform. get/set require key; list/export dump the resolved settings surface.\",\n },\n key: {\n type: \"string\",\n description:\n \"Settings key for get/set, for example governance-require-close-reason, telemetry-tracking, or a nested leaf such as search_provider (dash and underscore variants accepted; configAction=get without a key lists supported keys in the error).\",\n },\n value: {\n type: \"string\",\n description: \"New value for configAction=set.\",\n },\n scope: {\n type: \"string\",\n enum: [\"project\", \"global\"],\n description: \"Settings scope to read or write. Defaults to project.\",\n },\n options: {\n type: \"object\",\n description:\n \"Additional config options such as criterion, clearCriteria, format, or policy.\",\n },\n },\n [\"configAction\"],\n ),\n },\n {\n name: \"pm_plan\",\n description:\n \"Run agent-optimized Plan workflows. options.subcommand selects: create|show|add-step|update-step|complete-step|block-step|reorder-step|remove-step|link|unlink|decision|discovery|validation|resume|approve|materialize. Provide id for all non-create subcommands; provide stepRef for step lifecycle subcommands. Plans store agent-readable steps with dependencies, decisions, discoveries, validation, and resume context.\",\n inputSchema: objectSchema({\n id: {\n type: \"string\",\n description: \"Plan id (required for all subcommands except create).\",\n },\n stepRef: {\n type: \"string\",\n description: \"Step id or order for step lifecycle subcommands.\",\n },\n reorderTo: { type: \"number\", description: \"New order for reorder-step.\" },\n options: {\n type: \"object\",\n description:\n \"Plan options including subcommand, stepRef, stepStatus, link, depth, etc.\",\n },\n }),\n },\n];\n\n/** Stable projection of one MCP tool definition for the contract golden file (pm-4os2): tool name, description, required top-level fields, and the full inputSchema shape. Any drift (typo'd property, dropped required field, changed TOOL_SCHEMA_BASE) shows up in `pnpm contracts:check`. */\nexport interface McpToolContract {\n /** Value that configures or reports name for this contract. */\n name: string;\n /** Value that configures or reports description for this contract. */\n description: string;\n /** Value that configures or reports required for this contract. */\n required: string[];\n /** Value that configures or reports input schema for this contract. */\n input_schema: Record<string, unknown>;\n}\n\n/** Implements build mcp tool contracts for the public runtime surface of this module. */\nexport function buildMcpToolContracts(): McpToolContract[] {\n return TOOLS.map((tool) => {\n const schemaRequired = tool.inputSchema[\"required\"];\n const required = Array.isArray(schemaRequired)\n ? schemaRequired\n .map((entry) => String(entry))\n .sort((left, right) => left.localeCompare(right))\n : [];\n return {\n name: tool.name,\n description: tool.description,\n required,\n input_schema: tool.inputSchema,\n };\n }).sort((left, right) => left.name.localeCompare(right.name));\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,a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C,WAAW;YAC7B,QAAQ;YACR,YAAY,EAAE,IAAI,CAAC,WAAW;SAC/B,CAAC;IACJ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAChE,CAAC","debugId":"478bf194-a9d0-5c6a-b70e-d15164927fda"}
1
+ {"version":3,"file":"tool-definitions.js","sources":["mcp/tool-definitions.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module mcp/tool-definitions\n *\n * Defines the Tool Definitions module for pm CLI source.\n */\nimport {\n GRAPH_SUBCOMMAND_VALUES,\n PM_TOOL_ACTIONS,\n} from \"../sdk/cli-contracts/enum-contracts.js\";\nimport { COPY_FLAG_CONTRACTS } from \"../sdk/cli-contracts/flag-contracts.js\";\nimport { RUNTIME_STATUS_ROLE_VALUES } from \"../types.js\";\n\n/**\n * Static MCP tool surface for the pm MCP server.\n *\n * Kept as a dependency-light data module (only the enum contract import) so the\n * `pm contracts` command can snapshot the tool surface into the contract\n * golden file (pm-4os2) without importing the full MCP server runtime, and so\n * the server itself stays the single consumer of the dispatch handlers.\n */\nexport interface ToolDefinition {\n /** Value that configures or reports name for this contract. */\n name: string;\n /** Value that configures or reports description for this contract. */\n description: string;\n /** Value that configures or reports input schema for this contract. */\n inputSchema: Record<string, unknown>;\n}\n\nconst TOOL_SCHEMA_BASE = {\n type: \"object\",\n properties: {\n cwd: {\n type: \"string\",\n description:\n \"Workspace directory to run the native pm operation in. Defaults to the MCP server process cwd.\",\n },\n path: {\n type: \"string\",\n description:\n \"Optional pm data root, equivalent to PM_PATH/global --path. Leave unset for real repository tracking.\",\n },\n author: {\n type: \"string\",\n description:\n \"Mutation author. Defaults to PM_AUTHOR or pm settings when supported by the underlying operation.\",\n },\n },\n additionalProperties: true,\n} as const;\n\nconst idSchema = {\n type: \"string\",\n description: \"pm item id, for example pm-abc1.\",\n};\n\n// pm-fd8n: derive the pm_run action enumeration from the canonical\n// PM_TOOL_ACTIONS contract instead of a hand-maintained prose list, so the\n// MCP-facing description can never drift from the actual supported actions.\nconst PM_RUN_ACTION_DESCRIPTION =\n `Operation name (one of): ${PM_TOOL_ACTIONS.join(\", \")}. ` +\n \"Package-owned actions are available dynamically when their provider package is installed.\";\n\nconst LIST_TOP_LEVEL_OPTION_PROPERTIES: Record<string, unknown> = {\n status: { type: \"string\", description: \"Alias for options.status.\" },\n type: { type: \"string\", description: \"Alias for options.type.\" },\n tag: { type: \"string\", description: \"Alias for options.tag.\" },\n priority: { type: \"string\", description: \"Alias for options.priority.\" },\n limit: {\n type: [\"string\", \"number\"],\n description: \"Alias for options.limit.\",\n },\n offset: {\n type: [\"string\", \"number\"],\n description: \"Alias for options.offset.\",\n },\n};\n\nconst SEARCH_TOP_LEVEL_OPTION_PROPERTIES: Record<string, unknown> = {\n mode: { type: \"string\", description: \"Alias for options.mode.\" },\n status: { type: \"string\", description: \"Alias for options.status.\" },\n type: { type: \"string\", description: \"Alias for options.type.\" },\n tag: { type: \"string\", description: \"Alias for options.tag.\" },\n priority: { type: \"string\", description: \"Alias for options.priority.\" },\n limit: {\n type: [\"string\", \"number\"],\n description: \"Alias for options.limit.\",\n },\n};\n\nconst COPY_TOP_LEVEL_OPTION_PROPERTIES: Record<string, unknown> = Object.fromEntries(\n COPY_FLAG_CONTRACTS.filter(({ flag }) => flag !== \"--author\").map(({ flag }) => [\n flag.slice(2),\n { type: \"string\", description: `Alias for options.${flag.slice(2).replaceAll(\"-\", \"_\")}.` },\n ]),\n);\n\nfunction objectSchema(\n properties: Record<string, unknown>,\n required: string[] = [],\n): Record<string, unknown> {\n return {\n ...TOOL_SCHEMA_BASE,\n properties: {\n ...TOOL_SCHEMA_BASE.properties,\n ...properties,\n },\n required,\n };\n}\n\n/** Public contract for tools, shared by SDK and presentation-layer consumers. */\nexport const TOOLS: ToolDefinition[] = [\n {\n name: \"pm_run\",\n description:\n \"Run any supported pm operation natively through the pm library. Use this for commands not covered by narrower pm_* tools.\",\n inputSchema: objectSchema(\n {\n action: {\n type: \"string\",\n description: PM_RUN_ACTION_DESCRIPTION,\n },\n id: idSchema,\n query: {\n type: \"string\",\n description: \"Search query for action=search.\",\n },\n reason: {\n type: \"string\",\n description: \"Close reason for action=close.\",\n },\n force: {\n type: \"boolean\",\n description:\n \"Force ownership/terminal-state override when supported.\",\n },\n // pm-v68d: the schema-specific subcommand enum and add-type/add-status\n // properties migrated to the dedicated pm_schema tool. action=schema\n // still accepts them as passthrough, but agents should prefer pm_schema.\n subcommand: {\n type: \"string\",\n description:\n \"Subcommand selector for actions that take one (for example telemetry, or schema — prefer the dedicated pm_schema tool for schema operations).\",\n },\n options: {\n type: \"object\",\n description: \"Underlying pm command options using camelCase keys.\",\n },\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"For mutation actions, return the full changed_fields array instead of the default changed_field_count.\",\n },\n idOnly: {\n type: \"boolean\",\n description:\n \"For single-item mutation actions, return only id and status.\",\n },\n },\n [\"action\"],\n ),\n },\n {\n name: \"pm_context\",\n description:\n \"Return the agent-oriented project context snapshot. \" +\n \"Pass options.depth=brief|standard|deep|full (full = every section with no per-section row cap), \" +\n \"options.parent='<id>' to scope the snapshot to one item's subtree (the item plus all descendants), \" +\n \"options.fields='id,title,priority' to project focus rows to a field subset for low-token reads, \" +\n \"or options.section=['hierarchy','progress',...] to pick sections.\",\n inputSchema: objectSchema({ options: { type: \"object\" } }),\n },\n {\n name: \"pm_next\",\n description:\n \"Recommend the next actionable work item: the single highest-priority READY item \" +\n \"(active status, no open blockers, no open children; completed containers surface only when no concrete leaf work is ready) plus the ranked ready and blocked queues. \" +\n \"The recommended item carries a rationale and each blocked item lists the open blockers gating it. \" +\n \"Pass options.parent='<id>' to scope to one subtree, options.limit=N to cap ready rows, \" +\n \"options.readyOnly=true to omit the blocked list, or filters (options.type/tag/priority/assignee/sprint/release). \" +\n \"The most token-efficient 'what should I do now?' read for agents.\",\n inputSchema: objectSchema({ options: { type: \"object\" } }),\n },\n {\n name: \"pm_search\",\n description:\n \"Search pm items with keyword, semantic, or hybrid search. \" +\n \"Defaults to a compact projection for token efficiency. \" +\n \"Pass options.mode=keyword|semantic|hybrid, options.limit=N to cap hits, \" +\n \"options.status='all' for no lifecycle restriction, \" +\n \"options.fields='id,title,score' for a custom projection, or options.full=true for full item bodies (can be large). \" +\n \"The result echoes the applied filters and projection mode in query_summary.\",\n inputSchema: objectSchema(\n {\n query: { type: \"string\" },\n options: { type: \"object\" },\n ...SEARCH_TOP_LEVEL_OPTION_PROPERTIES,\n },\n [\"query\"],\n ),\n },\n {\n name: \"pm_list\",\n description:\n \"List pm items with status/type/tag/priority filters. Defaults to compact projection for token efficiency. \" +\n \"options.status accepts CSV (all,open,in_progress). \" +\n \"Pass options.compact=false or options.includeBody=true for full bodies/comments. \" +\n \"Pass options.brief=true for ultra-terse (id/status/type/title only). \" +\n \"Pass options.fields='id,title,priority' for custom projection. \" +\n \"Pass options.limit=N to cap row count. \" +\n \"The result echoes the applied filters and projection mode in query_summary.\",\n inputSchema: objectSchema({\n options: { type: \"object\" },\n ...LIST_TOP_LEVEL_OPTION_PROPERTIES,\n }),\n },\n {\n name: \"pm_get\",\n description:\n \"Read one pm item with shared SDK projections. Pass options.depth='brief' or options.fields='id,title,status' for low-token inspection, options.fields='id,schedule.start_at' for schedule context, or options.at='7' / an ISO timestamp for a verified mutation-free historical read. Parent results include bounded child counts, samples, and continuation metadata.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n options: {\n type: \"object\",\n description:\n \"Get options such as depth=brief|standard|deep|full, fields=id,title,status, or at=<version|ISO timestamp>.\",\n },\n },\n [\"id\"],\n ),\n },\n {\n name: \"pm_create\",\n description:\n \"Create a pm item natively and write pm history. \" +\n \"Output is compact by default (changed_fields replaced with changed_field_count for token efficiency); pass fullChangedFields=true for the full changed_fields array.\",\n inputSchema: objectSchema(\n {\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"Return full changed_fields instead of changed_field_count.\",\n },\n allowMissingParent: {\n type: \"boolean\",\n description:\n \"Allow unresolved parent references and emit a validation warning.\",\n },\n options: {\n type: \"object\",\n description: \"Create options. title and description are required.\",\n },\n },\n [\"options\"],\n ),\n },\n {\n name: \"pm_copy\",\n description:\n \"Copy an existing pm item into a new id while resetting lifecycle fields. \" +\n \"Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n ...COPY_TOP_LEVEL_OPTION_PROPERTIES,\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"Return full changed_fields instead of changed_field_count.\",\n },\n idOnly: {\n type: \"boolean\",\n description: \"Return only id and status.\",\n },\n options: {\n type: \"object\",\n description:\n \"Copy options such as title override, author, and message.\",\n },\n },\n [\"id\"],\n ),\n },\n {\n name: \"pm_focus\",\n description:\n \"Set, clear, or show the session focused item. When focused, pm_create defaults its parent to the focused item \" +\n \"(an explicit parent still overrides). Pass id to focus an item, options.clear=true to clear, or neither to show current focus.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n clear: {\n type: \"boolean\",\n description: \"Clear the focused item (cannot be combined with id).\",\n },\n options: {\n type: \"object\",\n description: \"Focus options such as clear (boolean).\",\n },\n },\n [],\n ),\n },\n {\n name: \"pm_update\",\n description:\n \"Update pm item metadata/body/dependencies/log seeds natively. \" +\n \"Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields delta.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"Return full changed_fields instead of changed_field_count.\",\n },\n options: { type: \"object\" },\n },\n [\"id\", \"options\"],\n ),\n },\n {\n name: \"pm_append\",\n description:\n \"Append markdown text to a pm item body and write pm history. Useful for seeding evidence/log entries before close. \" +\n \"Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n body: {\n type: \"string\",\n description:\n \"Markdown text to append to the item body. Required here or as options.body.\",\n },\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"Return full changed_fields instead of changed_field_count.\",\n },\n options: {\n type: \"object\",\n description: \"Append options such as body, author, and message.\",\n },\n },\n [\"id\"],\n ),\n },\n {\n name: \"pm_claim\",\n description: \"Claim a pm item.\",\n inputSchema: objectSchema(\n { id: idSchema, force: { type: \"boolean\" }, options: { type: \"object\" } },\n [\"id\"],\n ),\n },\n {\n name: \"pm_release\",\n description: \"Release a pm item claim.\",\n inputSchema: objectSchema(\n { id: idSchema, force: { type: \"boolean\" }, options: { type: \"object\" } },\n [\"id\"],\n ),\n },\n {\n name: \"pm_close\",\n description:\n \"Close a pm item with optional close reason and optional close validation (reason requirement follows governance settings). \" +\n \"Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.\",\n inputSchema: objectSchema(\n {\n id: idSchema,\n reason: {\n type: \"string\",\n description:\n \"Close reason text when provided or required by governance settings.\",\n },\n duplicateOf: {\n type: \"string\",\n description:\n \"Canonical item id when closing this item as a duplicate.\",\n },\n fullChangedFields: {\n type: \"boolean\",\n description:\n \"Return full changed_fields instead of changed_field_count.\",\n },\n idOnly: { type: \"boolean\", description: \"Return only id and status.\" },\n options: { type: \"object\" },\n },\n [\"id\"],\n ),\n },\n {\n name: \"pm_comments\",\n description:\n \"List, add, edit, or delete comments on a pm item. Use options.add to append, options.edit=<1-based index> with replacement text to fix a comment, or options.delete=<1-based index> to remove one. \" +\n \"List calls default to the most recent 20 comments with total_count/has_more metadata for token efficiency. \" +\n \"Pass options.limit=N to choose a page size, options.limit=0 for summary-only metadata, or options.full=true for full history.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_files\",\n description:\n \"List, add, remove, or validate linked files for a pm item.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_docs\",\n description: \"List, add, or remove linked docs for a pm item.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_notes\",\n description:\n \"List or add structured notes on a pm item. Use options.add to append a note; omit it to list existing notes.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_learnings\",\n description:\n \"List or add learnings on a pm item. Use options.add to capture a learning/insight; omit it to list existing learnings.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_deps\",\n description:\n \"Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with direction, kind, depth, node, edge, token, and cursor bounds; context returns a counts-first summary, per-node roles/reasons, root evidence pointers, and enumerated missing references.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_graph\",\n description:\n \"Run bounded workspace relationship-graph queries: ancestors/descendants (hierarchy), predecessors/successors (ordering), paths, impact (blast radius), analyze (execution + knowledge analytics), audit (governance findings), communities (label-propagation clusters), redundancy (transitively implied edges), dominators (structural bottlenecks), and plan (dry-run remediation proposals derived from the audit). Traversals, paths, impact, and dominators require id; paths also requires target. Options support kind, maxDepth, limit, after, direction, maxPaths, sample, exemptIsolate, and counts-first summary.\",\n inputSchema: objectSchema(\n {\n subcommand: {\n type: \"string\",\n enum: [...GRAPH_SUBCOMMAND_VALUES],\n },\n id: idSchema,\n target: idSchema,\n options: { type: \"object\" },\n },\n [\"subcommand\"],\n ),\n },\n {\n name: \"pm_test\",\n description: \"List, add, remove, or run linked tests for a pm item.\",\n inputSchema: objectSchema({ id: idSchema, options: { type: \"object\" } }, [\n \"id\",\n ]),\n },\n {\n name: \"pm_validate\",\n description: \"Run pm validation checks.\",\n inputSchema: objectSchema({ options: { type: \"object\" } }),\n },\n {\n name: \"pm_health\",\n description:\n \"Run pm health diagnostics. Pass options.brief=true for compact low-token details, options.skipIntegrity=true, options.skipDrift=true, options.skipVectors=true for a fast status-only check, or options.full=true for the complete deep check.\",\n inputSchema: objectSchema({ options: { type: \"object\" } }),\n },\n {\n name: \"pm_contracts\",\n description:\n \"Inspect pm command, flag, schema, and availability contracts.\",\n inputSchema: objectSchema({ options: { type: \"object\" } }),\n },\n {\n name: \"pm_schema\",\n description:\n \"Inspect or modify the workspace item-type/status/field schema (pm schema). \" +\n \"subcommand selects the operation; name carries the item type name (show/add-type/remove-type), status id (show-status/add-status/remove-status), or field key (show-field/add-field/remove-field). \" +\n \"apply-preset adopts a domain type preset; add-type with infer=true derives types from title-prefix conventions. \" +\n \"Schema mutations write workspace config files, not item history.\",\n inputSchema: objectSchema(\n {\n subcommand: {\n type: \"string\",\n enum: [\n \"list\",\n \"show\",\n \"show-status\",\n \"add-type\",\n \"remove-type\",\n \"add-status\",\n \"remove-status\",\n \"add-field\",\n \"remove-field\",\n \"list-fields\",\n \"show-field\",\n \"apply-preset\",\n ],\n description: \"Schema subcommand to run.\",\n },\n name: {\n type: \"string\",\n description:\n \"Item type name (show/add-type/remove-type), status id (show-status/add-status/remove-status), or custom field key (show-field/add-field/remove-field). Required for those subcommands.\",\n },\n description: {\n type: \"string\",\n description:\n \"Custom item type, status, or field description for add-type/add-status/add-field.\",\n },\n defaultStatus: {\n type: \"string\",\n description: \"Default status for add-type.\",\n },\n folder: { type: \"string\", description: \"Storage folder for add-type.\" },\n alias: {\n type: \"array\",\n items: { type: \"string\" },\n description:\n \"Aliases for add-type/add-status, or extra CLI flag aliases for add-field.\",\n },\n role: {\n type: \"array\",\n items: { type: \"string\", enum: [...RUNTIME_STATUS_ROLE_VALUES] },\n description: `Lifecycle roles for add-status: ${RUNTIME_STATUS_ROLE_VALUES.join(\", \")}.`,\n },\n order: {\n type: \"number\",\n description: \"Display/sort order for add-status.\",\n },\n fieldType: {\n type: \"string\",\n enum: [\"string\", \"number\", \"boolean\", \"string_array\"],\n description: \"Value type for a custom field (add-field).\",\n },\n commands: {\n type: \"array\",\n items: { type: \"string\" },\n description:\n \"Commands a custom field is wired onto (add-field): create, update, update_many, list, search, calendar, context.\",\n },\n cliFlag: {\n type: \"string\",\n description:\n \"Override the auto-derived CLI flag for a custom field (add-field).\",\n },\n required: {\n type: \"boolean\",\n description: \"Mark a custom field as always required (add-field).\",\n },\n requiredOnCreate: {\n type: \"boolean\",\n description:\n \"Mark a custom field as required at create time (add-field).\",\n },\n allowUnset: {\n type: \"boolean\",\n description:\n \"Whether a custom field may be cleared via --unset (add-field); defaults to true.\",\n },\n requiredTypes: {\n type: \"array\",\n items: { type: \"string\" },\n description:\n \"Restrict a custom field's requirement to specific item types (add-field).\",\n },\n typePreset: {\n type: \"string\",\n enum: [\"agile\", \"ops\", \"research\"],\n description: \"Domain type preset to adopt (apply-preset).\",\n },\n infer: {\n type: \"boolean\",\n description:\n \"Infer item types from title-prefix conventions (add-type); previews unless apply is true.\",\n },\n minCount: {\n type: \"number\",\n description:\n \"Minimum items sharing a prefix for add-type inference (default 10).\",\n },\n apply: {\n type: \"boolean\",\n description:\n \"Register inferred types (add-type infer); without it the call previews only.\",\n },\n force: {\n type: \"boolean\",\n description:\n \"Override removal guardrails for destructive schema changes when supported.\",\n },\n options: {\n type: \"object\",\n description: \"Additional schema options using camelCase keys.\",\n },\n },\n [\"subcommand\"],\n ),\n },\n {\n name: \"pm_profile\",\n description:\n \"List, show, apply, or lint project profiles (pm profile) — archetype bundles that stage item types, statuses, fields, per-type workflows, config knobs, create templates, and recommended packages. \" +\n \"subcommand selects the operation; name carries the profile name (agile, ops, research) for show/apply/lint. \" +\n \"apply stages every dimension idempotently; dryRun previews the diff without writing; lint reports author-time consistency findings (graded error/warning) without touching the tracker. Profile staging writes workspace config/schema files, not item history.\",\n inputSchema: objectSchema(\n {\n subcommand: {\n type: \"string\",\n enum: [\"list\", \"show\", \"apply\", \"lint\"],\n description: \"Profile subcommand to run.\",\n },\n name: {\n type: \"string\",\n description:\n \"Profile name for show/apply/lint. Required for those subcommands. Built-ins are agile, ops, and research; an active extension can contribute additional archetype names that resolve here too.\",\n },\n dryRun: {\n type: \"boolean\",\n description:\n \"Preview the apply diff without writing any files (apply).\",\n },\n author: { type: \"string\", description: \"Mutation author for apply.\" },\n force: {\n type: \"boolean\",\n description: \"Force ownership/lock override for apply.\",\n },\n options: {\n type: \"object\",\n description: \"Additional profile options using camelCase keys.\",\n },\n },\n [\"subcommand\"],\n ),\n },\n {\n name: \"pm_config\",\n description:\n \"Read or write pm workspace configuration (pm config). \" +\n \"configAction selects get/set/list/export; key/value address a single setting for get/set. \" +\n \"scope chooses the project (default) or global settings file.\",\n inputSchema: objectSchema(\n {\n configAction: {\n type: \"string\",\n enum: [\"get\", \"set\", \"list\", \"export\"],\n description:\n \"Config operation to perform. get/set require key; list/export dump the resolved settings surface.\",\n },\n key: {\n type: \"string\",\n description:\n \"Settings key for get/set, for example governance-require-close-reason, telemetry-tracking, or a nested leaf such as search_provider (dash and underscore variants accepted; configAction=get without a key lists supported keys in the error).\",\n },\n value: {\n type: \"string\",\n description: \"New value for configAction=set.\",\n },\n scope: {\n type: \"string\",\n enum: [\"project\", \"global\"],\n description: \"Settings scope to read or write. Defaults to project.\",\n },\n options: {\n type: \"object\",\n description:\n \"Additional config options such as criterion, clearCriteria, format, or policy.\",\n },\n },\n [\"configAction\"],\n ),\n },\n {\n name: \"pm_plan\",\n description:\n \"Run agent-optimized Plan workflows. options.subcommand selects: create|show|add-step|update-step|complete-step|block-step|reorder-step|remove-step|link|unlink|decision|discovery|validation|resume|approve|materialize. Provide id for all non-create subcommands; provide stepRef for step lifecycle subcommands. Plans store agent-readable steps with dependencies, decisions, discoveries, validation, and resume context.\",\n inputSchema: objectSchema({\n id: {\n type: \"string\",\n description: \"Plan id (required for all subcommands except create).\",\n },\n stepRef: {\n type: \"string\",\n description: \"Step id or order for step lifecycle subcommands.\",\n },\n reorderTo: { type: \"number\", description: \"New order for reorder-step.\" },\n options: {\n type: \"object\",\n description:\n \"Plan options including subcommand, stepRef, stepStatus, link, depth, etc.\",\n },\n }),\n },\n];\n\n/** Stable projection of one MCP tool definition for the contract golden file (pm-4os2): tool name, description, required top-level fields, and the full inputSchema shape. Any drift (typo'd property, dropped required field, changed TOOL_SCHEMA_BASE) shows up in `pnpm contracts:check`. */\nexport interface McpToolContract {\n /** Value that configures or reports name for this contract. */\n name: string;\n /** Value that configures or reports description for this contract. */\n description: string;\n /** Value that configures or reports required for this contract. */\n required: string[];\n /** Value that configures or reports input schema for this contract. */\n input_schema: Record<string, unknown>;\n}\n\n/** Implements build mcp tool contracts for the public runtime surface of this module. */\nexport function buildMcpToolContracts(): McpToolContract[] {\n return TOOLS.map((tool) => {\n const schemaRequired = tool.inputSchema[\"required\"];\n const required = Array.isArray(schemaRequired)\n ? schemaRequired\n .map((entry) => String(entry))\n .sort((left, right) => left.localeCompare(right))\n : [];\n return {\n name: tool.name,\n description: tool.description,\n required,\n input_schema: tool.inputSchema,\n };\n }).sort((left, right) => left.name.localeCompare(right.name));\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,uBAAuB,EACvB,eAAe,GAChB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAmBzD,MAAM,gBAAgB,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,GAAG,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,gGAAgG;SACnG;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,uGAAuG;SAC1G;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,mGAAmG;SACtG;KACF;IACD,oBAAoB,EAAE,IAAI;CAClB,CAAC;AAEX,MAAM,QAAQ,GAAG;IACf,IAAI,E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AC/B,CAAC;IACJ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAChE,CAAC","debugId":"3cdd51a1-c5ae-500e-b228-b3f2cf101aae"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @module sdk/actionability
3
+ *
4
+ * Public dependency-aware scheduling primitives shared by CLI adapters,
5
+ * embedded tools, and automation. The implementation remains pure: callers
6
+ * provide item metadata plus the runtime status registry and receive stable
7
+ * blocker or ready-work classifications without storage or rendering side
8
+ * effects.
9
+ */
10
+ export { collectBlockedByIds, collectDependencyBlockedIds, computeActionabilityReport, resolveItemBlockers, type ActionabilityReport, type ActionableEntry, type ResolvedBlocker, } from "../core/item/actionability.js";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @module sdk/actionability
3
+ *
4
+ * Public dependency-aware scheduling primitives shared by CLI adapters,
5
+ * embedded tools, and automation. The implementation remains pure: callers
6
+ * provide item metadata plus the runtime status registry and receive stable
7
+ * blocker or ready-work classifications without storage or rendering side
8
+ * effects.
9
+ */
10
+
11
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="53b0b70e-5894-56e2-9a06-47fe4c292767")}catch(e){}}();
12
+ export { collectBlockedByIds, collectDependencyBlockedIds, computeActionabilityReport, resolveItemBlockers, } from "../core/item/actionability.js";
13
+ //# sourceMappingURL=actionability.js.map
14
+ //# debugId=53b0b70e-5894-56e2-9a06-47fe4c292767
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actionability.js","sources":["sdk/actionability.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/actionability\n *\n * Public dependency-aware scheduling primitives shared by CLI adapters,\n * embedded tools, and automation. The implementation remains pure: callers\n * provide item metadata plus the runtime status registry and receive stable\n * blocker or ready-work classifications without storage or rendering side\n * effects.\n */\nexport {\n collectBlockedByIds,\n collectDependencyBlockedIds,\n computeActionabilityReport,\n resolveItemBlockers,\n type ActionabilityReport,\n type ActionableEntry,\n type ResolvedBlocker,\n} from \"../core/item/actionability.js\";\n"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;;AACH,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,GAIpB,MAAM,+BAA+B,CAAC","debugId":"53b0b70e-5894-56e2-9a06-47fe4c292767"}
@@ -23,9 +23,13 @@ export declare const PM_EXTENSION_POLICY_SURFACE_CONTRACTS: readonly ["commands.
23
23
  /** Restricts pm extension policy surface contract values accepted by command, SDK, and storage contracts. */
24
24
  export type PmExtensionPolicySurfaceContract = (typeof PM_EXTENSION_POLICY_SURFACE_CONTRACTS)[number];
25
25
  /** Public contract for pm core command names, shared by SDK and presentation-layer consumers. */
26
- export declare const PM_CORE_COMMAND_NAMES: readonly ["init", "config", "extension", "package", "packages", "install", "upgrade", "create", "copy", "focus", "list", "list-all", "list-draft", "list-open", "list-in-progress", "list-blocked", "list-closed", "list-canceled", "aggregate", "context", "ctx", "get", "search", "eval", "next", "history", "history-redact", "history-repair", "history-compact", "schema", "profile", "activity", "restore", "update", "update-many", "close", "close-many", "delete", "append", "comments", "notes", "learnings", "files", "docs", "deps", "plan", "test", "test-all", "telemetry", "stats", "health", "validate", "gc", "contracts", "claim", "release", "start-task", "pause-task", "close-task", "meet", "event", "remind", "help"];
26
+ export declare const PM_CORE_COMMAND_NAMES: readonly ["init", "config", "extension", "package", "packages", "install", "upgrade", "create", "copy", "focus", "list", "list-all", "list-draft", "list-open", "list-in-progress", "list-blocked", "list-closed", "list-canceled", "aggregate", "context", "ctx", "get", "graph", "search", "eval", "next", "history", "history-redact", "history-repair", "history-compact", "schema", "profile", "activity", "restore", "update", "update-many", "close", "close-many", "delete", "append", "comments", "notes", "learnings", "files", "docs", "deps", "plan", "test", "test-all", "telemetry", "stats", "health", "validate", "gc", "contracts", "claim", "release", "start-task", "pause-task", "close-task", "meet", "event", "remind", "help"];
27
+ /** Supported values accepted by the graph subcommand contract across CLI, SDK, and MCP surfaces. */
28
+ export declare const GRAPH_SUBCOMMAND_VALUES: readonly ["ancestors", "descendants", "predecessors", "successors", "paths", "impact", "analyze", "audit", "communities", "redundancy", "dominators", "plan"];
29
+ /** Restricts graph subcommand values accepted by command, SDK, and MCP contracts. */
30
+ export type GraphSubcommand = (typeof GRAPH_SUBCOMMAND_VALUES)[number];
27
31
  /** Public contract for pm tool actions, shared by SDK and presentation-layer consumers. */
28
- export declare const PM_TOOL_ACTIONS: readonly ["init", "config", "extension-init", "extension-install", "extension-uninstall", "extension-explore", "extension-manage", "extension-describe", "extension-reload", "extension-doctor", "extension-catalog", "extension-adopt", "extension-adopt-all", "extension-activate", "extension-deactivate", "extension", "package-init", "package-install", "package-uninstall", "package-explore", "package-manage", "package-describe", "package-reload", "package-doctor", "package-catalog", "package-adopt", "package-adopt-all", "package-activate", "package-deactivate", "package", "install", "upgrade", "create", "copy", "focus", "list", "list-all", "list-draft", "list-open", "list-in-progress", "list-blocked", "list-closed", "list-canceled", "aggregate", "context", "ctx", "get", "search", "next", "history", "history-redact", "history-repair", "history-compact", "schema", "profile", "activity", "restore", "update", "update-many", "close", "close-many", "delete", "append", "comments", "plan", "notes", "learnings", "files", "docs", "deps", "test", "test-all", "telemetry", "stats", "health", "validate", "gc", "contracts", "claim", "release", "start-task", "pause-task", "close-task"];
32
+ export declare const PM_TOOL_ACTIONS: readonly ["init", "config", "extension-init", "extension-install", "extension-uninstall", "extension-explore", "extension-manage", "extension-describe", "extension-reload", "extension-doctor", "extension-catalog", "extension-adopt", "extension-adopt-all", "extension-activate", "extension-deactivate", "extension", "package-init", "package-install", "package-uninstall", "package-explore", "package-manage", "package-describe", "package-reload", "package-doctor", "package-catalog", "package-adopt", "package-adopt-all", "package-activate", "package-deactivate", "package", "install", "upgrade", "create", "copy", "focus", "list", "list-all", "list-draft", "list-open", "list-in-progress", "list-blocked", "list-closed", "list-canceled", "aggregate", "context", "ctx", "get", "search", "next", "history", "history-redact", "history-repair", "history-compact", "schema", "profile", "activity", "restore", "update", "update-many", "close", "close-many", "delete", "append", "comments", "plan", "notes", "learnings", "files", "docs", "deps", "graph", "test", "test-all", "telemetry", "stats", "health", "validate", "gc", "contracts", "claim", "release", "start-task", "pause-task", "close-task"];
29
33
  /** Restricts pm tool action values accepted by command, SDK, and storage contracts. */
30
34
  export type PmToolAction = (typeof PM_TOOL_ACTIONS)[number];
31
35
  /** Implements check whether pm tool action for the public runtime surface of this module. */
@@ -4,7 +4,7 @@
4
4
  * Defines SDK command-contract metadata for Enum Contracts.
5
5
  */
6
6
 
7
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2f7d8ae8-4fb8-5ec4-a440-d42f8499589f")}catch(e){}}();
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a665adfd-c6a7-544c-a3f9-55a6d5fa4472")}catch(e){}}();
8
8
  import { KNOWN_EXTENSION_CAPABILITIES, KNOWN_EXTENSION_POLICY_MODES, KNOWN_EXTENSION_POLICY_SURFACES, KNOWN_EXTENSION_SANDBOX_PROFILES, KNOWN_EXTENSION_SERVICE_NAMES, KNOWN_EXTENSION_TRUST_MODES, } from "../../core/extensions/extension-types.js";
9
9
  /** Public contract for pm extension capability contracts, shared by SDK and presentation-layer consumers. */
10
10
  export const PM_EXTENSION_CAPABILITY_CONTRACTS = [
@@ -54,6 +54,7 @@ export const PM_CORE_COMMAND_NAMES = [
54
54
  "context",
55
55
  "ctx",
56
56
  "get",
57
+ "graph",
57
58
  "search",
58
59
  "eval",
59
60
  "next",
@@ -96,6 +97,21 @@ export const PM_CORE_COMMAND_NAMES = [
96
97
  "remind",
97
98
  "help",
98
99
  ];
100
+ /** Supported values accepted by the graph subcommand contract across CLI, SDK, and MCP surfaces. */
101
+ export const GRAPH_SUBCOMMAND_VALUES = [
102
+ "ancestors",
103
+ "descendants",
104
+ "predecessors",
105
+ "successors",
106
+ "paths",
107
+ "impact",
108
+ "analyze",
109
+ "audit",
110
+ "communities",
111
+ "redundancy",
112
+ "dominators",
113
+ "plan",
114
+ ];
99
115
  /** Public contract for pm tool actions, shared by SDK and presentation-layer consumers. */
100
116
  export const PM_TOOL_ACTIONS = [
101
117
  "init",
@@ -168,6 +184,7 @@ export const PM_TOOL_ACTIONS = [
168
184
  "files",
169
185
  "docs",
170
186
  "deps",
187
+ "graph",
171
188
  "test",
172
189
  "test-all",
173
190
  "telemetry",
@@ -203,4 +220,4 @@ export function isPmExtensionPolicySurfaceContract(value) {
203
220
  return PM_EXTENSION_POLICY_SURFACE_CONTRACTS.includes(value);
204
221
  }
205
222
  //# sourceMappingURL=enum-contracts.js.map
206
- //# debugId=2f7d8ae8-4fb8-5ec4-a440-d42f8499589f
223
+ //# debugId=a665adfd-c6a7-544c-a3f9-55a6d5fa4472
@@ -1 +1 @@
1
- {"version":3,"file":"enum-contracts.js","sources":["sdk/cli-contracts/enum-contracts.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/cli-contracts/enum-contracts\n *\n * Defines SDK command-contract metadata for Enum Contracts.\n */\nimport {\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_SERVICE_NAMES,\n KNOWN_EXTENSION_TRUST_MODES,\n} from \"../../core/extensions/extension-types.js\";\n\n/** Public contract for pm extension capability contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_CAPABILITY_CONTRACTS = [\n ...KNOWN_EXTENSION_CAPABILITIES,\n] as const;\n\n/** Restricts pm extension capability contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionCapabilityContract =\n (typeof PM_EXTENSION_CAPABILITY_CONTRACTS)[number];\n\n/** Public contract for pm extension service name contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_SERVICE_NAME_CONTRACTS = [\n ...KNOWN_EXTENSION_SERVICE_NAMES,\n] as const;\n\n/** Restricts pm extension service name contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionServiceNameContract =\n (typeof PM_EXTENSION_SERVICE_NAME_CONTRACTS)[number];\n\n/** Public contract for pm extension policy mode contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_POLICY_MODE_CONTRACTS = [\n ...KNOWN_EXTENSION_POLICY_MODES,\n] as const;\n/** Restricts pm extension policy mode contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionPolicyModeContract =\n (typeof PM_EXTENSION_POLICY_MODE_CONTRACTS)[number];\n/** Public contract for pm extension trust mode contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_TRUST_MODE_CONTRACTS = [\n ...KNOWN_EXTENSION_TRUST_MODES,\n] as const;\n/** Restricts pm extension trust mode contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionTrustModeContract =\n (typeof PM_EXTENSION_TRUST_MODE_CONTRACTS)[number];\n/** Public contract for pm extension sandbox profile contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS = [\n ...KNOWN_EXTENSION_SANDBOX_PROFILES,\n] as const;\n/** Restricts pm extension sandbox profile contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionSandboxProfileContract =\n (typeof PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS)[number];\n\n/** Public contract for pm extension policy surface contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_POLICY_SURFACE_CONTRACTS = [\n ...KNOWN_EXTENSION_POLICY_SURFACES,\n] as const;\n/** Restricts pm extension policy surface contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionPolicySurfaceContract =\n (typeof PM_EXTENSION_POLICY_SURFACE_CONTRACTS)[number];\n\n/** Public contract for pm core command names, shared by SDK and presentation-layer consumers. */\nexport const PM_CORE_COMMAND_NAMES = [\n \"init\",\n \"config\",\n \"extension\",\n \"package\",\n \"packages\",\n \"install\",\n \"upgrade\",\n \"create\",\n \"copy\",\n \"focus\",\n \"list\",\n \"list-all\",\n \"list-draft\",\n \"list-open\",\n \"list-in-progress\",\n \"list-blocked\",\n \"list-closed\",\n \"list-canceled\",\n \"aggregate\",\n \"context\",\n \"ctx\",\n \"get\",\n \"search\",\n \"eval\",\n \"next\",\n \"history\",\n \"history-redact\",\n \"history-repair\",\n \"history-compact\",\n \"schema\",\n \"profile\",\n \"activity\",\n \"restore\",\n \"update\",\n \"update-many\",\n \"close\",\n \"close-many\",\n \"delete\",\n \"append\",\n \"comments\",\n \"notes\",\n \"learnings\",\n \"files\",\n \"docs\",\n \"deps\",\n \"plan\",\n \"test\",\n \"test-all\",\n \"telemetry\",\n \"stats\",\n \"health\",\n \"validate\",\n \"gc\",\n \"contracts\",\n \"claim\",\n \"release\",\n \"start-task\",\n \"pause-task\",\n \"close-task\",\n \"meet\",\n \"event\",\n \"remind\",\n \"help\",\n] as const;\n\n/** Public contract for pm tool actions, shared by SDK and presentation-layer consumers. */\nexport const PM_TOOL_ACTIONS = [\n \"init\",\n \"config\",\n \"extension-init\",\n \"extension-install\",\n \"extension-uninstall\",\n \"extension-explore\",\n \"extension-manage\",\n \"extension-describe\",\n \"extension-reload\",\n \"extension-doctor\",\n \"extension-catalog\",\n \"extension-adopt\",\n \"extension-adopt-all\",\n \"extension-activate\",\n \"extension-deactivate\",\n \"extension\",\n \"package-init\",\n \"package-install\",\n \"package-uninstall\",\n \"package-explore\",\n \"package-manage\",\n \"package-describe\",\n \"package-reload\",\n \"package-doctor\",\n \"package-catalog\",\n \"package-adopt\",\n \"package-adopt-all\",\n \"package-activate\",\n \"package-deactivate\",\n \"package\",\n \"install\",\n \"upgrade\",\n \"create\",\n \"copy\",\n \"focus\",\n \"list\",\n \"list-all\",\n \"list-draft\",\n \"list-open\",\n \"list-in-progress\",\n \"list-blocked\",\n \"list-closed\",\n \"list-canceled\",\n \"aggregate\",\n \"context\",\n \"ctx\",\n \"get\",\n \"search\",\n \"next\",\n \"history\",\n \"history-redact\",\n \"history-repair\",\n \"history-compact\",\n \"schema\",\n \"profile\",\n \"activity\",\n \"restore\",\n \"update\",\n \"update-many\",\n \"close\",\n \"close-many\",\n \"delete\",\n \"append\",\n \"comments\",\n \"plan\",\n \"notes\",\n \"learnings\",\n \"files\",\n \"docs\",\n \"deps\",\n \"test\",\n \"test-all\",\n \"telemetry\",\n \"stats\",\n \"health\",\n \"validate\",\n \"gc\",\n \"contracts\",\n \"claim\",\n \"release\",\n \"start-task\",\n \"pause-task\",\n \"close-task\",\n] as const;\n\n/** Restricts pm tool action values accepted by command, SDK, and storage contracts. */\nexport type PmToolAction = (typeof PM_TOOL_ACTIONS)[number];\n\n/** Implements check whether pm tool action for the public runtime surface of this module. */\nexport function isPmToolAction(value: string): value is PmToolAction {\n return PM_TOOL_ACTIONS.includes(value as PmToolAction);\n}\n\n/** Implements check whether pm extension capability contract for the public runtime surface of this module. */\nexport function isPmExtensionCapabilityContract(\n value: string,\n): value is PmExtensionCapabilityContract {\n return PM_EXTENSION_CAPABILITY_CONTRACTS.includes(\n value as PmExtensionCapabilityContract,\n );\n}\n\n/** Implements check whether pm extension service name contract for the public runtime surface of this module. */\nexport function isPmExtensionServiceNameContract(\n value: string,\n): value is PmExtensionServiceNameContract {\n return PM_EXTENSION_SERVICE_NAME_CONTRACTS.includes(\n value as PmExtensionServiceNameContract,\n );\n}\n\n/** Implements check whether pm extension policy mode contract for the public runtime surface of this module. */\nexport function isPmExtensionPolicyModeContract(\n value: string,\n): value is PmExtensionPolicyModeContract {\n return PM_EXTENSION_POLICY_MODE_CONTRACTS.includes(\n value as PmExtensionPolicyModeContract,\n );\n}\n\n/** Implements check whether pm extension policy surface contract for the public runtime surface of this module. */\nexport function isPmExtensionPolicySurfaceContract(\n value: string,\n): value is PmExtensionPolicySurfaceContract {\n return PM_EXTENSION_POLICY_SURFACE_CONTRACTS.includes(\n value as PmExtensionPolicySurfaceContract,\n );\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,0CAA0C,CAAC;AAElD,6GAA6G;AAC7G,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,GAAG,4BAA4B;CACvB,CAAC;AAMX,+GAA+G;AAC/G,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,GAAG,6BAA6B;CACxB,CAAC;AAMX,8GAA8G;AAC9G,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,4BAA4B;CACvB,CAAC;AAIX,6GAA6G;AAC7G,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,GAAG,2BAA2B;CACtB,CAAC;AAIX,kHAAkH;AAClH,MAAM,CAAC,MAAM,sCAAsC,GAAG;IACpD,GAAG,gCAAgC;CAC3B,CAAC;AAKX,iHAAiH;AACjH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,GAAG,+BAA+B;CAC1B,CAAC;AAKX,iGAAiG;AACjG,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM;IACN,QAAQ;IACR,WAAW;IACX,SAAS;IACT,UAAU;IACV,SAAS;IACT,SAAS;IACT,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,UAAU;IACV,YAAY;IACZ,WAAW;IAC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AQ;IACR,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,QAAQ;IACR,SAAS;IACT,UAAU;IACV,SAAS;IACT,QAAQ;IACR,aAAa;IACb,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,MAAM;IACN,OAAO;IACP,WAAW;IACX,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,UAAU;IACV,WAAW;IACX,OAAO;IACP,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,WAAW;IACX,OAAO;IACP,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,YAAY;CACJ,CAAC;AAKX,6FAA6F;AAC7F,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAqB,CAAC,CAAC;AACzD,CAAC;AAED,+GAA+G;AAC/G,MAAM,UAAU,+BAA+B,CAC7C,KAAa;IAEb,OAAO,iCAAiC,CAAC,QAAQ,CAC/C,KAAsC,CACvC,CAAC;AACJ,CAAC;AAED,iHAAiH;AACjH,MAAM,UAAU,gCAAgC,CAC9C,KAAa;IAEb,OAAO,mCAAmC,CAAC,QAAQ,CACjD,KAAuC,CACxC,CAAC;AACJ,CAAC;AAED,gHAAgH;AAChH,MAAM,UAAU,+BAA+B,CAC7C,KAAa;IAEb,OAAO,kCAAkC,CAAC,QAAQ,CAChD,KAAsC,CACvC,CAAC;AACJ,CAAC;AAED,mHAAmH;AACnH,MAAM,UAAU,kCAAkC,CAChD,KAAa;IAEb,OAAO,qCAAqC,CAAC,QAAQ,CACnD,KAAyC,CAC1C,CAAC;AACJ,CAAC","debugId":"2f7d8ae8-4fb8-5ec4-a440-d42f8499589f"}
1
+ {"version":3,"file":"enum-contracts.js","sources":["sdk/cli-contracts/enum-contracts.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/cli-contracts/enum-contracts\n *\n * Defines SDK command-contract metadata for Enum Contracts.\n */\nimport {\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_SERVICE_NAMES,\n KNOWN_EXTENSION_TRUST_MODES,\n} from \"../../core/extensions/extension-types.js\";\n\n/** Public contract for pm extension capability contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_CAPABILITY_CONTRACTS = [\n ...KNOWN_EXTENSION_CAPABILITIES,\n] as const;\n\n/** Restricts pm extension capability contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionCapabilityContract =\n (typeof PM_EXTENSION_CAPABILITY_CONTRACTS)[number];\n\n/** Public contract for pm extension service name contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_SERVICE_NAME_CONTRACTS = [\n ...KNOWN_EXTENSION_SERVICE_NAMES,\n] as const;\n\n/** Restricts pm extension service name contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionServiceNameContract =\n (typeof PM_EXTENSION_SERVICE_NAME_CONTRACTS)[number];\n\n/** Public contract for pm extension policy mode contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_POLICY_MODE_CONTRACTS = [\n ...KNOWN_EXTENSION_POLICY_MODES,\n] as const;\n/** Restricts pm extension policy mode contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionPolicyModeContract =\n (typeof PM_EXTENSION_POLICY_MODE_CONTRACTS)[number];\n/** Public contract for pm extension trust mode contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_TRUST_MODE_CONTRACTS = [\n ...KNOWN_EXTENSION_TRUST_MODES,\n] as const;\n/** Restricts pm extension trust mode contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionTrustModeContract =\n (typeof PM_EXTENSION_TRUST_MODE_CONTRACTS)[number];\n/** Public contract for pm extension sandbox profile contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS = [\n ...KNOWN_EXTENSION_SANDBOX_PROFILES,\n] as const;\n/** Restricts pm extension sandbox profile contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionSandboxProfileContract =\n (typeof PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS)[number];\n\n/** Public contract for pm extension policy surface contracts, shared by SDK and presentation-layer consumers. */\nexport const PM_EXTENSION_POLICY_SURFACE_CONTRACTS = [\n ...KNOWN_EXTENSION_POLICY_SURFACES,\n] as const;\n/** Restricts pm extension policy surface contract values accepted by command, SDK, and storage contracts. */\nexport type PmExtensionPolicySurfaceContract =\n (typeof PM_EXTENSION_POLICY_SURFACE_CONTRACTS)[number];\n\n/** Public contract for pm core command names, shared by SDK and presentation-layer consumers. */\nexport const PM_CORE_COMMAND_NAMES = [\n \"init\",\n \"config\",\n \"extension\",\n \"package\",\n \"packages\",\n \"install\",\n \"upgrade\",\n \"create\",\n \"copy\",\n \"focus\",\n \"list\",\n \"list-all\",\n \"list-draft\",\n \"list-open\",\n \"list-in-progress\",\n \"list-blocked\",\n \"list-closed\",\n \"list-canceled\",\n \"aggregate\",\n \"context\",\n \"ctx\",\n \"get\",\n \"graph\",\n \"search\",\n \"eval\",\n \"next\",\n \"history\",\n \"history-redact\",\n \"history-repair\",\n \"history-compact\",\n \"schema\",\n \"profile\",\n \"activity\",\n \"restore\",\n \"update\",\n \"update-many\",\n \"close\",\n \"close-many\",\n \"delete\",\n \"append\",\n \"comments\",\n \"notes\",\n \"learnings\",\n \"files\",\n \"docs\",\n \"deps\",\n \"plan\",\n \"test\",\n \"test-all\",\n \"telemetry\",\n \"stats\",\n \"health\",\n \"validate\",\n \"gc\",\n \"contracts\",\n \"claim\",\n \"release\",\n \"start-task\",\n \"pause-task\",\n \"close-task\",\n \"meet\",\n \"event\",\n \"remind\",\n \"help\",\n] as const;\n\n/** Supported values accepted by the graph subcommand contract across CLI, SDK, and MCP surfaces. */\nexport const GRAPH_SUBCOMMAND_VALUES = [\n \"ancestors\",\n \"descendants\",\n \"predecessors\",\n \"successors\",\n \"paths\",\n \"impact\",\n \"analyze\",\n \"audit\",\n \"communities\",\n \"redundancy\",\n \"dominators\",\n \"plan\",\n] as const;\n\n/** Restricts graph subcommand values accepted by command, SDK, and MCP contracts. */\nexport type GraphSubcommand = (typeof GRAPH_SUBCOMMAND_VALUES)[number];\n\n/** Public contract for pm tool actions, shared by SDK and presentation-layer consumers. */\nexport const PM_TOOL_ACTIONS = [\n \"init\",\n \"config\",\n \"extension-init\",\n \"extension-install\",\n \"extension-uninstall\",\n \"extension-explore\",\n \"extension-manage\",\n \"extension-describe\",\n \"extension-reload\",\n \"extension-doctor\",\n \"extension-catalog\",\n \"extension-adopt\",\n \"extension-adopt-all\",\n \"extension-activate\",\n \"extension-deactivate\",\n \"extension\",\n \"package-init\",\n \"package-install\",\n \"package-uninstall\",\n \"package-explore\",\n \"package-manage\",\n \"package-describe\",\n \"package-reload\",\n \"package-doctor\",\n \"package-catalog\",\n \"package-adopt\",\n \"package-adopt-all\",\n \"package-activate\",\n \"package-deactivate\",\n \"package\",\n \"install\",\n \"upgrade\",\n \"create\",\n \"copy\",\n \"focus\",\n \"list\",\n \"list-all\",\n \"list-draft\",\n \"list-open\",\n \"list-in-progress\",\n \"list-blocked\",\n \"list-closed\",\n \"list-canceled\",\n \"aggregate\",\n \"context\",\n \"ctx\",\n \"get\",\n \"search\",\n \"next\",\n \"history\",\n \"history-redact\",\n \"history-repair\",\n \"history-compact\",\n \"schema\",\n \"profile\",\n \"activity\",\n \"restore\",\n \"update\",\n \"update-many\",\n \"close\",\n \"close-many\",\n \"delete\",\n \"append\",\n \"comments\",\n \"plan\",\n \"notes\",\n \"learnings\",\n \"files\",\n \"docs\",\n \"deps\",\n \"graph\",\n \"test\",\n \"test-all\",\n \"telemetry\",\n \"stats\",\n \"health\",\n \"validate\",\n \"gc\",\n \"contracts\",\n \"claim\",\n \"release\",\n \"start-task\",\n \"pause-task\",\n \"close-task\",\n] as const;\n\n/** Restricts pm tool action values accepted by command, SDK, and storage contracts. */\nexport type PmToolAction = (typeof PM_TOOL_ACTIONS)[number];\n\n/** Implements check whether pm tool action for the public runtime surface of this module. */\nexport function isPmToolAction(value: string): value is PmToolAction {\n return PM_TOOL_ACTIONS.includes(value as PmToolAction);\n}\n\n/** Implements check whether pm extension capability contract for the public runtime surface of this module. */\nexport function isPmExtensionCapabilityContract(\n value: string,\n): value is PmExtensionCapabilityContract {\n return PM_EXTENSION_CAPABILITY_CONTRACTS.includes(\n value as PmExtensionCapabilityContract,\n );\n}\n\n/** Implements check whether pm extension service name contract for the public runtime surface of this module. */\nexport function isPmExtensionServiceNameContract(\n value: string,\n): value is PmExtensionServiceNameContract {\n return PM_EXTENSION_SERVICE_NAME_CONTRACTS.includes(\n value as PmExtensionServiceNameContract,\n );\n}\n\n/** Implements check whether pm extension policy mode contract for the public runtime surface of this module. */\nexport function isPmExtensionPolicyModeContract(\n value: string,\n): value is PmExtensionPolicyModeContract {\n return PM_EXTENSION_POLICY_MODE_CONTRACTS.includes(\n value as PmExtensionPolicyModeContract,\n );\n}\n\n/** Implements check whether pm extension policy surface contract for the public runtime surface of this module. */\nexport function isPmExtensionPolicySurfaceContract(\n value: string,\n): value is PmExtensionPolicySurfaceContract {\n return PM_EXTENSION_POLICY_SURFACE_CONTRACTS.includes(\n value as PmExtensionPolicySurfaceContract,\n );\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,0CAA0C,CAAC;AAElD,6GAA6G;AAC7G,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,GAAG,4BAA4B;CACvB,CAAC;AAMX,+GAA+G;AAC/G,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,GAAG,6BAA6B;CACxB,CAAC;AAMX,8GAA8G;AAC9G,MAAM,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