@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
@@ -1,8 +0,0 @@
1
- import{A as a,C as l}from"./chunk-D4FPS43D.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="d5003dd5-f208-5734-9711-dff935d8c851")}catch{}})();var d="-",h=new Set(["actual_result","body","cmd","command","customer_impact","description","environment","expected_result","impact","location","message","note","outcome","repro_steps","resolution","text","title","unblock_note","value","why_now"]);function S(t){let e=t.trim();if(e==="")return[];let o=(_(e)??e.split(",")).map(i=>i.trim()).filter(Boolean).map(i=>i.toLowerCase());return Array.from(new Set(o)).sort((i,r)=>i.localeCompare(r))}function y(t){if(!Array.isArray(t)||t.length===0)return[];let e=[];for(let n of t)if(typeof n=="string")for(let o of S(n))e.push(o);return Array.from(new Set(e)).sort((n,o)=>n.localeCompare(o))}function w(t){return Array.isArray(t)?t.filter(e=>typeof e=="string").map(e=>e.trim().toLowerCase()).filter(Boolean):[]}function U(t){return typeof t!="string"?[]:t.split(";").map(e=>e.trim()).filter(Boolean)}function z(t,e,n){let o=t.map(c=>c.trim()).filter(Boolean);for(let c of e??[]){let s=c.trim();if(s.includes(";"))throw new l('Acceptance criteria added with --add-ac cannot contain ";" because semicolons delimit stored criteria',a.USAGE,{code:"acceptance_criteria_semicolon_forbidden",required:"Pass one semicolon-free criterion per --add-ac value",why:"A semicolon inside one criterion would be re-read as multiple criteria",nextSteps:["Split the text into repeated --add-ac values, or replace the semicolon with punctuation that is not the storage delimiter"]});s.length>0&&!o.includes(s)&&o.push(s)}let i=[],r=o;for(let c of n??[]){let s=c.trim();if(s.length!==0){if(!r.includes(s)){i.push(s);continue}r=r.filter(u=>u!==s)}}return{criteria:r,unmatchedRemovals:i}}function G(t,e){let n=w(t);if(!e||e.length===0)return Array.from(new Set(n)).sort((i,r)=>i.localeCompare(r));let o=new Set(n);for(let i of y(e))o.add(i);return Array.from(o).sort((i,r)=>i.localeCompare(r))}function K(t,e){let n=Array.from(new Set(w(t))).sort((i,r)=>i.localeCompare(r));if(!e||e.length===0)return n;let o=new Set(y(e));return o.size===0?n:n.filter(i=>!o.has(i))}function _(t){if(!t.startsWith("["))return null;let e;try{e=JSON.parse(t)}catch{return null}return e.map(o=>typeof o=="string"||typeof o=="number"||typeof o=="boolean"?String(o):"").filter(o=>o.length>0)}function m(t){return t.replace(/\r\n/g,`
2
- `)}function g(t){let e=m(t).trim();if(!e.startsWith("```"))return t;let n=e.split(`
3
- `);return n.length<2||n.at(-1)?.trim()!=="```"?t:n.slice(1,-1).join(`
4
- `)}function b(t){let e=[],n="",o=!1,i=!1;for(let r of t){if(i){n+=r,i=!1;continue}if(r==="\\"){n+=r,i=!0;continue}if(r==='"'){o=!o,n+=r;continue}if(r===","&&!o){e.push(n.trim()),n="";continue}n+=r}return n.trim()&&e.push(n.trim()),e}function A(t){let e=t.trim();if(e.startsWith('"')&&e.endsWith('"')){try{let n=JSON.parse(e);if(typeof n=="string")return n}catch{}return e.slice(1,-1).replace(/\\"/g,'"')}return t}function x(t){let e=t.indexOf("="),n=t.indexOf(":"),o=e>0,i=n>0;return o&&i?Math.min(e,n):o?e:i?n:-1}function $(t,e){if((e==="--add"||e==="--add-glob")&&(/[./\\]/.test(t)||/\.[a-z]{1,6}$/i.test(t.trim())))return"For file/doc paths use: path=<file-path>[,scope=project|global]. The scope field is optional and defaults to project (example: path=src/api.ts or path=README.md,scope=project). ";if(e!=="--event")return"";let n=t.toLowerCase(),o=n.includes("recur_")||n.includes("recurrence")?' Recurrence list values must stay in one field and use "|" delimiters (for example recur_by_weekday=mon|wed or recur_by_month_day=1|15).':"",i=n.includes("recur_byweekday")?" Use recur_by_weekday (with underscores) for weekday recurrence filters.":"";return`${o}${i}`}function k(t,e){let n=t.replaceAll(/\s+/g," ").trim(),o=n.length>160?`${n.slice(0,157)}...`:n,i=$(t,e);return`Invalid ${e} value "${o}". Expected key=value entries separated by commas. `+i+`Also accepts markdown-style key/value lines (for example "- path: README.md"). Use ${e} ${d} to read piped stdin input.`}function C(t){let e=g(t).trim();if(e.length===0||!e.includes(`
5
- `)&&!e.startsWith("-")&&!e.startsWith("*")&&!e.startsWith("+"))return null;let n={},o,i=m(e).split(`
6
- `).map(r=>r.trim()).filter(r=>r.length>0);for(let r of i){let c=r.match(/^(?:[-*+]\s+)?([a-zA-Z0-9_.-]+)\s*(=|:)\s*(.*)$/);if(c){let s=c[1].trim();n[s]=A(c[3].trim()),o=s;continue}if(o&&h.has(o.toLowerCase())){n[o]=`${n[o]}
7
- ${r}`;continue}return null}return n}function D(t,e){let n=g(t).trim();if(!n)throw new l(`${e} cannot be empty`,a.USAGE);let o=C(n);if(o)return o;let i={},r,c=b(n);for(let s of c){let u=x(s);if(u>0){let f=s.slice(0,u).trim(),p=A(s.slice(u+1).trim());i[f]=p,r=f;continue}if(r&&h.has(r.toLowerCase())){i[r]=`${i[r]},${s.trim()}`;continue}throw new l(k(t,e),a.USAGE)}return i}var v=/^[A-Za-z]:[\\/]/,T=/^(?:[-*+]\s+)?[A-Za-z_][A-Za-z0-9_.-]*\s*=/;function V(t){let e=t.trim();return v.test(e)?!1:T.test(e)}function N(t,e,n){let o=new Set(n.map(r=>r.toLowerCase())),i=Object.keys(t).filter(r=>!o.has(r.toLowerCase()));if(i.length>0)throw new l(`${e} does not recognize key${i.length>1?"s":""} ${i.map(r=>`"${r}"`).join(", ")}. Allowed keys: ${n.join(", ")}.`,a.USAGE);for(let r of Object.keys(t)){let c=r.toLowerCase();if(c!==r){if(Object.hasOwn(t,c))throw new l(`${e} provides key "${r}" more than once after case normalization.`,a.USAGE);t[c]=t[r],delete t[r]}}}async function O(t){if(process.stdin.isTTY===!0)throw new l(`${t} value "${d}" requires piped stdin input. Pipe content into the command, or end manual stdin with Ctrl+D (Unix/macOS) or Ctrl+Z then Enter (Windows).`,a.USAGE);return process.stdin.setEncoding("utf8"),await new Promise((e,n)=>{let o="";process.stdin.on("data",i=>{o+=i}),process.stdin.on("end",()=>{e(m(o))}),process.stdin.on("error",i=>{n(i)})})}function P(){let t,e,n=async r=>{if(e&&e!==r)throw new l(`Only one option may use "${d}" stdin token per command invocation. Already used by ${e}.`,a.USAGE);return e=r,t||(t=O(r)),await t};return{resolveValue:async(r,c)=>{if(r!==void 0)return r.trim()!==d?r:await n(c)},resolveList:async(r,c)=>{if(!r)return;let s=r.map((p,E)=>p.trim()===d?E:-1).filter(p=>p>=0);if(s.length===0)return r;if(s.length>1)throw new l(`${c} accepts "${d}" stdin token at most once per command invocation`,a.USAGE);let u=await n(c),f=[...r];return f[s[0]]=u,f}}}function W(t,e){let n=Number(t);if(!Number.isFinite(n))throw new l(`Invalid ${e} value "${t}"`,a.USAGE);return n}function j(t,e){let n=t.trim(),o=Number(n);if(n===""||!Number.isInteger(o)||o<0)throw new l(`Invalid ${e} value "${t}". Expected a non-negative integer.`,a.USAGE);return o}export{S as a,U as b,z as c,G as d,K as e,D as f,V as g,N as h,P as i,W as j,j as k};
8
- //# sourceMappingURL=chunk-NYIGHWQY.js.map
@@ -1,2 +0,0 @@
1
- import{a as oe,b as ae,c as de}from"./chunk-H7KGWPDF.js";import{c as ie}from"./chunk-H5Y5YE6A.js";import{f as se}from"./chunk-WOD3WWUN.js";import{q as H,r as W,v as Y,w as Q}from"./chunk-NG6OXIBR.js";import{$f as ne,A as c,C as f,Da as v,Ea as T,La as j,Nc as G,Nf as X,Oa as B,Pc as $,Pf as J,R as O,Rd as z,Sd as q,T as h,Td as M,Tf as Z,U as x,V as C,Vf as ee,Wd as V,_f as te,ag as re,b as D,cd as A,lc as U,v as N,xc as P}from"./chunk-D4FPS43D.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="eb044a23-d43b-5e9c-9ae7-4ac91b5e587a")}catch{}})();function L(t,e="--limit"){if(t===void 0)return;let n=String(t).trim(),r=n.length===0?Number.NaN:Number(n);if(!Number.isInteger(r)||r<0)throw new f(`${e} must be a non-negative integer`,c.USAGE);return r}function le(t,e="--priority"){if(t===void 0)return;let n=String(t).trim(),r=n.length===0?Number.NaN:Number(n);if(!Number.isInteger(r)||r<0||r>4)throw new f(`${e} filter must be 0..4`,c.USAGE);return r}function qt(t,e,n="--type"){if(t===void 0)return;let r=T(t,e);if(!r)throw new f(`${n} filter must be one of ${e.types.join("|")}`,c.USAGE);return r}(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="1035bd62-b012-5249-bd53-31b39f21b2d3")}catch{}})();function k(t,e){if(t===void 0)return;let n=[],r="";for(let o=0;o<t.length;o+=1){let l=t[o];if(l==="\\"){let d=t[o+1];if(d===","||d==="\\"){r+=d,o+=1;continue}r+=l;continue}if(l===","){n.push(r),r="";continue}r+=l}n.push(r);let s=n.map(o=>o.trim());if(s.some(o=>o.length===0))throw new f(`${e.label} requires at least one non-empty value`,c.USAGE);let i=s.map(o=>e.normalize?.(o)??o);return[...new Set(i)]}function b(t,e){let n=k(t,e);return n===void 0?void 0:new Set(n)}function ue(t,e,n="--type"){let r=k(t,{label:n});if(r===void 0)return;let s=r.map(i=>{let o=T(i,e);if(!o)throw new f(`${n} filter token "${i}" must be one of ${e.types.join("|")}`,c.USAGE);return o});return new Set(s)}function ce(t,e="--priority"){let n=k(t,{label:e});if(n!==void 0)return new Set(n.map(r=>le(r,e)))}(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="03824e4b-562b-5e12-a89a-9dd091ae7fd3")}catch{}})();var _=["notes","learnings","files","docs","tests","comments","deps","body","linked_command"];function g(t){return Array.isArray(t)&&t.length>0}function je(t){return typeof t=="string"&&t.trim().length>0}function Be(t){return Array.isArray(t)?t.some(e=>{if(typeof e!="object"||e===null)return!1;let n=e.command;return typeof n=="string"&&n.trim().length>0}):!1}function me(t,e){switch(e){case"notes":return g(t.notes);case"learnings":return g(t.learnings);case"files":return g(t.files);case"docs":return g(t.docs);case"tests":return g(t.tests);case"comments":return g(t.comments);case"deps":return g(t.dependencies);case"body":return je(t.body);case"linked_command":return Be(t.tests)}}function ye(t){return _.some(e=>t[e]!==void 0)}function pe(t,e){for(let n of _){let r=e[n];if(r===void 0)continue;let s=me(t,n);if(r==="present"&&!s||r==="absent"&&s)return!1}return!0}function ge(t){return _.some(e=>e!=="body"&&t[e]!==void 0)}function _e(t){return t.body!==void 0}function fe(t,e){return e===0?100:Math.round(t/e*1e3)/10}function Ue(){let t={};for(let e of _)t[e]={present:0,total:0,percent:100};return t}function Zt(t){let e=Ue(),n=t.length;for(let o of t)for(let l of _)me(o,l)&&(e[l].present+=1);for(let o of _)e[o].total=n,e[o].percent=fe(e[o].present,n);let r=e.body,s=n-r.present,i={present:s,total:n,percent:fe(s,n)};return{total_items:n,fields:e,body_populated:r,empty_body:i}}(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ec0c4c57-e3c2-54b3-bcf4-b4ab3b1d964e")}catch{}})();var Pe=t=>({acMissing:t.filterAcMissing===!0,estimatesMissing:t.filterEstimatesMissing===!0,resolutionMissing:t.filterResolutionMissing===!0,metadataMissing:t.filterMetadataMissing===!0,reviewerMissing:t.filterReviewerMissing===!0,riskMissing:t.filterRiskMissing===!0,confidenceMissing:t.filterConfidenceMissing===!0,sprintMissing:t.filterSprintMissing===!0,releaseMissing:t.filterReleaseMissing===!0}),he=[{field:"notes",presentKey:"hasNotes",absentKey:"noNotes",presentFlag:"--has-notes",absentFlag:"--no-notes"},{field:"learnings",presentKey:"hasLearnings",absentKey:"noLearnings",presentFlag:"--has-learnings",absentFlag:"--no-learnings"},{field:"files",presentKey:"hasFiles",absentKey:"noFiles",presentFlag:"--has-files",absentFlag:"--no-files"},{field:"docs",presentKey:"hasDocs",absentKey:"noDocs",presentFlag:"--has-docs",absentFlag:"--no-docs"},{field:"tests",presentKey:"hasTests",absentKey:"noTests",presentFlag:"--has-tests",absentFlag:"--no-tests"},{field:"comments",presentKey:"hasComments",absentKey:"noComments",presentFlag:"--has-comments",absentFlag:"--no-comments"},{field:"deps",presentKey:"hasDeps",absentKey:"noDeps",presentFlag:"--has-deps",absentFlag:"--no-deps"},{field:"body",presentKey:"hasBody",absentKey:"emptyBody",presentFlag:"--has-body",absentFlag:"--empty-body"},{field:"linked_command",presentKey:"hasLinkedCommand",absentKey:"noLinkedCommand",presentFlag:"--has-linked-command",absentFlag:"--no-linked-command"}],Ke=t=>{let e=he.find(n=>t[n.presentKey]===!0&&t[n.absentKey]===!0);if(e)throw new f(`Cannot combine ${e.presentFlag} with ${e.absentFlag} for the same field.`,c.USAGE);return Object.fromEntries(he.flatMap(n=>t[n.presentKey]===!0?[[n.field,"present"]]:t[n.absentKey]===!0?[[n.field,"absent"]]:[]))},be=["priority","deadline","updated_at","created_at","title","parent"],Fe=["asc","desc"],Ge=["id","title","status","type","priority","parent","updated_at"],$e=["id","status","type","title"],An={list:"brief","list-all":"full","list-draft":"full","list-open":"brief","list-in-progress":"brief","list-blocked":"brief","list-closed":"full","list-canceled":"full"},ze=["tree_depth","tree_parent","tree_children","tree_title"],we=new Set(Z);function qe(t,e,n){let r=t.filter(o=>o.startsWith("item_list_item_read_failed:")).length,s=t.filter(o=>o.startsWith("item_list_directory_read_failed:")).length,i={status:e?"unchecked":r+s>0?"partial":"complete",unreadable_item_count:r,unreadable_directory_count:s};if(n&&i.status==="partial")throw new f(`List source is incomplete: ${r} item document(s) and ${s} item directory/directories could not be read.`,c.GENERIC_FAILURE,{code:"list_source_incomplete",why:"Strict list reads fail closed so agents and SDK consumers never treat an omitted item as a complete workspace.",nextSteps:["Run pm validate --check-storage-integrity to locate unreadable tracker artifacts.","Repair the reported files or align the installed decoder version, then retry."]});return i}function Ve(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length>0}var He=[{key:"hasNotes",summaryKey:"has_notes"},{key:"hasLearnings",summaryKey:"has_learnings"},{key:"hasFiles",summaryKey:"has_files"},{key:"hasDocs",summaryKey:"has_docs"},{key:"hasTests",summaryKey:"has_tests"},{key:"hasComments",summaryKey:"has_comments"},{key:"hasDeps",summaryKey:"has_deps"},{key:"hasBody",summaryKey:"has_body"},{key:"hasLinkedCommand",summaryKey:"has_linked_command"},{key:"noNotes",summaryKey:"no_notes"},{key:"noLearnings",summaryKey:"no_learnings"},{key:"noFiles",summaryKey:"no_files"},{key:"noDocs",summaryKey:"no_docs"},{key:"noTests",summaryKey:"no_tests"},{key:"noComments",summaryKey:"no_comments"},{key:"noDeps",summaryKey:"no_deps"},{key:"emptyBody",summaryKey:"empty_body"},{key:"noLinkedCommand",summaryKey:"no_linked_command"}],We=[{key:"filterReviewerMissing",summaryKey:"filter_reviewer_missing"},{key:"filterRiskMissing",summaryKey:"filter_risk_missing"},{key:"filterConfidenceMissing",summaryKey:"filter_confidence_missing"},{key:"filterSprintMissing",summaryKey:"filter_sprint_missing"},{key:"filterReleaseMissing",summaryKey:"filter_release_missing"}];function Te(t,e){for(let n of He)e[n.key]===!0&&(t[n.summaryKey]=!0)}function Ae(t,e){for(let n of We)e[n.key]===!0&&(t[n.summaryKey]=!0)}function Ye(t,e,n){for(let r of n){let s=e[r.optionKey];s!==void 0&&(t[r.summaryKey]=r.normalize?r.normalize(s):s)}}function Qe(t){let e={};return Te(e,t),e}function Xe(t){let e={};return Ae(e,t),e}var Je=[{optionKey:"type",summaryKey:"type"},{optionKey:"tag",summaryKey:"tag"},{optionKey:"priority",summaryKey:"priority"},{optionKey:"deadlineBefore",summaryKey:"deadline_before"},{optionKey:"deadlineAfter",summaryKey:"deadline_after"},{optionKey:"updatedAfter",summaryKey:"updated_after"},{optionKey:"updatedBefore",summaryKey:"updated_before"},{optionKey:"createdAfter",summaryKey:"created_after"},{optionKey:"createdBefore",summaryKey:"created_before"},{optionKey:"ids",summaryKey:"ids"},{optionKey:"assignee",summaryKey:"assignee"},{optionKey:"assigneeFilter",summaryKey:"assignee_filter"},{optionKey:"parent",summaryKey:"parent"},{optionKey:"sprint",summaryKey:"sprint"},{optionKey:"release",summaryKey:"release"}],Ze=[{optionKey:"type",summaryKey:"type"},{optionKey:"tag",summaryKey:"tag"},{optionKey:"priority",summaryKey:"priority"},{optionKey:"deadlineBefore",summaryKey:"deadline_before"},{optionKey:"deadlineAfter",summaryKey:"deadline_after"},{optionKey:"updatedAfter",summaryKey:"updated_after"},{optionKey:"updatedBefore",summaryKey:"updated_before"},{optionKey:"createdAfter",summaryKey:"created_after"},{optionKey:"createdBefore",summaryKey:"created_before"},{optionKey:"ids",summaryKey:"ids"},{optionKey:"assignee",summaryKey:"assignee"},{optionKey:"assigneeFilter",summaryKey:"assignee_filter"},{optionKey:"parent",summaryKey:"parent"},{optionKey:"sprint",summaryKey:"sprint"},{optionKey:"release",summaryKey:"release"},{optionKey:"limit",summaryKey:"limit"},{optionKey:"offset",summaryKey:"offset"},{optionKey:"includeBody",summaryKey:"include_body"},{optionKey:"compact",summaryKey:"compact"},{optionKey:"fields",summaryKey:"fields"}],et=[{key:"filterAcMissing",summaryKey:"filter_ac_missing"},{key:"filterEstimatesMissing",summaryKey:"filter_estimates_missing"},{key:"filterResolutionMissing",summaryKey:"filter_resolution_missing"},{key:"filterMetadataMissing",summaryKey:"filter_metadata_missing"}],tt="-7d";function nt(t){let{filtersStatus:e,options:n,treeEnabled:r,treeDepth:s,sortField:i,sortOrder:o,runtimeFieldFilters:l}=t,d={};return e!==null&&(d.status=e),n.dependencyBlocked===!0&&(d.blocked_semantics="status_or_dependency"),Ye(d,n,Je),Ie(d,n),n.filterAcMissing===!0&&(d.filter_ac_missing=!0),n.filterEstimatesMissing===!0&&(d.filter_estimates_missing=!0),n.filterResolutionMissing===!0&&(d.filter_resolution_missing=!0),n.filterMetadataMissing===!0&&(d.filter_metadata_missing=!0),Ae(d,n),Te(d,n),n.limit!==void 0&&(d.limit=n.limit),n.offset!==void 0&&(d.offset=n.offset),n.includeBody===!0&&(d.include_body=!0),n.fields!==void 0&&(d.fields=n.fields),r&&(d.tree=!0,s!==void 0&&(d.tree_depth=s)),i!==void 0&&(d.sort=i,d.order=o),Ve(l)&&(d.runtime_filters=l),d}function Le(t,e,n){let r=A(t.status,n),s=A(e.status,n);if(r!==s)return r?1:-1;let i=t.priority-e.priority;if(i!==0)return i;let o=h(e.updated_at,t.updated_at);return o!==0?o:(t.id??"").localeCompare(e.id??"")}function rt(t,e){return[...t].sort((n,r)=>Le(n,r,e))}function Se(t,e){if(t!==void 0)return C(t,new Date,e)}function F(t,e){if(t==null)return;let n=String(t).trim();if(n.length!==0)return C(n,new Date,e)}function st(t){let e=t.updatedAfter!=null&&String(t.updatedAfter).trim().length>0;if([t.today===!0,t.recent===!0,e].filter(r=>r).length>1)throw new f("Choose only one updated_at window: --today, --recent, or --updated-after.",c.USAGE);if(t.today===!0){let r=new Date;return r.setHours(0,0,0,0),r.toISOString()}return t.recent===!0?F(tt,"recent"):F(t.updatedAfter,"updated-after")}function Ie(t,e){e.today===!0&&(t.today=!0),e.recent===!0&&(t.recent=!0)}function it(t){if(t==null)return;let e=String(t).trim();if(e.length===0)throw new f("--ids requires at least one non-empty item ID",c.USAGE);let n=e.split(",").map(r=>r.trim()).filter(r=>r.length>0);if(n.length===0)throw new f("--ids requires at least one non-empty item ID",c.USAGE);return new Set(n)}function Ce(t){if(t===void 0)return;let e=String(t).trim(),n=e.length===0?Number.NaN:Number(e);if(!Number.isInteger(n)||n<0)throw new f("Offset filter must be a non-negative integer",c.USAGE);return n}function ot(t){if(t===void 0)return;let e=t.split(",").map(n=>n.trim()).filter(n=>n.length>0);if(e.length===0)throw new f("List --fields requires a comma-separated list of field names",c.USAGE);return[...new Set(e)]}function at(t){let e=t.compact===!0,n=t.brief===!0,r=t.full===!0,s=ot(t.fields);if(Number(e)+Number(n)+Number(r)+ +(s!==void 0)>1)throw new f("List projection options are mutually exclusive. Use one of --compact, --brief, --full, or --fields.",c.USAGE);return r?{mode:"full",fields:[]}:n?{mode:"brief",fields:[...$e]}:e?{mode:"compact",fields:[...Ge]}:s?{mode:"fields",fields:s}:{mode:"full",fields:[]}}function S(t){return t.startsWith("item.")?t.slice(5):t}function dt(t,e){if(t.mode!=="fields")return;let n=new Set([...N,"body",...ze,...e]),r=t.fields.filter(s=>!n.has(S(s)));if(r.length>0)throw new f(`Unknown list --fields value(s): ${r.join(", ")}`,c.USAGE,{code:"unknown_field_projection",examples:["pm list-open --fields id,title,status,type,updated_at","pm list --fields id,title,parent,priority --limit 10","pm list-all --fields id,title,body --limit 5"]})}var lt=new Map([["updated","updated_at"],["update","updated_at"],["modified","updated_at"],["created","created_at"],["create","created_at"]]);function ut(t){if(t===void 0)return;let e=t.trim().toLowerCase(),n=lt.get(e);if(n)return n;if(!be.includes(e))throw new f(`Sort field must be one of ${be.join("|")} (aliases: updated->updated_at, created->created_at)`,c.USAGE);return e}function ct(t){if(t===void 0)return;let e=t.trim().toLowerCase();if(!Fe.includes(e))throw new f(`Sort order must be one of ${Fe.join("|")}`,c.USAGE);return e}function ft(t){return L(t,"--tree-depth")}function mt(t){if(t===void 0)return;let e=t.trim().toLowerCase();if(!e)throw new f("Assignee filter must be one of assigned|unassigned",c.USAGE);if(e!=="assigned"&&e!=="unassigned")throw new f(`Invalid assignee filter "${t}". Allowed: assigned|unassigned`,c.USAGE);return e}function Ee(t,e){return W(t,e,{strict:!0})}function Me(t){return b(t,{label:"--tag",normalize:e=>e.toLowerCase()})}function yt(t,e,n){let r=Me(e);if(r===void 0)return;let s=new Set(t.flatMap(o=>o.tags.map(l=>l.trim().toLowerCase()))),i=[...r].filter(o=>!s.has(o));i.length>0&&n.push(`unknown_tags:${i.join(",")}`)}function pt(t,e){if(t&&[...t].some(n=>n.toLowerCase()==="none"||n.toLowerCase()==="null"))throw new f('--assignee no longer accepts "none" or "null". Use --assignee-filter unassigned.',c.USAGE);if(t!==void 0&&e==="unassigned")throw new f("Cannot combine --assignee with --assignee-filter unassigned",c.USAGE)}function gt(t,e,n,r){let s=b(e.assignee,{label:"--assignee"}),i=mt(e.assigneeFilter);pt(s,i);let o=Pe(e),l=Ke(e);return{idsFilter:it(e.ids),statusSet:t&&t.length>0?new Set(t):void 0,excludeTerminal:e.excludeTerminal===!0,typeFilter:ue(e.type,n),tagFilters:Me(e.tag),priorityFilter:ce(e.priority),deadlineBefore:Se(e.deadlineBefore,"deadline-before"),deadlineAfter:Se(e.deadlineAfter,"deadline-after"),updatedAfter:st(e),updatedBefore:F(e.updatedBefore,"updated-before"),createdAfter:F(e.createdAfter,"created-after"),createdBefore:F(e.createdBefore,"created-before"),assigneeFilter:s,assigneeModeFilter:i,parentFilter:e.parent?.trim(),treeEnabled:e.tree===!0,sprintFilter:b(e.sprint,{label:"--sprint"}),releaseFilter:b(e.release,{label:"--release"}),missingMetadataFilters:o,missingMetadataActive:ae(o),lifecycleClassifier:oe(r),contentFieldFilters:l,contentFiltersActive:ye(l)}}function _t(t,e,n){return ht(t,e,n)&&bt(t,e)&&Ft(t,e)&&St(t,e)}function ht(t,e,n){return e.idsFilter&&!e.idsFilter.has(t.id)||e.statusSet&&!e.statusSet.has(t.status)||e.excludeTerminal&&A(t.status,n)||e.typeFilter&&!e.typeFilter.has(t.type)||e.tagFilters&&![...e.tagFilters].some(r=>(t.tags??[]).some(s=>s.trim().toLowerCase()===r))?!1:e.priorityFilter===void 0||e.priorityFilter.has(t.priority)}function bt(t,e){return x(t,e)}function Ft(t,e){return e.assigneeModeFilter==="assigned"&&!t.assignee||e.assigneeModeFilter==="unassigned"&&t.assignee?!1:e.assigneeFilter===void 0||t.assignee!==void 0&&e.assigneeFilter.has(t.assignee)}function St(t,e){return e.parentFilter!==void 0&&!e.treeEnabled&&t.parent!==e.parentFilter||e.sprintFilter!==void 0&&(t.sprint===void 0||!e.sprintFilter.has(t.sprint))?!1:e.releaseFilter===void 0||t.release!==void 0&&e.releaseFilter.has(t.release)}function Et(t,e,n,r){return!(!_t(t,e,n)||e.missingMetadataActive&&!de(t,e.missingMetadataFilters,e.lifecycleClassifier)||e.contentFiltersActive&&!pe(t,e.contentFieldFilters)||!Q(t,r))}function Kt(t,e,n,r,s,i){let o=gt(e,n,r,s);return t.filter(l=>Et(l,o,s,i))}function I(t){if(typeof t!="string")return;let e=t.trim();return e.length>0?e:void 0}function wt(t,e,n){let r=t,s=typeof r.title=="string"?r.title:"",i=I(typeof r.parent=="string"?r.parent:void 0)??null;return{...t,tree_depth:e,tree_parent:i,tree_children:n,tree_title:`${" ".repeat(e)}${s}`}}function Tt(t,e,n){let r=new Map,s=new Map;for(let a of t){r.set(a.id,a);let m=I(a.parent);if(!m)continue;let u=s.get(m);u?u.push(a):s.set(m,[a])}let i=e?[...s.get(e)??[]]:t.filter(a=>{let m=I(a.parent);return!m||!r.has(m)}),o=[],l=new Set,d=(a,m)=>{if(l.has(a.id))return;l.add(a.id);let u=s.get(a.id)??[];if(o.push(wt(a,m,u.length)),!(n!==void 0&&m>=n))for(let p of u)d(p,m+1)};for(let a of i)d(a,0);return o}function At(t,e){return t===e?0:t===null?1:e===null?-1:t.localeCompare(e)}function Lt(t,e){return t===e?0:t===null?1:e===null?-1:h(t,e)}function It(t,e,n){switch(n){case"priority":return t.priority-e.priority;case"deadline":return Lt(t.deadline??null,e.deadline??null);case"updated_at":return h(t.updated_at,e.updated_at);case"created_at":return h(t.created_at,e.created_at);case"title":return(t.title??"").localeCompare(e.title??"");case"parent":return At(t.parent??null,e.parent??null);default:return 0}}function Ct(t,e,n,r){return e?[...t].sort((s,i)=>{let o=It(s,i,e);if(o!==0)return n==="desc"?-o:o;let l=Le(s,i,r);return n==="desc"?-l:l}):rt(t,r)}function Mt(t,e,n=!1){let r=S(e.trim());if(r.length===0)return null;let s=t;return n&&r==="title"&&typeof s.tree_title=="string"?s.tree_title:Object.prototype.hasOwnProperty.call(s,r)?s[r]??null:null}function ke(t,e,n=!1){return e.mode==="full"?t:t.map(r=>{let s={};for(let i of e.fields)s[i]=Mt(r,i,n);return s})}function kt(t){let e=[];for(let n of t)e.push(n.metadata_key);return e}function Rt(t,e){if(t.noTruncate!==!0)return L(t.limit)??(e>=1e4?20:void 0)}function Dt(t,e,n){return e.after===void 0?Ce(e.offset)??0:V(t,e.after,n,r=>r.id)}function Re(t,e,n){return{...t!==void 0?{applied_limit:t}:{},has_more:e,truncated:e,next_cursor:n??null}}async function Nt(t,e){let n=j(process.cwd(),e.path);if(!await D(B(n)))throw new f(`Tracker is not initialized at ${n}. Run pm init first.`,c.NOT_FOUND);let r=await X(n),s=G(r.schema),i=$(r.schema),o=at(t);return dt(o,kt(i.definitions)),{pmRoot:n,settings:r,statusRegistry:s,runtimeFieldFilters:Y(t,i,"list"),typeRegistry:v(r,U()),projection:o}}async function Ot(t,e,n){let r=e.projection.fields.some(d=>S(d)==="body"),s=e.projection.mode==="full"||e.projection.fields.some(d=>we.has(S(d))),i=Ke(t),o=ge(i),l=_e(i);return t.includeBody||r||l?await re(e.pmRoot,e.settings.item_format,e.typeRegistry.type_to_folder,n,e.settings.schema):s||o?await te(e.pmRoot,e.settings.item_format,e.typeRegistry.type_to_folder,n,e.settings.schema):await ne(e.pmRoot,e.settings.item_format,e.typeRegistry.type_to_folder,n,e.settings.schema)}function xt(t){let e=ut(t.sort),n=ct(t.order)??"asc",r=t.tree===!0;if(!r&&t.treeDepth!==void 0)throw new f("List --tree-depth requires --tree",c.USAGE);if(!e&&t.order!==void 0)throw new f("List --order requires --sort",c.USAGE);return{sortField:e,sortOrder:n,treeEnabled:r,treeDepth:r?ft(t.treeDepth):void 0,parentRoot:r?I(t.parent):void 0}}function vt(t,e,n){let r=Ee(e.status,n),s=r??Ee(t,n),i=H(e.status),o=r||i?{...e,excludeTerminal:!1}:e,l=i?"all":s===void 0?o.excludeTerminal===!0?null:"all":s.length===1?s[0]:s;return{resolvedStatus:s,explicitAllStatuses:i,effectiveOptions:o,filtersStatus:l}}function jt(t,e,n,r,s){if(e.after!==void 0&&e.offset!==void 0)throw new f("List --after cannot be combined with --offset.",c.USAGE);let i=Rt(e,t.length),o=Dt(t,e,s),l=i===void 0?t.slice(o):t.slice(o,o+i),d=ke(l,n,r),a=t.length,m=l.length>0&&o+l.length<a,u=m&&l.length>0?M(s,l[l.length-1].id,o+l.length-1):void 0;return{projected:d,totalMatched:a,pageExtras:Re(i,m,u)}}function De(t,e,n){return q("list",{status:t,options:z(e,se),sort:n.sortField??"default",order:n.sortOrder,tree:n.treeEnabled,tree_depth:n.treeDepth??null})}async function Bt(t){let{options:e,runtime:n,statusSelection:r,ordering:s}=t,i=new Set(["status","limit","offset","compact","brief","full","fields","format","stream","includeBody","excludeTerminal","noTruncate"]),o=[n.projection.mode==="full",n.projection.fields.some(K=>{let y=S(K);return y==="body"||we.has(y)})].includes(!0);if([e.limit===void 0,e.after!==void 0,e.noTruncate===!0,e.includeBody===!0,e.dependencyBlocked===!0,e.strictRead===!0,s.treeEnabled,s.sortField!==void 0,o,P(),Object.keys(n.runtimeFieldFilters).length>0,Object.entries(e).some(([K,y])=>y!==void 0&&!i.has(K))].includes(!0))return null;let d=await ee(n.pmRoot,[...new Set(Object.values(n.typeRegistry.type_to_folder))]);if(!d)return null;let a=L(e.limit),m=Ce(e.offset)??0,u=await J({pmRoot:n.pmRoot,expectedSourceCursor:d.source_cursor,query:{statuses:r.resolvedStatus,excludeStatuses:r.resolvedStatus===void 0&&r.effectiveOptions.excludeTerminal===!0?[...n.statusRegistry.terminal_statuses]:void 0,terminalStatuses:[...n.statusRegistry.terminal_statuses],limit:a,offset:m}});if(!u)return null;let p=u.items.length>0&&m+u.items.length<u.total,E=p?M(De(r.filtersStatus,e,s),u.items.at(-1).id,m+u.items.length-1):void 0;return{projected:ke(u.items,n.projection,!1),totalMatched:u.total,pageExtras:Re(a,p,E)}}function Ut(t){let{filtersStatus:e,options:n,noTruncate:r,treeEnabled:s,treeDepth:i,sortField:o,sortOrder:l,runtimeFieldFilters:d}=t,a={};e!==null&&(a.status=e),n.dependencyBlocked===!0&&(a.blocked_semantics="status_or_dependency");let m=n;for(let u of Ze){let p=m[u.optionKey];p!=null&&(a[u.summaryKey]=p)}for(let u of et)m[u.key]===!0&&(a[u.summaryKey]=!0);return Object.assign(a,Xe(n),Qe(n)),Ie(a,n),r&&(a.no_truncate=!0),s&&(a.tree=!0,i!==void 0&&(a.tree_depth=i)),o!==void 0&&(a.sort=o,a.order=l),a.runtime_filters=d,a}async function Ln(t,e,n){let r=await Nt(e,n),s=[],i=xt(e),o=vt(t,e,r.statusRegistry),l=e.noTruncate===!0,d=await Bt({options:e,runtime:r,statusSelection:o,ordering:i}),a=d;if(!a){let y=await Ot(e,r,s);yt(y,e.tag,s);let w=Kt(y,o.resolvedStatus,o.effectiveOptions,r.typeRegistry,r.statusRegistry,r.runtimeFieldFilters),Ne=e.dependencyBlocked===!0?(()=>{let xe=ie(y,r.statusRegistry);return w.filter(ve=>xe.has(ve.id.trim().toLowerCase()))})():w,R=Ct(Ne,i.sortField,i.sortOrder,r.statusRegistry),Oe=i.treeEnabled?Tt(R,i.parentRoot,i.treeDepth):R;a=jt(Oe,e,r.projection,i.treeEnabled,De(o.filtersStatus,e,i))}let m=O(),u=[...new Set(s)].sort((y,w)=>y.localeCompare(w)),p=qe(u,d!==null,e.strictRead===!0),E=r.projection.mode==="full"?null:[...r.projection.fields];if(r.projection.mode==="compact"&&e.compact===!0){let y=nt({filtersStatus:o.filtersStatus,options:e,treeEnabled:i.treeEnabled,treeDepth:i.treeDepth,sortField:i.sortField,sortOrder:i.sortOrder,runtimeFieldFilters:r.runtimeFieldFilters});return{items:a.projected,count:a.projected.length,total:a.totalMatched,...a.pageExtras,completeness:p,filters:y,projection:{mode:"compact",fields:E},...u.length>0?{warnings:u}:{}}}return{items:a.projected,count:a.projected.length,total:a.totalMatched,...a.pageExtras,completeness:p,filters:Ut({filtersStatus:o.filtersStatus,options:e,noTruncate:l,treeEnabled:i.treeEnabled,treeDepth:i.treeDepth,sortField:i.sortField,sortOrder:i.sortOrder,runtimeFieldFilters:r.runtimeFieldFilters}),projection:{mode:r.projection.mode,fields:E},sorting:{sort:i.sortField??"default",order:i.sortField?i.sortOrder:"asc"},now:m,...u.length>0?{warnings:u}:{}}}export{L as a,le as b,qt as c,k as d,b as e,ue as f,ce as g,ye as h,pe as i,Zt as j,Pe as k,Ke as l,be as m,Fe as n,Ge as o,$e as p,An as q,Ye as r,Qe as s,Xe as t,Ln as u};
2
- //# sourceMappingURL=chunk-NZ75GNSA.js.map
@@ -1,2 +0,0 @@
1
- import{A as u,C as l,La as f,Nf as m,Oa as c,Ra as g,b as o,eg as y,zd as h}from"./chunk-D4FPS43D.js";import n from"node:path";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="14aa55e1-cb5f-55ea-bf4c-412217d87449")}catch{}})();async function R(a,e,i){let t=f(process.cwd(),i.path);if(!await o(c(t)))throw new l(`Tracker is not initialized at ${t}. Run pm init first.`,u.NOT_FOUND);let s=await m(t),p=h(e.author,s.author_default),r=await y({pmRoot:t,settings:s,id:a,author:p,message:e.message,force:e.force,dryRun:e.dryRun}),d=r.targetPath?n.relative(t,r.targetPath).split(n.sep).join("/"):void 0;return{item:r.item,changed_fields:r.changedFields,dry_run:e.dryRun===!0,deleted:e.dryRun!==!0,outcome:e.dryRun===!0?"would_delete":"deleted",previous_status:r.item.status,...d?{target_path:d}:{},history_retained:n.relative(t,g(t,r.item.id)).split(n.sep).join("/"),tombstone_retention:"retain_append_only",warnings:r.warnings}}export{R as a};
2
- //# sourceMappingURL=chunk-PCJWJNC2.js.map
@@ -1,2 +0,0 @@
1
- import{A as c,Ad as K,C as l,Da as B,Gf as nt,Hf as ot,Kf as it,La as q,Nf as st,Oa as z,Pa as V,R as C,Ra as S,Uf as at,Wf as ct,Yf as P,Zf as D,b as k,c as H,d as m,gf as p,hd as Y,id as X,jf as Q,lc as W,lf as _,nf as d,of as U,sf as Z,tf as tt,uc as L,vf as et,yf as rt,zd as J}from"./chunk-D4FPS43D.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="47c087c2-124a-58b7-a5c9-09403235f4a2")}catch{}})();function xt(t,e){let n=-1;return t.forEach((r,o)=>{let i=Date.parse(r.ts);if(!Number.isFinite(i))throw new l(`History for this item contains invalid timestamp at entry ${o+1}.`,c.GENERIC_FAILURE);i<=e&&(n=o)}),n}function bt(t){let e=t[0]?.ts??null,n=t.at(-1)?.ts??null,r={code:"history_target_out_of_range",required:"Choose a target within the available item history.",why:"Point-in-time reads and restores can only reconstruct recorded versions.",examples:[],nextSteps:["Run pm history <id> to inspect available versions and timestamps."],valid_range:{first_version:null,last_version:null,first_timestamp:e,last_timestamp:n}};return n!==null&&(r.examples=["1",String(t.length),n],r.valid_range.first_version=1,r.valid_range.last_version=t.length),{guidance:r,lastTimestamp:n}}function Rt(t,e){let n={};if(e instanceof Error&&e.message.trim().length>0&&(n.reason=e.message.trim()),typeof e!="object"||e===null)return n;let r=e;if(typeof r.index=="number"&&Number.isInteger(r.index)&&r.index>=0&&(n.patchIndex=r.index),typeof r.operation=="object"&&r.operation!==null){let o=r.operation;Object.assign(n,Object.fromEntries(["op","path","from"].flatMap(i=>{let s=o[i];return typeof s=="string"?[[i,s]]:[]})))}if(n.patchIndex!==void 0){let o=t[n.patchIndex];o&&(n.op??=o.op,n.path??=o.path,n.from??=o.from)}return n}function Mt(t,e,n={}){let r=t.trim(),o=n.errorSubject??"history",i=o==="restore"?"Restore":"History",{guidance:s,lastTimestamp:a}=bt(e);if(!r)throw new l(`Missing ${o} target. Use a timestamp or version number.`,c.USAGE,s);if(/^\d+$/.test(r)){let u=Number(r);if(!Number.isSafeInteger(u)||u<1||u>e.length)throw new l(`${i} version must be between 1 and ${e.length} for this item.`,c.USAGE,s);return{kind:"version",raw:r,historyIndex:u-1}}let h=Date.parse(r);if(!Number.isFinite(h))throw new l(`Invalid ${o} target "${t}". Use a positive version number or ISO timestamp.`,c.USAGE,s);let f=xt(e,h);if(f<0||n.allowFutureTimestamp!==!0&&h>Date.parse(a))throw new l(o==="restore"?`No history entries exist at or before timestamp ${r}.`:`No history entry exists at timestamp ${r}.`,c.USAGE,s);return{kind:"timestamp",raw:r,historyIndex:f}}function A(t,e,n,r){let o=Z(t,e);if(o.ok)return o.document;let i=Rt(e,o.error),s=[`history_op=${r}`,i.patchIndex===void 0?null:`patch_index=${i.patchIndex}`,i.op?`op=${i.op}`:null,i.path?`path=${i.path}`:null,i.from?`from=${i.from}`:null].filter(a=>a!==null);throw new l(`Failed to apply history patch at entry ${n} (${s.join(", ")}). ${i.reason??String(o.error)}`,c.GENERIC_FAILURE)}function Gt(t,e){let n=structuredClone(_);for(let r=0;r<=e;r+=1){let o=t[r];if(!o)throw new l(`History target entry ${r+1} does not exist.`,c.USAGE);if(d(n)!==o.before_hash)throw new l(`History hash mismatch before replay at entry ${r+1}.`,c.GENERIC_FAILURE);if(n=A(n,o.patch,r+1,o.op),d(n)!==o.after_hash)throw new l(`History hash mismatch after replay at entry ${r+1}.`,c.GENERIC_FAILURE)}return n}function Bt(t,e){if(Object.keys(t.metadata).length>0)return t;throw new l(`History target ${e.raw} resolves to a deleted state; choose a version or timestamp where the item exists.`,c.USAGE)}import F from"node:fs/promises";import Et from"node:fs/promises";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="a2ec9f1a-aae2-59d5-8c9a-7acd8bf5a7a2")}catch{}})();function vt(t){if(!t.itemDocument)return[];let e=t.itemDocument.metadata?.assignee?.trim();if(!e||e===t.author||t.force)return[];let n=it(t.settings);if(n.ownership_enforcement==="strict")throw new l(`Item ${t.subjectId} is assigned to ${e}. Use --force to override.`,c.CONFLICT);return n.ownership_enforcement==="warn"?[`ownership_warning:assignee_conflict:${t.subjectId}:${e}`]:[]}async function kt(t){let e=await H(t.subject.historyPath);if(e!==t.historyRawBeforeLock)throw new l(`History for ${t.subject.id} changed while waiting for lock; retry ${t.operation}.`,c.CONFLICT);let n=await P(t.pmRoot,t.subject.id,t.settings.id_prefix,t.settings.item_format,t.typeRegistry.type_to_folder),r=n?await D(n,{schema:t.settings.schema}):null;if((r?.raw??null)!==(t.currentItemRawBeforeLock??null))throw new l(`Item ${t.subject.id} changed while waiting for lock; retry ${t.operation}.`,c.CONFLICT);return{historyRawUnderLock:e,locatedUnderLock:n,loadedItemUnderLock:r}}async function Zt(t){let e=t.writeHistoryRaw??m;try{await e(t.historyPath,t.nextHistoryRaw),await p(t.historyPath)}catch(n){try{t.historyRawUnderLock===null?await Et.rm(t.historyPath,{force:!0}):await e(t.historyPath,t.historyRawUnderLock),await p(t.historyPath)}catch(r){throw new AggregateError([n,r],`History rewrite failed and rollback also failed: ${String(n)}`)}throw n}}async function lt(t){let e=[...vt({itemDocument:t.itemDocument,subjectId:t.subject.id,author:t.author,force:t.force,settings:t.settings})],n=await rt(t.pmRoot,t.subject.id,t.settings.locks.ttl_seconds,t.author,!!t.force,t.settings.governance.force_required_for_stale_lock,t.settings.locks.wait_ms);try{let r=await kt({pmRoot:t.pmRoot,subject:t.subject,settings:t.settings,typeRegistry:t.typeRegistry,historyRawBeforeLock:t.historyRawBeforeLock,currentItemRawBeforeLock:t.currentItemRawBeforeLock,operation:t.operation});return await t.applyRewrite(r),t.applyPostRewrite&&e.push(...await t.applyPostRewrite(r)),e}finally{await n()}}(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="cd2a27ec-0f12-591d-ab34-529ddda05063")}catch{}})();function N(t){return Array.isArray(t)?t:typeof t=="string"?[t]:[]}function ht(t){let e=[];for(let n of t)e.includes(n)||e.push(n);return e.includes("g")||e.push("g"),e.join("")}function ut(t){let e=t.trim();if(e.length===0)throw new l("history-redact --regex requires a non-empty pattern.",c.USAGE);let n=e,r="g";if(e.startsWith("/")&&e.length>1){let o=e.lastIndexOf("/");o>0&&(n=e.slice(1,o),r=ht(e.slice(o+1)))}if(n.length===0)throw new l("history-redact --regex cannot use an empty pattern.",c.USAGE);try{new RegExp(n,r)}catch{throw new l("Invalid --regex value; provide a valid JavaScript regular expression.",c.USAGE)}return{kind:"regex",source:n,flags:r}}function ft(t,e){let n=[...new Set(N(t).map(i=>i.trim()))].filter(i=>i.length>0).map(i=>({kind:"literal",value:i})),r=[...new Set(N(e).map(i=>i.trim()))].filter(i=>i.length>0).map(ut),o=[...n,...r];if(o.length===0)throw new l("history-redact requires at least one matcher via --literal or --regex.",c.USAGE,{code:"missing_required_argument",required:"Provide --literal <value> and/or --regex <pattern>.",examples:['pm history-redact pm-a1b2 --literal "[redacted_path_prefix]/private"','pm history-redact pm-a1b2 --regex "/192\\\\.168\\\\.[0-9.]+/g" --replacement "[scrubbed_ip]"']});return o}function dt(t,e,n){if(e.length===0)return{value:t,replacements:0};let r=0,o=0;for(;r<=t.length;){let i=t.indexOf(e,r);if(i===-1)break;o+=1,r=i+Math.max(1,e.length)}return o===0?{value:t,replacements:0}:{value:t.split(e).join(n),replacements:o}}function mt(t,e,n){let r=new RegExp(e.source,e.flags),o=[...t.matchAll(r)];return o.length===0?{value:t,replacements:0}:{value:t.replace(r,n),replacements:o.length}}function O(t,e,n){let r=t,o=0;for(let i of e){let s=i.kind==="literal"?dt(r,i.value,n):mt(r,i,n);r=s.value,o+=s.replacements}return{value:r,replacements:o}}function T(t,e,n){if(typeof t=="string")return O(t,e,n);if(Array.isArray(t)){let r=0;return{value:t.map(i=>{let s=T(i,e,n);return r+=s.replacements,s.value}),replacements:r}}if(typeof t=="object"&&t!==null){let r=0,o={};for(let[i,s]of Object.entries(t)){let a=T(s,e,n);r+=a.replacements,o[i]=a.value}return{value:o,replacements:r}}return{value:t,replacements:0}}function Ht(t){let e=structuredClone(_),n=0,r=0;for(let o=0;o<t.length;o+=1){let i=t[o];d(e)!==i.before_hash&&(n+=1),e=A(e,i.patch,o+1,i.op),d(e)!==i.after_hash&&(r+=1)}return{hashMismatchesBefore:n,hashMismatchesAfter:r,finalDocument:e}}function Pt(t,e,n){let r=0,o=!1,i=t.message;if(typeof t.message=="string"){let a=O(t.message,e,n);i=a.value,r+=a.replacements,a.replacements>0&&(o=!0)}let s=t.patch.map(a=>{if(!Object.prototype.hasOwnProperty.call(a,"value"))return a;let h=T(a.value,e,n);return r+=h.replacements,h.replacements>0?(o=!0,{...a,value:h.value}):a});return{entry:{...t,message:i,patch:s},replacements:r,changed:o}}function Dt(t,e,n){let r=structuredClone(_),o=0,i=0,s=[];for(let a=0;a<t.length;a+=1){let h=Pt(t[a],e,n);i+=h.replacements,h.changed&&(o+=1);let f=d(r);r=A(r,h.entry.patch,a+1,h.entry.op);let u=d(r);s.push({...h.entry,before_hash:f,after_hash:u})}return{entries:s,finalDocument:r,entriesChanged:o,replacements:i}}function yt(t){return Object.keys(t.metadata).length>0}async function At(t,e){let n=t.located?.itemPath??null;if(!t.located)return{raw:null,path:n,document:null};let r=await D(t.located,{schema:e.schema});return{raw:r.raw,path:n,document:r.document}}function Tt(t){if(!yt(t.finalDocument))return{raw:null,path:null,document:null};let e=X(U(t.finalDocument),{schema:t.settings.schema});if(e.metadata.id!==t.subject.id)throw new l("history-redact would change the item id; narrow your patterns.",c.USAGE);return{document:e,path:V(t.pmRoot,e.metadata.type,t.subject.id,"toon",t.typeToFolder),raw:Y(e,{format:"toon",schema:t.settings.schema})}}function $t(t,e){return typeof t.message=="string"&&t.message.trim().length>0?t.message:`history-redact replaced ${e.replacements} match(es) across ${e.entriesChanged} entr${e.entriesChanged===1?"y":"ies"}.`}function jt(t){let e=[...t.rewritten.entries];if(t.dryRun||!t.changed)return{rewrittenEntries:e,auditEntryAdded:!1};let n=t.nextItemDocument??U(t.rewritten.finalDocument);return e.push(Q({nowIso:C(),author:t.author,op:"history_redact",before:n,after:n,message:t.message})),{rewrittenEntries:e,auditEntryAdded:!0}}async function Ct(t){let e=[];return lt({pmRoot:t.pmRoot,subject:t.subject,settings:t.settings,typeRegistry:t.typeRegistry,historyRawBeforeLock:t.historyRawBeforeLock,currentItemRawBeforeLock:t.currentItem.raw,operation:"history-redact",author:t.author,force:t.force,itemDocument:t.currentItem.document,applyRewrite:async({historyRawUnderLock:n})=>{let r=await at(t.pmRoot,t.author),o=new Set;t.currentItem.path&&o.add(t.currentItem.path),t.nextItem.path&&o.add(t.nextItem.path);let i=new Map;t.currentItem.path&&t.currentItem.raw!==null&&i.set(t.currentItem.path,t.currentItem.raw);let s=()=>{};try{try{t.nextItem.path&&t.nextItem.raw!==null&&t.nextItem.raw!==t.currentItem.raw&&await m(t.nextItem.path,t.nextItem.raw),t.currentItem.path&&(!t.nextItem.path||t.nextItem.path!==t.currentItem.path)&&await F.rm(t.currentItem.path,{force:!0}),await m(t.subject.historyPath,et(t.rewrittenEntries))}catch(h){try{await St(t.subject.historyPath,n,o,i)}finally{await p(t.subject.historyPath)}throw h}await p(t.subject.historyPath);let a=t.nextItem.path??t.currentItem.path;a&&(e=await ct({pmRoot:t.pmRoot,preferredFormat:t.settings.item_format,typeToFolder:t.typeRegistry.type_to_folder,schema:t.settings.schema,itemPath:a,...t.currentItem.path?{previousItemPath:t.currentItem.path}:{},document:t.nextItem.document}))}finally{await r().catch(a=>{s=()=>{throw a}})}s()},applyPostRewrite:async()=>[...e,...await Lt(t.subject.historyPath,[t.nextItem.path,t.currentItem.path])]})}async function St(t,e,n,r){e===null?await F.rm(t,{force:!0}):await m(t,e);for(let o of n){let i=r.get(o);i===void 0?await F.rm(o,{force:!0}):await m(o,i)}}async function Lt(t,e){let n=[],r=new Set(e.filter(o=>o!==null));for(let o of r)n.push(...await L({path:o,scope:"project",op:"history_redact"}));return n.push(...await L({path:t,scope:"project",op:"history_redact:history"})),n}async function Ut(t,e,n,r){let o=await P(t,e,n.id_prefix,n.item_format,r);if(o)return{id:o.id,historyPath:S(t,o.id),located:o};let i=ot(e,n.id_prefix),s=nt(e),a=i===s?[i]:[i,s];for(let h of a){let f=S(t,h);if(await k(f))return{id:h,historyPath:f,located:null}}throw new l(`Item ${e} not found`,c.NOT_FOUND)}async function xe(t,e,n){let r=q(process.cwd(),n.path);if(!await k(z(r)))throw new l(`Tracker is not initialized at ${r}. Run pm init first.`,c.NOT_FOUND);let o=await st(r),i=B(o,W()),s=e.replacement??"",a=s.length===0,h=a?"[redacted]":s,f=ft(e.literal,e.regex),u=await Ut(r,t,o,i.type_to_folder);if(!await k(u.historyPath))throw new l(`No history stream exists for ${u.id}.`,c.NOT_FOUND);let wt=await H(u.historyPath),x=await K(u.historyPath,u.id);if(x.length===0)throw new l(`No history entries exist for ${u.id}; nothing to redact.`,c.USAGE);let b=Ht(x),y=Dt(x,f,h),$=b.hashMismatchesBefore+b.hashMismatchesAfter,j=!!e.dryRun,R=y.replacements>0,E=[];$>0&&E.push(`history_redact_preexisting_hash_mismatches:${$}`),R||E.push("history_redact_no_matches");let g=await At(u,o),w=Tt({pmRoot:r,subject:u,settings:o,typeToFolder:i.type_to_folder,finalDocument:y.finalDocument}),pt=(g.path??null)!==(w.path??null)||(g.raw??null)!==(w.raw??null),M=J(e.author,o.author_default),gt=$t(e,y),{rewrittenEntries:G,auditEntryAdded:It}=jt({rewritten:y,dryRun:j,changed:R,nextItemDocument:w.document,author:M,message:gt}),v=tt(G);if(!v.ok)throw new l(`history-redact produced an invalid rewritten chain (${v.errors.join(", ")}).`,c.GENERIC_FAILURE);return!j&&R&&E.push(...await Ct({pmRoot:r,subject:u,settings:o,typeRegistry:i,historyRawBeforeLock:wt,currentItem:g,nextItem:w,author:M,force:e.force,rewrittenEntries:G})),{id:u.id,dry_run:j,changed:R,patterns:{literal_count:f.filter(I=>I.kind==="literal").length,regex_count:f.filter(I=>I.kind==="regex").length,total_count:f.length,replacement_is_default:a},history:{path:u.historyPath,entries_scanned:x.length,entries_changed:y.entriesChanged,replacements:y.replacements,hash_mismatches_before:b.hashMismatchesBefore,hash_mismatches_after:b.hashMismatchesAfter,preexisting_hash_mismatches:$,audit_entry_added:It,verify_ok:v.ok,verify_errors:v.errors},item:{existed_before:g.path!==null,exists_after:w.path!==null,path_before:g.path,path_after:w.path,changed:pt},warnings:[...new Set(E)].sort((I,_t)=>I.localeCompare(_t)),generated_at:C()}}var be={applyLiteralRule:dt,applyRegexRule:mt,buildRedactionRules:ft,hasItemMetadata:yt,normalizeRegexFlags:ht,normalizeStringArrayInput:N,parseRegexRule:ut,redactStringValue:O,redactUnknownValue:T};export{Rt as a,Mt as b,A as c,Gt as d,Bt as e,Zt as f,lt as g,Ut as h,xe as i,be as j};
2
- //# sourceMappingURL=chunk-PD3225AM.js.map
@@ -1,2 +0,0 @@
1
- import{a as ie,e as x}from"./chunk-CUGNQQKH.js";import{A as u,C as p,Da as S,Ec as z,If as Q,La as N,Nc as G,Nf as V,Oa as M,Pa as j,R as L,Ra as q,Uf as Z,Wf as ee,Yf as D,Zf as te,b as T,cg as ae,d as P,f as $,hd as U,id as K,jf as Y,kf as B,lc as v,qc as H,rc as W,uc as I,v as O,yf as J,zd as X}from"./chunk-D4FPS43D.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new o.Error().stack;i&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[i]="4eb2056a-4444-514a-a0db-79b8875c3d65")}catch{}})();function ne(o,i){return[...new Set([...O.filter(t=>o[t]!==void 0),...Object.keys(o).filter(t=>o[t]!==void 0),...i.length>0?["body"]:[]])].sort((t,e)=>t.localeCompare(e))}function ce(o,i){let r=`copied_from=${o}`;if(!i)return r;let t=i.trim();return t.length>0?`${t} | ${r}`:r}async function ue(o,i,r){let t=N(process.cwd(),r.path);if(!await T(M(t)))throw new p(`Tracker is not initialized at ${t}. Run pm init first.`,u.NOT_FOUND);let e=await V(t),c=S(e,v()),d=await D(t,o,e.id_prefix,e.item_format,c.type_to_folder);if(!d)throw await ae(t,o,e.id_prefix,c.type_to_folder);let E=await te(d,{schema:e.schema}),A=E.document.metadata,f=L(),_=X(i.author,e.author_default),n=await Q(t,e.id_prefix,{tokenLength:e.ids.token_length,typeToFolder:c.type_to_folder,probeExisting:!1}),oe=G(e.schema),y=i.title?.trim();if(y!==void 0&&y.length===0)throw new p("Copy --title must not be empty",u.USAGE);let s={...A,id:n,title:y??A.title,status:oe.open_status,created_at:f,updated_at:f};delete s.closed_at,delete s.completed_at,delete s.close_reason,delete s.test_runs;let k=z(v()),a=K({metadata:s,body:E.document.body},{schema:e.schema,extensionFieldNames:k}),h=await x({title:a.metadata.title,description:a.metadata.description,body:a.body,excludeIds:[d.id]},{pmRoot:t,mode:e.governance.duplicate_detection_mode==="strict"&&i.allowDuplicate!==!0?"off":e.governance.duplicate_detection_mode,threshold:e.governance.duplicate_detection_threshold,limit:e.governance.duplicate_detection_limit,allowDuplicate:i.allowDuplicate}),l=ne(a.metadata,a.body),m=j(t,a.metadata.type,n,e.item_format,c.type_to_folder),R=q(t,n),re=await J(t,n,e.locks.ttl_seconds,_,!1,e.governance.force_required_for_stale_lock,e.locks.wait_ms),g={metadata:{},body:""},C,F;try{let de=await Z(t,_,{required:e.governance.duplicate_detection_mode==="strict"&&i.allowDuplicate!==!0});try{e.governance.duplicate_detection_mode==="strict"&&i.allowDuplicate!==!0&&await x({title:a.metadata.title,description:a.metadata.description,body:a.body,excludeIds:[d.id]},{pmRoot:t,mode:"strict",threshold:e.governance.duplicate_detection_threshold,limit:e.governance.duplicate_detection_limit,allowDuplicate:!1});let w=await D(t,n,e.id_prefix,e.item_format,c.type_to_folder);if(w)throw new p(`Cannot copy to ${n}: an item with that id already exists at ${w.itemPath}. Retry the copy to allocate a new id.`,u.CONFLICT,{code:"item_id_collision",why:`Allocated id ${n} already exists at ${w.itemPath}.`,recovery:{suggested_retry:`pm copy ${d.id}`}});await P(m,U(a,{format:e.item_format,schema:e.schema,extensionFieldNames:k}));try{let b=Y({nowIso:f,author:_,op:"create",before:g,after:a,message:ce(d.id,i.message)});await B(R,b)}catch(b){throw await $(m),b}F=await ee({pmRoot:t,preferredFormat:e.item_format,typeToFolder:c.type_to_folder,schema:e.schema,itemPath:m,document:a})}finally{await de()}C=[...await I({path:m,scope:"project",op:"create",item_id:a.metadata.id,item_type:a.metadata.type,before:g,after:a,changed_fields:l}),...await I({path:R,scope:"project",op:"create:history",item_id:a.metadata.id,item_type:a.metadata.type,before:g,after:a,changed_fields:l})],H({id:a.metadata.id,op:"create",item_type:a.metadata.type,status:a.metadata.status,current:W(a.metadata,l),changed_fields:l})}finally{await re()}return{source_id:d.id,item:structuredClone(a.metadata),changed_fields:l,warnings:[...ie(h),...F,...C],...h===void 0?{}:{similarity_advisory:h}}}export{ue as a};
2
- //# sourceMappingURL=chunk-PDEGKG7P.js.map
@@ -1,2 +0,0 @@
1
- import{w as y}from"./chunk-NFLJ3FHD.js";import{Ia as u}from"./chunk-WOD3WWUN.js";import{Ne as c,ke as A,le as g,ne as m}from"./chunk-D4FPS43D.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="940f11a8-f40d-5169-ba74-e91920d32c4a")}catch{}})();var S={fetch:"get",read:"get",show:"get",view:"get",comment:"comments",note:"notes",learning:"learnings"};(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]="3b9b9ebe-8d98-5983-8257-b7b77c7e6194")}catch{}})();var k=[{target:"status",keys:["status"]},{target:"type",keys:["type"]},{target:"tag",keys:["tag","tags"]},{target:"priority",keys:["priority"]},{target:"deadlineBefore",keys:["deadlineBefore"]},{target:"deadlineAfter",keys:["deadlineAfter"]},{target:"updatedAfter",keys:["updatedAfter"]},{target:"updatedBefore",keys:["updatedBefore"]},{target:"createdAfter",keys:["createdAfter"]},{target:"createdBefore",keys:["createdBefore"]},{target:"ids",keys:["ids"]},{target:"assignee",keys:["assignee"]},{target:"assigneeFilter",keys:["assigneeFilter","assignee_filter"]},{target:"parent",keys:["parent"]},{target:"sprint",keys:["sprint"]},{target:"release",keys:["release"]},{target:"limit",keys:["limit"]},{target:"offset",keys:["offset"]},{target:"after",keys:["after"]},{target:"fields",keys:["fields"]},{target:"sort",keys:["sort"]},{target:"order",keys:["order"]},{target:"treeDepth",keys:["treeDepth","tree_depth"]}],v=[{target:"mode",keys:["mode"]},{target:"matchMode",keys:["matchMode","match_mode"]},{target:"minScore",keys:["minScore","min_score"]},{target:"semanticWeight",keys:["semanticWeight","semantic_weight"]},{target:"status",keys:["status"]},{target:"type",keys:["type"]},{target:"tag",keys:["tag","tags"]},{target:"priority",keys:["priority"]},{target:"deadlineBefore",keys:["deadlineBefore"]},{target:"deadlineAfter",keys:["deadlineAfter"]},{target:"updatedAfter",keys:["updatedAfter"]},{target:"updatedBefore",keys:["updatedBefore"]},{target:"createdAfter",keys:["createdAfter"]},{target:"createdBefore",keys:["createdBefore"]},{target:"assignee",keys:["assignee"]},{target:"sprint",keys:["sprint"]},{target:"release",keys:["release"]},{target:"parent",keys:["parent"]},{target:"fields",keys:["fields"]},{target:"limit",keys:["limit"]},{target:"after",keys:["after"]}],N=[{target:"view",keys:["view"]},{target:"date",keys:["date"]},{target:"from",keys:["from"]},{target:"to",keys:["to"]},{target:"limit",keys:["limit"]},{target:"type",keys:["type"]},{target:"tag",keys:["tag"]},{target:"priority",keys:["priority"]},{target:"status",keys:["status"]},{target:"assignee",keys:["assignee"]},{target:"assigneeFilter",keys:["assigneeFilter","assignee_filter"]},{target:"sprint",keys:["sprint"]},{target:"release",keys:["release"]},{target:"include",keys:["include"]},{target:"recurrenceLookaheadDays",keys:["recurrenceLookaheadDays","recurrence_lookahead_days"]},{target:"recurrenceLookbackDays",keys:["recurrenceLookbackDays","recurrence_lookback_days"]},{target:"occurrenceLimit",keys:["occurrenceLimit","occurrence_limit"]},{target:"format",keys:["format"]}],R=[{target:"date",keys:["date"]},{target:"from",keys:["from"]},{target:"to",keys:["to"]},{target:"type",keys:["type"]},{target:"tag",keys:["tag"]},{target:"priority",keys:["priority"]},{target:"assignee",keys:["assignee"]},{target:"assigneeFilter",keys:["assigneeFilter","assignee_filter"]},{target:"sprint",keys:["sprint"]},{target:"release",keys:["release"]},{target:"parent",keys:["parent"]},{target:"limit",keys:["limit","maxItems","max_items"]},{target:"after",keys:["after"]},{target:"format",keys:["format"]},{target:"depth",keys:["depth"]},{target:"fields",keys:["fields"]},{target:"activityLimit",keys:["activityLimit","activity_limit"]},{target:"staleThreshold",keys:["staleThreshold","stale_threshold"]},{target:"tokenBudget",keys:["tokenBudget","token_budget"]}],E=[{target:"type",keys:["type"]},{target:"tag",keys:["tag"]},{target:"priority",keys:["priority"]},{target:"assignee",keys:["assignee"]},{target:"assigneeFilter",keys:["assigneeFilter","assignee_filter"]},{target:"sprint",keys:["sprint"]},{target:"release",keys:["release"]},{target:"parent",keys:["parent"]},{target:"limit",keys:["limit"]},{target:"blockedLimit",keys:["blockedLimit","blocked_limit"]},{target:"format",keys:["format"]},{target:"tokenBudget",keys:["tokenBudget","token_budget"]}],b=[{target:"id",keys:["id"]},{target:"op",keys:["op"]},{target:"author",keys:["author"]},{target:"from",keys:["from"]},{target:"to",keys:["to"]},{target:"limit",keys:["limit"]}];function I(e,t){for(let a of t.keys){let i=e[a];if(typeof i=="string")return i}}function L(e,t){for(let a of t.keys)if(Object.hasOwn(e,a))return e[a]}function h(e,t){for(let a of t.keys){let i=e[a];if(Array.isArray(i))return i}}(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]="b0f52c3d-091d-51db-a4c1-bb177414dd7f")}catch{}})();var _=[{target:"title",keys:["title"],option:"--title, -t <value>",description:"Item title [required] (or pass title as the first positional argument)"},{target:"id",keys:["id"],option:"--id <value>",description:"Explicit item id (normalized with the configured id_prefix)"},{target:"description",keys:["description"],option:"--description, -d <value>",description:"Item description (allow empty string)"},{target:"type",keys:["type"],option:"--type <value>",description:"Item type (built-ins plus any configured custom types)"},{target:"template",keys:["template"],option:"--template <value>",description:"Apply named create template defaults before explicit flags"},{target:"createMode",keys:["createMode","create_mode"],option:"--create-mode <value>",description:"Create required-option policy mode: strict|progressive",aliasOptions:[{option:"--create_mode <value>",description:"Alias for --create-mode"}]},{target:"schedulePreset",keys:["schedulePreset","schedule_preset"],option:"--schedule-preset <value>",description:"Scheduling preset for Reminder|Meeting|Event: lightweight",aliasOptions:[{option:"--schedule_preset <value>",description:"Alias for --schedule-preset"}]},{target:"status",keys:["status"],option:"--status, -s <value>",description:"Item status"},{target:"closeReason",keys:["closeReason","close_reason"],option:"--close-reason <value>",description:"Close reason when creating directly in a terminal status",aliasOptions:[{option:"--close_reason <value>",description:"Alias for --close-reason"}]},{target:"completedAt",keys:["completedAt","completed_at"],option:"--completed-at <value>",description:"Actual completion time for a terminal imported item",aliasOptions:[{option:"--completed_at <value>",description:"Alias for --completed-at"}]},{target:"priority",keys:["priority"],option:"--priority, -p <value>",description:"Priority 0..4"},{target:"tags",keys:["tags"],option:"--tags <value>",description:"Comma-separated tags"},{target:"addTags",keys:["addTags","add_tags"],option:"--add-tags <value>",description:"Add tags additively on top of --tags (repeatable; CSV accepted)",repeatable:!0,aliasOptions:[{option:"--add_tags <value>",description:"Alias for --add-tags"}]},{target:"body",keys:["body"],option:"--body, -b <value>",description:"Item markdown body (allow empty string)"},{target:"deadline",keys:["deadline"],option:"--deadline <value>",description:"Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)"},{target:"estimatedMinutes",keys:["estimate","estimatedMinutes","estimated_minutes"],option:"--estimate, --estimated-minutes <value>",description:"Estimated minutes",aliasOptions:[{option:"--estimated_minutes <value>",description:"Alias for --estimated-minutes"}]},{target:"acceptanceCriteria",keys:["acceptanceCriteria","acceptance_criteria","ac"],option:"--acceptance-criteria <value>",description:"Acceptance criteria (repeatable; values join with '; '; allow empty string)",repeatable:!0,aliasOptions:[{option:"--acceptance_criteria <value>",description:"Alias for --acceptance-criteria"},{option:"--ac <value>",description:"Alias for --acceptance-criteria"}]},{target:"definitionOfReady",keys:["definitionOfReady","definition_of_ready"],option:"--definition-of-ready <value>",description:"Definition of ready (allow empty string)",aliasOptions:[{option:"--definition_of_ready <value>",description:"Alias for --definition-of-ready"}]},{target:"order",keys:["order"],option:"--order <value>",description:"Planning order/rank integer"},{target:"rank",keys:["rank"],option:"--rank <value>",description:"Alias for --order"},{target:"goal",keys:["goal"],option:"--goal <value>",description:"Goal identifier"},{target:"objective",keys:["objective"],option:"--objective <value>",description:"Objective identifier"},{target:"value",keys:["value"],option:"--value <value>",description:"Business value summary"},{target:"impact",keys:["impact"],option:"--impact <value>",description:"Business impact summary"},{target:"outcome",keys:["outcome"],option:"--outcome <value>",description:"Expected outcome summary"},{target:"whyNow",keys:["whyNow","why_now"],option:"--why-now <value>",description:"Why-now rationale",aliasOptions:[{option:"--why_now <value>",description:"Alias for --why-now"}]},{target:"author",keys:["author"],option:"--author <value>",description:"Mutation author"},{target:"message",keys:["message"],option:"--message <value>",description:"History message (allow empty string)"},{target:"assignee",keys:["assignee"],option:"--assignee <value>",description:"Item assignee"},{target:"parent",keys:["parent"],option:"--parent <value>",description:"Parent item ID"},{target:"allowMissingParent",keys:["allowMissingParent","allow_missing_parent"],option:"--allow-missing-parent",description:"Allow creating with an unresolved parent reference and emit a validation warning"},{target:"reviewer",keys:["reviewer"],option:"--reviewer <value>",description:"Reviewer"},{target:"risk",keys:["risk"],option:"--risk <value>",description:"Risk level: low|med|medium|high|critical (med persists as medium)"},{target:"confidence",keys:["confidence"],option:"--confidence <value>",description:"Confidence level: 0..100|low|med|medium|high (med persists as medium)"},{target:"sprint",keys:["sprint"],option:"--sprint <value>",description:"Sprint identifier"},{target:"release",keys:["release"],option:"--release <value>",description:"Release identifier"},{target:"blockedBy",keys:["blockedBy","blocked_by"],option:"--blocked-by <value>",description:"Set latest blocked-by item ID or reason; resolved item IDs append a blocked_by dependency edge",aliasOptions:[{option:"--blocked_by <value>",description:"Alias for --blocked-by"}]},{target:"blockedReason",keys:["blockedReason","blocked_reason"],option:"--blocked-reason <value>",description:"Blocked reason",aliasOptions:[{option:"--blocked_reason <value>",description:"Alias for --blocked-reason"}]},{target:"unblockNote",keys:["unblockNote","unblock_note"],option:"--unblock-note <value>",description:"Unblock rationale note",aliasOptions:[{option:"--unblock_note <value>",description:"Alias for --unblock-note"}]},{target:"reporter",keys:["reporter"],option:"--reporter <value>",description:"Issue reporter"},{target:"severity",keys:["severity"],option:"--severity <value>",description:"Issue severity: low|med|medium|high|critical (med persists as medium)"},{target:"environment",keys:["environment"],option:"--environment <value>",description:"Issue environment context"},{target:"reproSteps",keys:["reproSteps","repro_steps"],option:"--repro-steps <value>",description:"Issue reproduction steps",aliasOptions:[{option:"--repro_steps <value>",description:"Alias for --repro-steps"}]},{target:"resolution",keys:["resolution"],option:"--resolution <value>",description:"Issue resolution summary"},{target:"expectedResult",keys:["expectedResult","expected_result","expected"],option:"--expected-result <value>",description:"Issue expected behavior",aliasOptions:[{option:"--expected_result <value>",description:"Alias for --expected-result"},{option:"--expected <value>",description:"Short alias for --expected-result"}]},{target:"actualResult",keys:["actualResult","actual_result","actual"],option:"--actual-result <value>",description:"Issue observed behavior",aliasOptions:[{option:"--actual_result <value>",description:"Alias for --actual-result"},{option:"--actual <value>",description:"Short alias for --actual-result"}]},{target:"affectedVersion",keys:["affectedVersion","affected_version"],option:"--affected-version <value>",description:"Affected version identifier",aliasOptions:[{option:"--affected_version <value>",description:"Alias for --affected-version"}]},{target:"fixedVersion",keys:["fixedVersion","fixed_version"],option:"--fixed-version <value>",description:"Fixed version identifier",aliasOptions:[{option:"--fixed_version <value>",description:"Alias for --fixed-version"}]},{target:"component",keys:["component"],option:"--component <value>",description:"Issue component ownership"},{target:"regression",keys:["regression"],option:"--regression [value]",description:"Regression marker; bare flag means true, or pass true|false|1|0"},{target:"customerImpact",keys:["customerImpact","customer_impact"],option:"--customer-impact <value>",description:"Customer impact summary",aliasOptions:[{option:"--customer_impact <value>",description:"Alias for --customer-impact"}]},{target:"dep",keys:["dep"],option:"--dep <value>",description:"Seed dependency entry (key=value CSV, markdown key:value lines, or - for stdin; repeatable)",repeatable:!0},{target:"typeOption",keys:["typeOption","type_option"],option:"--type-option <value>",description:"Type option key=value or key=<name>,value=<value> (also accepts key:value and markdown pairs; use - for stdin; repeatable)",repeatable:!0,aliasOptions:[{option:"--type_option <value>",description:"Alias for --type-option"}]},{target:"field",keys:["field"],option:"--field <name=value>",description:"Set a field declared by an active extension registerItemFields registration (repeatable)",repeatable:!0},{target:"unset",keys:["unset"],option:"--unset <field>",description:"Clear scalar metadata field by name (repeatable)",repeatable:!0},{target:"reminder",keys:["reminder"],option:"--reminder <value>",description:"Seed reminder entry at=<iso|relative>,text=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"event",keys:["event"],option:"--event <value>",description:"Seed event entry start=<iso|relative>,end=<iso|relative>,duration=<relative|30min|PT30M>,title=<text>,all_day=<true|false>,recur_* fields (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"comment",keys:["comment"],option:"--comment <value>",description:"Seed comment entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"note",keys:["note"],option:"--note <value>",description:"Seed note entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"learning",keys:["learning"],option:"--learning <value>",description:"Seed learning entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"file",keys:["file"],option:"--file <value>",description:"Seed linked file entry (CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"test",keys:["test"],option:"--test <value>",description:"Seed linked test entry (CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"doc",keys:["doc"],option:"--doc <value>",description:"Seed linked doc entry (CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0}],P=_.filter(e=>e.repeatable!==!0).map(e=>({target:e.target,keys:e.keys})),M=_.filter(e=>e.repeatable===!0).map(e=>({target:e.target,keys:e.keys})),T=[{target:"title",keys:["title"],option:"--title, -t <value>",description:"Set title"},{target:"description",keys:["description"],option:"--description, -d <value>",description:"Set description"},{target:"body",keys:["body"],option:"--body, -b <value>",description:"Set body (allow empty string)"},{target:"status",keys:["status"],option:"--status, -s <value>",description:"Set status (use close command for closed)"},{target:"closeReason",keys:["closeReason","close_reason"],option:"--close-reason <value>",description:"Set close reason",aliasOptions:[{option:"--close_reason <value>",description:"Alias for --close-reason"}]},{target:"priority",keys:["priority"],option:"--priority, -p <value>",description:"Set priority"},{target:"type",keys:["type"],option:"--type <value>",description:"Set type"},{target:"tags",keys:["tags"],option:"--tags <value>",description:"Set comma-separated tags (replaces existing). Use --add-tags / --remove-tags to mutate additively."},{target:"addTags",keys:["addTags","add_tags"],option:"--add-tags <value>",description:"Add tags to the existing list without replacing it (repeatable; CSV accepted)",repeatable:!0,aliasOptions:[{option:"--add_tags <value>",description:"Alias for --add-tags"}]},{target:"removeTags",keys:["removeTags","remove_tags"],option:"--remove-tags <value>",description:"Remove tags from the existing list (repeatable; CSV accepted)",repeatable:!0,aliasOptions:[{option:"--remove_tags <value>",description:"Alias for --remove-tags"}]},{target:"deadline",keys:["deadline"],option:"--deadline <value>",description:"Set deadline (ISO/date string or relative)"},{target:"estimatedMinutes",keys:["estimate","estimatedMinutes","estimated_minutes"],option:"--estimate, --estimated-minutes <value>",description:"Set estimated minutes",aliasOptions:[{option:"--estimated_minutes <value>",description:"Alias for --estimated-minutes"}]},{target:"acceptanceCriteria",keys:["acceptanceCriteria","acceptance_criteria","ac"],option:"--acceptance-criteria <value>",description:"Set acceptance criteria (repeatable; values join with '; ')",repeatable:!0,aliasOptions:[{option:"--acceptance_criteria <value>",description:"Alias for --acceptance-criteria"},{option:"--ac <value>",description:"Alias for --acceptance-criteria"}]},{target:"addAc",keys:["addAc","add_ac"],option:"--add-ac <value>",description:"Add one semicolon-free acceptance criterion without replacing the existing list (repeatable)",repeatable:!0,aliasOptions:[{option:"--add_ac <value>",description:"Alias for --add-ac"}]},{target:"removeAc",keys:["removeAc","remove_ac"],option:"--remove-ac <value>",description:"Remove one semicolon-free acceptance criterion by exact text match (repeatable)",repeatable:!0,aliasOptions:[{option:"--remove_ac <value>",description:"Alias for --remove-ac"}]},{target:"definitionOfReady",keys:["definitionOfReady","definition_of_ready"],option:"--definition-of-ready <value>",description:"Set definition of ready",aliasOptions:[{option:"--definition_of_ready <value>",description:"Alias for --definition-of-ready"}]},{target:"order",keys:["order"],option:"--order <value>",description:"Set planning order/rank integer"},{target:"rank",keys:["rank"],option:"--rank <value>",description:"Alias for --order"},{target:"goal",keys:["goal"],option:"--goal <value>",description:"Set goal identifier"},{target:"objective",keys:["objective"],option:"--objective <value>",description:"Set objective identifier"},{target:"value",keys:["value"],option:"--value <value>",description:"Set business value summary"},{target:"impact",keys:["impact"],option:"--impact <value>",description:"Set business impact summary"},{target:"outcome",keys:["outcome"],option:"--outcome <value>",description:"Set expected outcome summary"},{target:"whyNow",keys:["whyNow","why_now"],option:"--why-now <value>",description:"Set why-now rationale",aliasOptions:[{option:"--why_now <value>",description:"Alias for --why-now"}]},{target:"author",keys:["author"],option:"--author <value>",description:"Mutation author"},{target:"message",keys:["message"],option:"--message <value>",description:"Mutation message"},{target:"assignee",keys:["assignee"],option:"--assignee <value>",description:"Set assignee"},{target:"parent",keys:["parent"],option:"--parent <value>",description:"Set parent item ID"},{target:"allowMissingParent",keys:["allowMissingParent","allow_missing_parent"],option:"--allow-missing-parent",description:"Allow updating to an unresolved parent reference and emit a validation warning"},{target:"completedAt",keys:["completedAt","completed_at"],option:"--completed-at <value>",description:"Correct the actual completion timestamp on a terminal item"},{target:"reviewer",keys:["reviewer"],option:"--reviewer <value>",description:"Set reviewer"},{target:"risk",keys:["risk"],option:"--risk <value>",description:"Set risk level: low|med|medium|high|critical (med persists as medium)"},{target:"confidence",keys:["confidence"],option:"--confidence <value>",description:"Set confidence level: 0..100|low|med|medium|high (med persists as medium)"},{target:"sprint",keys:["sprint"],option:"--sprint <value>",description:"Set sprint identifier"},{target:"release",keys:["release"],option:"--release <value>",description:"Set release identifier"},{target:"blockedBy",keys:["blockedBy","blocked_by"],option:"--blocked-by <value>",description:"Set latest blocked-by item ID or reason; resolved item IDs append a blocked_by dependency edge",aliasOptions:[{option:"--blocked_by <value>",description:"Alias for --blocked-by"}]},{target:"blockedReason",keys:["blockedReason","blocked_reason"],option:"--blocked-reason <value>",description:"Set blocked reason",aliasOptions:[{option:"--blocked_reason <value>",description:"Alias for --blocked-reason"}]},{target:"unblockNote",keys:["unblockNote","unblock_note"],option:"--unblock-note <value>",description:"Set unblock rationale note",aliasOptions:[{option:"--unblock_note <value>",description:"Alias for --unblock-note"}]},{target:"reporter",keys:["reporter"],option:"--reporter <value>",description:"Set issue reporter"},{target:"severity",keys:["severity"],option:"--severity <value>",description:"Set issue severity: low|med|medium|high|critical (med persists as medium)"},{target:"environment",keys:["environment"],option:"--environment <value>",description:"Set issue environment context"},{target:"reproSteps",keys:["reproSteps","repro_steps"],option:"--repro-steps <value>",description:"Set issue reproduction steps",aliasOptions:[{option:"--repro_steps <value>",description:"Alias for --repro-steps"}]},{target:"resolution",keys:["resolution"],option:"--resolution <value>",description:"Set issue resolution summary"},{target:"expectedResult",keys:["expectedResult","expected_result","expected"],option:"--expected-result <value>",description:"Set issue expected behavior",aliasOptions:[{option:"--expected_result <value>",description:"Alias for --expected-result"},{option:"--expected <value>",description:"Short alias for --expected-result"}]},{target:"actualResult",keys:["actualResult","actual_result","actual"],option:"--actual-result <value>",description:"Set issue observed behavior",aliasOptions:[{option:"--actual_result <value>",description:"Alias for --actual-result"},{option:"--actual <value>",description:"Short alias for --actual-result"}]},{target:"affectedVersion",keys:["affectedVersion","affected_version"],option:"--affected-version <value>",description:"Set affected version identifier",aliasOptions:[{option:"--affected_version <value>",description:"Alias for --affected-version"}]},{target:"fixedVersion",keys:["fixedVersion","fixed_version"],option:"--fixed-version <value>",description:"Set fixed version identifier",aliasOptions:[{option:"--fixed_version <value>",description:"Alias for --fixed-version"}]},{target:"component",keys:["component"],option:"--component <value>",description:"Set issue component ownership"},{target:"regression",keys:["regression"],option:"--regression [value]",description:"Set regression marker; bare flag means true, or pass true|false|1|0"},{target:"customerImpact",keys:["customerImpact","customer_impact"],option:"--customer-impact <value>",description:"Set customer impact summary",aliasOptions:[{option:"--customer_impact <value>",description:"Alias for --customer-impact"}]},{target:"dep",keys:["dep"],option:"--dep <value>",description:"Add dependency entries id=<id>,kind=<value>,author=<value>,created_at=<iso|now>,source_kind=<value> (repeatable)",repeatable:!0},{target:"depRemove",keys:["depRemove","dep_remove"],option:"--dep-remove <value>",description:"Remove dependencies by id or id=<id>,kind=<value>,source_kind=<value> selectors (repeatable)",repeatable:!0,aliasOptions:[{option:"--dep_remove <value>",description:"Alias for --dep-remove"}]},{target:"comment",keys:["comment"],option:"--comment <value>",description:"Append comment seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"note",keys:["note"],option:"--note <value>",description:"Append note seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"learning",keys:["learning"],option:"--learning <value>",description:"Append learning seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"file",keys:["file"],option:"--file <value>",description:"Append linked file path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"test",keys:["test"],option:"--test <value>",description:"Append linked test command=<value>,path=<value>,scope=<project|global>,timeout_seconds=<n>,pm_context_mode=<schema|tracker|auto> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"doc",keys:["doc"],option:"--doc <value>",description:"Append linked doc path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"reminder",keys:["reminder"],option:"--reminder <value>",description:"Set reminders at=<iso|relative>,text=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"event",keys:["event"],option:"--event <value>",description:"Set events start=<iso|relative>,end=<iso|relative>,duration=<relative|30min|PT30M>,title=<text>,all_day=<true|false>,recur_* fields (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"typeOption",keys:["typeOption","type_option"],option:"--type-option <value>",description:"Set type options key=value or key=<name>,value=<value> (also accepts key:value and markdown pairs; use - for stdin; repeatable)",repeatable:!0,aliasOptions:[{option:"--type_option <value>",description:"Alias for --type-option"}]},{target:"field",keys:["field"],option:"--field <name=value>",description:"Set a field declared by an active extension registerItemFields registration (repeatable)",repeatable:!0},{target:"unset",keys:["unset"],option:"--unset <field>",description:"Clear scalar metadata field by name (repeatable)",repeatable:!0}],F=T.filter(e=>e.repeatable!==!0).map(e=>({target:e.target,keys:e.keys})),w=T.filter(e=>e.repeatable===!0).map(e=>({target:e.target,keys:e.keys}));(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]="0c81aa87-3ffb-5837-a3fa-eae5fb70eaf1")}catch{}})();var G=new Set(["--author","--follow","--help","--lean","--token-accounting","--output-include","--output-limit","--output-budget","--output-format","--output-session","--no-changed-fields","--no-extensions","--no-pager","--pm-path","--profile","--quiet","--interval-ms"]),D=new Set([...A,...g]),x=new Set(["--brief","--format","--full","--full-changed-fields","--id-only","--no-truncate","--stream"]),U=new Set(["--body-file","--file","--stdin-json"]),B=new Set(["--global","--local","--project"]),V=new Set(["--activity-limit","--default-depth","--section-activity","--section-blockers","--section-files","--section-hierarchy","--section-progress","--section-staleness","--section-tests","--section-workload","--stale-threshold-days"]),X=new Set(["action","path","pmExecutable","timeoutMs"]),K=new Set(["configAction","id","name","query","reason","subcommand","target","text"]),H={event:{title:"<title>"},files:{lookupPath:"lookup <path...>"},meet:{title:"<title>"},merge:{subcommand:"<subcommand>"},remind:{title:"<title>"},workspace:{name:"<name>",subcommand:"snapshot",snapshotAction:"<snapshot-action>",target:"<target>"}},Y={init:{"--id-prefix":"idPrefix","--no-merge-fence":"mergeFence","--workspace":"workspace"},create:{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},update:{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},"update-many":{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},files:{"--note":"addNote"},docs:{"--note":"addNote"},notes:{"--file":"text"},gc:{"--scope":"gcScope"},contracts:{"--action":"contractAction"},schema:{"--no-allow-unset":"allowUnset","--type":"fieldTypeScope"},"history-author-acknowledge":{"--event":"historyEvent","--all-actionable":"allActionable"},"extension-init":{"--capability":"capability"},"package-init":{"--capability":"capability"},"extension-install":{"--gh":"github"},"package-install":{"--gh":"github"},"extension-adopt":{"--gh":"github"},"package-adopt":{"--gh":"github"},extension:{"--gh":"github","--scaffold":"init"},package:{"--gh":"github","--scaffold":"init"},install:{"--gh":"github"}},C={stats:{"--analytics":["measurements","metric","measurementLimit","observe","improvementDirection","measurementSource","measurementItem","measurementRevision","author","message","provenanceCoverage","fleetAttribution","since","eventLimit","minimumSample"]}};function j(e){return e.startsWith("extension-")?`extension ${e.slice(10)}`:e.startsWith("package-")?`package ${e.slice(8)}`:e}function O(e,t){let a=Y[e]?.[t];return a!==void 0?a:t.replace(/^--/,"").replaceAll("_","-").replace(/-([a-z])/g,(i,o)=>o.toUpperCase())}function W(e){let t=new Set;return e.filter(({flag:a})=>!a.startsWith("--")||t.has(a)?!1:(t.add(a),!0))}function z(e,t){return t.find(({aliases:a})=>a?.includes(e))?.flag}function q(e,t,a,i){let o=C[e]?.[t.flag];if(o!==void 0&&o.every(r=>i.has(r)))return{surface:"cli",input:t.flag,counterpart:o[0],disposition:"shared",reason:"The validated CLI JSON object fans out across strict SDK parameters."};let n=O(e,t.flag);if(i.has(n))return{surface:"cli",input:t.flag,counterpart:n,disposition:"shared",reason:"The CLI flag maps directly to a strict SDK action parameter."};let s=z(t.flag,a);if(s!==void 0){let r=O(e,s);if(i.has(r))return{surface:"cli",input:t.flag,counterpart:r,disposition:"compatibility_alias",reason:`Compatibility spelling for ${s}.`}}return G.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_transport",reason:"CLI process transport is supplied by the in-process SDK host."}:x.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_presentation",reason:"CLI rendering or mutation projection does not alter the SDK result envelope."}:U.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_adapter",reason:"Local file or stdin adaptation is a CLI boundary concern."}:V.has(t.flag)?{surface:"cli",input:t.flag,counterpart:"key",disposition:"compatibility_alias",reason:"CLI config shorthand normalizes to the SDK configAction/key/value contract."}:B.has(t.flag)?{surface:"cli",input:t.flag,counterpart:"scope",disposition:"cli_scope_selector",reason:"Mutually exclusive CLI scope switches normalize to the SDK scope parameter."}:{surface:"cli",input:t.flag,counterpart:n,disposition:"unclassified",reason:"The CLI flag has no strict SDK parameter or approved boundary classification."}}function J(e,t,a){let i=Object.entries(C[e]??{}).find(([s,r])=>r.includes(t)&&a.some(({input:p,disposition:d})=>p===s&&d==="shared"));if(i!==void 0)return{surface:"sdk",input:t,counterpart:i[0],disposition:"shared",reason:"The strict SDK parameter is reachable through the validated CLI JSON object."};let o=a.find(({counterpart:s,disposition:r})=>s===t&&(r==="shared"||r==="compatibility_alias"||r==="cli_scope_selector"));if(o!==void 0)return{surface:"sdk",input:t,counterpart:o.input,disposition:"shared",reason:"The strict SDK parameter is reachable from the CLI contract."};let n=H[e]?.[t];return n!==void 0?{surface:"sdk",input:t,counterpart:n,disposition:"shared",reason:"The strict SDK parameter maps to a canonical CLI positional argument."}:X.has(t)?{surface:"sdk",input:t,disposition:"sdk_transport",reason:"The SDK host supplies in-process transport and workspace selection."}:K.has(t)?{surface:"sdk",input:t,disposition:"cli_positional",reason:"The CLI accepts this SDK parameter as a positional command argument."}:{surface:"sdk",input:t,disposition:"sdk_native",reason:"The typed SDK exposes this structured input without a canonical CLI long flag."}}function $(e={}){let t=e.actions??c,a=e.resolveFlags??u,i=e.resolveParameters??y;return t.map(o=>{let n=j(o),s=W(a(n)).filter(({flag:l})=>m(o)!==void 0||!D.has(l)),r=new Set(i(o)??[]),p=s.map(l=>q(o,l,s,r)),d=[...r].sort((l,f)=>l.localeCompare(f)).map(l=>J(o,l,p));return{action:o,command:n,cli:p,sdk:d,unclassified:[...p,...d].filter(({disposition:l})=>l==="unclassified")}})}(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]="8071fd9d-649a-5fce-b342-84b11066d559")}catch{}})();export{S as a,k as b,v as c,N as d,R as e,E as f,b as g,I as h,L as i,h as j,_ as k,P as l,M as m,T as n,F as o,w as p,$ as q};
2
- //# sourceMappingURL=chunk-PIE5HBNA.js.map