@unbrained/pm-cli 2026.8.4 → 2026.8.5

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 (214) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +39 -13
  3. package/dist/cli/error-guidance.js +4 -4
  4. package/dist/cli/register-structured-mutation.d.ts +2 -0
  5. package/dist/cli/register-structured-mutation.js +124 -12
  6. package/dist/cli-bundle/bundle-manifest.json +407 -407
  7. package/dist/cli-bundle/chunks/append-VXXGOXSG.js +2 -0
  8. package/dist/cli-bundle/chunks/{chunk-QVO3VTA4.js → chunk-2WFXWAYX.js} +2 -2
  9. package/dist/cli-bundle/chunks/{chunk-NM5G7RLU.js → chunk-3FTILRJ2.js} +2 -2
  10. package/dist/cli-bundle/chunks/{chunk-VH2EAGUG.js → chunk-42E7YPLG.js} +2 -2
  11. package/dist/cli-bundle/chunks/{chunk-RB65T4RX.js → chunk-43HQQI6S.js} +2 -2
  12. package/dist/cli-bundle/chunks/{chunk-J4EPW4GT.js → chunk-45G53IU4.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-PQXEB7W4.js → chunk-4VN6GS4U.js} +2 -2
  14. package/dist/cli-bundle/chunks/chunk-4YUBDMQM.js +2 -0
  15. package/dist/cli-bundle/chunks/{chunk-D2MBVMVE.js → chunk-54FNT7U2.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-NRDKVOUE.js → chunk-5ZBOIPGP.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-3XZYTRPC.js → chunk-6MSQJOTG.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-GOICHIX4.js → chunk-7A5OT5J2.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-HTYC76A4.js → chunk-7C4PTJG6.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-BKMZTZYL.js → chunk-A62CYISG.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-5H47J5FG.js → chunk-BPELKUQD.js} +2 -2
  22. package/dist/cli-bundle/chunks/{chunk-HE3DZFN4.js → chunk-BXQLRKWF.js} +2 -2
  23. package/dist/cli-bundle/chunks/{chunk-BLINBTMX.js → chunk-CSI3WS5I.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-KH4GVBMC.js → chunk-DXDREUXT.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-KIKLF2W4.js → chunk-E2RKBKWB.js} +2 -2
  26. package/dist/cli-bundle/chunks/{chunk-377OOXUF.js → chunk-EGJ4JTUG.js} +2 -2
  27. package/dist/cli-bundle/chunks/{chunk-SULWTPQO.js → chunk-FPBQHMFT.js} +2 -2
  28. package/dist/cli-bundle/chunks/{chunk-V5K52PYW.js → chunk-GE4KCSZP.js} +35 -35
  29. package/dist/cli-bundle/chunks/{chunk-NPUJ7OLK.js → chunk-HNFD72UK.js} +2 -2
  30. package/dist/cli-bundle/chunks/{chunk-QMWUL66F.js → chunk-HWRRMBJO.js} +5 -5
  31. package/dist/cli-bundle/chunks/chunk-L3AZOELJ.js +2 -0
  32. package/dist/cli-bundle/chunks/{chunk-CGY5I2GO.js → chunk-LKDGK44W.js} +2 -2
  33. package/dist/cli-bundle/chunks/chunk-LN2WFEU4.js +2 -0
  34. package/dist/cli-bundle/chunks/{chunk-ZSH4GNBH.js → chunk-M72BKL5Q.js} +2 -2
  35. package/dist/cli-bundle/chunks/{chunk-HQ2WU7OY.js → chunk-MHK6LIWE.js} +2 -2
  36. package/dist/cli-bundle/chunks/{chunk-H6FITE7D.js → chunk-NE5VRDAI.js} +2 -2
  37. package/dist/cli-bundle/chunks/chunk-NY4T3JWN.js +2 -0
  38. package/dist/cli-bundle/chunks/{chunk-DCJ6CM6F.js → chunk-OMXVBQ2N.js} +2 -2
  39. package/dist/cli-bundle/chunks/chunk-OPVH7SKD.js +8 -0
  40. package/dist/cli-bundle/chunks/{chunk-CU5ENFNP.js → chunk-OTHLDSFP.js} +2 -2
  41. package/dist/cli-bundle/chunks/{chunk-NH35JNK5.js → chunk-PMXJEU3F.js} +2 -2
  42. package/dist/cli-bundle/chunks/{chunk-SVDH5CHC.js → chunk-Q35VBGOQ.js} +4 -4
  43. package/dist/cli-bundle/chunks/{chunk-5PZGZMPG.js → chunk-R546TPDE.js} +2 -2
  44. package/dist/cli-bundle/chunks/{chunk-Q5F6OI7C.js → chunk-RKAVWO3O.js} +2 -2
  45. package/dist/cli-bundle/chunks/{chunk-JMKVCQSE.js → chunk-SSF4PIUR.js} +2 -2
  46. package/dist/cli-bundle/chunks/{chunk-PA5XRN2A.js → chunk-UN66FZRO.js} +3 -3
  47. package/dist/cli-bundle/chunks/{chunk-FQ4EFFDU.js → chunk-UP7DTVMD.js} +2 -2
  48. package/dist/cli-bundle/chunks/{chunk-NFF3JAQR.js → chunk-UZBWIUYD.js} +2 -2
  49. package/dist/cli-bundle/chunks/{chunk-2POYGY53.js → chunk-V3774P7D.js} +2 -2
  50. package/dist/cli-bundle/chunks/{chunk-B5ZLCD5Z.js → chunk-V3EUXXOF.js} +2 -2
  51. package/dist/cli-bundle/chunks/{chunk-6S7I3UKV.js → chunk-VCKLFEUN.js} +19 -19
  52. package/dist/cli-bundle/chunks/{chunk-PYYPQLHC.js → chunk-VN5VITU3.js} +2 -2
  53. package/dist/cli-bundle/chunks/chunk-WRL4KNDL.js +20 -0
  54. package/dist/cli-bundle/chunks/{chunk-UJHUR3LZ.js → chunk-XCEZYMNI.js} +2 -2
  55. package/dist/cli-bundle/chunks/{chunk-JDPKBV5P.js → chunk-YEWNL576.js} +2 -2
  56. package/dist/cli-bundle/chunks/{chunk-OB7TRZ2G.js → chunk-YSO3YFZ4.js} +2 -2
  57. package/dist/cli-bundle/chunks/{chunk-UVZREFZU.js → chunk-ZYHOB3SN.js} +2 -2
  58. package/dist/cli-bundle/chunks/close-VZ3OQPN5.js +2 -0
  59. package/dist/cli-bundle/chunks/close-many-SB4TI27P.js +2 -0
  60. package/dist/cli-bundle/chunks/comments-BIF3Q4KY.js +2 -0
  61. package/dist/cli-bundle/chunks/copy-6AI5Z57X.js +2 -0
  62. package/dist/cli-bundle/chunks/{create-RLLCBCXM.js → create-XLKTXTUF.js} +2 -2
  63. package/dist/cli-bundle/chunks/delete-ZY2VHQTP.js +2 -0
  64. package/dist/cli-bundle/chunks/{deps-J4ONTF4X.js → deps-ITTY3GIC.js} +2 -2
  65. package/dist/cli-bundle/chunks/{docs-YL2DJ4WD.js → docs-W4OSRTYR.js} +2 -2
  66. package/dist/cli-bundle/chunks/{files-NGNAIYKK.js → files-EOK4AZI4.js} +2 -2
  67. package/dist/cli-bundle/chunks/focus-DLBNWL7L.js +2 -0
  68. package/dist/cli-bundle/chunks/{history-compact-HW62K5XP.js → history-compact-7UGTMLL3.js} +2 -2
  69. package/dist/cli-bundle/chunks/{history-redact-HVBKUJOW.js → history-redact-4DZRMD6Z.js} +2 -2
  70. package/dist/cli-bundle/chunks/{history-repair-OPNBH5JJ.js → history-repair-UPOSZW5R.js} +2 -2
  71. package/dist/cli-bundle/chunks/{learnings-F36PZXT6.js → learnings-GMRNCBS3.js} +2 -2
  72. package/dist/cli-bundle/chunks/{profile-N3XMWBM7.js → profile-2MUUMHRE.js} +2 -2
  73. package/dist/cli-bundle/chunks/{register-list-query-BKGHBI7Y.js → register-list-query-LR3SQ5ZF.js} +2 -2
  74. package/dist/cli-bundle/chunks/register-mutation-SUOHFVWM.js +20 -0
  75. package/dist/cli-bundle/chunks/register-operations-ARRRKOVN.js +2 -0
  76. package/dist/cli-bundle/chunks/{register-setup-KWV6UD77.js → register-setup-O6AYP6NP.js} +2 -2
  77. package/dist/cli-bundle/chunks/restore-ZVCVHTB5.js +2 -0
  78. package/dist/cli-bundle/chunks/{schema-4PJQMGUY.js → schema-FJ4EA3XF.js} +2 -2
  79. package/dist/cli-bundle/chunks/update-YHV52CSS.js +2 -0
  80. package/dist/cli-bundle/chunks/update-many-M6YHVNXM.js +2 -0
  81. package/dist/cli-bundle/focused-chunks/chunk-7J5TUBUJ.js +153 -0
  82. package/dist/cli-bundle/focused-chunks/{chunk-ONIX2KKW.js → chunk-A7BJ5SS6.js} +2 -2
  83. package/dist/cli-bundle/focused-chunks/chunk-B7LJWAZE.js +2 -0
  84. package/dist/cli-bundle/focused-chunks/{chunk-QM2BIVK7.js → chunk-BIMTMOS7.js} +3 -3
  85. package/dist/cli-bundle/focused-chunks/{chunk-BOGRY7M6.js → chunk-FGKY4MBE.js} +10 -10
  86. package/dist/cli-bundle/focused-chunks/chunk-G6ETT4QK.js +2 -0
  87. package/dist/cli-bundle/focused-chunks/{chunk-C2QSL62X.js → chunk-GJ2TG2CW.js} +2 -2
  88. package/dist/cli-bundle/focused-chunks/{chunk-RO5BQFG3.js → chunk-IPWSFADF.js} +2 -2
  89. package/dist/cli-bundle/focused-chunks/{chunk-UFCPSWIL.js → chunk-MJ7HWSFK.js} +2 -2
  90. package/dist/cli-bundle/focused-chunks/{chunk-2VIIXOAD.js → chunk-N5XU5UVK.js} +2 -2
  91. package/dist/cli-bundle/focused-chunks/chunk-PG2RIZBX.js +2 -0
  92. package/dist/cli-bundle/focused-chunks/{chunk-OYTK4VNH.js → chunk-PIMMYG7Q.js} +2 -2
  93. package/dist/cli-bundle/focused-chunks/{chunk-K37BB4JL.js → chunk-QVHKCI4T.js} +2 -2
  94. package/dist/cli-bundle/focused-chunks/{chunk-SQXVGHMH.js → chunk-RUR5I3TK.js} +2 -2
  95. package/dist/cli-bundle/focused-chunks/chunk-SV3O7TSH.js +8 -0
  96. package/dist/cli-bundle/focused-chunks/{chunk-L6A4NVQC.js → chunk-UIL2M2NA.js} +2 -2
  97. package/dist/cli-bundle/focused-chunks/{chunk-WVGJAD7L.js → chunk-VLYOEYML.js} +2 -2
  98. package/dist/cli-bundle/focused-chunks/chunk-W7BJEWHX.js +2 -0
  99. package/dist/cli-bundle/focused-chunks/{chunk-DQ4PLKEE.js → chunk-WEM2E2PE.js} +2 -2
  100. package/dist/cli-bundle/focused-chunks/chunk-WVIVUWVL.js +5 -0
  101. package/dist/cli-bundle/focused-chunks/chunk-Y4LDYLLT.js +2 -0
  102. package/dist/cli-bundle/main.js +4 -4
  103. package/dist/cli-bundle/sdk-authoring.js +1 -1
  104. package/dist/cli-bundle/sdk-contracts.js +1 -1
  105. package/dist/cli-bundle/sdk-core.js +28 -28
  106. package/dist/cli-bundle/sdk-governance.js +1 -1
  107. package/dist/cli-bundle/sdk-graph.js +1 -1
  108. package/dist/cli-bundle/sdk-merge.js +1 -1
  109. package/dist/cli-bundle/sdk-query.js +1 -1
  110. package/dist/cli-bundle/sdk-runtime.js +1 -1
  111. package/dist/cli-bundle/sdk-testing.js +1 -1
  112. package/dist/cli-bundle/sdk.js +1 -1
  113. package/dist/core/extensions/loader.js +5 -2
  114. package/dist/core/item/item-format.js +14 -20
  115. package/dist/core/shared/constants.js +3 -2
  116. package/dist/core/store/item-store.js +2 -2
  117. package/dist/core/store/settings.js +2 -2
  118. package/dist/mcp/server.js +12 -6
  119. package/dist/mcp/tool-definitions.js +14 -7
  120. package/dist/sdk/cli-contracts/agent-output-contracts.d.ts +18 -18
  121. package/dist/sdk/cli-contracts/agent-output-contracts.js +51 -23
  122. package/dist/sdk/cli-contracts/commander-mutation-options.js +26 -2
  123. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  124. package/dist/sdk/cli-contracts/flag-contracts.js +28 -2
  125. package/dist/sdk/cli-contracts/registration-helpers.js +4 -2
  126. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +10 -2
  127. package/dist/sdk/cli-contracts/runtime-contracts.js +20 -5
  128. package/dist/sdk/cli-contracts/tool-schema.js +4 -2
  129. package/dist/sdk/cli-contracts.d.ts +2 -2
  130. package/dist/sdk/cli-contracts.js +4 -4
  131. package/dist/sdk/cli-program.js +3 -3
  132. package/dist/sdk/contracts.d.ts +1 -0
  133. package/dist/sdk/contracts.js +3 -2
  134. package/dist/sdk/dependency-provenance.d.ts +2 -0
  135. package/dist/sdk/dependency-provenance.js +7 -3
  136. package/dist/sdk/error-code-catalog.d.ts +23 -0
  137. package/dist/sdk/error-code-catalog.js +25 -5
  138. package/dist/sdk/generated-error-code-catalog.js +499 -3
  139. package/dist/sdk/graph/governance.js +3 -3
  140. package/dist/sdk/graph/remediation.js +3 -3
  141. package/dist/sdk/graph/run.js +4 -8
  142. package/dist/sdk/index.d.ts +2 -1
  143. package/dist/sdk/index.js +4 -3
  144. package/dist/sdk/item-transaction.d.ts +51 -6
  145. package/dist/sdk/item-transaction.js +132 -22
  146. package/dist/sdk/lifecycle/create.d.ts +4 -0
  147. package/dist/sdk/lifecycle/create.js +26 -10
  148. package/dist/sdk/lifecycle-policy.d.ts +9 -0
  149. package/dist/sdk/lifecycle-policy.js +22 -9
  150. package/dist/sdk/merge/driver.js +6 -3
  151. package/dist/sdk/output-contracts.d.ts +67 -0
  152. package/dist/sdk/output-contracts.js +173 -0
  153. package/dist/sdk/package-import-adapters.js +2 -2
  154. package/dist/sdk/structured-mutations.d.ts +23 -0
  155. package/dist/sdk/structured-mutations.js +219 -10
  156. package/dist/sdk/workspace-snapshot.js +58 -12
  157. package/dist/sdk/workspace.js +30 -4
  158. package/docs/COMMANDS.md +40 -10
  159. package/docs/EXTENSIONS.md +1 -1
  160. package/docs/MERGE_SAFETY.md +2 -0
  161. package/docs/PR_REVIEW_LOOP.md +10 -4
  162. package/docs/README.md +22 -22
  163. package/docs/RELEASING.md +3 -3
  164. package/docs/SCRIPTING.md +32 -9
  165. package/docs/SDK.md +91 -11
  166. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
  167. package/docs/TESTING.md +25 -0
  168. package/docs/examples/sdk-contract-consumer/README.md +11 -1
  169. package/docs/examples/sdk-contract-consumer/package.json +2 -1
  170. package/docs/examples/sdk-contract-consumer/parse-receipt.mjs +22 -0
  171. package/marketplace.json +2 -2
  172. package/package.json +3 -2
  173. package/packages/pm-beads/package.json +1 -1
  174. package/packages/pm-calendar/package.json +1 -1
  175. package/packages/pm-command-kit/package.json +1 -1
  176. package/packages/pm-digital-twin/package.json +1 -1
  177. package/packages/pm-governance-audit/package.json +1 -1
  178. package/packages/pm-guide-shell/package.json +1 -1
  179. package/packages/pm-kanban/package.json +1 -1
  180. package/packages/pm-lifecycle-hooks/package.json +1 -1
  181. package/packages/pm-linked-test-adapters/package.json +1 -1
  182. package/packages/pm-search-advanced/package.json +1 -1
  183. package/packages/pm-templates/package.json +1 -1
  184. package/packages/pm-todos/package.json +1 -1
  185. package/packages/pm-vcs/package.json +1 -1
  186. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  187. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  188. package/sdk/public-surface.json +292 -14
  189. package/dist/cli-bundle/chunks/append-DHBRLHHS.js +0 -2
  190. package/dist/cli-bundle/chunks/chunk-2INN52SU.js +0 -8
  191. package/dist/cli-bundle/chunks/chunk-6RSK4IFN.js +0 -20
  192. package/dist/cli-bundle/chunks/chunk-ASJJKA57.js +0 -2
  193. package/dist/cli-bundle/chunks/chunk-IYAVULRN.js +0 -2
  194. package/dist/cli-bundle/chunks/chunk-RRQBHQOV.js +0 -2
  195. package/dist/cli-bundle/chunks/chunk-XBLOD5TZ.js +0 -2
  196. package/dist/cli-bundle/chunks/close-VLHNN6YB.js +0 -2
  197. package/dist/cli-bundle/chunks/close-many-LSJNZKU6.js +0 -2
  198. package/dist/cli-bundle/chunks/comments-AAIA6A6X.js +0 -2
  199. package/dist/cli-bundle/chunks/copy-Z7YMLEHN.js +0 -2
  200. package/dist/cli-bundle/chunks/delete-KNOHHQJM.js +0 -2
  201. package/dist/cli-bundle/chunks/focus-LFRCGALV.js +0 -2
  202. package/dist/cli-bundle/chunks/register-mutation-GU3DCECN.js +0 -20
  203. package/dist/cli-bundle/chunks/register-operations-PTWH727R.js +0 -2
  204. package/dist/cli-bundle/chunks/restore-4HZSLILR.js +0 -2
  205. package/dist/cli-bundle/chunks/update-E6LPS5IV.js +0 -2
  206. package/dist/cli-bundle/chunks/update-many-OSIC6KRO.js +0 -2
  207. package/dist/cli-bundle/focused-chunks/chunk-5MTKO7TV.js +0 -153
  208. package/dist/cli-bundle/focused-chunks/chunk-6GIZK7VQ.js +0 -2
  209. package/dist/cli-bundle/focused-chunks/chunk-AOP2WIZZ.js +0 -2
  210. package/dist/cli-bundle/focused-chunks/chunk-CL75YW32.js +0 -2
  211. package/dist/cli-bundle/focused-chunks/chunk-E7OFMWGT.js +0 -8
  212. package/dist/cli-bundle/focused-chunks/chunk-I5F5UK3Q.js +0 -2
  213. package/dist/cli-bundle/focused-chunks/chunk-T5TSY36R.js +0 -5
  214. package/dist/cli-bundle/focused-chunks/chunk-VT6BF2IX.js +0 -2
@@ -1,2 +1,2 @@
1
- import{a as _}from"./chunk-ASJJKA57.js";import{Ga as I}from"./chunk-JDPKBV5P.js";import{A as d,C as g,Pe as E,bb as k,ud as T,vd as m}from"./chunk-V5K52PYW.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]="d82065d1-488d-523e-9df2-a30056f29603")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5810cf1d-fc9a-597b-a47e-a914009fadfa")}catch{}})();function he(e){return e instanceof g||e instanceof Error?e.message:"Unknown failure"}function V(e){if(typeof e!="object"||e===null||!("exitCode"in e))return;let t=e.exitCode;return typeof t=="number"&&Number.isFinite(t)?t:void 0}function P(e){let t=Math.trunc(e);return t>d.SUCCESS?t:d.GENERIC_FAILURE}function ge(e){return typeof e=="object"&&e!==null&&"code"in e&&typeof e.code=="string"&&e.code.startsWith("commander.")}function me(e,t){if(e instanceof Error)return e;let n=new Error(t),o=V(e);return o!==void 0&&(n.exitCode=P(o)),n}(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]="212ba734-6a06-576f-8ad8-de759727cd75")}catch{}})();var p=new Set(["--pm-path","--path","--author","--output-include","--output-limit","--output-budget","--output-format"]),N=new Set(["--output-include","--output-limit","--output-budget","--output-format"]),A=e=>{let t=e.indexOf("=");return t>0&&p.has(e.slice(0,t))},w=(e,t)=>typeof t!="string"?!1:e==="--path"||e==="--pm-path"||!t.startsWith("-"),x=new Set(["--no-extensions","--no-pager","--json","--quiet","--lean","--token-accounting"]);function B(e,t,n){let o=e[t];if(x.has(o))return n.booleanFlags.add(o),1;let i=o.indexOf("="),s=i>0?o.slice(0,i):o;if(!p.has(s))return 1;let r=i>0?o.slice(i+1):void 0,a=r===void 0&&w(s,e[t+1]),u=r??(a?e[t+1]:void 0);return s==="--author"?n.author=u??"":typeof u=="string"&&u.length>0&&(N.has(s)?n.outputValues:n.pathValues).set(s,u),a?2:1}function D(e){let t={booleanFlags:new Set,outputValues:new Map,pathValues:new Map},n=0;for(;n<e.length&&e[n]!=="--";)n+=B(e,n,t);return{path:t.pathValues.get("--pm-path")??t.pathValues.get("--path"),noExtensions:t.booleanFlags.has("--no-extensions"),noPager:t.booleanFlags.has("--no-pager"),json:t.booleanFlags.has("--json"),quiet:t.booleanFlags.has("--quiet"),lean:t.booleanFlags.has("--lean"),tokenAccounting:t.booleanFlags.has("--token-accounting"),...t.outputValues.get("--output-include")===void 0?{}:{outputInclude:t.outputValues.get("--output-include")},...t.outputValues.get("--output-limit")===void 0?{}:{outputLimit:t.outputValues.get("--output-limit")},...t.outputValues.get("--output-budget")===void 0?{}:{outputBudget:t.outputValues.get("--output-budget")},...t.outputValues.get("--output-format")==="toon"||t.outputValues.get("--output-format")==="json"?{outputFormat:t.outputValues.get("--output-format")}:{},...t.author===""?{authorMissingValue:!0}:t.author!==void 0?{author:t.author}:{}}}function L(e){let t=[],n=0;for(;n<e.length;){let o=e[n];if(o==="--")break;if(x.has(o)||o==="--profile"||o==="--id-only"||o==="--full-changed-fields"||o==="--explain"){n+=1;continue}if(p.has(o)){n+=w(o,e[n+1])?2:1;continue}if(A(o)){n+=1;continue}t.push(o),n+=1}return t}function z(e){let t=L(e);if(t[0]?.trim().toLowerCase()==="help"){let s=[];for(let r=1;r<t.length;r+=1){let a=t[r];if(a.startsWith("-"))break;s.push(a.trim().toLowerCase())}return{requested:!0,commandPathTokens:s}}if(t.findIndex(s=>s==="--help"||s==="-h")<0)return{requested:!1,commandPathTokens:[]};let i=[];for(let s of t){if(s.startsWith("-"))break;i.push(s.trim().toLowerCase())}return{requested:!0,commandPathTokens:i}}function y(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(n==="--")return;if(p.has(n)){t+=w(n,e[t+1])?1:0;continue}if(!(A(n)||x.has(n)||n==="--profile"||n==="--id-only"||n==="--explain")&&!n.startsWith("-"))return t}}function G(e){let t=y(e);return t===void 0?void 0:e[t].trim().toLowerCase()}function $(e,t){return t.noPager?!0:process.stdout.isTTY===!0?!1:z(e).requested}function xe(e){let t=["PAGER","MANPAGER","GIT_PAGER","LESS"],n=t.map(s=>process.env[s]),o=()=>{for(let[s,r]of t.entries()){let a=n[s];a===void 0?delete process.env[r]:process.env[r]=a}},i=D(e);return $(e,i)&&(process.env.PAGER="cat",process.env.MANPAGER="cat",process.env.GIT_PAGER="cat",(typeof process.env.LESS!="string"||process.env.LESS.trim().length===0)&&(process.env.LESS="FRX")),o}var M=new Set(["install","uninstall","explore","manage","doctor","adopt","adopt-all","activate","deactivate"]);function R(e){let t=y(e);if(t===void 0||e[t]!=="extension")return[...e];let n=e[t+1];if(!n||n.startsWith("-"))return[...e];if(!M.has(n))return[...e];if(e.includes("--help")||e.includes("-h"))return[...e];let o=`--${n}`;return e.includes(o)?[...e]:[...e.slice(0,t+1),o,...e.slice(t+2)]}var W=new Set(["pm","pm-cli"]);function q(e,t){let n=y(e);if(n===void 0)return e;let o=e[n];return W.has(o.trim().toLowerCase())?(t.push({from:o,to:[],reason:"executable_alias",confidence:"high"}),[...e.slice(0,n),...e.slice(n+1)]):e}function v(e,t){let n=y(e);if(n===void 0)return e;let o=e[n],i=_[o.trim().toLowerCase()];if(!i)return e;let s=[...e];return s[n]=i,t.push({from:o,to:[i],reason:"command_alias",confidence:"high"}),s}function b(e){return e.replace(/^--?/,"").replace(/_/g,"-").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function C(e){return b(e).replace(/-/g,"")}function S(e,t,n){let o=e.get(t);if(o===void 0){e.set(t,n);return}o!==n&&e.set(t,null)}function U(e){let t=[],n=o=>{typeof o=="string"&&o.startsWith("--")&&t.push(o)};n(e.flag);for(let o of e.aliases??[])n(o);return t}function j(e,t){let n=t??I(e),o=new Map,i=new Map,s=new Map,r=new Set;for(let a of n){let u=U(a);if(u.length===0)continue;let l=`--${b(u[0])}`;for(let c of u)S(o,b(c),l),S(i,C(c),l);let f=C(l);s.has(l)||s.set(l,f),a.list===!0&&r.add(l)}return{canonicalByNormalized:o,canonicalByCompact:i,canonicalComparables:[...s.entries()].map(([a,u])=>({canonicalFlag:a,comparable:u})),listCanonicalFlags:r}}function F(e,t){let n=b(e),o=t.canonicalByNormalized.get(n);if(typeof o=="string")return{flag:o,reason:"flag_alias",confidence:"high"};let i=n.replace(/-/g,""),s=t.canonicalByCompact.get(i);if(typeof s=="string")return{flag:s,reason:"flag_alias",confidence:"high"};let r=i.length>=8?2:1,a=Number.POSITIVE_INFINITY,u,l=!1;for(let f of t.canonicalComparables){let c=k(i,f.comparable,r);if(c!==null){if(c<a){a=c,u=f.canonicalFlag,l=!1;continue}c===a&&u!==f.canonicalFlag&&(l=!0)}}return!u||l||!Number.isFinite(a)||a<=0?null:{flag:u,reason:"flag_typo",confidence:a>=2?"medium":"high"}}function ke(e){let t=[`${e}s`];return e.endsWith("y")&&e.length>1&&t.push(`${e.slice(0,-1)}ies`),t}function K(e,t=!1){if(t||e.includes("://"))return null;let n=e.match(/^([A-Za-z][A-Za-z0-9_-]{1,63})([:=])(.*)$/);if(!n)return null;let o=n[1],i=n[3];return i.length===0?null:{key:o,value:i}}function X(e,t,n=!1){if(n||!e.startsWith("--"))return{tokens:[e]};let o=e.indexOf("="),i=o>=0?e.slice(0,o):e,s=o>=0?e.slice(o+1):void 0,r=F(i,t);if(!r)return{tokens:[e]};let a=s===void 0?r.flag:`${r.flag}=${s}`;return a===e?{tokens:[e]}:{tokens:[a],event:{from:e,to:[a],reason:r.reason,confidence:r.confidence}}}function Y(e){let t=new Set,n=!1;for(let o=0;o<e.length;o+=1){if(n){t.add(o),n=!1;continue}let i=e[o];n=i==="--path"||i==="--pm-path"}return t}function Z(e){if(!e.startsWith("--"))return null;let t=e.indexOf("=");return t<0?{flag:e}:{flag:e.slice(0,t),inlineValue:e.slice(t+1)}}function H(e,t,n){n.push(e[t]);let o=e[t+1];return typeof o=="string"&&o!=="--"?(n.push(o),t+2):t+1}function J(e,t,n,o){if(n.inlineValue!==void 0)return{originalTokens:[e[t]],value:n.inlineValue,consumed:1};let i=[],s=t+1;for(;s<e.length&&e[s]!=="--"&&!e[s].startsWith("-")&&(i.length===0||o.has(n.flag));)i.push(e[s]),s+=1;let r=i.length===0?1:1+i.length;return{originalTokens:e.slice(t,t+r),value:i.length===0?void 0:i.join(","),consumed:r}}function Q(e,t,n,o){let i=e.get(n);if(i){i.values.push(o.value),i.occurrences+=1;return}e.set(n,{outputIndex:t.length,originalTokens:o.originalTokens,values:[o.value],occurrences:1}),t.push(null)}function ee(e,t){let n=[],o=[];for(let[i,s]of e){if(!(s.occurrences>=2||t.has(i)&&s.originalTokens.length>2)){o.push({outputIndex:s.outputIndex,tokens:s.originalTokens});continue}let a=`${i}=${s.values.join(",")}`;o.push({outputIndex:s.outputIndex,tokens:[a]}),n.push({from:`${i} (x${s.occurrences})`,to:[a],reason:"list_merge",confidence:"high"})}return{events:n,splices:o}}function te(e,t){t.sort((n,o)=>o.outputIndex-n.outputIndex);for(let n of t)e.splice(n.outputIndex,1,...n.tokens)}function ne(e,t,n=new Set,o=new Set){if(t.size===0)return{argv:[...e],events:[]};let i=[],s=new Map,r=0;for(;r<e.length;){let l=e[r];if(l==="--"){i.push(...e.slice(r));break}if(n.has(l)){r=H(e,r,i);continue}let f=Z(l);if(!f||!t.has(f.flag)){i.push(l),r+=1;continue}let c=J(e,r,f,o);if(c.value===void 0){i.push(l),r+=c.consumed;continue}Q(s,i,f.flag,{originalTokens:c.originalTokens,value:c.value}),r+=c.consumed}let{events:a,splices:u}=ee(s,o);return te(i,u),{argv:i,events:a}}var O=new Map([["--add",new Set(["command","cmd","path"])],["--remove",new Set(["command","path"])]]);function oe(e,t){if(e!=="test"||t.length<2)return!1;let n=t[t.length-1],o=t[t.length-2],i=O.get(o);return i!==void 0&&i.has(n)}function ie(e,t){return e==="search"||oe(e,t)}function se(e,t,n){if(t!=="test")return e;let o=[],i=0;for(;i<e.length;){let s=e[i];if(s==="--")return o.push(...e.slice(i)),o;let r=O.get(s),a=r?e[i+1]:void 0;if(!r||typeof a!="string"||!r.has(a)){o.push(s),i+=1;continue}let u=i+2;for(;u<e.length&&!e[u].startsWith("-");)u+=1;if(u-(i+2)!==1){o.push(s),i+=1;continue}let l=e[i+2],f=`${a}=${l}`;o.push(s,f),n.push({from:`${s} ${a} ${l}`,to:[s,f],reason:"bare_key_value",confidence:"high"}),i+=3}return o}function re(e,t,n,o){let i=[],s=Y(e);for(let r=0;r<e.length;r+=1){let a=e[r];if(a==="--"){i.push(...e.slice(r));break}let u=s.has(r),l=i[i.length-1];if(a.startsWith("--")){let c=X(a,t,u);i.push(...c.tokens),c.event&&o.push(c.event);continue}let f=K(a,u);if(f&&!(typeof l=="string"&&l.startsWith("-"))&&!ie(n,i)){let c=F(f.key,t);if(c){let h=[c.flag,f.value];i.push(...h),o.push({from:a,to:h,reason:"bare_key_value",confidence:c.confidence});continue}}i.push(a)}return i}function Te(e){let t=[],n=q(e,t),o=R(n);(o.length!==n.length||o.some((c,h)=>c!==n[h]))&&t.push({from:n.join(" "),to:[...o],reason:"legacy_extension_action",confidence:"high"});let i=v(o,t),s=G(i),r=ae(i),a=j(r??s),u=re(i,a,s,t),l=se(u,s,t),f=ne(l,a.listCanonicalFlags,p,s==="create"?new Set(["--tags"]):new Set);for(let c of f.events)t.push(c);return{argv:f.argv,commandName:s,trace:t}}function ae(e){let t=L(e),n=t[0]?.trim().toLowerCase(),o=t[1]?.trim().toLowerCase();return(n==="extension"||n==="package"||n==="packages")&&typeof o=="string"&&o.length>0&&!o.startsWith("-")?`${n} ${o}`:n}function Ee(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(n==="--")break;if(n==="--type"){let o=e[t+1];if(typeof o=="string"&&o.trim().length>0)return o.trim();continue}if(n.startsWith("--type=")){let o=n.slice(7).trim();if(o.length>0)return o}}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8f7cca3d-9b19-53b4-a510-5290aaf75e12")}catch{}})();function Ae(e){if(e===void 0)return()=>{};let t=e.trim();if(t.length===0)throw new g("--author requires a non-empty value.",d.USAGE,{code:"missing_required_argument",nextSteps:["Pass an explicit author identifier with --author <id>."]});let n=T();m(t);let o=!1;return()=>{o||(o=!0,n===void 0?m(void 0):m(n))}}import{Command as ue}from"commander";(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]="5ee30f87-d36f-55bb-ac42-47ebd9170b6e")}catch{}})();function Ve(e){return new ue().name("pm").description("Universal, flexible, extensible, agent-optimized project management CLI for any project or programming language.").version(e).showHelpAfterError(!1).allowExcessArguments(!1).allowUnknownOption(!1).configureOutput({writeOut:t=>{E(t)},writeErr:()=>{}}).option("--json","Output JSON instead of TOON").option("--lean","Omit null and empty containers from JSON output").option("--token-accounting","Attach a bounded per-section token-cost receipt to command output").option("--output-include <fields>","Retain comma-separated fields or sections in read output").option("--output-limit <count>","Bound rows in read output").option("--output-budget <tokens>","Bound estimated tokens in read output").option("--output-format <toon|json>","Select the read-output encoding").option("--quiet","Suppress stdout output").option("--no-changed-fields","Omit the changed_fields array from mutation output (keeps changed_field_count)").option("--full-changed-fields","Restore the legacy full mutation envelope and changed_fields array").option("--id-only","Print only id and status for single-item mutation output").option("--pm-path <dir>","Explicit tracker storage path for this command (preferred over --path)").option("--path <dir>","Backward-compatible alias for --pm-path; this is the tracker storage path, not a workspace cwd").option("--no-extensions","Disable extension loading").option("--no-pager","Disable pager integration for help and long output").option("--explain","Render extended rationale and examples in help output").option("--profile","Print deterministic timing diagnostics").option("--author <id>","Override mutation author for this invocation").exitOverride()}export{he as a,V as b,P as c,ge as d,me as e,D as f,L as g,z as h,G as i,xe as j,R as k,ke as l,ne as m,se as n,Te as o,Ee as p,Ae as q,Ve as r};
2
- //# sourceMappingURL=chunk-UJHUR3LZ.js.map
1
+ import{a as _}from"./chunk-LN2WFEU4.js";import{Ha as I}from"./chunk-YEWNL576.js";import{A as d,C as m,Re as E,bb as k,ud as T,vd as g}from"./chunk-GE4KCSZP.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]="d82065d1-488d-523e-9df2-a30056f29603")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5810cf1d-fc9a-597b-a47e-a914009fadfa")}catch{}})();function he(e){return e instanceof m||e instanceof Error?e.message:"Unknown failure"}function V(e){if(typeof e!="object"||e===null||!("exitCode"in e))return;let t=e.exitCode;return typeof t=="number"&&Number.isFinite(t)?t:void 0}function P(e){let t=Math.trunc(e);return t>d.SUCCESS?t:d.GENERIC_FAILURE}function me(e){return typeof e=="object"&&e!==null&&"code"in e&&typeof e.code=="string"&&e.code.startsWith("commander.")}function ge(e,t){if(e instanceof Error)return e;let n=new Error(t),o=V(e);return o!==void 0&&(n.exitCode=P(o)),n}(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]="212ba734-6a06-576f-8ad8-de759727cd75")}catch{}})();var p=new Set(["--pm-path","--path","--author","--output-include","--output-limit","--output-budget","--output-format"]),N=new Set(["--output-include","--output-limit","--output-budget","--output-format"]),A=e=>{let t=e.indexOf("=");return t>0&&p.has(e.slice(0,t))},w=(e,t)=>typeof t!="string"?!1:e==="--path"||e==="--pm-path"||!t.startsWith("-"),x=new Set(["--no-extensions","--no-pager","--json","--quiet","--lean","--token-accounting"]);function B(e,t,n){let o=e[t];if(x.has(o))return n.booleanFlags.add(o),1;let i=o.indexOf("="),s=i>0?o.slice(0,i):o;if(!p.has(s))return 1;let r=i>0?o.slice(i+1):void 0,a=r===void 0&&w(s,e[t+1]),u=r??(a?e[t+1]:void 0);return s==="--author"?n.author=u??"":typeof u=="string"&&u.length>0&&(N.has(s)?n.outputValues:n.pathValues).set(s,u),a?2:1}function D(e){let t={booleanFlags:new Set,outputValues:new Map,pathValues:new Map},n=0;for(;n<e.length&&e[n]!=="--";)n+=B(e,n,t);return{path:t.pathValues.get("--pm-path")??t.pathValues.get("--path"),noExtensions:t.booleanFlags.has("--no-extensions"),noPager:t.booleanFlags.has("--no-pager"),json:t.booleanFlags.has("--json"),quiet:t.booleanFlags.has("--quiet"),lean:t.booleanFlags.has("--lean"),tokenAccounting:t.booleanFlags.has("--token-accounting"),...t.outputValues.get("--output-include")===void 0?{}:{outputInclude:t.outputValues.get("--output-include")},...t.outputValues.get("--output-limit")===void 0?{}:{outputLimit:t.outputValues.get("--output-limit")},...t.outputValues.get("--output-budget")===void 0?{}:{outputBudget:t.outputValues.get("--output-budget")},...t.outputValues.get("--output-format")==="toon"||t.outputValues.get("--output-format")==="json"?{outputFormat:t.outputValues.get("--output-format")}:{},...t.author===""?{authorMissingValue:!0}:t.author!==void 0?{author:t.author}:{}}}function L(e){let t=[],n=0;for(;n<e.length;){let o=e[n];if(o==="--")break;if(x.has(o)||o==="--profile"||o==="--id-only"||o==="--full-changed-fields"||o==="--explain"){n+=1;continue}if(p.has(o)){n+=w(o,e[n+1])?2:1;continue}if(A(o)){n+=1;continue}t.push(o),n+=1}return t}function z(e){let t=L(e);if(t[0]?.trim().toLowerCase()==="help"){let s=[];for(let r=1;r<t.length;r+=1){let a=t[r];if(a.startsWith("-"))break;s.push(a.trim().toLowerCase())}return{requested:!0,commandPathTokens:s}}if(t.findIndex(s=>s==="--help"||s==="-h")<0)return{requested:!1,commandPathTokens:[]};let i=[];for(let s of t){if(s.startsWith("-"))break;i.push(s.trim().toLowerCase())}return{requested:!0,commandPathTokens:i}}function b(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(n==="--")return;if(p.has(n)){t+=w(n,e[t+1])?1:0;continue}if(!(A(n)||x.has(n)||n==="--profile"||n==="--id-only"||n==="--explain")&&!n.startsWith("-"))return t}}function G(e){let t=b(e);return t===void 0?void 0:e[t].trim().toLowerCase()}function $(e,t){return t.noPager?!0:process.stdout.isTTY===!0?!1:z(e).requested}function xe(e){let t=["PAGER","MANPAGER","GIT_PAGER","LESS"],n=t.map(s=>process.env[s]),o=()=>{for(let[s,r]of t.entries()){let a=n[s];a===void 0?delete process.env[r]:process.env[r]=a}},i=D(e);return $(e,i)&&(process.env.PAGER="cat",process.env.MANPAGER="cat",process.env.GIT_PAGER="cat",(typeof process.env.LESS!="string"||process.env.LESS.trim().length===0)&&(process.env.LESS="FRX")),o}var v=new Set(["install","uninstall","explore","manage","doctor","adopt","adopt-all","activate","deactivate"]);function M(e){let t=b(e);if(t===void 0||e[t]!=="extension")return[...e];let n=e[t+1];if(!n||n.startsWith("-"))return[...e];if(!v.has(n))return[...e];if(e.includes("--help")||e.includes("-h"))return[...e];let o=`--${n}`;return e.includes(o)?[...e]:[...e.slice(0,t+1),o,...e.slice(t+2)]}var R=new Set(["pm","pm-cli"]);function W(e,t){let n=b(e);if(n===void 0)return e;let o=e[n];return R.has(o.trim().toLowerCase())?(t.push({from:o,to:[],reason:"executable_alias",confidence:"high"}),[...e.slice(0,n),...e.slice(n+1)]):e}function q(e,t){let n=b(e);if(n===void 0)return e;let o=e[n],i=_[o.trim().toLowerCase()];if(!i)return e;let s=[...e];return s[n]=i,t.push({from:o,to:[i],reason:"command_alias",confidence:"high"}),s}function y(e){return e.replace(/^--?/,"").replace(/_/g,"-").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function C(e){return y(e).replace(/-/g,"")}function S(e,t,n){let o=e.get(t);if(o===void 0){e.set(t,n);return}o!==n&&e.set(t,null)}function U(e){let t=[],n=o=>{typeof o=="string"&&o.startsWith("--")&&t.push(o)};n(e.flag);for(let o of e.aliases??[])n(o);return t}function j(e,t){let n=t??I(e),o=new Map,i=new Map,s=new Map,r=new Set;for(let a of n){let u=U(a);if(u.length===0)continue;let l=`--${y(u[0])}`;for(let c of u)S(o,y(c),l),S(i,C(c),l);let f=C(l);s.has(l)||s.set(l,f),a.list===!0&&r.add(l)}return{canonicalByNormalized:o,canonicalByCompact:i,canonicalComparables:[...s.entries()].map(([a,u])=>({canonicalFlag:a,comparable:u})),listCanonicalFlags:r}}function F(e,t){let n=y(e),o=t.canonicalByNormalized.get(n);if(typeof o=="string")return{flag:o,reason:"flag_alias",confidence:"high"};let i=n.replace(/-/g,""),s=t.canonicalByCompact.get(i);if(typeof s=="string")return{flag:s,reason:"flag_alias",confidence:"high"};let r=i.length>=8?2:1,a=Number.POSITIVE_INFINITY,u,l=!1;for(let f of t.canonicalComparables){let c=k(i,f.comparable,r);if(c!==null){if(c<a){a=c,u=f.canonicalFlag,l=!1;continue}c===a&&u!==f.canonicalFlag&&(l=!0)}}return!u||l||!Number.isFinite(a)||a<=0?null:{flag:u,reason:"flag_typo",confidence:a>=2?"medium":"high"}}function ke(e){let t=[`${e}s`];return e.endsWith("y")&&e.length>1&&t.push(`${e.slice(0,-1)}ies`),t}function K(e,t=!1){if(t||e.includes("://"))return null;let n=e.match(/^([A-Za-z][A-Za-z0-9_-]{1,63})([:=])(.*)$/);if(!n)return null;let o=n[1],i=n[3];return i.length===0?null:{key:o,value:i}}function X(e,t,n=!1){if(n||!e.startsWith("--"))return{tokens:[e]};let o=e.indexOf("="),i=o>=0?e.slice(0,o):e,s=o>=0?e.slice(o+1):void 0,r=F(i,t);if(!r)return{tokens:[e]};let a=s===void 0?r.flag:`${r.flag}=${s}`;return a===e?{tokens:[e]}:{tokens:[a],event:{from:e,to:[a],reason:r.reason,confidence:r.confidence}}}function Y(e){let t=new Set,n=!1;for(let o=0;o<e.length;o+=1){if(n){t.add(o),n=!1;continue}let i=e[o];n=i==="--path"||i==="--pm-path"}return t}function Z(e){if(!e.startsWith("--"))return null;let t=e.indexOf("=");return t<0?{flag:e}:{flag:e.slice(0,t),inlineValue:e.slice(t+1)}}function H(e,t,n){n.push(e[t]);let o=e[t+1];return typeof o=="string"&&o!=="--"?(n.push(o),t+2):t+1}function J(e,t,n,o){if(n.inlineValue!==void 0)return{originalTokens:[e[t]],value:n.inlineValue,consumed:1};let i=[],s=t+1;for(;s<e.length&&e[s]!=="--"&&!e[s].startsWith("-")&&(i.length===0||o.has(n.flag));)i.push(e[s]),s+=1;let r=i.length===0?1:1+i.length;return{originalTokens:e.slice(t,t+r),value:i.length===0?void 0:i.join(","),consumed:r}}function Q(e,t,n,o){let i=e.get(n);if(i){i.values.push(o.value),i.occurrences+=1;return}e.set(n,{outputIndex:t.length,originalTokens:o.originalTokens,values:[o.value],occurrences:1}),t.push(null)}function ee(e,t){let n=[],o=[];for(let[i,s]of e){if(!(s.occurrences>=2||t.has(i)&&s.originalTokens.length>2)){o.push({outputIndex:s.outputIndex,tokens:s.originalTokens});continue}let a=`${i}=${s.values.join(",")}`;o.push({outputIndex:s.outputIndex,tokens:[a]}),n.push({from:`${i} (x${s.occurrences})`,to:[a],reason:"list_merge",confidence:"high"})}return{events:n,splices:o}}function te(e,t){t.sort((n,o)=>o.outputIndex-n.outputIndex);for(let n of t)e.splice(n.outputIndex,1,...n.tokens)}function ne(e,t,n=new Set,o=new Set){if(t.size===0)return{argv:[...e],events:[]};let i=[],s=new Map,r=0;for(;r<e.length;){let l=e[r];if(l==="--"){i.push(...e.slice(r));break}if(n.has(l)){r=H(e,r,i);continue}let f=Z(l);if(!f||!t.has(f.flag)){i.push(l),r+=1;continue}let c=J(e,r,f,o);if(c.value===void 0){i.push(l),r+=c.consumed;continue}Q(s,i,f.flag,{originalTokens:c.originalTokens,value:c.value}),r+=c.consumed}let{events:a,splices:u}=ee(s,o);return te(i,u),{argv:i,events:a}}var O=new Map([["--add",new Set(["command","cmd","path"])],["--remove",new Set(["command","path"])]]);function oe(e,t){if(e!=="test"||t.length<2)return!1;let n=t[t.length-1],o=t[t.length-2],i=O.get(o);return i!==void 0&&i.has(n)}function ie(e,t){return e==="search"||oe(e,t)}function se(e,t,n){if(t!=="test")return e;let o=[],i=0;for(;i<e.length;){let s=e[i];if(s==="--")return o.push(...e.slice(i)),o;let r=O.get(s),a=r?e[i+1]:void 0;if(!r||typeof a!="string"||!r.has(a)){o.push(s),i+=1;continue}let u=i+2;for(;u<e.length&&!e[u].startsWith("-");)u+=1;if(u-(i+2)!==1){o.push(s),i+=1;continue}let l=e[i+2],f=`${a}=${l}`;o.push(s,f),n.push({from:`${s} ${a} ${l}`,to:[s,f],reason:"bare_key_value",confidence:"high"}),i+=3}return o}function re(e,t,n,o){let i=[],s=Y(e);for(let r=0;r<e.length;r+=1){let a=e[r];if(a==="--"){i.push(...e.slice(r));break}let u=s.has(r),l=i[i.length-1];if(a.startsWith("--")){let c=X(a,t,u);i.push(...c.tokens),c.event&&o.push(c.event);continue}let f=K(a,u);if(f&&!(typeof l=="string"&&l.startsWith("-"))&&!ie(n,i)){let c=F(f.key,t);if(c){let h=[c.flag,f.value];i.push(...h),o.push({from:a,to:h,reason:"bare_key_value",confidence:c.confidence});continue}}i.push(a)}return i}function Te(e){let t=[],n=W(e,t),o=M(n);(o.length!==n.length||o.some((c,h)=>c!==n[h]))&&t.push({from:n.join(" "),to:[...o],reason:"legacy_extension_action",confidence:"high"});let i=q(o,t),s=G(i),r=ae(i),a=j(r??s),u=re(i,a,s,t),l=se(u,s,t),f=ne(l,a.listCanonicalFlags,p,s==="create"?new Set(["--tags"]):new Set);for(let c of f.events)t.push(c);return{argv:f.argv,commandName:s,trace:t}}function ae(e){let t=L(e),n=t[0]?.trim().toLowerCase(),o=t[1]?.trim().toLowerCase();return(n==="extension"||n==="package"||n==="packages")&&typeof o=="string"&&o.length>0&&!o.startsWith("-")?`${n} ${o}`:n}function Ee(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(n==="--")break;if(n==="--type"){let o=e[t+1];if(typeof o=="string"&&o.trim().length>0)return o.trim();continue}if(n.startsWith("--type=")){let o=n.slice(7).trim();if(o.length>0)return o}}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8f7cca3d-9b19-53b4-a510-5290aaf75e12")}catch{}})();function Ae(e){if(e===void 0)return()=>{};let t=e.trim();if(t.length===0)throw new m("--author requires a non-empty value.",d.USAGE,{code:"missing_required_argument",nextSteps:["Pass an explicit author identifier with --author <id>."]});let n=T();g(t);let o=!1;return()=>{o||(o=!0,n===void 0?g(void 0):g(n))}}import{Command as ue}from"commander";(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]="26c939a0-e02d-5998-95e3-a4c26c3b47bd")}catch{}})();function Ve(e){return new ue().name("pm").description("Universal, flexible, extensible, agent-optimized project management CLI for any project or programming language.").version(e).showHelpAfterError(!1).allowExcessArguments(!1).allowUnknownOption(!1).configureOutput({writeOut:t=>{E(t)},writeErr:()=>{}}).option("--json","Output JSON instead of TOON; mutations emit a flat receipt with top-level id/status/changed_field_count while reads use documented entity or collection envelopes").option("--lean","Omit null and empty containers from JSON output").option("--token-accounting","Attach a bounded per-section token-cost receipt to command output").option("--output-include <fields>","Retain comma-separated fields or sections in read output").option("--output-limit <count>","Bound rows in read output").option("--output-budget <tokens>","Bound estimated tokens in read output").option("--output-format <toon|json>","Select the read-output encoding").option("--quiet","Suppress stdout output").option("--no-changed-fields","Omit the changed_fields array from mutation output (keeps changed_field_count)").option("--full-changed-fields","Restore the legacy full mutation envelope and changed_fields array").option("--id-only","Print only id and status for single-item mutation output").option("--pm-path <dir>","Explicit tracker storage path for this command (preferred over --path)").option("--path <dir>","Backward-compatible alias for --pm-path; this is the tracker storage path, not a workspace cwd").option("--no-extensions","Disable extension loading").option("--no-pager","Disable pager integration for help and long output").option("--explain","Render extended rationale and examples in help output").option("--profile","Print deterministic timing diagnostics").option("--author <id>","Override mutation author for this invocation").exitOverride()}export{he as a,V as b,P as c,me as d,ge as e,D as f,L as g,z as h,G as i,xe as j,M as k,ke as l,ne as m,se as n,Te as o,Ee as p,Ae as q,Ve as r};
2
+ //# sourceMappingURL=chunk-XCEZYMNI.js.map
@@ -1,2 +1,2 @@
1
- import{cb as u}from"./chunk-V5K52PYW.js";(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]="f73e79d8-2a65-5a25-8c6f-ec9b06651634")}catch{}})();function i(a){return[...new Set(Array.from(a,e=>e.trim()).filter(e=>e.length>0))]}(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]="768719fa-ae75-58fe-aa49-69da213c5eee")}catch{}})();function n(a){return a.startsWith("--")?`--${a.slice(2).replaceAll("_","-")}`:a}function c(a){let e=new Map;for(let l of a){let t=n(l.flag),g=e.get(t)??new Set;l.flag!==t&&g.add(l.flag);for(let f of l.aliases??[])f!==t&&g.add(f);e.set(t,g)}return a.map(l=>{let t=n(l.flag);if(l.flag!==t)return l;let g=i([...l.aliases??[],...e.get(t)]).filter(f=>f!==t);return g.length===0?l:{...l,aliases:g}})}function Za(a){let e=c(a),l=new Set(e.map(t=>t.flag));return e.filter(t=>{let g=n(t.flag);return t.flag===g||!l.has(g)})}var d=u.map(a=>({flag:a.flag,...a.aliases?{aliases:[...a.aliases]}:{},...a.value_name?{value_name:a.value_name}:{}})),ae=[...d,{flag:"--version"}],C=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--has-notes"},{flag:"--no-notes"},{flag:"--has-learnings"},{flag:"--no-learnings"},{flag:"--has-files"},{flag:"--no-files"},{flag:"--filter-files-missing"},{flag:"--has-docs"},{flag:"--no-docs"},{flag:"--filter-docs-missing"},{flag:"--has-tests"},{flag:"--no-tests"},{flag:"--has-comments"},{flag:"--no-comments"},{flag:"--has-deps"},{flag:"--no-deps"},{flag:"--has-body"},{flag:"--empty-body"},{flag:"--has-linked-command"},{flag:"--no-linked-command"}],h=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--filter-has-notes"},{flag:"--filter-no-notes"},{flag:"--filter-has-learnings"},{flag:"--filter-no-learnings"},{flag:"--filter-has-files"},{flag:"--filter-no-files"},{flag:"--filter-has-docs"},{flag:"--filter-no-docs"},{flag:"--filter-has-tests"},{flag:"--filter-no-tests"},{flag:"--filter-has-comments"},{flag:"--filter-no-comments"},{flag:"--filter-has-deps"},{flag:"--filter-no-deps"},{flag:"--filter-has-body"},{flag:"--filter-empty-body"},{flag:"--filter-has-linked-command"},{flag:"--filter-no-linked-command"},{flag:"--ids",list:!0},{flag:"--limit"},{flag:"--offset"}],k=p([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--today"},{flag:"--recent"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--ids",list:!0},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...C,{flag:"--limit"},{flag:"--offset"},{flag:"--after"},{flag:"--no-truncate"},{flag:"--compact"},{flag:"--brief"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--sort"},{flag:"--order"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--include-body"},{flag:"--strict-read"},{flag:"--format"},{flag:"--stream"}],new Set(["--limit","--token-budget","--offset","--after","--no-truncate","--compact","--brief","--full","--fields","--include-body","--strict-read"])),F=[{flag:"--group-by",list:!0},{flag:"--count"},{flag:"--completion"},{flag:"--sum"},{flag:"--avg"},{flag:"--include-unparented"},{flag:"--include_unparented"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0}],G=[{flag:"--add",aliases:["--comment","--body"]},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--author"},{flag:"--message"},{flag:"--force"}];function p(a,e){return a.map(l=>e.has(l.flag)?{...l,cursor_semantics:"presentation"}:l)}var w=[{flag:"--add",aliases:["--note"]},{flag:"--add-json"},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--since"},{flag:"--event-type"},{flag:"--include-meta"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],I=[{flag:"--add",aliases:["--learning"]},{flag:"--limit"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],D=[{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--list"},{flag:"--append-stable"},{flag:"--validate-paths"},{flag:"--scope"},{flag:"--limit"},{flag:"--offset"},{flag:"--no-truncate"},{flag:"--strict-read"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],M=[{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--list"},{flag:"--validate-paths"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],P=[{flag:"--limit"},{flag:"--compact"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--diff"},{flag:"--field"},{flag:"--verify"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--format"}],X=[{flag:"--dry-run"},{flag:"--output"},{flag:"--item-path"},{flag:"--prefer"}],U=[{flag:"--literal"},{flag:"--regex"},{flag:"--replacement"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],j=[{flag:"--all"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],H=[{flag:"--event",repeatable:!0},{flag:"--all-actionable"},{flag:"--attributed-author",aliases:["--attributed_author"]},{flag:"--reviewer"},{flag:"--reason"}],z=[{flag:"--before"},{flag:"--ids",list:!0},{flag:"--all-over",value_type:"number"},{flag:"--closed"},{flag:"--all-streams"},{flag:"--min-entries",value_type:"number"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Y=[{flag:"--description"},{flag:"--default-status",aliases:["--default_status"]},{flag:"--folder"},{flag:"--alias"},{flag:"--role"},{flag:"--order"},{flag:"--type"},{flag:"--commands"},{flag:"--cli-flag"},{flag:"--required"},{flag:"--required-on-create"},{flag:"--no-allow-unset"},{flag:"--required-types"},{flag:"--infer"},{flag:"--min-count"},{flag:"--apply"},{flag:"--to"},{flag:"--migration-id",aliases:["--migration_id"]},{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],q=[{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],B=[{flag:"--title"},{flag:"--description"},{flag:"--scope"},{flag:"--parent"},{flag:"--related"},{flag:"--blocks"},{flag:"--blocked-by",aliases:["--blocked_by"]},{flag:"--harness"},{flag:"--mode"},{flag:"--resume-context",aliases:["--resume_context"]},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--priority"},{flag:"--status",short:"-s"},{flag:"--create-mode",aliases:["--create_mode"]},{flag:"--deadline"},{flag:"--estimate",aliases:["--estimated-minutes","--estimated_minutes"]},{flag:"--acceptance-criteria",aliases:["--acceptance_criteria","--ac"],repeatable:!0},{flag:"--definition-of-ready",aliases:["--definition_of_ready"]},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now",aliases:["--why_now"]},{flag:"--assignee"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-reason",aliases:["--blocked_reason"]},{flag:"--unblock-note",aliases:["--unblock_note"]},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps",aliases:["--repro_steps"]},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--affected-version",aliases:["--affected_version"]},{flag:"--fixed-version",aliases:["--fixed_version"]},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact",aliases:["--customer_impact"]},{flag:"--comment",repeatable:!0},{flag:"--note",repeatable:!0},{flag:"--learning",repeatable:!0},{flag:"--reminder",repeatable:!0},{flag:"--event",repeatable:!0},{flag:"--type-option",aliases:["--type_option"],repeatable:!0},{flag:"--body"},{flag:"--claim"},{flag:"--from-search",aliases:["--from_search"]},{flag:"--template"},{flag:"--step-title",aliases:["--step_title"]},{flag:"--step"},{flag:"--step-body",aliases:["--step_body"]},{flag:"--step-owner",aliases:["--step_owner"]},{flag:"--step-status",aliases:["--step_status"]},{flag:"--step-evidence",aliases:["--step_evidence"]},{flag:"--step-blocked-reason",aliases:["--step_blocked_reason"]},{flag:"--step-replacement",aliases:["--step_replacement"]},{flag:"--depends-on",aliases:["--depends_on"]},{flag:"--link"},{flag:"--link-kind",aliases:["--link_kind"]},{flag:"--link-note",aliases:["--link_note"]},{flag:"--promote-to-item-dep",aliases:["--promote_to_item_dep"]},{flag:"--allow-multiple-active",aliases:["--allow_multiple_active"]},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--decision-text",aliases:["--decision_text","--decision"]},{flag:"--decision-rationale",aliases:["--decision_rationale"]},{flag:"--decision-evidence",aliases:["--decision_evidence"]},{flag:"--discovery-text",aliases:["--discovery_text","--discovery"]},{flag:"--validation-text",aliases:["--validation_text","--validation"]},{flag:"--validation-command",aliases:["--validation_command"]},{flag:"--validation-expected",aliases:["--validation_expected"]},{flag:"--depth"},{flag:"--field"},{flag:"--fields",list:!0},{flag:"--steps"},{flag:"--materialize-type",aliases:["--materialize_type"]},{flag:"--materialize-parent",aliases:["--materialize_parent"]},{flag:"--materialize-tags",aliases:["--materialize_tags"]},{flag:"--author"},{flag:"--message"},{flag:"--force"}],V=[{flag:"--id-prefix",aliases:["--prefix"]},{flag:"--preset"},{flag:"--type-preset"},{flag:"--defaults",short:"-y",aliases:["--yes"]},{flag:"--author"},{flag:"--agent-guidance"},{flag:"--with-packages"},{flag:"--no-merge-fence"},{flag:"--workspace"},{flag:"--force"},{flag:"--verbose"}],K=[{flag:"--criterion"},{flag:"--clear-criteria"},{flag:"--format"},{flag:"--policy"},{flag:"--default-depth"},{flag:"--activity-limit"},{flag:"--stale-threshold-days"},{flag:"--section-hierarchy"},{flag:"--section-activity"},{flag:"--section-progress"},{flag:"--section-blockers"},{flag:"--section-files"},{flag:"--section-workload"},{flag:"--section-staleness"},{flag:"--section-tests"}],y=[{flag:"--init"},{flag:"--scaffold"},{flag:"--capability"},{flag:"--install"},{flag:"--uninstall"},{flag:"--explore"},{flag:"--list"},{flag:"--manage"},{flag:"--describe"},{flag:"--markdown"},{flag:"--output"},{flag:"--reload"},{flag:"--watch"},{flag:"--doctor"},{flag:"--catalog"},{flag:"--adopt"},{flag:"--adopt-all"},{flag:"--activate"},{flag:"--deactivate"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"},{flag:"--detail"},{flag:"--trace"},{flag:"--runtime-probe"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],s=[{flag:"--project"},{flag:"--local"},{flag:"--global"}],x=[...s,{flag:"--capability"}],m=[...y,{flag:"--declarative"}],W=[...x,{flag:"--declarative"}],$=[{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],J=s,Q=s,Z=[...s,{flag:"--markdown"},{flag:"--output"}],aa=s,ea=s,la=s,ta=[...s,{flag:"--runtime-probe"},{flag:"--fix-managed-state"}],fa=[...s,{flag:"--watch"}],ga=[...s,{flag:"--detail"},{flag:"--trace"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],sa=[...s,{flag:"--fields",list:!0}],ra=[...s,{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],ia=[{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],oa=[{flag:"--dry-run"},{flag:"--cli-only"},{flag:"--packages-only"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--repair"},{flag:"--tag"},{flag:"--package-name"}],ee=[{flag:"--mode"},{flag:"--progress"}],na=[{flag:"--reason"},{flag:"--close-reason"},{flag:"--completed-at"},{flag:"--duplicate-of"},{flag:"--author"},{flag:"--message"},{flag:"--validate-close"},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--force"}],ca=[{flag:"--filter-status",list:!0},{flag:"--filter-type"},{flag:"--filter-tag"},{flag:"--filter-priority"},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee"},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint"},{flag:"--filter-release"},...h,{flag:"--reason"},{flag:"--completed-at"},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--validate-close"},{flag:"--author"},{flag:"--message"},{flag:"--force"},{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"}],da=[{flag:"--body",short:"-b"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],pa=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"},{flag:"--if-available"},{flag:"--next"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee-filter"},{flag:"--parent"},{flag:"--sprint"},{flag:"--release"},{flag:"--max-attempts"},{flag:"--include-decisions"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--explain-ranking",aliases:["--explain_ranking"]}],ua=[{flag:"--author"},{flag:"--message"},{flag:"--force"}],ma=[{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],_a=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Ta=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Aa=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Ca=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--validate-close"},{flag:"--force"}],b=[{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--tags"},{flag:"--priority"},{flag:"--body"},{flag:"--description"},{flag:"--author"},{flag:"--message"}],S=[{flag:"--start"},{flag:"--duration"},{flag:"--end"},{flag:"--location"},{flag:"--timezone"},{flag:"--all-day"},...b],ha=S,ya=[{flag:"--at"},{flag:"--text"},...b],xa=[{flag:"--add"},{flag:"--add-json"},{flag:"--remove"},{flag:"--run"},{flag:"--match"},{flag:"--only-index"},{flag:"--only-last"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--auto-pm-context"},{flag:"--measure",list:!0},{flag:"--metric-below"},{flag:"--metric-diff"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],ba=[{flag:"--status"},{flag:"--limit"},{flag:"--offset"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--auto-pm-context"}],Sa=[{flag:"--limit"}],Na=[{flag:"--status"},{flag:"--limit"},{flag:"--stream"},{flag:"--tail"},{flag:"--force"},{flag:"--author"}],Oa=[{flag:"--dry-run"},{flag:"--scope"}],va=[{flag:"--storage"},{flag:"--metadata-coverage"},{flag:"--field-utilization"},{flag:"--by-assignee"},{flag:"--by-tag"},{flag:"--by-priority"},{flag:"--tag-prefix"}],La=[{flag:"--status",repeatable:!0,list:!0},{flag:"--since"},{flag:"--threshold"},{flag:"--limit"}],Ea=[{flag:"--strict-directories"},{flag:"--require-merge-drivers"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--check-only"},{flag:"--check-telemetry"},{flag:"--no-refresh"},{flag:"--refresh-vectors"},{flag:"--verbose-stale-items"},{flag:"--verbose-author-events"},{flag:"--brief"},{flag:"--summary"},{flag:"--skip-vectors"},{flag:"--skip-integrity"},{flag:"--skip-drift"},{flag:"--full"}],Ra=[{flag:"--check-metadata"},{flag:"--metadata-profile"},{flag:"--check-resolution"},{flag:"--check-lifecycle"},{flag:"--check-stale-blockers"},{flag:"--dependency-cycle-severity"},{flag:"--parent-cycle-severity"},{flag:"--check-files"},{flag:"--scan-mode"},{flag:"--include-pm-internals"},{flag:"--verbose-file-lists"},{flag:"--verbose-diagnostics"},{flag:"--all-affected-ids"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--fix-hints"},{flag:"--auto-fix"},{flag:"--dry-run"},{flag:"--fix-scope"},{flag:"--prune-missing"},{flag:"--check-history-drift"},{flag:"--check-command-references"},{flag:"--check-storage-integrity"},{flag:"--counts"},{flag:"--full"}],N=[{flag:"--assignee"},{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-by"},{flag:"--blocked-reason"},{flag:"--unblock-note"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--actual-result"},{flag:"--affected-version"},{flag:"--fixed-version"}],O=[{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"}],v=[{short:"-p",flag:"--priority"},{flag:"--type"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{flag:"--remove-tags",aliases:["--remove_tags"]},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--add-ac",aliases:["--add_ac"]},{flag:"--remove-ac",aliases:["--remove_ac"]}],_=[{flag:"--stdin-json"},{short:"-t",flag:"--title"},{flag:"--id"},{short:"-d",flag:"--description"},{flag:"--type"},{flag:"--template"},{flag:"--create-mode"},{flag:"--create_mode"},{flag:"--schedule-preset"},{flag:"--schedule_preset"},{short:"-s",flag:"--status"},{short:"-p",flag:"--priority"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{short:"-b",flag:"--body"},{flag:"--body-file"},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--author"},{flag:"--message"},...N,...O,{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--fixed_version"},{flag:"--dep"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--reminder"},{flag:"--event"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--allow-duplicate",value_type:"boolean"}],ka=[{flag:"--transaction-id",value_name:"value"},{flag:"--stdin-json"},{flag:"--dry-run"},{flag:"--create-compensation",value_name:"mode"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--author",value_name:"value"}],Fa=[{flag:"--title"},{flag:"--author"},{flag:"--message"},{flag:"--allow-duplicate",value_type:"boolean"}],Ga=[{flag:"--clear"}],wa=[{flag:"--stdin-json"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},{flag:"--body-file"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},...v,...N,{flag:"--fixed_version"},...O,{flag:"--author"},{flag:"--message"},{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--force"}],Ia=[{flag:"--filter-status",list:!0},{flag:"--filter-type",list:!0},{flag:"--filter-tag",list:!0},{flag:"--filter-priority",list:!0},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee",list:!0},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint",list:!0},{flag:"--filter-release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...h,{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},...v,{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--repro_steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--expected_result"},{flag:"--expected"},{flag:"--actual-result"},{flag:"--actual_result"},{flag:"--actual"},{flag:"--affected-version"},{flag:"--affected_version"},{flag:"--fixed-version"},{flag:"--fixed_version"},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],T=[{flag:"--view"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--full-period"},{flag:"--full_period"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--status"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--include"},{flag:"--recurrence-lookahead-days"},{flag:"--recurrence-lookback-days"},{flag:"--occurrence-limit"},{flag:"--limit"},{flag:"--format"}],Da=[{flag:"--id"},{flag:"--op"},{flag:"--author"},{flag:"--from"},{flag:"--to"},{flag:"--limit"},{flag:"--unbounded"},{flag:"--compact"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--stream"}],Ma=[{flag:"--since"},{flag:"--type",repeatable:!0},{flag:"--author",repeatable:!0},{flag:"--item",repeatable:!0},{flag:"--limit",value_type:"number"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--follow"},{flag:"--interval-ms",value_type:"number"}],A=p([{flag:"--for",value_name:"intent"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit",aliases:["--max-items"]},{flag:"--after"},{flag:"--format"},{flag:"--depth"},{flag:"--fields",list:!0},{flag:"--section"},{flag:"--activity-limit"},{flag:"--stale-threshold"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--no-extension-health"},{flag:"--no-tags"}],new Set(["--limit","--after","--format","--fields","--section","--activity-limit","--stale-threshold","--explain-ranking","--explain_ranking","--no-extension-health","--no-tags"])),Pa=[{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--depth"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--at"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--format"}],Xa=[{flag:"--list"},{flag:"--format"},{flag:"--depth"}],Ua=[{flag:"--format"},{flag:"--max-depth"},{flag:"--collapse"},{flag:"--summary"},{flag:"--full"},{flag:"--node-limit"},{flag:"--edge-limit"},{flag:"--token-budget"},{flag:"--cursor"},{flag:"--direction"},{flag:"--kind",list:!0}],ja=[{flag:"--kind",list:!0},{flag:"--max-depth"},{flag:"--limit"},{flag:"--after"},{flag:"--direction"},{flag:"--max-paths"},{flag:"--sample"},{flag:"--exempt-isolate",list:!0},{flag:"--exempt-isolate-type",list:!0},{flag:"--save-baseline"},{flag:"--rebuild"},{flag:"--clear"},{flag:"--summary"},{flag:"--full"}],Ha=[{flag:"--mode"},{flag:"--k"},{flag:"--fail-under"},{flag:"--queries"},{flag:"--format"}],r=[{flag:"--dry-run"},{flag:"--force"},{flag:"--author"},{flag:"--message"}],za=[{flag:"--for",value_name:"intent"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit"},{flag:"--blocked-limit"},{flag:"--blocked_limit"},{flag:"--ready-only"},{flag:"--ready_only"},{flag:"--format"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]}],Ya=p([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--mode"},{flag:"--semantic"},{flag:"--hybrid"},{flag:"--match-mode"},{flag:"--min-score"},{flag:"--count"},{flag:"--semantic-weight"},{flag:"--include-linked"},{flag:"--title-exact"},{flag:"--phrase-exact"},{flag:"--highlight"},{flag:"--compact"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--format"},{flag:"--limit"},{flag:"--after"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--assignee",list:!0},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--parent"},...C],new Set(["--highlight","--compact","--full","--fields","--format","--limit","--token-budget","--after"])),qa=[{flag:"--action"},{flag:"--command"},{flag:"--summary"},{flag:"--schema-only"},{flag:"--flags-only"},{flag:"--availability-only"},{flag:"--runtime-only"},{flag:"--active-only"},{flag:"--full"}],Ba=[{flag:"--eager-tags"}];function Va(a){let e=new Set,l=[];for(let t of a){let g=(t.aliases??[]).join(","),f=`${t.flag}|${t.short??""}|${g}`;e.has(f)||(e.add(f),l.push(t))}return l}function o(a){return c(Va([...d,...a]))}var Ka=["list","list-all","list-draft","list-open","list-in-progress","list-blocked","list-closed","list-canceled"],L=new Map([...Ka.map(a=>[a,k]),["templates",_],["cal",T],["ctx",A],["test-runs-worker",Na],["init",V],["config",K],["extension",y],["package",m],["packages",m],["install",ia],["upgrade",oa],["create",_],["item mutate",ka],["copy",Fa],["focus",Ga],["aggregate",F],["calendar",T],["context",A],["get",Pa],["guide",Xa],["search",Ya],["next",za],["eval",Ha],["workspace",r],["workspace snapshot",r],["workspace snapshot create",r],["workspace snapshot list",r],["workspace snapshot inspect",r],["workspace snapshot restore",r],["workspace snapshot delete",r],["history",P],["history-redact",U],["history-repair",j],["history-author-acknowledge",H],["history-compact",z],["merge",X],["schema",Y],["profile",q],["plan",B],["activity",Da],["events",Ma],["restore",ua],["update",wa],["update-many",Ia],["close",na],["close-many",ca],["delete",ma],["append",da],["comments",G],["notes",w],["learnings",I],["files",D],["docs",M],["deps",Ua],["graph",ja],["test",xa],["test-all",ba],["telemetry",Sa],["health",Ea],["validate",Ra],["gc",Oa],["stats",va],["duplicates",La],["contracts",qa],["completion",Ba],["claim",pa],["release",_a],["start-task",Ta],["pause-task",Aa],["close-task",Ca],["meet",S],["event",ha],["remind",ya]]),E=new Map([["install",$],["uninstall",J],["explore",Q],["manage",ta],["describe",Z],["reload",fa],["doctor",ga],["catalog",sa],["adopt",ra],["adopt-all",aa],["activate",ea],["deactivate",la]]);function R(a){return typeof a!="string"?"":a.trim().toLowerCase()}function le(a){let e=R(a);if(L.has(e))return!0;let[l,t,...g]=e.split(/\s+/);return(l==="extension"||l==="package"||l==="packages")&&t!==void 0&&g.length===0&&(t==="init"||E.has(t))}function Wa(a,e){return e==="init"?a==="extension"?x:W:E.get(e)??[]}function te(a){let e=R(a);if(e.length===0)return o([]);let[l,t,...g]=e.split(/\s+/);return(l==="extension"||l==="package"||l==="packages")&&t!==void 0&&g.length===0?o(Wa(l,t)):o(L.get(e)??[])}function fe(a,e=!0){let t=c(a).flatMap(f=>[f.short,f.flag,...f.aliases??[]]).filter(f=>!!f),g=e?[...t,...d.flatMap(f=>[f.short,f.flag,...f.aliases??[]]).filter(f=>!!f)]:t;return i(g).join(" ")}export{i as a,c as b,Za as c,d,ae as e,k as f,F as g,G as h,w as i,I as j,D as k,M as l,P as m,X as n,U as o,j as p,H as q,z as r,Y as s,q as t,B as u,V as v,K as w,y as x,s as y,x as z,m as A,W as B,$ as C,J as D,Q as E,Z as F,aa as G,ea as H,la as I,ta as J,fa as K,ga as L,sa as M,ra as N,ia as O,oa as P,ee as Q,na as R,ca as S,da as T,pa as U,ua as V,ma as W,_a as X,Ta as Y,Aa as Z,Ca as _,S as $,ha as aa,ya as ba,xa as ca,ba as da,Sa as ea,Na as fa,Oa as ga,va as ha,La as ia,Ea as ja,Ra as ka,_ as la,ka as ma,Fa as na,Ga as oa,wa as pa,Ia as qa,T as ra,Da as sa,Ma as ta,A as ua,Pa as va,Xa as wa,Ua as xa,ja as ya,Ha as za,r as Aa,za as Ba,Ya as Ca,qa as Da,Ba as Ea,le as Fa,te as Ga,fe as Ha};
2
- //# sourceMappingURL=chunk-JDPKBV5P.js.map
1
+ import{cb as u}from"./chunk-GE4KCSZP.js";(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]="f73e79d8-2a65-5a25-8c6f-ec9b06651634")}catch{}})();function i(a){return[...new Set(Array.from(a,e=>e.trim()).filter(e=>e.length>0))]}(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]="59bc9f68-0b43-5701-b3cf-1c1693a06d3a")}catch{}})();function n(a){return a.startsWith("--")?`--${a.slice(2).replaceAll("_","-")}`:a}function c(a){let e=new Map;for(let l of a){let t=n(l.flag),g=e.get(t)??new Set;l.flag!==t&&g.add(l.flag);for(let f of l.aliases??[])f!==t&&g.add(f);e.set(t,g)}return a.map(l=>{let t=n(l.flag);if(l.flag!==t)return l;let g=i([...l.aliases??[],...e.get(t)]).filter(f=>f!==t);return g.length===0?l:{...l,aliases:g}})}function ae(a){let e=c(a),l=new Set(e.map(t=>t.flag));return e.filter(t=>{let g=n(t.flag);return t.flag===g||!l.has(g)})}var d=u.map(a=>({flag:a.flag,...a.aliases?{aliases:[...a.aliases]}:{},...a.value_name?{value_name:a.value_name}:{}})),ee=[...d,{flag:"--version"}],C=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--has-notes"},{flag:"--no-notes"},{flag:"--has-learnings"},{flag:"--no-learnings"},{flag:"--has-files"},{flag:"--no-files"},{flag:"--filter-files-missing"},{flag:"--has-docs"},{flag:"--no-docs"},{flag:"--filter-docs-missing"},{flag:"--has-tests"},{flag:"--no-tests"},{flag:"--has-comments"},{flag:"--no-comments"},{flag:"--has-deps"},{flag:"--no-deps"},{flag:"--has-body"},{flag:"--empty-body"},{flag:"--has-linked-command"},{flag:"--no-linked-command"}],h=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--filter-has-notes"},{flag:"--filter-no-notes"},{flag:"--filter-has-learnings"},{flag:"--filter-no-learnings"},{flag:"--filter-has-files"},{flag:"--filter-no-files"},{flag:"--filter-has-docs"},{flag:"--filter-no-docs"},{flag:"--filter-has-tests"},{flag:"--filter-no-tests"},{flag:"--filter-has-comments"},{flag:"--filter-no-comments"},{flag:"--filter-has-deps"},{flag:"--filter-no-deps"},{flag:"--filter-has-body"},{flag:"--filter-empty-body"},{flag:"--filter-has-linked-command"},{flag:"--filter-no-linked-command"},{flag:"--ids",list:!0},{flag:"--limit"},{flag:"--offset"}],k=p([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--today"},{flag:"--recent"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--ids",list:!0},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...C,{flag:"--limit"},{flag:"--offset"},{flag:"--after"},{flag:"--no-truncate"},{flag:"--compact"},{flag:"--brief"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--sort"},{flag:"--order"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--include-body"},{flag:"--strict-read"},{flag:"--format"},{flag:"--stream"}],new Set(["--limit","--token-budget","--offset","--after","--no-truncate","--compact","--brief","--full","--fields","--include-body","--strict-read"])),F=[{flag:"--group-by",list:!0},{flag:"--count"},{flag:"--completion"},{flag:"--sum"},{flag:"--avg"},{flag:"--include-unparented"},{flag:"--include_unparented"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0}],G=[{flag:"--add",aliases:["--comment","--body"]},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--author"},{flag:"--message"},{flag:"--force"}];function p(a,e){return a.map(l=>e.has(l.flag)?{...l,cursor_semantics:"presentation"}:l)}var w=[{flag:"--add",aliases:["--note"]},{flag:"--add-json"},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--since"},{flag:"--event-type"},{flag:"--include-meta"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],I=[{flag:"--add",aliases:["--learning"]},{flag:"--limit"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],M=[{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--list"},{flag:"--append-stable"},{flag:"--validate-paths"},{flag:"--scope"},{flag:"--limit"},{flag:"--offset"},{flag:"--no-truncate"},{flag:"--strict-read"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],D=[{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--list"},{flag:"--validate-paths"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],P=[{flag:"--limit"},{flag:"--compact"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--diff"},{flag:"--field"},{flag:"--verify"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--format"}],X=[{flag:"--dry-run"},{flag:"--output"},{flag:"--item-path"},{flag:"--prefer"}],U=[{flag:"--literal"},{flag:"--regex"},{flag:"--replacement"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],j=[{flag:"--all"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],H=[{flag:"--event",repeatable:!0},{flag:"--all-actionable"},{flag:"--attributed-author",aliases:["--attributed_author"]},{flag:"--reviewer"},{flag:"--reason"}],z=[{flag:"--before"},{flag:"--ids",list:!0},{flag:"--all-over",value_type:"number"},{flag:"--closed"},{flag:"--all-streams"},{flag:"--min-entries",value_type:"number"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Y=[{flag:"--description"},{flag:"--default-status",aliases:["--default_status"]},{flag:"--folder"},{flag:"--alias"},{flag:"--role"},{flag:"--order"},{flag:"--type"},{flag:"--commands"},{flag:"--cli-flag"},{flag:"--required"},{flag:"--required-on-create"},{flag:"--no-allow-unset"},{flag:"--required-types"},{flag:"--infer"},{flag:"--min-count"},{flag:"--apply"},{flag:"--to"},{flag:"--migration-id",aliases:["--migration_id"]},{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],q=[{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],B=[{flag:"--title"},{flag:"--description"},{flag:"--scope"},{flag:"--parent"},{flag:"--related"},{flag:"--blocks"},{flag:"--blocked-by",aliases:["--blocked_by"]},{flag:"--harness"},{flag:"--mode"},{flag:"--resume-context",aliases:["--resume_context"]},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--priority"},{flag:"--status",short:"-s"},{flag:"--create-mode",aliases:["--create_mode"]},{flag:"--deadline"},{flag:"--estimate",aliases:["--estimated-minutes","--estimated_minutes"]},{flag:"--acceptance-criteria",aliases:["--acceptance_criteria","--ac"],repeatable:!0},{flag:"--definition-of-ready",aliases:["--definition_of_ready"]},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now",aliases:["--why_now"]},{flag:"--assignee"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-reason",aliases:["--blocked_reason"]},{flag:"--unblock-note",aliases:["--unblock_note"]},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps",aliases:["--repro_steps"]},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--affected-version",aliases:["--affected_version"]},{flag:"--fixed-version",aliases:["--fixed_version"]},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact",aliases:["--customer_impact"]},{flag:"--comment",repeatable:!0},{flag:"--note",repeatable:!0},{flag:"--learning",repeatable:!0},{flag:"--reminder",repeatable:!0},{flag:"--event",repeatable:!0},{flag:"--type-option",aliases:["--type_option"],repeatable:!0},{flag:"--body"},{flag:"--claim"},{flag:"--from-search",aliases:["--from_search"]},{flag:"--template"},{flag:"--step-title",aliases:["--step_title"]},{flag:"--step"},{flag:"--step-body",aliases:["--step_body"]},{flag:"--step-owner",aliases:["--step_owner"]},{flag:"--step-status",aliases:["--step_status"]},{flag:"--step-evidence",aliases:["--step_evidence"]},{flag:"--step-blocked-reason",aliases:["--step_blocked_reason"]},{flag:"--step-replacement",aliases:["--step_replacement"]},{flag:"--depends-on",aliases:["--depends_on"]},{flag:"--link"},{flag:"--link-kind",aliases:["--link_kind"]},{flag:"--link-note",aliases:["--link_note"]},{flag:"--promote-to-item-dep",aliases:["--promote_to_item_dep"]},{flag:"--allow-multiple-active",aliases:["--allow_multiple_active"]},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--decision-text",aliases:["--decision_text","--decision"]},{flag:"--decision-rationale",aliases:["--decision_rationale"]},{flag:"--decision-evidence",aliases:["--decision_evidence"]},{flag:"--discovery-text",aliases:["--discovery_text","--discovery"]},{flag:"--validation-text",aliases:["--validation_text","--validation"]},{flag:"--validation-command",aliases:["--validation_command"]},{flag:"--validation-expected",aliases:["--validation_expected"]},{flag:"--depth"},{flag:"--field"},{flag:"--fields",list:!0},{flag:"--steps"},{flag:"--materialize-type",aliases:["--materialize_type"]},{flag:"--materialize-parent",aliases:["--materialize_parent"]},{flag:"--materialize-tags",aliases:["--materialize_tags"]},{flag:"--author"},{flag:"--message"},{flag:"--force"}],V=[{flag:"--id-prefix",aliases:["--prefix"]},{flag:"--preset"},{flag:"--type-preset"},{flag:"--defaults",short:"-y",aliases:["--yes"]},{flag:"--author"},{flag:"--agent-guidance"},{flag:"--with-packages"},{flag:"--no-merge-fence"},{flag:"--workspace"},{flag:"--force"},{flag:"--verbose"}],K=[{flag:"--criterion"},{flag:"--clear-criteria"},{flag:"--format"},{flag:"--policy"},{flag:"--default-depth"},{flag:"--activity-limit"},{flag:"--stale-threshold-days"},{flag:"--section-hierarchy"},{flag:"--section-activity"},{flag:"--section-progress"},{flag:"--section-blockers"},{flag:"--section-files"},{flag:"--section-workload"},{flag:"--section-staleness"},{flag:"--section-tests"}],y=[{flag:"--init"},{flag:"--scaffold"},{flag:"--capability"},{flag:"--install"},{flag:"--uninstall"},{flag:"--explore"},{flag:"--list"},{flag:"--manage"},{flag:"--describe"},{flag:"--markdown"},{flag:"--output"},{flag:"--reload"},{flag:"--watch"},{flag:"--doctor"},{flag:"--catalog"},{flag:"--adopt"},{flag:"--adopt-all"},{flag:"--activate"},{flag:"--deactivate"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"},{flag:"--detail"},{flag:"--trace"},{flag:"--runtime-probe"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],s=[{flag:"--project"},{flag:"--local"},{flag:"--global"}],b=[...s,{flag:"--capability"}],m=[...y,{flag:"--declarative"}],W=[...b,{flag:"--declarative"}],$=[{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],J=s,Q=s,Z=[...s,{flag:"--markdown"},{flag:"--output"}],aa=s,ea=s,la=s,ta=[...s,{flag:"--runtime-probe"},{flag:"--fix-managed-state"}],fa=[...s,{flag:"--watch"}],ga=[...s,{flag:"--detail"},{flag:"--trace"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],sa=[...s,{flag:"--fields",list:!0}],ra=[...s,{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],ia=[{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],oa=[{flag:"--dry-run"},{flag:"--cli-only"},{flag:"--packages-only"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--repair"},{flag:"--tag"},{flag:"--package-name"}],le=[{flag:"--mode"},{flag:"--progress"}],na=[{flag:"--reason"},{flag:"--close-reason"},{flag:"--completed-at"},{flag:"--duplicate-of"},{flag:"--author"},{flag:"--message"},{flag:"--validate-close"},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--force"}],ca=[{flag:"--filter-status",list:!0},{flag:"--filter-type"},{flag:"--filter-tag"},{flag:"--filter-priority"},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee"},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint"},{flag:"--filter-release"},...h,{flag:"--reason"},{flag:"--completed-at"},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--validate-close"},{flag:"--author"},{flag:"--message"},{flag:"--force"},{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"}],da=[{flag:"--body",short:"-b"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],pa=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"},{flag:"--if-available"},{flag:"--next"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee-filter"},{flag:"--parent"},{flag:"--sprint"},{flag:"--release"},{flag:"--max-attempts"},{flag:"--include-decisions"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--explain-ranking",aliases:["--explain_ranking"]}],ua=[{flag:"--author"},{flag:"--message"},{flag:"--force"}],ma=[{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],_a=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Ta=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Aa=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Ca=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--validate-close"},{flag:"--force"}],x=[{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--tags"},{flag:"--priority"},{flag:"--body"},{flag:"--description"},{flag:"--author"},{flag:"--message"}],v=[{flag:"--start"},{flag:"--duration"},{flag:"--end"},{flag:"--location"},{flag:"--timezone"},{flag:"--all-day"},...x],ha=v,ya=[{flag:"--at"},{flag:"--text"},...x],ba=[{flag:"--add"},{flag:"--add-json"},{flag:"--remove"},{flag:"--run"},{flag:"--match"},{flag:"--only-index"},{flag:"--only-last"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--auto-pm-context"},{flag:"--measure",list:!0},{flag:"--metric-below"},{flag:"--metric-diff"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],xa=[{flag:"--status"},{flag:"--limit"},{flag:"--offset"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--auto-pm-context"}],va=[{flag:"--limit"}],Sa=[{flag:"--status"},{flag:"--limit"},{flag:"--stream"},{flag:"--tail"},{flag:"--force"},{flag:"--author"}],Na=[{flag:"--dry-run"},{flag:"--scope"}],Oa=[{flag:"--storage"},{flag:"--metadata-coverage"},{flag:"--field-utilization"},{flag:"--by-assignee"},{flag:"--by-tag"},{flag:"--by-priority"},{flag:"--tag-prefix"}],La=[{flag:"--status",repeatable:!0,list:!0},{flag:"--since"},{flag:"--threshold"},{flag:"--limit"}],Ea=[{flag:"--strict-directories"},{flag:"--require-merge-drivers"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--check-only"},{flag:"--check-telemetry"},{flag:"--no-refresh"},{flag:"--refresh-vectors"},{flag:"--verbose-stale-items"},{flag:"--verbose-author-events"},{flag:"--brief"},{flag:"--summary"},{flag:"--skip-vectors"},{flag:"--skip-integrity"},{flag:"--skip-drift"},{flag:"--full"}],Ra=[{flag:"--check-metadata"},{flag:"--metadata-profile"},{flag:"--check-resolution"},{flag:"--check-lifecycle"},{flag:"--check-stale-blockers"},{flag:"--dependency-cycle-severity"},{flag:"--parent-cycle-severity"},{flag:"--check-files"},{flag:"--scan-mode"},{flag:"--include-pm-internals"},{flag:"--verbose-file-lists"},{flag:"--verbose-diagnostics"},{flag:"--all-affected-ids"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--fix-hints"},{flag:"--auto-fix"},{flag:"--dry-run"},{flag:"--fix-scope"},{flag:"--prune-missing"},{flag:"--check-history-drift"},{flag:"--check-command-references"},{flag:"--check-storage-integrity"},{flag:"--counts"},{flag:"--full"}],S=[{flag:"--assignee"},{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-by"},{flag:"--blocked-reason"},{flag:"--unblock-note"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--actual-result"},{flag:"--affected-version"},{flag:"--fixed-version"}],N=[{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"}],O=[{short:"-p",flag:"--priority"},{flag:"--type"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{flag:"--remove-tags",aliases:["--remove_tags"]},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--add-ac",aliases:["--add_ac"]},{flag:"--remove-ac",aliases:["--remove_ac"]}],_=[{flag:"--stdin-json"},{short:"-t",flag:"--title"},{flag:"--id"},{short:"-d",flag:"--description"},{flag:"--type"},{flag:"--template"},{flag:"--create-mode"},{flag:"--create_mode"},{flag:"--schedule-preset"},{flag:"--schedule_preset"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},{flag:"--completed_at"},{short:"-p",flag:"--priority"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{short:"-b",flag:"--body"},{flag:"--body-file"},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--author"},{flag:"--message"},...S,...N,{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--fixed_version"},{flag:"--dep"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--reminder"},{flag:"--event"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--allow-duplicate",value_type:"boolean"}],ka=[{flag:"--transaction-id",value_name:"value"},{flag:"--stdin-json"},{flag:"--dry-run"},{flag:"--create-compensation",value_name:"mode"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--author",value_name:"value"}],Fa=[{flag:"--transaction-id",value_name:"value",required:!0},{flag:"--reason",value_name:"value"},{flag:"--file",value_name:"value",repeatable:!0},{flag:"--doc",value_name:"value",repeatable:!0},{flag:"--test",value_name:"value",repeatable:!0},{flag:"--comment",value_name:"value",repeatable:!0},{flag:"--note",value_name:"value",repeatable:!0},{flag:"--learning",value_name:"value",repeatable:!0},{flag:"--resolution",value_name:"value"},{flag:"--expected-result",value_name:"value"},{flag:"--actual-result",value_name:"value"},{flag:"--completed-at",value_name:"value"},{flag:"--validate-close",value_name:"mode"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--dry-run"},{flag:"--force"},{flag:"--author",value_name:"value"}],Ga=[{flag:"--title"},{flag:"--author"},{flag:"--message"},{flag:"--allow-duplicate",value_type:"boolean"}],wa=[{flag:"--clear"}],Ia=[{flag:"--stdin-json"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},{flag:"--body-file"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},...O,...S,{flag:"--fixed_version"},...N,{flag:"--author"},{flag:"--message"},{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--force"}],Ma=[{flag:"--filter-status",list:!0},{flag:"--filter-type",list:!0},{flag:"--filter-tag",list:!0},{flag:"--filter-priority",list:!0},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee",list:!0},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint",list:!0},{flag:"--filter-release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...h,{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},...O,{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--repro_steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--expected_result"},{flag:"--expected"},{flag:"--actual-result"},{flag:"--actual_result"},{flag:"--actual"},{flag:"--affected-version"},{flag:"--affected_version"},{flag:"--fixed-version"},{flag:"--fixed_version"},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],T=[{flag:"--view"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--full-period"},{flag:"--full_period"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--status"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--include"},{flag:"--recurrence-lookahead-days"},{flag:"--recurrence-lookback-days"},{flag:"--occurrence-limit"},{flag:"--limit"},{flag:"--format"}],Da=[{flag:"--id"},{flag:"--op"},{flag:"--author"},{flag:"--from"},{flag:"--to"},{flag:"--limit"},{flag:"--unbounded"},{flag:"--compact"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--stream"}],Pa=[{flag:"--since"},{flag:"--type",repeatable:!0},{flag:"--author",repeatable:!0},{flag:"--item",repeatable:!0},{flag:"--limit",value_type:"number"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--follow"},{flag:"--interval-ms",value_type:"number"}],A=p([{flag:"--for",value_name:"intent"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit",aliases:["--max-items"]},{flag:"--after"},{flag:"--format"},{flag:"--depth"},{flag:"--fields",list:!0},{flag:"--section"},{flag:"--activity-limit"},{flag:"--stale-threshold"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--no-extension-health"},{flag:"--no-tags"}],new Set(["--limit","--after","--format","--fields","--section","--activity-limit","--stale-threshold","--explain-ranking","--explain_ranking","--no-extension-health","--no-tags"])),Xa=[{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--depth"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--at"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--format"}],Ua=[{flag:"--list"},{flag:"--format"},{flag:"--depth"}],ja=[{flag:"--format"},{flag:"--max-depth"},{flag:"--collapse"},{flag:"--summary"},{flag:"--full"},{flag:"--node-limit"},{flag:"--edge-limit"},{flag:"--token-budget"},{flag:"--cursor"},{flag:"--direction"},{flag:"--kind",list:!0}],Ha=[{flag:"--kind",list:!0},{flag:"--max-depth"},{flag:"--limit"},{flag:"--after"},{flag:"--direction"},{flag:"--max-paths"},{flag:"--sample"},{flag:"--exempt-isolate",list:!0},{flag:"--exempt-isolate-type",list:!0},{flag:"--save-baseline"},{flag:"--rebuild"},{flag:"--clear"},{flag:"--summary"},{flag:"--full"}],za=[{flag:"--mode"},{flag:"--k"},{flag:"--fail-under"},{flag:"--queries"},{flag:"--format"}],r=[{flag:"--dry-run"},{flag:"--force"},{flag:"--author"},{flag:"--message"}],Ya=[{flag:"--for",value_name:"intent"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit"},{flag:"--blocked-limit"},{flag:"--blocked_limit"},{flag:"--ready-only"},{flag:"--ready_only"},{flag:"--format"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]}],qa=p([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--mode"},{flag:"--semantic"},{flag:"--hybrid"},{flag:"--match-mode"},{flag:"--min-score"},{flag:"--count"},{flag:"--semantic-weight"},{flag:"--include-linked"},{flag:"--title-exact"},{flag:"--phrase-exact"},{flag:"--highlight"},{flag:"--compact"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--format"},{flag:"--limit"},{flag:"--after"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--assignee",list:!0},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--parent"},...C],new Set(["--highlight","--compact","--full","--fields","--format","--limit","--token-budget","--after"])),Ba=[{flag:"--action"},{flag:"--command"},{flag:"--summary"},{flag:"--schema-only"},{flag:"--flags-only"},{flag:"--availability-only"},{flag:"--runtime-only"},{flag:"--active-only"},{flag:"--full"}],Va=[{flag:"--eager-tags"}];function Ka(a){let e=new Set,l=[];for(let t of a){let g=(t.aliases??[]).join(","),f=`${t.flag}|${t.short??""}|${g}`;e.has(f)||(e.add(f),l.push(t))}return l}function o(a){return c(Ka([...d,...a]))}var Wa=["list","list-all","list-draft","list-open","list-in-progress","list-blocked","list-closed","list-canceled"],L=new Map([...Wa.map(a=>[a,k]),["templates",_],["cal",T],["ctx",A],["test-runs-worker",Sa],["init",V],["config",K],["extension",y],["package",m],["packages",m],["install",ia],["upgrade",oa],["create",_],["item mutate",ka],["item complete",Fa],["copy",Ga],["focus",wa],["aggregate",F],["calendar",T],["context",A],["get",Xa],["guide",Ua],["search",qa],["next",Ya],["eval",za],["workspace",r],["workspace snapshot",r],["workspace snapshot create",r],["workspace snapshot list",r],["workspace snapshot inspect",r],["workspace snapshot restore",r],["workspace snapshot delete",r],["history",P],["history-redact",U],["history-repair",j],["history-author-acknowledge",H],["history-compact",z],["merge",X],["schema",Y],["profile",q],["plan",B],["activity",Da],["events",Pa],["restore",ua],["update",Ia],["update-many",Ma],["close",na],["close-many",ca],["delete",ma],["append",da],["comments",G],["notes",w],["learnings",I],["files",M],["docs",D],["deps",ja],["graph",Ha],["test",ba],["test-all",xa],["telemetry",va],["health",Ea],["validate",Ra],["gc",Na],["stats",Oa],["duplicates",La],["contracts",Ba],["completion",Va],["claim",pa],["release",_a],["start-task",Ta],["pause-task",Aa],["close-task",Ca],["meet",v],["event",ha],["remind",ya]]),E=new Map([["install",$],["uninstall",J],["explore",Q],["manage",ta],["describe",Z],["reload",fa],["doctor",ga],["catalog",sa],["adopt",ra],["adopt-all",aa],["activate",ea],["deactivate",la]]);function R(a){return typeof a!="string"?"":a.trim().toLowerCase()}function te(a){let e=R(a);if(L.has(e))return!0;let[l,t,...g]=e.split(/\s+/);return(l==="extension"||l==="package"||l==="packages")&&t!==void 0&&g.length===0&&(t==="init"||E.has(t))}function $a(a,e){return e==="init"?a==="extension"?b:W:E.get(e)??[]}function fe(a){let e=R(a);if(e.length===0)return o([]);let[l,t,...g]=e.split(/\s+/);return(l==="extension"||l==="package"||l==="packages")&&t!==void 0&&g.length===0?o($a(l,t)):o(L.get(e)??[])}function ge(a,e=!0){let t=c(a).flatMap(f=>[f.short,f.flag,...f.aliases??[]]).filter(f=>!!f),g=e?[...t,...d.flatMap(f=>[f.short,f.flag,...f.aliases??[]]).filter(f=>!!f)]:t;return i(g).join(" ")}export{i as a,c as b,ae as c,d,ee as e,k as f,F as g,G as h,w as i,I as j,M as k,D as l,P as m,X as n,U as o,j as p,H as q,z as r,Y as s,q as t,B as u,V as v,K as w,y as x,s as y,b as z,m as A,W as B,$ as C,J as D,Q as E,Z as F,aa as G,ea as H,la as I,ta as J,fa as K,ga as L,sa as M,ra as N,ia as O,oa as P,le as Q,na as R,ca as S,da as T,pa as U,ua as V,ma as W,_a as X,Ta as Y,Aa as Z,Ca as _,v as $,ha as aa,ya as ba,ba as ca,xa as da,va as ea,Sa as fa,Na as ga,Oa as ha,La as ia,Ea as ja,Ra as ka,_ as la,ka as ma,Fa as na,Ga as oa,wa as pa,Ia as qa,Ma as ra,T as sa,Da as ta,Pa as ua,A as va,Xa as wa,Ua as xa,ja as ya,Ha as za,za as Aa,r as Ba,Ya as Ca,qa as Da,Ba as Ea,Va as Fa,te as Ga,fe as Ha,ge as Ia};
2
+ //# sourceMappingURL=chunk-YEWNL576.js.map
@@ -1,2 +1,2 @@
1
- import{qa as w,ra as I,ta as S,ua as g}from"./chunk-BKMZTZYL.js";import{A as u,C as m,Cf as x,Da as f,Gf as b,La as y,Mf as h,yf as _}from"./chunk-V5K52PYW.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new i.Error().stack;t&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[t]="078456b8-ed61-5c47-afc7-7553833934e1")}catch{}})();var U=3,R=20,k=.8,N=100,A=1e3,D=1e6;function Q(i){return i===void 0?[]:[`likely_duplicates:${i.result.items.map(t=>t.id).join(",")}`]}function C(i){let t=i.limit??U,s=i.threshold??k;if(!Number.isSafeInteger(t)||t<0||t>R)throw new m(`Similarity limit must be an integer from 0 to ${R}.`,u.USAGE);if(!Number.isFinite(s)||s<0||s>1)throw new m("Similarity threshold must be a number from 0 to 1.",u.USAGE);return{limit:t,threshold:s}}function O(i){let t=i.limit??N;if(!Number.isSafeInteger(t)||t<0||t>A)throw new m(`Duplicate cluster limit must be an integer from 0 to ${A}.`,u.USAGE);let s=i.since===void 0?void 0:new Date(i.since);if(s&&Number.isNaN(s.getTime()))throw new m("Duplicate cluster --since must be a valid ISO timestamp.",u.USAGE);return{limit:t,since:s}}async function $(i,t){let s=y(i.cwd??process.cwd(),i.pmRoot),o=await _(s),n=f(o),e=i.statuses?new Set(i.statuses.map(r=>r.trim()).filter(Boolean)):void 0;return(await h(s,o.item_format,n.type_to_folder,void 0,o.schema)).filter(r=>(!e||e.has(r.status))&&(!t||new Date(r.created_at).getTime()>=t.getTime())).sort((r,c)=>r.id.localeCompare(c.id)).map(r=>({item:r,prepared:I(r.title)}))}function L(i,t=D){let s=new Set,o=[new Map,new Map,new Map];for(let[n,e]of i.entries()){let r=[[e.prepared.normalized],e.prepared.issueCodes,e.prepared.tokens];for(let[c,a]of r.entries())for(let l of a){let d=o[c].get(l)??[];for(let p of d)s.add(`${p}:${n}`);if(s.size>t)throw new m(`Duplicate sweep exceeded ${D} candidate pairs; narrow it with statuses or since.`,u.CONFLICT,{code:"duplicate_sweep_cost_limit",required:"Narrow the batch duplicate query until its deterministic candidate set fits the disclosed safety bound."});d.push(n),o[c].set(l,d)}}return s}var Z={buildDuplicateClusters:E,collectDuplicateCandidatePairs:L,createDuplicateUnionFind:M};function M(i){let t=Array.from({length:i},(o,n)=>n);return{parent:t,findRoot:o=>{let n=o;for(;t[n]!==n;)n=t[n];for(;t[o]!==o;){let e=t[o];t[o]=n,o=e}return n}}}function P(i,t,s,o){let n=[];for(let e of t){let[r,c]=e.split(":").map(p=>Number.parseInt(p,10)),a=g(i[r].prepared,i[c].prepared);if(a.score<s)continue;let l=o.findRoot(r),d=o.findRoot(c);l!==d&&(o.parent[d]=l),n.push({left_id:i[r].item.id,right_id:i[c].item.id,...a})}return n}function E(i,t,s,o){let n=new Map;for(let e of i.keys()){let r=s.findRoot(e),c=n.get(r)??[];c.push(e),n.set(r,c)}return[...n.values()].filter(e=>e.length>1).map(e=>{let r=new Set(e.map(a=>i[a].item.id)),c=t.filter(a=>r.has(a.left_id)&&r.has(a.right_id)).sort((a,l)=>l.score-a.score||a.left_id.localeCompare(l.left_id)||a.right_id.localeCompare(l.right_id));return{id:i[e[0]].item.id,items:e.map(a=>{let l=i[a].item;return{id:l.id,title:l.title,status:l.status,type:l.type}}),matches:c,max_score:c[0]?.score??0}}).sort((e,r)=>r.max_score-e.max_score||e.id.localeCompare(r.id)).slice(0,o)}function z(i,t,s,o,n){return t.filter(e=>!s.has(e.id)).map(e=>({id:e.id,title:e.title,status:e.status,type:e.type,...S(i,e.title)})).filter(e=>e.score>=o).sort((e,r)=>r.score-e.score||e.id.localeCompare(r.id)).slice(0,n)}async function F(i,t={}){let s=i.title.trim();if(s.length===0)throw new m("Similarity candidate title must not be empty.",u.USAGE);let{limit:o,threshold:n}=C(t),e=y(t.cwd??process.cwd(),t.pmRoot),r=await _(e),c=f(r),a=await b(e,Object.values(c.type_to_folder)),l=w(s),d=a&&l.length>0?await x({pmRoot:e,expectedSourceCursor:a.source_cursor,query:l.map(v=>`"${v.replaceAll('"','""')}"`).join(" OR "),limit:Math.max(o*10,50)}):null,p=d===null?await h(e,r.item_format,c.type_to_folder,void 0,r.schema):d.items,T=z(s,p,new Set(i.excludeIds??[]),n,o);return{items:T,count:T.length,threshold:n,source:d?"persistent_index":"metadata_fallback"}}async function ee(i={}){let{threshold:t}=C({...i,limit:void 0}),{limit:s,since:o}=O(i),n=await $(i,o),e=L(n),r=M(n.length),c=P(n,e,t,r),a=E(n,c,r,s);return{clusters:a,count:a.length,threshold:t,source:"metadata_scan",cost:{item_count:n.length,candidate_pairs:e.size,scored_pairs:e.size}}}async function te(i,t){if(t.mode==="off")return;let s=await F(i,t);if(s.count===0)return;let o=t.mode==="strict"&&t.allowDuplicate===!0;if(t.mode==="strict"&&!o){let n=s.items.map(e=>`${e.id} (${e.status}): ${e.title}`).join("; ");throw new m(`Likely duplicate item(s) found: ${n}. Reuse the canonical item or pass --allow-duplicate with explicit intent.`,u.CONFLICT,{code:"likely_duplicate",required:"Reuse an existing item, or explicitly acknowledge the duplicate with --allow-duplicate.",recovery:{suggested_flags:["--allow-duplicate"]}})}return{mode:t.mode,bypassed:o,result:s}}export{Q as a,Z as b,F as c,ee as d,te as e};
2
- //# sourceMappingURL=chunk-OB7TRZ2G.js.map
1
+ import{qa as w,ra as I,ta as S,ua as g}from"./chunk-A62CYISG.js";import{A as u,Af as _,C as m,Da as f,Ef as x,If as b,La as y,Of as h}from"./chunk-GE4KCSZP.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new i.Error().stack;t&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[t]="078456b8-ed61-5c47-afc7-7553833934e1")}catch{}})();var U=3,R=20,k=.8,N=100,A=1e3,D=1e6;function Q(i){return i===void 0?[]:[`likely_duplicates:${i.result.items.map(t=>t.id).join(",")}`]}function C(i){let t=i.limit??U,s=i.threshold??k;if(!Number.isSafeInteger(t)||t<0||t>R)throw new m(`Similarity limit must be an integer from 0 to ${R}.`,u.USAGE);if(!Number.isFinite(s)||s<0||s>1)throw new m("Similarity threshold must be a number from 0 to 1.",u.USAGE);return{limit:t,threshold:s}}function O(i){let t=i.limit??N;if(!Number.isSafeInteger(t)||t<0||t>A)throw new m(`Duplicate cluster limit must be an integer from 0 to ${A}.`,u.USAGE);let s=i.since===void 0?void 0:new Date(i.since);if(s&&Number.isNaN(s.getTime()))throw new m("Duplicate cluster --since must be a valid ISO timestamp.",u.USAGE);return{limit:t,since:s}}async function $(i,t){let s=y(i.cwd??process.cwd(),i.pmRoot),o=await _(s),n=f(o),e=i.statuses?new Set(i.statuses.map(r=>r.trim()).filter(Boolean)):void 0;return(await h(s,o.item_format,n.type_to_folder,void 0,o.schema)).filter(r=>(!e||e.has(r.status))&&(!t||new Date(r.created_at).getTime()>=t.getTime())).sort((r,c)=>r.id.localeCompare(c.id)).map(r=>({item:r,prepared:I(r.title)}))}function L(i,t=D){let s=new Set,o=[new Map,new Map,new Map];for(let[n,e]of i.entries()){let r=[[e.prepared.normalized],e.prepared.issueCodes,e.prepared.tokens];for(let[c,a]of r.entries())for(let l of a){let d=o[c].get(l)??[];for(let p of d)s.add(`${p}:${n}`);if(s.size>t)throw new m(`Duplicate sweep exceeded ${D} candidate pairs; narrow it with statuses or since.`,u.CONFLICT,{code:"duplicate_sweep_cost_limit",required:"Narrow the batch duplicate query until its deterministic candidate set fits the disclosed safety bound."});d.push(n),o[c].set(l,d)}}return s}var Z={buildDuplicateClusters:E,collectDuplicateCandidatePairs:L,createDuplicateUnionFind:M};function M(i){let t=Array.from({length:i},(o,n)=>n);return{parent:t,findRoot:o=>{let n=o;for(;t[n]!==n;)n=t[n];for(;t[o]!==o;){let e=t[o];t[o]=n,o=e}return n}}}function P(i,t,s,o){let n=[];for(let e of t){let[r,c]=e.split(":").map(p=>Number.parseInt(p,10)),a=g(i[r].prepared,i[c].prepared);if(a.score<s)continue;let l=o.findRoot(r),d=o.findRoot(c);l!==d&&(o.parent[d]=l),n.push({left_id:i[r].item.id,right_id:i[c].item.id,...a})}return n}function E(i,t,s,o){let n=new Map;for(let e of i.keys()){let r=s.findRoot(e),c=n.get(r)??[];c.push(e),n.set(r,c)}return[...n.values()].filter(e=>e.length>1).map(e=>{let r=new Set(e.map(a=>i[a].item.id)),c=t.filter(a=>r.has(a.left_id)&&r.has(a.right_id)).sort((a,l)=>l.score-a.score||a.left_id.localeCompare(l.left_id)||a.right_id.localeCompare(l.right_id));return{id:i[e[0]].item.id,items:e.map(a=>{let l=i[a].item;return{id:l.id,title:l.title,status:l.status,type:l.type}}),matches:c,max_score:c[0]?.score??0}}).sort((e,r)=>r.max_score-e.max_score||e.id.localeCompare(r.id)).slice(0,o)}function z(i,t,s,o,n){return t.filter(e=>!s.has(e.id)).map(e=>({id:e.id,title:e.title,status:e.status,type:e.type,...S(i,e.title)})).filter(e=>e.score>=o).sort((e,r)=>r.score-e.score||e.id.localeCompare(r.id)).slice(0,n)}async function F(i,t={}){let s=i.title.trim();if(s.length===0)throw new m("Similarity candidate title must not be empty.",u.USAGE);let{limit:o,threshold:n}=C(t),e=y(t.cwd??process.cwd(),t.pmRoot),r=await _(e),c=f(r),a=await b(e,Object.values(c.type_to_folder)),l=w(s),d=a&&l.length>0?await x({pmRoot:e,expectedSourceCursor:a.source_cursor,query:l.map(v=>`"${v.replaceAll('"','""')}"`).join(" OR "),limit:Math.max(o*10,50)}):null,p=d===null?await h(e,r.item_format,c.type_to_folder,void 0,r.schema):d.items,T=z(s,p,new Set(i.excludeIds??[]),n,o);return{items:T,count:T.length,threshold:n,source:d?"persistent_index":"metadata_fallback"}}async function ee(i={}){let{threshold:t}=C({...i,limit:void 0}),{limit:s,since:o}=O(i),n=await $(i,o),e=L(n),r=M(n.length),c=P(n,e,t,r),a=E(n,c,r,s);return{clusters:a,count:a.length,threshold:t,source:"metadata_scan",cost:{item_count:n.length,candidate_pairs:e.size,scored_pairs:e.size}}}async function te(i,t){if(t.mode==="off")return;let s=await F(i,t);if(s.count===0)return;let o=t.mode==="strict"&&t.allowDuplicate===!0;if(t.mode==="strict"&&!o){let n=s.items.map(e=>`${e.id} (${e.status}): ${e.title}`).join("; ");throw new m(`Likely duplicate item(s) found: ${n}. Reuse the canonical item or pass --allow-duplicate with explicit intent.`,u.CONFLICT,{code:"likely_duplicate",required:"Reuse an existing item, or explicitly acknowledge the duplicate with --allow-duplicate.",recovery:{suggested_flags:["--allow-duplicate"]}})}return{mode:t.mode,bypassed:o,result:s}}export{Q as a,Z as b,F as c,ee as d,te as e};
2
+ //# sourceMappingURL=chunk-YSO3YFZ4.js.map
@@ -1,2 +1,2 @@
1
- import{$e as d,A as c,Ad as K,C as l,Da as B,Ff as at,Hf as ct,Jf as P,Kf as D,La as q,Oa as z,Pa as V,R as C,Ra as S,Ue as p,Xe as Q,Ze as _,af as U,b as k,c as H,d as m,ef as Z,ff as tt,hd as Y,hf as et,id as X,kf as rt,lc as W,rf as nt,sf as ot,uc as L,vf as it,yf as st,zd as J}from"./chunk-V5K52PYW.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-UVZREFZU.js.map
1
+ import{$e as _,A as c,Ad as K,Af as st,C as l,Da as B,Hf as at,Jf as ct,La as q,Lf as P,Mf as D,Oa as z,Pa as V,R as C,Ra as S,We as p,Ze as Q,b as k,bf as d,c as H,cf as U,d as m,gf as Z,hd as Y,hf as tt,id as X,jf as et,lc as W,mf as rt,tf as nt,uc as L,uf as ot,xf as it,zd as J}from"./chunk-GE4KCSZP.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-ZYHOB3SN.js.map
@@ -0,0 +1,2 @@
1
+ import"./chunk-BXCSXK4J.js";import{a,b,c}from"./chunk-PMXJEU3F.js";import"./chunk-JC6FKIFM.js";import"./chunk-BXQLRKWF.js";import"./chunk-NY4T3JWN.js";import"./chunk-A62CYISG.js";import"./chunk-BPELKUQD.js";import"./chunk-RSIC5OPE.js";import"./chunk-5ZBOIPGP.js";import"./chunk-A6KGKEWT.js";import"./chunk-42E7YPLG.js";import"./chunk-M72BKL5Q.js";import"./chunk-GE4KCSZP.js";export{a as _testOnlyCloseCommand,b as closeItem,c as runClose};
2
+ //# sourceMappingURL=close-VZ3OQPN5.js.map
@@ -0,0 +1,2 @@
1
+ import{a as o,b as d}from"./chunk-CSI3WS5I.js";import"./chunk-HNFD72UK.js";import"./chunk-PMXJEU3F.js";import"./chunk-JC6FKIFM.js";import"./chunk-FB7G2HY2.js";import"./chunk-RKAVWO3O.js";import"./chunk-43HQQI6S.js";import"./chunk-UP7DTVMD.js";import"./chunk-ZYHOB3SN.js";import"./chunk-BXQLRKWF.js";import"./chunk-YEWNL576.js";import"./chunk-NY4T3JWN.js";import"./chunk-E2ZSLTOP.js";import"./chunk-A62CYISG.js";import"./chunk-BPELKUQD.js";import"./chunk-RSIC5OPE.js";import"./chunk-5ZBOIPGP.js";import"./chunk-A6KGKEWT.js";import"./chunk-42E7YPLG.js";import"./chunk-M72BKL5Q.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f439176a-7297-5235-b96a-3e393af8602b")}catch{}})();export{d as _testOnly,o as runCloseMany};
2
+ //# sourceMappingURL=close-many-SB4TI27P.js.map
@@ -0,0 +1,2 @@
1
+ import{a as n}from"./chunk-V3774P7D.js";import"./chunk-54FNT7U2.js";import"./chunk-A62CYISG.js";import"./chunk-BPELKUQD.js";import"./chunk-RSIC5OPE.js";import"./chunk-5ZBOIPGP.js";import"./chunk-A6KGKEWT.js";import"./chunk-42E7YPLG.js";import"./chunk-M72BKL5Q.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="2d8a7e66-16e7-552f-b6d8-4cfbfb519a30")}catch{}})();export{n as runComments};
2
+ //# sourceMappingURL=comments-BIF3Q4KY.js.map
@@ -0,0 +1,2 @@
1
+ import{a as d}from"./chunk-OTHLDSFP.js";import"./chunk-YSO3YFZ4.js";import"./chunk-E2ZSLTOP.js";import"./chunk-A62CYISG.js";import"./chunk-BPELKUQD.js";import"./chunk-RSIC5OPE.js";import"./chunk-5ZBOIPGP.js";import"./chunk-A6KGKEWT.js";import"./chunk-42E7YPLG.js";import"./chunk-M72BKL5Q.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="51b91e68-4bd6-521d-926e-e3b03f4b4956")}catch{}})();export{d as runCopy};
2
+ //# sourceMappingURL=copy-6AI5Z57X.js.map
@@ -1,2 +1,2 @@
1
- import{K as o,L as f,M as t,N as b,O as s,P as l,Q as r}from"./chunk-QMWUL66F.js";import"./chunk-OB7TRZ2G.js";import"./chunk-H6FITE7D.js";import"./chunk-XBLOD5TZ.js";import"./chunk-IYAVULRN.js";import"./chunk-E2ZSLTOP.js";import"./chunk-BKMZTZYL.js";import"./chunk-5H47J5FG.js";import"./chunk-RSIC5OPE.js";import"./chunk-NRDKVOUE.js";import"./chunk-A6KGKEWT.js";import"./chunk-VH2EAGUG.js";import"./chunk-ZSH4GNBH.js";import"./chunk-V5K52PYW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="e8b566c3-db93-54d7-a917-38bf317cb575")}catch{}})();export{r as _testOnlyCreateCommand,b as parseDocs,f as parseFiles,o as parseLogSeed,t as parseTests,s as requireStringOption,l as runCreate};
2
- //# sourceMappingURL=create-RLLCBCXM.js.map
1
+ import{K as o,L as f,M as t,N as b,O as s,P as l,Q as r}from"./chunk-HWRRMBJO.js";import"./chunk-YSO3YFZ4.js";import"./chunk-NE5VRDAI.js";import"./chunk-L3AZOELJ.js";import"./chunk-NY4T3JWN.js";import"./chunk-E2ZSLTOP.js";import"./chunk-A62CYISG.js";import"./chunk-BPELKUQD.js";import"./chunk-RSIC5OPE.js";import"./chunk-5ZBOIPGP.js";import"./chunk-A6KGKEWT.js";import"./chunk-42E7YPLG.js";import"./chunk-M72BKL5Q.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="e8b566c3-db93-54d7-a917-38bf317cb575")}catch{}})();export{r as _testOnlyCreateCommand,b as parseDocs,f as parseFiles,o as parseLogSeed,t as parseTests,s as requireStringOption,l as runCreate};
2
+ //# sourceMappingURL=create-XLKTXTUF.js.map
@@ -0,0 +1,2 @@
1
+ import{a as d}from"./chunk-DXDREUXT.js";import"./chunk-A62CYISG.js";import"./chunk-BPELKUQD.js";import"./chunk-RSIC5OPE.js";import"./chunk-5ZBOIPGP.js";import"./chunk-A6KGKEWT.js";import"./chunk-42E7YPLG.js";import"./chunk-M72BKL5Q.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d9bb2d77-9ea1-51f9-a186-a2c222a6fbb3")}catch{}})();export{d as runDelete};
2
+ //# sourceMappingURL=delete-ZY2VHQTP.js.map
@@ -1,2 +1,2 @@
1
- import{f as d,g as f,h as t,i as s,j as l,k as r,l as a,m as b,n as i}from"./chunk-CGY5I2GO.js";import"./chunk-XBLOD5TZ.js";import"./chunk-V5K52PYW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="41658a2a-e730-5c0c-9783-70b30ee9b2fc")}catch{}})();export{f as DEPS_COLLAPSE_VALUES,t as DEPS_DIRECTION_VALUES,d as DEPS_FORMAT_VALUES,b as buildDepsRelationshipContext,r as parseDirection,a as parseKinds,l as parseMaxDepth,s as parsePositiveInteger,i as runDeps};
2
- //# sourceMappingURL=deps-J4ONTF4X.js.map
1
+ import{f as d,g as f,h as t,i as s,j as l,k as r,l as a,m as b,n as i}from"./chunk-LKDGK44W.js";import"./chunk-L3AZOELJ.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="41658a2a-e730-5c0c-9783-70b30ee9b2fc")}catch{}})();export{f as DEPS_COLLAPSE_VALUES,t as DEPS_DIRECTION_VALUES,d as DEPS_FORMAT_VALUES,b as buildDepsRelationshipContext,r as parseDirection,a as parseKinds,l as parseMaxDepth,s as parsePositiveInteger,i as runDeps};
2
+ //# sourceMappingURL=deps-ITTY3GIC.js.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-DCJ6CM6F.js";import"./chunk-PQXEB7W4.js";import"./chunk-A6KGKEWT.js";import"./chunk-VH2EAGUG.js";import"./chunk-V5K52PYW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="890d56e2-d85f-5d29-90b3-1d832210ea09")}catch{}})();export{o as runDocs};
2
- //# sourceMappingURL=docs-YL2DJ4WD.js.map
1
+ import{a as o}from"./chunk-OMXVBQ2N.js";import"./chunk-4VN6GS4U.js";import"./chunk-A6KGKEWT.js";import"./chunk-42E7YPLG.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="890d56e2-d85f-5d29-90b3-1d832210ea09")}catch{}})();export{o as runDocs};
2
+ //# sourceMappingURL=docs-W4OSRTYR.js.map
@@ -1,2 +1,2 @@
1
- import{a as f,b as o,c as t,d as s}from"./chunk-NFF3JAQR.js";import"./chunk-PQXEB7W4.js";import"./chunk-A6KGKEWT.js";import"./chunk-VH2EAGUG.js";import"./chunk-V5K52PYW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="2fa91bad-9a89-5c42-8b0f-dbcd2728c563")}catch{}})();export{f as _testOnly,o as runFiles,s as runFilesDiscover,t as runFilesLookup};
2
- //# sourceMappingURL=files-NGNAIYKK.js.map
1
+ import{a as f,b as o,c as t,d as s}from"./chunk-UZBWIUYD.js";import"./chunk-4VN6GS4U.js";import"./chunk-A6KGKEWT.js";import"./chunk-42E7YPLG.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="2fa91bad-9a89-5c42-8b0f-dbcd2728c563")}catch{}})();export{f as _testOnly,o as runFiles,s as runFilesDiscover,t as runFilesLookup};
2
+ //# sourceMappingURL=files-EOK4AZI4.js.map
@@ -0,0 +1,2 @@
1
+ import{a as d}from"./chunk-7A5OT5J2.js";import"./chunk-A62CYISG.js";import"./chunk-BPELKUQD.js";import"./chunk-RSIC5OPE.js";import"./chunk-5ZBOIPGP.js";import"./chunk-A6KGKEWT.js";import"./chunk-42E7YPLG.js";import"./chunk-M72BKL5Q.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="13a390ed-dac6-51bc-aeee-17f601e73282")}catch{}})();export{d as runFocus};
2
+ //# sourceMappingURL=focus-DLBNWL7L.js.map
@@ -1,2 +1,2 @@
1
- import{a as t,c as n,d as r}from"./chunk-QVO3VTA4.js";import"./chunk-FQ4EFFDU.js";import"./chunk-UVZREFZU.js";import"./chunk-V5K52PYW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="c916e9b2-d840-585e-b7e2-120b677c7498")}catch{}})();export{n as assertHistoryCompactTarget,t as runHistoryCompact,r as runHistoryCompactBulk};
2
- //# sourceMappingURL=history-compact-HW62K5XP.js.map
1
+ import{a as t,c as n,d as r}from"./chunk-2WFXWAYX.js";import"./chunk-UP7DTVMD.js";import"./chunk-ZYHOB3SN.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="c916e9b2-d840-585e-b7e2-120b677c7498")}catch{}})();export{n as assertHistoryCompactTarget,t as runHistoryCompact,r as runHistoryCompactBulk};
2
+ //# sourceMappingURL=history-compact-7UGTMLL3.js.map
@@ -1,2 +1,2 @@
1
- import{h as t,i as f,j as n}from"./chunk-UVZREFZU.js";import"./chunk-V5K52PYW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="f3dbfd7a-f028-5927-b62d-2f078389f06d")}catch{}})();export{n as _testOnly,t as resolveHistorySubject,f as runHistoryRedact};
2
- //# sourceMappingURL=history-redact-HVBKUJOW.js.map
1
+ import{h as t,i as f,j as n}from"./chunk-ZYHOB3SN.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="f3dbfd7a-f028-5927-b62d-2f078389f06d")}catch{}})();export{n as _testOnly,t as resolveHistorySubject,f as runHistoryRedact};
2
+ //# sourceMappingURL=history-redact-4DZRMD6Z.js.map
@@ -1,2 +1,2 @@
1
- import{b as n,c as o,d as t}from"./chunk-B5ZLCD5Z.js";import"./chunk-KIKLF2W4.js";import"./chunk-UVZREFZU.js";import"./chunk-5H47J5FG.js";import"./chunk-V5K52PYW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="49eb11f2-6d0e-59e6-9b7d-3a1515229879")}catch{}})();export{o as assertHistoryRepairTarget,n as runHistoryRepair,t as runHistoryRepairAll};
2
- //# sourceMappingURL=history-repair-OPNBH5JJ.js.map
1
+ import{b as n,c as o,d as t}from"./chunk-V3EUXXOF.js";import"./chunk-E2RKBKWB.js";import"./chunk-ZYHOB3SN.js";import"./chunk-BPELKUQD.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="49eb11f2-6d0e-59e6-9b7d-3a1515229879")}catch{}})();export{o as assertHistoryRepairTarget,n as runHistoryRepair,t as runHistoryRepairAll};
2
+ //# sourceMappingURL=history-repair-UPOSZW5R.js.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-HQ2WU7OY.js";import"./chunk-D2MBVMVE.js";import"./chunk-NRDKVOUE.js";import"./chunk-VH2EAGUG.js";import"./chunk-V5K52PYW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6bbab815-17b8-5f27-8842-41d6132488b2")}catch{}})();export{o as runLearnings};
2
- //# sourceMappingURL=learnings-F36PZXT6.js.map
1
+ import{a as o}from"./chunk-MHK6LIWE.js";import"./chunk-54FNT7U2.js";import"./chunk-5ZBOIPGP.js";import"./chunk-42E7YPLG.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6bbab815-17b8-5f27-8842-41d6132488b2")}catch{}})();export{o as runLearnings};
2
+ //# sourceMappingURL=learnings-GMRNCBS3.js.map
@@ -1,2 +1,2 @@
1
- import{q as d,r as o,s as t,t as s,u as a,v as l,w as r,x as i,y as b}from"./chunk-5PZGZMPG.js";import"./chunk-CHOQ2VAW.js";import"./chunk-6S7I3UKV.js";import"./chunk-ASJJKA57.js";import"./chunk-JMKVCQSE.js";import"./chunk-JDPKBV5P.js";import"./chunk-E2ZSLTOP.js";import"./chunk-RSIC5OPE.js";import"./chunk-ZSH4GNBH.js";import"./chunk-V5K52PYW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new e.Error().stack;f&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[f]="faf8a076-fe77-5017-b570-a49e7031ee0d")}catch{}})();export{d as PROFILE_SUBCOMMANDS,b as formatProfileApplyHuman,i as formatProfileLintHuman,l as formatProfileListHuman,r as formatProfileShowHuman,a as runProfileApply,s as runProfileLint,o as runProfileList,t as runProfileShow};
2
- //# sourceMappingURL=profile-N3XMWBM7.js.map
1
+ import{q as d,r as o,s as t,t as s,u as a,v as l,w as r,x as i,y as b}from"./chunk-R546TPDE.js";import"./chunk-CHOQ2VAW.js";import"./chunk-VCKLFEUN.js";import"./chunk-LN2WFEU4.js";import"./chunk-SSF4PIUR.js";import"./chunk-YEWNL576.js";import"./chunk-E2ZSLTOP.js";import"./chunk-RSIC5OPE.js";import"./chunk-M72BKL5Q.js";import"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new e.Error().stack;f&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[f]="faf8a076-fe77-5017-b570-a49e7031ee0d")}catch{}})();export{d as PROFILE_SUBCOMMANDS,b as formatProfileApplyHuman,i as formatProfileLintHuman,l as formatProfileListHuman,r as formatProfileShowHuman,a as runProfileApply,s as runProfileLint,o as runProfileList,t as runProfileShow};
2
+ //# sourceMappingURL=profile-2MUUMHRE.js.map