@unbrained/pm-cli 2026.8.5 → 2026.8.6
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.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +14 -0
- package/dist/cli/main.js +12 -37
- package/dist/cli/register-setup.d.ts +1 -1
- package/dist/cli/register-setup.js +46 -20
- package/dist/cli-bundle/bundle-manifest.json +391 -391
- package/dist/cli-bundle/chunks/append-XAJ5Z4XS.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-2WFXWAYX.js → chunk-343QETLI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RKAVWO3O.js → chunk-3KFVGGRE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VCKLFEUN.js → chunk-3ZJRFYY2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UZBWIUYD.js → chunk-4AVFKHHC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BPELKUQD.js → chunk-4OVGQW22.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-54FNT7U2.js → chunk-5PBP2ZP3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NY4T3JWN.js → chunk-5ZKQPA44.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4YUBDMQM.js → chunk-A3XQ7VPU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OPVH7SKD.js → chunk-AJE3AHPD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V3774P7D.js → chunk-AOBDLU4T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VN5VITU3.js → chunk-AYRUGRNS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HWRRMBJO.js → chunk-BP6EMEDP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZYHOB3SN.js → chunk-C3YABSJK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-43HQQI6S.js → chunk-CA3BURYF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-E2RKBKWB.js → chunk-D7I3TUGV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4VN6GS4U.js → chunk-DQGJ2RWT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YSO3YFZ4.js → chunk-DWOAOZHZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q35VBGOQ.js → chunk-E7BFPLUZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LKDGK44W.js → chunk-F4NREH3G.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OMXVBQ2N.js → chunk-FDBRXV25.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3FTILRJ2.js → chunk-GU3TSEHD.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-HS7OVAUN.js +164 -0
- package/dist/cli-bundle/chunks/{chunk-OTHLDSFP.js → chunk-JFZIS6JF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7A5OT5J2.js → chunk-JQ4NZ5EB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BXQLRKWF.js → chunk-L6LGKJX3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CSI3WS5I.js → chunk-M357ZCOR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5ZBOIPGP.js → chunk-M4VEE3FK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7C4PTJG6.js → chunk-MCS73BKB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A62CYISG.js → chunk-MDTH7SAE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HNFD72UK.js → chunk-OXY3SJ3N.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L3AZOELJ.js → chunk-PECV7L5T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DXDREUXT.js → chunk-Q3VOP62W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UP7DTVMD.js → chunk-QJ7C3JIW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-42E7YPLG.js → chunk-R6LSRGPS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MHK6LIWE.js → chunk-R6RKEYYW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UN66FZRO.js → chunk-RAFUN7IX.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-RUAU5OSH.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SD3YXU2U.js +56 -0
- package/dist/cli-bundle/chunks/{chunk-SSF4PIUR.js → chunk-SV3YQ4RY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V3EUXXOF.js → chunk-SVV3DQES.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-45G53IU4.js → chunk-SXECIECW.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-T45OHXDW.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-PMXJEU3F.js → chunk-TPKDJ5WL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-M72BKL5Q.js → chunk-UVVXHGYS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WRL4KNDL.js → chunk-V663653R.js} +19 -19
- package/dist/cli-bundle/chunks/{chunk-R546TPDE.js → chunk-WSI5KZQJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6MSQJOTG.js → chunk-XPOQQJTX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XCEZYMNI.js → chunk-YCCDXBNU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LN2WFEU4.js → chunk-ZFBWCKYF.js} +2 -2
- package/dist/cli-bundle/chunks/close-DI66JMSB.js +2 -0
- package/dist/cli-bundle/chunks/close-many-VFKT6U3O.js +2 -0
- package/dist/cli-bundle/chunks/comments-E73HIEZJ.js +2 -0
- package/dist/cli-bundle/chunks/copy-WBYVLCPC.js +2 -0
- package/dist/cli-bundle/chunks/{create-XLKTXTUF.js → create-TG67IVFI.js} +2 -2
- package/dist/cli-bundle/chunks/delete-6XKUVVQN.js +2 -0
- package/dist/cli-bundle/chunks/{deps-ITTY3GIC.js → deps-AJUGP2OH.js} +2 -2
- package/dist/cli-bundle/chunks/{docs-W4OSRTYR.js → docs-QOCLDRKJ.js} +2 -2
- package/dist/cli-bundle/chunks/{files-EOK4AZI4.js → files-3ST5TY64.js} +2 -2
- package/dist/cli-bundle/chunks/focus-R2AWS63Y.js +2 -0
- package/dist/cli-bundle/chunks/{history-compact-7UGTMLL3.js → history-compact-7BJFML4S.js} +2 -2
- package/dist/cli-bundle/chunks/{history-redact-4DZRMD6Z.js → history-redact-WJN3HYXR.js} +2 -2
- package/dist/cli-bundle/chunks/{history-repair-UPOSZW5R.js → history-repair-XDNZUB7F.js} +2 -2
- package/dist/cli-bundle/chunks/{learnings-GMRNCBS3.js → learnings-SZMUPVNA.js} +2 -2
- package/dist/cli-bundle/chunks/{profile-2MUUMHRE.js → profile-KL53JIAC.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-LR3SQ5ZF.js → register-list-query-QH7ONPKU.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-SUOHFVWM.js → register-mutation-OCRQNZK4.js} +3 -3
- package/dist/cli-bundle/chunks/{register-operations-ARRRKOVN.js → register-operations-HIBJXRGB.js} +2 -2
- package/dist/cli-bundle/chunks/register-setup-QWBQ6HBS.js +2 -0
- package/dist/cli-bundle/chunks/restore-FXA5QPM7.js +2 -0
- package/dist/cli-bundle/chunks/{schema-FJ4EA3XF.js → schema-QJ27OTRV.js} +2 -2
- package/dist/cli-bundle/chunks/update-7GBO4SXG.js +2 -0
- package/dist/cli-bundle/chunks/update-many-VF6ZKQUO.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-B7LJWAZE.js → chunk-27DK4A5O.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SV3O7TSH.js → chunk-4JC3AOGS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-G6ETT4QK.js → chunk-6KDHXURF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PG2RIZBX.js → chunk-74CWP3A4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-Y4LDYLLT.js → chunk-7AZDTGPA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-7YTZ7A4E.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-A7BJ5SS6.js → chunk-CL3NB7VW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-EAXXF2HW.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-UIL2M2NA.js → chunk-EYO4F74Z.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7J5TUBUJ.js → chunk-GEYU23YS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WEM2E2PE.js → chunk-GIERI4YU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WVIVUWVL.js → chunk-GSW2Y7VZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VLYOEYML.js → chunk-LKQXXO62.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MJ7HWSFK.js → chunk-MBBMTDD3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PIMMYG7Q.js → chunk-ME4XVOBJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IPWSFADF.js → chunk-N7QN3NE6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-W7BJEWHX.js → chunk-QL5H3AQH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-TQMFQYXR.js +29 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RUR5I3TK.js → chunk-XNVXIQ4B.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FGKY4MBE.js → chunk-YHDCGUIW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-QVHKCI4T.js → chunk-YLPZHWX7.js} +2 -2
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +25 -25
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +1 -1
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +1 -1
- package/dist/core/extensions/activation-summary.d.ts +4 -0
- package/dist/core/extensions/activation-summary.js +5 -2
- package/dist/core/extensions/contribution-inventory.d.ts +1 -0
- package/dist/core/extensions/contribution-inventory.js +35 -2
- package/dist/core/extensions/extension-hook-runtime.js +5 -3
- package/dist/core/extensions/extension-types.d.ts +18 -1
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/loader.js +5 -13
- package/dist/core/extensions/preflight-ownership.d.ts +5 -0
- package/dist/core/extensions/preflight-ownership.js +42 -0
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +8 -2
- package/dist/sdk/cli-contracts/runtime-contracts.js +4 -3
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +3 -3
- package/dist/sdk/compose.d.ts +2 -2
- package/dist/sdk/compose.js +7 -2
- package/dist/sdk/define.d.ts +3 -1
- package/dist/sdk/define.js +3 -8
- package/dist/sdk/extension/install-sources.d.ts +43 -5
- package/dist/sdk/extension/install-sources.js +36 -2
- package/dist/sdk/extension/migrations.d.ts +114 -0
- package/dist/sdk/extension/migrations.js +175 -0
- package/dist/sdk/extension/scaffold.js +14 -9
- package/dist/sdk/extension/source-resolution.d.ts +50 -0
- package/dist/sdk/extension/source-resolution.js +66 -0
- package/dist/sdk/extension.d.ts +5 -1
- package/dist/sdk/extension.js +24 -26
- package/dist/sdk/governance/health.js +11 -2
- package/dist/sdk/index.d.ts +6 -2
- package/dist/sdk/index.js +8 -4
- package/dist/sdk/package-migrations.d.ts +10 -0
- package/dist/sdk/package-migrations.js +21 -0
- package/dist/sdk/runtime.d.ts +2 -0
- package/dist/sdk/runtime.js +6 -2
- package/docs/COMMANDS.md +9 -0
- package/docs/EXTENSIONS.md +2 -2
- package/docs/EXTENSION_LIFECYCLE.md +46 -0
- package/docs/README.md +1 -0
- package/docs/RELEASING.md +33 -20
- package/docs/SDK.md +31 -3
- package/marketplace.json +2 -2
- package/package.json +3 -3
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +218 -20
- package/dist/cli-bundle/chunks/append-VXXGOXSG.js +0 -2
- package/dist/cli-bundle/chunks/chunk-EGJ4JTUG.js +0 -55
- package/dist/cli-bundle/chunks/chunk-FPBQHMFT.js +0 -8
- package/dist/cli-bundle/chunks/chunk-GE4KCSZP.js +0 -164
- package/dist/cli-bundle/chunks/chunk-YEWNL576.js +0 -2
- package/dist/cli-bundle/chunks/close-VZ3OQPN5.js +0 -2
- package/dist/cli-bundle/chunks/close-many-SB4TI27P.js +0 -2
- package/dist/cli-bundle/chunks/comments-BIF3Q4KY.js +0 -2
- package/dist/cli-bundle/chunks/copy-6AI5Z57X.js +0 -2
- package/dist/cli-bundle/chunks/delete-ZY2VHQTP.js +0 -2
- package/dist/cli-bundle/chunks/focus-DLBNWL7L.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-O6AYP6NP.js +0 -2
- package/dist/cli-bundle/chunks/restore-ZVCVHTB5.js +0 -2
- package/dist/cli-bundle/chunks/update-YHV52CSS.js +0 -2
- package/dist/cli-bundle/chunks/update-many-M6YHVNXM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-BIMTMOS7.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-GJ2TG2CW.js +0 -28
- package/dist/cli-bundle/focused-chunks/chunk-N5XU5UVK.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Ke,c as Cr,d as Xe}from"./chunk-V3EUXXOF.js";import{B as Lr,C as Nr,D as Mr,E as Dr,F as jr,H as Gr,M as Kr,aa as ln,b as en,ba as pn,c as Jo,ca as un,d as Be,ea as Xr,f as gr,k as yr,l as Re,m as br,n as wr,o as vr,oa as Zr,p as kr,pa as Qr,q as Sr,qa as ei,w as Je,x as $r,y as Fr,z as Pr}from"./chunk-WRL4KNDL.js";import{a as sn}from"./chunk-DXDREUXT.js";import{a as Ho}from"./chunk-45G53IU4.js";import{r as Ur,s as qr,t as zr,u as Hr}from"./chunk-R546TPDE.js";import{a as Qo}from"./chunk-MHK6LIWE.js";import{b as Er,c as an,d as cn}from"./chunk-UZBWIUYD.js";import{a as xr}from"./chunk-OMXVBQ2N.js";import{a as er}from"./chunk-3FTILRJ2.js";import{a as Vr,c as Br,d as Wr}from"./chunk-2WFXWAYX.js";import{a as Xo}from"./chunk-V3774P7D.js";import{a as Vo,c as Bo,e as Wo,g as Yo}from"./chunk-54FNT7U2.js";import{a as nn}from"./chunk-OTHLDSFP.js";import{a as on}from"./chunk-7A5OT5J2.js";import{a as fe}from"./chunk-VN5VITU3.js";import{a as hr,b as Ar}from"./chunk-7C4PTJG6.js";import{h as Ie,o as Ye,u as Ir}from"./chunk-EGJ4JTUG.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-VCKLFEUN.js";import{D as mn,F as Rr,G as Tr,Z as Jr,b as Uo,e as Xt,g as Zo,m as rn}from"./chunk-Q35VBGOQ.js";import{h as zo,ja as Zt,oa as Qt}from"./chunk-6MSQJOTG.js";import{n as Yr}from"./chunk-LKDGK44W.js";import{p as Or,r as dn}from"./chunk-OPVH7SKD.js";import{b as ro,c as io,o as ao}from"./chunk-LN2WFEU4.js";import{P as Ae}from"./chunk-HWRRMBJO.js";import{a as Ko}from"./chunk-CSI3WS5I.js";import{a as tn}from"./chunk-HNFD72UK.js";import{c as We}from"./chunk-PMXJEU3F.js";import{u as Kt}from"./chunk-RKAVWO3O.js";import{b as Go}from"./chunk-43HQQI6S.js";import{i as jo}from"./chunk-ZYHOB3SN.js";import{$ as bo,A as ho,Ca as No,Da as Ve,Ea as Mo,Fa as Do,Ia as S,S as go,T as yo,ba as wo,c as co,e as mo,f as He,g as lo,ia as vo,ja as ko,la as So,m as po,oa as xo,pa as Eo,qa as Ao,ra as Io,sa as Ro,ta as Co,u as uo,ua as To,v as fo,va as Oo,wa as $o,x as _o,xa as Fo,ya as Po,za as Lo}from"./chunk-YEWNL576.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-A62CYISG.js";import{a as zs}from"./chunk-5ZBOIPGP.js";import{a as Jt}from"./chunk-A6KGKEWT.js";import{a as Ut}from"./chunk-42E7YPLG.js";import{$ as ys,A as _,Af as D,Bb as C,Be as Us,C as u,Da as ee,E as gs,Ea as bs,Ec as Ge,Gd as J,Kf as Bs,La as $,Lf as qt,Mf as zt,N as ke,Nc as re,Oa as U,Pc as Lt,Qc as Fs,R as k,Ra as xt,Sd as Ps,Sf as Ht,T as De,Ud as Ls,Vb as Et,Wb as At,Xb as It,Xd as Ns,Zb as Is,Ze as jt,_e as Gt,aa as yt,ad as Nt,b as G,ca as bt,cd as Mt,ce as Ms,d as Q,dc as Rs,dd as Ue,ec as Rt,f as gt,fc as Ct,g as ps,gc as Tt,gd as qe,hc as Ot,hd as Se,ib as je,ic as $t,id as Dt,if as qs,jc as Ft,je as Ds,jf as xe,k as us,kc as Pt,l as fs,lb as pe,lc as q,m as _s,me as ue,mf as ie,n as hs,qe as js,sa as wt,sb as ws,ta as vt,tb as vs,ua as kt,ub as ks,uc as oe,va as St,vb as Ss,wb as xs,xb as Es,yb as As,yc as Cs,zc as Ts,zd as V,ze as Gs}from"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="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),xa=ni(Ve,io);import{AsyncLocalStorage as pl}from"node:async_hooks";import ua 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 Ea(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=Ea(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 Aa=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>=Aa){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 Ia={"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"},...Ia,...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 Ra(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 Ca(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,Ra(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 Ta(e){return Object.freeze({...e,...e.payload===void 0?{}:{payload:Object.freeze(structuredClone(e.payload))}})}function Oa(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 $a(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 Fa(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 Pa(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 Oa(d,t,o,r),Ta(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=Fa(t,this.version,this.#r),s=this.#e.get(n.relationshipId),o=Pa(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=$a(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}:{}}}},La="relationship-event-store",li=Ce.O_NOFOLLOW;function Ze(e){return ie(e,La,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(`
|
|
1
|
+
import{b as Ke,c as Cr,d as Xe}from"./chunk-SVV3DQES.js";import{B as Lr,C as Nr,D as Mr,E as Dr,F as jr,H as Gr,M as Kr,aa as ln,b as en,ba as pn,c as Jo,ca as un,d as Be,ea as Xr,f as gr,k as yr,l as Re,m as br,n as wr,o as vr,oa as Zr,p as kr,pa as Qr,q as Sr,qa as ei,w as Je,x as $r,y as Fr,z as Pr}from"./chunk-V663653R.js";import{a as sn}from"./chunk-Q3VOP62W.js";import{a as Ho}from"./chunk-SXECIECW.js";import{r as Ur,s as qr,t as zr,u as Hr}from"./chunk-WSI5KZQJ.js";import{a as Qo}from"./chunk-R6RKEYYW.js";import{b as Er,c as an,d as cn}from"./chunk-4AVFKHHC.js";import{a as xr}from"./chunk-FDBRXV25.js";import{a as er}from"./chunk-GU3TSEHD.js";import{a as Vr,c as Br,d as Wr}from"./chunk-343QETLI.js";import{a as Xo}from"./chunk-AOBDLU4T.js";import{a as Vo,c as Bo,e as Wo,g as Yo}from"./chunk-5PBP2ZP3.js";import{a as nn}from"./chunk-JFZIS6JF.js";import{a as on}from"./chunk-JQ4NZ5EB.js";import{a as fe}from"./chunk-AYRUGRNS.js";import{a as hr,b as Ar}from"./chunk-MCS73BKB.js";import{B as Ir,i as Ie,v as Ye}from"./chunk-SD3YXU2U.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-3ZJRFYY2.js";import{D as mn,F as Rr,G as Tr,Z as Jr,b as Uo,e as Xt,g as Zo,m as rn}from"./chunk-E7BFPLUZ.js";import{h as zo,ja as Zt,oa as Qt}from"./chunk-XPOQQJTX.js";import{n as Yr}from"./chunk-F4NREH3G.js";import{p as Or,r as dn}from"./chunk-AJE3AHPD.js";import{b as ro,c as io,o as ao}from"./chunk-ZFBWCKYF.js";import{P as Ae}from"./chunk-BP6EMEDP.js";import{a as Ko}from"./chunk-M357ZCOR.js";import{a as tn}from"./chunk-OXY3SJ3N.js";import{c as We}from"./chunk-TPKDJ5WL.js";import{u as Kt}from"./chunk-3KFVGGRE.js";import{b as Go}from"./chunk-CA3BURYF.js";import{i as jo}from"./chunk-C3YABSJK.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-RUAU5OSH.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-MDTH7SAE.js";import{a as zs}from"./chunk-M4VEE3FK.js";import{a as Jt}from"./chunk-A6KGKEWT.js";import{a as Ut}from"./chunk-R6LSRGPS.js";import{$ as ys,A as _,Af as D,Bb as C,Be as Us,C as u,Da as ee,E as gs,Ea as bs,Ec as Ge,Gd as J,Kf as Bs,La as $,Lf as qt,Mf as zt,N as ke,Nc as re,Oa as U,Pc as Lt,Qc as Fs,R as k,Ra as xt,Sd as Ps,Sf as Ht,T as De,Ud as Ls,Vb as Et,Wb as At,Xb as It,Xd as Ns,Zb as Is,Ze as jt,_e as Gt,aa as yt,ad as Nt,b as G,ca as bt,cd as Mt,ce as Ms,d as Q,dc as Rs,dd as Ue,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,if as qs,jb as je,jc as Ft,je as Ds,jf as xe,k as us,kc as Pt,l as fs,lc as q,m as _s,mb as pe,me as ue,mf as ie,n as hs,qe as js,sa as wt,sb as ws,ta as vt,tb as vs,ua as kt,ub as ks,uc as oe,va as St,vb as Ss,wb as xs,xb as Es,yb as As,yc as Cs,zc as Ts,zd as V,ze as Gs}from"./chunk-HS7OVAUN.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),xa=ni(Ve,io);import{AsyncLocalStorage as pl}from"node:async_hooks";import ua 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 Ea(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=Ea(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 Aa=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>=Aa){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 Ia={"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"},...Ia,...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 Ra(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 Ca(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,Ra(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 Ta(e){return Object.freeze({...e,...e.payload===void 0?{}:{payload:Object.freeze(structuredClone(e.payload))}})}function Oa(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 $a(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 Fa(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 Pa(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 Oa(d,t,o,r),Ta(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=Fa(t,this.version,this.#r),s=this.#e.get(n.relationshipId),o=Pa(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=$a(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}:{}}}},La="relationship-event-store",li=Ce.O_NOFOLLOW;function Ze(e){return ie(e,La,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
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 Na(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
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(l=>[l.eventId,l])),d=[],m=[];for(let l of t){let f=l.eventId.trim(),g=c.get(f);if(g!==void 0){if(n.existingEventPolicy==="skip_identical"&&Na(g,l,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(l);c.set(w.eventId,w),d.push(w)}if(d.length>0){let l=i.length===0||i.endsWith(`
|
|
4
4
|
`)?i:`${i}
|
|
@@ -2001,5 +2001,5 @@ end`}var jd={bash:'Add to ~/.bashrc or ~/.bash_profile: eval "$(pm completion ba
|
|
|
2001
2001
|
`)}catch{}}function Hd(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 Vd(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 Ud.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 Bd(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 Wd(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 Yd(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 Jd(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 ma(e){return e.search?.embedding_model?.trim()||"text-embedding-3-small"}function da(e,t,n){let s=n?Ee(n.name,ma(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 Kd(e,t){return Object.keys(e).filter(n=>!t.has(n)).sort((n,s)=>n.localeCompare(s))}async function la(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),l=o.map(w=>Js(w,{providerName:c,maxCharacters:d,fields:m})),f=[],g=null;if(s)try{f=await Jd(s,e,l),g=Ee(s.name,ma(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,l,{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 Xd(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 pa(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 Zd(e){return{enabled:e!=="keyword",stale_items:0,unchanged_items:0,embedded_items:0,vector_upserted:0,batches_completed:0}}function Qd(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 el(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 tl(e){let t=ee(e.settings,q()),n=await Vd(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 nl(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 da(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(qd))}async function sl(e){let t=await Yt(e.pmRoot);e.semanticWarnings.push(...t.warnings);let n=da(e.settings,e.activeEmbeddingProvider,e.extensionEmbedding),s=new Set(e.metadataDocuments.map(d=>d.metadata.id)),o=Kd(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 ol(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 la(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 rl(e){let t=await la(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 ol(e);return n=i.vectors,s=i.embeddingIdentity,o=i.vectorDimension,{vectors:n,embeddingIdentity:s,staleDocuments:i.staleDocuments,vectorDimension:o,resetRequired:!0}}async function il(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 al(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 cl(e){I(e.progressEnabled,`embedding_start items=${e.plan.staleDocuments.length} unchanged_items=${e.plan.freshDocuments}`);let t=await rl({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 Xd(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 pa(e.activeVectorStore,e.extensionVectorAdapter,e.plan.orphanIds,e.settings,e.semanticWarnings);let n=al(t.staleDocuments,t.vectors);return e.semanticSummary.embedded_items=t.vectors.length,await il({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 ml(e){let t=await sl(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 pa(e.activeVectorStore,e.extensionVectorAdapter,t.orphanIds,e.settings,e.semanticWarnings),{documentsForKeywordArtifacts:e.documentsForKeywordArtifacts,vectorizationLedgerEntries:n,vectorizationEmbeddingMetadata:t.ledgerEmbedding};let s=await cl({...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 dl(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(Bd(i,e.mode,s))).join(`
|
|
2002
2002
|
`);I(e.progressEnabled,"writing keyword artifacts"),await Q(t,`${JSON.stringify(e.manifest,null,2)}
|
|
2003
2003
|
`),await Q(n,`${o}
|
|
2004
|
-
`);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 ll(e,t){let n=Hd(e.mode),s=zd(e),o=e.full===!0;I(s,`start mode=${n}`);let r=$(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,V(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=Wd(i),d=Yd(i),m=el({requestedMode:n,pmRoot:r,settings:i,extensionEmbedding:c,extensionVectorAdapter:d}),l=n;I(s,"loading item corpus");let f=await tl({pmRoot:r,settings:i}),g=f.warnings,{documentCandidates:w,metadataDocuments:b}=f;I(s,`loaded_items=${b.length}`);let v=k(),h=Qd(l,v,b),A=Ne.join(r,cs),R=Ne.join(r,ms),z=l==="keyword"?await ls(r,w,i.schema,g):b,H=[],Me={},_t=null,ve=Zd(l);if(l==="keyword"&&await nl({pmRoot:r,settings:i,forceFullSemantic:o,extensionEmbedding:c,reindexWarnings:g}),l!=="keyword"){let ht=await ml({pmRoot:r,settings:i,requestedMode:n,activeEmbeddingProvider:m.activeEmbeddingProvider,activeVectorStore:m.activeVectorStore,extensionEmbedding:c,extensionVectorAdapter:d,documentCandidates:w,metadataDocuments:b,documentsForKeywordArtifacts:z,forceFullSemantic:o,reindexWarnings:g,semanticWarnings:H,semanticSummary:ve,progressEnabled:s});z=ht.documentsForKeywordArtifacts,Me=ht.vectorizationLedgerEntries,_t=ht.vectorizationEmbeddingMetadata}let ka=await dl({pmRoot:r,mode:l,manifest:h,documentsForKeywordArtifacts:z,settings:i,vectorizationLedgerEntries:Me,vectorizationEmbeddingMetadata:_t,progressEnabled:s}),Sa=[...await oe({path:A,scope:"project",op:"reindex:manifest"}),...await oe({path:R,scope:"project",op:"reindex:embeddings"}),...await Cs({mode:l,total_items:b.length})];return I(s,"done"),{ok:!0,mode:l,total_items:b.length,semantic:ve,artifacts:{manifest:cs,embeddings:ms},warnings:[...g,...H,...ka,...Sa],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]="196ad1a3-c78f-5eef-90fd-ea5de108b9fa")}catch{}})();var ga=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[ga]=!0,n}run(t,n={}){return wl({...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})}upgrade(t,n={}){return this.runTyped("upgrade",{...t===void 0?{}:{target:t},options:n})}};function Uh(e={},t={}){return new y(t).context(e)}function qh(e={},t={}){return new y(t).list(e)}function zh(e,t={},n={}){return new y(n).search(e,t)}function Hh(e,t={},n={}){return new y(n).get(e,t)}function Vh(e={},t={}){return new y(t).next(e)}function Bh(e={},t={}){return new y(t).aggregate(e)}function Wh(e={},t={}){return new y(t).stats(e)}function Yh(e={},t={}){return new y(t).duplicates(e)}function Jh(e,t={},n={}){return new y(n).comments(e,t)}function Kh(e,t={},n={}){return new y(n).notes(e,t)}function Xh(e,t={},n={}){return new y(n).learnings(e,t)}function Zh(e,t={},n={}){return new y(n).files(e,t)}function Qh(e,t={},n={}){return new y(n).filesDiscover(e,t)}function eg(e,t={}){return new y(t).filesLookup(e)}function tg(e,t={},n={}){return new y(n).docs(e,t)}function ng(e,t={},n={}){return new y(n).deps(e,t)}function sg(e,t={},n={},s={}){return new y(s).graph(e,t,n)}function og(e,t,n={},s={}){return new y(s).append(e,t,n)}function rg(e,t={},n={}){return new y(n).init(e,t)}function ig(e,t,n,s,o={},r={}){return new y(r).config(e,t,n,s,o)}function ag(e,t={},n={}){return new y(n).schema(e,t)}function cg(e={}){return new y(e).schemaList()}function mg(e,t={}){return new y(t).schemaShow(e)}function dg(e,t={},n={}){return new y(n).schemaAddType(e,t)}function lg(e,t={},n={}){return new y(n).schemaRemoveType(e,t)}function pg(e,t={},n={}){return new y(n).schemaAddStatus(e,t)}function ug(e,t={},n={}){return new y(n).schemaRemoveStatus(e,t)}function fg(e,t={},n={}){return new y(n).schemaAddField(e,t)}function _g(e,t={},n={}){return new y(n).schemaRemoveField(e,t)}function hg(e={}){return new y(e).schemaListFields()}function gg(e,t={}){return new y(t).schemaShowField(e)}function yg(e,t={},n={}){return new y(n).schemaApplyPreset(e,t)}function bg(e={},t={}){return new y(t).schemaInferTypes(e)}function wg(e,t,n,s={}){return new y(s).schemaRenameType(e,t,n)}function vg(e,t,n,s,o={}){return new y(o).schemaRenameField(e,t,n,s)}function kg(e,t,n,s={}){return new y(s).schemaRemapStatus(e,t,n)}function Sg(e,t={}){return new y(t).schemaShowStatus(e)}function xg(e,t={},n={}){return new y(n).profile(e,t)}function Eg(e={}){return new y(e).profileList()}function Ag(e,t={}){return new y(t).profileShow(e)}function Ig(e,t={},n={}){return new y(n).profileApply(e,t)}function Rg(e,t={}){return new y(t).profileLint(e)}function Cg(e={},t={}){return new y(t).validate(e)}function Tg(e={},t={}){return new y(t).health(e)}function Og(e={},t={}){return new y(t).gc(e)}function $g(e,t,n={}){return new y(n).historyRedact(e,t)}function Fg(e,t={},n={}){return new y(n).historyRepair(e,t)}function Pg(e={},t={}){return new y(t).historyRepairAll(e)}function Lg(e,t={},n={}){return new y(n).historyCompact(e,t)}function Ng(e,t={}){return new y(t).historyCompactBulk(e)}function Mg(e={},t={}){return new y(t).create(e)}function Dg(e,t={},n={}){return new y(n).update(e,t)}function jg(e,t,n={},s={}){return new y(s).close(e,t,n)}function Gg(e,t={},n={}){return new y(n).claim(e,t)}function Ug(e={},t={}){return new y(t).claimNext(e)}function qg(e,t={},n={}){return new y(n).release(e,t)}function zg(e,t={},n={}){return new y(n).copy(e,t)}function Hg(e,t={},n={}){return new y(n).delete(e,t)}function Vg(e,t,n={},s={}){return new y(s).restore(e,t,n)}function Bg(e,t={},n={}){return new y(n).focus(e,t)}function Wg(e,t={},n={}){return new y(n).startTask(e,t)}function Yg(e,t={},n={}){return new y(n).pauseTask(e,t)}function Jg(e,t,n={},s={}){return new y(s).closeTask(e,t,n)}function Kg(e,t={},n={}){return new y(n).extension(e,t)}function Xg(e={},t={}){return new y(t).extensionList(e)}function Zg(e,t={},n={}){return new y(n).extensionActivate(e,t)}function Qg(e,t={},n={}){return new y(n).extensionDeactivate(e,t)}function ey(e,t={},n={}){return new y(n).package(e,t)}function ty(e={},t={}){return new y(t).packageList(e)}function ny(e,t={},n={}){return new y(n).packageInstall(e,t)}function sy(e,t={},n={}){return new y(n).packageUninstall(e,t)}function oy(e={},t={}){return new y(t).packageDoctor(e)}function ry(e,t={},n={}){return new y(n).packageManage(e,t)}function iy(e,t={},n={}){return new y(n).packageDescribe(e,t)}function ay(e={},t={}){return new y(t).packageReload(e)}function cy(e={},t={}){return new y(t).packageCatalog(e)}function my(e,t={},n={}){return new y(n).packageActivate(e,t)}function dy(e,t={},n={}){return new y(n).packageDeactivate(e,t)}function ly(e,t={},n={}){return new y(n).upgrade(e,t)}function ul(e,t,n){return JSON.stringify([ua.resolve(e),ua.resolve(n??process.cwd()),t.extensions.enabled,t.extensions.disabled,t.extensions.policy])}async function fl(e,t,n){let s=ul(e,t,n);return ii(s,()=>np(e,t,n))}async function py(e,t={}){let n=await D(e),s=t.extensionRegistrations??(t.noExtensions===!0?null:await fl(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 uy(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=p(e,t);if(!n)throw new u(`Missing required argument: ${t}`,64);return n}var fa=Is(),ya=new pl;function ut(){Rt(ws()),Ct(vs()),Tt(ks()),Ot(Ss()),$t(xs()),Ft(Es()),Pt(As())}async function ba(e,t,n,s){return Rs(()=>t===void 0?fa.read(()=>_a(e,n,s)):fa.write(()=>hl(t,()=>_a(e,n,s))))}async function fy(e,t){let n=e.cwd,s=n??process.cwd();return ba(st({path:e.path,noExtensions:e.noExtensions}),n,s,()=>ya.run(!0,t))}async function _a(e,t,n){let s=$(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 _l(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:P(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 hl(e,t){let n=process.cwd();process.chdir(e);try{return await t()}finally{process.chdir(n)}}var gl=new Set(["activity","aggregate","context","contracts","deps","files-discover","get","graph","health","history","list","next","search","stats","telemetry","validate"]);function yl(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 bl(e){return!gl.has(se(e))}async function wl(e){let t=yl(e),n=st(t.args),s=bl(t.action),o=p(t.args,"cwd"),r=o??process.cwd();try{return e[ga]===!0||ya.getStore()===!0?await ha(t.action,t.args,n,null):await ba(n,o,r,i=>ha(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 p(e.args,"target")??p(e.options,"target")}function E(e,t=e.options){return e.id??Y(t,"id")}async function vl(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(p(e.args,"status")??p(t,"status"),t,e.global),t)}async function kl(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 Sl(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 xl(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 El(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 Al(e){let{changedFields:t,idOnly:n,runnerOptions:s}=W(e.args,e.options),o=p(e.args,"reason")??p(e.args,"text")??p(s,"reason")??p(s,"text");return J(await We(E(e,s),o,s,e.global),{changedFields:t,compactEnvelope:t==="compact"&&!n,idOnly:n})}function Il(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 Rl(e){let t=P(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:O(e.options.limit,"files lookup limit"),offset:O(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 Cl(e){return Xr({subcommand:p(e.args,"subcommand")??p(e.options,"subcommand"),limit:Tl(e.args,e.options)},e.global)}function Tl(e,t){return typeof e.limit=="number"&&Number.isFinite(e.limit)?e.limit:typeof t.limit=="number"&&Number.isFinite(t.limit)?t.limit:p(e,"limit")??p(t,"limit")}function Ol(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 $l(e){let t=p(e.args,"configAction")??p(e.options,"configAction")??p(e.options,"action");if(t===void 0)throw new u("Missing required argument: configAction",64);return Ar(p(e.args,"scope")??p(e.options,"scope")??"project",t,p(e.args,"key")??p(e.options,"key"),e.options,e.global,p(e.args,"value")??p(e.options,"value"))}function Fl(e){let t={...e.options};return t.compact===void 0&&(t.compact=t.full!==!0),delete t.full,zo(t,e.global)}function Pl(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 Ll(e){let t=p(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:Nl(e),reorderTo:Pl(n.reorderTo??e.args.reorderTo,"plan reorderTo"),options:e.options,global:e.global})}function Nl(e){return typeof e.options.stepRef=="string"?e.options.stepRef:typeof e.args.stepRef=="string"?e.args.stepRef:void 0}function Ml(e){let t=p(e.args,"subcommand")??Y(e.options,"subcommand"),n=e.args.alias??e.options.alias;return{ctx:e,subcommand:t.trim().toLowerCase(),name:p(e.args,"name")??p(e.options,"name"),author:p(e.args,"author")??p(e.options,"author"),force:e.args.force===!0||e.options.force===!0,aliases:n===void 0?void 0:P(n)}}function Dl(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(p(t.args,"typePreset")??p(t.options,"typePreset"),{author:o,force:r},t.global)},n);return a?a():null}function jl(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:p(t.args,"fieldType")??p(t.options,"fieldType"),commands:i===void 0?void 0:P(i),description:p(t.args,"description")??p(t.options,"description"),cliFlag:p(t.args,"cliFlag")??p(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:P(a),author:s,force:o},t.global)}function Gl(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:P(i),alias:r,description:p(t.args,"description")??p(t.options,"description"),order:O(t.args.order??t.options.order,"schema add-status order"),author:s,force:o},t.global)}function Ul(e){let{ctx:t,name:n,author:s,force:o,aliases:r}=e;return sr(n,{description:p(t.args,"description")??p(t.options,"description"),defaultStatus:p(t.args,"defaultStatus")??p(t.args,"default_status")??p(t.options,"defaultStatus")??p(t.options,"default_status"),folder:p(t.args,"folder")??p(t.options,"folder"),alias:r,author:s,force:o},t.global)}function ql(e){let{ctx:t,subcommand:n,name:s,author:o,force:r}=e,i=p(t.args,"to")??Y(t.options,"to"),a=p(t.args,"migrationId")??p(t.args,"migration_id")??p(t.options,"migrationId")??p(t.options,"migration_id"),c=p(t.args,"fieldTypeScope")??p(t.options,"fieldTypeScope")??p(t.args,"type")??p(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 zl(e){let t=Ml(e),n=Dl(t);if(n!==null)return n;if(t.subcommand==="rename-type"||t.subcommand==="rename-field"||t.subcommand==="remap-status")return ql(t);if(t.subcommand==="add-field")return jl(t);if(t.subcommand==="add-status")return Gl(t);if(t.subcommand==="add-type")return e.args.infer===!0||e.options.infer===!0?_r({minCount:O(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):Ul(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 Hl(e){let t=p(e.args,"subcommand")??Y(e.options,"subcommand"),n=t.trim().toLowerCase(),s=p(e.args,"name")??p(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:p(e.args,"author")??p(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()}function Vl(e){return pn(e.global,{storage:e.options.storage===!0,metadataCoverage:e.options.metadataCoverage===!0,fieldUtilization:e.options.fieldUtilization===!0,byAssignee:e.options.byAssignee===!0,byTag:e.options.byTag===!0,byPriority:e.options.byPriority===!0,tagPrefix:typeof e.options.tagPrefix=="string"?e.options.tagPrefix:void 0})}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=p(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=p(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 wa(e){let t={...e};return delete t.assignee,t}async function Kl(e){let t=$(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,{...wa(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=$(process.cwd(),e.global.path),n=await D(t),s=E(e),o=re(n.schema).open_status,r=await fe(s,{...wa(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=p(e.args,"reason")??p(e.args,"text")??p(e.options,"reason")??p(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"),p(t,"id")??e.id,p(t,"target"),Ni(t),e.global)}function ep(e){let t={...e.args,...e.options},n=P(t.historyEvent).map(s=>{let o=s.lastIndexOf(":");return{item_id:s.slice(0,o).trim(),line:Number(s.slice(o+1))}});return yr($(process.cwd(),e.global.path),{events:n,all_actionable:t.allActionable===!0||t.all_actionable===!0,attributed_author:p(t,"attributedAuthor")??p(t,"attributed_author")??"",reviewer:p(t,"reviewer")??"",reason:p(t,"reason")??""})}var va={init:e=>Ir(p(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:Mi,events:Di,merge:ji,workspace:Gi,meet:at,event:at,remind:at,list:vl,get:e=>rn(E(e),e.global,ue("get",e.options)),search:kl,duplicates:e=>{let t=typeof e.options.status=="string"?[e.options.status]:P(e.options.status);return un(e.global,{...t.length===0?{}:{status:t},since:p(e.options,"since"),threshold:typeof e.options.threshold=="number"?e.options.threshold:void 0,limit:e.options.limit==="default"?void 0:O(e.options.limit,"limit")})},create:Sl,copy:xl,focus:e=>on(e.id,{clear:e.options.clear===!0||e.args.clear===!0},e.global),update:El,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:Al,comments:Il,notes:e=>fi(E(e),e.options,e.global),learnings:e=>Qo(E(e),e.options,e.global),files:Rl,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:Cl,validate:e=>Je(e.options,e.global,{runUpdate:(t,n,s)=>fe(t,n,s)}),health:Ol,contracts:e=>ln(e.options,e.global),config:$l,activity:Fl,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:P(e.options.paths),scope:e.options.scope==="project"||e.options.scope==="global"?e.options.scope:void 0,limit:O(e.options.limit,"files lookup limit"),offset:O(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":Ui,"history-compact":qi,"history-author-acknowledge":ep,plan:Ll,schema:zl,profile:Hl,stats:Vl,append:Bl,"update-many":Wl,"close-many":Yl,gc:e=>gr(e.global,e.options)};function _y(e=Us){return e.map(t=>{let n=se(t),s=we(hn,n),o=s?.action??n,r=we(va,o)!==void 0;return{action:t,resolved_action:o,covered:r,route:r?s?"alias":"native":"missing"}})}async function ha(e,t,n,s){let o=Bn(t,e);Ms(e,o);let r={action:e,args:t,options:o,id:p(t,"id"),force:t.force===!0||o.force===!0,global:n,activeExtensions:s},i=we(va,e),a=i?await i(r):await _l(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:P,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,Ca 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,xa as n,_n as o,kn as p,ui as q,Ga as r,qa as s,za 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,jc as C,Gc as D,Ci as E,Oi as F,$i as G,Fi as H,Pi as I,$e as J,mm as K,dm as L,lm as M,T as N,pm as O,um as P,fm as Q,_m as R,Qn as S,zi as T,ge as U,Zn as V,Hi as W,hm as X,Vi as Y,gm as Z,ym as _,bm as $,wm as aa,vm as ba,Rm as ca,Ji as da,Cm as ea,Nm as fa,zm as ga,Vm as ha,Gd as ia,ll as ja,y as ka,Uh as la,qh as ma,zh as na,Hh as oa,Vh as pa,Bh as qa,Wh as ra,Yh as sa,Jh as ta,Kh as ua,Xh as va,Zh as wa,Qh as xa,eg as ya,tg as za,ng as Aa,sg as Ba,og as Ca,rg as Da,ig as Ea,ag as Fa,cg as Ga,mg as Ha,dg as Ia,lg as Ja,pg as Ka,ug as La,fg as Ma,_g as Na,hg as Oa,gg as Pa,yg as Qa,bg as Ra,wg as Sa,vg as Ta,kg as Ua,Sg as Va,xg as Wa,Eg as Xa,Ag as Ya,Ig as Za,Rg as _a,Cg as $a,Tg as ab,Og as bb,$g as cb,Fg as db,Pg as eb,Lg as fb,Ng as gb,Mg as hb,Dg as ib,jg as jb,Gg as kb,Ug as lb,qg as mb,zg as nb,Hg as ob,Vg as pb,Bg as qb,Wg as rb,Yg as sb,Jg as tb,Kg as ub,Xg as vb,Zg as wb,Qg as xb,ey as yb,ty as zb,ny as Ab,sy as Bb,oy as Cb,ry as Db,iy as Eb,ay as Fb,cy as Gb,my as Hb,dy as Ib,ly as Jb,py as Kb,uy as Lb,Y as Mb,fy as Nb,wl as Ob,_y as Pb};
|
|
2005
|
-
//# sourceMappingURL=chunk-
|
|
2004
|
+
`);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 ll(e,t){let n=Hd(e.mode),s=zd(e),o=e.full===!0;I(s,`start mode=${n}`);let r=$(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,V(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=Wd(i),d=Yd(i),m=el({requestedMode:n,pmRoot:r,settings:i,extensionEmbedding:c,extensionVectorAdapter:d}),l=n;I(s,"loading item corpus");let f=await tl({pmRoot:r,settings:i}),g=f.warnings,{documentCandidates:w,metadataDocuments:b}=f;I(s,`loaded_items=${b.length}`);let v=k(),h=Qd(l,v,b),A=Ne.join(r,cs),R=Ne.join(r,ms),z=l==="keyword"?await ls(r,w,i.schema,g):b,H=[],Me={},_t=null,ve=Zd(l);if(l==="keyword"&&await nl({pmRoot:r,settings:i,forceFullSemantic:o,extensionEmbedding:c,reindexWarnings:g}),l!=="keyword"){let ht=await ml({pmRoot:r,settings:i,requestedMode:n,activeEmbeddingProvider:m.activeEmbeddingProvider,activeVectorStore:m.activeVectorStore,extensionEmbedding:c,extensionVectorAdapter:d,documentCandidates:w,metadataDocuments:b,documentsForKeywordArtifacts:z,forceFullSemantic:o,reindexWarnings:g,semanticWarnings:H,semanticSummary:ve,progressEnabled:s});z=ht.documentsForKeywordArtifacts,Me=ht.vectorizationLedgerEntries,_t=ht.vectorizationEmbeddingMetadata}let ka=await dl({pmRoot:r,mode:l,manifest:h,documentsForKeywordArtifacts:z,settings:i,vectorizationLedgerEntries:Me,vectorizationEmbeddingMetadata:_t,progressEnabled:s}),Sa=[...await oe({path:A,scope:"project",op:"reindex:manifest"}),...await oe({path:R,scope:"project",op:"reindex:embeddings"}),...await Cs({mode:l,total_items:b.length})];return I(s,"done"),{ok:!0,mode:l,total_items:b.length,semantic:ve,artifacts:{manifest:cs,embeddings:ms},warnings:[...g,...H,...ka,...Sa],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]="57628397-0652-5a7b-8521-2f0fb2abb787")}catch{}})();var ga=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[ga]=!0,n}run(t,n={}){return wl({...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 Uh(e={},t={}){return new y(t).context(e)}function qh(e={},t={}){return new y(t).list(e)}function zh(e,t={},n={}){return new y(n).search(e,t)}function Hh(e,t={},n={}){return new y(n).get(e,t)}function Vh(e={},t={}){return new y(t).next(e)}function Bh(e={},t={}){return new y(t).aggregate(e)}function Wh(e={},t={}){return new y(t).stats(e)}function Yh(e={},t={}){return new y(t).duplicates(e)}function Jh(e,t={},n={}){return new y(n).comments(e,t)}function Kh(e,t={},n={}){return new y(n).notes(e,t)}function Xh(e,t={},n={}){return new y(n).learnings(e,t)}function Zh(e,t={},n={}){return new y(n).files(e,t)}function Qh(e,t={},n={}){return new y(n).filesDiscover(e,t)}function eg(e,t={}){return new y(t).filesLookup(e)}function tg(e,t={},n={}){return new y(n).docs(e,t)}function ng(e,t={},n={}){return new y(n).deps(e,t)}function sg(e,t={},n={},s={}){return new y(s).graph(e,t,n)}function og(e,t,n={},s={}){return new y(s).append(e,t,n)}function rg(e,t={},n={}){return new y(n).init(e,t)}function ig(e,t,n,s,o={},r={}){return new y(r).config(e,t,n,s,o)}function ag(e,t={},n={}){return new y(n).schema(e,t)}function cg(e={}){return new y(e).schemaList()}function mg(e,t={}){return new y(t).schemaShow(e)}function dg(e,t={},n={}){return new y(n).schemaAddType(e,t)}function lg(e,t={},n={}){return new y(n).schemaRemoveType(e,t)}function pg(e,t={},n={}){return new y(n).schemaAddStatus(e,t)}function ug(e,t={},n={}){return new y(n).schemaRemoveStatus(e,t)}function fg(e,t={},n={}){return new y(n).schemaAddField(e,t)}function _g(e,t={},n={}){return new y(n).schemaRemoveField(e,t)}function hg(e={}){return new y(e).schemaListFields()}function gg(e,t={}){return new y(t).schemaShowField(e)}function yg(e,t={},n={}){return new y(n).schemaApplyPreset(e,t)}function bg(e={},t={}){return new y(t).schemaInferTypes(e)}function wg(e,t,n,s={}){return new y(s).schemaRenameType(e,t,n)}function vg(e,t,n,s,o={}){return new y(o).schemaRenameField(e,t,n,s)}function kg(e,t,n,s={}){return new y(s).schemaRemapStatus(e,t,n)}function Sg(e,t={}){return new y(t).schemaShowStatus(e)}function xg(e,t={},n={}){return new y(n).profile(e,t)}function Eg(e={}){return new y(e).profileList()}function Ag(e,t={}){return new y(t).profileShow(e)}function Ig(e,t={},n={}){return new y(n).profileApply(e,t)}function Rg(e,t={}){return new y(t).profileLint(e)}function Cg(e={},t={}){return new y(t).validate(e)}function Tg(e={},t={}){return new y(t).health(e)}function Og(e={},t={}){return new y(t).gc(e)}function $g(e,t,n={}){return new y(n).historyRedact(e,t)}function Fg(e,t={},n={}){return new y(n).historyRepair(e,t)}function Pg(e={},t={}){return new y(t).historyRepairAll(e)}function Lg(e,t={},n={}){return new y(n).historyCompact(e,t)}function Ng(e,t={}){return new y(t).historyCompactBulk(e)}function Mg(e={},t={}){return new y(t).create(e)}function Dg(e,t={},n={}){return new y(n).update(e,t)}function jg(e,t,n={},s={}){return new y(s).close(e,t,n)}function Gg(e,t={},n={}){return new y(n).claim(e,t)}function Ug(e={},t={}){return new y(t).claimNext(e)}function qg(e,t={},n={}){return new y(n).release(e,t)}function zg(e,t={},n={}){return new y(n).copy(e,t)}function Hg(e,t={},n={}){return new y(n).delete(e,t)}function Vg(e,t,n={},s={}){return new y(s).restore(e,t,n)}function Bg(e,t={},n={}){return new y(n).focus(e,t)}function Wg(e,t={},n={}){return new y(n).startTask(e,t)}function Yg(e,t={},n={}){return new y(n).pauseTask(e,t)}function Jg(e,t,n={},s={}){return new y(s).closeTask(e,t,n)}function Kg(e,t={},n={}){return new y(n).extension(e,t)}function Xg(e={},t={}){return new y(t).extensionList(e)}function Zg(e,t={},n={}){return new y(n).extensionActivate(e,t)}function Qg(e,t={},n={}){return new y(n).extensionDeactivate(e,t)}function ey(e,t={},n={}){return new y(n).package(e,t)}function ty(e={},t={}){return new y(t).packageList(e)}function ny(e,t={},n={}){return new y(n).packageInstall(e,t)}function sy(e,t={},n={}){return new y(n).packageUninstall(e,t)}function oy(e={},t={}){return new y(t).packageDoctor(e)}function ry(e,t={},n={}){return new y(n).packageManage(e,t)}function iy(e,t={},n={}){return new y(n).packageDescribe(e,t)}function ay(e={},t={}){return new y(t).packageReload(e)}function cy(e={},t={}){return new y(t).packageCatalog(e)}function my(e,t={},n={}){return new y(n).packageActivate(e,t)}function dy(e,t={},n={}){return new y(n).packageDeactivate(e,t)}function ly(e,t={},n={}){return new y(n).upgrade(e,t)}function ul(e,t,n){return JSON.stringify([ua.resolve(e),ua.resolve(n??process.cwd()),t.extensions.enabled,t.extensions.disabled,t.extensions.policy])}async function fl(e,t,n){let s=ul(e,t,n);return ii(s,()=>np(e,t,n))}async function py(e,t={}){let n=await D(e),s=t.extensionRegistrations??(t.noExtensions===!0?null:await fl(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 uy(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=p(e,t);if(!n)throw new u(`Missing required argument: ${t}`,64);return n}var fa=Is(),ya=new pl;function ut(){Rt(ws()),Ct(vs()),Tt(ks()),Ot(Ss()),$t(xs()),Ft(Es()),Pt(As())}async function ba(e,t,n,s){return Rs(()=>t===void 0?fa.read(()=>_a(e,n,s)):fa.write(()=>hl(t,()=>_a(e,n,s))))}async function fy(e,t){let n=e.cwd,s=n??process.cwd();return ba(st({path:e.path,noExtensions:e.noExtensions}),n,s,()=>ya.run(!0,t))}async function _a(e,t,n){let s=$(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 _l(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:P(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 hl(e,t){let n=process.cwd();process.chdir(e);try{return await t()}finally{process.chdir(n)}}var gl=new Set(["activity","aggregate","context","contracts","deps","files-discover","get","graph","health","history","list","next","search","stats","telemetry","validate"]);function yl(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 bl(e){return!gl.has(se(e))}async function wl(e){let t=yl(e),n=st(t.args),s=bl(t.action),o=p(t.args,"cwd"),r=o??process.cwd();try{return e[ga]===!0||ya.getStore()===!0?await ha(t.action,t.args,n,null):await ba(n,o,r,i=>ha(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 p(e.args,"target")??p(e.options,"target")}function E(e,t=e.options){return e.id??Y(t,"id")}async function vl(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(p(e.args,"status")??p(t,"status"),t,e.global),t)}async function kl(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 Sl(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 xl(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 El(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 Al(e){let{changedFields:t,idOnly:n,runnerOptions:s}=W(e.args,e.options),o=p(e.args,"reason")??p(e.args,"text")??p(s,"reason")??p(s,"text");return J(await We(E(e,s),o,s,e.global),{changedFields:t,compactEnvelope:t==="compact"&&!n,idOnly:n})}function Il(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 Rl(e){let t=P(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:O(e.options.limit,"files lookup limit"),offset:O(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 Cl(e){return Xr({subcommand:p(e.args,"subcommand")??p(e.options,"subcommand"),limit:Tl(e.args,e.options)},e.global)}function Tl(e,t){return typeof e.limit=="number"&&Number.isFinite(e.limit)?e.limit:typeof t.limit=="number"&&Number.isFinite(t.limit)?t.limit:p(e,"limit")??p(t,"limit")}function Ol(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 $l(e){let t=p(e.args,"configAction")??p(e.options,"configAction")??p(e.options,"action");if(t===void 0)throw new u("Missing required argument: configAction",64);return Ar(p(e.args,"scope")??p(e.options,"scope")??"project",t,p(e.args,"key")??p(e.options,"key"),e.options,e.global,p(e.args,"value")??p(e.options,"value"))}function Fl(e){let t={...e.options};return t.compact===void 0&&(t.compact=t.full!==!0),delete t.full,zo(t,e.global)}function Pl(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 Ll(e){let t=p(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:Nl(e),reorderTo:Pl(n.reorderTo??e.args.reorderTo,"plan reorderTo"),options:e.options,global:e.global})}function Nl(e){return typeof e.options.stepRef=="string"?e.options.stepRef:typeof e.args.stepRef=="string"?e.args.stepRef:void 0}function Ml(e){let t=p(e.args,"subcommand")??Y(e.options,"subcommand"),n=e.args.alias??e.options.alias;return{ctx:e,subcommand:t.trim().toLowerCase(),name:p(e.args,"name")??p(e.options,"name"),author:p(e.args,"author")??p(e.options,"author"),force:e.args.force===!0||e.options.force===!0,aliases:n===void 0?void 0:P(n)}}function Dl(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(p(t.args,"typePreset")??p(t.options,"typePreset"),{author:o,force:r},t.global)},n);return a?a():null}function jl(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:p(t.args,"fieldType")??p(t.options,"fieldType"),commands:i===void 0?void 0:P(i),description:p(t.args,"description")??p(t.options,"description"),cliFlag:p(t.args,"cliFlag")??p(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:P(a),author:s,force:o},t.global)}function Gl(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:P(i),alias:r,description:p(t.args,"description")??p(t.options,"description"),order:O(t.args.order??t.options.order,"schema add-status order"),author:s,force:o},t.global)}function Ul(e){let{ctx:t,name:n,author:s,force:o,aliases:r}=e;return sr(n,{description:p(t.args,"description")??p(t.options,"description"),defaultStatus:p(t.args,"defaultStatus")??p(t.args,"default_status")??p(t.options,"defaultStatus")??p(t.options,"default_status"),folder:p(t.args,"folder")??p(t.options,"folder"),alias:r,author:s,force:o},t.global)}function ql(e){let{ctx:t,subcommand:n,name:s,author:o,force:r}=e,i=p(t.args,"to")??Y(t.options,"to"),a=p(t.args,"migrationId")??p(t.args,"migration_id")??p(t.options,"migrationId")??p(t.options,"migration_id"),c=p(t.args,"fieldTypeScope")??p(t.options,"fieldTypeScope")??p(t.args,"type")??p(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 zl(e){let t=Ml(e),n=Dl(t);if(n!==null)return n;if(t.subcommand==="rename-type"||t.subcommand==="rename-field"||t.subcommand==="remap-status")return ql(t);if(t.subcommand==="add-field")return jl(t);if(t.subcommand==="add-status")return Gl(t);if(t.subcommand==="add-type")return e.args.infer===!0||e.options.infer===!0?_r({minCount:O(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):Ul(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 Hl(e){let t=p(e.args,"subcommand")??Y(e.options,"subcommand"),n=t.trim().toLowerCase(),s=p(e.args,"name")??p(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:p(e.args,"author")??p(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()}function Vl(e){return pn(e.global,{storage:e.options.storage===!0,metadataCoverage:e.options.metadataCoverage===!0,fieldUtilization:e.options.fieldUtilization===!0,byAssignee:e.options.byAssignee===!0,byTag:e.options.byTag===!0,byPriority:e.options.byPriority===!0,tagPrefix:typeof e.options.tagPrefix=="string"?e.options.tagPrefix:void 0})}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=p(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=p(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 wa(e){let t={...e};return delete t.assignee,t}async function Kl(e){let t=$(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,{...wa(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=$(process.cwd(),e.global.path),n=await D(t),s=E(e),o=re(n.schema).open_status,r=await fe(s,{...wa(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=p(e.args,"reason")??p(e.args,"text")??p(e.options,"reason")??p(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"),p(t,"id")??e.id,p(t,"target"),Ni(t),e.global)}function ep(e){let t={...e.args,...e.options},n=P(t.historyEvent).map(s=>{let o=s.lastIndexOf(":");return{item_id:s.slice(0,o).trim(),line:Number(s.slice(o+1))}});return yr($(process.cwd(),e.global.path),{events:n,all_actionable:t.allActionable===!0||t.all_actionable===!0,attributed_author:p(t,"attributedAuthor")??p(t,"attributed_author")??"",reviewer:p(t,"reviewer")??"",reason:p(t,"reason")??""})}var va={init:e=>Ir(p(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:Mi,events:Di,merge:ji,workspace:Gi,meet:at,event:at,remind:at,list:vl,get:e=>rn(E(e),e.global,ue("get",e.options)),search:kl,duplicates:e=>{let t=typeof e.options.status=="string"?[e.options.status]:P(e.options.status);return un(e.global,{...t.length===0?{}:{status:t},since:p(e.options,"since"),threshold:typeof e.options.threshold=="number"?e.options.threshold:void 0,limit:e.options.limit==="default"?void 0:O(e.options.limit,"limit")})},create:Sl,copy:xl,focus:e=>on(e.id,{clear:e.options.clear===!0||e.args.clear===!0},e.global),update:El,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:Al,comments:Il,notes:e=>fi(E(e),e.options,e.global),learnings:e=>Qo(E(e),e.options,e.global),files:Rl,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:Cl,validate:e=>Je(e.options,e.global,{runUpdate:(t,n,s)=>fe(t,n,s)}),health:Ol,contracts:e=>ln(e.options,e.global),config:$l,activity:Fl,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:P(e.options.paths),scope:e.options.scope==="project"||e.options.scope==="global"?e.options.scope:void 0,limit:O(e.options.limit,"files lookup limit"),offset:O(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":Ui,"history-compact":qi,"history-author-acknowledge":ep,plan:Ll,schema:zl,profile:Hl,stats:Vl,append:Bl,"update-many":Wl,"close-many":Yl,gc:e=>gr(e.global,e.options)};function _y(e=Us){return e.map(t=>{let n=se(t),s=we(hn,n),o=s?.action??n,r=we(va,o)!==void 0;return{action:t,resolved_action:o,covered:r,route:r?s?"alias":"native":"missing"}})}async function ha(e,t,n,s){let o=Bn(t,e);Ms(e,o);let r={action:e,args:t,options:o,id:p(t,"id"),force:t.force===!0||o.force===!0,global:n,activeExtensions:s},i=we(va,e),a=i?await i(r):await _l(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:P,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,Ca 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,xa as n,_n as o,kn as p,ui as q,Ga as r,qa as s,za 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,jc as C,Gc as D,Ci as E,Oi as F,$i as G,Fi as H,Pi as I,$e as J,mm as K,dm as L,lm as M,T as N,pm as O,um as P,fm as Q,_m as R,Qn as S,zi as T,ge as U,Zn as V,Hi as W,hm as X,Vi as Y,gm as Z,ym as _,bm as $,wm as aa,vm as ba,Rm as ca,Ji as da,Cm as ea,Nm as fa,zm as ga,Vm as ha,Gd as ia,ll as ja,y as ka,Uh as la,qh as ma,zh as na,Hh as oa,Vh as pa,Bh as qa,Wh as ra,Yh as sa,Jh as ta,Kh as ua,Xh as va,Zh as wa,Qh as xa,eg as ya,tg as za,ng as Aa,sg as Ba,og as Ca,rg as Da,ig as Ea,ag as Fa,cg as Ga,mg as Ha,dg as Ia,lg as Ja,pg as Ka,ug as La,fg as Ma,_g as Na,hg as Oa,gg as Pa,yg as Qa,bg as Ra,wg as Sa,vg as Ta,kg as Ua,Sg as Va,xg as Wa,Eg as Xa,Ag as Ya,Ig as Za,Rg as _a,Cg as $a,Tg as ab,Og as bb,$g as cb,Fg as db,Pg as eb,Lg as fb,Ng as gb,Mg as hb,Dg as ib,jg as jb,Gg as kb,Ug as lb,qg as mb,zg as nb,Hg as ob,Vg as pb,Bg as qb,Wg as rb,Yg as sb,Jg as tb,Kg as ub,Xg as vb,Zg as wb,Qg as xb,ey as yb,ty as zb,ny as Ab,sy as Bb,oy as Cb,ry as Db,iy as Eb,ay as Fb,cy as Gb,my as Hb,dy as Ib,ly as Jb,py as Kb,uy as Lb,Y as Mb,fy as Nb,wl as Ob,_y as Pb};
|
|
2005
|
+
//# sourceMappingURL=chunk-RAFUN7IX.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{db as u}from"./chunk-HS7OVAUN.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="f73e79d8-2a65-5a25-8c6f-ec9b06651634")}catch{}})();function i(a){return[...new Set(Array.from(a,e=>e.trim()).filter(e=>e.length>0))]}(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="01e8d488-ce63-54cc-848e-e7842a9d873d")}catch{}})();function n(a){return a.startsWith("--")?`--${a.slice(2).replaceAll("_","-")}`:a}function c(a){let e=new Map;for(let l of a){let t=n(l.flag),g=e.get(t)??new Set;l.flag!==t&&g.add(l.flag);for(let f of l.aliases??[])f!==t&&g.add(f);e.set(t,g)}return a.map(l=>{let t=n(l.flag);if(l.flag!==t)return l;let g=i([...l.aliases??[],...e.get(t)]).filter(f=>f!==t);return g.length===0?l:{...l,aliases:g}})}function ee(a){let e=c(a),l=new Set(e.map(t=>t.flag));return e.filter(t=>{let g=n(t.flag);return t.flag===g||!l.has(g)})}var d=u.map(a=>({flag:a.flag,...a.aliases?{aliases:[...a.aliases]}:{},...a.value_name?{value_name:a.value_name}:{}})),le=[...d,{flag:"--version"}],C=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--has-notes"},{flag:"--no-notes"},{flag:"--has-learnings"},{flag:"--no-learnings"},{flag:"--has-files"},{flag:"--no-files"},{flag:"--filter-files-missing"},{flag:"--has-docs"},{flag:"--no-docs"},{flag:"--filter-docs-missing"},{flag:"--has-tests"},{flag:"--no-tests"},{flag:"--has-comments"},{flag:"--no-comments"},{flag:"--has-deps"},{flag:"--no-deps"},{flag:"--has-body"},{flag:"--empty-body"},{flag:"--has-linked-command"},{flag:"--no-linked-command"}],h=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--filter-has-notes"},{flag:"--filter-no-notes"},{flag:"--filter-has-learnings"},{flag:"--filter-no-learnings"},{flag:"--filter-has-files"},{flag:"--filter-no-files"},{flag:"--filter-has-docs"},{flag:"--filter-no-docs"},{flag:"--filter-has-tests"},{flag:"--filter-no-tests"},{flag:"--filter-has-comments"},{flag:"--filter-no-comments"},{flag:"--filter-has-deps"},{flag:"--filter-no-deps"},{flag:"--filter-has-body"},{flag:"--filter-empty-body"},{flag:"--filter-has-linked-command"},{flag:"--filter-no-linked-command"},{flag:"--ids",list:!0},{flag:"--limit"},{flag:"--offset"}],k=p([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--today"},{flag:"--recent"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--ids",list:!0},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...C,{flag:"--limit"},{flag:"--offset"},{flag:"--after"},{flag:"--no-truncate"},{flag:"--compact"},{flag:"--brief"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--sort"},{flag:"--order"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--include-body"},{flag:"--strict-read"},{flag:"--format"},{flag:"--stream"}],new Set(["--limit","--token-budget","--offset","--after","--no-truncate","--compact","--brief","--full","--fields","--include-body","--strict-read"])),G=[{flag:"--group-by",list:!0},{flag:"--count"},{flag:"--completion"},{flag:"--sum"},{flag:"--avg"},{flag:"--include-unparented"},{flag:"--include_unparented"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0}],F=[{flag:"--add",aliases:["--comment","--body"]},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--author"},{flag:"--message"},{flag:"--force"}];function p(a,e){return a.map(l=>e.has(l.flag)?{...l,cursor_semantics:"presentation"}:l)}var w=[{flag:"--add",aliases:["--note"]},{flag:"--add-json"},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--since"},{flag:"--event-type"},{flag:"--include-meta"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],I=[{flag:"--add",aliases:["--learning"]},{flag:"--limit"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],M=[{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--list"},{flag:"--append-stable"},{flag:"--validate-paths"},{flag:"--scope"},{flag:"--limit"},{flag:"--offset"},{flag:"--no-truncate"},{flag:"--strict-read"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],D=[{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--list"},{flag:"--validate-paths"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],P=[{flag:"--limit"},{flag:"--compact"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--diff"},{flag:"--field"},{flag:"--verify"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--format"}],X=[{flag:"--dry-run"},{flag:"--output"},{flag:"--item-path"},{flag:"--prefer"}],U=[{flag:"--literal"},{flag:"--regex"},{flag:"--replacement"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],j=[{flag:"--all"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],H=[{flag:"--event",repeatable:!0},{flag:"--all-actionable"},{flag:"--attributed-author",aliases:["--attributed_author"]},{flag:"--reviewer"},{flag:"--reason"}],z=[{flag:"--before"},{flag:"--ids",list:!0},{flag:"--all-over",value_type:"number"},{flag:"--closed"},{flag:"--all-streams"},{flag:"--min-entries",value_type:"number"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Y=[{flag:"--description"},{flag:"--default-status",aliases:["--default_status"]},{flag:"--folder"},{flag:"--alias"},{flag:"--role"},{flag:"--order"},{flag:"--type"},{flag:"--commands"},{flag:"--cli-flag"},{flag:"--required"},{flag:"--required-on-create"},{flag:"--no-allow-unset"},{flag:"--required-types"},{flag:"--infer"},{flag:"--min-count"},{flag:"--apply"},{flag:"--to"},{flag:"--migration-id",aliases:["--migration_id"]},{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],q=[{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],B=[{flag:"--title"},{flag:"--description"},{flag:"--scope"},{flag:"--parent"},{flag:"--related"},{flag:"--blocks"},{flag:"--blocked-by",aliases:["--blocked_by"]},{flag:"--harness"},{flag:"--mode"},{flag:"--resume-context",aliases:["--resume_context"]},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--priority"},{flag:"--status",short:"-s"},{flag:"--create-mode",aliases:["--create_mode"]},{flag:"--deadline"},{flag:"--estimate",aliases:["--estimated-minutes","--estimated_minutes"]},{flag:"--acceptance-criteria",aliases:["--acceptance_criteria","--ac"],repeatable:!0},{flag:"--definition-of-ready",aliases:["--definition_of_ready"]},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now",aliases:["--why_now"]},{flag:"--assignee"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-reason",aliases:["--blocked_reason"]},{flag:"--unblock-note",aliases:["--unblock_note"]},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps",aliases:["--repro_steps"]},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--affected-version",aliases:["--affected_version"]},{flag:"--fixed-version",aliases:["--fixed_version"]},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact",aliases:["--customer_impact"]},{flag:"--comment",repeatable:!0},{flag:"--note",repeatable:!0},{flag:"--learning",repeatable:!0},{flag:"--reminder",repeatable:!0},{flag:"--event",repeatable:!0},{flag:"--type-option",aliases:["--type_option"],repeatable:!0},{flag:"--body"},{flag:"--claim"},{flag:"--from-search",aliases:["--from_search"]},{flag:"--template"},{flag:"--step-title",aliases:["--step_title"]},{flag:"--step"},{flag:"--step-body",aliases:["--step_body"]},{flag:"--step-owner",aliases:["--step_owner"]},{flag:"--step-status",aliases:["--step_status"]},{flag:"--step-evidence",aliases:["--step_evidence"]},{flag:"--step-blocked-reason",aliases:["--step_blocked_reason"]},{flag:"--step-replacement",aliases:["--step_replacement"]},{flag:"--depends-on",aliases:["--depends_on"]},{flag:"--link"},{flag:"--link-kind",aliases:["--link_kind"]},{flag:"--link-note",aliases:["--link_note"]},{flag:"--promote-to-item-dep",aliases:["--promote_to_item_dep"]},{flag:"--allow-multiple-active",aliases:["--allow_multiple_active"]},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--decision-text",aliases:["--decision_text","--decision"]},{flag:"--decision-rationale",aliases:["--decision_rationale"]},{flag:"--decision-evidence",aliases:["--decision_evidence"]},{flag:"--discovery-text",aliases:["--discovery_text","--discovery"]},{flag:"--validation-text",aliases:["--validation_text","--validation"]},{flag:"--validation-command",aliases:["--validation_command"]},{flag:"--validation-expected",aliases:["--validation_expected"]},{flag:"--depth"},{flag:"--field"},{flag:"--fields",list:!0},{flag:"--steps"},{flag:"--materialize-type",aliases:["--materialize_type"]},{flag:"--materialize-parent",aliases:["--materialize_parent"]},{flag:"--materialize-tags",aliases:["--materialize_tags"]},{flag:"--author"},{flag:"--message"},{flag:"--force"}],V=[{flag:"--id-prefix",aliases:["--prefix"]},{flag:"--preset"},{flag:"--type-preset"},{flag:"--defaults",short:"-y",aliases:["--yes"]},{flag:"--author"},{flag:"--agent-guidance"},{flag:"--with-packages"},{flag:"--no-merge-fence"},{flag:"--workspace"},{flag:"--force"},{flag:"--verbose"}],K=[{flag:"--criterion"},{flag:"--clear-criteria"},{flag:"--format"},{flag:"--policy"},{flag:"--default-depth"},{flag:"--activity-limit"},{flag:"--stale-threshold-days"},{flag:"--section-hierarchy"},{flag:"--section-activity"},{flag:"--section-progress"},{flag:"--section-blockers"},{flag:"--section-files"},{flag:"--section-workload"},{flag:"--section-staleness"},{flag:"--section-tests"}],y=[{flag:"--init"},{flag:"--scaffold"},{flag:"--capability"},{flag:"--install"},{flag:"--uninstall"},{flag:"--explore"},{flag:"--list"},{flag:"--manage"},{flag:"--describe"},{flag:"--markdown"},{flag:"--output"},{flag:"--reload"},{flag:"--watch"},{flag:"--doctor"},{flag:"--catalog"},{flag:"--adopt"},{flag:"--adopt-all"},{flag:"--activate"},{flag:"--deactivate"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"},{flag:"--detail"},{flag:"--trace"},{flag:"--runtime-probe"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],s=[{flag:"--project"},{flag:"--local"},{flag:"--global"}],x=[...s,{flag:"--capability"}],m=[...y,{flag:"--declarative"}],W=[...x,{flag:"--declarative"}],$=[{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],J=s,Q=s,Z=[...s,{flag:"--markdown"},{flag:"--output"}],aa=s,ea=s,la=s,ta=[...s,{flag:"--dry-run"}],fa=[...s,{flag:"--runtime-probe"},{flag:"--fix-managed-state"}],ga=[...s,{flag:"--watch"}],sa=[...s,{flag:"--detail"},{flag:"--trace"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],ra=[...s,{flag:"--fields",list:!0}],ia=[...s,{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],oa=[{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],na=[{flag:"--dry-run"},{flag:"--cli-only"},{flag:"--packages-only"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--repair"},{flag:"--tag"},{flag:"--package-name"}],te=[{flag:"--mode"},{flag:"--progress"}],ca=[{flag:"--reason"},{flag:"--close-reason"},{flag:"--completed-at"},{flag:"--duplicate-of"},{flag:"--author"},{flag:"--message"},{flag:"--validate-close"},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--force"}],da=[{flag:"--filter-status",list:!0},{flag:"--filter-type"},{flag:"--filter-tag"},{flag:"--filter-priority"},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee"},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint"},{flag:"--filter-release"},...h,{flag:"--reason"},{flag:"--completed-at"},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--validate-close"},{flag:"--author"},{flag:"--message"},{flag:"--force"},{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"}],pa=[{flag:"--body",short:"-b"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],ua=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"},{flag:"--if-available"},{flag:"--next"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee-filter"},{flag:"--parent"},{flag:"--sprint"},{flag:"--release"},{flag:"--max-attempts"},{flag:"--include-decisions"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--explain-ranking",aliases:["--explain_ranking"]}],ma=[{flag:"--author"},{flag:"--message"},{flag:"--force"}],_a=[{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ta=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Aa=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Ca=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],ha=[{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--validate-close"},{flag:"--force"}],b=[{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--tags"},{flag:"--priority"},{flag:"--body"},{flag:"--description"},{flag:"--author"},{flag:"--message"}],v=[{flag:"--start"},{flag:"--duration"},{flag:"--end"},{flag:"--location"},{flag:"--timezone"},{flag:"--all-day"},...b],ya=v,xa=[{flag:"--at"},{flag:"--text"},...b],ba=[{flag:"--add"},{flag:"--add-json"},{flag:"--remove"},{flag:"--run"},{flag:"--match"},{flag:"--only-index"},{flag:"--only-last"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--auto-pm-context"},{flag:"--measure",list:!0},{flag:"--metric-below"},{flag:"--metric-diff"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],va=[{flag:"--status"},{flag:"--limit"},{flag:"--offset"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--auto-pm-context"}],Sa=[{flag:"--limit"}],Na=[{flag:"--status"},{flag:"--limit"},{flag:"--stream"},{flag:"--tail"},{flag:"--force"},{flag:"--author"}],Oa=[{flag:"--dry-run"},{flag:"--scope"}],La=[{flag:"--storage"},{flag:"--metadata-coverage"},{flag:"--field-utilization"},{flag:"--by-assignee"},{flag:"--by-tag"},{flag:"--by-priority"},{flag:"--tag-prefix"}],Ea=[{flag:"--status",repeatable:!0,list:!0},{flag:"--since"},{flag:"--threshold"},{flag:"--limit"}],Ra=[{flag:"--strict-directories"},{flag:"--require-merge-drivers"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--check-only"},{flag:"--check-telemetry"},{flag:"--no-refresh"},{flag:"--refresh-vectors"},{flag:"--verbose-stale-items"},{flag:"--verbose-author-events"},{flag:"--brief"},{flag:"--summary"},{flag:"--skip-vectors"},{flag:"--skip-integrity"},{flag:"--skip-drift"},{flag:"--full"}],ka=[{flag:"--check-metadata"},{flag:"--metadata-profile"},{flag:"--check-resolution"},{flag:"--check-lifecycle"},{flag:"--check-stale-blockers"},{flag:"--dependency-cycle-severity"},{flag:"--parent-cycle-severity"},{flag:"--check-files"},{flag:"--scan-mode"},{flag:"--include-pm-internals"},{flag:"--verbose-file-lists"},{flag:"--verbose-diagnostics"},{flag:"--all-affected-ids"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--fix-hints"},{flag:"--auto-fix"},{flag:"--dry-run"},{flag:"--fix-scope"},{flag:"--prune-missing"},{flag:"--check-history-drift"},{flag:"--check-command-references"},{flag:"--check-storage-integrity"},{flag:"--counts"},{flag:"--full"}],S=[{flag:"--assignee"},{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-by"},{flag:"--blocked-reason"},{flag:"--unblock-note"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--actual-result"},{flag:"--affected-version"},{flag:"--fixed-version"}],N=[{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"}],O=[{short:"-p",flag:"--priority"},{flag:"--type"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{flag:"--remove-tags",aliases:["--remove_tags"]},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--add-ac",aliases:["--add_ac"]},{flag:"--remove-ac",aliases:["--remove_ac"]}],_=[{flag:"--stdin-json"},{short:"-t",flag:"--title"},{flag:"--id"},{short:"-d",flag:"--description"},{flag:"--type"},{flag:"--template"},{flag:"--create-mode"},{flag:"--create_mode"},{flag:"--schedule-preset"},{flag:"--schedule_preset"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},{flag:"--completed_at"},{short:"-p",flag:"--priority"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{short:"-b",flag:"--body"},{flag:"--body-file"},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--author"},{flag:"--message"},...S,...N,{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--fixed_version"},{flag:"--dep"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--reminder"},{flag:"--event"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--allow-duplicate",value_type:"boolean"}],Ga=[{flag:"--transaction-id",value_name:"value"},{flag:"--stdin-json"},{flag:"--dry-run"},{flag:"--create-compensation",value_name:"mode"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--author",value_name:"value"}],Fa=[{flag:"--transaction-id",value_name:"value",required:!0},{flag:"--reason",value_name:"value"},{flag:"--file",value_name:"value",repeatable:!0},{flag:"--doc",value_name:"value",repeatable:!0},{flag:"--test",value_name:"value",repeatable:!0},{flag:"--comment",value_name:"value",repeatable:!0},{flag:"--note",value_name:"value",repeatable:!0},{flag:"--learning",value_name:"value",repeatable:!0},{flag:"--resolution",value_name:"value"},{flag:"--expected-result",value_name:"value"},{flag:"--actual-result",value_name:"value"},{flag:"--completed-at",value_name:"value"},{flag:"--validate-close",value_name:"mode"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--dry-run"},{flag:"--force"},{flag:"--author",value_name:"value"}],wa=[{flag:"--title"},{flag:"--author"},{flag:"--message"},{flag:"--allow-duplicate",value_type:"boolean"}],Ia=[{flag:"--clear"}],Ma=[{flag:"--stdin-json"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},{flag:"--body-file"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},...O,...S,{flag:"--fixed_version"},...N,{flag:"--author"},{flag:"--message"},{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--force"}],Da=[{flag:"--filter-status",list:!0},{flag:"--filter-type",list:!0},{flag:"--filter-tag",list:!0},{flag:"--filter-priority",list:!0},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee",list:!0},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint",list:!0},{flag:"--filter-release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...h,{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},...O,{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--repro_steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--expected_result"},{flag:"--expected"},{flag:"--actual-result"},{flag:"--actual_result"},{flag:"--actual"},{flag:"--affected-version"},{flag:"--affected_version"},{flag:"--fixed-version"},{flag:"--fixed_version"},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],T=[{flag:"--view"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--full-period"},{flag:"--full_period"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--status"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--include"},{flag:"--recurrence-lookahead-days"},{flag:"--recurrence-lookback-days"},{flag:"--occurrence-limit"},{flag:"--limit"},{flag:"--format"}],Pa=[{flag:"--id"},{flag:"--op"},{flag:"--author"},{flag:"--from"},{flag:"--to"},{flag:"--limit"},{flag:"--unbounded"},{flag:"--compact"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--stream"}],Xa=[{flag:"--since"},{flag:"--type",repeatable:!0},{flag:"--author",repeatable:!0},{flag:"--item",repeatable:!0},{flag:"--limit",value_type:"number"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--follow"},{flag:"--interval-ms",value_type:"number"}],A=p([{flag:"--for",value_name:"intent"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit",aliases:["--max-items"]},{flag:"--after"},{flag:"--format"},{flag:"--depth"},{flag:"--fields",list:!0},{flag:"--section"},{flag:"--activity-limit"},{flag:"--stale-threshold"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--no-extension-health"},{flag:"--no-tags"}],new Set(["--limit","--after","--format","--fields","--section","--activity-limit","--stale-threshold","--explain-ranking","--explain_ranking","--no-extension-health","--no-tags"])),Ua=[{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--depth"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--at"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--format"}],ja=[{flag:"--list"},{flag:"--format"},{flag:"--depth"}],Ha=[{flag:"--format"},{flag:"--max-depth"},{flag:"--collapse"},{flag:"--summary"},{flag:"--full"},{flag:"--node-limit"},{flag:"--edge-limit"},{flag:"--token-budget"},{flag:"--cursor"},{flag:"--direction"},{flag:"--kind",list:!0}],za=[{flag:"--kind",list:!0},{flag:"--max-depth"},{flag:"--limit"},{flag:"--after"},{flag:"--direction"},{flag:"--max-paths"},{flag:"--sample"},{flag:"--exempt-isolate",list:!0},{flag:"--exempt-isolate-type",list:!0},{flag:"--save-baseline"},{flag:"--rebuild"},{flag:"--clear"},{flag:"--summary"},{flag:"--full"}],Ya=[{flag:"--mode"},{flag:"--k"},{flag:"--fail-under"},{flag:"--queries"},{flag:"--format"}],r=[{flag:"--dry-run"},{flag:"--force"},{flag:"--author"},{flag:"--message"}],qa=[{flag:"--for",value_name:"intent"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit"},{flag:"--blocked-limit"},{flag:"--blocked_limit"},{flag:"--ready-only"},{flag:"--ready_only"},{flag:"--format"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]}],Ba=p([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--mode"},{flag:"--semantic"},{flag:"--hybrid"},{flag:"--match-mode"},{flag:"--min-score"},{flag:"--count"},{flag:"--semantic-weight"},{flag:"--include-linked"},{flag:"--title-exact"},{flag:"--phrase-exact"},{flag:"--highlight"},{flag:"--compact"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--format"},{flag:"--limit"},{flag:"--after"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--assignee",list:!0},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--parent"},...C],new Set(["--highlight","--compact","--full","--fields","--format","--limit","--token-budget","--after"])),Va=[{flag:"--action"},{flag:"--command"},{flag:"--summary"},{flag:"--schema-only"},{flag:"--flags-only"},{flag:"--availability-only"},{flag:"--runtime-only"},{flag:"--active-only"},{flag:"--full"}],Ka=[{flag:"--eager-tags"}];function Wa(a){let e=new Set,l=[];for(let t of a){let g=(t.aliases??[]).join(","),f=`${t.flag}|${t.short??""}|${g}`;e.has(f)||(e.add(f),l.push(t))}return l}function o(a){return c(Wa([...d,...a]))}var $a=["list","list-all","list-draft","list-open","list-in-progress","list-blocked","list-closed","list-canceled"],L=new Map([...$a.map(a=>[a,k]),["templates",_],["cal",T],["ctx",A],["test-runs-worker",Na],["init",V],["config",K],["extension",y],["package",m],["packages",m],["install",oa],["upgrade",na],["create",_],["item mutate",Ga],["item complete",Fa],["copy",wa],["focus",Ia],["aggregate",G],["calendar",T],["context",A],["get",Ua],["guide",ja],["search",Ba],["next",qa],["eval",Ya],["workspace",r],["workspace snapshot",r],["workspace snapshot create",r],["workspace snapshot list",r],["workspace snapshot inspect",r],["workspace snapshot restore",r],["workspace snapshot delete",r],["history",P],["history-redact",U],["history-repair",j],["history-author-acknowledge",H],["history-compact",z],["merge",X],["schema",Y],["profile",q],["plan",B],["activity",Pa],["events",Xa],["restore",ma],["update",Ma],["update-many",Da],["close",ca],["close-many",da],["delete",_a],["append",pa],["comments",F],["notes",w],["learnings",I],["files",M],["docs",D],["deps",Ha],["graph",za],["test",ba],["test-all",va],["telemetry",Sa],["health",Ra],["validate",ka],["gc",Oa],["stats",La],["duplicates",Ea],["contracts",Va],["completion",Ka],["claim",ua],["release",Ta],["start-task",Aa],["pause-task",Ca],["close-task",ha],["meet",v],["event",ya],["remind",xa]]),E=new Map([["install",$],["uninstall",J],["explore",Q],["manage",fa],["describe",Z],["reload",ga],["doctor",sa],["catalog",ra],["adopt",ia],["adopt-all",aa],["activate",ea],["deactivate",la],["migrate",ta]]);function R(a){return typeof a!="string"?"":a.trim().toLowerCase()}function fe(a){let e=R(a);if(L.has(e))return!0;let[l,t,...g]=e.split(/\s+/);return(l==="extension"||l==="package"||l==="packages")&&t!==void 0&&g.length===0&&(t==="init"||E.has(t))}function Ja(a,e){return e==="init"?a==="extension"?x:W:E.get(e)??[]}function ge(a){let e=R(a);if(e.length===0)return o([]);let[l,t,...g]=e.split(/\s+/);return(l==="extension"||l==="package"||l==="packages")&&t!==void 0&&g.length===0?o(Ja(l,t)):o(L.get(e)??[])}function se(a,e=!0){let t=c(a).flatMap(f=>[f.short,f.flag,...f.aliases??[]]).filter(f=>!!f),g=e?[...t,...d.flatMap(f=>[f.short,f.flag,...f.aliases??[]]).filter(f=>!!f)]:t;return i(g).join(" ")}export{i as a,c as b,ee as c,d,le as e,k as f,G as g,F as h,w as i,I as j,M as k,D as l,P as m,X as n,U as o,j as p,H as q,z as r,Y as s,q as t,B as u,V as v,K as w,y as x,s as y,x as z,m as A,W as B,$ as C,J as D,Q as E,Z as F,aa as G,ea as H,la as I,ta as J,fa as K,ga as L,sa as M,ra as N,ia as O,oa as P,na as Q,te as R,ca as S,da as T,pa as U,ua as V,ma as W,_a as X,Ta as Y,Aa as Z,Ca as _,ha as $,v as aa,ya as ba,xa as ca,ba as da,va as ea,Sa as fa,Na as ga,Oa as ha,La as ia,Ea as ja,Ra as ka,ka as la,_ as ma,Ga as na,Fa as oa,wa as pa,Ia as qa,Ma as ra,Da as sa,T as ta,Pa as ua,Xa as va,A as wa,Ua as xa,ja as ya,Ha as za,za as Aa,Ya as Ba,r as Ca,qa as Da,Ba as Ea,Va as Fa,Ka as Ga,fe as Ha,ge as Ia,se as Ja};
|
|
2
|
+
//# sourceMappingURL=chunk-RUAU5OSH.js.map
|