@unbrained/pm-cli 2026.11.8 → 2026.11.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/cli/main.js +1 -1
- package/dist/cli/runtime/projection-retry.js +1 -1
- package/dist/cli/runtime/read-output-mutation-retry.js +2 -0
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-NH7QX2M2.js → chunk-3BMIAI4P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RC6SSFOF.js → chunk-5VRJPPUC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XBUZENP4.js → chunk-6V4PGJBZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YUTFMHSG.js → chunk-ASJZMYKM.js} +33 -33
- package/dist/cli-bundle/chunks/chunk-BLUCQ4T4.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-4BMPGUTG.js → chunk-ELNWRSGZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7GC6WIDR.js → chunk-EZRLW4R6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NKO42JMT.js → chunk-G6Q4VQSI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3A5DJZCC.js → chunk-GCPP37N6.js} +48 -48
- package/dist/cli-bundle/chunks/{chunk-C4MQFWCM.js → chunk-GDQ2T2OR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L5BU5FYN.js → chunk-GZVOOHTO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LI2HP5OX.js → chunk-IGT252ES.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CP43BHX3.js → chunk-JK7O7MFO.js} +29 -29
- package/dist/cli-bundle/chunks/{chunk-AFZS6WFV.js → chunk-JYQXIC6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PE6CZ3PE.js → chunk-LVDFPGD7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Z3LWNF7C.js → chunk-MSJ7IHMJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MKW5LGVQ.js → chunk-O2M3TNFY.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-UFIM5ZC5.js +6 -0
- package/dist/cli-bundle/chunks/{chunk-YGUUJHSR.js → chunk-VATZTJE3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DOHZKPPC.js → chunk-XKY4LUXN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7V6I6X4G.js → chunk-YK5GAWOT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-S4IZIMAO.js → chunk-YV5ALMG2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HESIRIVX.js → chunk-Z3QEEOAM.js} +2 -2
- package/dist/cli-bundle/chunks/item-revision-Y5CE3EIN.js +2 -0
- package/dist/cli-bundle/chunks/item-transaction-XBIN4KYM.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-admission-FJ3D66PV.js → mutation-admission-TAQN2AKK.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-GXP77CX7.js → register-list-query-XMQYFUFI.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-XJ2DROUM.js → register-mutation-OBVCFLDK.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-O5LERXM7.js → register-operations-CGNFZ6DR.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-4VOTYLL2.js → register-setup-LFB5ERXH.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-ZDJL3FGL.js → stage-NQHF6JPC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-Z2QWZRSL.js → chunk-2SQUWQP3.js} +18 -18
- package/dist/cli-bundle/focused-chunks/chunk-4FWMXQN3.js +12 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4UOXVFJZ.js → chunk-AH5IST3V.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6U5HP6L3.js → chunk-ALLOWZSH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KNF2QTEZ.js → chunk-C3DO4ZGZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LTPT5TE7.js → chunk-CUGJ2DY2.js} +20 -20
- package/dist/cli-bundle/focused-chunks/{chunk-2A3QZELL.js → chunk-HLQOGAWG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-P4EHEH4C.js → chunk-HNFY3XLC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-IB6TCE7N.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-5YPX3QKU.js → chunk-IS5FLEZW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ULTSMJYF.js → chunk-J7PWHKZK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-P6TG33FV.js → chunk-JU62TKJP.js} +26 -26
- package/dist/cli-bundle/focused-chunks/{chunk-TSHRBPTI.js → chunk-LDMBNTOG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UUVRYIKA.js → chunk-LWMPQRJT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-MYBKRV5R.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-KBRSA4OK.js → chunk-NUFO3OR6.js} +25 -25
- package/dist/cli-bundle/focused-chunks/{chunk-DIEBSC76.js → chunk-NZQYHPUN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-3HFENALW.js → chunk-Q45LDP7P.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-O7K3X4LH.js → chunk-QWUWNFQO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SZ2BKK3M.js → chunk-RNZUORGI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WPXMPGTY.js → chunk-UIKLNSW3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-I4YUZW3J.js → chunk-XLSTFUXM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-revision-M6FOLME2.js +2 -0
- package/dist/cli-bundle/focused-chunks/{item-transaction-Q2Z7DDCR.js → item-transaction-H6VA5JGB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-QWC6MLTZ.js → mutation-admission-PRTQWQK6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-NKH5SKSZ.js → stage-7T77PSJD.js} +2 -2
- package/dist/cli-bundle/main.js +26 -26
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +4 -4
- package/dist/cli-bundle/sdk-core.js +1 -1
- 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 +57 -57
- 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 +9 -9
- package/dist/core/item/item-format.d.ts +9 -1
- package/dist/core/item/item-format.js +1 -1
- package/dist/core/output/output.d.ts +9 -2
- package/dist/core/output/output.js +4 -4
- package/dist/core/search/corpus.js +1 -1
- package/dist/mcp/tool-definitions.js +1 -1
- package/dist/sdk/annotations.js +1 -1
- package/dist/sdk/generated/error-code-catalog-rows.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/lifecycle/item-revision.d.ts +6 -0
- package/dist/sdk/lifecycle/item-revision.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/get-facet-roots.js +2 -0
- package/dist/sdk/query/get.js +1 -1
- package/dist/sdk/read-output/positional-rows.js +2 -0
- package/dist/sdk/read-output-contracts.d.ts +4 -0
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/runtime/actions.js +1 -1
- package/docs/AGENT_OUTPUT_ENCODINGS.md +16 -0
- package/docs/README.md +1 -1
- package/docs/READ_OUTPUT_CONTRACTS.md +21 -0
- package/docs/RELEASING.md +27 -5
- package/marketplace.json +1 -1
- package/package.json +2 -1
- 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-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli-bundle/chunks/chunk-JAE5MWLX.js +0 -2
- package/dist/cli-bundle/chunks/chunk-LLTRUVKK.js +0 -6
- package/dist/cli-bundle/chunks/item-revision-TUGZYYXX.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-2RRBAQN3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PL6EO4GJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PSLDGAEY.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-UNNLBJRI.js +0 -2
- package/dist/cli-bundle/focused-chunks/item-revision-XNSRDTFB.js +0 -2
- package/docs/ECOSYSTEM_PLANNING_REVIEW.md +0 -274
package/dist/cli-bundle/sdk.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as fg}from"./chunks/chunk-L5BU5FYN.js";import{a as Gk,b as Uk,c as jk,d as Bk}from"./chunks/chunk-LI2HP5OX.js";import{a as qk,b as zk}from"./chunks/chunk-Z3LWNF7C.js";import{b as ck,c as lk,d as pk,e as uk,f as mk,g as fk,h as _k,i as hk,j as gk,k as yk,l as bk,m as Tk,n as Ck,o as Ek,p as Sk,q as wk,r as Ak}from"./chunks/chunk-C4MQFWCM.js";import{A as kk,B as xk,C as Nk,D as Lk,E as Dk,F as $k,G as Fk,a as Ns,b as ER,c as SR,d as wd,e as Ad,f as vd,h as Od,i as Rd,j as Id,k as Pd,l as Md,m as kd,n as xd,o as Nd,p as $c,q as Fc,r as Gc,s as Uc,t as jc,u as vk,v as Ok,w as Rk,x as Ik,y as Pk,z as Mk}from"./chunks/chunk-7GC6WIDR.js";import{A as gx,B as yx,C as bx,D as Tx,E as Cx,F as Ex,G as Sx,H as wx,I as Ax,J as vx,K as Ox,L as Rx,M as Ix,N as Px,O as Mx,P as kx,Q as xx,R as Nx,S as Lx,T as Dx,U as $x,V as Fx,W as Gx,X as Ux,Y as jx,Z as Bx,_ as qx,a as Hk,b as Vk,c as Kk,d as Wk,e as Yk,f as Xk,g as Jk,h as Zk,i as Qk,j as ex,k as tx,l as rx,m as ox,n as nx,o as ix,p as sx,q as ax,r as dx,s as cx,t as lx,u as px,v as ux,w as mx,x as fx,y as _x,z as hx}from"./chunks/chunk-NH7QX2M2.js";import{$ as Xm,$a as q_,$b as qh,A as Ye,Aa as p_,Ab as hh,B as Lm,Ba as u_,Bb as gh,C as Dm,Ca as m_,Cb as yh,D as Fm,Da as f_,Db as bh,E as Ht,Ea as __,Eb as Th,F as Vt,Fa as h_,Fb as Ch,G as Kt,Ga as g_,Gb as Eh,H as Wt,Ha as y_,Hb as Sh,I as Yt,Ia as b_,Ib as wh,J as Xt,Ja as T_,Jb as Ah,K as Jt,Ka as C_,Kb as vh,L as Zt,La as E_,Lb as Oh,M as Qt,Ma as S_,Mb as Rh,N as er,Na as w_,Nb as Ih,O as tr,Oa as A_,Ob as Ph,P as Gm,Pa as v_,Pb as Mh,Q as Um,Qa as O_,Qb as kh,R as jm,Ra as R_,Rb as xh,S as Bm,Sa as I_,Sb as Nh,T as qm,Ta as rr,Tb as Lh,U as Xe,Ua as ge,Ub as Dh,V as zm,Va as $_,Vb as $h,W as Hm,Wa as F_,Wb as Fh,X as Vm,Xa as G_,Xb as Gh,Y as Km,Ya as U_,Yb as Uh,Z as Wm,Za as j_,Zb as jh,_ as Ym,_a as B_,_b as Bh,a as LO,aa as Jm,ab as z_,ac as zh,b as DO,ba as z0,bb as H_,bc as Hh,c as $O,ca as H0,cb as V_,cc as Vh,d as FO,da as V0,db as K_,dc as Kh,e as GO,ea as pf,eb as W_,ec as Wh,f as UO,fa as uf,fb as Y_,fc as Yh,g as qO,ga as mf,gb as X_,gc as Xh,h as zO,ha as e_,hb as J_,hc as Jh,i as HO,ia as t_,ib as Z_,ic as Zh,j as VO,ja as tk,jb as Q_,jc as Qh,k as Ls,ka as rk,kb as eh,kc as eg,l as Qd,la as ok,lb as th,lc as tg,m as ec,ma as nk,mb as rh,mc as rg,n as tc,na as ik,nb as oh,nc as og,o as tP,oa as sk,ob as nh,oc as ng,p as rP,pa as ak,pb as ih,pc as ig,q as oP,qa as dk,qb as sh,qc as sg,r as nP,ra as r_,rb as ah,rc as ag,s as iP,sa as o_,sb as dh,sc as dg,t as sP,ta as n_,tb as ch,tc as cg,u as Tu,ua as i_,ub as lh,uc as lg,v as Su,va as s_,vb as ph,vc as pg,w as wu,wa as a_,wb as uh,wc as ug,x as qu,xa as d_,xb as mh,xc as mg,y as Xu,ya as c_,yb as fh,z as MM,za as l_,zb as _h}from"./chunks/chunk-MKW5LGVQ.js";import{e as cP,f as lP,g as Hl,h as Vl,i as Bt}from"./chunks/chunk-AFZS6WFV.js";import{A as x0,B as N0,C as L0,D as D0,E as $0,F as F0,G as G0,H as U0,I as j0,J as B0,K as q0,L as ef,M as tf,N as rf,O as of,P as nf,Q as sf,R as af,S as df,T as cf,U as lf,a as fM,b as _M,c as hM,d as gM,e as yM,f as bu,g as bM,h as TM,i as CM,j as EM,k as SM,m as $m,n as Zm,o as E0,p as S0,q as w0,r as A0,s as v0,t as O0,u as Qm,v as R0,w as I0,x as P0,y as M0,z as k0}from"./chunks/chunk-LLTRUVKK.js";import{$ as mI,$a as up,$b as lM,$c as xm,A as Ve,Aa as FI,Ab as VP,Ac as Fu,Ad as Df,B as te,Ba as GI,Bb as KP,Bc as Gu,Bd as $f,C as tl,Ca as UI,Cb as QP,Cc as Uu,Cd as Ff,Db as eM,Dc as ju,Dd as Gf,Ea as aP,Eb as nu,Ed as Uf,F as Ke,Fa as dP,Fb as iu,Fc as IM,Fd as jf,G as rl,Ga as Fl,Gb as tM,Gc as PM,Gd as Bf,H as ol,Ha as Gl,Hb as rM,Hc as Bu,Ia as Ul,Ib as oM,Ic as Ju,Id as qf,J as he,Ja as jl,Jb as nM,Jc as Zu,Jd as zf,K as nl,Ka as Bl,Kb as iM,Kc as Qu,Kd as Hf,L as il,La as ql,Lb as su,Lc as em,Ld as Vf,M as sl,Ma as zl,Mb as au,Mc as tm,Md as Kf,N as al,Na as Zl,Nb as du,Nd as Wf,O as rI,Oa as Ql,Ob as cu,Od as Yf,P as oI,Pa as ep,Pb as lu,Pd as Xf,Q as nI,Qa as tp,Qb as pu,Qd as Jf,R as iI,Ra as rp,Rb as uu,Rc as rm,Rd as Zf,S as sI,Sa as op,Sb as mu,Sd as Qf,T as Nt,Ta as np,Tb as fu,Tc as om,Td as P_,U as aI,Ua as ip,Ub as _u,Uc as nm,Ud as M_,V as dI,Va as sp,Vb as hu,Vc as Rm,Vd as k_,W as Lt,Wa as ap,Wb as gu,Wc as Im,Wd as x_,X as cI,Xa as dp,Xb as sM,Xd as N_,Y as lI,Ya as cp,Yb as aM,Yc as Pm,Yd as L_,Z as pI,Za as lp,Zb as dM,Zc as Mm,Zd as D_,_ as uI,_a as pp,_b as cM,_c as km,a as zd,aa as We,ab as mp,ac as pM,ad as Nm,b as Hd,ba as fI,bb as fp,bc as uM,bd as ff,c as Vd,ca as Dt,cb as _p,cc as mM,cd as _f,d as Kd,da as _I,db as mP,dc as yu,dd as hf,e as Wd,ea as hI,eb as hp,ec as wM,ed as gf,fa as gI,fb as gp,fc as AM,fd as yf,g as Yd,ga as yI,gb as yp,gc as vM,gd as bf,h as Xd,ha as bI,hb as bp,hc as OM,hd as Tf,ia as TI,ib as fP,ic as RM,id as Cf,ja as CI,jb as Tp,jd as Ef,ka as EI,kb as Cp,kc as Cu,kd as Z0,l as Jd,la as SI,lb as Ep,lc as Eu,ld as Q0,m as Zd,ma as wI,mb as Sp,mc as Au,md as ek,na as AI,nb as wp,nc as vu,nd as Sf,oa as vI,ob as _P,od as wf,pa as OI,pb as hP,pc as Ou,pd as Af,qa as RI,qb as gP,qc as Ru,qd as vf,ra as II,rb as yP,rc as Iu,rd as Of,sa as PI,sb as bP,sc as Pu,sd as Rf,t as Mt,ta as MI,tb as TP,tc as Mu,td as If,ua as kI,ub as CP,uc as ku,ud as Pf,v as kt,va as xI,vb as jP,vc as xu,vd as Mf,wa as NI,wb as BP,wc as Nu,wd as kf,x as eI,xa as LI,xb as qP,xc as Lu,xd as xf,y as xt,ya as DI,yb as zP,yc as Du,yd as Nf,z as tI,za as $I,zb as HP,zc as $u,zd as Lf}from"./chunks/chunk-CP43BHX3.js";import"./chunks/chunk-UJMQP2HP.js";import{w as Bc}from"./chunks/chunk-YGUUJHSR.js";import{A as eP,Aa as Il,B as Tl,C as Cl,Ca as Pl,D as El,Da as Ml,E as Sl,Ea as kl,F as $t,Fa as xl,Ga as Nl,Ia as Ll,Ja as Dl,Ka as $l,a as JO,b as ZO,c as QO,d as eR,e as tR,f as rR,g as Ds,h as $s,i as Fs,j as Gs,k as Us,la as Ft,m as jI,ma as Gt,na as Ut,oa as jt,pa as wl,ra as Al,sa as vl,ta as Ol,v as XI,w as JI,y as ZI,z as QI,za as Rl}from"./chunks/chunk-HESIRIVX.js";import{a as BI,b as qI,c as zI,d as HI,e as VI,f as KI,g as WI,h as ul,i as ml,j as fl,k as _l,l as hl,m as YI,n as gl,o as yl,p as bl}from"./chunks/chunk-7V6I6X4G.js";import{$a as LP,$b as i0,A as VR,Aa as Xp,Ab as NM,Ac as Sm,B as qc,Ba as Jp,Bb as LM,Bc as wm,C as zc,Ca as Zp,Cb as DM,Cc as Am,D as Hc,Da as Qp,Db as $M,Dc as zt,E as Vc,Ea as eu,Eb as FM,Ec as vm,F as Kc,Fa as tu,Fb as GM,Fc as y0,G as Wc,Ga as ru,Gc as b0,H as Yc,Ha as ou,Hb as cm,Hc as T0,I as Xc,Ib as UM,Ic as Om,J as Jc,Jb as jM,Jc as C0,K as Zc,Kb as BM,Kc as K0,L as Qc,La as EP,Lb as qM,Lc as W0,M as He,Ma as SP,Mb as zM,Mc as Y0,N as KR,Na as wP,Nb as HM,Nc as X0,O as WR,Oa as AP,Ob as VM,Oc as J0,P as YR,Pa as vP,Pb as KM,Q as XR,Qa as OP,Qb as WM,R as JR,Ra as RP,Rb as YM,S as ZR,Sa as IP,Sb as XM,T as QR,Ta as PP,Tb as JM,U as el,Ua as MP,Ub as ZM,V as Kl,Va as kP,Vb as QM,W as Wl,Wa as xP,Wb as e0,X as Yl,Xa as NP,Xb as t0,Y as Xl,Yb as r0,Z as pP,Zb as o0,_ as uP,_b as n0,a as KO,aa as Jl,ac as s0,b as WO,ba as Ap,bb as DP,bc as a0,c as YO,ca as vp,cb as $P,cc as d0,d as XO,da as Op,dc as c0,e as kR,ea as Rp,ec as l0,f as xR,fa as Ip,fb as FP,fc as p0,g as NR,ga as Pp,gb as GP,gc as u0,h as LR,ha as Mp,hb as UP,hc as m0,i as DR,ia as kp,ic as f0,j as $R,ja as xp,jb as WP,jc as _0,k as FR,ka as Np,kb as YP,kc as h0,la as Lp,lb as XP,lc as g0,ma as Dp,mb as JP,mc as qt,na as $p,nb as ZP,nc as lm,oa as Fp,ob as zu,oc as pm,pa as Gp,pb as Hu,pc as um,qa as Up,qb as Vu,qc as mm,ra as jp,rb as Ku,rc as fm,sa as Bp,sb as Wu,sc as _m,t as GR,ta as qp,tb as Yu,tc as hm,u as UR,ua as zp,ub as kM,uc as gm,v as jR,va as Hp,vb as im,vc as ym,w as BR,wa as Vp,wb as sm,wc as bm,x as qR,xa as Kp,xb as am,xc as Tm,y as zR,ya as Wp,yb as dm,yc as Cm,z as HR,za as Yp,zb as xM,zc as Em}from"./chunks/chunk-DOHZKPPC.js";import{a as jO,b as BO}from"./chunks/chunk-XBUZENP4.js";import{$ as fa,$a as fd,$b as IR,A as qs,Aa as ja,Ab as ac,B as zs,Ba,Bb as dc,Ca as qa,Cb as cc,D as Hs,Da as za,Db as lc,E as Vs,Ea as Ha,Eb as pc,F as Ks,Fa as Va,Fb as uc,G as Ws,Ga as Ka,Gb as mc,H as Ys,Ha as Wa,Hb as fc,I as Xs,Ia as Ya,Ib as _c,J as Js,Ja as Xa,Jb as hc,K as Zs,Ka as Ja,Kb as gc,L as Qs,La as Za,Lb as yc,M as ea,Ma as Qa,Mb as bc,N as ta,Na as ed,Nb as Tc,O as ra,Oa as td,Ob as Cc,P as oa,Pa as rd,Pb as Ec,Q as na,Qa as od,Qb as Sc,Ra as nd,Rb as wc,S as ia,Sa as id,Sb as Ac,T as sa,Ta as sd,U as aa,Ua as ad,V as da,Va as dd,W as ca,Wa as cd,Wb as wR,X as la,Xa as ld,Xb as AR,Y as pa,Ya as pd,Yb as vR,Z as ua,Za as ud,Zb as OR,_ as ma,_a as md,_b as RR,a as oR,aa as _a,ab as _d,ac as PR,b as nR,ba as ha,bb as hd,bc as MR,c as iR,ca as ga,cb as gd,d as sR,da as ya,db as yd,dc as vc,e as aR,ea as ba,eb as bd,ec as Oc,f as dR,fa as Ta,fb as Td,fc as Rc,g as cR,ga as Ca,gb as Cd,gc as Ic,h as js,ha as Ea,hb as Ed,hc as Pc,i as lR,ia as Sa,ic as Mc,ja as wa,jb as ze,jc as kc,ka as Aa,kb as ee,kc as xc,l as pR,la as va,lb as Sd,lc as Nc,m as uR,ma as Oa,mb as Ld,mc as Lc,n as Be,na as Ra,nb as Dd,nc as Dc,o as mR,oa as Ia,ob as $d,oc as Pt,p as fR,pa as Pa,pb as Fd,q as _R,qa as Ma,qb as Gd,r as It,ra as ka,rb as Ud,s as qe,sa as xa,sb as jd,t as hR,ta as Na,tb as Bd,u as gR,ua as La,ub as qd,v as yR,va as Da,vb as rc,w as bR,wa as $a,wb as oc,x as TR,xa as Fa,xb as nc,y as CR,ya as Ga,yb as ic,z as Bs,za as Ua,zb as sc}from"./chunks/chunk-4BMPGUTG.js";import{a as vO,b as OO,c as RO,d as IO,e as PO,f as MO,g as kO,h as xO,i as NO,j as As,k as vs,l as Os,m as Rs,n as Is,o as Ps,q as Ms,s as ks,y as xs}from"./chunks/chunk-JAE5MWLX.js";import{b as SO}from"./chunks/chunk-NKO42JMT.js";import"./chunks/chunk-IB7UB5TE.js";import{$ as IE,$b as kv,$c as _s,A as ZT,Aa as UA,Ab as yv,Ad as EO,B as QT,Bc as ss,Bd as wO,Cb as bv,Cc as as,Cd as AO,Db as Tv,Dc as ds,Eb as Cv,Ec as cs,Fb as Ev,Fc as ls,Gb as Zi,Gc as ps,Hb as Qi,Hc as Vv,Ic as Kv,J as cC,Jb as es,Jc as Wv,Ka as jA,Kb as Sv,Kc as Yv,L as yC,La as BA,Lc as Xv,M as bC,Ma as qA,Mb as wv,Mc as Jv,N as TC,Na as zA,Nb as Av,Nc as Zv,O as CC,Oa as HA,Ob as vv,Oc as Qv,P as OC,Pa as VA,Pc as eO,Q as RC,Qa as ZA,Qb as Ov,Qc as tO,R as At,Ra as QA,Rc as rO,S as SE,Sa as ev,Sc as oO,T as wE,Ta as vt,Tb as Rv,Tc as nO,U as AE,Uc as iO,Va as tv,Vb as Iv,Vc as sO,W as vE,Wa as rv,Wc as aO,Xa as ov,Xc as dO,Y as OE,Ya as nv,Yc as us,Z as RE,Za as iv,Zb as Pv,Zc as ms,_b as Mv,_c as fs,a as FT,aa as PE,ab as sv,ac as ts,ad as hs,ba as ME,bc as xv,bd as gs,ca as fA,cd as ys,da as _A,dc as Nv,dd as bs,ea as hA,eb as Wi,ec as Lv,ed as Ts,fa as gA,fc as Dv,fd as Cs,ga as OA,gc as $v,gd as Es,hc as Fv,hd as Ss,i as an,ia as zi,ic as Gv,id as ws,j as GT,ja as Hi,jc as Uv,jd as cO,k as UT,ka as Vi,kc as jv,kd as lO,l as jT,lc as Bv,ld as pO,m as BT,ma as RA,mc as qv,md as uO,n as qT,na as IA,nc as Ot,nd as mO,o as zT,oa as PA,oc as zv,od as fO,pa as MA,pd as _O,q as HT,qa as kA,qc as Hv,qd as hO,ra as xA,rd as gO,s as VT,sa as NA,sd as yO,t as KT,td as bO,u as WT,ua as LA,w as YT,wa as DA,wc as rs,x as XT,xa as $A,xb as _v,xc as os,xd as Rt,ya as FA,yb as hv,yc as ns,yd as TO,z as JT,za as GA,zb as gv,zc as is,zd as CO}from"./chunks/chunk-YUTFMHSG.js";import{$ as bt,$b as LC,$c as eE,$d as UE,$e as rS,$f as RS,$g as iw,$h as rA,$i as Xi,A as Uo,Aa as eC,Ab as _C,Ac as VC,Ad as $n,Ae as Jn,Ag as NS,Ah as kw,Ai as SA,B as jo,Ba as tC,Bc as KC,Bd as gE,Be as KE,Bg as LS,Bh as xw,Bi as wA,C as Bo,Ca as rC,Cb as Et,Cd as Fn,Ce as WE,Cg as DS,Ch as Nw,Ci as AA,D as qo,De as YE,Dg as $S,Dh as Lw,Di as vA,E as zo,Eb as St,Ed as yE,Ee as XE,Eg as FS,Eh as Dw,F as Ho,Fa as yn,Fd as bE,Fe as JE,Ff as dS,Fg as GS,Fh as $w,G as Vo,Ga as oC,Gb as Rn,Gd as TE,Ge as ZE,Gf as cS,Gh as Fw,H as De,Ha as nC,Hb as In,Hc as kn,Hd as CE,He as QE,Hf as lS,Hh as Gw,I as $e,Ia as iC,Ib as _e,Ic as WC,Id as EE,Ie as eS,If as pS,Ig as US,Ih as Uw,Ii as KA,J as Ko,Ja as sC,Jd as kE,Je as tS,Jf as uS,Jg as jS,Jh as jw,K as Wo,Kb as hC,Kc as YC,Kd as xE,Ke as Zn,Kf as mS,Kg as BS,Kh as Bw,L as Yo,La as bn,Ld as NE,Le as Qn,Lf as fS,Lg as qS,Lh as qw,Li as WA,M as Xo,Ma as Tn,Mb as gC,Md as LE,Me as D,Mf as _S,Mg as zS,Mh as zw,Mi as YA,N as Jo,Na as Ge,Nb as EC,Nd as DE,Ne as ei,Nf as hS,Ng as HS,O as Zo,Oa as aC,Ob as SC,Od as $E,Of as gS,Og as VS,Oh as Hw,P as Qo,Pa as dC,Pb as wC,Pf as yS,Pg as KS,Ph as Vw,Pi as XA,Q as en,Qa as Cn,Qb as AC,Qg as WS,Qi as Ki,R as tn,Ra as En,Rb as vC,Rg as YS,Ri as JA,S as rn,Sb as IC,Sf as bS,Sg as XS,Sh as Kw,Si as av,T as on,Ta as Sn,Tb as Ue,Te as je,Tf as TS,Tg as JS,Th as Ww,Ti as dv,U as nn,Ub as wt,Ud as FE,Ue as ti,Uf as CS,Ug as ZS,Uh as Yw,Ui as cv,V as sn,Vb as PC,Vf as ES,Vg as QS,Vh as Xw,Vi as lv,Wb as MC,Wc as XC,Wf as SS,Wg as ew,Wh as Jw,Wi as pv,Xb as kC,Xc as JC,Xd as Gn,Xf as wS,Xg as tw,Xh as Zw,Xi as uv,Yb as xC,Yc as ZC,Yd as GE,Yf as AS,Yg as rw,Yh as Qw,Yi as mv,Zb as z,Zd as Un,Zf as vS,Zg as ow,Zh as eA,Zi as fv,_b as NC,_c as QC,_f as OS,_g as nw,_h as tA,_i as Yi,a as I,aa as Tt,ac as DC,af as oS,ag as IS,ah as sw,ai as oA,aj as Ji,b as vT,ba as pn,bc as $C,bd as tE,bf as nS,bg as PS,bh as aw,bi as nA,c as yt,ca as un,cc as FC,cd as xn,cf as ri,ch as dw,ci as iA,d as OT,da as mn,dc as GC,df as oi,dg as Ei,dh as cw,e as RT,eb as wn,ec as UC,ed as Nn,ee as jE,ef as ni,eg as Si,eh as lw,ei as sA,f as IT,fb as An,fd as Ln,ff as ii,fg as wi,fh as pw,fi as Bi,g as PT,gb as vn,ge as BE,gf as si,gg as Ai,gh as uw,gi as qi,h as MT,ha as fn,hc as jC,he as qE,hf as ai,hg as vi,hh as mw,i as kT,ib as On,id as rE,ie as jn,if as di,ig as Oi,ih as fw,j as xT,ja as _n,jc as Pn,jd as oE,je as Bn,jf as ci,jg as Ri,jh as _w,k as NT,ka as hn,kc as Mn,kd as nE,kf as li,kg as Ii,kh as hw,l as LT,la as gn,lb as lC,ld as iE,le as qn,lf as pi,lg as Pi,lh as gw,li as aA,m as DT,mb as pC,md as sE,me as zn,mf as ui,mg as Mi,mh as yw,mi as dA,n as $T,nd as aE,ne as Hn,nf as mi,ng as ki,nh as bw,ni as cA,o as Mo,od as dE,oe as Vn,of as fi,og as xi,oh as Tw,oi as lA,p as ko,pd as Dn,pe as Kn,pf as _i,pg as Ni,ph as Cw,q as xo,qd as cE,qe as zE,qf as hi,qg as Li,qh as Ew,qi as pA,r as No,rb as uC,rd as lE,re as HE,rf as iS,rg as Di,rh as Sw,ri as uA,s as Ne,sf as sS,sg as $i,sh as ww,t as Lo,tf as gi,tg as Fi,th as Aw,ti as mA,u as L,ub as mC,ud as pE,uf as aS,ug as Gi,uh as vw,v as Le,vc as BC,vd as uE,vf as yi,vg as Ui,vh as Ow,vi as yA,w as Do,wd as mE,we as Wn,wf as bi,wg as ji,wh as Rw,wi as bA,x as $o,xb as fC,xc as qC,xd as fE,xe as Yn,xf as Ti,xg as MS,xh as Iw,xi as TA,y as Fo,yc as zC,yd as _E,ye as VE,yf as Ci,yg as kS,yh as Pw,yi as CA,z as Go,zc as HC,zd as hE,ze as Xn,zg as xS,zh as Mw,zi as EA}from"./chunks/chunk-3A5DJZCC.js";import"./chunks/chunk-SPPHDVZE.js";import{a as dl,b as cl,e as ll,f as pl}from"./chunks/chunk-RSAN2YUU.js";import"./chunks/chunk-VS565KBX.js";import{A as me,B as AT,C as b,E as dn,F as Ct,G as fe,H as cn,K as Fe,M as ln,b as yT,c as bT,d as TT,m as CT,r as ET,u as ST,y as wT}from"./chunks/chunk-O4ZLEN4T.js";import"./chunks/chunk-XAWE4EAK.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]="8f11e0bf-4115-55a8-bd39-c360f43cdc09")}catch{}})();var H="2026-07-28",nr=["2025-11-25","2025-06-18"],re=[H],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},w={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},or=["debug","info","notice","warning","error","critical","alert","emergency"],u=class extends Error{code;data;constructor(t,r,o={}){super(t),this.name="PmMcpProtocolError",this.code=r,this.data=o}};function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function _g(e){if(e===void 0)return;if(!h(e))throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,expected:"object"});let t=typeof e.name=="string"?e.name.trim():"",r=typeof e.version=="string"?e.version.trim():"";if(t.length===0||r.length===0)throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,required:["name","version"]});let o={name:t.slice(0,128),version:r.slice(0,128)};return typeof e.description=="string"&&e.description.trim()&&(o.description=e.description.trim().slice(0,1024)),typeof e.websiteUrl=="string"&&e.websiteUrl.trim()&&(o.websiteUrl=e.websiteUrl.trim().slice(0,2048)),o}function hg(e){if(e!==void 0){if(typeof e!="string"||!or.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:w.logLevel,allowed:[...or]});return e}}function Je(e){let t=h(e)?e._meta:void 0;if(!h(t))throw new u("Missing required MCP request metadata",m.invalidParams,{required:[w.protocolVersion,w.clientCapabilities]});let r=t[w.protocolVersion];if(typeof r!="string"||!re.includes(r))throw new u("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...re],requested:typeof r=="string"?r:null});let o=t[w.clientCapabilities];if(!h(o))throw new u("Invalid MCP client capabilities metadata",m.invalidParams,{field:w.clientCapabilities,expected:"object"});let n=_g(t[w.clientInfo]),s=hg(t[w.logLevel]);return{protocolVersion:H,clientCapabilities:o,...n?{clientInfo:n}:{},...s?{logLevel:s}:{}}}function zx(e,t){if(t!==e.protocolVersion)throw new u("MCP protocol header does not match request metadata",m.headerMismatch,{header:t??null,metadata:e.protocolVersion})}function Hx(e,t){let r=t.filter(o=>!Object.prototype.hasOwnProperty.call(e.clientCapabilities,o));if(r.length>0)throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:Object.fromEntries(r.map(o=>[o,{}]))})}function Vx(e,t){let r=e.clientCapabilities.extensions;return h(r)&&h(r[t])}function Ze(e,t){let r=h(e._meta)?e._meta:{};return{...e,_meta:{...r,[w.serverInfo]:{...t}}}}function gg(e,t){return Ze({...e,resultType:"complete"},t)}function Kx(e){let t=e.ttlMs??6e4;if(!Number.isFinite(t)||t<0)throw new u("Invalid MCP discovery cache TTL",m.invalidParams,{ttlMs:t});return gg({supportedVersions:[...re],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function Wx(e,t){if(h(e)&&typeof e.resultType=="string")return e.resultType;if(t==="legacy")return"complete";throw new u("Modern MCP result is missing resultType",m.invalidParams,{required:"resultType"})}(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]="d4a56906-c542-567e-9265-15184a5c330b")}catch{}})();var yg=new Set(["--help","-h","--version","-V"]);function bg(e,t){let r=[`Usage: ${e==="stdio"?"pm-mcp":"pm-mcp-http"} [--help | --version]`,"",e==="stdio"?"JSON-RPC over stdin/stdout. With no arguments, starts the stdio server.":"Streamable HTTP POST /mcp. With no arguments, starts the HTTP server.","","Options:"," -h, --help Print help and exit before transport startup."," -V, --version Print the package version and exit.","","Environment:"," PM_PATH Tracker root (otherwise discovered from cwd)."," PM_GLOBAL_PATH Global settings root."," PM_MCP_PROFILE core (default), standard, full, or custom."," PM_MCP_TOOLS Comma-separated tool allowlist for custom profile."," PM_MCP_DISCOVERY_CURSOR_KEY Shared discovery cursor secret, at least 32 UTF-8 bytes."," PM_MCP_BAGGAGE_ALLOWLIST Comma-separated permitted trace baggage keys."];return e==="http"&&r.push(" PM_MCP_HTTP_HOST Bind host (default 127.0.0.1)."," PM_MCP_HTTP_PORT Bind port, 0..65535 (default 3000)."," PM_MCP_HTTP_ALLOWED_ORIGINS Comma-separated exact browser origins (default none)."," PM_MCP_HTTP_BEARER_TOKEN Deployment token for the bundled verifier."," PM_MCP_HTTP_AUTH_ISSUER Exact HTTPS authorization-server issuer."," PM_MCP_HTTP_RESOURCE Canonical resource/audience URI."," PM_MCP_HTTP_SCOPES Space-separated scopes (default pm:read pm:write).","","Non-loopback HTTP requires bearer token, issuer, and resource together."),r.push("",`MCP protocol: ${re.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${nr.join(", ")}.`:"HTTP requires modern per-request metadata; legacy initialize is stdio-only.","",e==="stdio"?"Client configuration:":"Example loopback server:",e==="stdio"?JSON.stringify({mcpServers:{pm:{command:"npx",args:["--yes","--package",`@unbrained/pm-cli@${t}`,"pm-mcp"]}}}):`PM_MCP_HTTP_PORT=3000 npx --yes --package @unbrained/pm-cli@${t} pm-mcp-http`,...e==="http"?["HTTP client configuration:",JSON.stringify({mcpServers:{pm:{url:"http://127.0.0.1:3000/mcp"}}})]:[],"","Configuration: https://github.com/unbraind/pm-cli/blob/main/docs/MCP_REMOTE_TRANSPORT_SECURITY.md",""),r.join(`
|
|
2
|
-
`)}function
|
|
1
|
+
import{a as fg}from"./chunks/chunk-GZVOOHTO.js";import{a as jk,b as Bk,c as qk,d as zk}from"./chunks/chunk-IGT252ES.js";import{a as Hk,b as Vk}from"./chunks/chunk-MSJ7IHMJ.js";import{b as pk,c as uk,d as mk,e as fk,f as _k,g as hk,h as gk,i as yk,j as bk,k as Tk,l as Ck,m as Ek,n as Sk,o as wk,p as Ak,q as vk,r as Ok}from"./chunks/chunk-GDQ2T2OR.js";import{A as Nk,B as Lk,C as Dk,D as $k,E as Fk,F as Gk,G as Uk,a as Ns,b as wR,c as AR,d as wd,e as Ad,f as vd,h as Od,i as Rd,j as Id,k as Pd,l as Md,m as kd,n as xd,o as Nd,p as $c,q as Fc,r as Gc,s as Uc,t as jc,u as Rk,v as Ik,w as Pk,x as Mk,y as kk,z as xk}from"./chunks/chunk-EZRLW4R6.js";import{A as bx,B as Tx,C as Cx,D as Ex,E as Sx,F as wx,G as Ax,H as vx,I as Ox,J as Rx,K as Ix,L as Px,M as Mx,N as kx,O as xx,P as Nx,Q as Lx,R as Dx,S as $x,T as Fx,U as Gx,V as Ux,W as jx,X as Bx,Y as qx,Z as zx,_ as Hx,a as Kk,b as Wk,c as Yk,d as Xk,e as Jk,f as Zk,g as Qk,h as ex,i as tx,j as rx,k as ox,l as nx,m as ix,n as sx,o as ax,p as dx,q as cx,r as lx,s as px,t as ux,u as mx,v as fx,w as _x,x as hx,y as gx,z as yx}from"./chunks/chunk-3BMIAI4P.js";import{$ as Xm,$a as q_,$b as qh,A as Ye,Aa as p_,Ab as hh,B as Lm,Ba as u_,Bb as gh,C as Dm,Ca as m_,Cb as yh,D as Fm,Da as f_,Db as bh,E as Ht,Ea as __,Eb as Th,F as Vt,Fa as h_,Fb as Ch,G as Kt,Ga as g_,Gb as Eh,H as Wt,Ha as y_,Hb as Sh,I as Yt,Ia as b_,Ib as wh,J as Xt,Ja as T_,Jb as Ah,K as Jt,Ka as C_,Kb as vh,L as Zt,La as E_,Lb as Oh,M as Qt,Ma as S_,Mb as Rh,N as er,Na as w_,Nb as Ih,O as tr,Oa as A_,Ob as Ph,P as Gm,Pa as v_,Pb as Mh,Q as Um,Qa as O_,Qb as kh,R as jm,Ra as R_,Rb as xh,S as Bm,Sa as I_,Sb as Nh,T as qm,Ta as rr,Tb as Lh,U as Xe,Ua as ge,Ub as Dh,V as zm,Va as $_,Vb as $h,W as Hm,Wa as F_,Wb as Fh,X as Vm,Xa as G_,Xb as Gh,Y as Km,Ya as U_,Yb as Uh,Z as Wm,Za as j_,Zb as jh,_ as Ym,_a as B_,_b as Bh,a as $O,aa as Jm,ab as z_,ac as zh,b as FO,ba as V0,bb as H_,bc as Hh,c as GO,ca as K0,cb as V_,cc as Vh,d as UO,da as W0,db as K_,dc as Kh,e as jO,ea as pf,eb as W_,ec as Wh,f as BO,fa as uf,fb as Y_,fc as Yh,g as HO,ga as mf,gb as X_,gc as Xh,h as VO,ha as e_,hb as J_,hc as Jh,i as KO,ia as t_,ib as Z_,ic as Zh,j as WO,ja as ok,jb as Q_,jc as Qh,k as Ls,ka as nk,kb as eh,kc as eg,l as Qd,la as ik,lb as th,lc as tg,m as ec,ma as sk,mb as rh,mc as rg,n as tc,na as ak,nb as oh,nc as og,o as oP,oa as dk,ob as nh,oc as ng,p as nP,pa as ck,pb as ih,pc as ig,q as iP,qa as lk,qb as sh,qc as sg,r as sP,ra as r_,rb as ah,rc as ag,s as aP,sa as o_,sb as dh,sc as dg,t as dP,ta as n_,tb as ch,tc as cg,u as Tu,ua as i_,ub as lh,uc as lg,v as Su,va as s_,vb as ph,vc as pg,w as wu,wa as a_,wb as uh,wc as ug,x as qu,xa as d_,xb as mh,xc as mg,y as Xu,ya as c_,yb as fh,z as xM,za as l_,zb as _h}from"./chunks/chunk-O2M3TNFY.js";import{e as pP,f as uP,g as Hl,h as Vl,i as Bt}from"./chunks/chunk-JYQXIC6C.js";import{A as L0,B as D0,C as $0,D as F0,E as G0,F as U0,G as j0,H as B0,I as q0,J as z0,K as H0,L as ef,M as tf,N as rf,O as of,P as nf,Q as sf,R as af,S as df,T as cf,U as lf,a as hM,b as gM,c as yM,d as bM,e as TM,f as bu,g as CM,h as EM,i as SM,j as wM,k as AM,m as $m,n as Zm,o as w0,p as A0,q as v0,r as O0,s as R0,t as I0,u as Qm,v as P0,w as M0,x as k0,y as x0,z as N0}from"./chunks/chunk-UFIM5ZC5.js";import{$ as _I,$a as up,$b as uM,$c as xm,A as Ve,Aa as UI,Ab as WP,Ac as Fu,Ad as Df,B as te,Ba as jI,Bb as YP,Bc as Gu,Bd as $f,C as tl,Ca as BI,Cb as tM,Cc as Uu,Cd as Ff,Db as rM,Dc as ju,Dd as Gf,Ea as cP,Eb as nu,Ed as Uf,F as Ke,Fa as lP,Fb as iu,Fc as MM,Fd as jf,G as rl,Ga as Fl,Gb as oM,Gc as kM,Gd as Bf,H as ol,Ha as Gl,Hb as nM,Hc as Bu,Ia as Ul,Ib as iM,Ic as Ju,Id as qf,J as he,Ja as jl,Jb as sM,Jc as Zu,Jd as zf,K as nl,Ka as Bl,Kb as aM,Kc as Qu,Kd as Hf,L as il,La as ql,Lb as su,Lc as em,Ld as Vf,M as sl,Ma as zl,Mb as au,Mc as tm,Md as Kf,N as al,Na as Zl,Nb as du,Nd as Wf,O as nI,Oa as Ql,Ob as cu,Od as Yf,P as iI,Pa as ep,Pb as lu,Pd as Xf,Q as sI,Qa as tp,Qb as pu,Qd as Jf,R as aI,Ra as rp,Rb as uu,Rc as rm,Rd as Zf,S as dI,Sa as op,Sb as mu,Sd as Qf,T as Nt,Ta as np,Tb as fu,Tc as om,Td as P_,U as cI,Ua as ip,Ub as _u,Uc as nm,Ud as M_,V as lI,Va as sp,Vb as hu,Vc as Rm,Vd as k_,W as Lt,Wa as ap,Wb as gu,Wc as Im,Wd as x_,X as pI,Xa as dp,Xb as dM,Xd as N_,Y as uI,Ya as cp,Yb as cM,Yc as Pm,Yd as L_,Z as mI,Za as lp,Zb as lM,Zc as Mm,Zd as D_,_ as fI,_a as pp,_b as pM,_c as km,a as vR,aa as We,ab as mp,ac as mM,ad as Nm,b as Pt,ba as hI,bb as fp,bc as fM,bd as ff,c as OR,ca as Dt,cb as _p,cc as _M,cd as _f,d as zd,da as gI,db as _P,dc as yu,dd as hf,e as Hd,ea as yI,eb as hp,ec as vM,ed as gf,f as Vd,fa as bI,fb as gp,fc as OM,fd as yf,g as Kd,ga as TI,gb as yp,gc as RM,gd as bf,h as Wd,ha as CI,hb as bp,hc as IM,hd as Tf,ia as EI,ib as hP,ic as PM,id as Cf,j as Yd,ja as SI,jb as Tp,jd as Ef,k as Xd,ka as wI,kb as Cp,kc as Cu,kd as ek,la as AI,lb as Ep,lc as Eu,ld as tk,ma as vI,mb as Sp,mc as Au,md as rk,na as OI,nb as wp,nc as vu,nd as Sf,o as Jd,oa as RI,ob as gP,od as wf,p as Zd,pa as II,pb as yP,pc as Ou,pd as Af,qa as PI,qb as bP,qc as Ru,qd as vf,ra as MI,rb as TP,rc as Iu,rd as Of,sa as kI,sb as CP,sc as Pu,sd as Rf,ta as xI,tb as EP,tc as Mu,td as If,ua as NI,ub as SP,uc as ku,ud as Pf,va as LI,vb as qP,vc as xu,vd as Mf,w as kt,wa as DI,wb as zP,wc as Nu,wd as kf,xa as $I,xb as HP,xc as Lu,xd as xf,y as xt,ya as FI,yb as VP,yc as Du,yd as Nf,za as GI,zb as KP,zc as $u,zd as Lf}from"./chunks/chunk-JK7O7MFO.js";import"./chunks/chunk-UJMQP2HP.js";import{w as Bc}from"./chunks/chunk-VATZTJE3.js";import{A as rP,Aa as Il,B as Tl,C as Cl,Ca as Pl,D as El,Da as Ml,E as Sl,Ea as kl,F as $t,Fa as xl,Ga as Nl,Ia as Ll,Ja as Dl,Ka as $l,a as QO,b as eR,c as tR,d as rR,e as oR,f as nR,g as Ds,h as $s,i as Fs,j as Gs,k as Us,la as Ft,m as qI,ma as Gt,na as Ut,oa as jt,pa as wl,ra as Al,sa as vl,ta as Ol,v as ZI,w as QI,y as eP,z as tP,za as Rl}from"./chunks/chunk-Z3QEEOAM.js";import{a as zI,b as HI,c as VI,d as KI,e as WI,f as YI,g as XI,h as ul,i as ml,j as fl,k as _l,l as hl,m as JI,n as gl,o as yl,p as bl}from"./chunks/chunk-YK5GAWOT.js";import{$a as $P,$b as a0,A as XR,Aa as Xp,Ab as DM,Ac as Sm,B as qc,Ba as Jp,Bb as $M,Bc as wm,C as zc,Ca as Zp,Cb as FM,Cc as Am,D as Hc,Da as Qp,Db as GM,Dc as zt,E as Vc,Ea as eu,Eb as UM,Ec as vm,F as Kc,Fa as tu,Fb as jM,Fc as T0,G as Wc,Ga as ru,Gc as C0,H as Yc,Ha as ou,Hb as cm,Hc as E0,I as Xc,Ib as BM,Ic as Om,J as Jc,Jb as qM,Jc as S0,K as Zc,Kb as zM,Kc as Y0,L as Qc,La as wP,Lb as HM,Lc as X0,M as He,Ma as AP,Mb as VM,Mc as J0,N as JR,Na as vP,Nb as KM,Nc as Z0,O as ZR,Oa as OP,Ob as WM,Oc as Q0,P as QR,Pa as RP,Pb as YM,Q as eI,Qa as IP,Qb as XM,R as tI,Ra as PP,Rb as JM,S as rI,Sa as MP,Sb as ZM,T as oI,Ta as kP,Tb as QM,U as el,Ua as xP,Ub as e0,V as Kl,Va as NP,Vb as t0,W as Wl,Wa as LP,Wb as r0,X as Yl,Xa as DP,Xb as o0,Y as Xl,Yb as n0,Z as mP,Zb as i0,_ as fP,_b as s0,a as YO,aa as Jl,ac as d0,b as XO,ba as Ap,bb as FP,bc as c0,c as JO,ca as vp,cb as GP,cc as l0,d as ZO,da as Op,dc as p0,e as DR,ea as Rp,ec as u0,f as $R,fa as Ip,fb as UP,fc as m0,g as FR,ga as Pp,gb as jP,gc as f0,h as GR,ha as Mp,hb as BP,hc as _0,i as UR,ia as kp,ic as h0,j as jR,ja as xp,jb as XP,jc as g0,k as BR,ka as Np,kb as JP,kc as y0,la as Lp,lb as ZP,lc as b0,ma as Dp,mb as QP,mc as qt,na as $p,nb as eM,nc as lm,oa as Fp,ob as zu,oc as pm,pa as Gp,pb as Hu,pc as um,qa as Up,qb as Vu,qc as mm,ra as jp,rb as Ku,rc as fm,sa as Bp,sb as Wu,sc as _m,t as qR,ta as qp,tb as Yu,tc as hm,u as zR,ua as zp,ub as NM,uc as gm,v as HR,va as Hp,vb as im,vc as ym,w as VR,wa as Vp,wb as sm,wc as bm,x as KR,xa as Kp,xb as am,xc as Tm,y as WR,ya as Wp,yb as dm,yc as Cm,z as YR,za as Yp,zb as LM,zc as Em}from"./chunks/chunk-XKY4LUXN.js";import{a as qO,b as zO}from"./chunks/chunk-6V4PGJBZ.js";import{$ as fa,$a as fd,$b as xR,A as qs,Aa as ja,Ab as ac,B as zs,Ba,Bb as dc,Ca as qa,Cb as cc,D as Hs,Da as za,Db as lc,E as Vs,Ea as Ha,Eb as pc,F as Ks,Fa as Va,Fb as uc,G as Ws,Ga as Ka,Gb as mc,H as Ys,Ha as Wa,Hb as fc,I as Xs,Ia as Ya,Ib as _c,J as Js,Ja as Xa,Jb as hc,K as Zs,Ka as Ja,Kb as gc,L as Qs,La as Za,Lb as yc,M as ea,Ma as Qa,Mb as bc,N as ta,Na as ed,Nb as Tc,O as ra,Oa as td,Ob as Cc,P as oa,Pa as rd,Pb as Ec,Q as na,Qa as od,Qb as Sc,Ra as nd,Rb as wc,S as ia,Sa as id,Sb as Ac,T as sa,Ta as sd,U as aa,Ua as ad,V as da,Va as dd,W as ca,Wa as cd,Wb as RR,X as la,Xa as ld,Xb as IR,Y as pa,Ya as pd,Yb as PR,Z as ua,Za as ud,Zb as MR,_ as ma,_a as md,_b as kR,a as iR,aa as _a,ab as _d,ac as NR,b as sR,ba as ha,bb as hd,bc as LR,c as aR,ca as ga,cb as gd,d as dR,da as ya,db as yd,dc as vc,e as cR,ea as ba,eb as bd,ec as Oc,f as lR,fa as Ta,fb as Td,fc as Rc,g as pR,ga as Ca,gb as Cd,gc as Ic,h as js,ha as Ea,hb as Ed,hc as Pc,i as uR,ia as Sa,ic as Mc,ja as wa,jb as ze,jc as kc,ka as Aa,kb as ee,kc as xc,l as mR,la as va,lb as Sd,lc as Nc,m as fR,ma as Oa,mb as Ld,mc as Lc,n as Be,na as Ra,nb as Dd,nc as Dc,o as _R,oa as Ia,ob as $d,oc as Mt,p as hR,pa as Pa,pb as Fd,q as gR,qa as Ma,qb as Gd,r as It,ra as ka,rb as Ud,s as qe,sa as xa,sb as jd,t as yR,ta as Na,tb as Bd,u as bR,ua as La,ub as qd,v as TR,va as Da,vb as rc,w as CR,wa as $a,wb as oc,x as ER,xa as Fa,xb as nc,y as SR,ya as Ga,yb as ic,z as Bs,za as Ua,zb as sc}from"./chunks/chunk-ELNWRSGZ.js";import{a as RO,b as IO,c as PO,d as MO,e as kO,f as xO,g as NO,h as LO,i as DO,j as As,k as vs,l as Os,m as Rs,n as Is,o as Ps,q as Ms,s as ks,y as xs}from"./chunks/chunk-BLUCQ4T4.js";import{b as AO}from"./chunks/chunk-G6Q4VQSI.js";import"./chunks/chunk-IB7UB5TE.js";import{$ as IE,$b as Nv,$c as _s,A as ZT,Aa as BA,Ab as Tv,Ad as wO,B as QT,Bc as ss,Bd as vO,Cb as Cv,Cc as as,Cd as OO,Db as Ev,Dc as ds,Eb as Sv,Ec as cs,Fb as wv,Fc as ls,Gb as Zi,Gc as ps,Hb as Qi,Hc as Wv,Ic as Yv,J as cC,Jb as es,Jc as Xv,Ka as qA,Kb as Av,Kc as Jv,L as yC,La as zA,Lc as Zv,M as bC,Ma as HA,Mb as vv,Mc as Qv,N as TC,Na as VA,Nb as Ov,Nc as eO,O as CC,Oa as KA,Ob as Rv,Oc as tO,P as OC,Pa as WA,Pc as rO,Q as RC,Qa as ev,Qb as Iv,Qc as oO,R as At,Ra as tv,Rc as nO,S as SE,Sa as rv,Sc as iO,T as wE,Ta as vt,Tb as Pv,Tc as sO,U as AE,Uc as aO,Va as ov,Vb as Mv,Vc as dO,W as vE,Wa as nv,Wc as cO,Xa as iv,Xc as lO,Y as OE,Ya as sv,Yc as us,Z as RE,Za as av,Zb as kv,Zc as ms,_b as xv,_c as fs,a as FT,aa as PE,ab as dv,ac as ts,ad as hs,ba as ME,bc as Lv,bd as gs,ca as hA,cd as ys,da as gA,dc as Dv,dd as bs,ea as yA,eb as Wi,ec as $v,ed as Ts,fa as bA,fc as Fv,fd as Cs,ga as IA,gc as Gv,gd as Es,hc as Uv,hd as Ss,i as an,ia as zi,ic as jv,id as ws,j as GT,ja as Hi,jc as Bv,jd as pO,k as UT,ka as Vi,kc as qv,kd as uO,l as jT,lc as zv,ld as mO,m as BT,ma as PA,mc as Hv,md as fO,n as qT,na as MA,nc as Ot,nd as _O,o as zT,oa as kA,oc as Vv,od as hO,pa as xA,pd as gO,q as HT,qa as NA,qc as Kv,qd as yO,ra as LA,rd as bO,s as VT,sa as DA,sd as TO,t as KT,td as CO,u as WT,ua as $A,w as YT,wa as FA,wc as rs,x as XT,xa as GA,xb as gv,xc as os,xd as Rt,ya as UA,yb as yv,yc as ns,yd as EO,z as JT,za as jA,zb as bv,zc as is,zd as SO}from"./chunks/chunk-ASJZMYKM.js";import{$ as bt,$b as LC,$c as eE,$d as UE,$e as rS,$f as RS,$g as iw,$h as eA,$i as fv,A as Uo,Aa as eC,Ab as _C,Ac as VC,Ad as $n,Ae as Jn,Ag as NS,Ah as kw,Ai as CA,B as jo,Ba as tC,Bc as KC,Bd as gE,Be as KE,Bg as LS,Bh as xw,Bi as EA,C as Bo,Ca as rC,Cb as Et,Cd as Fn,Ce as WE,Cg as DS,Ch as Nw,Ci as SA,D as qo,De as YE,Dg as $S,Dh as Lw,Di as wA,E as zo,Eb as St,Ed as yE,Ee as XE,Eg as FS,Eh as Dw,Ei as AA,F as Ho,Fa as yn,Fd as bE,Fe as JE,Ff as dS,Fg as GS,Fh as $w,Fi as vA,G as Vo,Ga as oC,Gb as Rn,Gd as TE,Ge as ZE,Gf as cS,Gh as Fw,Gi as OA,H as De,Ha as nC,Hb as In,Hc as kn,Hd as CE,He as QE,Hf as lS,Hi as RA,I as $e,Ia as iC,Ib as _e,Ic as WC,Id as EE,Ie as eS,If as pS,Ig as US,J as Ko,Ja as sC,Jd as kE,Je as tS,Jf as uS,Jg as jS,Jh as Gw,K as Wo,Kb as hC,Kc as YC,Kd as xE,Ke as Zn,Kf as mS,Kg as BS,Kh as Uw,L as Yo,La as bn,Ld as NE,Le as Qn,Lf as fS,Lg as qS,Lh as jw,M as Xo,Ma as Tn,Mb as gC,Md as LE,Me as D,Mf as _S,Mg as zS,Mh as Bw,Mi as YA,N as Jo,Na as Ge,Nb as EC,Nd as DE,Ne as ei,Nf as hS,Ng as HS,Nh as qw,O as Zo,Oa as aC,Ob as SC,Od as $E,Of as gS,Og as VS,Oh as zw,P as Qo,Pa as dC,Pb as wC,Pf as yS,Pg as KS,Ph as Hw,Pi as XA,Q as en,Qa as Cn,Qb as AC,Qg as WS,Qh as Vw,Qi as JA,R as tn,Ra as En,Rb as vC,Rg as YS,S as rn,Sb as IC,Sf as bS,Sg as XS,Sh as Kw,T as on,Ta as Sn,Tb as Ue,Te as je,Tf as TS,Tg as JS,Th as Ww,Ti as ZA,U as nn,Ub as wt,Ud as FE,Ue as ti,Uf as CS,Ug as ZS,Ui as Ki,V as sn,Vb as PC,Vf as ES,Vg as QS,Vi as QA,Wb as MC,Wc as XC,Wf as SS,Wg as ew,Wh as Yw,Wi as cv,Xb as kC,Xc as JC,Xd as Gn,Xf as wS,Xg as tw,Xh as Xw,Xi as lv,Yb as xC,Yc as ZC,Yd as GE,Yf as AS,Yg as rw,Yh as Jw,Yi as pv,Zb as z,Zd as Un,Zf as vS,Zg as ow,Zh as Zw,Zi as uv,_b as NC,_c as QC,_f as OS,_g as nw,_h as Qw,_i as mv,a as I,aa as Tt,ac as DC,af as oS,ag as IS,ah as sw,ai as tA,aj as _v,b as vT,ba as pn,bc as $C,bd as tE,bf as nS,bg as PS,bh as aw,bi as rA,bj as hv,c as yt,ca as un,cc as FC,cd as xn,cf as ri,ch as dw,ci as oA,cj as Yi,d as OT,da as mn,dc as GC,df as oi,dg as Ei,dh as cw,di as nA,dj as Xi,e as RT,eb as wn,ec as UC,ed as Nn,ee as jE,ef as ni,eg as Si,eh as lw,ei as iA,ej as Ji,f as IT,fb as An,fd as Ln,ff as ii,fg as wi,fh as pw,fi as sA,g as PT,gb as vn,ge as BE,gf as si,gg as Ai,gh as uw,gi as aA,h as MT,ha as fn,hc as jC,he as qE,hf as ai,hg as vi,hh as mw,i as kT,ib as On,id as rE,ie as jn,if as di,ig as Oi,ih as fw,ii as dA,j as xT,ja as _n,jc as Pn,jd as oE,je as Bn,jf as ci,jg as Ri,jh as _w,ji as Bi,k as NT,ka as hn,kc as Mn,kd as nE,kf as li,kg as Ii,kh as hw,ki as qi,l as LT,la as gn,lb as lC,ld as iE,le as qn,lf as pi,lg as Pi,lh as gw,m as DT,mb as pC,md as sE,me as zn,mf as ui,mg as Mi,mh as yw,n as $T,nd as aE,ne as Hn,nf as mi,ng as ki,nh as bw,o as Mo,od as dE,oe as Vn,of as fi,og as xi,oh as Tw,p as ko,pd as Dn,pe as Kn,pf as _i,pg as Ni,ph as Cw,pi as cA,q as xo,qd as cE,qe as zE,qf as hi,qg as Li,qh as Ew,qi as lA,r as No,rb as uC,rd as lE,re as HE,rf as iS,rg as Di,rh as Sw,ri as pA,s as Ne,sf as sS,sg as $i,sh as ww,si as uA,t as Lo,tf as gi,tg as Fi,th as Aw,u as L,ub as mC,ud as pE,uf as aS,ug as Gi,uh as vw,ui as mA,v as Le,vc as BC,vd as uE,vf as yi,vg as Ui,vh as Ow,vi as fA,w as Do,wd as mE,we as Wn,wf as bi,wg as ji,wh as Rw,x as $o,xb as fC,xc as qC,xd as fE,xe as Yn,xf as Ti,xg as MS,xh as Iw,xi as _A,y as Fo,yc as zC,yd as _E,ye as VE,yf as Ci,yg as kS,yh as Pw,z as Go,zc as HC,zd as hE,ze as Xn,zg as xS,zh as Mw,zi as TA}from"./chunks/chunk-GCPP37N6.js";import"./chunks/chunk-SPPHDVZE.js";import{a as dl,b as cl,e as ll,f as pl}from"./chunks/chunk-RSAN2YUU.js";import"./chunks/chunk-VS565KBX.js";import{A as me,B as AT,C as b,E as dn,F as Ct,G as fe,H as cn,K as Fe,M as ln,b as yT,c as bT,d as TT,m as CT,r as ET,u as ST,y as wT}from"./chunks/chunk-O4ZLEN4T.js";import"./chunks/chunk-XAWE4EAK.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]="8f11e0bf-4115-55a8-bd39-c360f43cdc09")}catch{}})();var H="2026-07-28",nr=["2025-11-25","2025-06-18"],re=[H],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},w={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},or=["debug","info","notice","warning","error","critical","alert","emergency"],u=class extends Error{code;data;constructor(t,r,o={}){super(t),this.name="PmMcpProtocolError",this.code=r,this.data=o}};function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function _g(e){if(e===void 0)return;if(!h(e))throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,expected:"object"});let t=typeof e.name=="string"?e.name.trim():"",r=typeof e.version=="string"?e.version.trim():"";if(t.length===0||r.length===0)throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,required:["name","version"]});let o={name:t.slice(0,128),version:r.slice(0,128)};return typeof e.description=="string"&&e.description.trim()&&(o.description=e.description.trim().slice(0,1024)),typeof e.websiteUrl=="string"&&e.websiteUrl.trim()&&(o.websiteUrl=e.websiteUrl.trim().slice(0,2048)),o}function hg(e){if(e!==void 0){if(typeof e!="string"||!or.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:w.logLevel,allowed:[...or]});return e}}function Je(e){let t=h(e)?e._meta:void 0;if(!h(t))throw new u("Missing required MCP request metadata",m.invalidParams,{required:[w.protocolVersion,w.clientCapabilities]});let r=t[w.protocolVersion];if(typeof r!="string"||!re.includes(r))throw new u("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...re],requested:typeof r=="string"?r:null});let o=t[w.clientCapabilities];if(!h(o))throw new u("Invalid MCP client capabilities metadata",m.invalidParams,{field:w.clientCapabilities,expected:"object"});let n=_g(t[w.clientInfo]),s=hg(t[w.logLevel]);return{protocolVersion:H,clientCapabilities:o,...n?{clientInfo:n}:{},...s?{logLevel:s}:{}}}function Vx(e,t){if(t!==e.protocolVersion)throw new u("MCP protocol header does not match request metadata",m.headerMismatch,{header:t??null,metadata:e.protocolVersion})}function Kx(e,t){let r=t.filter(o=>!Object.prototype.hasOwnProperty.call(e.clientCapabilities,o));if(r.length>0)throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:Object.fromEntries(r.map(o=>[o,{}]))})}function Wx(e,t){let r=e.clientCapabilities.extensions;return h(r)&&h(r[t])}function Ze(e,t){let r=h(e._meta)?e._meta:{};return{...e,_meta:{...r,[w.serverInfo]:{...t}}}}function gg(e,t){return Ze({...e,resultType:"complete"},t)}function Yx(e){let t=e.ttlMs??6e4;if(!Number.isFinite(t)||t<0)throw new u("Invalid MCP discovery cache TTL",m.invalidParams,{ttlMs:t});return gg({supportedVersions:[...re],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function Xx(e,t){if(h(e)&&typeof e.resultType=="string")return e.resultType;if(t==="legacy")return"complete";throw new u("Modern MCP result is missing resultType",m.invalidParams,{required:"resultType"})}(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]="d4a56906-c542-567e-9265-15184a5c330b")}catch{}})();var yg=new Set(["--help","-h","--version","-V"]);function bg(e,t){let r=[`Usage: ${e==="stdio"?"pm-mcp":"pm-mcp-http"} [--help | --version]`,"",e==="stdio"?"JSON-RPC over stdin/stdout. With no arguments, starts the stdio server.":"Streamable HTTP POST /mcp. With no arguments, starts the HTTP server.","","Options:"," -h, --help Print help and exit before transport startup."," -V, --version Print the package version and exit.","","Environment:"," PM_PATH Tracker root (otherwise discovered from cwd)."," PM_GLOBAL_PATH Global settings root."," PM_MCP_PROFILE core (default), standard, full, or custom."," PM_MCP_TOOLS Comma-separated tool allowlist for custom profile."," PM_MCP_DISCOVERY_CURSOR_KEY Shared discovery cursor secret, at least 32 UTF-8 bytes."," PM_MCP_BAGGAGE_ALLOWLIST Comma-separated permitted trace baggage keys."];return e==="http"&&r.push(" PM_MCP_HTTP_HOST Bind host (default 127.0.0.1)."," PM_MCP_HTTP_PORT Bind port, 0..65535 (default 3000)."," PM_MCP_HTTP_ALLOWED_ORIGINS Comma-separated exact browser origins (default none)."," PM_MCP_HTTP_BEARER_TOKEN Deployment token for the bundled verifier."," PM_MCP_HTTP_AUTH_ISSUER Exact HTTPS authorization-server issuer."," PM_MCP_HTTP_RESOURCE Canonical resource/audience URI."," PM_MCP_HTTP_SCOPES Space-separated scopes (default pm:read pm:write).","","Non-loopback HTTP requires bearer token, issuer, and resource together."),r.push("",`MCP protocol: ${re.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${nr.join(", ")}.`:"HTTP requires modern per-request metadata; legacy initialize is stdio-only.","",e==="stdio"?"Client configuration:":"Example loopback server:",e==="stdio"?JSON.stringify({mcpServers:{pm:{command:"npx",args:["--yes","--package",`@unbrained/pm-cli@${t}`,"pm-mcp"]}}}):`PM_MCP_HTTP_PORT=3000 npx --yes --package @unbrained/pm-cli@${t} pm-mcp-http`,...e==="http"?["HTTP client configuration:",JSON.stringify({mcpServers:{pm:{url:"http://127.0.0.1:3000/mcp"}}})]:[],"","Configuration: https://github.com/unbraind/pm-cli/blob/main/docs/MCP_REMOTE_TRANSPORT_SECURITY.md",""),r.join(`
|
|
2
|
+
`)}function Qx(e,t,r){if(e.length===0)return{kind:"serve"};let o=e.find(n=>!yg.has(n));if(o!==void 0){let n=t==="stdio"?"pm-mcp":"pm-mcp-http";return{kind:"exit",exitCode:64,stdout:"",stderr:`Unsupported argument ${JSON.stringify(o)}. Run ${n} --help.
|
|
3
3
|
`}}return{kind:"exit",exitCode:0,stdout:e.includes("--help")||e.includes("-h")?bg(t,r):`${r}
|
|
4
|
-
`,stderr:""}}import{createHash as ar,createHmac as dr,timingSafeEqual as Tg}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="15b81dd0-ef1a-58be-b6ee-5975b6778993")}catch{}})();var Cg=["elicitation/create","roots/list","sampling/createMessage"],ir=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},cr=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,ye=32,et=64*1024,be=16*1024,Qe={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function Eg(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function Te(e,t,r){let o;try{o=JSON.stringify(e)}catch{throw new u(`Invalid ${r}: value is not JSON serializable`,m.invalidParams,{field:r})}if(Buffer.byteLength(o,"utf8")>t)throw new u(`Invalid ${r}: payload exceeds the protocol bound`,m.invalidParams,{field:r,maximumBytes:t})}function tt(e,t){if(!h(e))throw new u("Invalid MCP inputRequests",m.invalidParams,{field:"inputRequests",expected:"object"});let r=Object.entries(e);if(r.length===0||r.length>ye)throw new u("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:ye,observed:r.length});let o={};for(let[n,s]of r){if(!cr.test(n)||!h(s))throw new u("Invalid MCP input request entry",m.invalidParams,{field:`inputRequests.${n}`});let i=s.method;if(typeof i!="string"||!Cg.includes(i))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:i??null});let a=Eg(i);if(!Object.prototype.hasOwnProperty.call(t.clientCapabilities,a))throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:{[a]:{}}});if(!h(s.params))throw new u("Invalid MCP input request parameters",m.invalidParams,{field:`inputRequests.${n}.params`,expected:"object"});o[n]={method:i,params:structuredClone(s.params)}}return Te(o,et,"inputRequests"),o}function lr(e){if(!h(e))throw new u("Invalid MCP inputResponses",m.invalidParams,{field:"inputResponses",expected:"object"});let t=Object.entries(e);if(t.length>ye)throw new u("Invalid MCP inputResponses count",m.invalidParams,{maximum:ye,observed:t.length});let r={};for(let[o,n]of t){if(!cr.test(o)||!h(n))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return Te(r,et,"inputResponses"),r}function tN(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>be)throw new u("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:be});let r=e.inputRequests===void 0?void 0:tt(e.inputRequests,e.requestContext);if(r===void 0&&!t)throw new u("InputRequiredResult requires inputRequests or requestState",m.invalidParams,{requiredAnyOf:["inputRequests","requestState"]});return{resultType:"input_required",...r?{inputRequests:r}:{},...t?{requestState:t}:{},_meta:{[w.serverInfo]:{...e.serverInfo}}}}function pr(e){let t=Buffer.from(e);if(t.byteLength<32)throw new u("MCP requestState signing key must contain at least 32 bytes",m.invalidParams,{minimumBytes:32});return t}function rN(e,t){if(!Number.isSafeInteger(e.expiresAt)||e.expiresAt<=0||e.method.trim().length===0||e.parameterDigest.trim().length===0||e.principal.trim().length===0)throw new u("Invalid MCP requestState payload",m.invalidParams);let r=Buffer.from(JSON.stringify({version:1,...e}),"utf8");if(r.byteLength>be/2)throw new u("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:be/2});let o=r.toString("base64url"),n=dr("sha256",pr(t)).update(o).digest("base64url");return`${o}.${n}`}function Sg(e){if(!h(e)||e.version!==1)throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});let{expiresAt:t,method:r,parameterDigest:o,principal:n,state:s}=e;if(typeof t!="number"||!Number.isSafeInteger(t))throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});if(typeof r!="string"||typeof o!="string"||typeof n!="string")throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});return{expiresAt:t,method:r,parameterDigest:o,principal:n,state:s}}function oN(e,t,r){let[o,n,s]=e.split(".");if(!o||!n||s!==void 0)throw new u("Invalid MCP requestState encoding",m.invalidParams,{field:"requestState"});let i=Buffer.from(n,"base64url"),a=dr("sha256",pr(t)).update(o).digest();if(i.byteLength!==a.byteLength||!Tg(i,a))throw new u("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let d;try{d=JSON.parse(Buffer.from(o,"base64url").toString("utf8"))}catch{d=null}let c=Sg(d),{expiresAt:l,method:p,parameterDigest:f,principal:_}=c;if(l<(r.nowMs??Date.now()))throw new u("Expired MCP requestState",m.invalidParams,{field:"requestState",expiredAt:l});if(p!==r.method||f!==r.parameterDigest||_!==r.principal)throw new u("MCP requestState binding mismatch",m.invalidParams,{field:"requestState"});return c}function nN(e){return Te(e,et,"request parameters"),ar("sha256").update(JSON.stringify(e)).digest("hex")}var sr=class{#e=new Set;#t;constructor(t=4096){if(!Number.isSafeInteger(t)||t<1)throw new u("Invalid MCP replay guard capacity",m.invalidParams,{maximumEntries:t});this.#t=t}consume(t){let r=ar("sha256").update(t).digest("hex");if(this.#e.has(r))throw new u("MCP requestState replay detected",m.invalidParams,{field:"requestState"});if(this.#e.size>=this.#t){let o=this.#e.values().next().value;this.#e.delete(o)}this.#e.add(r)}};function wg(e){if(!Number.isSafeInteger(e.ttlMs)||e.ttlMs<0||e.cacheScope!=="public"&&e.cacheScope!=="private")throw new u("Invalid MCP cache policy",m.invalidParams,{ttlMs:e.ttlMs,cacheScope:e.cacheScope});return{ttlMs:e.ttlMs,cacheScope:e.cacheScope}}function iN(e,t){return{...e,...wg(t)}}function Ag(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function vg(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(Ag)){if(!h(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function Og(e){let t=e.maxBytes??Qe.maxBytes,r=e.maxDepth??Qe.maxDepth,o=e.maxNodes??Qe.maxNodes;if(!Number.isSafeInteger(t)||t<2)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(r)||r<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(o)||o<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);return{maximumBytes:t,maximumDepth:r,maximumNodes:o}}function Rg(e,t){let r=Array.isArray(e.value)?e.value:h(e.value)?Object.values(e.value):[];for(let o of r)t.push({value:o,depth:e.depth+1})}function Ig(e,t){if(!h(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&vg(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function sN(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=Og(t);if(typeof e!="boolean"&&!h(e))throw new u("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});Te(e,r,"JSON Schema");let s=[{value:e,depth:0}],i=0;for(;s.length>0;){let a=s.pop();if(i+=1,i>n||a.depth>o)throw new u("MCP JSON Schema exceeds validation work bounds",m.invalidParams,{maximumDepth:o,maximumNodes:n});Ig(e,a.value),Rg(a,s)}return structuredClone(e)}import{randomUUID as Pg}from"node:crypto";import{readFile as Mg}from"node:fs/promises";import ur 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]="f3e94896-b2a0-561c-902b-71c28ddde2a1")}catch{}})();var fN="io.modelcontextprotocol/tasks",kg=["working","input_required","completed","failed","cancelled"],xg=/^mcp-task-[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu,Ng=3600*1e3,Lg=1e3,Ee=1024,Dg=30,$g=2e3;function rt(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function Ce(e){let t=e.trim();if(!xg.test(t))throw rt("Unknown MCP task");return t}function mr(e,t){if(typeof e!="string"||!Number.isFinite(Date.parse(e)))throw new u("Corrupt MCP task record",m.invalidParams,{field:t});return e}function fr(e){if(!h(e)||typeof e.code!="number"||!Number.isFinite(e.code)||typeof e.message!="string")throw new u("Corrupt MCP task error",m.invalidParams);return{code:e.code,message:e.message.slice(0,Ee),...h(e.data)?{data:structuredClone(e.data)}:{}}}function Fg(e){if(!kg.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function Gg(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function Ug(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function jg(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function Bg(e){if(e!==void 0){if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new u("Corrupt MCP task record",m.invalidParams);return e}}function qg(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function zg(e){if(!h(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?Ce(e.taskId):"",r=Fg(e.status),o=Gg(e.principal),n=Ug(e.workerPid),s=jg(e.ttlMs),i=Bg(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:mr(e.createdAt,"createdAt"),lastUpdatedAt:mr(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:s,consumedInputKeys:qg(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,Ee)}:{},...typeof i=="number"?{pollIntervalMs:i}:{}};if(h(e.inputRequests)&&(a.inputRequests=structuredClone(e.inputRequests)),h(e.inputResponses)&&(a.inputResponses=structuredClone(e.inputResponses)),h(e.result)&&(a.result=structuredClone(e.result)),e.error!==void 0&&(a.error=fr(e.error)),a.status==="input_required"&&!a.inputRequests||a.status==="completed"&&!a.result||a.status==="failed"&&!a.error)throw new u("Corrupt MCP task status payload",m.invalidParams,{status:a.status});return a}function V(e){let t={taskId:e.taskId,status:e.status,createdAt:e.createdAt,lastUpdatedAt:e.lastUpdatedAt,ttlMs:e.ttlMs,...e.statusMessage?{statusMessage:e.statusMessage}:{},...e.pollIntervalMs===void 0?{}:{pollIntervalMs:e.pollIntervalMs}};return e.status==="input_required"?{...t,status:"input_required",inputRequests:structuredClone(e.inputRequests)}:e.status==="completed"?{...t,status:"completed",result:structuredClone(e.result)}:e.status==="failed"?{...t,status:"failed",error:structuredClone(e.error)}:e.status==="cancelled"?{...t,status:"cancelled"}:{...t,status:"working"}}function oe(e){return e==="completed"||e==="failed"||e==="cancelled"}function Hg(e){try{return process.kill(e,0),!0}catch(t){return!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ESRCH")}}var ot=class{#e;#t;#r;#o;#i;constructor(t){this.#e=ur.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Pg()}`),this.#i=t.workerPid??process.pid}#s(t){return ur.join(this.#e,"runtime","mcp-tasks","records",`${Ce(t)}.json`)}async#d(t){try{return zg(JSON.parse(await Mg(this.#s(t),"utf8")))}catch(r){throw fe(r)||r instanceof SyntaxError?rt("Unknown MCP task"):r}}async#a(t){await Fe(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
|
|
5
|
-
`)}async#n(t,r,o){let n=Ce(t),s=await je(this.#e,n,Dg,this.#t,!1,!1,$g);try{let i=await this.#d(n);if(i.principal!==r)throw rt("Unknown MCP task");let a=o(i);return await this.#a(a),a}finally{await s()}}async create(t){let r=Ce(this.#o()),o=t.principal.trim(),n=t.ttlMs===void 0?Ng:t.ttlMs,s=t.pollIntervalMs??Lg;if(o.length===0||n!==null&&(!Number.isSafeInteger(n)||n<0)||!Number.isSafeInteger(s)||s<0)throw new u("Invalid MCP task creation options",m.invalidParams);let i=this.#r().toISOString(),a={version:1,taskId:r,status:"working",createdAt:i,lastUpdatedAt:i,ttlMs:n,pollIntervalMs:s,principal:o,workerPid:this.#i,consumedInputKeys:[],...t.statusMessage?.trim()?{statusMessage:t.statusMessage.trim().slice(0,Ee)}:{}};return await this.#a(a),{...V(a),resultType:"task"}}async get(t,r){return V(await this.#n(t,r,o=>{if(oe(o.status))return o;let n=this.#r().getTime(),s=o.ttlMs!==null&&Date.parse(o.createdAt)+o.ttlMs<=n,i=o.workerPid!==this.#i&&!Hg(o.workerPid);return!s&&!i?o:{...o,status:"failed",statusMessage:s?"Task retention expired before completion.":"Task worker ended before recording a terminal result.",lastUpdatedAt:this.#r().toISOString(),error:{code:-32603,message:s?"MCP task expired":"MCP task worker unavailable after restart",data:{recoverable:!1,createNewTask:!0}},inputRequests:void 0}}))}async requireInput(t){let r=tt(t.inputRequests,t.requestContext);return V(await this.#n(t.taskId,t.principal,o=>{if(oe(o.status))return o;let n=Object.keys(r).filter(s=>o.consumedInputKeys.includes(s));if(n.length>0)throw new u("MCP task input request keys must be unique for the task lifetime",m.invalidParams,{reused:n});return{...o,status:"input_required",statusMessage:t.statusMessage?.trim().slice(0,Ee),lastUpdatedAt:this.#r().toISOString(),inputRequests:r}}))}async update(t,r,o){let n=lr(o),s=[],i=[];return await this.#n(t,r,a=>{if(a.status!=="input_required"||!a.inputRequests)return a;let d={...a.inputRequests},c=a.inputResponses?{...a.inputResponses}:{};for(let[l,p]of Object.entries(n))Object.prototype.hasOwnProperty.call(d,l)&&(c[l]=p,delete d[l],s.push(l));return i=Object.keys(d).sort(),s.length===0?a:{...a,status:i.length===0?"working":"input_required",lastUpdatedAt:this.#r().toISOString(),inputRequests:i.length===0?void 0:d,inputResponses:c,consumedInputKeys:[...new Set([...a.consumedInputKeys,...s])].sort()}}),{acceptedKeys:s.sort(),remainingKeys:i}}async takeInputResponses(t,r){let o={};return await this.#n(t,r,n=>(o=structuredClone(n.inputResponses??{}),Object.keys(o).length===0?n:{...n,inputResponses:void 0})),o}async complete(t,r,o){return V(await this.#n(t,r,n=>oe(n.status)?n:{...n,status:"completed",statusMessage:"Task completed.",lastUpdatedAt:this.#r().toISOString(),result:structuredClone(o),inputRequests:void 0,error:void 0}))}async fail(t,r,o){let n=fr(o);return V(await this.#n(t,r,s=>oe(s.status)?s:{...s,status:"failed",statusMessage:n.message,lastUpdatedAt:this.#r().toISOString(),error:n,inputRequests:void 0,result:void 0}))}async cancel(t,r){return V(await this.#n(t,r,o=>oe(o.status)?o:{...o,status:"cancelled",statusMessage:"Task cancelled by the client.",lastUpdatedAt:this.#r().toISOString(),inputRequests:void 0,result:void 0,error:void 0}))}};function _N(e){return new ot(e)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="15cbe26a-5716-5e8c-8700-eb36a1a056d6")}catch{}})();var Se="io.modelcontextprotocol/subscriptionId",_r=256,hr=2048,Vg=5e3;function Kg(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),Vg);n.unref(),Promise.resolve().then(()=>e(t)).then(()=>{clearTimeout(n),r()},s=>{clearTimeout(n),o(s instanceof Error?s:new Error(String(s)))})})}function nt(e,t){if(e!==void 0){if(typeof e!="boolean")throw new u("Invalid MCP subscription filter",m.invalidParams,{field:`notifications.${t}`,expected:"boolean"});return e||void 0}}function Wg(e){if(!h(e))throw new u("Invalid MCP subscription filter",m.invalidParams,{field:"notifications",expected:"object"});let t=nt(e.toolsListChanged,"toolsListChanged"),r=nt(e.promptsListChanged,"promptsListChanged"),o=nt(e.resourcesListChanged,"resourcesListChanged"),n;if(e.resourceSubscriptions!==void 0){if(!Array.isArray(e.resourceSubscriptions)||e.resourceSubscriptions.length>_r)throw new u("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:_r});let s=new Set;for(let i of e.resourceSubscriptions){if(typeof i!="string"||i.trim().length===0||Buffer.byteLength(i,"utf8")>hr)throw new u("Invalid MCP resource subscription URI",m.invalidParams,{field:"notifications.resourceSubscriptions",maximumBytes:hr});s.add(i)}s.size>0&&(n=[...s].sort())}return{...t?{toolsListChanged:t}:{},...r?{promptsListChanged:r}:{},...o?{resourcesListChanged:o}:{},...n?{resourceSubscriptions:n}:{}}}function Yg(e,t){return{...e.toolsListChanged&&t.tools?.listChanged?{toolsListChanged:!0}:{},...e.promptsListChanged&&t.prompts?.listChanged?{promptsListChanged:!0}:{},...e.resourcesListChanged&&t.resources?.listChanged?{resourcesListChanged:!0}:{},...e.resourceSubscriptions&&t.resources?.subscribe?{resourceSubscriptions:[...e.resourceSubscriptions]}:{}}}var gr=class{#e;#t=new Map;#r;constructor(t){this.#e=structuredClone(t.capabilities),this.#r={...t.serverInfo}}get size(){return this.#t.size}async open(t){if(this.#t.has(t.id))throw new u("MCP subscription id is already active",m.invalidParams,{subscriptionId:t.id});let r=Yg(Wg(t.notifications),this.#e),o={filter:r,sink:t.sink,writeQueue:Promise.resolve()};this.#t.set(t.id,o);try{await this.#o(t.id,o,{jsonrpc:"2.0",method:"notifications/subscriptions/acknowledged",params:{_meta:{[Se]:t.id},notifications:structuredClone(r)}},!0)}catch(n){throw this.#t.delete(t.id),n}return structuredClone(r)}async emitListChanged(t){let r=`${t}ListChanged`,o=`notifications/${t}/list_changed`,n=[];for(let[s,i]of this.#t)i.filter[r]===!0&&n.push(this.#o(s,i,{jsonrpc:"2.0",method:o,params:{_meta:{[Se]:s}}}));return(await Promise.all(n)).filter(Boolean).length}async emitResourceUpdated(t){let r=[];for(let[o,n]of this.#t)n.filter.resourceSubscriptions?.includes(t)&&r.push(this.#o(o,n,{jsonrpc:"2.0",method:"notifications/resources/updated",params:{_meta:{[Se]:o},uri:t}}));return(await Promise.all(r)).filter(Boolean).length}async#o(t,r,o,n=!1){let s=r.writeQueue.then(async()=>{if(this.#t.get(t)!==r)return!1;try{return await Kg(r.sink,o),!0}catch(i){if(this.#t.get(t)===r&&this.#t.delete(t),n)throw i;return!1}});return r.writeQueue=s.then(()=>{},()=>{}),s}close(t){if(this.#t.delete(t))return{...Ze({resultType:"complete",_meta:{[Se]:t}},this.#r)}}closeAll(){let t=[];for(let r of this.#t.keys()){let o=this.close(r);t.push({id:r,result:o})}return t}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3681273a-e101-57a0-9446-982c450e7183")}catch{}})();var yr=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,Xg=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,br=/^[\t\x20-\x7E]*$/u,Tr=new Set(["prompts/get","resources/read","tools/call"]);function Jg(e){let t=new Map;for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let n=typeof o=="string"?o:o.join(", ");t.set(r.toLowerCase(),n)}return t}function A(e,t){throw new u(e,m.headerMismatch,{header:t})}function Cr(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&br.test(t)&&!yr.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function Er(e,t){let r=yr.exec(e);if(r){let o=r[1],n=Buffer.from(o,"base64");return n.toString("base64")!==o||n.length===0?A("Malformed MCP Base64 header value",t):n.toString("utf8")}return e.length===0||e.trim()!==e||!br.test(e)?A("Malformed MCP header value",t):e}function we(e){return Array.isArray(e)?e.some(we):h(e)?Object.prototype.hasOwnProperty.call(e,"x-mcp-header")||Object.values(e).some(we):!1}function Zg(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!Xg.test(o)||!["boolean","integer","string"].includes(String(n))||r.has(o.toLowerCase()))throw new u("Invalid MCP x-mcp-header annotation",m.invalidParams,{field:t.join("."),annotation:o});return r.add(o.toLowerCase()),{name:o,path:t,type:n}}function Sr(e){if(!h(e))throw new u("Invalid MCP tool schema",m.invalidParams,{field:"inputSchema",expected:"object"});let t=[],r=new Set,o=(n,s)=>{let i=n.properties;if(i!==void 0){if(!h(i))throw new u("Invalid MCP tool schema properties",m.invalidParams,{field:"inputSchema.properties"});for(let[a,d]of Object.entries(i)){if(!h(d))continue;let c=[...s,a],l=Zg(d,c,r);l&&t.push(l);for(let[p,f]of Object.entries(d))if(p!=="properties"&&p!=="x-mcp-header"&&we(f))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:c.join("."),keyword:p});o(d,c)}}};for(let[n,s]of Object.entries(e))if(n!=="properties"&&we(s))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:"inputSchema",keyword:n});return o(e,[]),t}function wr(e,t){let r=e;for(let o of t){if(!h(r))return;r=r[o]}return r}function Ar(e,t){let r=e==="resources/read"?t.uri:t.name;return typeof r=="string"?r:void 0}function Qg(e,t){let r=h(e.arguments)?e.arguments:{},o={};for(let n of Sr(t)){let s=wr(r,n.path);if(s!=null){if(!(n.type==="integer"&&typeof s=="number"&&Number.isSafeInteger(s)||n.type==="boolean"&&typeof s=="boolean"||n.type==="string"&&typeof s=="string"))throw new u("Invalid MCP custom header argument",m.invalidParams,{field:n.path.join("."),expected:n.type});o[`Mcp-Param-${n.name}`]=Cr(s)}}return o}function TN(e){let t=h(e.request.params)?e.request.params:void 0,r=Je(t),o=e.request.method;if(typeof o!="string"||o.length===0)return A("Missing MCP request method","Mcp-Method");let n={Accept:"application/json, text/event-stream","Content-Type":"application/json","MCP-Protocol-Version":r.protocolVersion,"Mcp-Method":o},s=Ar(o,t);if(Tr.has(o)){if(s===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=Cr(s)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,Qg(t,e.toolSchema)),n}function ey(e,t){let r=t.method;(typeof r!="string"||r.length===0)&&A("Missing MCP request method","Mcp-Method");let o=h(t.params)?t.params:void 0,n=Je(o).protocolVersion;if(e.get("mcp-protocol-version")!==n&&A("MCP protocol header does not match request metadata","MCP-Protocol-Version"),e.get("mcp-method")!==r&&A("MCP method header does not match request body","Mcp-Method"),Tr.has(r)){let s=e.get("mcp-name"),i=Ar(r,o);(s===void 0||i===void 0||Er(s,"Mcp-Name")!==i)&&A("MCP name header does not match request body","Mcp-Name")}e.has("last-event-id")&&A("MCP SSE resumability is not supported","Last-Event-ID")}function ty(e,t,r){return e.type==="integer"?typeof t=="number"&&Number.isSafeInteger(t)&&Number(r)===t:e.type==="boolean"?typeof t=="boolean"&&r===String(t):typeof t=="string"&&r===t}function ry(e){let t=h(e.params.arguments)?e.params.arguments:{};for(let r of Sr(e.toolSchema)){let o=wr(t,r.path),n=`Mcp-Param-${r.name}`,s=e.headers.get(n.toLowerCase());if(o==null){s!==void 0&&A("Unexpected MCP parameter header",n);continue}s===void 0&&A("Missing MCP parameter header",n),ty(r,o,Er(s,n))||A("MCP parameter header does not match request body",n)}}function CN(e){let t=Jg(e.headers),r=typeof e.request.method=="string"?e.request.method:"";ey(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&ry({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var EN=H;import{AsyncLocalStorage as oy}from"node:async_hooks";import{createHash as vr,timingSafeEqual as ny}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a7c30d99-a0e4-552e-be61-0c54a455e211")}catch{}})();var y=class extends Error{httpStatus;challenge;constructor(t,r,o){super(t),this.name="PmMcpAuthorizationError",this.httpStatus=r,this.challenge=o}},iy=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,sy=/^[a-z][a-z0-9_*/-]{0,255}$/u,ay=/^(?:[a-z0-9][a-z0-9_*/-]{0,240})@[a-z][a-z0-9_*/-]{0,13}$/u,dy=/^[\x20-\x2B\x2D-\x3C\x3E-\x7E]{0,255}[\x21-\x2B\x2D-\x3C\x3E-\x7E]$/u,Rr=/^[\x21\x23-\x5B\x5D-\x7E]+$/u,Ir=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,cy=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,ly=/%(?![0-9A-Fa-f]{2})/u,py=512,uy=32,my=180,fy=8192,_y=8192,Pr=new oy;function S(e,t,r=!1){if(new RegExp("\\p{Cc}","u").test(e))throw new y(`Invalid ${t}`,401);let o;try{o=new URL(e)}catch{throw new y(`Invalid ${t}`,401)}let n=o.hostname==="127.0.0.1"||o.hostname==="localhost";if(o.hash.length>0||o.protocol!=="https:"&&!(r&&n&&o.protocol==="http:"))throw new y(`Invalid ${t}`,401);return o}function hy(e,t){let r=t.toLowerCase();for(let[o,n]of Object.entries(e))if(!(o.toLowerCase()!==r||n===void 0))return typeof n=="string"?n:n.join(", ")}function ON(e){let t=S(e.resource,"protected resource URI",!0).href.replace(/\/$/u,"");if(e.authorizationServers.length===0)throw new y("Protected resource metadata requires an authorization server",401);let r=e.authorizationServers.map(n=>S(n,"authorization server issuer").href.replace(/\/$/u,"")),o=[...new Set(e.scopes??[])];if(o.some(n=>!Rr.test(n)))throw new y("Invalid authorization scope",401);return{resource:t,authorization_servers:r,...o.length>0?{scopes_supported:o.sort()}:{}}}function RN(e){let t=S(e,"authorization server issuer"),r=t.pathname.replace(/^\/+|\/+$/gu,""),o=t.origin;return r?[`${o}/.well-known/oauth-authorization-server/${r}`,`${o}/.well-known/openid-configuration/${r}`,`${o}/${r}/.well-known/openid-configuration`]:[`${o}/.well-known/oauth-authorization-server`,`${o}/.well-known/openid-configuration`]}function IN(e,t){if(!h(e)||typeof e.issuer!="string")throw new y("Invalid authorization server metadata",401);let r=S(t,"expected issuer").href.replace(/\/$/u,"");if(S(e.issuer,"metadata issuer").href.replace(/\/$/u,"")!==r)throw new y("Authorization server issuer mismatch",401);if(!Array.isArray(e.code_challenge_methods_supported)||!e.code_challenge_methods_supported.includes("S256"))throw new y("Authorization server does not support required S256 PKCE",401);let o=d=>{let c=e[d];if(typeof c!="string")throw new y(`Authorization server metadata requires ${d}`,401);return S(c,d).href},n=d=>{let c=e[d];return typeof c=="string"?S(c,d).href:void 0},s=o("authorization_endpoint"),i=o("token_endpoint"),a=n("registration_endpoint");return{issuer:r,authorization_endpoint:s,token_endpoint:i,code_challenge_methods_supported:[...new Set(e.code_challenge_methods_supported.filter(d=>typeof d=="string"))],...e.client_id_metadata_document_supported===!0?{client_id_metadata_document_supported:!0}:{},...a?{registration_endpoint:a}:{}}}function PN(e){return e.hasPreRegisteredClient?"pre_registered":e.metadata.client_id_metadata_document_supported?"client_id_metadata_document":e.metadata.registration_endpoint?"dynamic":"user_supplied"}function MN(e){if(e.responseIssuer===void 0){if(e.issuerParameterSupported)throw new y("Authorization response omitted the advertised issuer",401);return}if(e.responseIssuer!==e.expectedIssuer)throw new y("Authorization response issuer mismatch",401)}function kN(e,t){let r=S(t,"client metadata document URL");if(r.pathname==="/"||!h(e)||e.client_id!==r.href||typeof e.client_name!="string"||e.client_name.trim().length===0||!Array.isArray(e.redirect_uris)||e.redirect_uris.length===0)throw new y("Invalid Client ID Metadata Document",401);for(let o of e.redirect_uris){if(typeof o!="string")throw new y("Invalid client redirect URI",401);S(o,"client redirect URI",!0)}return structuredClone(e)}function xN(e){if(e.redirectUris.length===0||e.clientName.trim().length===0)throw new y("Invalid dynamic client registration metadata",401);let t=e.redirectUris.map(r=>S(r,"redirect URI",!0).href);return{application_type:e.applicationType,client_name:e.clientName.trim().slice(0,128),redirect_uris:t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"}}var Or=class{#e=new Map;set(t,r){let o=S(t,"credential issuer").href;this.#e.set(o,structuredClone(r))}get(t){let r=S(t,"credential issuer").href,o=this.#e.get(r);return o?structuredClone(o):void 0}delete(t){let r=S(t,"credential issuer").href;return this.#e.delete(r)}};function gy(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?iy.exec(t):null;if(!o)throw new y("Invalid MCP traceparent",403);let n=o[1],s=o[2];if(/^0+$/u.test(n)||/^0+$/u.test(s))throw new y("Invalid MCP traceparent",403)}if(r!==void 0&&(typeof r!="string"||!by(r)))throw new y("Invalid MCP tracestate",403);return{...typeof t=="string"?{traceparent:t}:{},...typeof r=="string"?{tracestate:r}:{}}}function $(e){return e.replace(/^[ \t]*|[ \t]*$/gu,"")}function yy(e){return sy.test(e)||ay.test(e)}function by(e){if(Buffer.byteLength(e,"utf8")>py)return!1;let t=e.split(",");if(t.length>uy)return!1;let r=new Set;for(let o of t){let n=$(o);if(n.length===0)continue;let s=n.indexOf("="),i=s>0?n.slice(0,s):"",a=s>0?n.slice(s+1):"";if(!yy(i)||!dy.test(a)||r.has(i))return!1;r.add(i)}return!0}function Mr(e){return cy.test(e)&&!ly.test(e)}function Ty(e){let t=$(e),r=t.indexOf("="),o=$(r>=0?t.slice(0,r):t),n=r>=0?$(t.slice(r+1)):void 0;return Ir.test(o)&&(n===void 0||Mr(n))}function Cy(e){let t=$(e),r=t.split(";"),o=r[0],n=r.slice(1),s=o.indexOf("="),i=$(s>0?o.slice(0,s):""),a=s>0?$(o.slice(s+1)):"";if(!(!Ir.test(i)||!Mr(a)||!n.every(Ty)))return{key:i,serialized:t}}function Ey(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>fy)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>my)throw new y("Invalid MCP baggage",403);let n=[];for(let s of o){let i=Cy(s);if(!i)throw new y("Invalid MCP baggage",403);r.has(i.key)&&n.push(i.serialized)}return n.length>0?n.join(","):void 0}function NN(e,t={}){let r=h(e)&&h(e._meta)?e._meta:{},o=Ey(r.baggage,t.baggageAllowlist??[]);return{...gy(r),...o?{baggage:o}:{}}}function LN(e,t){return Pr.run(structuredClone(e),t)}function DN(){let e=Pr.getStore();return e?{...e}:void 0}async function $N(e){let t=S(e.policy.resourceMetadataUrl,"protected resource metadata URL",!0).href,r=[...new Set(e.policy.requiredScopes??[])];if(r.some(c=>!Rr.test(c)))throw new y("Invalid authorization scope",401);let o=`Bearer resource_metadata="${t}"`;if(new URL(e.requestUrl,e.policy.resource).searchParams.has("access_token"))throw new y("Access tokens must not appear in URI query parameters",401,o);let n=hy(e.headers,"authorization")?.match(/^Bearer ([^\s]+)$/iu);if(!n)throw new y("Missing or malformed bearer token",401,o);let s=n[1];if(Buffer.byteLength(s,"utf8")>_y)throw new y("Missing or malformed bearer token",401,o);let i;try{i=await e.policy.verifyAccessToken(s)}catch{throw new y("Invalid bearer token",401,o)}let a=Array.isArray(i.audience)?i.audience:[i.audience];if(i.issuer!==e.policy.issuer||!a.includes(e.policy.resource))throw new y("Bearer token issuer or audience mismatch",401,o);let d=r.filter(c=>!i.scopes.includes(c));if(d.length>0)throw new y("Bearer token has insufficient scope",403,`${o}, scope="${d.join(" ")}"`);return{...i,audience:[...a],scopes:[...i.scopes]}}function FN(e){let t=vr("sha256").update(e.token).digest();return r=>{let o=vr("sha256").update(r).digest();if(!ny(t,o))throw new y("Invalid bearer token",401);return structuredClone(e.claims)}}(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]="46f5fe59-6b84-5c68-ad07-bb1329f4ea29")}catch{}})();var it="io.modelcontextprotocol/ui",Ae="2026-01-26",Nr="text/html;profile=mcp-app",kr=Object.freeze({specVersion:Ae,mimeTypes:[Nr]});function jN(e){let t=e.clientCapabilities.extensions;if(!h(t))return!1;let r=t[it];if(r===void 0)return!1;if(!h(r))throw new u("Invalid MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:kr}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(Nr)||n!==void 0&&n!==Ae)throw new u("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:kr}}});return!0}var Sy={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},Lr=Object.freeze([{id:"context",name:"Context explorer",description:"Inspect bounded project context, provenance, omissions, and token accounting.",toolName:"pm_context",uri:"ui://pm/context.html"},{id:"graph",name:"Relationship graph",description:"Explore typed relationships, explaining paths, and graph-governance evidence.",toolName:"pm_graph",uri:"ui://pm/graph.html"},{id:"plan",name:"Plan and milestone view",description:"Review durable plan steps, dependencies, decisions, discoveries, and validation state.",toolName:"pm_plan",uri:"ui://pm/plan.html"},{id:"assurance",name:"Assurance dashboard",description:"Inspect validation verdicts, evidence, omissions, and actionable recovery paths.",toolName:"pm_validate",uri:"ui://pm/assurance.html"},{id:"operations",name:"Long-operation view",description:"Inspect durable test and operation results without creating a second task store.",toolName:"pm_test",uri:"ui://pm/operations.html"}].map(e=>({...e,toolMeta:{resourceUri:e.uri,visibility:["model","app"]},resourceMeta:Sy})));function BN(e){return Lr.find(t=>t.uri===e)}function qN(e){let t=new Map(Lr.map(r=>[r.toolName,r]));return e.map(r=>{let o=t.get(r.name);return o?{...r,_meta:{...r._meta,ui:o.toolMeta}}:{...r}})}function xr(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function zN(e){let t=xr(e.name),r=xr(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:Ae}),n=JSON.stringify(Ae);return`<!doctype html>
|
|
4
|
+
`,stderr:""}}import{createHash as ar,createHmac as dr,timingSafeEqual as Tg}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="15b81dd0-ef1a-58be-b6ee-5975b6778993")}catch{}})();var Cg=["elicitation/create","roots/list","sampling/createMessage"],ir=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},cr=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,ye=32,et=64*1024,be=16*1024,Qe={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function Eg(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function Te(e,t,r){let o;try{o=JSON.stringify(e)}catch{throw new u(`Invalid ${r}: value is not JSON serializable`,m.invalidParams,{field:r})}if(Buffer.byteLength(o,"utf8")>t)throw new u(`Invalid ${r}: payload exceeds the protocol bound`,m.invalidParams,{field:r,maximumBytes:t})}function tt(e,t){if(!h(e))throw new u("Invalid MCP inputRequests",m.invalidParams,{field:"inputRequests",expected:"object"});let r=Object.entries(e);if(r.length===0||r.length>ye)throw new u("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:ye,observed:r.length});let o={};for(let[n,s]of r){if(!cr.test(n)||!h(s))throw new u("Invalid MCP input request entry",m.invalidParams,{field:`inputRequests.${n}`});let i=s.method;if(typeof i!="string"||!Cg.includes(i))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:i??null});let a=Eg(i);if(!Object.prototype.hasOwnProperty.call(t.clientCapabilities,a))throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:{[a]:{}}});if(!h(s.params))throw new u("Invalid MCP input request parameters",m.invalidParams,{field:`inputRequests.${n}.params`,expected:"object"});o[n]={method:i,params:structuredClone(s.params)}}return Te(o,et,"inputRequests"),o}function lr(e){if(!h(e))throw new u("Invalid MCP inputResponses",m.invalidParams,{field:"inputResponses",expected:"object"});let t=Object.entries(e);if(t.length>ye)throw new u("Invalid MCP inputResponses count",m.invalidParams,{maximum:ye,observed:t.length});let r={};for(let[o,n]of t){if(!cr.test(o)||!h(n))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return Te(r,et,"inputResponses"),r}function oN(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>be)throw new u("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:be});let r=e.inputRequests===void 0?void 0:tt(e.inputRequests,e.requestContext);if(r===void 0&&!t)throw new u("InputRequiredResult requires inputRequests or requestState",m.invalidParams,{requiredAnyOf:["inputRequests","requestState"]});return{resultType:"input_required",...r?{inputRequests:r}:{},...t?{requestState:t}:{},_meta:{[w.serverInfo]:{...e.serverInfo}}}}function pr(e){let t=Buffer.from(e);if(t.byteLength<32)throw new u("MCP requestState signing key must contain at least 32 bytes",m.invalidParams,{minimumBytes:32});return t}function nN(e,t){if(!Number.isSafeInteger(e.expiresAt)||e.expiresAt<=0||e.method.trim().length===0||e.parameterDigest.trim().length===0||e.principal.trim().length===0)throw new u("Invalid MCP requestState payload",m.invalidParams);let r=Buffer.from(JSON.stringify({version:1,...e}),"utf8");if(r.byteLength>be/2)throw new u("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:be/2});let o=r.toString("base64url"),n=dr("sha256",pr(t)).update(o).digest("base64url");return`${o}.${n}`}function Sg(e){if(!h(e)||e.version!==1)throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});let{expiresAt:t,method:r,parameterDigest:o,principal:n,state:s}=e;if(typeof t!="number"||!Number.isSafeInteger(t))throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});if(typeof r!="string"||typeof o!="string"||typeof n!="string")throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});return{expiresAt:t,method:r,parameterDigest:o,principal:n,state:s}}function iN(e,t,r){let[o,n,s]=e.split(".");if(!o||!n||s!==void 0)throw new u("Invalid MCP requestState encoding",m.invalidParams,{field:"requestState"});let i=Buffer.from(n,"base64url"),a=dr("sha256",pr(t)).update(o).digest();if(i.byteLength!==a.byteLength||!Tg(i,a))throw new u("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let d;try{d=JSON.parse(Buffer.from(o,"base64url").toString("utf8"))}catch{d=null}let c=Sg(d),{expiresAt:l,method:p,parameterDigest:f,principal:_}=c;if(l<(r.nowMs??Date.now()))throw new u("Expired MCP requestState",m.invalidParams,{field:"requestState",expiredAt:l});if(p!==r.method||f!==r.parameterDigest||_!==r.principal)throw new u("MCP requestState binding mismatch",m.invalidParams,{field:"requestState"});return c}function sN(e){return Te(e,et,"request parameters"),ar("sha256").update(JSON.stringify(e)).digest("hex")}var sr=class{#e=new Set;#t;constructor(t=4096){if(!Number.isSafeInteger(t)||t<1)throw new u("Invalid MCP replay guard capacity",m.invalidParams,{maximumEntries:t});this.#t=t}consume(t){let r=ar("sha256").update(t).digest("hex");if(this.#e.has(r))throw new u("MCP requestState replay detected",m.invalidParams,{field:"requestState"});if(this.#e.size>=this.#t){let o=this.#e.values().next().value;this.#e.delete(o)}this.#e.add(r)}};function wg(e){if(!Number.isSafeInteger(e.ttlMs)||e.ttlMs<0||e.cacheScope!=="public"&&e.cacheScope!=="private")throw new u("Invalid MCP cache policy",m.invalidParams,{ttlMs:e.ttlMs,cacheScope:e.cacheScope});return{ttlMs:e.ttlMs,cacheScope:e.cacheScope}}function aN(e,t){return{...e,...wg(t)}}function Ag(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function vg(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(Ag)){if(!h(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function Og(e){let t=e.maxBytes??Qe.maxBytes,r=e.maxDepth??Qe.maxDepth,o=e.maxNodes??Qe.maxNodes;if(!Number.isSafeInteger(t)||t<2)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(r)||r<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(o)||o<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);return{maximumBytes:t,maximumDepth:r,maximumNodes:o}}function Rg(e,t){let r=Array.isArray(e.value)?e.value:h(e.value)?Object.values(e.value):[];for(let o of r)t.push({value:o,depth:e.depth+1})}function Ig(e,t){if(!h(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&vg(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function dN(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=Og(t);if(typeof e!="boolean"&&!h(e))throw new u("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});Te(e,r,"JSON Schema");let s=[{value:e,depth:0}],i=0;for(;s.length>0;){let a=s.pop();if(i+=1,i>n||a.depth>o)throw new u("MCP JSON Schema exceeds validation work bounds",m.invalidParams,{maximumDepth:o,maximumNodes:n});Ig(e,a.value),Rg(a,s)}return structuredClone(e)}import{randomUUID as Pg}from"node:crypto";import{readFile as Mg}from"node:fs/promises";import ur 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]="f3e94896-b2a0-561c-902b-71c28ddde2a1")}catch{}})();var hN="io.modelcontextprotocol/tasks",kg=["working","input_required","completed","failed","cancelled"],xg=/^mcp-task-[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu,Ng=3600*1e3,Lg=1e3,Ee=1024,Dg=30,$g=2e3;function rt(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function Ce(e){let t=e.trim();if(!xg.test(t))throw rt("Unknown MCP task");return t}function mr(e,t){if(typeof e!="string"||!Number.isFinite(Date.parse(e)))throw new u("Corrupt MCP task record",m.invalidParams,{field:t});return e}function fr(e){if(!h(e)||typeof e.code!="number"||!Number.isFinite(e.code)||typeof e.message!="string")throw new u("Corrupt MCP task error",m.invalidParams);return{code:e.code,message:e.message.slice(0,Ee),...h(e.data)?{data:structuredClone(e.data)}:{}}}function Fg(e){if(!kg.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function Gg(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function Ug(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function jg(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function Bg(e){if(e!==void 0){if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new u("Corrupt MCP task record",m.invalidParams);return e}}function qg(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function zg(e){if(!h(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?Ce(e.taskId):"",r=Fg(e.status),o=Gg(e.principal),n=Ug(e.workerPid),s=jg(e.ttlMs),i=Bg(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:mr(e.createdAt,"createdAt"),lastUpdatedAt:mr(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:s,consumedInputKeys:qg(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,Ee)}:{},...typeof i=="number"?{pollIntervalMs:i}:{}};if(h(e.inputRequests)&&(a.inputRequests=structuredClone(e.inputRequests)),h(e.inputResponses)&&(a.inputResponses=structuredClone(e.inputResponses)),h(e.result)&&(a.result=structuredClone(e.result)),e.error!==void 0&&(a.error=fr(e.error)),a.status==="input_required"&&!a.inputRequests||a.status==="completed"&&!a.result||a.status==="failed"&&!a.error)throw new u("Corrupt MCP task status payload",m.invalidParams,{status:a.status});return a}function V(e){let t={taskId:e.taskId,status:e.status,createdAt:e.createdAt,lastUpdatedAt:e.lastUpdatedAt,ttlMs:e.ttlMs,...e.statusMessage?{statusMessage:e.statusMessage}:{},...e.pollIntervalMs===void 0?{}:{pollIntervalMs:e.pollIntervalMs}};return e.status==="input_required"?{...t,status:"input_required",inputRequests:structuredClone(e.inputRequests)}:e.status==="completed"?{...t,status:"completed",result:structuredClone(e.result)}:e.status==="failed"?{...t,status:"failed",error:structuredClone(e.error)}:e.status==="cancelled"?{...t,status:"cancelled"}:{...t,status:"working"}}function oe(e){return e==="completed"||e==="failed"||e==="cancelled"}function Hg(e){try{return process.kill(e,0),!0}catch(t){return!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ESRCH")}}var ot=class{#e;#t;#r;#o;#i;constructor(t){this.#e=ur.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Pg()}`),this.#i=t.workerPid??process.pid}#s(t){return ur.join(this.#e,"runtime","mcp-tasks","records",`${Ce(t)}.json`)}async#d(t){try{return zg(JSON.parse(await Mg(this.#s(t),"utf8")))}catch(r){throw fe(r)||r instanceof SyntaxError?rt("Unknown MCP task"):r}}async#a(t){await Fe(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
|
|
5
|
+
`)}async#n(t,r,o){let n=Ce(t),s=await je(this.#e,n,Dg,this.#t,!1,!1,$g);try{let i=await this.#d(n);if(i.principal!==r)throw rt("Unknown MCP task");let a=o(i);return await this.#a(a),a}finally{await s()}}async create(t){let r=Ce(this.#o()),o=t.principal.trim(),n=t.ttlMs===void 0?Ng:t.ttlMs,s=t.pollIntervalMs??Lg;if(o.length===0||n!==null&&(!Number.isSafeInteger(n)||n<0)||!Number.isSafeInteger(s)||s<0)throw new u("Invalid MCP task creation options",m.invalidParams);let i=this.#r().toISOString(),a={version:1,taskId:r,status:"working",createdAt:i,lastUpdatedAt:i,ttlMs:n,pollIntervalMs:s,principal:o,workerPid:this.#i,consumedInputKeys:[],...t.statusMessage?.trim()?{statusMessage:t.statusMessage.trim().slice(0,Ee)}:{}};return await this.#a(a),{...V(a),resultType:"task"}}async get(t,r){return V(await this.#n(t,r,o=>{if(oe(o.status))return o;let n=this.#r().getTime(),s=o.ttlMs!==null&&Date.parse(o.createdAt)+o.ttlMs<=n,i=o.workerPid!==this.#i&&!Hg(o.workerPid);return!s&&!i?o:{...o,status:"failed",statusMessage:s?"Task retention expired before completion.":"Task worker ended before recording a terminal result.",lastUpdatedAt:this.#r().toISOString(),error:{code:-32603,message:s?"MCP task expired":"MCP task worker unavailable after restart",data:{recoverable:!1,createNewTask:!0}},inputRequests:void 0}}))}async requireInput(t){let r=tt(t.inputRequests,t.requestContext);return V(await this.#n(t.taskId,t.principal,o=>{if(oe(o.status))return o;let n=Object.keys(r).filter(s=>o.consumedInputKeys.includes(s));if(n.length>0)throw new u("MCP task input request keys must be unique for the task lifetime",m.invalidParams,{reused:n});return{...o,status:"input_required",statusMessage:t.statusMessage?.trim().slice(0,Ee),lastUpdatedAt:this.#r().toISOString(),inputRequests:r}}))}async update(t,r,o){let n=lr(o),s=[],i=[];return await this.#n(t,r,a=>{if(a.status!=="input_required"||!a.inputRequests)return a;let d={...a.inputRequests},c=a.inputResponses?{...a.inputResponses}:{};for(let[l,p]of Object.entries(n))Object.prototype.hasOwnProperty.call(d,l)&&(c[l]=p,delete d[l],s.push(l));return i=Object.keys(d).sort(),s.length===0?a:{...a,status:i.length===0?"working":"input_required",lastUpdatedAt:this.#r().toISOString(),inputRequests:i.length===0?void 0:d,inputResponses:c,consumedInputKeys:[...new Set([...a.consumedInputKeys,...s])].sort()}}),{acceptedKeys:s.sort(),remainingKeys:i}}async takeInputResponses(t,r){let o={};return await this.#n(t,r,n=>(o=structuredClone(n.inputResponses??{}),Object.keys(o).length===0?n:{...n,inputResponses:void 0})),o}async complete(t,r,o){return V(await this.#n(t,r,n=>oe(n.status)?n:{...n,status:"completed",statusMessage:"Task completed.",lastUpdatedAt:this.#r().toISOString(),result:structuredClone(o),inputRequests:void 0,error:void 0}))}async fail(t,r,o){let n=fr(o);return V(await this.#n(t,r,s=>oe(s.status)?s:{...s,status:"failed",statusMessage:n.message,lastUpdatedAt:this.#r().toISOString(),error:n,inputRequests:void 0,result:void 0}))}async cancel(t,r){return V(await this.#n(t,r,o=>oe(o.status)?o:{...o,status:"cancelled",statusMessage:"Task cancelled by the client.",lastUpdatedAt:this.#r().toISOString(),inputRequests:void 0,result:void 0,error:void 0}))}};function gN(e){return new ot(e)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="15cbe26a-5716-5e8c-8700-eb36a1a056d6")}catch{}})();var Se="io.modelcontextprotocol/subscriptionId",_r=256,hr=2048,Vg=5e3;function Kg(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),Vg);n.unref(),Promise.resolve().then(()=>e(t)).then(()=>{clearTimeout(n),r()},s=>{clearTimeout(n),o(s instanceof Error?s:new Error(String(s)))})})}function nt(e,t){if(e!==void 0){if(typeof e!="boolean")throw new u("Invalid MCP subscription filter",m.invalidParams,{field:`notifications.${t}`,expected:"boolean"});return e||void 0}}function Wg(e){if(!h(e))throw new u("Invalid MCP subscription filter",m.invalidParams,{field:"notifications",expected:"object"});let t=nt(e.toolsListChanged,"toolsListChanged"),r=nt(e.promptsListChanged,"promptsListChanged"),o=nt(e.resourcesListChanged,"resourcesListChanged"),n;if(e.resourceSubscriptions!==void 0){if(!Array.isArray(e.resourceSubscriptions)||e.resourceSubscriptions.length>_r)throw new u("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:_r});let s=new Set;for(let i of e.resourceSubscriptions){if(typeof i!="string"||i.trim().length===0||Buffer.byteLength(i,"utf8")>hr)throw new u("Invalid MCP resource subscription URI",m.invalidParams,{field:"notifications.resourceSubscriptions",maximumBytes:hr});s.add(i)}s.size>0&&(n=[...s].sort())}return{...t?{toolsListChanged:t}:{},...r?{promptsListChanged:r}:{},...o?{resourcesListChanged:o}:{},...n?{resourceSubscriptions:n}:{}}}function Yg(e,t){return{...e.toolsListChanged&&t.tools?.listChanged?{toolsListChanged:!0}:{},...e.promptsListChanged&&t.prompts?.listChanged?{promptsListChanged:!0}:{},...e.resourcesListChanged&&t.resources?.listChanged?{resourcesListChanged:!0}:{},...e.resourceSubscriptions&&t.resources?.subscribe?{resourceSubscriptions:[...e.resourceSubscriptions]}:{}}}var gr=class{#e;#t=new Map;#r;constructor(t){this.#e=structuredClone(t.capabilities),this.#r={...t.serverInfo}}get size(){return this.#t.size}async open(t){if(this.#t.has(t.id))throw new u("MCP subscription id is already active",m.invalidParams,{subscriptionId:t.id});let r=Yg(Wg(t.notifications),this.#e),o={filter:r,sink:t.sink,writeQueue:Promise.resolve()};this.#t.set(t.id,o);try{await this.#o(t.id,o,{jsonrpc:"2.0",method:"notifications/subscriptions/acknowledged",params:{_meta:{[Se]:t.id},notifications:structuredClone(r)}},!0)}catch(n){throw this.#t.delete(t.id),n}return structuredClone(r)}async emitListChanged(t){let r=`${t}ListChanged`,o=`notifications/${t}/list_changed`,n=[];for(let[s,i]of this.#t)i.filter[r]===!0&&n.push(this.#o(s,i,{jsonrpc:"2.0",method:o,params:{_meta:{[Se]:s}}}));return(await Promise.all(n)).filter(Boolean).length}async emitResourceUpdated(t){let r=[];for(let[o,n]of this.#t)n.filter.resourceSubscriptions?.includes(t)&&r.push(this.#o(o,n,{jsonrpc:"2.0",method:"notifications/resources/updated",params:{_meta:{[Se]:o},uri:t}}));return(await Promise.all(r)).filter(Boolean).length}async#o(t,r,o,n=!1){let s=r.writeQueue.then(async()=>{if(this.#t.get(t)!==r)return!1;try{return await Kg(r.sink,o),!0}catch(i){if(this.#t.get(t)===r&&this.#t.delete(t),n)throw i;return!1}});return r.writeQueue=s.then(()=>{},()=>{}),s}close(t){if(this.#t.delete(t))return{...Ze({resultType:"complete",_meta:{[Se]:t}},this.#r)}}closeAll(){let t=[];for(let r of this.#t.keys()){let o=this.close(r);t.push({id:r,result:o})}return t}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3681273a-e101-57a0-9446-982c450e7183")}catch{}})();var yr=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,Xg=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,br=/^[\t\x20-\x7E]*$/u,Tr=new Set(["prompts/get","resources/read","tools/call"]);function Jg(e){let t=new Map;for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let n=typeof o=="string"?o:o.join(", ");t.set(r.toLowerCase(),n)}return t}function A(e,t){throw new u(e,m.headerMismatch,{header:t})}function Cr(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&br.test(t)&&!yr.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function Er(e,t){let r=yr.exec(e);if(r){let o=r[1],n=Buffer.from(o,"base64");return n.toString("base64")!==o||n.length===0?A("Malformed MCP Base64 header value",t):n.toString("utf8")}return e.length===0||e.trim()!==e||!br.test(e)?A("Malformed MCP header value",t):e}function we(e){return Array.isArray(e)?e.some(we):h(e)?Object.prototype.hasOwnProperty.call(e,"x-mcp-header")||Object.values(e).some(we):!1}function Zg(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!Xg.test(o)||!["boolean","integer","string"].includes(String(n))||r.has(o.toLowerCase()))throw new u("Invalid MCP x-mcp-header annotation",m.invalidParams,{field:t.join("."),annotation:o});return r.add(o.toLowerCase()),{name:o,path:t,type:n}}function Sr(e){if(!h(e))throw new u("Invalid MCP tool schema",m.invalidParams,{field:"inputSchema",expected:"object"});let t=[],r=new Set,o=(n,s)=>{let i=n.properties;if(i!==void 0){if(!h(i))throw new u("Invalid MCP tool schema properties",m.invalidParams,{field:"inputSchema.properties"});for(let[a,d]of Object.entries(i)){if(!h(d))continue;let c=[...s,a],l=Zg(d,c,r);l&&t.push(l);for(let[p,f]of Object.entries(d))if(p!=="properties"&&p!=="x-mcp-header"&&we(f))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:c.join("."),keyword:p});o(d,c)}}};for(let[n,s]of Object.entries(e))if(n!=="properties"&&we(s))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:"inputSchema",keyword:n});return o(e,[]),t}function wr(e,t){let r=e;for(let o of t){if(!h(r))return;r=r[o]}return r}function Ar(e,t){let r=e==="resources/read"?t.uri:t.name;return typeof r=="string"?r:void 0}function Qg(e,t){let r=h(e.arguments)?e.arguments:{},o={};for(let n of Sr(t)){let s=wr(r,n.path);if(s!=null){if(!(n.type==="integer"&&typeof s=="number"&&Number.isSafeInteger(s)||n.type==="boolean"&&typeof s=="boolean"||n.type==="string"&&typeof s=="string"))throw new u("Invalid MCP custom header argument",m.invalidParams,{field:n.path.join("."),expected:n.type});o[`Mcp-Param-${n.name}`]=Cr(s)}}return o}function EN(e){let t=h(e.request.params)?e.request.params:void 0,r=Je(t),o=e.request.method;if(typeof o!="string"||o.length===0)return A("Missing MCP request method","Mcp-Method");let n={Accept:"application/json, text/event-stream","Content-Type":"application/json","MCP-Protocol-Version":r.protocolVersion,"Mcp-Method":o},s=Ar(o,t);if(Tr.has(o)){if(s===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=Cr(s)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,Qg(t,e.toolSchema)),n}function ey(e,t){let r=t.method;(typeof r!="string"||r.length===0)&&A("Missing MCP request method","Mcp-Method");let o=h(t.params)?t.params:void 0,n=Je(o).protocolVersion;if(e.get("mcp-protocol-version")!==n&&A("MCP protocol header does not match request metadata","MCP-Protocol-Version"),e.get("mcp-method")!==r&&A("MCP method header does not match request body","Mcp-Method"),Tr.has(r)){let s=e.get("mcp-name"),i=Ar(r,o);(s===void 0||i===void 0||Er(s,"Mcp-Name")!==i)&&A("MCP name header does not match request body","Mcp-Name")}e.has("last-event-id")&&A("MCP SSE resumability is not supported","Last-Event-ID")}function ty(e,t,r){return e.type==="integer"?typeof t=="number"&&Number.isSafeInteger(t)&&Number(r)===t:e.type==="boolean"?typeof t=="boolean"&&r===String(t):typeof t=="string"&&r===t}function ry(e){let t=h(e.params.arguments)?e.params.arguments:{};for(let r of Sr(e.toolSchema)){let o=wr(t,r.path),n=`Mcp-Param-${r.name}`,s=e.headers.get(n.toLowerCase());if(o==null){s!==void 0&&A("Unexpected MCP parameter header",n);continue}s===void 0&&A("Missing MCP parameter header",n),ty(r,o,Er(s,n))||A("MCP parameter header does not match request body",n)}}function SN(e){let t=Jg(e.headers),r=typeof e.request.method=="string"?e.request.method:"";ey(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&ry({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var wN=H;import{AsyncLocalStorage as oy}from"node:async_hooks";import{createHash as vr,timingSafeEqual as ny}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a7c30d99-a0e4-552e-be61-0c54a455e211")}catch{}})();var y=class extends Error{httpStatus;challenge;constructor(t,r,o){super(t),this.name="PmMcpAuthorizationError",this.httpStatus=r,this.challenge=o}},iy=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,sy=/^[a-z][a-z0-9_*/-]{0,255}$/u,ay=/^(?:[a-z0-9][a-z0-9_*/-]{0,240})@[a-z][a-z0-9_*/-]{0,13}$/u,dy=/^[\x20-\x2B\x2D-\x3C\x3E-\x7E]{0,255}[\x21-\x2B\x2D-\x3C\x3E-\x7E]$/u,Rr=/^[\x21\x23-\x5B\x5D-\x7E]+$/u,Ir=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,cy=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,ly=/%(?![0-9A-Fa-f]{2})/u,py=512,uy=32,my=180,fy=8192,_y=8192,Pr=new oy;function S(e,t,r=!1){if(new RegExp("\\p{Cc}","u").test(e))throw new y(`Invalid ${t}`,401);let o;try{o=new URL(e)}catch{throw new y(`Invalid ${t}`,401)}let n=o.hostname==="127.0.0.1"||o.hostname==="localhost";if(o.hash.length>0||o.protocol!=="https:"&&!(r&&n&&o.protocol==="http:"))throw new y(`Invalid ${t}`,401);return o}function hy(e,t){let r=t.toLowerCase();for(let[o,n]of Object.entries(e))if(!(o.toLowerCase()!==r||n===void 0))return typeof n=="string"?n:n.join(", ")}function IN(e){let t=S(e.resource,"protected resource URI",!0).href.replace(/\/$/u,"");if(e.authorizationServers.length===0)throw new y("Protected resource metadata requires an authorization server",401);let r=e.authorizationServers.map(n=>S(n,"authorization server issuer").href.replace(/\/$/u,"")),o=[...new Set(e.scopes??[])];if(o.some(n=>!Rr.test(n)))throw new y("Invalid authorization scope",401);return{resource:t,authorization_servers:r,...o.length>0?{scopes_supported:o.sort()}:{}}}function PN(e){let t=S(e,"authorization server issuer"),r=t.pathname.replace(/^\/+|\/+$/gu,""),o=t.origin;return r?[`${o}/.well-known/oauth-authorization-server/${r}`,`${o}/.well-known/openid-configuration/${r}`,`${o}/${r}/.well-known/openid-configuration`]:[`${o}/.well-known/oauth-authorization-server`,`${o}/.well-known/openid-configuration`]}function MN(e,t){if(!h(e)||typeof e.issuer!="string")throw new y("Invalid authorization server metadata",401);let r=S(t,"expected issuer").href.replace(/\/$/u,"");if(S(e.issuer,"metadata issuer").href.replace(/\/$/u,"")!==r)throw new y("Authorization server issuer mismatch",401);if(!Array.isArray(e.code_challenge_methods_supported)||!e.code_challenge_methods_supported.includes("S256"))throw new y("Authorization server does not support required S256 PKCE",401);let o=d=>{let c=e[d];if(typeof c!="string")throw new y(`Authorization server metadata requires ${d}`,401);return S(c,d).href},n=d=>{let c=e[d];return typeof c=="string"?S(c,d).href:void 0},s=o("authorization_endpoint"),i=o("token_endpoint"),a=n("registration_endpoint");return{issuer:r,authorization_endpoint:s,token_endpoint:i,code_challenge_methods_supported:[...new Set(e.code_challenge_methods_supported.filter(d=>typeof d=="string"))],...e.client_id_metadata_document_supported===!0?{client_id_metadata_document_supported:!0}:{},...a?{registration_endpoint:a}:{}}}function kN(e){return e.hasPreRegisteredClient?"pre_registered":e.metadata.client_id_metadata_document_supported?"client_id_metadata_document":e.metadata.registration_endpoint?"dynamic":"user_supplied"}function xN(e){if(e.responseIssuer===void 0){if(e.issuerParameterSupported)throw new y("Authorization response omitted the advertised issuer",401);return}if(e.responseIssuer!==e.expectedIssuer)throw new y("Authorization response issuer mismatch",401)}function NN(e,t){let r=S(t,"client metadata document URL");if(r.pathname==="/"||!h(e)||e.client_id!==r.href||typeof e.client_name!="string"||e.client_name.trim().length===0||!Array.isArray(e.redirect_uris)||e.redirect_uris.length===0)throw new y("Invalid Client ID Metadata Document",401);for(let o of e.redirect_uris){if(typeof o!="string")throw new y("Invalid client redirect URI",401);S(o,"client redirect URI",!0)}return structuredClone(e)}function LN(e){if(e.redirectUris.length===0||e.clientName.trim().length===0)throw new y("Invalid dynamic client registration metadata",401);let t=e.redirectUris.map(r=>S(r,"redirect URI",!0).href);return{application_type:e.applicationType,client_name:e.clientName.trim().slice(0,128),redirect_uris:t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"}}var Or=class{#e=new Map;set(t,r){let o=S(t,"credential issuer").href;this.#e.set(o,structuredClone(r))}get(t){let r=S(t,"credential issuer").href,o=this.#e.get(r);return o?structuredClone(o):void 0}delete(t){let r=S(t,"credential issuer").href;return this.#e.delete(r)}};function gy(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?iy.exec(t):null;if(!o)throw new y("Invalid MCP traceparent",403);let n=o[1],s=o[2];if(/^0+$/u.test(n)||/^0+$/u.test(s))throw new y("Invalid MCP traceparent",403)}if(r!==void 0&&(typeof r!="string"||!by(r)))throw new y("Invalid MCP tracestate",403);return{...typeof t=="string"?{traceparent:t}:{},...typeof r=="string"?{tracestate:r}:{}}}function $(e){return e.replace(/^[ \t]*|[ \t]*$/gu,"")}function yy(e){return sy.test(e)||ay.test(e)}function by(e){if(Buffer.byteLength(e,"utf8")>py)return!1;let t=e.split(",");if(t.length>uy)return!1;let r=new Set;for(let o of t){let n=$(o);if(n.length===0)continue;let s=n.indexOf("="),i=s>0?n.slice(0,s):"",a=s>0?n.slice(s+1):"";if(!yy(i)||!dy.test(a)||r.has(i))return!1;r.add(i)}return!0}function Mr(e){return cy.test(e)&&!ly.test(e)}function Ty(e){let t=$(e),r=t.indexOf("="),o=$(r>=0?t.slice(0,r):t),n=r>=0?$(t.slice(r+1)):void 0;return Ir.test(o)&&(n===void 0||Mr(n))}function Cy(e){let t=$(e),r=t.split(";"),o=r[0],n=r.slice(1),s=o.indexOf("="),i=$(s>0?o.slice(0,s):""),a=s>0?$(o.slice(s+1)):"";if(!(!Ir.test(i)||!Mr(a)||!n.every(Ty)))return{key:i,serialized:t}}function Ey(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>fy)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>my)throw new y("Invalid MCP baggage",403);let n=[];for(let s of o){let i=Cy(s);if(!i)throw new y("Invalid MCP baggage",403);r.has(i.key)&&n.push(i.serialized)}return n.length>0?n.join(","):void 0}function DN(e,t={}){let r=h(e)&&h(e._meta)?e._meta:{},o=Ey(r.baggage,t.baggageAllowlist??[]);return{...gy(r),...o?{baggage:o}:{}}}function $N(e,t){return Pr.run(structuredClone(e),t)}function FN(){let e=Pr.getStore();return e?{...e}:void 0}async function GN(e){let t=S(e.policy.resourceMetadataUrl,"protected resource metadata URL",!0).href,r=[...new Set(e.policy.requiredScopes??[])];if(r.some(c=>!Rr.test(c)))throw new y("Invalid authorization scope",401);let o=`Bearer resource_metadata="${t}"`;if(new URL(e.requestUrl,e.policy.resource).searchParams.has("access_token"))throw new y("Access tokens must not appear in URI query parameters",401,o);let n=hy(e.headers,"authorization")?.match(/^Bearer ([^\s]+)$/iu);if(!n)throw new y("Missing or malformed bearer token",401,o);let s=n[1];if(Buffer.byteLength(s,"utf8")>_y)throw new y("Missing or malformed bearer token",401,o);let i;try{i=await e.policy.verifyAccessToken(s)}catch{throw new y("Invalid bearer token",401,o)}let a=Array.isArray(i.audience)?i.audience:[i.audience];if(i.issuer!==e.policy.issuer||!a.includes(e.policy.resource))throw new y("Bearer token issuer or audience mismatch",401,o);let d=r.filter(c=>!i.scopes.includes(c));if(d.length>0)throw new y("Bearer token has insufficient scope",403,`${o}, scope="${d.join(" ")}"`);return{...i,audience:[...a],scopes:[...i.scopes]}}function UN(e){let t=vr("sha256").update(e.token).digest();return r=>{let o=vr("sha256").update(r).digest();if(!ny(t,o))throw new y("Invalid bearer token",401);return structuredClone(e.claims)}}(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]="46f5fe59-6b84-5c68-ad07-bb1329f4ea29")}catch{}})();var it="io.modelcontextprotocol/ui",Ae="2026-01-26",Nr="text/html;profile=mcp-app",kr=Object.freeze({specVersion:Ae,mimeTypes:[Nr]});function qN(e){let t=e.clientCapabilities.extensions;if(!h(t))return!1;let r=t[it];if(r===void 0)return!1;if(!h(r))throw new u("Invalid MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:kr}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(Nr)||n!==void 0&&n!==Ae)throw new u("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:kr}}});return!0}var Sy={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},Lr=Object.freeze([{id:"context",name:"Context explorer",description:"Inspect bounded project context, provenance, omissions, and token accounting.",toolName:"pm_context",uri:"ui://pm/context.html"},{id:"graph",name:"Relationship graph",description:"Explore typed relationships, explaining paths, and graph-governance evidence.",toolName:"pm_graph",uri:"ui://pm/graph.html"},{id:"plan",name:"Plan and milestone view",description:"Review durable plan steps, dependencies, decisions, discoveries, and validation state.",toolName:"pm_plan",uri:"ui://pm/plan.html"},{id:"assurance",name:"Assurance dashboard",description:"Inspect validation verdicts, evidence, omissions, and actionable recovery paths.",toolName:"pm_validate",uri:"ui://pm/assurance.html"},{id:"operations",name:"Long-operation view",description:"Inspect durable test and operation results without creating a second task store.",toolName:"pm_test",uri:"ui://pm/operations.html"}].map(e=>({...e,toolMeta:{resourceUri:e.uri,visibility:["model","app"]},resourceMeta:Sy})));function zN(e){return Lr.find(t=>t.uri===e)}function HN(e){let t=new Map(Lr.map(r=>[r.toolName,r]));return e.map(r=>{let o=t.get(r.name);return o?{...r,_meta:{...r._meta,ui:o.toolMeta}}:{...r}})}function xr(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function VN(e){let t=xr(e.name),r=xr(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:Ae}),n=JSON.stringify(Ae);return`<!doctype html>
|
|
6
6
|
<html lang="en">
|
|
7
7
|
<head>
|
|
8
8
|
<meta charset="utf-8">
|
|
@@ -25,11 +25,11 @@ import{a as fg}from"./chunks/chunk-L5BU5FYN.js";import{a as Gk,b as Uk,c as jk,d
|
|
|
25
25
|
(()=>{"use strict";const MAX=24000,status=document.querySelector("#status"),result=document.querySelector("#result"),input=document.querySelector("#input"),pending=new Map();let nextId=1;const render=(node,value)=>{let text;try{text=typeof value==="string"?value:JSON.stringify(value,null,2)}catch{text="Result could not be serialized."}if(text.length>MAX)text=text.slice(0,MAX)+"\\n\\n[View truncated at "+MAX+" characters; use the authoritative pm tool with a cursor or narrower projection.]";node.textContent=text};const send=(message)=>window.parent.postMessage(message,"*");window.addEventListener("message",event=>{if(event.source!==window.parent||!event.data||event.data.jsonrpc!=="2.0")return;const message=event.data;if(message.id!==undefined&&pending.has(message.id)){pending.get(message.id)(message);pending.delete(message.id);return}if(message.method==="ui/notifications/tool-input"||message.method==="ui/notifications/tool-input-partial"){render(input,message.params?.arguments??message.params);status.textContent="Input received"}else if(message.method==="ui/notifications/tool-result"){render(result,message.params);status.textContent="Current tool result"}else if(message.method==="ui/notifications/tool-cancelled"){status.textContent="Tool call cancelled";status.classList.add("notice")}else if(message.method==="ui/notifications/host-context-changed"&&message.params?.theme){document.documentElement.style.colorScheme=message.params.theme}});const request=(method,params)=>new Promise(resolve=>{const id=nextId++;pending.set(id,resolve);send({jsonrpc:"2.0",id,method,params})});document.querySelector("#copy").addEventListener("click",async()=>{const text=result.textContent+"\\n\\n"+input.textContent;try{await navigator.clipboard.writeText(text);status.textContent="Visible evidence copied"}catch{status.textContent="Clipboard permission unavailable";status.classList.add("notice")}});request("ui/initialize",{appInfo:${o},appCapabilities:{},protocolVersion:${n}}).then(message=>{if(message.error){status.textContent="Host rejected MCP App initialization";status.classList.add("notice");return}send({jsonrpc:"2.0",method:"ui/notifications/initialized"});status.textContent="Connected \u2014 awaiting authoritative result"})})();
|
|
26
26
|
</script>
|
|
27
27
|
</body>
|
|
28
|
-
</html>`}import{createHash as st}from"node:crypto";import{lstat as wy,readdir as qr,readFile as Ay}from"node:fs/promises";import M from"node:path";import{parseDocument as vy}from"yaml";(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]="eafd8bc3-0da1-5220-8fb1-6967eecdb6bf")}catch{}})();var Dr="io.modelcontextprotocol/skills",at="SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03",Oy=Object.freeze({revision:at,status:"draft",directoryRead:!0});function
|
|
28
|
+
</html>`}import{createHash as st}from"node:crypto";import{lstat as wy,readdir as qr,readFile as Ay}from"node:fs/promises";import M from"node:path";import{parseDocument as vy}from"yaml";(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]="eafd8bc3-0da1-5220-8fb1-6967eecdb6bf")}catch{}})();var Dr="io.modelcontextprotocol/skills",at="SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03",Oy=Object.freeze({revision:at,status:"draft",directoryRead:!0});function eL(e,t=!1){let r=e.clientCapabilities.extensions,o=h(r)?r[Dr]:void 0;if(!h(o)||o.revision!==at||t&&o.directoryRead!==!0)throw new u("Missing or incompatible Skills over MCP draft capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[Dr]:Oy}}})}var P=Object.freeze({maxFilesPerSkill:512,maxFileBytes:16*1024*1024,maxSkillBytes:16*1024*1024,defaultPageSize:20,maxPageSize:100}),$r=100,Ry=32*1024*1024,Iy=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Fr=new Set(Array.from({length:P.maxPageSize},(e,t)=>t+1));function C(e,t){throw new u(e,-32602,t)}function Gr(e,t){try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),e.endsWith(".md")?"text/markdown":"text/plain"}catch{return"application/octet-stream"}}function Py(e,t){let r=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/u.exec(e);r||C(`Skill ${t} is missing YAML frontmatter.`);let o=vy(r[1],{prettyErrors:!1,strict:!0,uniqueKeys:!0});o.errors.length>0&&C(`Skill ${t} has invalid YAML frontmatter.`,{errors:o.errors.map(s=>s.message)});let n;try{n=o.toJS({maxAliasCount:0})}catch(s){C(`Skill ${t} has unsupported YAML aliases.`,{error:String(s)})}return(typeof n!="object"||n===null||Array.isArray(n))&&C(`Skill ${t} frontmatter must be an object.`),n}async function My(e,t,r,o){return r>P.maxFileBytes&&C(`Skill resource exceeds the per-file limit: ${t}.`),o.files+=1,o.files>P.maxFilesPerSkill&&C(`Skill exceeds ${P.maxFilesPerSkill} files.`),o.skillBytes+=r,o.skillBytes>P.maxSkillBytes&&C(`Skill exceeds the aggregate byte limit: ${t}.`),o.originBytes.value+=r,o.originBytes.value>Ry&&C(`Skill origin exceeds the aggregate byte limit: ${t}.`),Ay(e)}async function zr(e,t,r){let o=M.join(e,t),n=await qr(o,{withFileTypes:!0}),s=[];for(let i of n.sort((a,d)=>a.name.localeCompare(d.name))){let a=M.posix.join(t.split(M.sep).join("/"),i.name),d=M.join(e,...a.split("/")),c=await wy(d);c.isSymbolicLink()&&C(`Skill resource must not be a symbolic link: ${a}.`),c.isDirectory()?s.push(...await zr(e,a,r)):c.isFile()?s.push({relative:a,bytes:await My(d,a,c.size,r)}):C(`Skill resource must be a regular file or directory: ${a}.`)}return s}async function Ur(e,t,r){let o=new Map,n;try{n=await qr(e,{withFileTypes:!0})}catch(a){if(Ct(a))return o;throw a}let s=n.filter(a=>a.isDirectory()&&Iy.test(a.name)).sort((a,d)=>a.name.localeCompare(d.name));s.length>$r&&C(`Skill origin exceeds ${$r} directories.`);let i={value:0};for(let a of s){let d=await zr(M.join(e,a.name),"",{files:0,skillBytes:0,originBytes:i}),c=d.reduce((g,T)=>g+T.bytes.byteLength,0),l=d.find(g=>g.relative==="SKILL.md");if(!l)continue;let p=Py(l.bytes.toString("utf8"),a.name);p.name!==a.name&&C(`Skill directory ${a.name} must match frontmatter name.`,{actual:p.name??null,expected:a.name}),(typeof p.description!="string"||p.description.trim().length===0)&&C(`Skill ${a.name} requires a non-empty frontmatter description.`,{required:["description"]});let f=d.map(g=>({uri:`skill://${a.name}/${g.relative}`,digest:`sha256:${st("sha256").update(g.bytes).digest("hex")}`,size:g.bytes.byteLength})),_=st("sha256").update(f.map(g=>`${g.uri}:${g.digest}`).join(`
|
|
29
29
|
`)).digest("hex");o.set(a.name,{uri:`skill://${a.name}/SKILL.md`,frontmatter:p,resources:f,_meta:{contractVersion:1,extensionRevision:at,origin:t,packageVersion:r,protocolVersion:H,trust:"untrusted",estimatedTokens:Math.ceil(c/4)},files:new Map(d.map(g=>[g.relative,g.bytes])),fingerprint:_})}return o}function jr(e){let{files:t,fingerprint:r,...o}=e;return o}var Br=class e{#e;#t;constructor(t){this.#e=t,this.#t=st("sha256").update([...t.entries()].sort(([r],[o])=>r.localeCompare(o)).map(([r,o])=>`${r}:${o.fingerprint}`).join(`
|
|
30
|
-
`)).digest("hex").slice(0,16)}#r(t,r){if(!t)return 0;try{let o=JSON.parse(Buffer.from(t,"base64url").toString("utf8"));return(typeof o!="object"||o===null||!("fingerprint"in o)||o.fingerprint!==this.#t||!("scope"in o)||o.scope!==r||!("offset"in o)||!Number.isInteger(o.offset)||Number(o.offset)<0)&&C("Skill cursor is invalid or stale."),Number(o.offset)}catch(o){if(o instanceof u)throw o;return C("Skill cursor is invalid or stale.")}}#o(t,r){return Buffer.from(JSON.stringify({fingerprint:this.#t,offset:t,scope:r})).toString("base64url")}static async load(t){let r=await Ur(M.join(t.packageRoot,".agents","skills"),"package",t.packageVersion);if(t.workspaceRoot){let o=M.resolve(t.packageRoot,".agents","skills"),n=M.resolve(t.workspaceRoot,".agents","skills");if(n!==o){let s=await Ur(n,"workspace",t.packageVersion);for(let[i,a]of s)r.set(i,a)}}return new e(r)}list(t={}){let r=t.limit??P.defaultPageSize;Fr.has(r)||C(`Skill list limit must be an integer from 1 to ${P.maxPageSize}.`);let o=this.#r(t.cursor,"skills/list"),n=[...this.#e.values()].sort((d,c)=>d.uri.localeCompare(c.uri)),s=n.slice(o,o+r),i=o+s.length,a=i<n.length;return{skills:s.map(jr),hasMore:a,...a?{nextCursor:this.#o(i,"skills/list")}:{}}}get(t){let r=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/SKILL\.md$/u.exec(t),o=r?this.#e.get(r[1]):void 0;return o||C(`Unknown pm MCP skill: ${t}.`,{field:"uri"}),jr(o)}read(t){let r=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/(.+)$/u.exec(t),o=r?this.#e.get(r[1]):void 0,n=r?.[2]??"",s=o&&n?o.files.get(n):void 0,i=o?.resources.find(c=>c.uri===t);(!o||!s||!i)&&C(`Unknown pm MCP skill resource: ${t}.`,{field:"uri"});let a={digest:i.digest,origin:o._meta.origin,trust:"untrusted"},d=Gr(n,s);return d!=="application/octet-stream"?{contents:[{uri:t,mimeType:d,text:s.toString("utf8"),_meta:a}]}:{contents:[{uri:t,mimeType:d,blob:s.toString("base64"),_meta:a}]}}readDirectory(t,r={}){let o=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(.+))?$/u.exec(t),n=o?this.#e.get(o[1]):void 0;n||C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let s=(o?.[2]??"").replace(/\/$/u,""),i=s.length>0?`${s}/`:"",a=`skill://${o[1]}`,d=new Map;for(let T of n.resources){let E=T.uri.slice(`${a}/`.length);if(!E.startsWith(i))continue;let q=E.slice(i.length),[R,...Ro]=q.split("/"),Io=`${a}/${i}${R}`,Po=n.files.get(`${i}${R}`);d.set(R,{uri:Io,name:R,mimeType:Ro.length>0?"inode/directory":Gr(R,Po)})}s.length>0&&d.size===0&&C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let c=r.limit??P.maxPageSize;Fr.has(c)||C(`Skill directory limit must be an integer from 1 to ${P.maxPageSize}.`);let l=this.#r(r.cursor,t),p=[...d.values()].sort((T,E)=>T.uri.localeCompare(E.uri)),f=p.slice(l,l+c),_=l+f.length,g=_<p.length;return{resources:f,hasMore:g,...g?{nextCursor:this.#o(_,t)}:{}}}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38023567-8a5b-5e25-8d71-5112f74d1894")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="619dbd55-b854-5e69-b5a5-c0bcada81629")}catch{}})();var Hr="https://schema.unbrained.dev/pm/workspace-recipe/v1";function dt(e,t){if(e===null||typeof e=="boolean"||typeof e=="string")return e;if(typeof e=="number"){if(!Number.isFinite(e))throw new Error(`Workspace recipe JSON number must be finite at ${t}`);return e}if(Array.isArray(e))return Object.freeze(e.map((r,o)=>dt(r,`${t}[${o}]`)));if(typeof e!="object"||Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw new Error(`Workspace recipe input must contain JSON values at ${t}`);return Object.freeze(Object.fromEntries(Object.entries(e).map(([r,o])=>[r,dt(o,`${t}.${r}`)])))}function ve(e){if(e.schema!==Hr)throw new Error(`Unsupported workspace recipe schema: ${e.schema}`);let t=Et(e);if(e.operations.some(r=>r.action.trim().length===0||r.input===null||Array.isArray(r.input)))throw new Error("Workspace recipe operations require an action and object input");return Object.freeze({...t,operations:Object.freeze(e.operations.map((r,o)=>Object.freeze({action:r.action,input:dt(r.input,`operations[${o}].input`)})))})}async function Vr(e,t){let r=ve(e);return St(r,t)}async function ky(e,t){return Vr(e,async()=>{let r=[];for(let[o,n]of e.operations.entries())r.push(await t(n,o));return r})}(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]="c234be1c-35b7-5388-8a70-a012e9a34389")}catch{}})();var Kr="pm.agent-observation/v1",Wr="pm.agent-verdict/v1",Yr="pm.agent-episode/v1";function O(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer.`)}function k(e,t){if(e.trim().length===0)throw new Error(`${t} must not be empty.`)}function ne(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))ne(t)}return e}function xy(e){if(e.length===0)throw new Error("observation.reads must declare at least one bounded read.");let t=0;for(let r of e)if(k(r.command,"observation.reads.command"),O(r.budget_tokens,"observation.reads.budget_tokens"),t+=r.budget_tokens,!Number.isSafeInteger(t))throw new Error("observation read ceilings exceed safe integer range.")}function Ny(e){if(e.basis!=="emitted_bytes")throw new Error("observation calibration must use emitted_bytes.");for(let r of e.samples)if(!Number.isSafeInteger(r)||r<0)throw new Error("observation calibration samples must be non-negative safe integers.");if(e.samples.length===0)throw new Error("observation calibration must include at least one sample.");if(O(e.expected_emitted_bytes,"observation.calibration.expected_emitted_bytes"),!Number.isSafeInteger(e.tolerance_bytes)||e.tolerance_bytes<0)throw new Error("observation.calibration.tolerance_bytes must be a non-negative safe integer.");let t=e.samples.reduce((r,o)=>r+o,0)/e.samples.length;if(Math.abs(t-e.expected_emitted_bytes)>e.tolerance_bytes)throw new Error("observation expected_emitted_bytes is outside the calibrated sample tolerance.")}function Ly(e){if(e.length===0)throw new Error("observation.tiers must declare a degradation ladder.");let t=new Set,r=Number.POSITIVE_INFINITY;for(let o of e){if(k(o.id,"observation.tiers.id"),O(o.max_tokens,"observation.tiers.max_tokens"),t.has(o.id))throw new Error(`Duplicate observation tier: ${o.id}.`);if(t.add(o.id),o.max_tokens>r)throw new Error("observation tiers must be ordered from largest to smallest max_tokens.");r=o.max_tokens;let n=new Set;for(let s of o.fields){if(F(s,"observation.tiers.fields"),n.has(s))throw new Error(`Duplicate observation tier field: ${s}.`);n.add(s)}}}function Dy(e){if(e.schema!==Kr)throw new Error(`observation.schema must be ${Kr}.`);return k(e.id,"observation.id"),O(e.version,"observation.version"),xy(e.reads),Ny(e.calibration),e.corpus_dependence.kind==="bounded"&&(k(e.corpus_dependence.dimension,"observation.corpus_dependence.dimension"),O(e.corpus_dependence.maximum,"observation.corpus_dependence.maximum")),Ly(e.tiers),ne(structuredClone(e))}function aL(e){return{contract_id:e.id,contract_version:e.version,guaranteed_ceiling_tokens:e.reads.reduce((t,r)=>t+r.budget_tokens,0),expected_emitted_bytes:e.calibration.expected_emitted_bytes,expected_tokens:Math.ceil(e.calibration.expected_emitted_bytes/4),tolerance_bytes:e.calibration.tolerance_bytes,calibration_basis:"emitted_bytes",corpus_dependence:e.corpus_dependence}}async function $y(e,t,r){O(r.budget_tokens,"observation request budget_tokens");let o=[];for(let[n,s]of e.tiers.entries()){o.push(s.id);let i=await t(s),a=Buffer.byteLength(I(i),"utf8"),d=Math.ceil(a/4);if(d<=Math.min(r.budget_tokens,s.max_tokens))return{status:"served",payload:i,receipt:{contract_id:e.id,contract_version:e.version,served_tier:s.id,degraded:n>0,attempted_tiers:o,emitted_bytes:a,estimated_tokens:d,calibration_basis:"emitted_bytes"}}}return{status:"refused",reason:"no_declared_tier_fits_budget",receipt:{contract_id:e.id,contract_version:e.version,served_tier:null,degraded:e.tiers.length>1,attempted_tiers:o,emitted_bytes:null,estimated_tokens:null,calibration_basis:"emitted_bytes"}}}function F(e,t){let r=e.split(".");if(r.some(o=>o.length===0||o==="__proto__"||o==="prototype"||o==="constructor"))throw new Error(`${t} must be a safe, non-empty dot-separated path.`);return r}function Xr(e,t){let r=e;for(let o of F(t,"recorded field path")){if(r===null||typeof r!="object"||!Object.hasOwn(r,o))return;r=r[o]}return r}function Fy(e){return`/${F(e,"verdict predicate path").map(t=>t.replaceAll("~","~0").replaceAll("/","~1")).join("/")}`}function Gy(e){if(e.kind!=="field_equals")return;let t;try{t=JSON.stringify(e.expected)}catch{throw new Error(`Expected value for verdict predicate ${e.id} must be JSON serializable.`)}if(t===void 0)throw new Error(`Expected value for verdict predicate ${e.id} must be JSON serializable.`)}function Uy(e){if(e.schema!==Wr)throw new Error(`verdict.schema must be ${Wr}.`);k(e.id,"verdict.id"),O(e.version,"verdict.version");let t=new Set;for(let o of e.predicates){k(o.id,"verdict.predicates.id"),F(o.path,"verdict.predicates.path");let n=o.kind;if(n!=="field_equals"&&n!=="field_present"&&n!=="field_absent")throw new Error(`Unsupported verdict predicate kind for ${o.id}.`);if(t.has(o.id))throw new Error(`Duplicate verdict predicate: ${o.id}.`);Gy(o),t.add(o.id)}if(e.composition.operator!=="all"&&e.composition.operator!=="any")throw new Error("verdict composition operator must be all or any.");if(e.composition.predicate_ids.length!==e.predicates.length)throw new Error("verdict composition must reference every predicate exactly once.");let r=new Set(e.composition.predicate_ids);if(r.size!==e.composition.predicate_ids.length||[...r].some(o=>!t.has(o)))throw new Error("verdict composition contains duplicate or unknown predicate ids.");return ne(structuredClone(e))}function jy(e,t){if(e.predicates.length===0)return{contract_id:e.id,contract_version:e.version,snapshot_id:t.snapshot_id,outcome:"not_applicable",score:null,policy:"verdict_only_no_reward",reason:"no_predicates_declared",predicates:[]};let r=new Map(e.predicates.map(i=>[i.id,i])),o=e.composition.predicate_ids.map(i=>{let a=r.get(i),d=Xr(t.state,a.path),c=a.kind==="field_present"?d!==void 0:a.kind==="field_absent"?d===void 0:I(d)===I(a.expected);return{id:i,outcome:c?"satisfied":"violated",evidence_pointer:`${t.snapshot_id}#${Fy(a.path)}`,evidence_digest:yt(I(d))}}),n=o.filter(i=>i.outcome==="satisfied").length,s=e.composition.operator==="all"?n===o.length:n>0;return{contract_id:e.id,contract_version:e.version,snapshot_id:t.snapshot_id,outcome:s?"satisfied":"violated",score:n/o.length,policy:"verdict_only_no_reward",predicates:o}}function dL(e){if(e.schema!==Yr)throw new Error(`episode.schema must be ${Yr}.`);if(k(e.id,"episode.id"),O(e.version,"episode.version"),!["benchmark","evaluation","training","scale_transfer"].includes(e.mode))throw new Error("episode.mode is not supported.");if(e.task_item_ids.length===0)throw new Error("episode.task_item_ids must declare at least one pm item.");for(let t of e.task_item_ids)k(t,"episode.task_item_ids");O(e.limits.max_actions,"episode.limits.max_actions"),O(e.limits.max_observations,"episode.limits.max_observations"),O(e.limits.max_tokens_per_observation,"episode.limits.max_tokens_per_observation");for(let t of e.observable_fields)F(t,"episode.observable_fields");for(let t of e.withheld_fields)F(t,"episode.withheld_fields");for(let t of e.observable_fields){let r=e.withheld_fields.find(o=>t===o||t.startsWith(`${o}.`)||o.startsWith(`${t}.`));if(r!==void 0)throw new Error(`Observable field ${t} overlaps withheld field ${r}.`)}for(let t of e.observation.tiers)for(let r of t.fields)if(!e.observable_fields.includes(r))throw new Error(`Observation tier field ${r} is not declared observable.`);return Dy(e.observation),Uy(e.verdict),ve(e.recipe),ne(structuredClone(e))}function By(e,t,r){let o=F(t,"observation projection field"),n=e;for(let[s,i]of o.entries()){if(s===o.length-1){r!==void 0&&(n[i]=structuredClone(r));return}let a=n[i];(a===null||typeof a!="object"||Array.isArray(a))&&(n[i]={}),n=n[i]}}function qy(e,t){let r={};for(let o of t)By(r,o,Xr(e,o));return r}async function cL(e,t){let r=[],o=0,n=0,s=!1,i,a={episode:{id:e.id,label:`pm agent environment v${e.version}`},provenance:{role:e.mode,topic:"agent-environment"}},d=await D(a,()=>t.reset(e.recipe));r.push({sequence:1,kind:"reset",state_id:d.state_id});let c=async()=>{if(s)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let p=await t.readRecordedState(),f=await $y(e.observation,async _=>qy(p.state,_.fields),{budget_tokens:e.limits.max_tokens_per_observation});return r.push({sequence:r.length+1,kind:"observation",state_id:f.receipt.served_tier??p.snapshot_id}),f},l=async(p=!1)=>{if(s&&!p)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let f=await t.readRecordedState(),_=jy(e.verdict,f);return r.push({sequence:r.length+1,kind:"verdict",state_id:f.snapshot_id}),_};return{observe:()=>D(a,c),step:async p=>{if(s)throw new Error("episode is already closed.");if(o>=e.limits.max_actions)throw new Error("episode exceeded limits.max_actions.");o+=1;let f=await D(a,()=>t.execute(p));return r.push({sequence:r.length+1,kind:"action",state_id:f.state_id}),f},score:()=>D(a,l),close:()=>i!==void 0?i:s?Promise.reject(new Error("episode is already closed.")):(s=!0,i=D(a,()=>l(!0)).then(p=>(r.push({sequence:r.length+1,kind:"close",state_id:p.snapshot_id}),{verdict:p,trajectory:ne(structuredClone(r))})).catch(p=>{throw s=!1,p}).finally(()=>{i=void 0}),i)}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1202ba19-0bcb-5478-b245-4472e361d4de")}catch{}})();var G="https://schema.unbrained.dev/pm/corpus-shape/v1";function K(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError(`Corpus shape ${t} must be a positive safe integer`);return e}function ie(e,t){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Corpus shape ${t} must be a non-negative safe integer`);return e}function Zr(e){if(!(typeof e!="object"||e===null||Object.isFrozen(e))){for(let t of Object.values(e))Zr(t);Object.freeze(e)}}function W(e){if(e.schema!==G)throw new TypeError(`Unsupported corpus shape schema: ${e.schema}`);if(e.name.trim().length===0||e.description.trim().length===0)throw new TypeError("Corpus shape name and description must be non-empty");if(K(e.hierarchy_depth,"hierarchy_depth"),K(e.hierarchy_fanout,"hierarchy_fanout"),ie(e.age_span_days,"age_span_days"),K(e.history_entries_per_item,"history_entries_per_item"),ie(e.comments_per_100_items,"comments_per_100_items"),ie(e.notes_per_100_items,"notes_per_100_items"),ie(e.learnings_per_100_items,"learnings_per_100_items"),K(e.author_cardinality,"author_cardinality"),K(e.component_count,"component_count"),e.edge_kind_mix.length===0||e.edge_kind_mix.some(r=>r.kind.trim().length===0||r.weight<=0))throw new TypeError("Corpus shape edge_kind_mix requires non-empty kinds with positive weights");if(e.terminal_statuses.some(r=>!e.custom_statuses.includes(r)))throw new TypeError("Corpus shape terminal_statuses must be declared in custom_statuses");let t=structuredClone(e);return Zr(t),t}var Oe=[{kind:"implements",weight:5},{kind:"blocked_by",weight:2},{kind:"discovered_from",weight:2},{kind:"verifies",weight:2},{kind:"supersedes",weight:1},{kind:"related",weight:4}],Y=Object.freeze({scratch:W({schema:G,name:"scratch",description:"Seconds-old, shallow project with minimal history.",hierarchy_depth:2,hierarchy_fanout:50,age_span_days:0,history_entries_per_item:1,comments_per_100_items:2,notes_per_100_items:1,learnings_per_100_items:1,edge_kind_mix:[{kind:"related",weight:1}],author_cardinality:2,component_count:1,include_cycles:!1,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),representative:W({schema:G,name:"representative",description:"Medium-lived project with rich evidence and typed lineage.",hierarchy_depth:5,hierarchy_fanout:8,age_span_days:730,history_entries_per_item:12,comments_per_100_items:30,notes_per_100_items:12,learnings_per_100_items:10,edge_kind_mix:Oe,author_cardinality:32,component_count:1,include_cycles:!1,custom_types:["Experiment"],custom_statuses:["review"],terminal_statuses:[],custom_fields:["domain"]}),"deep-graph":W({schema:G,name:"deep-graph",description:"Deep typed relationship graph with deterministic cycles.",hierarchy_depth:16,hierarchy_fanout:2,age_span_days:3650,history_entries_per_item:6,comments_per_100_items:15,notes_per_100_items:8,learnings_per_100_items:8,edge_kind_mix:Oe,author_cardinality:16,component_count:1,include_cycles:!0,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),"multi-decade":W({schema:G,name:"multi-decade",description:"Thirty-year event history with dense per-item evolution.",hierarchy_depth:6,hierarchy_fanout:6,age_span_days:10958,history_entries_per_item:24,comments_per_100_items:40,notes_per_100_items:20,learnings_per_100_items:16,edge_kind_mix:Oe,author_cardinality:64,component_count:1,include_cycles:!1,custom_types:["Program"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["portfolio"]}),"disconnected-archive":W({schema:G,name:"disconnected-archive",description:"Multiple disconnected historical project components.",hierarchy_depth:4,hierarchy_fanout:10,age_span_days:7305,history_entries_per_item:8,comments_per_100_items:10,notes_per_100_items:5,learnings_per_100_items:6,edge_kind_mix:Oe,author_cardinality:24,component_count:5,include_cycles:!1,custom_types:["Archive"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["archive_source"]})});function zy(){return Object.keys(Y).sort().map(e=>Y[e])}function Hy(e){let t=e.trim().toLowerCase();if(!Object.hasOwn(Y,t))throw new TypeError(`Unknown corpus shape "${e}". Available: ${Object.keys(Y).join(", ")}`);return Y[t]}var Jr=new WeakMap;function Qr(e,t){if(e===0)return[];let r=Jr.get(t);r===void 0&&(r=t.edge_kind_mix.flatMap(n=>Array.from({length:n.weight},()=>n.kind)),Jr.set(t,r));let o=[r[e%r.length]];return t.include_cycles&&e>2&&e%17===0&&o.push("related"),[...new Set(o)]}function Vy(e,t,r,o=42){if(ie(t,"item index"),K(r,"item count"),t>=r)throw new RangeError(`Corpus item index ${t} exceeds ${r}`);let n=Math.min(e.component_count,r),s=t%n,i=Math.floor(t/n),a=0,d=1;for(let E=0;E<e.hierarchy_depth;E+=1)a=Math.min(Number.MAX_SAFE_INTEGER,a+d),d=Math.min(Number.MAX_SAFE_INTEGER,d*e.hierarchy_fanout);let c=i%a,l=i-c,p=c===0?void 0:s+(l+Math.floor((c-1)/e.hierarchy_fanout))*n,f=Date.UTC(2026,0,1),_=e.age_span_days*864e5,g=new Date(f+(r===1?0:Math.round(t/(r-1)*_))).toISOString(),T=(t*37+o)%100;return{index:t,id:`pm-s${t.toString(36).padStart(7,"0")}`,...p===void 0?{}:{parent:`pm-s${p.toString(36).padStart(7,"0")}`},component:s,timestamp:g,author:`pm-corpus-agent-${(t+o)%Math.min(e.author_cardinality,r)}`,history_entry_count:e.history_entries_per_item,dependency_kinds:Qr(t,e),has_comment:T<e.comments_per_100_items,has_note:T<e.notes_per_100_items,has_learning:T<e.learnings_per_100_items,...e.custom_types.length>0&&t%11===0?{custom_type:e.custom_types[t%e.custom_types.length]}:{},...e.custom_statuses.length>0&&t%13===0?{custom_status:e.custom_statuses[t%e.custom_statuses.length]}:{}}}var ct=class{shape;authors=new Set;components=new Set;depths=new Map;childCounts=new Map;edgeKinds={};expectedEdgeKinds={};annotations={comments:0,notes:0,learnings:0};annotationFields;planMismatches=[];itemCount=0;observedDepth=0;observedFanout=0;historyEntryCount=0;firstTimestamp=null;lastTimestamp=null;constructor(t){this.shape=t,this.annotationFields=[["comments","has_comment",t.comments_per_100_items],["notes","has_note",t.notes_per_100_items],["learnings","has_learning",t.learnings_per_100_items]]}recordMismatch(t,r){t&&this.planMismatches.push(r)}recordEdgeKinds(t,r){for(let o of r)t[o]=(t[o]??0)+1}add(t){this.itemCount+=1,this.authors.add(t.author),this.components.add(t.component),this.recordMismatch(this.depths.has(t.id),`duplicate_id:${t.id}`);let r=1;if(t.parent!==void 0){let o=this.depths.get(t.parent);this.recordMismatch(o===void 0,`parent_missing:${t.parent}`),r=(o??0)+1;let n=(this.childCounts.get(t.parent)??0)+1;this.childCounts.set(t.parent,n),this.observedFanout=Math.max(this.observedFanout,n)}this.depths.set(t.id,r),this.observedDepth=Math.max(this.observedDepth,r),this.historyEntryCount+=t.history_entry_count,this.recordMismatch(t.history_entry_count!==this.shape.history_entries_per_item,"history_entries_per_item:drift"),this.firstTimestamp=this.firstTimestamp===null||t.timestamp<this.firstTimestamp?t.timestamp:this.firstTimestamp,this.lastTimestamp=this.lastTimestamp===null||t.timestamp>this.lastTimestamp?t.timestamp:this.lastTimestamp;for(let[o,n]of this.annotationFields)this.annotations[o]+=Number(t[n]);this.recordEdgeKinds(this.edgeKinds,t.dependency_kinds),this.recordEdgeKinds(this.expectedEdgeKinds,Qr(t.index,this.shape))}finish(){let t=Math.min(this.shape.author_cardinality,this.itemCount),r=Math.min(this.shape.component_count,this.itemCount),o=[...this.planMismatches,...this.itemCount===0?["item_count:empty"]:[],...this.authors.size===t?[]:[`author_count:${this.authors.size}!=${t}`],...this.components.size===r?[]:[`component_count:${this.components.size}!=${r}`],...this.observedDepth<=this.shape.hierarchy_depth?[]:[`hierarchy_depth:${this.observedDepth}>${this.shape.hierarchy_depth}`],...this.observedFanout<=this.shape.hierarchy_fanout?[]:[`hierarchy_fanout:${this.observedFanout}>${this.shape.hierarchy_fanout}`]];for(let[i,,a]of this.annotationFields){let d=Math.floor(this.itemCount/100),c=this.itemCount%100,l=d*a+Math.max(0,a+c-100),p=d*a+Math.min(a,c),f=this.annotations[i];(f<l||f>p)&&o.push(`${i}:${f}!in[${l},${p}]`)}let n=new Set([...Object.keys(this.edgeKinds),...Object.keys(this.expectedEdgeKinds)]);for(let i of[...n].sort()){let a=this.edgeKinds[i]??0,d=this.expectedEdgeKinds[i]??0;a!==d&&o.push(`edge_kind:${i}:${a}!=${d}`)}let s=[...new Set(o)];return{shape:this.shape.name,item_count:this.itemCount,author_count:this.authors.size,component_count:this.components.size,hierarchy_depth:this.observedDepth,hierarchy_fanout:this.observedFanout,timestamp_range:{first:this.firstTimestamp,last:this.lastTimestamp},history_entry_count:this.historyEntryCount,annotations:{...this.annotations},edge_kinds:{...this.edgeKinds},matches_declaration:s.length===0,mismatches:s}}};function eo(e){return new ct(e)}function Ky(e,t){let r=eo(e);for(let o of t)r.add(o);return r.finish()}(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]="48d03e9b-14a4-545c-8e5d-5f5f2092a113")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6a6b2905-b6b7-5b46-b87d-8b8287e37745")}catch{}})();async function Wy(){let e=Ge(process.cwd(),process.env.PM_PATH);await vt(e,(t,r)=>Ot(t,r,{apply_runtime_defaults:!0}))}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4534b1c9-de27-5745-88f2-641b00b94714")}catch{}})();async function Yy(){await Rt()}(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]="c1cb8d82-20a6-5460-a0ff-f55312911218")}catch{}})();var to=["lines","branches","functions","statements"];function Xy(e,t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError(`Coverage entry for ${e} must be an object.`)}function Jy(e,t,r){if(typeof r!="object"||r===null||Array.isArray(r))throw new TypeError(`Coverage entry ${e} has invalid ${t} counts.`);let o=r;if(typeof o.covered!="number"||typeof o.total!="number"||!Number.isInteger(o.covered)||!Number.isInteger(o.total)||o.covered<0||o.total<o.covered)throw new TypeError(`Coverage entry ${e} has invalid ${t} counts.`);return{covered:o.covered,total:o.total}}function Zy(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Coverage summary must be a JSON object.");if(!("total"in e))throw new TypeError("Coverage summary is missing the total entry.");let t=[];for(let[r,o]of Object.entries(e)){Xy(r,o);for(let n of to){let s=Jy(r,n,o[n]),i=s.total-s.covered;i>0&&t.push({file:r,metric:n,uncovered:i,...s})}}return t}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var Qy=["captured_redacted","captured_verbatim"],eb=[{label:"home directory",pattern:/(?:\/home\/|\/Users\/)[^/\s"']+/u},{label:"GitHub token",pattern:/\b(?:gh[oprsu]_[A-Za-z0-9_]{20,})\b/u},{label:"npm token",pattern:/\bnpm_[A-Za-z0-9]{20,}\b/u},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u}];function v(e){return typeof e=="string"&&e.trim().length>0}function tb(e,t){if(typeof t!="object"||t===null||Array.isArray(t))return[{boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} must contain a JSON object.`}];let r=t,o=[];r.boundary_id!==e.id&&o.push({boundary_id:e.id,kind:"fixture_boundary_mismatch",detail:`${e.fixture_path} names ${String(r.boundary_id)} instead of ${e.id}.`}),(r.version!==1||!Qy.includes(r.capture_source)||!v(r.capture_provenance)||!Array.isArray(r.redactions)||!r.redactions.every(v)||!("input"in r)||!("observed"in r))&&o.push({boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} lacks captured provenance, redaction metadata, input, or observed output.`});let n=JSON.stringify(t);for(let s of eb)s.pattern.test(n)&&o.push({boundary_id:e.id,kind:"unsafe_fixture",detail:`${e.fixture_path} contains a possible ${s.label}.`});return o}function rb(e,t){let r=Date.parse(e.waiver_expires_at),o=v(e.waiver_reason)&&v(e.waiver_owner)&&e.waiver_expires_at.endsWith("Z")&&_e(e.waiver_expires_at)&&Number.isFinite(r);return{captured:0,waived:o&&r>=t?1:0,findings:o?r<t?[{boundary_id:e.id,kind:"expired_waiver",detail:`Boundary ${e.id} waiver expired at ${e.waiver_expires_at}.`}]:[]:[{boundary_id:e.id,kind:"invalid_waiver",detail:`Boundary ${e.id} waiver requires reason, owner, and an RFC 3339 UTC expiry.`}]}}function ob(e,t,r){if(!v(e.id)||!v(e.producer)||!v(e.consumer)||!v(e.format))return{captured:0,waived:0,findings:[{boundary_id:v(e.id)?e.id:"unknown",kind:"invalid_boundary",detail:"Each boundary requires non-empty id, producer, consumer, and format."}]};if("fixture_path"in e){let o=t[e.fixture_path],n=v(e.fixture_path)&&e.fixture_path in t?tb(e,o):[{boundary_id:e.id,kind:"missing_fixture",detail:`Boundary ${e.id} fixture ${String(e.fixture_path)} is missing.`}];return{captured:n.length===0?1:0,waived:0,findings:n}}return rb(e,r)}function vL(e,t,r=new Date){let o=[];if(e.version!==1||!v(e.inventory_scope)||!Array.isArray(e.boundaries))return{ok:!1,boundary_count:0,captured_count:0,waived_count:0,findings:[{boundary_id:"registry",kind:"invalid_registry",detail:"Boundary registry requires version 1, inventory_scope, and boundaries."}]};let n=new Set,s=0,i=0;for(let a of e.boundaries){if(typeof a!="object"||a===null||Array.isArray(a)){o.push({boundary_id:"unknown",kind:"invalid_boundary",detail:"Each boundary must be a JSON object."});continue}let d=a,c=v(d.id)?d.id:void 0;if(c!==void 0&&n.has(c)){o.push({boundary_id:c,kind:"duplicate_boundary",detail:`Boundary ${c} is inventoried more than once.`});continue}c!==void 0&&n.add(c);let l=ob(d,t,r.getTime());s+=l.captured,i+=l.waived,o.push(...l.findings)}return o.sort((a,d)=>a.boundary_id!==d.boundary_id?a.boundary_id.localeCompare(d.boundary_id):a.kind.localeCompare(d.kind)),{ok:o.length===0,boundary_count:e.boundaries.length,captured_count:s,waived_count:i,findings:o}}import X from"node:fs";import lt 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]="aacf5738-098d-50f9-b619-19e472b577ea")}catch{}})();var ro=300*1e3,nb=3;function ML(e){return(e?.trim()||"development").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\./,"_")}function kL(e,t){let r=t.trim();if(!/^[a-zA-Z0-9_-][a-zA-Z0-9._-]*$/.test(r))throw new TypeError("Compile-cache generation must be a safe non-empty filename token.");X.mkdirSync(e,{recursive:!0});let o=lt.join(e,r);X.mkdirSync(o,{recursive:!0});let n=new Date;X.utimesSync(o,n,n);let s=X.readdirSync(e).filter(c=>c!==r).flatMap(c=>{try{return[{name:c,mtimeMs:X.statSync(lt.join(e,c)).mtimeMs}]}catch(l){if(l instanceof Error&&"code"in l&&fe(l))return[];throw l}}).sort((c,l)=>l.mtimeMs-c.mtimeMs||c.name.localeCompare(l.name)),i=s.filter(c=>n.getTime()-c.mtimeMs<ro),a=Math.max(0,nb-1-i.length),d=s.filter(c=>n.getTime()-c.mtimeMs>=ro).slice(a).map(c=>c.name).sort((c,l)=>c.localeCompare(l));for(let c of d)X.rmSync(lt.join(e,c),{recursive:!0,force:!0,maxRetries:3,retryDelay:50});return{retained:r,removed:d}}import{createHash as ib}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ff60bc5b-bd85-5b3c-9a55-21e7e72477ac")}catch{}})();var pt=1;function J(e){e?.throwIfAborted()}function U(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${t} must be non-empty`);return e.trim()}function Z(e,t,r={}){let o=Date.parse(r.createdAt??new Date().toISOString());if(!Number.isFinite(o))throw new TypeError("Relationship graph createdAt must be a valid timestamp");let n=e.nodes(),s=e.edges(),i=t.list();return Object.freeze({version:pt,fingerprint:ib("sha256").update(I({nodes:n,edges:s,kinds:i})).digest("hex"),created_at:new Date(o).toISOString(),nodes:n,edges:s,kinds:i})}function sb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ae(e){if(!sb(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==pt)throw new TypeError(`Unsupported relationship graph snapshot version: ${String(e.version)}`);if(!Array.isArray(e.nodes)||e.nodes.some(n=>typeof n!="string"))throw new TypeError("Relationship graph snapshot nodes must be strings");if(!Array.isArray(e.edges)||!Array.isArray(e.kinds))throw new TypeError("Relationship graph snapshot edges and kinds must be arrays");if(typeof e.created_at!="string"||!Number.isFinite(Date.parse(e.created_at)))throw new TypeError("Relationship graph snapshot created_at must be valid");if(typeof e.fingerprint!="string")throw new TypeError("Relationship graph snapshot fingerprint must be a string");let t=new Ue([]);for(let n of e.kinds)t.register(n);let r=new z(e.nodes,e.edges,t),o=Z(r,t,{createdAt:e.created_at});if(o.fingerprint!==e.fingerprint)throw new TypeError("Relationship graph snapshot fingerprint mismatch");return{snapshot:o,registry:t,graph:r}}async function x(e,t){U(e.name,"adapter name");let r=U(t.workspace,"workspace");J(t.signal);let o=await e.read({...t,workspace:r});return J(t.signal),o===null?null:ae(o)}async function Re(e,t){let r=U(t.workspace,"workspace"),o=ae(t.snapshot).snapshot,n=await x(e,{workspace:r,signal:t.signal});if(n?.snapshot.fingerprint===o.fingerprint)return{adapter:e.name,workspace:r,disposition:"current",fingerprint:o.fingerprint,previous_fingerprint:n.snapshot.fingerprint,node_count:o.nodes.length,edge_count:o.edges.length};if(J(t.signal),await e.replace({workspace:r,signal:t.signal,snapshot:o,expected_fingerprint:n?.snapshot.fingerprint??null}),(await x(e,{workspace:r,signal:t.signal}))?.snapshot.fingerprint!==o.fingerprint)throw new Error(`Relationship graph adapter "${e.name}" did not expose the replaced snapshot`);return{adapter:e.name,workspace:r,disposition:"written",fingerprint:o.fingerprint,...n?{previous_fingerprint:n.snapshot.fingerprint}:{},node_count:o.nodes.length,edge_count:o.edges.length}}function ab(e,t={}){let r=e.map(ae),o=new Map;for(let i of r)for(let a of i.snapshot.kinds){let d=o.get(a.kind);if(d&&I(d)!==I(a))throw new TypeError(`Conflicting federated relationship kind: ${a.kind}`);o.set(a.kind,a)}let n=new Ue([...o.values()].sort((i,a)=>i.kind.localeCompare(a.kind))),s=new z(new Set(r.flatMap(i=>[...i.snapshot.nodes])),r.flatMap(i=>[...i.snapshot.edges]),n);return Z(s,n,t)}var se=class{name;#e=new Map;constructor(t="memory"){this.name=U(t,"adapter name")}async read(t){J(t.signal);let r=this.#e.get(U(t.workspace,"workspace"));return r?structuredClone(r):null}async replace(t){J(t.signal);let r=U(t.workspace,"workspace"),o=this.#e.get(r);if(t.expected_fingerprint!==void 0&&(o?.fingerprint??null)!==t.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${r}`);this.#e.set(r,structuredClone(ae(t.snapshot).snapshot))}async clear(t){J(t.signal);let r=U(t.workspace,"workspace"),o=this.#e.get(r);if(t.expected_fingerprint!==void 0&&(o?.fingerprint??null)!==t.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${r}`);this.#e.delete(r)}};(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]="e47f9bb8-f98e-5159-9116-29c3e6fedfc3")}catch{}})();function oo(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${t} must be a positive integer`);return e}function db(e){let t=oo(e.nodeCount,"nodeCount"),r=oo(e.edgeStride??1,"edgeStride"),o=e.topology??"chain";if(!["chain","star","disconnected"].includes(o))throw new TypeError(`Unsupported relationship graph topology: ${o}`);let n=(e.kind??"related").trim(),s=(e.idPrefix??"node").trim();if(!n||!s)throw new TypeError("Relationship graph kind and idPrefix must be non-empty");let i=o==="disconnected"?0:Math.floor((t-1)/r);return{node_count:t,edge_count:i,edge_basis:"fixture_generated",nodes:{*[Symbol.iterator](){for(let a=0;a<t;a+=1)yield`${s}-${a}`}},edges:{*[Symbol.iterator](){if(o!=="disconnected")for(let a=r;a<t;a+=r)yield{source:`${s}-${o==="star"?0:a-r}`,target:`${s}-${a}`,kind:n}}}}}function j(e,t){if(!e)throw new Error(`Relationship graph adapter conformance: ${t}`)}async function no(e,t={}){let r=t.workspace?.trim()||"pm-graph-conformance",o=wt(),n=Z(new z(["a","b"],[{source:"a",target:"b",kind:"related"}],o),o,{createdAt:"2026-01-01T00:00:00.000Z"}),s=Z(new z(["a","b","c"],[{source:"a",target:"b",kind:"related"},{source:"b",target:"c",kind:"blocked_by"}],o),o,{createdAt:"2026-01-02T00:00:00.000Z"}),i=[];j(await x(e,{workspace:r})===null,"workspace must start empty"),i.push({name:"empty-read",passed:!0});let a=await Re(e,{workspace:r,snapshot:n});j(a.disposition==="written","first sync must write"),i.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:r})).nodes.push("mutated-reader-copy"),j((await x(e,{workspace:r}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),i.push({name:"read-isolation",passed:!0}),j((await Re(e,{workspace:r,snapshot:n})).disposition==="current","identical sync must be idempotent"),i.push({name:"idempotent-sync",passed:!0}),await e.replace({workspace:r,snapshot:s,expected_fingerprint:n.fingerprint}),j((await x(e,{workspace:r}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),i.push({name:"replacement-visibility",passed:!0});let d=!1;try{await e.replace({workspace:r,snapshot:n,expected_fingerprint:n.fingerprint})}catch{d=!0}return j(d,"stale compare-and-swap must fail"),i.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:r,expected_fingerprint:s.fingerprint}),j(await x(e,{workspace:r})===null,"clear must remove the workspace"),i.push({name:"clear",passed:!0})),{adapter:e.name,workspace:r,cases:Object.freeze(i),clear_supported:e.clear!==void 0}}function cb(e){return no(new se,e?{workspace:e}:{})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="58736688-35d0-545d-892e-e0ede7fedc1a")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d45a8203-4501-5797-a6cc-a2e7844adec9")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f5567aa1-0268-574d-907b-38d6249538ce")}catch{}})();var ut=2,lb=["self_reported","independent_transport"];function Ie(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function de(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function io(e,t,r=!1){if(!Array.isArray(e)||e.length===0)throw new TypeError(`${t} must be a non-empty string array`);return e.map((o,n)=>{let s=de(o,`${t}[${String(n)}]`);return r?o:s})}function mt(e,t){return e===void 0?void 0:de(e,t)}function pb(e,t){if(e===void 0)return;if(!Ie(e)||Object.keys(e).length===0)throw new TypeError(`${t} must be a non-empty object`);let r=Object.entries(e).map(([o,n])=>{if(o.length===0||o.split(".").some(s=>s.length===0))throw new TypeError(`${t} must use dot-separated own-property paths`);if(n!==null&&typeof n!="string"&&typeof n!="boolean"&&(typeof n!="number"||!Number.isFinite(n)))throw new TypeError(`${t} values must be JSON primitives`);return[o,n]});return Object.fromEntries(r)}function ub(e,t,r,o,n,s){if(o==="refusal"){if(We(r)||n===void 0||s===void 0)throw new TypeError(`${e} refusal steps require a non-success exit, error code, and refusal surface`);return}if(n!==void 0||s!==void 0)throw new TypeError(`${e} only refusal steps may declare expected_error_code or expected_refusal_surface`);let i=bt(t);if(i===void 0)throw new TypeError(`${e}.args must identify a command after global flags`);let a=t[i].trim().toLowerCase();if(a==="history"){let l=Tt(t.slice(i+1));l!==void 0&&(a=Le(`history ${l}`))}let d=Dt(a);if(!We(r)||r!==0&&!d?.exit_codes.some(l=>l===r))throw new TypeError(`${e} successful output must use exit code 0 or a command-declared successful effect exit`);let c=Lt(a).kind;if(o!==c)throw new TypeError(`${e} expected ${o}, but ${a} declares ${c}`)}function mb(e,t,r){if(!Ie(e))throw new TypeError(`tasks.${t}.steps[${String(r)}] must be an object`);let o=`tasks.${t}.steps[${String(r)}]`,n=de(e.id,`${o}.id`),s=io(e.args,`${o}.args`,!0),i=e.expected_exit_code;if(typeof i!="number"||!Number.isSafeInteger(i))throw new TypeError(`${o}.expected_exit_code must be a safe integer`);let a=e.expected_output_kind;if(a!=="refusal"&&!Nt.includes(a))throw new TypeError(`${o}.expected_output_kind is unsupported`);let d=a,c=e.expected_accounting_mode;if(!lb.includes(c))throw new TypeError(`${o}.expected_accounting_mode is unsupported`);let l=c;if(l==="independent_transport"&&d!=="refusal")throw new TypeError(`${o} independent_transport accounting is supported only for refusal steps`);let p=io(e.required_fields,`${o}.required_fields`);if(p.some(E=>E.split(".").some(q=>q.length===0)))throw new TypeError(`${o}.required_fields must contain dot-separated own-property paths`);let f=pb(e.expected_field_values,`${o}.expected_field_values`),_=mt(e.expected_error_code,`${o}.expected_error_code`),g=mt(e.expected_refusal_surface,`${o}.expected_refusal_surface`),T=mt(e.recovery_for,`${o}.recovery_for`);return ub(o,s,i,d,_,g),{id:n,args:s,expected_exit_code:i,expected_output_kind:d,expected_accounting_mode:l,required_fields:p,...f?{expected_field_values:f}:{},..._?{expected_error_code:_}:{},...g?{expected_refusal_surface:g}:{},...T?{recovery_for:T}:{}}}function fb(e,t){if(!Ie(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let r=de(e.id,`tasks[${String(t)}].id`),o=de(e.description,`tasks.${r}.description`);if(!Array.isArray(e.steps)||e.steps.length===0)throw new TypeError(`tasks.${r}.steps must be a non-empty array`);let n=e.steps.map((i,a)=>mb(i,r,a)),s=new Map;for(let i of n){if(s.has(i.id))throw new TypeError(`tasks.${r} contains duplicate step id ${i.id}`);if(i.recovery_for!==void 0&&(s.get(i.recovery_for)?.expected_output_kind!=="refusal"||i.expected_output_kind==="refusal"))throw new TypeError(`tasks.${r}.${i.id} recovery_for must reference an earlier refusal and declare successful output`);s.set(i.id,i)}if(n.at(-1)?.expected_output_kind==="refusal")throw new TypeError(`tasks.${r} completed task must terminate with successful output`);for(let i of n)if(i.expected_output_kind==="refusal"&&!n.some(a=>a.recovery_for===i.id))throw new TypeError(`tasks.${r}.${i.id} refusal must have a later successful recovery_for step`);return{id:r,description:o,steps:n}}function cD(e){if(!Ie(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==ut)throw new TypeError(`agent-task transcript corpus version must be ${String(ut)}`);if(!Array.isArray(e.tasks)||e.tasks.length===0)throw new TypeError("agent-task transcript corpus tasks must be non-empty");let t=e.tasks.map((o,n)=>fb(o,n)),r=new Set;for(let o of t){if(r.has(o.id))throw new TypeError(`duplicate agent-task transcript id ${o.id}`);r.add(o.id)}return{version:ut,tasks:t}}import{createHash as so}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7163a078-d8be-5bca-813f-c941fcb8e406")}catch{}})();function ao(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${t} must be non-empty`);return e.trim()}function mD(e,t){let r=ao(t.migrationId,"migrationId"),o=ao(t.author,"author"),n=Date.parse(t.timestamp);if(!Number.isFinite(n))throw new TypeError("Relationship backfill timestamp must be valid");let s=new Date(n).toISOString(),i=He(e,void 0,t.registry),a=i.graph.nodes(),d=i.graph.edges().map(f=>{let _=so("sha256").update(JSON.stringify([r,f.kind,f.source,f.target,f.createdAt??null,f.author??null,f.payload??null])).digest("hex").slice(0,24);return Object.freeze({eventId:`backfill:${r}:${_}`,relationshipId:`migration:${r}:${_}`,action:"add",edge:f,author:o,timestamp:s,reason:`Backfill ${r} from legacy item metadata`})}),c=so("sha256").update(JSON.stringify({migrationId:r,nodes:a,events:d})).digest("hex"),l=new Set([...t.existingEventIds??[]].filter(f=>typeof f=="string").map(f=>f.trim()).filter(Boolean)),p=d.filter(f=>!l.has(f.eventId));return Object.freeze({migration_id:r,fingerprint:c,nodes:a,events:Object.freeze(p),edge_count:d.length,skipped_existing_count:d.length-p.length,duplicate_dependency_rows:i.duplicateRows.length,dangling_reference_count:i.dangling.active.length+i.dangling.legacy_terminal.length})}import*as co from"node:module";(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]="7a1d7194-6ff1-5365-ab64-80b47b0176d7")}catch{}})();var ce=["suggested_retry","candidate_command","example","next_step","migration_hint","restore_with"],ft={suggested_retry:{kind:"suggested_retry",semantics:"recovery"},retry_command:{kind:"suggested_retry",semantics:"recovery"},candidate_command:{kind:"candidate_command",semantics:"recovery"},candidate_commands:{kind:"candidate_command",semantics:"recovery"},fallback_candidates:{kind:"candidate_command",semantics:"recovery",nested_value_field:"command"},next_best_command:{kind:"candidate_command",semantics:"recovery"},example:{kind:"example",semantics:"recovery"},examples:{kind:"example",semantics:"recovery"},next_step:{kind:"next_step",semantics:"recovery"},next_steps:{kind:"next_step",semantics:"recovery"},suggested_next_steps:{kind:"next_step",semantics:"recovery"},migration_hint:{kind:"migration_hint",semantics:"replacement"},migration_hints:{kind:"migration_hint",semantics:"replacement"},restore_with:{kind:"restore_with",semantics:"behavior_preserving"}},_D=Object.freeze(Object.keys(ft));function lo(e){if(Object.hasOwn(ft,e))return ft[e]}var _b=new Set([..."=([{,:;!?&|+-*%^~<>","=>"]);function Q(e,t){return e<t?-1:e>t?1:0}function hb(e,t){let r=e[t],o=t+1,n="";for(;o<e.length&&e[o]!==r;)e[o]==="\\"?o+=2:(n+=e[o],o+=1);return e[o]===r&&(o+=1),{next:o,value:n}}function gb(e){return e===void 0||e.kind==="punctuator"&&_b.has(e.value)||e.kind==="identifier"&&["return","case","throw","else","yield"].includes(e.value)}function yb(e,t){if(/\s/u.test(e[t]))return t+1;if(e.startsWith("//",t)){let r=e.indexOf(`
|
|
30
|
+
`)).digest("hex").slice(0,16)}#r(t,r){if(!t)return 0;try{let o=JSON.parse(Buffer.from(t,"base64url").toString("utf8"));return(typeof o!="object"||o===null||!("fingerprint"in o)||o.fingerprint!==this.#t||!("scope"in o)||o.scope!==r||!("offset"in o)||!Number.isInteger(o.offset)||Number(o.offset)<0)&&C("Skill cursor is invalid or stale."),Number(o.offset)}catch(o){if(o instanceof u)throw o;return C("Skill cursor is invalid or stale.")}}#o(t,r){return Buffer.from(JSON.stringify({fingerprint:this.#t,offset:t,scope:r})).toString("base64url")}static async load(t){let r=await Ur(M.join(t.packageRoot,".agents","skills"),"package",t.packageVersion);if(t.workspaceRoot){let o=M.resolve(t.packageRoot,".agents","skills"),n=M.resolve(t.workspaceRoot,".agents","skills");if(n!==o){let s=await Ur(n,"workspace",t.packageVersion);for(let[i,a]of s)r.set(i,a)}}return new e(r)}list(t={}){let r=t.limit??P.defaultPageSize;Fr.has(r)||C(`Skill list limit must be an integer from 1 to ${P.maxPageSize}.`);let o=this.#r(t.cursor,"skills/list"),n=[...this.#e.values()].sort((d,c)=>d.uri.localeCompare(c.uri)),s=n.slice(o,o+r),i=o+s.length,a=i<n.length;return{skills:s.map(jr),hasMore:a,...a?{nextCursor:this.#o(i,"skills/list")}:{}}}get(t){let r=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/SKILL\.md$/u.exec(t),o=r?this.#e.get(r[1]):void 0;return o||C(`Unknown pm MCP skill: ${t}.`,{field:"uri"}),jr(o)}read(t){let r=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/(.+)$/u.exec(t),o=r?this.#e.get(r[1]):void 0,n=r?.[2]??"",s=o&&n?o.files.get(n):void 0,i=o?.resources.find(c=>c.uri===t);(!o||!s||!i)&&C(`Unknown pm MCP skill resource: ${t}.`,{field:"uri"});let a={digest:i.digest,origin:o._meta.origin,trust:"untrusted"},d=Gr(n,s);return d!=="application/octet-stream"?{contents:[{uri:t,mimeType:d,text:s.toString("utf8"),_meta:a}]}:{contents:[{uri:t,mimeType:d,blob:s.toString("base64"),_meta:a}]}}readDirectory(t,r={}){let o=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(.+))?$/u.exec(t),n=o?this.#e.get(o[1]):void 0;n||C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let s=(o?.[2]??"").replace(/\/$/u,""),i=s.length>0?`${s}/`:"",a=`skill://${o[1]}`,d=new Map;for(let T of n.resources){let E=T.uri.slice(`${a}/`.length);if(!E.startsWith(i))continue;let q=E.slice(i.length),[R,...Ro]=q.split("/"),Io=`${a}/${i}${R}`,Po=n.files.get(`${i}${R}`);d.set(R,{uri:Io,name:R,mimeType:Ro.length>0?"inode/directory":Gr(R,Po)})}s.length>0&&d.size===0&&C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let c=r.limit??P.maxPageSize;Fr.has(c)||C(`Skill directory limit must be an integer from 1 to ${P.maxPageSize}.`);let l=this.#r(r.cursor,t),p=[...d.values()].sort((T,E)=>T.uri.localeCompare(E.uri)),f=p.slice(l,l+c),_=l+f.length,g=_<p.length;return{resources:f,hasMore:g,...g?{nextCursor:this.#o(_,t)}:{}}}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38023567-8a5b-5e25-8d71-5112f74d1894")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="619dbd55-b854-5e69-b5a5-c0bcada81629")}catch{}})();var Hr="https://schema.unbrained.dev/pm/workspace-recipe/v1";function dt(e,t){if(e===null||typeof e=="boolean"||typeof e=="string")return e;if(typeof e=="number"){if(!Number.isFinite(e))throw new Error(`Workspace recipe JSON number must be finite at ${t}`);return e}if(Array.isArray(e))return Object.freeze(e.map((r,o)=>dt(r,`${t}[${o}]`)));if(typeof e!="object"||Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw new Error(`Workspace recipe input must contain JSON values at ${t}`);return Object.freeze(Object.fromEntries(Object.entries(e).map(([r,o])=>[r,dt(o,`${t}.${r}`)])))}function ve(e){if(e.schema!==Hr)throw new Error(`Unsupported workspace recipe schema: ${e.schema}`);let t=Et(e);if(e.operations.some(r=>r.action.trim().length===0||r.input===null||Array.isArray(r.input)))throw new Error("Workspace recipe operations require an action and object input");return Object.freeze({...t,operations:Object.freeze(e.operations.map((r,o)=>Object.freeze({action:r.action,input:dt(r.input,`operations[${o}].input`)})))})}async function Vr(e,t){let r=ve(e);return St(r,t)}async function ky(e,t){return Vr(e,async()=>{let r=[];for(let[o,n]of e.operations.entries())r.push(await t(n,o));return r})}(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]="c234be1c-35b7-5388-8a70-a012e9a34389")}catch{}})();var Kr="pm.agent-observation/v1",Wr="pm.agent-verdict/v1",Yr="pm.agent-episode/v1";function O(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer.`)}function k(e,t){if(e.trim().length===0)throw new Error(`${t} must not be empty.`)}function ne(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))ne(t)}return e}function xy(e){if(e.length===0)throw new Error("observation.reads must declare at least one bounded read.");let t=0;for(let r of e)if(k(r.command,"observation.reads.command"),O(r.budget_tokens,"observation.reads.budget_tokens"),t+=r.budget_tokens,!Number.isSafeInteger(t))throw new Error("observation read ceilings exceed safe integer range.")}function Ny(e){if(e.basis!=="emitted_bytes")throw new Error("observation calibration must use emitted_bytes.");for(let r of e.samples)if(!Number.isSafeInteger(r)||r<0)throw new Error("observation calibration samples must be non-negative safe integers.");if(e.samples.length===0)throw new Error("observation calibration must include at least one sample.");if(O(e.expected_emitted_bytes,"observation.calibration.expected_emitted_bytes"),!Number.isSafeInteger(e.tolerance_bytes)||e.tolerance_bytes<0)throw new Error("observation.calibration.tolerance_bytes must be a non-negative safe integer.");let t=e.samples.reduce((r,o)=>r+o,0)/e.samples.length;if(Math.abs(t-e.expected_emitted_bytes)>e.tolerance_bytes)throw new Error("observation expected_emitted_bytes is outside the calibrated sample tolerance.")}function Ly(e){if(e.length===0)throw new Error("observation.tiers must declare a degradation ladder.");let t=new Set,r=Number.POSITIVE_INFINITY;for(let o of e){if(k(o.id,"observation.tiers.id"),O(o.max_tokens,"observation.tiers.max_tokens"),t.has(o.id))throw new Error(`Duplicate observation tier: ${o.id}.`);if(t.add(o.id),o.max_tokens>r)throw new Error("observation tiers must be ordered from largest to smallest max_tokens.");r=o.max_tokens;let n=new Set;for(let s of o.fields){if(F(s,"observation.tiers.fields"),n.has(s))throw new Error(`Duplicate observation tier field: ${s}.`);n.add(s)}}}function Dy(e){if(e.schema!==Kr)throw new Error(`observation.schema must be ${Kr}.`);return k(e.id,"observation.id"),O(e.version,"observation.version"),xy(e.reads),Ny(e.calibration),e.corpus_dependence.kind==="bounded"&&(k(e.corpus_dependence.dimension,"observation.corpus_dependence.dimension"),O(e.corpus_dependence.maximum,"observation.corpus_dependence.maximum")),Ly(e.tiers),ne(structuredClone(e))}function cL(e){return{contract_id:e.id,contract_version:e.version,guaranteed_ceiling_tokens:e.reads.reduce((t,r)=>t+r.budget_tokens,0),expected_emitted_bytes:e.calibration.expected_emitted_bytes,expected_tokens:Math.ceil(e.calibration.expected_emitted_bytes/4),tolerance_bytes:e.calibration.tolerance_bytes,calibration_basis:"emitted_bytes",corpus_dependence:e.corpus_dependence}}async function $y(e,t,r){O(r.budget_tokens,"observation request budget_tokens");let o=[];for(let[n,s]of e.tiers.entries()){o.push(s.id);let i=await t(s),a=Buffer.byteLength(I(i),"utf8"),d=Math.ceil(a/4);if(d<=Math.min(r.budget_tokens,s.max_tokens))return{status:"served",payload:i,receipt:{contract_id:e.id,contract_version:e.version,served_tier:s.id,degraded:n>0,attempted_tiers:o,emitted_bytes:a,estimated_tokens:d,calibration_basis:"emitted_bytes"}}}return{status:"refused",reason:"no_declared_tier_fits_budget",receipt:{contract_id:e.id,contract_version:e.version,served_tier:null,degraded:e.tiers.length>1,attempted_tiers:o,emitted_bytes:null,estimated_tokens:null,calibration_basis:"emitted_bytes"}}}function F(e,t){let r=e.split(".");if(r.some(o=>o.length===0||o==="__proto__"||o==="prototype"||o==="constructor"))throw new Error(`${t} must be a safe, non-empty dot-separated path.`);return r}function Xr(e,t){let r=e;for(let o of F(t,"recorded field path")){if(r===null||typeof r!="object"||!Object.hasOwn(r,o))return;r=r[o]}return r}function Fy(e){return`/${F(e,"verdict predicate path").map(t=>t.replaceAll("~","~0").replaceAll("/","~1")).join("/")}`}function Gy(e){if(e.kind!=="field_equals")return;let t;try{t=JSON.stringify(e.expected)}catch{throw new Error(`Expected value for verdict predicate ${e.id} must be JSON serializable.`)}if(t===void 0)throw new Error(`Expected value for verdict predicate ${e.id} must be JSON serializable.`)}function Uy(e){if(e.schema!==Wr)throw new Error(`verdict.schema must be ${Wr}.`);k(e.id,"verdict.id"),O(e.version,"verdict.version");let t=new Set;for(let o of e.predicates){k(o.id,"verdict.predicates.id"),F(o.path,"verdict.predicates.path");let n=o.kind;if(n!=="field_equals"&&n!=="field_present"&&n!=="field_absent")throw new Error(`Unsupported verdict predicate kind for ${o.id}.`);if(t.has(o.id))throw new Error(`Duplicate verdict predicate: ${o.id}.`);Gy(o),t.add(o.id)}if(e.composition.operator!=="all"&&e.composition.operator!=="any")throw new Error("verdict composition operator must be all or any.");if(e.composition.predicate_ids.length!==e.predicates.length)throw new Error("verdict composition must reference every predicate exactly once.");let r=new Set(e.composition.predicate_ids);if(r.size!==e.composition.predicate_ids.length||[...r].some(o=>!t.has(o)))throw new Error("verdict composition contains duplicate or unknown predicate ids.");return ne(structuredClone(e))}function jy(e,t){if(e.predicates.length===0)return{contract_id:e.id,contract_version:e.version,snapshot_id:t.snapshot_id,outcome:"not_applicable",score:null,policy:"verdict_only_no_reward",reason:"no_predicates_declared",predicates:[]};let r=new Map(e.predicates.map(i=>[i.id,i])),o=e.composition.predicate_ids.map(i=>{let a=r.get(i),d=Xr(t.state,a.path),c=a.kind==="field_present"?d!==void 0:a.kind==="field_absent"?d===void 0:I(d)===I(a.expected);return{id:i,outcome:c?"satisfied":"violated",evidence_pointer:`${t.snapshot_id}#${Fy(a.path)}`,evidence_digest:yt(I(d))}}),n=o.filter(i=>i.outcome==="satisfied").length,s=e.composition.operator==="all"?n===o.length:n>0;return{contract_id:e.id,contract_version:e.version,snapshot_id:t.snapshot_id,outcome:s?"satisfied":"violated",score:n/o.length,policy:"verdict_only_no_reward",predicates:o}}function lL(e){if(e.schema!==Yr)throw new Error(`episode.schema must be ${Yr}.`);if(k(e.id,"episode.id"),O(e.version,"episode.version"),!["benchmark","evaluation","training","scale_transfer"].includes(e.mode))throw new Error("episode.mode is not supported.");if(e.task_item_ids.length===0)throw new Error("episode.task_item_ids must declare at least one pm item.");for(let t of e.task_item_ids)k(t,"episode.task_item_ids");O(e.limits.max_actions,"episode.limits.max_actions"),O(e.limits.max_observations,"episode.limits.max_observations"),O(e.limits.max_tokens_per_observation,"episode.limits.max_tokens_per_observation");for(let t of e.observable_fields)F(t,"episode.observable_fields");for(let t of e.withheld_fields)F(t,"episode.withheld_fields");for(let t of e.observable_fields){let r=e.withheld_fields.find(o=>t===o||t.startsWith(`${o}.`)||o.startsWith(`${t}.`));if(r!==void 0)throw new Error(`Observable field ${t} overlaps withheld field ${r}.`)}for(let t of e.observation.tiers)for(let r of t.fields)if(!e.observable_fields.includes(r))throw new Error(`Observation tier field ${r} is not declared observable.`);return Dy(e.observation),Uy(e.verdict),ve(e.recipe),ne(structuredClone(e))}function By(e,t,r){let o=F(t,"observation projection field"),n=e;for(let[s,i]of o.entries()){if(s===o.length-1){r!==void 0&&(n[i]=structuredClone(r));return}let a=n[i];(a===null||typeof a!="object"||Array.isArray(a))&&(n[i]={}),n=n[i]}}function qy(e,t){let r={};for(let o of t)By(r,o,Xr(e,o));return r}async function pL(e,t){let r=[],o=0,n=0,s=!1,i,a={episode:{id:e.id,label:`pm agent environment v${e.version}`},provenance:{role:e.mode,topic:"agent-environment"}},d=await D(a,()=>t.reset(e.recipe));r.push({sequence:1,kind:"reset",state_id:d.state_id});let c=async()=>{if(s)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let p=await t.readRecordedState(),f=await $y(e.observation,async _=>qy(p.state,_.fields),{budget_tokens:e.limits.max_tokens_per_observation});return r.push({sequence:r.length+1,kind:"observation",state_id:f.receipt.served_tier??p.snapshot_id}),f},l=async(p=!1)=>{if(s&&!p)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let f=await t.readRecordedState(),_=jy(e.verdict,f);return r.push({sequence:r.length+1,kind:"verdict",state_id:f.snapshot_id}),_};return{observe:()=>D(a,c),step:async p=>{if(s)throw new Error("episode is already closed.");if(o>=e.limits.max_actions)throw new Error("episode exceeded limits.max_actions.");o+=1;let f=await D(a,()=>t.execute(p));return r.push({sequence:r.length+1,kind:"action",state_id:f.state_id}),f},score:()=>D(a,l),close:()=>i!==void 0?i:s?Promise.reject(new Error("episode is already closed.")):(s=!0,i=D(a,()=>l(!0)).then(p=>(r.push({sequence:r.length+1,kind:"close",state_id:p.snapshot_id}),{verdict:p,trajectory:ne(structuredClone(r))})).catch(p=>{throw s=!1,p}).finally(()=>{i=void 0}),i)}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1202ba19-0bcb-5478-b245-4472e361d4de")}catch{}})();var G="https://schema.unbrained.dev/pm/corpus-shape/v1";function K(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError(`Corpus shape ${t} must be a positive safe integer`);return e}function ie(e,t){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Corpus shape ${t} must be a non-negative safe integer`);return e}function Zr(e){if(!(typeof e!="object"||e===null||Object.isFrozen(e))){for(let t of Object.values(e))Zr(t);Object.freeze(e)}}function W(e){if(e.schema!==G)throw new TypeError(`Unsupported corpus shape schema: ${e.schema}`);if(e.name.trim().length===0||e.description.trim().length===0)throw new TypeError("Corpus shape name and description must be non-empty");if(K(e.hierarchy_depth,"hierarchy_depth"),K(e.hierarchy_fanout,"hierarchy_fanout"),ie(e.age_span_days,"age_span_days"),K(e.history_entries_per_item,"history_entries_per_item"),ie(e.comments_per_100_items,"comments_per_100_items"),ie(e.notes_per_100_items,"notes_per_100_items"),ie(e.learnings_per_100_items,"learnings_per_100_items"),K(e.author_cardinality,"author_cardinality"),K(e.component_count,"component_count"),e.edge_kind_mix.length===0||e.edge_kind_mix.some(r=>r.kind.trim().length===0||r.weight<=0))throw new TypeError("Corpus shape edge_kind_mix requires non-empty kinds with positive weights");if(e.terminal_statuses.some(r=>!e.custom_statuses.includes(r)))throw new TypeError("Corpus shape terminal_statuses must be declared in custom_statuses");let t=structuredClone(e);return Zr(t),t}var Oe=[{kind:"implements",weight:5},{kind:"blocked_by",weight:2},{kind:"discovered_from",weight:2},{kind:"verifies",weight:2},{kind:"supersedes",weight:1},{kind:"related",weight:4}],Y=Object.freeze({scratch:W({schema:G,name:"scratch",description:"Seconds-old, shallow project with minimal history.",hierarchy_depth:2,hierarchy_fanout:50,age_span_days:0,history_entries_per_item:1,comments_per_100_items:2,notes_per_100_items:1,learnings_per_100_items:1,edge_kind_mix:[{kind:"related",weight:1}],author_cardinality:2,component_count:1,include_cycles:!1,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),representative:W({schema:G,name:"representative",description:"Medium-lived project with rich evidence and typed lineage.",hierarchy_depth:5,hierarchy_fanout:8,age_span_days:730,history_entries_per_item:12,comments_per_100_items:30,notes_per_100_items:12,learnings_per_100_items:10,edge_kind_mix:Oe,author_cardinality:32,component_count:1,include_cycles:!1,custom_types:["Experiment"],custom_statuses:["review"],terminal_statuses:[],custom_fields:["domain"]}),"deep-graph":W({schema:G,name:"deep-graph",description:"Deep typed relationship graph with deterministic cycles.",hierarchy_depth:16,hierarchy_fanout:2,age_span_days:3650,history_entries_per_item:6,comments_per_100_items:15,notes_per_100_items:8,learnings_per_100_items:8,edge_kind_mix:Oe,author_cardinality:16,component_count:1,include_cycles:!0,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),"multi-decade":W({schema:G,name:"multi-decade",description:"Thirty-year event history with dense per-item evolution.",hierarchy_depth:6,hierarchy_fanout:6,age_span_days:10958,history_entries_per_item:24,comments_per_100_items:40,notes_per_100_items:20,learnings_per_100_items:16,edge_kind_mix:Oe,author_cardinality:64,component_count:1,include_cycles:!1,custom_types:["Program"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["portfolio"]}),"disconnected-archive":W({schema:G,name:"disconnected-archive",description:"Multiple disconnected historical project components.",hierarchy_depth:4,hierarchy_fanout:10,age_span_days:7305,history_entries_per_item:8,comments_per_100_items:10,notes_per_100_items:5,learnings_per_100_items:6,edge_kind_mix:Oe,author_cardinality:24,component_count:5,include_cycles:!1,custom_types:["Archive"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["archive_source"]})});function zy(){return Object.keys(Y).sort().map(e=>Y[e])}function Hy(e){let t=e.trim().toLowerCase();if(!Object.hasOwn(Y,t))throw new TypeError(`Unknown corpus shape "${e}". Available: ${Object.keys(Y).join(", ")}`);return Y[t]}var Jr=new WeakMap;function Qr(e,t){if(e===0)return[];let r=Jr.get(t);r===void 0&&(r=t.edge_kind_mix.flatMap(n=>Array.from({length:n.weight},()=>n.kind)),Jr.set(t,r));let o=[r[e%r.length]];return t.include_cycles&&e>2&&e%17===0&&o.push("related"),[...new Set(o)]}function Vy(e,t,r,o=42){if(ie(t,"item index"),K(r,"item count"),t>=r)throw new RangeError(`Corpus item index ${t} exceeds ${r}`);let n=Math.min(e.component_count,r),s=t%n,i=Math.floor(t/n),a=0,d=1;for(let E=0;E<e.hierarchy_depth;E+=1)a=Math.min(Number.MAX_SAFE_INTEGER,a+d),d=Math.min(Number.MAX_SAFE_INTEGER,d*e.hierarchy_fanout);let c=i%a,l=i-c,p=c===0?void 0:s+(l+Math.floor((c-1)/e.hierarchy_fanout))*n,f=Date.UTC(2026,0,1),_=e.age_span_days*864e5,g=new Date(f+(r===1?0:Math.round(t/(r-1)*_))).toISOString(),T=(t*37+o)%100;return{index:t,id:`pm-s${t.toString(36).padStart(7,"0")}`,...p===void 0?{}:{parent:`pm-s${p.toString(36).padStart(7,"0")}`},component:s,timestamp:g,author:`pm-corpus-agent-${(t+o)%Math.min(e.author_cardinality,r)}`,history_entry_count:e.history_entries_per_item,dependency_kinds:Qr(t,e),has_comment:T<e.comments_per_100_items,has_note:T<e.notes_per_100_items,has_learning:T<e.learnings_per_100_items,...e.custom_types.length>0&&t%11===0?{custom_type:e.custom_types[t%e.custom_types.length]}:{},...e.custom_statuses.length>0&&t%13===0?{custom_status:e.custom_statuses[t%e.custom_statuses.length]}:{}}}var ct=class{shape;authors=new Set;components=new Set;depths=new Map;childCounts=new Map;edgeKinds={};expectedEdgeKinds={};annotations={comments:0,notes:0,learnings:0};annotationFields;planMismatches=[];itemCount=0;observedDepth=0;observedFanout=0;historyEntryCount=0;firstTimestamp=null;lastTimestamp=null;constructor(t){this.shape=t,this.annotationFields=[["comments","has_comment",t.comments_per_100_items],["notes","has_note",t.notes_per_100_items],["learnings","has_learning",t.learnings_per_100_items]]}recordMismatch(t,r){t&&this.planMismatches.push(r)}recordEdgeKinds(t,r){for(let o of r)t[o]=(t[o]??0)+1}add(t){this.itemCount+=1,this.authors.add(t.author),this.components.add(t.component),this.recordMismatch(this.depths.has(t.id),`duplicate_id:${t.id}`);let r=1;if(t.parent!==void 0){let o=this.depths.get(t.parent);this.recordMismatch(o===void 0,`parent_missing:${t.parent}`),r=(o??0)+1;let n=(this.childCounts.get(t.parent)??0)+1;this.childCounts.set(t.parent,n),this.observedFanout=Math.max(this.observedFanout,n)}this.depths.set(t.id,r),this.observedDepth=Math.max(this.observedDepth,r),this.historyEntryCount+=t.history_entry_count,this.recordMismatch(t.history_entry_count!==this.shape.history_entries_per_item,"history_entries_per_item:drift"),this.firstTimestamp=this.firstTimestamp===null||t.timestamp<this.firstTimestamp?t.timestamp:this.firstTimestamp,this.lastTimestamp=this.lastTimestamp===null||t.timestamp>this.lastTimestamp?t.timestamp:this.lastTimestamp;for(let[o,n]of this.annotationFields)this.annotations[o]+=Number(t[n]);this.recordEdgeKinds(this.edgeKinds,t.dependency_kinds),this.recordEdgeKinds(this.expectedEdgeKinds,Qr(t.index,this.shape))}finish(){let t=Math.min(this.shape.author_cardinality,this.itemCount),r=Math.min(this.shape.component_count,this.itemCount),o=[...this.planMismatches,...this.itemCount===0?["item_count:empty"]:[],...this.authors.size===t?[]:[`author_count:${this.authors.size}!=${t}`],...this.components.size===r?[]:[`component_count:${this.components.size}!=${r}`],...this.observedDepth<=this.shape.hierarchy_depth?[]:[`hierarchy_depth:${this.observedDepth}>${this.shape.hierarchy_depth}`],...this.observedFanout<=this.shape.hierarchy_fanout?[]:[`hierarchy_fanout:${this.observedFanout}>${this.shape.hierarchy_fanout}`]];for(let[i,,a]of this.annotationFields){let d=Math.floor(this.itemCount/100),c=this.itemCount%100,l=d*a+Math.max(0,a+c-100),p=d*a+Math.min(a,c),f=this.annotations[i];(f<l||f>p)&&o.push(`${i}:${f}!in[${l},${p}]`)}let n=new Set([...Object.keys(this.edgeKinds),...Object.keys(this.expectedEdgeKinds)]);for(let i of[...n].sort()){let a=this.edgeKinds[i]??0,d=this.expectedEdgeKinds[i]??0;a!==d&&o.push(`edge_kind:${i}:${a}!=${d}`)}let s=[...new Set(o)];return{shape:this.shape.name,item_count:this.itemCount,author_count:this.authors.size,component_count:this.components.size,hierarchy_depth:this.observedDepth,hierarchy_fanout:this.observedFanout,timestamp_range:{first:this.firstTimestamp,last:this.lastTimestamp},history_entry_count:this.historyEntryCount,annotations:{...this.annotations},edge_kinds:{...this.edgeKinds},matches_declaration:s.length===0,mismatches:s}}};function eo(e){return new ct(e)}function Ky(e,t){let r=eo(e);for(let o of t)r.add(o);return r.finish()}(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]="48d03e9b-14a4-545c-8e5d-5f5f2092a113")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6a6b2905-b6b7-5b46-b87d-8b8287e37745")}catch{}})();async function Wy(){let e=Ge(process.cwd(),process.env.PM_PATH);await vt(e,(t,r)=>Ot(t,r,{apply_runtime_defaults:!0}))}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4534b1c9-de27-5745-88f2-641b00b94714")}catch{}})();async function Yy(){await Rt()}(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]="c1cb8d82-20a6-5460-a0ff-f55312911218")}catch{}})();var to=["lines","branches","functions","statements"];function Xy(e,t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError(`Coverage entry for ${e} must be an object.`)}function Jy(e,t,r){if(typeof r!="object"||r===null||Array.isArray(r))throw new TypeError(`Coverage entry ${e} has invalid ${t} counts.`);let o=r;if(typeof o.covered!="number"||typeof o.total!="number"||!Number.isInteger(o.covered)||!Number.isInteger(o.total)||o.covered<0||o.total<o.covered)throw new TypeError(`Coverage entry ${e} has invalid ${t} counts.`);return{covered:o.covered,total:o.total}}function Zy(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Coverage summary must be a JSON object.");if(!("total"in e))throw new TypeError("Coverage summary is missing the total entry.");let t=[];for(let[r,o]of Object.entries(e)){Xy(r,o);for(let n of to){let s=Jy(r,n,o[n]),i=s.total-s.covered;i>0&&t.push({file:r,metric:n,uncovered:i,...s})}}return t}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var Qy=["captured_redacted","captured_verbatim"],eb=[{label:"home directory",pattern:/(?:\/home\/|\/Users\/)[^/\s"']+/u},{label:"GitHub token",pattern:/\b(?:gh[oprsu]_[A-Za-z0-9_]{20,})\b/u},{label:"npm token",pattern:/\bnpm_[A-Za-z0-9]{20,}\b/u},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u}];function v(e){return typeof e=="string"&&e.trim().length>0}function tb(e,t){if(typeof t!="object"||t===null||Array.isArray(t))return[{boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} must contain a JSON object.`}];let r=t,o=[];r.boundary_id!==e.id&&o.push({boundary_id:e.id,kind:"fixture_boundary_mismatch",detail:`${e.fixture_path} names ${String(r.boundary_id)} instead of ${e.id}.`}),(r.version!==1||!Qy.includes(r.capture_source)||!v(r.capture_provenance)||!Array.isArray(r.redactions)||!r.redactions.every(v)||!("input"in r)||!("observed"in r))&&o.push({boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} lacks captured provenance, redaction metadata, input, or observed output.`});let n=JSON.stringify(t);for(let s of eb)s.pattern.test(n)&&o.push({boundary_id:e.id,kind:"unsafe_fixture",detail:`${e.fixture_path} contains a possible ${s.label}.`});return o}function rb(e,t){let r=Date.parse(e.waiver_expires_at),o=v(e.waiver_reason)&&v(e.waiver_owner)&&e.waiver_expires_at.endsWith("Z")&&_e(e.waiver_expires_at)&&Number.isFinite(r);return{captured:0,waived:o&&r>=t?1:0,findings:o?r<t?[{boundary_id:e.id,kind:"expired_waiver",detail:`Boundary ${e.id} waiver expired at ${e.waiver_expires_at}.`}]:[]:[{boundary_id:e.id,kind:"invalid_waiver",detail:`Boundary ${e.id} waiver requires reason, owner, and an RFC 3339 UTC expiry.`}]}}function ob(e,t,r){if(!v(e.id)||!v(e.producer)||!v(e.consumer)||!v(e.format))return{captured:0,waived:0,findings:[{boundary_id:v(e.id)?e.id:"unknown",kind:"invalid_boundary",detail:"Each boundary requires non-empty id, producer, consumer, and format."}]};if("fixture_path"in e){let o=t[e.fixture_path],n=v(e.fixture_path)&&e.fixture_path in t?tb(e,o):[{boundary_id:e.id,kind:"missing_fixture",detail:`Boundary ${e.id} fixture ${String(e.fixture_path)} is missing.`}];return{captured:n.length===0?1:0,waived:0,findings:n}}return rb(e,r)}function RL(e,t,r=new Date){let o=[];if(e.version!==1||!v(e.inventory_scope)||!Array.isArray(e.boundaries))return{ok:!1,boundary_count:0,captured_count:0,waived_count:0,findings:[{boundary_id:"registry",kind:"invalid_registry",detail:"Boundary registry requires version 1, inventory_scope, and boundaries."}]};let n=new Set,s=0,i=0;for(let a of e.boundaries){if(typeof a!="object"||a===null||Array.isArray(a)){o.push({boundary_id:"unknown",kind:"invalid_boundary",detail:"Each boundary must be a JSON object."});continue}let d=a,c=v(d.id)?d.id:void 0;if(c!==void 0&&n.has(c)){o.push({boundary_id:c,kind:"duplicate_boundary",detail:`Boundary ${c} is inventoried more than once.`});continue}c!==void 0&&n.add(c);let l=ob(d,t,r.getTime());s+=l.captured,i+=l.waived,o.push(...l.findings)}return o.sort((a,d)=>a.boundary_id!==d.boundary_id?a.boundary_id.localeCompare(d.boundary_id):a.kind.localeCompare(d.kind)),{ok:o.length===0,boundary_count:e.boundaries.length,captured_count:s,waived_count:i,findings:o}}import X from"node:fs";import lt 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]="aacf5738-098d-50f9-b619-19e472b577ea")}catch{}})();var ro=300*1e3,nb=3;function xL(e){return(e?.trim()||"development").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\./,"_")}function NL(e,t){let r=t.trim();if(!/^[a-zA-Z0-9_-][a-zA-Z0-9._-]*$/.test(r))throw new TypeError("Compile-cache generation must be a safe non-empty filename token.");X.mkdirSync(e,{recursive:!0});let o=lt.join(e,r);X.mkdirSync(o,{recursive:!0});let n=new Date;X.utimesSync(o,n,n);let s=X.readdirSync(e).filter(c=>c!==r).flatMap(c=>{try{return[{name:c,mtimeMs:X.statSync(lt.join(e,c)).mtimeMs}]}catch(l){if(l instanceof Error&&"code"in l&&fe(l))return[];throw l}}).sort((c,l)=>l.mtimeMs-c.mtimeMs||c.name.localeCompare(l.name)),i=s.filter(c=>n.getTime()-c.mtimeMs<ro),a=Math.max(0,nb-1-i.length),d=s.filter(c=>n.getTime()-c.mtimeMs>=ro).slice(a).map(c=>c.name).sort((c,l)=>c.localeCompare(l));for(let c of d)X.rmSync(lt.join(e,c),{recursive:!0,force:!0,maxRetries:3,retryDelay:50});return{retained:r,removed:d}}import{createHash as ib}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ff60bc5b-bd85-5b3c-9a55-21e7e72477ac")}catch{}})();var pt=1;function J(e){e?.throwIfAborted()}function U(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${t} must be non-empty`);return e.trim()}function Z(e,t,r={}){let o=Date.parse(r.createdAt??new Date().toISOString());if(!Number.isFinite(o))throw new TypeError("Relationship graph createdAt must be a valid timestamp");let n=e.nodes(),s=e.edges(),i=t.list();return Object.freeze({version:pt,fingerprint:ib("sha256").update(I({nodes:n,edges:s,kinds:i})).digest("hex"),created_at:new Date(o).toISOString(),nodes:n,edges:s,kinds:i})}function sb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ae(e){if(!sb(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==pt)throw new TypeError(`Unsupported relationship graph snapshot version: ${String(e.version)}`);if(!Array.isArray(e.nodes)||e.nodes.some(n=>typeof n!="string"))throw new TypeError("Relationship graph snapshot nodes must be strings");if(!Array.isArray(e.edges)||!Array.isArray(e.kinds))throw new TypeError("Relationship graph snapshot edges and kinds must be arrays");if(typeof e.created_at!="string"||!Number.isFinite(Date.parse(e.created_at)))throw new TypeError("Relationship graph snapshot created_at must be valid");if(typeof e.fingerprint!="string")throw new TypeError("Relationship graph snapshot fingerprint must be a string");let t=new Ue([]);for(let n of e.kinds)t.register(n);let r=new z(e.nodes,e.edges,t),o=Z(r,t,{createdAt:e.created_at});if(o.fingerprint!==e.fingerprint)throw new TypeError("Relationship graph snapshot fingerprint mismatch");return{snapshot:o,registry:t,graph:r}}async function x(e,t){U(e.name,"adapter name");let r=U(t.workspace,"workspace");J(t.signal);let o=await e.read({...t,workspace:r});return J(t.signal),o===null?null:ae(o)}async function Re(e,t){let r=U(t.workspace,"workspace"),o=ae(t.snapshot).snapshot,n=await x(e,{workspace:r,signal:t.signal});if(n?.snapshot.fingerprint===o.fingerprint)return{adapter:e.name,workspace:r,disposition:"current",fingerprint:o.fingerprint,previous_fingerprint:n.snapshot.fingerprint,node_count:o.nodes.length,edge_count:o.edges.length};if(J(t.signal),await e.replace({workspace:r,signal:t.signal,snapshot:o,expected_fingerprint:n?.snapshot.fingerprint??null}),(await x(e,{workspace:r,signal:t.signal}))?.snapshot.fingerprint!==o.fingerprint)throw new Error(`Relationship graph adapter "${e.name}" did not expose the replaced snapshot`);return{adapter:e.name,workspace:r,disposition:"written",fingerprint:o.fingerprint,...n?{previous_fingerprint:n.snapshot.fingerprint}:{},node_count:o.nodes.length,edge_count:o.edges.length}}function ab(e,t={}){let r=e.map(ae),o=new Map;for(let i of r)for(let a of i.snapshot.kinds){let d=o.get(a.kind);if(d&&I(d)!==I(a))throw new TypeError(`Conflicting federated relationship kind: ${a.kind}`);o.set(a.kind,a)}let n=new Ue([...o.values()].sort((i,a)=>i.kind.localeCompare(a.kind))),s=new z(new Set(r.flatMap(i=>[...i.snapshot.nodes])),r.flatMap(i=>[...i.snapshot.edges]),n);return Z(s,n,t)}var se=class{name;#e=new Map;constructor(t="memory"){this.name=U(t,"adapter name")}async read(t){J(t.signal);let r=this.#e.get(U(t.workspace,"workspace"));return r?structuredClone(r):null}async replace(t){J(t.signal);let r=U(t.workspace,"workspace"),o=this.#e.get(r);if(t.expected_fingerprint!==void 0&&(o?.fingerprint??null)!==t.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${r}`);this.#e.set(r,structuredClone(ae(t.snapshot).snapshot))}async clear(t){J(t.signal);let r=U(t.workspace,"workspace"),o=this.#e.get(r);if(t.expected_fingerprint!==void 0&&(o?.fingerprint??null)!==t.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${r}`);this.#e.delete(r)}};(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]="e47f9bb8-f98e-5159-9116-29c3e6fedfc3")}catch{}})();function oo(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${t} must be a positive integer`);return e}function db(e){let t=oo(e.nodeCount,"nodeCount"),r=oo(e.edgeStride??1,"edgeStride"),o=e.topology??"chain";if(!["chain","star","disconnected"].includes(o))throw new TypeError(`Unsupported relationship graph topology: ${o}`);let n=(e.kind??"related").trim(),s=(e.idPrefix??"node").trim();if(!n||!s)throw new TypeError("Relationship graph kind and idPrefix must be non-empty");let i=o==="disconnected"?0:Math.floor((t-1)/r);return{node_count:t,edge_count:i,edge_basis:"fixture_generated",nodes:{*[Symbol.iterator](){for(let a=0;a<t;a+=1)yield`${s}-${a}`}},edges:{*[Symbol.iterator](){if(o!=="disconnected")for(let a=r;a<t;a+=r)yield{source:`${s}-${o==="star"?0:a-r}`,target:`${s}-${a}`,kind:n}}}}}function j(e,t){if(!e)throw new Error(`Relationship graph adapter conformance: ${t}`)}async function no(e,t={}){let r=t.workspace?.trim()||"pm-graph-conformance",o=wt(),n=Z(new z(["a","b"],[{source:"a",target:"b",kind:"related"}],o),o,{createdAt:"2026-01-01T00:00:00.000Z"}),s=Z(new z(["a","b","c"],[{source:"a",target:"b",kind:"related"},{source:"b",target:"c",kind:"blocked_by"}],o),o,{createdAt:"2026-01-02T00:00:00.000Z"}),i=[];j(await x(e,{workspace:r})===null,"workspace must start empty"),i.push({name:"empty-read",passed:!0});let a=await Re(e,{workspace:r,snapshot:n});j(a.disposition==="written","first sync must write"),i.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:r})).nodes.push("mutated-reader-copy"),j((await x(e,{workspace:r}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),i.push({name:"read-isolation",passed:!0}),j((await Re(e,{workspace:r,snapshot:n})).disposition==="current","identical sync must be idempotent"),i.push({name:"idempotent-sync",passed:!0}),await e.replace({workspace:r,snapshot:s,expected_fingerprint:n.fingerprint}),j((await x(e,{workspace:r}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),i.push({name:"replacement-visibility",passed:!0});let d=!1;try{await e.replace({workspace:r,snapshot:n,expected_fingerprint:n.fingerprint})}catch{d=!0}return j(d,"stale compare-and-swap must fail"),i.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:r,expected_fingerprint:s.fingerprint}),j(await x(e,{workspace:r})===null,"clear must remove the workspace"),i.push({name:"clear",passed:!0})),{adapter:e.name,workspace:r,cases:Object.freeze(i),clear_supported:e.clear!==void 0}}function cb(e){return no(new se,e?{workspace:e}:{})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="58736688-35d0-545d-892e-e0ede7fedc1a")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d45a8203-4501-5797-a6cc-a2e7844adec9")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f5567aa1-0268-574d-907b-38d6249538ce")}catch{}})();var ut=2,lb=["self_reported","independent_transport"];function Ie(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function de(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function io(e,t,r=!1){if(!Array.isArray(e)||e.length===0)throw new TypeError(`${t} must be a non-empty string array`);return e.map((o,n)=>{let s=de(o,`${t}[${String(n)}]`);return r?o:s})}function mt(e,t){return e===void 0?void 0:de(e,t)}function pb(e,t){if(e===void 0)return;if(!Ie(e)||Object.keys(e).length===0)throw new TypeError(`${t} must be a non-empty object`);let r=Object.entries(e).map(([o,n])=>{if(o.length===0||o.split(".").some(s=>s.length===0))throw new TypeError(`${t} must use dot-separated own-property paths`);if(n!==null&&typeof n!="string"&&typeof n!="boolean"&&(typeof n!="number"||!Number.isFinite(n)))throw new TypeError(`${t} values must be JSON primitives`);return[o,n]});return Object.fromEntries(r)}function ub(e,t,r,o,n,s){if(o==="refusal"){if(We(r)||n===void 0||s===void 0)throw new TypeError(`${e} refusal steps require a non-success exit, error code, and refusal surface`);return}if(n!==void 0||s!==void 0)throw new TypeError(`${e} only refusal steps may declare expected_error_code or expected_refusal_surface`);let i=bt(t);if(i===void 0)throw new TypeError(`${e}.args must identify a command after global flags`);let a=t[i].trim().toLowerCase();if(a==="history"){let l=Tt(t.slice(i+1));l!==void 0&&(a=Le(`history ${l}`))}let d=Dt(a);if(!We(r)||r!==0&&!d?.exit_codes.some(l=>l===r))throw new TypeError(`${e} successful output must use exit code 0 or a command-declared successful effect exit`);let c=Lt(a).kind;if(o!==c)throw new TypeError(`${e} expected ${o}, but ${a} declares ${c}`)}function mb(e,t,r){if(!Ie(e))throw new TypeError(`tasks.${t}.steps[${String(r)}] must be an object`);let o=`tasks.${t}.steps[${String(r)}]`,n=de(e.id,`${o}.id`),s=io(e.args,`${o}.args`,!0),i=e.expected_exit_code;if(typeof i!="number"||!Number.isSafeInteger(i))throw new TypeError(`${o}.expected_exit_code must be a safe integer`);let a=e.expected_output_kind;if(a!=="refusal"&&!Nt.includes(a))throw new TypeError(`${o}.expected_output_kind is unsupported`);let d=a,c=e.expected_accounting_mode;if(!lb.includes(c))throw new TypeError(`${o}.expected_accounting_mode is unsupported`);let l=c;if(l==="independent_transport"&&d!=="refusal")throw new TypeError(`${o} independent_transport accounting is supported only for refusal steps`);let p=io(e.required_fields,`${o}.required_fields`);if(p.some(E=>E.split(".").some(q=>q.length===0)))throw new TypeError(`${o}.required_fields must contain dot-separated own-property paths`);let f=pb(e.expected_field_values,`${o}.expected_field_values`),_=mt(e.expected_error_code,`${o}.expected_error_code`),g=mt(e.expected_refusal_surface,`${o}.expected_refusal_surface`),T=mt(e.recovery_for,`${o}.recovery_for`);return ub(o,s,i,d,_,g),{id:n,args:s,expected_exit_code:i,expected_output_kind:d,expected_accounting_mode:l,required_fields:p,...f?{expected_field_values:f}:{},..._?{expected_error_code:_}:{},...g?{expected_refusal_surface:g}:{},...T?{recovery_for:T}:{}}}function fb(e,t){if(!Ie(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let r=de(e.id,`tasks[${String(t)}].id`),o=de(e.description,`tasks.${r}.description`);if(!Array.isArray(e.steps)||e.steps.length===0)throw new TypeError(`tasks.${r}.steps must be a non-empty array`);let n=e.steps.map((i,a)=>mb(i,r,a)),s=new Map;for(let i of n){if(s.has(i.id))throw new TypeError(`tasks.${r} contains duplicate step id ${i.id}`);if(i.recovery_for!==void 0&&(s.get(i.recovery_for)?.expected_output_kind!=="refusal"||i.expected_output_kind==="refusal"))throw new TypeError(`tasks.${r}.${i.id} recovery_for must reference an earlier refusal and declare successful output`);s.set(i.id,i)}if(n.at(-1)?.expected_output_kind==="refusal")throw new TypeError(`tasks.${r} completed task must terminate with successful output`);for(let i of n)if(i.expected_output_kind==="refusal"&&!n.some(a=>a.recovery_for===i.id))throw new TypeError(`tasks.${r}.${i.id} refusal must have a later successful recovery_for step`);return{id:r,description:o,steps:n}}function pD(e){if(!Ie(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==ut)throw new TypeError(`agent-task transcript corpus version must be ${String(ut)}`);if(!Array.isArray(e.tasks)||e.tasks.length===0)throw new TypeError("agent-task transcript corpus tasks must be non-empty");let t=e.tasks.map((o,n)=>fb(o,n)),r=new Set;for(let o of t){if(r.has(o.id))throw new TypeError(`duplicate agent-task transcript id ${o.id}`);r.add(o.id)}return{version:ut,tasks:t}}import{createHash as so}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7163a078-d8be-5bca-813f-c941fcb8e406")}catch{}})();function ao(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${t} must be non-empty`);return e.trim()}function _D(e,t){let r=ao(t.migrationId,"migrationId"),o=ao(t.author,"author"),n=Date.parse(t.timestamp);if(!Number.isFinite(n))throw new TypeError("Relationship backfill timestamp must be valid");let s=new Date(n).toISOString(),i=He(e,void 0,t.registry),a=i.graph.nodes(),d=i.graph.edges().map(f=>{let _=so("sha256").update(JSON.stringify([r,f.kind,f.source,f.target,f.createdAt??null,f.author??null,f.payload??null])).digest("hex").slice(0,24);return Object.freeze({eventId:`backfill:${r}:${_}`,relationshipId:`migration:${r}:${_}`,action:"add",edge:f,author:o,timestamp:s,reason:`Backfill ${r} from legacy item metadata`})}),c=so("sha256").update(JSON.stringify({migrationId:r,nodes:a,events:d})).digest("hex"),l=new Set([...t.existingEventIds??[]].filter(f=>typeof f=="string").map(f=>f.trim()).filter(Boolean)),p=d.filter(f=>!l.has(f.eventId));return Object.freeze({migration_id:r,fingerprint:c,nodes:a,events:Object.freeze(p),edge_count:d.length,skipped_existing_count:d.length-p.length,duplicate_dependency_rows:i.duplicateRows.length,dangling_reference_count:i.dangling.active.length+i.dangling.legacy_terminal.length})}import*as co from"node:module";(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]="7a1d7194-6ff1-5365-ab64-80b47b0176d7")}catch{}})();var ce=["suggested_retry","candidate_command","example","next_step","migration_hint","restore_with"],ft={suggested_retry:{kind:"suggested_retry",semantics:"recovery"},retry_command:{kind:"suggested_retry",semantics:"recovery"},candidate_command:{kind:"candidate_command",semantics:"recovery"},candidate_commands:{kind:"candidate_command",semantics:"recovery"},fallback_candidates:{kind:"candidate_command",semantics:"recovery",nested_value_field:"command"},next_best_command:{kind:"candidate_command",semantics:"recovery"},example:{kind:"example",semantics:"recovery"},examples:{kind:"example",semantics:"recovery"},next_step:{kind:"next_step",semantics:"recovery"},next_steps:{kind:"next_step",semantics:"recovery"},suggested_next_steps:{kind:"next_step",semantics:"recovery"},migration_hint:{kind:"migration_hint",semantics:"replacement"},migration_hints:{kind:"migration_hint",semantics:"replacement"},restore_with:{kind:"restore_with",semantics:"behavior_preserving"}},gD=Object.freeze(Object.keys(ft));function lo(e){if(Object.hasOwn(ft,e))return ft[e]}var _b=new Set([..."=([{,:;!?&|+-*%^~<>","=>"]);function Q(e,t){return e<t?-1:e>t?1:0}function hb(e,t){let r=e[t],o=t+1,n="";for(;o<e.length&&e[o]!==r;)e[o]==="\\"?o+=2:(n+=e[o],o+=1);return e[o]===r&&(o+=1),{next:o,value:n}}function gb(e){return e===void 0||e.kind==="punctuator"&&_b.has(e.value)||e.kind==="identifier"&&["return","case","throw","else","yield"].includes(e.value)}function yb(e,t){if(/\s/u.test(e[t]))return t+1;if(e.startsWith("//",t)){let r=e.indexOf(`
|
|
31
31
|
`,t+2);return r===-1?e.length:r+1}if(e.startsWith("/*",t))return e.indexOf("*/",t+2)+2}function bb(e,t,r){if(e[t]!=="/"||!gb(r))return;let o=t+1,n=!1;for(;o<e.length;)if(e[o]==="\\")o+=2;else if(e[o]==="[")n=!0,o+=1;else if(e[o]==="]")n=!1,o+=1;else if(e[o]==="/"&&!n){for(o+=1;/[A-Za-z]/u.test(e.charAt(o));)o+=1;return o}else o+=1;return o}function Tb(e,t){let r=e[t];if(r==="'"||r==='"'||r==="`"){let n=hb(e,t);return r==="`"?{next:n.next}:{next:n.next,token:{kind:"string",value:n.value,offset:t+1}}}if(/[A-Za-z_$]/u.test(r)){let n=t+1;for(;/[A-Za-z0-9_$]/u.test(e[n]??"");)n+=1;return{next:n,token:{kind:"identifier",value:e.slice(t,n),offset:t}}}let o=e.startsWith("=>",t)?"=>":r;return{next:t+o.length,token:{kind:"punctuator",value:o,offset:t}}}function Cb(e){let t=[],r=0;for(;r<e.length;){let o=yb(e,r);if(o!==void 0){r=o;continue}let n=bb(e,r,t.at(-1));if(n!==void 0){r=n;continue}let s=Tb(e,r);s.token&&t.push(s.token),r=s.next}return t}var Eb=new Set(["object","block","pattern"]),Sb=new Set(["const","let","var"]),wb=new Set(["}",")","]"]),Ab=new Set(["=","(","[",",",":","?","return"]);function vb(e,t,r){if([...r].reverse().find(n=>Eb.has(n.kind))?.kind==="pattern"||r.at(-1)?.kind==="paren"&&r.at(-1)?.parameter_list)return"pattern";let o=e[t-1];return o?.kind==="identifier"&&Sb.has(o.value)?"pattern":o?.value==="=>"||o?.value===")"?"block":o&&Ab.has(o.value)?"object":"block"}function Ob(e,t,r){let o=e[t];if(o.value==="{"){let i=vb(e,t,r);return{kind:i,...i==="object"?{member_start:!0,candidates:[]}:{}}}if(o.value==="[")return{kind:"array"};if(o.value!=="(")return;let n=e[t-1],s=e[t-2];return{kind:"paren",...n?.value==="function"||s?.value==="function"?{parameter_list:!0}:{}}}function Rb(e,t,r){if(!(e?.kind!=="object"||!e.member_start||t.kind!=="identifier"&&t.kind!=="string"||r?.value!==":"||!/^[A-Za-z][A-Za-z0-9_]*$/u.test(t.value)))return{field:t.value,offset:t.offset}}function Ib(e,t){return e[t+1]?.value===")"&&e[t+2]?.value==="=>"||e[t+1]?.value==="="}function Pb(e){let t=Cb(co.stripTypeScriptTypes(e,{mode:"strip"})),r=[],o=[];for(let[n,s]of t.entries()){let i=o.at(-1),a=Rb(i,s,t[n+1]);a&&i.candidates.push(a);let d=Ob(t,n,o);if(d)o.push(d);else if(wb.has(s.value)){let c=o.pop();c?.kind==="object"&&!Ib(t,n)&&r.push(...c.candidates)}else s.value===","&&i?.kind==="object"?i.member_start=!0:i?.kind==="object"&&s.value!==":"&&(i.member_start=!1)}return r}function Mb(e){let t=[0];for(let r=0;r<e.length;r+=1)e[r]===`
|
|
32
|
-
`&&t.push(r+1);return t}function kb(e,t){let r=0,o=e.length;for(;r<o;){let n=Math.floor((r+o)/2);e[n]<=t?r=n+1:o=n}return r}function
|
|
33
|
-
`)}(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]="d252409d-e33e-5c9e-9671-789f0ee87312")}catch{}})();function Lb(e){return[e.expected_error_code!==void 0&&e.error_code!==e.expected_error_code?{code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected error code ${e.expected_error_code}, received ${e.error_code??"<missing>"}.`}:void 0,e.expected_allowed_values!==void 0&&JSON.stringify([...e.allowed_values].sort())!==JSON.stringify([...e.expected_allowed_values].sort())?{code:"incomplete_allowed_values",probe_id:e.probe_id,detail:"The refusal's accepted domain differs from the SDK-owned domain contract."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)===0?{code:"missing_suggested_retry_args",probe_id:e.probe_id,detail:"The refusal omitted shell-free suggested retry arguments."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)>0&&JSON.stringify(e.suggested_retry_args)!==JSON.stringify(e.expected_suggested_retry_args)?{code:"suggested_retry_args_mismatch",probe_id:e.probe_id,detail:"The refusal's suggested retry arguments differ from the SDK-owned contract."}:void 0]}function Db(e){return[e.exit_code!==me.USAGE?{code:"non_refusal_exit",probe_id:e.probe_id,detail:`${e.entrypoint} returned exit code ${e.exit_code}; a structured usage refusal must return ${me.USAGE}.`}:void 0,e.allowed_values_required!==!1&&e.allowed_values.length===0?{code:"missing_allowed_values",probe_id:e.probe_id,detail:"The refusal omitted its complete accepted value domain."}:void 0,e.allowed_values.includes(e.rejected_value)?{code:"accepted_rejected_value",probe_id:e.probe_id,detail:`${e.rejected_value} is both rejected and advertised as allowed.`}:void 0,e.suggested_retry.trim().length===0?{code:"missing_suggested_retry",probe_id:e.probe_id,detail:"The refusal omitted an executable suggested retry."}:void 0,e.retry_succeeded?void 0:{code:"retry_failed",probe_id:e.probe_id,detail:"The advertised suggested retry did not succeed."},...Lb(e)]}function ID(e){let t=[],r=new Set,o=0;e.length===0&&t.push({code:"empty_corpus",probe_id:"corpus",detail:"At least one real refusal observation is required."});for(let n of e){if(r.has(n.probe_id)){t.push({code:"duplicate_probe",probe_id:n.probe_id,detail:`${n.probe_id} was supplied more than once.`});continue}r.add(n.probe_id);let s=t.length;for(let i of Db(n))i!==void 0&&t.push(i);t.length===s&&(o+=1)}return t.sort((n,s)=>n.probe_id!==s.probe_id?n.probe_id.localeCompare(s.probe_id):n.code.localeCompare(s.code)),{ok:t.length===0,probe_count:r.size,closed_probe_count:o,closure_fraction:r.size===0?0:o/r.size,findings:t}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="39b4e1fe-a34a-5ffc-9447-eaf8c46863c7")}catch{}})();var mo="not-a-declared-action";function $b(e,t){if(e.startsWith("assurance ")&&t.name==="kind")return"measurement";switch(t.value_kind){case"integer":return"1";case"item_id":return"pm-domain";case"action":throw new Error(`Cannot synthesize a preceding action value for positional slot ${t.name}.`);default:return"example"}}function le(e){return e.replaceAll(/[^a-z0-9]+/gu,"-").replaceAll(/^-|-$/gu,"")}function FD(e=qe.filter(t=>It.some(r=>r.command===t.command&&r.disposition!=="package_owned"))){let t=new Set(e.filter(({command:r})=>!r.includes(" ")).map(({command:r})=>le(r)));return e.flatMap(r=>r.slots.flatMap((o,n)=>{if(!o.required)return[];let s=r.command.split(" "),i=le(r.command),a=s.length>1&&t.has(i)?s.map(le).join("--"):i,d=ee(r.command).flatMap(l=>l.required?[l.flag,...l.value_name?["example"]:[]]:[]),c=Be.some(l=>l.command===r.command);return[{probe_id:`required-argument-${a}-${le(o.name)}`,command:r.command,refusal_args:[...s,...r.slots.slice(0,n).map(l=>$b(r.command,l)),...d],recovery_args:[...s,"--help"],error_code:c&&!r.command.startsWith("assurance ")?"invalid_argument_value":/^extension (?:activate|adopt|deactivate|uninstall)$/u.test(r.command)?"missing_lifecycle_target":"missing_required_argument",missing_argument:o.name,missing_argument_index:n}]})).sort((r,o)=>r.probe_id.localeCompare(o.probe_id))}function Fb(e){switch(L(e)){case"assurance":case"workspace snapshot":return Be.filter(({parent:t})=>t===e).map(({action:t})=>t);case"graph":return De;case"merge":return $e;case"plan":return Ye;case"profile":return Xe;case"schema":return $t;default:throw new Error(`Required positional action family ${e} has no authoritative value domain.`)}}function GD(e=qe){return e.filter(({slots:t})=>t[0]?.required===!0&&t[0].value_kind==="action").map(({command:t})=>{let r=t.split(" ");return{probe_id:`unknown-subcommand-${le(t)}`,command:t,refusal_args:[...r,mo],recovery_args:[...r,"--help"],error_code:"unknown_subcommand",rejected_value:mo,allowed_values:[...Fb(t)].sort()}}).sort((t,r)=>t.probe_id.localeCompare(r.probe_id))}function Gb(e,t){let r=[...t].sort();return e.length===t.length&&[...e].sort().every((o,n)=>o===r[n])}function Ub(e,t){if(!t)return[{code:"refusal_probe_missing",probe_id:e.probe_id,detail:`${e.probe_id} has no runtime observation.`}];let r=[];return t.error_code!==e.error_code&&r.push({code:"refusal_error_code_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} emitted ${t.error_code||"<none>"}; expected ${e.error_code}.`}),t.exit_code!==2&&r.push({code:"refusal_exit_code_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} exited ${t.exit_code}; expected usage exit 2.`}),"allowed_values"in e&&!Gb(t.allowed_values,e.allowed_values)&&r.push({code:"refusal_allowed_values_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} did not expose its complete action domain.`}),t.recovery_succeeded||r.push({code:"refusal_recovery_failed",probe_id:e.probe_id,detail:`${e.probe_id} help recovery did not succeed.`}),t.refusal_mutated_state&&r.push({code:"refusal_mutated_state",probe_id:e.probe_id,detail:`${e.probe_id} changed tracker state while refusing input${t.mutated_paths?.length?`: ${t.mutated_paths.join(", ")}`:"."}`}),r}function UD(e,t){let r=new Map(e.map(i=>[i.probe_id,i])),o=new Map(t.map(i=>[i.probe_id,i])),n=[...e.flatMap(i=>Ub(i,o.get(i.probe_id))),...t.filter(i=>!r.has(i.probe_id)).map(i=>({code:"unexpected_refusal_probe",probe_id:i.probe_id,detail:`${i.probe_id} has no declared grammar refusal contract.`}))];n.sort((i,a)=>i.probe_id.localeCompare(a.probe_id)||i.code.localeCompare(a.code));let s=new Set(n.map(({probe_id:i})=>i));return{ok:n.length===0,probe_count:e.length,closed_probe_count:e.filter(({probe_id:i})=>!s.has(i)).length,findings:n}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d3795bc4-fbe5-5ca4-bc90-b72a2d469dc7")}catch{}})();var ht=[{probe_id:"tracker-root-missing",failure_kind:"missing_root",expected_error_code:"tracker_root_missing",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-settings-missing",failure_kind:"settings_missing",expected_error_code:"tracker_not_initialized",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-not-directory",failure_kind:"not_directory",expected_error_code:"tracker_root_not_directory",expected_exit_code:2,recovery_kind:"select_directory"},{probe_id:"tracker-root-unreadable",failure_kind:"unreadable_root",expected_error_code:"tracker_root_unreadable",expected_exit_code:1,recovery_kind:"repair_permissions"}];function BD(){return ht.map(e=>({...e}))}function jb(e,t){let r=[];t.error_code!==e.expected_error_code&&r.push({code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected ${e.expected_error_code}, received ${t.error_code}.`}),t.exit_code!==e.expected_exit_code&&r.push({code:"exit_code_mismatch",probe_id:e.probe_id,detail:`Expected exit ${e.expected_exit_code}, received ${t.exit_code}.`}),t.recovery_kind!==e.recovery_kind&&r.push({code:"recovery_kind_mismatch",probe_id:e.probe_id,detail:`Expected ${e.recovery_kind}, received ${t.recovery_kind}.`});let o=t.suggested_retry_args.indexOf("init"),n=o===0||o===2&&t.suggested_retry_args[0]==="--pm-path"&&t.suggested_retry_args[1]?.length>0;return e.recovery_kind==="initialize"&&!n&&r.push({code:"missing_init_recovery",probe_id:e.probe_id,detail:"Missing and uninitialized roots must emit a tokenized init retry."}),(t.unsafe_init_recommended||e.recovery_kind!=="initialize"&&t.suggested_retry_args.includes("init"))&&r.push({code:"unsafe_init_recovery",probe_id:e.probe_id,detail:"A tracker root that cannot be initialized safely must not recommend initialization."}),t.retry_succeeded||r.push({code:"retry_failed",probe_id:e.probe_id,detail:"The emitted retry or safe alternate-root recovery did not execute successfully."}),r}function qD(e){let t=new Map(e.map(n=>[n.probe_id,n])),r=[],o=0;for(let n of ht){let s=t.get(n.probe_id);if(s===void 0){r.push({code:"missing_probe",probe_id:n.probe_id,detail:"No runtime observation was supplied for this contract."});continue}let i=jb(n,s);r.push(...i),i.length===0&&(o+=1)}return r.sort((n,s)=>n.probe_id.localeCompare(s.probe_id)||n.code.localeCompare(s.code)),{ok:r.length===0,probe_count:ht.length,closed_probe_count:o,findings:r}}(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]="41419a34-fcd7-5d1a-a427-4e9e634f9379")}catch{}})();var Pe,Bb=Object.freeze({list:"list-item-projection","list-all":"list-item-projection","list-draft":"list-item-projection","list-open":"list-item-projection","list-in-progress":"list-item-projection","list-blocked":"list-item-projection","list-closed":"list-item-projection","list-canceled":"list-item-projection",get:"get-item-projection",graph:"graph-detail-projection",search:"search-result-projection",history:"history-entry-projection",events:"mutation-event-projection",activity:"activity-entry-projection",deps:"dependency-graph-projection",health:"health-diagnostic-projection",validate:"validation-diagnostic-projection",contracts:"contract-catalog-projection"});function qb(e,t){if(t==="--limit")return"result-row-limit";if(t==="--node-limit")return"graph-node-limit";if(t==="--edge-limit")return"graph-edge-limit";if(t==="--output-limit")return"rendered-output-row-limit";if(t==="--output-budget")return"rendered-output-byte-budget";if(t==="--token-budget")return"context-intent-token-budget";if(t==="--full"){let r=Bb[L(e)];if(r===void 0)throw new Error(`Command ${e} exposes --full without a registered projection concept.`);return r}return t!=="--file"?t.slice(2):["create","update","update-many"].includes(L(e))?"linked-file-path":["comments","notes","learnings"].includes(L(e))?"entry-file-input":"plan-definition-file"}function Me(){if(Pe!==void 0)return Pe;let e=te.filter(({command:n})=>ze(n)).flatMap(({command:n,family:s})=>xt(n,ee(n)).map(i=>({command:n,family:s,concept:qb(n,i.flag),flag:i.flag,aliases:Object.freeze([...i.aliases??[]]),value_kind:i.repeatable?"list":i.flag==="--limit"?"number":i.value_type}))),t=new Set(e.flatMap(n=>n.aliases.map(s=>`${n.command}:${s}`))),r=e.filter(n=>!t.has(`${n.command}:${n.flag}`)),o=new Map;for(let n of r){let s=o.get(n.concept)??new Set;s.add(n.value_kind),o.set(n.concept,s)}return Pe=Object.freeze(r.map(n=>Object.freeze({...n,concept:o.get(n.concept)?.size===1?n.concept:`${n.concept}@${n.command}`}))),Pe}function YD(){return Object.freeze(Me().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var fo=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:102,copy:24,focus:22,list:86,"list-all":86,"list-draft":84,"list-open":84,"list-in-progress":84,"list-blocked":84,"list-closed":84,"list-canceled":84,aggregate:40,context:45,ctx:45,get:30,graph:34,search:78,duplicates:25,eval:25,next:38,history:36,events:34,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:29,schema:43,profile:22,activity:36,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:32,notes:36,learnings:32,files:39,docs:30,deps:32,plan:111,test:56,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:25,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),zb=1,_o=Object.freeze(Object.fromEntries(Object.entries({...fo,...Object.fromEntries(Ne.flatMap(({alias:e,canonical:t})=>{let r=fo[e];return r===void 0?[]:[[t,r]]}))}).map(([e,t])=>[e,t+zb])));function ho(){let e=new Map(Object.keys(_o).map(t=>[t,0]));for(let{command:t}of Me())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(_o).map(([t,r])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:r})))}function Hb(e,t,r){for(let o of e)for(let n of o.aliases){let s=t.get(`${o.command}:${n}`);s===void 0||s.flag===o.flag||r.push({code:"alias_collision",command:o.command,detail:`${n} aliases ${o.flag} but is canonical for ${s.flag}.`})}}function Vb(e,t,r){let o=new Set(t.map(({command:n})=>n));for(let n of e.keys())o.has(n)||r.push({code:"missing_budget",command:n,detail:`${n} has canonical flags but no persisted budget.`});for(let n of t){let s=e.get(n.command)??0;s===0&&r.push({code:"stale_budget",command:n.command,detail:`${n.command} has a persisted budget but no canonical flags.`}),!(s<=n.maximum)&&r.push({code:"budget_exceeded",command:n.command,detail:`${s} canonical flags exceed the ratcheted maximum ${n.maximum}.`})}}function Kb(e,t,r){let o=new Map(e.map(n=>[`${n.command}:${n.flag}`,n]));for(let n of t){let s=`${n.command}:${n.canonical_flag}`,i=o.get(s);if(!i){r.push({code:"removed_canonical_spelling",command:n.command,detail:`${n.canonical_flag} disappeared from the executable spelling inventory.`});continue}let a=new Set([i.flag,...i.aliases]);for(let d of n.accepted_spellings)a.has(d)||r.push({code:"removed_compatibility_spelling",command:n.command,detail:`${d} no longer resolves to ${n.canonical_flag}.`})}}function XD(e=Me(),t=ho(),r=[]){let o=[],n=new Map,s=new Map,i=new Map,a=new Map;for(let d of e){let c=`${d.command}:${d.flag}`;n.has(c)?o.push({code:"duplicate_canonical_flag",command:d.command,detail:`${d.flag} has more than one canonical row.`}):n.set(c,d),a.set(d.command,(a.get(d.command)??0)+1);let l=s.get(d.concept);l!==void 0&&l!==d.value_kind?o.push({code:"inconsistent_concept_kind",command:d.command,detail:`${d.concept} uses both ${l} and ${d.value_kind}.`}):s.set(d.concept,d.value_kind);let p=i.get(d.concept);p!==void 0&&p!==d.flag?o.push({code:"semantic_spelling_collision",command:d.command,detail:`${d.concept} is canonicalized by both ${p} and ${d.flag}.`}):i.set(d.concept,d.flag)}return Hb(e,n,o),Vb(a,t,o),Kb(e,r,o),o.sort((d,c)=>d.command.localeCompare(c.command)||d.code.localeCompare(c.code)||d.detail.localeCompare(c.detail)),{ok:o.length===0,entry_count:e.length,budget_count:t.length,concept_count:new Set(e.map(({concept:d})=>d)).size,baseline_entry_count:r.length,findings:o}}function JD(){let e=Me(),t=ho(),r=new Map(t.map(({command:o})=>[o,"unknown"]));for(let{command:o,family:n}of e)r.set(o,n);return["# Generated flag lexicon budgets","","This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not consume canonical budget.","","| Command | Capability family | Canonical flags | Maximum |","| --- | --- | ---: | ---: |",...t.map(({command:o,current:n,maximum:s})=>{let i=r.get(o);return`| \`${o}\` | ${i} | ${n} | ${s} |`}),""].join(`
|
|
34
|
-
`)}(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]="3f3a5dca-8370-52d7-b279-dc6f9f0aeadf")}catch{}})();function QD(e){return e}function e1(e){return e}function t1(e){return e}function r1(e){return e}function o1(e){return e}function n1(e){return e}function i1(e){return e}function s1(e){return e}function a1(e){return e}function d1(e){return e}function c1(e){return e}function l1(e){return e}function p1(e){return e}function u1(e){return{handled:!0,result:e}}function m1(){return{handled:!1}}function f1(e){return e}function _1(e){return e}function h1(e){return e}function g1(e){return e}function y1(e){return e}function b1(e){return e}function T1(e){return e}function C1(e){return e}function E1(e){return e}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="68ca9ab1-91e0-5020-859e-fc1f1f6dcc56")}catch{}})();function Wb(e={},t={}){return new ge(t).extension(void 0,{...e,migrate:!0})}function Yb(e={},t={}){return new ge(t).packageMigrate(e)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c96e4de9-16ef-581a-aa4b-6450917c2c65")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function N(e){if(typeof e!="string"||!_e(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function Xb(e){let t=N(e.window_start),r=N(e.window_end);if(t>=r||!Number.isFinite(e.max_failure_rate)||e.max_failure_rate<0||e.max_failure_rate>=1||!Number.isSafeInteger(e.min_completed_attempts)||e.min_completed_attempts<1)throw new TypeError("Invalid reliability window policy.");if(e.families.length===0||e.families.some(o=>typeof o!="string"||o.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:t,end:r}}function Jb(e,t,r,o){let n=new Map(t.map(i=>[i,[]])),s=new Set;for(let i of e){if(typeof i.id!="string"||i.id.trim().length===0||s.has(i.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");s.add(i.id);let a=n.get(i.family);if(!a||!["success","failure","pending"].includes(i.outcome)||i.cause!==void 0&&(!["product","infrastructure","unknown"].includes(i.cause)||i.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let d=N(i.started_at);if(i.repaired_at!==void 0&&(N(i.repaired_at)<d||i.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");d>=r&&d<o&&a.push(i)}return n}function j1(e,t){let{start:r,end:o}=Xb(t),n=[...Jb(e,t.families,r,o)].map(([s,i])=>{let a=i.filter(_=>_.outcome==="failure"),d=i.filter(_=>_.outcome!=="pending").length,c=d===0?null:a.length/d,l=a.filter(_=>_.repaired_at!==void 0&&N(_.repaired_at)<o),p={product:0,infrastructure:0,unknown:0};for(let _ of a)p[_.cause??"unknown"]+=1;let f=[];return d<t.min_completed_attempts&&f.push("insufficient_completed_attempts"),c!==null&&c>t.max_failure_rate&&f.push("failure_rate"),{family:s,attempts:i.length,completed:d,failed:a.length,pending:i.length-d,failure_rate:c,affected_days:[...new Set(a.map(_=>new Date(N(_.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:l.map(_=>(N(_.repaired_at)-N(_.started_at))/6e4).sort((_,g)=>_-g),unresolved:a.length-l.length,causes:p,violations:f,ok:f.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(r).toISOString(),window_end:new Date(o).toISOString(),ok:n.every(s=>s.ok),families:n}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="773ad2b6-326e-5483-bdce-a377f935cb31")}catch{}})();function pe(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function Zb(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let t=new Map;for(let r of e){if(r===null||typeof r!="object"||!pe(r.name)||t.has(r.name)||r.complete!==!0)throw new TypeError("Expected unique complete artifact ledgers.");if(!Array.isArray(r.identities))throw new TypeError("Invalid or duplicate artifact identity.");let o=new Set(r.identities);if(o.size!==r.identities.length||[...o].some(n=>!pe(n)))throw new TypeError("Invalid or duplicate artifact identity.");t.set(r.name,o)}if([...t.values()].every(r=>r.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return t}function Qb(e,t){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let r=new Map;for(let o of e){if(o===null||typeof o!="object"||!pe(o.identity)||r.has(o.identity)||!pe(o.reason)||!pe(o.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let n=o.missing_from;if(!Array.isArray(n)||n.length===0||n.length>=t.length||new Set(n).size!==n.length||[...n].some(s=>!t.includes(s)))throw new TypeError("Invalid artifact exception ledger signature.");r.set(o.identity,o)}return r}function q1(e,t=[]){let r=Zb(e),o=[...r.keys()].sort(),n=Qb(t,o),s=[...new Set([...r.values()].flatMap(c=>[...c]))].sort(),i=[],a=new Set;for(let c of s){let l=o.filter(_=>!r.get(_).has(c));if(l.length===0)continue;let p=n.get(c),f=p!==void 0&&JSON.stringify([...p.missing_from].sort())===JSON.stringify(l);f&&a.add(c),i.push({identity:c,present_in:o.filter(_=>r.get(_).has(c)),missing_from:l,disposition:f?{reason:p.reason,evidence:p.evidence}:null})}let d=[...n.keys()].filter(c=>!a.has(c)).sort();return{schema:"pm-artifact-ledgers/1",ok:i.every(c=>c.disposition!==null)&&d.length===0,counts:Object.fromEntries(o.map(c=>[c,r.get(c).size])),findings:i,stale_exceptions:d}}(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]="15d63d97-9126-59ae-be28-b77fdfd07b9c")}catch{}})();import{createHash as yo,createHmac as eT,randomBytes as tT,timingSafeEqual as rT}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="98283845-5c48-5901-b54c-c8cc8138427b")}catch{}})();var v$="dev.unbrained.pm/progressive-tool-discovery",O$=Object.freeze({version:1,discoveryTool:"pm_discover",canonicalResult:"structuredContent.result",compatibilityText:"pointer"}),oT=Object.freeze(["pm_discover","pm_next","pm_context","pm_search","pm_get"]),B=Object.freeze({lexical:.4,semantic:.2,graph:.1,permission:.15,freshness:.05,usage:.1}),nT=Object.freeze(["profile_changed","tool_contract_changed","workspace_extension_changed","authorization_changed","ranking_signal_changed","cursor_integrity_key_rotated"]),bo={core:0,standard:1,full:2,internal:3},To=Object.freeze(["core","standard","full"]),iT=new Set(["core","standard","full","custom"]),Co=new Set(te.map(({family:e})=>e)),sT=tT(32);function xe(e,t){if(typeof e!="string")throw new b(`pm tool discovery ${t} must be a string of at most 4096 Unicode characters.`,64);let r=e[Symbol.iterator](),o=0;for(let n=r.next();!n.done;n=r.next())if(o+=1,o>4096)throw new b(`pm tool discovery ${t} must be a string of at most 4096 Unicode characters.`,64);return e}function Eo(e){if(!Number.isInteger(e)||Number(e)<1||Number(e)>100)throw new b("pm tool discovery limit must be from 1 through 100.",64);return Number(e)}function So(e){if(e!=="unbounded"&&(!Number.isInteger(e)||Number(e)<128))throw new b("pm tool discovery outputBudget must be unbounded or an integer of at least 128.",64);return e==="unbounded"?e:Number(e)}function wo(e){if(e!==void 0&&typeof e!="boolean")throw new b("pm tool discovery includeSchema must be a boolean.",64);return e===!0}function Ao(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new b("pm tool discovery options must be an object.",64)}function aT(e){if(!Array.isArray(e))throw new b("pm tool discovery candidates must be an array.",64);for(let[t,r]of e.entries()){if(r===null||typeof r!="object"||Array.isArray(r))throw new b(`pm tool discovery candidate ${t} must be an object.`,64);if(typeof r.name!="string"||r.name.trim().length===0)throw new b(`pm tool discovery candidate ${t} name must be a non-empty string.`,64);if(typeof r.description!="string"||r.description.trim().length===0)throw new b(`pm tool discovery candidate ${t} description must be a non-empty string.`,64);if(r.inputSchema===null||typeof r.inputSchema!="object"||Array.isArray(r.inputSchema))throw new b(`pm tool discovery candidate ${t} inputSchema must be an object.`,64);if(r.authorized!==void 0&&typeof r.authorized!="boolean")throw new b(`pm tool discovery candidate ${t} authorized must be a boolean.`,64)}}function R$(e){if(Ao(e),e.family!==void 0&&(typeof e.family!="string"||!Co.has(e.family)))throw new b("pm tool discovery family must be a declared capability family.",64);if(e.tier!==void 0&&(typeof e.tier!="string"||!To.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);return{...e.query!==void 0?{query:xe(e.query,"query")}:{},...e.family!==void 0?{family:e.family}:{},...e.tier!==void 0?{tier:e.tier}:{},...e.limit!==void 0?{limit:Eo(e.limit)}:{},...e.cursor!==void 0?{cursor:xe(e.cursor,"cursor")}:{},...e.includeSchema!==void 0?{includeSchema:wo(e.includeSchema)}:{},...e.outputBudget!==void 0?{outputBudget:So(e.outputBudget)}:{}}}function dT(e){return e===void 0||!Number.isFinite(e)?0:Math.min(1,Math.max(0,e))}function ue(e){return[...new Set(e.toLowerCase().match(/[a-z0-9]+/gu)??[])].sort()}function cT(e,t){let r=ue(e);if(r.length===0)return 0;let o=new Set(ue(t)),n=r.filter(i=>o.has(i)).length,s=t.toLowerCase().includes(e.toLowerCase())?.25:0;return Math.min(1,n/r.length+s)}function lT(e,t){let r=ue(e);if(r.length===0)return 0;let o=t.toLowerCase(),n=ue(t),s=r.filter(a=>n.some(d=>d.startsWith(a)||a.startsWith(d))).length,i=o.includes(e.toLowerCase())?.2:0;return Math.min(1,s/r.length+i)}function go(e){return yo("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function vo(e,t,r){return eT("sha256",r).update(JSON.stringify({version:1,fingerprint:e,offset:t})).digest("base64url")}function pT(e,t,r){let o={version:1,offset:t,signature:vo(e,t,r)};return Buffer.from(JSON.stringify(o),"utf8").toString("base64url")}function uT(e,t,r,o){if(e===void 0)return 0;try{let n=JSON.parse(Buffer.from(e,"base64url").toString("utf8")),s=n.offset;if(n.version!==1||typeof s!="number"||!Number.isInteger(s)||s<0||s>r||typeof n.signature!="string")throw new Error("cursor fields do not match the request");let i=Buffer.from(vo(t,s,o),"base64url"),a=Buffer.from(n.signature,"base64url");if(a.length!==i.length||!rT(a,i))throw new Error("cursor signature does not match the request");return s}catch(n){throw new b("Invalid or stale pm tool discovery cursor; restart discovery without cursor.",64,{reason:String(n)})}}function gt(e,t,r){return{value:dT(e),weight:t,available:r!=="unavailable",source:r}}function ke(e,t,r){return gt(e??t,r,e===void 0?"computed":"host")}function mT(e,t,r){let o=Object.hasOwn(he,e.name)?he[e.name]:"help",n=Ve(o),s=`${e.name} ${e.description} ${o} ${n}`,i=cT(t,s),a=new Set(ue(t)),d={lexical:gt(i,B.lexical,"computed"),semantic:ke(e.signals?.semantic,lT(t,s),B.semantic),graph:ke(e.signals?.graph,a.has(n)||a.has(o)?1:0,B.graph),permission:gt(1,B.permission,"authorization"),freshness:ke(e.signals?.freshness,1,B.freshness),usage:ke(e.signals?.usage,oT.includes(e.name)?1:0,B.usage)},c=Object.values(d).reduce((l,p)=>l+p.value*p.weight,0);return{name:e.name,description:e.description,command:o,tier:Ke(o),family:n,score:Number(c.toFixed(6)),signals:d,...r?{input_schema:structuredClone(e.inputSchema)}:{}}}function fT(e){if(e.cursorIntegrityKey!==void 0&&(!(e.cursorIntegrityKey instanceof Uint8Array)||e.cursorIntegrityKey.byteLength<32))throw new b("pm tool discovery cursorIntegrityKey must contain at least 32 bytes.",64);if(e.tier!==void 0&&(typeof e.tier!="string"||!To.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);if(e.family!==void 0&&(typeof e.family!="string"||!Co.has(e.family)))throw new b("pm tool discovery family must be a declared capability family.",64);if(e.profile!==void 0&&(typeof e.profile!="string"||!iT.has(e.profile)))throw new b("pm tool discovery profile must be core, standard, full, or custom.",64)}function _T(e){let t=xe(e.query===void 0?"":e.query,"query").trim().replace(/\s+/gu," ");xe(e.cursor===void 0?"":e.cursor,"cursor");let r=Eo(e.limit===void 0?10:e.limit),o=So(e.outputBudget===void 0?1200:e.outputBudget);return fT(e),{query:t,includeSchema:wo(e.includeSchema),limit:r,budget:o,maximumTier:bo[e.tier??"full"],profile:e.profile===void 0?"core":e.profile}}function Oo(e,t,r){let o=r??e.tools.reduce((i,a,d)=>i+(d===0?0:1)+Buffer.byteLength(JSON.stringify(a),"utf8"),0),n={...e,tools:[]},s=0;for(let i=0;i<4;i+=1){let a=Buffer.byteLength(JSON.stringify({...n,token_cost:{estimated_tokens:s,budget:t,within_budget:!0}}),"utf8"),d=Math.ceil((a+o)/4);if(d===s)break;s=d}return s}function hT(e,t,r){return e.filter(o=>o.authorized!==!1).map(o=>mT(o,r.query,r.includeSchema)).filter(o=>o.tier!=="internal"&&bo[o.tier]<=r.maximumTier&&(t.family===void 0||o.family===t.family)).sort((o,n)=>n.score-o.score||(o.name<n.name?-1:o.name>n.name?1:0))}function gT(e,t,r){if(t==="unbounded")return[...e];let o=[],n=0;for(let[s,i]of e.entries()){let a=n+(s===0?0:1)+Buffer.byteLength(JSON.stringify(i),"utf8");if(Oo(r(s+1),t,a)>t)break;o.push(i),n=a}return o}function I$(e,t={}){aT(e),Ao(t);let r=_T(t),o=t.cursorIntegrityKey??sT,n=hT(e,t,r),s=go({query:r.query,family:t.family??null,tier:t.tier??"full",includeSchema:r.includeSchema,profile:r.profile,ranked:n}),i=uT(t.cursor,s,n.length,o),a=n.slice(i,i+r.limit),d=[];r.includeSchema||d.push({name:"input_schema",reason:"compact_projection",restore_with:"Set includeSchema=true."}),i+r.limit<n.length&&d.push({name:"tools",reason:"limit",restore_with:"Continue with next_cursor or increase limit."});let c={result_type:"pm_tool_discovery",contract_version:1,query:r.query,profile:r.profile,total:n.length,ranking_policy:{version:1,formula:"weighted_sum_then_name",weights:B},cache:{key:go({fingerprint:s,cursorIntegrityKey:yo("sha256").update(o).digest("hex"),limit:r.limit,offset:i,budget:r.budget}),ttl_ms:3e4,scope:"private",invalidates_on:nT}},l=(g,T=g.length)=>{let E=i+T,q=E<n.length,R=[...d];return T<a.length&&R.push({name:"tools",reason:"token_budget",restore_with:"Continue with next_cursor or increase outputBudget."}),{...c,tools:[...g],returned:T,has_more:q,...q?{next_cursor:pT(s,E,o)}:{},omission_receipt:{has_omissions:R.length>0,omitted:R}}},p=g=>{let T=l(g),E=Oo(T,r.budget);return{...T,token_cost:{estimated_tokens:E,budget:r.budget,within_budget:r.budget==="unbounded"||E<=r.budget}}},f=gT(a,r.budget,g=>l([],g)),_=p(f);if(a.length>0&&f.length===0){let g=p([a[0]]).token_cost.estimated_tokens;throw new b(`pm tool discovery outputBudget is too small to return a tool; increase it to at least ${g}.`,64,{required:String(g)})}if(r.budget!=="unbounded"&&_.token_cost.estimated_tokens>r.budget)throw new b(`pm tool discovery outputBudget is too small; at least ${_.token_cost.estimated_tokens} estimated tokens are required for this page.`,64,{required:String(_.token_cost.estimated_tokens)});return _}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e02d896b-ffa2-5bfa-83dc-d567e1ecd8be")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="438f2063-2307-5945-b1a8-67c0fc24091b")}catch{}})();export{OO as ACTIONABILITY_ORDERING_KINDS,Ud as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,cd as ACTIVITY_FLAG_CONTRACTS,ri as AGENT_PROVENANCE_DIMENSIONS,Ks as AGGREGATE_FLAG_CONTRACTS,xa as APPEND_FLAG_CONTRACTS,cM as ASSURANCE_ACTIONS,lM as ASSURANCE_DECLARATION_KINDS,EI as ASSURANCE_DOCUMENT_VERSION,Qa as ASSURANCE_FLAG_CONTRACTS,SI as ASSURANCE_GATE_TRIGGERS,wI as ASSURANCE_MEASUREMENT_SOURCE_KINDS,_P as ASSURANCE_PRESET_IDS,yI as AssuranceEvaluationRefusalError,gI as AssuranceMutationRefusalError,bI as AssuranceSourceResolutionError,jn as BASELINE_ITEM_FORMAT_VERSION,Qy as BOUNDARY_FIXTURE_CAPTURE_SOURCES,iR as BRIEF_LIST_FIELDS,ni as BUILTIN_AGENT_PROVENANCE_ADAPTERS,Y as BUILTIN_CORPUS_SHAPES,oi as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,pn as BUILTIN_ITEM_TYPE_VALUES,Vt as BUILTIN_PROFILES,IC as BUILTIN_RELATIONSHIP_KINDS,$d as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,dd as CALENDAR_FLAG_CONTRACTS,Na as CLAIM_FLAG_CONTRACTS,Ic as CLOSE_ACTION_OPTION_KEYS,Ma as CLOSE_FLAG_CONTRACTS,ka as CLOSE_MANY_FLAG_CONTRACTS,Ua as CLOSE_TASK_FLAG_CONTRACTS,Ws as COMMENTS_FLAG_CONTRACTS,eC as COMMON_MUTATION_COMMAND_OPTION_KEYS,Cd as COMPLETION_FLAG_CONTRACTS,gn as CONFIDENCE_TEXT_VALUES,ca as CONFIG_FLAG_CONTRACTS,Fd as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,WM as CONTEXT_EVALUATION_METRIC_NAMES,pd as CONTEXT_FLAG_CONTRACTS,Aw as CONTEXT_INTENT_LIMIT_OVERRIDE_WARNING,qt as CONTEXT_OUTPUT_VALUES,QM as CONTEXT_PACKING_PROFILES,UM as CONTEXT_RECENCY_EPOCH,zM as CONTEXT_RELEVANCE_SERVICE,BM as CONTEXT_RELEVANCE_SIGNAL_NAMES,r0 as CONTEXT_SIGNAL_SET_VERSION,t0 as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,o0 as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,fw as CONTEXT_USAGE_LIMITS,Td as CONTRACTS_FLAG_CONTRACTS,nd as COPY_FLAG_CONTRACTS,rc as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,nc as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,oc as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,ET as CREATE_DIRECT_CLOSE_REASON_DEFAULT,ed as CREATE_FLAG_CONTRACTS,NE as CURRENT_HISTORY_HASH_ALGORITHM,Kw as CURRENT_HISTORY_ITEM_HASH_VERSION,Yw as CURRENT_HISTORY_RECORD_HASH_VERSION,Bn as CURRENT_ITEM_FORMAT_VERSION,a0 as ContextSignalStore,_w as ContextUsageValidationError,xM as DEFAULT_AUTHOR_IDENTITY_VOCABULARY,w0 as DEFAULT_CHILD_SAMPLE_LIMIT,nR as DEFAULT_COMPACT_LIST_FIELDS,yv as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,cf as DEFAULT_EVAL_QUERIES_RELATIVE_PATH,pP as DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET,wM as DEFAULT_TERMINAL_TRANSITION_POLICY,p0 as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,wR as DEFECT_ESCAPE_CLASSES,AR as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Da as DELETE_FLAG_CONTRACTS,fn as DEPENDENCY_KIND_VALUES,fd as DEPS_FLAG_CONTRACTS,Zs as DOCS_FLAG_CONTRACTS,Xa as DUPLICATES_FLAG_CONTRACTS,jP as DURABLE_MERGE_RECEIPT_INTRODUCED_AT,IR as DefectRecurrencePolicyParseError,hd as EVAL_FLAG_CONTRACTS,tf as EVAL_METRIC_NAMES,sf as EVAL_QUERY_SET_CONTRACT,af as EVAL_QUERY_SET_EXAMPLE,nf as EVAL_QUERY_SET_SCHEMA_ID,ld as EVENTS_FLAG_CONTRACTS,Ba as EVENT_FLAG_CONTRACTS,$o as EXECUTABLE_COMMAND_ALIASES,me as EXIT_CODE,Ta as EXTENSION_ACTIVATE_FLAG_CONTRACTS,ba as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,Oa as EXTENSION_ADOPT_FLAG_CONTRACTS,tk as EXTENSION_CAPABILITIES,TT as EXTENSION_CAPABILITY_CONTRACT,yT as EXTENSION_CAPABILITY_CONTRACT_VERSION,bT as EXTENSION_CAPABILITY_LEGACY_ALIASES,xn as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,va as EXTENSION_CATALOG_FLAG_CONTRACTS,Ca as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,ya as EXTENSION_DESCRIBE_FLAG_CONTRACTS,Aa as EXTENSION_DOCTOR_FLAG_CONTRACTS,ga as EXTENSION_EXPLORE_FLAG_CONTRACTS,la as EXTENSION_FLAG_CONTRACTS,ua as EXTENSION_INIT_FLAG_CONTRACTS,_a as EXTENSION_INSTALL_FLAG_CONTRACTS,Sa as EXTENSION_MANAGE_FLAG_CONTRACTS,Ea as EXTENSION_MIGRATE_FLAG_CONTRACTS,rk as EXTENSION_POLICY_MODES,ok as EXTENSION_POLICY_SURFACES,wa as EXTENSION_RELOAD_FLAG_CONTRACTS,ik as EXTENSION_SANDBOX_PROFILES,pa as EXTENSION_SCOPE_FLAG_CONTRACTS,nk as EXTENSION_TRUST_MODES,ha as EXTENSION_UNINSTALL_FLAG_CONTRACTS,jR as EXTERNAL_DEPENDENCY_RESOLUTION_STATUSES,GR as EXTERNAL_DEPENDENCY_SOURCE_KIND,UR as EXTERNAL_DEPENDENCY_SOURCE_KIND_ALIAS,Wv as ExtensionCommandError,Js as FILES_FLAG_CONTRACTS,id as FOCUS_FLAG_CONTRACTS,Wa as GC_FLAG_CONTRACTS,cR as GET_DEPTH_INPUT_VALUES,dR as GET_DEPTH_VALUES,ud as GET_FLAG_CONTRACTS,Hs as GLOBAL_FLAG_CONTRACTS,Hp as GRAPH_DURABLE_CACHE_MIN_ITEMS,zp as GRAPH_DURABLE_CACHE_VERSION,_d as GRAPH_FLAG_CONTRACTS,oR as GRAPH_QUERY_DEFAULTS,De as GRAPH_SUBCOMMAND_VALUES,md as GUIDE_FLAG_CONTRACTS,Ja as HEALTH_FLAG_CONTRACTS,oa as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,aP as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,_M as HISTORY_COMPACT_BULK_DEFAULT_MIN_ENTRIES,na as HISTORY_COMPACT_FLAG_CONTRACTS,yi as HISTORY_EVENT_CLASSIFICATION_VERSION,Qs as HISTORY_FLAG_CONTRACTS,kE as HISTORY_HASH_ALGORITHMS,av as HISTORY_ITEM_HASH_VERSION_3_INTRODUCED_IN,ta as HISTORY_REDACT_FLAG_CONTRACTS,ra as HISTORY_REPAIR_FLAG_CONTRACTS,kl as INIT_AGENT_GUIDANCE_MODE_VALUES,da as INIT_FLAG_CONTRACTS,Ra as INSTALL_FLAG_CONTRACTS,hn as ISSUE_SEVERITY_VALUES,rd as ITEM_COMPLETE_FLAG_CONTRACTS,kP as ITEM_LATEST_TIMESTAMP_FIELDS,CT as ITEM_METADATA_KEY_ORDER,td as ITEM_MUTATE_FLAG_CONTRACTS,od as ITEM_REOPEN_FLAG_CONTRACTS,Os as ITEM_REVISION_CONFLICT_CHANGE_LIMIT,vs as ITEM_REVISION_CONFLICT_CODE,AP as ITEM_SCALAR_MISSING_VALUE,un as ITEM_TYPE_VALUES,MP as ITEM_UNION_COLLECTION_FIELDS,s0 as JsonFileContextSignalStoreAdapter,Xs as LEARNINGS_FLAG_CONTRACTS,xE as LEGACY_HISTORY_HASH_ALGORITHM,Ru as LINKED_TEST_ENV_NAME_PATTERN,Iu as LINKED_TEST_PM_CONTEXT_MODE_VALUES,Ou as LINKED_TEST_PROTECTED_ENV_KEYS,Pu as LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,Ld as LIST_COMMANDER_STRING_OPTION_CONTRACTS,sR as LIST_COMMAND_DEFAULT_PROJECTIONS,ak as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,Vs as LIST_FILTER_FLAG_CONTRACTS,YR as LIST_SORT_FIELDS,XR as LIST_SORT_ORDER_VALUES,bi as MAINTENANCE_HISTORY_OPERATIONS,S0 as MAX_CHILD_PROJECTION_ITEMS,RT as MAX_WORKFLOW_POLICIES,IT as MAX_WORKFLOW_POLICY_TERMS,ja as MEET_FLAG_CONTRACTS,z0 as MERGE_DRIVER_ARTIFACT_VALUES,ea as MERGE_FLAG_CONTRACTS,$e as MERGE_SUBCOMMAND_VALUES,K0 as MUTATION_EVENT_WIRE_BUDGET,se as MemoryRelationshipGraphAdapter,Gd as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,yd as NEXT_FLAG_CONTRACTS,vm as NEXT_OUTPUT_VALUES,kM as NEXT_RANKING_POLICIES,Ys as NOTES_FLAG_CONTRACTS,qO as OutputEnvelopeFitError,ma as PACKAGE_FLAG_CONTRACTS,fa as PACKAGE_INIT_FLAG_CONTRACTS,Ga as PAUSE_TASK_FLAG_CONTRACTS,Rc as PLAN_CREATE_METADATA_PARAMETER_KEYS,aa as PLAN_FLAG_CONTRACTS,js as PLAN_SHOW_DEPTH_VALUES,Ye as PLAN_SUBCOMMANDS,Lm as PLAN_TEMPLATE_NAMES,lb as PM_AGENT_TASK_ACCOUNTING_MODES,ut as PM_AGENT_TASK_TRANSCRIPT_VERSION,xo as PM_BULK_LIFECYCLE_COMMAND_ALIASES,rs as PM_CLI_ERROR_DETAILS_LIMITS,ds as PM_CLI_EXPECTED_ERROR_NAME,hR as PM_CLI_GRAMMAR_CONTRACT,pR as PM_CLI_GRAMMAR_NOUNS,Xo as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,uR as PM_CLI_SHARED_VERBS,Do as PM_COMMAND_ALIAS_CONTRACTS,te as PM_COMMAND_CAPABILITY_CONTRACTS,It as PM_COMMAND_DESTINATION_CONTRACTS,uI as PM_COMMAND_EXIT_CONTRACTS,pI as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Pi as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,dI as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,qe as PM_COMMAND_POSITIONAL_CONTRACTS,tl as PM_COMMAND_VISIBILITY_CONTRACTS,tP as PM_COMPLETE_LIST_FINDING_CODES,LO as PM_CONTEXT_INTENTS_FILE,vw as PM_CONTEXT_INTENT_CONTRACTS,ko as PM_CONTEXT_OPS_COMMAND_ALIASES,Vo as PM_CORE_COMMAND_NAMES,G as PM_CORPUS_SHAPE_SCHEMA,Zo as PM_DEPRECATED_TOOL_ACTIONS,Ai as PM_DIAGNOSTIC_DEGRADATION_STEPS,vi as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,wi as PM_DIAGNOSTIC_OUTPUT_CLASSES,Qo as PM_DISCOVERABLE_TOOL_ACTIONS,Yr as PM_EPISODE_SCHEMA,sI as PM_ERROR_CODE_CATALOG,rI as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,to as PM_EXACT_COVERAGE_METRICS,Uo as PM_EXTENSION_CAPABILITY_CONTRACTS,Ko as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,Bo as PM_EXTENSION_POLICY_MODE_CONTRACTS,Ho as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,zo as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,jo as PM_EXTENSION_SERVICE_NAME_CONTRACTS,qo as PM_EXTENSION_TRUST_MODE_CONTRACTS,Di as PM_GENERIC_REFUSAL_GUIDANCE,VI as PM_GITATTRIBUTES_END,HI as PM_GITATTRIBUTES_START,WI as PM_GITATTRIBUTES_V2_END,KI as PM_GITATTRIBUTES_V2_START,cl as PM_GITIGNORE_END,dl as PM_GITIGNORE_START,bM as PM_HISTORY_ATTESTATION_CONTRACT,Mo as PM_HISTORY_COMMAND_ALIASES,XE as PM_HISTORY_OPERATION_ALIASES,ZE as PM_HISTORY_OPERATION_CONTRACT,JE as PM_HISTORY_OPERATION_PATTERNS,Yo as PM_ITEM_ACTION_SUBCOMMANDS,WE as PM_ITEM_HISTORY_OPERATIONS,it as PM_MCP_APPS_EXTENSION,kr as PM_MCP_APPS_SERVER_CAPABILITY,Ae as PM_MCP_APPS_SPEC_VERSION,Lr as PM_MCP_APP_CONTRACTS,Nr as PM_MCP_APP_MIME_TYPE,oT as PM_MCP_ENTRY_TOOL_NAMES,m as PM_MCP_ERROR_CODES,EN as PM_MCP_HTTP_PROTOCOL_VERSION,Cg as PM_MCP_INPUT_REQUEST_METHODS,nr as PM_MCP_LEGACY_PROTOCOL_VERSIONS,or as PM_MCP_LOG_LEVELS,w as PM_MCP_META_KEYS,v$ as PM_MCP_PROGRESSIVE_DISCOVERY_EXTENSION,O$ as PM_MCP_PROGRESSIVE_DISCOVERY_SERVER_CAPABILITY,sl as PM_MCP_PROMPT_CONTRACTS,H as PM_MCP_PROTOCOL_VERSION,il as PM_MCP_RESOURCE_CONTRACTS,at as PM_MCP_SKILLS_DRAFT_REVISION,Dr as PM_MCP_SKILLS_EXTENSION,Oy as PM_MCP_SKILLS_SERVER_CAPABILITY,P as PM_MCP_SKILL_LIMITS,Se as PM_MCP_SUBSCRIPTION_ID_META_KEY,re as PM_MCP_SUPPORTED_PROTOCOL_VERSIONS,fN as PM_MCP_TASKS_EXTENSION,kg as PM_MCP_TASK_STATUSES,he as PM_MCP_TOOL_COMMAND_CONTRACTS,pS as PM_MODE_PAIRED_OUTPUT_PROJECTION_CONTRACTS,us as PM_MUTATION_ACTION_CONTRACTS,Ne as PM_NAMESPACED_COMMAND_ALIASES,Kr as PM_OBSERVATION_SCHEMA,Si as PM_OUTPUT_BUDGET_CLASSES,Ei as PM_OUTPUT_DEGRADATION_STEPS,Nt as PM_OUTPUT_ENVELOPE_KINDS,Gt as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,Wo as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,Ft as PM_PACKAGE_RESOURCE_KINDS,Be as PM_POSITIONAL_ACTION_CONTRACTS,Dc as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Nc as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,BS as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,tw as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,US as PM_READ_OUTPUT_DIMENSIONS,jS as PM_READ_OUTPUT_OPTION_FLAGS,LS as PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS,NS as PM_READ_OUTPUT_SESSION_MIN_TOKENS,jC as PM_READ_OUTPUT_SURFACES,qS as PM_READ_OUTPUT_SURFACE_CONTRACTS,MS as PM_READ_OUTPUT_TAIL_RETENTION_POLICIES,lS as PM_READ_ROW_CONTRACTS,cS as PM_READ_ROW_JQ_SELECTOR,Ui as PM_RECOVERY_ECHO_FIELDS,_D as PM_RECOVERY_REFERENCE_FIELDS,ce as PM_RECOVERY_REFERENCE_KINDS,Nb as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,uo as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2,ED as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE,po as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2,No as PM_RELOCATED_COMMAND_ALIASES,Fc as PM_REPRODUCIBLE_PROCESS_ENV,mI as PM_SUCCESS_EXIT_CODES,Jo as PM_TOOL_ACTIONS,Pc as PM_TOOL_ACTION_PARAMETER_CONTRACTS,Lc as PM_TOOL_PARAMETERS_SCHEMA,xc as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,kc as PM_TOOL_PARAMETERS_SCHEMA_VERSION,vc as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,Wr as PM_VERDICT_SCHEMA,YE as PM_WORKSPACE_HISTORY_OPERATIONS,Hr as PM_WORKSPACE_RECIPE_SCHEMA,sa as PROFILE_FLAG_CONTRACTS,Qt as PROFILE_LINT_CODES,Zt as PROFILE_LINT_DIMENSIONS,Ht as PROFILE_NAMES,Xe as PROFILE_SUBCOMMANDS,b as PmCliError,ge as PmClient,rP as PmCompleteListValidationError,y as PmMcpAuthorizationError,ir as PmMcpInputRequiredError,Or as PmMcpIssuerCredentialStore,u as PmMcpProtocolError,sr as PmMcpRequestStateReplayGuard,Br as PmMcpSkillRegistry,gr as PmMcpSubscriptionRegistry,ot as PmMcpTaskStore,mw as QUERY_CURSOR_CONTRACT,Pa as REINDEX_FLAG_CONTRACTS,QA as REINDEX_LOCK_ID,pt as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,$a as RELEASE_FLAG_CONTRACTS,qa as REMIND_FLAG_CONTRACTS,At as RESERVED_ITEM_FIELD_NAMES,La as RESTORE_FLAG_CONTRACTS,_n as RISK_VALUES,HO as RelationshipEventLog,VO as RelationshipEventStore,z as RelationshipGraph,Ue as RelationshipKindRegistry,ia as SCHEMA_FLAG_CONTRACTS,Dd as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,dk as SEARCH_EXTENSION_FLAG_DEFINITIONS,bd as SEARCH_FLAG_CONTRACTS,Wu as SEMANTIC_ATTRIBUTION_LIMITS,wT as SETTINGS_DEFAULTS,ff as SNAPSHOT_SCHEMA,BI as SOURCE_CONTEXT_ACCESS_ENV,qI as SOURCE_CONTEXT_WRITE_OVERRIDE_ENV,Qu as START_BLOCKED_REFUSAL_CODE,Zu as START_BLOCKER_ENFORCEMENT_DEFAULT,Fa as START_TASK_FLAG_CONTRACTS,Ya as STATS_FLAG_CONTRACTS,mn as STATUS_VALUES,zs as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,Ti as SUBSTANTIVE_HISTORY_OPERATIONS,Ww as SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,Xw as SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,LC as SUPPRESS_HOST_OUTPUT_MARKER,Va as TELEMETRY_FLAG_CONTRACTS,Bf as TELEMETRY_SUBCOMMANDS,Ha as TEST_ALL_FLAG_CONTRACTS,za as TEST_FLAG_CONTRACTS,Ka as TEST_RUNS_FLAG_CONTRACTS,$f as TEST_RUN_MEASUREMENT_LIMIT,Ec as TOOL_ACTIVITY_OPTION_CONTRACTS,lc as TOOL_AGGREGATE_OPTION_CONTRACTS,yc as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,Cc as TOOL_CALENDAR_OPTION_CONTRACTS,Tc as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,Sc as TOOL_CONTEXT_OPTION_CONTRACTS,_c as TOOL_CREATE_OPTION_CONTRACTS,fc as TOOL_CREATE_OPTION_CONTRACT_SOURCE,wc as TOOL_DEPS_OPTION_CONTRACTS,Ac as TOOL_GRAPH_OPTION_CONTRACTS,cc as TOOL_LIST_FILTER_OPTION_CONTRACTS,pc as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,mc as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,uc as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,bc as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,gc as TOOL_UPDATE_OPTION_CONTRACTS,hc as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,ST as TYPE_TO_FOLDER,OC as UNKNOWN_SUBCOMMAND_COMPATIBILITY_CODES,ic as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,ac as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,sc as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,sd as UPDATE_FLAG_CONTRACTS,ad as UPDATE_MANY_FLAG_CONTRACTS,Ia as UPGRADE_FLAG_CONTRACTS,Za as VALIDATE_FLAG_CONTRACTS,OT as WORKFLOW_POLICY_ACTIONS,JI as WORKFLOW_POLICY_DOCUMENT_SCHEMA,XI as WORKFLOW_POLICY_SCHEMA,gd as WORKSPACE_FLAG_CONTRACTS,yA as WORKSPACE_HISTORY_ID,_f as WORKSPACE_SNAPSHOT_ACTIONS,Wl as WorkspaceGraphCache,JO as WorkspaceTransactionInterruptedError,bu as _testOnly,E0 as _testOnlyAggregateCommand,Vl as _testOnlyConfigCommand,R0 as _testOnlyGetCommand,iu as _testOnlyHealthCommand,Dl as _testOnlyInit,xl as _testOnlyInitAgentGuidance,Sk as _testOnlyItemTransaction,J0 as _testOnlyMutationEvents,b0 as _testOnlyNextCommand,q0 as _testOnlySearchCommand,mP as _testOnlySimilarity,Gm as _testOnlyTemplates,hu as _testOnlyValidateCommand,ek as _testOnlyWorkspacePosition,Ak as abandonItemTransaction,rR as abandonWorkspaceTransaction,bP as acceptAssuranceProposals,fu as acknowledgeLinkedTests,zl as acknowledgeUnknownAuthorHistoryEvents,ql as acknowledgeUnknownAuthorHistoryEventsFromTransport,bv as acquireItemMetadataDerivedIndexLock,je as acquireLock,ti as acquireLockLease,nx as activateExtensionForTest,QC as activateExtensions,tm as admitStartWithOpenBlockers,ei as agentSessionEnvironment,q_ as aggregate,vf as analyzeAgentProvenanceDescriptorCoverage,OR as analyzeDefectChangeRisk,dM as analyzeDefectRecurrenceCoverage,gp as analyzeDuplicateItems,WO as analyzeGraphImpact,Hc as analyzeHierarchyIntegrity,YO as analyzeKnowledgeGraph,_I as analyzePmCommandExitConformance,en as analyzePmToolActionParity,YP as analyzeReconciliationDiscard,KO as analyzeRelationshipExecution,Dp as analyzeRelationshipSchedule,mg as analyzeSdkActionCoverage,Pt as analyzeSdkCliParameterCompleteness,th as append,qi as appendHistoryEntry,EA as appendWorkspaceAuditEvent,CA as appendWorkspaceHistoryChange,UT as applyAcceptanceCriteriaMutations,gP as applyAssurancePreset,Rd as applyBootstrapPagerPolicy,oM as applyClosureTimestampFix,Mw as applyContextIntentProjection,Am as applyContextTagProjection,JR as applyFilterValueEcho,ov as applyHistoryPatch,$c as applyInvocationAuthorOverride,op as applyPathMigrations,JS as applyReadOutputDimensions,KS as applyReadOutputIncludeModes,$S as applyReadOutputSessionReferences,AE as applyRegisteredItemFieldDefaultsAndValidation,ap as applyStandaloneNote,Fs as applyStoredExtensionMigrationState,BT as applyTagRemovals,RM as applyTerminalOrderingPolicy,dp as artifactKey,_C as asRecordClone,fC as asRecordOrNull,He as assembleWorkspaceRelationshipGraph,sP as assertCompleteListResult,Fx as assertExtensionBlueprint,$x as assertExtensionCapabilityUsage,bx as assertExtensionDeactivated,jx as assertExtensionManifestCompatible,Ux as assertExtensionManifestMatchesBlueprint,Bx as assertExtensionPreflight,Wc as assertHierarchyMutationAllowed,hM as assertHistoryCompactTarget,JP as assertHistoryRepairTarget,Ji as assertInitializedTracker,np as assertLinkedArtifactMutationIsUnambiguous,Hx as assertMcpClientCapabilities,zx as assertMcpProtocolHeader,cb as assertMemoryRelationshipGraphAdapterConformance,HT as assertNoUnknownCsvKeys,vu as assertNonHierarchyCardinalityMutationAllowed,Tx as assertPackageManifest,MA as assertParentReferenceIsNotSelf,ZN as assertPmMcpSkillsCapability,Gx as assertProjectProfile,fv as assertProjectRuntimeCompatibility,pv as assertProjectRuntimeFormatGuard,uS as assertProjectionModeChoice,Xi as assertReadableTrackerRoot,Cx as assertRegisteredCommandContract,Mx as assertRegisteredCommandOverride,Ox as assertRegisteredExporter,Ex as assertRegisteredFlags,Sx as assertRegisteredHook,vx as assertRegisteredImporter,Rx as assertRegisteredItemField,Ix as assertRegisteredItemType,Dx as assertRegisteredMigration,kx as assertRegisteredParserOverride,xx as assertRegisteredPreflightOverride,Px as assertRegisteredProfile,Nx as assertRegisteredRendererOverride,wx as assertRegisteredSearchProvider,Lx as assertRegisteredServiceOverride,Ax as assertRegisteredVectorStoreAdapter,xC as assertRelationshipEdgeAllowed,no as assertRelationshipGraphAdapterConformance,FT as assertSchemaPreviewSupported,Hf as assertTestMeasurementRun,Bw as assertWellFormedOutputText,AI as assuranceAssertionUpdateIsLoosening,Nw as attachContextIntentReceipt,hw as attachContextUsageServingReceipt,lu as attachLinkedTestMutationProvenance,cu as attachLinkedTestProvenance,Ze as attachMcpServerInfo,yS as attachOutputOmissionReceipt,Dw as attachOutputTokenAccounting,Lw as attachReadOutputContracts,FS as attachReadOutputSessionReceipt,hl as auditMergeAttributeFence,YI as auditMergeDriverConfiguration,Bp as auditWorkspaceRelationshipGraph,$N as authorizeMcpHttpRequest,Zn as boundAgentEpisodeIdentity,OS as boundReadOutputRows,Cm as buildChildrenByParent,$0 as buildCompactSearchFilterSummary,ZR as buildContentFilterEcho,i0 as buildContextSignalSnapshot,Vy as buildCorpusShapeItemPlan,vR as buildDefectRecurrenceIndex,vl as buildExtensionDescribeResult,Rl as buildExtensionInstallPlan,QR as buildGovernanceMissingFilterEcho,jA as buildInvalidTypeError,A0 as buildItemChildrenRollup,Ck as buildItemCompletionMutations,qM as buildItemContextRelevanceCandidates,Av as buildItemNotFoundError,O0 as buildItemSchedule,nM as buildLinkedFileRepairReport,RN as buildMcpAuthorizationDiscoveryUrls,gg as buildMcpCompleteResult,Kx as buildMcpDiscoverResult,xN as buildMcpDynamicRegistrationMetadata,TN as buildMcpHttpRequestHeaders,tN as buildMcpInputRequiredResult,ON as buildMcpProtectedResourceMetadata,fl as buildMergeAttributePatterns,Mc as buildPmActionToolInputSchema,AD as buildPmRefusalClosureCensus,uP as buildRelationshipContext,Pv as buildSearchCorpus,kv as buildSemanticCorpusInput,eM as buildStatusRoleWarnings,Yi as buildTrackerInitializationRecovery,$v as buildVectorizationEmbeddingIdentity,Fv as buildVectorizationEmbeddingMetadata,F0 as buildVerboseSearchFilters,ZI as buildWorkflowCompletenessCheck,u0 as buildWorkspaceMemorySnapshot,Jn as canonicalDocument,tC as canonicalizeCommandOptionKey,Fk as canonicalizeCommandSuggestions,jM as canonicalizeContextRecencyCoordinate,PC as canonicalizeRelationshipKind,hD as censusPmRecoveryReferenceProducers,iP as certifyCompleteListResult,ex as checkExtensionManifestCompatibility,Fh as claim,Gh as claimNext,dP as classifyHistoryAuthorEvent,Ci as classifyHistoryEvent,KP as classifyHistoryMergeReceiptReferences,HC as classifyHostEnvironmentFault,U0 as classifyImplicitSemanticFallbackReason,Hn as classifyItemFormatVersion,Kf as classifyLinkedTestCommandSafety,Wf as classifyLinkedTestFailure,hE as clearActiveExtensionHooks,Xp as clearDurableGraphCache,nS as clearFocusedItem,t_ as clearWorkspaceContractsCache,$h as close,Cu as closeItem,Kh as closeTask,Md as coalesceRepeatedListFlags,RO as collectBlockedByIds,PO as collectBlockedByIdsFromCorpus,yw as collectContextUsageDeliveredItemIds,Zc as collectDanglingDependencyReferences,kO as collectDependencyBlockedIds,Xc as collectDuplicateDependencyRows,jp as collectDuplicateRelationshipEdgeGroups,G0 as collectErrorCauseCodes,zc as collectHierarchyRelations,Sr as collectMcpHeaderAnnotations,Qc as collectMissingDependencyTargetIds,Au as collectNewOrderingCycleWarnings,Fp as collectOrderingCycles,Jc as collectOrderingStorageContradictions,FO as collectPackageContextIntentContracts,jt as collectPackageExtensionDirectories,SE as collectRegisteredItemFieldNames,BE as collectRuntimeCreateFieldValues,BA as collectRuntimeFilterValues,qE as collectRuntimeUpdateFieldValues,hm as collectSubtreeIds,Nn as collectUsedExtensionCapabilities,rC as commandOptionFlagLabel,V_ as comments,A_ as commitImportedItem,Ek as commitItemCompletion,Tk as commitItemMutations,QO as commitWorkspaceTransaction,qs as compactFlagAliasContracts,gm as compareCriticalItems,dv as comparePmDateVersions,XO as compareRelationshipSnapshots,hC as compareTimestampStrings,FM as compileHistoryProvenanceMatcher,Iw as composeContextIntentContracts,Kk as composeExtension,Qk as composeExtensionPackage,NO as computeActionabilityReport,_A as computeHistoryDiff,Np as computeRelationshipCentrality,xp as computeRelationshipDominators,Kl as computeWorkspaceGraphFingerprint,oh as config,_E as consumeAfterCommandAffectedItems,$_ as context,xw as contextIntentRowId,jh as copy,Yf as countFailureCategories,AS as countReadOutputRows,Nh as create,hP as createAssurancePreset,sM as createAssuranceWorkspaceContext,yC as createCheckpointId,oP as createCompleteListOptions,eE as createCoreCommandHookContext,eo as createCorpusShapeMeasurement,PI as createEmptyAssuranceDocument,BC as createEmptyExtensionRegistrationRegistry,Yv as createExtensionCommandError,Ls as createExtensionCommandSdk,Mn as createExtensionContributionInventory,qx as createExtensionTestHarness,Bi as createHistoryEntry,lO as createLazyModule,QI as createLifecycleCompletenessPolicies,FN as createMcpStaticBearerVerifier,_N as createMcpTaskStore,wv as createMutationGuardSdk,mS as createOutputOmissionReceipt,ls as createPmCliExpectedError,Ns as createPmCliProgram,Ri as createPmCommandOutputBudget,sw as createQueryFingerprint,db as createRelationshipGraphScaleFixture,Z as createRelationshipGraphSnapshot,wt as createRelationshipKindRegistry,Uc as createReproducibleProcessRunner,L0 as createSearchCursorFingerprint,tE as createSerialQueue,JT as createStdinTokenResolver,RC as createUnknownSubcommandError,$T as createWorkflowPolicyEvaluator,hf as createWorkspaceSnapshot,ix as deactivateExtensionForTest,m1 as declineServiceOverride,kw as decodeContextIntentCursor,cO as decodeHtmlEntitiesInOptions,Er as decodeMcpHttpHeaderValue,Fw as decodePmTableRows,lw as decodeQueryCursor,dw as decodeQueryCursorEnvelope,cw as decodeQueryCursorState,nw as decodeReadOutputContinuationCursor,rx as decodeToon,qN as decoratePmMcpToolsWithApps,lp as dedupeLinkedArtifacts,vE as defaultConfigScope,HM as defaultScoreContextCandidates,b1 as defineAfterCommandHook,g1 as defineBeforeCommandHook,y1 as defineBeforeMutationHook,t1 as defineCommand,d1 as defineCommandOverride,W as defineCorpusShape,dL as defineEpisodeSpecification,h1 as defineExporter,Hk as defineExtension,Vk as defineExtensionBlueprint,QD as defineExtensionManifest,r1 as defineFlag,_1 as defineImporter,n1 as defineItemField,o1 as defineItemType,i1 as defineMigration,Dy as defineObservationContract,E1 as defineOnIndexHook,C1 as defineOnReadHook,T1 as defineOnWriteHook,c1 as defineParserOverride,Ii as definePmCommandOutputBudget,aI as definePmCommandOutputEnvelope,oI as definePmErrorCodeCatalog,l1 as definePreflightOverride,e1 as defineProjectProfile,f1 as defineRendererOverride,s1 as defineSearchProvider,p1 as defineServiceOverride,a1 as defineVectorStoreAdapter,Uy as defineVerdictContract,ve as defineWorkspaceRecipe,Bh as deleteItem,Ef as deleteWorkspaceSnapshot,NC as dependencyToRelationship,Q_ as deps,yP as deriveAssuranceProposals,tM as deriveClosureTimestamp,Yk as deriveExtensionCapabilities,ck as deriveMutationTransactionId,hI as derivePmBulkMutationEffect,gD as derivePmRecoveryReferenceObligations,$p as deriveRelationshipDeadlines,Tl as deriveSchemaEvolutionMigrationId,tO as deriveTelemetryCommandResolution,VA as describeAllowedTransitions,jI as describeExtensionActivation,Xk as describeExtensionBlueprint,AC as describeFlagScalarValueFailure,nm as describeItemOwnershipConflict,Ms as describeItemRevisionChanges,aL as describeObservationCost,Xt as describeProfileComposition,Jt as describeProjectProfile,Rk as describeReadCompletenessControls,Xv as describeUnknownError,pi as detectAgentIdentity,_i as detectHarnessIdentity,Mp as detectRelationshipCommunities,ui as diagnoseAgentIdentity,qp as diffRelationshipAuditSnapshots,Uf as diffTestRunMeasurements,nN as digestMcpRequestParameters,JC as discoverExtensions,Tn as discoverNearbyPmRoot,I$ as discoverPmTools,lv as discoverProjectRuntimeVersionPins,Z_ as docs,H_ as duplicates,Vp as durableGraphCachePath,Jp as durableGraphCacheStatus,qn as effectiveItemFormatVersion,EO as emitTelemetryErrorEvent,w_ as emptyImportedDocument,OP as encodeItemScalarDecisionValue,Cr as encodeMcpHttpHeaderValue,$w as encodePmTableRows,aw as encodeQueryCursor,ow as encodeReadOutputContinuationCursor,ox as encodeToon,hA as enforceHistoryStreamPolicyForItem,gA as enforceHistoryStreamPolicyForItems,eI as enrichCliFlagInvocationContract,xt as enrichCliFlagInvocationContracts,iv as ensureMaterializedHistoryTarget,pl as ensurePmGitignore,Zl as ensureScope,Kv as ensureSentryCommandTracing,Vv as ensureSentryInit,S_ as ensureTrackerInitialized,Ip as enumerateRelationshipPaths,ki as estimatePmOutputTokens,kI as evaluateAssuranceAssertion,xI as evaluateAssuranceGate,vL as evaluateBoundaryFixtures,YM as evaluateContextRanking,RR as evaluateDefectGateEvidence,MI as evaluateMeasurement,of as evaluateMetricFloors,fs as evaluateMutationGuard,kf as evaluateProvenanceCoverage,j1 as evaluateReliabilityWindow,If as evaluateSemanticAttributionCoverage,bp as evaluateSimilarityGovernance,HA as evaluateTransition,jy as evaluateVerdictContract,DT as evaluateWorkflowPolicies,ts as executeEmbeddingBatchesWithRetry,Lv as executeVectorDelete,Dv as executeVectorReset,Nv as executeVectorUpsert,ky as executeWorkspaceRecipe,sp as expandAddGlobEntries,Cp as explainSourceTraceability,CM as exportAttestation,Wh as extension,Xh as extensionActivate,Jh as extensionDeactivate,Yh as extensionList,Wb as extensionMigrate,VP as extractHistoryMergeReceiptDispositions,HP as extractHistoryMergeReceiptReferences,NN as extractMcpTraceContext,tv as extractPatchFailureContext,su as extractReferencedPmItemIdsFromCommand,ab as federateRelationshipGraphSnapshots,Y_ as files,X_ as filesDiscover,J_ as filesLookup,bw as finalizeContextUsageDelivery,Zy as findCoverageDeficits,yp as findDuplicateClusters,ml as findGitWorkspaceRoot,$E as findHistoryIdentityDiscontinuities,wl as findInstalledNpmPackageCandidate,BN as findPmMcpAppByUri,Lo as findPmNamespacedCommand,kp as findRedundantRelationshipEdges,Lp as findRelationshipCutStructure,hp as findSimilarItems,CO as finishTelemetryCommand,zO as fitOutputEnvelope,wC as flattenFlagListValue,Yy as flushTelemetryQueue,zh as focus,Pp as forEachMatchedRelationshipEdge,Up as formatDuplicateEdgeGroup,Vc as formatHierarchyRelation,Gp as formatOrderingStorageContradiction,_R as formatPmPositionalActionFlagTip,Jm as formatProfileApplyHuman,Xm as formatProfileLintHuman,Wm as formatProfileListHuman,Ym as formatProfileShowHuman,Sl as formatSchemaEvolutionMigrationHuman,B0 as formatVectorIndexRecoveryWarnings,Q0 as formatWorkspacePositionHuman,Rh as gc,Vi as generateItemId,j_ as get,uE as getActiveCommandResult,Ow as getActiveContextIntentContracts,Dn as getActiveExtensionRegistrations,DN as getActiveMcpTraceContext,LI as getAssuranceDeclaration,lg as getContracts,rS as getFocusedItem,Sn as getHistoryPath,BO as getItemAt,En as getItemPath,gs as getMutationActionContract,ll as getPmGitignoreBlock,Cn as getSettingsPath,r_ as getWorkspaceContracts,bA as getWorkspaceHistoryPath,eh as graph,Kp as graphAuditBaselinePath,Pf as groupHistoryByEpisode,u1 as handleServiceOverride,Vx as hasMcpClientExtension,jN as hasPmMcpAppsCapability,ze as hasSubcommandFlagContractsForCommand,Gv as hasVectorizationEmbeddingIdentityChanged,Uv as hasVectorizationVectorDimensionChanged,nA as hashDocument,iA as hashDocumentForVersion,sA as hashEmptyDocument,Zw as hashHistoryPatch,Jw as hashHistoryRecord,Qw as hashHistoryStream,RP as hashItemScalarDecisionValue,Oh as health,Ap as hierarchyAncestors,vp as hierarchyDescendants,kh as historyCompact,xh as historyCompactBulk,DE as historyDigest,$M as historyEntryMatchesProvenance,cv as historyItemHashVersionForRuntime,Ih as historyRedact,Ph as historyRepair,Mh as historyRepairAll,IO as indexBlockedByIds,Kc as indexHierarchyRelations,jv as inferConsistentVectorDimension,Oi as inferPmOutputBudgetClass,rh as init,nP as inspectCompleteListResult,qC as inspectExtensionManifestSchema,Fl as inspectHistoryAuthorStream,DP as inspectMergeReceiptEvidence,mv as inspectProjectRuntimeCompatibility,Ss as inspectStaleInProgressItems,fg as inspectStaticExtensionInventory,QP as inspectStatusRoleAssignments,TA as inspectWorkspaceHistoryState,gf as inspectWorkspaceSnapshot,bl as installMergeFence,Wx as interpretMcpResultType,Rm as isAlreadyClaimedError,Qv as isCommanderError,Mk as isCompatibleRecoveryFlag,Wd as isErrnoError,wO as isExternalDependencyReference,AO as isExternalDependencySourceKind,fe as isFileMissingError,$i as isGenericRefusalRequired,Fi as isGenericRefusalWhy,$C as isHostOutputSuppressed,cs as isItemAlreadyExistsError,ks as isItemRevisionConflict,vP as isItemScalarMissingValue,BP as isLegacyMergeReceiptSummary,h as isMcpRecord,_s as isMutationAction,kC as isOrderingRelationshipKind,IA as isPlaceholderReferenceToken,os as isPmCliErrorDetails,ps as isPmCliExpectedError,rn as isPmExtensionCapabilityContract,nn as isPmExtensionPolicyModeContract,sn as isPmExtensionPolicySurfaceContract,on as isPmExtensionServiceNameContract,fI as isPmKnownExitCode,cI as isPmMutationReceipt,We as isPmSuccessfulExitCode,as as isPmTokenBudgetRecovery,tn as isPmToolAction,qP as isPreDurableCloneLocalReceiptSummary,zP as isPreDurableDispositionEligibleReference,uv as isProjectMutatingInvocation,pO as isPureSnakeCaseAlias,QS as isReadOutputBudgetExceeded,xS as isReadOutputSessionReference,Pk as isReadProjectionRecoveryFlag,ZS as isReadResultOmittedForBudget,_S as isReadRowContract,Bc as isRuntimeRecord,YA as isSettingsReadFallback,em as isStartTransition,fO as isTerminalPlanMode,HE as isTerminalStatus,In as isTimestampLiteral,fk as itemDocumentToMutationOptions,v0 as itemHasSchedule,kn as jaccardSimilarity,W_ as learnings,vC as levenshteinDistanceWithinLimit,Hd as limitAnnotationEntries,pu as linkedTestTrustFingerprint,Jk as lintExtensionBlueprint,zC as lintExtensionManifestSchema,er as lintProjectProfile,F_ as list,si as listAgentProvenanceAdapters,Pd as listAliasPluralKeys,G_ as listAllComplete,Ev as listAllDocumentCandidatesCached,es as listAllItemMetadata,Sv as listAllItemMetadataLight,NI as listAssuranceDeclarations,UI as listAssuranceVerdicts,zy as listBuiltinCorpusShapes,Gk as listCoreClosedDomainContracts,lR as listGetProjectionFields,SP as listInvalidProvenanceHistoryStreamIds,aR as listListProjectionFields,$P as listMergeReceipts,hs as listMutationActions,W0 as listMutationEvents,ho as listPmCommandFlagBudgets,ol as listPmCommandsForFamily,rl as listPmCommandsForTier,Me as listPmFlagLexicon,YD as listPmFlagSpellingInventory,nl as listPmMcpToolsForProfile,FD as listPmRequiredArgumentRefusalContracts,GD as listPmSubcommandRefusalContracts,Yt as listProfiles,BD as listTrackerPreflightRecoveryContracts,gk as listUpsertKeyCandidates,yf as listWorkspaceSnapshots,GO as loadContextIntentRuntimeLayers,Um as loadCreateTemplateOptions,ZC as loadExtensions,Qp as loadGraphAuditBaseline,yk as loadGuardedRuntimeSchema,TC as loadMutationCheckpoint,x as loadRelationshipGraphAdapter,Zi as locateItem,zT as looksLikeGenericKeyValueEntry,vS as mapReadOutputRows,FP as markMergeReceiptReconciled,qA as matchesRuntimeFilters,bO as maybeRunFirstUseTelemetryPrompt,Ky as measureCorpusShapePlan,Wi as measureItemMetadataReadWork,jT as mergeAdditiveTags,Wk as mergeExtensionBlueprints,IP as mergeHistoryStreams,xP as mergeItemDocuments,NP as mergeJsonDocuments,kd as mergeLinkedTestTwoTokenEntries,PP as mergeRelationshipEventStreams,Sm as mergeSortedWarnings,mO as migrateItemFilesToFormat,Ov as mutateItem,vv as mutateItemWithHistoryContext,SA as mutateWorkspaceJsonWithHistory,B_ as next,di as normalizeAgentProvenanceAdapterValue,zd as normalizeAnnotationTransportOptions,CI as normalizeAssuranceEvaluation,TI as normalizeAssuranceMutation,xd as normalizeBootstrapInvocation,PE as normalizeBulkIdsValue,Yc as normalizeDependencyGraphTarget,HR as normalizeDependencySeedId,zR as normalizeDependencySourceKind,kt as normalizeDirectExtensionCommandOptions,Rs as normalizeExpectedItemHash,Pn as normalizeExtensionContributionInventory,tS as normalizeHistoryOperationForWrite,EP as normalizeInvalidHistoryProvenance,SR as normalizeItemAddressInvocation,zn as normalizeItemFormatVersion,Hi as normalizeItemId,Wn as normalizeItemMetadata,VR as normalizeItemReference,Id as normalizeLegacyExtensionActionSyntax,ip as normalizeLinkedPath,RA as normalizeParentReferenceValue,Kt as normalizeProfileName,zi as normalizeRawItemId,WS as normalizeReadOutputIncludeModeOptions,lA as normalizeReplayPatchOps,ys as normalizeSimilarityText,zE as normalizeStatusForRegistry,Kn as normalizeStatusInput,GE as normalizeStatusInputWithRegistry,Zv as normalizeThrownExitCode,K_ as notes,Rn as nowIso,Wp as openDurableGraphCache,oN as openMcpRequestState,cL as openPmEpisode,Op as orderingPredecessors,Rp as orderingSuccessors,e0 as packContextCandidates,ym as packRankedContextItems,ag as packageActivate,sg as packageCatalog,dg as packageDeactivate,ng as packageDescribe,rg as packageDoctor,eg as packageInstall,Zh as packageLifecycle,Qh as packageList,og as packageManage,Yb as packageMigrate,ig as packageReload,tg as packageUninstall,uw as paginateQueryRows,Ql as parseAddEntries,ep as parseAddGlobEntries,Kd as parseAnnotationTextInput,lk as parseAtomicMutationControls,Od as parseBootstrapCommandName,wd as parseBootstrapGlobalOptions,vd as parseBootstrapHelpRequest,Nd as parseBootstrapTypeValue,IE as parseBulkIdsText,fm as parseContextDepth,lm as parseContextFocusFields,DO as parseContextIntentDeclarations,_m as parseContextSections,n0 as parseContextSignalSnapshot,qT as parseCsvKv,MR as parseDefectChangeRiskRequest,aM as parseDefectRecurrenceCoverageRequest,PR as parseDefectRecurrencePolicy,rf as parseEvalMetricFloors,df as parseEvalQuerySet,Is as parseExpectHashSpecs,lC as parseExtensionLongFlagToken,ru as parseGraphSubcommand,TM as parseHistoryAttestation,LM as parseHistoryProvenanceFilters,kR as parseIntegerLimit,VE as parseItemDocument,pk as parseItemMutationBatch,UA as parseLimit,Gu as parseLinkedTestAssertionEqualsMap,Uu as parseLinkedTestAssertionGteMap,xu as parseLinkedTestBoolean,Nu as parseLinkedTestContextMode,ku as parseLinkedTestEnvClear,Mu as parseLinkedTestEnvSet,ju as parseLinkedTestJsonEntries,Fu as parseLinkedTestMinLines,$u as parseLinkedTestRegexList,Du as parseLinkedTestStringList,Lu as parseLinkedTestWorkspaceContextMode,wg as parseMcpCachePolicy,_g as parseMcpImplementation,tt as parseMcpInputRequests,lr as parseMcpInputResponses,Wg as parseMcpSubscriptionFilter,rp as parseMigrateEntries,LR as parseMultiValueFilter,lI as parseMutationReceipt,QT as parseOptionalNonNegativeInteger,ZT as parseOptionalNumber,cD as parsePmAgentTaskTranscriptCorpus,R$ as parsePmToolDiscoveryOptions,xR as parsePriority,FR as parsePriorityFilterSet,DS as parseReadOutputSession,wE as parseRegisteredItemFieldAssignments,ae as parseRelationshipGraphSnapshot,tp as parseRemoveEntries,Tp as parseSourceLineRange,DA as parseStatusFilterCsv,DR as parseStringFilterSet,an as parseTags,Ff as parseTestRunMeasurements,NR as parseType,$R as parseTypeFilterSet,Bl as parseUnknownAuthorHistoryEventCoordinates,PT as parseWorkflowPolicy,MT as parseWorkflowPolicyDocument,T0 as partitionDecisionEntries,fA as patchPathToChangedField,dn as pathExists,Vh as pauseTask,Yp as persistDurableGraphResult,WA as persistSelectedItemFormat,lP as planAgentIdentityVocabularyMutation,l0 as planCompletedAtBackfill,Il as planExtensionDirectoryCopy,zk as planItemMutationDocument,tr as planProfileApplication,mD as planRelationshipEventBackfill,tu as planRelationshipRemediation,Cl as planSchemaEvolutionMigration,Ul as planUnknownAuthorHistoryAcknowledgment,bf as planWorkspaceSnapshotRestore,yR as positionalShapeKey,bR as positionalSignatureKey,tx as preflightExtension,Ts as prepareSimilarityText,KT as preserveMutationStdinTokenFields,VT as preserveMutationStdinTokenLiterals,qk as previewItemMutationDocument,bk as previewItemMutations,Vw as printError,Hw as printResult,Ch as profile,wh as profileApply,Ah as profileLint,Eh as profileList,Sh as profileShow,fE as projectAfterCommandItemSnapshot,pm as projectContextFocusRows,Df as projectFleetAttributionAnalytics,DM as projectHistoryProvenance,ji as projectLeanRecoveryPayload,Gw as projectPmBriefListEnvelope,Uw as projectPmBriefSearchEnvelope,ss as projectPmCliErrorContextDetails,ns as projectPmCliErrorDetails,Ni as projectPmDiagnosticOutput,Li as projectPmDiagnosticText,Nf as projectProvenanceCoverageAnalytics,_u as projectValidateCounts,TP as promoteAssuranceAssertion,gw as propagateContextUsageServingReceipt,kL as pruneCompileCacheGenerations,DI as putAssuranceDeclaration,$I as putAssuranceDeclarationBundle,_v as queryItemMetadataIndex,hv as queryLinkedFileMetadataIndex,gv as querySimilarItemMetadataIndex,Gf as queryTestRunMeasurementsBelow,An as quoteCommandArg,wn as quoteWindowsCommandArg,$k as rankCommandPaths,Vd as readAnnotationEntries,mi as readAuthorEnvironment,n_ as readBooleanOption,ww as readContextUsageAffinity,i_ as readCsvListOption,$s as readExtensionMigrationState,cn as readFileIfExists,jd as readFirstStringFromCommanderOptions,Bd as readFirstValueFromCommanderOptions,Mf as readHistoryAnalyticsWindow,aS as readHistoryEntries,gi as readHistorySnapshot,wf as readImprovementLedger,Tv as readItemMetadataDerivedIndexState,Ps as readItemRevision,wk as readItemTransaction,Qi as readLocatedItem,wS as readOutputBudgetCollections,rw as readOutputCollectionFingerprint,SS as readOutputContinuationRowCollections,CS as readOutputContinuationRowPaths,VS as readOutputIncludeModeOptions,kS as readOutputRetainsTail,ES as readOutputRowCollections,TS as readOutputRowPaths,GS as readOutputSessionRemainingTokens,Ut as readPmPackageManifest,e_ as readRequiredString,jE as readRuntimeFieldOptionValue,Ki as readSettings,gO as readSettingsSection,XA as readSettingsWithMetadata,qd as readStringArrayFromCommanderOptions,o_ as readStringOption,Jv as readThrownExitCode,Bv as readVectorizationStatusLedger,sv as readWorkflowPolicies,kT as readWorkflowPolicyField,$O as readWorkspaceContextIntentContracts,d0 as readWorkspaceContextSignals,m0 as readWorkspaceMemory,Z0 as readWorkspacePosition,eR as readWorkspaceTransaction,mA as reanchorHistoryEntries,q1 as reconcileArtifactLedgers,Ln as reconcileExtensionCapabilityUsage,AA as reconcileWorkspaceJsonHistory,mE as recordAfterCommandAffectedItem,GI as recordAssuranceVerdict,Hu as recordClaimSemanticAttribution,Cw as recordContextUsageDelivery,Tw as recordContextUsageServing,Ew as recordContextUsageTouch,Sw as recordContextUsageTouches,Ku as recordFocusSemanticAttribution,Sf as recordImprovementObservation,Vu as recordReleaseSemanticAttribution,Cv as refreshItemMetadataDerivedIndex,gl as refreshMergeAttributeFenceIfInstalled,IS as refreshReadOutputDeliveredCounts,zv as refreshSearchArtifactsForMutation,ai as registerAgentProvenanceAdapters,BR as registerExternalDependencyResolver,ii as registerHarnessSignalDescriptors,dS as registerOutputMaterialFieldGroups,Uh as release,RS as rememberReadOutputFocusRows,FI as removeAssuranceDeclaration,ln as removeFileIfExists,mp as renameArtifactsResultKey,sm as renderCalendarMarkdown,am as renderCalendarToon,wm as renderContextMarkdown,Ol as renderExtensionDescribeMarkdown,Al as renderExtensionSurfaceMarkdown,R_ as renderGuideMarkdown,Nk as renderMissingOptionRetry,C0 as renderNextMarkdown,Uk as renderPmClosedDomainHelp,vn as renderPmCommand,Go as renderPmCommandAliasMigrationHint,al as renderPmCommandVisibilityMarkdown,JD as renderPmFlagLexiconMarkdown,zN as renderPmMcpAppHtml,vD as renderPmRefusalClosureCensusMarkdown,FA as renderRowsAsCsv,GA as renderRowsAsTable,Dh as reopen,nv as replayHistoryToTarget,dA as replayToCanonicalItemDocument,aA as replayToItemDocument,eS as requireHistoryOperation,vM as requireTerminalReason,OM as requireTerminalReasonWithRecovery,rA as resealHistoryRewrite,cE as resetActiveExtensionRuntimeState,Xl as resetWorkspaceGraphCache,Qn as resolveAgentSessionContextFromSignals,Zd as resolveAnnotationIndex,Yd as resolveAnnotationInput,sS as resolveAuthor,hi as resolveAuthorIdentity,OA as resolveBodyFileContent,Hy as resolveBuiltinCorpusShape,im as resolveCalendarOutputFormat,nI as resolveCanonicalPmErrorCodeContract,MC as resolveCanonicalRelationshipKind,iS as resolveClaimPrincipal,ME as resolveCliBulkIdsInput,iC as resolveCommandOptionPolicyState,ML as resolveCompileCacheGeneration,c0 as resolveCompletionTimestamp,UC as resolveConfiguredPmPackageRoot,WR as resolveContentFieldFilters,Pw as resolveContextIntentContract,um as resolveContextOutputFormat,mm as resolveContextTokenBudget,IM as resolveCreateExplicitEmptyFlag,As as resolveDeclaredBlockers,M0 as resolveEffectiveSearchMode,Rv as resolveEmbeddingProviders,Mt as resolveExtensionFlagOptionKey,SC as resolveExtensionFlagValueContract,Pl as resolveExtensionInstallSourceIdentity,pC as resolveExtensionLongFlagName,Ds as resolveExtensionMigrationStatePath,XC as resolveExtensionRoots,qR as resolveExternalDependencyReference,EC as resolveFlagValueKind,dC as resolveGlobalPmRoot,v_ as resolveGuideOutputFormat,Af as resolveHistoryEpisodeGroupIdentity,LE as resolveHistoryHashAlgorithm,QE as resolveHistoryOperation,NM as resolveHistoryProvenanceDimensions,SO as resolveHistorySubject,rv as resolveHistoryTarget,x0 as resolveHybridSemanticWeight,bn as resolveImplicitPmRoot,gC as resolveIsoOrRelative,MO as resolveItemBlockers,vO as resolveItemExecutionRole,mk as resolveItemMutationDocument,om as resolveItemOwnershipConflict,yn as resolveItemTypeRegistry,FE as resolveItemTypesFilePath,vk as resolveLifecycleVerbRecovery,cC as resolveLinkedResourcePositionalRecovery,Xf as resolveLinkedTestFailureExitCode,au as resolveLinkedTestSourceRef,du as resolveLinkedTestSourceWorkspaceRoot,uu as resolveLinkedTestTrust,mu as resolveLinkedTestTrustBatch,Yg as resolveMcpAcknowledgedSubscriptionFilter,Je as resolveMcpRequestContext,ul as resolveMergeInstallContext,Lk as resolveMisnestedCommandPath,KR as resolveMissingMetadataFilters,xk as resolveMissingOptionPlaceholder,fS as resolveModePairedOutputOmissionReceipt,y0 as resolveNextOutputFormat,gS as resolveOutputOmissionReceipt,GC as resolvePmCliVersion,Fo as resolvePmCommandAlias,Ve as resolvePmCommandCapabilityFamily,Dt as resolvePmCommandExitContract,L as resolvePmCommandOperation,Mi as resolvePmCommandOutputBudget,Lt as resolvePmCommandOutputEnvelope,mR as resolvePmCommandPositionalContract,On as resolvePmCommandScopeArgs,Ke as resolvePmCommandVisibilityTier,xi as resolvePmDiagnosticOutputBudget,iI as resolvePmErrorCodeContract,qb as resolvePmFlagSemanticConcept,Le as resolvePmHistoryOperation,Jx as resolvePmMcpExecutableInvocation,FC as resolvePmPackageRootFromModule,fR as resolvePmPositionalActionContract,Ed as resolvePmPositionalActionFlagContracts,Ge as resolvePmRoot,Oc as resolvePmToolCustomFieldCollision,kA as resolvePriority,Wt as resolveProfile,_l as resolveProjectMergeTypeFolders,pw as resolveQueryCursorStart,Ok as resolveReadCompletenessControls,Ik as resolveReadOptionRetryArgs,YS as resolveReadOutputDimensions,ew as resolveReadOutputEncoding,PS as resolveReadOutputRecoveryBudget,zS as resolveReadOutputSurface,hS as resolveReadRowContract,kk as resolveRecoveryCommandName,OE as resolveRegisteredSearchProvider,RE as resolveRegisteredVectorStoreAdapter,Gc as resolveReproducibleProcessEnvironment,Un as resolveRuntimeFieldRegistry,Gn as resolveRuntimeStatusRegistry,Iv as resolveSearchCorpusFields,P0 as resolveSearchMaxResults,D0 as resolveSearchPage,k0 as resolveSearchScoreThreshold,N0 as resolveSearchTuning,Mv as resolveSemanticCorpusCharacterLimit,zu as resolveSemanticLineageIds,ZA as resolveSettingsWithSemanticRuntimeDefaults,zI as resolveSourceContextWritePolicy,Ju as resolveStartTaskInProgressStatus,ee as resolveSubcommandFlagContractsForCommand,AT as resolveTelemetryErrorCategory,Hv as resolveTelemetrySourceAttribution,AM as resolveTerminalReason,hk as resolveTransactionSchema,nC as resolveTypeDefinition,oC as resolveTypeName,$A as resolveTypeSynonym,zA as resolveTypeWorkflows,jl as resolveUnknownAuthorAcknowledgmentSelector,j0 as resolveVectorIndexRecovery,xv as resolveVectorStores,qc as resolveWorkspaceRelationshipKindRegistry,aC as resolveWorkspaceRoot,qh as restore,CC as restoreCheckpointItems,vA as restoreWorkspaceJsonFromHistory,Cf as restoreWorkspaceSnapshot,Tf as restoreWorkspaceSnapshotWithRecovery,ug as runAction,gE as runActiveBeforeMutationHooks,bE as runActiveCommandHandler,yE as runActiveOnIndexHooks,Fn as runActiveOnReadHooks,$n as runActiveOnWriteHooks,TE as runActiveParserOverride,CE as runActivePreflightOverride,EE as runActiveServiceOverride,cm as runActivity,YC as runAfterCommandHooks,Zm as runAggregate,Jd as runAnnotationCommand,Tu as runAppend,pM as runAssuranceAction,uM as runAssuranceDispatch,WC as runBeforeCommandHooks,dm as runCalendar,Im as runClaim,Pm as runClaimNext,Eu as runClose,Su as runCloseMany,Nm as runCloseTask,Qd as runComments,I_ as runCompletion,Hl as runConfig,zt as runContext,ZM as runContextEvaluationCorpus,XM as runContextEvaluationScenario,wu as runCopy,Bu as runCreate,qu as runDelete,Jl as runDeps,fp as runDocs,fP as runDuplicates,lf as runEval,uf as runEvent,Ml as runExtension,Us as runExtensionMigrateAction,Gs as runExtensionMigrations,Ep as runFiles,wp as runFilesDiscover,Sp as runFilesLookup,Lf as runFleetAttributionAnalytics,Xu as runFocus,yu as runGc,Qm as runGet,ou as runGraph,O_ as runGuide,nu as runHealth,I0 as runHistory,SM as runHistoryAttest,fM as runHistoryCompact,gM as runHistoryCompactBulk,WP as runHistoryMaintenance,yM as runHistoryRedact,XP as runHistoryRepair,ZP as runHistoryRepairAll,$l as runInit,Nl as runInitAgentGuidance,ec as runLearnings,up as runLinkedArtifacts,Jf as runLinkedTests,el as runList,pf as runMeet,H0 as runMergeDriver,yl as runMergeInstall,UP as runMergeReceiptEvidenceReport,GP as runMergeReceiptReport,V0 as runMergeReconcile,Om as runNext,tc as runNotes,xm as runPauseTask,Dm as runPlan,Km as runProfileApply,Vm as runProfileLint,zm as runProfileList,Hm as runProfileShow,xf as runProvenanceCoverageAnalytics,sx as runRegisteredCommandForTest,px as runRegisteredCommandOverrideForTest,yx as runRegisteredExporterForTest,dx as runRegisteredHookForTest,gx as runRegisteredImporterForTest,hx as runRegisteredMigrationForTest,ax as runRegisteredMutationGuardForTest,cx as runRegisteredParserOverrideForTest,lx as runRegisteredPreflightOverrideForTest,ux as runRegisteredRendererOverrideForTest,fx as runRegisteredSearchProviderForTest,mx as runRegisteredServiceOverrideForTest,_x as runRegisteredVectorStoreAdapterForTest,rr as runReindex,Mm as runRelease,mf as runRemind,MM as runReopen,$m as runRestore,El as runSchemaEvolutionMigration,ef as runSearch,Wy as runSearchRefreshWorkerEntrypoint,P_ as runStartBackgroundRun,km as runStartTask,jf as runStats,qf as runTelemetry,Bm as runTemplatesList,jm as runTemplatesSave,qm as runTemplatesShow,Zf as runTest,Qf as runTestAll,M_ as runTestRunsList,x_ as runTestRunsLogs,L_ as runTestRunsResume,k_ as runTestRunsStatus,N_ as runTestRunsStop,D_ as runTestRunsWorker,rm as runUpdate,Fm as runUpdateMany,Bt as runUpgrade,gu as runValidate,pg as runWithActiveExtensions,D as runWithAgentSessionContext,KA as runWithConfigurationOnlySettings,Rw as runWithContextIntentContracts,UO as runWithDiscoveredContextIntentContracts,ci as runWithHarnessDetectionSignals,LN as runWithMcpTraceContext,jc as runWithReproducibleProcessEnvironment,li as runWithWorkspaceHarnessSignalDescriptors,Vr as runWithWorkspaceRecipe,eP as runWorkflowPolicyAction,mM as runWorkspaceTransactionGc,eu as saveGraphAuditBaseline,rM as scanClosureTimestamps,CP as scanExtensionHostVersions,Gl as scanHistoryAuthorAttribution,Vn as scanItemFormatVersions,ms as scanMutationSecrets,wP as scanProvenanceResolverHealth,ws as scanStaleInProgressItems,iM as scanStorageIntegrity,nh as schema,ph as schemaAddField,ch as schemaAddStatus,ah as schemaAddType,_h as schemaApplyPreset,hh as schemaInferTypes,ih as schemaList,mh as schemaListFields,bh as schemaRemapStatus,uh as schemaRemoveField,lh as schemaRemoveStatus,dh as schemaRemoveType,yh as schemaRenameField,gh as schemaRenameType,sh as schemaShow,fh as schemaShowField,Th as schemaShowStatus,Dk as scoreCommandPathMatch,VM as scoreContextCandidates,KM as scoreContextCandidatesWithActiveExtensions,Cs as scoreItemSimilarity,UD as scorePmGrammarRefusalClosure,ID as scorePmRefusalClosure,Es as scorePreparedItemSimilarity,qD as scoreTrackerPreflightRecoveryClosure,eA as sealHistoryRecord,rN as sealMcpRequestState,U_ as search,h0 as searchWorkspaceMemory,g0 as searchWorkspaceMemoryReadResult,xO as selectActionableEntries,iw as selectCursorSemanticOptions,E_ as selectImportAuthor,PN as selectMcpClientRegistrationMode,_0 as selectWorkspaceMemory,f0 as selectWorkspaceMemoryRollups,Yu as semanticAttributionAffinity,sO as sentryCaptureCliError,nO as sentryDiscardCommandSpan,iO as sentryFinishCommandSpan,dO as sentryFlush,aO as sentryLogCliUsageError,rO as sentrySetCommandContext,oO as sentryStartCommandSpan,Xn as serializeItemDocument,jk as serializeNdjsonRows,Bk as serializeNdjsonStream,$y as serveDeclaredObservation,lE as setActiveCommandContext,pE as setActiveCommandResult,oE as setActiveExtensionCommands,rE as setActiveExtensionHooks,nE as setActiveExtensionParsers,iE as setActiveExtensionPreflight,dE as setActiveExtensionRegistrations,aE as setActiveExtensionRenderers,sE as setActiveExtensionServices,oS as setFocusedItem,hO as settingsSectionRevision,_O as shouldCompletePlanOnClose,Zp as shouldPersistDurableGraphCache,XT as shouldResolveMutationStdinTokenField,YT as shouldResolveMutationStdinTokens,ev as shouldRunSearchRefreshInForeground,_p as similarityAdvisoryWarnings,bS as sliceReadOutputRowCollection,is as snapshotPmCliErrorContext,cp as sortLinkedArtifacts,GT as splitAcceptanceCriteria,uO as splitCommaList,Yn as splitFrontMatter,XS as stabilizeReadOutputReceiptEstimates,I as stableStringify,uk as stableUpsertValue,vT as stableValueEquals,Hh as startTask,TO as startTelemetryCommand,z_ as stats,UE as statusIsTerminal,Ad as stripGlobalBootstrapTokens,Y0 as subscribeMutationEventBatches,X0 as subscribeMutationEvents,cP as summarizeAgentIdentityVocabulary,Of as summarizeAgentModelProvenance,Rf as summarizeAgentProvenance,JM as summarizeContextEvaluationReports,Vf as summarizeContextPreflight,GM as summarizeHistoryProvenance,Ll as summarizeInitResult,LP as summarizeMergeReceipt,PM as supportsCreateExplicitEmpty,ER as supportsItemIdAlias,DC as suppressHostOutput,Re as syncRelationshipGraphAdapter,Zk as synthesizeExtensionManifest,Sd as toCompletionFlagString,Em as toContextFocusItem,bm as toContextPackingSummary,Tm as toContextRankingSummary,mC as toErrorMessage,a_ as toEstimatedMinutesValue,sk as toExtensionFlagDefinitions,u_ as toImportBoolean,h_ as toImportConfidence,p_ as toImportInteger,T_ as toImportLinkedDocs,b_ as toImportLinkedFiles,C_ as toImportLinkedTests,y_ as toImportLogEntries,g_ as toImportNormalizedEnum,__ as toImportNumberMap,d_ as toImportPriority,l_ as toImportStatus,m_ as toImportStringList,f_ as toImportStringMap,c_ as toImportTags,KE as toItemRecord,s_ as toNonEmptyImportString,uC as toNonEmptyStringOrUndefined,cA as toReplayDocument,jw as toWellFormedText,bs as tokenizeSimilarityText,WT as transferMutationStdinTokenPolicy,VC as translateHostEnvironmentFault,Lh as update,zf as updateLinkedTest,cg as upgrade,vh as validate,OI as validateAssertionDefinition,II as validateAssuranceDocument,RI as validateGateDefinition,_k as validateItemMutationRows,pp as validateLinkedPaths,MN as validateMcpAuthorizationResponseIssuer,IN as validateMcpAuthorizationServerMetadata,kN as validateMcpClientMetadataDocument,CN as validateMcpHttpRequestHeaders,sN as validateMcpJsonSchema,vI as validateMeasurementDefinition,PA as validateMissingParentReference,HS as validateReadOutputOptions,LA as validateSprintOrReleaseValue,sC as validateTypeOptions,ZO as validateWorkspaceTransactionIdentity,EM as verifyAttestation,tI as verifyCliFlagInvocationParity,gR as verifyExplicitPositionalSlotCensus,uA as verifyHistoryChain,pA as verifyHistoryChainWithVersion,jO as verifyHistoryEntries,tA as verifyHistoryRecordHash,oA as verifyHistoryRewriteEvidence,CR as verifyPmCliGrammar,TR as verifyPmCommandPositionalContracts,XD as verifyPmFlagLexicon,TD as verifyPmRecoveryKindRuntimeCoverage,xb as verifyPmRecoveryProducerRuntimeCoverage,bD as verifyPmRecoveryReferences,wD as verifyPmRefusalClosureIdentityRatchet,SD as verifyPmRefusalClosureRatchet,yD as verifyPmRefusalReachability,dc as verifyToolOptionCliParity,xA as withCliMutationInput,xs as withExpectedItemRevisions,Bs as withFlagAliasMetadata,KC as withHostEnvironmentBoundary,NA as withLiteralMutationInput,iN as withMcpCachePolicy,Gi as withoutGenericRefusalExamples,NT as workflowApprovalFingerprint,LT as workflowPolicyApplies,xT as workflowPolicyFingerprint,Yl as workspaceGraphCache,tR as workspaceTransactionPlanDigest,Xd as wrapOwnershipConflict,eO as wrapThrownErrorForSentry,fi as writeAuthorEnvironment,Fe as writeFileAtomic,bC as writeMutationCheckpoint,JA as writeSettings,yO as writeSettingsSection,zw as writeStderr,qw as writeStdout,qv as writeVectorizationStatusLedger,wA as writeWorkspaceJsonWithHistory};
|
|
32
|
+
`&&t.push(r+1);return t}function kb(e,t){let r=0,o=e.length;for(;r<o;){let n=Math.floor((r+o)/2);e[n]<=t?r=n+1:o=n}return r}function yD(e){let t=[],r=[];for(let n of[...e].sort((s,i)=>Q(s.path,i.path))){let s=Mb(n.content),i;try{i=Pb(n.content)}catch(a){r.push({kind:"invalid_source",subject:n.path,detail:`${n.path} could not be parsed for recovery producers: ${String(a)}.`});continue}for(let a of i){let d=a.field,c=kb(s,a.offset),l=lo(d);l?t.push({path:n.path,line:c,field:d,kind:l.kind}):/(?:retry_command|candidate_command|fallback_candidate|next_best_command|example|next_step|migration_hint|restore_with)/u.test(d)&&!/(?:_total|_truncated)$/u.test(d)&&r.push({kind:"unknown_recovery_field",subject:`${n.path}:${c}:${d}`,detail:`${d} resembles a recovery reference but has no typed field contract.`})}}let o=Object.fromEntries(ce.map(n=>[n,t.filter(s=>s.kind===n).length]));for(let n of ce)o[n]===0&&r.push({kind:"missing_kind_producer",subject:n,detail:`No source producer emits the ${n} recovery-reference kind.`});return t.sort((n,s)=>n.path!==s.path?Q(n.path,s.path):n.line!==s.line?n.line-s.line:Q(n.field,s.field)),r.sort((n,s)=>n.subject!==s.subject?Q(n.subject,s.subject):Q(n.kind,s.kind)),{ok:r.length===0,scanned_file_count:e.length,producer_count:t.length,producer_count_by_kind:o,producers:t,findings:r}}function bD(e,t){let r=[],o=(n,s)=>{if(Array.isArray(n)){n.forEach((i,a)=>o(i,[...s,String(a)]));return}if(!(typeof n!="object"||n===null))for(let[i,a]of Object.entries(n).sort(([d],[c])=>Q(d,c))){let d=lo(i),c=d?.kind==="migration_hint"&&n.semantics==="behavior_preserving"?{...d,semantics:"behavior_preserving"}:d,l=[a].flat();c!==void 0&&l.forEach((p,f)=>{let _="nested_value_field"in c&&typeof c.nested_value_field=="string"?c.nested_value_field:void 0,g=_&&typeof p=="object"&&p!==null&&!Array.isArray(p)?p[_]:p;if(typeof g!="string"||g.trim().length===0)return;let T=[...s,i,String(f)].map(E=>encodeURIComponent(E)).join("/");r.push({id:`${e}:${c.kind}:${T}`,probe_id:e,kind:c.kind,semantics:c.semantics,value:g})}),o(a,[...s,i])}};return o(t,[]),r}function TD(e,t){let r=e.flatMap(i=>(i.owned_states??[]).map(a=>({contract:i,state:a}))),o=[],n=new Map;for(let i of t){if(n.has(i.probe_id)){o.push({kind:"duplicate_probe",probe_id:i.probe_id,detail:`Observation ${i.probe_id} was supplied more than once.`});continue}n.set(i.probe_id,i)}let s=new Set(r.map(({state:i})=>i.probe_id));for(let{contract:i,state:a}of r){let d=n.get(a.probe_id);if(!d){o.push({kind:"missing_probe",probe_id:a.probe_id,detail:`No entrypoint observation was recorded for ${i.code}.`});continue}d.code!==i.code&&o.push({kind:"wrong_error_code",probe_id:a.probe_id,detail:`Expected ${i.code}; observed ${d.code}.`}),d.exit_class!==a.expected_exit_class&&o.push({kind:"wrong_exit_class",probe_id:a.probe_id,detail:`Expected ${a.expected_exit_class}; observed ${d.exit_class}.`}),a.entrypoints.includes(d.entrypoint)||o.push({kind:"wrong_entrypoint",probe_id:a.probe_id,detail:`Expected one of ${a.entrypoints.join(", ")}; observed ${d.entrypoint}.`})}for(let i of t)s.has(i.probe_id)||o.push({kind:"undeclared_probe",probe_id:i.probe_id,detail:`Observation ${i.probe_id} has no catalog declaration.`});return o.sort((i,a)=>i.probe_id!==a.probe_id?i.probe_id.localeCompare(a.probe_id):i.kind.localeCompare(a.kind)),{ok:o.length===0,declared_probe_count:r.length,observed_probe_count:t.length,findings:o}}function CD(e,t){let r=[],o=new Set,n=new Set;for(let d of e){if(o.has(d.id)){n.add(d.id),r.push({kind:"duplicate_obligation",reference_id:d.id,detail:`Recovery obligation ${d.id} was declared more than once.`});continue}o.add(d.id)}let s=new Map;for(let d of t){if(s.has(d.id)){r.push({kind:"duplicate_observation",reference_id:d.id,detail:`Recovery reference ${d.id} was observed more than once.`});continue}s.set(d.id,d),o.has(d.id)||r.push({kind:"undeclared_observation",reference_id:d.id,detail:`Recovery observation ${d.id} has no emitted obligation.`})}for(let d of e){if(n.has(d.id))continue;let c=s.get(d.id);c?c.reachable?c.semantics!==d.semantics&&r.push({kind:"wrong_semantics",reference_id:d.id,detail:`Recovery reference ${d.value} promised ${d.semantics}; proof demonstrated ${c.semantics}.`}):r.push({kind:"unreachable_reference",reference_id:d.id,detail:`Recovery reference ${d.value} did not reach its promised target.`}):r.push({kind:"missing_observation",reference_id:d.id,detail:`No reachability proof was recorded for ${d.kind} ${d.value}.`})}let i=ce.map(d=>{let c=e.filter(p=>p.kind===d),l=c.filter(p=>!n.has(p.id)).map(p=>s.get(p.id)).filter(p=>p!==void 0);return{kind:d,declared:c.length,observed:l.length,passed:c.filter(p=>{let f=s.get(p.id);return!n.has(p.id)&&f?.reachable===!0&&f.semantics===p.semantics}).length}});r.sort((d,c)=>d.reference_id!==c.reference_id?d.reference_id.localeCompare(c.reference_id):d.kind.localeCompare(c.kind));let a=i.reduce((d,c)=>d+c.passed,0);return{ok:r.length===0,declared_reference_count:e.length,observed_reference_count:t.length,pass_fraction:o.size===0?1:a/o.size,coverage_by_kind:i,findings:r}}function xb(e,t){let r=new Map(ce.map(s=>[s,new Set]));for(let s of t)r.get(s.kind).add(s.value);let o=ce.map(s=>({kind:s,source_producers:e.producer_count_by_kind[s],runtime_values:r.get(s).size})),n=o.filter(({source_producers:s,runtime_values:i})=>s>0&&i===0).map(({kind:s})=>s);return{ok:e.ok&&n.length===0,source_producer_count:e.producer_count,runtime_value_count:o.reduce((s,{runtime_values:i})=>s+i,0),coverage_by_kind:o,missing_runtime_kinds:n}}var ED=xb;(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]="2b2197f3-7203-52c8-9cc7-f714b33a9306")}catch{}})();var wD=16,Nb=Object.freeze(["bulk_ids_input_empty","bulk_ids_input_missing_path","bulk_ids_input_unreadable","invalid_argument_value","missing_lifecycle_target","missing_required_argument","projection_options_mutually_exclusive","tracker_not_initialized","tracker_root_missing","tracker_root_not_directory","tracker_root_unreadable","unknown_context_intent","unknown_field_projection","unknown_option","unknown_subcommand"]),po=18,uo=Object.freeze([...Nb,"manifest_unknown_key","no_version_bounds_declared"].sort((e,t)=>e.localeCompare(t)));function AD(e,t=po){return{ok:e.executable_error_code_count>=t,baseline:t,actual:e.executable_error_code_count}}function vD(e,t=uo){let r=new Set(e.rows.filter(({disposition:n})=>n==="executable").map(({canonical_code:n})=>n)),o=t.filter(n=>!r.has(n));return{ok:o.length===0,required_canonical_codes:[...t],missing_required_canonical_codes:o}}function _t(e,t){let r=e.get(t);if(r)return r;let o={kinds:new Set,probeIds:new Set};return e.set(t,o),o}function OD(e,t,r){let o=new Map(e.map(l=>[l.code,l.canonical_code??l.code])),n=new Map,s=0,i=0;for(let l of e){let p=_t(n,l.canonical_code??l.code);for(let f of l.owned_states??[])p.kinds.add("owned_state"),p.probeIds.add(f.probe_id)}for(let l of t){let p=o.get(l.error_code);if(p===void 0)continue;s+=1;let f=_t(n,p);f.kinds.add("closed_domain"),f.probeIds.add(l.probe_id)}for(let l of r){let p=o.get(l.error_code);if(p===void 0)continue;i+=1;let f=_t(n,p);f.kinds.add("grammar"),f.probeIds.add(l.probe_id)}let a=e.map(l=>{let p=l.canonical_code??l.code,f=n.get(p),_=[...f.probeIds].sort();return{code:l.code,canonical_code:p,disposition:_.length>0?"executable":"uncovered",evidence_kinds:[...f.kinds].sort(),probe_ids:_}}).sort((l,p)=>l.code<p.code?-1:1),d=a.filter(({disposition:l})=>l==="uncovered").map(({code:l})=>l),c=a.length-d.length;return{ok:d.length===0,catalog_error_code_count:a.length,executable_error_code_count:c,uncovered_error_code_count:d.length,coverage_fraction:a.length===0?1:c/a.length,closed_domain_probe_count:s,grammar_probe_count:i,uncovered_error_codes:d,rows:a}}function RD(e){let t=e.rows.map(r=>`| \`${r.code}\` | \`${r.canonical_code}\` | ${r.disposition} | ${r.evidence_kinds.join(", ")||"none"} | ${r.probe_ids.length} |`);return["# Generated refusal closure census","","Tracker: `pm-f05lsg`.","","Every catalog code is listed. An `uncovered` row is an explicit closure obligation, never an omission or implied approval.","",`- Catalog error codes: ${e.catalog_error_code_count}`,`- Executable error codes: ${e.executable_error_code_count}`,`- Executable-code ratchet floor: ${po}`,`- Required executable canonical codes: ${uo.map(r=>`\`${r}\``).join(", ")}`,`- Uncovered error codes: ${e.uncovered_error_code_count}`,`- Coverage fraction: ${e.coverage_fraction.toFixed(6)}`,`- Closed-domain probes: ${e.closed_domain_probe_count}`,`- Grammar probes: ${e.grammar_probe_count}`,"","| Error code | Canonical code | Disposition | Evidence kinds | Probe count |","| --- | --- | --- | --- | --- |",...t,""].join(`
|
|
33
|
+
`)}(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]="d252409d-e33e-5c9e-9671-789f0ee87312")}catch{}})();function Lb(e){return[e.expected_error_code!==void 0&&e.error_code!==e.expected_error_code?{code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected error code ${e.expected_error_code}, received ${e.error_code??"<missing>"}.`}:void 0,e.expected_allowed_values!==void 0&&JSON.stringify([...e.allowed_values].sort())!==JSON.stringify([...e.expected_allowed_values].sort())?{code:"incomplete_allowed_values",probe_id:e.probe_id,detail:"The refusal's accepted domain differs from the SDK-owned domain contract."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)===0?{code:"missing_suggested_retry_args",probe_id:e.probe_id,detail:"The refusal omitted shell-free suggested retry arguments."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)>0&&JSON.stringify(e.suggested_retry_args)!==JSON.stringify(e.expected_suggested_retry_args)?{code:"suggested_retry_args_mismatch",probe_id:e.probe_id,detail:"The refusal's suggested retry arguments differ from the SDK-owned contract."}:void 0]}function Db(e){return[e.exit_code!==me.USAGE?{code:"non_refusal_exit",probe_id:e.probe_id,detail:`${e.entrypoint} returned exit code ${e.exit_code}; a structured usage refusal must return ${me.USAGE}.`}:void 0,e.allowed_values_required!==!1&&e.allowed_values.length===0?{code:"missing_allowed_values",probe_id:e.probe_id,detail:"The refusal omitted its complete accepted value domain."}:void 0,e.allowed_values.includes(e.rejected_value)?{code:"accepted_rejected_value",probe_id:e.probe_id,detail:`${e.rejected_value} is both rejected and advertised as allowed.`}:void 0,e.suggested_retry.trim().length===0?{code:"missing_suggested_retry",probe_id:e.probe_id,detail:"The refusal omitted an executable suggested retry."}:void 0,e.retry_succeeded?void 0:{code:"retry_failed",probe_id:e.probe_id,detail:"The advertised suggested retry did not succeed."},...Lb(e)]}function MD(e){let t=[],r=new Set,o=0;e.length===0&&t.push({code:"empty_corpus",probe_id:"corpus",detail:"At least one real refusal observation is required."});for(let n of e){if(r.has(n.probe_id)){t.push({code:"duplicate_probe",probe_id:n.probe_id,detail:`${n.probe_id} was supplied more than once.`});continue}r.add(n.probe_id);let s=t.length;for(let i of Db(n))i!==void 0&&t.push(i);t.length===s&&(o+=1)}return t.sort((n,s)=>n.probe_id!==s.probe_id?n.probe_id.localeCompare(s.probe_id):n.code.localeCompare(s.code)),{ok:t.length===0,probe_count:r.size,closed_probe_count:o,closure_fraction:r.size===0?0:o/r.size,findings:t}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="39b4e1fe-a34a-5ffc-9447-eaf8c46863c7")}catch{}})();var mo="not-a-declared-action";function $b(e,t){if(e.startsWith("assurance ")&&t.name==="kind")return"measurement";switch(t.value_kind){case"integer":return"1";case"item_id":return"pm-domain";case"action":throw new Error(`Cannot synthesize a preceding action value for positional slot ${t.name}.`);default:return"example"}}function le(e){return e.replaceAll(/[^a-z0-9]+/gu,"-").replaceAll(/^-|-$/gu,"")}function UD(e=qe.filter(t=>It.some(r=>r.command===t.command&&r.disposition!=="package_owned"))){let t=new Set(e.filter(({command:r})=>!r.includes(" ")).map(({command:r})=>le(r)));return e.flatMap(r=>r.slots.flatMap((o,n)=>{if(!o.required)return[];let s=r.command.split(" "),i=le(r.command),a=s.length>1&&t.has(i)?s.map(le).join("--"):i,d=ee(r.command).flatMap(l=>l.required?[l.flag,...l.value_name?["example"]:[]]:[]),c=Be.some(l=>l.command===r.command);return[{probe_id:`required-argument-${a}-${le(o.name)}`,command:r.command,refusal_args:[...s,...r.slots.slice(0,n).map(l=>$b(r.command,l)),...d],recovery_args:[...s,"--help"],error_code:c&&!r.command.startsWith("assurance ")?"invalid_argument_value":/^extension (?:activate|adopt|deactivate|uninstall)$/u.test(r.command)?"missing_lifecycle_target":"missing_required_argument",missing_argument:o.name,missing_argument_index:n}]})).sort((r,o)=>r.probe_id.localeCompare(o.probe_id))}function Fb(e){switch(L(e)){case"assurance":case"workspace snapshot":return Be.filter(({parent:t})=>t===e).map(({action:t})=>t);case"graph":return De;case"merge":return $e;case"plan":return Ye;case"profile":return Xe;case"schema":return $t;default:throw new Error(`Required positional action family ${e} has no authoritative value domain.`)}}function jD(e=qe){return e.filter(({slots:t})=>t[0]?.required===!0&&t[0].value_kind==="action").map(({command:t})=>{let r=t.split(" ");return{probe_id:`unknown-subcommand-${le(t)}`,command:t,refusal_args:[...r,mo],recovery_args:[...r,"--help"],error_code:"unknown_subcommand",rejected_value:mo,allowed_values:[...Fb(t)].sort()}}).sort((t,r)=>t.probe_id.localeCompare(r.probe_id))}function Gb(e,t){let r=[...t].sort();return e.length===t.length&&[...e].sort().every((o,n)=>o===r[n])}function Ub(e,t){if(!t)return[{code:"refusal_probe_missing",probe_id:e.probe_id,detail:`${e.probe_id} has no runtime observation.`}];let r=[];return t.error_code!==e.error_code&&r.push({code:"refusal_error_code_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} emitted ${t.error_code||"<none>"}; expected ${e.error_code}.`}),t.exit_code!==2&&r.push({code:"refusal_exit_code_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} exited ${t.exit_code}; expected usage exit 2.`}),"allowed_values"in e&&!Gb(t.allowed_values,e.allowed_values)&&r.push({code:"refusal_allowed_values_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} did not expose its complete action domain.`}),t.recovery_succeeded||r.push({code:"refusal_recovery_failed",probe_id:e.probe_id,detail:`${e.probe_id} help recovery did not succeed.`}),t.refusal_mutated_state&&r.push({code:"refusal_mutated_state",probe_id:e.probe_id,detail:`${e.probe_id} changed tracker state while refusing input${t.mutated_paths?.length?`: ${t.mutated_paths.join(", ")}`:"."}`}),r}function BD(e,t){let r=new Map(e.map(i=>[i.probe_id,i])),o=new Map(t.map(i=>[i.probe_id,i])),n=[...e.flatMap(i=>Ub(i,o.get(i.probe_id))),...t.filter(i=>!r.has(i.probe_id)).map(i=>({code:"unexpected_refusal_probe",probe_id:i.probe_id,detail:`${i.probe_id} has no declared grammar refusal contract.`}))];n.sort((i,a)=>i.probe_id.localeCompare(a.probe_id)||i.code.localeCompare(a.code));let s=new Set(n.map(({probe_id:i})=>i));return{ok:n.length===0,probe_count:e.length,closed_probe_count:e.filter(({probe_id:i})=>!s.has(i)).length,findings:n}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d3795bc4-fbe5-5ca4-bc90-b72a2d469dc7")}catch{}})();var ht=[{probe_id:"tracker-root-missing",failure_kind:"missing_root",expected_error_code:"tracker_root_missing",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-settings-missing",failure_kind:"settings_missing",expected_error_code:"tracker_not_initialized",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-not-directory",failure_kind:"not_directory",expected_error_code:"tracker_root_not_directory",expected_exit_code:2,recovery_kind:"select_directory"},{probe_id:"tracker-root-unreadable",failure_kind:"unreadable_root",expected_error_code:"tracker_root_unreadable",expected_exit_code:1,recovery_kind:"repair_permissions"}];function zD(){return ht.map(e=>({...e}))}function jb(e,t){let r=[];t.error_code!==e.expected_error_code&&r.push({code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected ${e.expected_error_code}, received ${t.error_code}.`}),t.exit_code!==e.expected_exit_code&&r.push({code:"exit_code_mismatch",probe_id:e.probe_id,detail:`Expected exit ${e.expected_exit_code}, received ${t.exit_code}.`}),t.recovery_kind!==e.recovery_kind&&r.push({code:"recovery_kind_mismatch",probe_id:e.probe_id,detail:`Expected ${e.recovery_kind}, received ${t.recovery_kind}.`});let o=t.suggested_retry_args.indexOf("init"),n=o===0||o===2&&t.suggested_retry_args[0]==="--pm-path"&&t.suggested_retry_args[1]?.length>0;return e.recovery_kind==="initialize"&&!n&&r.push({code:"missing_init_recovery",probe_id:e.probe_id,detail:"Missing and uninitialized roots must emit a tokenized init retry."}),(t.unsafe_init_recommended||e.recovery_kind!=="initialize"&&t.suggested_retry_args.includes("init"))&&r.push({code:"unsafe_init_recovery",probe_id:e.probe_id,detail:"A tracker root that cannot be initialized safely must not recommend initialization."}),t.retry_succeeded||r.push({code:"retry_failed",probe_id:e.probe_id,detail:"The emitted retry or safe alternate-root recovery did not execute successfully."}),r}function HD(e){let t=new Map(e.map(n=>[n.probe_id,n])),r=[],o=0;for(let n of ht){let s=t.get(n.probe_id);if(s===void 0){r.push({code:"missing_probe",probe_id:n.probe_id,detail:"No runtime observation was supplied for this contract."});continue}let i=jb(n,s);r.push(...i),i.length===0&&(o+=1)}return r.sort((n,s)=>n.probe_id.localeCompare(s.probe_id)||n.code.localeCompare(s.code)),{ok:r.length===0,probe_count:ht.length,closed_probe_count:o,findings:r}}(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]="41419a34-fcd7-5d1a-a427-4e9e634f9379")}catch{}})();var Pe,Bb=Object.freeze({list:"list-item-projection","list-all":"list-item-projection","list-draft":"list-item-projection","list-open":"list-item-projection","list-in-progress":"list-item-projection","list-blocked":"list-item-projection","list-closed":"list-item-projection","list-canceled":"list-item-projection",get:"get-item-projection",graph:"graph-detail-projection",search:"search-result-projection",history:"history-entry-projection",events:"mutation-event-projection",activity:"activity-entry-projection",deps:"dependency-graph-projection",health:"health-diagnostic-projection",validate:"validation-diagnostic-projection",contracts:"contract-catalog-projection"});function qb(e,t){if(t==="--limit")return"result-row-limit";if(t==="--node-limit")return"graph-node-limit";if(t==="--edge-limit")return"graph-edge-limit";if(t==="--output-limit")return"rendered-output-row-limit";if(t==="--output-budget")return"rendered-output-byte-budget";if(t==="--token-budget")return"context-intent-token-budget";if(t==="--full"){let r=Bb[L(e)];if(r===void 0)throw new Error(`Command ${e} exposes --full without a registered projection concept.`);return r}return t!=="--file"?t.slice(2):["create","update","update-many"].includes(L(e))?"linked-file-path":["comments","notes","learnings"].includes(L(e))?"entry-file-input":"plan-definition-file"}function Me(){if(Pe!==void 0)return Pe;let e=te.filter(({command:n})=>ze(n)).flatMap(({command:n,family:s})=>Pt(n,ee(n)).map(i=>({command:n,family:s,concept:qb(n,i.flag),flag:i.flag,aliases:Object.freeze([...i.aliases??[]]),value_kind:i.repeatable?"list":i.flag==="--limit"?"number":i.value_type}))),t=new Set(e.flatMap(n=>n.aliases.map(s=>`${n.command}:${s}`))),r=e.filter(n=>!t.has(`${n.command}:${n.flag}`)),o=new Map;for(let n of r){let s=o.get(n.concept)??new Set;s.add(n.value_kind),o.set(n.concept,s)}return Pe=Object.freeze(r.map(n=>Object.freeze({...n,concept:o.get(n.concept)?.size===1?n.concept:`${n.concept}@${n.command}`}))),Pe}function JD(){return Object.freeze(Me().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var fo=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:102,copy:24,focus:22,list:86,"list-all":86,"list-draft":84,"list-open":84,"list-in-progress":84,"list-blocked":84,"list-closed":84,"list-canceled":84,aggregate:40,context:45,ctx:45,get:30,graph:34,search:78,duplicates:25,eval:25,next:38,history:36,events:34,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:29,schema:43,profile:22,activity:36,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:32,notes:36,learnings:32,files:39,docs:30,deps:32,plan:111,test:56,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:25,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),zb=1,_o=Object.freeze(Object.fromEntries(Object.entries({...fo,...Object.fromEntries(Ne.flatMap(({alias:e,canonical:t})=>{let r=fo[e];return r===void 0?[]:[[t,r]]}))}).map(([e,t])=>[e,t+zb])));function ho(){let e=new Map(Object.keys(_o).map(t=>[t,0]));for(let{command:t}of Me())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(_o).map(([t,r])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:r})))}function Hb(e,t,r){for(let o of e)for(let n of o.aliases){let s=t.get(`${o.command}:${n}`);s===void 0||s.flag===o.flag||r.push({code:"alias_collision",command:o.command,detail:`${n} aliases ${o.flag} but is canonical for ${s.flag}.`})}}function Vb(e,t,r){let o=new Set(t.map(({command:n})=>n));for(let n of e.keys())o.has(n)||r.push({code:"missing_budget",command:n,detail:`${n} has canonical flags but no persisted budget.`});for(let n of t){let s=e.get(n.command)??0;s===0&&r.push({code:"stale_budget",command:n.command,detail:`${n.command} has a persisted budget but no canonical flags.`}),!(s<=n.maximum)&&r.push({code:"budget_exceeded",command:n.command,detail:`${s} canonical flags exceed the ratcheted maximum ${n.maximum}.`})}}function Kb(e,t,r){let o=new Map(e.map(n=>[`${n.command}:${n.flag}`,n]));for(let n of t){let s=`${n.command}:${n.canonical_flag}`,i=o.get(s);if(!i){r.push({code:"removed_canonical_spelling",command:n.command,detail:`${n.canonical_flag} disappeared from the executable spelling inventory.`});continue}let a=new Set([i.flag,...i.aliases]);for(let d of n.accepted_spellings)a.has(d)||r.push({code:"removed_compatibility_spelling",command:n.command,detail:`${d} no longer resolves to ${n.canonical_flag}.`})}}function ZD(e=Me(),t=ho(),r=[]){let o=[],n=new Map,s=new Map,i=new Map,a=new Map;for(let d of e){let c=`${d.command}:${d.flag}`;n.has(c)?o.push({code:"duplicate_canonical_flag",command:d.command,detail:`${d.flag} has more than one canonical row.`}):n.set(c,d),a.set(d.command,(a.get(d.command)??0)+1);let l=s.get(d.concept);l!==void 0&&l!==d.value_kind?o.push({code:"inconsistent_concept_kind",command:d.command,detail:`${d.concept} uses both ${l} and ${d.value_kind}.`}):s.set(d.concept,d.value_kind);let p=i.get(d.concept);p!==void 0&&p!==d.flag?o.push({code:"semantic_spelling_collision",command:d.command,detail:`${d.concept} is canonicalized by both ${p} and ${d.flag}.`}):i.set(d.concept,d.flag)}return Hb(e,n,o),Vb(a,t,o),Kb(e,r,o),o.sort((d,c)=>d.command.localeCompare(c.command)||d.code.localeCompare(c.code)||d.detail.localeCompare(c.detail)),{ok:o.length===0,entry_count:e.length,budget_count:t.length,concept_count:new Set(e.map(({concept:d})=>d)).size,baseline_entry_count:r.length,findings:o}}function QD(){let e=Me(),t=ho(),r=new Map(t.map(({command:o})=>[o,"unknown"]));for(let{command:o,family:n}of e)r.set(o,n);return["# Generated flag lexicon budgets","","This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not consume canonical budget.","","| Command | Capability family | Canonical flags | Maximum |","| --- | --- | ---: | ---: |",...t.map(({command:o,current:n,maximum:s})=>{let i=r.get(o);return`| \`${o}\` | ${i} | ${n} | ${s} |`}),""].join(`
|
|
34
|
+
`)}(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]="3f3a5dca-8370-52d7-b279-dc6f9f0aeadf")}catch{}})();function t1(e){return e}function r1(e){return e}function o1(e){return e}function n1(e){return e}function i1(e){return e}function s1(e){return e}function a1(e){return e}function d1(e){return e}function c1(e){return e}function l1(e){return e}function p1(e){return e}function u1(e){return e}function m1(e){return e}function f1(e){return{handled:!0,result:e}}function _1(){return{handled:!1}}function h1(e){return e}function g1(e){return e}function y1(e){return e}function b1(e){return e}function T1(e){return e}function C1(e){return e}function E1(e){return e}function S1(e){return e}function w1(e){return e}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="68ca9ab1-91e0-5020-859e-fc1f1f6dcc56")}catch{}})();function Wb(e={},t={}){return new ge(t).extension(void 0,{...e,migrate:!0})}function Yb(e={},t={}){return new ge(t).packageMigrate(e)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c96e4de9-16ef-581a-aa4b-6450917c2c65")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function N(e){if(typeof e!="string"||!_e(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function Xb(e){let t=N(e.window_start),r=N(e.window_end);if(t>=r||!Number.isFinite(e.max_failure_rate)||e.max_failure_rate<0||e.max_failure_rate>=1||!Number.isSafeInteger(e.min_completed_attempts)||e.min_completed_attempts<1)throw new TypeError("Invalid reliability window policy.");if(e.families.length===0||e.families.some(o=>typeof o!="string"||o.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:t,end:r}}function Jb(e,t,r,o){let n=new Map(t.map(i=>[i,[]])),s=new Set;for(let i of e){if(typeof i.id!="string"||i.id.trim().length===0||s.has(i.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");s.add(i.id);let a=n.get(i.family);if(!a||!["success","failure","pending"].includes(i.outcome)||i.cause!==void 0&&(!["product","infrastructure","unknown"].includes(i.cause)||i.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let d=N(i.started_at);if(i.repaired_at!==void 0&&(N(i.repaired_at)<d||i.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");d>=r&&d<o&&a.push(i)}return n}function q1(e,t){let{start:r,end:o}=Xb(t),n=[...Jb(e,t.families,r,o)].map(([s,i])=>{let a=i.filter(_=>_.outcome==="failure"),d=i.filter(_=>_.outcome!=="pending").length,c=d===0?null:a.length/d,l=a.filter(_=>_.repaired_at!==void 0&&N(_.repaired_at)<o),p={product:0,infrastructure:0,unknown:0};for(let _ of a)p[_.cause??"unknown"]+=1;let f=[];return d<t.min_completed_attempts&&f.push("insufficient_completed_attempts"),c!==null&&c>t.max_failure_rate&&f.push("failure_rate"),{family:s,attempts:i.length,completed:d,failed:a.length,pending:i.length-d,failure_rate:c,affected_days:[...new Set(a.map(_=>new Date(N(_.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:l.map(_=>(N(_.repaired_at)-N(_.started_at))/6e4).sort((_,g)=>_-g),unresolved:a.length-l.length,causes:p,violations:f,ok:f.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(r).toISOString(),window_end:new Date(o).toISOString(),ok:n.every(s=>s.ok),families:n}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="773ad2b6-326e-5483-bdce-a377f935cb31")}catch{}})();function pe(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function Zb(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let t=new Map;for(let r of e){if(r===null||typeof r!="object"||!pe(r.name)||t.has(r.name)||r.complete!==!0)throw new TypeError("Expected unique complete artifact ledgers.");if(!Array.isArray(r.identities))throw new TypeError("Invalid or duplicate artifact identity.");let o=new Set(r.identities);if(o.size!==r.identities.length||[...o].some(n=>!pe(n)))throw new TypeError("Invalid or duplicate artifact identity.");t.set(r.name,o)}if([...t.values()].every(r=>r.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return t}function Qb(e,t){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let r=new Map;for(let o of e){if(o===null||typeof o!="object"||!pe(o.identity)||r.has(o.identity)||!pe(o.reason)||!pe(o.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let n=o.missing_from;if(!Array.isArray(n)||n.length===0||n.length>=t.length||new Set(n).size!==n.length||[...n].some(s=>!t.includes(s)))throw new TypeError("Invalid artifact exception ledger signature.");r.set(o.identity,o)}return r}function H1(e,t=[]){let r=Zb(e),o=[...r.keys()].sort(),n=Qb(t,o),s=[...new Set([...r.values()].flatMap(c=>[...c]))].sort(),i=[],a=new Set;for(let c of s){let l=o.filter(_=>!r.get(_).has(c));if(l.length===0)continue;let p=n.get(c),f=p!==void 0&&JSON.stringify([...p.missing_from].sort())===JSON.stringify(l);f&&a.add(c),i.push({identity:c,present_in:o.filter(_=>r.get(_).has(c)),missing_from:l,disposition:f?{reason:p.reason,evidence:p.evidence}:null})}let d=[...n.keys()].filter(c=>!a.has(c)).sort();return{schema:"pm-artifact-ledgers/1",ok:i.every(c=>c.disposition!==null)&&d.length===0,counts:Object.fromEntries(o.map(c=>[c,r.get(c).size])),findings:i,stale_exceptions:d}}(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]="15d63d97-9126-59ae-be28-b77fdfd07b9c")}catch{}})();import{createHash as yo,createHmac as eT,randomBytes as tT,timingSafeEqual as rT}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="98283845-5c48-5901-b54c-c8cc8138427b")}catch{}})();var R$="dev.unbrained.pm/progressive-tool-discovery",I$=Object.freeze({version:1,discoveryTool:"pm_discover",canonicalResult:"structuredContent.result",compatibilityText:"pointer"}),oT=Object.freeze(["pm_discover","pm_next","pm_context","pm_search","pm_get"]),B=Object.freeze({lexical:.4,semantic:.2,graph:.1,permission:.15,freshness:.05,usage:.1}),nT=Object.freeze(["profile_changed","tool_contract_changed","workspace_extension_changed","authorization_changed","ranking_signal_changed","cursor_integrity_key_rotated"]),bo={core:0,standard:1,full:2,internal:3},To=Object.freeze(["core","standard","full"]),iT=new Set(["core","standard","full","custom"]),Co=new Set(te.map(({family:e})=>e)),sT=tT(32);function xe(e,t){if(typeof e!="string")throw new b(`pm tool discovery ${t} must be a string of at most 4096 Unicode characters.`,64);let r=e[Symbol.iterator](),o=0;for(let n=r.next();!n.done;n=r.next())if(o+=1,o>4096)throw new b(`pm tool discovery ${t} must be a string of at most 4096 Unicode characters.`,64);return e}function Eo(e){if(!Number.isInteger(e)||Number(e)<1||Number(e)>100)throw new b("pm tool discovery limit must be from 1 through 100.",64);return Number(e)}function So(e){if(e!=="unbounded"&&(!Number.isInteger(e)||Number(e)<128))throw new b("pm tool discovery outputBudget must be unbounded or an integer of at least 128.",64);return e==="unbounded"?e:Number(e)}function wo(e){if(e!==void 0&&typeof e!="boolean")throw new b("pm tool discovery includeSchema must be a boolean.",64);return e===!0}function Ao(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new b("pm tool discovery options must be an object.",64)}function aT(e){if(!Array.isArray(e))throw new b("pm tool discovery candidates must be an array.",64);for(let[t,r]of e.entries()){if(r===null||typeof r!="object"||Array.isArray(r))throw new b(`pm tool discovery candidate ${t} must be an object.`,64);if(typeof r.name!="string"||r.name.trim().length===0)throw new b(`pm tool discovery candidate ${t} name must be a non-empty string.`,64);if(typeof r.description!="string"||r.description.trim().length===0)throw new b(`pm tool discovery candidate ${t} description must be a non-empty string.`,64);if(r.inputSchema===null||typeof r.inputSchema!="object"||Array.isArray(r.inputSchema))throw new b(`pm tool discovery candidate ${t} inputSchema must be an object.`,64);if(r.authorized!==void 0&&typeof r.authorized!="boolean")throw new b(`pm tool discovery candidate ${t} authorized must be a boolean.`,64)}}function P$(e){if(Ao(e),e.family!==void 0&&(typeof e.family!="string"||!Co.has(e.family)))throw new b("pm tool discovery family must be a declared capability family.",64);if(e.tier!==void 0&&(typeof e.tier!="string"||!To.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);return{...e.query!==void 0?{query:xe(e.query,"query")}:{},...e.family!==void 0?{family:e.family}:{},...e.tier!==void 0?{tier:e.tier}:{},...e.limit!==void 0?{limit:Eo(e.limit)}:{},...e.cursor!==void 0?{cursor:xe(e.cursor,"cursor")}:{},...e.includeSchema!==void 0?{includeSchema:wo(e.includeSchema)}:{},...e.outputBudget!==void 0?{outputBudget:So(e.outputBudget)}:{}}}function dT(e){return e===void 0||!Number.isFinite(e)?0:Math.min(1,Math.max(0,e))}function ue(e){return[...new Set(e.toLowerCase().match(/[a-z0-9]+/gu)??[])].sort()}function cT(e,t){let r=ue(e);if(r.length===0)return 0;let o=new Set(ue(t)),n=r.filter(i=>o.has(i)).length,s=t.toLowerCase().includes(e.toLowerCase())?.25:0;return Math.min(1,n/r.length+s)}function lT(e,t){let r=ue(e);if(r.length===0)return 0;let o=t.toLowerCase(),n=ue(t),s=r.filter(a=>n.some(d=>d.startsWith(a)||a.startsWith(d))).length,i=o.includes(e.toLowerCase())?.2:0;return Math.min(1,s/r.length+i)}function go(e){return yo("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function vo(e,t,r){return eT("sha256",r).update(JSON.stringify({version:1,fingerprint:e,offset:t})).digest("base64url")}function pT(e,t,r){let o={version:1,offset:t,signature:vo(e,t,r)};return Buffer.from(JSON.stringify(o),"utf8").toString("base64url")}function uT(e,t,r,o){if(e===void 0)return 0;try{let n=JSON.parse(Buffer.from(e,"base64url").toString("utf8")),s=n.offset;if(n.version!==1||typeof s!="number"||!Number.isInteger(s)||s<0||s>r||typeof n.signature!="string")throw new Error("cursor fields do not match the request");let i=Buffer.from(vo(t,s,o),"base64url"),a=Buffer.from(n.signature,"base64url");if(a.length!==i.length||!rT(a,i))throw new Error("cursor signature does not match the request");return s}catch(n){throw new b("Invalid or stale pm tool discovery cursor; restart discovery without cursor.",64,{reason:String(n)})}}function gt(e,t,r){return{value:dT(e),weight:t,available:r!=="unavailable",source:r}}function ke(e,t,r){return gt(e??t,r,e===void 0?"computed":"host")}function mT(e,t,r){let o=Object.hasOwn(he,e.name)?he[e.name]:"help",n=Ve(o),s=`${e.name} ${e.description} ${o} ${n}`,i=cT(t,s),a=new Set(ue(t)),d={lexical:gt(i,B.lexical,"computed"),semantic:ke(e.signals?.semantic,lT(t,s),B.semantic),graph:ke(e.signals?.graph,a.has(n)||a.has(o)?1:0,B.graph),permission:gt(1,B.permission,"authorization"),freshness:ke(e.signals?.freshness,1,B.freshness),usage:ke(e.signals?.usage,oT.includes(e.name)?1:0,B.usage)},c=Object.values(d).reduce((l,p)=>l+p.value*p.weight,0);return{name:e.name,description:e.description,command:o,tier:Ke(o),family:n,score:Number(c.toFixed(6)),signals:d,...r?{input_schema:structuredClone(e.inputSchema)}:{}}}function fT(e){if(e.cursorIntegrityKey!==void 0&&(!(e.cursorIntegrityKey instanceof Uint8Array)||e.cursorIntegrityKey.byteLength<32))throw new b("pm tool discovery cursorIntegrityKey must contain at least 32 bytes.",64);if(e.tier!==void 0&&(typeof e.tier!="string"||!To.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);if(e.family!==void 0&&(typeof e.family!="string"||!Co.has(e.family)))throw new b("pm tool discovery family must be a declared capability family.",64);if(e.profile!==void 0&&(typeof e.profile!="string"||!iT.has(e.profile)))throw new b("pm tool discovery profile must be core, standard, full, or custom.",64)}function _T(e){let t=xe(e.query===void 0?"":e.query,"query").trim().replace(/\s+/gu," ");xe(e.cursor===void 0?"":e.cursor,"cursor");let r=Eo(e.limit===void 0?10:e.limit),o=So(e.outputBudget===void 0?1200:e.outputBudget);return fT(e),{query:t,includeSchema:wo(e.includeSchema),limit:r,budget:o,maximumTier:bo[e.tier??"full"],profile:e.profile===void 0?"core":e.profile}}function Oo(e,t,r){let o=r??e.tools.reduce((i,a,d)=>i+(d===0?0:1)+Buffer.byteLength(JSON.stringify(a),"utf8"),0),n={...e,tools:[]},s=0;for(let i=0;i<4;i+=1){let a=Buffer.byteLength(JSON.stringify({...n,token_cost:{estimated_tokens:s,budget:t,within_budget:!0}}),"utf8"),d=Math.ceil((a+o)/4);if(d===s)break;s=d}return s}function hT(e,t,r){return e.filter(o=>o.authorized!==!1).map(o=>mT(o,r.query,r.includeSchema)).filter(o=>o.tier!=="internal"&&bo[o.tier]<=r.maximumTier&&(t.family===void 0||o.family===t.family)).sort((o,n)=>n.score-o.score||(o.name<n.name?-1:o.name>n.name?1:0))}function gT(e,t,r){if(t==="unbounded")return[...e];let o=[],n=0;for(let[s,i]of e.entries()){let a=n+(s===0?0:1)+Buffer.byteLength(JSON.stringify(i),"utf8");if(Oo(r(s+1),t,a)>t)break;o.push(i),n=a}return o}function M$(e,t={}){aT(e),Ao(t);let r=_T(t),o=t.cursorIntegrityKey??sT,n=hT(e,t,r),s=go({query:r.query,family:t.family??null,tier:t.tier??"full",includeSchema:r.includeSchema,profile:r.profile,ranked:n}),i=uT(t.cursor,s,n.length,o),a=n.slice(i,i+r.limit),d=[];r.includeSchema||d.push({name:"input_schema",reason:"compact_projection",restore_with:"Set includeSchema=true."}),i+r.limit<n.length&&d.push({name:"tools",reason:"limit",restore_with:"Continue with next_cursor or increase limit."});let c={result_type:"pm_tool_discovery",contract_version:1,query:r.query,profile:r.profile,total:n.length,ranking_policy:{version:1,formula:"weighted_sum_then_name",weights:B},cache:{key:go({fingerprint:s,cursorIntegrityKey:yo("sha256").update(o).digest("hex"),limit:r.limit,offset:i,budget:r.budget}),ttl_ms:3e4,scope:"private",invalidates_on:nT}},l=(g,T=g.length)=>{let E=i+T,q=E<n.length,R=[...d];return T<a.length&&R.push({name:"tools",reason:"token_budget",restore_with:"Continue with next_cursor or increase outputBudget."}),{...c,tools:[...g],returned:T,has_more:q,...q?{next_cursor:pT(s,E,o)}:{},omission_receipt:{has_omissions:R.length>0,omitted:R}}},p=g=>{let T=l(g),E=Oo(T,r.budget);return{...T,token_cost:{estimated_tokens:E,budget:r.budget,within_budget:r.budget==="unbounded"||E<=r.budget}}},f=gT(a,r.budget,g=>l([],g)),_=p(f);if(a.length>0&&f.length===0){let g=p([a[0]]).token_cost.estimated_tokens;throw new b(`pm tool discovery outputBudget is too small to return a tool; increase it to at least ${g}.`,64,{required:String(g)})}if(r.budget!=="unbounded"&&_.token_cost.estimated_tokens>r.budget)throw new b(`pm tool discovery outputBudget is too small; at least ${_.token_cost.estimated_tokens} estimated tokens are required for this page.`,64,{required:String(_.token_cost.estimated_tokens)});return _}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e02d896b-ffa2-5bfa-83dc-d567e1ecd8be")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="438f2063-2307-5945-b1a8-67c0fc24091b")}catch{}})();export{IO as ACTIONABILITY_ORDERING_KINDS,Ud as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,cd as ACTIVITY_FLAG_CONTRACTS,ri as AGENT_PROVENANCE_DIMENSIONS,Ks as AGGREGATE_FLAG_CONTRACTS,xa as APPEND_FLAG_CONTRACTS,pM as ASSURANCE_ACTIONS,uM as ASSURANCE_DECLARATION_KINDS,wI as ASSURANCE_DOCUMENT_VERSION,Qa as ASSURANCE_FLAG_CONTRACTS,AI as ASSURANCE_GATE_TRIGGERS,vI as ASSURANCE_MEASUREMENT_SOURCE_KINDS,gP as ASSURANCE_PRESET_IDS,TI as AssuranceEvaluationRefusalError,bI as AssuranceMutationRefusalError,CI as AssuranceSourceResolutionError,jn as BASELINE_ITEM_FORMAT_VERSION,Qy as BOUNDARY_FIXTURE_CAPTURE_SOURCES,aR as BRIEF_LIST_FIELDS,ni as BUILTIN_AGENT_PROVENANCE_ADAPTERS,Y as BUILTIN_CORPUS_SHAPES,oi as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,pn as BUILTIN_ITEM_TYPE_VALUES,Vt as BUILTIN_PROFILES,IC as BUILTIN_RELATIONSHIP_KINDS,$d as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,dd as CALENDAR_FLAG_CONTRACTS,Na as CLAIM_FLAG_CONTRACTS,Ic as CLOSE_ACTION_OPTION_KEYS,Ma as CLOSE_FLAG_CONTRACTS,ka as CLOSE_MANY_FLAG_CONTRACTS,Ua as CLOSE_TASK_FLAG_CONTRACTS,Ws as COMMENTS_FLAG_CONTRACTS,eC as COMMON_MUTATION_COMMAND_OPTION_KEYS,Cd as COMPLETION_FLAG_CONTRACTS,gn as CONFIDENCE_TEXT_VALUES,ca as CONFIG_FLAG_CONTRACTS,Fd as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,XM as CONTEXT_EVALUATION_METRIC_NAMES,pd as CONTEXT_FLAG_CONTRACTS,Ow as CONTEXT_INTENT_LIMIT_OVERRIDE_WARNING,qt as CONTEXT_OUTPUT_VALUES,t0 as CONTEXT_PACKING_PROFILES,BM as CONTEXT_RECENCY_EPOCH,VM as CONTEXT_RELEVANCE_SERVICE,zM as CONTEXT_RELEVANCE_SIGNAL_NAMES,n0 as CONTEXT_SIGNAL_SET_VERSION,o0 as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,i0 as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,hw as CONTEXT_USAGE_LIMITS,Td as CONTRACTS_FLAG_CONTRACTS,nd as COPY_FLAG_CONTRACTS,rc as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,nc as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,oc as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,ET as CREATE_DIRECT_CLOSE_REASON_DEFAULT,ed as CREATE_FLAG_CONTRACTS,NE as CURRENT_HISTORY_HASH_ALGORITHM,Yw as CURRENT_HISTORY_ITEM_HASH_VERSION,Jw as CURRENT_HISTORY_RECORD_HASH_VERSION,Bn as CURRENT_ITEM_FORMAT_VERSION,c0 as ContextSignalStore,gw as ContextUsageValidationError,LM as DEFAULT_AUTHOR_IDENTITY_VOCABULARY,v0 as DEFAULT_CHILD_SAMPLE_LIMIT,sR as DEFAULT_COMPACT_LIST_FIELDS,Tv as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,cf as DEFAULT_EVAL_QUERIES_RELATIVE_PATH,mP as DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET,vM as DEFAULT_TERMINAL_TRANSITION_POLICY,m0 as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,RR as DEFECT_ESCAPE_CLASSES,IR as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Da as DELETE_FLAG_CONTRACTS,fn as DEPENDENCY_KIND_VALUES,fd as DEPS_FLAG_CONTRACTS,Zs as DOCS_FLAG_CONTRACTS,Xa as DUPLICATES_FLAG_CONTRACTS,qP as DURABLE_MERGE_RECEIPT_INTRODUCED_AT,xR as DefectRecurrencePolicyParseError,hd as EVAL_FLAG_CONTRACTS,tf as EVAL_METRIC_NAMES,sf as EVAL_QUERY_SET_CONTRACT,af as EVAL_QUERY_SET_EXAMPLE,nf as EVAL_QUERY_SET_SCHEMA_ID,ld as EVENTS_FLAG_CONTRACTS,Ba as EVENT_FLAG_CONTRACTS,$o as EXECUTABLE_COMMAND_ALIASES,me as EXIT_CODE,Ta as EXTENSION_ACTIVATE_FLAG_CONTRACTS,ba as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,Oa as EXTENSION_ADOPT_FLAG_CONTRACTS,ok as EXTENSION_CAPABILITIES,TT as EXTENSION_CAPABILITY_CONTRACT,yT as EXTENSION_CAPABILITY_CONTRACT_VERSION,bT as EXTENSION_CAPABILITY_LEGACY_ALIASES,xn as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,va as EXTENSION_CATALOG_FLAG_CONTRACTS,Ca as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,ya as EXTENSION_DESCRIBE_FLAG_CONTRACTS,Aa as EXTENSION_DOCTOR_FLAG_CONTRACTS,ga as EXTENSION_EXPLORE_FLAG_CONTRACTS,la as EXTENSION_FLAG_CONTRACTS,ua as EXTENSION_INIT_FLAG_CONTRACTS,_a as EXTENSION_INSTALL_FLAG_CONTRACTS,Sa as EXTENSION_MANAGE_FLAG_CONTRACTS,Ea as EXTENSION_MIGRATE_FLAG_CONTRACTS,nk as EXTENSION_POLICY_MODES,ik as EXTENSION_POLICY_SURFACES,wa as EXTENSION_RELOAD_FLAG_CONTRACTS,ak as EXTENSION_SANDBOX_PROFILES,pa as EXTENSION_SCOPE_FLAG_CONTRACTS,sk as EXTENSION_TRUST_MODES,ha as EXTENSION_UNINSTALL_FLAG_CONTRACTS,HR as EXTERNAL_DEPENDENCY_RESOLUTION_STATUSES,qR as EXTERNAL_DEPENDENCY_SOURCE_KIND,zR as EXTERNAL_DEPENDENCY_SOURCE_KIND_ALIAS,Xv as ExtensionCommandError,Js as FILES_FLAG_CONTRACTS,id as FOCUS_FLAG_CONTRACTS,Wa as GC_FLAG_CONTRACTS,pR as GET_DEPTH_INPUT_VALUES,lR as GET_DEPTH_VALUES,ud as GET_FLAG_CONTRACTS,Hs as GLOBAL_FLAG_CONTRACTS,Hp as GRAPH_DURABLE_CACHE_MIN_ITEMS,zp as GRAPH_DURABLE_CACHE_VERSION,_d as GRAPH_FLAG_CONTRACTS,iR as GRAPH_QUERY_DEFAULTS,De as GRAPH_SUBCOMMAND_VALUES,md as GUIDE_FLAG_CONTRACTS,Ja as HEALTH_FLAG_CONTRACTS,oa as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,cP as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,gM as HISTORY_COMPACT_BULK_DEFAULT_MIN_ENTRIES,na as HISTORY_COMPACT_FLAG_CONTRACTS,yi as HISTORY_EVENT_CLASSIFICATION_VERSION,Qs as HISTORY_FLAG_CONTRACTS,kE as HISTORY_HASH_ALGORITHMS,cv as HISTORY_ITEM_HASH_VERSION_3_INTRODUCED_IN,ta as HISTORY_REDACT_FLAG_CONTRACTS,ra as HISTORY_REPAIR_FLAG_CONTRACTS,kl as INIT_AGENT_GUIDANCE_MODE_VALUES,da as INIT_FLAG_CONTRACTS,Ra as INSTALL_FLAG_CONTRACTS,hn as ISSUE_SEVERITY_VALUES,rd as ITEM_COMPLETE_FLAG_CONTRACTS,NP as ITEM_LATEST_TIMESTAMP_FIELDS,CT as ITEM_METADATA_KEY_ORDER,td as ITEM_MUTATE_FLAG_CONTRACTS,od as ITEM_REOPEN_FLAG_CONTRACTS,Os as ITEM_REVISION_CONFLICT_CHANGE_LIMIT,vs as ITEM_REVISION_CONFLICT_CODE,OP as ITEM_SCALAR_MISSING_VALUE,un as ITEM_TYPE_VALUES,xP as ITEM_UNION_COLLECTION_FIELDS,d0 as JsonFileContextSignalStoreAdapter,Xs as LEARNINGS_FLAG_CONTRACTS,xE as LEGACY_HISTORY_HASH_ALGORITHM,Ru as LINKED_TEST_ENV_NAME_PATTERN,Iu as LINKED_TEST_PM_CONTEXT_MODE_VALUES,Ou as LINKED_TEST_PROTECTED_ENV_KEYS,Pu as LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,Ld as LIST_COMMANDER_STRING_OPTION_CONTRACTS,dR as LIST_COMMAND_DEFAULT_PROJECTIONS,ck as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,Vs as LIST_FILTER_FLAG_CONTRACTS,QR as LIST_SORT_FIELDS,eI as LIST_SORT_ORDER_VALUES,bi as MAINTENANCE_HISTORY_OPERATIONS,A0 as MAX_CHILD_PROJECTION_ITEMS,RT as MAX_WORKFLOW_POLICIES,IT as MAX_WORKFLOW_POLICY_TERMS,ja as MEET_FLAG_CONTRACTS,V0 as MERGE_DRIVER_ARTIFACT_VALUES,ea as MERGE_FLAG_CONTRACTS,$e as MERGE_SUBCOMMAND_VALUES,Y0 as MUTATION_EVENT_WIRE_BUDGET,se as MemoryRelationshipGraphAdapter,Gd as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,yd as NEXT_FLAG_CONTRACTS,vm as NEXT_OUTPUT_VALUES,NM as NEXT_RANKING_POLICIES,Ys as NOTES_FLAG_CONTRACTS,HO as OutputEnvelopeFitError,ma as PACKAGE_FLAG_CONTRACTS,fa as PACKAGE_INIT_FLAG_CONTRACTS,Ga as PAUSE_TASK_FLAG_CONTRACTS,Rc as PLAN_CREATE_METADATA_PARAMETER_KEYS,aa as PLAN_FLAG_CONTRACTS,js as PLAN_SHOW_DEPTH_VALUES,Ye as PLAN_SUBCOMMANDS,Lm as PLAN_TEMPLATE_NAMES,lb as PM_AGENT_TASK_ACCOUNTING_MODES,ut as PM_AGENT_TASK_TRANSCRIPT_VERSION,xo as PM_BULK_LIFECYCLE_COMMAND_ALIASES,rs as PM_CLI_ERROR_DETAILS_LIMITS,ds as PM_CLI_EXPECTED_ERROR_NAME,yR as PM_CLI_GRAMMAR_CONTRACT,mR as PM_CLI_GRAMMAR_NOUNS,Xo as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,fR as PM_CLI_SHARED_VERBS,Do as PM_COMMAND_ALIAS_CONTRACTS,te as PM_COMMAND_CAPABILITY_CONTRACTS,It as PM_COMMAND_DESTINATION_CONTRACTS,fI as PM_COMMAND_EXIT_CONTRACTS,mI as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Pi as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,lI as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,qe as PM_COMMAND_POSITIONAL_CONTRACTS,tl as PM_COMMAND_VISIBILITY_CONTRACTS,oP as PM_COMPLETE_LIST_FINDING_CODES,$O as PM_CONTEXT_INTENTS_FILE,Rw as PM_CONTEXT_INTENT_CONTRACTS,ko as PM_CONTEXT_OPS_COMMAND_ALIASES,Vo as PM_CORE_COMMAND_NAMES,G as PM_CORPUS_SHAPE_SCHEMA,Zo as PM_DEPRECATED_TOOL_ACTIONS,Ai as PM_DIAGNOSTIC_DEGRADATION_STEPS,vi as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,wi as PM_DIAGNOSTIC_OUTPUT_CLASSES,Qo as PM_DISCOVERABLE_TOOL_ACTIONS,Yr as PM_EPISODE_SCHEMA,dI as PM_ERROR_CODE_CATALOG,nI as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,to as PM_EXACT_COVERAGE_METRICS,Uo as PM_EXTENSION_CAPABILITY_CONTRACTS,Ko as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,Bo as PM_EXTENSION_POLICY_MODE_CONTRACTS,Ho as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,zo as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,jo as PM_EXTENSION_SERVICE_NAME_CONTRACTS,qo as PM_EXTENSION_TRUST_MODE_CONTRACTS,Di as PM_GENERIC_REFUSAL_GUIDANCE,WI as PM_GITATTRIBUTES_END,KI as PM_GITATTRIBUTES_START,XI as PM_GITATTRIBUTES_V2_END,YI as PM_GITATTRIBUTES_V2_START,cl as PM_GITIGNORE_END,dl as PM_GITIGNORE_START,CM as PM_HISTORY_ATTESTATION_CONTRACT,Mo as PM_HISTORY_COMMAND_ALIASES,XE as PM_HISTORY_OPERATION_ALIASES,ZE as PM_HISTORY_OPERATION_CONTRACT,JE as PM_HISTORY_OPERATION_PATTERNS,Yo as PM_ITEM_ACTION_SUBCOMMANDS,WE as PM_ITEM_HISTORY_OPERATIONS,it as PM_MCP_APPS_EXTENSION,kr as PM_MCP_APPS_SERVER_CAPABILITY,Ae as PM_MCP_APPS_SPEC_VERSION,Lr as PM_MCP_APP_CONTRACTS,Nr as PM_MCP_APP_MIME_TYPE,oT as PM_MCP_ENTRY_TOOL_NAMES,m as PM_MCP_ERROR_CODES,wN as PM_MCP_HTTP_PROTOCOL_VERSION,Cg as PM_MCP_INPUT_REQUEST_METHODS,nr as PM_MCP_LEGACY_PROTOCOL_VERSIONS,or as PM_MCP_LOG_LEVELS,w as PM_MCP_META_KEYS,R$ as PM_MCP_PROGRESSIVE_DISCOVERY_EXTENSION,I$ as PM_MCP_PROGRESSIVE_DISCOVERY_SERVER_CAPABILITY,sl as PM_MCP_PROMPT_CONTRACTS,H as PM_MCP_PROTOCOL_VERSION,il as PM_MCP_RESOURCE_CONTRACTS,at as PM_MCP_SKILLS_DRAFT_REVISION,Dr as PM_MCP_SKILLS_EXTENSION,Oy as PM_MCP_SKILLS_SERVER_CAPABILITY,P as PM_MCP_SKILL_LIMITS,Se as PM_MCP_SUBSCRIPTION_ID_META_KEY,re as PM_MCP_SUPPORTED_PROTOCOL_VERSIONS,hN as PM_MCP_TASKS_EXTENSION,kg as PM_MCP_TASK_STATUSES,he as PM_MCP_TOOL_COMMAND_CONTRACTS,pS as PM_MODE_PAIRED_OUTPUT_PROJECTION_CONTRACTS,us as PM_MUTATION_ACTION_CONTRACTS,Ne as PM_NAMESPACED_COMMAND_ALIASES,Kr as PM_OBSERVATION_SCHEMA,Si as PM_OUTPUT_BUDGET_CLASSES,Ei as PM_OUTPUT_DEGRADATION_STEPS,Nt as PM_OUTPUT_ENVELOPE_KINDS,Gt as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,Wo as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,Ft as PM_PACKAGE_RESOURCE_KINDS,Be as PM_POSITIONAL_ACTION_CONTRACTS,Dc as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Nc as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,BS as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,ow as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,US as PM_READ_OUTPUT_DIMENSIONS,jS as PM_READ_OUTPUT_OPTION_FLAGS,LS as PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS,NS as PM_READ_OUTPUT_SESSION_MIN_TOKENS,jC as PM_READ_OUTPUT_SURFACES,qS as PM_READ_OUTPUT_SURFACE_CONTRACTS,MS as PM_READ_OUTPUT_TAIL_RETENTION_POLICIES,lS as PM_READ_ROW_CONTRACTS,cS as PM_READ_ROW_JQ_SELECTOR,Ui as PM_RECOVERY_ECHO_FIELDS,gD as PM_RECOVERY_REFERENCE_FIELDS,ce as PM_RECOVERY_REFERENCE_KINDS,Nb as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,uo as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2,wD as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE,po as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2,No as PM_RELOCATED_COMMAND_ALIASES,Fc as PM_REPRODUCIBLE_PROCESS_ENV,_I as PM_SUCCESS_EXIT_CODES,Jo as PM_TOOL_ACTIONS,Pc as PM_TOOL_ACTION_PARAMETER_CONTRACTS,Lc as PM_TOOL_PARAMETERS_SCHEMA,xc as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,kc as PM_TOOL_PARAMETERS_SCHEMA_VERSION,vc as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,Wr as PM_VERDICT_SCHEMA,YE as PM_WORKSPACE_HISTORY_OPERATIONS,Hr as PM_WORKSPACE_RECIPE_SCHEMA,sa as PROFILE_FLAG_CONTRACTS,Qt as PROFILE_LINT_CODES,Zt as PROFILE_LINT_DIMENSIONS,Ht as PROFILE_NAMES,Xe as PROFILE_SUBCOMMANDS,b as PmCliError,ge as PmClient,nP as PmCompleteListValidationError,y as PmMcpAuthorizationError,ir as PmMcpInputRequiredError,Or as PmMcpIssuerCredentialStore,u as PmMcpProtocolError,sr as PmMcpRequestStateReplayGuard,Br as PmMcpSkillRegistry,gr as PmMcpSubscriptionRegistry,ot as PmMcpTaskStore,_w as QUERY_CURSOR_CONTRACT,HS as READ_OUTPUT_MUTATION_CONFLICT_CODE,VS as READ_OUTPUT_SHAPING_CONTROL_FLAGS,Pa as REINDEX_FLAG_CONTRACTS,tv as REINDEX_LOCK_ID,pt as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,$a as RELEASE_FLAG_CONTRACTS,qa as REMIND_FLAG_CONTRACTS,At as RESERVED_ITEM_FIELD_NAMES,La as RESTORE_FLAG_CONTRACTS,_n as RISK_VALUES,KO as RelationshipEventLog,WO as RelationshipEventStore,z as RelationshipGraph,Ue as RelationshipKindRegistry,ia as SCHEMA_FLAG_CONTRACTS,Dd as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,lk as SEARCH_EXTENSION_FLAG_DEFINITIONS,bd as SEARCH_FLAG_CONTRACTS,Wu as SEMANTIC_ATTRIBUTION_LIMITS,wT as SETTINGS_DEFAULTS,ff as SNAPSHOT_SCHEMA,zI as SOURCE_CONTEXT_ACCESS_ENV,HI as SOURCE_CONTEXT_WRITE_OVERRIDE_ENV,Qu as START_BLOCKED_REFUSAL_CODE,Zu as START_BLOCKER_ENFORCEMENT_DEFAULT,Fa as START_TASK_FLAG_CONTRACTS,Ya as STATS_FLAG_CONTRACTS,mn as STATUS_VALUES,zs as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,Ti as SUBSTANTIVE_HISTORY_OPERATIONS,Xw as SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,Zw as SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,LC as SUPPRESS_HOST_OUTPUT_MARKER,Va as TELEMETRY_FLAG_CONTRACTS,Bf as TELEMETRY_SUBCOMMANDS,Ha as TEST_ALL_FLAG_CONTRACTS,za as TEST_FLAG_CONTRACTS,Ka as TEST_RUNS_FLAG_CONTRACTS,$f as TEST_RUN_MEASUREMENT_LIMIT,Ec as TOOL_ACTIVITY_OPTION_CONTRACTS,lc as TOOL_AGGREGATE_OPTION_CONTRACTS,yc as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,Cc as TOOL_CALENDAR_OPTION_CONTRACTS,Tc as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,Sc as TOOL_CONTEXT_OPTION_CONTRACTS,_c as TOOL_CREATE_OPTION_CONTRACTS,fc as TOOL_CREATE_OPTION_CONTRACT_SOURCE,wc as TOOL_DEPS_OPTION_CONTRACTS,Ac as TOOL_GRAPH_OPTION_CONTRACTS,cc as TOOL_LIST_FILTER_OPTION_CONTRACTS,pc as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,mc as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,uc as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,bc as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,gc as TOOL_UPDATE_OPTION_CONTRACTS,hc as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,ST as TYPE_TO_FOLDER,OC as UNKNOWN_SUBCOMMAND_COMPATIBILITY_CODES,ic as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,ac as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,sc as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,sd as UPDATE_FLAG_CONTRACTS,ad as UPDATE_MANY_FLAG_CONTRACTS,Ia as UPGRADE_FLAG_CONTRACTS,Za as VALIDATE_FLAG_CONTRACTS,OT as WORKFLOW_POLICY_ACTIONS,QI as WORKFLOW_POLICY_DOCUMENT_SCHEMA,ZI as WORKFLOW_POLICY_SCHEMA,gd as WORKSPACE_FLAG_CONTRACTS,TA as WORKSPACE_HISTORY_ID,_f as WORKSPACE_SNAPSHOT_ACTIONS,Wl as WorkspaceGraphCache,QO as WorkspaceTransactionInterruptedError,bu as _testOnly,w0 as _testOnlyAggregateCommand,Vl as _testOnlyConfigCommand,P0 as _testOnlyGetCommand,iu as _testOnlyHealthCommand,Dl as _testOnlyInit,xl as _testOnlyInitAgentGuidance,Ak as _testOnlyItemTransaction,Q0 as _testOnlyMutationEvents,C0 as _testOnlyNextCommand,H0 as _testOnlySearchCommand,_P as _testOnlySimilarity,Gm as _testOnlyTemplates,hu as _testOnlyValidateCommand,rk as _testOnlyWorkspacePosition,Ok as abandonItemTransaction,nR as abandonWorkspaceTransaction,CP as acceptAssuranceProposals,fu as acknowledgeLinkedTests,zl as acknowledgeUnknownAuthorHistoryEvents,ql as acknowledgeUnknownAuthorHistoryEventsFromTransport,Cv as acquireItemMetadataDerivedIndexLock,je as acquireLock,ti as acquireLockLease,sx as activateExtensionForTest,QC as activateExtensions,tm as admitStartWithOpenBlockers,ei as agentSessionEnvironment,q_ as aggregate,vf as analyzeAgentProvenanceDescriptorCoverage,MR as analyzeDefectChangeRisk,lM as analyzeDefectRecurrenceCoverage,gp as analyzeDuplicateItems,XO as analyzeGraphImpact,Hc as analyzeHierarchyIntegrity,JO as analyzeKnowledgeGraph,gI as analyzePmCommandExitConformance,en as analyzePmToolActionParity,JP as analyzeReconciliationDiscard,YO as analyzeRelationshipExecution,Dp as analyzeRelationshipSchedule,mg as analyzeSdkActionCoverage,Mt as analyzeSdkCliParameterCompleteness,th as append,qi as appendHistoryEntry,wA as appendWorkspaceAuditEvent,SA as appendWorkspaceHistoryChange,UT as applyAcceptanceCriteriaMutations,bP as applyAssurancePreset,Rd as applyBootstrapPagerPolicy,iM as applyClosureTimestampFix,xw as applyContextIntentProjection,Am as applyContextTagProjection,tI as applyFilterValueEcho,iv as applyHistoryPatch,$c as applyInvocationAuthorOverride,op as applyPathMigrations,QS as applyReadOutputDimensions,YS as applyReadOutputIncludeModes,$S as applyReadOutputSessionReferences,AE as applyRegisteredItemFieldDefaultsAndValidation,ap as applyStandaloneNote,Fs as applyStoredExtensionMigrationState,BT as applyTagRemovals,PM as applyTerminalOrderingPolicy,dp as artifactKey,_C as asRecordClone,fC as asRecordOrNull,He as assembleWorkspaceRelationshipGraph,dP as assertCompleteListResult,Ux as assertExtensionBlueprint,Gx as assertExtensionCapabilityUsage,Cx as assertExtensionDeactivated,qx as assertExtensionManifestCompatible,Bx as assertExtensionManifestMatchesBlueprint,zx as assertExtensionPreflight,Wc as assertHierarchyMutationAllowed,yM as assertHistoryCompactTarget,QP as assertHistoryRepairTarget,Ji as assertInitializedTracker,np as assertLinkedArtifactMutationIsUnambiguous,Kx as assertMcpClientCapabilities,Vx as assertMcpProtocolHeader,cb as assertMemoryRelationshipGraphAdapterConformance,HT as assertNoUnknownCsvKeys,vu as assertNonHierarchyCardinalityMutationAllowed,Ex as assertPackageManifest,xA as assertParentReferenceIsNotSelf,eL as assertPmMcpSkillsCapability,jx as assertProjectProfile,hv as assertProjectRuntimeCompatibility,mv as assertProjectRuntimeFormatGuard,uS as assertProjectionModeChoice,Xi as assertReadableTrackerRoot,Sx as assertRegisteredCommandContract,xx as assertRegisteredCommandOverride,Ix as assertRegisteredExporter,wx as assertRegisteredFlags,Ax as assertRegisteredHook,Rx as assertRegisteredImporter,Px as assertRegisteredItemField,Mx as assertRegisteredItemType,Fx as assertRegisteredMigration,Nx as assertRegisteredParserOverride,Lx as assertRegisteredPreflightOverride,kx as assertRegisteredProfile,Dx as assertRegisteredRendererOverride,vx as assertRegisteredSearchProvider,$x as assertRegisteredServiceOverride,Ox as assertRegisteredVectorStoreAdapter,xC as assertRelationshipEdgeAllowed,no as assertRelationshipGraphAdapterConformance,FT as assertSchemaPreviewSupported,Hf as assertTestMeasurementRun,zw as assertWellFormedOutputText,OI as assuranceAssertionUpdateIsLoosening,Dw as attachContextIntentReceipt,yw as attachContextUsageServingReceipt,lu as attachLinkedTestMutationProvenance,cu as attachLinkedTestProvenance,Ze as attachMcpServerInfo,yS as attachOutputOmissionReceipt,Fw as attachOutputTokenAccounting,$w as attachReadOutputContracts,FS as attachReadOutputSessionReceipt,hl as auditMergeAttributeFence,JI as auditMergeDriverConfiguration,Bp as auditWorkspaceRelationshipGraph,GN as authorizeMcpHttpRequest,Zn as boundAgentEpisodeIdentity,OS as boundReadOutputRows,Cm as buildChildrenByParent,G0 as buildCompactSearchFilterSummary,rI as buildContentFilterEcho,a0 as buildContextSignalSnapshot,Vy as buildCorpusShapeItemPlan,PR as buildDefectRecurrenceIndex,vl as buildExtensionDescribeResult,Rl as buildExtensionInstallPlan,oI as buildGovernanceMissingFilterEcho,qA as buildInvalidTypeError,O0 as buildItemChildrenRollup,Sk as buildItemCompletionMutations,HM as buildItemContextRelevanceCandidates,Ov as buildItemNotFoundError,I0 as buildItemSchedule,sM as buildLinkedFileRepairReport,PN as buildMcpAuthorizationDiscoveryUrls,gg as buildMcpCompleteResult,Yx as buildMcpDiscoverResult,LN as buildMcpDynamicRegistrationMetadata,EN as buildMcpHttpRequestHeaders,oN as buildMcpInputRequiredResult,IN as buildMcpProtectedResourceMetadata,fl as buildMergeAttributePatterns,Mc as buildPmActionToolInputSchema,OD as buildPmRefusalClosureCensus,fP as buildRelationshipContext,kv as buildSearchCorpus,Nv as buildSemanticCorpusInput,rM as buildStatusRoleWarnings,Yi as buildTrackerInitializationRecovery,Gv as buildVectorizationEmbeddingIdentity,Uv as buildVectorizationEmbeddingMetadata,U0 as buildVerboseSearchFilters,eP as buildWorkflowCompletenessCheck,f0 as buildWorkspaceMemorySnapshot,Jn as canonicalDocument,tC as canonicalizeCommandOptionKey,Uk as canonicalizeCommandSuggestions,qM as canonicalizeContextRecencyCoordinate,PC as canonicalizeRelationshipKind,yD as censusPmRecoveryReferenceProducers,aP as certifyCompleteListResult,rx as checkExtensionManifestCompatibility,Fh as claim,Gh as claimNext,lP as classifyHistoryAuthorEvent,Ci as classifyHistoryEvent,YP as classifyHistoryMergeReceiptReferences,HC as classifyHostEnvironmentFault,B0 as classifyImplicitSemanticFallbackReason,Hn as classifyItemFormatVersion,Kf as classifyLinkedTestCommandSafety,Wf as classifyLinkedTestFailure,hE as clearActiveExtensionHooks,Xp as clearDurableGraphCache,nS as clearFocusedItem,t_ as clearWorkspaceContractsCache,$h as close,Cu as closeItem,Kh as closeTask,Md as coalesceRepeatedListFlags,PO as collectBlockedByIds,kO as collectBlockedByIdsFromCorpus,Tw as collectContextUsageDeliveredItemIds,Zc as collectDanglingDependencyReferences,NO as collectDependencyBlockedIds,Xc as collectDuplicateDependencyRows,jp as collectDuplicateRelationshipEdgeGroups,j0 as collectErrorCauseCodes,zc as collectHierarchyRelations,Sr as collectMcpHeaderAnnotations,Qc as collectMissingDependencyTargetIds,Au as collectNewOrderingCycleWarnings,Fp as collectOrderingCycles,Jc as collectOrderingStorageContradictions,UO as collectPackageContextIntentContracts,jt as collectPackageExtensionDirectories,SE as collectRegisteredItemFieldNames,BE as collectRuntimeCreateFieldValues,zA as collectRuntimeFilterValues,qE as collectRuntimeUpdateFieldValues,hm as collectSubtreeIds,Nn as collectUsedExtensionCapabilities,rC as commandOptionFlagLabel,V_ as comments,A_ as commitImportedItem,wk as commitItemCompletion,Ek as commitItemMutations,tR as commitWorkspaceTransaction,qs as compactFlagAliasContracts,gm as compareCriticalItems,lv as comparePmDateVersions,ZO as compareRelationshipSnapshots,hC as compareTimestampStrings,UM as compileHistoryProvenanceMatcher,Mw as composeContextIntentContracts,Yk as composeExtension,tx as composeExtensionPackage,DO as computeActionabilityReport,gA as computeHistoryDiff,Np as computeRelationshipCentrality,xp as computeRelationshipDominators,Kl as computeWorkspaceGraphFingerprint,oh as config,_E as consumeAfterCommandAffectedItems,$_ as context,Lw as contextIntentRowId,jh as copy,Yf as countFailureCategories,AS as countReadOutputRows,Nh as create,yP as createAssurancePreset,dM as createAssuranceWorkspaceContext,yC as createCheckpointId,iP as createCompleteListOptions,eE as createCoreCommandHookContext,eo as createCorpusShapeMeasurement,kI as createEmptyAssuranceDocument,BC as createEmptyExtensionRegistrationRegistry,Jv as createExtensionCommandError,Ls as createExtensionCommandSdk,Mn as createExtensionContributionInventory,Hx as createExtensionTestHarness,Bi as createHistoryEntry,uO as createLazyModule,tP as createLifecycleCompletenessPolicies,UN as createMcpStaticBearerVerifier,gN as createMcpTaskStore,vv as createMutationGuardSdk,mS as createOutputOmissionReceipt,ls as createPmCliExpectedError,Ns as createPmCliProgram,Ri as createPmCommandOutputBudget,dw as createQueryFingerprint,db as createRelationshipGraphScaleFixture,Z as createRelationshipGraphSnapshot,wt as createRelationshipKindRegistry,Uc as createReproducibleProcessRunner,$0 as createSearchCursorFingerprint,tE as createSerialQueue,JT as createStdinTokenResolver,RC as createUnknownSubcommandError,$T as createWorkflowPolicyEvaluator,hf as createWorkspaceSnapshot,ax as deactivateExtensionForTest,_1 as declineServiceOverride,Nw as decodeContextIntentCursor,pO as decodeHtmlEntitiesInOptions,Er as decodeMcpHttpHeaderValue,Uw as decodePmTableRows,uw as decodeQueryCursor,lw as decodeQueryCursorEnvelope,pw as decodeQueryCursorState,sw as decodeReadOutputContinuationCursor,nx as decodeToon,HN as decoratePmMcpToolsWithApps,lp as dedupeLinkedArtifacts,vE as defaultConfigScope,KM as defaultScoreContextCandidates,C1 as defineAfterCommandHook,b1 as defineBeforeCommandHook,T1 as defineBeforeMutationHook,o1 as defineCommand,l1 as defineCommandOverride,W as defineCorpusShape,lL as defineEpisodeSpecification,y1 as defineExporter,Kk as defineExtension,Wk as defineExtensionBlueprint,t1 as defineExtensionManifest,n1 as defineFlag,g1 as defineImporter,s1 as defineItemField,i1 as defineItemType,a1 as defineMigration,Dy as defineObservationContract,w1 as defineOnIndexHook,S1 as defineOnReadHook,E1 as defineOnWriteHook,p1 as defineParserOverride,Ii as definePmCommandOutputBudget,cI as definePmCommandOutputEnvelope,iI as definePmErrorCodeCatalog,u1 as definePreflightOverride,r1 as defineProjectProfile,h1 as defineRendererOverride,d1 as defineSearchProvider,m1 as defineServiceOverride,c1 as defineVectorStoreAdapter,Uy as defineVerdictContract,ve as defineWorkspaceRecipe,Bh as deleteItem,Ef as deleteWorkspaceSnapshot,NC as dependencyToRelationship,Q_ as deps,TP as deriveAssuranceProposals,oM as deriveClosureTimestamp,Jk as deriveExtensionCapabilities,pk as deriveMutationTransactionId,yI as derivePmBulkMutationEffect,bD as derivePmRecoveryReferenceObligations,$p as deriveRelationshipDeadlines,Tl as deriveSchemaEvolutionMigrationId,oO as deriveTelemetryCommandResolution,WA as describeAllowedTransitions,qI as describeExtensionActivation,Zk as describeExtensionBlueprint,AC as describeFlagScalarValueFailure,nm as describeItemOwnershipConflict,Ms as describeItemRevisionChanges,cL as describeObservationCost,Xt as describeProfileComposition,Jt as describeProjectProfile,Pk as describeReadCompletenessControls,Zv as describeUnknownError,pi as detectAgentIdentity,_i as detectHarnessIdentity,Mp as detectRelationshipCommunities,ui as diagnoseAgentIdentity,qp as diffRelationshipAuditSnapshots,Uf as diffTestRunMeasurements,sN as digestMcpRequestParameters,JC as discoverExtensions,Tn as discoverNearbyPmRoot,M$ as discoverPmTools,uv as discoverProjectRuntimeVersionPins,Z_ as docs,H_ as duplicates,Vp as durableGraphCachePath,Jp as durableGraphCacheStatus,qn as effectiveItemFormatVersion,wO as emitTelemetryErrorEvent,w_ as emptyImportedDocument,IP as encodeItemScalarDecisionValue,Cr as encodeMcpHttpHeaderValue,Gw as encodePmTableRows,cw as encodeQueryCursor,iw as encodeReadOutputContinuationCursor,ix as encodeToon,yA as enforceHistoryStreamPolicyForItem,bA as enforceHistoryStreamPolicyForItems,vR as enrichCliFlagInvocationContract,Pt as enrichCliFlagInvocationContracts,av as ensureMaterializedHistoryTarget,pl as ensurePmGitignore,Zl as ensureScope,Yv as ensureSentryCommandTracing,Wv as ensureSentryInit,S_ as ensureTrackerInitialized,Ip as enumerateRelationshipPaths,ki as estimatePmOutputTokens,NI as evaluateAssuranceAssertion,LI as evaluateAssuranceGate,RL as evaluateBoundaryFixtures,JM as evaluateContextRanking,kR as evaluateDefectGateEvidence,xI as evaluateMeasurement,of as evaluateMetricFloors,fs as evaluateMutationGuard,kf as evaluateProvenanceCoverage,q1 as evaluateReliabilityWindow,If as evaluateSemanticAttributionCoverage,bp as evaluateSimilarityGovernance,KA as evaluateTransition,jy as evaluateVerdictContract,DT as evaluateWorkflowPolicies,ts as executeEmbeddingBatchesWithRetry,$v as executeVectorDelete,Fv as executeVectorReset,Dv as executeVectorUpsert,ky as executeWorkspaceRecipe,sp as expandAddGlobEntries,Cp as explainSourceTraceability,SM as exportAttestation,Wh as extension,Xh as extensionActivate,Jh as extensionDeactivate,Yh as extensionList,Wb as extensionMigrate,WP as extractHistoryMergeReceiptDispositions,KP as extractHistoryMergeReceiptReferences,DN as extractMcpTraceContext,ov as extractPatchFailureContext,su as extractReferencedPmItemIdsFromCommand,ab as federateRelationshipGraphSnapshots,Y_ as files,X_ as filesDiscover,J_ as filesLookup,Cw as finalizeContextUsageDelivery,Zy as findCoverageDeficits,yp as findDuplicateClusters,ml as findGitWorkspaceRoot,$E as findHistoryIdentityDiscontinuities,wl as findInstalledNpmPackageCandidate,zN as findPmMcpAppByUri,Lo as findPmNamespacedCommand,kp as findRedundantRelationshipEdges,Lp as findRelationshipCutStructure,hp as findSimilarItems,SO as finishTelemetryCommand,VO as fitOutputEnvelope,wC as flattenFlagListValue,Yy as flushTelemetryQueue,zh as focus,Pp as forEachMatchedRelationshipEdge,Up as formatDuplicateEdgeGroup,Vc as formatHierarchyRelation,Gp as formatOrderingStorageContradiction,gR as formatPmPositionalActionFlagTip,Jm as formatProfileApplyHuman,Xm as formatProfileLintHuman,Wm as formatProfileListHuman,Ym as formatProfileShowHuman,Sl as formatSchemaEvolutionMigrationHuman,z0 as formatVectorIndexRecoveryWarnings,tk as formatWorkspacePositionHuman,Rh as gc,Vi as generateItemId,j_ as get,uE as getActiveCommandResult,Iw as getActiveContextIntentContracts,Dn as getActiveExtensionRegistrations,FN as getActiveMcpTraceContext,$I as getAssuranceDeclaration,lg as getContracts,rS as getFocusedItem,Sn as getHistoryPath,zO as getItemAt,En as getItemPath,gs as getMutationActionContract,ll as getPmGitignoreBlock,Cn as getSettingsPath,r_ as getWorkspaceContracts,CA as getWorkspaceHistoryPath,eh as graph,Kp as graphAuditBaselinePath,Pf as groupHistoryByEpisode,f1 as handleServiceOverride,Wx as hasMcpClientExtension,qN as hasPmMcpAppsCapability,ze as hasSubcommandFlagContractsForCommand,jv as hasVectorizationEmbeddingIdentityChanged,Bv as hasVectorizationVectorDimensionChanged,sA as hashDocument,aA as hashDocumentForVersion,dA as hashEmptyDocument,eA as hashHistoryPatch,Qw as hashHistoryRecord,tA as hashHistoryStream,PP as hashItemScalarDecisionValue,Oh as health,Ap as hierarchyAncestors,vp as hierarchyDescendants,kh as historyCompact,xh as historyCompactBulk,DE as historyDigest,GM as historyEntryMatchesProvenance,pv as historyItemHashVersionForRuntime,Ih as historyRedact,Ph as historyRepair,Mh as historyRepairAll,MO as indexBlockedByIds,Kc as indexHierarchyRelations,qv as inferConsistentVectorDimension,Oi as inferPmOutputBudgetClass,rh as init,sP as inspectCompleteListResult,qC as inspectExtensionManifestSchema,Fl as inspectHistoryAuthorStream,FP as inspectMergeReceiptEvidence,_v as inspectProjectRuntimeCompatibility,Ss as inspectStaleInProgressItems,fg as inspectStaticExtensionInventory,tM as inspectStatusRoleAssignments,EA as inspectWorkspaceHistoryState,gf as inspectWorkspaceSnapshot,bl as installMergeFence,Xx as interpretMcpResultType,Rm as isAlreadyClaimedError,tO as isCommanderError,xk as isCompatibleRecoveryFlag,Wd as isErrnoError,vO as isExternalDependencyReference,OO as isExternalDependencySourceKind,fe as isFileMissingError,$i as isGenericRefusalRequired,Fi as isGenericRefusalWhy,$C as isHostOutputSuppressed,cs as isItemAlreadyExistsError,ks as isItemRevisionConflict,RP as isItemScalarMissingValue,zP as isLegacyMergeReceiptSummary,h as isMcpRecord,_s as isMutationAction,kC as isOrderingRelationshipKind,MA as isPlaceholderReferenceToken,os as isPmCliErrorDetails,ps as isPmCliExpectedError,rn as isPmExtensionCapabilityContract,nn as isPmExtensionPolicyModeContract,sn as isPmExtensionPolicySurfaceContract,on as isPmExtensionServiceNameContract,hI as isPmKnownExitCode,pI as isPmMutationReceipt,We as isPmSuccessfulExitCode,as as isPmTokenBudgetRecovery,tn as isPmToolAction,HP as isPreDurableCloneLocalReceiptSummary,VP as isPreDurableDispositionEligibleReference,fv as isProjectMutatingInvocation,mO as isPureSnakeCaseAlias,tw as isReadOutputBudgetExceeded,xS as isReadOutputSessionReference,kk as isReadProjectionRecoveryFlag,ew as isReadResultOmittedForBudget,_S as isReadRowContract,Bc as isRuntimeRecord,JA as isSettingsReadFallback,em as isStartTransition,hO as isTerminalPlanMode,HE as isTerminalStatus,In as isTimestampLiteral,hk as itemDocumentToMutationOptions,R0 as itemHasSchedule,kn as jaccardSimilarity,W_ as learnings,vC as levenshteinDistanceWithinLimit,Hd as limitAnnotationEntries,pu as linkedTestTrustFingerprint,Qk as lintExtensionBlueprint,zC as lintExtensionManifestSchema,er as lintProjectProfile,F_ as list,si as listAgentProvenanceAdapters,Pd as listAliasPluralKeys,G_ as listAllComplete,wv as listAllDocumentCandidatesCached,es as listAllItemMetadata,Av as listAllItemMetadataLight,DI as listAssuranceDeclarations,BI as listAssuranceVerdicts,zy as listBuiltinCorpusShapes,jk as listCoreClosedDomainContracts,uR as listGetProjectionFields,AP as listInvalidProvenanceHistoryStreamIds,cR as listListProjectionFields,GP as listMergeReceipts,hs as listMutationActions,X0 as listMutationEvents,ho as listPmCommandFlagBudgets,ol as listPmCommandsForFamily,rl as listPmCommandsForTier,Me as listPmFlagLexicon,JD as listPmFlagSpellingInventory,nl as listPmMcpToolsForProfile,UD as listPmRequiredArgumentRefusalContracts,jD as listPmSubcommandRefusalContracts,Yt as listProfiles,zD as listTrackerPreflightRecoveryContracts,bk as listUpsertKeyCandidates,yf as listWorkspaceSnapshots,jO as loadContextIntentRuntimeLayers,Um as loadCreateTemplateOptions,ZC as loadExtensions,Qp as loadGraphAuditBaseline,Tk as loadGuardedRuntimeSchema,TC as loadMutationCheckpoint,x as loadRelationshipGraphAdapter,Zi as locateItem,zT as looksLikeGenericKeyValueEntry,vS as mapReadOutputRows,UP as markMergeReceiptReconciled,HA as matchesRuntimeFilters,CO as maybeRunFirstUseTelemetryPrompt,Ky as measureCorpusShapePlan,Wi as measureItemMetadataReadWork,jT as mergeAdditiveTags,Xk as mergeExtensionBlueprints,MP as mergeHistoryStreams,LP as mergeItemDocuments,DP as mergeJsonDocuments,kd as mergeLinkedTestTwoTokenEntries,kP as mergeRelationshipEventStreams,Sm as mergeSortedWarnings,_O as migrateItemFilesToFormat,Iv as mutateItem,Rv as mutateItemWithHistoryContext,AA as mutateWorkspaceJsonWithHistory,B_ as next,di as normalizeAgentProvenanceAdapterValue,zd as normalizeAnnotationTransportOptions,SI as normalizeAssuranceEvaluation,EI as normalizeAssuranceMutation,xd as normalizeBootstrapInvocation,PE as normalizeBulkIdsValue,Yc as normalizeDependencyGraphTarget,YR as normalizeDependencySeedId,WR as normalizeDependencySourceKind,xt as normalizeDirectExtensionCommandOptions,Rs as normalizeExpectedItemHash,Pn as normalizeExtensionContributionInventory,tS as normalizeHistoryOperationForWrite,wP as normalizeInvalidHistoryProvenance,AR as normalizeItemAddressInvocation,zn as normalizeItemFormatVersion,Hi as normalizeItemId,Wn as normalizeItemMetadata,XR as normalizeItemReference,Id as normalizeLegacyExtensionActionSyntax,ip as normalizeLinkedPath,PA as normalizeParentReferenceValue,Kt as normalizeProfileName,zi as normalizeRawItemId,XS as normalizeReadOutputIncludeModeOptions,uA as normalizeReplayPatchOps,ys as normalizeSimilarityText,zE as normalizeStatusForRegistry,Kn as normalizeStatusInput,GE as normalizeStatusInputWithRegistry,eO as normalizeThrownExitCode,K_ as notes,Rn as nowIso,Wp as openDurableGraphCache,iN as openMcpRequestState,pL as openPmEpisode,Op as orderingPredecessors,Rp as orderingSuccessors,r0 as packContextCandidates,ym as packRankedContextItems,ag as packageActivate,sg as packageCatalog,dg as packageDeactivate,ng as packageDescribe,rg as packageDoctor,eg as packageInstall,Zh as packageLifecycle,Qh as packageList,og as packageManage,Yb as packageMigrate,ig as packageReload,tg as packageUninstall,fw as paginateQueryRows,Ql as parseAddEntries,ep as parseAddGlobEntries,Kd as parseAnnotationTextInput,uk as parseAtomicMutationControls,Od as parseBootstrapCommandName,wd as parseBootstrapGlobalOptions,vd as parseBootstrapHelpRequest,Nd as parseBootstrapTypeValue,IE as parseBulkIdsText,fm as parseContextDepth,lm as parseContextFocusFields,FO as parseContextIntentDeclarations,_m as parseContextSections,s0 as parseContextSignalSnapshot,qT as parseCsvKv,LR as parseDefectChangeRiskRequest,cM as parseDefectRecurrenceCoverageRequest,NR as parseDefectRecurrencePolicy,rf as parseEvalMetricFloors,df as parseEvalQuerySet,Is as parseExpectHashSpecs,lC as parseExtensionLongFlagToken,ru as parseGraphSubcommand,EM as parseHistoryAttestation,$M as parseHistoryProvenanceFilters,DR as parseIntegerLimit,VE as parseItemDocument,mk as parseItemMutationBatch,BA as parseLimit,Gu as parseLinkedTestAssertionEqualsMap,Uu as parseLinkedTestAssertionGteMap,xu as parseLinkedTestBoolean,Nu as parseLinkedTestContextMode,ku as parseLinkedTestEnvClear,Mu as parseLinkedTestEnvSet,ju as parseLinkedTestJsonEntries,Fu as parseLinkedTestMinLines,$u as parseLinkedTestRegexList,Du as parseLinkedTestStringList,Lu as parseLinkedTestWorkspaceContextMode,wg as parseMcpCachePolicy,_g as parseMcpImplementation,tt as parseMcpInputRequests,lr as parseMcpInputResponses,Wg as parseMcpSubscriptionFilter,rp as parseMigrateEntries,GR as parseMultiValueFilter,uI as parseMutationReceipt,QT as parseOptionalNonNegativeInteger,ZT as parseOptionalNumber,pD as parsePmAgentTaskTranscriptCorpus,P$ as parsePmToolDiscoveryOptions,$R as parsePriority,BR as parsePriorityFilterSet,DS as parseReadOutputSession,wE as parseRegisteredItemFieldAssignments,ae as parseRelationshipGraphSnapshot,tp as parseRemoveEntries,Tp as parseSourceLineRange,FA as parseStatusFilterCsv,UR as parseStringFilterSet,an as parseTags,Ff as parseTestRunMeasurements,FR as parseType,jR as parseTypeFilterSet,Bl as parseUnknownAuthorHistoryEventCoordinates,PT as parseWorkflowPolicy,MT as parseWorkflowPolicyDocument,E0 as partitionDecisionEntries,hA as patchPathToChangedField,dn as pathExists,Vh as pauseTask,Yp as persistDurableGraphResult,XA as persistSelectedItemFormat,uP as planAgentIdentityVocabularyMutation,u0 as planCompletedAtBackfill,Il as planExtensionDirectoryCopy,Vk as planItemMutationDocument,tr as planProfileApplication,_D as planRelationshipEventBackfill,tu as planRelationshipRemediation,Cl as planSchemaEvolutionMigration,Ul as planUnknownAuthorHistoryAcknowledgment,bf as planWorkspaceSnapshotRestore,TR as positionalShapeKey,CR as positionalSignatureKey,ox as preflightExtension,Ts as prepareSimilarityText,KT as preserveMutationStdinTokenFields,VT as preserveMutationStdinTokenLiterals,Hk as previewItemMutationDocument,Ck as previewItemMutations,Ww as printError,Kw as printResult,Ch as profile,wh as profileApply,Ah as profileLint,Eh as profileList,Sh as profileShow,fE as projectAfterCommandItemSnapshot,pm as projectContextFocusRows,Df as projectFleetAttributionAnalytics,FM as projectHistoryProvenance,ji as projectLeanRecoveryPayload,jw as projectPmBriefListEnvelope,Bw as projectPmBriefSearchEnvelope,ss as projectPmCliErrorContextDetails,ns as projectPmCliErrorDetails,Ni as projectPmDiagnosticOutput,Li as projectPmDiagnosticText,Nf as projectProvenanceCoverageAnalytics,_u as projectValidateCounts,EP as promoteAssuranceAssertion,bw as propagateContextUsageServingReceipt,NL as pruneCompileCacheGenerations,FI as putAssuranceDeclaration,GI as putAssuranceDeclarationBundle,gv as queryItemMetadataIndex,yv as queryLinkedFileMetadataIndex,bv as querySimilarItemMetadataIndex,Gf as queryTestRunMeasurementsBelow,An as quoteCommandArg,wn as quoteWindowsCommandArg,Gk as rankCommandPaths,Vd as readAnnotationEntries,mi as readAuthorEnvironment,n_ as readBooleanOption,vw as readContextUsageAffinity,i_ as readCsvListOption,$s as readExtensionMigrationState,cn as readFileIfExists,jd as readFirstStringFromCommanderOptions,Bd as readFirstValueFromCommanderOptions,Mf as readHistoryAnalyticsWindow,aS as readHistoryEntries,gi as readHistorySnapshot,wf as readImprovementLedger,Ev as readItemMetadataDerivedIndexState,Ps as readItemRevision,vk as readItemTransaction,Qi as readLocatedItem,wS as readOutputBudgetCollections,nw as readOutputCollectionFingerprint,SS as readOutputContinuationRowCollections,CS as readOutputContinuationRowPaths,WS as readOutputIncludeModeOptions,kS as readOutputRetainsTail,ES as readOutputRowCollections,TS as readOutputRowPaths,GS as readOutputSessionRemainingTokens,Ut as readPmPackageManifest,e_ as readRequiredString,jE as readRuntimeFieldOptionValue,Ki as readSettings,bO as readSettingsSection,ZA as readSettingsWithMetadata,qd as readStringArrayFromCommanderOptions,o_ as readStringOption,Qv as readThrownExitCode,zv as readVectorizationStatusLedger,dv as readWorkflowPolicies,kT as readWorkflowPolicyField,GO as readWorkspaceContextIntentContracts,l0 as readWorkspaceContextSignals,_0 as readWorkspaceMemory,ek as readWorkspacePosition,rR as readWorkspaceTransaction,_A as reanchorHistoryEntries,H1 as reconcileArtifactLedgers,Ln as reconcileExtensionCapabilityUsage,OA as reconcileWorkspaceJsonHistory,mE as recordAfterCommandAffectedItem,jI as recordAssuranceVerdict,Hu as recordClaimSemanticAttribution,Sw as recordContextUsageDelivery,Ew as recordContextUsageServing,ww as recordContextUsageTouch,Aw as recordContextUsageTouches,Ku as recordFocusSemanticAttribution,Sf as recordImprovementObservation,Vu as recordReleaseSemanticAttribution,Sv as refreshItemMetadataDerivedIndex,gl as refreshMergeAttributeFenceIfInstalled,IS as refreshReadOutputDeliveredCounts,Vv as refreshSearchArtifactsForMutation,ai as registerAgentProvenanceAdapters,VR as registerExternalDependencyResolver,ii as registerHarnessSignalDescriptors,dS as registerOutputMaterialFieldGroups,Uh as release,RS as rememberReadOutputFocusRows,UI as removeAssuranceDeclaration,ln as removeFileIfExists,mp as renameArtifactsResultKey,sm as renderCalendarMarkdown,am as renderCalendarToon,wm as renderContextMarkdown,Ol as renderExtensionDescribeMarkdown,Al as renderExtensionSurfaceMarkdown,R_ as renderGuideMarkdown,Dk as renderMissingOptionRetry,S0 as renderNextMarkdown,Bk as renderPmClosedDomainHelp,vn as renderPmCommand,Go as renderPmCommandAliasMigrationHint,al as renderPmCommandVisibilityMarkdown,QD as renderPmFlagLexiconMarkdown,VN as renderPmMcpAppHtml,RD as renderPmRefusalClosureCensusMarkdown,UA as renderRowsAsCsv,jA as renderRowsAsTable,Dh as reopen,sv as replayHistoryToTarget,lA as replayToCanonicalItemDocument,cA as replayToItemDocument,eS as requireHistoryOperation,RM as requireTerminalReason,IM as requireTerminalReasonWithRecovery,nA as resealHistoryRewrite,cE as resetActiveExtensionRuntimeState,Xl as resetWorkspaceGraphCache,Qn as resolveAgentSessionContextFromSignals,Zd as resolveAnnotationIndex,Yd as resolveAnnotationInput,sS as resolveAuthor,hi as resolveAuthorIdentity,IA as resolveBodyFileContent,Hy as resolveBuiltinCorpusShape,im as resolveCalendarOutputFormat,sI as resolveCanonicalPmErrorCodeContract,MC as resolveCanonicalRelationshipKind,iS as resolveClaimPrincipal,ME as resolveCliBulkIdsInput,iC as resolveCommandOptionPolicyState,xL as resolveCompileCacheGeneration,p0 as resolveCompletionTimestamp,UC as resolveConfiguredPmPackageRoot,ZR as resolveContentFieldFilters,kw as resolveContextIntentContract,um as resolveContextOutputFormat,mm as resolveContextTokenBudget,MM as resolveCreateExplicitEmptyFlag,As as resolveDeclaredBlockers,x0 as resolveEffectiveSearchMode,Pv as resolveEmbeddingProviders,kt as resolveExtensionFlagOptionKey,SC as resolveExtensionFlagValueContract,Pl as resolveExtensionInstallSourceIdentity,pC as resolveExtensionLongFlagName,Ds as resolveExtensionMigrationStatePath,XC as resolveExtensionRoots,KR as resolveExternalDependencyReference,EC as resolveFlagValueKind,dC as resolveGlobalPmRoot,v_ as resolveGuideOutputFormat,Af as resolveHistoryEpisodeGroupIdentity,LE as resolveHistoryHashAlgorithm,QE as resolveHistoryOperation,DM as resolveHistoryProvenanceDimensions,AO as resolveHistorySubject,nv as resolveHistoryTarget,L0 as resolveHybridSemanticWeight,bn as resolveImplicitPmRoot,gC as resolveIsoOrRelative,xO as resolveItemBlockers,RO as resolveItemExecutionRole,_k as resolveItemMutationDocument,om as resolveItemOwnershipConflict,yn as resolveItemTypeRegistry,FE as resolveItemTypesFilePath,Rk as resolveLifecycleVerbRecovery,cC as resolveLinkedResourcePositionalRecovery,Xf as resolveLinkedTestFailureExitCode,au as resolveLinkedTestSourceRef,du as resolveLinkedTestSourceWorkspaceRoot,uu as resolveLinkedTestTrust,mu as resolveLinkedTestTrustBatch,Yg as resolveMcpAcknowledgedSubscriptionFilter,Je as resolveMcpRequestContext,ul as resolveMergeInstallContext,$k as resolveMisnestedCommandPath,JR as resolveMissingMetadataFilters,Lk as resolveMissingOptionPlaceholder,fS as resolveModePairedOutputOmissionReceipt,T0 as resolveNextOutputFormat,gS as resolveOutputOmissionReceipt,GC as resolvePmCliVersion,Fo as resolvePmCommandAlias,Ve as resolvePmCommandCapabilityFamily,Dt as resolvePmCommandExitContract,L as resolvePmCommandOperation,Mi as resolvePmCommandOutputBudget,Lt as resolvePmCommandOutputEnvelope,_R as resolvePmCommandPositionalContract,On as resolvePmCommandScopeArgs,Ke as resolvePmCommandVisibilityTier,xi as resolvePmDiagnosticOutputBudget,aI as resolvePmErrorCodeContract,qb as resolvePmFlagSemanticConcept,Le as resolvePmHistoryOperation,Qx as resolvePmMcpExecutableInvocation,FC as resolvePmPackageRootFromModule,hR as resolvePmPositionalActionContract,Ed as resolvePmPositionalActionFlagContracts,Ge as resolvePmRoot,Oc as resolvePmToolCustomFieldCollision,NA as resolvePriority,Wt as resolveProfile,_l as resolveProjectMergeTypeFolders,mw as resolveQueryCursorStart,Ik as resolveReadCompletenessControls,Mk as resolveReadOptionRetryArgs,JS as resolveReadOutputDimensions,rw as resolveReadOutputEncoding,PS as resolveReadOutputRecoveryBudget,zS as resolveReadOutputSurface,hS as resolveReadRowContract,Nk as resolveRecoveryCommandName,OE as resolveRegisteredSearchProvider,RE as resolveRegisteredVectorStoreAdapter,Gc as resolveReproducibleProcessEnvironment,Un as resolveRuntimeFieldRegistry,Gn as resolveRuntimeStatusRegistry,Mv as resolveSearchCorpusFields,k0 as resolveSearchMaxResults,F0 as resolveSearchPage,N0 as resolveSearchScoreThreshold,D0 as resolveSearchTuning,xv as resolveSemanticCorpusCharacterLimit,zu as resolveSemanticLineageIds,ev as resolveSettingsWithSemanticRuntimeDefaults,VI as resolveSourceContextWritePolicy,Ju as resolveStartTaskInProgressStatus,ee as resolveSubcommandFlagContractsForCommand,AT as resolveTelemetryErrorCategory,Kv as resolveTelemetrySourceAttribution,OM as resolveTerminalReason,yk as resolveTransactionSchema,nC as resolveTypeDefinition,oC as resolveTypeName,GA as resolveTypeSynonym,VA as resolveTypeWorkflows,jl as resolveUnknownAuthorAcknowledgmentSelector,q0 as resolveVectorIndexRecovery,Lv as resolveVectorStores,qc as resolveWorkspaceRelationshipKindRegistry,aC as resolveWorkspaceRoot,qh as restore,CC as restoreCheckpointItems,RA as restoreWorkspaceJsonFromHistory,Cf as restoreWorkspaceSnapshot,Tf as restoreWorkspaceSnapshotWithRecovery,ug as runAction,gE as runActiveBeforeMutationHooks,bE as runActiveCommandHandler,yE as runActiveOnIndexHooks,Fn as runActiveOnReadHooks,$n as runActiveOnWriteHooks,TE as runActiveParserOverride,CE as runActivePreflightOverride,EE as runActiveServiceOverride,cm as runActivity,YC as runAfterCommandHooks,Zm as runAggregate,Jd as runAnnotationCommand,Tu as runAppend,mM as runAssuranceAction,fM as runAssuranceDispatch,WC as runBeforeCommandHooks,dm as runCalendar,Im as runClaim,Pm as runClaimNext,Eu as runClose,Su as runCloseMany,Nm as runCloseTask,Qd as runComments,I_ as runCompletion,Hl as runConfig,zt as runContext,e0 as runContextEvaluationCorpus,ZM as runContextEvaluationScenario,wu as runCopy,Bu as runCreate,qu as runDelete,Jl as runDeps,fp as runDocs,hP as runDuplicates,lf as runEval,uf as runEvent,Ml as runExtension,Us as runExtensionMigrateAction,Gs as runExtensionMigrations,Ep as runFiles,wp as runFilesDiscover,Sp as runFilesLookup,Lf as runFleetAttributionAnalytics,Xu as runFocus,yu as runGc,Qm as runGet,ou as runGraph,O_ as runGuide,nu as runHealth,M0 as runHistory,AM as runHistoryAttest,hM as runHistoryCompact,bM as runHistoryCompactBulk,XP as runHistoryMaintenance,TM as runHistoryRedact,ZP as runHistoryRepair,eM as runHistoryRepairAll,$l as runInit,Nl as runInitAgentGuidance,ec as runLearnings,up as runLinkedArtifacts,Jf as runLinkedTests,el as runList,pf as runMeet,K0 as runMergeDriver,yl as runMergeInstall,BP as runMergeReceiptEvidenceReport,jP as runMergeReceiptReport,W0 as runMergeReconcile,Om as runNext,tc as runNotes,xm as runPauseTask,Dm as runPlan,Km as runProfileApply,Vm as runProfileLint,zm as runProfileList,Hm as runProfileShow,xf as runProvenanceCoverageAnalytics,dx as runRegisteredCommandForTest,mx as runRegisteredCommandOverrideForTest,Tx as runRegisteredExporterForTest,lx as runRegisteredHookForTest,bx as runRegisteredImporterForTest,yx as runRegisteredMigrationForTest,cx as runRegisteredMutationGuardForTest,px as runRegisteredParserOverrideForTest,ux as runRegisteredPreflightOverrideForTest,fx as runRegisteredRendererOverrideForTest,hx as runRegisteredSearchProviderForTest,_x as runRegisteredServiceOverrideForTest,gx as runRegisteredVectorStoreAdapterForTest,rr as runReindex,Mm as runRelease,mf as runRemind,xM as runReopen,$m as runRestore,El as runSchemaEvolutionMigration,ef as runSearch,Wy as runSearchRefreshWorkerEntrypoint,P_ as runStartBackgroundRun,km as runStartTask,jf as runStats,qf as runTelemetry,Bm as runTemplatesList,jm as runTemplatesSave,qm as runTemplatesShow,Zf as runTest,Qf as runTestAll,M_ as runTestRunsList,x_ as runTestRunsLogs,L_ as runTestRunsResume,k_ as runTestRunsStatus,N_ as runTestRunsStop,D_ as runTestRunsWorker,rm as runUpdate,Fm as runUpdateMany,Bt as runUpgrade,gu as runValidate,pg as runWithActiveExtensions,D as runWithAgentSessionContext,YA as runWithConfigurationOnlySettings,Pw as runWithContextIntentContracts,BO as runWithDiscoveredContextIntentContracts,ci as runWithHarnessDetectionSignals,$N as runWithMcpTraceContext,jc as runWithReproducibleProcessEnvironment,li as runWithWorkspaceHarnessSignalDescriptors,Vr as runWithWorkspaceRecipe,rP as runWorkflowPolicyAction,_M as runWorkspaceTransactionGc,eu as saveGraphAuditBaseline,nM as scanClosureTimestamps,SP as scanExtensionHostVersions,Gl as scanHistoryAuthorAttribution,Vn as scanItemFormatVersions,ms as scanMutationSecrets,vP as scanProvenanceResolverHealth,ws as scanStaleInProgressItems,aM as scanStorageIntegrity,nh as schema,ph as schemaAddField,ch as schemaAddStatus,ah as schemaAddType,_h as schemaApplyPreset,hh as schemaInferTypes,ih as schemaList,mh as schemaListFields,bh as schemaRemapStatus,uh as schemaRemoveField,lh as schemaRemoveStatus,dh as schemaRemoveType,yh as schemaRenameField,gh as schemaRenameType,sh as schemaShow,fh as schemaShowField,Th as schemaShowStatus,Fk as scoreCommandPathMatch,WM as scoreContextCandidates,YM as scoreContextCandidatesWithActiveExtensions,Cs as scoreItemSimilarity,BD as scorePmGrammarRefusalClosure,MD as scorePmRefusalClosure,Es as scorePreparedItemSimilarity,HD as scoreTrackerPreflightRecoveryClosure,rA as sealHistoryRecord,nN as sealMcpRequestState,U_ as search,y0 as searchWorkspaceMemory,b0 as searchWorkspaceMemoryReadResult,LO as selectActionableEntries,aw as selectCursorSemanticOptions,E_ as selectImportAuthor,kN as selectMcpClientRegistrationMode,g0 as selectWorkspaceMemory,h0 as selectWorkspaceMemoryRollups,Yu as semanticAttributionAffinity,dO as sentryCaptureCliError,sO as sentryDiscardCommandSpan,aO as sentryFinishCommandSpan,lO as sentryFlush,cO as sentryLogCliUsageError,nO as sentrySetCommandContext,iO as sentryStartCommandSpan,Xn as serializeItemDocument,qk as serializeNdjsonRows,zk as serializeNdjsonStream,$y as serveDeclaredObservation,lE as setActiveCommandContext,pE as setActiveCommandResult,oE as setActiveExtensionCommands,rE as setActiveExtensionHooks,nE as setActiveExtensionParsers,iE as setActiveExtensionPreflight,dE as setActiveExtensionRegistrations,aE as setActiveExtensionRenderers,sE as setActiveExtensionServices,oS as setFocusedItem,yO as settingsSectionRevision,gO as shouldCompletePlanOnClose,Zp as shouldPersistDurableGraphCache,XT as shouldResolveMutationStdinTokenField,YT as shouldResolveMutationStdinTokens,rv as shouldRunSearchRefreshInForeground,_p as similarityAdvisoryWarnings,bS as sliceReadOutputRowCollection,is as snapshotPmCliErrorContext,cp as sortLinkedArtifacts,GT as splitAcceptanceCriteria,fO as splitCommaList,Yn as splitFrontMatter,ZS as stabilizeReadOutputReceiptEstimates,I as stableStringify,fk as stableUpsertValue,vT as stableValueEquals,Hh as startTask,EO as startTelemetryCommand,z_ as stats,UE as statusIsTerminal,Ad as stripGlobalBootstrapTokens,J0 as subscribeMutationEventBatches,Z0 as subscribeMutationEvents,pP as summarizeAgentIdentityVocabulary,Of as summarizeAgentModelProvenance,Rf as summarizeAgentProvenance,QM as summarizeContextEvaluationReports,Vf as summarizeContextPreflight,jM as summarizeHistoryProvenance,Ll as summarizeInitResult,$P as summarizeMergeReceipt,kM as supportsCreateExplicitEmpty,wR as supportsItemIdAlias,DC as suppressHostOutput,Re as syncRelationshipGraphAdapter,ex as synthesizeExtensionManifest,Sd as toCompletionFlagString,Em as toContextFocusItem,bm as toContextPackingSummary,Tm as toContextRankingSummary,mC as toErrorMessage,a_ as toEstimatedMinutesValue,dk as toExtensionFlagDefinitions,u_ as toImportBoolean,h_ as toImportConfidence,p_ as toImportInteger,T_ as toImportLinkedDocs,b_ as toImportLinkedFiles,C_ as toImportLinkedTests,y_ as toImportLogEntries,g_ as toImportNormalizedEnum,__ as toImportNumberMap,d_ as toImportPriority,l_ as toImportStatus,m_ as toImportStringList,f_ as toImportStringMap,c_ as toImportTags,KE as toItemRecord,s_ as toNonEmptyImportString,uC as toNonEmptyStringOrUndefined,pA as toReplayDocument,qw as toWellFormedText,bs as tokenizeSimilarityText,WT as transferMutationStdinTokenPolicy,VC as translateHostEnvironmentFault,Lh as update,zf as updateLinkedTest,cg as upgrade,vh as validate,II as validateAssertionDefinition,MI as validateAssuranceDocument,PI as validateGateDefinition,gk as validateItemMutationRows,pp as validateLinkedPaths,xN as validateMcpAuthorizationResponseIssuer,MN as validateMcpAuthorizationServerMetadata,NN as validateMcpClientMetadataDocument,SN as validateMcpHttpRequestHeaders,dN as validateMcpJsonSchema,RI as validateMeasurementDefinition,kA as validateMissingParentReference,KS as validateReadOutputOptions,$A as validateSprintOrReleaseValue,sC as validateTypeOptions,eR as validateWorkspaceTransactionIdentity,wM as verifyAttestation,OR as verifyCliFlagInvocationParity,bR as verifyExplicitPositionalSlotCensus,fA as verifyHistoryChain,mA as verifyHistoryChainWithVersion,qO as verifyHistoryEntries,oA as verifyHistoryRecordHash,iA as verifyHistoryRewriteEvidence,SR as verifyPmCliGrammar,ER as verifyPmCommandPositionalContracts,ZD as verifyPmFlagLexicon,ED as verifyPmRecoveryKindRuntimeCoverage,xb as verifyPmRecoveryProducerRuntimeCoverage,CD as verifyPmRecoveryReferences,vD as verifyPmRefusalClosureIdentityRatchet,AD as verifyPmRefusalClosureRatchet,TD as verifyPmRefusalReachability,dc as verifyToolOptionCliParity,LA as withCliMutationInput,xs as withExpectedItemRevisions,Bs as withFlagAliasMetadata,KC as withHostEnvironmentBoundary,DA as withLiteralMutationInput,aN as withMcpCachePolicy,Gi as withoutGenericRefusalExamples,NT as workflowApprovalFingerprint,LT as workflowPolicyApplies,xT as workflowPolicyFingerprint,Yl as workspaceGraphCache,oR as workspaceTransactionPlanDigest,Xd as wrapOwnershipConflict,rO as wrapThrownErrorForSentry,fi as writeAuthorEnvironment,Fe as writeFileAtomic,bC as writeMutationCheckpoint,QA as writeSettings,TO as writeSettingsSection,Vw as writeStderr,Hw as writeStdout,Hv as writeVectorizationStatusLedger,vA as writeWorkspaceJsonWithHistory};
|
|
35
35
|
//# sourceMappingURL=sdk.js.map
|