@unbrained/pm-cli 2026.8.7 → 2026.8.9

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 (288) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +54 -0
  3. package/dist/cli/main.js +4 -3
  4. package/dist/cli/register-annotations.d.ts +11 -0
  5. package/dist/cli/register-annotations.js +195 -0
  6. package/dist/cli/register-history-author.js +7 -30
  7. package/dist/cli/register-mutation.js +25 -206
  8. package/dist/cli/runtime-compatibility-boundary.d.ts +17 -0
  9. package/dist/cli/runtime-compatibility-boundary.js +43 -0
  10. package/dist/cli-bundle/bundle-manifest.json +158 -694
  11. package/dist/cli-bundle/chunks/chunk-2DTCZXSD.js +13 -0
  12. package/dist/cli-bundle/chunks/chunk-5JO6R4BS.js +3 -0
  13. package/dist/cli-bundle/chunks/chunk-5KN4DZYV.js +194 -0
  14. package/dist/cli-bundle/chunks/chunk-EF43KODO.js +2 -0
  15. package/dist/cli-bundle/chunks/chunk-GMX5YOI3.js +77 -0
  16. package/dist/cli-bundle/chunks/chunk-HUV2Z7IS.js +28 -0
  17. package/dist/cli-bundle/chunks/chunk-MHBVCUF2.js +2 -0
  18. package/dist/cli-bundle/chunks/chunk-PYO5GZU6.js +5 -0
  19. package/dist/cli-bundle/chunks/chunk-QWRRFYK3.js +2 -0
  20. package/dist/cli-bundle/chunks/chunk-RJC7TPF4.js +8 -0
  21. package/dist/cli-bundle/chunks/chunk-YC3UF2IO.js +2068 -0
  22. package/dist/cli-bundle/chunks/{register-list-query-FJZCJ67O.js → register-list-query-BUE7PTCU.js} +8 -8
  23. package/dist/cli-bundle/chunks/register-mutation-FC3XLVIK.js +20 -0
  24. package/dist/cli-bundle/chunks/register-operations-YH2WAOXU.js +2 -0
  25. package/dist/cli-bundle/chunks/register-setup-UQDTNTLJ.js +2 -0
  26. package/dist/cli-bundle/focused-chunks/chunk-2VVP5RAA.js +153 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-4VJQTS3P.js → chunk-3GSFUDAI.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-3WVHTUAW.js +5 -0
  29. package/dist/cli-bundle/focused-chunks/chunk-4H6MVCK3.js +16 -0
  30. package/dist/cli-bundle/focused-chunks/{chunk-73JUDYXT.js → chunk-54TZJ4BM.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/chunk-5NK5TJ5D.js +2 -0
  32. package/dist/cli-bundle/focused-chunks/{chunk-HNL6IFGS.js → chunk-6DO4YQWZ.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/chunk-73FIJONU.js +2 -0
  34. package/dist/cli-bundle/focused-chunks/{chunk-TIKDBG4D.js → chunk-C3GCHDSQ.js} +29 -27
  35. package/dist/cli-bundle/focused-chunks/chunk-JGRSQZJT.js +18 -0
  36. package/dist/cli-bundle/focused-chunks/{chunk-YZEZAPJK.js → chunk-KNEHLPBF.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/chunk-MRWVJ3ZG.js +2 -0
  38. package/dist/cli-bundle/focused-chunks/chunk-NL57J7BZ.js +4 -0
  39. package/dist/cli-bundle/focused-chunks/{chunk-NBJKQP4S.js → chunk-P6BBIQRG.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-QHRTT7WT.js → chunk-PZAGVQNN.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/chunk-QDAO3XEK.js +14 -0
  42. package/dist/cli-bundle/focused-chunks/chunk-T4IGQCSY.js +2 -0
  43. package/dist/cli-bundle/focused-chunks/chunk-U46GQJNY.js +2 -0
  44. package/dist/cli-bundle/focused-chunks/{chunk-RPNYG5MO.js → chunk-VRXJSGIT.js} +6 -6
  45. package/dist/cli-bundle/focused-chunks/{chunk-R2LEMEV5.js → chunk-XC2ZW3CJ.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/chunk-ZG54B4XG.js +2 -0
  47. package/dist/cli-bundle/main.js +13 -13
  48. package/dist/cli-bundle/sdk-authoring.js +1 -1
  49. package/dist/cli-bundle/sdk-contracts.js +1 -1
  50. package/dist/cli-bundle/sdk-core.js +38 -38
  51. package/dist/cli-bundle/sdk-governance.js +1 -1
  52. package/dist/cli-bundle/sdk-graph.js +1 -1
  53. package/dist/cli-bundle/sdk-merge.js +1 -1
  54. package/dist/cli-bundle/sdk-query.js +1 -1
  55. package/dist/cli-bundle/sdk-runtime.js +1 -1
  56. package/dist/cli-bundle/sdk-testing.js +1 -1
  57. package/dist/cli-bundle/sdk.js +2 -1
  58. package/dist/cli.js +14 -4
  59. package/dist/core/diagnostics/remediation.js +12 -2
  60. package/dist/core/history/history.js +13 -4
  61. package/dist/core/item/actionability.d.ts +7 -1
  62. package/dist/core/item/actionability.js +71 -15
  63. package/dist/core/output/output.js +9 -2
  64. package/dist/core/sentry/helpers.d.ts +10 -0
  65. package/dist/core/sentry/helpers.js +59 -4
  66. package/dist/core/shared/author.d.ts +25 -0
  67. package/dist/core/shared/author.js +114 -9
  68. package/dist/core/shared/constants.d.ts +2 -0
  69. package/dist/core/shared/constants.js +4 -2
  70. package/dist/sdk/actionability.d.ts +1 -1
  71. package/dist/sdk/actionability.js +3 -3
  72. package/dist/sdk/annotations.d.ts +40 -0
  73. package/dist/sdk/annotations.js +61 -9
  74. package/dist/sdk/author-attribution.d.ts +12 -0
  75. package/dist/sdk/author-attribution.js +73 -11
  76. package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +118 -0
  77. package/dist/sdk/cli-contracts/command-exit-contracts.js +152 -0
  78. package/dist/sdk/cli-contracts/completeness.js +5 -3
  79. package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
  80. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +19 -0
  81. package/dist/sdk/cli-contracts/runtime-contracts.js +44 -2
  82. package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -2
  83. package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
  84. package/dist/sdk/cli-contracts/tool-schema.js +6 -3
  85. package/dist/sdk/comments.d.ts +7 -0
  86. package/dist/sdk/comments.js +2 -2
  87. package/dist/sdk/completion.js +9 -5
  88. package/dist/sdk/contracts.d.ts +1 -0
  89. package/dist/sdk/contracts.js +3 -2
  90. package/dist/sdk/core-governance.d.ts +1 -1
  91. package/dist/sdk/core-governance.js +3 -3
  92. package/dist/sdk/dependencies.d.ts +2 -0
  93. package/dist/sdk/dependencies.js +7 -6
  94. package/dist/sdk/environment/host-environment-errors.d.ts +27 -0
  95. package/dist/sdk/environment/host-environment-errors.js +124 -0
  96. package/dist/sdk/environment/project-runtime-compatibility.d.ts +65 -0
  97. package/dist/sdk/environment/project-runtime-compatibility.js +385 -0
  98. package/dist/sdk/environment/source-context.d.ts +23 -0
  99. package/dist/sdk/environment/source-context.js +29 -0
  100. package/dist/sdk/error-code-catalog.d.ts +6 -0
  101. package/dist/sdk/error-code-catalog.js +62 -8
  102. package/dist/sdk/extension/bundled-catalog.js +19 -6
  103. package/dist/sdk/generated-error-code-catalog.js +665 -3
  104. package/dist/sdk/governance/health.d.ts +11 -3
  105. package/dist/sdk/governance/health.js +32 -13
  106. package/dist/sdk/governance/provenance-health.d.ts +26 -0
  107. package/dist/sdk/governance/provenance-health.js +139 -0
  108. package/dist/sdk/governance/validate.js +13 -8
  109. package/dist/sdk/governance.d.ts +1 -0
  110. package/dist/sdk/governance.js +3 -2
  111. package/dist/sdk/graph/assembly.d.ts +4 -0
  112. package/dist/sdk/graph/assembly.js +22 -2
  113. package/dist/sdk/graph/run.d.ts +2 -0
  114. package/dist/sdk/graph/run.js +3 -2
  115. package/dist/sdk/index.d.ts +7 -3
  116. package/dist/sdk/index.js +9 -5
  117. package/dist/sdk/learnings.d.ts +15 -0
  118. package/dist/sdk/learnings.js +2 -2
  119. package/dist/sdk/lifecycle/close-many.d.ts +6 -1
  120. package/dist/sdk/lifecycle/close-many.js +43 -5
  121. package/dist/sdk/lifecycle/close.js +13 -8
  122. package/dist/sdk/lifecycle/create.js +6 -12
  123. package/dist/sdk/lifecycle/plan.js +6 -3
  124. package/dist/sdk/lifecycle/update-many.d.ts +2 -1
  125. package/dist/sdk/lifecycle/update-many.js +29 -5
  126. package/dist/sdk/lifecycle/update.js +6 -20
  127. package/dist/sdk/merge/driver.d.ts +2 -1
  128. package/dist/sdk/merge/driver.js +7 -4
  129. package/dist/sdk/merge/index.d.ts +1 -1
  130. package/dist/sdk/merge/index.js +3 -3
  131. package/dist/sdk/merge/install.d.ts +21 -0
  132. package/dist/sdk/merge/install.js +51 -21
  133. package/dist/sdk/merge/receipts.d.ts +14 -1
  134. package/dist/sdk/merge/receipts.js +36 -8
  135. package/dist/sdk/merge/reconcile.js +21 -4
  136. package/dist/sdk/merge/three-way.d.ts +6 -2
  137. package/dist/sdk/merge/three-way.js +24 -10
  138. package/dist/sdk/notes.d.ts +7 -0
  139. package/dist/sdk/notes.js +2 -2
  140. package/dist/sdk/query/get.d.ts +11 -0
  141. package/dist/sdk/query/get.js +37 -3
  142. package/dist/sdk/read-output-contracts.d.ts +1 -1
  143. package/dist/sdk/read-output-contracts.js +103 -5
  144. package/dist/sdk/relationship-kinds/contract.d.ts +48 -0
  145. package/dist/sdk/relationship-kinds/contract.js +22 -0
  146. package/dist/sdk/relationships.d.ts +6 -41
  147. package/dist/sdk/relationships.js +12 -126
  148. package/dist/sdk/runtime-primitives.d.ts +1 -1
  149. package/dist/sdk/runtime-primitives.js +3 -3
  150. package/dist/sdk/runtime.d.ts +1 -1
  151. package/dist/sdk/runtime.js +9 -25
  152. package/dist/sdk/similarity.d.ts +5 -0
  153. package/dist/sdk/similarity.js +40 -10
  154. package/dist/sdk/structured-mutations.js +5 -2
  155. package/dist/sdk/test/execution.js +4 -2
  156. package/dist/sdk/test/linked-command-detection.d.ts +2 -7
  157. package/dist/sdk/test/linked-command-detection.js +22 -9
  158. package/dist/sdk/test/parsers.js +5 -2
  159. package/dist/sdk/workspace-snapshot.d.ts +9 -0
  160. package/dist/sdk/workspace-snapshot.js +48 -16
  161. package/docs/AGENT_GUIDE.md +2 -1
  162. package/docs/AGENT_RUNTIME_PRIMITIVES.md +11 -4
  163. package/docs/COMMANDS.md +19 -1
  164. package/docs/DEPENDENCY_KIND_CONTRACT.md +29 -0
  165. package/docs/ITEM_READ_PROJECTIONS.md +26 -0
  166. package/docs/MERGE_SAFETY.md +10 -3
  167. package/docs/README.md +1 -0
  168. package/docs/RELATIONSHIP_GRAPH.md +1 -1
  169. package/docs/RELEASING.md +27 -2
  170. package/docs/SCRIPTING.md +27 -1
  171. package/docs/SDK_AGENT_SESSION_CONTEXT.md +35 -2
  172. package/docs/SDK_CONTEXT_INTEGRITY.md +81 -0
  173. package/docs/SDK_RUNTIME_BOUNDARIES.md +58 -0
  174. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
  175. package/docs/SENTRY_CONTRACT_EPOCHS.md +20 -0
  176. package/docs/TESTING.md +17 -0
  177. package/docs/agent-task-token-baseline.json +2 -2
  178. package/marketplace.json +2 -2
  179. package/package.json +5 -3
  180. package/packages/pm-beads/package.json +1 -1
  181. package/packages/pm-calendar/package.json +1 -1
  182. package/packages/pm-command-kit/package.json +1 -1
  183. package/packages/pm-digital-twin/package.json +1 -1
  184. package/packages/pm-governance-audit/package.json +1 -1
  185. package/packages/pm-guide-shell/package.json +1 -1
  186. package/packages/pm-kanban/package.json +1 -1
  187. package/packages/pm-lifecycle-hooks/package.json +1 -1
  188. package/packages/pm-linked-test-adapters/package.json +1 -1
  189. package/packages/pm-search-advanced/package.json +1 -1
  190. package/packages/pm-templates/package.json +1 -1
  191. package/packages/pm-todos/package.json +1 -1
  192. package/packages/pm-vcs/package.json +1 -1
  193. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  194. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  195. package/sdk/public-surface.json +756 -57
  196. package/dist/cli-bundle/chunks/append-7BXBFDGD.js +0 -2
  197. package/dist/cli-bundle/chunks/chunk-2AXF3VSK.js +0 -2
  198. package/dist/cli-bundle/chunks/chunk-2XS43CCV.js +0 -2
  199. package/dist/cli-bundle/chunks/chunk-3A6KWB72.js +0 -8
  200. package/dist/cli-bundle/chunks/chunk-3ISTDB42.js +0 -8
  201. package/dist/cli-bundle/chunks/chunk-4MTI7XOV.js +0 -5
  202. package/dist/cli-bundle/chunks/chunk-6BX5UDCN.js +0 -3
  203. package/dist/cli-bundle/chunks/chunk-6QPO7KLR.js +0 -2
  204. package/dist/cli-bundle/chunks/chunk-7MXHZHSQ.js +0 -5
  205. package/dist/cli-bundle/chunks/chunk-7ZPMJW4U.js +0 -2
  206. package/dist/cli-bundle/chunks/chunk-A6KGKEWT.js +0 -2
  207. package/dist/cli-bundle/chunks/chunk-AGYNSNCI.js +0 -2
  208. package/dist/cli-bundle/chunks/chunk-B4H7FEFH.js +0 -5
  209. package/dist/cli-bundle/chunks/chunk-B4KLBBMN.js +0 -2
  210. package/dist/cli-bundle/chunks/chunk-BXCSXK4J.js +0 -2
  211. package/dist/cli-bundle/chunks/chunk-CALJHNBL.js +0 -23
  212. package/dist/cli-bundle/chunks/chunk-CFIGP5LY.js +0 -2
  213. package/dist/cli-bundle/chunks/chunk-CHOQ2VAW.js +0 -2
  214. package/dist/cli-bundle/chunks/chunk-CS6MRHG7.js +0 -2
  215. package/dist/cli-bundle/chunks/chunk-CUGNQQKH.js +0 -2
  216. package/dist/cli-bundle/chunks/chunk-D4FPS43D.js +0 -164
  217. package/dist/cli-bundle/chunks/chunk-E2ZSLTOP.js +0 -2
  218. package/dist/cli-bundle/chunks/chunk-FB7G2HY2.js +0 -2
  219. package/dist/cli-bundle/chunks/chunk-H5Y5YE6A.js +0 -2
  220. package/dist/cli-bundle/chunks/chunk-H5Y6UV6E.js +0 -2
  221. package/dist/cli-bundle/chunks/chunk-H7KGWPDF.js +0 -2
  222. package/dist/cli-bundle/chunks/chunk-HFSD77TQ.js +0 -2
  223. package/dist/cli-bundle/chunks/chunk-HX2GTA6L.js +0 -2
  224. package/dist/cli-bundle/chunks/chunk-J2IEKAVR.js +0 -2
  225. package/dist/cli-bundle/chunks/chunk-JC6FKIFM.js +0 -2
  226. package/dist/cli-bundle/chunks/chunk-K44PYFXH.js +0 -2
  227. package/dist/cli-bundle/chunks/chunk-K4KGEEBT.js +0 -2
  228. package/dist/cli-bundle/chunks/chunk-KFLK5TRH.js +0 -21
  229. package/dist/cli-bundle/chunks/chunk-KL6IEBV2.js +0 -2
  230. package/dist/cli-bundle/chunks/chunk-KWQZDZSS.js +0 -2
  231. package/dist/cli-bundle/chunks/chunk-KZ4X3DGU.js +0 -3
  232. package/dist/cli-bundle/chunks/chunk-LD77HJMQ.js +0 -13
  233. package/dist/cli-bundle/chunks/chunk-LEPJJ6QC.js +0 -2
  234. package/dist/cli-bundle/chunks/chunk-ME2JJ4LA.js +0 -3
  235. package/dist/cli-bundle/chunks/chunk-NE5VRDAI.js +0 -2
  236. package/dist/cli-bundle/chunks/chunk-NFLJ3FHD.js +0 -2
  237. package/dist/cli-bundle/chunks/chunk-NG6OXIBR.js +0 -19
  238. package/dist/cli-bundle/chunks/chunk-NYIGHWQY.js +0 -8
  239. package/dist/cli-bundle/chunks/chunk-NZ75GNSA.js +0 -2
  240. package/dist/cli-bundle/chunks/chunk-PCJWJNC2.js +0 -2
  241. package/dist/cli-bundle/chunks/chunk-PD3225AM.js +0 -2
  242. package/dist/cli-bundle/chunks/chunk-PDEGKG7P.js +0 -2
  243. package/dist/cli-bundle/chunks/chunk-PIE5HBNA.js +0 -2
  244. package/dist/cli-bundle/chunks/chunk-PW2H7YJR.js +0 -56
  245. package/dist/cli-bundle/chunks/chunk-RSIC5OPE.js +0 -2
  246. package/dist/cli-bundle/chunks/chunk-TPKN3S7S.js +0 -2
  247. package/dist/cli-bundle/chunks/chunk-TPXAXTCO.js +0 -2
  248. package/dist/cli-bundle/chunks/chunk-UFWUJO4V.js +0 -2
  249. package/dist/cli-bundle/chunks/chunk-UQLZQVFW.js +0 -55
  250. package/dist/cli-bundle/chunks/chunk-VT3Z5G7D.js +0 -2
  251. package/dist/cli-bundle/chunks/chunk-WOD3WWUN.js +0 -2
  252. package/dist/cli-bundle/chunks/chunk-WSJEIGJF.js +0 -3
  253. package/dist/cli-bundle/chunks/chunk-WYNUU7ZW.js +0 -2008
  254. package/dist/cli-bundle/chunks/chunk-YGPNCCXZ.js +0 -2
  255. package/dist/cli-bundle/chunks/close-CMY3BAUG.js +0 -2
  256. package/dist/cli-bundle/chunks/close-many-SA4XZCTK.js +0 -2
  257. package/dist/cli-bundle/chunks/comments-EZ556ZD3.js +0 -2
  258. package/dist/cli-bundle/chunks/copy-ZSGPA52X.js +0 -2
  259. package/dist/cli-bundle/chunks/create-I5DVV4YG.js +0 -2
  260. package/dist/cli-bundle/chunks/delete-RL3JACSW.js +0 -2
  261. package/dist/cli-bundle/chunks/deps-S7UBCECS.js +0 -2
  262. package/dist/cli-bundle/chunks/docs-ZZNVBBYO.js +0 -2
  263. package/dist/cli-bundle/chunks/files-27C337VT.js +0 -2
  264. package/dist/cli-bundle/chunks/focus-5Z2SG7LU.js +0 -2
  265. package/dist/cli-bundle/chunks/history-compact-HJQK67CZ.js +0 -2
  266. package/dist/cli-bundle/chunks/history-redact-PWC6PDWA.js +0 -2
  267. package/dist/cli-bundle/chunks/history-repair-N3CY4WBF.js +0 -2
  268. package/dist/cli-bundle/chunks/learnings-4FH23XDT.js +0 -2
  269. package/dist/cli-bundle/chunks/profile-5Y5XXH5N.js +0 -2
  270. package/dist/cli-bundle/chunks/register-mutation-YGYPW3BL.js +0 -20
  271. package/dist/cli-bundle/chunks/register-operations-WMDSUMQF.js +0 -2
  272. package/dist/cli-bundle/chunks/register-setup-DL7FFABC.js +0 -2
  273. package/dist/cli-bundle/chunks/restore-6KYBV5BY.js +0 -2
  274. package/dist/cli-bundle/chunks/schema-EQGKBYXJ.js +0 -2
  275. package/dist/cli-bundle/chunks/update-QVTYOD6I.js +0 -2
  276. package/dist/cli-bundle/chunks/update-many-DJSBU525.js +0 -2
  277. package/dist/cli-bundle/focused-chunks/chunk-2ECLECMK.js +0 -12
  278. package/dist/cli-bundle/focused-chunks/chunk-3K4XV2BF.js +0 -16
  279. package/dist/cli-bundle/focused-chunks/chunk-4EX25PXM.js +0 -8
  280. package/dist/cli-bundle/focused-chunks/chunk-CIXVQPB7.js +0 -5
  281. package/dist/cli-bundle/focused-chunks/chunk-DLTS3IHM.js +0 -2
  282. package/dist/cli-bundle/focused-chunks/chunk-DQ6FKGL3.js +0 -14
  283. package/dist/cli-bundle/focused-chunks/chunk-JLG2C4EQ.js +0 -2
  284. package/dist/cli-bundle/focused-chunks/chunk-MHMTKV5V.js +0 -2
  285. package/dist/cli-bundle/focused-chunks/chunk-MOTJFQ3F.js +0 -153
  286. package/dist/cli-bundle/focused-chunks/chunk-RW5IYD4J.js +0 -4
  287. package/dist/cli-bundle/focused-chunks/chunk-VZFU2R4M.js +0 -2
  288. package/dist/cli-bundle/focused-chunks/chunk-ZJIMJHDB.js +0 -2
@@ -0,0 +1,2 @@
1
+ (function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="50ad61f1-6719-541c-b4e0-4a88468725cf")}catch{}})();var I=["commands","renderers","hooks","schema","importers","search","parser","preflight","services"],fe=2,pe=Object.freeze({migration:"schema",validation:"schema"}),ht=Object.freeze({version:fe,capabilities:[...I],legacy_aliases:{...pe}}),P=["off","warn","enforce"],j=["off","warn","enforce"],V=["none","restricted","strict"],Ot=["block","warn"],F=["commands.override","commands.handler","hooks.beforecommand","hooks.beforemutation","hooks.aftercommand","hooks.onwrite","hooks.onread","hooks.onindex","schema.flags","schema.itemfields","schema.itemtypes","schema.relationshipkinds","schema.migrations","schema.profiles","parser.override","preflight.override","services.override","renderers.override","importers.importer","importers.exporter","search.provider","search.vectorstore"],K=["output_format","error_format","help_format","lock_acquire","lock_release","history_append","item_store_write","item_store_delete","context_relevance","command_result"];function B(){return{mode:"off",trust_mode:"off",require_provenance:!1,trusted_extensions:[],default_sandbox_profile:"none",allowed_extensions:[],blocked_extensions:[],allowed_capabilities:[],blocked_capabilities:[],allowed_surfaces:[],blocked_surfaces:[],allowed_commands:[],blocked_commands:[],allowed_actions:[],blocked_actions:[],allowed_services:[],blocked_services:[],extension_overrides:[]}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2a2072c1-f4a7-579e-ac11-4c75758d76d3")}catch{}})();var me=["Epic","Feature","Task","Chore","Issue","Decision","Event","Reminder","Milestone","Meeting","Plan"],At=me,Tt=["draft","open","in_progress","blocked","closed","canceled"],It=["draft","active","blocked","terminal","terminal_done","terminal_canceled","default_open","default_close","default_cancel"],Nt=["string","number","boolean","string_array","array","object"],kt=["create","update","update_many","list","search","calendar","context"],wt=["allow","warn","reject"],Rt=["blocks","parent","child","parent_child","child_of","related","related_to","discovered_from","blocked_by","incident_from","epic","implements","supersedes","task","verifies"],xt=["project","global"],vt=["low","medium","high","critical"],Ct=["low","medium","high","critical"],Dt=["low","medium","high"];var Lt=["minimal","default","strict","custom"],Mt=["none","warn","strict"],Ut=["progressive","strict"],Pt=["off","warn","strict"],jt=["off","warn","strict"];var Vt=["daily","weekly","monthly","yearly"],ge=["mon","tue","wed","thu","fri","sat","sun"];function Ft(e){return ge.indexOf(e)}var Kt=["draft","research","review","approved","executing","paused","completed","superseded"],Bt=["pending","in_progress","completed","blocked","skipped","superseded"],Gt=["codex","claude-code","cursor","generic"],Xt=["related","blocks","blocked_by","depends_on","discovered_from","implements","verifies","supersedes"],Yt=["brief","standard","deep","full"],zt=["hierarchy","activity","progress","recently_created","unparented","blockers","files","workload","staleness","tests"];(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="36b908f0-ea19-5adc-8ccd-320ad3c3b1fe")}catch{}})();var Ee=Object.freeze([{id:"draft",roles:["draft"]},{id:"open",roles:["active","default_open"]},{id:"in_progress",aliases:["in-progress"],roles:["active"]},{id:"blocked",roles:["blocked"]},{id:"closed",roles:["terminal","terminal_done","default_close"]},{id:"canceled",aliases:["cancelled"],roles:["terminal","terminal_canceled","default_cancel"]}]),be=Object.freeze({draft_status:"draft",open_status:"open",in_progress_status:"in_progress",blocked_status:"blocked",close_status:"closed",canceled_status:"canceled"}),$t=".agents/pm",Ht="settings.json";var ye=["","epics","features","tasks","chores","issues","schema","history","search","extensions","locks"],he=["decisions","events","reminders","milestones","meetings","plans"],Jt=[...ye,...he],Zt={Epic:"epics",Feature:"features",Task:"tasks",Chore:"chores",Issue:"issues",Decision:"decisions",Event:"events",Reminder:"reminders",Milestone:"milestones",Meeting:"meetings",Plan:"plans"},Oe=["goal","objective","value","impact","outcome","why_now","parent","reviewer","risk","confidence","sprint","release","blocked_by","blocked_reason","unblock_note","reporter","severity","environment","repro_steps","resolution","expected_result","actual_result"],Qt=["id","title","description","type","pm_format_version","source_type","type_options","status","priority","tags","created_at","updated_at","deadline","reminders","events","closed_at","completed_at","assignee","claim_principal","source_owner","author","estimated_minutes","acceptance_criteria","design","external_ref","definition_of_ready","order",...Oe,"affected_version","fixed_version","component","regression","customer_impact","dependencies","comments","notes","learnings","files","tests","test_runs","docs","close_reason","duplicate_of","plan_mode","plan_scope","plan_harness","plan_resume_context","plan_validation","plan_decisions","plan_discoveries","plan_steps"],Se={minimal:{ownership_enforcement:"none",create_mode_default:"progressive",close_validation_default:"off",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"core",force_required_for_stale_lock:!1,duplicate_detection_mode:"off",duplicate_detection_threshold:.8,duplicate_detection_limit:3},default:{ownership_enforcement:"warn",create_mode_default:"progressive",close_validation_default:"warn",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"core",force_required_for_stale_lock:!0,duplicate_detection_mode:"strict",duplicate_detection_threshold:.8,duplicate_detection_limit:3},strict:{ownership_enforcement:"strict",create_mode_default:"strict",close_validation_default:"strict",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"strict",force_required_for_stale_lock:!0,duplicate_detection_mode:"strict",duplicate_detection_threshold:.8,duplicate_detection_limit:3}},Ae=["no active blocker","ready for planned execution sequencing","work completed","work is closed"],N={blocked_reason:["no active blocker because work is closed","work is closed"],resolution:["closed with implementation evidence","closed with verification evidence","work completed and recorded","work is closed"],actual_result:["closed and recorded","work completed","work completed and recorded"]};function G(e){return e?[...e]:void 0}var en={version:1,id_prefix:"pm-",ids:{token_length:4},author_default:"",agent_identity:{probes_enabled:!0,identity_vocabulary:{version:1,aliases:{}},harness_signals:[]},mutation_guard:{require_attributed_author:!1,secret_guard:"advise",stale_in_progress_hours:72},item_format:"toon",locks:{ttl_seconds:1800,wait_ms:3e3},checkpoints:{retention_days:14},output:{default_format:"toon"},history:{missing_stream:"auto_create",compact_policy:{enabled:!1,max_entries:500,trigger:"health_warn"}},validation:{sprint_release_format:"warn",parent_reference:"warn",metadata_profile:"core",metadata_required_fields:[],lifecycle_stale_blocker_reason_patterns:[...Ae],lifecycle_closure_like_blocked_reason_patterns:[...N.blocked_reason],lifecycle_closure_like_resolution_patterns:[...N.resolution],lifecycle_closure_like_actual_result_patterns:[...N.actual_result],estimate_defaults_by_type:{}},governance:{preset:"minimal",...Se.minimal},workflow:{definition_of_done:[]},testing:{record_results_to_items:!1},telemetry:{enabled:!0,first_run_prompt_completed:!1,capture_level:"redacted",endpoint:"https://pm-cli.unbrained.dev/v1/events",installation_id:"",retention_days:365},agent_guidance:{prompt_completed:!1,declined:!1,declined_at:"",template_version:1,last_checked_files:[]},item_types:{definitions:[]},schema:{version:1,files:{types:"schema/types.json",statuses:"schema/statuses.json",fields:"schema/fields.json",workflows:"schema/workflows.json"},statuses:Ee.map(e=>({...e,aliases:G(e.aliases),roles:G(e.roles)})),fields:[],workflow:{...be},unknown_field_policy:"allow"},extensions:{enabled:[],disabled:[],policy:B()},search:{score_threshold:0,hybrid_semantic_weight:.7,max_results:50,embedding_model:"",embedding_batch_size:32,embedding_timeout_ms:3e4,scanner_max_batch_retries:3,provider:"",mutation_refresh_policy:"semantic_configured",query_expansion:{enabled:!1,provider:""},rerank:{enabled:!1,model:"",top_k:20}},providers:{openai:{base_url:"",api_key:"",model:""},ollama:{base_url:"",model:""}},context:{default_depth:"brief",activity_limit:10,stale_threshold_days:7,sections:{hierarchy:!0,activity:!0,progress:!0,recently_created:!0,unparented:!0,blockers:!0,files:!0,workload:!0,staleness:!0,tests:!0}},vector_store:{adapter:"",collection_name:"pm_items",qdrant:{url:"",api_key:""},lancedb:{path:""}}},tn={metadata:{},body:""},f={SUCCESS:0,GENERIC_FAILURE:1,USAGE:2,NOT_FOUND:3,CONFLICT:4,DEPENDENCY_FAILED:5,NO_EFFECT:6,PARTIAL_EFFECT:7},nn=Object.freeze({unknown_command:"usage",unknown_option:"usage",missing_required_option:"usage",missing_required_argument:"usage",invalid_command_usage:"usage",linked_test_value_not_quoted:"usage",invalid_argument_value:"validation",health_findings:"validation",validation_findings:"validation",close_through_update:"validation",no_update_fields:"validation",unsupported_update_option:"validation",tracker_not_initialized:"validation",item_not_found:"validation",ownership_conflict:"conflict",lock_conflict:"conflict",terminal_state_conflict:"conflict",dependency_failed:"runtime",init_gitignore_unwritable:"runtime",merge_git_config_unwritable:"runtime",command_failed:"runtime",unknown_error:"runtime"});(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c2c9251e-86bf-5a92-acdb-581e59d269d8")}catch{}})();var _=class extends Error{exitCode;code;context;constructor(t,n,o={}){super(t),this.name="PmCliError",this.exitCode=n,this.context=o,this.code=o.code}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="15daa637-4d30-5794-bdb5-87585d443cd3")}catch{}})();var Te=[...I],Ie=[...K],Ne=[...P],an=[...j],cn=[...V],ke=[...F],X=["init","config","extension","package","packages","install","upgrade","create","item","copy","focus","list","list-all","list-draft","list-open","list-in-progress","list-blocked","list-closed","list-canceled","aggregate","context","ctx","get","graph","search","duplicates","eval","next","history","events","history-redact","history-repair","history-compact","history-author-acknowledge","merge","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","workspace","contracts","claim","release","start-task","pause-task","close-task","meet","event","remind","help"],dn=["ancestors","descendants","predecessors","successors","paths","impact","analyze","audit","communities","redundancy","dominators","slack","centrality","articulation","plan","index"],we=["init","install","uninstall","explore","manage","describe","reload","doctor","catalog","adopt","adopt-all","activate","deactivate"],Y={help:"Commander help rendering has no SDK operation result.",item:"The item namespace only groups lifecycle subcommands already exposed as actions.",packages:"The plural package alias only renders package-oriented help."},z=Object.freeze(X.flatMap(e=>e in Y?[]:e==="extension"||e==="package"?[...we.map(t=>`${e}-${t}`),e]:[e]));function un(e=X,t=z,n=Y){let o=new Set(t),s=new Set(e);return{missing_cli_actions:e.filter(r=>!o.has(r)&&n[r]===void 0),waived_cli_actions:e.filter(r=>!o.has(r)&&n[r]!==void 0),stale_waivers:Object.keys(n).filter(r=>!s.has(r)||o.has(r))}}function ln(e){return z.includes(e)}function _n(e){return Te.includes(e)}function fn(e){return Ie.includes(e)}function pn(e){return Ne.includes(e)}function mn(e){return ke.includes(e)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ae6fbd4a-6c4e-5639-93ac-f107a336e95b")}catch{}})();function k(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Re(e,t){let n=e;for(let o of t.split(".")){if(!k(n))return;n=n[o]}return n}function q(e,t,n){let o=t.split("."),s={...e},r=e,i=s;for(let a of o.slice(0,-1)){let c=r[a],u={...c};i[a]=u,r=c,i=u}return i[o.at(-1)]=n,s}function w(e){let t=e.row_contract;return k(t)&&Array.isArray(t.row_keys)?t.row_keys.filter(n=>typeof n=="string"&&n.trim().length>0):Object.entries(e).filter(([,n])=>Array.isArray(n)).map(([n])=>n)}function p(e){return w(e).flatMap(t=>{let n=Re(e,t);return Array.isArray(n)||k(n)?[{path:t,value:n}]:[]})}function h(e){return p(e).reduce((t,n)=>t+(Array.isArray(n.value)?n.value.length:Object.keys(n.value).length),0)}function O(e,t){let n=e;for(let o of p(n)){let s=Array.isArray(o.value)?o.value.map((r,i)=>t(r,o.path,i)):Object.fromEntries(Object.entries(o.value).map(([r,i],a)=>[r,t(i,o.path,a)]));n=q(n,o.path,s)}return n}function W(e,t){let n=e,o=!1;for(let s of p(n)){let r=Array.isArray(s.value)?s.value:Object.entries(s.value);if(r.length<=t)continue;o=!0;let i=Array.isArray(s.value)?r.slice(0,t):Object.fromEntries(r.slice(0,t));n=q(n,s.path,i)}return{result:n,truncated:o}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="04ad0d11-1fb7-5eb4-8ff0-d81a7090c4ff")}catch{}})();var R=256,$=1e4,xe=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$/u,ve=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u,Ce=new Set(["version","id","token_budget","spent_tokens","seen_item_ids"]),De=[{valid:e=>e.version===1,reason:"version must equal 1."},{valid:e=>typeof e.id=="string"&&xe.test(e.id),reason:"id must be 1-64 portable identifier characters."},{valid:e=>Number.isSafeInteger(e.token_budget)&&e.token_budget>=R,reason:`token_budget must be a safe integer of at least ${R}.`},{valid:e=>Number.isSafeInteger(e.spent_tokens)&&e.spent_tokens>=0&&e.spent_tokens<=e.token_budget,reason:"spent_tokens must be a non-negative safe integer no larger than token_budget."},{valid:e=>Array.isArray(e.seen_item_ids)&&e.seen_item_ids.length<=$&&e.seen_item_ids.every(t=>typeof t=="string"&&ve.test(t)),reason:`seen_item_ids must contain at most ${$} portable item identifiers.`}];function A(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function S(e){throw new _(`--output-session ${e}`,f.USAGE,{code:"invalid_read_output_session",field:"outputSession"})}function x(e){if(e===void 0)return;let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch{S("must be a valid JSON object.")}A(t)||S("must be a JSON object.");let n=Object.keys(t).filter(r=>!Ce.has(r));n.length>0&&S(`contains unknown field "${n.sort()[0]}".`);let o=De.find(r=>!r.valid(t));o!==void 0&&S(o.reason);let s=[...new Set(t.seen_item_ids)].sort();return{version:1,id:t.id,token_budget:t.token_budget,spent_tokens:t.spent_tokens,seen_item_ids:s}}function H(e){if(A(e))return typeof e.id=="string"?e.id:typeof e.item_id=="string"?e.item_id:A(e.item)&&typeof e.item.id=="string"?e.item.id:void 0}function Le(e){let t=new Set,n=0;for(let o of p(e)){let s=Array.isArray(o.value)?o.value:Object.values(o.value);for(let r of s){if(!A(r))continue;if(typeof r.context_ref=="string"){n+=1;continue}let i=H(r);i!==void 0&&t.add(i)}}return{deliveredIds:t,suppressedRepeatCount:n}}function J(e,t){let n=new Set(t.seen_item_ids);return O(e,o=>{let s=H(o);return s!==void 0&&n.has(s)?{id:s,context_ref:`session:${t.id}:${s}`}:o})}function v(e,t){let{deliveredIds:n,suppressedRepeatCount:o}=Le(e),s=[...new Set([...t.seen_item_ids,...n])].sort(),r={contract_version:1,id:t.id,measurement_scope:"complete_read_envelope",estimator:"ceil(utf8_bytes / 4)",token_budget:t.token_budget,spent_before_tokens:t.spent_tokens,spent_this_call_tokens:0,charged_this_call_tokens:0,spent_total_tokens:t.spent_tokens,remaining_tokens:t.token_budget-t.spent_tokens,exhausted:!1,seen_before_count:t.seen_item_ids.length,new_item_count:n.size,suppressed_repeat_count:o,reference_format:"session:<session-id>:<item-id>",restore_reference_with:"pm get <item-id> --brief",next_state:{version:1,id:t.id,token_budget:t.token_budget,spent_tokens:t.spent_tokens,seen_item_ids:s}},i={...e,read_session:r},a=l=>{r.spent_this_call_tokens=l,r.charged_this_call_tokens=Math.min(t.token_budget-t.spent_tokens,l),r.spent_total_tokens=Math.min(t.token_budget,t.spent_tokens+r.charged_this_call_tokens),r.remaining_tokens=Math.max(0,t.token_budget-r.spent_total_tokens),r.exhausted=r.remaining_tokens<R,r.next_state.spent_tokens=r.spent_total_tokens},c=0,u=0;for(let l=0;l<8;l+=1){a(c);let d=Math.ceil(Buffer.byteLength(JSON.stringify(i),"utf8")/4);if(d===c)return i;u=Math.max(u,d),c=d}return a(u),i}function Z(e){return Math.max(0,e.token_budget-e.spent_tokens)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1726fdce-dc71-5707-ae75-b588691e813d")}catch{}})();var Me=8,Ue=64;function Pe(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function C(e,t){return typeof e=="string"?e.length<=240?e:(t.compacted=!0,`${e.slice(0,240)}\u2026`):Array.isArray(e)?e.map(n=>C(n,t)):Pe(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>[n,C(o,t)])):e}function m(e,t){let n=t.estimated_tokens;for(let o=0;o<Me;o+=1){t.estimated_tokens=n;let s=Math.ceil(Buffer.byteLength(JSON.stringify(e),"utf8")/4);if(s===n)return;n=s}t.estimated_tokens=n}function je(e,t,n){for(let o=0;o<Ue;o+=1){if(m(e,t),t.estimated_tokens<=n)return;let s=p(e).filter(r=>(Array.isArray(r.value)?r.value.length:Object.keys(r.value).length)>1).map(r=>({collection:r,length:Array.isArray(r.value)?r.value.length:Object.keys(r.value).length})).sort((r,i)=>i.length-r.length||r.collection.path.localeCompare(i.collection.path))[0]?.collection;if(!s)return;if(Array.isArray(s.value))s.value.splice(-Math.max(1,Math.ceil(s.value.length/2)));else{let r=Object.keys(s.value);for(let i of r.slice(-Math.max(1,Math.ceil(r.length/2))))delete s.value[i]}t.rows_compacted=!0,e.has_more=!0,e.truncated=!0,typeof e.count=="number"&&(e.count=h(e))}}function Q(e,t,n){let o={compacted:!1},s=C(e,o);return t.strings_compacted=o.compacted,s.read_output=t,je(s,t,n),m(s,t),s}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="819ac44d-0add-581c-90e8-ac6e8247b04b")}catch{}})();var g=["include","amount","cost","encoding"],se=["list","context","search","get","next","health","deps","graph","history","activity","validate","events","contracts","comments","notes","files","docs","stats","aggregate","package-manage"],re=["canonical","legacy","intent","default"],M={include:"--output-include",amount:"--output-limit",cost:"--output-budget",encoding:"--output-format"},Rn=Object.freeze(g.map(e=>M[e])),xn=Object.freeze(["--output-session"]),Ve={list:{include:["--brief","--compact","--fields","--full"],amount:["--after","--limit","--no-truncate"],cost:["--token-budget"],encoding:["--format","--stream"]},context:{include:["--fields","--section"],amount:["--after","--depth","--limit"],cost:["--token-budget"],encoding:["--format"]},search:{include:["--compact","--fields","--full"],amount:["--after","--limit"],cost:["--token-budget"],encoding:["--format"]},get:{include:["--fields","--full"],amount:["--depth"],cost:["--token-budget"],encoding:["--format"]},next:{amount:["--blocked-limit","--limit"],cost:["--token-budget"],encoding:["--format"]},health:{include:["--brief","--check-only","--full","--summary","--verbose"]},deps:{include:["--collapse","--full","--summary"],amount:["--edge-limit","--max-depth","--node-limit"],cost:["--token-budget"],encoding:["--format"]},graph:{include:["--full","--summary"],amount:["--after","--limit","--max-depth","--max-paths"]},history:{include:["--compact","--full"],amount:["--limit"],encoding:["--format"]},activity:{include:["--compact","--full"],amount:["--limit","--unbounded"],encoding:["--stream"]},validate:{include:["--counts","--full","--verbose"]},events:{include:["--full"],amount:["--limit"],encoding:["--follow"]},contracts:{include:["--full","--summary"]},comments:{amount:["--limit"]},notes:{amount:["--limit"]},files:{amount:["--limit","--no-truncate","--offset"]},docs:{},stats:{},aggregate:{},"package-manage":{}},Fe=new Set(["--fields","--section"]),Ke=Object.freeze({"--after":"--after retains cursor-position semantics; use --output-limit <n> separately to bound returned rows.","--check-only":"--check-only retains health side-effect semantics; --output-include does not suppress vector refresh.","--depth":"--depth retains traversal or detail-depth semantics; --output-limit does not replace it.","--follow":"--follow retains event-tail semantics; --output-format does not enable following.","--max-depth":"--max-depth retains graph traversal-depth semantics; --output-limit does not replace it.","--max-paths":"--max-paths retains graph path-search semantics; use --output-limit separately to bound returned rows.","--offset":"--offset retains positional pagination semantics; use --output-limit separately to bound returned rows.","--stream":"--stream retains command streaming semantics; --output-format selects only static result encoding."});function ie(e){return e.slice(2).replaceAll("-","_")}function Be(e,t){let n=Ke[e];if(n!==void 0)return n;let o=t==="include"?Fe.has(e)?"<csv>":ie(e):t==="amount"?"<n>":t==="cost"?"<tokens>":"<toon|json>";return`${e} is a compatibility alias; prefer ${M[t]} ${o}.`}function Ge(e){let t=Ve[e],n=Object.freeze(Object.fromEntries(g.map(o=>[o,Object.freeze({dimension:o,canonical_option:M[o],applicable:!0,inapplicable_reason:null,legacy_aliases:Object.freeze((t[o]??[]).map(s=>Object.freeze({flag:s,migration_hint:Be(s,o),visibility:"hidden_alias"})))})])));return Object.freeze({command:e,dimensions:n,precedence:re})}var Xe=Object.freeze(se.map(Ge)),Ye=new Map(Xe.map(e=>[e.command,e]));function ae(e){let t=e.trim().toLowerCase().replaceAll(/\s+/gu," "),n=t==="package manage"||t==="package-manage"?"package-manage":t.split(" ")[0],o=n.startsWith("list-")?"list":n==="ctx"?"context":n;return se.includes(o)?o:void 0}var ze=["outputInclude","output_include","outputLimit","output_limit","outputBudget","output_budget","outputFormat","output_format","outputSession","output_session"],qe={comments:["add","body","stdin","file","edit","delete"],notes:["add","addJson","stdin","file","edit","delete"],files:["add","addGlob","remove","migrate","apply","note"],docs:["add","addGlob","remove","migrate","note"]};function We(e){return ze.some(t=>e[t]!==void 0)}var $e=[{keys:["outputInclude","output_include"],valid:e=>D(e)!==void 0,message:"--output-include requires at least one comma-separated field or section."},{keys:["outputLimit","output_limit"],valid:e=>e==="unbounded"||E(e)!==void 0,message:"--output-limit must be a positive integer or unbounded."},{keys:["outputBudget","output_budget"],valid:e=>E(e)!==void 0,message:"--output-budget must be a positive integer."},{keys:["outputFormat","output_format"],valid:e=>e==="toon"||e==="json",message:"--output-format must be toon or json."},{keys:["outputSession","output_session"],valid:e=>(x(e),!0),message:"--output-session must be a valid session-state object."}];function vn(e,t){if(!We(t))return;let n=ae(e);if(!n)throw new _(`Universal output controls apply only to read commands; ${e||"this command"} is not a read surface.`,f.USAGE);if((qe[n]??[]).some(o=>t[o]!==void 0&&t[o]!==!1))throw new _(`Universal output controls cannot be combined with a ${n} mutation.`,f.USAGE);for(let o of $e){let s=o.keys.map(r=>t[r]).find(r=>r!==void 0);if(s!==void 0&&!o.valid(s))throw new _(o.message,f.USAGE)}}function He(e){return e.slice(2).replace(/-([a-z])/gu,(t,n)=>n.toUpperCase())}function Je(e,t){let n=He(t);if(Object.hasOwn(e,n))return e[n];let o=t.slice(2).replaceAll("-","_");if(Object.hasOwn(e,o))return e[o];if(t==="--no-truncate"&&e.truncate===!1)return!0}function Ze(e){return e!==void 0&&e!==!1&&e!==null}function D(e){let n=(Array.isArray(e)?e:[e]).flatMap(o=>typeof o=="string"?o.split(","):[]).map(o=>o.trim()).filter(Boolean);return n.length>0?[...new Set(n)]:void 0}function E(e){let t=typeof e=="number"?e:typeof e=="string"&&/^\d+$/u.test(e.trim())?Number(e):Number.NaN;return Number.isSafeInteger(t)&&t>0?t:void 0}function Qe(e,t,n){for(let o of e.legacy_aliases){let s=Je(t,o.flag),r={value:s,flag:o.flag};if(Ze(s)&&n(r))return r}}function ee(e,t){let n=D(e);if(n)return{source:"canonical",value:n};if(t)return{source:"legacy",value:D(t.value)??[ie(t.flag)]}}function te(e,t){if(e==="unbounded")return{source:"canonical",value:"unbounded"};let n=E(e);if(n!==void 0)return{source:"canonical",value:n};if(!t)return;if(t.flag==="--no-truncate"||t.flag==="--unbounded")return{source:"legacy",value:"unbounded"};let o=E(t.value);return o===void 0?void 0:{source:"legacy",value:o}}function ne(e,t){let n=E(e);if(n!==void 0)return{source:"canonical",value:n};if(!t)return;let o=E(t.value);return o===void 0?void 0:{source:"legacy",value:o}}function oe(e,t){if(e==="json"||e==="toon")return{source:"canonical",value:e};if(t)return t.flag==="--stream"||t.flag==="--follow"?{source:"legacy",value:"stream"}:t.value==="json"||t.value==="toon"?{source:"legacy",value:t.value}:void 0}function ce(e,t){let n=ae(e);if(!n)return;let o=Ye.get(n),s={include:c=>ee(void 0,c),amount:c=>te(void 0,c),cost:c=>ne(void 0,c),encoding:c=>oe(void 0,c)},r=Object.fromEntries(g.map(c=>[c,Qe(o.dimensions[c],t,u=>s[c](u)!==void 0)])),i=g.flatMap(c=>{let u=r[c];return u?[u.flag]:[]}),a=g.flatMap(c=>{let u=r[c];return u?[o.dimensions[c].legacy_aliases.find(d=>d.flag===u.flag).migration_hint]:[]});return{command:n,include:ee(t.outputInclude??t.output_include,r.include),amount:te(t.outputLimit??t.output_limit,r.amount),cost:ne(t.outputBudget??t.output_budget,r.cost),encoding:oe(t.outputFormat??t.output_format,r.encoding),legacy_aliases_used:i,migration_hints:a,precedence:re}}function b(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var U=new Set(["applied_bound","applied_limit","completeness","continuation_contract","count","filters","has_more","next_cursor","now","omission_receipt","projection","row_contract","sorting","total","truncated"]),et=["collection_counts","notes_count","tests_count"];function de(e,t){let n=new Set(t.map(o=>o.split(".")[0]));return Object.fromEntries(Object.entries(e).filter(([o])=>n.has(o)))}function tt(e){let t=b(e.item)?e.item:{},n=[...new Set([...Object.keys(t),...et.filter(s=>Object.hasOwn(t,s))])].sort((s,r)=>s.localeCompare(r)),o=Object.keys(e).filter(s=>s!=="item"&&s!=="read_output"&&!U.has(s)).sort((s,r)=>s.localeCompare(r));return{item:t,itemFields:n,sections:o,valid:[...n,"item",...n.map(s=>`item.${s}`),...o]}}function nt(e,t){let n=tt(e),o=t.filter(d=>!n.valid.includes(d));if(o.length>0)throw new _(`Unknown --output-include selector(s) for get: ${o.join(", ")}. Valid selectors: ${n.valid.join(", ")}.`,f.USAGE);let s=t.includes("item"),r=t.flatMap(d=>d.startsWith("item.")?[d.slice(5)]:n.itemFields.includes(d)?[d]:[]).filter((d,le,_e)=>_e.indexOf(d)===le);if(s&&r.length>0)throw new _("--output-include cannot mix a full item with projected item fields; use item or item.<field>, not both.",f.USAGE);let i=new Set(t.filter(d=>n.sections.includes(d))),a=Object.fromEntries(Object.entries(e).filter(([d])=>U.has(d)||i.has(d)));s?a.item=n.item:r.length>0&&(a.item=de(n.item,r));let c=[...s?[]:r.length>0?n.itemFields.filter(d=>!r.includes(d)).map(d=>({name:`item.${d}`,restore_with:`--output-include item.${d}`})):[{name:"item",restore_with:"--output-include item"}],...n.sections.filter(d=>!i.has(d)).map(d=>({name:d,restore_with:`--output-include ${d}`}))],l=[...b(a.omission_receipt)&&Array.isArray(a.omission_receipt.omitted_field_groups)?a.omission_receipt.omitted_field_groups:[],...c];return a.omission_receipt={has_omissions:l.length>0,omitted_field_group_count:l.length,omitted_field_groups:l},a}function ot(e,t,n){if(e==="get")return nt(t,n);let o=w(t),s=n.flatMap(i=>o.flatMap(a=>i.startsWith(`${a}.`)?[i.slice(a.length+1)]:[])),r=n.some(i=>Object.hasOwn(t,i.split(".")[0])&&!o.some(a=>i.startsWith(`${a}.`)));if(o.length>0&&(!r||s.length>0)){let i={...t};return O(i,a=>b(a)?de(a,s.length>0?s:n):a)}return Object.fromEntries(Object.entries(t).filter(([i])=>n.some(a=>a.split(".")[0]===i)||U.has(i)))}function st(e,t){if(t==="unbounded")return e;let{result:n,truncated:o}=W(e,t);return o&&(n.has_more=!0,n.truncated=!0,typeof n.count=="number"&&(n.count=h(n)),n.applied_bound={kind:"output_limit",source:"explicit",value:t}),n}function rt(e){return g.filter(t=>e[t]!==void 0)}function L(e,t,n){let o=v(e,t);for(let s=0;s<8;s+=1){let r=n.estimated_tokens,i=o.read_session.spent_this_call_tokens;m(o,n),o=v(o,t);let a=o.read_session.spent_this_call_tokens;if(n.estimated_tokens===r&&a===i)return o}return o}function it(e,t,n){let o={...e};return t.include?.source==="canonical"&&(o=ot(t.command,o,t.include.value)),t.amount?.source==="canonical"&&(o=st(o,t.amount.value)),n===void 0?o:J(o,n)}function at(e,t){let n=[...e.cost?.source==="canonical"?[e.cost.value]:[],...t===void 0?[]:[Z(t)]];return n.length===0?void 0:Math.min(...n)}function ct(e,t,n,o){let s={contract_version:1,command:e.command,requested_dimensions:t,precedence:e.precedence,legacy_aliases_used:[],migration_hints:[],estimated_tokens:0,within_budget:!1,strings_compacted:!1,rows_compacted:!1,result_omitted:!0},r={output_budget_exceeded:{omitted_result:!0,reason:"requested_budget_infeasible",restore_with:"Increase --output-budget or narrow the read."},read_output:s},i=n===void 0?r:L(r,n,s);if(n===void 0&&m(i,s),n!==void 0&&s.estimated_tokens>o)throw new _("The remaining output-session budget cannot fit its mandatory receipts; start a new session with a larger token_budget.",f.USAGE);return i}function Cn(e,t,n){let o=ce(e,t);if(!o)return n;let s=x(t.outputSession??t.output_session),r=rt(o);if(r.filter(l=>o[l]?.source==="canonical").length===0&&s===void 0)return n;let a=it(n,o,s),c={contract_version:1,command:o.command,requested_dimensions:r,precedence:o.precedence,legacy_aliases_used:o.legacy_aliases_used,migration_hints:o.migration_hints,estimated_tokens:0,within_budget:!0,strings_compacted:!1,rows_compacted:!1,result_omitted:!1};a.read_output=c,a=s===void 0?a:L(a,s,c),m(a,c);let u=at(o,s);return u!==void 0&&c.estimated_tokens>u&&(a=Q(a,c,u),s!==void 0&&(a=L(a,s,c))),u!==void 0&&c.estimated_tokens>u?ct(o,r,s,u):a}function Dn(e){return b(e)&&b(e.output_budget_exceeded)&&e.output_budget_exceeded.omitted_result===!0&&e.output_budget_exceeded.reason==="requested_budget_infeasible"}function Ln(e,t){let n=ce(e,t)?.encoding;return n?.value==="json"||n?.value==="toon"?n.value:void 0}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f6e82c93-54e8-53a7-94df-10a573aae933")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="47bfb287-bdd9-5984-9db4-cb996845d98c")}catch{}})();var dt=Object.freeze([{flag:"--json"},{flag:"--lean"},{flag:"--token-accounting"},{flag:"--output-include",value_name:"fields"},{flag:"--output-limit",value_name:"count"},{flag:"--output-budget",value_name:"tokens"},{flag:"--output-format",value_name:"toon|json"},{flag:"--output-session",value_name:"state"},{flag:"--quiet"},{flag:"--no-changed-fields"},{flag:"--full-changed-fields"},{flag:"--id-only"},{flag:"--pm-path",aliases:["--path"]},{flag:"--no-extensions"},{flag:"--no-pager"},{flag:"--profile"},{flag:"--help"},{flag:"--author",value_name:"id"}]),jn=new Set(dt.flatMap(e=>[e.flag,...e.aliases??[]]));import ut from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="83232698-197a-5aef-be7c-aa37f3c56822")}catch{}})();function lt(e){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return e.toString();if(e===void 0)return"undefined";if(typeof e=="symbol")return e.toString();if(typeof e=="function")return`[function:${e.name||"anonymous"}]`}function _t(e){let t=Object.keys(e).sort(),n={};for(let o of t){let s=e[o];s!==void 0&&(n[o]=T(s))}return n}function T(e){let t=lt(e);if(t!==void 0)return t;if(Array.isArray(e))return e.map(o=>T(o));if(e instanceof Date)return e.toISOString();let n=e;if(typeof n.toJSON=="function"){let o=n.toJSON();if(o!==e)return T(o)}return _t(e)}function Kn(e){return JSON.stringify(T(e))}function ue(e,t,n,o){for(let s=0;s<t.length;s+=1)if(!n.has(s)&&o(e,t[s]))return n.add(s),!0;return!1}function ft(e,t){if(e instanceof RegExp||t instanceof RegExp)return e instanceof RegExp&&t instanceof RegExp&&e.toString()===t.toString()}function pt(e,t){if(e instanceof Date||t instanceof Date)return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime()}function mt(e,t){if(!(e instanceof Set||t instanceof Set))return;if(!(e instanceof Set&&t instanceof Set)||e.size!==t.size)return!1;let n=[...t],o=new Set;for(let s of e)if(!ue(s,n,o,y))return!1;return!0}function gt(e,t){if(!(e instanceof Map||t instanceof Map))return;if(!(e instanceof Map&&t instanceof Map)||e.size!==t.size)return!1;let n=[...t.entries()],o=new Set;for(let[s,r]of e.entries())if(!ue([s,r],n,o,([a,c],[u,l])=>y(a,u)&&y(c,l)))return!1;return!0}function Et(e,t){if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((n,o)=>y(n,t[o]))}function bt(e,t){let n=Object.keys(e).sort((s,r)=>s.localeCompare(r)),o=Object.keys(t).sort((s,r)=>s.localeCompare(r));if(n.length!==o.length)return!1;for(let s=0;s<n.length;s+=1){let r=n[s];if(r!==o[s]||!y(e[r],t[r]))return!1}return!0}var yt=[ft,pt,mt,gt,Et];function y(e,t){if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object")return!1;for(let n of yt){let o=n(e,t);if(o!==void 0)return o}return bt(e,t)}function Bn(e){return ut.createHash("sha256").update(e,"utf8").digest("hex")}function Gn(e,t){let n={};for(let s of t){let r=e[s];r!==void 0&&(n[s]=r)}let o=Object.keys(e).filter(s=>!t.includes(s)).sort((s,r)=>s.localeCompare(r));for(let s of o){let r=e[s];r!==void 0&&(n[s]=r)}return n}export{I as a,fe as b,pe as c,ht as d,P as e,j as f,V as g,Ot as h,F as i,K as j,B as k,me as l,At as m,Tt as n,It as o,Nt as p,kt as q,wt as r,Rt as s,xt as t,vt as u,Ct as v,Dt as w,Lt as x,Mt as y,Ut as z,Pt as A,jt as B,Vt as C,ge as D,Ft as E,Kt as F,Bt as G,Gt as H,Xt as I,Yt as J,zt as K,Ee as L,be as M,$t as N,Ht as O,ye as P,Jt as Q,Zt as R,Qt as S,Se as T,Ae as U,N as V,en as W,tn as X,f as Y,_ as Z,dt as _,jn as $,Kn as aa,y as ba,Bn as ca,Gn as da,Te as ea,Ie as fa,Ne as ga,an as ha,cn as ia,ke as ja,X as ka,dn as la,we as ma,Y as na,z as oa,un as pa,ln as qa,_n as ra,fn as sa,pn as ta,mn as ua,$ as va,x as wa,J as xa,v as ya,Z as za,g as Aa,se as Ba,Rn as Ca,xn as Da,Xe as Ea,ae as Fa,vn as Ga,ce as Ha,Cn as Ia,Dn as Ja,Ln as Ka};
2
+ //# sourceMappingURL=chunk-ZG54B4XG.js.map