@unbrained/pm-cli 2026.8.7 → 2026.8.8

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 (226) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +35 -0
  3. package/dist/cli/main.js +4 -3
  4. package/dist/cli/register-annotations.d.ts +11 -0
  5. package/dist/cli/register-annotations.js +195 -0
  6. package/dist/cli/register-history-author.js +7 -30
  7. package/dist/cli/register-mutation.js +25 -206
  8. package/dist/cli/runtime-compatibility-boundary.d.ts +17 -0
  9. package/dist/cli/runtime-compatibility-boundary.js +43 -0
  10. package/dist/cli-bundle/bundle-manifest.json +155 -691
  11. package/dist/cli-bundle/chunks/chunk-2ZMXX3Q6.js +2068 -0
  12. package/dist/cli-bundle/chunks/chunk-ALDHXLPS.js +3 -0
  13. package/dist/cli-bundle/chunks/chunk-CBLA33YK.js +8 -0
  14. package/dist/cli-bundle/chunks/chunk-GKA54IJM.js +5 -0
  15. package/dist/cli-bundle/chunks/chunk-KRY7SRUO.js +2 -0
  16. package/dist/cli-bundle/chunks/chunk-MNJ4NNSY.js +26 -0
  17. package/dist/cli-bundle/chunks/chunk-NUXRRNAB.js +77 -0
  18. package/dist/cli-bundle/chunks/chunk-OJPCFDDY.js +13 -0
  19. package/dist/cli-bundle/chunks/chunk-PFSD3DAN.js +194 -0
  20. package/dist/cli-bundle/chunks/chunk-QWRRFYK3.js +2 -0
  21. package/dist/cli-bundle/chunks/chunk-SQ7QZFQ6.js +2 -0
  22. package/dist/cli-bundle/chunks/{register-list-query-FJZCJ67O.js → register-list-query-WFZAMJHZ.js} +8 -8
  23. package/dist/cli-bundle/chunks/register-mutation-SOKKOTHQ.js +20 -0
  24. package/dist/cli-bundle/chunks/register-operations-5XQETS6E.js +2 -0
  25. package/dist/cli-bundle/chunks/register-setup-2HL5ZHMK.js +2 -0
  26. package/dist/cli-bundle/focused-chunks/chunk-54EU2UVO.js +2 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-VZFU2R4M.js → chunk-5FLBTZJQ.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-5GJ57YKN.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-HNL6IFGS.js → chunk-ANTMGYLI.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/chunk-CMDS3KYT.js +14 -0
  31. package/dist/cli-bundle/focused-chunks/{chunk-NBJKQP4S.js → chunk-DMKOMTTY.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/{chunk-CIXVQPB7.js → chunk-F5B3HBEZ.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/{chunk-R2LEMEV5.js → chunk-FI6DWU2M.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-3K4XV2BF.js → chunk-FNOKJG6N.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-RW5IYD4J.js → chunk-FPDYXZBK.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-QHRTT7WT.js → chunk-GWI6YIKJ.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-MHMTKV5V.js → chunk-HCUC62AB.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-MOTJFQ3F.js → chunk-HGNKPSCB.js} +12 -12
  39. package/dist/cli-bundle/focused-chunks/{chunk-4VJQTS3P.js → chunk-IAS7PMLG.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-TIKDBG4D.js → chunk-PL2EYDJK.js} +27 -27
  41. package/dist/cli-bundle/focused-chunks/chunk-SM2PJGP3.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-RPNYG5MO.js → chunk-TCSAPH33.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/chunk-U646T7Z6.js +18 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-YKPE4PPY.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-YZEZAPJK.js → chunk-YSAHYUXX.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-73JUDYXT.js → chunk-ZOLDTUU7.js} +2 -2
  47. package/dist/cli-bundle/main.js +13 -13
  48. package/dist/cli-bundle/sdk-authoring.js +1 -1
  49. package/dist/cli-bundle/sdk-contracts.js +1 -1
  50. package/dist/cli-bundle/sdk-core.js +38 -38
  51. package/dist/cli-bundle/sdk-governance.js +1 -1
  52. package/dist/cli-bundle/sdk-graph.js +1 -1
  53. package/dist/cli-bundle/sdk-merge.js +1 -1
  54. package/dist/cli-bundle/sdk-query.js +1 -1
  55. package/dist/cli-bundle/sdk-runtime.js +1 -1
  56. package/dist/cli-bundle/sdk-testing.js +1 -1
  57. package/dist/cli-bundle/sdk.js +2 -1
  58. package/dist/cli.js +14 -4
  59. package/dist/core/output/output.js +9 -2
  60. package/dist/core/sentry/helpers.d.ts +10 -0
  61. package/dist/core/sentry/helpers.js +59 -4
  62. package/dist/core/shared/constants.d.ts +2 -0
  63. package/dist/core/shared/constants.js +4 -2
  64. package/dist/sdk/annotations.d.ts +40 -0
  65. package/dist/sdk/annotations.js +61 -9
  66. package/dist/sdk/author-attribution.d.ts +12 -0
  67. package/dist/sdk/author-attribution.js +73 -11
  68. package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +118 -0
  69. package/dist/sdk/cli-contracts/command-exit-contracts.js +152 -0
  70. package/dist/sdk/cli-contracts/completeness.js +5 -3
  71. package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
  72. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +11 -0
  73. package/dist/sdk/cli-contracts/runtime-contracts.js +29 -2
  74. package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -2
  75. package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
  76. package/dist/sdk/cli-contracts/tool-schema.js +6 -3
  77. package/dist/sdk/comments.d.ts +7 -0
  78. package/dist/sdk/comments.js +2 -2
  79. package/dist/sdk/completion.js +9 -5
  80. package/dist/sdk/contracts.d.ts +1 -0
  81. package/dist/sdk/contracts.js +3 -2
  82. package/dist/sdk/environment/host-environment-errors.d.ts +27 -0
  83. package/dist/sdk/environment/host-environment-errors.js +124 -0
  84. package/dist/sdk/environment/project-runtime-compatibility.d.ts +65 -0
  85. package/dist/sdk/environment/project-runtime-compatibility.js +385 -0
  86. package/dist/sdk/environment/source-context.d.ts +23 -0
  87. package/dist/sdk/environment/source-context.js +29 -0
  88. package/dist/sdk/error-code-catalog.d.ts +6 -0
  89. package/dist/sdk/error-code-catalog.js +62 -8
  90. package/dist/sdk/generated-error-code-catalog.js +629 -3
  91. package/dist/sdk/governance/health.d.ts +11 -3
  92. package/dist/sdk/governance/health.js +5 -5
  93. package/dist/sdk/index.d.ts +7 -3
  94. package/dist/sdk/index.js +9 -5
  95. package/dist/sdk/learnings.d.ts +15 -0
  96. package/dist/sdk/learnings.js +2 -2
  97. package/dist/sdk/lifecycle/close-many.d.ts +6 -1
  98. package/dist/sdk/lifecycle/close-many.js +43 -5
  99. package/dist/sdk/lifecycle/update-many.d.ts +2 -1
  100. package/dist/sdk/lifecycle/update-many.js +29 -5
  101. package/dist/sdk/merge/index.d.ts +1 -1
  102. package/dist/sdk/merge/index.js +3 -3
  103. package/dist/sdk/merge/install.d.ts +21 -0
  104. package/dist/sdk/merge/install.js +50 -20
  105. package/dist/sdk/notes.d.ts +7 -0
  106. package/dist/sdk/notes.js +2 -2
  107. package/dist/sdk/read-output-contracts.js +83 -4
  108. package/dist/sdk/runtime.d.ts +1 -1
  109. package/dist/sdk/runtime.js +9 -25
  110. package/dist/sdk/test/execution.js +4 -2
  111. package/dist/sdk/test/parsers.js +5 -2
  112. package/dist/sdk/workspace-snapshot.d.ts +9 -0
  113. package/dist/sdk/workspace-snapshot.js +48 -16
  114. package/docs/AGENT_RUNTIME_PRIMITIVES.md +11 -4
  115. package/docs/README.md +1 -0
  116. package/docs/RELEASING.md +27 -2
  117. package/docs/SCRIPTING.md +27 -1
  118. package/docs/SDK_CONTEXT_INTEGRITY.md +66 -0
  119. package/docs/SDK_RUNTIME_BOUNDARIES.md +58 -0
  120. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
  121. package/docs/TESTING.md +17 -0
  122. package/marketplace.json +2 -2
  123. package/package.json +5 -3
  124. package/packages/pm-beads/package.json +1 -1
  125. package/packages/pm-calendar/package.json +1 -1
  126. package/packages/pm-command-kit/package.json +1 -1
  127. package/packages/pm-digital-twin/package.json +1 -1
  128. package/packages/pm-governance-audit/package.json +1 -1
  129. package/packages/pm-guide-shell/package.json +1 -1
  130. package/packages/pm-kanban/package.json +1 -1
  131. package/packages/pm-lifecycle-hooks/package.json +1 -1
  132. package/packages/pm-linked-test-adapters/package.json +1 -1
  133. package/packages/pm-search-advanced/package.json +1 -1
  134. package/packages/pm-templates/package.json +1 -1
  135. package/packages/pm-todos/package.json +1 -1
  136. package/packages/pm-vcs/package.json +1 -1
  137. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  138. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  139. package/sdk/public-surface.json +529 -34
  140. package/dist/cli-bundle/chunks/append-7BXBFDGD.js +0 -2
  141. package/dist/cli-bundle/chunks/chunk-2AXF3VSK.js +0 -2
  142. package/dist/cli-bundle/chunks/chunk-2XS43CCV.js +0 -2
  143. package/dist/cli-bundle/chunks/chunk-3A6KWB72.js +0 -8
  144. package/dist/cli-bundle/chunks/chunk-3ISTDB42.js +0 -8
  145. package/dist/cli-bundle/chunks/chunk-4MTI7XOV.js +0 -5
  146. package/dist/cli-bundle/chunks/chunk-6BX5UDCN.js +0 -3
  147. package/dist/cli-bundle/chunks/chunk-6QPO7KLR.js +0 -2
  148. package/dist/cli-bundle/chunks/chunk-7MXHZHSQ.js +0 -5
  149. package/dist/cli-bundle/chunks/chunk-7ZPMJW4U.js +0 -2
  150. package/dist/cli-bundle/chunks/chunk-A6KGKEWT.js +0 -2
  151. package/dist/cli-bundle/chunks/chunk-AGYNSNCI.js +0 -2
  152. package/dist/cli-bundle/chunks/chunk-B4H7FEFH.js +0 -5
  153. package/dist/cli-bundle/chunks/chunk-B4KLBBMN.js +0 -2
  154. package/dist/cli-bundle/chunks/chunk-BXCSXK4J.js +0 -2
  155. package/dist/cli-bundle/chunks/chunk-CALJHNBL.js +0 -23
  156. package/dist/cli-bundle/chunks/chunk-CFIGP5LY.js +0 -2
  157. package/dist/cli-bundle/chunks/chunk-CHOQ2VAW.js +0 -2
  158. package/dist/cli-bundle/chunks/chunk-CS6MRHG7.js +0 -2
  159. package/dist/cli-bundle/chunks/chunk-CUGNQQKH.js +0 -2
  160. package/dist/cli-bundle/chunks/chunk-D4FPS43D.js +0 -164
  161. package/dist/cli-bundle/chunks/chunk-E2ZSLTOP.js +0 -2
  162. package/dist/cli-bundle/chunks/chunk-FB7G2HY2.js +0 -2
  163. package/dist/cli-bundle/chunks/chunk-H5Y5YE6A.js +0 -2
  164. package/dist/cli-bundle/chunks/chunk-H5Y6UV6E.js +0 -2
  165. package/dist/cli-bundle/chunks/chunk-H7KGWPDF.js +0 -2
  166. package/dist/cli-bundle/chunks/chunk-HFSD77TQ.js +0 -2
  167. package/dist/cli-bundle/chunks/chunk-HX2GTA6L.js +0 -2
  168. package/dist/cli-bundle/chunks/chunk-J2IEKAVR.js +0 -2
  169. package/dist/cli-bundle/chunks/chunk-JC6FKIFM.js +0 -2
  170. package/dist/cli-bundle/chunks/chunk-K44PYFXH.js +0 -2
  171. package/dist/cli-bundle/chunks/chunk-K4KGEEBT.js +0 -2
  172. package/dist/cli-bundle/chunks/chunk-KFLK5TRH.js +0 -21
  173. package/dist/cli-bundle/chunks/chunk-KL6IEBV2.js +0 -2
  174. package/dist/cli-bundle/chunks/chunk-KWQZDZSS.js +0 -2
  175. package/dist/cli-bundle/chunks/chunk-KZ4X3DGU.js +0 -3
  176. package/dist/cli-bundle/chunks/chunk-LD77HJMQ.js +0 -13
  177. package/dist/cli-bundle/chunks/chunk-LEPJJ6QC.js +0 -2
  178. package/dist/cli-bundle/chunks/chunk-ME2JJ4LA.js +0 -3
  179. package/dist/cli-bundle/chunks/chunk-NE5VRDAI.js +0 -2
  180. package/dist/cli-bundle/chunks/chunk-NFLJ3FHD.js +0 -2
  181. package/dist/cli-bundle/chunks/chunk-NG6OXIBR.js +0 -19
  182. package/dist/cli-bundle/chunks/chunk-NYIGHWQY.js +0 -8
  183. package/dist/cli-bundle/chunks/chunk-NZ75GNSA.js +0 -2
  184. package/dist/cli-bundle/chunks/chunk-PCJWJNC2.js +0 -2
  185. package/dist/cli-bundle/chunks/chunk-PD3225AM.js +0 -2
  186. package/dist/cli-bundle/chunks/chunk-PDEGKG7P.js +0 -2
  187. package/dist/cli-bundle/chunks/chunk-PIE5HBNA.js +0 -2
  188. package/dist/cli-bundle/chunks/chunk-PW2H7YJR.js +0 -56
  189. package/dist/cli-bundle/chunks/chunk-RSIC5OPE.js +0 -2
  190. package/dist/cli-bundle/chunks/chunk-TPKN3S7S.js +0 -2
  191. package/dist/cli-bundle/chunks/chunk-TPXAXTCO.js +0 -2
  192. package/dist/cli-bundle/chunks/chunk-UFWUJO4V.js +0 -2
  193. package/dist/cli-bundle/chunks/chunk-UQLZQVFW.js +0 -55
  194. package/dist/cli-bundle/chunks/chunk-VT3Z5G7D.js +0 -2
  195. package/dist/cli-bundle/chunks/chunk-WOD3WWUN.js +0 -2
  196. package/dist/cli-bundle/chunks/chunk-WSJEIGJF.js +0 -3
  197. package/dist/cli-bundle/chunks/chunk-WYNUU7ZW.js +0 -2008
  198. package/dist/cli-bundle/chunks/chunk-YGPNCCXZ.js +0 -2
  199. package/dist/cli-bundle/chunks/close-CMY3BAUG.js +0 -2
  200. package/dist/cli-bundle/chunks/close-many-SA4XZCTK.js +0 -2
  201. package/dist/cli-bundle/chunks/comments-EZ556ZD3.js +0 -2
  202. package/dist/cli-bundle/chunks/copy-ZSGPA52X.js +0 -2
  203. package/dist/cli-bundle/chunks/create-I5DVV4YG.js +0 -2
  204. package/dist/cli-bundle/chunks/delete-RL3JACSW.js +0 -2
  205. package/dist/cli-bundle/chunks/deps-S7UBCECS.js +0 -2
  206. package/dist/cli-bundle/chunks/docs-ZZNVBBYO.js +0 -2
  207. package/dist/cli-bundle/chunks/files-27C337VT.js +0 -2
  208. package/dist/cli-bundle/chunks/focus-5Z2SG7LU.js +0 -2
  209. package/dist/cli-bundle/chunks/history-compact-HJQK67CZ.js +0 -2
  210. package/dist/cli-bundle/chunks/history-redact-PWC6PDWA.js +0 -2
  211. package/dist/cli-bundle/chunks/history-repair-N3CY4WBF.js +0 -2
  212. package/dist/cli-bundle/chunks/learnings-4FH23XDT.js +0 -2
  213. package/dist/cli-bundle/chunks/profile-5Y5XXH5N.js +0 -2
  214. package/dist/cli-bundle/chunks/register-mutation-YGYPW3BL.js +0 -20
  215. package/dist/cli-bundle/chunks/register-operations-WMDSUMQF.js +0 -2
  216. package/dist/cli-bundle/chunks/register-setup-DL7FFABC.js +0 -2
  217. package/dist/cli-bundle/chunks/restore-6KYBV5BY.js +0 -2
  218. package/dist/cli-bundle/chunks/schema-EQGKBYXJ.js +0 -2
  219. package/dist/cli-bundle/chunks/update-QVTYOD6I.js +0 -2
  220. package/dist/cli-bundle/chunks/update-many-DJSBU525.js +0 -2
  221. package/dist/cli-bundle/focused-chunks/chunk-2ECLECMK.js +0 -12
  222. package/dist/cli-bundle/focused-chunks/chunk-4EX25PXM.js +0 -8
  223. package/dist/cli-bundle/focused-chunks/chunk-DLTS3IHM.js +0 -2
  224. package/dist/cli-bundle/focused-chunks/chunk-DQ6FKGL3.js +0 -14
  225. package/dist/cli-bundle/focused-chunks/chunk-JLG2C4EQ.js +0 -2
  226. package/dist/cli-bundle/focused-chunks/chunk-ZJIMJHDB.js +0 -2
@@ -1,2008 +0,0 @@
1
- import{b as Ke,c as Cr,d as Xe}from"./chunk-CS6MRHG7.js";import{B as Lr,Ba as Zr,C as Nr,Ca as Qr,D as Mr,Da as ei,E as Dr,F as jr,H as Gr,M as Kr,aa as ln,b as en,c as Jo,d as Be,f as gr,k as yr,l as Re,m as br,n as wr,o as vr,p as kr,q as Sr,sa as pn,ta as un,va as Xr,w as Je,x as $r,y as Fr,z as Pr}from"./chunk-KFLK5TRH.js";import{a as sn}from"./chunk-PCJWJNC2.js";import{a as Ho}from"./chunk-4MTI7XOV.js";import{r as Ur,s as qr,t as zr,u as Hr}from"./chunk-UQLZQVFW.js";import{a as Qo}from"./chunk-2XS43CCV.js";import{b as Er,c as an,d as cn}from"./chunk-J2IEKAVR.js";import{a as xr}from"./chunk-KL6IEBV2.js";import{a as er}from"./chunk-7ZPMJW4U.js";import{a as Vr,c as Br,d as Wr}from"./chunk-AGYNSNCI.js";import{a as Xo}from"./chunk-HX2GTA6L.js";import{a as Vo,c as Bo,e as Wo,g as Yo}from"./chunk-H5Y6UV6E.js";import{a as nn}from"./chunk-PDEGKG7P.js";import{a as on}from"./chunk-KWQZDZSS.js";import{a as fe}from"./chunk-ME2JJ4LA.js";import{a as hr,b as Ar}from"./chunk-6BX5UDCN.js";import{B as Ir,i as Ie,v as Ye}from"./chunk-PW2H7YJR.js";import{F as nr,I as sr,J as or,L as rr,M as ir,N as ar,O as cr,P as mr,Q as dr,R as lr,S as pr,T as ur,U as fr,V as _r,b as qo,p as tr}from"./chunk-CALJHNBL.js";import{D as mn,F as Rr,W as Jr,b as Uo,e as Xt,g as Zo,m as rn}from"./chunk-B4H7FEFH.js";import{h as zo,ja as Zt,oa as Qt,ra as Tr}from"./chunk-LD77HJMQ.js";import{n as Yr}from"./chunk-TPXAXTCO.js";import{p as Or,r as dn}from"./chunk-3ISTDB42.js";import{b as ro,c as io,o as ao}from"./chunk-PIE5HBNA.js";import{P as Ae}from"./chunk-7MXHZHSQ.js";import{a as Ko}from"./chunk-CFIGP5LY.js";import{a as tn}from"./chunk-K44PYFXH.js";import{c as We}from"./chunk-2AXF3VSK.js";import{u as Kt}from"./chunk-NZ75GNSA.js";import{b as Go}from"./chunk-B4KLBBMN.js";import{i as jo}from"./chunk-PD3225AM.js";import{A as ho,Aa as Lo,Da as No,Ea as Ve,Fa as Mo,Ga as Do,Ja as S,T as go,U as yo,aa as bo,c as co,ca as wo,e as mo,f as He,g as lo,ja as vo,ka as ko,m as po,ma as So,pa as xo,qa as Eo,ra as Ao,sa as Io,ta as Ro,u as uo,ua as Co,v as fo,va as To,wa as Oo,x as _o,xa as $o,ya as Fo,za as Po}from"./chunk-WOD3WWUN.js";import{Ba as oo,C as Vt,E as Bt,I as Ws,J as Ys,K as Js,L as Ks,M as Xs,O as Zs,P as Qs,Q as eo,R as Ee,S as to,T as ze,U as no,V as Wt,W as Yt,X as so,e as Os,f as $s,x as Hs,y as Vs}from"./chunk-NG6OXIBR.js";import{a as zs}from"./chunk-K4KGEEBT.js";import{a as Jt}from"./chunk-A6KGKEWT.js";import{a as Ut}from"./chunk-NYIGHWQY.js";import{$ as ys,A as _,Bb as C,C as u,Ce as js,Da as ee,E as gs,Ea as bs,Ec as Ge,Gd as J,La as F,Le as Gs,N as ke,Nc as re,Ne as Us,Nf as D,Oa as U,Pc as Lt,Qc as Fs,R as k,Ra as xt,Sd as Ps,T as De,Ud as Ls,Vb as Et,Wb as At,Xb as It,Xd as Ns,Xf as Bs,Yf as qt,Zb as Is,Zf as zt,aa as yt,ad as Nt,b as G,ca as bt,cd as Mt,d as Q,dc as Rs,dd as Ue,dg as Ht,ec as Rt,f as gt,fc as Ct,g as ps,gc as Tt,gd as qe,hc as Ot,hd as Se,ic as $t,id as Dt,jb as je,jc as Ft,jf as jt,k as us,kc as Pt,kf as Gt,l as fs,lc as q,m as _s,mb as pe,n as hs,oe as Ms,sa as wt,sb as ws,ta as vt,tb as vs,ua as kt,ub as ks,uc as oe,uf as qs,va as St,vb as Ss,ve as Ds,vf as xe,wb as xs,xb as Es,yb as As,yc as Cs,ye as ue,yf as ie,zc as Ts,zd as z}from"./chunk-D4FPS43D.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bb16b445-3bd4-520d-becf-c55621bfa186")}catch{}})();var mp=ps,dp=us,lp=hs,pp=fs,up=_s;function ti(e,t,n,s){let o=e.flag.slice(2).replace(/[-_]([a-z])/gu,(i,a)=>a.toUpperCase()),r=n.has(o);return{long:t,...s?{short:s}:{},description:e.description??`Standard pm ${e.flag} option.`,...e.required===!0?{required:!0}:{},...e.list===!0?{list:!0}:{},...e.repeatable===!0?{repeatable:!0}:{},value_type:r?"string":"boolean",...r?{value_name:e.value_name??"value"}:{}}}function ni(e,t=[]){let n=new Set(t.flatMap(o=>o.keys)),s=[];for(let o of co(e.map(r=>({...r})))){s.push(ti(o,o.flag,n,o.short));for(let r of o.aliases??[])s.push(ti(o,r,n))}return s}var fp=ni(He,ro),Aa=ni(Ve,io);import{AsyncLocalStorage as fl}from"node:async_hooks";import _a from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="27dd77f6-e53d-55b7-be15-db0e60eaec4e")}catch{}})();function si(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ia(e){return e.brief===!0?"brief":typeof e.fields=="string"&&e.fields.trim().length>0||Array.isArray(e.fields)&&e.fields.length>0?"fields":e.compact===!0?"compact":"full"}function fn(e,t){let n=Ia(t),s=n==="brief"?n:si(e.projection)&&typeof e.projection.mode=="string"?e.projection.mode:n;return{...e,query_summary:{filters:si(e.filters)?e.filters:{},projection:s}}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b9eae1a3-3eb6-5415-86c3-a8e8e1fedd1f")}catch{}})();function oi(e){return e.map(t=>({key:t.key,optionName:Fs(t),metadataKey:t.metadata_key,type:t.type,commands:[...t.commands],repeatable:t.repeatable,requiredOnCreate:t.required_on_create,...t.description?{description:t.description}:{}}))}function ri(e){return e.map(t=>({command:t.command,action:t.action,arguments:t.arguments.map(n=>({name:n.name,required:n.required===!0,variadic:n.variadic===!0,description:n.description})),description:t.description,tier:t.tier??"standard"}))}(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]="7c898a52-eba4-5626-8207-5ffefd4990ba")}catch{}})();var Ra=50,te=new Map;function _n(){te.clear()}function ii(e,t){let n=te.get(e);if(n!==void 0)return n;if(te.size>=Ra){let o=te.keys().next().value;te.delete(o)}let s=t().catch(o=>{throw te.get(e)===s&&te.delete(e),o});return te.set(e,s),s}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6f62939a-7b99-5687-93ae-834e0032f1d5")}catch{}})();var Ca={"list-all":{action:"list",options:{excludeTerminal:!1}},"list-draft":{action:"list",options:{status:"draft",excludeTerminal:!1}},"list-open":{action:"list",options:{status:"open",excludeTerminal:!1}},"list-in-progress":{action:"list",options:{status:"in_progress",excludeTerminal:!1}},"list-blocked":{action:"list",options:{status:"blocked",excludeTerminal:!1}},"list-closed":{action:"list",options:{status:"closed",excludeTerminal:!1}},"list-canceled":{action:"list",options:{status:"canceled",excludeTerminal:!1}}};function ai(e){return Object.fromEntries(Gs.map(t=>[`${e}-${t}`,{action:e,options:{[t==="adopt-all"?"adoptAll":t]:!0,...e==="package"?{vocabulary:"package"}:{}}}]))}var hn={ctx:{action:"context"},...Ca,...ai("extension"),...ai("package")};(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]="41012e87-ed61-56b2-8505-8f786b3952b2")}catch{}})();var ci="PmCliError";function Ta(e){if(!Number.isFinite(e))throw new TypeError("createPmCliExpectedError options.exitCode must be a finite number");let t=Math.trunc(e);if(t<=_.SUCCESS)throw new TypeError("createPmCliExpectedError options.exitCode must be a positive exit code");return t}function Oa(e,t={}){if(typeof e!="string"||e.trim().length===0)throw new TypeError("createPmCliExpectedError message must be a non-empty string");let n=new u(e,Ta(t.exitCode??_.USAGE),t.context??{});return"cause"in t&&Object.defineProperty(n,"cause",{value:t.cause,enumerable:!1,configurable:!0,writable:!0}),n}function gn(e){if(!(e instanceof Error)||e.name!==ci)return!1;let t=e;return typeof t.exitCode=="number"&&Number.isFinite(t.exitCode)}import{constants as Ce}from"node:fs";import{lstat as mi,mkdir as bn,open as di}from"node:fs/promises";import K from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c53bb1b7-12b9-5370-a85b-cdd8bef57936")}catch{}})();function yn(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship event ${t} must be non-empty`);return e.trim()}function wn(e,t){let n=t.require(e.kind),s=n.direction==="undirected"?[e.source,e.target].sort().join("\0"):`${e.source}\0${e.target}`;return`${n.kind}\0${s}`}function $a(e){return Object.freeze({...e,...e.payload===void 0?{}:{payload:Object.freeze(structuredClone(e.payload))}})}function Fa(e,t,n,s){let o=n.require(e.kind),r=s.outgoingOne.get(`${o.kind}\0${e.source}`);if(r!==void 0&&r!==t)throw new TypeError(`Relationship outgoing cardinality exceeded for ${o.kind}`);let i=s.incomingOne.get(`${o.kind}\0${e.target}`);if(i!==void 0&&i!==t)throw new TypeError(`Relationship incoming cardinality exceeded for ${o.kind}`);let a=wn(e,n),c=s.identities.get(a);if(c!==void 0&&c!==t)throw new TypeError(`Relationship edge already active: ${a}`)}function Pa(e){let t=new Map;for(let n of e)n.action==="remove"?t.delete(n.relationshipId):t.set(n.relationshipId,n.edge);return t}function La(e,t,n){if(e.expectedVersion!==void 0&&e.expectedVersion!==t)throw new TypeError(`Relationship event version conflict: expected ${e.expectedVersion}, current ${t}`);let s=yn(e.eventId,"eventId");if(n.has(s))throw new TypeError(`Relationship event already exists: ${s}`);if(e.action!=="add"&&e.action!=="remove"&&e.action!=="supersede")throw new TypeError(`Unknown relationship event action: ${e.action}`);if(!Number.isFinite(Date.parse(e.timestamp)))throw new TypeError("Relationship event timestamp must be valid");return{eventId:s,relationshipId:yn(e.relationshipId,"relationshipId"),author:yn(e.author,"author"),timestamp:new Date(e.timestamp).toISOString()}}function Na(e,t,n,s,o,r){let i=n.has(t);if(e.action==="add"&&i)throw new TypeError(`Relationship is already active: ${t}`);if(e.action!=="add"&&!i)throw new TypeError(`Relationship is not active: ${t}`);if(e.action==="remove")return;if(!e.edge)throw new TypeError(`Relationship ${e.action} event requires an edge`);let a=typeof e.edge.source=="string"?e.edge.source.trim():"",c=typeof e.edge.target=="string"?e.edge.target.trim():"";if(!s.has(a)||!s.has(c))throw new TypeError(`Relationship endpoint not found: ${a} -> ${c}`);let d=new pe([a,c],[e.edge],o).edges()[0];return Fa(d,t,o,r),$a(d)}var Te=class{#t;#n;#s=[];#r=new Set;#e=new Map;#o={identities:new Map,outgoingOne:new Map,incomingOne:new Map};constructor(t,n={}){this.#t=new Set([...t].filter(s=>typeof s=="string").map(s=>s.trim()).filter(Boolean)),this.#n=n.registry??je()}get version(){return this.#s.length}events(){return Object.freeze([...this.#s])}*stream(t={}){let n=t.fromVersion??1,s=t.toVersion??this.version,o=t.batchSize??100;if(!Number.isInteger(n)||n<1)throw new TypeError("Relationship event stream fromVersion must be positive");if(!Number.isInteger(s)||s<0||s>this.version)throw new TypeError(`Relationship event stream toVersion out of range: ${s}`);if(!Number.isInteger(o)||o<1)throw new TypeError("Relationship event stream batchSize must be positive");if(n>s+1)throw new TypeError("Relationship event stream fromVersion exceeds the selected prefix");for(let r=n-1;r<s;r+=o)yield Object.freeze(this.#s.slice(r,Math.min(r+o,s)))}project(t,n,s={}){if(typeof n!="function")throw new TypeError("Relationship event projection requires a reducer");let o=t,r=0,i;for(let a of this.stream({...s,batchSize:256}))for(let c of a)o=n(o,c),r+=1,i=c;return Object.freeze({state:o,version:i?.sequence??Math.max(0,(s.fromVersion??1)-1),processed:r,...i===void 0?{}:{asOf:i.timestamp}})}#i(t,n){let s=this.#n.require(n.kind);this.#o.identities.set(wn(n,this.#n),t),s.outgoing==="one"&&this.#o.outgoingOne.set(`${s.kind}\0${n.source}`,t),s.incoming==="one"&&this.#o.incomingOne.set(`${s.kind}\0${n.target}`,t)}#a(t){let n=this.#n.require(t.kind);this.#o.identities.delete(wn(t,this.#n)),n.outgoing==="one"&&this.#o.outgoingOne.delete(`${n.kind}\0${t.source}`),n.incoming==="one"&&this.#o.incomingOne.delete(`${n.kind}\0${t.target}`)}append(t){let n=La(t,this.version,this.#r),s=this.#e.get(n.relationshipId),o=Na(t,n.relationshipId,this.#e,this.#t,this.#n,this.#o),r=Object.freeze({eventId:n.eventId,relationshipId:n.relationshipId,action:t.action,...o===void 0?{}:{edge:o},author:n.author,timestamp:n.timestamp,...t.reason?.trim()?{reason:t.reason.trim()}:{},sequence:this.version+1});return this.#s.push(r),this.#r.add(n.eventId),s&&this.#a(s),t.action==="remove"?this.#e.delete(n.relationshipId):(this.#e.set(n.relationshipId,o),this.#i(n.relationshipId,o)),r}snapshot(t={}){if(t.atVersion!==void 0&&t.atTimestamp!==void 0)throw new TypeError("Relationship snapshot accepts one target");let n;if(t.atTimestamp!==void 0){let r=Date.parse(t.atTimestamp);if(!Number.isFinite(r))throw new TypeError("Relationship snapshot timestamp must be valid");n=this.#s.filter(i=>Date.parse(i.timestamp)<=r)}else{let r=t.atVersion??this.version;if(!Number.isInteger(r)||r<0||r>this.version)throw new TypeError(`Relationship snapshot version out of range: ${r}`);n=this.#s.slice(0,r)}let s=Pa(n),o=new pe(this.#t,s.values(),this.#n);return Object.freeze({version:n.at(-1)?.sequence??0,...n.at(-1)?{asOf:n.at(-1).timestamp}:{},edges:o.edges(),graph:o})}page(t){if(!Number.isInteger(t.limit)||t.limit<1)throw new TypeError("Relationship event page limit must be positive");let n=Ps("relationship-events",{order:"append-sequence"}),s=t.cursor===void 0?this.version:Number(Ls(t.cursor,n).snapshot);if(!Number.isSafeInteger(s)||s<0||s>this.version)throw new TypeError("Relationship event cursor snapshot version is invalid");let o=Ns(this.#s.slice(0,s),{cursor:t.cursor,fingerprint:n,limit:t.limit,readId:r=>r.eventId,snapshot:String(s)});return{version:s,events:o.rows,hasMore:o.has_more,...o.next_cursor?{nextCursor:o.next_cursor}:{}}}},Ma="relationship-event-store",li=Ce.O_NOFOLLOW;function Ze(e){return ie(e,Ma,30,`relationship-store:${process.pid}`,!1,!1,3e3)}async function ae(e,t="relationships/events.jsonl"){let n=K.resolve(e),s=K.resolve(n,t),o=K.relative(n,s);if(o.length===0)throw new TypeError("Relationship event path must name a file within the tracker root");if(o===".."||o.startsWith(`..${K.sep}`)||K.isAbsolute(o))throw new TypeError("Relationship event path must stay within the tracker root");if(await bn(n,{recursive:!0}),(await mi(n)).isSymbolicLink())throw new TypeError("Relationship event tracker root must not be a symbolic link");let i=n;for(let a of o.split(K.sep)){i=K.join(i,a);try{if((await mi(i)).isSymbolicLink())throw new TypeError("Relationship event path must not contain symbolic links")}catch(c){if(c.code==="ENOENT")break;throw c}}return s}async function Qe(e,t,n){let s=new Te(t,{registry:n}),o,r;try{r=await di(e,Ce.O_RDONLY|li),o=await r.readFile("utf8")}catch(a){if(a.code==="ENOENT")return{log:s,raw:""};throw a}finally{await r?.close()}let i=o.split(`
2
- `);for(let a=0;a<i.length;a+=1){let c=i[a].trim();if(!c)continue;let d;try{d=JSON.parse(c)}catch{throw new TypeError(`Invalid relationship event JSONL at line ${a+1}`)}if(d.sequence!==s.version+1)throw new TypeError(`Invalid relationship event sequence at line ${a+1}`);s.append({eventId:d.eventId,relationshipId:d.relationshipId,action:d.action,...d.edge===void 0?{}:{edge:d.edge},author:d.author,timestamp:d.timestamp,...d.reason===void 0?{}:{reason:d.reason},expectedVersion:s.version})}return{log:s,raw:o}}function Da(e,t,n,s){let o=Date.parse(t.timestamp),r;return t.action!=="remove"&&t.edge!==void 0&&(r=new pe(n,[t.edge],s).edges()[0]),e.eventId===t.eventId.trim()&&e.relationshipId===t.relationshipId.trim()&&e.action===t.action&&e.author===t.author.trim()&&Number.isFinite(o)&&e.timestamp===new Date(o).toISOString()&&e.reason===(t.reason?.trim()||void 0)&&C(e.edge)===C(r)}var et=class e{#t;#n;#s;#r;#e;constructor(t,n,s,o){this.#t=t.pmRoot,this.#n=n,this.#s=t.registry,this.#r=s,this.#e=o}static async open(t){let n=Object.freeze([...t.nodes]),s=await ae(t.pmRoot,t.relativePath),o=await Ze(t.pmRoot);try{await ae(t.pmRoot,s);let{log:r}=await Qe(s,n,t.registry);return new e(t,n,s,r)}finally{await o()}}get path(){return this.#r}async currentVersion(){return this.#e=await this.#o(),this.#e.version}async append(t){let n=await Ze(this.#t);try{let s=await ae(this.#t,this.#r),{log:o}=await Qe(s,this.#n,this.#s),r=o.append(t);await bn(K.dirname(s),{recursive:!0}),await ae(this.#t,s);let i=await di(s,Ce.O_APPEND|Ce.O_CREAT|Ce.O_WRONLY|li);try{await i.appendFile(`${JSON.stringify(r)}
3
- `,"utf8")}finally{await i.close()}return this.#e=o,r}finally{await n()}}async appendBatch(t,n={}){let s=await Ze(this.#t);try{let o=await ae(this.#t,this.#r),{log:r,raw:i}=await Qe(o,this.#n,this.#s),a=r.version,c=new Map(r.events().map(p=>[p.eventId,p])),d=[],m=[];for(let p of t){let f=p.eventId.trim(),g=c.get(f);if(g!==void 0){if(n.existingEventPolicy==="skip_identical"&&Da(g,p,this.#n,this.#s)){m.push(g.eventId);continue}if(n.existingEventPolicy==="skip_identical")throw new TypeError(`Relationship event id collision with different content: ${f}`)}let w=r.append(p);c.set(w.eventId,w),d.push(w)}if(d.length>0){let p=i.length===0||i.endsWith(`
4
- `)?i:`${i}
5
- `;await bn(K.dirname(o),{recursive:!0}),await ae(this.#t,o),await Q(o,`${p}${d.map(f=>JSON.stringify(f)).join(`
6
- `)}
7
- `)}return this.#e=r,Object.freeze({version_before:a,version_after:r.version,appended:Object.freeze(d),skipped_event_ids:Object.freeze(m)})}finally{await s()}}async snapshot(t={}){return this.#e=await this.#o(),this.#e.snapshot(t)}async page(t){return this.#e=await this.#o(),this.#e.page(t)}async*stream(t={}){this.#e=await this.#o(),yield*this.#e.stream(t)}async project(t,n,s={}){return this.#e=await this.#o(),this.#e.project(t,n,s)}async#o(){let t=await Ze(this.#t);try{let n=await ae(this.#t,this.#r);return(await Qe(n,this.#n,this.#s)).log}finally{await t()}}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ff13ec2a-64a8-5512-973f-5447be945978")}catch{}})();function vn(e){let t=je();for(let n of e)t.register(n);return t}function pi(e,t){return{client:t,isItemNotFoundError:n=>gn(n)&&n.exitCode===_.NOT_FOUND,getItemAt:(n,s)=>Go(n,s,{pmRoot:e}),openRelationshipEventStore:n=>et.open({pmRoot:e,nodes:n.nodes,registry:vn(n.definitions),...n.relativePath===void 0?{}:{relativePath:n.relativePath}}),createRelationshipGraph:n=>new pe(n.nodes,n.edges,vn(n.definitions)),analyzeRelationshipImpact:(n,s,o)=>Uo(n,s,o),validateRelationshipEvents:n=>{let s=new Te(n.nodes,{registry:vn(n.definitions)});return n.events.map(o=>s.append({...o,expectedVersion:s.version}))},commitWorkspaceTransaction:n=>qo({...n,pmRoot:e})}}import{readFile as ja}from"node:fs/promises";import Ga from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="55ecd7ff-0047-5fd1-9f6f-f45602fce1bb")}catch{}})();var kn="context-intents.json";function Oe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ua(e,t,n){if(!Oe(e))throw new TypeError(`${t} context intent at index ${String(n)} must be an object`);let s=e.included_field_groups;if(typeof e.command!="string"||typeof e.intent!="string"||typeof e.description!="string"||!Array.isArray(s)||!s.every(o=>typeof o=="string")||typeof e.token_budget!="number")throw new TypeError(`${t} context intent at index ${String(n)} has an invalid contract shape`);return{command:e.command,intent:e.intent,description:e.description,included_field_groups:s,token_budget:e.token_budget}}function ui(e,t){let n=Array.isArray(e)?e:Oe(e)&&Array.isArray(e.intents)?e.intents:void 0;if(!n)throw new TypeError(`${t} context intents must be an array or an object with an intents array`);return n.map((s,o)=>Ua(s,t,o))}async function qa(e){let t=Ga.join(e,kn),n;try{n=await ja(t,"utf8")}catch(o){if(Oe(o)&&typeof o.code=="string"&&o.code==="ENOENT")return[];throw o}let s;try{s=JSON.parse(n)}catch(o){let r=o instanceof Error?o.message:String(o);throw new TypeError(`Invalid ${kn}: ${r}`,{cause:o})}return ui(s,kn)}function za(e){if(!Oe(e))return;let t=e.contextIntents??e.context_intents;if(t!==void 0)return t;let n=e.default;return Oe(n)?n.contextIntents??n.context_intents:void 0}function Ha(e){return e.flatMap(t=>{let n=za(t.module);return n===void 0?[]:ui(n,`package ${t.name}`)})}async function Va(e){let t=await qa(e.pmRoot),n=Ha(e.packages??[]);return{workspaceContracts:t,packageContracts:n}}async function Sn(e,t){let n=await Va(e);return await Ds(n,t)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="973fe868-d08e-5a45-83c5-b7ecb959f680")}catch{}})();function Ba(e){if(e===void 0)return;if(e.trim().length===0)throw new u("--add-json must contain a JSON value",_.USAGE,{code:"structured_event_json_empty"});let t;try{t=JSON.parse(e)}catch{throw new u("--add-json must be valid JSON",_.USAGE,{code:"structured_event_json_invalid"})}return t}function Wa(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e.type;return typeof t=="string"&&t.trim().length>0?t.trim():void 0}function Ya(e){if(e===void 0)return;let t=Date.parse(e);if(!Number.isFinite(t))throw new u("--since must be a valid ISO timestamp",_.USAGE,{code:"structured_event_since_invalid"});return t}async function fi(e,t,n){let s=Ba(t.addJson),o=[t.add!==void 0,t.stdin===!0,t.file!==void 0,t.edit!==void 0,t.delete!==void 0].includes(!0);if(s!==void 0&&o)throw new u("--add-json cannot be combined with text, edit, delete, stdin, or file inputs",_.USAGE,{code:"structured_event_input_conflict"});let r=s===void 0?void 0:C(s),i=[t.since,t.eventType].some(w=>w!==void 0),a=Ya(t.since),c=zs(t.limit),d=await Yo(e,{...t,...i?{limit:void 0}:{},includeMeta:[t.includeMeta===!0,i].includes(!0)},n,{input:await Wo(r===void 0?t:{add:r},"note"),collectionKey:"notes",op:"note_add",editOp:"note_edit",deleteOp:"note_delete",parseText:w=>Bo(w),createEntry:w=>s===void 0?w:{...w,format:"json",data:s,event_type:Wa(s)},bypassOwnershipConflict:!![t.edit===void 0,t.delete===void 0,t.ownershipAppendBypass===!0].every(Boolean),conflictGuidance:{required:"For an approved append-only handoff on another owner's item, use the package-provided ownership bypass before considering --force.",examples:['pm notes pm-a1b2 --add "review note" --author "reviewer" --force'],nextSteps:["Use an installed package's narrow append-only ownership bypass when available.","Use --force only when an ownership override is explicitly approved."]}}),m=t.eventType?.trim(),p=d.notes.filter(w=>{let b=[w.format==="json",w.data!==void 0].every(Boolean),v=[a===void 0,Date.parse(w.created_at)>=(a??Number.POSITIVE_INFINITY)].includes(!0),h=[!m,w.event_type===m].includes(!0);return[!i,[b,v,h].every(Boolean)].includes(!0)}),f=i?Vo(p,c):p,g=f.filter(w=>w.format==="json").length;return{...d,notes:f,count:f.length,...i?{total_count:p.length,returned_count:f.length,has_more:f.length<p.length,...c===void 0?{}:{limit:c},structured_event_count:g}:t.includeMeta===!0?{structured_event_count:g}:{}}}(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]="5d3c68a6-0b40-56b5-ae9e-776e1830ed3e")}catch{}})();var Zp=["create","show","add-step","update-step","complete-step","block-step","reorder-step","remove-step","link","unlink","decision","discovery","validation","resume","approve","materialize"],_i=["brief","standard","deep"],yi="plan-step-",Cn="draft",Rn=["bug-investigation","feature-implementation","refactoring-sprint"],hi={"bug-investigation":[{title:"Reproduce the bug",body:"Capture exact steps, inputs, and the observed vs expected behavior."},{title:"Locate the root cause",body:"Trace the failure to the responsible code path with evidence."},{title:"Write a failing test",body:"Add a regression test that fails for the current bug."},{title:"Implement the fix",body:"Apply the minimal change that makes the failing test pass."},{title:"Verify and document",body:"Run the full suite and record the resolution and verification."}],"feature-implementation":[{title:"Clarify requirements & acceptance criteria",body:"Confirm scope, edge cases, and done-conditions."},{title:"Design the approach",body:"Decide the data model, interfaces, and integration points."},{title:"Implement the change",body:"Build the feature behind the agreed design."},{title:"Add tests",body:"Cover the new behavior and its edge cases."},{title:"Update docs & changelog",body:"Document the feature and surface it to users."}],"refactoring-sprint":[{title:"Map the current structure & risks",body:"Inventory the code to change and its blast radius."},{title:"Add characterization tests",body:"Lock in current behavior before refactoring."},{title:"Refactor incrementally",body:"Apply small, reversible steps keeping tests green."},{title:"Verify behavior is unchanged",body:"Run the full suite and compare against the baseline."},{title:"Clean up & document",body:"Remove dead code and record the new structure."}]};function Ja(e){let t=e.trim().toLowerCase(),n=Object.prototype.hasOwnProperty.call(hi,t)?hi[t]:void 0;if(!n)throw new u(`Unknown plan template "${e}". Allowed: ${Rn.join(", ")}`,_.USAGE,{code:"unknown_plan_template",examples:[`pm plan create --title "Fix login crash" --template ${Rn[0]}`]});return n.map(s=>({...s}))}function Ka(e,t){return t>0?Math.round(e/t*100):0}function bi(e){return(Array.isArray(e)?e:e==null?[]:[e]).filter(n=>n!=null).map(n=>(typeof n=="string"?n:String(n)).trim()).filter(n=>n.length>0)}function j(e){return Array.isArray(e)?e.flatMap(t=>Jt(t,{unique:!1})):typeof e=="string"&&e.trim().length>0?Jt(e,{unique:!1}):[]}function P(e){return Array.isArray(e)?e.map(t=>t.trim()).filter(Boolean):typeof e=="string"&&e.trim().length>0?[e.trim()]:[]}function wi(e,t=Cn){if(e===void 0)return t;let n=e.trim().toLowerCase(),s=wt.find(o=>o===n);if(!s)throw new u(`Invalid plan mode "${e}". Allowed: ${wt.join(", ")}`,_.USAGE);return s}function Tn(e,t="pending"){if(e===void 0)return t;let n=e.trim().toLowerCase(),s=vt.find(o=>o===n);if(!s)throw new u(`Invalid step status "${e}". Allowed: ${vt.join(", ")}`,_.USAGE);return s}function vi(e,t="related"){if(e===void 0)return t;let n=e.trim().toLowerCase(),s=St.find(o=>o===n);if(!s)throw new u(`Invalid step link kind "${e}". Allowed: ${St.join(", ")}`,_.USAGE);return s}function Xa(e){if(e===void 0)return;let t=e.trim().toLowerCase();if(t.length===0)return;let n=kt.find(s=>s===t);if(!n)throw new u(`Invalid plan harness "${e}". Allowed: ${kt.join(", ")}`,_.USAGE);return n}function Za(e){if(e===void 0)return"brief";let t=e.trim().toLowerCase(),n=_i.find(s=>s===t);if(!n)throw new u(`Invalid --depth "${e}". Allowed: ${_i.join(", ")}`,_.USAGE);return n}function Qa(e){if(e===void 0)return null;let t=e.split(",").map(n=>n.trim()).filter(n=>n.length>0);if(t.length===0)throw new u("Plan --fields requires a comma-separated list of plan field names",_.USAGE);return t}var xn=new Set(["id","title","status","mode","scope","harness","parent","resume_context","steps_summary","current_step","blocked_steps","steps","decisions","discoveries","validation","linked_items"]);function ec(e,t){let n=e,s={},o=[];for(let r of t){let i=r.startsWith("plan.")?r.slice(5):r;if(i.length!==0){if(!xn.has(i)){o.push(r);continue}Object.prototype.hasOwnProperty.call(n,i)&&(s[i]=n[i])}}if(o.length>0)throw new u(`Unknown Plan --fields value(s): ${o.join(", ")}`,_.USAGE,{nextSteps:[`Use --fields ${[...xn].join(",")}`,"Run pm plan show <id> --depth brief for compact default fields."],recovery:{provided_fields:o,suggested_retry:`pm plan show <id> --fields ${[...xn].join(",")}`}});return s}function On(e,t){let n={};for(let s of e.split(",")){let o=s.trim();if(o.length===0)continue;let r=o.indexOf("=");if(r<=0)throw new u(`Invalid ${t} entry "${o}"; expected key=value`,_.USAGE,{code:"malformed_plan_step_evidence",required:`${t} entries must use comma-separated key=value fields.`,why:"Structured Plan evidence must be validated before it is persisted.",examples:['--file "path=src/index.ts,scope=project,note=implementation"','--test "command=pnpm test,note=regression"','--doc "path=docs/PLAN.md,scope=project"']});n[o.slice(0,r).trim().toLowerCase()]=o.slice(r+1).trim()}return n}function $n(e){let t=On(e,"--file");if(!t.path)throw new u("--file requires path=<value>",_.USAGE,{code:"malformed_plan_step_evidence",required:"--file requires a non-empty path field.",why:"Plan file evidence needs a stable path for later verification."});let n={path:t.path};return(t.scope==="global"||t.scope==="project")&&(n.scope=t.scope),t.note&&(n.note=t.note),n}function Fn(e){let t=On(e,"--test");if(!t.command&&!t.path)throw new u("--test requires at least command=<value> or path=<value>",_.USAGE,{code:"malformed_plan_step_evidence",required:"--test requires a command or path field.",why:"Plan test evidence must identify something runnable or inspectable."});let n={};return t.command&&(n.command=t.command),t.path&&(n.path=t.path),t.note&&(n.note=t.note),n}function Pn(e){let t=On(e,"--doc");if(!t.path)throw new u("--doc requires path=<value>",_.USAGE,{code:"malformed_plan_step_evidence",required:"--doc requires a non-empty path field.",why:"Plan documentation evidence needs a stable path for later verification."});let n={path:t.path};return(t.scope==="global"||t.scope==="project")&&(n.scope=t.scope),t.note&&(n.note=t.note),n}function tc(e){let t={total:e.length,pending:0,in_progress:0,blocked:0,completed:0,skipped:0,superseded:0,completion_pct:0};for(let n of e)t[n.status]+=1;return t.completion_pct=Ka(t.completed,t.total),t}function nc(e){let t=new Set(e.map(n=>n.id));for(let n=e.length+1;n<e.length+1024;n+=1){let s=`${yi}${String(n).padStart(3,"0")}`;if(!t.has(s))return s}throw new u("Could not allocate step id (limit reached)",_.GENERIC_FAILURE)}function _e(e,t){let n=t.trim();if(n.length===0)throw new u("Step reference cannot be empty",_.USAGE);let s=e.find(o=>o.id===n);if(s)return s;if(/^\d+$/.test(n)){let o=Number.parseInt(n,10),r=e.find(i=>i.order===o);if(r)return r}throw new u(`Step "${t}" not found in plan`,_.NOT_FOUND)}function gi(e){if(e.status==="completed")return{reason:"already_completed"};let t=(e.linked_items??[]).find(n=>n.kind==="implements");if(t)return{reason:"already_materialized",existing_id:t.id}}function sc(e,t){let n=t.filter(i=>i.trim().toLowerCase()==="all"),s=[],o=[];if(n.length>0){if(t.length>n.length)throw new u("pm plan materialize --steps all cannot be combined with other step refs",_.USAGE);for(let i of e.slice().sort((a,c)=>a.order-c.order)){let a=gi(i);if(a){o.push({from_step:i.id,...a});continue}s.push(i)}return{targets:s,skipped:o}}let r=new Set;for(let i of t){let a=_e(e,i);if(r.has(a.id))continue;r.add(a.id);let c=gi(a);if(c){o.push({from_step:a.id,...c});continue}s.push(a)}return{targets:s,skipped:o}}function oc(e,t){let n=e==="decision"?t.decisionText:e==="discovery"?t.discoveryText:t.validationText,s=e==="decision"?t.decision:e==="discovery"?t.discovery:t.validation;return n?.trim()||s?.trim()||void 0}function rc(e){return e.find(t=>t.status==="in_progress")??e.find(t=>t.status==="pending")}function ic(e){return e.filter(t=>t.status==="blocked").map(t=>({id:t.id,order:t.order,title:t.title,blocked_reason:t.blocked_reason}))}function L(e,t="brief"){let n=(e.plan_steps??[]).slice().sort((i,a)=>i.order-a.order),s=tc(n),o=rc(n),r={id:e.id,title:e.title,status:e.status,mode:e.plan_mode??Cn,scope:e.plan_scope,harness:e.plan_harness,parent:e.parent,resume_context:e.plan_resume_context,steps_summary:s,current_step:o?{id:o.id,order:o.order,title:o.title,status:o.status}:void 0,blocked_steps:ic(n),linked_items:(e.dependencies??[]).map(i=>({id:i.id,kind:i.kind}))};return(t==="standard"||t==="deep")&&(r.steps=n),t==="deep"&&(r.decisions=e.plan_decisions??[],r.discoveries=e.plan_discoveries??[],r.validation=e.plan_validation??[]),r}function N(e,t){let n=[];return t.steps_summary.total===0&&n.push(`pm plan add-step ${e} --step-title "First step"`),t.current_step&&n.push(`pm plan update-step ${e} ${t.current_step.id} --step-status in_progress`,`pm plan complete-step ${e} ${t.current_step.id} --step-evidence "..."`),t.steps_summary.blocked>0&&n.push(`pm plan show ${e} --depth standard`),(t.mode==="draft"||t.mode==="research")&&n.push(`pm plan approve ${e} --message "ready to execute"`),t.steps_summary.completed===t.steps_summary.total&&t.steps_summary.total>0&&n.push(`pm close ${e} "plan complete"`),n}function ki(e){if((e.type??"").trim().toLowerCase()!=="plan")throw new u(`Item ${e.id} is type ${e.type}; pm plan commands require type=Plan. Use pm plan create or pm create --type Plan first.`,_.USAGE,{code:"wrong_item_type",required:"Use pm plan commands only with items whose type is Plan.",why:"Plan commands read and mutate Plan-specific step, decision, discovery, and validation fields.",examples:[`pm get ${e.id} --depth brief`,'pm plan create --title "Execution plan" --scope "<goal>"']})}async function ac(e){let t=F(process.cwd(),e.path);if(!await G(U(t)))throw new u(`Tracker is not initialized at ${t}. Run pm init first.`,_.NOT_FOUND);let n=await D(t);return{pmRoot:t,settings:n}}async function Si(e,t){let n=ee(e.settings,q()),s=await qt(e.pmRoot,t,e.settings.id_prefix,e.settings.item_format,n.type_to_folder);if(!s)throw new u(`Plan ${t} not found`,_.NOT_FOUND);let o=await zt(s,{schema:e.settings.schema});return ki(o.document.metadata),{document:o.document,itemId:s.id}}function cc(e){let t=[];e.parent&&t.push(`id=${e.parent.trim()},kind=parent`);for(let n of j(e.related))t.push(`id=${n},kind=related`);for(let n of j(e.blocks))t.push(`id=${n},kind=blocks`);for(let n of j(e.blockedBy))t.push(`id=${n},kind=blocked_by`);return t.length>0?t:void 0}function mc(e){let t=e.validationText?.trim(),n=e.validationCommand?.trim(),s=e.validationExpected?.trim();if(!(!t&&!n&&!s))return{text:t||n||"Validation check",command:n||void 0,expected:s||void 0}}function dc(e){return!!e.stepBody?.trim()||!!e.stepOwner?.trim()||!!e.stepStatus?.trim()||!!e.stepEvidence?.trim()||!!e.stepBlockedReason?.trim()||!!e.stepReplacement?.trim()||j(e.dependsOn).length>0||j(e.link).length>0}function lc(e){let t=e.stepTitle?.trim()||void 0,n=bi(e.step),s=e.template?.trim()?Ja(e.template):[];return{repeatedStepTitles:n,stepTitleFlag:t,stepTitles:[...t?[t]:[],...n,...s.map(o=>o.title)],templateSteps:s}}function pc(e,t){if((e.stepTitleFlag||e.repeatedStepTitles.length>0)&&e.templateSteps.length>0)throw new u("pm plan create --template cannot be combined with --step-title or --step; choose one step seeding source",_.USAGE,{code:"ambiguous_option_combination",examples:[`pm plan create --title "Fix login crash" --template ${Rn[0]}`,'pm plan create --title "Custom plan" --step "Read the code" --step "Write the fix"']});if(e.stepTitles.length>1&&t)throw new u("pm plan create per-step options apply to a single initial step; with multiple --step values create the plan first, then refine steps individually",_.USAGE,{code:"ambiguous_option_combination",examples:['pm plan create --title "Execution plan" --step "Read the code" --step "Write the fix"','pm plan update-step <plan-id> plan-step-001 --step-body "Inspect retry path"']})}function uc(e,t){let n=Tn(e.stepStatus,"pending"),s=Ln(e,"depends_on"),o=P(e.file).map($n),r=P(e.test).map(Fn),i=P(e.doc).map(Pn),a=k();return{id:"plan-step-001",order:1,title:t,body:e.stepBody?.trim()||void 0,status:n,owner:e.stepOwner?.trim()||void 0,evidence:e.stepEvidence?.trim()||void 0,blocked_reason:n==="blocked"?e.stepBlockedReason?.trim()||"":void 0,linked_items:s.length>0?s:void 0,files:o.length>0?o:void 0,tests:r.length>0?r:void 0,docs:i.length>0?i:void 0,created_at:a,updated_at:a,completed_at:n==="completed"?a:void 0}}function fc(e){let t=lc(e),n=dc(e);if(pc(t,n),t.stepTitles.length===0)return{steps:[],hasPerStepDetailOptions:n};if(t.stepTitles.length===1)return{steps:[uc(e,t.stepTitles[0])],hasPerStepDetailOptions:n};let s=k();return{steps:t.stepTitles.map((o,r)=>({id:`${yi}${String(r+1).padStart(3,"0")}`,order:r+1,title:o,body:t.templateSteps[r]?.body,status:"pending",created_at:s,updated_at:s})),hasPerStepDetailOptions:n}}async function _c(e,t,n){let s=e.title?.trim();if(!s)throw new u("pm plan create requires --title",_.USAGE,{code:"missing_required_option",examples:['pm plan create --title "Refactor lock retry" --scope pm-a1b2']});let o=wi(e.mode,Cn),r=Xa(e.harness),i=e.fromSearch?.trim(),a=mc(e),{steps:c,hasPerStepDetailOptions:d}=fc(e);if(c.length===0&&d)throw new u("pm plan create step options require --step-title (or a single --step)",_.USAGE,{code:"missing_required_option",examples:['pm plan create --title "Execution plan" --step-title "Read the code"']});let m=e.description?.trim()??e.scope?.trim()??s,p=e.claim?z(e.author,n.settings.author_default):e.assignee?.trim()||void 0,f={...e,title:s,description:m,type:"Plan",template:void 0,file:P(e.file),test:P(e.test),doc:P(e.doc),field:P(e.field),assignee:z(e.author,n.settings.author_default),blockedBy:void 0,dep:cc(e),message:e.message??(i?`plan create (search: ${i})`:"plan create")},g=await Ae(f,t),w=await Ht({pmRoot:n.pmRoot,settings:n.settings,id:g.item.id,op:"plan_create_metadata",author:z(e.author,n.settings.author_default),message:"seed plan metadata",mutate(v){let h=["plan_mode"];v.metadata.plan_mode=o,r&&(v.metadata.plan_harness=r,h.push("plan_harness"));let A=e.scope?.trim();A&&(v.metadata.plan_scope=A,h.push("plan_scope"));let R=e.resumeContext?.trim();return R&&(v.metadata.plan_resume_context=R,h.push("plan_resume_context")),v.metadata.plan_steps=c,h.push("plan_steps"),a&&(v.metadata.plan_validation=[...v.metadata.plan_validation??[],a],h.push("plan_validation")),p&&(v.metadata.assignee=p,h.push("assignee")),{changedFields:h}}}),b=L(w.item,"brief");return{action:"create",plan:b,step:c[0],next_actions:N(g.item.id,b),warnings:[...g.warnings],generated_at:k()}}async function hc(e,t,n){let s=Za(t.depth),o=Qa(t.fields),{document:r,itemId:i}=await Si(n,e),a=L(r.metadata,o===null?s:"deep");return{action:"show",plan:o===null?a:ec(a,o),next_actions:N(i,a),warnings:[],generated_at:k()}}function gc(e,t){let n=new Map(Object.entries(t).filter(([s])=>s.startsWith("plan_")).map(([s,o])=>[s,JSON.stringify(o)]));return[...new Set([...e.keys(),...n.keys()])].filter(s=>e.get(s)!==n.get(s))}async function B(e){let t=z(e.options.author,e.ctx.settings.author_default),n,s=await Ht({pmRoot:e.ctx.pmRoot,settings:e.ctx.settings,id:e.id,op:e.op,author:t,message:e.options.message??e.message,force:e.options.force,mutate(o){ki(o.metadata);let r=re(e.ctx.settings.schema);if(Mt(o.metadata.status,r)||oo(o.metadata.plan_mode))throw new u(`Plan ${o.metadata.id} is terminal (status=${o.metadata.status}, plan_mode=${o.metadata.plan_mode??"unset"}) and cannot be mutated.`,_.CONFLICT,{code:"terminal_plan_mutation",required:"Create or reopen a non-terminal Plan before changing its execution context or steps.",why:"Terminal Plan history is immutable execution evidence."});let i=(o.metadata.plan_steps??[]).slice(),a=new Map(Object.entries(o.metadata).filter(([p])=>p.startsWith("plan_")).map(([p,f])=>[p,JSON.stringify(f)])),c=e.mutator(i,o);n=c.resultStep;let d=i.slice().sort((p,f)=>p.order-f.order).map((p,f)=>({...p,order:f+1}));o.metadata.plan_steps=d;let m=gc(a,o.metadata);return m.length===0&&c.changedSteps.length===0?{changedFields:[]}:{changedFields:m.length>0?m:["plan_steps"]}}});return{document:{metadata:s.item,body:s.body},resultStep:n,itemId:s.item.id}}async function yc(e,t,n){let s=t.stepTitle?.trim();if(!s)throw new u("pm plan add-step requires --step-title",_.USAGE);let o=Tn(t.stepStatus,"pending"),r=t.allowMultipleActive===!0,{document:i,resultStep:a,itemId:c}=await B({id:e,options:t,ctx:n,op:"plan_add_step",message:`plan add-step "${s}"`,mutator(m){let p=m.length+1;xi(m,void 0,o,r);let f=bc(m,t,{order:p,title:s,status:o});return m.push(f),{changedSteps:[f.id],resultStep:f}}}),d=L(i.metadata,"standard");return{action:"add-step",plan:d,step:a,next_actions:N(c,d),warnings:[],generated_at:k()}}function xi(e,t,n,s){if(n!=="in_progress"||s)return;let o=e.find(r=>r.id!==t&&r.status==="in_progress");if(o)throw new u(`Plan already has step ${o.id} in_progress. Pass --allow-multiple-active or update that step first.`,_.CONFLICT)}function bc(e,t,n){let s=Ln(t,"depends_on"),o=P(t.file).map($n),r=P(t.test).map(Fn),i=P(t.doc).map(Pn),a=k();return{id:nc(e),order:n.order,title:n.title,body:t.stepBody?.trim()||void 0,status:n.status,owner:t.stepOwner?.trim()||void 0,evidence:t.stepEvidence?.trim()||void 0,blocked_reason:n.status==="blocked"?t.stepBlockedReason?.trim()||"":void 0,linked_items:s.length>0?s:void 0,files:o.length>0?o:void 0,tests:r.length>0?r:void 0,docs:i.length>0?i:void 0,created_at:a,updated_at:a,completed_at:n.status==="completed"?a:void 0}}function Ln(e,t){let n=j(e.dependsOn).map(m=>({id:m,kind:t})),s=j(e.related).map(m=>({id:m,kind:"related"})),o=j(e.blocks).map(m=>({id:m,kind:"blocks"})),r=j(e.blockedBy).map(m=>({id:m,kind:"blocked_by"})),i=j(e.link),a=vi(e.linkKind,t),c=e.linkNote?.trim(),d=i.map(m=>{let p={id:m,kind:a};return c&&(p.note=c),p});return[...n,...s,...o,...r,...d]}async function En(e,t,n,s){let{document:o,resultStep:r,itemId:i}=await B({id:e,options:t,ctx:n,op:s.op,message:t.message??`${s.op} ${s.stepRef}`,mutator(c,d){let m=_e(c,s.stepRef),p=k(),f=s.finalStatus??Tn(t.stepStatus,m.status),g=t.allowMultipleActive===!0||s.allowMultipleActive===!0;return xi(c,m.status==="in_progress"?m.id:void 0,f,g),wc(m,t,f,p),d.metadata.updated_at=p,{changedSteps:[m.id],resultStep:m}}}),a=L(o.metadata,"standard");return{action:s.op==="plan_complete_step"?"complete-step":s.op==="plan_block_step"?"block-step":"update-step",plan:a,step:r,next_actions:N(i,a),warnings:[],generated_at:k()}}function wc(e,t,n,s){vc(e,t,n),kc(e,t),e.status=n,e.updated_at=s,Sc(e,n,s)}function vc(e,t,n){if(!(n!=="blocked"||t.stepBlockedReason?.trim()||e.blocked_reason))throw new u("Blocking a step requires --step-blocked-reason or an already-recorded blocked_reason.",_.USAGE)}function kc(e,t){let n=t.stepTitle?.trim();n&&(e.title=n),t.stepBody!==void 0&&(e.body=t.stepBody.trim()||void 0),t.stepOwner!==void 0&&(e.owner=t.stepOwner.trim()||void 0),t.stepEvidence!==void 0&&(e.evidence=t.stepEvidence.trim()||void 0),t.stepBlockedReason!==void 0&&(e.blocked_reason=t.stepBlockedReason.trim()||void 0),t.stepReplacement!==void 0&&(e.superseded_by=t.stepReplacement.trim()||void 0);let s=P(t.file).map($n),o=P(t.test).map(Fn),r=P(t.doc).map(Pn);s.length>0&&(e.files=An(e.files,s)),o.length>0&&(e.tests=An(e.tests,o)),r.length>0&&(e.docs=An(e.docs,r))}function An(e,t){let n=[...e??[]],s=new Set(n.map(o=>JSON.stringify(o)));for(let o of t){let r=JSON.stringify(o);s.has(r)||(s.add(r),n.push(o))}return n}function Sc(e,t,n){if(t==="completed"&&!e.completed_at){e.completed_at=n;return}t!=="completed"&&(e.completed_at=void 0)}async function xc(e,t,n,s,o){let{document:r,itemId:i}=await B({id:e,options:t,ctx:n,op:"plan_reorder_step",message:t.message??`plan reorder-step ${s} -> ${o}`,mutator(c){let d=_e(c,s),m=c.filter(f=>f.id!==d.id),p=Math.max(1,Math.min(o,m.length+1));return m.splice(p-1,0,d),m.forEach((f,g)=>{f.order=g+1,f.updated_at=k()}),c.length=0,c.push(...m),{changedSteps:[d.id],resultStep:d}}}),a=L(r.metadata,"standard");return{action:"reorder-step",plan:a,next_actions:N(i,a),warnings:[],generated_at:k()}}async function Ec(e,t,n,s){let{document:o,itemId:r}=await B({id:e,options:t,ctx:n,op:"plan_remove_step",message:t.message??`plan remove-step ${s}`,mutator(a){let c=_e(a,s),d=a.filter(m=>m.id!==c.id);return d.forEach((m,p)=>{m.order=p+1}),a.length=0,a.push(...d),{changedSteps:[c.id]}}}),i=L(o.metadata,"standard");return{action:"remove-step",plan:i,next_actions:N(r,i),warnings:[],generated_at:k()}}async function Ac(e,t,n,s){let o=Ln(t,vi(t.linkKind,"related"));if(o.length===0)throw new u("pm plan link requires at least one --link/--related/--blocks/--blocked-by/--depends-on id",_.USAGE);let r=t.promoteToItemDep===!0,{document:i,itemId:a,resultStep:c}=await B({id:e,options:t,ctx:n,op:"plan_link_step",message:t.message??`plan link ${s}`,mutator(m,p){let f=_e(m,s),g=f.linked_items??[],w=v=>`${v.kind}:${v.id}`,b=new Set(g.map(w));for(let v of o){let h=w(v);b.has(h)||(g.push(v),b.add(h))}if(f.linked_items=g,f.updated_at=k(),r){let v=p.metadata.dependencies??[],h=R=>`${R.kind}:${R.id}`,A=new Set(v.map(h));for(let R of o){let H=R.kind==="depends_on"?"blocked_by":R.kind,V={id:R.id,kind:H,created_at:k(),author:z(t.author,n.settings.author_default)};A.has(h(V))||(v.push(V),A.add(h(V)))}p.metadata.dependencies=v}return{changedSteps:[f.id],resultStep:f}}}),d=L(i.metadata,"standard");return{action:"link",plan:d,step:c,next_actions:N(a,d),warnings:[],generated_at:k()}}async function Ic(e,t,n,s){let o=j(t.link);if(o.length===0)throw new u("pm plan unlink requires --link <id> to remove",_.USAGE);let{document:r,itemId:i,resultStep:a}=await B({id:e,options:t,ctx:n,op:"plan_unlink_step",message:t.message??`plan unlink ${s}`,mutator(d){let m=_e(d,s),p=(m.linked_items??[]).filter(f=>!o.includes(f.id));return m.linked_items=p.length>0?p:void 0,m.updated_at=k(),{changedSteps:[m.id],resultStep:m}}}),c=L(r.metadata,"standard");return{action:"unlink",plan:c,step:a,next_actions:N(i,c),warnings:[],generated_at:k()}}async function In(e,t,n,s){let o=oc(s,t);if(!o){let d=`--${s}-text`,m=`--${s}`;throw new u(`pm plan ${s} requires ${d}`,_.USAGE,{code:"missing_required_option",examples:[`pm plan ${s} <plan-id> ${d} "..."`,`pm plan ${s} <plan-id> ${m} "..."`],recovery:{suggested_retry:`pm plan ${s} <plan-id> ${d} <value>`}})}let r=z(t.author,n.settings.author_default),{document:i,itemId:a}=await B({id:e,options:t,ctx:n,op:`plan_append_${s}`,message:t.message??`plan ${s} append`,mutator(d,m){let p=k();if(s==="decision"){let g=m.metadata.plan_decisions??[];return g.push({ts:p,author:r,decision:o,rationale:t.decisionRationale?.trim()||void 0,evidence:t.decisionEvidence?.trim()||void 0}),m.metadata.plan_decisions=g,{changedSteps:[]}}if(s==="discovery"){let g=m.metadata.plan_discoveries??[];return g.push({ts:p,author:r,text:o}),m.metadata.plan_discoveries=g,{changedSteps:[]}}let f=m.metadata.plan_validation??[];return f.push({text:o,command:t.validationCommand?.trim()||void 0,expected:t.validationExpected?.trim()||void 0}),m.metadata.plan_validation=f,{changedSteps:[]}}}),c=L(i.metadata,"deep");return{action:s,plan:c,next_actions:N(a,c),warnings:[],generated_at:k()}}async function Rc(e,t,n){let s=t.resumeContext?.trim();if(!s)throw new u("pm plan resume requires --resume-context <text>",_.USAGE);let{document:o,itemId:r}=await B({id:e,options:t,ctx:n,op:"plan_resume",message:t.message??"plan resume context update",mutator(a,c){c.metadata.plan_resume_context=s;let d=t.scope?.trim();return d&&(c.metadata.plan_scope=d),{changedSteps:[]}}}),i=L(o.metadata,"brief");return{action:"resume",plan:i,next_actions:N(r,i),warnings:[],generated_at:k()}}async function Cc(e,t,n){let s=wi(t.mode??"approved","approved"),{document:o,itemId:r}=await B({id:e,options:t,ctx:n,op:"plan_approve",message:t.message??`plan approve mode=${s}`,mutator(a,c){c.metadata.plan_mode=s;let d=t.scope?.trim();return d&&(c.metadata.plan_scope=d),{changedSteps:[]}}}),i=L(o.metadata,"brief");return{action:"approve",plan:i,next_actions:N(r,i),warnings:[],generated_at:k()}}function Ei(e){return e.map(t=>`plan_materialize_skipped:${t.from_step}:${t.reason}${t.existing_id?`:${t.existing_id}`:""}`)}function Tc(e,t){let n=L(e.document.metadata,"standard");return{action:"materialize",plan:n,materialized:[],materialize_skipped:t,next_actions:N(e.itemId,n),warnings:Ei(t),generated_at:k()}}function Oc(e,t,n){let s=[`id=${e},kind=parent`,`id=${t},kind=discovered_from`];for(let o of n.linked_items??[]){let r=o.kind==="blocked_by"||o.kind==="blocks"||o.kind==="related"||o.kind==="discovered_from"?o.kind:"related";s.push(`id=${o.id},kind=${r}`)}return s}async function $c(e){let t=[],n={},s=new Set(["title","description","type","parent","tags","author","message","dep"]);for(let o of P(e.options.field)){let r=o.indexOf("=");if(r<=0)throw new u(`Invalid --field entry "${o}"; expected name=value`,_.USAGE);let i=o.slice(0,r).trim(),a=o.slice(r+1).trim();if(i.length===0)throw new u(`Invalid --field entry "${o}"; expected name=value`,_.USAGE);let c=i.trim().replaceAll(/([a-z0-9])([A-Z])/g,"$1 $2").replaceAll(/[^A-Za-z0-9]+/g," ").split(/\s+/).filter(Boolean).map(f=>f.toLowerCase());if(c.length===0)throw new u(`Invalid --field entry "${o}"; expected name=value`,_.USAGE);let[d,...m]=c,p=`${d}${m.map(f=>`${f.slice(0,1).toUpperCase()}${f.slice(1)}`).join("")}`;if(s.has(p))throw new u(`Invalid --field entry "${o}"; "${p}" is reserved by materialize and cannot be overridden`,_.USAGE);n[p]=a}for(let o of e.targets){let r=await Ae({...n,title:o.title,description:o.body?.trim()||o.title,type:e.resolvedTypeName,parent:e.parent,tags:e.tags,author:e.options.author,message:e.options.message??`materialized from plan ${e.planItemId} step ${o.id}`,dep:Oc(e.parent,e.planItemId,o)},{path:e.pmRoot});t.push({id:r.item.id,title:r.item.title,type:e.resolvedTypeName,parent:r.item.parent,tags:r.item.tags??[],from_step:o.id})}return t}function Fc(e,t,n){for(let s of t){let o=n.find(a=>a.from_step===s.id);if(!o)continue;let r=e.find(a=>a.id===s.id);if(!r)continue;let i=r.linked_items??[];i.push({id:o.id,kind:"implements",note:`materialized as ${o.type}`}),r.linked_items=i,r.updated_at=k()}}async function Pc(e,t,n){let s=j(t.steps);if(s.length===0)throw new u("pm plan materialize requires --steps <ids|orders|all>",_.USAGE);let o=t.materializeType?.trim()||"Task",r=ee(n.settings,q()),i=bs(o,r);if(!i)throw new u(`Invalid --materialize-type "${o}"`,_.USAGE);let a=t.materializeParent?.trim()||e,c=t.materializeTags,d=await Si(n,e),m=(d.document.metadata.plan_steps??[]).slice(),{targets:p,skipped:f}=sc(m,s);if(p.length===0){if(f.length>0)return Tc(d,f);throw new u("No matching plan steps found for --steps",_.NOT_FOUND)}let g=await $c({targets:p,parent:a,planItemId:d.itemId,resolvedTypeName:i,tags:c,options:t,pmRoot:n.pmRoot}),{document:w,itemId:b}=await B({id:e,options:t,ctx:n,op:"plan_materialize",message:t.message??`plan materialize ${s.join(",")}`,mutator(h){return Fc(h,p,g),{changedSteps:p.map(A=>A.id)}}}),v=L(w.metadata,"standard");return{action:"materialize",plan:v,materialized:g,...f.length>0?{materialize_skipped:f}:{},next_actions:N(b,v),warnings:Ei(f),generated_at:k()}}function Lc(e){if(e.subcommand==="create")return e;let t=bi(e.options.step);if(t.length>1)throw new u(`pm plan ${e.subcommand} accepts a single --step/--step-title value (repeated --step seeds ordered steps only on pm plan create)`,_.USAGE);return t.length===1&&!e.options.stepTitle?.trim()?{...e,options:{...e.options,stepTitle:t[0]}}:e}function X(e,t){if(!e.id)throw new u(`pm plan ${t} requires a plan id`,_.USAGE);return e.id}function ce(e,t){let n=X(e,t);if(!e.stepRef)throw new u(`pm plan ${t} requires <plan-id> <step>`,_.USAGE);return{id:n,stepRef:e.stepRef}}function Nc(e){let t=ce(e,"reorder-step");if(e.reorderTo===void 0)throw new u("pm plan reorder-step requires <plan-id> <step> <new-order>",_.USAGE);return{...t,reorderTo:e.reorderTo}}var Mc={create:(e,t)=>_c(e.options,e.global,t),show:(e,t)=>hc(X(e,"show"),e.options,t),"add-step":(e,t)=>yc(X(e,"add-step"),e.options,t),"update-step":(e,t)=>{let n=ce(e,"update-step");return En(n.id,e.options,t,{stepRef:n.stepRef,op:"plan_update_step"})},"complete-step":(e,t)=>{let n=ce(e,"complete-step");return En(n.id,e.options,t,{stepRef:n.stepRef,finalStatus:"completed",op:"plan_complete_step"})},"block-step":(e,t)=>{let n=ce(e,"block-step");return En(n.id,e.options,t,{stepRef:n.stepRef,finalStatus:"blocked",op:"plan_block_step"})},"reorder-step":(e,t)=>{let n=Nc(e);return xc(n.id,e.options,t,n.stepRef,n.reorderTo)},"remove-step":(e,t)=>{let n=ce(e,"remove-step");return Ec(n.id,e.options,t,n.stepRef)},link:(e,t)=>{let n=ce(e,"link");return Ac(n.id,e.options,t,n.stepRef)},unlink:(e,t)=>{let n=ce(e,"unlink");return Ic(n.id,e.options,t,n.stepRef)},decision:(e,t)=>In(X(e,"decision"),e.options,t,"decision"),discovery:(e,t)=>In(X(e,"discovery"),e.options,t,"discovery"),validation:(e,t)=>In(X(e,"validation"),e.options,t,"validation"),resume:(e,t)=>Rc(X(e,"resume"),e.options,t),approve:(e,t)=>Cc(X(e,"approve"),e.options,t),materialize:(e,t)=>Pc(X(e,"materialize"),e.options,t)};function Dc(e){let t=Mc[e];if(!t)throw new u(`Unknown pm plan subcommand "${e}"`,_.USAGE);return t}async function Ai(e){let t=await ac(e.global),n=Lc(e);return Dc(n.subcommand)(n,t)}import{readFile as Jc,writeFile as Kc}from"node:fs/promises";import Xc from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="582576df-8dbe-5f93-890b-5d872669dfe8")}catch{}})();function Nn(e,t){let n=Ue(e);if(n)throw new u(`History merge input (${t}) contains unresolved conflict markers at line ${n.line}. Merge drivers must receive clean per-side versions.`,_.GENERIC_FAILURE);let s=[];for(let[o,r]of e.split(/\r?\n/).entries()){let i=r.trim();if(i)try{let a=JSON.parse(i);if(typeof a!="object"||a===null||Array.isArray(a))throw new TypeError("history entry must be an object");s.push(a)}catch{throw new u(`History merge input (${t}) contains invalid JSON at line ${o+1}.`,_.GENERIC_FAILURE)}}return s}function ne(e){return C({ts:e.ts,author:e.author,op:e.op,patch:e.patch,message:e.message??null})}function jc(e,t){let n=Math.min(e.length,t.length),s=0;for(;s<n&&ne(e[s])===ne(t[s]);)s+=1;return s}function Ii(e,t,n){Nn(e,"base");let s=Nn(t,"ours"),o=Nn(n,"theirs"),r=jc(s,o);if(r===s.length&&r===o.length)return{merged:xe(s),strategy:"identical",common_entries:r,entries_from_ours:0,entries_from_theirs:0,entries_total:s.length,reanchored:!1};if(r===o.length)return{merged:xe(s),strategy:"fast_forward_ours",common_entries:r,entries_from_ours:s.length-r,entries_from_theirs:0,entries_total:s.length,reanchored:!1};if(r===s.length)return{merged:xe(o),strategy:"fast_forward_theirs",common_entries:r,entries_from_ours:0,entries_from_theirs:o.length-r,entries_total:o.length,reanchored:!1};let i=s.slice(r),a=new Set(i.map(ne)),c=o.slice(r).filter(p=>!a.has(ne(p))),d=[...i,...c].sort((p,f)=>{let g=De(p.ts,f.ts);if(g!==0)return g;let w=a.has(ne(p)),b=a.has(ne(f));return w!==b?Number(b)-Number(w):ne(p).localeCompare(ne(f))}),m=qs([...s.slice(0,r),...d]);return{merged:xe(m.entries),strategy:"union_reanchor",common_entries:r,entries_from_ours:i.length,entries_from_theirs:c.length,entries_total:m.entries.length,reanchored:!0}}function Mn(e,t){let n=Ue(e);if(n)throw new u(`Relationship merge input (${t}) contains unresolved conflict markers at line ${n.line}. Merge drivers must receive clean per-side versions.`,_.GENERIC_FAILURE);let s=[];for(let[o,r]of e.split(/\r?\n/).entries()){let i=r.trim();if(!i)continue;let a;try{a=JSON.parse(i)}catch{throw new u(`Relationship merge input (${t}) contains invalid JSON at line ${o+1}.`,_.GENERIC_FAILURE)}if(typeof a!="object"||a===null||Array.isArray(a)||typeof a.eventId!="string"||typeof a.sequence!="number")throw new u(`Relationship merge input (${t}) line ${o+1} is not a relationship event (eventId + sequence required).`,_.GENERIC_FAILURE);s.push(a)}return s}function tt(e){return e.length===0?"":`${e.map(t=>JSON.stringify(t)).join(`
8
- `)}
9
- `}function Gc(e){return e.map((t,n)=>({...t,sequence:n+1}))}function Ri(e,t,n){Mn(e,"base");let s=Mn(t,"ours"),o=Mn(n,"theirs"),r=Math.min(s.length,o.length),i=0;for(;i<r&&s[i].eventId===o[i].eventId;)i+=1;if(i===s.length&&i===o.length)return{merged:tt(s),strategy:"identical",common_entries:i,entries_from_ours:0,entries_from_theirs:0,entries_total:s.length,reanchored:!1};if(i===o.length)return{merged:tt(s),strategy:"fast_forward_ours",common_entries:i,entries_from_ours:s.length-i,entries_from_theirs:0,entries_total:s.length,reanchored:!1};if(i===s.length)return{merged:tt(o),strategy:"fast_forward_theirs",common_entries:i,entries_from_ours:0,entries_from_theirs:o.length-i,entries_total:o.length,reanchored:!1};let a=s.slice(i),c=new Set(a.map(f=>f.eventId)),d=o.slice(i).filter(f=>!c.has(f.eventId)),m=[...a,...d].sort((f,g)=>{if(f.timestamp!==void 0&&g.timestamp!==void 0){let v=De(f.timestamp,g.timestamp);if(v!==0)return v}else{if(f.timestamp===void 0&&g.timestamp!==void 0)return 1;if(f.timestamp!==void 0)return-1}let w=c.has(f.eventId),b=c.has(g.eventId);return w!==b?Number(b)-Number(w):0}),p=Gc([...s.slice(0,i),...m]);return{merged:tt(p),strategy:"union_reanchor",common_entries:i,entries_from_ours:a.length,entries_from_theirs:d.length,entries_total:p.length,reanchored:!0}}var Uc=["tags","dependencies","comments","notes","learnings","files","tests","test_runs","docs","reminders","events"],qc=["updated_at"];function me(e,t){return C(e??null)===C(t??null)}function zc(e,t,n){let s=m=>Array.isArray(m)?m:[],o=new Set(s(e).map(m=>C(m))),r=s(t),i=new Set(r.map(m=>C(m))),a=s(n),c=new Set(a.map(m=>C(m))),d=r.filter(m=>{let p=C(m);return!o.has(p)||c.has(p)});for(let m of a){let p=C(m);!i.has(p)&&!o.has(p)&&d.push(m)}return d}function Hc(e,t){return De(String(e),String(t))>=0?e:t}function qn(e,t,n,s){return me(t,n)?{value:t,from_theirs:!1,conflict:!1}:me(e,t)?{value:n,from_theirs:!0,conflict:!1}:me(e,n)?{value:t,from_theirs:!1,conflict:!1}:{value:s==="theirs"?n:t,from_theirs:s==="theirs",conflict:!0}}function Dn(e){return{...e.metadata}}function jn(e,t,n){try{return Dt(qe(e,n),n)}catch(s){throw new u(`Item merge input (${t}) is not a readable item document: ${String(s)}`,_.GENERIC_FAILURE)}}function Vc(e,t,n,s){let o=new Set(Uc),r=new Set(qc),i=[...new Set([...Object.keys(t),...Object.keys(n)])].sort((c,d)=>c.localeCompare(d)),a={merged:{},conflictFields:[],fieldsFromTheirs:[],unionFields:[],conflictDecisions:[]};for(let c of i){let d=e[c],m=t[c],p=n[c];if(o.has(c)){let g=zc(d,m,p);a.merged[c]=g,me(g,m)||a.unionFields.push(c);continue}if(r.has(c)){a.merged[c]=Hc(m,p);continue}let f=qn(d,m,p,s);f.value!==void 0&&(a.merged[c]=f.value),f.conflict?(a.conflictFields.push(c),a.conflictDecisions.push({field:c,base:d,ours:m,theirs:p,retained:f.value,discarded:s==="theirs"?m:p})):f.from_theirs&&a.fieldsFromTheirs.push(c)}return a}function Ci(e,t,n,s={}){let o=s.preferred??"ours",r=e.trim().length>0,i=jn(t,"ours",s),a=jn(n,"theirs",s),c=r?jn(e,"base",s):i,d=r?Dn(c):{},m=Dn(i),p=Dn(a),{merged:f,conflictFields:g,fieldsFromTheirs:w,unionFields:b,conflictDecisions:v}=Vc(d,m,p,o),h=qn(r?c.body:"",i.body,a.body,o);return h.conflict?(g.push("body"),v.push({field:"body",base:r?c.body:"",ours:i.body,theirs:a.body,retained:h.value,discarded:o==="theirs"?i.body:a.body})):h.from_theirs&&w.push("body"),{merged:Se({metadata:f,body:h.value},s),conflict_fields:g,fields_from_theirs:w,union_fields:b,conflict_decisions:v,preferred:o}}function Gn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Un(e,t){let n=Ue(e);if(n)throw new u(`JSON merge input (${t}) contains unresolved conflict markers at line ${n.line}.`,_.GENERIC_FAILURE);if(e.trim().length!==0)try{return JSON.parse(e)}catch{throw new u(`JSON merge input (${t}) is not valid JSON.`,_.GENERIC_FAILURE)}}function Bc(e,t,n){if(!Array.isArray(e)||!Array.isArray(t)||!Array.isArray(n))return null;let s=d=>{let m=new Map;for(let p of d){let f=C(p);m.set(f,(m.get(f)??0)+1)}return m},o=s(e),r=s(t),i=s(n);for(let[d,m]of o)if((r.get(d)??0)<m||(i.get(d)??0)<m)return null;let a=new Map(r),c=[];for(let d of n){let m=C(d),p=a.get(m)??0;p>0?a.set(m,p-1):c.push(d)}return{merged:[...t,...c],acceptedTheirs:c.length>0}}function Wc(e,t,n,s,o,r,i){if(!Gn(t)||!Gn(n))return null;let a=Gn(e)?e:{},c={},d=[...new Set([...Object.keys(t),...Object.keys(n)])].sort((m,p)=>m.localeCompare(p));for(let m of d){let p=o.length>0?`${o}.${m}`:m,f=Yc(a,t,n,m,s,p,r,i);f!==void 0&&(c[m]=f)}return c}function Ti(e,t,n,s,o,r,i){if(me(t,n))return t;let a=Bc(e,t,n);if(a!==null)return a.acceptedTheirs&&i.push(o),a.merged;let c=Wc(e,t,n,s,o,r,i);if(c!==null)return c;let d=qn(e,t,n,s);return d.conflict?r.push(o):d.from_theirs&&i.push(o),d.value}function Yc(e,t,n,s,o,r,i,a){let c=Object.prototype.hasOwnProperty.call(t,s),d=Object.prototype.hasOwnProperty.call(n,s),m=Object.prototype.hasOwnProperty.call(e,s);if(c&&d)return Ti(e[s],t[s],n[s],o,r,i,a);if(c){if(m&&me(e[s],t[s])){a.push(r);return}return m?(i.push(r),o==="theirs"?void 0:t[s]):t[s]}if(!(m&&me(e[s],n[s])))return m?(i.push(r),o==="theirs"?n[s]:void 0):(a.push(r),n[s])}function Oi(e,t,n,s={}){let o=s.preferred??"ours",r=Un(e,"base"),i=Un(t,"ours"),a=Un(n,"theirs"),c=[],d=[],m=Ti(r,i,a,o,"",c,d);return{merged:`${JSON.stringify(m??null,null,2)}
10
- `,conflict_paths:c,paths_from_theirs:d,preferred: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]="182fee45-4de8-502d-8aec-84b5b8e4aecb")}catch{}})();var $i=["item","history","relationship","json"];function Zc(e){let t=e.trim().toLowerCase();if($i.includes(t))return t;throw new u(`Unknown merge artifact "${e}". Supported values: ${$i.join(", ")}.`,_.USAGE)}function Qc(e){if(e===void 0)return"ours";let t=e.trim().toLowerCase();if(t==="ours"||t==="theirs")return t;throw new u(`Unknown --prefer value "${e}". Supported values: ours, theirs.`,_.USAGE)}async function zn(e,t){try{return await Jc(e,"utf8")}catch{throw new u(`Cannot read merge ${t} file at ${e}.`,_.NOT_FOUND)}}async function em(e){let t=F(process.cwd(),e.path);return await G(U(t))?D(t):null}function tm(e,t){return e.endsWith(".md")?"json_markdown":e.endsWith(".toon")?"toon":t?.item_format??"toon"}async function Fi(e,t){let n=Zc(e.artifact),s=Qc(e.prefer),o=Xc.resolve(e.outputPath??e.oursPath),[r,i,a]=await Promise.all([zn(e.basePath,"base"),zn(e.oursPath,"ours"),zn(e.theirsPath,"theirs")]),c,d,m=[],p={};if(n==="history"){let g=Ii(r,i,a);c=g.merged,p.history={strategy:g.strategy,common_entries:g.common_entries,entries_from_ours:g.entries_from_ours,entries_from_theirs:g.entries_from_theirs,entries_total:g.entries_total,reanchored:g.reanchored}}else if(n==="relationship"){let g=Ri(r,i,a);c=g.merged,p.relationship={strategy:g.strategy,common_entries:g.common_entries,entries_from_ours:g.entries_from_ours,entries_from_theirs:g.entries_from_theirs,entries_total:g.entries_total,reanchored:g.reanchored}}else if(n==="item"){let g=await em(t),w=Ci(r,i,a,{format:tm(e.itemPath??o,g),schema:g?.schema,extensionFieldNames:Ge(q()),preferred:s});c=w.merged,m.push(...w.conflict_fields),p.item={fields_from_theirs:w.fields_from_theirs,union_fields:w.union_fields},e.itemPath!==void 0&&(d={cwd:process.cwd(),itemPath:e.itemPath,preferred:s,fieldsFromTheirs:w.fields_from_theirs,unionFields:w.union_fields,decisions:w.conflict_decisions})}else{let g=Oi(r,i,a,{preferred:s});c=g.merged,m.push(...g.conflict_paths),p.json={paths_from_theirs:g.paths_from_theirs}}if(await Kc(o,c,"utf8"),d!==void 0){let g=await br(d);g!==null&&(p.receipt=Re(g))}let f=[];if(m.length>0){let g=p.receipt===void 0?'Run "pm merge report" to inspect clone-local merge evidence.':`Run "pm merge report" and correlate receipt ${p.receipt.receipt_id} with item ${p.receipt.item_id}; clone-local discarded values are never copied into this result.`;f.push(`Both branches changed ${m.join(", ")}; the ${s} value was kept. ${g} Review the merged file, re-apply the losing change if needed, then "git add" it.`)}return n==="history"&&p.history?.reanchored&&f.push('The merged history chain was re-anchored. Run "pm validate --check-history-drift" and "pm history-repair --all" after the merge to reconcile item state with merged history.'),{ok:m.length===0,artifact:n,output_path:o,preferred:s,conflicts:m,...p,guidance:f,generated_at:k()}}(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]="b2f34565-7664-5612-815d-949b8b1d4f90")}catch{}})();async function Pi(e,t){let n=e.dryRun===!0,s=await wr(process.cwd()),o=s.reduce((b,v)=>((b[v.item_id]??=[]).push(v),b),{}),r=Object.fromEntries(Object.entries(o).map(([b,v])=>[b,{merge:{receipts:v.map(Re)}}])),i=await Xe({dryRun:n,author:e.author??t.author,message:e.message??"post-merge reconciliation of field-aware tracker history",force:e.force,auditOperation:"merge_reconcile",auditContextById:r},t),a=new Set(i.streams.map(b=>b.id)),c=Object.keys(o).filter(b=>!a.has(b));(await Promise.allSettled(c.map(b=>Ke(b,{dryRun:n,author:e.author??t.author,message:e.message??"record field-aware branch merge provenance",force:e.force,auditOperation:"merge_reconcile",auditContext:r[b],forceAuditEntry:!0},t)))).forEach((b,v)=>{let h=c[v];if(b.status==="fulfilled"){let A=b.value.changed?"repaired":"skipped_clean";i.streams.push({id:h,outcome:A,entries_rehashed:b.value.history.entries_rehashed,entries_patch_repaired:b.value.history.entries_patch_repaired,reconciled_with_item:b.value.history.reconciled_with_item,warnings:b.value.warnings}),i.totals[A]+=1}else i.streams.push({id:h,outcome:"failed",error:b.reason instanceof Error?b.reason.message:String(b.reason)}),i.totals.failed+=1});let m=0;!n&&i.totals.failed===0&&(await Promise.all(s.map(b=>vr(process.cwd(),b))),m=s.length);let p=await Je({checkHistoryDrift:!0,checkStorageIntegrity:!0},t),f=p.checks.every(b=>b.status==="ok"),g=i.totals.failed===0&&f,w=n?["Review repair.streams, then rerun pm merge reconcile without --dry-run to apply audited repairs.","No Git hook is installed automatically; invoke this command from an explicit post-merge hook only when your repository policy opts in."]:g?["Reconciliation is complete; commit changed history streams with the merge result.","Rerun pm merge reconcile --dry-run after future tracker-data merges as a non-mutating integrity check."]:["Reconciliation remains incomplete; inspect repair failures and non-green validation checks before retrying.","Do not commit repaired history streams as reconciled until pm merge reconcile returns ok=true."];return{ok:g,dry_run:n,repair:i,receipts:{pending_before:s.length,reconciled:m,summaries:s.map(Re)},validation:p,guidance:w,generated_at:p.generated_at}}(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]="bcda2578-3b01-5e64-9d53-cd32c0f927b8")}catch{}})();function l(e,t){let n=e[t];return typeof n=="string"&&n.trim().length>0?n:void 0}function x(e,t){let n=e[t];return typeof n=="string"?n.trim().length>0?n:void 0:typeof n=="number"&&Number.isFinite(n)?String(n):void 0}function Vn(e,t){let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):void 0}function $e(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function $(e,t){if(typeof e=="number"){if(!Number.isInteger(e))throw new u(`${t} must be a finite integer.`,_.USAGE);return e}if(typeof e=="string"&&e.trim().length>0){let n=Number(e);if(!Number.isInteger(n))throw new u(`${t} must be a finite integer.`,_.USAGE);return n}}function Ni(e,t){return typeof e.limit=="number"&&Number.isFinite(e.limit)?e.limit:typeof t.limit=="number"&&Number.isFinite(t.limit)?t.limit:l(e,"limit")??l(t,"limit")}function st(e){let t=l(e,"outputFormat");return{json:!0,quiet:!0,author:l(e,"author"),path:l(e,"path"),noExtensions:e.noExtensions===!0||e.no_extensions===!0,noPager:!0,outputInclude:l(e,"outputInclude"),outputLimit:x(e,"outputLimit"),outputBudget:x(e,"outputBudget"),outputSession:l(e,"outputSession"),outputFormat:t==="json"||t==="toon"?t:void 0}}var nm=new Set(["tags","blockedBy","blocked_by","skills","fields"]),sm=new Set(["comment","note","learning","reminder","event","dep","depRemove","dep_remove","file","doc","test","unset","addGlob","add_glob","migrate","envSet","env_set","envClear","env_clear"]),om=new Set(["files","files-discover","docs","test","test-all"]),rm=new Set(["claim","release","start-task","pause-task","close-task"]),im={list:["status","type","tag","priority","limit","offset"],search:["mode","status","type","tag","priority","limit"],create:["title","type","status","description","body","priority","tags","parent","createMode","create_mode","allowMissingParent","allowDuplicate"],update:["parent","allowMissingParent","completedAt"],copy:["allowDuplicate"],close:["duplicateOf","completedAt"],append:["body"]},am=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession"];function ot(e,t){let n={},s=t!==void 0&&om.has(t),o=t==="files"||t==="files-discover"||t==="docs";for(let[r,i]of Object.entries(e)){if(Array.isArray(i)&&nm.has(r)){n[r]=i.join(",");continue}if(r==="note"&&o){n[r]=i;continue}if(typeof i=="string"&&sm.has(r)){n[r]=[i];continue}if(typeof i=="string"&&s&&(r==="add"||r==="remove")){n[r]=[i];continue}n[r]=i}return n}function Bn(e,t){let n=ke(e.options),s={},o=c=>{n[c]!==void 0||e[c]===void 0||(s[c]=e[c])};for(let c of im[t??""]??[])o(c);for(let c of am)o(c);let r=ot({...s,...n},t),i=l(e,"author"),a=t!==void 0&&rm.has(t)?l(e,"assignee")??l(r,"assignee"):void 0;return i&&r.author===void 0?{...r,author:i}:a&&r.author===void 0?{...r,author:a}:r}function rt(e){if(e.addNote===void 0)return e;let t={...e};return t.note===void 0&&typeof t.addNote=="string"&&(t.note=t.addNote),delete t.addNote,t}function Wn(e){let t={...e};return t.discoveryNote!==void 0&&t.note===void 0&&typeof t.discoveryNote=="string"&&(t.note=t.discoveryNote),delete t.discover,delete t.discoveryNote,t}function se(e){let t=[],n=!0;for(let s of e.trim().toLowerCase()){if(s>="a"&&s<="z"||s>="0"&&s<="9"){t.push(s),n=!1;continue}n||(t.push("-"),n=!0)}return t.at(-1)==="-"&&t.pop(),t.join("")}function Yn(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function T(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function Jn(e,t){let n=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),s={};for(let[r,i]of Object.entries(e))n.has(r)||(s[r]=i);let o={...s,...t};return delete o.args,o}function W(e,t){return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:{...t}}}function Fe(e){return{type:x(e,"filterType"),tag:x(e,"filterTag"),priority:x(e,"filterPriority"),deadlineBefore:x(e,"filterDeadlineBefore"),deadlineAfter:x(e,"filterDeadlineAfter"),updatedAfter:x(e,"filterUpdatedAfter"),updatedBefore:x(e,"filterUpdatedBefore"),createdAfter:x(e,"filterCreatedAfter"),createdBefore:x(e,"filterCreatedBefore"),ids:Vn(e,"ids"),assignee:x(e,"filterAssignee"),assigneeFilter:x(e,"filterAssigneeFilter")??x(e,"filterAssignee_filter"),parent:x(e,"filterParent"),sprint:x(e,"filterSprint"),release:x(e,"filterRelease"),limit:x(e,"limit"),offset:x(e,"offset")}}function Hn(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return T(e)}function nt(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function Mi(e){let t=Hn(e.kind),n=Hn(e.exemptIsolate),s=Hn(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:nt(e.maxDepth),limit:nt(e.limit),after:l(e,"after"),direction:l(e,"direction"),maxPaths:nt(e.maxPaths),sample:nt(e.sample),...n===void 0?{}:{exemptIsolate:n},...s===void 0?{}:{exemptIsolateType:s},saveBaseline:e.saveBaseline===!0,rebuild:e.rebuild===!0,clear:e.clear===!0,summary:e.summary===!0,...e.full===!0?{full:!0}:{}}}function Kn(e){return{status:l(e,"filterStatus"),list:$e(e.list)?dn(e.list):Fe(e),reason:l(e,"reason"),resolution:l(e,"resolution"),expectedResult:l(e,"expectedResult")??l(e,"expected_result")??l(e,"expected"),actualResult:l(e,"actualResult")??l(e,"actual_result")??l(e,"actual"),validateClose:l(e,"validateClose")??l(e,"validate_close"),author:l(e,"author"),message:l(e,"message"),force:e.force===!0?!0:void 0,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:l(e,"rollback"),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}var cm=new Set(["filterStatus","filterType","filterTag","filterPriority","filterDeadlineBefore","filterDeadlineAfter","filterUpdatedAfter","filterUpdatedBefore","filterCreatedAfter","filterCreatedBefore","filterAssignee","filterAssigneeFilter","filterAssignee_filter","filterParent","filterSprint","filterRelease","ids","list","update","limit","offset","dryRun","dry_run","rollback","checkpoint","noCheckpoint","no_checkpoint"]);function Li(e){let t={};for(let[n,s]of Object.entries(e))cm.has(n)||(t[n]=s);return it(t)}function it(e){let t=ot(e,"update-many");for(let n of ao)for(let s of n.keys){let o=t[s];typeof o=="number"&&Number.isFinite(o)&&(t[s]=String(o))}return Or(t)}function Xn(e){if($e(e.list)||$e(e.update)){let t=$e(e.update)?e.update:Li(e);return{status:x(e,"filterStatus"),list:$e(e.list)?dn(e.list):Fe(e),update:it(t),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:l(e,"rollback"),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}return{status:x(e,"filterStatus"),list:Fe(e),update:Li(e),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:l(e,"rollback"),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f8cd69db-ec70-560f-a8c2-2d8d4be75459")}catch{}})();function Pe(e){return{...e.args,...e.options}}function Z(e,t){let n=l(e,t);if(n!==void 0)return n;throw new u(`Missing required parameter: ${t}`,_.USAGE)}function he(e){return typeof e=="string"?[e]:T(e)}function Di(e){return Rr(Pe(e),e.global)}function ji(e){let t=Pe(e);return Tr({cwd:l(t,"cwd"),pmRoot:l(t,"path"),since:l(t,"since"),type:he(t.type),author:he(t.author),item:he(t.item),limit:t.limit===void 0?void 0:$(t.limit,"limit"),full:t.full===!0,...t.provenance===void 0?{}:{provenance:t.provenance===!0},...t.provenanceSummary===void 0?{}:{provenanceSummary:t.provenanceSummary===!0},...t.harness===void 0?{}:{harness:he(t.harness)},...t.agentInstance===void 0?{}:{agentInstance:he(t.agentInstance)},...t.provenanceFilter===void 0?{}:{provenanceFilter:he(t.provenanceFilter)}})}function Gi(e){let t=Pe(e),n=Z(t,"subcommand");if(n==="install")return tr({dryRun:t.dryRun===!0},e.global);if(n==="reconcile")return Pi({dryRun:t.dryRun===!0,author:l(t,"author"),message:l(t,"message"),force:t.force===!0},e.global);if(n==="report")return kr({includeReconciled:t.includeReconciled===!0,cwd:l(t,"cwd")});if(n==="driver")return Fi({artifact:Z(t,"artifact"),basePath:Z(t,"basePath"),oursPath:Z(t,"oursPath"),theirsPath:Z(t,"theirsPath"),outputPath:l(t,"outputPath")??l(t,"output"),itemPath:l(t,"itemPath"),prefer:l(t,"prefer")},e.global);throw new u(`Unknown merge subcommand "${n}".`,_.USAGE,{code:"unknown_subcommand"})}function Ui(e){let t=Pe(e),n=Z(t,"subcommand");if(n!=="snapshot")throw new u(`Unknown workspace subcommand "${n}".`,_.USAGE,{code:"unknown_subcommand"});let s=l(t,"snapshotAction")??Z(t,"snapshot_action"),o=F(process.cwd(),e.global.path);if(s==="create")return Lr(o,{name:l(t,"name")});if(s==="list")return Mr(o);let r=Z(t,"target");if(s==="inspect")return Nr(o,r);if(s==="delete")return Gr(o,r);if(s==="restore")return t.dryRun===!0?Dr(o,r):jr(o,r,{force:t.force===!0,author:l(t,"author"),message:l(t,"message"),lockTtlSeconds:$(t.lockTtlSeconds,"lockTtlSeconds"),lockWaitMs:$(t.lockWaitMs,"lockWaitMs")});throw new u(`Unknown workspace snapshot action "${s}".`,_.USAGE,{code:"unknown_subcommand"})}function at(e){let t=Pe(e),n=Z(t,"title");return e.action==="meet"?$r(n,t,e.global):e.action==="event"?Fr(n,t,e.global):Pr(n,t,e.global)}(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]="f762b5e6-8224-531f-9dd1-f71dc18c3ddf")}catch{}})();function qi(e){let t=e.options.all===!0,n=e.id??l(e.options,"id");return Cr(n,t),t?Xe(e.options,e.global):Ke(n,e.options,e.global)}function zi(e){let t=e.options.ids,n=Array.isArray(t)?t.map(String).filter(d=>d.trim().length>0):typeof t=="string"?t.split(",").map(d=>d.trim()).filter(Boolean):void 0,s=$(e.options.allOver??e.options.all_over,"history-compact allOver"),o=$(e.options.minEntries??e.options.min_entries,"history-compact minEntries"),r=l(e.options,"scope"),i=[];e.options.closed===!0&&i.push("closed"),(e.options.allStreams===!0||e.options.all_streams===!0)&&i.push("all-streams"),(r==="closed"||r==="all-streams")&&i.push(r);let a=[...new Set(i)];if(a.length>1)throw new u("history-compact: closed and all-streams scopes are mutually exclusive.",_.USAGE);let c=a[0];return Br(e.id,{ids:n,allOver:s,scope:c}),e.id!==void 0?Vr(e.id,{before:l(e.options,"before"),dryRun:e.options.dryRun===!0||e.options.dry_run===!0,author:l(e.options,"author"),message:l(e.options,"message"),force:e.force},e.global):Wr({ids:n,scope:c,allOver:s,minEntries:o,dryRun:e.options.dryRun===!0||e.options.dry_run===!0,author:l(e.options,"author"),message:l(e.options,"message"),force:e.force},e.global)}(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]="dbabff08-1bb7-539b-b1c1-c10584aa0a67")}catch{}})();function Hi(e){return{storage:e.storage===!0,metadataCoverage:e.metadataCoverage===!0,fieldUtilization:e.fieldUtilization===!0,byAssignee:e.byAssignee===!0,byTag:e.byTag===!0,byPriority:e.byPriority===!0,tagPrefix:typeof e.tagPrefix=="string"?e.tagPrefix:void 0,measurements:e.measurements===!0,metric:l(e,"metric"),measurementLimit:typeof e.measurementLimit=="number"?e.measurementLimit:void 0,observe:T(e.observe),direction:typeof e.improvementDirection=="string"?e.improvementDirection:void 0,measurementSource:l(e,"measurementSource"),measurementItem:l(e,"measurementItem"),measurementRevision:l(e,"measurementRevision"),author:l(e,"author"),message:l(e,"message"),provenanceCoverage:e.provenanceCoverage===!0,fleetAttribution:e.fleetAttribution===!0,since:l(e,"since"),eventLimit:typeof e.eventLimit=="number"?e.eventLimit:void 0,minimumSample:typeof e.minimumSample=="number"?e.minimumSample:void 0}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2643d11d-befc-5a87-8bec-760951eec4d0")}catch{}})();var mm=new Set(["true","1","yes","on"]),dm=new Set(["false","0","no","off"]);function lm(e,t,n=[]){let s=[t,...n];for(let o of s){let r=e[o];if(typeof r=="string"&&r.trim().length>0)return r.trim()}}function pm(e,t,n=[]){let s=[t,...n];for(let o of s){let r=e[o];if(r!==void 0){if(typeof r=="boolean")return r;if(typeof r=="string"){let i=r.trim().toLowerCase();if(mm.has(i))return!0;if(dm.has(i))return!1}}}}function um(e,t,n=[]){for(let s of[t,...n]){let o=e[s],i=(typeof o=="string"?o.split(","):Array.isArray(o)?o.flatMap(a=>typeof a=="string"?a.split(","):[]):[]).map(a=>a.trim()).filter(a=>a.length>0);if(i.length>0)return i}return[]}(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]="c2567f6a-cd1c-56b5-a93d-41e92ed574bf")}catch{}})();function O(e){if(typeof e!="string")return;let t=e.trim();return t.length>0?t:void 0}function fm(e){if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e;if(typeof e=="string"&&e.trim().length>0){let t=Number(e);if(Number.isFinite(t)&&t>=0)return t}}function _m(e){if(typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<=4)return e;if(typeof e=="string"&&e.trim().length>0){let t=Number(e);if(Number.isInteger(t)&&t>=0&&t<=4)return t}return 2}function hm(e){if(Array.isArray(e)){let t=e.filter(n=>typeof n=="string").map(n=>n.trim().toLowerCase()).filter(n=>n.length>0);return Array.from(new Set(t)).sort((n,s)=>n.localeCompare(s))}return typeof e=="string"?Ut(e):[]}function gm(e){let t=O(e);if(t){let n=Nt(t);if(n)return n}return"open"}function Qn(e){if(typeof e=="number"&&Number.isInteger(e))return e;if(typeof e!="string"||e.trim().length===0)return;let t=Number(e);return Number.isInteger(t)?t:void 0}function Vi(e){if(typeof e=="boolean")return e;if(typeof e=="number")return e===1?!0:e===0?!1:void 0;if(typeof e!="string")return;let t=e.trim().toLowerCase();return t==="true"||t==="1"?!0:t==="false"||t==="0"?!1:void 0}function ge(e){if(!Array.isArray(e))return;let t=e.map(n=>O(n)).filter(n=>n!==void 0);return t.length>0?t:void 0}function Zn(e){return Yi(e,O)}function Bi(e){return Yi(e,Ki)}function ym(e,t){if(typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<=100)return e;let n=O(e)?.toLowerCase();if(!n)return;let s=n==="med"?"medium":n;if(t.some(r=>r===s))return s;let o=Number(s);return Number.isInteger(o)&&o>=0&&o<=100?o:void 0}function Wi(e,t){let n=O(e)?.toLowerCase();if(!n)return;let s=n==="med"?"medium":n;return t.includes(s)?s:void 0}function es(e){return O(e)?.toLowerCase()==="global"?"global":"project"}function bm(e,t){let n=ts(e,t.allowScalar===!0);if(!n)return;let s=n.map(o=>xm(o,t)).filter(o=>o!==void 0);return s.length>0?s:void 0}function wm(e,t={}){return Ji(e,t,(n,s)=>({path:n,scope:es(s?.scope),note:O(s?.note)}))}function vm(e,t={}){return Ji(e,t,(n,s)=>({path:n,scope:es(s?.scope),note:O(s?.note)}))}function km(e,t={}){let n=ts(e,t.allowScalar===!0);if(!n)return;let s=n.map(o=>Im(o,t)).filter(o=>o!==void 0);return s.length>0?s:void 0}function Sm(e,t){return z(e,t)}function mt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ts(e,t){return Array.isArray(e)?e:t?[e]:void 0}function ct(e,t){for(let n of t){let s=O(e[n]);if(s)return s}}function Yi(e,t){if(!mt(e))return;let n=Object.entries(e).map(([s,o])=>[s.trim(),t(o)]).filter(s=>s[0].length>0&&s[1]!==void 0);return n.length>0?Object.fromEntries(n):void 0}function xm(e,t){if(typeof e=="string")return Em(e,t);if(!mt(e))return;let n=ct(e,t.textKeys??["text"]);if(!n)return;let s=t.createdAtKey??"created_at",o=t.authorKey??"author";return{created_at:(t.toIsoString?t.toIsoString(e[s]):O(e[s]))??t.fallbackCreatedAt,author:O(e[o])??t.fallbackAuthor,text:n}}function Em(e,t){let n=O(e);return n?{created_at:t.fallbackCreatedAt,author:t.fallbackAuthor,text:n}:void 0}function Ji(e,t,n){let s=ts(e,t.allowScalar===!0);if(!s)return;let o=t.pathKeys??["path"],r=s.map(i=>Am(i,o,n)).filter(i=>i!==void 0);return r.length>0?r:void 0}function Am(e,t,n){if(typeof e=="string"){let o=O(e);return o?n(o):void 0}if(!mt(e))return;let s=ct(e,t);return s?n(s,e):void 0}function Im(e,t){if(typeof e=="string"){let o=O(e);return o?{command:o,scope:"project"}:void 0}if(!mt(e))return;let n=ct(e,t.commandKeys??["command"]),s=ct(e,t.pathKeys??["path"]);if(!(!n&&(t.requireCommand===!0||!s)))return{...n?{command:n}:{},...s?{path:s}:{},scope:es(e.scope),timeout_seconds:Rm(e.timeout_seconds,t),note:O(e.note),...t.includeExtendedAssertions===!0?Cm(e):{}}}function Rm(e,t){let n=t.integerTimeout===!0?Qn(e):Ki(e);if(n===void 0)return;let s=t.timeoutMinimum??0;return t.timeoutExclusiveMinimum===!0?n>s?n:void 0:n>=s?n:void 0}function Ki(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e!="string"||e.trim().length===0)return;let t=Number(e);return Number.isFinite(t)?t:void 0}function Cm(e){return{pm_context_mode:Wi(e.pm_context_mode,["schema","tracker","auto"]),env_set:Zn(e.env_set),env_clear:ge(e.env_clear),shared_host_safe:Vi(e.shared_host_safe),assert_stdout_contains:ge(e.assert_stdout_contains),assert_stdout_regex:ge(e.assert_stdout_regex),assert_stderr_contains:ge(e.assert_stderr_contains),assert_stderr_regex:ge(e.assert_stderr_regex),assert_stdout_min_lines:Qn(e.assert_stdout_min_lines),assert_json_field_equals:Zn(e.assert_json_field_equals),assert_json_field_gte:Bi(e.assert_json_field_gte)}}async function Tm(e){if(!await G(U(e)))throw new u(`Tracker is not initialized at ${e}. Run pm init first.`,_.NOT_FOUND)}function Xi(){return{metadata:{},body:""}}async function Om(e){let{pmRoot:t,id:n,itemPath:s,document:o,author:r,message:i,settings:a,conflictWarningPrefix:c}=e,d=xt(t,n),m=Xi();try{let p=await ie(t,n,a.locks.ttl_seconds,r,!1,a.governance.force_required_for_stale_lock,a.locks.wait_ms);try{await Q(s,Se(o,{format:"toon"}));try{let f=jt({nowIso:k(),author:r,op:"import",before:m,after:o,message:i});return await Gt(d,f),{committed:!0,writeWarnings:[...await oe({path:s,scope:"project",op:"import",item_id:o.metadata.id,item_type:o.metadata.type,before:m,after:o,changed_fields:["imported"]}),...await oe({path:d,scope:"project",op:"import:history",item_id:o.metadata.id,item_type:o.metadata.type,before:m,after:o,changed_fields:["imported"]})]}}catch(f){throw await gt(s),f}}finally{await p()}}catch(p){if(p instanceof u&&p.exitCode===_.CONFLICT)return{committed:!1,conflictWarning:`${c}:${n}`};throw p}}import{readFile as Fm}from"node:fs/promises";import Pm from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3911e4fb-a9b3-5732-8b45-c484a121dffb")}catch{}})();function $m(e){return e.trim().toLowerCase().replaceAll("_","-")}var ss=[{id:"quickstart",aliases:["start","getting-started","bootstrap"],title:"Quickstart",summary:"Initialize a tracker and run the shortest safe plan -> execute -> close loop.",intent:"Use this when a human or agent needs to start productive work quickly with minimal context load.",commands:["pm init","pm context --limit 10","pm list-open --limit 20",'pm create --create-mode progressive --title "..." --description "..." --type Task',"pm claim <ID>","pm update <ID> --status in_progress",'pm close <ID> "<reason with evidence>" --validate-close warn'],workflows:[{name:"Start Session Safely",goal:"Bootstrap without mutating unrelated state.",prompt:"You are bootstrapping pm work. Use a token-efficient context snapshot first, then select one open item, claim it, and only then mutate.",commands:["pm context --limit 10","pm list-open --limit 20","pm claim <ID>"]}],docs:[{path:"README.md",purpose:"High-level project and install entrypoint."},{path:"docs/QUICKSTART.md",purpose:"Short setup and first-command walkthrough."},{path:"docs/COMMANDS.md",purpose:"Task-oriented command recipes."}],related:["commands","workflows","release"]},{id:"commands",aliases:["cli","operations","reference"],title:"CLI Command Routing",summary:"Find the right command family quickly and use command-scoped help/contracts output.",intent:"Use this when selecting command paths, flags, and output formats for implementation or automation.",commands:["pm --help","pm <command> --help","pm <command> --help --explain","pm contracts --command <command> --flags-only","pm contracts --command <command> --availability-only --runtime-only","pm completion <bash|zsh|fish>"],workflows:[{name:"Flag Discovery",goal:"Resolve command flags deterministically before mutations.",prompt:"You are preparing to run a command. Use help and contracts surfaces to verify required/optional flags before execution.",commands:["pm <command> --help --explain","pm contracts --command <command> --flags-only"]}],docs:[{path:"docs/COMMANDS.md",purpose:"Command grouping and examples."},{path:"docs/CONFIGURATION.md",purpose:"Project/global settings and policy controls."},{path:"docs/TESTING.md",purpose:"Linked-test orchestration and safety guidance."}],related:["quickstart","workflows","sdk","extensions"]},{id:"workflows",aliases:["developer","maintainer","agent"],title:"Developer and Agent Workflows",summary:"Apply canonical claim -> execute -> verify -> close workflows with append-only evidence.",intent:"Use this for day-to-day coding-agent execution loops and handoff-safe updates.",commands:["pm claim <ID>","pm update <ID> --status in_progress","pm files <ID> --add ...","pm test <ID> --add ...",'pm comments <ID> "..."',"pm validate --check-resolution --check-history-drift","pm release <ID>"],workflows:[{name:"Execution Loop",goal:"Keep code, tests, and tracker evidence synchronized.",prompt:"You are implementing a scoped change. Claim first, link files/tests/docs as you go, append evidence comments, and close only after validation.",commands:["pm claim <ID>","pm update <ID> --status in_progress","pm files <ID> --add path=<file>,scope=project","pm test <ID> --run --progress",'pm close <ID> "<evidence>" --validate-close warn']}],docs:[{path:"AGENTS.md",purpose:"Repository operating rules and required workflow."},{path:"docs/AGENT_GUIDE.md",purpose:"Agent-oriented usage and context strategy."},{path:"docs/TESTING.md",purpose:"Sandbox-safe test execution rules."}],related:["quickstart","commands","skills"]},{id:"sdk",aliases:["api","typescript-sdk"],title:"SDK and Integrations",summary:"Use the published SDK surface for extension authoring and contract-safe integrations.",intent:"Use this when building or reviewing programmatic integrations against @unbrained/pm-cli/sdk.",commands:["pm contracts --schema-only","pm contracts --command extension --flags-only","pm contracts --runtime-only --availability-only"],workflows:[{name:"Integration Contract Check",goal:"Confirm action schemas and runtime availability before coding.",prompt:"You are wiring an integration. Capture schema + runtime availability first, then map your adapter payload fields to contract keys.",commands:["pm contracts --schema-only","pm contracts --availability-only --runtime-only","pm contracts --command <command> --flags-only"]}],docs:[{path:"docs/SDK.md",purpose:"Public SDK exports and extension authoring references."},{path:"docs/ARCHITECTURE.md",purpose:"Core runtime composition and extension load flow."}],related:["extensions","commands"]},{id:"extensions",aliases:["plugins","extension-authoring","packages","package-authoring"],title:"Packages and Extensions",summary:"Install, author, and diagnose packages/extensions with deterministic lifecycle controls.",intent:"Use this for package management, extension capability registration, and runtime diagnostics.",commands:["pm install <target> --project","pm upgrade --dry-run","pm package explore --project","pm package manage --detail summary","pm package doctor --detail deep","pm package activate <target> --project","pm package deactivate <target> --project"],workflows:[{name:"Lifecycle Triage",goal:"Diagnose extension state before forceful lifecycle actions.",prompt:"You are debugging package behavior. Inspect managed state first, then run doctor diagnostics, then apply install/adopt/activate actions.",commands:["pm package explore --project","pm package manage --detail summary","pm package doctor --detail deep","pm upgrade --packages-only --dry-run"]}],docs:[{path:"docs/EXTENSIONS.md",purpose:"Capability model and lifecycle command usage."},{path:"docs/examples/starter-extension/README.md",purpose:"Starter extension scaffold and local development path."},{path:"docs/SDK.md",purpose:"SDK contracts used by extension implementations."}],related:["sdk","commands","skills"]},{id:"skills",aliases:["agent-skills","agentskills"],title:"Agent Skills",summary:"Skill bundles for developer, user, extensions, and sdk workflows aligned to the current CLI.",intent:"Use this when an agent needs reproducible prompts/workflows with strict compatibility metadata.",commands:["pm guide skills --depth deep","pm contracts --command guide --flags-only","pm validate --check-command-references"],workflows:[{name:"Skill Selection",goal:"Pick the narrowest compatible skill first to minimize context usage.",prompt:"Select a pm skill based on the task intent, then execute only the workflow section needed for the current change.",commands:["pm guide skills","pm guide skills --depth deep"]}],docs:[{path:"docs/AGENT_GUIDE.md",purpose:"Agent-first usage and context model."},{path:"docs/README.md",purpose:"Documentation routing with progressive disclosure."},{path:".agents/skills/README.md",purpose:"Agent skills index and routing overview."},{path:".agents/skills/pm-developer/SKILL.md",purpose:"Developer-oriented pm skill workflow."},{path:".agents/skills/pm-user/SKILL.md",purpose:"User/operator pm skill workflow."},{path:".agents/skills/pm-extensions/SKILL.md",purpose:"Extension-focused pm skill workflow."},{path:".agents/skills/pm-sdk/SKILL.md",purpose:"SDK integration pm skill workflow."}],related:["workflows","harnesses","commands"]},{id:"harnesses",aliases:["compatibility","agent-compatibility"],title:"Agent Harness Compatibility",summary:"Cross-harness compatibility guidance for docs routing.",intent:"Use this when adapting pm docs and SDK contracts for an external automation harness.",commands:["pm guide skills","pm guide commands","pm contracts --runtime-only --availability-only"],workflows:[{name:"Harness Mapping",goal:"Route each harness to the same canonical skill/docs sources.",prompt:"Map harness-specific entrypoints to the same pm guide topics and .agents/skills workflows without adding runtime harness-specific code.",commands:["pm guide harnesses --depth standard","pm guide skills --depth deep"]}],docs:[{path:"docs/AGENT_GUIDE.md",purpose:"Agent context and output-mode conventions."},{path:"docs/README.md",purpose:"Single-source documentation routing entrypoint."},{path:".agents/skills/HARNESS_COMPATIBILITY.md",purpose:"Harness compatibility matrix and usage notes."}],related:["skills","workflows"]},{id:"release",aliases:["gates","ship","release-readiness"],title:"Release and Staleness Gates",summary:"Run release gates and docs/skills freshness checks before publishing.",intent:"Use this when validating release readiness and preventing docs/skills drift.",commands:["pnpm build","pnpm test:coverage","pnpm quality:static","node scripts/release/run-gates.mjs --telemetry-mode best-effort","pnpm security:scan"],workflows:[{name:"Pre-Release Gate Sweep",goal:"Ensure code, docs, and skills are all green before publish.",prompt:"Run release gates in deterministic order and treat docs/skills freshness failures as release blockers.",commands:["pnpm build","pnpm test:coverage","node scripts/release/run-gates.mjs --telemetry-mode best-effort"]}],docs:[{path:"docs/RELEASING.md",purpose:"Release flow and safety checks."},{path:"CHANGELOG.md",purpose:"Versioned release history and unreleased notes."},{path:"scripts/release/run-gates.mjs",purpose:"Source of truth for release gate ordering."}],related:["commands","skills","workflows"]}],ns=new Map;for(let e of ss){ns.set(e.id,e);for(let t of e.aliases)ns.set(t,e)}function Zi(){return ss.map(e=>({...e,aliases:[...e.aliases],commands:[...e.commands],workflows:e.workflows.map(t=>({...t,commands:[...t.commands]})),docs:e.docs.map(t=>({...t})),related:[...e.related]}))}function dt(){return ss.map(e=>e.id)}function Qi(e){if(!e)return null;let t=$m(e);return t?ns.get(t)??null:null}(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]="9376fbdf-c942-5fa6-9252-92125ae44e73")}catch{}})();var Lm=["markdown","toon","json"],Nm=["brief","standard","deep"];function Mm(e){if(!e)return;let t=e.trim().toLowerCase();if(!Lm.includes(t))throw new u("Guide format must be one of markdown|toon|json",_.USAGE);return t}function Dm(e,t){let n=Mm(e.format);if(t.json&&n&&n!=="json")throw new u("Cannot combine --json with --format markdown|toon",_.USAGE);return t.json?"json":n??"toon"}function jm(e){if(!e)return"brief";let t=e.trim().toLowerCase();if(!Nm.includes(t))throw new u("Guide depth must be one of brief|standard|deep",_.USAGE);return t}function Gm(){return ys(process.env,"PM_CLI_PACKAGE_ROOT",import.meta.url,["..","..",".."])}function ea(e){return e.replaceAll(`\r
11
- `,`
12
- `)}function Um(e,t,n){let o=ea(e).split(`
13
- `),i=o.slice(0,t).join(`
14
- `),a=o.length>t;return i.length>n&&(i=i.slice(0,n),a=!0),{excerpt:i.trimEnd(),truncated:a,lineCount:o.length}}async function qm(e,t,n){let s=t!=="brief",o=s?t==="deep"?"full":"excerpt":"none",r=[];for(let i of e.docs){let a=Pm.resolve(n,i.path);if(!s){r.push({path:i.path,purpose:i.purpose,optional:i.optional===!0,exists:!0,line_count:null,content_mode:"none",content:null,truncated:!1});continue}try{let c=await Fm(a,"utf8");if(t==="deep"){let d=ea(c).trimEnd();r.push({path:i.path,purpose:i.purpose,optional:i.optional===!0,exists:!0,line_count:d.length===0?0:d.split(`
15
- `).length,content_mode:"full",content:d,truncated:!1})}else{let d=Um(c,120,12e3);r.push({path:i.path,purpose:i.purpose,optional:i.optional===!0,exists:!0,line_count:d.lineCount,content_mode:o,content:d.excerpt,truncated:d.truncated})}}catch(c){let m=c?.code==="ENOENT";if(r.push({path:i.path,purpose:i.purpose,optional:i.optional===!0,exists:!1,line_count:null,content_mode:"none",content:null,truncated:!1}),!m)throw new u(`Failed to read guide document "${i.path}".`,_.GENERIC_FAILURE)}}return r}function zm(e){let t=Zi().map(n=>({id:n.id,aliases:n.aliases,title:n.title,summary:n.summary,intent:n.intent,quick_commands:e==="brief"?n.commands.slice(0,3):n.commands.slice(0,6),docs:n.docs.map(s=>({path:s.path,purpose:s.purpose})),related:n.related}));return{output_default:"toon",mode:"index",depth:e,topics:t,suggested_next_steps:["pm guide <topic>","pm guide <topic> --depth standard","pm guide <topic> --depth deep --format markdown","pm guide <topic> --json"]}}function Hm(e){let t=Qi(e);if(t)return t;let n=dt().join(", ");throw new u(`Unknown guide topic "${e}". Available topics: ${n}. Use "pm guide --list" to browse.`,_.USAGE)}async function Vm(e,t){let n=jm(typeof e.depth=="string"?e.depth:void 0),s=e.list===!0,o=typeof e.topic=="string"?e.topic:void 0;if(s||!o)return zm(n);let r=Hm(o),i=Gm(),a=await qm(r,n,i),c=a.filter(d=>!d.exists&&!d.optional).map(d=>`Missing required guide document: ${d.path}`);return{output_default:"toon",mode:"topic",depth:n,requested_topic:o,topic:r,docs:a,warnings:c}}function Bm(e){return e.replaceAll("```","``\\`")}function Wm(e){if(e.mode==="index"){let n=["# pm guide","","Token-efficient local documentation index for agent and maintainer workflows.","","## Topics"];for(let s of e.topics)n.push(`- \`${s.id}\` - ${s.summary}`),e.depth!=="brief"&&(n.push(` - intent: ${s.intent}`),n.push(` - docs: ${s.docs.map(o=>`\`${o.path}\``).join(", ")}`));n.push("","## Next steps");for(let s of e.suggested_next_steps)n.push(`- \`${s}\``);return n.join(`
16
- `)}let t=[`# pm guide ${e.topic.id}`,"",e.topic.summary,"","## Intent",e.topic.intent,"","## Key commands",...e.topic.commands.map(n=>`- \`${n}\``),"","## Workflow prompts"];for(let n of e.topic.workflows)t.push(`### ${n.name}`),t.push(`goal: ${n.goal}`),t.push(`prompt: ${n.prompt}`),t.push("commands:"),t.push(...n.commands.map(s=>`- \`${s}\``)),t.push("");t.push("## Documents");for(let n of e.docs){let s=n.exists?"available":n.optional?"missing (optional)":"missing (required)";t.push(`- \`${n.path}\` - ${n.purpose} (${s})`),n.exists&&n.content_mode!=="none"&&n.content&&(t.push(""),t.push(`### Excerpt: \`${n.path}\``),n.truncated&&t.push("_truncated for context efficiency_"),t.push("```markdown"),t.push(Bm(n.content)),t.push("```"))}return e.topic.related.length>0&&(t.push("","## Related topics"),t.push(...e.topic.related.map(n=>`- \`${n}\``))),e.warnings.length>0&&(t.push("","## Warnings"),t.push(...e.warnings.map(n=>`- ${n}`))),t.join(`
17
- `)}(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]="8acb405a-140e-532c-81c0-e8153ea30dc0")}catch{}})();var ta=["bash","zsh","fish"],Ym=[...yt],Jm=[...bt],os=Kr("full"),Km=S(He),Xm=S(lo),Zm=S(yo),Qm=S(xo),ed=S(Eo),td=S(bo),nd=S(wo),sd=S(So),od=S($o),rd=S(Ao),id=S(Io),ad=S(go),cd=S(Co),md=S(po),dd=S(To),ld=S(Ro),pd=S(Oo),ud=S(No),fd=S(Po),_d=S(vo),hd=S(Lo),gd=S(Fo),yd=S(Ve),bd=S(ko),wd=S(fo),vd=S(Mo),kd=S(uo),Sd="create show add-step update-step complete-step block-step reorder-step remove-step link unlink decision discovery validation resume approve materialize",xd=S(Do),Ed=`${xd} bash zsh fish`,rs=ye(dt()),lt="init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate",Ad=S(_o),Id=S(ho),Rd="--author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help",Cd="--dry-run --author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help",Td="--author --message --validate-close --duplicate-of --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help",Od="--author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help",ca=[["init","Initialize pm storage for the current workspace"],["config","Read or update pm settings"],["extension","Manage extension lifecycle operations"],["package","Manage package lifecycle operations"],["packages","Alias for package"],["create","Create a new project management item"],["copy","Copy an existing item to a new ID"],["focus","Set/clear/show the session focused parent for new items"],["list","List active items with optional filters"],["list-all","List all items with optional filters"],["list-draft","List draft items with optional filters"],["list-open","List open items with optional filters"],["list-in-progress","List in-progress items with optional filters"],["list-blocked","List blocked items with optional filters"],["list-closed","List closed items with optional filters"],["list-canceled","List canceled items with optional filters"],["aggregate","Aggregate grouped item counts and numeric stats for governance queries"],["duplicates","Find bounded duplicate clusters across lifecycle statuses"],["guide","Browse local progressive-disclosure guides"],["calendar","Show calendar views for deadlines and reminders"],["cal","Alias for calendar"],["context","Show a token-efficient project context snapshot"],["ctx","Alias for context"],["get","Show item details by ID"],["next","Recommend the next actionable (unblocked, ready) work item"],["search","Search items with keyword, semantic, or hybrid modes"],["reindex","Rebuild search artifacts"],["history","Show item history entries"],["history-compact","Compact history streams into a synthetic baseline + retained tail"],["history-redact","Redact sensitive literals/patterns and recompute history hashes"],["history-repair","Re-anchor a drifted history chain so pm health/validate report ok"],["schema","Manage custom item types and statuses in .agents/pm/schema/*.json"],["profile","List, show, apply, and lint project profiles (archetype schema/config/template/package bundles)"],["plan","Agent-optimized Plan item workflow (create/show/add-step/update-step/complete-step/link/approve/materialize)"],["activity","Show recent activity across items"],["restore","Restore an item to an earlier state"],["update","Update item fields and metadata"],["update-many","Bulk-update matched items with dry-run and rollback checkpoints"],["close","Close an item (reason requirement follows governance settings)"],["close-many","Bulk-close matched items with an optional shared reason and rollback checkpoint"],["delete","Delete an item and record the change"],["append","Append text to an item body"],["comments","List or add comments for an item"],["notes","List or add notes for an item"],["learnings","List or add learnings for an item"],["files","Manage linked files"],["docs","Manage linked docs"],["deps","Show dependency relationships for an item"],["graph","Bounded graph traversal, analytics, and governance-audit queries"],["test","Manage linked tests and optionally run them"],["test-all","Run linked tests across matching items"],["test-runs","Manage background linked-test runs"],["stats","Show project tracker statistics"],["health","Show project tracker health checks"],["validate","Run standalone validation checks"],["gc","Clean optional cache artifacts"],["contracts","Show machine-readable command and schema contracts"],["claim","Claim an item for active work"],["release","Release the active claim for an item"],["start-task","Lifecycle alias to claim and set in_progress"],["pause-task","Lifecycle alias to reopen and release claim"],["close-task","Lifecycle alias to close and release claim"],["meet","Shortcut to create a Meeting with scheduling defaults"],["event","Shortcut to create an Event with scheduling defaults"],["remind","Shortcut to create a Reminder from a point in time"],["templates","Manage reusable create templates"],["completion","Generate shell completion"],["help","Display help for a command"]],$d=new Map([["calendar","Show deadline/reminder calendar views"],["schema","Inspect and manage runtime schema"],["profile","List, show, apply, and lint project profiles (archetype bundles)"],["plan","Agent-optimized Plan workflow (create/show/add-step/update-step/complete-step/link/approve/materialize)"],["start-task","Lifecycle alias to claim and set in-progress"]]),Fd=mo.flatMap(e=>[e.short,e.flag,...e.aliases??[]]).filter(e=>!!e).join(" ");function ye(e){return[...new Set(e.map(t=>t.trim()).filter(t=>t.length>0))].sort((t,n)=>t.localeCompare(n)).join(" ")}function Pd(e){return[...new Set(e.map(t=>t.trim()).filter(t=>t.length>0))].join(" ")}function ma(e){return e.replaceAll("\\","\\\\").replaceAll('"','\\"').replaceAll("$","\\$").replaceAll("`","\\`")}function is(e,t){return Pd(e.length>0?e:t.item_types??Ym)}function as(e){return ye(e.statuses??Jm)}function de(e,t){let n=[...e.split(/\s+/u).filter(s=>s.length>0),...t??[]];return ye(n)}function da(e){let t=(e??[]).map(n=>n.trim()).filter(n=>n.startsWith("--")&&n.length>2).map(n=>`--${n.slice(2).replaceAll("_","-")}`);return[...new Set(t)].sort((n,s)=>n.localeCompare(s))}function Le(e){let t=da(e);return t.length===0?"":`${t.map(n=>` '${n}[Runtime schema field flag]:value' \\`).join(`
18
- `)}
19
- `}function pt(e,t={}){let n=t.trailingContinuation??!0,s=e.length-1;return e.map((o,r)=>` ${o}${n||r!==s?" \\":""}`).join(`
20
- `)}function Ld(){return ca.map(([e,t])=>` '${e}:${t}'`).join(`
21
- `)}function Nd(){return ca.filter(([e])=>e!=="help").map(([e,t])=>{let n=$d.get(e)??t;return`complete -c pm -n __pm_no_subcommand -a ${e.padEnd(16)} -d '${n}'`}).join(`
22
- `)}function na(e){let t=["reviewer-missing[Select only items missing reviewer]","risk-missing[Select only items missing risk]","confidence-missing[Select only items missing confidence]","sprint-missing[Select only items missing sprint]","release-missing[Select only items missing release]"],n=e.includeContentMissingAliases===!0?["files-missing[Alias for --no-files]","docs-missing[Alias for --no-docs]"]:[],s=[["has-notes[Select only items that have notes]","no-notes[Select only items with no notes]"],["has-learnings[Select only items that have learnings]","no-learnings[Select only items with no learnings]"],["has-files[Select only items that have linked files]","no-files[Select only items with no linked files]"],["has-docs[Select only items that have linked docs]","no-docs[Select only items with no linked docs]"],["has-tests[Select only items that have linked tests]","no-tests[Select only items with no linked tests]"],["has-comments[Select only items that have comments]","no-comments[Select only items with no comments]"],["has-deps[Select only items that have dependencies]","no-deps[Select only items with no dependencies]"],["has-body[Select only items with non-empty body]","empty-body[Select only items with empty body]"],["has-linked-command[Select only items that have a linked command]","no-linked-command[Select only items with no linked command]"]];return pt([...[...t,...n].map(o=>`'--${e.missingPrefix}${o}'`),...s.flatMap(([o,r])=>[`'--${e.pairedPrefix}${o}'`,`'--${e.pairedPrefix}${r}'`])])}var Md=["'--comment[Comment seed author=<value>,created_at=<iso|now>,text=<value>]:comment'","'--note[Note seed author=<value>,created_at=<iso|now>,text=<value>]:note'","'--learning[Learning seed author=<value>,created_at=<iso|now>,text=<value>]:learning'","'--file[Linked file path=<value>,scope=<project|global>,note=<text>]:file'","'--test[Linked test command=<value>,path=<value>,scope=<project|global>]:test'","'--doc[Linked doc path=<value>,scope=<project|global>,note=<text>]:doc'","'--reminder[Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>]:reminder'","'--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event'","'--type-option[Type option key=value or key=<name>,value=<value>]:type_option'","'--unset[Clear scalar metadata field by name]:field'","'--replace-files[Atomically replace linked files with provided --file values]'","'--replace-docs[Atomically replace linked docs with provided --doc values]'","'--clear-deps[Clear dependency entries]'","'--clear-comments[Clear comments]'","'--clear-notes[Clear notes]'","'--clear-learnings[Clear learnings]'","'--clear-files[Clear linked files]'","'--clear-tests[Clear linked tests]'","'--clear-docs[Clear linked docs]'","'--clear-reminders[Clear reminders]'","'--clear-events[Clear events]'","'--clear-type-options[Clear type options]'"];function sa(e){return pt([...e==="reminder"?["'--at[Reminder time (default +1d)]:at'","'--text[Reminder text (defaults to title)]:text'"]:["'--start[Start time (ISO, now, or relative)]:start'","'--duration[Duration from start (default 1h)]:duration'","'--end[End time (overrides --duration)]:end'","'--location[Location]:location'","'--timezone[IANA timezone]:timezone'","'--all-day[Mark as an all-day event]'"],"'--parent[Parent item id]:parent'","'--allow-missing-parent[Permit a parent id that does not exist yet]'","'--tags[Comma-separated tags]:tags'","'(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)'","'(-b --body)'{-b,--body}'[Item body]:body'","'(-d --description)'{-d,--description}'[Short description]:description'","'--author[Mutation author]:author'","'--message[History message]:message'","'--json[Output JSON]'","'--quiet[Suppress stdout]'"],{trailingContinuation:!1})}function oa(e,t,n,s){return pt([`'--filter-status[Filter by status before ${e}]:(${t})'`,`'--filter-type[Filter by type before ${e}]:(${n})'`,`'--filter-tag[Filter by tag before ${e}]:(${s})'`,`'--filter-priority[Filter by priority before ${e}]:(0 1 2 3 4)'`,"'--filter-deadline-before[Filter by deadline upper bound]:deadline'","'--filter-deadline-after[Filter by deadline lower bound]:deadline'","'--filter-updated-after[Filter by updated_at lower bound (ISO/relative)]:timestamp'","'--filter-updated-before[Filter by updated_at upper bound (ISO/relative)]:timestamp'","'--filter-created-after[Filter by created_at lower bound (ISO/relative)]:timestamp'","'--filter-created-before[Filter by created_at upper bound (ISO/relative)]:timestamp'",`'--filter-assignee[Filter by assignee before ${e}]:assignee'`,"'--filter-assignee-filter[Filter assignee presence]:(assigned unassigned)'","'--filter-parent[Filter by parent item ID]:parent'","'--filter-sprint[Filter by sprint]:sprint'","'--filter-release[Filter by release]:release'"])}function le(e,t){let n=da(t).map(o=>o.slice(2));if(e.length===0||n.length===0)return"";let s=[];for(let o of e)for(let r of n)s.push(`complete -c pm -n '__fish_seen_subcommand_from ${o}' -l ${r} -d 'Runtime schema field flag' -r`);return`${s.join(`
23
- `)}
24
- `}function ra(e,t,n){let s=e.toUpperCase(),o=`PM_COMPLETION_${s}_CACHE`,r=`PM_COMPLETION_${s}_CACHE_TS`,i=`PM_COMPLETION_${s}_TTL`,a=ma(n);return[`_pm_completion_${e}_choices() {`," local now ttl cache_ts resolved",' now="$(date +%s 2>/dev/null || echo 0)"',` ttl="\${${i}:-120}"`,` cache_ts="\${${r}:-0}"`,` if [[ -n "\${${o}:-}" && "$now" -ne 0 && $((now - cache_ts)) -lt "$ttl" ]]; then`,` printf '%s\\n' "$${o}"`," return 0"," fi",` resolved="$(pm ${t} 2>/dev/null)"`,' if [[ -z "$resolved" ]]; then',` resolved="${a}"`," fi",` ${o}="$resolved"`,` ${r}="$now"`,` printf '%s\\n' "$${o}"`,"}"]}function ia(e,t,n){let s=e.toUpperCase(),o=`PM_COMPLETION_${s}_CACHE`,r=`PM_COMPLETION_${s}_CACHE_TS`,i=`PM_COMPLETION_${s}_TTL`,a=ma(n);return`
25
- _pm_${e}_choices() {
26
- local now ttl cache_ts resolved
27
- now=\${EPOCHSECONDS:-0}
28
- ttl=\${${i}:-120}
29
- cache_ts=\${${r}:-0}
30
- if [[ -n "\${${o}:-}" && "$now" -ne 0 && $((now - cache_ts)) -lt "$ttl" ]]; then
31
- print -r -- "$${o}"
32
- return
33
- fi
34
- resolved="$(pm ${t} 2>/dev/null)"
35
- if [[ -z "$resolved" ]]; then
36
- resolved="${a}"
37
- fi
38
- ${o}="$resolved"
39
- ${r}="$now"
40
- print -r -- "$${o}"
41
- }
42
- `}function aa(e,t,n){let s=e.toUpperCase(),o=n.replaceAll("'","\\'");return`
43
- function __pm_${e}_choices
44
- set -l now (date +%s ^/dev/null)
45
- if test -z "$now"
46
- set now 0
47
- end
48
- set -l ttl 120
49
- if set -q PM_COMPLETION_${s}_TTL
50
- set ttl $PM_COMPLETION_${s}_TTL
51
- end
52
- if set -q PM_COMPLETION_${s}_CACHE; and set -q PM_COMPLETION_${s}_CACHE_TS
53
- set -l age (math "$now - $PM_COMPLETION_${s}_CACHE_TS")
54
- if test $age -lt $ttl
55
- printf '%s\\n' $PM_COMPLETION_${s}_CACHE
56
- return
57
- end
58
- end
59
- set -l resolved (pm ${t} ^/dev/null)
60
- if test (count $resolved) -eq 0
61
- set resolved '${o}'
62
- end
63
- set -gx PM_COMPLETION_${s}_CACHE $resolved
64
- set -gx PM_COMPLETION_${s}_CACHE_TS $now
65
- printf '%s\\n' $resolved
66
- end
67
- `}function Dd(e=[],t=[],n=!1,s={}){let o=os.join(" "),r=e.length===0,i=is(e,s),a=as(s),c=ye(t),d=de(Km,s.command_flags?.list),m=de(sd,s.command_flags?.create),p=de(rd,s.command_flags?.update),f=de(id,s.command_flags?.["update-many"]),g=de(yd,s.command_flags?.search),w=de(ld,s.command_flags?.calendar),b=de(pd,s.command_flags?.context),v=n||t.length>0,h=A=>`$(compgen -W "${A}" -- "$cur")`;return["# bash completion for pm",`# Source this file or add 'eval "$(pm completion bash)"' to ~/.bashrc`,"",...r?[...ra("type","completion-types",i),""]:[],...ra("status","completion-statuses",a),"","_pm_completion() {"," local cur prev words cword"," _init_completion 2>/dev/null || {",' cur="${COMP_WORDS[COMP_CWORD]}"',' prev="${COMP_WORDS[COMP_CWORD-1]}"'," cword=$COMP_CWORD"," }",""," if [[ $cword -eq 1 ]]; then",` COMPREPLY=(${h(o)})`," return 0"," fi","",' if [[ "$prev" == "--type" ]]; then',r?' COMPREPLY=($(compgen -W "$(_pm_completion_type_choices)" -- "$cur"))':` COMPREPLY=(${h(i)})`," return 0"," fi","",' if [[ "$prev" == "--status" ]]; then',' COMPREPLY=($(compgen -W "$(_pm_completion_status_choices)" -- "$cur"))'," return 0"," fi","",...v?[' if [[ "$prev" == "--tag" || "$prev" == "--tags" ]]; then',` COMPREPLY=(${h(c)})`," return 0"," fi"]:[' if [[ "$prev" == "--tag" || "$prev" == "--tags" ]]; then'," local now ttl cache_ts tag_values",' now="$(date +%s 2>/dev/null || echo 0)"',' ttl="${PM_COMPLETION_TAG_TTL:-120}"',' cache_ts="${PM_COMPLETION_TAG_CACHE_TS:-0}"',' tag_values="${PM_COMPLETION_TAG_CACHE:-}"',' if [[ -z "$tag_values" || "$now" -eq 0 || $((now - cache_ts)) -ge "$ttl" ]]; then',' tag_values="$(pm completion-tags 2>/dev/null)"',' PM_COMPLETION_TAG_CACHE="$tag_values"',' PM_COMPLETION_TAG_CACHE_TS="$now"'," fi",' COMPREPLY=($(compgen -W "$tag_values" -- "$cur"))'," return 0"," fi"],"",' local cmd="${COMP_WORDS[1]}"',"",' case "$cmd" in'," list|list-all|list-draft|list-open|list-in-progress|list-blocked|list-closed|list-canceled)",` COMPREPLY=(${h(d)})`," ;;"," aggregate)",` COMPREPLY=(${h(Xm)})`," ;;"," duplicates)",` COMPREPLY=(${h(_d)})`," ;;"," create)",` COMPREPLY=(${h(m)})`," ;;"," copy)",` COMPREPLY=(${h(Qm)})`," ;;"," focus)",` COMPREPLY=(${h(ed)})`," ;;"," update)",` COMPREPLY=(${h(p)})`," ;;"," update-many)",` COMPREPLY=(${h(f)})`," ;;"," calendar|cal)",` COMPREPLY=(${h(w)})`," ;;"," context|ctx)",` COMPREPLY=(${h(b)})`," ;;"," next)",` COMPREPLY=(${h(ud)})`," ;;"," guide)",` COMPREPLY=(${h(`${gd} ${rs}`)})`," ;;"," search)",` COMPREPLY=(${h(g)})`," ;;"," reindex)",` COMPREPLY=(${h("--mode --progress --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," init)",` COMPREPLY=(${h(`${wd} --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help`)})`," ;;"," config)",` COMPREPLY=(${h("--criterion --clear-criteria --format --policy --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," extension)",` COMPREPLY=(${h(`${lt} ${Ad}`)})`," ;;"," package|packages)",` COMPREPLY=(${h(`${lt} ${Id}`)})`," ;;"," comments)",` COMPREPLY=(${h("--add --body --stdin --file --edit --delete --limit --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," notes)",` COMPREPLY=(${h("--add --add-json --stdin --file --edit --delete --limit --since --event-type --include-meta --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," learnings)",` COMPREPLY=(${h("--add --stdin --file --edit --delete --limit --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," files)",` COMPREPLY=(${h("discover lookup --add --add-glob --remove --migrate --list --apply --note --append-stable --validate-paths --scope --limit --offset --no-truncate --strict-read --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," docs)",` COMPREPLY=(${h("--add --add-glob --remove --migrate --note --validate-paths --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," append)",` COMPREPLY=(${h(Zm)})`," ;;"," deps)",` COMPREPLY=(${h(fd)})`," ;;"," graph)",` COMPREPLY=(${h(`ancestors descendants predecessors successors paths impact analyze audit communities redundancy dominators slack centrality articulation plan index ${hd}`)})`," ;;"," test)",` COMPREPLY=(${h("--add --add-json --remove --list --run --match --only-index --only-last --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," test-all)",` COMPREPLY=(${h("--status --limit --offset --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," test-runs)",` COMPREPLY=(${h("list status logs stop resume --status --limit --stream --tail --force --author --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," validate)",` COMPREPLY=(${h("--check-metadata --metadata-profile --check-resolution --check-lifecycle --check-stale-blockers --dependency-cycle-severity --parent-cycle-severity --check-files --scan-mode --include-pm-internals --verbose-file-lists --verbose-diagnostics --all-affected-ids --strict-exit --fail-on-warn --fix-hints --auto-fix --dry-run --fix-scope --prune-missing --check-history-drift --check-command-references --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," health)",` COMPREPLY=(${h(bd)})`," ;;"," history)",` COMPREPLY=(${h(md)})`," ;;"," events)",` COMPREPLY=(${h(dd)})`," ;;"," history-compact)",` COMPREPLY=(${h("--before --ids --all-over --closed --all-streams --min-entries --dry-run --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," history-author-acknowledge)",` COMPREPLY=(${h("--event --all-actionable --attributed-author --reviewer --reason --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," get)",` COMPREPLY=(${h(od)})`," ;;"," history-redact)",` COMPREPLY=(${h("--literal --regex --replacement --dry-run --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," history-repair)",` COMPREPLY=(${h("--all --dry-run --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," schema)",` COMPREPLY=(${h("list show show-status add-type remove-type add-status remove-status add-field remove-field list-fields show-field apply-preset rename-type rename-field remap-status --description --default-status --folder --alias --role --order --type --commands --cli-flag --required --required-on-create --no-allow-unset --required-types --infer --min-count --apply --to --migration-id --dry-run --author --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," profile)",` COMPREPLY=(${h("list show apply lint agile ops research --dry-run --author --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," plan)",` COMPREPLY=(${h(`${Sd} ${kd}`)})`," ;;"," activity)",` COMPREPLY=(${h(cd)})`," ;;"," contracts)",` COMPREPLY=(${h(vd)})`," ;;"," gc)",` COMPREPLY=(${h("--dry-run --scope --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," stats)",` COMPREPLY=(${h("--storage --metadata-coverage --field-utilization --by-assignee --by-tag --by-priority --tag-prefix --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`," ;;"," close|close-task)",` COMPREPLY=(${h(Td)})`," ;;"," close-many)",` COMPREPLY=(${h(ad)})`," ;;"," release)",` COMPREPLY=(${h(Od)})`," ;;"," delete)",` COMPREPLY=(${h(Cd)})`," ;;"," claim|restore|start-task|pause-task)",` COMPREPLY=(${h(Rd)})`," ;;"," meet|event)",` COMPREPLY=(${h(td)})`," ;;"," remind)",` COMPREPLY=(${h(nd)})`," ;;"," completion)",` COMPREPLY=(${h(Ed)})`," ;;"," templates)",` COMPREPLY=(${h("save list show")})`," ;;"," *)",` COMPREPLY=(${h(Fd)})`," ;;"," esac"," return 0","}","","complete -F _pm_completion pm"].join(`
68
- `)}function jd(e=[],t=[],n=!1,s={}){let o=e.length===0,r=is(e,s),i=as(s),a=o?'${(f)"$(_pm_type_choices)"}':r,c='${(f)"$(_pm_status_choices)"}',d=rs,m=ye(t),p=n||t.length>0,f=p?m:'${(f)"$(_pm_tag_choices)"}',g=Le(s.command_flags?.list),w=Le(s.command_flags?.create),b=Le(s.command_flags?.search),v=Le(s.command_flags?.calendar),h=Le(s.command_flags?.context),A=na({missingPrefix:"filter-",pairedPrefix:"",includeContentMissingAliases:!0}),R=na({missingPrefix:"filter-",pairedPrefix:"filter-"}),H=pt(Md),V=p?"":`
69
- _pm_tag_choices() {
70
- local now ttl cache_ts
71
- now=\${EPOCHSECONDS:-0}
72
- ttl=\${PM_COMPLETION_TAG_TTL:-120}
73
- cache_ts=\${PM_COMPLETION_TAG_CACHE_TS:-0}
74
- if [[ -n "\${PM_COMPLETION_TAG_CACHE:-}" && "$now" -ne 0 && $((now - cache_ts)) -lt "$ttl" ]]; then
75
- print -r -- "$PM_COMPLETION_TAG_CACHE"
76
- return
77
- fi
78
- PM_COMPLETION_TAG_CACHE="$(pm completion-tags 2>/dev/null)"
79
- PM_COMPLETION_TAG_CACHE_TS="$now"
80
- print -r -- "$PM_COMPLETION_TAG_CACHE"
81
- }
82
- `;return`#compdef pm
83
- # zsh completion for pm
84
- # Source this file or add 'eval "$(pm completion zsh)"' to ~/.zshrc
85
-
86
- _pm_commands() {
87
- local -a commands
88
- commands=(
89
- ${Ld()}
90
- )
91
- _describe 'command' commands
92
- }
93
- ${V}
94
- ${o?ia("type","completion-types",r):""}
95
- ${ia("status","completion-statuses",i)}
96
-
97
- _pm() {
98
- local context state line
99
- _arguments -C \\
100
- '--json[Output JSON instead of TOON]' \\
101
- '--quiet[Suppress stdout output]' \\
102
- '--output-include[Retain comma-separated read fields or sections]:selectors' \\
103
- '--output-limit[Set the universal read row ceiling]:limit' \\
104
- '--output-budget[Set the universal estimated-token ceiling]:tokens' \\
105
- '--output-format[Select the universal read encoding]:(toon json)' \\
106
- '--output-session[Carry cross-call read budget and served-item state]:state' \\
107
- '--no-changed-fields[Omit changed_fields array from mutation output]' \\
108
- '--pm-path[Explicit tracker storage path for this command]:path:_files -/' \\
109
- '--path[Compatibility alias for --pm-path]:path:_files -/' \\
110
- '--no-extensions[Disable extension loading]' \\
111
- '--no-pager[Disable pager integration for help and long output]' \\
112
- '--profile[Print deterministic timing diagnostics]' \\
113
- '(-V --version)--version[Output the version number]' \\
114
- '(-h --help)--help[Display help]' \\
115
- '1: :_pm_commands' \\
116
- '*:: :->args' && return 0
117
-
118
- case $state in
119
- args)
120
- case $line[1] in
121
- list|list-all|list-draft|list-open|list-in-progress|list-blocked|list-closed|list-canceled)
122
- _arguments \\
123
- '--type[Filter by item type]:(${a})' \\
124
- '--tag[Filter by tag]:(${f})' \\
125
- '--tags[Alias for --tag]:(${f})' \\
126
- '--priority[Filter by priority]:(0 1 2 3 4)' \\
127
- '--deadline-before[Filter by deadline upper bound (ISO/date string or relative)]:date' \\
128
- '--deadline-after[Filter by deadline lower bound (ISO/date string or relative)]:date' \\
129
- '--today[Filter to items updated since local midnight today]' \\
130
- '--recent[Filter to items updated in the last 7 days]' \\
131
- '--updated-after[Filter by updated_at lower bound (ISO/relative)]:timestamp' \\
132
- '--updated-before[Filter by updated_at upper bound (ISO/relative)]:timestamp' \\
133
- '--created-after[Filter by created_at lower bound (ISO/relative)]:timestamp' \\
134
- '--created-before[Filter by created_at upper bound (ISO/relative)]:timestamp' \\
135
- '--assignee[Filter by assignee]:assignee' \\
136
- '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
137
- '--sprint[Filter by sprint]:sprint' \\
138
- '--release[Filter by release]:release' \\
139
- ${A}
140
- '--limit[Limit returned item count]:number' \\
141
- '--offset[Skip the first n matching rows before limit]:number' \\
142
- '--no-truncate[Return every matched row, overriding --limit]' \\
143
- '--all[Alias for --no-truncate]' \\
144
- '--include-body[Include item body in each returned list row]' \\
145
- '--compact[Render compact list projection fields]' \\
146
- '--fields[Render custom comma-separated list fields]:fields' \\
147
- '--tree[Render hierarchical subtree output rooted at --parent or top-level parents]' \\
148
- '--tree-depth[Cap recursion depth for --tree (0 = root only)]:number' \\
149
- '--sort[Sort field]:(priority deadline updated_at created_at title parent)' \\
150
- '--order[Sort order (requires --sort)]:(asc desc)' \\
151
- '--stream[Emit line-delimited JSON rows (requires --json)]' \\
152
- ${g} '--json[Output JSON]' \\
153
- '--quiet[Suppress stdout]' \\
154
- '--pm-path[Explicit tracker storage path]:path:_files -/' \\
155
- '--path[Compatibility alias for --pm-path]:path:_files -/'
156
- ;;
157
- aggregate)
158
- _arguments \\
159
- '--group-by[Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)]:fields' \\
160
- '--count[Return grouped counts]' \\
161
- '--completion[Add open/in_progress/closed/other counts and completion percentage]' \\
162
- '--sum[Numeric field to sum per group]:field' \\
163
- '--avg[Numeric field to average per group]:field' \\
164
- '--include-unparented[Include unparented rows when grouping by parent]' \\
165
- '--status[Filter by status]:(${c})' \\
166
- '--type[Filter by item type]:(${a})' \\
167
- '--tag[Filter by tag]:(${f})' \\
168
- '--priority[Filter by priority]:(0 1 2 3 4)' \\
169
- '--deadline-before[Filter by deadline upper bound (ISO/date string or relative)]:date' \\
170
- '--deadline-after[Filter by deadline lower bound (ISO/date string or relative)]:date' \\
171
- '--assignee[Filter by assignee]:assignee' \\
172
- '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
173
- '--parent[Filter by parent item ID]:parent_id' \\
174
- '--sprint[Filter by sprint]:sprint' \\
175
- '--release[Filter by release]:release' \\
176
- '--json[Output JSON]' \\
177
- '--quiet[Suppress stdout]'
178
- ;;
179
- duplicates)
180
- _arguments \\
181
- '*--status[Include lifecycle status (repeatable)]:(${c})' \\
182
- '--since[Only inspect items created at or after this ISO timestamp]:timestamp' \\
183
- '--threshold[Minimum similarity score from zero through one]:number' \\
184
- '--limit[Maximum duplicate clusters]:number'
185
- ;;
186
- create)
187
- _arguments \\
188
- '(-t --title)'{-t,--title}'[Item title]:title' \\
189
- '(-d --description)'{-d,--description}'[Item description]:description' \\
190
- '--type[Item type]:(${a})' \\
191
- '--create-mode[Create required-option policy mode]:(strict progressive)' \\
192
- '--schedule-preset[Scheduling preset for Reminder/Meeting/Event]:(lightweight)' \\
193
- '(-s --status)'{-s,--status}'[Item status]:(${c})' \\
194
- '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
195
- '--tags[Comma-separated tags]:tags' \\
196
- '--add-tags[Add tags additively without replacing existing]:tags' \\
197
- '(-b --body)'{-b,--body}'[Item body]:body' \\
198
- '--body-file[Load the item body from a file]:body_file:_files' \\
199
- '--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\
200
- '--estimate[Estimated minutes]:minutes' \\
201
- '--acceptance-criteria[Acceptance criteria]:criteria' \\
202
- '--reminder[Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>]:reminder' \\
203
- '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\
204
- '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\
205
- '--unset[Clear scalar metadata field by name]:field' \\
206
- '--replace-deps[Atomically replace dependencies with provided --dep values]' \\
207
- '--replace-tests[Atomically replace linked tests with provided --test values]' \\
208
- '--clear-deps[Clear dependency entries]' \\
209
- '--clear-comments[Clear comments]' \\
210
- '--clear-notes[Clear notes]' \\
211
- '--clear-learnings[Clear learnings]' \\
212
- '--clear-files[Clear linked files]' \\
213
- '--clear-tests[Clear linked tests]' \\
214
- '--clear-docs[Clear linked docs]' \\
215
- '--clear-reminders[Clear reminders]' \\
216
- '--clear-events[Clear events]' \\
217
- '--clear-type-options[Clear type options]' \\
218
- '--author[Mutation author]:author' \\
219
- '--message[History message]:message' \\
220
- '--assignee[Assignee]:assignee' \\
221
- ${w} '--json[Output JSON]' \\
222
- '--quiet[Suppress stdout]'
223
- ;;
224
- copy)
225
- _arguments \\
226
- '--title[Override copied title]:title' \\
227
- '--author[Mutation author]:author' \\
228
- '--message[History message]:message' \\
229
- '--force[Force ownership override]' \\
230
- '--json[Output JSON]' \\
231
- '--quiet[Suppress stdout]'
232
- ;;
233
- focus)
234
- _arguments \\
235
- '--clear[Clear the focused item]' \\
236
- '--json[Output JSON]' \\
237
- '--quiet[Suppress stdout]'
238
- ;;
239
- meet|event)
240
- _arguments \\
241
- ${sa("event")}
242
- ;;
243
- remind)
244
- _arguments \\
245
- ${sa("reminder")}
246
- ;;
247
- update)
248
- _arguments \\
249
- '(-t --title)'{-t,--title}'[Item title]:title' \\
250
- '(-d --description)'{-d,--description}'[Item description]:description' \\
251
- '(-b --body)'{-b,--body}'[Item body]:body' \\
252
- '--body-file[Load the item body from a file]:body_file:_files' \\
253
- '(-s --status)'{-s,--status}'[Item status]:(${c})' \\
254
- '--close-reason[Set close reason]:close_reason' \\
255
- '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
256
- '--type[Item type]:(${a})' \\
257
- '--tags[Comma-separated tags]:tags' \\
258
- '--add-tags[Add tags additively without replacing existing]:tags' \\
259
- '--remove-tags[Remove tags from the existing list]:tags' \\
260
- '--add-ac[Add one acceptance criterion without replacing existing]:criteria' \\
261
- '--remove-ac[Remove one acceptance criterion by exact text]:criteria' \\
262
- '--expected[Short alias for --expected-result]:expected_result' \\
263
- '--actual[Short alias for --actual-result]:actual_result' \\
264
- ${H}
265
- '--author[Mutation author]:author' \\
266
- '--message[History message]:message' \\
267
- '--force[Force override]' \\
268
- '--json[Output JSON]' \\
269
- '--quiet[Suppress stdout]'
270
- ;;
271
- update-many)
272
- _arguments \\
273
- ${oa("applying updates",c,a,f)}
274
- '--filter-ac-missing[Select only items missing acceptance_criteria]' \\
275
- '--filter-estimates-missing[Select only items missing estimated_minutes]' \\
276
- '--filter-resolution-missing[Select only terminal items missing resolution]' \\
277
- '--filter-metadata-missing[Select only items missing any tracked metadata]' \\
278
- ${R}
279
- '--ids[Explicit comma-separated ID allowlist]:ids' \\
280
- '--limit[Limit matched item count]:number' \\
281
- '--offset[Skip first n matched rows]:number' \\
282
- '--dry-run[Preview updates without mutating]' \\
283
- '--rollback[Rollback checkpoint ID]:checkpoint_id' \\
284
- '--no-checkpoint[Disable checkpoint creation during apply mode]' \\
285
- '(-t --title)'{-t,--title}'[Item title]:title' \\
286
- '(-d --description)'{-d,--description}'[Item description]:description' \\
287
- '(-b --body)'{-b,--body}'[Item body]:body' \\
288
- '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
289
- '--type[Item type]:(${a})' \\
290
- '--tags[Comma-separated tags]:tags' \\
291
- '--add-tags[Add tags additively without replacing existing]:tags' \\
292
- '--remove-tags[Remove tags from the existing list]:tags' \\
293
- '--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\
294
- '--estimate[Estimated minutes]:minutes' \\
295
- '--acceptance-criteria[Acceptance criteria]:criteria' \\
296
- '--add-ac[Add one acceptance criterion without replacing existing]:criteria' \\
297
- '--remove-ac[Remove one acceptance criterion by exact text]:criteria' \\
298
- '--definition-of-ready[Definition of ready]:definition_of_ready' \\
299
- '--order[Planning order/rank]:order' \\
300
- '--goal[Goal identifier]:goal' \\
301
- '--objective[Objective identifier]:objective' \\
302
- '--value[Business value summary]:value' \\
303
- '--impact[Business impact summary]:impact' \\
304
- '--outcome[Expected outcome summary]:outcome' \\
305
- '--why-now[Why-now rationale]:why_now' \\
306
- '--reviewer[Reviewer]:reviewer' \\
307
- '--risk[Risk level]:risk' \\
308
- '--confidence[Confidence level]:confidence' \\
309
- '--sprint[Sprint identifier]:sprint' \\
310
- '--release[Release identifier]:release' \\
311
- '--reporter[Issue reporter]:reporter' \\
312
- '--severity[Issue severity]:severity' \\
313
- '--environment[Issue environment context]:environment' \\
314
- '--repro-steps[Issue reproduction steps]:repro_steps' \\
315
- '--resolution[Issue resolution summary]:resolution' \\
316
- '--expected-result[Issue expected behavior]:expected_result' \\
317
- '--actual-result[Issue observed behavior]:actual_result' \\
318
- '--expected[Short alias for --expected-result]:expected_result' \\
319
- '--actual[Short alias for --actual-result]:actual_result' \\
320
- '--affected-version[Affected version identifier]:affected_version' \\
321
- '--fixed-version[Fixed version identifier]:fixed_version' \\
322
- '--component[Issue component ownership]:component' \\
323
- '--regression[Regression marker true|false|1|0]:regression' \\
324
- '--customer-impact[Customer impact summary]:customer_impact' \\
325
- '--dep[Dependency seed id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>]:dep' \\
326
- '--dep-remove[Dependency removal selector id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>]:dep_remove' \\
327
- '--replace-deps[Atomically replace dependencies with provided --dep values]' \\
328
- '--replace-tests[Atomically replace linked tests with provided --test values]' \\
329
- ${H}
330
- '--author[Mutation author]:author' \\
331
- '--message[History message]:message' \\
332
- '--force[Force override]' \\
333
- '--json[Output JSON]' \\
334
- '--quiet[Suppress stdout]'
335
- ;;
336
- close-many)
337
- _arguments \\
338
- ${oa("closing",c,a,f)}
339
- ${R}
340
- '--ids[Explicit comma-separated ID allowlist]:ids' \\
341
- '--limit[Limit matched item count]:number' \\
342
- '--offset[Skip first n matched rows]:number' \\
343
- '--reason[Optional shared close reason applied to every matched item]:reason' \\
344
- '--resolution[Shared closure resolution]:resolution' \\
345
- '--expected-result[Shared expected-result note]:expected_result' \\
346
- '--actual-result[Shared actual-result note]:actual_result' \\
347
- '--expected[Short alias for --expected-result]:expected_result' \\
348
- '--actual[Short alias for --actual-result]:actual_result' \\
349
- '--validate-close[Validate closure metadata per item]:(off warn strict)' \\
350
- '--author[Mutation author]:author' \\
351
- '--message[History message]:message' \\
352
- '--force[Re-close terminal matches and override ownership]' \\
353
- '--dry-run[Preview matched items without mutating]' \\
354
- '--rollback[Rollback checkpoint ID]:checkpoint_id' \\
355
- '--no-checkpoint[Disable checkpoint creation during apply mode]' \\
356
- '--json[Output JSON]' \\
357
- '--quiet[Suppress stdout]'
358
- ;;
359
- calendar|cal)
360
- _arguments \\
361
- '--view[Calendar view]:(agenda day week month)' \\
362
- '--date[Anchor date/time (ISO/date string or relative)]:date' \\
363
- '--from[Agenda lower bound (ISO/date string or relative)]:date' \\
364
- '--to[Agenda upper bound (ISO/date string or relative)]:date' \\
365
- '--past[Include past entries]' \\
366
- '--full-period[Include full anchored day/week/month period]' \\
367
- '--type[Filter by type]:(${a})' \\
368
- '--tag[Filter by tag]:(${f})' \\
369
- '--priority[Filter by priority]:(0 1 2 3 4)' \\
370
- '--status[Filter by status]:(${c})' \\
371
- '--assignee[Filter by assignee]:assignee' \\
372
- '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
373
- '--sprint[Filter by sprint]:sprint' \\
374
- '--release[Filter by release]:release' \\
375
- ${v} '--include[Include event sources]:(all deadlines reminders events scheduled)' \\
376
- '--recurrence-lookahead-days[Bound open-ended recurrence lookahead]:days' \\
377
- '--recurrence-lookback-days[Bound open-ended recurrence lookback]:days' \\
378
- '--occurrence-limit[Cap occurrences per recurring event]:number' \\
379
- '--limit[Limit returned events]:number' \\
380
- '--format[Output override]:(markdown toon json)' \\
381
- '--json[Output JSON]' \\
382
- '--quiet[Suppress stdout]'
383
- ;;
384
- context|ctx)
385
- _arguments \\
386
- '--date[Anchor date/time (ISO/date string or relative)]:date' \\
387
- '--from[Agenda lower bound (ISO/date string or relative)]:date' \\
388
- '--to[Agenda upper bound (ISO/date string or relative)]:date' \\
389
- '--past[Include past entries in bounded windows]' \\
390
- '--type[Filter by type]:(${a})' \\
391
- '--tag[Filter by tag]:(${f})' \\
392
- '--priority[Filter by priority]:(0 1 2 3 4)' \\
393
- '--assignee[Filter by assignee]:assignee' \\
394
- '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
395
- '--sprint[Filter by sprint]:sprint' \\
396
- '--release[Filter by release]:release' \\
397
- '--parent[Scope snapshot to one item subtree]:id' \\
398
- '--limit[Limit focus and agenda rows per section]:number' \\
399
- '--depth[Context depth]:(brief standard deep full)' \\
400
- '--format[Output override]:(markdown toon json)' \\
401
- ${h} '--json[Output JSON]' \\
402
- '--quiet[Suppress stdout]'
403
- ;;
404
- next)
405
- _arguments \\
406
- '--type[Filter candidates by type]:(${a})' \\
407
- '--tag[Filter candidates by tag]:(${f})' \\
408
- '--priority[Filter candidates by priority]:(0 1 2 3 4)' \\
409
- '--assignee[Filter candidates by assignee]:assignee' \\
410
- '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
411
- '--sprint[Filter candidates by sprint]:sprint' \\
412
- '--release[Filter candidates by release]:release' \\
413
- '--parent[Scope to one item subtree]:id' \\
414
- '--limit[Limit ready rows]:number' \\
415
- '--blocked-limit[Limit blocked rows]:number' \\
416
- '--ready-only[Omit the blocked companion list]' \\
417
- '--format[Output override]:(markdown toon json)' \\
418
- '--json[Output JSON]' \\
419
- '--quiet[Suppress stdout]'
420
- ;;
421
- guide)
422
- _arguments \\
423
- '1:topic:(${d})' \\
424
- '--list[Show guide topic index]' \\
425
- '--format[Output override]:(markdown toon json)' \\
426
- '--depth[Guide detail depth]:(brief standard deep)' \\
427
- '--json[Output JSON]' \\
428
- '--quiet[Suppress stdout]'
429
- ;;
430
- search)
431
- _arguments \\
432
- '--mode[Search mode]:(keyword semantic hybrid)' \\
433
- '--match-mode[Token match mode]:(and or exact)' \\
434
- '--min-score[Per-query minimum score threshold]:number' \\
435
- '--count[Return only the match count]' \\
436
- '--include-linked[Include linked content in scoring]' \\
437
- '--highlight[Emit per-field matched-text snippets on each hit]' \\
438
- '--limit[Max results]:number' \\
439
- '--status[Filter by status (open/closed/canceled, csv)]:(${c})' \\
440
- '--type[Filter by type]:(${a})' \\
441
- '--tag[Filter by tag]:(${f})' \\
442
- '--tags[Alias for --tag]:(${f})' \\
443
- '--priority[Filter by priority]:(0 1 2 3 4)' \\
444
- '--updated-after[Filter by updated_at lower bound]:value' \\
445
- '--updated-before[Filter by updated_at upper bound]:value' \\
446
- '--created-after[Filter by created_at lower bound]:value' \\
447
- '--created-before[Filter by created_at upper bound]:value' \\
448
- '--assignee[Filter by assignee]:value' \\
449
- '--sprint[Filter by sprint]:value' \\
450
- '--release[Filter by release]:value' \\
451
- '--parent[Filter by parent item ID]:value' \\
452
- ${A}
453
- ${b} '--json[Output JSON]' \\
454
- '--quiet[Suppress stdout]'
455
- ;;
456
- reindex)
457
- _arguments \\
458
- '--mode[Reindex mode]:(keyword semantic hybrid)' \\
459
- '--progress[Emit progress updates to stderr]' \\
460
- '--json[Output JSON]' \\
461
- '--quiet[Suppress stdout]'
462
- ;;
463
- history)
464
- _arguments \\
465
- '--limit[Max entries]:number' \\
466
- '--compact[Condensed history projection]' \\
467
- '--full[Show full history entries]' \\
468
- '--provenance[Patch-free identity and agent provenance projection]' \\
469
- '--provenance-summary[Include bounded provenance completeness counts]' \\
470
- '*--harness[Filter by recorded or vocabulary-resolved harness]:harness' \\
471
- '*--agent-instance[Filter by privacy-safe agent instance]:instance' \\
472
- '*--provenance-filter[Filter by exact declared provenance value]:dimension=value' \\
473
- '--diff[Include per-entry field-level before/after value diffs]' \\
474
- '--field[With --diff, show only entries that changed this field]:field' \\
475
- '--verify[Verify history hash chain and replay integrity]' \\
476
- '--json[Output JSON]' \\
477
- '--quiet[Suppress stdout]'
478
- ;;
479
- events)
480
- _arguments \\
481
- '--since[Resume after a cursor or from an ISO timestamp]:cursor_or_timestamp' \\
482
- '*--type[Filter by mutation operation]:operation' \\
483
- '*--author[Filter by mutation author]:author' \\
484
- '*--item[Filter by item or workspace stream]:item' \\
485
- '--limit[Maximum events, up to 1000]:number' \\
486
- '--full[Include complete authoritative history entries]' \\
487
- '--provenance[Include patch-free identity and agent provenance]' \\
488
- '--provenance-summary[Include bounded provenance completeness counts]' \\
489
- '*--harness[Filter by recorded or vocabulary-resolved harness]:harness' \\
490
- '*--agent-instance[Filter by privacy-safe agent instance]:instance' \\
491
- '*--provenance-filter[Filter by exact declared provenance value]:dimension=value' \\
492
- '--follow[Continue emitting committed events]' \\
493
- '--interval-ms[Empty-read delay while following]:milliseconds' \\
494
- '--json[Output JSON]' \\
495
- '--quiet[Suppress stdout]'
496
- ;;
497
- history-compact)
498
- _arguments \\
499
- '--before[Compact entries strictly before this version number or ISO timestamp]:before' \\
500
- '--ids[Bulk: compact an explicit comma-separated list of item ids]:ids' \\
501
- '--all-over[Bulk: compact every stream with more than N entries]:all-over' \\
502
- '--closed[Bulk: compact only closed (terminal) items streams]' \\
503
- '--all-streams[Bulk: compact every history stream regardless of lifecycle state]' \\
504
- '--min-entries[Bulk: skip streams with at most N entries]:min-entries' \\
505
- '--dry-run[Preview compaction impact without writing the history file]' \\
506
- '--author[Mutation author]:author' \\
507
- '--message[Audit history message]:message' \\
508
- '--force[Force ownership/lock override]' \\
509
- '--json[Output JSON]' \\
510
- '--quiet[Suppress stdout]'
511
- ;;
512
- history-author-acknowledge)
513
- _arguments \\
514
- '*--event[Actionable unknown-author event]:item_and_line' \\
515
- '--all-actionable[Select every currently actionable event]' \\
516
- '--attributed-author[Principal attributed by maintainer review]:author' \\
517
- '--reviewer[Reviewer recording the disposition]:reviewer' \\
518
- '--reason[Evidence-backed review rationale]:reason' \\
519
- '--json[Output JSON]' \\
520
- '--quiet[Suppress stdout]'
521
- ;;
522
- get)
523
- _arguments \\
524
- '--depth[Detail depth]:(brief standard deep full)' \\
525
- '--full[Explicit full item read]' \\
526
- '--fields[Render custom comma-separated item fields]:fields' \\
527
- '--tree[Include descendant subtree in result payload]' \\
528
- '--tree-depth[Cap subtree depth for --tree (0 = root only)]:number' \\
529
- '--json[Output JSON]' \\
530
- '--quiet[Suppress stdout]'
531
- ;;
532
- history-redact)
533
- _arguments \\
534
- '--literal[Literal string matcher to redact from history/item payloads]:literal' \\
535
- '--regex[Regex matcher to redact (/pattern/flags or raw pattern)]:regex' \\
536
- '--replacement[Replacement text (defaults to [redacted])]:replacement' \\
537
- '--dry-run[Preview redaction impact without writing files]' \\
538
- '--author[Mutation author]:author' \\
539
- '--message[Audit history message]:message' \\
540
- '--force[Force ownership/lock override]' \\
541
- '--json[Output JSON]' \\
542
- '--quiet[Suppress stdout]'
543
- ;;
544
- history-repair)
545
- _arguments \\
546
- '--all[Repair every drifted stream in one audited pass]' \\
547
- '--dry-run[Preview the re-anchor impact without writing the history file]' \\
548
- '--author[Mutation author]:author' \\
549
- '--message[Audit history message]:message' \\
550
- '--force[Force ownership/lock override]' \\
551
- '--json[Output JSON]' \\
552
- '--quiet[Suppress stdout]'
553
- ;;
554
- schema)
555
- _arguments \\
556
- '1:subcommand:(list show show-status add-type remove-type add-status remove-status add-field remove-field list-fields show-field apply-preset rename-type rename-field remap-status)' \\
557
- '--description[Human description for the custom item type, status, or field]:text' \\
558
- '--default-status[Default status hint for the custom item type]:status' \\
559
- '--folder[Storage folder for items of this custom type]:dir' \\
560
- '--alias[Alias for the custom type, status, or field flag (repeatable)]:name' \\
561
- '--role[Lifecycle role for a custom status (repeatable)]:role' \\
562
- '--order[Display/sort order for a custom status]:n' \\
563
- '--type[Value type for a custom field]:type:(string number boolean string_array array object)' \\
564
- '--commands[Commands a custom field is wired onto (repeatable)]:commands' \\
565
- '--cli-flag[Override the auto-derived CLI flag for a custom field]:flag' \\
566
- '--required[Mark a custom field as always required]' \\
567
- '--required-on-create[Mark a custom field as required at create time]' \\
568
- '--no-allow-unset[Disallow clearing a custom field via --unset]' \\
569
- '--required-types[Restrict a custom field requirement to specific item types (repeatable)]:types' \\
570
- '--infer[Infer item types from title-prefix conventions (add-type)]' \\
571
- '--min-count[Minimum items sharing a prefix for --infer]:n' \\
572
- '--apply[Register inferred types (with --infer)]' \\
573
- '--author[Mutation author]:author' \\
574
- '--force[Force ownership/lock override]' \\
575
- '--json[Output JSON]' \\
576
- '--quiet[Suppress stdout]'
577
- ;;
578
- profile)
579
- _arguments \\
580
- '1:subcommand:(list show apply lint)' \\
581
- '2:name:(agile ops research)' \\
582
- '--dry-run[Preview the apply diff without writing any files]' \\
583
- '--author[Mutation author]:author' \\
584
- '--force[Force ownership/lock override]' \\
585
- '--json[Output JSON]' \\
586
- '--quiet[Suppress stdout]'
587
- ;;
588
- plan)
589
- _arguments \\
590
- '1:subcommand:(create show add-step update-step complete-step block-step reorder-step remove-step link unlink decision discovery validation resume approve materialize)' \\
591
- '--title[Plan title]:title' \\
592
- '--scope[Plan scope statement]:scope' \\
593
- '--harness[Plan harness provenance]:harness:(codex claude-code cursor generic)' \\
594
- '--mode[Plan mode]:mode:(draft research review approved executing paused completed superseded)' \\
595
- '--resume-context[Resume context summary]:text' \\
596
- '--step-title[Step title]:title' \\
597
- '*--step[Step title (repeatable on create)]:title' \\
598
- '--step-status[Step status]:status:(pending in_progress completed blocked skipped superseded)' \\
599
- '--step-evidence[Step evidence]:text' \\
600
- '--depends-on[Pm item id step depends on]:id' \\
601
- '--link[Pm item id to link]:id' \\
602
- '--link-kind[Link kind]:kind:(related blocks blocked_by depends_on discovered_from implements verifies supersedes)' \\
603
- '--depth[Show depth]:depth:(brief standard deep)' \\
604
- '--steps[Step ids/orders for materialize]:steps' \\
605
- '--materialize-type[Item type for materialized steps]:type' \\
606
- '--allow-multiple-active[Allow multiple in_progress steps]' \\
607
- '--promote-to-item-dep[Also add link as top-level item dependency]' \\
608
- '--author[Mutation author]:author' \\
609
- '--message[Mutation message]:message' \\
610
- '--force[Force ownership override]' \\
611
- '--json[Output JSON]' \\
612
- '--quiet[Suppress stdout]'
613
- ;;
614
- activity)
615
- _arguments \\
616
- '--id[Filter by item ID]:id' \\
617
- '--op[Filter by history operation]:op' \\
618
- '--author[Filter by history author]:author' \\
619
- '--from[Lower timestamp bound (ISO/date string or relative)]:date' \\
620
- '--to[Upper timestamp bound (ISO/date string or relative)]:date' \\
621
- '--limit[Max entries]:number' \\
622
- '--compact[Condensed activity projection]' \\
623
- '--full[Show full activity entries]' \\
624
- '--provenance[Patch-free identity and agent provenance projection]' \\
625
- '--provenance-summary[Include bounded provenance completeness counts]' \\
626
- '*--harness[Filter by recorded or vocabulary-resolved harness]:harness' \\
627
- '*--agent-instance[Filter by privacy-safe agent instance]:instance' \\
628
- '*--provenance-filter[Filter by exact declared provenance value]:dimension=value' \\
629
- '--stream[Emit line-delimited JSON rows]:mode' \\
630
- '--json[Output JSON]' \\
631
- '--quiet[Suppress stdout]'
632
- ;;
633
- contracts)
634
- _arguments \\
635
- '--action[Filter schema by tool action]:action' \\
636
- '--command[Scope output to one command (narrow-by-default)]:command' \\
637
- '--summary[Return compact command intent summary]' \\
638
- '--schema-only[Return schema-only payload]' \\
639
- '--flags-only[Return command flag contracts only]' \\
640
- '--availability-only[Return action availability only]' \\
641
- '--runtime-only[Include only actions invocable in the current runtime]' \\
642
- '--active-only[Alias for --runtime-only]' \\
643
- '--json[Output JSON]' \\
644
- '--quiet[Suppress stdout]'
645
- ;;
646
- gc)
647
- _arguments \\
648
- '--dry-run[Preview cleanup targets without deleting files]' \\
649
- '--scope[Limit cleanup to one or more scopes: index, embeddings, runtime, locks, checkpoints, transactions]:scope' \\
650
- '--json[Output JSON]' \\
651
- '--quiet[Suppress stdout]'
652
- ;;
653
- stats)
654
- _arguments \\
655
- '--storage[Include aggregate history-stream storage metrics]' \\
656
- '--metadata-coverage[Include metadata coverage percentages overall and by type]' \\
657
- '--field-utilization[Include content-field utilization rates across all items]' \\
658
- '--by-assignee[Lifecycle-bucketed breakdown grouped by assignee]' \\
659
- '--by-tag[Lifecycle-bucketed breakdown grouped by tag]' \\
660
- '--by-priority[Lifecycle-bucketed breakdown grouped by priority]' \\
661
- '--tag-prefix[With --by-tag: only count tags with this prefix]:prefix' \\
662
- '--json[Output JSON]' \\
663
- '--quiet[Suppress stdout]'
664
- ;;
665
- comments)
666
- _arguments \\
667
- '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
668
- '--stdin[Read comment text from stdin (supports multiline markdown)]' \\
669
- '--file[Read comment text from file (supports multiline markdown)]:path' \\
670
- '--edit[Replace the comment at 1-based index (text from positional/--add/--stdin/--file)]:index' \\
671
- '--delete[Delete the comment at 1-based index]:index' \\
672
- '--limit[Return only latest n entries]:number' \\
673
- '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\
674
- '--message[History message]:message' \\
675
- '--force[Force override]' \\
676
- '--json[Output JSON]' \\
677
- '--quiet[Suppress stdout]'
678
- ;;
679
- notes)
680
- _arguments \\
681
- '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
682
- '--add-json[Append one validated JSON context event]:json' \\
683
- '--stdin[Read entry text from stdin]' \\
684
- '--file[Read entry text from file]:path' \\
685
- '--edit[Replace the entry at a 1-based index]:index' \\
686
- '--delete[Delete the entry at a 1-based index]:index' \\
687
- '--limit[Return only latest n entries]:number' \\
688
- '--since[Return structured events at or after an ISO timestamp]:timestamp' \\
689
- '--event-type[Return structured events with this top-level type]:event_type' \\
690
- '--include-meta[Include result counts and truncation metadata]' \\
691
- '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\
692
- '--message[History message]:message' \\
693
- '--force[Force override]' \\
694
- '--json[Output JSON]' \\
695
- '--quiet[Suppress stdout]'
696
- ;;
697
- learnings)
698
- _arguments \\
699
- '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
700
- '--stdin[Read entry text from stdin]' \\
701
- '--file[Read entry text from file]:path' \\
702
- '--edit[Replace the entry at a 1-based index]:index' \\
703
- '--delete[Delete the entry at a 1-based index]:index' \\
704
- '--limit[Return only latest n entries]:number' \\
705
- '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\
706
- '--message[History message]:message' \\
707
- '--force[Force override]' \\
708
- '--json[Output JSON]' \\
709
- '--quiet[Suppress stdout]'
710
- ;;
711
- files)
712
- _arguments \\
713
- '1:subcommand:(discover lookup)' \\
714
- '--add[Add a linked file]:file' \\
715
- '--add-glob[Add linked files matching a glob]:glob' \\
716
- '--remove[Remove a linked file]:file' \\
717
- '--migrate[Migrate linked-file metadata]' \\
718
- '--list[List linked files]' \\
719
- '--apply[Apply discovered linked files]' \\
720
- '--note[Linked-file note]:note' \\
721
- '--append-stable[Preserve stable append ordering]' \\
722
- '--validate-paths[Validate linked-file paths]' \\
723
- '--scope[Filter lookup by evidence scope]:(project global)' \\
724
- '--limit[Maximum lookup matches]:number' \\
725
- '--offset[Skip the first lookup matches]:number' \\
726
- '--no-truncate[Return every lookup match]' \\
727
- '--strict-read[Require authoritative source reads]' \\
728
- '--author[Mutation author]:author' \\
729
- '--message[History message]:message' \\
730
- '--force[Force override]' \\
731
- '--json[Output JSON]' \\
732
- '--quiet[Suppress stdout]'
733
- ;;
734
- deps)
735
- _arguments \\
736
- '--format[Output format]:(tree graph context)' \\
737
- '--max-depth[Maximum traversal depth (0 keeps root only)]:depth' \\
738
- '--collapse[Collapse mode]:(none repeated)' \\
739
- '--summary[Return counts only without tree/graph payload]' \\
740
- '--node-limit[Maximum nodes in context output]:number' \\
741
- '--edge-limit[Maximum edges in context output]:number' \\
742
- '--token-budget[Maximum estimated tokens in context output]:number' \\
743
- '--cursor[Continue an equivalent context query]:cursor' \\
744
- '--direction[Context traversal direction]:(outgoing incoming both)' \\
745
- '--kind[Restrict context traversal to relationship kinds]:kind' \\
746
- '--json[Output JSON]' \\
747
- '--quiet[Suppress stdout]'
748
- ;;
749
- graph)
750
- _arguments \\
751
- '1:subcommand:(ancestors descendants predecessors successors paths impact analyze audit communities redundancy dominators slack centrality articulation plan index)' \\
752
- '--kind[Restrict traversal to registered relationship kinds]:kind' \\
753
- '--max-depth[Maximum traversal depth]:depth' \\
754
- '--limit[Maximum returned rows per bounded collection]:number' \\
755
- '--after[Resume a traversal after this node id]:id' \\
756
- '--direction[Edge orientation for paths/impact]:(outgoing incoming both)' \\
757
- '--max-paths[Maximum enumerated paths]:number' \\
758
- '--sample[Maximum evidence sample entries per audit finding]:number' \\
759
- '--exempt-isolate[Item ids treated as explicitly valid isolates]:id' \\
760
- '--exempt-isolate-type[Item types whose active isolates are policy-valid]:type' \\
761
- '--save-baseline[Persist the audit census as the comparison baseline]' \\
762
- '--rebuild[Rebuild and warm the durable graph index]' \\
763
- '--clear[Delete the durable graph index]' \\
764
- '--summary[Return counts-first envelopes without row collections]' \\
765
- '--json[Output JSON]' \\
766
- '--quiet[Suppress stdout]'
767
- ;;
768
- test)
769
- _arguments \\
770
- '--add[Add linked test entry]:entry' \\
771
- '--add-json[Add linked test entry from JSON object/array]:json' \\
772
- '--remove[Remove linked test entry by command/path]:entry' \\
773
- '--list[List linked tests without mutating]' \\
774
- '--run[Run linked tests]' \\
775
- '--match[Run linked tests whose command/path contains substring]:substring' \\
776
- '--only-index[Run one linked test by 1-based index]:number' \\
777
- '--only-last[Run the most recently added linked test]' \\
778
- '--background[Run linked tests in managed background mode]' \\
779
- '--timeout[Default timeout seconds]:seconds' \\
780
- '--progress[Emit linked-test progress to stderr]' \\
781
- '--env-set[Set linked-test runtime environment values]:entry' \\
782
- '--env-clear[Clear linked-test runtime environment values]:name' \\
783
- '--shared-host-safe[Apply shared-host-safe runtime defaults]' \\
784
- '--pm-context[PM linked-test context mode]:(schema tracker auto)' \\
785
- '--override-linked-pm-context[Force run-level --pm-context over per-linked-test pm_context_mode metadata]' \\
786
- '--fail-on-context-mismatch[Fail when context item counts mismatch]' \\
787
- '--fail-on-skipped[Treat skipped linked tests as dependency failures]' \\
788
- '--fail-on-empty-test-run[Treat empty linked-test selections as failures]' \\
789
- '--require-assertions-for-pm[Require assertions for linked PM command tests]' \\
790
- '--check-context[Preflight linked PM command context diagnostics before execution]' \\
791
- '--auto-pm-context[Auto-remediate tracker-read context mismatches using tracker context]' \\
792
- '--author[Mutation author]:author' \\
793
- '--message[History message]:message' \\
794
- '--force[Force override]' \\
795
- '--json[Output JSON]' \\
796
- '--quiet[Suppress stdout]'
797
- ;;
798
- test-all)
799
- _arguments \\
800
- '--status[Filter by status]:(open in_progress)' \\
801
- '--limit[Limit matching items before running linked tests]:number' \\
802
- '--offset[Skip matching items before running linked tests]:number' \\
803
- '--background[Run linked tests in managed background mode]' \\
804
- '--timeout[Default timeout seconds]:seconds' \\
805
- '--progress[Emit linked-test progress to stderr]' \\
806
- '--env-set[Set linked-test runtime environment values]:entry' \\
807
- '--env-clear[Clear linked-test runtime environment values]:name' \\
808
- '--shared-host-safe[Apply shared-host-safe runtime defaults]' \\
809
- '--pm-context[PM linked-test context mode]:(schema tracker auto)' \\
810
- '--override-linked-pm-context[Force run-level --pm-context over per-linked-test pm_context_mode metadata]' \\
811
- '--fail-on-context-mismatch[Fail when context item counts mismatch]' \\
812
- '--fail-on-skipped[Treat skipped linked tests as dependency failures]' \\
813
- '--fail-on-empty-test-run[Treat empty linked-test selections as failures]' \\
814
- '--require-assertions-for-pm[Require assertions for linked PM command tests]' \\
815
- '--check-context[Preflight linked PM command context diagnostics before execution]' \\
816
- '--auto-pm-context[Auto-remediate tracker-read context mismatches using tracker context]' \\
817
- '--json[Output JSON]' \\
818
- '--quiet[Suppress stdout]'
819
- ;;
820
- test-runs)
821
- _arguments \\
822
- '1:subcommand:(list status logs stop resume)' \\
823
- '--status[Filter by background run status]:status:(queued running passed failed stopped canceled)' \\
824
- '--limit[Limit returned runs]:number' \\
825
- '--stream[Background log stream]:stream:(stdout stderr both)' \\
826
- '--tail[Tail number of lines]:number' \\
827
- '--force[Force stop with SIGKILL]' \\
828
- '--author[Resume author]:author' \\
829
- '--json[Output JSON]' \\
830
- '--quiet[Suppress stdout]'
831
- ;;
832
- init)
833
- _arguments \\
834
- '(1)--id-prefix[Set the item ID prefix]:prefix' \\
835
- '(1)--prefix[Alias for --id-prefix]:prefix' \\
836
- '1:optional id prefix or tracker path' \\
837
- '--preset[Governance preset for new setups]:preset:(minimal default strict)' \\
838
- '--defaults[Use non-interactive setup defaults]' \\
839
- '-y[Alias for --defaults]' \\
840
- '--yes[Alias for --defaults]' \\
841
- '--author[Set the default mutation author for this project]:author' \\
842
- '--agent-guidance[Agent guidance mode]:mode:(ask add skip status)' \\
843
- '--type-preset[Register domain item types]:type-preset:(agile ops research)' \\
844
- '--with-packages[Install bundled first-party packages during initialization]' \\
845
- '--verbose[Include the full resolved settings tree in init output]' \\
846
- '--json[Output JSON]' \\
847
- '--quiet[Suppress stdout]'
848
- ;;
849
- config)
850
- _arguments \\
851
- '--criterion[Criteria value for definition-of-done metadata-required-fields or lifecycle pattern keys (repeatable for set)]:criterion' \\
852
- '--clear-criteria[Clear config criteria-list key values]' \\
853
- '--format[Item format for item-format key]:format:(toon)' \\
854
- '--policy[Policy value for supported policy keys]:policy' \\
855
- '--json[Output JSON]' \\
856
- '--quiet[Suppress stdout]'
857
- ;;
858
- close)
859
- _arguments \\
860
- '--reason[Closure reason]:reason' \\
861
- '--close-reason[Alias for --reason]:close_reason' \\
862
- '--author[Mutation author]:author' \\
863
- '--message[History message]:message' \\
864
- '--validate-close[Validate closure metadata mode]:(off warn strict)' \\
865
- '--resolution[Closure resolution summary]:resolution' \\
866
- '--expected-result[Expected behavior note]:expected_result' \\
867
- '--actual-result[Observed behavior note]:actual_result' \\
868
- '--expected[Short alias for --expected-result]:expected_result' \\
869
- '--actual[Short alias for --actual-result]:actual_result' \\
870
- '--force[Force override]' \\
871
- '--json[Output JSON]' \\
872
- '--quiet[Suppress stdout]'
873
- ;;
874
- claim)
875
- _arguments \\
876
- '--author[Mutation author]:author' \\
877
- '--message[History message]:message' \\
878
- '--force[Force override]' \\
879
- '--if-available[Skip work held by another author]' \\
880
- '--next[Atomically claim the next actionable item]' \\
881
- '--type[Filter --next candidates by type]:(${a})' \\
882
- '--tag[Filter --next candidates by tag]:(${f})' \\
883
- '--priority[Filter --next candidates by priority]:(0 1 2 3 4)' \\
884
- '--assignee-filter[Filter --next candidates by ownership]:assignee_filter:(assigned unassigned)' \\
885
- '--parent[Scope --next candidates to a subtree]:parent' \\
886
- '--sprint[Filter --next candidates by sprint]:sprint' \\
887
- '--release[Filter --next candidates by release]:release' \\
888
- '--max-attempts[Bound the --next candidate walk]:max_attempts' \\
889
- '--include-decisions[Allow human-gated Decision candidates]' \\
890
- '--token-budget[Bound ranked candidate tokens]:token_budget' \\
891
- '--explain-ranking[Include ranking provenance]' \\
892
- '--json[Output JSON]' \\
893
- '--quiet[Suppress stdout]'
894
- ;;
895
- release)
896
- _arguments \\
897
- '--author[Mutation author]:author' \\
898
- '--message[History message]:message' \\
899
- '--force[Force override]' \\
900
- '--json[Output JSON]' \\
901
- '--quiet[Suppress stdout]'
902
- ;;
903
- delete)
904
- _arguments \\
905
- '--dry-run[Preview the item file that would be deleted without mutating]' \\
906
- '--author[Mutation author]:author' \\
907
- '--message[History message]:message' \\
908
- '--force[Force override]' \\
909
- '--json[Output JSON]' \\
910
- '--quiet[Suppress stdout]'
911
- ;;
912
- start-task|pause-task)
913
- _arguments \\
914
- '--author[Mutation author]:author' \\
915
- '--message[History message]:message' \\
916
- '--force[Force override]' \\
917
- '--json[Output JSON]' \\
918
- '--quiet[Suppress stdout]'
919
- ;;
920
- close-task)
921
- _arguments \\
922
- '--author[Mutation author]:author' \\
923
- '--message[History message]:message' \\
924
- '--validate-close[Validate closure metadata mode]:(off warn strict)' \\
925
- '--force[Force override]' \\
926
- '--json[Output JSON]' \\
927
- '--quiet[Suppress stdout]'
928
- ;;
929
- validate)
930
- _arguments \\
931
- '--check-metadata[Run metadata completeness checks]' \\
932
- '--metadata-profile[Select metadata validation profile for --check-metadata]:(core strict custom)' \\
933
- '--check-resolution[Run closed-item resolution metadata checks]' \\
934
- '--check-lifecycle[Run active-item lifecycle governance drift checks]' \\
935
- '--check-stale-blockers[Include stale blocker-pattern diagnostics in lifecycle checks]' \\
936
- '--dependency-cycle-severity[Set dependency-cycle warning policy for lifecycle checks]:(off warn error)' \\
937
- '--parent-cycle-severity[Set parent-hierarchy cycle warning policy for lifecycle checks]:(off warn error)' \\
938
- '--check-files[Run linked-file and orphaned-file checks]' \\
939
- '--scan-mode[Select file candidate scan mode for --check-files]:(default tracked-all tracked-all-strict)' \\
940
- '--include-pm-internals[Include PM storage internals in tracked-all candidate scans]' \\
941
- '--verbose-file-lists[Include full file-path lists for validate --check-files details]' \\
942
- '--verbose-diagnostics[Include full validate diagnostic ID lists instead of compact summaries]' \\
943
- '--all-affected-ids[Emit complete missing_* affected-ID lists with no truncation (implied by --json)]' \\
944
- '--strict-exit[Return non-zero exit when validation warnings are present]' \\
945
- '--fail-on-warn[Alias for --strict-exit]' \\
946
- '--fix-hints[Add a machine-executable fix_hints[] of pm commands to each failing check]' \\
947
- '--auto-fix[Apply the safe, deterministic subset of fix-hint remediations automatically]' \\
948
- '--dry-run[Preview planned --auto-fix/--prune-missing fixes without applying them]' \\
949
- '--fix-scope[Grant --auto-fix scopes (estimates/lifecycle must be named explicitly)]:(metadata resolution estimates lifecycle)' \\
950
- '--prune-missing[Remove stale linked-file/doc links classified as deleted]' \\
951
- '--check-history-drift[Run item/history hash drift checks]' \\
952
- '--check-command-references[Run linked-command PM-ID reference checks]' \\
953
- '--json[Output JSON]' \\
954
- '--quiet[Suppress stdout]'
955
- ;;
956
- health)
957
- _arguments \\
958
- '--strict-directories[Treat optional item-type directories as required failures]' \\
959
- '--check-only[Run read-only health diagnostics without refreshing vectors]' \\
960
- '--no-refresh[Disable automatic vector refresh attempts during health checks]' \\
961
- '--refresh-vectors[Explicitly enable vector refresh attempts during health checks]' \\
962
- '--verbose-stale-items[Include full stale vectorization ID lists in health output]' \\
963
- '--verbose-author-events[Include complete actionable unknown-author coordinates]' \\
964
- '--brief[Emit compact health details for low-token agent checks]' \\
965
- '--summary[Emit one-line-style health status with check names and warning count]' \\
966
- '--strict-exit[Return non-zero exit when health warnings are present]' \\
967
- '--fail-on-warn[Alias for --strict-exit]' \\
968
- '--json[Output JSON]' \\
969
- '--quiet[Suppress stdout]'
970
- ;;
971
- extension)
972
- _arguments \\
973
- '1:extension_action:(init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate)' \\
974
- '--init[Generate a starter extension scaffold at target path]' \\
975
- '--scaffold[Alias for --init]' \\
976
- '--capability[Capability the init scaffold targets]:capability:(${Ie.join(" ")})' \\
977
- '--install[Install extension from local path or GitHub source]' \\
978
- '--uninstall[Uninstall extension by name]' \\
979
- '--explore[List discovered extensions for selected scope]' \\
980
- '--manage[List managed extensions with update metadata]' \\
981
- '--describe[Map every surface a loaded extension registers]' \\
982
- '--markdown[Render describe output as a Markdown reference document]' \\
983
- '--output[Write describe Markdown to a file]:path:_files' \\
984
- '--reload[Reload extensions with cache-busted module imports]' \\
985
- '--watch[Enable watch mode with --reload]' \\
986
- '--doctor[Run consolidated extension diagnostics (summary/deep)]' \\
987
- '--catalog[List bundled first-party package catalog entries]' \\
988
- '--adopt[Adopt an unmanaged extension into managed metadata]' \\
989
- '--adopt-all[Adopt all unmanaged extensions into managed metadata]' \\
990
- '--activate[Activate extension in selected scope settings]' \\
991
- '--deactivate[Deactivate extension in selected scope settings]' \\
992
- '--project[Use project extension scope (default)]' \\
993
- '--local[Alias for --project]' \\
994
- '--global[Use global extension scope]' \\
995
- '--gh[Install from GitHub shorthand owner/repo/path]:github_spec' \\
996
- '--github[Alias for --gh]:github_spec' \\
997
- '--ref[Git ref/branch/tag for GitHub source]:git_ref' \\
998
- '--detail[Detail mode for extension diagnostics]:detail_mode:(summary deep)' \\
999
- '--trace[Include registration traces in doctor deep diagnostics]' \\
1000
- '--runtime-probe[Opt-in runtime activation probe for manage output]' \\
1001
- '--fix-managed-state[Adopt unmanaged extensions before diagnostics/update checks]' \\
1002
- '--isolated[Run doctor against project-scope extensions only]' \\
1003
- '--ignore-global[Alias for --isolated]' \\
1004
- '--strict-exit[Return non-zero exit when doctor warnings are present]' \\
1005
- '--fail-on-warn[Alias for --strict-exit (doctor)]' \\
1006
- '--json[Output JSON]' \\
1007
- '--quiet[Suppress stdout]' \\
1008
- '*:target_or_name:_files -/'
1009
- ;;
1010
- package|packages)
1011
- _arguments \\
1012
- '1:package_action:(init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate)' \\
1013
- '--init[Generate a starter package scaffold at target path]' \\
1014
- '--scaffold[Alias for --init]' \\
1015
- '--capability[Capability the init scaffold targets]:capability:(${Ie.join(" ")})' \\
1016
- '--declarative[Generate a composeExtension blueprint starter]' \\
1017
- '--install[Install package from local path, GitHub source, npm source, or bundled alias]' \\
1018
- '--uninstall[Uninstall package by name]' \\
1019
- '--explore[List discovered packages for selected scope]' \\
1020
- '--manage[List managed packages with update metadata]' \\
1021
- '--describe[Map every surface a loaded package registers]' \\
1022
- '--markdown[Render describe output as a Markdown reference document]' \\
1023
- '--output[Write describe Markdown to a file]:path:_files' \\
1024
- '--reload[Reload packages with cache-busted module imports]' \\
1025
- '--watch[Enable watch mode with --reload]' \\
1026
- '--doctor[Run consolidated package diagnostics (summary/deep)]' \\
1027
- '--catalog[List bundled first-party package catalog entries]' \\
1028
- '--adopt[Adopt an unmanaged package into managed metadata]' \\
1029
- '--adopt-all[Adopt all unmanaged packages into managed metadata]' \\
1030
- '--activate[Activate package in selected scope settings]' \\
1031
- '--deactivate[Deactivate package in selected scope settings]' \\
1032
- '--project[Use project package scope (default)]' \\
1033
- '--local[Alias for --project]' \\
1034
- '--global[Use global package scope]' \\
1035
- '--gh[Install from GitHub shorthand owner/repo/path]:github_spec' \\
1036
- '--github[Alias for --gh]:github_spec' \\
1037
- '--ref[Git ref/branch/tag for GitHub source]:git_ref' \\
1038
- '--detail[Detail mode for package diagnostics]:detail_mode:(summary deep)' \\
1039
- '--trace[Include registration traces in doctor deep diagnostics]' \\
1040
- '--runtime-probe[Opt-in runtime activation probe for manage output]' \\
1041
- '--fix-managed-state[Adopt unmanaged packages before diagnostics/update checks]' \\
1042
- '--isolated[Run doctor against project-scope packages only]' \\
1043
- '--ignore-global[Alias for --isolated]' \\
1044
- '--strict-exit[Return non-zero exit when doctor warnings are present]' \\
1045
- '--fail-on-warn[Alias for --strict-exit (doctor)]' \\
1046
- '--json[Output JSON]' \\
1047
- '--quiet[Suppress stdout]' \\
1048
- '*:target_or_name:_files -/'
1049
- ;;
1050
- completion)
1051
- _arguments \\
1052
- '--eager-tags[Embed current tracker tags directly in script output]' \\
1053
- '1:shell:(bash zsh fish)'
1054
- ;;
1055
- templates)
1056
- local -a templates_cmds
1057
- templates_cmds=('save:Save or update a create template' 'list:List saved create templates' 'show:Show saved template details')
1058
- _describe 'templates command' templates_cmds
1059
- ;;
1060
- esac
1061
- ;;
1062
- esac
1063
- }
1064
-
1065
- compdef _pm pm`}function Gd(e=[],t=[],n=!1,s={}){let o=os.filter(ve=>ve==="list"||ve.startsWith("list-")),r=o.join(" "),i=os.join(" "),a=e.length===0,c=is(e,s),d=as(s),m=a?"(__pm_type_choices)":c,p="(__pm_status_choices)",f=rs,g=ye(t),w=n||t.length>0,b=w?`'${g}'`:"'(__pm_tag_choices)'",v=le(o,s.command_flags?.list),h=le(["create"],s.command_flags?.create),A=le(["update"],s.command_flags?.update),R=le(["update-many"],s.command_flags?.["update-many"]),H=le(["search"],s.command_flags?.search),V=le(["calendar","cal"],s.command_flags?.calendar),Me=le(["context","ctx"],s.command_flags?.context);return`# Fish shell completion for pm
1066
- # Save to ~/.config/fish/completions/pm.fish
1067
- # or run: pm completion fish > ~/.config/fish/completions/pm.fish
1068
-
1069
- # Disable file completion by default
1070
- complete -c pm -f
1071
-
1072
- # Global flags (available for all subcommands)
1073
- complete -c pm -l json -d 'Output JSON instead of TOON'
1074
- complete -c pm -l quiet -d 'Suppress stdout output'
1075
- complete -c pm -l output-include -d 'Retain comma-separated read fields or sections' -r
1076
- complete -c pm -l output-limit -d 'Set the universal read row ceiling' -r
1077
- complete -c pm -l output-budget -d 'Set the universal estimated-token ceiling' -r
1078
- complete -c pm -l output-format -d 'Select the universal read encoding' -r -a 'toon json'
1079
- complete -c pm -l output-session -d 'Carry cross-call read budget and served-item state' -r
1080
- complete -c pm -l no-changed-fields -d 'Omit changed_fields array from mutation output'
1081
- complete -c pm -l id-only -d 'Print only id and status for single-item mutation output'
1082
- complete -c pm -l pm-path -d 'Explicit tracker storage path for this command' -r
1083
- complete -c pm -l path -d 'Override PM path for this command' -r
1084
- complete -c pm -l no-extensions -d 'Disable extension loading'
1085
- complete -c pm -l profile -d 'Print deterministic timing diagnostics'
1086
- complete -c pm -s V -l version -d 'Output the version number'
1087
- complete -c pm -s h -l help -d 'Display help'
1088
-
1089
- # Helper: true when no subcommand has been given yet
1090
- function __pm_no_subcommand
1091
- not __fish_seen_subcommand_from ${i}
1092
- end
1093
- ${w?"":`
1094
- function __pm_tag_choices
1095
- set -l now (date +%s ^/dev/null)
1096
- if test -z "$now"
1097
- set now 0
1098
- end
1099
- set -l ttl 120
1100
- if set -q PM_COMPLETION_TAG_TTL
1101
- set ttl $PM_COMPLETION_TAG_TTL
1102
- end
1103
- if set -q PM_COMPLETION_TAG_CACHE; and set -q PM_COMPLETION_TAG_CACHE_TS
1104
- set -l age (math "$now - $PM_COMPLETION_TAG_CACHE_TS")
1105
- if test $age -lt $ttl
1106
- printf '%s
1107
- ' $PM_COMPLETION_TAG_CACHE
1108
- return
1109
- end
1110
- end
1111
- set -l resolved (pm completion-tags ^/dev/null)
1112
- set -gx PM_COMPLETION_TAG_CACHE $resolved
1113
- set -gx PM_COMPLETION_TAG_CACHE_TS $now
1114
- printf '%s
1115
- ' $resolved
1116
- end
1117
- `}
1118
- ${a?aa("type","completion-types",c):""}
1119
- ${aa("status","completion-statuses",d)}
1120
-
1121
- # Subcommands
1122
- ${Nd()}
1123
-
1124
- # list* flags
1125
- for list_cmd in ${r}
1126
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l type -d 'Filter by item type' -r -a '${m}'
1127
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l tag -d 'Filter by tag' -r -a ${b}
1128
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l tags -d 'Alias for --tag' -r -a ${b}
1129
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'
1130
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l assignee -d 'Filter by assignee' -r
1131
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'
1132
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l sprint -d 'Filter by sprint' -r
1133
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l release -d 'Filter by release' -r
1134
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l limit -d 'Limit returned item count' -r
1135
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l offset -d 'Skip the first n matching rows before limit' -r
1136
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l no-truncate -d 'Return every matched row, overriding --limit'
1137
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l all -d 'Alias for --no-truncate'
1138
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l include-body -d 'Include item body in each returned list row'
1139
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l compact -d 'Render compact list projection fields'
1140
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l fields -d 'Render custom comma-separated list fields' -r
1141
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l tree -d 'Render hierarchical subtree output rooted at --parent or top-level parents'
1142
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l tree-depth -d 'Cap recursion depth for --tree (0 = root only)' -r
1143
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l sort -d 'Sort field' -r -a 'priority deadline updated_at created_at title parent'
1144
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l order -d 'Sort order (requires --sort)' -r -a 'asc desc'
1145
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l stream -d 'Emit line-delimited JSON rows (requires --json)'
1146
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l deadline-before -d 'Filter by deadline upper bound (ISO/date string or relative)' -r
1147
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l deadline-after -d 'Filter by deadline lower bound (ISO/date string or relative)' -r
1148
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l today -d 'Filter to items updated since local midnight today'
1149
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l recent -d 'Filter to items updated in the last 7 days'
1150
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l updated-after -d 'Filter by updated_at lower bound (ISO/relative)' -r
1151
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l updated-before -d 'Filter by updated_at upper bound (ISO/relative)' -r
1152
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l created-after -d 'Filter by created_at lower bound (ISO/relative)' -r
1153
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l created-before -d 'Filter by created_at upper bound (ISO/relative)' -r
1154
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l filter-reviewer-missing -d 'Select only items missing reviewer'
1155
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l filter-risk-missing -d 'Select only items missing risk'
1156
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l filter-confidence-missing -d 'Select only items missing confidence'
1157
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l filter-sprint-missing -d 'Select only items missing sprint'
1158
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l filter-release-missing -d 'Select only items missing release'
1159
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l has-notes -d 'Select only items that have notes'
1160
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l no-notes -d 'Select only items with no notes'
1161
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l has-learnings -d 'Select only items that have learnings'
1162
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l no-learnings -d 'Select only items with no learnings'
1163
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l has-files -d 'Select only items that have linked files'
1164
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l no-files -d 'Select only items with no linked files'
1165
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l filter-files-missing -d 'Alias for --no-files'
1166
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l has-docs -d 'Select only items that have linked docs'
1167
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l no-docs -d 'Select only items with no linked docs'
1168
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l filter-docs-missing -d 'Alias for --no-docs'
1169
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l has-tests -d 'Select only items that have linked tests'
1170
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l no-tests -d 'Select only items with no linked tests'
1171
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l has-comments -d 'Select only items that have comments'
1172
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l no-comments -d 'Select only items with no comments'
1173
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l has-deps -d 'Select only items that have dependencies'
1174
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l no-deps -d 'Select only items with no dependencies'
1175
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l has-body -d 'Select only items with non-empty body'
1176
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l empty-body -d 'Select only items with empty body'
1177
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l has-linked-command -d 'Select only items that have a linked command'
1178
- complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l no-linked-command -d 'Select only items with no linked command'
1179
- end
1180
- ${v}
1181
-
1182
- # aggregate flags
1183
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l group-by -d 'Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)' -r
1184
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l count -d 'Return grouped counts'
1185
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l completion -d 'Add completion counts and percentage per group'
1186
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l sum -d 'Numeric field to sum per group' -r
1187
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l avg -d 'Numeric field to average per group' -r
1188
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l include-unparented -d 'Include unparented rows when grouping by parent'
1189
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l status -d 'Filter by status' -r -a '${p}'
1190
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l type -d 'Filter by item type' -r -a '${m}'
1191
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l tag -d 'Filter by tag' -r -a ${b}
1192
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'
1193
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l deadline-before -d 'Filter by deadline upper bound (ISO/date string or relative)' -r
1194
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l deadline-after -d 'Filter by deadline lower bound (ISO/date string or relative)' -r
1195
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l assignee -d 'Filter by assignee' -r
1196
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'
1197
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l parent -d 'Filter by parent item ID' -r
1198
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l sprint -d 'Filter by sprint' -r
1199
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l release -d 'Filter by release' -r
1200
-
1201
-
1202
- # create flags
1203
- complete -c pm -n '__fish_seen_subcommand_from create' -s t -l title -d 'Item title' -r
1204
- complete -c pm -n '__fish_seen_subcommand_from create' -s d -l description -d 'Item description' -r
1205
- complete -c pm -n '__fish_seen_subcommand_from create' -l type -d 'Item type' -r -a '${m}'
1206
- complete -c pm -n '__fish_seen_subcommand_from create' -l create-mode -d 'Create required-option policy mode' -r -a 'strict progressive'
1207
- complete -c pm -n '__fish_seen_subcommand_from create' -l schedule-preset -d 'Scheduling preset for Reminder/Meeting/Event' -r -a 'lightweight'
1208
- complete -c pm -n '__fish_seen_subcommand_from create' -s s -l status -d 'Item status' -r -a '${p}'
1209
- complete -c pm -n '__fish_seen_subcommand_from create' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'
1210
- complete -c pm -n '__fish_seen_subcommand_from create' -l tags -d 'Comma-separated tags' -r
1211
- complete -c pm -n '__fish_seen_subcommand_from create' -l add-tags -d 'Add tags additively without replacing existing' -r
1212
- complete -c pm -n '__fish_seen_subcommand_from create' -s b -l body -d 'Item body' -r
1213
- complete -c pm -n '__fish_seen_subcommand_from create' -l body-file -d 'Load the item body from a file' -r -F
1214
- complete -c pm -n '__fish_seen_subcommand_from create' -l deadline -d 'Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)' -r
1215
- complete -c pm -n '__fish_seen_subcommand_from create' -l estimate -d 'Estimated minutes' -r
1216
- complete -c pm -n '__fish_seen_subcommand_from create' -l acceptance-criteria -d 'Acceptance criteria' -r
1217
- complete -c pm -n '__fish_seen_subcommand_from create' -l reminder -d 'Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>' -r
1218
- complete -c pm -n '__fish_seen_subcommand_from create' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r
1219
- complete -c pm -n '__fish_seen_subcommand_from create' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r
1220
- complete -c pm -n '__fish_seen_subcommand_from create' -l author -d 'Mutation author' -r
1221
- complete -c pm -n '__fish_seen_subcommand_from create' -l message -d 'History message' -r
1222
- complete -c pm -n '__fish_seen_subcommand_from create' -l assignee -d 'Assignee' -r
1223
- complete -c pm -n '__fish_seen_subcommand_from create' -l unset -d 'Clear scalar metadata field by name' -r
1224
- complete -c pm -n '__fish_seen_subcommand_from create' -l clear-deps -d 'Clear dependency entries'
1225
- complete -c pm -n '__fish_seen_subcommand_from create' -l clear-comments -d 'Clear comments'
1226
- complete -c pm -n '__fish_seen_subcommand_from create' -l clear-notes -d 'Clear notes'
1227
- complete -c pm -n '__fish_seen_subcommand_from create' -l clear-learnings -d 'Clear learnings'
1228
- complete -c pm -n '__fish_seen_subcommand_from create' -l clear-files -d 'Clear linked files'
1229
- complete -c pm -n '__fish_seen_subcommand_from create' -l clear-tests -d 'Clear linked tests'
1230
- complete -c pm -n '__fish_seen_subcommand_from create' -l clear-docs -d 'Clear linked docs'
1231
- complete -c pm -n '__fish_seen_subcommand_from create' -l clear-reminders -d 'Clear reminders'
1232
- complete -c pm -n '__fish_seen_subcommand_from create' -l clear-events -d 'Clear events'
1233
- complete -c pm -n '__fish_seen_subcommand_from create' -l clear-type-options -d 'Clear type options'
1234
- ${h}
1235
-
1236
- # copy flags
1237
- complete -c pm -n '__fish_seen_subcommand_from copy' -l title -d 'Override copied title' -r
1238
- complete -c pm -n '__fish_seen_subcommand_from copy' -l author -d 'Mutation author' -r
1239
- complete -c pm -n '__fish_seen_subcommand_from copy' -l message -d 'History message' -r
1240
- complete -c pm -n '__fish_seen_subcommand_from copy' -l force -d 'Force ownership override'
1241
-
1242
- # focus flags
1243
- complete -c pm -n '__fish_seen_subcommand_from focus' -l clear -d 'Clear the focused item'
1244
-
1245
- # update flags
1246
- complete -c pm -n '__fish_seen_subcommand_from update' -s t -l title -d 'Item title' -r
1247
- complete -c pm -n '__fish_seen_subcommand_from update' -s d -l description -d 'Item description' -r
1248
- complete -c pm -n '__fish_seen_subcommand_from update' -s b -l body -d 'Item body' -r
1249
- complete -c pm -n '__fish_seen_subcommand_from update' -l body-file -d 'Load the item body from a file' -r -F
1250
- complete -c pm -n '__fish_seen_subcommand_from update' -s s -l status -d 'Item status' -r -a '${p}'
1251
- complete -c pm -n '__fish_seen_subcommand_from update' -l close-reason -d 'Set close reason' -r
1252
- complete -c pm -n '__fish_seen_subcommand_from update' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'
1253
- complete -c pm -n '__fish_seen_subcommand_from update' -l type -d 'Item type' -r -a '${m}'
1254
- complete -c pm -n '__fish_seen_subcommand_from update' -l add-tags -d 'Add tags additively without replacing existing' -r
1255
- complete -c pm -n '__fish_seen_subcommand_from update' -l remove-tags -d 'Remove tags from the existing list' -r
1256
- complete -c pm -n '__fish_seen_subcommand_from update' -l add-ac -d 'Add one acceptance criterion without replacing existing' -r
1257
- complete -c pm -n '__fish_seen_subcommand_from update' -l remove-ac -d 'Remove one acceptance criterion by exact text' -r
1258
- complete -c pm -n '__fish_seen_subcommand_from update' -l expected -d 'Short alias for --expected-result' -r
1259
- complete -c pm -n '__fish_seen_subcommand_from update' -l actual -d 'Short alias for --actual-result' -r
1260
- complete -c pm -n '__fish_seen_subcommand_from update' -l comment -d 'Comment seed author=<value>,created_at=<iso|now>,text=<value>' -r
1261
- complete -c pm -n '__fish_seen_subcommand_from update' -l note -d 'Note seed author=<value>,created_at=<iso|now>,text=<value>' -r
1262
- complete -c pm -n '__fish_seen_subcommand_from update' -l learning -d 'Learning seed author=<value>,created_at=<iso|now>,text=<value>' -r
1263
- complete -c pm -n '__fish_seen_subcommand_from update' -l file -d 'Linked file path=<value>,scope=<project|global>,note=<text>' -r
1264
- complete -c pm -n '__fish_seen_subcommand_from update' -l test -d 'Linked test command=<value>,path=<value>,scope=<project|global>' -r
1265
- complete -c pm -n '__fish_seen_subcommand_from update' -l doc -d 'Linked doc path=<value>,scope=<project|global>,note=<text>' -r
1266
- complete -c pm -n '__fish_seen_subcommand_from update' -l reminder -d 'Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>' -r
1267
- complete -c pm -n '__fish_seen_subcommand_from update' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r
1268
- complete -c pm -n '__fish_seen_subcommand_from update' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r
1269
- complete -c pm -n '__fish_seen_subcommand_from update' -l unset -d 'Clear scalar metadata field by name' -r
1270
- complete -c pm -n '__fish_seen_subcommand_from update' -l replace-deps -d 'Atomically replace dependencies with provided --dep values'
1271
- complete -c pm -n '__fish_seen_subcommand_from update' -l replace-tests -d 'Atomically replace linked tests with provided --test values'
1272
- complete -c pm -n '__fish_seen_subcommand_from update' -l replace-files -d 'Atomically replace linked files with provided --file values'
1273
- complete -c pm -n '__fish_seen_subcommand_from update' -l replace-docs -d 'Atomically replace linked docs with provided --doc values'
1274
- complete -c pm -n '__fish_seen_subcommand_from update' -l clear-deps -d 'Clear dependency entries'
1275
- complete -c pm -n '__fish_seen_subcommand_from update' -l clear-comments -d 'Clear comments'
1276
- complete -c pm -n '__fish_seen_subcommand_from update' -l clear-notes -d 'Clear notes'
1277
- complete -c pm -n '__fish_seen_subcommand_from update' -l clear-learnings -d 'Clear learnings'
1278
- complete -c pm -n '__fish_seen_subcommand_from update' -l clear-files -d 'Clear linked files'
1279
- complete -c pm -n '__fish_seen_subcommand_from update' -l clear-tests -d 'Clear linked tests'
1280
- complete -c pm -n '__fish_seen_subcommand_from update' -l clear-docs -d 'Clear linked docs'
1281
- complete -c pm -n '__fish_seen_subcommand_from update' -l clear-reminders -d 'Clear reminders'
1282
- complete -c pm -n '__fish_seen_subcommand_from update' -l clear-events -d 'Clear events'
1283
- complete -c pm -n '__fish_seen_subcommand_from update' -l clear-type-options -d 'Clear type options'
1284
- complete -c pm -n '__fish_seen_subcommand_from update' -l author -d 'Mutation author' -r
1285
- complete -c pm -n '__fish_seen_subcommand_from update' -l message -d 'History message' -r
1286
- complete -c pm -n '__fish_seen_subcommand_from update' -l force -d 'Force override'
1287
- ${A}
1288
-
1289
- # update-many flags
1290
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-status -d 'Filter by status before applying updates' -r -a '${p}'
1291
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-type -d 'Filter by type before applying updates' -r -a '${m}'
1292
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-tag -d 'Filter by tag before applying updates' -r -a ${b}
1293
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-priority -d 'Filter by priority before applying updates' -r -a '0 1 2 3 4'
1294
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-deadline-before -d 'Filter by deadline upper bound' -r
1295
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-deadline-after -d 'Filter by deadline lower bound' -r
1296
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-updated-after -d 'Filter by updated_at lower bound (ISO/relative)' -r
1297
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-updated-before -d 'Filter by updated_at upper bound (ISO/relative)' -r
1298
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-created-after -d 'Filter by created_at lower bound (ISO/relative)' -r
1299
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-created-before -d 'Filter by created_at upper bound (ISO/relative)' -r
1300
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-assignee -d 'Filter by assignee before applying updates' -r
1301
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'
1302
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-parent -d 'Filter by parent item ID' -r
1303
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-sprint -d 'Filter by sprint before applying updates' -r
1304
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-release -d 'Filter by release before applying updates' -r
1305
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-ac-missing -d 'Select only items missing acceptance_criteria'
1306
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-estimates-missing -d 'Select only items missing estimated_minutes'
1307
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-resolution-missing -d 'Select only terminal items missing resolution'
1308
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-metadata-missing -d 'Select only items missing any tracked metadata'
1309
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-reviewer-missing -d 'Select only items missing reviewer'
1310
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-risk-missing -d 'Select only items missing risk'
1311
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-confidence-missing -d 'Select only items missing confidence'
1312
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-sprint-missing -d 'Select only items missing sprint'
1313
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-release-missing -d 'Select only items missing release'
1314
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-has-notes -d 'Select only items that have notes'
1315
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-no-notes -d 'Select only items with no notes'
1316
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-has-learnings -d 'Select only items that have learnings'
1317
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-no-learnings -d 'Select only items with no learnings'
1318
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-has-files -d 'Select only items that have linked files'
1319
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-no-files -d 'Select only items with no linked files'
1320
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-has-docs -d 'Select only items that have linked docs'
1321
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-no-docs -d 'Select only items with no linked docs'
1322
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-has-tests -d 'Select only items that have linked tests'
1323
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-no-tests -d 'Select only items with no linked tests'
1324
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-has-comments -d 'Select only items that have comments'
1325
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-no-comments -d 'Select only items with no comments'
1326
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-has-deps -d 'Select only items that have dependencies'
1327
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-no-deps -d 'Select only items with no dependencies'
1328
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-has-body -d 'Select only items with non-empty body'
1329
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-empty-body -d 'Select only items with empty body'
1330
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-has-linked-command -d 'Select only items that have a linked command'
1331
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-no-linked-command -d 'Select only items with no linked command'
1332
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l ids -d 'Explicit comma-separated ID allowlist' -r
1333
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l limit -d 'Limit matched item count' -r
1334
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l offset -d 'Skip first n matched rows' -r
1335
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l dry-run -d 'Preview updates without mutating'
1336
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l rollback -d 'Rollback checkpoint ID' -r
1337
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l no-checkpoint -d 'Disable checkpoint creation during apply mode'
1338
- complete -c pm -n '__fish_seen_subcommand_from update-many' -s t -l title -d 'Item title' -r
1339
- complete -c pm -n '__fish_seen_subcommand_from update-many' -s d -l description -d 'Item description' -r
1340
- complete -c pm -n '__fish_seen_subcommand_from update-many' -s b -l body -d 'Item body' -r
1341
- complete -c pm -n '__fish_seen_subcommand_from update-many' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'
1342
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l type -d 'Item type' -r -a '${m}'
1343
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l tags -d 'Comma-separated tags' -r
1344
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l add-tags -d 'Add tags additively without replacing existing' -r
1345
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l remove-tags -d 'Remove tags from the existing list' -r
1346
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l deadline -d 'Deadline (ISO/date string or relative)' -r
1347
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l estimate -d 'Estimated minutes' -r
1348
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l acceptance-criteria -d 'Acceptance criteria' -r
1349
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l add-ac -d 'Add one acceptance criterion without replacing existing' -r
1350
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l remove-ac -d 'Remove one acceptance criterion by exact text' -r
1351
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l definition-of-ready -d 'Definition of ready' -r
1352
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l order -d 'Planning order/rank' -r
1353
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l goal -d 'Goal identifier' -r
1354
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l objective -d 'Objective identifier' -r
1355
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l value -d 'Business value summary' -r
1356
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l impact -d 'Business impact summary' -r
1357
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l outcome -d 'Expected outcome summary' -r
1358
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l why-now -d 'Why-now rationale' -r
1359
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l reviewer -d 'Reviewer' -r
1360
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l risk -d 'Risk level' -r
1361
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l confidence -d 'Confidence level' -r
1362
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l sprint -d 'Sprint identifier' -r
1363
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l release -d 'Release identifier' -r
1364
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l reporter -d 'Issue reporter' -r
1365
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l severity -d 'Issue severity' -r
1366
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l environment -d 'Issue environment context' -r
1367
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l repro-steps -d 'Issue reproduction steps' -r
1368
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l resolution -d 'Issue resolution summary' -r
1369
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l expected-result -d 'Issue expected behavior' -r
1370
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l actual-result -d 'Issue observed behavior' -r
1371
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l expected -d 'Short alias for --expected-result' -r
1372
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l actual -d 'Short alias for --actual-result' -r
1373
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l affected-version -d 'Affected version identifier' -r
1374
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l fixed-version -d 'Fixed version identifier' -r
1375
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l component -d 'Issue component ownership' -r
1376
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l regression -d 'Regression marker true|false|1|0' -r
1377
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l customer-impact -d 'Customer impact summary' -r
1378
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l dep -d 'Dependency seed id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>' -r
1379
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l dep-remove -d 'Dependency removal selector id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>' -r
1380
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l replace-deps -d 'Atomically replace dependencies with provided --dep values'
1381
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l replace-tests -d 'Atomically replace linked tests with provided --test values'
1382
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l replace-files -d 'Atomically replace linked files with provided --file values'
1383
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l replace-docs -d 'Atomically replace linked docs with provided --doc values'
1384
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l comment -d 'Comment seed author=<value>,created_at=<iso|now>,text=<value>' -r
1385
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l note -d 'Note seed author=<value>,created_at=<iso|now>,text=<value>' -r
1386
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l learning -d 'Learning seed author=<value>,created_at=<iso|now>,text=<value>' -r
1387
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l file -d 'Linked file path=<value>,scope=<project|global>,note=<text>' -r
1388
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l test -d 'Linked test command=<value>,path=<value>,scope=<project|global>' -r
1389
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l doc -d 'Linked doc path=<value>,scope=<project|global>,note=<text>' -r
1390
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l reminder -d 'Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>' -r
1391
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r
1392
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r
1393
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l unset -d 'Clear scalar metadata field by name' -r
1394
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-deps -d 'Clear dependency entries'
1395
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-comments -d 'Clear comments'
1396
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-notes -d 'Clear notes'
1397
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-learnings -d 'Clear learnings'
1398
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-files -d 'Clear linked files'
1399
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-tests -d 'Clear linked tests'
1400
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-docs -d 'Clear linked docs'
1401
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-reminders -d 'Clear reminders'
1402
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-events -d 'Clear events'
1403
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-type-options -d 'Clear type options'
1404
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l author -d 'Mutation author' -r
1405
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l message -d 'History message' -r
1406
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l force -d 'Force override'
1407
- ${R}
1408
-
1409
- # files flags
1410
- complete -c pm -n '__fish_seen_subcommand_from files' -a 'discover lookup' -d 'Linked-file subcommand'
1411
- complete -c pm -n '__fish_seen_subcommand_from files' -l add -d 'Add a linked file' -r
1412
- complete -c pm -n '__fish_seen_subcommand_from files' -l add-glob -d 'Add linked files matching a glob' -r
1413
- complete -c pm -n '__fish_seen_subcommand_from files' -l remove -d 'Remove a linked file' -r
1414
- complete -c pm -n '__fish_seen_subcommand_from files' -l migrate -d 'Migrate linked-file metadata'
1415
- complete -c pm -n '__fish_seen_subcommand_from files' -l list -d 'List linked files'
1416
- complete -c pm -n '__fish_seen_subcommand_from files' -l apply -d 'Apply discovered linked files'
1417
- complete -c pm -n '__fish_seen_subcommand_from files' -l note -d 'Linked-file note' -r
1418
- complete -c pm -n '__fish_seen_subcommand_from files' -l append-stable -d 'Preserve stable append ordering'
1419
- complete -c pm -n '__fish_seen_subcommand_from files' -l validate-paths -d 'Validate linked-file paths'
1420
- complete -c pm -n '__fish_seen_subcommand_from files' -l scope -d 'Filter lookup by evidence scope' -r -a 'project global'
1421
- complete -c pm -n '__fish_seen_subcommand_from files' -l limit -d 'Maximum lookup matches' -r
1422
- complete -c pm -n '__fish_seen_subcommand_from files' -l offset -d 'Skip the first lookup matches' -r
1423
- complete -c pm -n '__fish_seen_subcommand_from files' -l no-truncate -d 'Return every lookup match'
1424
- complete -c pm -n '__fish_seen_subcommand_from files' -l strict-read -d 'Require authoritative source reads'
1425
-
1426
-
1427
- # search flags
1428
- complete -c pm -n '__fish_seen_subcommand_from search' -l mode -d 'Search mode' -r -a 'keyword semantic hybrid'
1429
- complete -c pm -n '__fish_seen_subcommand_from search' -l match-mode -d 'Token match mode' -r -a 'and or exact'
1430
- complete -c pm -n '__fish_seen_subcommand_from search' -l min-score -d 'Per-query minimum score threshold' -r
1431
- complete -c pm -n '__fish_seen_subcommand_from search' -l count -d 'Return only the match count'
1432
- complete -c pm -n '__fish_seen_subcommand_from search' -l include-linked -d 'Include linked content in scoring'
1433
- complete -c pm -n '__fish_seen_subcommand_from search' -l highlight -d 'Emit per-field matched-text snippets on each hit'
1434
- complete -c pm -n '__fish_seen_subcommand_from search' -l limit -d 'Max results' -r
1435
- complete -c pm -n '__fish_seen_subcommand_from search' -l status -d 'Filter by status (open/closed/canceled, csv)' -r -a '${p}'
1436
- complete -c pm -n '__fish_seen_subcommand_from search' -l type -d 'Filter by type' -r -a '${m}'
1437
- complete -c pm -n '__fish_seen_subcommand_from search' -l tag -d 'Filter by tag' -r -a ${b}
1438
- complete -c pm -n '__fish_seen_subcommand_from search' -l tags -d 'Alias for --tag' -r -a ${b}
1439
- complete -c pm -n '__fish_seen_subcommand_from search' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'
1440
- complete -c pm -n '__fish_seen_subcommand_from search' -l updated-after -d 'Filter by updated_at lower bound' -r
1441
- complete -c pm -n '__fish_seen_subcommand_from search' -l updated-before -d 'Filter by updated_at upper bound' -r
1442
- complete -c pm -n '__fish_seen_subcommand_from search' -l created-after -d 'Filter by created_at lower bound' -r
1443
- complete -c pm -n '__fish_seen_subcommand_from search' -l created-before -d 'Filter by created_at upper bound' -r
1444
- complete -c pm -n '__fish_seen_subcommand_from search' -l assignee -d 'Filter by assignee' -r
1445
- complete -c pm -n '__fish_seen_subcommand_from search' -l sprint -d 'Filter by sprint' -r
1446
- complete -c pm -n '__fish_seen_subcommand_from search' -l release -d 'Filter by release' -r
1447
- complete -c pm -n '__fish_seen_subcommand_from search' -l parent -d 'Filter by parent item ID' -r
1448
- complete -c pm -n '__fish_seen_subcommand_from search' -l filter-reviewer-missing -d 'Select only items missing reviewer'
1449
- complete -c pm -n '__fish_seen_subcommand_from search' -l filter-risk-missing -d 'Select only items missing risk'
1450
- complete -c pm -n '__fish_seen_subcommand_from search' -l filter-confidence-missing -d 'Select only items missing confidence'
1451
- complete -c pm -n '__fish_seen_subcommand_from search' -l filter-sprint-missing -d 'Select only items missing sprint'
1452
- complete -c pm -n '__fish_seen_subcommand_from search' -l filter-release-missing -d 'Select only items missing release'
1453
- complete -c pm -n '__fish_seen_subcommand_from search' -l has-notes -d 'Select only items that have notes'
1454
- complete -c pm -n '__fish_seen_subcommand_from search' -l no-notes -d 'Select only items with no notes'
1455
- complete -c pm -n '__fish_seen_subcommand_from search' -l has-learnings -d 'Select only items that have learnings'
1456
- complete -c pm -n '__fish_seen_subcommand_from search' -l no-learnings -d 'Select only items with no learnings'
1457
- complete -c pm -n '__fish_seen_subcommand_from search' -l has-files -d 'Select only items that have linked files'
1458
- complete -c pm -n '__fish_seen_subcommand_from search' -l no-files -d 'Select only items with no linked files'
1459
- complete -c pm -n '__fish_seen_subcommand_from search' -l filter-files-missing -d 'Alias for --no-files'
1460
- complete -c pm -n '__fish_seen_subcommand_from search' -l has-docs -d 'Select only items that have linked docs'
1461
- complete -c pm -n '__fish_seen_subcommand_from search' -l no-docs -d 'Select only items with no linked docs'
1462
- complete -c pm -n '__fish_seen_subcommand_from search' -l filter-docs-missing -d 'Alias for --no-docs'
1463
- complete -c pm -n '__fish_seen_subcommand_from search' -l has-tests -d 'Select only items that have linked tests'
1464
- complete -c pm -n '__fish_seen_subcommand_from search' -l no-tests -d 'Select only items with no linked tests'
1465
- complete -c pm -n '__fish_seen_subcommand_from search' -l has-comments -d 'Select only items that have comments'
1466
- complete -c pm -n '__fish_seen_subcommand_from search' -l no-comments -d 'Select only items with no comments'
1467
- complete -c pm -n '__fish_seen_subcommand_from search' -l has-deps -d 'Select only items that have dependencies'
1468
- complete -c pm -n '__fish_seen_subcommand_from search' -l no-deps -d 'Select only items with no dependencies'
1469
- complete -c pm -n '__fish_seen_subcommand_from search' -l has-body -d 'Select only items with non-empty body'
1470
- complete -c pm -n '__fish_seen_subcommand_from search' -l empty-body -d 'Select only items with empty body'
1471
- complete -c pm -n '__fish_seen_subcommand_from search' -l has-linked-command -d 'Select only items that have a linked command'
1472
- complete -c pm -n '__fish_seen_subcommand_from search' -l no-linked-command -d 'Select only items with no linked command'
1473
- ${H}
1474
-
1475
- # calendar flags
1476
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l view -d 'Calendar view' -r -a 'agenda day week month'
1477
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l date -d 'Anchor date/time (ISO/date string or relative)' -r
1478
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l from -d 'Agenda lower bound (ISO/date string or relative)' -r
1479
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l to -d 'Agenda upper bound (ISO/date string or relative)' -r
1480
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l past -d 'Include past entries'
1481
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l full-period -d 'Include full anchored day/week/month period'
1482
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l type -d 'Filter by type' -r -a '${m}'
1483
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l tag -d 'Filter by tag' -r -a ${b}
1484
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'
1485
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l status -d 'Filter by status' -r -a '${p}'
1486
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l assignee -d 'Filter by assignee' -r
1487
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'
1488
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l sprint -d 'Filter by sprint' -r
1489
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l release -d 'Filter by release' -r
1490
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l include -d 'Include event sources' -r -a 'all deadlines reminders events scheduled'
1491
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l recurrence-lookahead-days -d 'Bound open-ended recurrence lookahead' -r
1492
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l recurrence-lookback-days -d 'Bound open-ended recurrence lookback' -r
1493
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l occurrence-limit -d 'Cap occurrences per recurring event' -r
1494
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l limit -d 'Limit returned events' -r
1495
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l format -d 'Output override' -r -a 'markdown toon json'
1496
- ${V}
1497
-
1498
- # context flags
1499
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l date -d 'Anchor date/time (ISO/date string or relative)' -r
1500
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l from -d 'Agenda lower bound (ISO/date string or relative)' -r
1501
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l to -d 'Agenda upper bound (ISO/date string or relative)' -r
1502
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l past -d 'Include past entries in bounded windows'
1503
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l type -d 'Filter by type' -r -a '${m}'
1504
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l tag -d 'Filter by tag' -r -a ${b}
1505
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'
1506
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l assignee -d 'Filter by assignee' -r
1507
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'
1508
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l sprint -d 'Filter by sprint' -r
1509
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l release -d 'Filter by release' -r
1510
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l parent -d 'Scope snapshot to one item subtree' -r
1511
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l limit -d 'Limit focus and agenda rows per section' -r
1512
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l depth -d 'Context depth' -r -a 'brief standard deep full'
1513
- complete -c pm -n '__fish_seen_subcommand_from context ctx' -l format -d 'Output override' -r -a 'markdown toon json'
1514
- ${Me}
1515
-
1516
- # next flags
1517
- complete -c pm -n '__fish_seen_subcommand_from next' -l type -d 'Filter candidates by type' -r -a '${m}'
1518
- complete -c pm -n '__fish_seen_subcommand_from next' -l tag -d 'Filter candidates by tag' -r -a ${b}
1519
- complete -c pm -n '__fish_seen_subcommand_from next' -l priority -d 'Filter candidates by priority' -r -a '0 1 2 3 4'
1520
- complete -c pm -n '__fish_seen_subcommand_from next' -l assignee -d 'Filter candidates by assignee' -r
1521
- complete -c pm -n '__fish_seen_subcommand_from next' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'
1522
- complete -c pm -n '__fish_seen_subcommand_from next' -l sprint -d 'Filter candidates by sprint' -r
1523
- complete -c pm -n '__fish_seen_subcommand_from next' -l release -d 'Filter candidates by release' -r
1524
- complete -c pm -n '__fish_seen_subcommand_from next' -l parent -d 'Scope to one item subtree' -r
1525
- complete -c pm -n '__fish_seen_subcommand_from next' -l limit -d 'Limit ready rows' -r
1526
- complete -c pm -n '__fish_seen_subcommand_from next' -l blocked-limit -d 'Limit blocked rows' -r
1527
- complete -c pm -n '__fish_seen_subcommand_from next' -l ready-only -d 'Omit the blocked companion list'
1528
- complete -c pm -n '__fish_seen_subcommand_from next' -l format -d 'Output override' -r -a 'markdown toon json'
1529
-
1530
- # guide flags
1531
- complete -c pm -n '__fish_seen_subcommand_from guide' -l list -d 'Show guide topic index'
1532
- complete -c pm -n '__fish_seen_subcommand_from guide' -l format -d 'Output override' -r -a 'markdown toon json'
1533
- complete -c pm -n '__fish_seen_subcommand_from guide' -l depth -d 'Guide detail depth' -r -a 'brief standard deep'
1534
- complete -c pm -n '__fish_seen_subcommand_from guide' -a '${f}' -d 'Guide topic'
1535
-
1536
- # reindex flags
1537
- complete -c pm -n '__fish_seen_subcommand_from reindex' -l mode -d 'Reindex mode' -r -a 'keyword semantic hybrid'
1538
- complete -c pm -n '__fish_seen_subcommand_from reindex' -l progress -d 'Emit progress updates to stderr'
1539
-
1540
- # get flags
1541
- complete -c pm -n '__fish_seen_subcommand_from get' -l depth -d 'Detail depth' -r -a 'brief standard deep full'
1542
- complete -c pm -n '__fish_seen_subcommand_from get' -l full -d 'Explicit full item read'
1543
- complete -c pm -n '__fish_seen_subcommand_from get' -l fields -d 'Render custom comma-separated item fields' -r
1544
- complete -c pm -n '__fish_seen_subcommand_from get' -l tree -d 'Include descendant subtree in result payload'
1545
- complete -c pm -n '__fish_seen_subcommand_from get' -l tree-depth -d 'Cap subtree depth for --tree (0 = root only)' -r
1546
-
1547
- # history / activity flags
1548
- complete -c pm -n '__fish_seen_subcommand_from history' -l limit -d 'Max history entries' -r
1549
- complete -c pm -n '__fish_seen_subcommand_from history' -l compact -d 'Condensed history projection'
1550
- complete -c pm -n '__fish_seen_subcommand_from history' -l full -d 'Show full history entries'
1551
- complete -c pm -n '__fish_seen_subcommand_from history' -l provenance -d 'Patch-free identity and agent provenance projection'
1552
- complete -c pm -n '__fish_seen_subcommand_from history' -l provenance-summary -d 'Include bounded provenance completeness counts'
1553
- complete -c pm -n '__fish_seen_subcommand_from history' -l harness -d 'Filter by recorded or vocabulary-resolved harness' -r
1554
- complete -c pm -n '__fish_seen_subcommand_from history' -l agent-instance -d 'Filter by privacy-safe agent instance' -r
1555
- complete -c pm -n '__fish_seen_subcommand_from history' -l provenance-filter -d 'Filter by exact declared provenance value' -r
1556
- complete -c pm -n '__fish_seen_subcommand_from history' -l diff -d 'Include per-entry field-level before/after value diffs'
1557
- complete -c pm -n '__fish_seen_subcommand_from history' -l field -d 'With --diff, show only entries that changed this field' -r
1558
- complete -c pm -n '__fish_seen_subcommand_from history' -l verify -d 'Verify history hash chain and replay integrity'
1559
- complete -c pm -n '__fish_seen_subcommand_from events' -l since -d 'Resume after a cursor or from an ISO timestamp' -r
1560
- complete -c pm -n '__fish_seen_subcommand_from events' -l type -d 'Filter by mutation operation' -r
1561
- complete -c pm -n '__fish_seen_subcommand_from events' -l author -d 'Filter by mutation author' -r
1562
- complete -c pm -n '__fish_seen_subcommand_from events' -l item -d 'Filter by item or workspace stream' -r
1563
- complete -c pm -n '__fish_seen_subcommand_from events' -l limit -d 'Maximum events, up to 1000' -r
1564
- complete -c pm -n '__fish_seen_subcommand_from events' -l full -d 'Include complete authoritative history entries'
1565
- complete -c pm -n '__fish_seen_subcommand_from events' -l provenance -d 'Include patch-free identity and agent provenance'
1566
- complete -c pm -n '__fish_seen_subcommand_from events' -l provenance-summary -d 'Include bounded provenance completeness counts'
1567
- complete -c pm -n '__fish_seen_subcommand_from events' -l harness -d 'Filter by recorded or vocabulary-resolved harness' -r
1568
- complete -c pm -n '__fish_seen_subcommand_from events' -l agent-instance -d 'Filter by privacy-safe agent instance' -r
1569
- complete -c pm -n '__fish_seen_subcommand_from events' -l provenance-filter -d 'Filter by exact declared provenance value' -r
1570
- complete -c pm -n '__fish_seen_subcommand_from events' -l follow -d 'Continue emitting committed events'
1571
- complete -c pm -n '__fish_seen_subcommand_from events' -l interval-ms -d 'Empty-read delay while following' -r
1572
- complete -c pm -n '__fish_seen_subcommand_from history-compact' -l before -d 'Compact entries strictly before this version number or ISO timestamp' -r
1573
- complete -c pm -n '__fish_seen_subcommand_from history-compact' -l ids -d 'Bulk: compact an explicit comma-separated list of item ids' -r
1574
- complete -c pm -n '__fish_seen_subcommand_from history-compact' -l all-over -d 'Bulk: compact every stream with more than N entries' -r
1575
- complete -c pm -n '__fish_seen_subcommand_from history-compact' -l closed -d 'Bulk: compact only closed (terminal) items streams'
1576
- complete -c pm -n '__fish_seen_subcommand_from history-compact' -l all-streams -d 'Bulk: compact every history stream regardless of lifecycle state'
1577
- complete -c pm -n '__fish_seen_subcommand_from history-compact' -l min-entries -d 'Bulk: skip streams with at most N entries' -r
1578
- complete -c pm -n '__fish_seen_subcommand_from history-compact' -l dry-run -d 'Preview compaction impact without writing the history file'
1579
- complete -c pm -n '__fish_seen_subcommand_from history-compact' -l author -d 'Mutation author' -r
1580
- complete -c pm -n '__fish_seen_subcommand_from history-compact' -l message -d 'Audit history message' -r
1581
- complete -c pm -n '__fish_seen_subcommand_from history-compact' -l force -d 'Force ownership/lock override'
1582
- complete -c pm -n '__fish_seen_subcommand_from history-author-acknowledge' -l event -d 'Actionable unknown-author event' -r
1583
- complete -c pm -n '__fish_seen_subcommand_from history-author-acknowledge' -l all-actionable -d 'Select every currently actionable event'
1584
- complete -c pm -n '__fish_seen_subcommand_from history-author-acknowledge' -l attributed-author -d 'Principal attributed by maintainer review' -r
1585
- complete -c pm -n '__fish_seen_subcommand_from history-author-acknowledge' -l reviewer -d 'Reviewer recording the disposition' -r
1586
- complete -c pm -n '__fish_seen_subcommand_from history-author-acknowledge' -l reason -d 'Evidence-backed review rationale' -r
1587
- complete -c pm -n '__fish_seen_subcommand_from history-redact' -l literal -d 'Literal string matcher to redact from history/item payloads' -r
1588
- complete -c pm -n '__fish_seen_subcommand_from history-redact' -l regex -d 'Regex matcher to redact (/pattern/flags or raw pattern)' -r
1589
- complete -c pm -n '__fish_seen_subcommand_from history-redact' -l replacement -d 'Replacement text (defaults to [redacted])' -r
1590
- complete -c pm -n '__fish_seen_subcommand_from history-redact' -l dry-run -d 'Preview redaction impact without writing files'
1591
- complete -c pm -n '__fish_seen_subcommand_from history-redact' -l author -d 'Mutation author' -r
1592
- complete -c pm -n '__fish_seen_subcommand_from history-redact' -l message -d 'Audit history message' -r
1593
- complete -c pm -n '__fish_seen_subcommand_from history-redact' -l force -d 'Force ownership/lock override'
1594
- complete -c pm -n '__fish_seen_subcommand_from history-repair' -l all -d 'Repair every drifted stream in one audited pass'
1595
- complete -c pm -n '__fish_seen_subcommand_from history-repair' -l dry-run -d 'Preview the re-anchor impact without writing the history file'
1596
- complete -c pm -n '__fish_seen_subcommand_from history-repair' -l author -d 'Mutation author' -r
1597
- complete -c pm -n '__fish_seen_subcommand_from history-repair' -l message -d 'Audit history message' -r
1598
- complete -c pm -n '__fish_seen_subcommand_from history-repair' -l force -d 'Force ownership/lock override'
1599
- complete -c pm -n '__fish_seen_subcommand_from schema' -a 'list show show-status add-type remove-type add-status remove-status add-field remove-field list-fields show-field apply-preset rename-type rename-field remap-status' -d 'Schema subcommand'
1600
- complete -c pm -n '__fish_seen_subcommand_from schema' -l description -d 'Human description for the custom item type, status, or field' -r
1601
- complete -c pm -n '__fish_seen_subcommand_from schema' -l default-status -d 'Default status hint for the custom item type' -r
1602
- complete -c pm -n '__fish_seen_subcommand_from schema' -l folder -d 'Storage folder for items of this custom type' -r
1603
- complete -c pm -n '__fish_seen_subcommand_from schema' -l alias -d 'Alias for the custom type, status, or field flag (repeatable)' -r
1604
- complete -c pm -n '__fish_seen_subcommand_from schema' -l role -d 'Lifecycle role for a custom status (repeatable)' -r
1605
- complete -c pm -n '__fish_seen_subcommand_from schema' -l order -d 'Display/sort order for a custom status' -r
1606
- complete -c pm -n '__fish_seen_subcommand_from schema' -l type -d 'Value type for a custom field' -r -a 'string number boolean string_array array object'
1607
- complete -c pm -n '__fish_seen_subcommand_from schema' -l commands -d 'Commands a custom field is wired onto (repeatable)' -r
1608
- complete -c pm -n '__fish_seen_subcommand_from schema' -l cli-flag -d 'Override the auto-derived CLI flag for a custom field' -r
1609
- complete -c pm -n '__fish_seen_subcommand_from schema' -l required -d 'Mark a custom field as always required'
1610
- complete -c pm -n '__fish_seen_subcommand_from schema' -l required-on-create -d 'Mark a custom field as required at create time'
1611
- complete -c pm -n '__fish_seen_subcommand_from schema' -l no-allow-unset -d 'Disallow clearing a custom field via --unset'
1612
- complete -c pm -n '__fish_seen_subcommand_from schema' -l required-types -d 'Restrict a custom field requirement to specific item types (repeatable)' -r
1613
- complete -c pm -n '__fish_seen_subcommand_from schema' -l infer -d 'Infer item types from title-prefix conventions (add-type)'
1614
- complete -c pm -n '__fish_seen_subcommand_from schema' -l min-count -d 'Minimum items sharing a prefix for --infer' -r
1615
- complete -c pm -n '__fish_seen_subcommand_from schema' -l apply -d 'Register inferred types (with --infer)'
1616
- complete -c pm -n '__fish_seen_subcommand_from schema' -l author -d 'Mutation author' -r
1617
- complete -c pm -n '__fish_seen_subcommand_from schema' -l force -d 'Force ownership/lock override'
1618
- complete -c pm -n '__fish_seen_subcommand_from profile' -a 'list show apply lint' -d 'Profile subcommand'
1619
- complete -c pm -n '__fish_seen_subcommand_from profile' -a 'agile ops research' -d 'Profile name'
1620
- complete -c pm -n '__fish_seen_subcommand_from profile' -l dry-run -d 'Preview the apply diff without writing any files'
1621
- complete -c pm -n '__fish_seen_subcommand_from profile' -l author -d 'Mutation author' -r
1622
- complete -c pm -n '__fish_seen_subcommand_from profile' -l force -d 'Force ownership/lock override'
1623
- complete -c pm -n '__fish_seen_subcommand_from plan' -a 'create show add-step update-step complete-step block-step reorder-step remove-step link unlink decision discovery validation resume approve materialize' -d 'Plan subcommand'
1624
- complete -c pm -n '__fish_seen_subcommand_from plan' -l title -d 'Plan title' -r
1625
- complete -c pm -n '__fish_seen_subcommand_from plan' -l scope -d 'Plan scope statement' -r
1626
- complete -c pm -n '__fish_seen_subcommand_from plan' -l harness -d 'Plan harness provenance' -r -a 'codex claude-code cursor generic'
1627
- complete -c pm -n '__fish_seen_subcommand_from plan' -l mode -d 'Plan mode' -r -a 'draft research review approved executing paused completed superseded'
1628
- complete -c pm -n '__fish_seen_subcommand_from plan' -l resume-context -d 'Resume context summary' -r
1629
- complete -c pm -n '__fish_seen_subcommand_from plan' -l step-title -d 'Step title' -r
1630
- complete -c pm -n '__fish_seen_subcommand_from plan' -l step -d 'Step title (repeatable on create)' -r
1631
- complete -c pm -n '__fish_seen_subcommand_from plan' -l step-status -d 'Step status' -r -a 'pending in_progress completed blocked skipped superseded'
1632
- complete -c pm -n '__fish_seen_subcommand_from plan' -l step-evidence -d 'Step evidence' -r
1633
- complete -c pm -n '__fish_seen_subcommand_from plan' -l depends-on -d 'Pm item id step depends on' -r
1634
- complete -c pm -n '__fish_seen_subcommand_from plan' -l link -d 'Pm item id to link' -r
1635
- complete -c pm -n '__fish_seen_subcommand_from plan' -l link-kind -d 'Link kind' -r -a 'related blocks blocked_by depends_on discovered_from implements verifies supersedes'
1636
- complete -c pm -n '__fish_seen_subcommand_from plan' -l depth -d 'Show depth' -r -a 'brief standard deep'
1637
- complete -c pm -n '__fish_seen_subcommand_from plan' -l steps -d 'Step ids/orders for materialize' -r
1638
- complete -c pm -n '__fish_seen_subcommand_from plan' -l materialize-type -d 'Item type for materialized steps' -r
1639
- complete -c pm -n '__fish_seen_subcommand_from plan' -l allow-multiple-active -d 'Allow multiple in_progress steps'
1640
- complete -c pm -n '__fish_seen_subcommand_from plan' -l promote-to-item-dep -d 'Also add link as item dependency'
1641
- complete -c pm -n '__fish_seen_subcommand_from plan' -l author -d 'Mutation author' -r
1642
- complete -c pm -n '__fish_seen_subcommand_from plan' -l message -d 'Mutation message' -r
1643
- complete -c pm -n '__fish_seen_subcommand_from plan' -l force -d 'Force ownership override'
1644
- complete -c pm -n '__fish_seen_subcommand_from activity' -l id -d 'Filter by item ID' -r
1645
- complete -c pm -n '__fish_seen_subcommand_from activity' -l op -d 'Filter by history operation' -r
1646
- complete -c pm -n '__fish_seen_subcommand_from activity' -l author -d 'Filter by history author' -r
1647
- complete -c pm -n '__fish_seen_subcommand_from activity' -l from -d 'Lower timestamp bound (ISO/date string or relative)' -r
1648
- complete -c pm -n '__fish_seen_subcommand_from activity' -l to -d 'Upper timestamp bound (ISO/date string or relative)' -r
1649
- complete -c pm -n '__fish_seen_subcommand_from activity' -l limit -d 'Max activity entries' -r
1650
- complete -c pm -n '__fish_seen_subcommand_from activity' -l compact -d 'Condensed activity projection'
1651
- complete -c pm -n '__fish_seen_subcommand_from activity' -l full -d 'Show full activity entries'
1652
- complete -c pm -n '__fish_seen_subcommand_from activity' -l provenance -d 'Patch-free identity and agent provenance projection'
1653
- complete -c pm -n '__fish_seen_subcommand_from activity' -l provenance-summary -d 'Include bounded provenance completeness counts'
1654
- complete -c pm -n '__fish_seen_subcommand_from activity' -l harness -d 'Filter by recorded or vocabulary-resolved harness' -r
1655
- complete -c pm -n '__fish_seen_subcommand_from activity' -l agent-instance -d 'Filter by privacy-safe agent instance' -r
1656
- complete -c pm -n '__fish_seen_subcommand_from activity' -l provenance-filter -d 'Filter by exact declared provenance value' -r
1657
- complete -c pm -n '__fish_seen_subcommand_from activity' -l stream -d 'Emit line-delimited JSON rows'
1658
- complete -c pm -n '__fish_seen_subcommand_from contracts' -l action -d 'Filter schema by tool action' -r
1659
- complete -c pm -n '__fish_seen_subcommand_from contracts' -l command -d 'Scope output to one command (narrow-by-default)' -r
1660
- complete -c pm -n '__fish_seen_subcommand_from contracts' -l summary -d 'Return compact command intent summary'
1661
- complete -c pm -n '__fish_seen_subcommand_from contracts' -l schema-only -d 'Return schema-only payload'
1662
- complete -c pm -n '__fish_seen_subcommand_from contracts' -l flags-only -d 'Return command flag contracts only'
1663
- complete -c pm -n '__fish_seen_subcommand_from contracts' -l availability-only -d 'Return action availability only'
1664
- complete -c pm -n '__fish_seen_subcommand_from contracts' -l runtime-only -d 'Include only actions invocable in the current runtime'
1665
- complete -c pm -n '__fish_seen_subcommand_from contracts' -l active-only -d 'Alias for --runtime-only'
1666
- complete -c pm -n '__fish_seen_subcommand_from deps' -l format -d 'Output format' -r -a 'tree graph context'
1667
- complete -c pm -n '__fish_seen_subcommand_from deps' -l max-depth -d 'Maximum traversal depth (0 keeps root only)' -r
1668
- complete -c pm -n '__fish_seen_subcommand_from deps' -l collapse -d 'Collapse mode' -r -a 'none repeated'
1669
- complete -c pm -n '__fish_seen_subcommand_from deps' -l summary -d 'Return counts only without tree/graph payload'
1670
- complete -c pm -n '__fish_seen_subcommand_from deps' -l node-limit -d 'Maximum nodes in context output' -r
1671
- complete -c pm -n '__fish_seen_subcommand_from deps' -l edge-limit -d 'Maximum edges in context output' -r
1672
- complete -c pm -n '__fish_seen_subcommand_from deps' -l token-budget -d 'Maximum estimated tokens in context output' -r
1673
- complete -c pm -n '__fish_seen_subcommand_from deps' -l cursor -d 'Continue an equivalent context query' -r
1674
- complete -c pm -n '__fish_seen_subcommand_from deps' -l direction -d 'Context traversal direction' -r -a 'outgoing incoming both'
1675
- complete -c pm -n '__fish_seen_subcommand_from deps' -l kind -d 'Restrict context traversal to relationship kinds' -r
1676
- complete -c pm -n '__fish_seen_subcommand_from graph' -a 'ancestors descendants predecessors successors paths impact analyze audit communities redundancy dominators slack centrality articulation plan index' -d 'Graph query'
1677
- complete -c pm -n '__fish_seen_subcommand_from graph' -l kind -d 'Restrict traversal to registered relationship kinds' -r
1678
- complete -c pm -n '__fish_seen_subcommand_from graph' -l max-depth -d 'Maximum traversal depth' -r
1679
- complete -c pm -n '__fish_seen_subcommand_from graph' -l limit -d 'Maximum returned rows per bounded collection' -r
1680
- complete -c pm -n '__fish_seen_subcommand_from graph' -l after -d 'Resume a traversal after this node id' -r
1681
- complete -c pm -n '__fish_seen_subcommand_from graph' -l direction -d 'Edge orientation for paths/impact' -r -a 'outgoing incoming both'
1682
- complete -c pm -n '__fish_seen_subcommand_from graph' -l max-paths -d 'Maximum enumerated paths' -r
1683
- complete -c pm -n '__fish_seen_subcommand_from graph' -l sample -d 'Maximum evidence sample entries per audit finding' -r
1684
- complete -c pm -n '__fish_seen_subcommand_from graph' -l exempt-isolate -d 'Item ids treated as explicitly valid isolates' -r
1685
- complete -c pm -n '__fish_seen_subcommand_from graph' -l exempt-isolate-type -d 'Item types whose active isolates are policy-valid' -r
1686
- complete -c pm -n '__fish_seen_subcommand_from graph' -l save-baseline -d 'Persist the audit census as the comparison baseline'
1687
- complete -c pm -n '__fish_seen_subcommand_from graph' -l rebuild -d 'Rebuild and warm the durable graph index'
1688
- complete -c pm -n '__fish_seen_subcommand_from graph' -l clear -d 'Delete the durable graph index'
1689
- complete -c pm -n '__fish_seen_subcommand_from graph' -l summary -d 'Return counts-first envelopes without row collections'
1690
-
1691
- # comments / notes / learnings flags
1692
- complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l add -d 'Add one entry (text=<value> or plain text)' -r
1693
- complete -c pm -n '__fish_seen_subcommand_from notes' -l add-json -d 'Append one validated JSON context event' -r
1694
- complete -c pm -n '__fish_seen_subcommand_from notes' -l since -d 'Return structured events at or after an ISO timestamp' -r
1695
- complete -c pm -n '__fish_seen_subcommand_from notes' -l event-type -d 'Return structured events with this top-level type' -r
1696
- complete -c pm -n '__fish_seen_subcommand_from notes' -l include-meta -d 'Include result counts and truncation metadata'
1697
- complete -c pm -n '__fish_seen_subcommand_from comments' -l stdin -d 'Read comment text from stdin (supports multiline markdown)'
1698
- complete -c pm -n '__fish_seen_subcommand_from comments' -l file -d 'Read comment text from file (supports multiline markdown)' -r
1699
- complete -c pm -n '__fish_seen_subcommand_from comments' -l edit -d 'Replace the comment at 1-based index (text from positional/--add/--stdin/--file)' -r
1700
- complete -c pm -n '__fish_seen_subcommand_from comments' -l delete -d 'Delete the comment at 1-based index' -r
1701
- complete -c pm -n '__fish_seen_subcommand_from notes' -l stdin -d 'Read entry text from stdin'
1702
- complete -c pm -n '__fish_seen_subcommand_from notes' -l file -d 'Read entry text from file' -r
1703
- complete -c pm -n '__fish_seen_subcommand_from notes' -l edit -d 'Replace the entry at a 1-based index' -r
1704
- complete -c pm -n '__fish_seen_subcommand_from notes' -l delete -d 'Delete the entry at a 1-based index' -r
1705
- complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l limit -d 'Return only latest n entries' -r
1706
- complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l author -d 'Entry author' -r
1707
- complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l message -d 'History message' -r
1708
- complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l force -d 'Force override'
1709
-
1710
- # test flags
1711
- complete -c pm -n '__fish_seen_subcommand_from test' -l add -d 'Add linked test entry' -r
1712
- complete -c pm -n '__fish_seen_subcommand_from test' -l add-json -d 'Add linked test entry from JSON object/array' -r
1713
- complete -c pm -n '__fish_seen_subcommand_from test' -l remove -d 'Remove linked test entry' -r
1714
- complete -c pm -n '__fish_seen_subcommand_from test' -l list -d 'List linked tests without mutating'
1715
- complete -c pm -n '__fish_seen_subcommand_from test' -l run -d 'Run linked tests'
1716
- complete -c pm -n '__fish_seen_subcommand_from test' -l match -d 'Run linked tests whose command/path contains substring' -r
1717
- complete -c pm -n '__fish_seen_subcommand_from test' -l only-index -d 'Run one linked test by 1-based index' -r
1718
- complete -c pm -n '__fish_seen_subcommand_from test' -l only-last -d 'Run the most recently added linked test'
1719
- complete -c pm -n '__fish_seen_subcommand_from test' -l background -d 'Run linked tests in managed background mode'
1720
- complete -c pm -n '__fish_seen_subcommand_from test' -l timeout -d 'Default timeout seconds' -r
1721
- complete -c pm -n '__fish_seen_subcommand_from test' -l progress -d 'Emit linked-test progress to stderr'
1722
- complete -c pm -n '__fish_seen_subcommand_from test' -l env-set -d 'Set linked-test runtime environment values' -r
1723
- complete -c pm -n '__fish_seen_subcommand_from test' -l env-clear -d 'Clear linked-test runtime environment values' -r
1724
- complete -c pm -n '__fish_seen_subcommand_from test' -l shared-host-safe -d 'Apply shared-host-safe runtime defaults'
1725
- complete -c pm -n '__fish_seen_subcommand_from test' -l pm-context -d 'PM linked-test context mode' -r -a 'schema tracker auto'
1726
- complete -c pm -n '__fish_seen_subcommand_from test' -l override-linked-pm-context -d 'Force run-level --pm-context over per-linked-test metadata'
1727
- complete -c pm -n '__fish_seen_subcommand_from test' -l fail-on-context-mismatch -d 'Fail when context item counts mismatch'
1728
- complete -c pm -n '__fish_seen_subcommand_from test' -l fail-on-skipped -d 'Treat skipped linked tests as dependency failures'
1729
- complete -c pm -n '__fish_seen_subcommand_from test' -l fail-on-empty-test-run -d 'Treat empty linked-test selections as failures'
1730
- complete -c pm -n '__fish_seen_subcommand_from test' -l require-assertions-for-pm -d 'Require assertions for linked PM command tests'
1731
- complete -c pm -n '__fish_seen_subcommand_from test' -l check-context -d 'Preflight linked PM command context diagnostics before execution'
1732
- complete -c pm -n '__fish_seen_subcommand_from test' -l auto-pm-context -d 'Auto-remediate tracker-read context mismatches using tracker context'
1733
- complete -c pm -n '__fish_seen_subcommand_from test' -l author -d 'Mutation author' -r
1734
- complete -c pm -n '__fish_seen_subcommand_from test' -l message -d 'History message' -r
1735
- complete -c pm -n '__fish_seen_subcommand_from test' -l force -d 'Force override'
1736
-
1737
- # test-all flags
1738
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l status -d 'Filter by status' -r -a 'open in_progress'
1739
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l limit -d 'Limit matching items before running linked tests' -r
1740
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l offset -d 'Skip matching items before running linked tests' -r
1741
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l background -d 'Run linked tests in managed background mode'
1742
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l timeout -d 'Default timeout seconds' -r
1743
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l progress -d 'Emit linked-test progress to stderr'
1744
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l env-set -d 'Set linked-test runtime environment values' -r
1745
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l env-clear -d 'Clear linked-test runtime environment values' -r
1746
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l shared-host-safe -d 'Apply shared-host-safe runtime defaults'
1747
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l pm-context -d 'PM linked-test context mode' -r -a 'schema tracker auto'
1748
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l override-linked-pm-context -d 'Force run-level --pm-context over per-linked-test metadata'
1749
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l fail-on-context-mismatch -d 'Fail when context item counts mismatch'
1750
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l fail-on-skipped -d 'Treat skipped linked tests as dependency failures'
1751
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l fail-on-empty-test-run -d 'Treat empty linked-test selections as failures'
1752
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l require-assertions-for-pm -d 'Require assertions for linked PM command tests'
1753
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l check-context -d 'Preflight linked PM command context diagnostics before execution'
1754
- complete -c pm -n '__fish_seen_subcommand_from test-all' -l auto-pm-context -d 'Auto-remediate tracker-read context mismatches using tracker context'
1755
-
1756
- # test-runs flags
1757
- complete -c pm -n '__fish_seen_subcommand_from test-runs' -a 'list status logs stop resume' -d 'test-runs subcommand'
1758
- complete -c pm -n '__fish_seen_subcommand_from test-runs' -l status -d 'Filter background runs by status' -r -a 'queued running passed failed stopped canceled'
1759
- complete -c pm -n '__fish_seen_subcommand_from test-runs' -l limit -d 'Limit returned runs' -r
1760
- complete -c pm -n '__fish_seen_subcommand_from test-runs' -l stream -d 'Background log stream selector' -r -a 'stdout stderr both'
1761
- complete -c pm -n '__fish_seen_subcommand_from test-runs' -l tail -d 'Tail number of lines from logs' -r
1762
- complete -c pm -n '__fish_seen_subcommand_from test-runs' -l force -d 'Force-stop run with SIGKILL'
1763
- complete -c pm -n '__fish_seen_subcommand_from test-runs' -l author -d 'Resume author' -r
1764
-
1765
- # gc flags
1766
- complete -c pm -n '__fish_seen_subcommand_from gc' -l dry-run -d 'Preview cleanup targets without deleting files'
1767
- complete -c pm -n '__fish_seen_subcommand_from gc' -l scope -d 'Limit cleanup to index/embeddings/runtime/locks scopes' -r
1768
-
1769
- # stats flags
1770
- complete -c pm -n '__fish_seen_subcommand_from stats' -l storage -d 'Include aggregate history-stream storage metrics'
1771
- complete -c pm -n '__fish_seen_subcommand_from stats' -l metadata-coverage -d 'Include metadata coverage percentages overall and by type'
1772
- complete -c pm -n '__fish_seen_subcommand_from stats' -l field-utilization -d 'Include content-field utilization rates across all items'
1773
- complete -c pm -n '__fish_seen_subcommand_from stats' -l by-assignee -d 'Lifecycle-bucketed breakdown grouped by assignee'
1774
- complete -c pm -n '__fish_seen_subcommand_from stats' -l by-tag -d 'Lifecycle-bucketed breakdown grouped by tag'
1775
- complete -c pm -n '__fish_seen_subcommand_from stats' -l by-priority -d 'Lifecycle-bucketed breakdown grouped by priority'
1776
- complete -c pm -n '__fish_seen_subcommand_from stats' -l tag-prefix -d 'With --by-tag: only count tags with this prefix' -r
1777
- complete -c pm -n '__fish_seen_subcommand_from stats' -l analytics -d 'Improvement ledger/history analytics JSON' -r
1778
-
1779
- # append flags
1780
- complete -c pm -n '__fish_seen_subcommand_from append' -s b -l body -d 'Item body' -r
1781
- complete -c pm -n '__fish_seen_subcommand_from append' -l author -d 'Mutation author' -r
1782
- complete -c pm -n '__fish_seen_subcommand_from append' -l message -d 'History message' -r
1783
- complete -c pm -n '__fish_seen_subcommand_from append' -l force -d 'Force override'
1784
-
1785
- # close flags
1786
- complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task delete' -l author -d 'Mutation author' -r
1787
- complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task delete' -l message -d 'History message' -r
1788
- complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task delete' -l force -d 'Force override'
1789
- complete -c pm -n '__fish_seen_subcommand_from claim' -l if-available -d 'Skip work held by another author'
1790
- complete -c pm -n '__fish_seen_subcommand_from claim' -l next -d 'Atomically claim the next actionable item'
1791
- complete -c pm -n '__fish_seen_subcommand_from claim' -l token-budget -d 'Bound ranked candidate tokens' -r
1792
- complete -c pm -n '__fish_seen_subcommand_from claim' -l explain-ranking -d 'Include ranking provenance'
1793
- complete -c pm -n '__fish_seen_subcommand_from close close-task' -l validate-close -d 'Validate closure metadata mode' -r -a 'off warn strict'
1794
- complete -c pm -n '__fish_seen_subcommand_from close' -l reason -d 'Closure reason' -r
1795
- complete -c pm -n '__fish_seen_subcommand_from close' -l close-reason -d 'Alias for --reason' -r
1796
- complete -c pm -n '__fish_seen_subcommand_from close' -l resolution -d 'Closure resolution summary' -r
1797
- complete -c pm -n '__fish_seen_subcommand_from close' -l expected-result -d 'Expected behavior note' -r
1798
- complete -c pm -n '__fish_seen_subcommand_from close' -l actual-result -d 'Observed behavior note' -r
1799
- complete -c pm -n '__fish_seen_subcommand_from close' -l expected -d 'Short alias for --expected-result' -r
1800
- complete -c pm -n '__fish_seen_subcommand_from close' -l actual -d 'Short alias for --actual-result' -r
1801
- complete -c pm -n '__fish_seen_subcommand_from delete' -l dry-run -d 'Preview the item file that would be deleted without mutating'
1802
-
1803
- # scheduling shortcut flags (meet/event/remind)
1804
- complete -c pm -n '__fish_seen_subcommand_from meet event' -l start -d 'Start time (ISO, now, or relative)' -r
1805
- complete -c pm -n '__fish_seen_subcommand_from meet event' -l duration -d 'Duration from start (default 1h)' -r
1806
- complete -c pm -n '__fish_seen_subcommand_from meet event' -l end -d 'End time (overrides --duration)' -r
1807
- complete -c pm -n '__fish_seen_subcommand_from meet event' -l location -d 'Location' -r
1808
- complete -c pm -n '__fish_seen_subcommand_from meet event' -l timezone -d 'IANA timezone' -r
1809
- complete -c pm -n '__fish_seen_subcommand_from meet event' -l all-day -d 'Mark as an all-day event'
1810
- complete -c pm -n '__fish_seen_subcommand_from remind' -l at -d 'Reminder time (default +1d)' -r
1811
- complete -c pm -n '__fish_seen_subcommand_from remind' -l text -d 'Reminder text (defaults to title)' -r
1812
- complete -c pm -n '__fish_seen_subcommand_from meet event remind' -l parent -d 'Parent item id' -r
1813
- complete -c pm -n '__fish_seen_subcommand_from meet event remind' -l allow-missing-parent -d 'Permit a parent id that does not exist yet'
1814
- complete -c pm -n '__fish_seen_subcommand_from meet event remind' -l tags -d 'Comma-separated tags' -r
1815
- complete -c pm -n '__fish_seen_subcommand_from meet event remind' -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'
1816
- complete -c pm -n '__fish_seen_subcommand_from meet event remind' -l body -d 'Item body' -r
1817
- complete -c pm -n '__fish_seen_subcommand_from meet event remind' -l description -d 'Short description' -r
1818
- complete -c pm -n '__fish_seen_subcommand_from meet event remind' -l author -d 'Mutation author' -r
1819
- complete -c pm -n '__fish_seen_subcommand_from meet event remind' -l message -d 'History message' -r
1820
-
1821
- # close-many flags
1822
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-status -d 'Filter by status before closing' -r -a '${p}'
1823
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-type -d 'Filter by type before closing' -r -a '${m}'
1824
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-tag -d 'Filter by tag before closing' -r -a ${b}
1825
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-priority -d 'Filter by priority before closing' -r -a '0 1 2 3 4'
1826
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-deadline-before -d 'Filter by deadline upper bound' -r
1827
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-deadline-after -d 'Filter by deadline lower bound' -r
1828
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-updated-after -d 'Filter by updated_at lower bound (ISO/relative)' -r
1829
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-updated-before -d 'Filter by updated_at upper bound (ISO/relative)' -r
1830
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-created-after -d 'Filter by created_at lower bound (ISO/relative)' -r
1831
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-created-before -d 'Filter by created_at upper bound (ISO/relative)' -r
1832
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-assignee -d 'Filter by assignee before closing' -r
1833
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'
1834
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-parent -d 'Filter by parent item ID' -r
1835
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-sprint -d 'Filter by sprint before closing' -r
1836
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-release -d 'Filter by release before closing' -r
1837
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-reviewer-missing -d 'Select only items missing reviewer'
1838
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-risk-missing -d 'Select only items missing risk'
1839
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-confidence-missing -d 'Select only items missing confidence'
1840
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-sprint-missing -d 'Select only items missing sprint'
1841
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-release-missing -d 'Select only items missing release'
1842
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-has-notes -d 'Select only items that have notes'
1843
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-no-notes -d 'Select only items with no notes'
1844
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-has-learnings -d 'Select only items that have learnings'
1845
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-no-learnings -d 'Select only items with no learnings'
1846
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-has-files -d 'Select only items that have linked files'
1847
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-no-files -d 'Select only items with no linked files'
1848
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-has-docs -d 'Select only items that have linked docs'
1849
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-no-docs -d 'Select only items with no linked docs'
1850
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-has-tests -d 'Select only items that have linked tests'
1851
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-no-tests -d 'Select only items with no linked tests'
1852
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-has-comments -d 'Select only items that have comments'
1853
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-no-comments -d 'Select only items with no comments'
1854
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-has-deps -d 'Select only items that have dependencies'
1855
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-no-deps -d 'Select only items with no dependencies'
1856
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-has-body -d 'Select only items with non-empty body'
1857
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-empty-body -d 'Select only items with empty body'
1858
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-has-linked-command -d 'Select only items that have a linked command'
1859
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l filter-no-linked-command -d 'Select only items with no linked command'
1860
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l ids -d 'Explicit comma-separated ID allowlist' -r
1861
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l limit -d 'Limit matched item count' -r
1862
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l offset -d 'Skip first n matched rows' -r
1863
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l reason -d 'Optional shared close reason applied to every matched item' -r
1864
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l resolution -d 'Shared closure resolution' -r
1865
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l expected-result -d 'Shared expected-result note' -r
1866
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l actual-result -d 'Shared actual-result note' -r
1867
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l expected -d 'Short alias for --expected-result' -r
1868
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l actual -d 'Short alias for --actual-result' -r
1869
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l validate-close -d 'Validate closure metadata per item' -r -a 'off warn strict'
1870
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l author -d 'Mutation author' -r
1871
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l message -d 'History message' -r
1872
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l force -d 'Re-close terminal matches and override ownership'
1873
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l dry-run -d 'Preview matched items without mutating'
1874
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l rollback -d 'Rollback checkpoint ID' -r
1875
- complete -c pm -n '__fish_seen_subcommand_from close-many' -l no-checkpoint -d 'Disable checkpoint creation during apply mode'
1876
-
1877
- # validate flags
1878
- complete -c pm -n '__fish_seen_subcommand_from validate' -l check-metadata -d 'Run metadata completeness checks'
1879
- complete -c pm -n '__fish_seen_subcommand_from validate' -l metadata-profile -d 'Select metadata validation profile for --check-metadata' -r -a 'core strict custom'
1880
- complete -c pm -n '__fish_seen_subcommand_from validate' -l check-resolution -d 'Run closed-item resolution metadata checks'
1881
- complete -c pm -n '__fish_seen_subcommand_from validate' -l check-lifecycle -d 'Run active-item lifecycle governance drift checks'
1882
- complete -c pm -n '__fish_seen_subcommand_from validate' -l check-stale-blockers -d 'Include stale blocker-pattern diagnostics in lifecycle checks'
1883
- complete -c pm -n '__fish_seen_subcommand_from validate' -l dependency-cycle-severity -d 'Set dependency-cycle warning policy for lifecycle checks' -r -a 'off warn error'
1884
- complete -c pm -n '__fish_seen_subcommand_from validate' -l parent-cycle-severity -d 'Set parent-hierarchy cycle warning policy for lifecycle checks' -r -a 'off warn error'
1885
- complete -c pm -n '__fish_seen_subcommand_from validate' -l check-files -d 'Run linked-file and orphaned-file checks'
1886
- complete -c pm -n '__fish_seen_subcommand_from validate' -l scan-mode -d 'Select file candidate scan mode for --check-files' -r -a 'default tracked-all tracked-all-strict'
1887
- complete -c pm -n '__fish_seen_subcommand_from validate' -l include-pm-internals -d 'Include PM storage internals in tracked-all candidate scans'
1888
- complete -c pm -n '__fish_seen_subcommand_from validate' -l verbose-file-lists -d 'Include full file-path lists for validate --check-files details'
1889
- complete -c pm -n '__fish_seen_subcommand_from validate' -l verbose-diagnostics -d 'Include full validate diagnostic ID lists instead of compact summaries'
1890
- complete -c pm -n '__fish_seen_subcommand_from validate' -l all-affected-ids -d 'Emit complete missing_* affected-ID lists with no truncation (implied by --json)'
1891
- complete -c pm -n '__fish_seen_subcommand_from validate' -l strict-exit -d 'Return non-zero exit when validation warnings are present'
1892
- complete -c pm -n '__fish_seen_subcommand_from validate' -l fail-on-warn -d 'Alias for --strict-exit'
1893
- complete -c pm -n '__fish_seen_subcommand_from validate' -l fix-hints -d 'Add a machine-executable fix_hints[] of pm commands to each failing check'
1894
- complete -c pm -n '__fish_seen_subcommand_from validate' -l auto-fix -d 'Apply the safe, deterministic subset of fix-hint remediations automatically'
1895
- complete -c pm -n '__fish_seen_subcommand_from validate' -l dry-run -d 'Preview planned --auto-fix/--prune-missing fixes without applying them'
1896
- complete -c pm -n '__fish_seen_subcommand_from validate' -l fix-scope -d 'Grant --auto-fix scopes (estimates/lifecycle must be named explicitly)' -r -a 'metadata resolution estimates lifecycle'
1897
- complete -c pm -n '__fish_seen_subcommand_from validate' -l prune-missing -d 'Remove stale linked-file/doc links classified as deleted'
1898
- complete -c pm -n '__fish_seen_subcommand_from validate' -l check-history-drift -d 'Run item/history hash drift checks'
1899
- complete -c pm -n '__fish_seen_subcommand_from validate' -l check-command-references -d 'Run linked-command PM-ID reference checks'
1900
- complete -c pm -n '__fish_seen_subcommand_from init' -l preset -d 'Governance preset for new setups' -r -a 'minimal default strict'
1901
- complete -c pm -n '__fish_seen_subcommand_from init' -l id-prefix -d 'Set the item ID prefix' -r
1902
- complete -c pm -n '__fish_seen_subcommand_from init' -l prefix -d 'Alias for --id-prefix' -r
1903
- complete -c pm -n '__fish_seen_subcommand_from init' -l defaults -d 'Use non-interactive setup defaults'
1904
- complete -c pm -n '__fish_seen_subcommand_from init' -s y -l yes -d 'Alias for --defaults'
1905
- complete -c pm -n '__fish_seen_subcommand_from init' -l author -d 'Set the default mutation author for this project' -r
1906
- complete -c pm -n '__fish_seen_subcommand_from init' -l agent-guidance -d 'Agent guidance mode' -r -a 'ask add skip status'
1907
- complete -c pm -n '__fish_seen_subcommand_from init' -l type-preset -d 'Register domain item types' -r -a 'agile ops research'
1908
- complete -c pm -n '__fish_seen_subcommand_from init' -l with-packages -d 'Install bundled first-party packages during initialization'
1909
- complete -c pm -n '__fish_seen_subcommand_from init' -l verbose -d 'Include the full resolved settings tree in init output'
1910
- complete -c pm -n '__fish_seen_subcommand_from config' -l criterion -d 'Criteria value for definition-of-done metadata-required-fields or lifecycle pattern keys (repeatable for set)' -r
1911
- complete -c pm -n '__fish_seen_subcommand_from config' -l clear-criteria -d 'Clear config criteria-list key values'
1912
- complete -c pm -n '__fish_seen_subcommand_from config' -l format -d 'Item format for item-format key' -r -a 'toon'
1913
- complete -c pm -n '__fish_seen_subcommand_from config' -l policy -d 'Policy value for supported policy keys' -r
1914
- complete -c pm -n '__fish_seen_subcommand_from health' -l strict-directories -d 'Treat optional item-type directories as required failures'
1915
- complete -c pm -n '__fish_seen_subcommand_from health' -l check-only -d 'Run read-only health diagnostics without refreshing vectors'
1916
- complete -c pm -n '__fish_seen_subcommand_from health' -l no-refresh -d 'Disable automatic vector refresh attempts during health checks'
1917
- complete -c pm -n '__fish_seen_subcommand_from health' -l refresh-vectors -d 'Explicitly enable vector refresh attempts during health checks'
1918
- complete -c pm -n '__fish_seen_subcommand_from health' -l verbose-stale-items -d 'Include full stale vectorization ID lists in health output'
1919
- complete -c pm -n '__fish_seen_subcommand_from health' -l verbose-author-events -d 'Include complete actionable unknown-author coordinates'
1920
- complete -c pm -n '__fish_seen_subcommand_from health' -l brief -d 'Emit compact health details for low-token agent checks'
1921
- complete -c pm -n '__fish_seen_subcommand_from health' -l summary -d 'Emit one-line-style health status with check names and warning count'
1922
- complete -c pm -n '__fish_seen_subcommand_from health' -l strict-exit -d 'Return non-zero exit when health warnings are present'
1923
- complete -c pm -n '__fish_seen_subcommand_from health' -l fail-on-warn -d 'Alias for --strict-exit'
1924
-
1925
- # completion shell argument
1926
- complete -c pm -n '__fish_seen_subcommand_from completion' -l eager-tags -d 'Embed current tracker tags directly in script output'
1927
- complete -c pm -n '__fish_seen_subcommand_from completion' -a 'bash zsh fish' -d 'Shell type'
1928
-
1929
- # templates subcommands
1930
- complete -c pm -n '__fish_seen_subcommand_from templates' -a 'save list show' -d 'Templates command'
1931
-
1932
- # extension lifecycle flags
1933
- complete -c pm -n '__fish_seen_subcommand_from extension' -a '${lt}' -d 'Extension action subcommand'
1934
- complete -c pm -n '__fish_seen_subcommand_from extension' -l init -d 'Generate starter extension scaffold'
1935
- complete -c pm -n '__fish_seen_subcommand_from extension' -l scaffold -d 'Alias for --init'
1936
- complete -c pm -n '__fish_seen_subcommand_from extension' -l capability -d 'Capability the init scaffold targets' -r -a '${Ie.join(" ")}'
1937
- complete -c pm -n '__fish_seen_subcommand_from extension' -l install -d 'Install extension from local path or GitHub source'
1938
- complete -c pm -n '__fish_seen_subcommand_from extension' -l uninstall -d 'Uninstall extension by name'
1939
- complete -c pm -n '__fish_seen_subcommand_from extension' -l explore -d 'List discovered extensions for selected scope'
1940
- complete -c pm -n '__fish_seen_subcommand_from extension' -l manage -d 'List managed extensions with update metadata'
1941
- complete -c pm -n '__fish_seen_subcommand_from extension' -l describe -d 'Map every surface a loaded extension registers'
1942
- complete -c pm -n '__fish_seen_subcommand_from extension' -l markdown -d 'Render describe output as a Markdown reference document'
1943
- complete -c pm -n '__fish_seen_subcommand_from extension' -l output -d 'Write describe Markdown to a file' -r
1944
- complete -c pm -n '__fish_seen_subcommand_from extension' -l reload -d 'Reload extensions with cache-busted module imports'
1945
- complete -c pm -n '__fish_seen_subcommand_from extension' -l watch -d 'Enable watch mode with --reload'
1946
- complete -c pm -n '__fish_seen_subcommand_from extension' -l doctor -d 'Run consolidated extension diagnostics'
1947
- complete -c pm -n '__fish_seen_subcommand_from extension' -l catalog -d 'List bundled first-party package catalog entries'
1948
- complete -c pm -n '__fish_seen_subcommand_from extension' -l adopt -d 'Adopt an unmanaged extension into managed metadata'
1949
- complete -c pm -n '__fish_seen_subcommand_from extension' -l adopt-all -d 'Adopt all unmanaged extensions into managed metadata'
1950
- complete -c pm -n '__fish_seen_subcommand_from extension' -l activate -d 'Activate extension in selected scope settings'
1951
- complete -c pm -n '__fish_seen_subcommand_from extension' -l deactivate -d 'Deactivate extension in selected scope settings'
1952
- complete -c pm -n '__fish_seen_subcommand_from extension' -l project -d 'Use project extension scope'
1953
- complete -c pm -n '__fish_seen_subcommand_from extension' -l local -d 'Alias for --project'
1954
- complete -c pm -n '__fish_seen_subcommand_from extension' -l global -d 'Use global extension scope'
1955
- complete -c pm -n '__fish_seen_subcommand_from extension' -l gh -d 'GitHub shorthand owner/repo/path' -r
1956
- complete -c pm -n '__fish_seen_subcommand_from extension' -l github -d 'Alias for --gh' -r
1957
- complete -c pm -n '__fish_seen_subcommand_from extension' -l ref -d 'Git ref/branch/tag for GitHub source' -r
1958
- complete -c pm -n '__fish_seen_subcommand_from extension' -l detail -d 'Detail mode for extension diagnostics' -r -a 'summary deep'
1959
- complete -c pm -n '__fish_seen_subcommand_from extension' -l trace -d 'Include registration traces in doctor deep diagnostics'
1960
- complete -c pm -n '__fish_seen_subcommand_from extension' -l runtime-probe -d 'Opt-in runtime activation probe for manage output'
1961
- complete -c pm -n '__fish_seen_subcommand_from extension' -l fix-managed-state -d 'Adopt unmanaged extensions before diagnostics/update checks'
1962
- complete -c pm -n '__fish_seen_subcommand_from extension' -l isolated -d 'Run doctor against project-scope extensions only'
1963
- complete -c pm -n '__fish_seen_subcommand_from extension' -l ignore-global -d 'Alias for --isolated'
1964
- complete -c pm -n '__fish_seen_subcommand_from extension' -l strict-exit -d 'Return non-zero exit when doctor warnings are present'
1965
- complete -c pm -n '__fish_seen_subcommand_from extension' -l fail-on-warn -d 'Alias for --strict-exit (doctor)'
1966
-
1967
- # package lifecycle flags
1968
- for package_cmd in package packages
1969
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -a '${lt}' -d 'Package action subcommand'
1970
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l init -d 'Generate starter package scaffold'
1971
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l scaffold -d 'Alias for --init'
1972
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l capability -d 'Capability the init scaffold targets' -r -a '${Ie.join(" ")}'
1973
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l declarative -d 'Generate a composeExtension blueprint starter'
1974
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l install -d 'Install package from local path, GitHub source, npm source, or bundled alias'
1975
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l uninstall -d 'Uninstall package by name'
1976
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l explore -d 'List discovered packages for selected scope'
1977
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l manage -d 'List managed packages with update metadata'
1978
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l describe -d 'Map every surface a loaded package registers'
1979
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l markdown -d 'Render describe output as a Markdown reference document'
1980
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l output -d 'Write describe Markdown to a file' -r
1981
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l reload -d 'Reload packages with cache-busted module imports'
1982
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l watch -d 'Enable watch mode with --reload'
1983
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l doctor -d 'Run consolidated package diagnostics'
1984
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l catalog -d 'List bundled first-party package catalog entries'
1985
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l adopt -d 'Adopt an unmanaged package into managed metadata'
1986
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l adopt-all -d 'Adopt all unmanaged packages into managed metadata'
1987
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l activate -d 'Activate package in selected scope settings'
1988
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l deactivate -d 'Deactivate package in selected scope settings'
1989
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l project -d 'Use project package scope'
1990
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l local -d 'Alias for --project'
1991
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l global -d 'Use global package scope'
1992
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l gh -d 'GitHub shorthand owner/repo/path' -r
1993
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l github -d 'Alias for --gh' -r
1994
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l ref -d 'Git ref/branch/tag for GitHub source' -r
1995
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l detail -d 'Detail mode for package diagnostics' -r -a 'summary deep'
1996
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l trace -d 'Include registration traces in doctor deep diagnostics'
1997
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l runtime-probe -d 'Opt-in runtime activation probe for manage output'
1998
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l fix-managed-state -d 'Adopt unmanaged packages before diagnostics/update checks'
1999
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l isolated -d 'Run doctor against project-scope packages only'
2000
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l ignore-global -d 'Alias for --isolated'
2001
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l strict-exit -d 'Return non-zero exit when doctor warnings are present'
2002
- complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l fail-on-warn -d 'Alias for --strict-exit (doctor)'
2003
- end`}var Ud={bash:'Add to ~/.bashrc or ~/.bash_profile: eval "$(pm completion bash)"',zsh:'Add to ~/.zshrc: eval "$(pm completion zsh)"',fish:"Run: pm completion fish > ~/.config/fish/completions/pm.fish"};function qd(e,t=[],n=[],s=!1,o={}){let r=e.trim().toLowerCase();if(!ta.includes(r))throw new u(`Unknown shell: "${e}". Supported shells: ${ta.join(", ")}.`,_.USAGE);let i=r,a;return i==="bash"?a=Dd(t,n,s,o):i==="zsh"?a=jd(t,n,s,o):a=Gd(t,n,s,o),{shell:i,script:a,setup_hint:Ud[i]}}import zd from"node:fs/promises";import Ne from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fc124f85-8d28-508b-a3f7-2fe767382197")}catch{}})();var cs="index/manifest.json",ms="search/embeddings.jsonl",Hd="Provider or model has changed since last index. Run pm reindex --mode semantic to rebuild.";function Vd(e){return e.progress===!0||process.stderr.isTTY===!0}function I(e,t){if(e)try{process.stderr.write(`[pm reindex] ${t}
2004
- `)}catch{}}function Bd(e){let t=(e??"keyword").trim().toLowerCase();if(t==="keyword")return"keyword";if(t==="semantic"||t==="hybrid")return t;throw new u("Reindex mode must be one of keyword|semantic|hybrid",_.USAGE)}async function Wd(e,t,n,s){let o=[];return{candidates:await Bs(e,t,n,o,s),warnings:o}}async function ls(e,t,n,s,o){let r=Ge(q()),i=[];for(let a of t)if(!(o&&!o.has(a.metadata.id))){if(typeof a.body=="string"){i.push({metadata:a.metadata,body:a.body});continue}try{let c=await zd.readFile(a.item_path,"utf8"),d=qe(c,{format:a.item_format,schema:n,extensionFieldNames:r,onWarning:m=>s.push(m)});i.push({metadata:a.metadata,body:d.body})}catch{s.push(`item_list_item_read_failed:${Ne.relative(e,a.item_path)}`),i.push({metadata:a.metadata,body:""})}}return i}function Yd(e,t,n){let s=e.metadata;return{id:s.id,mode:t,updated_at:s.updated_at,corpus:Ws(e,{fields:n})}}var be=gs;function Jd(e){let t=q(),n=be(e.search?.provider);if(!n)return null;let s=Os(t,n);if(!s)return null;let o=s.runtime_definition??s.definition,r=be(o.name)??be(s.definition.name);if(!r)return null;let i=o.embedBatch,a=o.embed_batch,c=o.embed,d=typeof i=="function"?i:typeof a=="function"?a:void 0,m=typeof c=="function"?c:void 0;return!d&&!m?null:{name:r,embedBatch:d,embed:m}}function Kd(e){let t=q(),n=be(e.vector_store?.adapter);if(!n)return null;let s=$s(t,n);if(!s)return null;let o=s.runtime_definition??s.definition,r=be(o.name)??be(s.definition.name);if(!r)return null;let i=o.upsert,a=o.delete;return{adapterName:r,...typeof i=="function"?{upsert:i}:{},...typeof a=="function"?{delete:a}:{}}}function ds(e,t){if(!Array.isArray(e)||e.some(n=>typeof n!="number"||!Number.isFinite(n)))throw new u(`Invalid vector returned by ${t}`,_.GENERIC_FAILURE);return e}async function Xd(e,t,n){let s=t.search?.embedding_model?.trim()||"text-embedding-3-small";if(e.embedBatch){let r=await Promise.resolve(e.embedBatch({inputs:n,settings:t,model:s}));if(!Array.isArray(r))throw new u(`Extension search provider "${e.name}" embedBatch must return an array of vectors`,_.GENERIC_FAILURE);return r.map((i,a)=>ds(i,`extension search provider "${e.name}" embedBatch output at index ${a}`))}if(!e.embed)throw new u(`Extension search provider "${e.name}" does not implement embed/embedBatch`,_.GENERIC_FAILURE);let o=[];for(let[r,i]of n.entries()){let a=await Promise.resolve(e.embed({input:i,settings:t,model:s}));o.push(ds(a,`extension search provider "${e.name}" embed output at index ${r}`))}return o}function la(e){return e.search?.embedding_model?.trim()||"text-embedding-3-small"}function pa(e,t,n){let s=n?Ee(n.name,la(e)):t?Ee(t.name,t.model):null;if(!s)throw new u("No embedding identity available for semantic reindex mode",_.USAGE);return s}function Zd(e,t){return Object.keys(e).filter(n=>!t.has(n)).sort((n,s)=>n.localeCompare(s))}async function ua(e,t,n,s,o,r,i,a){let c=s?.name??n?.name,d=Ys(c,e.search.embedding_corpus_max_characters).maxCharacters,m=Bt(e),p=o.map(w=>Js(w,{providerName:c,maxCharacters:d,fields:m})),f=[],g=null;if(s)try{f=await Xd(s,e,p),g=Ee(s.name,la(e))}catch(w){if(!n)throw new u(`Extension search provider "${s.name}" failed to generate embeddings: ${w instanceof Error?w.message:String(w)}`,_.GENERIC_FAILURE);r.push(`Extension search provider "${s.name}" failed; falling back to built-in provider (${w instanceof Error?w.message:String(w)})`)}if(f.length===0){if(!n)throw new u(`No embedding executor available for reindex mode '${t}'`,_.USAGE);let w=await Ks(n,e,p,{onProgress:b=>{b.phase==="complete"&&(i.batches_completed=b.batch_index),I(a,`embedding_batch_${b.phase} batch=${b.batch_index}/${b.batch_total} size=${b.batch_size} completed_inputs=${b.completed_inputs}/${b.total_inputs}`)}});r.push(...w.warnings),f=w.vectors,g=Ee(n.name,n.model)}if(I(a,`embedding_complete vectors=${f.length}`),f.length!==o.length)throw new u(`Embedding output size mismatch (expected ${o.length}, received ${f.length})`,_.GENERIC_FAILURE);if(!g)throw new u(`No embedding identity available for reindex mode '${t}'`,_.USAGE);return{vectors:f,embeddingIdentity:g}}async function Qd(e,t,n,s,o,r){let i=Object.keys(n);if(t){if(i.length>0&&t.delete)try{await Promise.resolve(t.delete({ids:i.sort((a,c)=>a.localeCompare(c)),settings:s}))}catch(a){throw new u(`Extension vector adapter "${t.adapterName}" failed to delete vectors during reindex reset: ${a instanceof Error?a.message:String(a)}`,_.GENERIC_FAILURE)}else i.length>0&&o.push(`search_semantic_reindex_reset_skipped:adapter=${t.adapterName}:known_ids=${i.length}`);if(!e)return}e&&await eo(e,i,{},r)}async function fa(e,t,n,s,o){if(n.length!==0){if(t){if(t.delete)try{await Promise.resolve(t.delete({ids:n,settings:s}))}catch(r){throw new u(`Extension vector adapter "${t.adapterName}" failed to delete orphan vectors during reindex: ${r instanceof Error?r.message:String(r)}`,_.GENERIC_FAILURE)}else o.push(`search_semantic_reindex_orphan_prune_skipped:adapter=${t.adapterName}:count=${n.length}`);if(!e)return}e&&await Qs(e,n)}}function el(e){return{enabled:e!=="keyword",stale_items:0,unchanged_items:0,embedded_items:0,vector_upserted:0,batches_completed:0}}function tl(e,t,n){return{version:1,mode:e,generated_at:t,total_items:n.length,items:n.map(s=>({id:s.metadata.id,type:s.metadata.type,status:s.metadata.status,priority:s.metadata.priority,updated_at:s.metadata.updated_at}))}}function nl(e){if(e.requestedMode==="keyword")return{activeEmbeddingProvider:null,activeVectorStore:null};let t=Vt(e.settings);if(!t.active&&!e.extensionEmbedding)throw new u(`Reindex mode '${e.requestedMode}' requires a configured embedding provider in settings.providers.openai/settings.providers.ollama or an extension provider selected by settings.search.provider`,_.USAGE);let n=Xs(e.settings,e.pmRoot);if(!n.active&&!e.extensionVectorAdapter)throw new u(`Reindex mode '${e.requestedMode}' requires a configured vector store in settings.vector_store.qdrant/settings.vector_store.lancedb or an extension adapter selected by settings.vector_store.adapter`,_.USAGE);return{activeEmbeddingProvider:t.active,activeVectorStore:n.active}}async function sl(e){let t=ee(e.settings,q()),n=await Wd(e.pmRoot,e.settings.item_format,t.type_to_folder,e.settings.schema);return{documentCandidates:n.candidates,warnings:[...n.warnings],metadataDocuments:n.candidates.map(s=>({metadata:s.metadata,body:typeof s.body=="string"?s.body:""}))}}async function ol(e){let t=await Yt(e.pmRoot);if(e.reindexWarnings.push(...t.warnings),e.forceFullSemantic&&e.reindexWarnings.push("search_semantic_reindex_full_ignored:mode_keyword"),!t.embedding)return;let n=(()=>{try{return pa(e.settings,Vt(e.settings).active,e.extensionEmbedding)}catch{return null}})();n&&ze(t.embedding,n)&&(e.reindexWarnings.push("search_semantic_reindex_requires_rebuild:embedding_identity_changed"),e.reindexWarnings.push(Hd))}async function rl(e){let t=await Yt(e.pmRoot);e.semanticWarnings.push(...t.warnings);let n=pa(e.settings,e.activeEmbeddingProvider,e.extensionEmbedding),s=new Set(e.metadataDocuments.map(d=>d.metadata.id)),o=Zd(t.entries,s),r=ze(t.embedding,n);e.forceFullSemantic&&!r&&e.semanticWarnings.push("search_semantic_reindex_full_rebuild_forced");let i=e.forceFullSemantic||r?e.metadataDocuments:e.metadataDocuments.filter(d=>t.entries[d.metadata.id]!==d.metadata.updated_at),a=new Set(i.map(d=>d.metadata.id)),c=a.size>0?await ls(e.pmRoot,e.documentCandidates,e.settings.schema,e.reindexWarnings,a):[];return{ledgerEntries:t.entries,ledgerEmbedding:t.embedding,orphanIds:o,resetRequired:r,staleDocuments:c,freshDocuments:e.metadataDocuments.length-c.length}}async function il(e){let t=new Set(e.metadataDocuments.map(o=>o.metadata.id)),n=await ls(e.pmRoot,e.documentCandidates,e.settings.schema,e.reindexWarnings,t);e.semanticSummary.stale_items=n.length,e.semanticSummary.unchanged_items=0,I(e.progressEnabled,`embedding_dimension_changed reset_items=${n.length}`);let s=await ua(e.settings,e.requestedMode,e.activeEmbeddingProvider,e.extensionEmbedding,n,e.semanticWarnings,e.semanticSummary,e.progressEnabled);return{...s,staleDocuments:n,vectorDimension:Wt(s.vectors,"Reindex embeddings")}}async function al(e){let t=await ua(e.settings,e.requestedMode,e.activeEmbeddingProvider,e.extensionEmbedding,e.staleDocuments,e.semanticWarnings,e.semanticSummary,e.progressEnabled),n=t.vectors,s=t.embeddingIdentity,o=Wt(n,"Reindex embeddings");if(!(!e.resetRequired&&(ze(e.ledgerEmbedding,s)||no(e.ledgerEmbedding,o))))return{vectors:n,embeddingIdentity:s,staleDocuments:e.staleDocuments,vectorDimension:o,resetRequired:e.resetRequired};let i=await il(e);return n=i.vectors,s=i.embeddingIdentity,o=i.vectorDimension,{vectors:n,embeddingIdentity:s,staleDocuments:i.staleDocuments,vectorDimension:o,resetRequired:!0}}async function cl(e){if(e.extensionVectorAdapter)try{let t=e.extensionVectorAdapter.adapterName;if(I(e.progressEnabled,`vector_upsert_start adapter=${t} points=${e.points.length}`),typeof e.extensionVectorAdapter.upsert!="function")throw new u(`Extension vector adapter "${t}" does not support upserting vectors.`,_.USAGE);await Promise.resolve(e.extensionVectorAdapter.upsert({points:e.points,settings:e.settings})),e.semanticSummary.vector_upserted=e.points.length,I(e.progressEnabled,`vector_upsert_complete adapter=${t}`);return}catch(t){if(t instanceof u)throw t;if(!e.activeVectorStore)throw new u(`Extension vector adapter "${e.extensionVectorAdapter.adapterName}" failed to upsert vectors: ${t instanceof Error?t.message:String(t)}`,_.GENERIC_FAILURE);e.semanticWarnings.push(`Extension vector adapter "${e.extensionVectorAdapter.adapterName}" failed; falling back to built-in vector store (${t instanceof Error?t.message:String(t)})`),I(e.progressEnabled,"vector_upsert_fallback built_in_store")}if(e.activeVectorStore){I(e.progressEnabled,`vector_upsert_start adapter=${e.activeVectorStore.name} points=${e.points.length}`),await Zs(e.activeVectorStore,e.points),e.semanticSummary.vector_upserted=e.points.length,I(e.progressEnabled,`vector_upsert_complete adapter=${e.activeVectorStore.name}`);return}throw new u(`No vector upsert executor available for reindex mode '${e.requestedMode}'`,_.USAGE)}function ml(e,t){return e.map((n,s)=>({id:n.metadata.id,vector:ds(t[s],`reindex embeddings output at index ${s}`),payload:{id:n.metadata.id,type:n.metadata.type,status:n.metadata.status,priority:n.metadata.priority,updated_at:n.metadata.updated_at}}))}async function dl(e){I(e.progressEnabled,`embedding_start items=${e.plan.staleDocuments.length} unchanged_items=${e.plan.freshDocuments}`);let t=await al({pmRoot:e.pmRoot,settings:e.settings,requestedMode:e.requestedMode,activeEmbeddingProvider:e.activeEmbeddingProvider,extensionEmbedding:e.extensionEmbedding,documentCandidates:e.documentCandidates,metadataDocuments:e.metadataDocuments,staleDocuments:e.plan.staleDocuments,ledgerEmbedding:e.plan.ledgerEmbedding,resetRequired:e.plan.resetRequired,semanticWarnings:e.semanticWarnings,reindexWarnings:e.reindexWarnings,semanticSummary:e.semanticSummary,progressEnabled:e.progressEnabled});t.resetRequired?(I(e.progressEnabled,"vector_reset_start"),await Qd(e.activeVectorStore,e.extensionVectorAdapter,e.plan.ledgerEntries,e.settings,e.semanticWarnings,e.plan.ledgerEmbedding?t.vectorDimension:void 0),I(e.progressEnabled,"vector_reset_complete")):await fa(e.activeVectorStore,e.extensionVectorAdapter,e.plan.orphanIds,e.settings,e.semanticWarnings);let n=ml(t.staleDocuments,t.vectors);return e.semanticSummary.embedded_items=t.vectors.length,await cl({requestedMode:e.requestedMode,activeVectorStore:e.activeVectorStore,extensionVectorAdapter:e.extensionVectorAdapter,settings:e.settings,points:n,semanticWarnings:e.semanticWarnings,semanticSummary:e.semanticSummary,progressEnabled:e.progressEnabled}),{staleDocuments:t.staleDocuments,embeddingMetadata:to(t.embeddingIdentity,t.vectorDimension)}}async function ll(e){let t=await rl(e);e.semanticSummary.stale_items=t.staleDocuments.length,e.semanticSummary.unchanged_items=t.freshDocuments;let n=Object.fromEntries(e.metadataDocuments.map(r=>[r.metadata.id,r.metadata.updated_at]));if(I(e.progressEnabled,`semantic_stale_items stale=${t.staleDocuments.length} total=${e.metadataDocuments.length} unchanged=${t.freshDocuments} full=${e.forceFullSemantic||t.resetRequired}`),t.staleDocuments.length===0)return I(e.progressEnabled,`embedding_skipped unchanged_items=${t.freshDocuments}`),e.semanticWarnings.push(`search_semantic_reindex_skipped_unchanged:count=${t.freshDocuments}`),await fa(e.activeVectorStore,e.extensionVectorAdapter,t.orphanIds,e.settings,e.semanticWarnings),{documentsForKeywordArtifacts:e.documentsForKeywordArtifacts,vectorizationLedgerEntries:n,vectorizationEmbeddingMetadata:t.ledgerEmbedding};let s=await dl({...e,plan:t});t.freshDocuments>0&&e.semanticWarnings.push(`search_semantic_reindex_skipped_unchanged:count=${t.freshDocuments}`);let o=new Map(s.staleDocuments.map(r=>[r.metadata.id,r]));return{documentsForKeywordArtifacts:e.metadataDocuments.map(r=>o.get(r.metadata.id)??r),vectorizationLedgerEntries:n,vectorizationEmbeddingMetadata:s.embeddingMetadata}}async function pl(e){let t=Ne.join(e.pmRoot,cs),n=Ne.join(e.pmRoot,ms),s=Bt(e.settings),o=e.documentsForKeywordArtifacts.map(i=>JSON.stringify(Yd(i,e.mode,s))).join(`
2005
- `);I(e.progressEnabled,"writing keyword artifacts"),await Q(t,`${JSON.stringify(e.manifest,null,2)}
2006
- `),await Q(n,`${o}
2007
- `);let r=[];if(e.mode!=="keyword")try{I(e.progressEnabled,"writing vectorization status ledger"),await so(e.pmRoot,e.vectorizationLedgerEntries,e.vectorizationEmbeddingMetadata)}catch(i){r.push(`search_vectorization_status_ledger_write_failed:${i instanceof Error?i.message:String(i)}`)}return r}async function ul(e,t){let n=Bd(e.mode),s=Vd(e),o=e.full===!0;I(s,`start mode=${n}`);let r=F(process.cwd(),t.path);if(!await G(U(r)))throw new u(`Tracker is not initialized at ${r}. Run pm init first.`,_.NOT_FOUND);let i=Hs(await D(r)).settings,a=null;try{a=await ie(r,Vs,i.locks.ttl_seconds,z(void 0,"pm-reindex"),!1,i.governance.force_required_for_stale_lock,i.locks.wait_ms)}catch(c){throw c instanceof u&&c.exitCode===_.CONFLICT?new u("Another pm reindex run is already active for this project. Wait for it to finish before starting a new keyword, semantic, or hybrid reindex.",_.CONFLICT,{code:"reindex_already_running",type:"urn:pm-cli:error:reindex_already_running",why:"Semantic reindex can be expensive and duplicate runs compete for the same local embedding model and vector store.",nextSteps:["Check active pm reindex processes before starting another reindex.","Rerun with --progress when you need non-interactive visibility."]}):c}try{let c=Jd(i),d=Kd(i),m=nl({requestedMode:n,pmRoot:r,settings:i,extensionEmbedding:c,extensionVectorAdapter:d}),p=n;I(s,"loading item corpus");let f=await sl({pmRoot:r,settings:i}),g=f.warnings,{documentCandidates:w,metadataDocuments:b}=f;I(s,`loaded_items=${b.length}`);let v=k(),h=tl(p,v,b),A=Ne.join(r,cs),R=Ne.join(r,ms),H=p==="keyword"?await ls(r,w,i.schema,g):b,V=[],Me={},_t=null,ve=el(p);if(p==="keyword"&&await ol({pmRoot:r,settings:i,forceFullSemantic:o,extensionEmbedding:c,reindexWarnings:g}),p!=="keyword"){let ht=await ll({pmRoot:r,settings:i,requestedMode:n,activeEmbeddingProvider:m.activeEmbeddingProvider,activeVectorStore:m.activeVectorStore,extensionEmbedding:c,extensionVectorAdapter:d,documentCandidates:w,metadataDocuments:b,documentsForKeywordArtifacts:H,forceFullSemantic:o,reindexWarnings:g,semanticWarnings:V,semanticSummary:ve,progressEnabled:s});H=ht.documentsForKeywordArtifacts,Me=ht.vectorizationLedgerEntries,_t=ht.vectorizationEmbeddingMetadata}let xa=await pl({pmRoot:r,mode:p,manifest:h,documentsForKeywordArtifacts:H,settings:i,vectorizationLedgerEntries:Me,vectorizationEmbeddingMetadata:_t,progressEnabled:s}),Ea=[...await oe({path:A,scope:"project",op:"reindex:manifest"}),...await oe({path:R,scope:"project",op:"reindex:embeddings"}),...await Cs({mode:p,total_items:b.length})];return I(s,"done"),{ok:!0,mode:p,total_items:b.length,semantic:ve,artifacts:{manifest:cs,embeddings:ms},warnings:[...g,...V,...xa,...Ea],generated_at:v}}finally{await a?.()}}(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]="42339e0d-ca3c-505f-8b98-acec81158b6e")}catch{}})();var ba=Symbol("pm.active-extension-host-context");function M(e){return{fullChangedFields:!0,options:e}}var y=class e{defaults;constructor(t={}){this.defaults={...t.pmRoot===void 0?{}:{path:t.pmRoot},...t.cwd===void 0?{}:{cwd:t.cwd},...t.author===void 0?{}:{author:t.author},...t.noExtensions===void 0?{}:{noExtensions:t.noExtensions}}}static forActiveExtensionHost(t){let n=new e({...t,noExtensions:!0});return n.defaults[ba]=!0,n}run(t,n={}){return kl({...this.defaults,...n,action:t})}runTyped(t,n={}){return this.run(t,n)}context(t={}){return this.runTyped("context",{options:t})}list(t={}){return this.runTyped("list",{options:t})}search(t,n={}){return this.runTyped("search",{query:t,options:n})}get(t,n={}){return this.runTyped("get",{id:t,options:n})}next(t={}){return this.runTyped("next",{options:t})}aggregate(t={}){return this.runTyped("aggregate",{options:t})}stats(t={}){return this.runTyped("stats",{options:t})}duplicates(t={}){return this.runTyped("duplicates",{options:t})}comments(t,n={}){return this.runTyped("comments",{id:t,options:n})}notes(t,n={}){return this.runTyped("notes",{id:t,options:n})}learnings(t,n={}){return this.runTyped("learnings",{id:t,options:n})}files(t,n={}){return this.runTyped("files",{id:t,options:n})}filesDiscover(t,n={}){return this.runTyped("files-discover",{id:t,options:n})}filesLookup(t){return this.runTyped("files-lookup",{options:t})}docs(t,n={}){return this.runTyped("docs",{id:t,options:n})}deps(t,n={}){return this.runTyped("deps",{id:t,options:n})}graph(t,n={},s={}){return this.runTyped("graph",{subcommand:t,...n,options:s})}append(t,n,s={}){return this.runTyped("append",{id:t,...M({...s,body:n})})}init(t,n={}){return this.runTyped("init",{...t===void 0?{}:{prefix:t},options:n})}config(t,n,s,o,r={}){return this.runTyped("config",{scope:t,configAction:n,...s===void 0?{}:{key:s},...o===void 0?{}:{value:o},options:r})}schema(t,n={}){return this.runTyped("schema",{options:{...n,subcommand:t}})}schemaList(){return this.runTyped("schema",{options:{subcommand:"list"}})}schemaShow(t){return this.runTyped("schema",{name:t,options:{subcommand:"show"}})}schemaAddType(t,n={}){return this.runTyped("schema",{name:t,options:{...n,subcommand:"add-type"}})}schemaRemoveType(t,n={}){return this.runTyped("schema",{name:t,options:{...n,subcommand:"remove-type"}})}schemaAddStatus(t,n={}){return this.runTyped("schema",{name:t,options:{...n,subcommand:"add-status"}})}schemaRemoveStatus(t,n={}){return this.runTyped("schema",{name:t,options:{...n,subcommand:"remove-status"}})}schemaAddField(t,n={}){return this.runTyped("schema",{name:t,options:{...n,subcommand:"add-field"}})}schemaRemoveField(t,n={}){return this.runTyped("schema",{name:t,options:{...n,subcommand:"remove-field"}})}schemaListFields(){return this.runTyped("schema",{options:{subcommand:"list-fields"}})}schemaShowField(t){return this.runTyped("schema",{name:t,options:{subcommand:"show-field"}})}schemaApplyPreset(t,n={}){return this.runTyped("schema",{typePreset:t,options:{...n,subcommand:"apply-preset"}})}schemaInferTypes(t={}){return this.runTyped("schema",{options:{...t,subcommand:"add-type",infer:!0}})}schemaRenameType(t,n,s){return this.runTyped("schema",{name:t,options:{...s,subcommand:"rename-type",to:n}})}schemaRenameField(t,n,s,o){return this.runTyped("schema",{name:t,options:{...s,subcommand:"rename-field",to:n,...o?{fieldTypeScope:o}:{}}})}schemaRemapStatus(t,n,s){return this.runTyped("schema",{name:t,options:{...s,subcommand:"remap-status",to:n}})}schemaShowStatus(t){return this.runTyped("schema",{name:t,options:{subcommand:"show-status"}})}profile(t,n={}){return this.runTyped("profile",{options:{...n,subcommand:t}})}profileList(){return this.runTyped("profile",{options:{subcommand:"list"}})}profileShow(t){return this.runTyped("profile",{name:t,options:{subcommand:"show"}})}profileApply(t,n={}){return this.runTyped("profile",{name:t,options:{...n,subcommand:"apply"}})}profileLint(t){return this.runTyped("profile",{name:t,options:{subcommand:"lint"}})}validate(t={}){return this.runTyped("validate",{options:t})}health(t={}){return this.runTyped("health",{options:t})}gc(t={}){return this.runTyped("gc",{options:t})}historyRedact(t,n){return this.runTyped("history-redact",{id:t,options:n})}historyRepair(t,n={}){return this.runTyped("history-repair",{id:t,options:n})}historyRepairAll(t={}){return this.runTyped("history-repair",{options:{...t,all:!0}})}historyCompact(t,n={}){return this.runTyped("history-compact",{id:t,options:n})}historyCompactBulk(t){return this.runTyped("history-compact",{options:t})}historyAuthorAcknowledge(t){return this.runTyped("history-author-acknowledge",{historyEvent:(t.events??[]).map(n=>`${n.item_id}:${String(n.line)}`),allActionable:t.all_actionable===!0,attributedAuthor:t.attributed_author,reviewer:t.reviewer,reason:t.reason})}plan(t,n,s={},o,r){return this.runTyped("plan",{...n===void 0?{}:{id:n},...o===void 0?{}:{stepRef:o},...r===void 0?{}:{reorderTo:r},options:{...s,subcommand:t}})}planCreate(t){return this.plan("create",void 0,t)}planShow(t,n={}){return this.plan("show",t,n)}planAddStep(t,n){return this.plan("add-step",t,n)}planUpdateStep(t,n,s){return this.plan("update-step",t,s,n)}planCompleteStep(t,n,s={}){return this.plan("complete-step",t,s,n)}planBlockStep(t,n,s){return this.plan("block-step",t,s,n)}planReorderStep(t,n,s,o={}){return this.plan("reorder-step",t,o,n,s)}planRemoveStep(t,n,s={}){return this.plan("remove-step",t,s,n)}planLink(t,n,s){return this.plan("link",t,s,n)}planUnlink(t,n,s){return this.plan("unlink",t,s,n)}planDecision(t,n){return this.plan("decision",t,n)}planDiscovery(t,n){return this.plan("discovery",t,n)}planValidation(t,n){return this.plan("validation",t,n)}planResume(t,n){return this.plan("resume",t,n)}planApprove(t,n={}){return this.plan("approve",t,n)}planMaterialize(t,n){return this.plan("materialize",t,n)}create(t={}){return this.runTyped("create",M(t))}update(t,n={}){return this.runTyped("update",{id:t,...M(n)})}close(t,n,s={}){return this.runTyped("close",{id:t,reason:n,...M(s)})}claim(t,n={}){return this.runTyped("claim",{id:t,...M(n)})}claimNext(t={}){return this.runTyped("claim",{next:!0,...M(t)})}release(t,n={}){return this.runTyped("release",{id:t,...M(n)})}copy(t,n={}){return this.runTyped("copy",{id:t,...M(n)})}delete(t,n={}){return this.runTyped("delete",{id:t,...M(n)})}restore(t,n,s={}){return this.runTyped("restore",{fullChangedFields:!0,id:t,options:{...s,target:n}})}focus(t,n={}){return this.runTyped("focus",{...t===void 0?{}:{id:t},...M(n)})}startTask(t,n={}){return this.runTyped("start-task",{id:t,...M(n)})}pauseTask(t,n={}){return this.runTyped("pause-task",{id:t,...M(n)})}closeTask(t,n,s={}){return this.runTyped("close-task",{id:t,reason:n,...M(s)})}extension(t,n={}){return this.runTyped("extension",{...t===void 0?{}:{target:t},options:n})}extensionList(t={}){return this.extension("list",t)}extensionActivate(t,n={}){return this.runTyped("extension-activate",{target:t,options:n})}extensionDeactivate(t,n={}){return this.runTyped("extension-deactivate",{target:t,options:n})}package(t,n={}){return this.runTyped("package",{...t===void 0?{}:{target:t},options:{...n,vocabulary:"package"}})}packageList(t={}){return this.package("list",t)}packageInstall(t,n={}){return this.runTyped("package-install",{target:t,options:n})}packageUninstall(t,n={}){return this.runTyped("package-uninstall",{target:t,options:n})}packageDoctor(t={}){return this.runTyped("package-doctor",{options:t})}packageManage(t,n={}){return this.runTyped("package-manage",{...t===void 0?{}:{target:t},options:n})}packageDescribe(t,n={}){return this.runTyped("package-describe",{...t===void 0?{}:{target:t},options:n})}packageReload(t={}){return this.runTyped("package-reload",{options:t})}packageCatalog(t={}){return this.runTyped("package-catalog",{options:t})}packageActivate(t,n={}){return this.runTyped("package-activate",{target:t,options:n})}packageDeactivate(t,n={}){return this.runTyped("package-deactivate",{target:t,options:n})}packageMigrate(t={}){return this.package(void 0,{...t,migrate:!0})}upgrade(t,n={}){return this.runTyped("upgrade",{...t===void 0?{}:{target:t},options:n})}};function Hh(e={},t={}){return new y(t).context(e)}function Vh(e={},t={}){return new y(t).list(e)}function Bh(e,t={},n={}){return new y(n).search(e,t)}function Wh(e,t={},n={}){return new y(n).get(e,t)}function Yh(e={},t={}){return new y(t).next(e)}function Jh(e={},t={}){return new y(t).aggregate(e)}function Kh(e={},t={}){return new y(t).stats(e)}function Xh(e={},t={}){return new y(t).duplicates(e)}function Zh(e,t={},n={}){return new y(n).comments(e,t)}function Qh(e,t={},n={}){return new y(n).notes(e,t)}function eg(e,t={},n={}){return new y(n).learnings(e,t)}function tg(e,t={},n={}){return new y(n).files(e,t)}function ng(e,t={},n={}){return new y(n).filesDiscover(e,t)}function sg(e,t={}){return new y(t).filesLookup(e)}function og(e,t={},n={}){return new y(n).docs(e,t)}function rg(e,t={},n={}){return new y(n).deps(e,t)}function ig(e,t={},n={},s={}){return new y(s).graph(e,t,n)}function ag(e,t,n={},s={}){return new y(s).append(e,t,n)}function cg(e,t={},n={}){return new y(n).init(e,t)}function mg(e,t,n,s,o={},r={}){return new y(r).config(e,t,n,s,o)}function dg(e,t={},n={}){return new y(n).schema(e,t)}function lg(e={}){return new y(e).schemaList()}function pg(e,t={}){return new y(t).schemaShow(e)}function ug(e,t={},n={}){return new y(n).schemaAddType(e,t)}function fg(e,t={},n={}){return new y(n).schemaRemoveType(e,t)}function _g(e,t={},n={}){return new y(n).schemaAddStatus(e,t)}function hg(e,t={},n={}){return new y(n).schemaRemoveStatus(e,t)}function gg(e,t={},n={}){return new y(n).schemaAddField(e,t)}function yg(e,t={},n={}){return new y(n).schemaRemoveField(e,t)}function bg(e={}){return new y(e).schemaListFields()}function wg(e,t={}){return new y(t).schemaShowField(e)}function vg(e,t={},n={}){return new y(n).schemaApplyPreset(e,t)}function kg(e={},t={}){return new y(t).schemaInferTypes(e)}function Sg(e,t,n,s={}){return new y(s).schemaRenameType(e,t,n)}function xg(e,t,n,s,o={}){return new y(o).schemaRenameField(e,t,n,s)}function Eg(e,t,n,s={}){return new y(s).schemaRemapStatus(e,t,n)}function Ag(e,t={}){return new y(t).schemaShowStatus(e)}function Ig(e,t={},n={}){return new y(n).profile(e,t)}function Rg(e={}){return new y(e).profileList()}function Cg(e,t={}){return new y(t).profileShow(e)}function Tg(e,t={},n={}){return new y(n).profileApply(e,t)}function Og(e,t={}){return new y(t).profileLint(e)}function $g(e={},t={}){return new y(t).validate(e)}function Fg(e={},t={}){return new y(t).health(e)}function Pg(e={},t={}){return new y(t).gc(e)}function Lg(e,t,n={}){return new y(n).historyRedact(e,t)}function Ng(e,t={},n={}){return new y(n).historyRepair(e,t)}function Mg(e={},t={}){return new y(t).historyRepairAll(e)}function Dg(e,t={},n={}){return new y(n).historyCompact(e,t)}function jg(e,t={}){return new y(t).historyCompactBulk(e)}function Gg(e={},t={}){return new y(t).create(e)}function Ug(e,t={},n={}){return new y(n).update(e,t)}function qg(e,t,n={},s={}){return new y(s).close(e,t,n)}function zg(e,t={},n={}){return new y(n).claim(e,t)}function Hg(e={},t={}){return new y(t).claimNext(e)}function Vg(e,t={},n={}){return new y(n).release(e,t)}function Bg(e,t={},n={}){return new y(n).copy(e,t)}function Wg(e,t={},n={}){return new y(n).delete(e,t)}function Yg(e,t,n={},s={}){return new y(s).restore(e,t,n)}function Jg(e,t={},n={}){return new y(n).focus(e,t)}function Kg(e,t={},n={}){return new y(n).startTask(e,t)}function Xg(e,t={},n={}){return new y(n).pauseTask(e,t)}function Zg(e,t,n={},s={}){return new y(s).closeTask(e,t,n)}function Qg(e,t={},n={}){return new y(n).extension(e,t)}function ey(e={},t={}){return new y(t).extensionList(e)}function ty(e,t={},n={}){return new y(n).extensionActivate(e,t)}function ny(e,t={},n={}){return new y(n).extensionDeactivate(e,t)}function sy(e,t={},n={}){return new y(n).package(e,t)}function oy(e={},t={}){return new y(t).packageList(e)}function ry(e,t={},n={}){return new y(n).packageInstall(e,t)}function iy(e,t={},n={}){return new y(n).packageUninstall(e,t)}function ay(e={},t={}){return new y(t).packageDoctor(e)}function cy(e,t={},n={}){return new y(n).packageManage(e,t)}function my(e,t={},n={}){return new y(n).packageDescribe(e,t)}function dy(e={},t={}){return new y(t).packageReload(e)}function ly(e={},t={}){return new y(t).packageCatalog(e)}function py(e,t={},n={}){return new y(n).packageActivate(e,t)}function uy(e,t={},n={}){return new y(n).packageDeactivate(e,t)}function fy(e,t={},n={}){return new y(n).upgrade(e,t)}function _l(e,t,n){return JSON.stringify([_a.resolve(e),_a.resolve(n??process.cwd()),t.extensions.enabled,t.extensions.disabled,t.extensions.policy])}async function hl(e,t,n){let s=_l(e,t,n);return ii(s,()=>np(e,t,n))}async function _y(e,t={}){let n=await D(e),s=t.extensionRegistrations??(t.noExtensions===!0?null:await hl(e,n,t.cwd)),o=ee(n,s),r=re(n.schema),i=Lt(n.schema);return{types:[...o.types],statuses:r.definitions.map(a=>a.id),openStatus:r.open_status,closeStatus:r.close_status,canceledStatus:r.canceled_status,fields:oi(i.definitions),extensionCommands:ri(s?.commands??[])}}async function hy(e,t={}){let n=typeof e=="string"?{...t,pmRoot:e}:e??t,s={json:!0,quiet:n.quiet??!0,noExtensions:n.noExtensions??!1,noPager:!0,profile:n.profile??!1,path:n.pmRoot};return ln(n,s)}function Y(e,t){let n=l(e,t);if(!n)throw new u(`Missing required argument: ${t}`,64);return n}var ha=Is(),wa=new fl;function ut(){Rt(ws()),Ct(vs()),Tt(ks()),Ot(Ss()),$t(xs()),Ft(Es()),Pt(As())}async function va(e,t,n,s){return Rs(()=>t===void 0?ha.read(()=>ga(e,n,s)):ha.write(()=>yl(t,()=>ga(e,n,s))))}async function gy(e,t){let n=e.cwd,s=n??process.cwd();return va(st({path:e.path,noExtensions:e.noExtensions}),n,s,()=>wa.run(!0,t))}async function ga(e,t,n){let s=F(t,e.path);if(e.noExtensions)return ut(),Sn({pmRoot:s},()=>n(null));if(!await G(U(s)))return ut(),n(null);let o=null,r;try{let i=await D(s),a=await Et({pmRoot:s,settings:i,cwd:t,noExtensions:!1}),c=await It({...a,loaded:a.loaded});r={loadResult:a,activationResult:c},Rt(c.hooks),Ct(c.commands),Tt(c.parsers),Ot(c.preflight),$t(c.services),Ft(c.renderers),Pt(c.registrations),o={registrations:c.registrations,commands:c.commands,pmRoot:s,packages:a.loaded}}catch(i){ut(),console.error("[pm-sdk] extension activation failed; continuing without active extensions:",i)}try{return await Sn({pmRoot:s,packages:o?.packages},()=>n(o))}finally{ut(),r&&await At(r.loadResult,r.activationResult).catch(()=>{})}}async function gl(e,t,n,s,o){if(!o)throw new u(`Unsupported native pm action: ${e}`,_.USAGE);let r=se(e),a=o.registrations.commands.find(d=>se(d.action)===r)?.command??o.commands.handlers.find(d=>se(d.command)===r)?.command;if(!a)throw new u(`Unsupported native pm action: ${e}`,_.USAGE);let c=await Ts({command:Yn(a),args:T(n.args??t.args),options:Jn(t,n),global:s,pm_root:o.pmRoot,sdk:pi(o.pmRoot,y.forActiveExtensionHost({pmRoot:o.pmRoot,author:typeof s.author=="string"&&s.author.trim()?s.author.trim():"pm-extension"}))});if(!c.handled){let d=c.warnings.length>0?` (${c.warnings.join(", ")})`:"";throw new u(`Unsupported native pm action: ${e}${d}`,_.USAGE)}return c.result}async function yl(e,t){let n=process.cwd();process.chdir(e);try{return await t()}finally{process.chdir(n)}}var bl=new Set(["activity","aggregate","context","contracts","deps","files-discover","get","graph","health","history","list","next","search","stats","telemetry","validate"]);function wl(e){let t=Y(e,"action"),n=se(t),s=we(hn,n),o=s?.action??n,r={...e,action:o};return s?.options!==void 0&&(r.options={...s.options,...ke(e.options)}),o==="package"&&(r.options={...ke(r.options),vocabulary:"package"}),{action:o,args:r}}function vl(e){return!bl.has(se(e))}async function kl(e){let t=wl(e),n=st(t.args),s=vl(t.action),o=l(t.args,"cwd"),r=o??process.cwd();try{return e[ba]===!0||wa.getStore()===!0?await ya(t.action,t.args,n,null):await va(n,o,r,i=>ya(t.action,t.args,n,i))}finally{s&&_n()}}function we(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function ft(e){return l(e.args,"target")??l(e.options,"target")}function E(e,t=e.options){return e.id??Y(t,"id")}async function Sl(e){let t=ue("list",e.options);return t.compact===void 0&&t.brief===void 0&&t.fields===void 0&&t.includeBody===void 0&&(t.compact=!0),fn(await Kt(l(e.args,"status")??l(t,"status"),t,e.global),t)}async function xl(e){let t=ue("search",e.options);return t.compact===void 0&&t.full===void 0&&t.fields===void 0&&(t.compact=!0),fn(await mn(Y(e.args,"query"),t,e.global),t)}async function El(e){let{changedFields:t,idOnly:n,runnerOptions:s}=W(e.args,e.options);return J(await Ae(s,e.global),{changedFields:t,compactEnvelope:t==="compact"&&!n,idOnly:n})}async function Al(e){let{changedFields:t,idOnly:n,runnerOptions:s}=W(e.args,e.options),o={...s,...s.title===void 0&&typeof e.args.title=="string"?{title:e.args.title}:{},...s.message===void 0&&typeof e.args.message=="string"?{message:e.args.message}:{}};return J(await nn(E(e,o),o,e.global),{changedFields:t,compactEnvelope:t==="compact"&&!n,idOnly:n})}async function Il(e){let{changedFields:t,idOnly:n,runnerOptions:s}=W(e.args,e.options);return J(await fe(E(e,s),s,e.global),{changedFields:t,compactEnvelope:t==="compact"&&!n,idOnly:n})}async function Rl(e){let{changedFields:t,idOnly:n,runnerOptions:s}=W(e.args,e.options),o=l(e.args,"reason")??l(e.args,"text")??l(s,"reason")??l(s,"text");return J(await We(E(e,s),o,s,e.global),{changedFields:t,compactEnvelope:t==="compact"&&!n,idOnly:n})}function Cl(e){let t={...e.options};return t.add===void 0&&t.stdin===void 0&&t.file===void 0&&t.edit===void 0&&t.delete===void 0&&(t.includeMeta=!0,t.limit===void 0&&t.full!==!0&&(t.limit="20")),delete t.full,Xo(E(e),t,e.global)}function Tl(e){let t=T(e.options.lookupPath);if(t&&t.length>0)return an({paths:t,scope:e.options.scope==="project"||e.options.scope==="global"?e.options.scope:void 0,limit:$(e.options.limit,"files lookup limit"),offset:$(e.options.offset,"files lookup offset"),noTruncate:e.options.noTruncate===!0,strictRead:e.options.strictRead===!0},e.global);let n=E(e);return e.options.discover===!0?cn(n,Wn(e.options),e.global):Er(n,rt(e.options),e.global)}function Ol(e){return Xr({subcommand:l(e.args,"subcommand")??l(e.options,"subcommand"),limit:Ni(e.args,e.options)},e.global)}function $l(e){let t={...e.options};return t.brief===void 0&&t.summary===void 0&&t.full===void 0&&(t.summary=!0),Sr(e.global,t)}function Fl(e){let t=l(e.args,"configAction")??l(e.options,"configAction")??l(e.options,"action");if(t===void 0)throw new u("Missing required argument: configAction",64);return Ar(l(e.args,"scope")??l(e.options,"scope")??"project",t,l(e.args,"key")??l(e.options,"key"),e.options,e.global,l(e.args,"value")??l(e.options,"value"))}function Pl(e){let t={...e.options};return t.compact===void 0&&(t.compact=t.full!==!0),delete t.full,zo(t,e.global)}function Ll(e,t){if(typeof e=="number"){if(!Number.isFinite(e)||!Number.isInteger(e))throw new u(`${t} must be a finite integer.`,64);return e}if(typeof e=="string"&&e.trim().length>0){let n=e.trim();if(!/^[+-]?\d+(?:st|nd|rd|th)?$/i.test(n))throw new u(`${t} must be a finite integer.`,64);let s=Number.parseInt(n,10);if(!Number.isInteger(s))throw new u(`${t} must be a finite integer.`,64);return s}}function Nl(e){let t=l(e.args,"subcommand")??Y(e.options,"subcommand"),n=e.options;return Ai({subcommand:t,id:typeof e.id=="string"?e.id:typeof n.id=="string"?n.id:void 0,stepRef:Ml(e),reorderTo:Ll(n.reorderTo??e.args.reorderTo,"plan reorderTo"),options:e.options,global:e.global})}function Ml(e){return typeof e.options.stepRef=="string"?e.options.stepRef:typeof e.args.stepRef=="string"?e.args.stepRef:void 0}function Dl(e){let t=l(e.args,"subcommand")??Y(e.options,"subcommand"),n=e.args.alias??e.options.alias;return{ctx:e,subcommand:t.trim().toLowerCase(),name:l(e.args,"name")??l(e.options,"name"),author:l(e.args,"author")??l(e.options,"author"),force:e.args.force===!0||e.options.force===!0,aliases:n===void 0?void 0:T(n)}}function jl(e){let{ctx:t,subcommand:n,name:s,author:o,force:r}=e,a=we({list:()=>ar(t.global),show:()=>cr(s,t.global),"show-status":()=>mr(s,t.global),"list-fields":()=>pr(t.global),"show-field":()=>ur(s,t.global),"remove-type":()=>or(s,{author:o,force:r},t.global),"remove-field":()=>lr(s,{author:o,force:r},t.global),"remove-status":()=>ir(s,{author:o,force:r},t.global),"apply-preset":()=>fr(l(t.args,"typePreset")??l(t.options,"typePreset"),{author:o,force:r},t.global)},n);return a?a():null}function Gl(e){let{ctx:t,name:n,author:s,force:o,aliases:r}=e,i=t.args.commands??t.options.commands,a=t.args.requiredTypes??t.options.requiredTypes;return dr(n,{type:l(t.args,"fieldType")??l(t.options,"fieldType"),commands:i===void 0?void 0:T(i),description:l(t.args,"description")??l(t.options,"description"),cliFlag:l(t.args,"cliFlag")??l(t.options,"cliFlag"),alias:r,required:t.args.required===!0||t.options.required===!0,requiredOnCreate:t.args.requiredOnCreate===!0||t.options.requiredOnCreate===!0,allowUnset:!(t.args.allowUnset===!1||t.options.allowUnset===!1),requiredTypes:a===void 0?void 0:T(a),author:s,force:o},t.global)}function Ul(e){let{ctx:t,name:n,author:s,force:o,aliases:r}=e,i=t.args.role??t.options.role;return rr(n,{role:i===void 0?void 0:T(i),alias:r,description:l(t.args,"description")??l(t.options,"description"),order:$(t.args.order??t.options.order,"schema add-status order"),author:s,force:o},t.global)}function ql(e){let{ctx:t,name:n,author:s,force:o,aliases:r}=e;return sr(n,{description:l(t.args,"description")??l(t.options,"description"),defaultStatus:l(t.args,"defaultStatus")??l(t.args,"default_status")??l(t.options,"defaultStatus")??l(t.options,"default_status"),folder:l(t.args,"folder")??l(t.options,"folder"),alias:r,author:s,force:o},t.global)}function zl(e){let{ctx:t,subcommand:n,name:s,author:o,force:r}=e,i=l(t.args,"to")??Y(t.options,"to"),a=l(t.args,"migrationId")??l(t.args,"migration_id")??l(t.options,"migrationId")??l(t.options,"migration_id"),c=l(t.args,"fieldTypeScope")??l(t.options,"fieldTypeScope")??l(t.args,"type")??l(t.options,"type"),d=n==="rename-type"?{kind:"rename-type",from:s??"",to:i}:n==="rename-field"?{kind:"rename-field",from:s??"",to:i,...c===void 0?{}:{type:c}}:{kind:"remap-status",from:s??"",to:i};return nr(d,{migrationId:a,dryRun:t.args.dryRun===!0||t.options.dryRun===!0,author:o,force:r},t.global)}function Hl(e){let t=Dl(e),n=jl(t);if(n!==null)return n;if(t.subcommand==="rename-type"||t.subcommand==="rename-field"||t.subcommand==="remap-status")return zl(t);if(t.subcommand==="add-field")return Gl(t);if(t.subcommand==="add-status")return Ul(t);if(t.subcommand==="add-type")return e.args.infer===!0||e.options.infer===!0?_r({minCount:$(e.args.minCount??e.options.minCount,"schema infer minCount"),apply:e.args.apply===!0||e.options.apply===!0,author:t.author,force:t.force},e.global):ql(t);throw new u(`Unknown pm schema subcommand "${t.subcommand}". Allowed: add-type, remove-type, add-status, remove-status, add-field, remove-field, rename-type, rename-field, remap-status, list-fields, show-field, apply-preset, list, show, show-status`,64)}function Vl(e){let t=l(e.args,"subcommand")??Y(e.options,"subcommand"),n=t.trim().toLowerCase(),s=l(e.args,"name")??l(e.options,"name"),r=we({list:()=>Ur(),show:()=>qr(s),lint:()=>zr(s),apply:()=>Hr(s,{dryRun:e.args.dryRun===!0||e.options.dryRun===!0,author:l(e.args,"author")??l(e.options,"author"),force:e.args.force===!0||e.options.force===!0},e.global)},n);if(!r)throw new u(`Unknown pm profile subcommand "${t}". Allowed: list, show, apply, lint`,64);return r()}async function Bl(e){let{changedFields:t,idOnly:n,runnerOptions:s}=W(e.args,e.options);return J(await Ho(E(e,s),s,e.global),{changedFields:t,compactEnvelope:t==="compact"&&!n,idOnly:n})}async function Wl(e){let{changedFields:t,runnerOptions:n}=W(e.args,e.options);return J(await er(Xn(n),e.global),{changedFields:t})}async function Yl(e){let{changedFields:t,runnerOptions:n}=W(e.args,e.options),s=l(e.args,"reason"),o=s!==void 0&&n.reason===void 0?{...n,reason:s}:{...n};return e.force&&o.force===void 0&&(o.force=!0),J(await Ko(Kn(o),e.global),{changedFields:t})}async function Jl(e){let{changedFields:t,idOnly:n,runnerOptions:s}=W(e.args,e.options),o=l(s,"target")??Y(e.args,"target");return J(await tn(E(e,s),o,s,e.global),{changedFields:t,compactEnvelope:t==="compact"&&!n,idOnly:n})}function ka(e){let t={...e};return delete t.assignee,t}async function Kl(e){let t=F(process.cwd(),e.global.path),n=await D(t),s=ei(re(n.schema)),o=E(e),r=await en(o,e.force,e.global,e.options),i=await fe(o,{...ka(e.options),status:s,force:e.force},e.global);return{id:o,action:"start_task",claim:r,update:i}}async function Xl(e){let t=F(process.cwd(),e.global.path),n=await D(t),s=E(e),o=re(n.schema).open_status,r=await fe(s,{...ka(e.options),status:o,force:e.force},e.global),i=await Be(s,e.force,e.global,e.options);return{id:s,action:"pause_task",update:r,release:i}}async function Zl(e){let t=E(e),n=l(e.args,"reason")??l(e.args,"text")??l(e.options,"reason")??l(e.options,"text"),s=await We(t,n,{...e.options,force:e.force},e.global),o=await Be(t,e.force,e.global,e.options);return{id:t,action:"close_task",close:s,release:o}}function Ql(e){let t={...e.args,...e.options};return Jr(Y(t,"subcommand"),l(t,"id")??e.id,l(t,"target"),Mi(t),e.global)}function ep(e){let t={...e.args,...e.options},n=T(t.historyEvent).map(s=>{let o=s.lastIndexOf(":");return{item_id:s.slice(0,o).trim(),line:Number(s.slice(o+1))}});return yr(F(process.cwd(),e.global.path),{events:n,all_actionable:t.allActionable===!0||t.all_actionable===!0,attributed_author:l(t,"attributedAuthor")??l(t,"attributed_author")??"",reviewer:l(t,"reviewer")??"",reason:l(t,"reason")??""})}var Sa={init:e=>Ir(l(e.args,"prefix"),e.global,e.options),context:e=>Zt(ue("context",e.options),e.global),next:e=>Qt(ue("next",e.options),e.global),eval:Di,events:ji,merge:Gi,workspace:Ui,meet:at,event:at,remind:at,list:Sl,get:e=>rn(E(e),e.global,ue("get",e.options)),search:xl,duplicates:e=>{let t=typeof e.options.status=="string"?[e.options.status]:T(e.options.status);return un(e.global,{...t.length===0?{}:{status:t},since:l(e.options,"since"),threshold:typeof e.options.threshold=="number"?e.options.threshold:void 0,limit:e.options.limit==="default"?void 0:$(e.options.limit,"limit")})},create:El,copy:Al,focus:e=>on(e.id,{clear:e.options.clear===!0||e.args.clear===!0},e.global),update:Il,restore:Jl,claim:e=>e.options.next===!0||e.args.next===!0?Jo(e.force,e.global,{...e.options,...e.args},{...e.options,...e.args}):en(E(e),e.force,e.global,e.options),release:e=>Be(E(e),e.force,e.global,e.options),"start-task":Kl,"pause-task":Xl,"close-task":Zl,close:Rl,comments:Cl,notes:e=>fi(E(e),e.options,e.global),learnings:e=>Qo(E(e),e.options,e.global),files:Tl,docs:e=>xr(E(e),rt(e.options),e.global),test:e=>Zr(E(e),e.options,e.global),"test-all":e=>Qr(e.options,e.global),telemetry:Ol,validate:e=>Je(e.options,e.global,{runUpdate:(t,n,s)=>fe(t,n,s)}),health:$l,contracts:e=>ln(e.options,e.global),config:Fl,activity:Pl,aggregate:e=>Xt(e.options,e.global),extension:e=>Ye(ft(e),e.options,e.global),package:e=>Ye(ft(e),e.options,e.global),install:e=>Ye(ft(e),{...e.options,install:!0},e.global),upgrade:e=>hr(ft(e),e.options,e.global),delete:e=>sn(E(e),e.options,e.global),deps:e=>Yr(E(e),e.options,e.global),graph:Ql,"files-discover":e=>cn(E(e),e.options,e.global),"files-lookup":e=>an({paths:T(e.options.paths),scope:e.options.scope==="project"||e.options.scope==="global"?e.options.scope:void 0,limit:$(e.options.limit,"files lookup limit"),offset:$(e.options.offset,"files lookup offset"),noTruncate:e.options.noTruncate===!0,strictRead:e.options.strictRead===!0},e.global),history:e=>Zo(E(e),e.options,e.global),"history-redact":e=>jo(E(e),e.options,e.global),"history-repair":qi,"history-compact":zi,"history-author-acknowledge":ep,plan:Nl,schema:Hl,profile:Vl,stats:e=>pn(e.global,Hi(e.options)),append:Bl,"update-many":Wl,"close-many":Yl,gc:e=>gr(e.global,e.options)};function yy(e=Us){return e.map(t=>{let n=se(t),s=we(hn,n),o=s?.action??n,r=we(Sa,o)!==void 0;return{action:t,resolved_action:o,covered:r,route:r?s?"alias":"native":"missing"}})}async function ya(e,t,n,s){let o=Bn(t,e);Ms(e,o);let r={action:e,args:t,options:o,id:l(t,"id"),force:t.force===!0||o.force===!0,global:n,activeExtensions:s},i=we(Sa,e),a=i?await i(r):await gl(e,t,o,n,s);return js(e,o,a)}var tp={closeManyOptionsFromFlat:Kn,extensionOptionsFromArgs:Jn,globalOptions:st,mutationListOptions:Fe,normalizeActionName:se,normalizeCommandPath:Yn,normalizeMcpUpdateOptions:it,normalizeMcpOptionsArrays:ot,optionsWithAuthor:Bn,readRequiredString:Y,readScalarString:x,readScalarStringAllowBlank:Vn,readStringArray:T,updateManyOptionsFromFlat:Xn,withAddNoteOption:rt,withFilesDiscoveryOptions:Wn,withMutationCompaction:W};(process.env.NODE_ENV==="test"||process.env.VITEST!==void 0||process.env.VITEST_WORKER_ID!==void 0)&&(globalThis.__pmCliActionRunnerTestHooks=tp);async function np(e,t,n){let s=await Et({pmRoot:e,settings:t,cwd:n??process.cwd(),noExtensions:!1}),o=await It(s);try{return o.registrations}finally{try{await At(s,o)}catch{}}}export{ci as a,Oa as b,gn as c,Te as d,et as e,pi as f,mp as g,dp as h,lp as i,pp as j,up as k,ni as l,fp as m,Aa as n,_n as o,kn as p,ui as q,qa as r,Ha as s,Va as t,Sn as u,fi as v,Zp as w,_i as x,Rn as y,Ai as z,Ii as A,Ri as B,Uc as C,qc as D,Ci as E,Oi as F,$i as G,Fi as H,Pi as I,$e as J,lm as K,pm as L,um as M,O as N,fm as O,_m as P,hm as Q,gm as R,Qn as S,Vi as T,ge as U,Zn as V,Bi as W,ym as X,Wi as Y,bm as Z,wm as _,vm as $,km as aa,Sm as ba,Tm as ca,Xi as da,Om as ea,Dm as fa,Vm as ga,Wm as ha,qd as ia,ul as ja,y as ka,Hh as la,Vh as ma,Bh as na,Wh as oa,Yh as pa,Jh as qa,Kh as ra,Xh as sa,Zh as ta,Qh as ua,eg as va,tg as wa,ng as xa,sg as ya,og as za,rg as Aa,ig as Ba,ag as Ca,cg as Da,mg as Ea,dg as Fa,lg as Ga,pg as Ha,ug as Ia,fg as Ja,_g as Ka,hg as La,gg as Ma,yg as Na,bg as Oa,wg as Pa,vg as Qa,kg as Ra,Sg as Sa,xg as Ta,Eg as Ua,Ag as Va,Ig as Wa,Rg as Xa,Cg as Ya,Tg as Za,Og as _a,$g as $a,Fg as ab,Pg as bb,Lg as cb,Ng as db,Mg as eb,Dg as fb,jg as gb,Gg as hb,Ug as ib,qg as jb,zg as kb,Hg as lb,Vg as mb,Bg as nb,Wg as ob,Yg as pb,Jg as qb,Kg as rb,Xg as sb,Zg as tb,Qg as ub,ey as vb,ty as wb,ny as xb,sy as yb,oy as zb,ry as Ab,iy as Bb,ay as Cb,cy as Db,my as Eb,dy as Fb,ly as Gb,py as Hb,uy as Ib,fy as Jb,_y as Kb,hy as Lb,Y as Mb,gy as Nb,kl as Ob,yy as Pb};
2008
- //# sourceMappingURL=chunk-WYNUU7ZW.js.map