@unbrained/pm-cli 2026.10.10 → 2026.10.11
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 -36
- package/CHANGELOG.md +13 -4
- package/dist/cli-bundle/bundle-manifest.json +1 -382
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk.js +9 -9
- package/dist/sdk/governance/artifact-ledgers.d.ts +59 -0
- package/dist/sdk/governance/artifact-ledgers.js +2 -0
- package/dist/sdk/governance.d.ts +1 -0
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/docs/RELEASE_LEDGER_RECONCILIATION.md +148 -0
- package/docs/RELEASE_RELIABILITY.md +4 -0
- package/docs/RELEASING.md +34 -5
- package/docs/agent-task-token-baseline.json +1 -292
- package/docs/agent-task-transcripts.json +1 -478
- package/docs/ecosystem-review-2026-09-28.json +1 -2866
- package/docs/examples/policy-restricted-extension/manifest.json +1 -22
- package/docs/examples/policy-restricted-extension/package.json +1 -8
- package/docs/examples/sdk-agent-environment/package.json +1 -8
- package/docs/examples/sdk-app-embedding/package.json +1 -9
- package/docs/examples/sdk-contract-consumer/package.json +1 -11
- package/docs/examples/sdk-custom-tool/package.json +1 -13
- package/docs/examples/starter-extension/manifest.json +1 -33
- package/docs/examples/starter-extension/package.json +1 -10
- package/docs/performance/corpus-shape-comparison.json +1 -108
- package/docs/performance/latest-scale-report.json +1 -418
- package/docs/performance/scale-100k-report.json +1 -418
- package/docs/schemas/extension-manifest.schema.json +1 -165
- package/marketplace.json +1 -36
- package/package.json +1 -1
- package/packages/pm-beads/extensions/beads/manifest.json +1 -28
- package/packages/pm-beads/extensions/beads/package.json +1 -3
- package/packages/pm-beads/package.json +1 -50
- package/packages/pm-calendar/extensions/calendar/manifest.json +1 -22
- package/packages/pm-calendar/extensions/calendar/package.json +1 -3
- package/packages/pm-calendar/package.json +1 -51
- package/packages/pm-command-kit/extensions/command-kit/manifest.json +1 -22
- package/packages/pm-command-kit/extensions/command-kit/package.json +1 -3
- package/packages/pm-command-kit/package.json +1 -53
- package/packages/pm-digital-twin/extensions/digital-twin/manifest.json +1 -19
- package/packages/pm-digital-twin/extensions/digital-twin/package.json +1 -3
- package/packages/pm-digital-twin/package.json +1 -58
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -19
- package/packages/pm-governance-audit/extensions/governance-audit/package.json +1 -3
- package/packages/pm-governance-audit/package.json +1 -55
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +1 -22
- package/packages/pm-guide-shell/extensions/guide-shell/package.json +1 -3
- package/packages/pm-guide-shell/package.json +1 -52
- package/packages/pm-kanban/extensions/kanban/manifest.json +1 -19
- package/packages/pm-kanban/extensions/kanban/package.json +1 -3
- package/packages/pm-kanban/package.json +1 -57
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +1 -19
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/package.json +1 -3
- package/packages/pm-lifecycle-hooks/package.json +1 -52
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +1 -29
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/package.json +1 -3
- package/packages/pm-linked-test-adapters/package.json +1 -53
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +1 -29
- package/packages/pm-search-advanced/extensions/search-advanced/package.json +1 -3
- package/packages/pm-search-advanced/package.json +1 -54
- package/packages/pm-templates/extensions/templates/manifest.json +1 -22
- package/packages/pm-templates/extensions/templates/package.json +1 -3
- package/packages/pm-templates/package.json +1 -50
- package/packages/pm-todos/extensions/todos/manifest.json +1 -29
- package/packages/pm-todos/extensions/todos/package.json +1 -3
- package/packages/pm-todos/package.json +1 -51
- package/packages/pm-vcs/extensions/vcs/manifest.json +1 -19
- package/packages/pm-vcs/extensions/vcs/package.json +1 -3
- package/packages/pm-vcs/package.json +1 -55
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -25
- package/plugins/pm-claude/.mcp.json +1 -8
- package/plugins/pm-claude/hooks/hooks.json +1 -17
- package/plugins/pm-claude/package.json +1 -9
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -45
- package/plugins/pm-codex/.mcp.json +1 -11
- package/plugins/pm-codex/mcp.json +1 -11
- package/plugins/pm-codex/package.json +1 -9
- package/plugins/pm-codex/plugin.json +1 -45
- package/runtime-dependencies.json +1 -512
package/dist/cli-bundle/sdk.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{A as jM,B as BM,C as qM,D as zM,E as VM,a as Hn,b as HS,c as KS,d as WS,e as XS,f as YS,g as eA,h as tA,i as Na,j as La,k as Da,m as $a,n as Fa,o as Ga,p as Ua,q as ja,r as Ba,s as qa,t as za,u as ed,v as td,w as rd,x as od,y as nd,z as UM}from"./chunks/chunk-BXSXT5Z6.js";import{A as k0,B as x0,C as N0,D as L0,E as D0,F as $0,G as F0,H as G0,I as U0,J as j0,K as B0,L as q0,M as z0,N as V0,O as H0,P as K0,Q as W0,R as X0,S as Y0,T as J0,U as Z0,V as Q0,W as ek,X as tk,Y as rk,a as s0,b as a0,c as d0,d as c0,e as l0,f as p0,g as u0,h as m0,i as f0,j as _0,k as h0,l as g0,m as y0,n as b0,o as C0,p as T0,q as S0,r as w0,s as E0,t as A0,u as v0,v as O0,w as R0,x as I0,y as P0,z as M0}from"./chunks/chunk-RUT3CCAG.js";import{a as xh}from"./chunks/chunk-ZWRLAOA4.js";import{a as HM,b as KM,c as WM,d as XM}from"./chunks/chunk-OBLO45UM.js";import{a as YM,b as JM,c as ZM,d as QM,e as e0,f as t0,g as r0,h as o0,i as n0,j as i0}from"./chunks/chunk-MEWBSWE3.js";import{$ as ym,$a as c_,$b as ch,A as om,Aa as Mf,Ab as D_,B as nm,Ba as kf,Bb as $_,C as im,Ca as xf,Cb as F_,D as Bt,Da as Nf,Db as G_,E as qt,Ea as Lf,Eb as U_,F as zt,Fa as Df,Fb as j_,G as Vt,Ga as $f,Gb as B_,H as Ht,Ha as Ff,Hb as q_,I as Kt,Ia as Gf,Ib as z_,J as Wt,Ja as Uf,Jb as V_,K as Xt,Ka as jf,Kb as H_,L as Yt,La as Bf,Lb as K_,M as Jt,Ma as qf,Mb as W_,N as Zt,Na as zf,Nb as X_,O as sm,Oa as Vf,Ob as Y_,P as am,Pa as Hf,Pb as J_,Q as dm,Qa as Kf,Qb as Z_,R as cm,Ra as Wf,Rb as Q_,S as lm,Sa as Qt,Sb as eh,T as We,Ta as _e,Tb as th,U as pm,Ua as r_,Ub as rh,V as um,Va as o_,Vb as oh,W as mm,Wa as n_,Wb as nh,X as fm,Xa as i_,Xb as ih,Y as _m,Ya as s_,Yb as sh,Z as hm,Za as a_,Zb as ah,_ as gm,_a as d_,_b as dh,a as US,aa as TM,ab as l_,ac as lh,b as jS,ba as SM,bb as p_,bc as ph,c as BS,ca as wM,cb as u_,cc as uh,d as qS,da as Mm,db as m_,dc as mh,e as zS,ea as km,eb as f_,ec as fh,f as VS,fa as xm,fb as __,fc as _h,g as xE,ga as bf,gb as h_,gc as hh,h as NE,ha as Cf,hb as g_,hc as gh,i as Hi,ia as kM,ib as y_,ic as yh,j as NR,ja as xM,jb as b_,jc as bh,k as LR,ka as NM,kb as C_,kc as Ch,l as DR,la as LM,lb as T_,lc as Th,m as $R,ma as DM,mb as S_,mc as Sh,n as FR,na as $M,nb as w_,nc as wh,o as GR,oa as FM,ob as E_,oc as Eh,p as fl,pa as GM,pb as A_,pc as Ah,q as zp,qa as Tf,qb as v_,qc as vh,r as Vp,ra as Sf,rb as O_,rc as Oh,s as Xp,sa as wf,sb as R_,sc as Rh,t as Yp,ta as Ef,tb as I_,tc as Ih,u as fu,ua as Af,ub as P_,uc as Ph,v as Tu,va as vf,vb as M_,vc as Mh,w as cP,wa as Of,wb as k_,wc as kh,x as Ke,xa as Rf,xb as x_,y as tm,ya as If,yb as N_,z as rm,za as Pf,zb as L_}from"./chunks/chunk-ESRACL6K.js";import{e as BR,f as qR,g as _l,h as hl,i as Gt}from"./chunks/chunk-K2UTE75T.js";import{A as sM,B as aM,C as dM,D as cM,E as lM,F as pM,G as uM,H as mM,I as fM,J as _M,K as hM,L as gM,M as yM,N as bM,O as CM,P as Tm,Q as Sm,R as wm,S as Em,T as Am,U as vm,V as Om,W as Rm,X as Im,Y as Pm,a as Li,b as Di,c as $i,d as Fi,e as HI,f as KI,g as WI,h as XI,i as YI,j as qp,k as JI,l as ZI,m as QI,n as eP,o as tP,q as Wp,r as bm,s as QP,t as eM,u as tM,v as rM,w as oM,x as nM,y as Cm,z as iM}from"./chunks/chunk-2JYTSTQP.js";import{$ as sR,$a as Al,$b as Lp,$c as Zu,A as LO,Ab as WR,Ac as tu,Ad as tf,B as DO,Bb as XR,Bc as ru,Bd as rf,C as $O,Cb as YR,Cc as ou,Cd as of,D as FO,Db as JR,Dc as nu,Dd as nf,E as GO,Eb as ZR,Ec as iu,Ed as sf,F as He,Fa as Zc,Fb as QR,Fc as su,Fd as af,G as UO,Ga as Qc,Gb as bI,Gc as au,Gd as df,H as xt,Ha as el,Hb as CI,Hc as du,Hd as cf,I as jO,Ia as tl,Ib as TI,Ic as cu,J as BO,Ja as rl,Jb as SI,Jc as lu,Jd as lf,K as qO,Kb as wI,Kc as pu,Kd as pf,L as zO,La as ol,Lb as EI,Lc as uu,Ld as uf,M as VO,Ma as nl,Mb as AI,Md as mf,N as HO,Na as il,Nb as MI,Nc as aP,Nd as ff,O as KO,Oa as sl,Ob as kI,Oc as dP,Od as _f,P as WO,Pa as UR,Pb as Rp,Pc as mu,Pd as hf,Q as XO,Qa as jR,Qb as Ip,Qc as Su,Qd as gf,R as YO,Ra as al,Rb as xI,Rd as yf,S as JO,Sa as dl,Sb as NI,Sd as Xf,T as ZO,Ta as cl,Tb as LI,Td as Yf,U as QO,Ua as ll,Ub as DI,Uc as wu,Ud as Jf,V as eR,Va as pl,Vb as $I,Vd as Zf,W as tR,Wa as ul,Wb as Pp,Wc as Eu,Wd as Qf,X as rR,Xa as ml,Xb as Mp,Xc as Wu,Xd as e_,Y as oR,Ya as Sl,Yb as kp,Yc as Xu,Yd as t_,Z as nR,Za as wl,Zb as xp,Zc as Yu,_ as iR,_a as El,_b as Np,_c as Ju,a as vO,aa as aR,ab as vl,ac as Dp,ad as Qu,b as Pt,ba as dR,bb as Ol,bc as $p,bd as em,c as OO,ca as cR,cb as Rl,cc as Fp,cd as Nm,d as ze,da as lR,db as Il,dc as Gp,dd as Lm,e as te,ea as pR,eb as Pl,ec as Up,ed as Dm,f as fc,fa as uR,fb as Ml,fc as jp,fd as $m,gb as kl,gc as FI,gd as Fm,hb as xl,hc as GI,hd as Gm,i as Ve,ib as Nl,ic as UI,id as Um,j as _c,jb as Ll,jc as jI,jd as jm,k as hc,kb as Dl,kc as BI,kd as Bm,lb as $l,lc as qI,ld as IM,m as fe,ma as Jc,mb as Fl,mc as zI,md as PM,n as gc,nb as Gl,nc as VI,nd as MM,o as yc,ob as VR,oc as Bp,od as qm,p as bc,pb as Ul,pc as rP,pd as zm,q as Cc,qb as jl,qc as oP,qd as Vm,r as RO,rb as Bl,rc as nP,rd as Hm,s as IO,sb as ql,sc as iP,sd as Km,t as PO,tb as HR,tc as sP,td as Wm,u as MO,ub as zl,uc as Hp,ud as Xm,v as kO,vb as Vl,vc as Kp,vd as Ym,w as Mt,wb as Hl,wc as Jp,wd as Jm,x as xO,xb as Kl,xc as Zp,xd as Zm,y as NO,yb as Wl,yc as Qp,yd as Qm,z as kt,zb as KR,zc as eu,zd as ef}from"./chunks/chunk-KNW3RSLS.js";import{$ as Nc,$a as zc,A as AR,B as vR,C as OR,D as Ac,E as vc,F as Oc,G as Rc,H as Ic,I as RR,J as Pc,K as Mc,Ka as Lt,L as kc,La as Dt,Ma as $t,Na as Ft,Oa as $c,Qa as Fc,Ra as Gc,Sa as Uc,U as IR,V as PR,X as MR,Xa as jc,Y as kR,Ya as Bc,Z as xR,_ as xc,_a as qc,a as GE,aa as Lc,ab as Vc,b as UE,ba as Dc,bb as Hc,c as jE,ca as Nt,cb as Kc,d as Ki,e as Wi,eb as Wc,f as Xi,fb as Xc,g as Yi,gb as Yc,h as Ji,j as Tc,k as Sc,m as wc,n as Ec,o as mR,p as fR,q as _R,r as hR,s as gR,t as yR,u as bR,v as CR,w as TR,x as SR,y as wR,z as ER}from"./chunks/chunk-SSY4OSJR.js";import{$ as fO,$a as Op,$b as yP,$c as ZP,Aa as ep,Ab as yI,Ac as VP,Ba as tp,Bc as HP,Ca as rp,Cb as vI,Cc as KP,Da as op,Db as OI,Dc as WP,Ea as np,Eb as RI,Ec as Ut,Fa as ip,Fb as II,Fc as Pu,G as iO,Ga as sp,Gb as PI,Gc as Mu,H as sO,Ha as ap,Hb as _u,Hc as ku,I as aO,Ia as dp,Ib as hu,Ic as xu,J as dO,Ja as cp,Jb as gu,Jc as Nu,K as cO,Ka as lp,Kb as yu,Kc as Lu,L as lO,La as pp,Lb as bu,Lc as Du,M as pO,Ma as up,Mb as Cu,Mc as $u,N as uO,Na as mp,Nb as Au,Nc as Fu,O as rc,Oa as fp,Ob as vu,Oc as Gu,P as oc,Pa as _p,Pb as Ou,Pc as Uu,Q as nc,Qa as hp,Qb as Ru,Qc as ju,R as ic,Ra as gp,Rb as lP,Rc as Bu,S as sc,Sa as yp,Sb as pP,Sc as qu,T as ac,Ta as bp,Tb as uP,Tc as zu,U as dc,Ua as Cp,Ub as mP,Uc as Vu,V as cc,Va as Tp,Vb as fP,Vc as jt,W as lc,Wa as Sp,Wb as _P,Wc as Hu,X as pc,Xa as wp,Xb as hP,Xc as XP,Y as uc,Ya as Ep,Yc as YP,Z as qe,Za as Ap,Zb as Iu,Zc as JP,_ as mO,_a as vp,_b as gP,_c as Ku,aa as _O,ac as bP,ad as EM,b as PE,ba as hO,bc as CP,bd as AM,c as ME,ca as gO,cc as TP,cd as vM,d as kE,da as yO,db as eI,dc as SP,dd as OM,e as LE,eb as tI,ec as wP,ed as RM,f as DE,fb as rI,fc as EP,g as $E,ga as bO,gb as oI,gc as AP,h as FE,ha as CO,hb as nI,hc as vP,i as qv,ia as TO,ib as iI,ic as OP,j as zv,ja as SO,jb as sI,jc as RP,k as Vv,ka as wO,kb as aI,kc as IP,l as Hv,la as EO,lb as dI,lc as PP,m as Kv,ma as AO,mb as cI,mc as MP,n as Wv,na as mc,nb as lI,nc as kP,o as Xv,oa as gl,ob as pI,oc as xP,p as Yv,pa as yl,pb as uI,pc as NP,q as Jv,qa as bl,qc as LP,r as Zv,ra as Cl,rc as DP,s as Qv,sa as zR,sc as $P,t as eO,tb as mI,tc as FP,u as tO,ua as Tl,uc as GP,v as rO,va as Xl,vb as fI,vc as UP,w as oO,wa as Yl,wb as _I,wc as jP,x as nO,xa as Jl,xc as BP,ya as Zl,yb as hI,yc as qP,za as Ql,zb as gI,zc as zP}from"./chunks/chunk-RBPOO46D.js";import{$ as Le,$a as Ko,$c as Ct,$d as fn,$e as sS,$f as nw,$g as _i,$i as EE,$j as ws,$k as wa,$l as vA,$m as sv,$n as Ad,Aa as zo,Ac as kC,Ad as gT,Ae as Gn,Af as ES,Ag as oi,Ah as vw,Ai as cE,Aj as QE,Ak as Ys,Al as sA,An as md,Ao as Ud,Ba as Vo,Bc as xC,Bd as yT,Be as Un,Bf as AS,Bg as ni,Bh as Ow,Bi as lE,Bj as Zi,Bk as Js,Bl as aA,Bn as fd,Bo as jd,Cc as NC,Cd as bT,Ce as jn,Cf as vS,Cg as _w,Ch as Rw,Cj as Qi,Ck as Zs,Cl as dA,Cm as qA,Cn as _d,Co as Bd,Dc as LC,Dd as CT,De as Bn,Df as OS,Dg as hw,Dh as Iw,Di as Gi,Dj as es,Dk as Qs,Dm as zA,Dn as hd,Do as qd,Ec as on,Ed as TT,Ee as qn,Ef as RS,Eh as Pw,Ei as Ui,Ej as ts,Ek as ea,El as cA,Em as VA,En as gd,Eo as zd,Fc as DC,Fd as ST,Fe as GT,Ff as IS,Fg as ii,Fh as Mw,Fi as ji,Fj as rs,Fk as ta,Fl as lA,Fm as HA,Fn as yd,Fo as Vd,G as jb,Gc as $C,Gd as wT,Ge as UT,Gf as PS,Gg as si,Gh as kw,Gj as os,Gk as ra,Gm as KA,Gn as bd,Go as Hd,Hb as uC,Hc as FC,Hd as ET,He as jT,Hf as MS,Hg as gw,Hh as xw,Hj as ns,Hk as oa,Hm as WA,Hn as Cd,Ho as Kd,Ic as GC,Id as AT,Ie as BT,If as kS,Ig as ai,Ih as Nw,Ii as pE,Ij as is,Ik as na,Il as id,Im as XA,In as wv,Io as Wd,J as Bb,Jb as mC,Jc as UC,Jd as vT,Je as qT,Jf as xS,Jg as di,Jh as Lw,Jj as ss,Jk as ia,Jl as pA,Jm as YA,Jn as Ev,Jo as Xd,Kb as fC,Kc as jC,Kd as OT,Ke as zT,Kf as NS,Kg as yw,Kh as Dw,Kj as as,Kk as sa,Kl as uA,Km as JA,Kn as Av,Ko as Yd,Lb as _C,Lc as BC,Le as VT,Lf as LS,Lg as ci,Lh as $w,Lj as ds,Lk as aa,Ll as mA,Lm as vt,Ln as vv,Lo as Jd,M as qb,Mb as hC,Mc as qC,Md as RT,Me as HT,Mf as DS,Mg as li,Mi as Bi,Mj as cs,Mk as da,Ml as fA,Mn as Ov,Mo as Zd,Nb as gC,Nc as nn,Nd as IT,Ne as KT,Nf as $S,Ng as D,Nh as Fw,Ni as Et,Nj as ls,Nk as ca,Nl as _A,Nm as ZA,Nn as Rv,No as Qd,Oc as zC,Od as PT,Oe as WT,Og as pi,Oh as ki,Oi as uE,Oj as ps,Ok as la,Ol as hA,On as Iv,Oo as ec,Pc as sn,Pd as MT,Pf as FS,Ph as xi,Pi as mE,Pj as us,Pk as pa,Pm as QA,Pn as Pv,Po as tc,Q as zb,Qa as rC,Qb as yC,Qd as kT,Qe as XT,Qf as GS,Qh as Gw,Qi as fE,Qj as ms,Qk as ua,Ql as gA,Qo as It,R as pe,Ra as oC,Rb as bC,Rc as VC,Rd as xT,Re as YT,Rf as Kn,Ri as _E,Rj as fs,Rk as ma,Rl as yA,S as Vb,Sa as nC,Sc as HC,Sd as NT,Se as JT,Sf as Wn,Si as hE,Sk as fa,Sl as bA,T as b,Tc as KC,Td as LT,Te as ZT,Tf as Xn,Ti as gE,Tj as _s,Tk as _a,Tl as CA,Tm as ev,Tn as Rt,Ub as I,Uc as WC,Ud as DT,Ue as QT,Uf as JS,Ui as yE,Uj as hs,Uk as ha,Um as tv,Un as Mv,V as Do,Va as Ho,Vb as CC,Vc as XC,Vd as $T,Ve as eS,Vf as ZS,Vg as bw,Vh as Uw,Vi as bE,Vj as gs,Vk as ga,Vl as TA,Vm as rv,Vn as kv,W as yt,Wa as iC,Wb as bt,Wd as FT,We as tS,Wf as QS,Wg as Cw,Wh as jw,Wi as CE,Wj as ys,Wk as ya,Wl as SA,Wm as sd,Wn as xv,X as ue,Xa as sC,Xb as TC,Xd as ln,Xe as rS,Xf as ew,Xg as Tw,Xh as Bw,Xj as bs,Xk as ba,Xm as ov,Xn as Td,Y as $o,Ya as aC,Yd as pn,Ye as oS,Yf as tw,Yg as ui,Yh as qw,Yi as TE,Yj as Cs,Yk as Ca,Yl as wA,Yn as Sd,Za as dC,Zb as SC,Zd as un,Ze as nS,Zf as rw,Zg as mi,Zh as zw,Zi as SE,Zj as Ts,Zk as Ta,Zl as EA,Zm as nv,Zn as wd,_d as mn,_e as iS,_f as ow,_g as fi,_h as Vw,_i as wE,_j as Ss,_k as Sa,_l as AA,_m as iv,_n as Ed,aa as Fo,ab as Wo,ad as Tt,ae as _n,af as aS,ag as iw,ah as hi,ai as Hw,aj as qi,ak as Es,al as Ea,am as OA,an as av,ao as vd,b as Oo,bb as De,bd as an,be as hn,bf as dS,bg as sw,bh as gi,bj as zi,bk as As,bl as Aa,bm as RA,bn as dv,bo as Od,c as Ro,ca as Hb,cb as cC,cd as dn,ce as $e,cf as cS,cg as aw,ch as yi,ci as Kw,ck as vs,cl as va,cm as IA,cn as cv,co as Rd,d as Io,da as Kb,db as lC,dd as cn,de as Fe,df as St,dg as dw,dh as bi,di as Ww,dj as Vi,dk as Os,dl as Oa,dm as PA,dn as lv,do as Id,e as Po,ea as Wb,eb as Xo,ee as gn,eg as cw,eh as Ci,ei as Xw,ej as AE,ek as Rs,el as Ra,em as MA,en as pv,eo as Pd,f as ke,fa as Xb,fb as Yo,fd as YC,fe as yn,ff as wt,fh as Ti,fi as Yw,fk as Is,fl as Ia,fn as uv,fo as Md,g as Mo,ga as Yb,gd as JC,ge as bn,gf as zn,gh as Si,gi as Jw,gj as vE,gk as Ps,gl as Pa,gm as kA,gn as mv,go as kd,h as L,ha as Jb,hb as Jo,hd as ZC,he as Cn,hf as Vn,hh as wi,hi as Zw,hj as OE,hk as Ms,hl as Ma,hm as xA,hn as Ot,ho as xd,i as xe,id as QC,ie as Tn,if as me,ih as Ei,ii as Qw,ij as RE,ik as ks,il as ka,im as NA,in as fv,io as Nd,j as ko,ja as Zb,jc as wC,jd as eT,je as Sn,jh as Ai,ji as eE,jk as xs,jm as LA,jo as Ld,k as xo,ka as Qb,kc as EC,kd as tT,ke as wn,kf as lS,kg as lw,kh as vi,ki as tE,kj as IE,kk as Ns,kl as Be,km as DA,ko as Dd,l as No,lc as AC,ld as rT,le as En,lh as Sw,lk as Ls,ll as ee,ln as _v,lo as $d,m as Lo,md as oT,me as An,mf as pS,mh as ww,mj as BE,mk as Ds,ml as xa,mm as $A,mn as hv,mo as Fd,n as kb,na as eC,nc as vC,nd as nT,ne as vn,nf as Ge,ng as Yn,nh as Oi,nj as qE,nk as $s,nl as Va,nn as gv,o as Ne,oc as OC,od as iT,oe as On,of as uS,og as pw,oh as Ew,oi as rE,oj as zE,ok as Fs,ol as Ha,om as FA,on as yv,oo as Nv,p as gt,pd as sT,pe as Rn,pf as mS,pg as Jn,ph as Ri,pj as Ue,pk as Gs,pl as Ka,pm as GA,pn as bv,po as Lv,q as xb,qa as tC,qc as RC,qd as aT,qe as In,qf as fS,qh as Ii,qi as oE,qj as VE,qk as Us,ql as Wa,qm as UA,qn as Cv,r as Nb,ra as Go,rc as en,rd as dT,re as Pn,rf as _S,rg as uw,rh as Pi,rj as HE,rk as js,rl as Xa,rm as jA,rn as Tv,s as Lb,sa as Uo,sd as cT,se as Mn,sf as hS,sh as Mi,sj as KE,sk as Bs,sl as Ya,sm as BA,sn as Sv,so as Dv,t as Db,ta as jo,tc as tn,td as lT,te as kn,tf as gS,tg as mw,ti as nE,tj as At,tk as qs,tl as Ja,tn as ad,to as $v,u as z,ub as Zo,uc as rn,ud as pT,ue as xn,uf as yS,ug as fw,ui as Ni,uj as je,uk as zs,ul as Za,un as dd,uo as Fv,v as $b,vb as Qo,vd as uT,ve as Nn,vf as bS,vg as Zn,vi as iE,vj as WE,vk as Vs,vl as Qa,vn as cd,vo as Gv,wb as pC,wd as mT,we as Ln,wf as CS,wg as Qn,wj as XE,wk as Hs,wl as rA,wn as ld,wo as Uv,x as Fb,xa as Bo,xc as IC,xd as fT,xe as Dn,xf as TS,xg as ei,xi as sE,xj as YE,xk as Ks,xl as oA,xn as pd,xo as jv,y as Gb,yc as PC,yd as _T,ye as $n,yf as SS,yg as ti,yi as aE,yj as JE,yk as Ws,yl as nA,yn as ud,yo as Bv,z as Ub,za as qo,zc as MC,zd as hT,ze as Fn,zf as wS,zg as ri,zh as Aw,zi as dE,zj as ZE,zk as Xs,zl as iA,zo as Gd}from"./chunks/chunk-YMLF6QT7.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 V="2026-07-28",ok=["2025-11-25","2025-06-18"],Xe=[V],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},E={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},er=["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 _(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Nh(e){if(e===void 0)return;if(!_(e))throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:E.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:E.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 Lh(e){if(e!==void 0){if(typeof e!="string"||!er.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:E.logLevel,allowed:[...er]});return e}}function Ye(e){let t=_(e)?e._meta:void 0;if(!_(t))throw new u("Missing required MCP request metadata",m.invalidParams,{required:[E.protocolVersion,E.clientCapabilities]});let r=t[E.protocolVersion];if(typeof r!="string"||!Xe.includes(r))throw new u("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...Xe],requested:typeof r=="string"?r:null});let o=t[E.clientCapabilities];if(!_(o))throw new u("Invalid MCP client capabilities metadata",m.invalidParams,{field:E.clientCapabilities,expected:"object"});let n=Nh(t[E.clientInfo]),s=Lh(t[E.logLevel]);return{protocolVersion:V,clientCapabilities:o,...n?{clientInfo:n}:{},...s?{logLevel:s}:{}}}function nk(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 ik(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 sk(e,t){let r=e.clientCapabilities.extensions;return _(r)&&_(r[t])}function Je(e,t){let r=_(e._meta)?e._meta:{};return{...e,_meta:{...r,[E.serverInfo]:{...t}}}}function Dh(e,t){return Je({...e,resultType:"complete"},t)}function ak(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 Dh({supportedVersions:[...Xe],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function dk(e,t){if(_(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"})}import{createHash as or,createHmac as nr,timingSafeEqual as $h}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 Fh=["elicitation/create","roots/list","sampling/createMessage"],tr=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},ir=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,he=32,Qe=64*1024,ge=16*1024,Ze={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function Gh(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function ye(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 et(e,t){if(!_(e))throw new u("Invalid MCP inputRequests",m.invalidParams,{field:"inputRequests",expected:"object"});let r=Object.entries(e);if(r.length===0||r.length>he)throw new u("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:he,observed:r.length});let o={};for(let[n,s]of r){if(!ir.test(n)||!_(s))throw new u("Invalid MCP input request entry",m.invalidParams,{field:`inputRequests.${n}`});let i=s.method;if(typeof i!="string"||!Fh.includes(i))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:i??null});let a=Gh(i);if(!Object.prototype.hasOwnProperty.call(t.clientCapabilities,a))throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:{[a]:{}}});if(!_(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 ye(o,Qe,"inputRequests"),o}function sr(e){if(!_(e))throw new u("Invalid MCP inputResponses",m.invalidParams,{field:"inputResponses",expected:"object"});let t=Object.entries(e);if(t.length>he)throw new u("Invalid MCP inputResponses count",m.invalidParams,{maximum:he,observed:t.length});let r={};for(let[o,n]of t){if(!ir.test(o)||!_(n))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return ye(r,Qe,"inputResponses"),r}function uk(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>ge)throw new u("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:ge});let r=e.inputRequests===void 0?void 0:et(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:{[E.serverInfo]:{...e.serverInfo}}}}function ar(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 mk(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>ge/2)throw new u("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:ge/2});let o=r.toString("base64url"),n=nr("sha256",ar(t)).update(o).digest("base64url");return`${o}.${n}`}function Uh(e){if(!_(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 fk(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=nr("sha256",ar(t)).update(o).digest();if(i.byteLength!==a.byteLength||!$h(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=Uh(d),{expiresAt:l,method:p,parameterDigest:f,principal:h}=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||h!==r.principal)throw new u("MCP requestState binding mismatch",m.invalidParams,{field:"requestState"});return c}function _k(e){return ye(e,Qe,"request parameters"),or("sha256").update(JSON.stringify(e)).digest("hex")}var rr=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=or("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 jh(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 hk(e,t){return{...e,...jh(t)}}function Bh(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function qh(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(Bh)){if(!_(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function zh(e){let t=e.maxBytes??Ze.maxBytes,r=e.maxDepth??Ze.maxDepth,o=e.maxNodes??Ze.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 Vh(e,t){let r=Array.isArray(e.value)?e.value:_(e.value)?Object.values(e.value):[];for(let o of r)t.push({value:o,depth:e.depth+1})}function Hh(e,t){if(!_(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&qh(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function gk(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=zh(t);if(typeof e!="boolean"&&!_(e))throw new u("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});ye(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});Hh(e,a.value),Vh(a,s)}return structuredClone(e)}import{randomUUID as Kh}from"node:crypto";import{readFile as Wh}from"node:fs/promises";import dr 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 Ak="io.modelcontextprotocol/tasks",Xh=["working","input_required","completed","failed","cancelled"],Yh=/^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,Jh=3600*1e3,Zh=1e3,Ce=1024,Qh=30,eg=2e3;function tt(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function be(e){let t=e.trim();if(!Yh.test(t))throw tt("Unknown MCP task");return t}function cr(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 lr(e){if(!_(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,Ce),..._(e.data)?{data:structuredClone(e.data)}:{}}}function tg(e){if(!Xh.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function rg(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function og(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function ng(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function ig(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 sg(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function ag(e){if(!_(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?be(e.taskId):"",r=tg(e.status),o=rg(e.principal),n=og(e.workerPid),s=ng(e.ttlMs),i=ig(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:cr(e.createdAt,"createdAt"),lastUpdatedAt:cr(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:s,consumedInputKeys:sg(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,Ce)}:{},...typeof i=="number"?{pollIntervalMs:i}:{}};if(_(e.inputRequests)&&(a.inputRequests=structuredClone(e.inputRequests)),_(e.inputResponses)&&(a.inputResponses=structuredClone(e.inputResponses)),_(e.result)&&(a.result=structuredClone(e.result)),e.error!==void 0&&(a.error=lr(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 H(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 re(e){return e==="completed"||e==="failed"||e==="cancelled"}function dg(e){try{return process.kill(e,0),!0}catch(t){return!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ESRCH")}}var rt=class{#e;#t;#r;#o;#i;constructor(t){this.#e=dr.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Kh()}`),this.#i=t.workerPid??process.pid}#s(t){return dr.join(this.#e,"runtime","mcp-tasks","records",`${be(t)}.json`)}async#d(t){try{return ag(JSON.parse(await Wh(this.#s(t),"utf8")))}catch(r){throw ue(r)||r instanceof SyntaxError?tt("Unknown MCP task"):r}}async#a(t){await Le(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
|
|
2
|
-
`)}async#n(t,r,o){let n=be(t),s=await Ge(this.#e,n,Qh,this.#t,!1,!1,eg);try{let i=await this.#d(n);if(i.principal!==r)throw tt("Unknown MCP task");let a=o(i);return await this.#a(a),a}finally{await s()}}async create(t){let r=be(this.#o()),o=t.principal.trim(),n=t.ttlMs===void 0?Jh:t.ttlMs,s=t.pollIntervalMs??Zh;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,Ce)}:{}};return await this.#a(a),{...H(a),resultType:"task"}}async get(t,r){return H(await this.#n(t,r,o=>{if(re(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&&!dg(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=et(t.inputRequests,t.requestContext);return H(await this.#n(t.taskId,t.principal,o=>{if(re(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,Ce),lastUpdatedAt:this.#r().toISOString(),inputRequests:r}}))}async update(t,r,o){let n=sr(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 H(await this.#n(t,r,n=>re(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=lr(o);return H(await this.#n(t,r,s=>re(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 H(await this.#n(t,r,o=>re(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 vk(e){return new rt(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 Te="io.modelcontextprotocol/subscriptionId",pr=256,ur=2048,cg=5e3;function lg(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),cg);n.unref(),Promise.resolve().then(()=>e(t)).then(()=>{clearTimeout(n),r()},s=>{clearTimeout(n),o(s instanceof Error?s:new Error(String(s)))})})}function ot(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 pg(e){if(!_(e))throw new u("Invalid MCP subscription filter",m.invalidParams,{field:"notifications",expected:"object"});let t=ot(e.toolsListChanged,"toolsListChanged"),r=ot(e.promptsListChanged,"promptsListChanged"),o=ot(e.resourcesListChanged,"resourcesListChanged"),n;if(e.resourceSubscriptions!==void 0){if(!Array.isArray(e.resourceSubscriptions)||e.resourceSubscriptions.length>pr)throw new u("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:pr});let s=new Set;for(let i of e.resourceSubscriptions){if(typeof i!="string"||i.trim().length===0||Buffer.byteLength(i,"utf8")>ur)throw new u("Invalid MCP resource subscription URI",m.invalidParams,{field:"notifications.resourceSubscriptions",maximumBytes:ur});s.add(i)}s.size>0&&(n=[...s].sort())}return{...t?{toolsListChanged:t}:{},...r?{promptsListChanged:r}:{},...o?{resourcesListChanged:o}:{},...n?{resourceSubscriptions:n}:{}}}function ug(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 mr=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=ug(pg(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:{[Te]: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:{[Te]: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:{[Te]: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 lg(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{...Je({resultType:"complete",_meta:{[Te]: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 fr=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,mg=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,_r=/^[\t\x20-\x7E]*$/u,hr=new Set(["prompts/get","resources/read","tools/call"]);function fg(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 gr(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&_r.test(t)&&!fr.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function yr(e,t){let r=fr.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||!_r.test(e)?A("Malformed MCP header value",t):e}function Se(e){return Array.isArray(e)?e.some(Se):_(e)?Object.prototype.hasOwnProperty.call(e,"x-mcp-header")||Object.values(e).some(Se):!1}function _g(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!mg.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 br(e){if(!_(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(!_(i))throw new u("Invalid MCP tool schema properties",m.invalidParams,{field:"inputSchema.properties"});for(let[a,d]of Object.entries(i)){if(!_(d))continue;let c=[...s,a],l=_g(d,c,r);l&&t.push(l);for(let[p,f]of Object.entries(d))if(p!=="properties"&&p!=="x-mcp-header"&&Se(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"&&Se(s))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:"inputSchema",keyword:n});return o(e,[]),t}function Cr(e,t){let r=e;for(let o of t){if(!_(r))return;r=r[o]}return r}function Tr(e,t){let r=e==="resources/read"?t.uri:t.name;return typeof r=="string"?r:void 0}function hg(e,t){let r=_(e.arguments)?e.arguments:{},o={};for(let n of br(t)){let s=Cr(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}`]=gr(s)}}return o}function Mk(e){let t=_(e.request.params)?e.request.params:void 0,r=Ye(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=Tr(o,t);if(hr.has(o)){if(s===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=gr(s)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,hg(t,e.toolSchema)),n}function gg(e,t){let r=t.method;(typeof r!="string"||r.length===0)&&A("Missing MCP request method","Mcp-Method");let o=_(t.params)?t.params:void 0,n=Ye(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"),hr.has(r)){let s=e.get("mcp-name"),i=Tr(r,o);(s===void 0||i===void 0||yr(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 yg(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 bg(e){let t=_(e.params.arguments)?e.params.arguments:{};for(let r of br(e.toolSchema)){let o=Cr(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),yg(r,o,yr(s,n))||A("MCP parameter header does not match request body",n)}}function kk(e){let t=fg(e.headers),r=typeof e.request.method=="string"?e.request.method:"";gg(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&bg({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var xk=V;import{AsyncLocalStorage as Cg}from"node:async_hooks";import{createHash as Sr,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]="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}},Sg=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,wg=/^[a-z][a-z0-9_*/-]{0,255}$/u,Eg=/^(?:[a-z0-9][a-z0-9_*/-]{0,240})@[a-z][a-z0-9_*/-]{0,13}$/u,Ag=/^[\x20-\x2B\x2D-\x3C\x3E-\x7E]{0,255}[\x21-\x2B\x2D-\x3C\x3E-\x7E]$/u,Er=/^[\x21\x23-\x5B\x5D-\x7E]+$/u,Ar=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,vg=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,Og=/%(?![0-9A-Fa-f]{2})/u,Rg=512,Ig=32,Pg=180,Mg=8192,kg=8192,vr=new Cg;function w(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 xg(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 Fk(e){let t=w(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=>w(n,"authorization server issuer").href.replace(/\/$/u,"")),o=[...new Set(e.scopes??[])];if(o.some(n=>!Er.test(n)))throw new y("Invalid authorization scope",401);return{resource:t,authorization_servers:r,...o.length>0?{scopes_supported:o.sort()}:{}}}function Gk(e){let t=w(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 Uk(e,t){if(!_(e)||typeof e.issuer!="string")throw new y("Invalid authorization server metadata",401);let r=w(t,"expected issuer").href.replace(/\/$/u,"");if(w(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 w(c,d).href},n=d=>{let c=e[d];return typeof c=="string"?w(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 jk(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 Bk(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 qk(e,t){let r=w(t,"client metadata document URL");if(r.pathname==="/"||!_(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);w(o,"client redirect URI",!0)}return structuredClone(e)}function zk(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=>w(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 wr=class{#e=new Map;set(t,r){let o=w(t,"credential issuer").href;this.#e.set(o,structuredClone(r))}get(t){let r=w(t,"credential issuer").href,o=this.#e.get(r);return o?structuredClone(o):void 0}delete(t){let r=w(t,"credential issuer").href;return this.#e.delete(r)}};function Ng(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?Sg.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"||!Dg(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 Lg(e){return wg.test(e)||Eg.test(e)}function Dg(e){if(Buffer.byteLength(e,"utf8")>Rg)return!1;let t=e.split(",");if(t.length>Ig)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(!Lg(i)||!Ag.test(a)||r.has(i))return!1;r.add(i)}return!0}function Or(e){return vg.test(e)&&!Og.test(e)}function $g(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 Ar.test(o)&&(n===void 0||Or(n))}function Fg(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(!(!Ar.test(i)||!Or(a)||!n.every($g)))return{key:i,serialized:t}}function Gg(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>Mg)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>Pg)throw new y("Invalid MCP baggage",403);let n=[];for(let s of o){let i=Fg(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 Vk(e,t={}){let r=_(e)&&_(e._meta)?e._meta:{},o=Gg(r.baggage,t.baggageAllowlist??[]);return{...Ng(r),...o?{baggage:o}:{}}}function Hk(e,t){return vr.run(structuredClone(e),t)}function Kk(){let e=vr.getStore();return e?{...e}:void 0}async function Wk(e){let t=w(e.policy.resourceMetadataUrl,"protected resource metadata URL",!0).href,r=[...new Set(e.policy.requiredScopes??[])];if(r.some(c=>!Er.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=xg(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")>kg)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 Xk(e){let t=Sr("sha256").update(e.token).digest();return r=>{let o=Sr("sha256").update(r).digest();if(!Tg(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 nt="io.modelcontextprotocol/ui",we="2026-01-26",Pr="text/html;profile=mcp-app",Rr=Object.freeze({specVersion:we,mimeTypes:[Pr]});function Zk(e){let t=e.clientCapabilities.extensions;if(!_(t))return!1;let r=t[nt];if(r===void 0)return!1;if(!_(r))throw new u("Invalid MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[nt]:Rr}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(Pr)||n!==void 0&&n!==we)throw new u("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[nt]:Rr}}});return!0}var Ug={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},Mr=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:Ug})));function Qk(e){return Mr.find(t=>t.uri===e)}function ex(e){let t=new Map(Mr.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 Ir(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function tx(e){let t=Ir(e.name),r=Ir(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:we}),n=JSON.stringify(we);return`<!doctype html>
|
|
1
|
+
import{A as zP,B as VP,C as HP,D as KP,E as WP,a as Kn,b as Xw,c as Yw,d as Jw,e as Zw,f as Qw,g as oA,h as nA,i as La,j as Da,k as $a,m as Fa,n as Ga,o as Ua,p as ja,q as Ba,r as qa,s as za,t as Va,u as td,v as rd,w as od,x as nd,y as id,z as qP}from"./chunks/chunk-BXSXT5Z6.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 V0,L as H0,M as K0,N as W0,O as X0,P as Y0,Q as J0,R as Z0,S as Q0,T as ek,U as tk,V as rk,W as ok,X as nk,Y as ik,a as c0,b as l0,c as p0,d as u0,e as m0,f as f0,g as _0,h as h0,i as g0,j as y0,k as b0,l as T0,m as C0,n as w0,o as S0,p as E0,q as A0,r as v0,s as O0,t as I0,u as R0,v as M0,w as P0,x as k0,y as x0,z as N0}from"./chunks/chunk-RUT3CCAG.js";import{a as Nh}from"./chunks/chunk-ZWRLAOA4.js";import{a as XP,b as YP,c as JP,d as ZP}from"./chunks/chunk-OBLO45UM.js";import{a as QP,b as e0,c as t0,d as r0,e as o0,f as n0,g as i0,h as s0,i as a0,j as d0}from"./chunks/chunk-MEWBSWE3.js";import{$ as bm,$a as l_,$b as lh,A as nm,Aa as kf,Ab as $_,B as im,Ba as xf,Bb as F_,C as sm,Ca as Nf,Cb as G_,D as qt,Da as Lf,Db as U_,E as zt,Ea as Df,Eb as j_,F as Vt,Fa as $f,Fb as B_,G as Ht,Ga as Ff,Gb as q_,H as Kt,Ha as Gf,Hb as z_,I as Wt,Ia as Uf,Ib as V_,J as Xt,Ja as jf,Jb as H_,K as Yt,Ka as Bf,Kb as K_,L as Jt,La as qf,Lb as W_,M as Zt,Ma as zf,Mb as X_,N as Qt,Na as Vf,Nb as Y_,O as am,Oa as Hf,Ob as J_,P as dm,Pa as Kf,Pb as Z_,Q as cm,Qa as Wf,Qb as Q_,R as lm,Ra as Xf,Rb as eh,S as pm,Sa as er,Sb as th,T as Xe,Ta as he,Tb as rh,U as um,Ua as o_,Ub as oh,V as mm,Va as n_,Vb as nh,W as fm,Wa as i_,Wb as ih,X as _m,Xa as s_,Xb as sh,Y as hm,Ya as a_,Yb as ah,Z as gm,Za as d_,Zb as dh,_ as ym,_a as c_,_b as ch,a as qw,aa as EP,ab as p_,ac as ph,b as zw,ba as AP,bb as u_,bc as uh,c as Vw,ca as vP,cb as m_,cc as mh,d as Hw,da as km,db as f_,dc as fh,e as Kw,ea as xm,eb as __,ec as _h,f as Ww,fa as Nm,fb as h_,fc as hh,g as DE,ga as Tf,gb as g_,gc as gh,h as $E,ha as Cf,hb as y_,hc as yh,i as Ki,ia as LP,ib as b_,ic as bh,j as $I,ja as DP,jb as T_,jc as Th,k as FI,ka as $P,kb as C_,kc as Ch,l as GI,la as FP,lb as w_,lc as wh,m as UI,ma as GP,mb as S_,mc as Sh,n as jI,na as UP,nb as E_,nc as Eh,o as BI,oa as jP,ob as A_,oc as Ah,p as _l,pa as BP,pb as v_,pc as vh,q as Vp,qa as wf,qb as O_,qc as Oh,r as Hp,ra as Sf,rb as I_,rc as Ih,s as Yp,sa as Ef,sb as R_,sc as Rh,t as Jp,ta as Af,tb as M_,tc as Mh,u as _u,ua as vf,ub as P_,uc as Ph,v as wu,va as Of,vb as k_,vc as kh,w as uM,wa as If,wb as x_,wc as xh,x as We,xa as Rf,xb as N_,y as rm,ya as Mf,yb as L_,z as om,za as Pf,zb as D_}from"./chunks/chunk-ESRACL6K.js";import{e as VI,f as HI,g as hl,h as gl,i as Ut}from"./chunks/chunk-K2UTE75T.js";import{A as cP,B as lP,C as pP,D as uP,E as mP,F as fP,G as _P,H as hP,I as gP,J as yP,K as bP,L as TP,M as CP,N as wP,O as SP,P as wm,Q as Sm,R as Em,S as Am,T as vm,U as Om,V as Im,W as Rm,X as Mm,Y as Pm,a as Di,b as $i,c as Fi,d as Gi,e as XR,f as YR,g as JR,h as ZR,i as QR,j as zp,k as eM,l as tM,m as rM,n as oM,o as nM,q as Xp,r as Tm,s as rP,t as oP,u as nP,v as iP,w as sP,x as aP,y as Cm,z as dP}from"./chunks/chunk-2JYTSTQP.js";import{$ as cI,$a as vl,$b as Dp,$c as Qu,A as FO,Ab as JI,Ac as ru,Ad as rf,B as GO,Bb as ZI,Bc as ou,Bd as of,C as UO,Cb as QI,Cc as nu,Cd as nf,D as jO,Db as eR,Dc as iu,Dd as sf,E as BO,Eb as tR,Ec as su,Ed as af,F as Ke,Fa as Qc,Fb as rR,Fc as au,Fd as df,G as qO,Ga as el,Gb as wR,Gc as du,Gd as cf,H as Nt,Ha as tl,Hb as SR,Hc as cu,Hd as lf,I as zO,Ia as rl,Ib as ER,Ic as lu,J as VO,Ja as ol,Jb as AR,Jc as pu,Jd as pf,K as HO,Kb as vR,Kc as uu,Kd as uf,L as KO,La as nl,Lb as OR,Lc as mu,Ld as mf,M as WO,Ma as il,Mb as IR,Md as ff,N as XO,Na as sl,Nb as NR,Nc as lM,Nd as _f,O as YO,Oa as al,Ob as LR,Oc as pM,Od as hf,P as JO,Pa as qI,Pb as Rp,Pc as fu,Pd as gf,Q as ZO,Qa as zI,Qb as Mp,Qc as Su,Qd as yf,R as QO,Ra as dl,Rb as DR,Rd as bf,S as eI,Sa as cl,Sb as $R,Sd as Yf,T as tI,Ta as ll,Tb as FR,Td as Jf,U as rI,Ua as pl,Ub as GR,Uc as Eu,Ud as Zf,V as oI,Va as ul,Vb as UR,Vd as Qf,W as nI,Wa as ml,Wb as Pp,Wc as Au,Wd as e_,X as iI,Xa as fl,Xb as kp,Xc as Xu,Xd as t_,Y as sI,Ya as Sl,Yb as xp,Yc as Yu,Yd as r_,Z as aI,Za as El,Zb as Np,Zc as Ju,_ as dI,_a as Al,_b as Lp,_c as Zu,a as RO,aa as lI,ab as Ol,ac as $p,ad as em,b as Pt,ba as pI,bb as Il,bc as Fp,bd as tm,c as MO,ca as uI,cb as Rl,cc as Gp,cd as Lm,d as Ve,da as mI,db as Ml,dc as Up,dd as Dm,e as te,ea as fI,eb as Pl,ec as jp,ed as $m,f as _c,fa as _I,fb as kl,fc as Bp,fd as Fm,gb as xl,gc as jR,gd as Gm,hb as Nl,hc as BR,hd as Um,i as He,ib as Ll,ic as qR,id as jm,j as hc,jb as Dl,jc as zR,jd as Bm,k as gc,kb as $l,kc as VR,kd as qm,lb as Fl,lc as HR,ld as kP,m as _e,ma as Zc,mb as Gl,mc as KR,md as xP,n as yc,nb as Ul,nc as WR,nd as NP,o as bc,ob as WI,oc as qp,od as zm,p as Tc,pb as jl,pc as iM,pd as Vm,q as Cc,qb as Bl,qc as sM,qd as Hm,r as PO,rb as ql,rc as aM,rd as Km,s as kO,sb as zl,sc as dM,sd as Wm,t as xO,tb as XI,tc as cM,td as Xm,u as NO,ub as Vl,uc as Kp,ud as Ym,v as LO,vb as Hl,vc as Wp,vd as Jm,w as kt,wb as Kl,wc as Zp,wd as Zm,x as DO,xb as Wl,xc as Qp,xd as Qm,y as $O,yb as Xl,yc as eu,yd as ef,z as xt,zb as YI,zc as tu,zd as tf}from"./chunks/chunk-KNW3RSLS.js";import{$ as Lc,$a as Vc,A as II,B as RI,C as MI,D as vc,E as Oc,F as Ic,G as Rc,H as Mc,I as PI,J as Pc,K as kc,Ka as Dt,L as xc,La as $t,Ma as Ft,Na as Gt,Oa as Fc,Qa as Gc,Ra as Uc,Sa as jc,U as kI,V as xI,X as NI,Xa as Bc,Y as LI,Ya as qc,Z as DI,_ as Nc,_a as zc,a as BE,aa as Dc,ab as Hc,b as qE,ba as $c,bb as Kc,c as zE,ca as Lt,cb as Wc,d as Wi,e as Xi,eb as Xc,f as Yi,fb as Yc,g as Ji,gb as Jc,h as Zi,j as wc,k as Sc,m as Ec,n as Ac,o as hI,p as gI,q as yI,r as bI,s as TI,t as CI,u as wI,v as SI,w as EI,x as AI,y as vI,z as OI}from"./chunks/chunk-SSY4OSJR.js";import{$ as gO,$a as Ip,$b as CM,$c as tP,Aa as tp,Ab as CR,Ac as WM,Ba as rp,Bc as XM,Ca as op,Cb as RR,Cc as YM,Da as np,Db as MR,Dc as JM,Ea as ip,Eb as PR,Ec as jt,Fa as sp,Fb as kR,Fc as Pu,G as dO,Ga as ap,Gb as xR,Gc as ku,H as cO,Ha as dp,Hb as hu,Hc as xu,I as lO,Ia as cp,Ib as gu,Ic as Nu,J as pO,Ja as lp,Jb as yu,Jc as Lu,K as uO,Ka as pp,Kb as bu,Kc as Du,L as mO,La as up,Lb as Tu,Lc as $u,M as fO,Ma as mp,Mb as Cu,Mc as Fu,N as _O,Na as fp,Nb as vu,Nc as Gu,O as oc,Oa as _p,Ob as Ou,Oc as Uu,P as nc,Pa as hp,Pb as Iu,Pc as ju,Q as ic,Qa as gp,Qb as Ru,Qc as Bu,R as sc,Ra as yp,Rb as mM,Rc as qu,S as ac,Sa as bp,Sb as fM,Sc as zu,T as dc,Ta as Tp,Tb as _M,Tc as Vu,U as cc,Ua as Cp,Ub as hM,Uc as Hu,V as lc,Va as wp,Vb as gM,Vc as Bt,W as pc,Wa as Sp,Wb as yM,Wc as Ku,X as uc,Xa as Ep,Xb as bM,Xc as ZM,Y as mc,Ya as Ap,Yc as QM,Z as ze,Za as vp,Zb as Mu,Zc as eP,_ as hO,_a as Op,_b as TM,_c as Wu,aa as yO,ac as wM,ad as OP,b as xE,ba as bO,bc as SM,bd as IP,c as NE,ca as TO,cc as EM,cd as RP,d as LE,da as CO,db as oR,dc as AM,dd as MP,e as FE,eb as nR,ec as vM,ed as PP,f as GE,fb as iR,fc as OM,g as UE,ga as wO,gb as sR,gc as IM,h as jE,ha as SO,hb as aR,hc as RM,i as Hv,ia as EO,ib as dR,ic as MM,j as Kv,ja as AO,jb as cR,jc as PM,k as Wv,ka as vO,kb as lR,kc as kM,l as Xv,la as OO,lb as pR,lc as xM,m as Yv,ma as IO,mb as uR,mc as NM,n as Jv,na as fc,nb as mR,nc as LM,o as Zv,oa as yl,ob as fR,oc as DM,p as Qv,pa as bl,pb as _R,pc as $M,q as eO,qa as Tl,qc as FM,r as tO,ra as Cl,rc as GM,s as rO,sa as KI,sc as UM,t as oO,tb as hR,tc as jM,u as nO,ua as wl,uc as BM,v as iO,va as Yl,vb as gR,vc as qM,w as sO,wa as Jl,wb as yR,wc as zM,x as aO,xa as Zl,xc as VM,ya as Ql,yb as bR,yc as HM,za as ep,zb as TR,zc as KM}from"./chunks/chunk-RBPOO46D.js";import{$ as De,$a as Wo,$c as Ct,$d as _n,$e as cw,$f as aS,$g as hi,$i as OE,$j as Es,$k as Ea,$l as RA,$m as cv,$n as vd,Aa as Vo,Ac as LT,Ad as TC,Ae as Un,Af as Ow,Ag as ni,Ah as RS,Ai as uE,Aj as rA,Ak as Js,Al as cA,An as fd,Ao as jd,Ba as Ho,Bc as DT,Bd as CC,Be as jn,Bf as Iw,Bg as ii,Bh as MS,Bi as mE,Bj as Qi,Bk as Zs,Bl as lA,Bn as _d,Bo as Bd,Cc as $T,Cd as wC,Ce as Bn,Cf as Rw,Cg as yS,Ch as PS,Cj as es,Ck as Qs,Cl as pA,Cm as HA,Cn as hd,Co as qd,Dc as FT,Dd as SC,De as qn,Df as Mw,Dg as bS,Dh as kS,Di as Ui,Dj as ts,Dk as ea,Dm as KA,Dn as gd,Do as zd,Ec as nn,Ed as EC,Ee as zn,Ef as Pw,Eh as xS,Ei as ji,Ej as rs,Ek as ta,El as uA,Em as WA,En as yd,Eo as Vd,Fc as GT,Fd as AC,Fe as BC,Ff as kw,Fg as si,Fh as NS,Fi as Bi,Fj as os,Fk as ra,Fl as mA,Fm as XA,Fn as bd,Fo as Hd,G as zb,Gc as UT,Gd as vC,Ge as qC,Gf as xw,Gg as ai,Gh as LS,Gj as ns,Gk as oa,Gm as YA,Gn as Td,Go as Kd,Hb as _T,Hc as jT,Hd as OC,He as zC,Hf as Nw,Hg as TS,Hh as DS,Hj as is,Hk as na,Hm as JA,Hn as Cd,Ho as Wd,Ic as BT,Id as IC,Ie as VC,If as Lw,Ig as di,Ih as $S,Ii as fE,Ij as ss,Ik as ia,Il as sd,Im as ZA,In as vv,Io as Xd,J as Vb,Jb as hT,Jc as qT,Jd as RC,Je as HC,Jf as Dw,Jg as ci,Jh as FS,Jj as as,Jk as sa,Jl as fA,Jm as QA,Jn as Ov,Jo as Yd,Kb as gT,Kc as zT,Kd as MC,Ke as KC,Kf as $w,Kg as CS,Kh as GS,Kj as ds,Kk as aa,Kl as _A,Km as ev,Kn as Iv,Ko as Jd,Lb as yT,Lc as VT,Le as WC,Lf as Fw,Lg as li,Lh as US,Lj as cs,Lk as da,Ll as hA,Lm as Ot,Ln as Rv,Lo as Zd,M as Hb,Mb as bT,Mc as HT,Md as PC,Me as XC,Mf as Gw,Mg as pi,Mi as qi,Mj as ls,Mk as ca,Ml as gA,Mn as Mv,Mo as Qd,Nb as TT,Nc as sn,Nd as kC,Ne as YC,Nf as Uw,Ng as D,Nh as jS,Ni as At,Nj as ps,Nk as la,Nl as yA,Nm as tv,Nn as Pv,No as ec,Oc as KT,Od as xC,Oe as JC,Og as ui,Oh as xi,Oi as _E,Oj as us,Ok as pa,Ol as bA,On as kv,Oo as tc,Pc as an,Pd as NC,Pf as jw,Ph as Ni,Pi as hE,Pj as ms,Pk as ua,Pm as rv,Pn as xv,Po as rc,Q as Kb,Qa as iT,Qb as CT,Qd as LC,Qe as ZC,Qf as Bw,Qh as BS,Qi as gE,Qj as fs,Qk as ma,Ql as TA,Qo as Mt,R as ue,Ra as sT,Rb as wT,Rc as WT,Rd as DC,Re as QC,Rf as Wn,Ri as yE,Rj as _s,Rk as fa,Rl as CA,S as Wb,Sa as aT,Sc as XT,Sd as $C,Se as ew,Sf as Xn,Si as bE,Sk as _a,Sl as wA,T as b,Tc as YT,Td as FC,Te as tw,Tf as Yn,Ti as TE,Tj as hs,Tk as ha,Tl as SA,Tm as ov,Tn as Rt,Ub as R,Uc as JT,Ud as GC,Ue as rw,Uf as eS,Ui as CE,Uj as gs,Uk as ga,Um as nv,Un as Nv,V as $o,Va as Ko,Vb as ST,Vc as ZT,Vd as UC,Ve as ow,Vf as tS,Vg as wS,Vh as qS,Vi as wE,Vj as ys,Vk as ya,Vl as EA,Vm as iv,Vn as Lv,W as bt,Wa as dT,Wb as Tt,Wd as jC,We as nw,Wf as rS,Wg as SS,Wh as zS,Wi as SE,Wj as bs,Wk as ba,Wl as AA,Wm as ad,Wn as Dv,X as me,Xa as cT,Xb as ET,Xd as pn,Xe as iw,Xf as oS,Xg as ES,Xh as VS,Xj as Ts,Xk as Ta,Xm as sv,Xn as wd,Y as Fo,Ya as lT,Yd as un,Ye as sw,Yf as nS,Yg as mi,Yh as HS,Yi as EE,Yj as Cs,Yk as Ca,Yl as vA,Yn as Sd,Za as pT,Zb as AT,Zd as mn,Ze as aw,Zf as iS,Zg as fi,Zh as KS,Zi as AE,Zj as ws,Zk as wa,Zl as OA,Zm as av,Zn as Ed,_d as fn,_e as dw,_f as sS,_g as _i,_h as WS,_i as vE,_j as Ss,_k as Sa,_l as IA,_m as dv,_n as Ad,aa as Go,ab as Xo,ad as wt,ae as hn,af as lw,ag as dS,ah as gi,ai as XS,aj as zi,ak as As,al as Aa,am as MA,an as lv,ao as Od,b as Io,bb as $e,bd as dn,be as gn,bf as pw,bg as cS,bh as yi,bj as Vi,bk as vs,bl as va,bm as PA,bn as pv,bo as Id,c as Ro,ca as Xb,cb as uT,cd as cn,ce as Fe,cf as uw,cg as lS,ch as bi,ci as YS,ck as Os,cl as Oa,cm as kA,cn as uv,co as Rd,d as Mo,da as Yb,db as mT,dd as ln,de as Ge,df as St,dg as pS,dh as Ti,di as JS,dj as Hi,dk as Is,dl as Ia,dm as xA,dn as mv,do as Md,e as Po,ea as Jb,eb as Yo,ee as yn,eg as uS,eh as Ci,ei as ZS,ej as IE,ek as Rs,el as Ra,em as NA,en as fv,eo as Pd,f as xe,fa as Zb,fb as Jo,fd as QT,fe as bn,ff as Et,fh as wi,fi as QS,fk as Ms,fl as Ma,fn as _v,fo as kd,g as ko,ga as Qb,gd as eC,ge as Tn,gf as Vn,gh as Si,gi as eE,gj as RE,gk as Ps,gl as Pa,gm as LA,gn as hv,go as xd,h as L,ha as eT,hb as Zo,hd as tC,he as Cn,hf as Hn,hh as Ei,hi as tE,hj as ME,hk as ks,hl as ka,hm as DA,hn as It,ho as Nd,i as Ne,id as rC,ie as wn,if as fe,ih as Ai,ii as rE,ij as PE,ik as xs,il as xa,im as $A,in as gv,io as Ld,j as xo,ja as tT,jc as vT,jd as oC,je as Sn,jh as vi,ji as oE,jk as Ns,jm as FA,jo as Dd,k as No,ka as rT,kc as OT,kd as nC,ke as En,kf as mw,kg as mS,kh as Oi,ki as nE,kj as kE,kk as Ls,kl as qe,km as GA,ko as $d,l as Lo,lc as IT,ld as iC,le as An,lh as AS,lk as Ds,ll as ee,ln as yv,lo as Fd,m as Do,md as sC,me as vn,mf as fw,mh as vS,mj as VE,mk as $s,ml as Na,mm as UA,mn as bv,mo as Gd,n as Lb,na as oT,nc as RT,nd as aC,ne as On,nf as Ue,ng as Jn,nh as Ii,nj as HE,nk as Fs,nl as Ha,nn as Tv,o as Le,oc as MT,od as dC,oe as In,of as _w,og as fS,oh as OS,oi as iE,oj as KE,ok as Gs,ol as Ka,om as jA,on as Cv,oo as $v,p as yt,pd as cC,pe as Rn,pf as hw,pg as Zn,ph as Ri,pj as je,pk as Us,pl as Wa,pm as BA,pn as wv,po as Fv,q as Db,qa as nT,qc as PT,qd as lC,qe as Mn,qf as gw,qh as Mi,qi as sE,qj as WE,qk as js,ql as Xa,qm as qA,qn as Sv,r as $b,ra as Uo,rc as tn,rd as pC,re as Pn,rf as yw,rg as _S,rh as Pi,rj as XE,rk as Bs,rl as Ya,rm as zA,rn as Ev,s as Fb,sa as jo,sd as uC,se as kn,sf as bw,sh as ki,sj as YE,sk as qs,sl as Ja,sm as VA,sn as Av,so as Gv,t as Gb,ta as Bo,tc as rn,td as mC,te as xn,tf as Tw,tg as hS,ti as aE,tj as vt,tk as zs,tl as Za,tn as dd,to as Uv,u as z,ub as Qo,uc as on,ud as fC,ue as Nn,uf as Cw,ug as gS,ui as Li,uj as Be,uk as Vs,ul as Qa,un as cd,uo as jv,v as Ub,vb as en,vd as _C,ve as Ln,vf as ww,vg as Qn,vi as dE,vj as JE,vk as Hs,vl as ed,vn as ld,vo as Bv,wb as fT,wd as hC,we as Dn,wf as Sw,wg as ei,wj as ZE,wk as Ks,wl as iA,wn as pd,wo as qv,x as jb,xa as qo,xc as kT,xd as gC,xe as $n,xf as Ew,xg as ti,xi as cE,xj as QE,xk as Ws,xl as sA,xn as ud,xo as zv,y as Bb,yc as xT,yd as yC,ye as Fn,yf as Aw,yg as ri,yi as lE,yj as eA,yk as Xs,yl as aA,yn as md,yo as Vv,z as qb,za as zo,zc as NT,zd as bC,ze as Gn,zf as vw,zg as oi,zh as IS,zi as pE,zj as tA,zk as Ys,zl as dA,zo as Ud}from"./chunks/chunk-YMLF6QT7.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 V="2026-07-28",sk=["2025-11-25","2025-06-18"],Ye=[V],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},E={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},tr=["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 Lh(e){if(e===void 0)return;if(!h(e))throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:E.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:E.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 Dh(e){if(e!==void 0){if(typeof e!="string"||!tr.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:E.logLevel,allowed:[...tr]});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:[E.protocolVersion,E.clientCapabilities]});let r=t[E.protocolVersion];if(typeof r!="string"||!Ye.includes(r))throw new u("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...Ye],requested:typeof r=="string"?r:null});let o=t[E.clientCapabilities];if(!h(o))throw new u("Invalid MCP client capabilities metadata",m.invalidParams,{field:E.clientCapabilities,expected:"object"});let n=Lh(t[E.clientInfo]),s=Dh(t[E.logLevel]);return{protocolVersion:V,clientCapabilities:o,...n?{clientInfo:n}:{},...s?{logLevel:s}:{}}}function ak(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 dk(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 ck(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,[E.serverInfo]:{...t}}}}function $h(e,t){return Ze({...e,resultType:"complete"},t)}function lk(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 $h({supportedVersions:[...Ye],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function pk(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"})}import{createHash as nr,createHmac as ir,timingSafeEqual as Fh}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 Gh=["elicitation/create","roots/list","sampling/createMessage"],rr=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},sr=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,ge=32,et=64*1024,ye=16*1024,Qe={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function Uh(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function be(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>ge)throw new u("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:ge,observed:r.length});let o={};for(let[n,s]of r){if(!sr.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"||!Gh.includes(i))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:i??null});let a=Uh(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 be(o,et,"inputRequests"),o}function ar(e){if(!h(e))throw new u("Invalid MCP inputResponses",m.invalidParams,{field:"inputResponses",expected:"object"});let t=Object.entries(e);if(t.length>ge)throw new u("Invalid MCP inputResponses count",m.invalidParams,{maximum:ge,observed:t.length});let r={};for(let[o,n]of t){if(!sr.test(o)||!h(n))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return be(r,et,"inputResponses"),r}function _k(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>ye)throw new u("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:ye});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:{[E.serverInfo]:{...e.serverInfo}}}}function dr(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 hk(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>ye/2)throw new u("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:ye/2});let o=r.toString("base64url"),n=ir("sha256",dr(t)).update(o).digest("base64url");return`${o}.${n}`}function jh(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 gk(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=ir("sha256",dr(t)).update(o).digest();if(i.byteLength!==a.byteLength||!Fh(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=jh(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 yk(e){return be(e,et,"request parameters"),nr("sha256").update(JSON.stringify(e)).digest("hex")}var or=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=nr("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 Bh(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 bk(e,t){return{...e,...Bh(t)}}function qh(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function zh(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(qh)){if(!h(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function Vh(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 Hh(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 Kh(e,t){if(!h(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&zh(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function Tk(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=Vh(t);if(typeof e!="boolean"&&!h(e))throw new u("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});be(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});Kh(e,a.value),Hh(a,s)}return structuredClone(e)}import{randomUUID as Wh}from"node:crypto";import{readFile as Xh}from"node:fs/promises";import cr 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 Ik="io.modelcontextprotocol/tasks",Yh=["working","input_required","completed","failed","cancelled"],Jh=/^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,Zh=3600*1e3,Qh=1e3,Ce=1024,eg=30,tg=2e3;function rt(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function Te(e){let t=e.trim();if(!Jh.test(t))throw rt("Unknown MCP task");return t}function lr(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 pr(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,Ce),...h(e.data)?{data:structuredClone(e.data)}:{}}}function rg(e){if(!Yh.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function og(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function ng(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function ig(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function sg(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 ag(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function dg(e){if(!h(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?Te(e.taskId):"",r=rg(e.status),o=og(e.principal),n=ng(e.workerPid),s=ig(e.ttlMs),i=sg(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:lr(e.createdAt,"createdAt"),lastUpdatedAt:lr(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:s,consumedInputKeys:ag(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,Ce)}:{},...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=pr(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 H(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 re(e){return e==="completed"||e==="failed"||e==="cancelled"}function cg(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=cr.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Wh()}`),this.#i=t.workerPid??process.pid}#s(t){return cr.join(this.#e,"runtime","mcp-tasks","records",`${Te(t)}.json`)}async#d(t){try{return dg(JSON.parse(await Xh(this.#s(t),"utf8")))}catch(r){throw me(r)||r instanceof SyntaxError?rt("Unknown MCP task"):r}}async#a(t){await De(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
|
|
2
|
+
`)}async#n(t,r,o){let n=Te(t),s=await Ue(this.#e,n,eg,this.#t,!1,!1,tg);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=Te(this.#o()),o=t.principal.trim(),n=t.ttlMs===void 0?Zh:t.ttlMs,s=t.pollIntervalMs??Qh;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,Ce)}:{}};return await this.#a(a),{...H(a),resultType:"task"}}async get(t,r){return H(await this.#n(t,r,o=>{if(re(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&&!cg(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 H(await this.#n(t.taskId,t.principal,o=>{if(re(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,Ce),lastUpdatedAt:this.#r().toISOString(),inputRequests:r}}))}async update(t,r,o){let n=ar(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 H(await this.#n(t,r,n=>re(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=pr(o);return H(await this.#n(t,r,s=>re(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 H(await this.#n(t,r,o=>re(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 Rk(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 we="io.modelcontextprotocol/subscriptionId",ur=256,mr=2048,lg=5e3;function pg(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),lg);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 ug(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>ur)throw new u("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:ur});let s=new Set;for(let i of e.resourceSubscriptions){if(typeof i!="string"||i.trim().length===0||Buffer.byteLength(i,"utf8")>mr)throw new u("Invalid MCP resource subscription URI",m.invalidParams,{field:"notifications.resourceSubscriptions",maximumBytes:mr});s.add(i)}s.size>0&&(n=[...s].sort())}return{...t?{toolsListChanged:t}:{},...r?{promptsListChanged:r}:{},...o?{resourcesListChanged:o}:{},...n?{resourceSubscriptions:n}:{}}}function mg(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 fr=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=mg(ug(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:{[we]: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:{[we]: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:{[we]: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 pg(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:{[we]: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 _r=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,fg=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,hr=/^[\t\x20-\x7E]*$/u,gr=new Set(["prompts/get","resources/read","tools/call"]);function _g(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 yr(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&hr.test(t)&&!_r.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function br(e,t){let r=_r.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||!hr.test(e)?A("Malformed MCP header value",t):e}function Se(e){return Array.isArray(e)?e.some(Se):h(e)?Object.prototype.hasOwnProperty.call(e,"x-mcp-header")||Object.values(e).some(Se):!1}function hg(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!fg.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 Tr(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=hg(d,c,r);l&&t.push(l);for(let[p,f]of Object.entries(d))if(p!=="properties"&&p!=="x-mcp-header"&&Se(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"&&Se(s))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:"inputSchema",keyword:n});return o(e,[]),t}function Cr(e,t){let r=e;for(let o of t){if(!h(r))return;r=r[o]}return r}function wr(e,t){let r=e==="resources/read"?t.uri:t.name;return typeof r=="string"?r:void 0}function gg(e,t){let r=h(e.arguments)?e.arguments:{},o={};for(let n of Tr(t)){let s=Cr(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}`]=yr(s)}}return o}function Nk(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=wr(o,t);if(gr.has(o)){if(s===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=yr(s)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,gg(t,e.toolSchema)),n}function yg(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"),gr.has(r)){let s=e.get("mcp-name"),i=wr(r,o);(s===void 0||i===void 0||br(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 bg(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 Tg(e){let t=h(e.params.arguments)?e.params.arguments:{};for(let r of Tr(e.toolSchema)){let o=Cr(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),bg(r,o,br(s,n))||A("MCP parameter header does not match request body",n)}}function Lk(e){let t=_g(e.headers),r=typeof e.request.method=="string"?e.request.method:"";yg(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&Tg({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var Dk=V;import{AsyncLocalStorage as Cg}from"node:async_hooks";import{createHash as Sr,timingSafeEqual as wg}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}},Sg=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,Eg=/^[a-z][a-z0-9_*/-]{0,255}$/u,Ag=/^(?:[a-z0-9][a-z0-9_*/-]{0,240})@[a-z][a-z0-9_*/-]{0,13}$/u,vg=/^[\x20-\x2B\x2D-\x3C\x3E-\x7E]{0,255}[\x21-\x2B\x2D-\x3C\x3E-\x7E]$/u,Ar=/^[\x21\x23-\x5B\x5D-\x7E]+$/u,vr=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,Og=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,Ig=/%(?![0-9A-Fa-f]{2})/u,Rg=512,Mg=32,Pg=180,kg=8192,xg=8192,Or=new Cg;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 Ng(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 jk(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=>!Ar.test(n)))throw new y("Invalid authorization scope",401);return{resource:t,authorization_servers:r,...o.length>0?{scopes_supported:o.sort()}:{}}}function Bk(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 qk(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 zk(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 Vk(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 Hk(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 Kk(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 Er=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 Lg(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?Sg.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"||!$g(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 Dg(e){return Eg.test(e)||Ag.test(e)}function $g(e){if(Buffer.byteLength(e,"utf8")>Rg)return!1;let t=e.split(",");if(t.length>Mg)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(!Dg(i)||!vg.test(a)||r.has(i))return!1;r.add(i)}return!0}function Ir(e){return Og.test(e)&&!Ig.test(e)}function Fg(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 vr.test(o)&&(n===void 0||Ir(n))}function Gg(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(!(!vr.test(i)||!Ir(a)||!n.every(Fg)))return{key:i,serialized:t}}function Ug(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>kg)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>Pg)throw new y("Invalid MCP baggage",403);let n=[];for(let s of o){let i=Gg(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 Wk(e,t={}){let r=h(e)&&h(e._meta)?e._meta:{},o=Ug(r.baggage,t.baggageAllowlist??[]);return{...Lg(r),...o?{baggage:o}:{}}}function Xk(e,t){return Or.run(structuredClone(e),t)}function Yk(){let e=Or.getStore();return e?{...e}:void 0}async function Jk(e){let t=S(e.policy.resourceMetadataUrl,"protected resource metadata URL",!0).href,r=[...new Set(e.policy.requiredScopes??[])];if(r.some(c=>!Ar.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=Ng(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")>xg)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 Zk(e){let t=Sr("sha256").update(e.token).digest();return r=>{let o=Sr("sha256").update(r).digest();if(!wg(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",Ee="2026-01-26",Pr="text/html;profile=mcp-app",Rr=Object.freeze({specVersion:Ee,mimeTypes:[Pr]});function tx(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]:Rr}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(Pr)||n!==void 0&&n!==Ee)throw new u("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:Rr}}});return!0}var jg={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},kr=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:jg})));function rx(e){return kr.find(t=>t.uri===e)}function ox(e){let t=new Map(kr.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 Mr(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function nx(e){let t=Mr(e.name),r=Mr(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:Ee}),n=JSON.stringify(Ee);return`<!doctype html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
@@ -22,11 +22,11 @@ import{A as jM,B as BM,C as qM,D as zM,E as VM,a as Hn,b as HS,c as KS,d as WS,e
|
|
|
22
22
|
(()=>{"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"})})();
|
|
23
23
|
</script>
|
|
24
24
|
</body>
|
|
25
|
-
</html>`}import{createHash as
|
|
26
|
-
`)).digest("hex");o.set(a.name,{uri:`skill://${a.name}/SKILL.md`,frontmatter:p,resources:f,_meta:{contractVersion:1,extensionRevision:
|
|
27
|
-
`)).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)&&T("Skill cursor is invalid or stale."),Number(o.offset)}catch(o){if(o instanceof u)throw o;return T("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 Dr(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 Dr(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;Nr.has(r)||T(`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($r),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||T(`Unknown pm MCP skill: ${t}.`,{field:"uri"}),$r(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)&&T(`Unknown pm MCP skill resource: ${t}.`,{field:"uri"});let a={digest:i.digest,origin:o._meta.origin,trust:"untrusted"},d=Lr(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||T(`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 C of n.resources){let S=C.uri.slice(`${a}/`.length);if(!S.startsWith(i))continue;let q=S.slice(i.length),[R,...Eo]=q.split("/"),Ao=`${a}/${i}${R}`,vo=n.files.get(`${i}${R}`);d.set(R,{uri:Ao,name:R,mimeType:Eo.length>0?"inode/directory":Lr(R,vo)})}s.length>0&&d.size===0&&T(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let c=r.limit??P.maxPageSize;Nr.has(c)||T(`Skill directory limit must be an integer from 1 to ${P.maxPageSize}.`);let l=this.#r(r.cursor,t),p=[...d.values()].sort((C,S)=>C.uri.localeCompare(S.uri)),f=p.slice(l,l+c),h=l+f.length,g=h<p.length;return{resources:f,hasMore:g,...g?{nextCursor:this.#o(h,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]="2b24276b-948b-50bd-bfd9-f429cd74be70")}catch{}})();var jr="https://schema.unbrained.dev/pm/workspace-recipe/v1";function at(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)=>at(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,at(o,`${t}.${r}`)])))}function Ee(e){if(e.schema!==jr)throw new Error(`Unsupported workspace recipe schema: ${e.schema}`);let t=St(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:at(r.input,`operations[${o}].input`)})))})}async function Br(e,t){let r=Ee(e);return wt(r,t)}async function Xg(e,t){return Br(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 qr="pm.agent-observation/v1",zr="pm.agent-verdict/v1",Vr="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 oe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))oe(t)}return e}function Yg(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 Jg(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 Zg(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 Qg(e){if(e.schema!==qr)throw new Error(`observation.schema must be ${qr}.`);return k(e.id,"observation.id"),O(e.version,"observation.version"),Yg(e.reads),Jg(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")),Zg(e.tiers),oe(structuredClone(e))}function yx(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 ey(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 Hr(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 ty(e){return`/${F(e,"verdict predicate path").map(t=>t.replaceAll("~","~0").replaceAll("/","~1")).join("/")}`}function ry(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 oy(e){if(e.schema!==zr)throw new Error(`verdict.schema must be ${zr}.`);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}.`);ry(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 oe(structuredClone(e))}function ny(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=Hr(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}#${ty(a.path)}`,evidence_digest:bt(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 bx(e){if(e.schema!==Vr)throw new Error(`episode.schema must be ${Vr}.`);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 Qg(e.observation),oy(e.verdict),Ee(e.recipe),oe(structuredClone(e))}function iy(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 sy(e,t){let r={};for(let o of t)iy(r,o,Hr(e,o));return r}async function Cx(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 ey(e.observation,async h=>sy(p.state,h.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(),h=ny(e.verdict,f);return r.push({sequence:r.length+1,kind:"verdict",state_id:f.snapshot_id}),h};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:oe(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]="14472bc2-ebca-5b9c-9462-bd8694b630a0")}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 ne(e,t){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Corpus shape ${t} must be a non-negative safe integer`);return e}function Wr(e){if(!(typeof e!="object"||e===null||Object.isFrozen(e))){for(let t of Object.values(e))Wr(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"),ne(e.age_span_days,"age_span_days"),K(e.history_entries_per_item,"history_entries_per_item"),ne(e.comments_per_100_items,"comments_per_100_items"),ne(e.notes_per_100_items,"notes_per_100_items"),ne(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 Wr(t),t}var Ae=[{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}],X=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:Ae,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:Ae,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:Ae,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:Ae,author_cardinality:24,component_count:5,include_cycles:!1,custom_types:["Archive"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["archive_source"]})});function ay(){return Object.keys(X).sort().map(e=>X[e])}function dy(e){let t=e.trim().toLowerCase();if(!Object.hasOwn(X,t))throw new TypeError(`Unknown corpus shape "${e}". Available: ${Object.keys(X).join(", ")}`);return X[t]}var Kr=new WeakMap;function Xr(e,t){if(e===0)return[];let r=Kr.get(t);r===void 0&&(r=t.edge_kind_mix.flatMap(n=>Array.from({length:n.weight},()=>n.kind)),Kr.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 cy(e,t,r,o=42){if(ne(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 S=0;S<e.hierarchy_depth;S+=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),h=e.age_span_days*864e5,g=new Date(f+(r===1?0:Math.round(t/(r-1)*h))).toISOString(),C=(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:Xr(t,e),has_comment:C<e.comments_per_100_items,has_note:C<e.notes_per_100_items,has_learning:C<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 dt=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,Xr(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 Yr(e){return new dt(e)}function ly(e,t){let r=Yr(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 py(){let e=De(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 uy(){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 Jr=["lines","branches","functions","statements"];function my(e,t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError(`Coverage entry for ${e} must be an object.`)}function fy(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 _y(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)){my(r,o);for(let n of Jr){let s=fy(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 hy=["captured_redacted","captured_verbatim"],gy=[{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 yy(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||!hy.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 gy)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 by(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")&&me(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 Cy(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?yy(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 by(e,r)}function $x(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=Cy(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 Y from"node:fs";import ct 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 Zr=300*1e3,Ty=3;function Bx(e){return(e?.trim()||"development").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\./,"_")}function qx(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.");Y.mkdirSync(e,{recursive:!0});let o=ct.join(e,r);Y.mkdirSync(o,{recursive:!0});let n=new Date;Y.utimesSync(o,n,n);let s=Y.readdirSync(e).filter(c=>c!==r).flatMap(c=>{try{return[{name:c,mtimeMs:Y.statSync(ct.join(e,c)).mtimeMs}]}catch(l){if(l instanceof Error&&"code"in l&&ue(l))return[];throw l}}).sort((c,l)=>l.mtimeMs-c.mtimeMs||c.name.localeCompare(l.name)),i=s.filter(c=>n.getTime()-c.mtimeMs<Zr),a=Math.max(0,Ty-1-i.length),d=s.filter(c=>n.getTime()-c.mtimeMs>=Zr).slice(a).map(c=>c.name).sort((c,l)=>c.localeCompare(l));for(let c of d)Y.rmSync(ct.join(e,c),{recursive:!0,force:!0,maxRetries:3,retryDelay:50});return{retained:r,removed:d}}import{createHash as Sy}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 lt=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:lt,fingerprint:Sy("sha256").update(I({nodes:n,edges:s,kinds:i})).digest("hex"),created_at:new Date(o).toISOString(),nodes:n,edges:s,kinds:i})}function wy(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function se(e){if(!wy(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==lt)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 Ne([]);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:se(o)}async function ve(e,t){let r=U(t.workspace,"workspace"),o=se(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 Ey(e,t={}){let r=e.map(se),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 Ne([...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 ie=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(se(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 Qr(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${t} must be a positive integer`);return e}function Ay(e){let t=Qr(e.nodeCount,"nodeCount"),r=Qr(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 eo(e,t={}){let r=t.workspace?.trim()||"pm-graph-conformance",o=gt(),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 ve(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 ve(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 vy(e){return eo(new ie,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]="df28925a-72d8-5d39-accf-e295ee01d3f9")}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 pt=2,Oy=["self_reported","independent_transport"];function Oe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ae(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function to(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=ae(o,`${t}[${String(n)}]`);return r?o:s})}function ut(e,t){return e===void 0?void 0:ae(e,t)}function Ry(e,t){if(e===void 0)return;if(!Oe(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 Iy(e,t,r,o,n,s){if(o==="refusal"){if(He(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=Ct(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=xe(`history ${l}`))}let d=xt(a);if(!He(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=kt(a).kind;if(o!==c)throw new TypeError(`${e} expected ${o}, but ${a} declares ${c}`)}function Py(e,t,r){if(!Oe(e))throw new TypeError(`tasks.${t}.steps[${String(r)}] must be an object`);let o=`tasks.${t}.steps[${String(r)}]`,n=ae(e.id,`${o}.id`),s=to(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"&&!Mt.includes(a))throw new TypeError(`${o}.expected_output_kind is unsupported`);let d=a,c=e.expected_accounting_mode;if(!Oy.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=to(e.required_fields,`${o}.required_fields`);if(p.some(S=>S.split(".").some(q=>q.length===0)))throw new TypeError(`${o}.required_fields must contain dot-separated own-property paths`);let f=Ry(e.expected_field_values,`${o}.expected_field_values`),h=ut(e.expected_error_code,`${o}.expected_error_code`),g=ut(e.expected_refusal_surface,`${o}.expected_refusal_surface`),C=ut(e.recovery_for,`${o}.recovery_for`);return Iy(o,s,i,d,h,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}:{},...h?{expected_error_code:h}:{},...g?{expected_refusal_surface:g}:{},...C?{recovery_for:C}:{}}}function My(e,t){if(!Oe(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let r=ae(e.id,`tasks[${String(t)}].id`),o=ae(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)=>Py(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 bN(e){if(!Oe(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==pt)throw new TypeError(`agent-task transcript corpus version must be ${String(pt)}`);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)=>My(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:pt,tasks:t}}import{createHash as ro}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 oo(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${t} must be non-empty`);return e.trim()}function wN(e,t){let r=oo(t.migrationId,"migrationId"),o=oo(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=qe(e,void 0,t.registry),a=i.graph.nodes(),d=i.graph.edges().map(f=>{let h=ro("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}:${h}`,relationshipId:`migration:${r}:${h}`,action:"add",edge:f,author:o,timestamp:s,reason:`Backfill ${r} from legacy item metadata`})}),c=ro("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 no 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 de=["suggested_retry","candidate_command","example","next_step","migration_hint","restore_with"],mt={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"}},AN=Object.freeze(Object.keys(mt));function io(e){if(Object.hasOwn(mt,e))return mt[e]}var ky=new Set([..."=([{,:;!?&|+-*%^~<>","=>"]);function Q(e,t){return e<t?-1:e>t?1:0}function xy(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 Ny(e){return e===void 0||e.kind==="punctuator"&&ky.has(e.value)||e.kind==="identifier"&&["return","case","throw","else","yield"].includes(e.value)}function Ly(e,t){if(/\s/u.test(e[t]))return t+1;if(e.startsWith("//",t)){let r=e.indexOf(`
|
|
28
|
-
`,t+2);return r===-1?e.length:r+1}if(e.startsWith("/*",t))return e.indexOf("*/",t+2)+2}function
|
|
29
|
-
`&&t.push(r+1);return t}function
|
|
30
|
-
`)}(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 Zy(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 Qy(e){return[e.exit_code!==pe.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 ${pe.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."},...Zy(e)]}function GN(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 Qy(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 co="not-a-declared-action";function eb(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 ce(e){return e.replaceAll(/[^a-z0-9]+/gu,"-").replaceAll(/^-|-$/gu,"")}function WN(e=je.filter(t=>At.some(r=>r.command===t.command&&r.disposition!=="package_owned"))){let t=new Set(e.filter(({command:r})=>!r.includes(" ")).map(({command:r})=>ce(r)));return e.flatMap(r=>r.slots.flatMap((o,n)=>{if(!o.required)return[];let s=r.command.split(" "),i=ce(r.command),a=s.length>1&&t.has(i)?s.map(ce).join("--"):i,d=ee(r.command).flatMap(l=>l.required?[l.flag,...l.value_name?["example"]:[]]:[]),c=Ue.some(l=>l.command===r.command);return[{probe_id:`required-argument-${a}-${ce(o.name)}`,command:r.command,refusal_args:[...s,...r.slots.slice(0,n).map(l=>eb(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 tb(e){switch(L(e)){case"assurance":case"workspace snapshot":return Ue.filter(({parent:t})=>t===e).map(({action:t})=>t);case"graph":return $e;case"merge":return Fe;case"plan":return Ke;case"profile":return We;case"schema":return Nt;default:throw new Error(`Required positional action family ${e} has no authoritative value domain.`)}}function XN(e=je){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-${ce(t)}`,command:t,refusal_args:[...r,co],recovery_args:[...r,"--help"],error_code:"unknown_subcommand",rejected_value:co,allowed_values:[...tb(t)].sort()}}).sort((t,r)=>t.probe_id.localeCompare(r.probe_id))}function rb(e,t){let r=[...t].sort();return e.length===t.length&&[...e].sort().every((o,n)=>o===r[n])}function ob(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&&!rb(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 YN(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=>ob(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 _t=[{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 ZN(){return _t.map(e=>({...e}))}function nb(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 QN(e){let t=new Map(e.map(n=>[n.probe_id,n])),r=[],o=0;for(let n of _t){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=nb(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:_t.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]="fcb59bee-0fdb-5b17-8568-775a15d53466")}catch{}})();var Re,ib=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 sb(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=ib[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 Ie(){if(Re!==void 0)return Re;let e=te.filter(({command:n})=>Be(n)).flatMap(({command:n,family:s})=>Pt(n,ee(n)).map(i=>({command:n,family:s,concept:sb(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 Re=Object.freeze(r.map(n=>Object.freeze({...n,concept:o.get(n.concept)?.size===1?n.concept:`${n.concept}@${n.command}`}))),Re}function iL(){return Object.freeze(Ie().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var lo=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:100,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:35,events:33,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:27,schema:43,profile:22,activity:35,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:31,notes:35,learnings:31,files:39,docs:30,deps:32,plan:109,test:53,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:24,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),po=Object.freeze({...lo,...Object.fromEntries(ke.flatMap(({alias:e,canonical:t})=>{let r=lo[e];return r===void 0?[]:[[t,r]]}))});function uo(){let e=new Map(Object.keys(po).map(t=>[t,0]));for(let{command:t}of Ie())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(po).map(([t,r])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:r})))}function ab(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 db(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 cb(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 sL(e=Ie(),t=uo(),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 ab(e,n,o),db(a,t,o),cb(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 aL(){let e=Ie(),t=uo(),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(`
|
|
31
|
-
`)}(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]="4e72da21-425b-568d-9174-bc5021e1d4f4")}catch{}})();function cL(e){return e}function lL(e){return e}function pL(e){return e}function uL(e){return e}function mL(e){return e}function fL(e){return e}function _L(e){return e}function hL(e){return e}function gL(e){return e}function yL(e){return e}function bL(e){return e}function CL(e){return e}function TL(e){return e}function SL(e){return{handled:!0,result:e}}function wL(){return{handled:!1}}function EL(e){return e}function AL(e){return e}function vL(e){return e}function OL(e){return e}function RL(e){return e}function IL(e){return e}function PL(e){return e}function ML(e){return e}function kL(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 lb(e={},t={}){return new _e(t).extension(void 0,{...e,migrate:!0})}function pb(e={},t={}){return new _e(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]="af4da99c-f557-5bf7-a439-c14878e4970d")}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"||!me(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function ub(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 mb(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 YL(e,t){let{start:r,end:o}=ub(t),n=[...mb(e,t.families,r,o)].map(([s,i])=>{let a=i.filter(h=>h.outcome==="failure"),d=i.filter(h=>h.outcome!=="pending").length,c=d===0?null:a.length/d,l=a.filter(h=>h.repaired_at!==void 0&&N(h.repaired_at)<o),p={product:0,infrastructure:0,unknown:0};for(let h of a)p[h.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(h=>new Date(N(h.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:l.map(h=>(N(h.repaired_at)-N(h.started_at))/6e4).sort((h,g)=>h-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]="c0218aaf-791c-57b1-8f9a-13816cb0c01f")}catch{}})();import{createHash as fo,createHmac as fb,randomBytes as _b,timingSafeEqual as hb}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]="837ee381-0838-55d3-bcdf-7352fb76661d")}catch{}})();var kD="dev.unbrained.pm/progressive-tool-discovery",xD=Object.freeze({version:1,discoveryTool:"pm_discover",canonicalResult:"structuredContent.result",compatibilityText:"pointer"}),gb=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}),yb=Object.freeze(["profile_changed","tool_contract_changed","workspace_extension_changed","authorization_changed","ranking_signal_changed","cursor_integrity_key_rotated"]),_o={core:0,standard:1,full:2,internal:3},ho=Object.freeze(["core","standard","full"]),bb=new Set(["core","standard","full","custom"]),go=new Set(te.map(({family:e})=>e)),Cb=_b(32);function Me(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 yo(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 bo(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 Co(e){if(e!==void 0&&typeof e!="boolean")throw new b("pm tool discovery includeSchema must be a boolean.",64);return e===!0}function To(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new b("pm tool discovery options must be an object.",64)}function Tb(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 ND(e){if(To(e),e.family!==void 0&&(typeof e.family!="string"||!go.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"||!ho.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);return{...e.query!==void 0?{query:Me(e.query,"query")}:{},...e.family!==void 0?{family:e.family}:{},...e.tier!==void 0?{tier:e.tier}:{},...e.limit!==void 0?{limit:yo(e.limit)}:{},...e.cursor!==void 0?{cursor:Me(e.cursor,"cursor")}:{},...e.includeSchema!==void 0?{includeSchema:Co(e.includeSchema)}:{},...e.outputBudget!==void 0?{outputBudget:bo(e.outputBudget)}:{}}}function Sb(e){return e===void 0||!Number.isFinite(e)?0:Math.min(1,Math.max(0,e))}function le(e){return[...new Set(e.toLowerCase().match(/[a-z0-9]+/gu)??[])].sort()}function wb(e,t){let r=le(e);if(r.length===0)return 0;let o=new Set(le(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 Eb(e,t){let r=le(e);if(r.length===0)return 0;let o=t.toLowerCase(),n=le(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 mo(e){return fo("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function So(e,t,r){return fb("sha256",r).update(JSON.stringify({version:1,fingerprint:e,offset:t})).digest("base64url")}function Ab(e,t,r){let o={version:1,offset:t,signature:So(e,t,r)};return Buffer.from(JSON.stringify(o),"utf8").toString("base64url")}function vb(e,t,r,o){if(e===void 0)return 0;try{let n=JSON.parse(Buffer.from(e,"base64url").toString("utf8"));if(n.version!==1||!Number.isInteger(n.offset)||(n.offset??-1)<0||Number(n.offset)>r||typeof n.signature!="string")throw new Error("cursor fields do not match the request");let s=Buffer.from(So(t,n.offset,o),"base64url"),i=Buffer.from(n.signature,"base64url");if(i.length!==s.length||!hb(i,s))throw new Error("cursor signature does not match the request");return n.offset}catch(n){throw new b("Invalid or stale pm tool discovery cursor; restart discovery without cursor.",64,{reason:String(n)})}}function ht(e,t,r){return{value:Sb(e),weight:t,available:r!=="unavailable",source:r}}function Pe(e,t,r){return ht(e??t,r,e===void 0?"computed":"host")}function Ob(e,t,r){let o=Object.hasOwn(fe,e.name)?fe[e.name]:"help",n=ze(o),s=`${e.name} ${e.description} ${o} ${n}`,i=wb(t,s),a=new Set(le(t)),d={lexical:ht(i,B.lexical,"computed"),semantic:Pe(e.signals?.semantic,Eb(t,s),B.semantic),graph:Pe(e.signals?.graph,a.has(n)||a.has(o)?1:0,B.graph),permission:ht(1,B.permission,"authorization"),freshness:Pe(e.signals?.freshness,1,B.freshness),usage:Pe(e.signals?.usage,gb.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:Ve(o),family:n,score:Number(c.toFixed(6)),signals:d,...r?{input_schema:structuredClone(e.inputSchema)}:{}}}function Rb(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"||!ho.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"||!go.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"||!bb.has(e.profile)))throw new b("pm tool discovery profile must be core, standard, full, or custom.",64)}function Ib(e){let t=Me(e.query===void 0?"":e.query,"query").trim().replace(/\s+/gu," ");Me(e.cursor===void 0?"":e.cursor,"cursor");let r=yo(e.limit===void 0?10:e.limit),o=bo(e.outputBudget===void 0?1200:e.outputBudget);return Rb(e),{query:t,includeSchema:Co(e.includeSchema),limit:r,budget:o,maximumTier:_o[e.tier??"full"],profile:e.profile===void 0?"core":e.profile}}function wo(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 Pb(e,t,r){return e.filter(o=>o.authorized!==!1).map(o=>Ob(o,r.query,r.includeSchema)).filter(o=>o.tier!=="internal"&&_o[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 Mb(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(wo(r(s+1),t,a)>t)break;o.push(i),n=a}return o}function LD(e,t={}){Tb(e),To(t);let r=Ib(t),o=t.cursorIntegrityKey??Cb,n=Pb(e,t,r),s=mo({query:r.query,family:t.family??null,tier:t.tier??"full",includeSchema:r.includeSchema,profile:r.profile,ranked:n}),i=vb(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:mo({fingerprint:s,cursorIntegrityKey:fo("sha256").update(o).digest("hex"),limit:r.limit,offset:i,budget:r.budget}),ttl_ms:3e4,scope:"private",invalidates_on:yb}},l=(g,C=g.length)=>{let S=i+C,q=S<n.length,R=[...d];return C<a.length&&R.push({name:"tools",reason:"token_budget",restore_with:"Continue with next_cursor or increase outputBudget."}),{...c,tools:[...g],returned:C,has_more:q,...q?{next_cursor:Ab(s,S,o)}:{},omission_receipt:{has_omissions:R.length>0,omitted:R}}},p=g=>{let C=l(g),S=wo(C,r.budget);return{...C,token_cost:{estimated_tokens:S,budget:r.budget,within_budget:r.budget==="unbounded"||S<=r.budget}}},f=Mb(a,r.budget,g=>l([],g)),h=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"&&h.token_cost.estimated_tokens>r.budget)throw new b(`pm tool discovery outputBudget is too small; at least ${h.token_cost.estimated_tokens} estimated tokens are required for this page.`,64,{required:String(h.token_cost.estimated_tokens)});return h}(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]="d007edcb-46f0-5546-b804-27d86afe23e7")}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]="3819479a-4ad7-5a06-8f76-e703037b2bf3")}catch{}})();export{zv as ACTIONABILITY_ORDERING_KINDS,Ya as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,ba as ACTIVITY_FLAG_CONTRACTS,ui as AGENT_PROVENANCE_DIMENSIONS,os as AGGREGATE_FLAG_CONTRACTS,qs as APPEND_FLAG_CONTRACTS,jI as ASSURANCE_ACTIONS,BI as ASSURANCE_DECLARATION_KINDS,WO as ASSURANCE_DOCUMENT_VERSION,ca as ASSURANCE_FLAG_CONTRACTS,XO as ASSURANCE_GATE_TRIGGERS,YO as ASSURANCE_MEASUREMENT_SOURCE_KINDS,KR as ASSURANCE_PRESET_IDS,zO as AssuranceEvaluationRefusalError,qO as AssuranceMutationRefusalError,VO as AssuranceSourceResolutionError,Zn as BASELINE_ITEM_FORMAT_VERSION,hy as BOUNDARY_FIXTURE_CAPTURE_SOURCES,fO as BRIEF_LIST_FIELDS,fi as BUILTIN_AGENT_PROVENANCE_ADAPTERS,X as BUILTIN_CORPUS_SHAPES,mi as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,Go as BUILTIN_ITEM_TYPE_VALUES,qt as BUILTIN_PROFILES,kb as BUILTIN_RELATIONSHIP_KINDS,Ka as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,ya as CALENDAR_FLAG_CONTRACTS,zs as CLAIM_FLAG_CONTRACTS,Bd as CLOSE_ACTION_OPTION_KEYS,js as CLOSE_FLAG_CONTRACTS,Bs as CLOSE_MANY_FLAG_CONTRACTS,Ys as CLOSE_TASK_FLAG_CONTRACTS,ns as COMMENTS_FLAG_CONTRACTS,rC as COMMON_MUTATION_COMMAND_OPTION_KEYS,Ma as COMPLETION_FLAG_CONTRACTS,Vo as CONFIDENCE_TEXT_VALUES,bs as CONFIG_FLAG_CONTRACTS,Wa as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,AP as CONTEXT_EVALUATION_METRIC_NAMES,Ta as CONTEXT_FLAG_CONTRACTS,Ut as CONTEXT_OUTPUT_VALUES,PP as CONTEXT_PACKING_PROFILES,gP as CONTEXT_RECENCY_EPOCH,TP as CONTEXT_RELEVANCE_SERVICE,bP as CONTEXT_RELEVANCE_SIGNAL_NAMES,xP as CONTEXT_SIGNAL_SET_VERSION,kP as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,NP as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,uS as CONTEXT_USAGE_LIMITS,Pa as CONTRACTS_FLAG_CONTRACTS,fa as COPY_FLAG_CONTRACTS,Yd as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Zd as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Jd as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,Bb as CREATE_DIRECT_CLOSE_REASON_DEFAULT,la as CREATE_FLAG_CONTRACTS,aw as CURRENT_HISTORY_HASH_ALGORITHM,Aw as CURRENT_HISTORY_ITEM_HASH_VERSION,Ow as CURRENT_HISTORY_RECORD_HASH_VERSION,Qn as CURRENT_ITEM_FORMAT_VERSION,FP as ContextSignalStore,mS as ContextUsageValidationError,lP as DEFAULT_AUTHOR_IDENTITY_VOCABULARY,tM as DEFAULT_CHILD_SAMPLE_LIMIT,mO as DEFAULT_COMPACT_LIST_FIELDS,CE as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,Im as DEFAULT_EVAL_QUERIES_RELATIVE_PATH,rP as DEFAULT_TERMINAL_TRANSITION_POLICY,BP as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,Dv as DEFECT_ESCAPE_CLASSES,$v as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Hs as DELETE_FLAG_CONTRACTS,Bo as DEPENDENCY_KIND_VALUES,Ea as DEPS_FLAG_CONTRACTS,ds as DOCS_FLAG_CONTRACTS,sa as DUPLICATES_FLAG_CONTRACTS,bI as DURABLE_MERGE_RECEIPT_INTRODUCED_AT,va as EVAL_FLAG_CONTRACTS,Sm as EVAL_METRIC_NAMES,vm as EVAL_QUERY_SET_CONTRACT,Om as EVAL_QUERY_SET_EXAMPLE,Am as EVAL_QUERY_SET_SCHEMA_ID,Ca as EVENTS_FLAG_CONTRACTS,Zs as EVENT_FLAG_CONTRACTS,xo as EXECUTABLE_COMMAND_ALIASES,pe as EXIT_CODE,Ps as EXTENSION_ACTIVATE_FLAG_CONTRACTS,Is as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,$s as EXTENSION_ADOPT_FLAG_CONTRACTS,kM as EXTENSION_CAPABILITIES,Ub as EXTENSION_CAPABILITY_CONTRACT,Fb as EXTENSION_CAPABILITY_CONTRACT_VERSION,Gb as EXTENSION_CAPABILITY_LEGACY_ALIASES,en as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,Ds as EXTENSION_CATALOG_FLAG_CONTRACTS,Ms as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,Rs as EXTENSION_DESCRIBE_FLAG_CONTRACTS,Ls as EXTENSION_DOCTOR_FLAG_CONTRACTS,Os as EXTENSION_EXPLORE_FLAG_CONTRACTS,Cs as EXTENSION_FLAG_CONTRACTS,Ss as EXTENSION_INIT_FLAG_CONTRACTS,As as EXTENSION_INSTALL_FLAG_CONTRACTS,xs as EXTENSION_MANAGE_FLAG_CONTRACTS,ks as EXTENSION_MIGRATE_FLAG_CONTRACTS,xM as EXTENSION_POLICY_MODES,NM as EXTENSION_POLICY_SURFACES,Ns as EXTENSION_RELOAD_FLAG_CONTRACTS,DM as EXTENSION_SANDBOX_PROFILES,Ts as EXTENSION_SCOPE_FLAG_CONTRACTS,LM as EXTENSION_TRUST_MODES,vs as EXTENSION_UNINSTALL_FLAG_CONTRACTS,aO as EXTERNAL_DEPENDENCY_RESOLUTION_STATUSES,iO as EXTERNAL_DEPENDENCY_SOURCE_KIND,sO as EXTERNAL_DEPENDENCY_SOURCE_KIND_ALIAS,as as FILES_FLAG_CONTRACTS,_a as FOCUS_FLAG_CONTRACTS,na as GC_FLAG_CONTRACTS,gO as GET_DEPTH_VALUES,Sa as GET_FLAG_CONTRACTS,ts as GLOBAL_FLAG_CONTRACTS,_p as GRAPH_DURABLE_CACHE_MIN_ITEMS,fp as GRAPH_DURABLE_CACHE_VERSION,Aa as GRAPH_FLAG_CONTRACTS,BE as GRAPH_QUERY_DEFAULTS,$e as GRAPH_SUBCOMMAND_VALUES,wa as GUIDE_FLAG_CONTRACTS,aa as HEALTH_FLAG_CONTRACTS,ms as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,UR as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,KI as HISTORY_COMPACT_BULK_DEFAULT_MIN_ENTRIES,fs as HISTORY_COMPACT_FLAG_CONTRACTS,Ri as HISTORY_EVENT_CLASSIFICATION_VERSION,cs as HISTORY_FLAG_CONTRACTS,iw as HISTORY_HASH_ALGORITHMS,gR as HISTORY_ITEM_HASH_VERSION_3_INTRODUCED_IN,ps as HISTORY_REDACT_FLAG_CONTRACTS,us as HISTORY_REPAIR_FLAG_CONTRACTS,Vc as INIT_AGENT_GUIDANCE_MODE_VALUES,ys as INIT_FLAG_CONTRACTS,Fs as INSTALL_FLAG_CONTRACTS,zo as ISSUE_SEVERITY_VALUES,ua as ITEM_COMPLETE_FLAG_CONTRACTS,lI as ITEM_LATEST_TIMESTAMP_FIELDS,jb as ITEM_METADATA_KEY_ORDER,pa as ITEM_MUTATE_FLAG_CONTRACTS,ma as ITEM_REOPEN_FLAG_CONTRACTS,oI as ITEM_SCALAR_MISSING_VALUE,Uo as ITEM_TYPE_VALUES,cI as ITEM_UNION_COLLECTION_FIELDS,$P as JsonFileContextSignalStoreAdapter,ss as LEARNINGS_FLAG_CONTRACTS,sw as LEGACY_HISTORY_HASH_ALGORITHM,Qp as LINKED_TEST_ENV_NAME_PATTERN,eu as LINKED_TEST_PM_CONTEXT_MODE_VALUES,Zp as LINKED_TEST_PROTECTED_ENV_KEYS,tu as LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,Va as LIST_COMMANDER_STRING_OPTION_CONTRACTS,_O as LIST_COMMAND_DEFAULT_PROJECTIONS,FM as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,rs as LIST_FILTER_FLAG_CONTRACTS,TO as LIST_SORT_FIELDS,SO as LIST_SORT_ORDER_VALUES,Ii as MAINTENANCE_HISTORY_OPERATIONS,eM as MAX_CHILD_PROJECTION_ITEMS,IT as MAX_WORKFLOW_POLICIES,PT as MAX_WORKFLOW_POLICY_TERMS,Js as MEET_FLAG_CONTRACTS,TM as MERGE_DRIVER_ARTIFACT_VALUES,ls as MERGE_FLAG_CONTRACTS,Fe as MERGE_SUBCOMMAND_VALUES,EM as MUTATION_EVENT_WIRE_BUDGET,ie as MemoryRelationshipGraphAdapter,Xa as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,Ra as NEXT_FLAG_CONTRACTS,Hu as NEXT_OUTPUT_VALUES,is as NOTES_FLAG_CONTRACTS,ws as PACKAGE_FLAG_CONTRACTS,Es as PACKAGE_INIT_FLAG_CONTRACTS,Xs as PAUSE_TASK_FLAG_CONTRACTS,jd as PLAN_CREATE_METADATA_PARAMETER_KEYS,gs as PLAN_FLAG_CONTRACTS,tm as PLAN_SHOW_DEPTH_VALUES,Ke as PLAN_SUBCOMMANDS,rm as PLAN_TEMPLATE_NAMES,Oy as PM_AGENT_TASK_ACCOUNTING_MODES,pt as PM_AGENT_TASK_TRANSCRIPT_VERSION,Io as PM_BULK_LIFECYCLE_COMMAND_ALIASES,Li as PM_CLI_EXPECTED_ERROR_NAME,WE as PM_CLI_GRAMMAR_CONTRACT,qE as PM_CLI_GRAMMAR_NOUNS,Cn as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,zE as PM_CLI_SHARED_VERBS,ko as PM_COMMAND_ALIAS_CONTRACTS,te as PM_COMMAND_CAPABILITY_CONTRACTS,At as PM_COMMAND_DESTINATION_CONTRACTS,FO as PM_COMMAND_EXIT_CONTRACTS,$O as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Fn as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,NO as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,je as PM_COMMAND_POSITIONAL_CONTRACTS,fc as PM_COMMAND_VISIBILITY_CONTRACTS,NR as PM_COMPLETE_LIST_FINDING_CODES,US as PM_CONTEXT_INTENTS_FILE,wS as PM_CONTEXT_INTENT_CONTRACTS,Ro as PM_CONTEXT_OPS_COMMAND_ALIASES,hn as PM_CORE_COMMAND_NAMES,G as PM_CORPUS_SHAPE_SCHEMA,Sn as PM_DEPRECATED_TOOL_ACTIONS,xn as PM_DIAGNOSTIC_DEGRADATION_STEPS,Nn as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,kn as PM_DIAGNOSTIC_OUTPUT_CLASSES,wn as PM_DISCOVERABLE_TOOL_ACTIONS,Vr as PM_EPISODE_SCHEMA,kO as PM_ERROR_CODE_CATALOG,RO as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Jr as PM_EXACT_COVERAGE_METRICS,ln as PM_EXTENSION_CAPABILITY_CONTRACTS,gn as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,un as PM_EXTENSION_POLICY_MODE_CONTRACTS,_n as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,fn as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,pn as PM_EXTENSION_SERVICE_NAME_CONTRACTS,mn as PM_EXTENSION_TRUST_MODE_CONTRACTS,AR as PM_GITATTRIBUTES_END,ER as PM_GITATTRIBUTES_START,OR as PM_GITATTRIBUTES_V2_END,vR as PM_GITATTRIBUTES_V2_START,Sc as PM_GITIGNORE_END,Tc as PM_GITIGNORE_START,JI as PM_HISTORY_ATTESTATION_CONTRACT,Oo as PM_HISTORY_COMMAND_ALIASES,QS as PM_HISTORY_OPERATION_ALIASES,tw as PM_HISTORY_OPERATION_CONTRACT,ew as PM_HISTORY_OPERATION_PATTERNS,bn as PM_ITEM_ACTION_SUBCOMMANDS,JS as PM_ITEM_HISTORY_OPERATIONS,nt as PM_MCP_APPS_EXTENSION,Rr as PM_MCP_APPS_SERVER_CAPABILITY,we as PM_MCP_APPS_SPEC_VERSION,Mr as PM_MCP_APP_CONTRACTS,Pr as PM_MCP_APP_MIME_TYPE,gb as PM_MCP_ENTRY_TOOL_NAMES,m as PM_MCP_ERROR_CODES,xk as PM_MCP_HTTP_PROTOCOL_VERSION,Fh as PM_MCP_INPUT_REQUEST_METHODS,ok as PM_MCP_LEGACY_PROTOCOL_VERSIONS,er as PM_MCP_LOG_LEVELS,E as PM_MCP_META_KEYS,kD as PM_MCP_PROGRESSIVE_DISCOVERY_EXTENSION,xD as PM_MCP_PROGRESSIVE_DISCOVERY_SERVER_CAPABILITY,bc as PM_MCP_PROMPT_CONTRACTS,V as PM_MCP_PROTOCOL_VERSION,yc as PM_MCP_RESOURCE_CONTRACTS,st as PM_MCP_SKILLS_DRAFT_REVISION,kr as PM_MCP_SKILLS_EXTENSION,zg as PM_MCP_SKILLS_SERVER_CAPABILITY,P as PM_MCP_SKILL_LIMITS,Te as PM_MCP_SUBSCRIPTION_ID_META_KEY,Xe as PM_MCP_SUPPORTED_PROTOCOL_VERSIONS,Ak as PM_MCP_TASKS_EXTENSION,Xh as PM_MCP_TASK_STATUSES,fe as PM_MCP_TOOL_COMMAND_CONTRACTS,QC as PM_MODE_PAIRED_OUTPUT_PROJECTION_CONTRACTS,ad as PM_MUTATION_ACTION_CONTRACTS,ke as PM_NAMESPACED_COMMAND_ALIASES,qr as PM_OBSERVATION_SCHEMA,Mn as PM_OUTPUT_BUDGET_CLASSES,Pn as PM_OUTPUT_DEGRADATION_STEPS,Mt as PM_OUTPUT_ENVELOPE_KINDS,Dt as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,yn as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,Lt as PM_PACKAGE_RESOURCE_KINDS,Ue as PM_POSITIONAL_ACTION_CONTRACTS,Xd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Kd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,ZT as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,GT as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,XT as PM_READ_OUTPUT_DIMENSIONS,JT as PM_READ_OUTPUT_OPTION_FLAGS,zT as PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS,qT as PM_READ_OUTPUT_SESSION_MIN_TOKENS,YT as PM_READ_OUTPUT_SURFACES,QT as PM_READ_OUTPUT_SURFACE_CONTRACTS,ZC as PM_READ_ROW_CONTRACTS,JC as PM_READ_ROW_JQ_SELECTOR,AN as PM_RECOVERY_REFERENCE_FIELDS,de as PM_RECOVERY_REFERENCE_KINDS,Jy as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,ao as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2,kN as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE,so as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2,Po as PM_RELOCATED_COMMAND_ALIASES,td as PM_REPRODUCIBLE_PROCESS_ENV,GO as PM_SUCCESS_EXIT_CODES,Tn as PM_TOOL_ACTIONS,qd as PM_TOOL_ACTION_PARAMETER_CONTRACTS,Wd as PM_TOOL_PARAMETERS_SCHEMA,Hd as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,Vd as PM_TOOL_PARAMETERS_SCHEMA_VERSION,Gd as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,zr as PM_VERDICT_SCHEMA,ZS as PM_WORKSPACE_HISTORY_OPERATIONS,jr as PM_WORKSPACE_RECIPE_SCHEMA,hs as PROFILE_FLAG_CONTRACTS,Yt as PROFILE_LINT_CODES,Xt as PROFILE_LINT_DIMENSIONS,Bt as PROFILE_NAMES,We as PROFILE_SUBCOMMANDS,b as PmCliError,_e as PmClient,LR as PmCompleteListValidationError,y as PmMcpAuthorizationError,tr as PmMcpInputRequiredError,wr as PmMcpIssuerCredentialStore,u as PmMcpProtocolError,rr as PmMcpRequestStateReplayGuard,Fr as PmMcpSkillRegistry,mr as PmMcpSubscriptionRegistry,rt as PmMcpTaskStore,_T as QUERY_CURSOR_CONTRACT,Us as REINDEX_FLAG_CONTRACTS,YA as REINDEX_LOCK_ID,lt as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Ks as RELEASE_FLAG_CONTRACTS,Qs as REMIND_FLAG_CONTRACTS,Et as RESERVED_ITEM_FIELD_NAMES,Vs as RESTORE_FLAG_CONTRACTS,qo as RISK_VALUES,xE as RelationshipEventLog,NE as RelationshipEventStore,z as RelationshipGraph,Ne as RelationshipKindRegistry,_s as SCHEMA_FLAG_CONTRACTS,Ha as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,GM as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ia as SEARCH_FLAG_CONTRACTS,bu as SEMANTIC_ATTRIBUTION_LIMITS,zb as SETTINGS_DEFAULTS,Nm as SNAPSHOT_SCHEMA,fR as SOURCE_CONTEXT_ACCESS_ENV,_R as SOURCE_CONTEXT_WRITE_OVERRIDE_ENV,Ws as START_TASK_FLAG_CONTRACTS,ia as STATS_FLAG_CONTRACTS,jo as STATUS_VALUES,es as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,Pi as SUBSTANTIVE_HISTORY_OPERATIONS,vw as SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,Rw as SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,Hb as SUPPRESS_HOST_OUTPUT_MARKER,ra as TELEMETRY_FLAG_CONTRACTS,cf as TELEMETRY_SUBCOMMANDS,ta as TEST_ALL_FLAG_CONTRACTS,ea as TEST_FLAG_CONTRACTS,oa as TEST_RUNS_FLAG_CONTRACTS,of as TEST_RUN_MEASUREMENT_LIMIT,Ld as TOOL_ACTIVITY_OPTION_CONTRACTS,wd as TOOL_AGGREGATE_OPTION_CONTRACTS,Md as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,Nd as TOOL_CALENDAR_OPTION_CONTRACTS,xd as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,Dd as TOOL_CONTEXT_OPTION_CONTRACTS,Rd as TOOL_CREATE_OPTION_CONTRACTS,Od as TOOL_CREATE_OPTION_CONTRACT_SOURCE,$d as TOOL_DEPS_OPTION_CONTRACTS,Fd as TOOL_GRAPH_OPTION_CONTRACTS,Sd as TOOL_LIST_FILTER_OPTION_CONTRACTS,Ed as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,vd as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,Ad as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,kd as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,Pd as TOOL_UPDATE_OPTION_CONTRACTS,Id as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,qb as TYPE_TO_FOLDER,aA as UNKNOWN_SUBCOMMAND_COMPATIBILITY_CODES,Qd as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,tc as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,ec as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,ha as UPDATE_FLAG_CONTRACTS,ga as UPDATE_MANY_FLAG_CONTRACTS,Gs as UPGRADE_FLAG_CONTRACTS,da as VALIDATE_FLAG_CONTRACTS,RT as WORKFLOW_POLICY_ACTIONS,PR as WORKFLOW_POLICY_DOCUMENT_SCHEMA,IR as WORKFLOW_POLICY_SCHEMA,Oa as WORKSPACE_FLAG_CONTRACTS,Kw as WORKSPACE_HISTORY_ID,Lm as WORKSPACE_SNAPSHOT_ACTIONS,yl as WorkspaceGraphCache,GE as WorkspaceTransactionInterruptedError,qp as _testOnly,QP as _testOnlyAggregateCommand,hl as _testOnlyConfigCommand,iM as _testOnlyGetCommand,Ip as _testOnlyHealthCommand,Xc as _testOnlyInit,Hc as _testOnlyInitAgentGuidance,i0 as _testOnlyItemTransaction,RM as _testOnlyMutationEvents,YP as _testOnlyNextCommand,CM as _testOnlySearchCommand,VR as _testOnlySimilarity,sm as _testOnlyTemplates,Up as _testOnlyValidateCommand,MM as _testOnlyWorkspacePosition,JR as acceptAssuranceProposals,Fp as acknowledgeLinkedTests,ml as acknowledgeUnknownAuthorHistoryEvents,ul as acknowledgeUnknownAuthorHistoryEventsFromTransport,TE as acquireItemMetadataDerivedIndexLock,Ge as acquireLock,g0 as activateExtensionForTest,vC as activateExtensions,pi as agentSessionEnvironment,d_ as aggregate,Hm as analyzeAgentProvenanceDescriptorCoverage,Gv as analyzeDefectChangeRisk,UI as analyzeDefectRecurrenceCoverage,jl as analyzeDuplicateItems,DE as analyzeGraphImpact,nc as analyzeHierarchyIntegrity,$E as analyzeKnowledgeGraph,jO as analyzePmCommandExitConformance,En as analyzePmToolActionParity,OI as analyzeReconciliationDiscard,LE as analyzeRelationshipExecution,sp as analyzeRelationshipSchedule,kh as analyzeSdkActionCoverage,It as analyzeSdkCliParameterCompleteness,C_ as append,xi as appendHistoryEntry,Jw as appendWorkspaceAuditEvent,Yw as appendWorkspaceHistoryChange,uA as applyAcceptanceCriteriaMutations,XR as applyAssurancePreset,Fa as applyBootstrapPagerPolicy,LI as applyClosureTimestampFix,RS as applyContextIntentProjection,Vu as applyContextTagProjection,wO as applyFilterValueEcho,dE as applyHistoryPatch,ed as applyInvocationAuthorOverride,Ol as applyPathMigrations,aS as applyReadOutputDimensions,oS as applyReadOutputIncludeModes,HT as applyReadOutputSessionReferences,fE as applyRegisteredItemFieldDefaultsAndValidation,Ml as applyStandaloneNote,Xi as applyStoredExtensionMigrationState,fA as applyTagRemovals,sP as applyTerminalOrderingPolicy,kl as artifactKey,tC as asRecordClone,eC as asRecordOrNull,qe as assembleWorkspaceRelationshipGraph,GR as assertCompleteListResult,J0 as assertExtensionBlueprint,Y0 as assertExtensionCapabilityUsage,k0 as assertExtensionDeactivated,ek as assertExtensionManifestCompatible,Q0 as assertExtensionManifestMatchesBlueprint,tk as assertExtensionPreflight,ac as assertHierarchyMutationAllowed,WI as assertHistoryCompactTarget,II as assertHistoryRepairTarget,Xn as assertInitializedTracker,Rl as assertLinkedArtifactMutationIsUnambiguous,ik as assertMcpClientCapabilities,nk as assertMcpProtocolHeader,vy as assertMemoryRelationshipGraphAdapterConformance,gA as assertNoUnknownCsvKeys,x0 as assertPackageManifest,LA as assertParentReferenceIsNotSelf,cx as assertPmMcpSkillsCapability,Z0 as assertProjectProfile,wR as assertProjectRuntimeCompatibility,eT as assertProjectionModeChoice,Wn as assertReadableTrackerRoot,N0 as assertRegisteredCommandContract,z0 as assertRegisteredCommandOverride,U0 as assertRegisteredExporter,L0 as assertRegisteredFlags,D0 as assertRegisteredHook,G0 as assertRegisteredImporter,j0 as assertRegisteredItemField,B0 as assertRegisteredItemType,X0 as assertRegisteredMigration,V0 as assertRegisteredParserOverride,H0 as assertRegisteredPreflightOverride,q0 as assertRegisteredProfile,K0 as assertRegisteredRendererOverride,$0 as assertRegisteredSearchProvider,W0 as assertRegisteredServiceOverride,F0 as assertRegisteredVectorStoreAdapter,Db as assertRelationshipEdgeAllowed,eo as assertRelationshipGraphAdapterConformance,rA as assertSchemaPreviewSupported,JO as assuranceAssertionUpdateIsLoosening,MS as attachContextIntentReceipt,fS as attachContextUsageServingReceipt,Np as attachLinkedTestMutationProvenance,xp as attachLinkedTestProvenance,Je as attachMcpServerInfo,sT as attachOutputOmissionReceipt,xS as attachOutputTokenAccounting,kS as attachReadOutputContracts,KT as attachReadOutputSessionReceipt,Ic as auditMergeAttributeFence,RR as auditMergeDriverConfiguration,up as auditWorkspaceRelationshipGraph,Wk as authorizeMcpHttpRequest,ci as boundAgentEpisodeIdentity,ET as boundReadOutputRows,ju as buildChildrenByParent,fM as buildCompactSearchFilterSummary,EO as buildContentFilterEcho,DP as buildContextSignalSnapshot,cy as buildCorpusShapeItemPlan,Fv as buildDefectRecurrenceIndex,Gc as buildExtensionDescribeResult,jc as buildExtensionInstallPlan,AO as buildGovernanceMissingFilterEcho,qA as buildInvalidTypeError,rM as buildItemChildrenRollup,o0 as buildItemCompletionMutations,CP as buildItemContextRelevanceCandidates,OE as buildItemNotFoundError,nM as buildItemSchedule,DI as buildLinkedFileRepairReport,Gk as buildMcpAuthorizationDiscoveryUrls,Dh as buildMcpCompleteResult,ak as buildMcpDiscoverResult,zk as buildMcpDynamicRegistrationMetadata,Mk as buildMcpHttpRequestHeaders,uk as buildMcpInputRequiredResult,Fk as buildMcpProtectedResourceMetadata,Oc as buildMergeAttributePatterns,zd as buildPmActionToolInputSchema,LN as buildPmRefusalClosureCensus,zR as buildRelationshipContext,ev as buildSearchCorpus,rv as buildSemanticCorpusInput,kI as buildStatusRoleWarnings,Kn as buildTrackerInitializationRecovery,av as buildVectorizationEmbeddingIdentity,dv as buildVectorizationEmbeddingMetadata,_M as buildVerboseSearchFilters,MR as buildWorkflowCompletenessCheck,qP as buildWorkspaceMemorySnapshot,di as canonicalDocument,oC as canonicalizeCommandOptionKey,VM as canonicalizeCommandSuggestions,yP as canonicalizeContextRecencyCoordinate,xb as canonicalizeRelationshipKind,vN as censusPmRecoveryReferenceProducers,FR as certifyCompleteListResult,_0 as checkExtensionManifestCompatibility,oh as claim,nh as claimNext,jR as classifyHistoryAuthorEvent,Mi as classifyHistoryEvent,AI as classifyHistoryMergeReceiptReferences,_C as classifyHostEnvironmentFault,gM as classifyImplicitSemanticFallbackReason,ri as classifyItemFormatVersion,uf as classifyLinkedTestCommandSafety,mf as classifyLinkedTestFailure,qC as clearActiveExtensionHooks,Cp as clearDurableGraphCache,Tw as clearFocusedItem,Cf as clearWorkspaceContractsCache,rh as close,Hp as closeItem,uh as closeTask,ja as coalesceRepeatedListFlags,Vv as collectBlockedByIds,Kv as collectBlockedByIdsFromCorpus,hS as collectContextUsageDeliveredItemIds,pc as collectDanglingDependencyReferences,Xv as collectDependencyBlockedIds,cc as collectDuplicateDependencyRows,pp as collectDuplicateRelationshipEdgeGroups,hM as collectErrorCauseCodes,oc as collectHierarchyRelations,br as collectMcpHeaderAnnotations,uc as collectMissingDependencyTargetIds,Jp as collectNewOrderingCycleWarnings,dp as collectOrderingCycles,lc as collectOrderingStorageContradictions,qS as collectPackageContextIntentContracts,Ft as collectPackageExtensionDirectories,uE as collectRegisteredItemFieldNames,mw as collectRuntimeCreateFieldValues,zA as collectRuntimeFilterValues,fw as collectRuntimeUpdateFieldValues,Du as collectSubtreeIds,tn as collectUsedExtensionCapabilities,nC as commandOptionFlagLabel,p_ as comments,zf as commitImportedItem,n0 as commitItemCompletion,r0 as commitItemMutations,jE as commitWorkspaceTransaction,Qi as compactFlagAliasContracts,$u as compareCriticalItems,yR as comparePmDateVersions,FE as compareRelationshipSnapshots,lS as compareTimestampStrings,_P as compileHistoryProvenanceMatcher,vS as composeContextIntentContracts,d0 as composeExtension,f0 as composeExtensionPackage,Jv as computeActionabilityReport,PA as computeHistoryDiff,np as computeRelationshipCentrality,op as computeRelationshipDominators,gl as computeWorkspaceGraphFingerprint,S_ as config,BC as consumeAfterCommandAffectedItems,r_ as context,PS as contextIntentRowId,sh as copy,ff as countFailureCategories,ST as countReadOutputRows,Q_ as create,WR as createAssurancePreset,FI as createAssuranceWorkspaceContext,oA as createCheckpointId,DR as createCompleteListOptions,OC as createCoreCommandHookContext,Yr as createCorpusShapeMeasurement,rR as createEmptyAssuranceDocument,uC as createEmptyExtensionRegistrationRegistry,Hi as createExtensionCommandSdk,Qo as createExtensionContributionInventory,rk as createExtensionTestHarness,ki as createHistoryEntry,Ev as createLazyModule,kR as createLifecycleCompletenessPolicies,Xk as createMcpStaticBearerVerifier,vk as createMcpTaskStore,vE as createMutationGuardSdk,tT as createOutputOmissionReceipt,$i as createPmCliExpectedError,Hn as createPmCliProgram,Dn as createPmCommandOutputBudget,dT as createQueryFingerprint,Ay as createRelationshipGraphScaleFixture,Z as createRelationshipGraphSnapshot,gt as createRelationshipKindRegistry,od as createReproducibleProcessRunner,uM as createSearchCursorFingerprint,RC as createSerialQueue,wA as createStdinTokenResolver,dA as createUnknownSubcommandError,FT as createWorkflowPolicyEvaluator,Dm as createWorkspaceSnapshot,y0 as deactivateExtensionForTest,wL as declineServiceOverride,IS as decodeContextIntentCursor,wv as decodeHtmlEntitiesInOptions,yr as decodeMcpHttpHeaderValue,LS as decodePmTableRows,uT as decodeQueryCursor,lT as decodeQueryCursorEnvelope,pT as decodeQueryCursorState,BT as decodeReadOutputContinuationCursor,ex as decoratePmMcpToolsWithApps,Nl as dedupeLinkedArtifacts,SP as defaultScoreContextCandidates,IL as defineAfterCommandHook,OL as defineBeforeCommandHook,RL as defineBeforeMutationHook,pL as defineCommand,yL as defineCommandOverride,W as defineCorpusShape,bx as defineEpisodeSpecification,vL as defineExporter,s0 as defineExtension,a0 as defineExtensionBlueprint,cL as defineExtensionManifest,uL as defineFlag,AL as defineImporter,fL as defineItemField,mL as defineItemType,_L as defineMigration,Qg as defineObservationContract,kL as defineOnIndexHook,ML as defineOnReadHook,PL as defineOnWriteHook,bL as defineParserOverride,$n as definePmCommandOutputBudget,xO as definePmCommandOutputEnvelope,IO as definePmErrorCodeCatalog,CL as definePreflightOverride,lL as defineProjectProfile,EL as defineRendererOverride,hL as defineSearchProvider,TL as defineServiceOverride,gL as defineVectorStoreAdapter,oy as defineVerdictContract,Ee as defineWorkspaceRecipe,ah as deleteItem,Bm as deleteWorkspaceSnapshot,$b as dependencyToRelationship,y_ as deps,YR as deriveAssuranceProposals,xI as deriveClosureTimestamp,l0 as deriveExtensionCapabilities,BO as derivePmBulkMutationEffect,ON as derivePmRecoveryReferenceObligations,ap as deriveRelationshipDeadlines,xc as deriveSchemaEvolutionMigrationId,hv as deriveTelemetryCommandResolution,WA as describeAllowedTransitions,mR as describeExtensionActivation,p0 as describeExtensionBlueprint,Eu as describeItemOwnershipConflict,yx as describeObservationCost,Kt as describeProfileComposition,Wt as describeProjectProfile,HS as describeUnknownError,Ti as detectAgentIdentity,Ai as detectHarnessIdentity,tp as detectRelationshipCommunities,Si as diagnoseAgentIdentity,mp as diffRelationshipAuditSnapshots,af as diffTestRunMeasurements,_k as digestMcpRequestParameters,EC as discoverExtensions,Wo as discoverNearbyPmRoot,LD as discoverPmTools,CR as discoverProjectRuntimeVersionPins,g_ as docs,l_ as duplicates,hp as durableGraphCachePath,Tp as durableGraphCacheStatus,ei as effectiveItemFormatVersion,xv as emitTelemetryErrorEvent,qf as emptyImportedDocument,iI as encodeItemScalarDecisionValue,gr as encodeMcpHttpHeaderValue,NS as encodePmTableRows,cT as encodeQueryCursor,jT as encodeReadOutputContinuationCursor,_E as enforceHistoryStreamPolicyForItem,hE as enforceHistoryStreamPolicyForItems,vO as enrichCliFlagInvocationContract,Pt as enrichCliFlagInvocationContracts,lE as ensureMaterializedHistoryTarget,Ec as ensurePmGitignore,Sl as ensureScope,_v as ensureSentryInit,Bf as ensureTrackerInitialized,Ql as enumerateRelationshipPaths,Un as estimatePmOutputTokens,nR as evaluateAssuranceAssertion,iR as evaluateAssuranceGate,$x as evaluateBoundaryFixtures,vP as evaluateContextRanking,Uv as evaluateDefectGateEvidence,oR as evaluateMeasurement,Em as evaluateMetricFloors,cd as evaluateMutationGuard,Zm as evaluateProvenanceCoverage,YL as evaluateReliabilityWindow,Xm as evaluateSemanticAttributionCoverage,ql as evaluateSimilarityGovernance,KA as evaluateTransition,ny as evaluateVerdictContract,$T as evaluateWorkflowPolicies,sd as executeEmbeddingBatchesWithRetry,iv as executeVectorDelete,sv as executeVectorReset,nv as executeVectorUpsert,Xg as executeWorkspaceRecipe,Pl as expandAddGlobEntries,Vl as explainSourceTraceability,QI as exportAttestation,mh as extension,_h as extensionActivate,hh as extensionDeactivate,fh as extensionList,lb as extensionMigrate,EI as extractHistoryMergeReceiptDispositions,wI as extractHistoryMergeReceiptReferences,Vk as extractMcpTraceContext,sE as extractPatchFailureContext,Pp as extractReferencedPmItemIdsFromCommand,Ey as federateRelationshipGraphSnapshots,f_ as files,__ as filesDiscover,h_ as filesLookup,gS as finalizeContextUsageDelivery,_y as findCoverageDeficits,Bl as findDuplicateClusters,vc as findGitWorkspaceRoot,Gw as findHistoryIdentityDiscontinuities,$c as findInstalledNpmPackageCandidate,Qk as findPmMcpAppByUri,Mo as findPmNamespacedCommand,rp as findRedundantRelationshipEdges,ip as findRelationshipCutStructure,Ul as findSimilarItems,kv as finishTelemetryCommand,bC as flattenFlagListValue,uy as flushTelemetryQueue,ch as focus,ep as forEachMatchedRelationshipEdge,lp as formatDuplicateEdgeGroup,ic as formatHierarchyRelation,cp as formatOrderingStorageContradiction,KE as formatPmPositionalActionFlagTip,ym as formatProfileApplyHuman,gm as formatProfileLintHuman,_m as formatProfileListHuman,hm as formatProfileShowHuman,Dc as formatSchemaEvolutionMigrationHuman,bM as formatVectorIndexRecoveryWarnings,PM as formatWorkspacePositionHuman,K_ as gc,ji as generateItemId,s_ as get,GC as getActiveCommandResult,ES as getActiveContextIntentContracts,on as getActiveExtensionRegistrations,Kk as getActiveMcpTraceContext,aR as getAssuranceDeclaration,Ih as getContracts,bw as getFocusedItem,Jo as getHistoryPath,kE as getItemAt,Yo as getItemPath,ud as getMutationActionContract,wc as getPmGitignoreBlock,Xo as getSettingsPath,Tf as getWorkspaceContracts,Ww as getWorkspaceHistoryPath,b_ as graph,gp as graphAuditBaselinePath,Ym as groupHistoryByEpisode,SL as handleServiceOverride,sk as hasMcpClientExtension,Zk as hasPmMcpAppsCapability,Be as hasSubcommandFlagContractsForCommand,cv as hasVectorizationEmbeddingIdentityChanged,lv as hasVectorizationVectorDimensionChanged,Dw as hashDocument,$w as hashDocumentForVersion,Fw as hashEmptyDocument,Pw as hashHistoryPatch,Iw as hashHistoryRecord,Mw as hashHistoryStream,sI as hashItemScalarDecisionValue,H_ as health,Xl as hierarchyAncestors,Yl as hierarchyDescendants,J_ as historyCompact,Z_ as historyCompactBulk,cw as historyDigest,fP as historyEntryMatchesProvenance,bR as historyItemHashVersionForRuntime,W_ as historyRedact,X_ as historyRepair,Y_ as historyRepairAll,Hv as indexBlockedByIds,sc as indexHierarchyRelations,pv as inferConsistentVectorDimension,Ln as inferPmOutputBudgetClass,T_ as init,$R as inspectCompleteListResult,mC as inspectExtensionManifestSchema,al as inspectHistoryAuthorStream,fI as inspectMergeReceiptEvidence,SR as inspectProjectRuntimeCompatibility,bd as inspectStaleInProgressItems,xh as inspectStaticExtensionInventory,MI as inspectStatusRoleAssignments,Xw as inspectWorkspaceHistoryState,$m as inspectWorkspaceSnapshot,kc as installMergeFence,dk as interpretMcpResultType,Wu as isAlreadyClaimedError,XS as isCommanderError,rl as isErrnoError,Nv as isExternalDependencyReference,Lv as isExternalDependencySourceKind,ue as isFileMissingError,Wb as isHostOutputSuppressed,Di as isItemAlreadyExistsError,nI as isItemScalarMissingValue,CI as isLegacyMergeReceiptSummary,_ as isMcpRecord,ld as isMutationAction,Lb as isOrderingRelationshipKind,xA as isPlaceholderReferenceToken,Fi as isPmCliExpectedError,vn as isPmExtensionCapabilityContract,Rn as isPmExtensionPolicyModeContract,In as isPmExtensionPolicySurfaceContract,On as isPmExtensionServiceNameContract,UO as isPmKnownExitCode,LO as isPmMutationReceipt,He as isPmSuccessfulExitCode,An as isPmToolAction,TI as isPreDurableCloneLocalReceiptSummary,SI as isPreDurableDispositionEligibleReference,TR as isProjectMutatingInvocation,Av as isPureSnakeCaseAlias,dS as isReadOutputBudgetExceeded,oT as isReadRowContract,Jc as isRuntimeRecord,Rv as isTerminalPlanMode,hw as isTerminalStatus,Vn as isTimestampLiteral,QM as itemDocumentToMutationOptions,oM as itemHasSchedule,md as jaccardSimilarity,m_ as learnings,pC as levenshteinDistanceWithinLimit,Qc as limitAnnotationEntries,Lp as linkedTestTrustFingerprint,u0 as lintExtensionBlueprint,fC as lintExtensionManifestSchema,Jt as lintProjectProfile,o_ as list,hi as listAgentProvenanceAdapters,Ua as listAliasPluralKeys,n_ as listAllComplete,EE as listAllDocumentCandidatesCached,Vi as listAllItemMetadata,AE as listAllItemMetadataLight,sR as listAssuranceDeclarations,uR as listAssuranceVerdicts,ay as listBuiltinCorpusShapes,HM as listCoreClosedDomainContracts,yO as listGetProjectionFields,tI as listInvalidProvenanceHistoryStreamIds,hO as listListProjectionFields,_I as listMergeReceipts,pd as listMutationActions,AM as listMutationEvents,uo as listPmCommandFlagBudgets,hc as listPmCommandsForFamily,_c as listPmCommandsForTier,Ie as listPmFlagLexicon,iL as listPmFlagSpellingInventory,gc as listPmMcpToolsForProfile,WN as listPmRequiredArgumentRefusalContracts,XN as listPmSubcommandRefusalContracts,Ht as listProfiles,ZN as listTrackerPreflightRecoveryContracts,Fm as listWorkspaceSnapshots,zS as loadContextIntentRuntimeLayers,am as loadCreateTemplateOptions,AC as loadExtensions,wp as loadGraphAuditBaseline,iA as loadMutationCheckpoint,x as loadRelationshipGraphAdapter,qi as locateItem,hA as looksLikeGenericKeyValueEntry,wT as mapReadOutputRows,hI as markMergeReceiptReconciled,VA as matchesRuntimeFilters,Pv as maybeRunFirstUseTelemetryPrompt,ly as measureCorpusShapePlan,Bi as measureItemMetadataReadWork,mA as mergeAdditiveTags,c0 as mergeExtensionBlueprints,aI as mergeHistoryStreams,pI as mergeItemDocuments,uI as mergeJsonDocuments,Ba as mergeLinkedTestTwoTokenEntries,dI as mergeRelationshipEventStreams,qu as mergeSortedWarnings,Ov as migrateItemFilesToFormat,IE as mutateItem,RE as mutateItemWithHistoryContext,Zw as mutateWorkspaceJsonWithHistory,a_ as next,yi as normalizeAgentProvenanceAdapterValue,Zc as normalizeAnnotationTransportOptions,KO as normalizeAssuranceEvaluation,HO as normalizeAssuranceMutation,qa as normalizeBootstrapInvocation,OA as normalizeBulkIdsValue,dc as normalizeDependencyGraphTarget,pO as normalizeDependencySeedId,lO as normalizeDependencySourceKind,Zo as normalizeExtensionContributionInventory,nw as normalizeHistoryOperationForWrite,eI as normalizeInvalidHistoryProvenance,tA as normalizeItemAddressInvocation,ti as normalizeItemFormatVersion,Ui as normalizeItemId,ii as normalizeItemMetadata,uO as normalizeItemReference,Ga as normalizeLegacyExtensionActionSyntax,Il as normalizeLinkedPath,kA as normalizeParentReferenceValue,zt as normalizeProfileName,Gi as normalizeRawItemId,nS as normalizeReadOutputIncludeModeOptions,qw as normalizeReplayPatchOps,fd as normalizeSimilarityText,_w as normalizeStatusForRegistry,ni as normalizeStatusInput,pw as normalizeStatusInputWithRegistry,WS as normalizeThrownExitCode,u_ as notes,zn as nowIso,yp as openDurableGraphCache,fk as openMcpRequestState,Cx as openPmEpisode,Jl as orderingPredecessors,Zl as orderingSuccessors,MP as packContextCandidates,Fu as packRankedContextItems,vh as packageActivate,Ah as packageCatalog,Oh as packageDeactivate,wh as packageDescribe,Th as packageDoctor,bh as packageInstall,gh as packageLifecycle,yh as packageList,Sh as packageManage,pb as packageMigrate,Eh as packageReload,Ch as packageUninstall,fT as paginateQueryRows,wl as parseAddEntries,El as parseAddGlobEntries,tl as parseAnnotationTextInput,YM as parseAtomicMutationControls,$a as parseBootstrapCommandName,Na as parseBootstrapGlobalOptions,Da as parseBootstrapHelpRequest,za as parseBootstrapTypeValue,vA as parseBulkIdsText,Nu as parseContextDepth,Pu as parseContextFocusFields,jS as parseContextIntentDeclarations,Lu as parseContextSections,LP as parseContextSignalSnapshot,_A as parseCsvKv,Bv as parseDefectChangeRiskRequest,GI as parseDefectRecurrenceCoverageRequest,jv as parseDefectRecurrencePolicy,wm as parseEvalMetricFloors,Rm as parseEvalQuerySet,vp as parseGraphSubcommand,ZI as parseHistoryAttestation,uP as parseHistoryProvenanceFilters,Zv as parseIntegerLimit,gw as parseItemDocument,JM as parseItemMutationBatch,BA as parseLimit,lu as parseLinkedTestAssertionEqualsMap,pu as parseLinkedTestAssertionGteMap,nu as parseLinkedTestBoolean,iu as parseLinkedTestContextMode,ou as parseLinkedTestEnvClear,ru as parseLinkedTestEnvSet,uu as parseLinkedTestJsonEntries,cu as parseLinkedTestMinLines,du as parseLinkedTestRegexList,au as parseLinkedTestStringList,su as parseLinkedTestWorkspaceContextMode,jh as parseMcpCachePolicy,Nh as parseMcpImplementation,et as parseMcpInputRequests,sr as parseMcpInputResponses,pg as parseMcpSubscriptionFilter,vl as parseMigrateEntries,tO as parseMultiValueFilter,DO as parseMutationReceipt,AA as parseOptionalNonNegativeInteger,EA as parseOptionalNumber,bN as parsePmAgentTaskTranscriptCorpus,ND as parsePmToolDiscoveryOptions,Qv as parsePriority,nO as parsePriorityFilterSet,VT as parseReadOutputSession,mE as parseRegisteredItemFieldAssignments,se as parseRelationshipGraphSnapshot,Al as parseRemoveEntries,zl as parseSourceLineRange,FA as parseStatusFilterCsv,rO as parseStringFilterSet,id as parseTags,nf as parseTestRunMeasurements,eO as parseType,oO as parseTypeFilterSet,pl as parseUnknownAuthorHistoryEventCoordinates,MT as parseWorkflowPolicy,kT as parseWorkflowPolicyDocument,JP as partitionDecisionEntries,IA as patchPathToChangedField,Do as pathExists,ph as pauseTask,bp as persistDurableGraphResult,oE as persistSelectedItemFormat,qR as planAgentIdentityVocabularyMutation,jP as planCompletedAtBackfill,Bc as planExtensionDirectoryCopy,Zt as planProfileApplication,wN as planRelationshipEventBackfill,Ap as planRelationshipRemediation,Nc as planSchemaEvolutionMigration,cl as planUnknownAuthorHistoryAcknowledgment,Gm as planWorkspaceSnapshotRestore,YE as positionalShapeKey,JE as positionalSignatureKey,h0 as preflightExtension,hd as prepareSimilarityText,bA as preserveMutationStdinTokenFields,yA as preserveMutationStdinTokenLiterals,t0 as previewItemMutations,GS as printError,FS as printResult,U_ as profile,q_ as profileApply,z_ as profileLint,j_ as profileList,B_ as profileShow,jC as projectAfterCommandItemSnapshot,Mu as projectContextFocusRows,rf as projectFleetAttributionAnalytics,mP as projectHistoryProvenance,Bn as projectPmDiagnosticOutput,qn as projectPmDiagnosticText,ef as projectProvenanceCoverageAnalytics,Gp as projectValidateCounts,ZR as promoteAssuranceAssertion,_S as propagateContextUsageServingReceipt,qx as pruneCompileCacheGenerations,dR as putAssuranceDeclaration,cR as putAssuranceDeclarationBundle,gE as queryItemMetadataIndex,yE as queryLinkedFileMetadataIndex,bE as querySimilarItemMetadataIndex,sf as queryTestRunMeasurementsBelow,dn as quoteCommandArg,an as quoteWindowsCommandArg,zM as rankCommandPaths,el as readAnnotationEntries,wi as readAuthorEnvironment,wf as readBooleanOption,SS as readContextUsageAffinity,Ef as readCsvListOption,Wi as readExtensionMigrationState,$o as readFileIfExists,Ja as readFirstStringFromCommanderOptions,Za as readFirstValueFromCommanderOptions,Jm as readHistoryAnalyticsWindow,Ew as readHistoryEntries,Oi as readHistorySnapshot,zm as readImprovementLedger,SE as readItemMetadataDerivedIndexState,zi as readLocatedItem,TT as readOutputBudgetCollections,UT as readOutputCollectionFingerprint,CT as readOutputContinuationRowCollections,yT as readOutputContinuationRowPaths,rS as readOutputIncludeModeOptions,bT as readOutputRowCollections,gT as readOutputRowPaths,WT as readOutputSessionRemainingTokens,$t as readPmPackageManifest,bf as readRequiredString,Ni as readSettings,nE as readSettingsWithMetadata,Qa as readStringArrayFromCommanderOptions,Sf as readStringOption,KS as readThrownExitCode,uv as readVectorizationStatusLedger,pE as readWorkflowPolicies,xT as readWorkflowPolicyField,BS as readWorkspaceContextIntentContracts,GP as readWorkspaceContextSignals,zP as readWorkspaceMemory,IM as readWorkspacePosition,Hw as reanchorHistoryEntries,rn as reconcileExtensionCapabilityUsage,eE as reconcileWorkspaceJsonHistory,UC as recordAfterCommandAffectedItem,pR as recordAssuranceVerdict,hu as recordClaimSemanticAttribution,bS as recordContextUsageDelivery,yS as recordContextUsageServing,CS as recordContextUsageTouch,TS as recordContextUsageTouches,yu as recordFocusSemanticAttribution,qm as recordImprovementObservation,gu as recordReleaseSemanticAttribution,wE as refreshItemMetadataDerivedIndex,Pc as refreshMergeAttributeFenceIfInstalled,vT as refreshReadOutputDeliveredCounts,fv as refreshSearchArtifactsForMutation,gi as registerAgentProvenanceAdapters,dO as registerExternalDependencyResolver,_i as registerHarnessSignalDescriptors,YC as registerOutputMaterialFieldGroups,ih as release,AT as rememberReadOutputFocusRows,lR as removeAssuranceDeclaration,Fo as removeFileIfExists,$l as renameArtifactsResultKey,vu as renderCalendarMarkdown,Ou as renderCalendarToon,zu as renderContextMarkdown,Uc as renderExtensionDescribeMarkdown,Fc as renderExtensionSurfaceMarkdown,Kf as renderGuideMarkdown,BM as renderMissingOptionRetry,ZP as renderNextMarkdown,KM as renderPmClosedDomainHelp,cn as renderPmCommand,Lo as renderPmCommandAliasMigrationHint,Cc as renderPmCommandVisibilityMarkdown,aL as renderPmFlagLexiconMarkdown,tx as renderPmMcpAppHtml,DN as renderPmRefusalClosureCensusMarkdown,UA as renderRowsAsCsv,jA as renderRowsAsTable,th as reopen,cE as replayHistoryToTarget,jw as replayToCanonicalItemDocument,Uw as replayToItemDocument,ow as requireHistoryOperation,nP as requireTerminalReason,iP as requireTerminalReasonWithRecovery,Nw as resealHistoryRewrite,DC as resetActiveExtensionRuntimeState,Cl as resetWorkspaceGraphCache,li as resolveAgentSessionContextFromSignals,sl as resolveAnnotationIndex,ol as resolveAnnotationInput,ww as resolveAuthor,vi as resolveAuthorIdentity,MA as resolveBodyFileContent,dy as resolveBuiltinCorpusShape,Au as resolveCalendarOutputFormat,PO as resolveCanonicalPmErrorCodeContract,Nb as resolveCanonicalRelationshipKind,Sw as resolveClaimPrincipal,RA as resolveCliBulkIdsInput,aC as resolveCommandOptionPolicyState,Bx as resolveCompileCacheGeneration,UP as resolveCompletionTimestamp,Jb as resolveConfiguredPmPackageRoot,CO as resolveContentFieldFilters,OS as resolveContextIntentContract,ku as resolveContextOutputFormat,xu as resolveContextTokenBudget,aP as resolveCreateExplicitEmptyFlag,dM as resolveEffectiveSearchMode,ZA as resolveEmbeddingProviders,qc as resolveExtensionInstallSourceIdentity,Ki as resolveExtensionMigrationStatePath,wC as resolveExtensionRoots,cO as resolveExternalDependencyReference,yC as resolveFlagValueKind,lC as resolveGlobalPmRoot,Vf as resolveGuideOutputFormat,Vm as resolveHistoryEpisodeGroupIdentity,dw as resolveHistoryHashAlgorithm,rw as resolveHistoryOperation,pP as resolveHistoryProvenanceDimensions,PE as resolveHistorySubject,aE as resolveHistoryTarget,lM as resolveHybridSemanticWeight,Ko as resolveImplicitPmRoot,pS as resolveIsoOrRelative,Wv as resolveItemBlockers,qv as resolveItemExecutionRole,ZM as resolveItemMutationDocument,Ho as resolveItemTypeRegistry,lw as resolveItemTypesFilePath,_f as resolveLinkedTestFailureExitCode,Mp as resolveLinkedTestSourceRef,kp as resolveLinkedTestSourceWorkspaceRoot,Dp as resolveLinkedTestTrust,$p as resolveLinkedTestTrustBatch,ug as resolveMcpAcknowledgedSubscriptionFilter,Ye as resolveMcpRequestContext,Ac as resolveMergeInstallContext,bO as resolveMissingMetadataFilters,jM as resolveMissingOptionPlaceholder,rT as resolveModePairedOutputOmissionReceipt,XP as resolveNextOutputFormat,iT as resolveOutputOmissionReceipt,Yb as resolvePmCliVersion,No as resolvePmCommandAlias,ze as resolvePmCommandCapabilityFamily,xt as resolvePmCommandExitContract,L as resolvePmCommandOperation,Gn as resolvePmCommandOutputBudget,kt as resolvePmCommandOutputEnvelope,VE as resolvePmCommandPositionalContract,Ve as resolvePmCommandVisibilityTier,jn as resolvePmDiagnosticOutputBudget,MO as resolvePmErrorCodeContract,sb as resolvePmFlagSemanticConcept,xe as resolvePmHistoryOperation,Xb as resolvePmPackageRootFromModule,HE as resolvePmPositionalActionContract,ka as resolvePmPositionalActionFlagContracts,De as resolvePmRoot,Ud as resolvePmToolCustomFieldCollision,DA as resolvePriority,Vt as resolveProfile,Rc as resolveProjectMergeTypeFolders,mT as resolveQueryCursorStart,iS as resolveReadOutputDimensions,cS as resolveReadOutputEncoding,OT as resolveReadOutputRecoveryBudget,eS as resolveReadOutputSurface,nT as resolveReadRowContract,UM as resolveRecoveryCommandName,cA as resolveRegisteredSearchProvider,lA as resolveRegisteredVectorStoreAdapter,rd as resolveReproducibleProcessEnvironment,Jn as resolveRuntimeFieldRegistry,Yn as resolveRuntimeStatusRegistry,QA as resolveSearchCorpusFields,aM as resolveSearchMaxResults,mM as resolveSearchPage,cM as resolveSearchScoreThreshold,pM as resolveSearchTuning,tv as resolveSemanticCorpusCharacterLimit,_u as resolveSemanticLineageIds,XA as resolveSettingsWithSemanticRuntimeDefaults,hR as resolveSourceContextWritePolicy,Su as resolveStartTaskInProgressStatus,ee as resolveSubcommandFlagContractsForCommand,Vb as resolveTelemetryErrorCategory,oP as resolveTerminalReason,sC as resolveTypeDefinition,iC as resolveTypeName,GA as resolveTypeSynonym,HA as resolveTypeWorkflows,ll as resolveUnknownAuthorAcknowledgmentSelector,yM as resolveVectorIndexRecovery,ov as resolveVectorStores,rc as resolveWorkspaceRelationshipKindRegistry,cC as resolveWorkspaceRoot,dh as restore,sA as restoreCheckpointItems,tE as restoreWorkspaceJsonFromHistory,jm as restoreWorkspaceSnapshot,Um as restoreWorkspaceSnapshotWithRecovery,Mh as runAction,zC as runActiveBeforeMutationHooks,HC as runActiveCommandHandler,VC as runActiveOnIndexHooks,sn as runActiveOnReadHooks,nn as runActiveOnWriteHooks,KC as runActiveParserOverride,WC as runActivePreflightOverride,XC as runActiveServiceOverride,Iu as runActivity,SC as runAfterCommandHooks,bm as runAggregate,il as runAnnotationCommand,Vp as runAppend,qI as runAssuranceAction,zI as runAssuranceDispatch,TC as runBeforeCommandHooks,Ru as runCalendar,Xu as runClaim,Yu as runClaimNext,Kp as runClose,Xp as runCloseMany,em as runCloseTask,fl as runComments,Wf as runCompletion,_l as runConfig,jt as runContext,IP as runContextEvaluationCorpus,OP as runContextEvaluationScenario,Yp as runCopy,mu as runCreate,fu as runDelete,Tl as runDeps,Fl as runDocs,HR as runDuplicates,Pm as runEval,km as runEvent,zc as runExtension,Ji as runExtensionMigrateAction,Yi as runExtensionMigrations,Hl as runFiles,Wl as runFilesDiscover,Kl as runFilesLookup,tf as runFleetAttributionAnalytics,Tu as runFocus,Bp as runGc,Cm as runGet,Op as runGraph,Hf as runGuide,Rp as runHealth,sM as runHistory,tP as runHistoryAttest,HI as runHistoryCompact,XI as runHistoryCompactBulk,vI as runHistoryMaintenance,YI as runHistoryRedact,RI as runHistoryRepair,PI as runHistoryRepairAll,Yc as runInit,Kc as runInitAgentGuidance,zp as runLearnings,Dl as runLinkedArtifacts,hf as runLinkedTests,mc as runList,Mm as runMeet,SM as runMergeDriver,Mc as runMergeInstall,yI as runMergeReceiptEvidenceReport,gI as runMergeReceiptReport,wM as runMergeReconcile,Ku as runNext,im as runNotes,Qu as runPauseTask,om as runPlan,fm as runProfileApply,mm as runProfileLint,pm as runProfileList,um as runProfileShow,Qm as runProvenanceCoverageAnalytics,b0 as runRegisteredCommandForTest,E0 as runRegisteredCommandOverrideForTest,M0 as runRegisteredExporterForTest,T0 as runRegisteredHookForTest,P0 as runRegisteredImporterForTest,I0 as runRegisteredMigrationForTest,C0 as runRegisteredMutationGuardForTest,S0 as runRegisteredParserOverrideForTest,w0 as runRegisteredPreflightOverrideForTest,A0 as runRegisteredRendererOverrideForTest,O0 as runRegisteredSearchProviderForTest,v0 as runRegisteredServiceOverrideForTest,R0 as runRegisteredVectorStoreAdapterForTest,Qt as runReindex,Ju as runRelease,xm as runRemind,cP as runReopen,Wp as runRestore,Lc as runSchemaEvolutionMigration,Tm as runSearch,py as runSearchRefreshWorkerEntrypoint,Xf as runStartBackgroundRun,Zu as runStartTask,df as runStats,lf as runTelemetry,cm as runTemplatesList,dm as runTemplatesSave,lm as runTemplatesShow,gf as runTest,yf as runTestAll,Yf as runTestRunsList,Zf as runTestRunsLogs,e_ as runTestRunsResume,Jf as runTestRunsStatus,Qf as runTestRunsStop,t_ as runTestRunsWorker,wu as runUpdate,nm as runUpdateMany,Gt as runUpgrade,jp as runValidate,Ph as runWithActiveExtensions,D as runWithAgentSessionContext,rE as runWithConfigurationOnlySettings,AS as runWithContextIntentContracts,VS as runWithDiscoveredContextIntentContracts,bi as runWithHarnessDetectionSignals,Hk as runWithMcpTraceContext,nd as runWithReproducibleProcessEnvironment,Ci as runWithWorkspaceHarnessSignalDescriptors,Br as runWithWorkspaceRecipe,xR as runWorkflowPolicyAction,VI as runWorkspaceTransactionGc,Ep as saveGraphAuditBaseline,NI as scanClosureTimestamps,QR as scanExtensionHostVersions,dl as scanHistoryAuthorAttribution,oi as scanItemFormatVersions,dd as scanMutationSecrets,rI as scanProvenanceResolverHealth,Cd as scanStaleInProgressItems,$I as scanStorageIntegrity,w_ as schema,P_ as schemaAddField,R_ as schemaAddStatus,v_ as schemaAddType,N_ as schemaApplyPreset,L_ as schemaInferTypes,E_ as schemaList,k_ as schemaListFields,F_ as schemaRemapStatus,M_ as schemaRemoveField,I_ as schemaRemoveStatus,O_ as schemaRemoveType,$_ as schemaRenameField,D_ as schemaRenameType,A_ as schemaShow,x_ as schemaShowField,G_ as schemaShowStatus,qM as scoreCommandPathMatch,wP as scoreContextCandidates,EP as scoreContextCandidatesWithActiveExtensions,gd as scoreItemSimilarity,YN as scorePmGrammarRefusalClosure,GN as scorePmRefusalClosure,yd as scorePreparedItemSimilarity,QN as scoreTrackerPreflightRecoveryClosure,kw as sealHistoryRecord,mk as sealMcpRequestState,i_ as search,KP as searchWorkspaceMemory,WP as searchWorkspaceMemoryReadResult,Yv as selectActionableEntries,aT as selectCursorSemanticOptions,jf as selectImportAuthor,jk as selectMcpClientRegistrationMode,HP as selectWorkspaceMemory,VP as selectWorkspaceMemoryRollups,Cu as semanticAttributionAffinity,Cv as sentryCaptureCliError,bv as sentryFinishCommandSpan,Sv as sentryFlush,Tv as sentryLogCliUsageError,gv as sentrySetCommandContext,yv as sentryStartCommandSpan,ai as serializeItemDocument,WM as serializeNdjsonRows,XM as serializeNdjsonStream,ey as serveDeclaredObservation,$C as setActiveCommandContext,FC as setActiveCommandResult,PC as setActiveExtensionCommands,IC as setActiveExtensionHooks,MC as setActiveExtensionParsers,kC as setActiveExtensionPreflight,LC as setActiveExtensionRegistrations,NC as setActiveExtensionRenderers,xC as setActiveExtensionServices,Cw as setFocusedItem,Iv as shouldCompletePlanOnClose,Sp as shouldPersistDurableGraphCache,SA as shouldResolveMutationStdinTokenField,TA as shouldResolveMutationStdinTokens,JA as shouldRunSearchRefreshInForeground,Gl as similarityAdvisoryWarnings,hT as sliceReadOutputRowCollection,xl as sortLinkedArtifacts,pA as splitAcceptanceCriteria,vv as splitCommaList,si as splitFrontMatter,sS as stabilizeReadOutputReceiptEstimates,I as stableStringify,CC as stableValueEquals,lh as startTask,Mv as startTelemetryCommand,c_ as stats,uw as statusIsTerminal,La as stripGlobalBootstrapTokens,vM as subscribeMutationEventBatches,OM as subscribeMutationEvents,BR as summarizeAgentIdentityVocabulary,Km as summarizeAgentModelProvenance,Wm as summarizeAgentProvenance,RP as summarizeContextEvaluationReports,pf as summarizeContextPreflight,hP as summarizeHistoryProvenance,Wc as summarizeInitResult,mI as summarizeMergeReceipt,dP as supportsCreateExplicitEmpty,eA as supportsItemIdAlias,Kb as suppressHostOutput,ve as syncRelationshipGraphAdapter,m0 as synthesizeExtensionManifest,xa as toCompletionFlagString,Bu as toContextFocusItem,Gu as toContextPackingSummary,Uu as toContextRankingSummary,Qb as toErrorMessage,vf as toEstimatedMinutesValue,$M as toExtensionFlagDefinitions,Mf as toImportBoolean,Lf as toImportConfidence,Pf as toImportInteger,Gf as toImportLinkedDocs,Ff as toImportLinkedFiles,Uf as toImportLinkedTests,$f as toImportLogEntries,Df as toImportNormalizedEnum,Nf as toImportNumberMap,Of as toImportPriority,If as toImportStatus,kf as toImportStringList,xf as toImportStringMap,Rf as toImportTags,yw as toItemRecord,Af as toNonEmptyImportString,Zb as toNonEmptyStringOrUndefined,Bw as toReplayDocument,_d as tokenizeSimilarityText,CA as transferMutationStdinTokenPolicy,hC as translateHostEnvironmentFault,eh as update,Rh as upgrade,V_ as validate,QO as validateAssertionDefinition,tR as validateAssuranceDocument,eR as validateGateDefinition,e0 as validateItemMutationRows,Ll as validateLinkedPaths,Bk as validateMcpAuthorizationResponseIssuer,Uk as validateMcpAuthorizationServerMetadata,qk as validateMcpClientMetadataDocument,kk as validateMcpHttpRequestHeaders,gk as validateMcpJsonSchema,ZO as validateMeasurementDefinition,NA as validateMissingParentReference,tS as validateReadOutputOptions,$A as validateSprintOrReleaseValue,dC as validateTypeOptions,UE as validateWorkspaceTransactionIdentity,eP as verifyAttestation,OO as verifyCliFlagInvocationParity,XE as verifyExplicitPositionalSlotCensus,Vw as verifyHistoryChain,zw as verifyHistoryChainWithVersion,ME as verifyHistoryEntries,xw as verifyHistoryRecordHash,Lw as verifyHistoryRewriteEvidence,QE as verifyPmCliGrammar,ZE as verifyPmCommandPositionalContracts,sL as verifyPmFlagLexicon,PN as verifyPmRecoveryKindRuntimeCoverage,Yy as verifyPmRecoveryProducerRuntimeCoverage,IN as verifyPmRecoveryReferences,NN as verifyPmRefusalClosureIdentityRatchet,xN as verifyPmRefusalClosureRatchet,RN as verifyPmRefusalReachability,Td as verifyToolOptionCliParity,Zi as withFlagAliasMetadata,gC as withHostEnvironmentBoundary,hk as withMcpCachePolicy,LT as workflowApprovalFingerprint,DT as workflowPolicyApplies,NT as workflowPolicyFingerprint,bl as workspaceGraphCache,nl as wrapOwnershipConflict,YS as wrapThrownErrorForSentry,Ei as writeAuthorEnvironment,Le as writeFileAtomic,nA as writeMutationCheckpoint,iE as writeSettings,$S as writeStderr,DS as writeStdout,mv as writeVectorizationStatusLedger,Qw as writeWorkspaceJsonWithHistory};
|
|
25
|
+
</html>`}import{createHash as st}from"node:crypto";import{lstat as Bg,readdir as Ur,readFile as qg}from"node:fs/promises";import P from"node:path";import{parseDocument as zg}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 xr="io.modelcontextprotocol/skills",at="SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03",Vg=Object.freeze({revision:at,status:"draft",directoryRead:!0});function ux(e,t=!1){let r=e.clientCapabilities.extensions,o=h(r)?r[xr]: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:{[xr]:Vg}}})}var M=Object.freeze({maxFilesPerSkill:512,maxFileBytes:16*1024*1024,maxSkillBytes:16*1024*1024,defaultPageSize:20,maxPageSize:100}),Nr=100,Hg=32*1024*1024,Kg=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Lr=new Set(Array.from({length:M.maxPageSize},(e,t)=>t+1));function C(e,t){throw new u(e,-32602,t)}function Dr(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 Wg(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=zg(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 Xg(e,t,r,o){return r>M.maxFileBytes&&C(`Skill resource exceeds the per-file limit: ${t}.`),o.files+=1,o.files>M.maxFilesPerSkill&&C(`Skill exceeds ${M.maxFilesPerSkill} files.`),o.skillBytes+=r,o.skillBytes>M.maxSkillBytes&&C(`Skill exceeds the aggregate byte limit: ${t}.`),o.originBytes.value+=r,o.originBytes.value>Hg&&C(`Skill origin exceeds the aggregate byte limit: ${t}.`),qg(e)}async function jr(e,t,r){let o=P.join(e,t),n=await Ur(o,{withFileTypes:!0}),s=[];for(let i of n.sort((a,d)=>a.name.localeCompare(d.name))){let a=P.posix.join(t.split(P.sep).join("/"),i.name),d=P.join(e,...a.split("/")),c=await Bg(d);c.isSymbolicLink()&&C(`Skill resource must not be a symbolic link: ${a}.`),c.isDirectory()?s.push(...await jr(e,a,r)):c.isFile()?s.push({relative:a,bytes:await Xg(d,a,c.size,r)}):C(`Skill resource must be a regular file or directory: ${a}.`)}return s}async function $r(e,t,r){let o=new Map,n;try{n=await Ur(e,{withFileTypes:!0})}catch(a){if(bt(a))return o;throw a}let s=n.filter(a=>a.isDirectory()&&Kg.test(a.name)).sort((a,d)=>a.name.localeCompare(d.name));s.length>Nr&&C(`Skill origin exceeds ${Nr} directories.`);let i={value:0};for(let a of s){let d=await jr(P.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=Wg(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(`
|
|
26
|
+
`)).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:V,trust:"untrusted",estimatedTokens:Math.ceil(c/4)},files:new Map(d.map(g=>[g.relative,g.bytes])),fingerprint:_})}return o}function Fr(e){let{files:t,fingerprint:r,...o}=e;return o}var Gr=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(`
|
|
27
|
+
`)).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 $r(P.join(t.packageRoot,".agents","skills"),"package",t.packageVersion);if(t.workspaceRoot){let o=P.resolve(t.packageRoot,".agents","skills"),n=P.resolve(t.workspaceRoot,".agents","skills");if(n!==o){let s=await $r(n,"workspace",t.packageVersion);for(let[i,a]of s)r.set(i,a)}}return new e(r)}list(t={}){let r=t.limit??M.defaultPageSize;Lr.has(r)||C(`Skill list limit must be an integer from 1 to ${M.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(Fr),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"}),Fr(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=Dr(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 w=T.uri.slice(`${a}/`.length);if(!w.startsWith(i))continue;let q=w.slice(i.length),[I,...Ao]=q.split("/"),vo=`${a}/${i}${I}`,Oo=n.files.get(`${i}${I}`);d.set(I,{uri:vo,name:I,mimeType:Ao.length>0?"inode/directory":Dr(I,Oo)})}s.length>0&&d.size===0&&C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let c=r.limit??M.maxPageSize;Lr.has(c)||C(`Skill directory limit must be an integer from 1 to ${M.maxPageSize}.`);let l=this.#r(r.cursor,t),p=[...d.values()].sort((T,w)=>T.uri.localeCompare(w.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]="2b24276b-948b-50bd-bfd9-f429cd74be70")}catch{}})();var Br="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 Ae(e){if(e.schema!==Br)throw new Error(`Unsupported workspace recipe schema: ${e.schema}`);let t=St(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 qr(e,t){let r=Ae(e);return Et(r,t)}async function Yg(e,t){return qr(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 zr="pm.agent-observation/v1",Vr="pm.agent-verdict/v1",Hr="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 oe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))oe(t)}return e}function Jg(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 Zg(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 Qg(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 ey(e){if(e.schema!==zr)throw new Error(`observation.schema must be ${zr}.`);return k(e.id,"observation.id"),O(e.version,"observation.version"),Jg(e.reads),Zg(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")),Qg(e.tiers),oe(structuredClone(e))}function Cx(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 ty(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(R(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 Kr(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 ry(e){return`/${F(e,"verdict predicate path").map(t=>t.replaceAll("~","~0").replaceAll("/","~1")).join("/")}`}function oy(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 ny(e){if(e.schema!==Vr)throw new Error(`verdict.schema must be ${Vr}.`);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}.`);oy(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 oe(structuredClone(e))}function iy(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=Kr(t.state,a.path),c=a.kind==="field_present"?d!==void 0:a.kind==="field_absent"?d===void 0:R(d)===R(a.expected);return{id:i,outcome:c?"satisfied":"violated",evidence_pointer:`${t.snapshot_id}#${ry(a.path)}`,evidence_digest:Tt(R(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 wx(e){if(e.schema!==Hr)throw new Error(`episode.schema must be ${Hr}.`);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 ey(e.observation),ny(e.verdict),Ae(e.recipe),oe(structuredClone(e))}function sy(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 ay(e,t){let r={};for(let o of t)sy(r,o,Kr(e,o));return r}async function Sx(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 ty(e.observation,async _=>ay(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(),_=iy(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:oe(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]="14472bc2-ebca-5b9c-9462-bd8694b630a0")}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 ne(e,t){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Corpus shape ${t} must be a non-negative safe integer`);return e}function Xr(e){if(!(typeof e!="object"||e===null||Object.isFrozen(e))){for(let t of Object.values(e))Xr(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"),ne(e.age_span_days,"age_span_days"),K(e.history_entries_per_item,"history_entries_per_item"),ne(e.comments_per_100_items,"comments_per_100_items"),ne(e.notes_per_100_items,"notes_per_100_items"),ne(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 Xr(t),t}var ve=[{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}],X=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:ve,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:ve,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:ve,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:ve,author_cardinality:24,component_count:5,include_cycles:!1,custom_types:["Archive"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["archive_source"]})});function dy(){return Object.keys(X).sort().map(e=>X[e])}function cy(e){let t=e.trim().toLowerCase();if(!Object.hasOwn(X,t))throw new TypeError(`Unknown corpus shape "${e}". Available: ${Object.keys(X).join(", ")}`);return X[t]}var Wr=new WeakMap;function Yr(e,t){if(e===0)return[];let r=Wr.get(t);r===void 0&&(r=t.edge_kind_mix.flatMap(n=>Array.from({length:n.weight},()=>n.kind)),Wr.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 ly(e,t,r,o=42){if(ne(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 w=0;w<e.hierarchy_depth;w+=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:Yr(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,Yr(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 Jr(e){return new ct(e)}function py(e,t){let r=Jr(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 uy(){let e=$e(process.cwd(),process.env.PM_PATH);await Ot(e,(t,r)=>It(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 my(){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 Zr=["lines","branches","functions","statements"];function fy(e,t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError(`Coverage entry for ${e} must be an object.`)}function _y(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 hy(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)){fy(r,o);for(let n of Zr){let s=_y(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 gy=["captured_redacted","captured_verbatim"],yy=[{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 by(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||!gy.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 yy)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 Ty(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")&&fe(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 Cy(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?by(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 Ty(e,r)}function Ux(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=Cy(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 Y 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 Qr=300*1e3,wy=3;function Vx(e){return(e?.trim()||"development").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\./,"_")}function Hx(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.");Y.mkdirSync(e,{recursive:!0});let o=lt.join(e,r);Y.mkdirSync(o,{recursive:!0});let n=new Date;Y.utimesSync(o,n,n);let s=Y.readdirSync(e).filter(c=>c!==r).flatMap(c=>{try{return[{name:c,mtimeMs:Y.statSync(lt.join(e,c)).mtimeMs}]}catch(l){if(l instanceof Error&&"code"in l&&me(l))return[];throw l}}).sort((c,l)=>l.mtimeMs-c.mtimeMs||c.name.localeCompare(l.name)),i=s.filter(c=>n.getTime()-c.mtimeMs<Qr),a=Math.max(0,wy-1-i.length),d=s.filter(c=>n.getTime()-c.mtimeMs>=Qr).slice(a).map(c=>c.name).sort((c,l)=>c.localeCompare(l));for(let c of d)Y.rmSync(lt.join(e,c),{recursive:!0,force:!0,maxRetries:3,retryDelay:50});return{retained:r,removed:d}}import{createHash as Sy}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:Sy("sha256").update(R({nodes:n,edges:s,kinds:i})).digest("hex"),created_at:new Date(o).toISOString(),nodes:n,edges:s,kinds:i})}function Ey(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function se(e){if(!Ey(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 Le([]);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:se(o)}async function Oe(e,t){let r=U(t.workspace,"workspace"),o=se(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 Ay(e,t={}){let r=e.map(se),o=new Map;for(let i of r)for(let a of i.snapshot.kinds){let d=o.get(a.kind);if(d&&R(d)!==R(a))throw new TypeError(`Conflicting federated relationship kind: ${a.kind}`);o.set(a.kind,a)}let n=new Le([...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 ie=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(se(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 eo(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${t} must be a positive integer`);return e}function vy(e){let t=eo(e.nodeCount,"nodeCount"),r=eo(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 to(e,t={}){let r=t.workspace?.trim()||"pm-graph-conformance",o=yt(),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 Oe(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 Oe(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 Oy(e){return to(new ie,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]="df28925a-72d8-5d39-accf-e295ee01d3f9")}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,Iy=["self_reported","independent_transport"];function Ie(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ae(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function ro(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=ae(o,`${t}[${String(n)}]`);return r?o:s})}function mt(e,t){return e===void 0?void 0:ae(e,t)}function Ry(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 My(e,t,r,o,n,s){if(o==="refusal"){if(Ke(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=Ct(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=wt(t.slice(i+1));l!==void 0&&(a=Ne(`history ${l}`))}let d=Nt(a);if(!Ke(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=xt(a).kind;if(o!==c)throw new TypeError(`${e} expected ${o}, but ${a} declares ${c}`)}function Py(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=ae(e.id,`${o}.id`),s=ro(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"&&!kt.includes(a))throw new TypeError(`${o}.expected_output_kind is unsupported`);let d=a,c=e.expected_accounting_mode;if(!Iy.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=ro(e.required_fields,`${o}.required_fields`);if(p.some(w=>w.split(".").some(q=>q.length===0)))throw new TypeError(`${o}.required_fields must contain dot-separated own-property paths`);let f=Ry(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 My(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 ky(e,t){if(!Ie(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let r=ae(e.id,`tasks[${String(t)}].id`),o=ae(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)=>Py(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 wN(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)=>ky(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 oo}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 no(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${t} must be non-empty`);return e.trim()}function vN(e,t){let r=no(t.migrationId,"migrationId"),o=no(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=ze(e,void 0,t.registry),a=i.graph.nodes(),d=i.graph.edges().map(f=>{let _=oo("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=oo("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 io 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 de=["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"}},IN=Object.freeze(Object.keys(ft));function so(e){if(Object.hasOwn(ft,e))return ft[e]}var xy=new Set([..."=([{,:;!?&|+-*%^~<>","=>"]);function Q(e,t){return e<t?-1:e>t?1:0}function Ny(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 Ly(e){return e===void 0||e.kind==="punctuator"&&xy.has(e.value)||e.kind==="identifier"&&["return","case","throw","else","yield"].includes(e.value)}function Dy(e,t){if(/\s/u.test(e[t]))return t+1;if(e.startsWith("//",t)){let r=e.indexOf(`
|
|
28
|
+
`,t+2);return r===-1?e.length:r+1}if(e.startsWith("/*",t))return e.indexOf("*/",t+2)+2}function $y(e,t,r){if(e[t]!=="/"||!Ly(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 Fy(e,t){let r=e[t];if(r==="'"||r==='"'||r==="`"){let n=Ny(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 Gy(e){let t=[],r=0;for(;r<e.length;){let o=Dy(e,r);if(o!==void 0){r=o;continue}let n=$y(e,r,t.at(-1));if(n!==void 0){r=n;continue}let s=Fy(e,r);s.token&&t.push(s.token),r=s.next}return t}var Uy=new Set(["object","block","pattern"]),jy=new Set(["const","let","var"]),By=new Set(["}",")","]"]),qy=new Set(["=","(","[",",",":","?","return"]);function zy(e,t,r){if([...r].reverse().find(n=>Uy.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"&&jy.has(o.value)?"pattern":o?.value==="=>"||o?.value===")"?"block":o&&qy.has(o.value)?"object":"block"}function Vy(e,t,r){let o=e[t];if(o.value==="{"){let i=zy(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 Hy(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 Ky(e,t){return e[t+1]?.value===")"&&e[t+2]?.value==="=>"||e[t+1]?.value==="="}function Wy(e){let t=Gy(io.stripTypeScriptTypes(e,{mode:"strip"})),r=[],o=[];for(let[n,s]of t.entries()){let i=o.at(-1),a=Hy(i,s,t[n+1]);a&&i.candidates.push(a);let d=Vy(t,n,o);if(d)o.push(d);else if(By.has(s.value)){let c=o.pop();c?.kind==="object"&&!Ky(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 Xy(e){let t=[0];for(let r=0;r<e.length;r+=1)e[r]===`
|
|
29
|
+
`&&t.push(r+1);return t}function Yy(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 RN(e){let t=[],r=[];for(let n of[...e].sort((s,i)=>Q(s.path,i.path))){let s=Xy(n.content),i;try{i=Wy(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=Yy(s,a.offset),l=so(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(de.map(n=>[n,t.filter(s=>s.kind===n).length]));for(let n of de)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 MN(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=so(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(w=>encodeURIComponent(w)).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 PN(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 kN(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=de.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 Jy(e,t){let r=new Map(de.map(s=>[s,new Set]));for(let s of t)r.get(s.kind).add(s.value);let o=de.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 xN=Jy;(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 LN=16,Zy=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"]),ao=18,co=Object.freeze([...Zy,"manifest_unknown_key","no_version_bounds_declared"].sort((e,t)=>e.localeCompare(t)));function DN(e,t=ao){return{ok:e.executable_error_code_count>=t,baseline:t,actual:e.executable_error_code_count}}function $N(e,t=co){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 FN(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 GN(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: ${ao}`,`- Required executable canonical codes: ${co.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(`
|
|
30
|
+
`)}(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 Qy(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 eb(e){return[e.exit_code!==ue.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 ${ue.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."},...Qy(e)]}function BN(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 eb(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 lo="not-a-declared-action";function tb(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 ce(e){return e.replaceAll(/[^a-z0-9]+/gu,"-").replaceAll(/^-|-$/gu,"")}function JN(e=Be.filter(t=>vt.some(r=>r.command===t.command&&r.disposition!=="package_owned"))){let t=new Set(e.filter(({command:r})=>!r.includes(" ")).map(({command:r})=>ce(r)));return e.flatMap(r=>r.slots.flatMap((o,n)=>{if(!o.required)return[];let s=r.command.split(" "),i=ce(r.command),a=s.length>1&&t.has(i)?s.map(ce).join("--"):i,d=ee(r.command).flatMap(l=>l.required?[l.flag,...l.value_name?["example"]:[]]:[]),c=je.some(l=>l.command===r.command);return[{probe_id:`required-argument-${a}-${ce(o.name)}`,command:r.command,refusal_args:[...s,...r.slots.slice(0,n).map(l=>tb(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 rb(e){switch(L(e)){case"assurance":case"workspace snapshot":return je.filter(({parent:t})=>t===e).map(({action:t})=>t);case"graph":return Fe;case"merge":return Ge;case"plan":return We;case"profile":return Xe;case"schema":return Lt;default:throw new Error(`Required positional action family ${e} has no authoritative value domain.`)}}function ZN(e=Be){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-${ce(t)}`,command:t,refusal_args:[...r,lo],recovery_args:[...r,"--help"],error_code:"unknown_subcommand",rejected_value:lo,allowed_values:[...rb(t)].sort()}}).sort((t,r)=>t.probe_id.localeCompare(r.probe_id))}function ob(e,t){let r=[...t].sort();return e.length===t.length&&[...e].sort().every((o,n)=>o===r[n])}function nb(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&&!ob(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 QN(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=>nb(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 tL(){return ht.map(e=>({...e}))}function ib(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 rL(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=ib(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]="fcb59bee-0fdb-5b17-8568-775a15d53466")}catch{}})();var Re,sb=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 ab(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=sb[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(Re!==void 0)return Re;let e=te.filter(({command:n})=>qe(n)).flatMap(({command:n,family:s})=>Pt(n,ee(n)).map(i=>({command:n,family:s,concept:ab(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 Re=Object.freeze(r.map(n=>Object.freeze({...n,concept:o.get(n.concept)?.size===1?n.concept:`${n.concept}@${n.command}`}))),Re}function dL(){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 po=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:100,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:35,events:33,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:27,schema:43,profile:22,activity:35,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:31,notes:35,learnings:31,files:39,docs:30,deps:32,plan:109,test:53,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:24,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),uo=Object.freeze({...po,...Object.fromEntries(xe.flatMap(({alias:e,canonical:t})=>{let r=po[e];return r===void 0?[]:[[t,r]]}))});function mo(){let e=new Map(Object.keys(uo).map(t=>[t,0]));for(let{command:t}of Me())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(uo).map(([t,r])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:r})))}function db(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 cb(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 lb(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 cL(e=Me(),t=mo(),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 db(e,n,o),cb(a,t,o),lb(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 lL(){let e=Me(),t=mo(),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(`
|
|
31
|
+
`)}(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]="4e72da21-425b-568d-9174-bc5021e1d4f4")}catch{}})();function uL(e){return e}function mL(e){return e}function fL(e){return e}function _L(e){return e}function hL(e){return e}function gL(e){return e}function yL(e){return e}function bL(e){return e}function TL(e){return e}function CL(e){return e}function wL(e){return e}function SL(e){return e}function EL(e){return e}function AL(e){return{handled:!0,result:e}}function vL(){return{handled:!1}}function OL(e){return e}function IL(e){return e}function RL(e){return e}function ML(e){return e}function PL(e){return e}function kL(e){return e}function xL(e){return e}function NL(e){return e}function LL(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 pb(e={},t={}){return new he(t).extension(void 0,{...e,migrate:!0})}function ub(e={},t={}){return new he(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]="af4da99c-f557-5bf7-a439-c14878e4970d")}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"||!fe(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function mb(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 fb(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 QL(e,t){let{start:r,end:o}=mb(t),n=[...fb(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]="415e07d5-008a-5a96-ad7d-eb630aa08f57")}catch{}})();function le(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function _b(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"||!le(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||r.identities.some(n=>!le(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 hb(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"||!le(o.identity)||r.has(o.identity)||!le(o.reason)||!le(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 tD(e,t=[]){let r=_b(e),o=[...r.keys()].sort(),n=hb(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]="fca4e9bb-3a30-512e-9929-565ab6c11c54")}catch{}})();import{createHash as _o,createHmac as gb,randomBytes as yb,timingSafeEqual as bb}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]="837ee381-0838-55d3-bcdf-7352fb76661d")}catch{}})();var FD="dev.unbrained.pm/progressive-tool-discovery",GD=Object.freeze({version:1,discoveryTool:"pm_discover",canonicalResult:"structuredContent.result",compatibilityText:"pointer"}),Tb=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}),Cb=Object.freeze(["profile_changed","tool_contract_changed","workspace_extension_changed","authorization_changed","ranking_signal_changed","cursor_integrity_key_rotated"]),ho={core:0,standard:1,full:2,internal:3},go=Object.freeze(["core","standard","full"]),wb=new Set(["core","standard","full","custom"]),yo=new Set(te.map(({family:e})=>e)),Sb=yb(32);function ke(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 bo(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 To(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 Co(e){if(e!==void 0&&typeof e!="boolean")throw new b("pm tool discovery includeSchema must be a boolean.",64);return e===!0}function wo(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new b("pm tool discovery options must be an object.",64)}function Eb(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 UD(e){if(wo(e),e.family!==void 0&&(typeof e.family!="string"||!yo.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"||!go.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);return{...e.query!==void 0?{query:ke(e.query,"query")}:{},...e.family!==void 0?{family:e.family}:{},...e.tier!==void 0?{tier:e.tier}:{},...e.limit!==void 0?{limit:bo(e.limit)}:{},...e.cursor!==void 0?{cursor:ke(e.cursor,"cursor")}:{},...e.includeSchema!==void 0?{includeSchema:Co(e.includeSchema)}:{},...e.outputBudget!==void 0?{outputBudget:To(e.outputBudget)}:{}}}function Ab(e){return e===void 0||!Number.isFinite(e)?0:Math.min(1,Math.max(0,e))}function pe(e){return[...new Set(e.toLowerCase().match(/[a-z0-9]+/gu)??[])].sort()}function vb(e,t){let r=pe(e);if(r.length===0)return 0;let o=new Set(pe(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 Ob(e,t){let r=pe(e);if(r.length===0)return 0;let o=t.toLowerCase(),n=pe(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 fo(e){return _o("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function So(e,t,r){return gb("sha256",r).update(JSON.stringify({version:1,fingerprint:e,offset:t})).digest("base64url")}function Ib(e,t,r){let o={version:1,offset:t,signature:So(e,t,r)};return Buffer.from(JSON.stringify(o),"utf8").toString("base64url")}function Rb(e,t,r,o){if(e===void 0)return 0;try{let n=JSON.parse(Buffer.from(e,"base64url").toString("utf8"));if(n.version!==1||!Number.isInteger(n.offset)||(n.offset??-1)<0||Number(n.offset)>r||typeof n.signature!="string")throw new Error("cursor fields do not match the request");let s=Buffer.from(So(t,n.offset,o),"base64url"),i=Buffer.from(n.signature,"base64url");if(i.length!==s.length||!bb(i,s))throw new Error("cursor signature does not match the request");return n.offset}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:Ab(e),weight:t,available:r!=="unavailable",source:r}}function Pe(e,t,r){return gt(e??t,r,e===void 0?"computed":"host")}function Mb(e,t,r){let o=Object.hasOwn(_e,e.name)?_e[e.name]:"help",n=Ve(o),s=`${e.name} ${e.description} ${o} ${n}`,i=vb(t,s),a=new Set(pe(t)),d={lexical:gt(i,B.lexical,"computed"),semantic:Pe(e.signals?.semantic,Ob(t,s),B.semantic),graph:Pe(e.signals?.graph,a.has(n)||a.has(o)?1:0,B.graph),permission:gt(1,B.permission,"authorization"),freshness:Pe(e.signals?.freshness,1,B.freshness),usage:Pe(e.signals?.usage,Tb.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:He(o),family:n,score:Number(c.toFixed(6)),signals:d,...r?{input_schema:structuredClone(e.inputSchema)}:{}}}function Pb(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"||!go.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"||!yo.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"||!wb.has(e.profile)))throw new b("pm tool discovery profile must be core, standard, full, or custom.",64)}function kb(e){let t=ke(e.query===void 0?"":e.query,"query").trim().replace(/\s+/gu," ");ke(e.cursor===void 0?"":e.cursor,"cursor");let r=bo(e.limit===void 0?10:e.limit),o=To(e.outputBudget===void 0?1200:e.outputBudget);return Pb(e),{query:t,includeSchema:Co(e.includeSchema),limit:r,budget:o,maximumTier:ho[e.tier??"full"],profile:e.profile===void 0?"core":e.profile}}function Eo(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 xb(e,t,r){return e.filter(o=>o.authorized!==!1).map(o=>Mb(o,r.query,r.includeSchema)).filter(o=>o.tier!=="internal"&&ho[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 Nb(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(Eo(r(s+1),t,a)>t)break;o.push(i),n=a}return o}function jD(e,t={}){Eb(e),wo(t);let r=kb(t),o=t.cursorIntegrityKey??Sb,n=xb(e,t,r),s=fo({query:r.query,family:t.family??null,tier:t.tier??"full",includeSchema:r.includeSchema,profile:r.profile,ranked:n}),i=Rb(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:fo({fingerprint:s,cursorIntegrityKey:_o("sha256").update(o).digest("hex"),limit:r.limit,offset:i,budget:r.budget}),ttl_ms:3e4,scope:"private",invalidates_on:Cb}},l=(g,T=g.length)=>{let w=i+T,q=w<n.length,I=[...d];return T<a.length&&I.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:Ib(s,w,o)}:{},omission_receipt:{has_omissions:I.length>0,omitted:I}}},p=g=>{let T=l(g),w=Eo(T,r.budget);return{...T,token_cost:{estimated_tokens:w,budget:r.budget,within_budget:r.budget==="unbounded"||w<=r.budget}}},f=Nb(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]="d007edcb-46f0-5546-b804-27d86afe23e7")}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]="3819479a-4ad7-5a06-8f76-e703037b2bf3")}catch{}})();export{Kv as ACTIONABILITY_ORDERING_KINDS,Ja as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,Ta as ACTIVITY_FLAG_CONTRACTS,mi as AGENT_PROVENANCE_DIMENSIONS,ns as AGGREGATE_FLAG_CONTRACTS,zs as APPEND_FLAG_CONTRACTS,zR as ASSURANCE_ACTIONS,VR as ASSURANCE_DECLARATION_KINDS,JO as ASSURANCE_DOCUMENT_VERSION,la as ASSURANCE_FLAG_CONTRACTS,ZO as ASSURANCE_GATE_TRIGGERS,QO as ASSURANCE_MEASUREMENT_SOURCE_KINDS,YI as ASSURANCE_PRESET_IDS,KO as AssuranceEvaluationRefusalError,HO as AssuranceMutationRefusalError,WO as AssuranceSourceResolutionError,Qn as BASELINE_ITEM_FORMAT_VERSION,gy as BOUNDARY_FIXTURE_CAPTURE_SOURCES,gO as BRIEF_LIST_FIELDS,_i as BUILTIN_AGENT_PROVENANCE_ADAPTERS,X as BUILTIN_CORPUS_SHAPES,fi as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,Uo as BUILTIN_ITEM_TYPE_VALUES,zt as BUILTIN_PROFILES,Lb as BUILTIN_RELATIONSHIP_KINDS,Wa as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,ba as CALENDAR_FLAG_CONTRACTS,Vs as CLAIM_FLAG_CONTRACTS,qd as CLOSE_ACTION_OPTION_KEYS,Bs as CLOSE_FLAG_CONTRACTS,qs as CLOSE_MANY_FLAG_CONTRACTS,Js as CLOSE_TASK_FLAG_CONTRACTS,is as COMMENTS_FLAG_CONTRACTS,iT as COMMON_MUTATION_COMMAND_OPTION_KEYS,ka as COMPLETION_FLAG_CONTRACTS,Ho as CONFIDENCE_TEXT_VALUES,Ts as CONFIG_FLAG_CONTRACTS,Xa as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,IM as CONTEXT_EVALUATION_METRIC_NAMES,wa as CONTEXT_FLAG_CONTRACTS,jt as CONTEXT_OUTPUT_VALUES,xM as CONTEXT_PACKING_PROFILES,TM as CONTEXT_RECENCY_EPOCH,EM as CONTEXT_RELEVANCE_SERVICE,wM as CONTEXT_RELEVANCE_SIGNAL_NAMES,DM as CONTEXT_SIGNAL_SET_VERSION,LM as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,$M as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,_w as CONTEXT_USAGE_LIMITS,Pa as CONTRACTS_FLAG_CONTRACTS,_a as COPY_FLAG_CONTRACTS,Jd as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Qd as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Zd as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,Vb as CREATE_DIRECT_CLOSE_REASON_DEFAULT,pa as CREATE_FLAG_CONTRACTS,lS as CURRENT_HISTORY_HASH_ALGORITHM,IS as CURRENT_HISTORY_ITEM_HASH_VERSION,MS as CURRENT_HISTORY_RECORD_HASH_VERSION,ei as CURRENT_ITEM_FORMAT_VERSION,jM as ContextSignalStore,hw as ContextUsageValidationError,mM as DEFAULT_AUTHOR_IDENTITY_VOCABULARY,nP as DEFAULT_CHILD_SAMPLE_LIMIT,hO as DEFAULT_COMPACT_LIST_FIELDS,SE as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,Mm as DEFAULT_EVAL_QUERIES_RELATIVE_PATH,iM as DEFAULT_TERMINAL_TRANSITION_POLICY,VM as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,Gv as DEFECT_ESCAPE_CLASSES,Uv as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Ks as DELETE_FLAG_CONTRACTS,qo as DEPENDENCY_KIND_VALUES,Aa as DEPS_FLAG_CONTRACTS,cs as DOCS_FLAG_CONTRACTS,aa as DUPLICATES_FLAG_CONTRACTS,wR as DURABLE_MERGE_RECEIPT_INTRODUCED_AT,Oa as EVAL_FLAG_CONTRACTS,Sm as EVAL_METRIC_NAMES,Om as EVAL_QUERY_SET_CONTRACT,Im as EVAL_QUERY_SET_EXAMPLE,vm as EVAL_QUERY_SET_SCHEMA_ID,Ca as EVENTS_FLAG_CONTRACTS,Qs as EVENT_FLAG_CONTRACTS,No as EXECUTABLE_COMMAND_ALIASES,ue as EXIT_CODE,Ps as EXTENSION_ACTIVATE_FLAG_CONTRACTS,Ms as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,Fs as EXTENSION_ADOPT_FLAG_CONTRACTS,LP as EXTENSION_CAPABILITIES,qb as EXTENSION_CAPABILITY_CONTRACT,jb as EXTENSION_CAPABILITY_CONTRACT_VERSION,Bb as EXTENSION_CAPABILITY_LEGACY_ALIASES,tn as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,$s as EXTENSION_CATALOG_FLAG_CONTRACTS,ks as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,Rs as EXTENSION_DESCRIBE_FLAG_CONTRACTS,Ds as EXTENSION_DOCTOR_FLAG_CONTRACTS,Is as EXTENSION_EXPLORE_FLAG_CONTRACTS,Cs as EXTENSION_FLAG_CONTRACTS,Ss as EXTENSION_INIT_FLAG_CONTRACTS,vs as EXTENSION_INSTALL_FLAG_CONTRACTS,Ns as EXTENSION_MANAGE_FLAG_CONTRACTS,xs as EXTENSION_MIGRATE_FLAG_CONTRACTS,DP as EXTENSION_POLICY_MODES,$P as EXTENSION_POLICY_SURFACES,Ls as EXTENSION_RELOAD_FLAG_CONTRACTS,GP as EXTENSION_SANDBOX_PROFILES,ws as EXTENSION_SCOPE_FLAG_CONTRACTS,FP as EXTENSION_TRUST_MODES,Os as EXTENSION_UNINSTALL_FLAG_CONTRACTS,lO as EXTERNAL_DEPENDENCY_RESOLUTION_STATUSES,dO as EXTERNAL_DEPENDENCY_SOURCE_KIND,cO as EXTERNAL_DEPENDENCY_SOURCE_KIND_ALIAS,ds as FILES_FLAG_CONTRACTS,ha as FOCUS_FLAG_CONTRACTS,ia as GC_FLAG_CONTRACTS,TO as GET_DEPTH_VALUES,Sa as GET_FLAG_CONTRACTS,rs as GLOBAL_FLAG_CONTRACTS,hp as GRAPH_DURABLE_CACHE_MIN_ITEMS,_p as GRAPH_DURABLE_CACHE_VERSION,va as GRAPH_FLAG_CONTRACTS,VE as GRAPH_QUERY_DEFAULTS,Fe as GRAPH_SUBCOMMAND_VALUES,Ea as GUIDE_FLAG_CONTRACTS,da as HEALTH_FLAG_CONTRACTS,fs as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,qI as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,YR as HISTORY_COMPACT_BULK_DEFAULT_MIN_ENTRIES,_s as HISTORY_COMPACT_FLAG_CONTRACTS,Ri as HISTORY_EVENT_CLASSIFICATION_VERSION,ls as HISTORY_FLAG_CONTRACTS,dS as HISTORY_HASH_ALGORITHMS,TI as HISTORY_ITEM_HASH_VERSION_3_INTRODUCED_IN,us as HISTORY_REDACT_FLAG_CONTRACTS,ms as HISTORY_REPAIR_FLAG_CONTRACTS,Hc as INIT_AGENT_GUIDANCE_MODE_VALUES,bs as INIT_FLAG_CONTRACTS,Gs as INSTALL_FLAG_CONTRACTS,Vo as ISSUE_SEVERITY_VALUES,ma as ITEM_COMPLETE_FLAG_CONTRACTS,mR as ITEM_LATEST_TIMESTAMP_FIELDS,zb as ITEM_METADATA_KEY_ORDER,ua as ITEM_MUTATE_FLAG_CONTRACTS,fa as ITEM_REOPEN_FLAG_CONTRACTS,sR as ITEM_SCALAR_MISSING_VALUE,jo as ITEM_TYPE_VALUES,uR as ITEM_UNION_COLLECTION_FIELDS,UM as JsonFileContextSignalStoreAdapter,as as LEARNINGS_FLAG_CONTRACTS,cS as LEGACY_HISTORY_HASH_ALGORITHM,eu as LINKED_TEST_ENV_NAME_PATTERN,tu as LINKED_TEST_PM_CONTEXT_MODE_VALUES,Qp as LINKED_TEST_PROTECTED_ENV_KEYS,ru as LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,Ha as LIST_COMMANDER_STRING_OPTION_CONTRACTS,yO as LIST_COMMAND_DEFAULT_PROJECTIONS,jP as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,os as LIST_FILTER_FLAG_CONTRACTS,EO as LIST_SORT_FIELDS,AO as LIST_SORT_ORDER_VALUES,Mi as MAINTENANCE_HISTORY_OPERATIONS,oP as MAX_CHILD_PROJECTION_ITEMS,kC as MAX_WORKFLOW_POLICIES,xC as MAX_WORKFLOW_POLICY_TERMS,Zs as MEET_FLAG_CONTRACTS,EP as MERGE_DRIVER_ARTIFACT_VALUES,ps as MERGE_FLAG_CONTRACTS,Ge as MERGE_SUBCOMMAND_VALUES,OP as MUTATION_EVENT_WIRE_BUDGET,ie as MemoryRelationshipGraphAdapter,Ya as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,Ra as NEXT_FLAG_CONTRACTS,Ku as NEXT_OUTPUT_VALUES,ss as NOTES_FLAG_CONTRACTS,Es as PACKAGE_FLAG_CONTRACTS,As as PACKAGE_INIT_FLAG_CONTRACTS,Ys as PAUSE_TASK_FLAG_CONTRACTS,Bd as PLAN_CREATE_METADATA_PARAMETER_KEYS,ys as PLAN_FLAG_CONTRACTS,rm as PLAN_SHOW_DEPTH_VALUES,We as PLAN_SUBCOMMANDS,om as PLAN_TEMPLATE_NAMES,Iy as PM_AGENT_TASK_ACCOUNTING_MODES,ut as PM_AGENT_TASK_TRANSCRIPT_VERSION,Mo as PM_BULK_LIFECYCLE_COMMAND_ALIASES,Di as PM_CLI_EXPECTED_ERROR_NAME,JE as PM_CLI_GRAMMAR_CONTRACT,HE as PM_CLI_GRAMMAR_NOUNS,Cn as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,KE as PM_CLI_SHARED_VERBS,xo as PM_COMMAND_ALIAS_CONTRACTS,te as PM_COMMAND_CAPABILITY_CONTRACTS,vt as PM_COMMAND_DESTINATION_CONTRACTS,jO as PM_COMMAND_EXIT_CONTRACTS,UO as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Gn as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,$O as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,Be as PM_COMMAND_POSITIONAL_CONTRACTS,_c as PM_COMMAND_VISIBILITY_CONTRACTS,$I as PM_COMPLETE_LIST_FINDING_CODES,qw as PM_CONTEXT_INTENTS_FILE,vw as PM_CONTEXT_INTENT_CONTRACTS,Ro as PM_CONTEXT_OPS_COMMAND_ALIASES,gn as PM_CORE_COMMAND_NAMES,G as PM_CORPUS_SHAPE_SCHEMA,Sn as PM_DEPRECATED_TOOL_ACTIONS,Nn as PM_DIAGNOSTIC_DEGRADATION_STEPS,Ln as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,xn as PM_DIAGNOSTIC_OUTPUT_CLASSES,En as PM_DISCOVERABLE_TOOL_ACTIONS,Hr as PM_EPISODE_SCHEMA,LO as PM_ERROR_CODE_CATALOG,PO as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Zr as PM_EXACT_COVERAGE_METRICS,pn as PM_EXTENSION_CAPABILITY_CONTRACTS,yn as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,mn as PM_EXTENSION_POLICY_MODE_CONTRACTS,hn as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,_n as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,un as PM_EXTENSION_SERVICE_NAME_CONTRACTS,fn as PM_EXTENSION_TRUST_MODE_CONTRACTS,II as PM_GITATTRIBUTES_END,OI as PM_GITATTRIBUTES_START,MI as PM_GITATTRIBUTES_V2_END,RI as PM_GITATTRIBUTES_V2_START,Sc as PM_GITIGNORE_END,wc as PM_GITIGNORE_START,eM as PM_HISTORY_ATTESTATION_CONTRACT,Io as PM_HISTORY_COMMAND_ALIASES,rS as PM_HISTORY_OPERATION_ALIASES,nS as PM_HISTORY_OPERATION_CONTRACT,oS as PM_HISTORY_OPERATION_PATTERNS,Tn as PM_ITEM_ACTION_SUBCOMMANDS,eS as PM_ITEM_HISTORY_OPERATIONS,it as PM_MCP_APPS_EXTENSION,Rr as PM_MCP_APPS_SERVER_CAPABILITY,Ee as PM_MCP_APPS_SPEC_VERSION,kr as PM_MCP_APP_CONTRACTS,Pr as PM_MCP_APP_MIME_TYPE,Tb as PM_MCP_ENTRY_TOOL_NAMES,m as PM_MCP_ERROR_CODES,Dk as PM_MCP_HTTP_PROTOCOL_VERSION,Gh as PM_MCP_INPUT_REQUEST_METHODS,sk as PM_MCP_LEGACY_PROTOCOL_VERSIONS,tr as PM_MCP_LOG_LEVELS,E as PM_MCP_META_KEYS,FD as PM_MCP_PROGRESSIVE_DISCOVERY_EXTENSION,GD as PM_MCP_PROGRESSIVE_DISCOVERY_SERVER_CAPABILITY,Tc as PM_MCP_PROMPT_CONTRACTS,V as PM_MCP_PROTOCOL_VERSION,bc as PM_MCP_RESOURCE_CONTRACTS,at as PM_MCP_SKILLS_DRAFT_REVISION,xr as PM_MCP_SKILLS_EXTENSION,Vg as PM_MCP_SKILLS_SERVER_CAPABILITY,M as PM_MCP_SKILL_LIMITS,we as PM_MCP_SUBSCRIPTION_ID_META_KEY,Ye as PM_MCP_SUPPORTED_PROTOCOL_VERSIONS,Ik as PM_MCP_TASKS_EXTENSION,Yh as PM_MCP_TASK_STATUSES,_e as PM_MCP_TOOL_COMMAND_CONTRACTS,rC as PM_MODE_PAIRED_OUTPUT_PROJECTION_CONTRACTS,dd as PM_MUTATION_ACTION_CONTRACTS,xe as PM_NAMESPACED_COMMAND_ALIASES,zr as PM_OBSERVATION_SCHEMA,kn as PM_OUTPUT_BUDGET_CLASSES,Pn as PM_OUTPUT_DEGRADATION_STEPS,kt as PM_OUTPUT_ENVELOPE_KINDS,$t as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,bn as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,Dt as PM_PACKAGE_RESOURCE_KINDS,je as PM_POSITIONAL_ACTION_CONTRACTS,Yd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Wd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,tw as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,BC as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,ZC as PM_READ_OUTPUT_DIMENSIONS,ew as PM_READ_OUTPUT_OPTION_FLAGS,KC as PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS,HC as PM_READ_OUTPUT_SESSION_MIN_TOKENS,QC as PM_READ_OUTPUT_SURFACES,rw as PM_READ_OUTPUT_SURFACE_CONTRACTS,tC as PM_READ_ROW_CONTRACTS,eC as PM_READ_ROW_JQ_SELECTOR,IN as PM_RECOVERY_REFERENCE_FIELDS,de as PM_RECOVERY_REFERENCE_KINDS,Zy as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,co as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2,LN as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE,ao as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2,Po as PM_RELOCATED_COMMAND_ALIASES,rd as PM_REPRODUCIBLE_PROCESS_ENV,BO as PM_SUCCESS_EXIT_CODES,wn as PM_TOOL_ACTIONS,zd as PM_TOOL_ACTION_PARAMETER_CONTRACTS,Xd as PM_TOOL_PARAMETERS_SCHEMA,Kd as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,Hd as PM_TOOL_PARAMETERS_SCHEMA_VERSION,Ud as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,Vr as PM_VERDICT_SCHEMA,tS as PM_WORKSPACE_HISTORY_OPERATIONS,Br as PM_WORKSPACE_RECIPE_SCHEMA,gs as PROFILE_FLAG_CONTRACTS,Jt as PROFILE_LINT_CODES,Yt as PROFILE_LINT_DIMENSIONS,qt as PROFILE_NAMES,Xe as PROFILE_SUBCOMMANDS,b as PmCliError,he as PmClient,FI as PmCompleteListValidationError,y as PmMcpAuthorizationError,rr as PmMcpInputRequiredError,Er as PmMcpIssuerCredentialStore,u as PmMcpProtocolError,or as PmMcpRequestStateReplayGuard,Gr as PmMcpSkillRegistry,fr as PmMcpSubscriptionRegistry,ot as PmMcpTaskStore,yC as QUERY_CURSOR_CONTRACT,js as REINDEX_FLAG_CONTRACTS,QA as REINDEX_LOCK_ID,pt as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Ws as RELEASE_FLAG_CONTRACTS,ea as REMIND_FLAG_CONTRACTS,At as RESERVED_ITEM_FIELD_NAMES,Hs as RESTORE_FLAG_CONTRACTS,zo as RISK_VALUES,DE as RelationshipEventLog,$E as RelationshipEventStore,z as RelationshipGraph,Le as RelationshipKindRegistry,hs as SCHEMA_FLAG_CONTRACTS,Ka as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,BP as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ma as SEARCH_FLAG_CONTRACTS,Tu as SEMANTIC_ATTRIBUTION_LIMITS,Kb as SETTINGS_DEFAULTS,Lm as SNAPSHOT_SCHEMA,gI as SOURCE_CONTEXT_ACCESS_ENV,yI as SOURCE_CONTEXT_WRITE_OVERRIDE_ENV,Xs as START_TASK_FLAG_CONTRACTS,sa as STATS_FLAG_CONTRACTS,Bo as STATUS_VALUES,ts as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,Pi as SUBSTANTIVE_HISTORY_OPERATIONS,RS as SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,PS as SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,Xb as SUPPRESS_HOST_OUTPUT_MARKER,oa as TELEMETRY_FLAG_CONTRACTS,lf as TELEMETRY_SUBCOMMANDS,ra as TEST_ALL_FLAG_CONTRACTS,ta as TEST_FLAG_CONTRACTS,na as TEST_RUNS_FLAG_CONTRACTS,nf as TEST_RUN_MEASUREMENT_LIMIT,Dd as TOOL_ACTIVITY_OPTION_CONTRACTS,Ed as TOOL_AGGREGATE_OPTION_CONTRACTS,kd as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,Ld as TOOL_CALENDAR_OPTION_CONTRACTS,Nd as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,$d as TOOL_CONTEXT_OPTION_CONTRACTS,Rd as TOOL_CREATE_OPTION_CONTRACTS,Id as TOOL_CREATE_OPTION_CONTRACT_SOURCE,Fd as TOOL_DEPS_OPTION_CONTRACTS,Gd as TOOL_GRAPH_OPTION_CONTRACTS,Sd as TOOL_LIST_FILTER_OPTION_CONTRACTS,Ad as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,Od as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,vd as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,xd as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,Pd as TOOL_UPDATE_OPTION_CONTRACTS,Md as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,Hb as TYPE_TO_FOLDER,lA as UNKNOWN_SUBCOMMAND_COMPATIBILITY_CODES,ec as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,rc as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,tc as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,ga as UPDATE_FLAG_CONTRACTS,ya as UPDATE_MANY_FLAG_CONTRACTS,Us as UPGRADE_FLAG_CONTRACTS,ca as VALIDATE_FLAG_CONTRACTS,PC as WORKFLOW_POLICY_ACTIONS,xI as WORKFLOW_POLICY_DOCUMENT_SCHEMA,kI as WORKFLOW_POLICY_SCHEMA,Ia as WORKSPACE_FLAG_CONTRACTS,YS as WORKSPACE_HISTORY_ID,Dm as WORKSPACE_SNAPSHOT_ACTIONS,bl as WorkspaceGraphCache,BE as WorkspaceTransactionInterruptedError,zp as _testOnly,rP as _testOnlyAggregateCommand,gl as _testOnlyConfigCommand,dP as _testOnlyGetCommand,Mp as _testOnlyHealthCommand,Yc as _testOnlyInit,Kc as _testOnlyInitAgentGuidance,d0 as _testOnlyItemTransaction,PP as _testOnlyMutationEvents,QM as _testOnlyNextCommand,SP as _testOnlySearchCommand,WI as _testOnlySimilarity,am as _testOnlyTemplates,jp as _testOnlyValidateCommand,NP as _testOnlyWorkspacePosition,eR as acceptAssuranceProposals,Gp as acknowledgeLinkedTests,fl as acknowledgeUnknownAuthorHistoryEvents,ml as acknowledgeUnknownAuthorHistoryEventsFromTransport,EE as acquireItemMetadataDerivedIndexLock,Ue as acquireLock,T0 as activateExtensionForTest,RT as activateExtensions,ui as agentSessionEnvironment,c_ as aggregate,Km as analyzeAgentProvenanceDescriptorCoverage,Bv as analyzeDefectChangeRisk,qR as analyzeDefectRecurrenceCoverage,Bl as analyzeDuplicateItems,GE as analyzeGraphImpact,ic as analyzeHierarchyIntegrity,UE as analyzeKnowledgeGraph,zO as analyzePmCommandExitConformance,An as analyzePmToolActionParity,MR as analyzeReconciliationDiscard,FE as analyzeRelationshipExecution,ap as analyzeRelationshipSchedule,xh as analyzeSdkActionCoverage,Mt as analyzeSdkCliParameterCompleteness,C_ as append,Ni as appendHistoryEntry,eE as appendWorkspaceAuditEvent,QS as appendWorkspaceHistoryChange,_A as applyAcceptanceCriteriaMutations,ZI as applyAssurancePreset,Ga as applyBootstrapPagerPolicy,FR as applyClosureTimestampFix,Pw as applyContextIntentProjection,Hu as applyContextTagProjection,vO as applyFilterValueEcho,pE as applyHistoryPatch,td as applyInvocationAuthorOverride,Il as applyPathMigrations,lw as applyReadOutputDimensions,sw as applyReadOutputIncludeModes,XC as applyReadOutputSessionReferences,gE as applyRegisteredItemFieldDefaultsAndValidation,kl as applyStandaloneNote,Yi as applyStoredExtensionMigrationState,gA as applyTagRemovals,cM as applyTerminalOrderingPolicy,xl as artifactKey,nT as asRecordClone,oT as asRecordOrNull,ze as assembleWorkspaceRelationshipGraph,BI as assertCompleteListResult,ek as assertExtensionBlueprint,Q0 as assertExtensionCapabilityUsage,L0 as assertExtensionDeactivated,ok as assertExtensionManifestCompatible,rk as assertExtensionManifestMatchesBlueprint,nk as assertExtensionPreflight,dc as assertHierarchyMutationAllowed,JR as assertHistoryCompactTarget,kR as assertHistoryRepairTarget,Yn as assertInitializedTracker,Rl as assertLinkedArtifactMutationIsUnambiguous,dk as assertMcpClientCapabilities,ak as assertMcpProtocolHeader,Oy as assertMemoryRelationshipGraphAdapterConformance,TA as assertNoUnknownCsvKeys,D0 as assertPackageManifest,FA as assertParentReferenceIsNotSelf,ux as assertPmMcpSkillsCapability,tk as assertProjectProfile,vI as assertProjectRuntimeCompatibility,oC as assertProjectionModeChoice,Xn as assertReadableTrackerRoot,$0 as assertRegisteredCommandContract,K0 as assertRegisteredCommandOverride,q0 as assertRegisteredExporter,F0 as assertRegisteredFlags,G0 as assertRegisteredHook,B0 as assertRegisteredImporter,z0 as assertRegisteredItemField,V0 as assertRegisteredItemType,Z0 as assertRegisteredMigration,W0 as assertRegisteredParserOverride,X0 as assertRegisteredPreflightOverride,H0 as assertRegisteredProfile,Y0 as assertRegisteredRendererOverride,U0 as assertRegisteredSearchProvider,J0 as assertRegisteredServiceOverride,j0 as assertRegisteredVectorStoreAdapter,Gb as assertRelationshipEdgeAllowed,to as assertRelationshipGraphAdapterConformance,iA as assertSchemaPreviewSupported,eI as assuranceAssertionUpdateIsLoosening,Nw as attachContextIntentReceipt,gw as attachContextUsageServingReceipt,Lp as attachLinkedTestMutationProvenance,Np as attachLinkedTestProvenance,Ze as attachMcpServerInfo,cC as attachOutputOmissionReceipt,Dw as attachOutputTokenAccounting,Lw as attachReadOutputContracts,YC as attachReadOutputSessionReceipt,Mc as auditMergeAttributeFence,PI as auditMergeDriverConfiguration,mp as auditWorkspaceRelationshipGraph,Jk as authorizeMcpHttpRequest,li as boundAgentEpisodeIdentity,OC as boundReadOutputRows,Bu as buildChildrenByParent,gP as buildCompactSearchFilterSummary,OO as buildContentFilterEcho,GM as buildContextSignalSnapshot,ly as buildCorpusShapeItemPlan,jv as buildDefectRecurrenceIndex,Uc as buildExtensionDescribeResult,Bc as buildExtensionInstallPlan,IO as buildGovernanceMissingFilterEcho,HA as buildInvalidTypeError,iP as buildItemChildrenRollup,s0 as buildItemCompletionMutations,SM as buildItemContextRelevanceCandidates,ME as buildItemNotFoundError,aP as buildItemSchedule,GR as buildLinkedFileRepairReport,Bk as buildMcpAuthorizationDiscoveryUrls,$h as buildMcpCompleteResult,lk as buildMcpDiscoverResult,Kk as buildMcpDynamicRegistrationMetadata,Nk as buildMcpHttpRequestHeaders,_k as buildMcpInputRequiredResult,jk as buildMcpProtectedResourceMetadata,Ic as buildMergeAttributePatterns,Vd as buildPmActionToolInputSchema,FN as buildPmRefusalClosureCensus,KI as buildRelationshipContext,ov as buildSearchCorpus,iv as buildSemanticCorpusInput,LR as buildStatusRoleWarnings,Wn as buildTrackerInitializationRecovery,lv as buildVectorizationEmbeddingIdentity,pv as buildVectorizationEmbeddingMetadata,yP as buildVerboseSearchFilters,NI as buildWorkflowCompletenessCheck,HM as buildWorkspaceMemorySnapshot,ci as canonicalDocument,sT as canonicalizeCommandOptionKey,WP as canonicalizeCommandSuggestions,CM as canonicalizeContextRecencyCoordinate,Db as canonicalizeRelationshipKind,RN as censusPmRecoveryReferenceProducers,jI as certifyCompleteListResult,y0 as checkExtensionManifestCompatibility,nh as claim,ih as claimNext,zI as classifyHistoryAuthorEvent,ki as classifyHistoryEvent,IR as classifyHistoryMergeReceiptReferences,yT as classifyHostEnvironmentFault,TP as classifyImplicitSemanticFallbackReason,oi as classifyItemFormatVersion,mf as classifyLinkedTestCommandSafety,ff as classifyLinkedTestFailure,HT as clearActiveExtensionHooks,Cp as clearDurableGraphCache,ES as clearFocusedItem,Cf as clearWorkspaceContractsCache,oh as close,Kp as closeItem,mh as closeTask,Ba as coalesceRepeatedListFlags,Wv as collectBlockedByIds,Yv as collectBlockedByIdsFromCorpus,bw as collectContextUsageDeliveredItemIds,uc as collectDanglingDependencyReferences,Zv as collectDependencyBlockedIds,lc as collectDuplicateDependencyRows,up as collectDuplicateRelationshipEdgeGroups,bP as collectErrorCauseCodes,nc as collectHierarchyRelations,Tr as collectMcpHeaderAnnotations,mc as collectMissingDependencyTargetIds,Zp as collectNewOrderingCycleWarnings,cp as collectOrderingCycles,pc as collectOrderingStorageContradictions,Hw as collectPackageContextIntentContracts,Gt as collectPackageExtensionDirectories,_E as collectRegisteredItemFieldNames,hS as collectRuntimeCreateFieldValues,KA as collectRuntimeFilterValues,gS as collectRuntimeUpdateFieldValues,$u as collectSubtreeIds,rn as collectUsedExtensionCapabilities,aT as commandOptionFlagLabel,u_ as comments,Vf as commitImportedItem,a0 as commitItemCompletion,i0 as commitItemMutations,zE as commitWorkspaceTransaction,es as compactFlagAliasContracts,Fu as compareCriticalItems,CI as comparePmDateVersions,jE as compareRelationshipSnapshots,mw as compareTimestampStrings,yM as compileHistoryProvenanceMatcher,Rw as composeContextIntentContracts,p0 as composeExtension,g0 as composeExtensionPackage,eO as computeActionabilityReport,xA as computeHistoryDiff,ip as computeRelationshipCentrality,np as computeRelationshipDominators,yl as computeWorkspaceGraphFingerprint,S_ as config,VT as consumeAfterCommandAffectedItems,o_ as context,xw as contextIntentRowId,ah as copy,_f as countFailureCategories,AC as countReadOutputRows,eh as create,JI as createAssurancePreset,jR as createAssuranceWorkspaceContext,sA as createCheckpointId,GI as createCompleteListOptions,MT as createCoreCommandHookContext,Jr as createCorpusShapeMeasurement,iI as createEmptyAssuranceDocument,_T as createEmptyExtensionRegistrationRegistry,Ki as createExtensionCommandSdk,en as createExtensionContributionInventory,ik as createExtensionTestHarness,xi as createHistoryEntry,Ov as createLazyModule,LI as createLifecycleCompletenessPolicies,Zk as createMcpStaticBearerVerifier,Rk as createMcpTaskStore,RE as createMutationGuardSdk,nC as createOutputOmissionReceipt,Fi as createPmCliExpectedError,Kn as createPmCliProgram,$n as createPmCommandOutputBudget,pC as createQueryFingerprint,vy as createRelationshipGraphScaleFixture,Z as createRelationshipGraphSnapshot,yt as createRelationshipKindRegistry,nd as createReproducibleProcessRunner,_P as createSearchCursorFingerprint,PT as createSerialQueue,vA as createStdinTokenResolver,pA as createUnknownSubcommandError,jC as createWorkflowPolicyEvaluator,$m as createWorkspaceSnapshot,C0 as deactivateExtensionForTest,vL as declineServiceOverride,kw as decodeContextIntentCursor,vv as decodeHtmlEntitiesInOptions,br as decodeMcpHttpHeaderValue,Fw as decodePmTableRows,_C as decodeQueryCursor,mC as decodeQueryCursorEnvelope,fC as decodeQueryCursorState,VC as decodeReadOutputContinuationCursor,ox as decoratePmMcpToolsWithApps,Ll as dedupeLinkedArtifacts,AM as defaultScoreContextCandidates,kL as defineAfterCommandHook,ML as defineBeforeCommandHook,PL as defineBeforeMutationHook,fL as defineCommand,CL as defineCommandOverride,W as defineCorpusShape,wx as defineEpisodeSpecification,RL as defineExporter,c0 as defineExtension,l0 as defineExtensionBlueprint,uL as defineExtensionManifest,_L as defineFlag,IL as defineImporter,gL as defineItemField,hL as defineItemType,yL as defineMigration,ey as defineObservationContract,LL as defineOnIndexHook,NL as defineOnReadHook,xL as defineOnWriteHook,wL as defineParserOverride,Fn as definePmCommandOutputBudget,DO as definePmCommandOutputEnvelope,kO as definePmErrorCodeCatalog,SL as definePreflightOverride,mL as defineProjectProfile,OL as defineRendererOverride,bL as defineSearchProvider,EL as defineServiceOverride,TL as defineVectorStoreAdapter,ny as defineVerdictContract,Ae as defineWorkspaceRecipe,dh as deleteItem,qm as deleteWorkspaceSnapshot,Ub as dependencyToRelationship,b_ as deps,QI as deriveAssuranceProposals,DR as deriveClosureTimestamp,m0 as deriveExtensionCapabilities,VO as derivePmBulkMutationEffect,MN as derivePmRecoveryReferenceObligations,dp as deriveRelationshipDeadlines,Nc as deriveSchemaEvolutionMigrationId,bv as deriveTelemetryCommandResolution,JA as describeAllowedTransitions,hI as describeExtensionActivation,f0 as describeExtensionBlueprint,Au as describeItemOwnershipConflict,Cx as describeObservationCost,Wt as describeProfileComposition,Xt as describeProjectProfile,Xw as describeUnknownError,wi as detectAgentIdentity,vi as detectHarnessIdentity,rp as detectRelationshipCommunities,Si as diagnoseAgentIdentity,fp as diffRelationshipAuditSnapshots,df as diffTestRunMeasurements,yk as digestMcpRequestParameters,OT as discoverExtensions,Xo as discoverNearbyPmRoot,jD as discoverPmTools,SI as discoverProjectRuntimeVersionPins,y_ as docs,p_ as duplicates,gp as durableGraphCachePath,wp as durableGraphCacheStatus,ti as effectiveItemFormatVersion,Dv as emitTelemetryErrorEvent,zf as emptyImportedDocument,dR as encodeItemScalarDecisionValue,yr as encodeMcpHttpHeaderValue,$w as encodePmTableRows,uC as encodeQueryCursor,zC as encodeReadOutputContinuationCursor,yE as enforceHistoryStreamPolicyForItem,bE as enforceHistoryStreamPolicyForItems,RO as enrichCliFlagInvocationContract,Pt as enrichCliFlagInvocationContracts,mE as ensureMaterializedHistoryTarget,Ac as ensurePmGitignore,Sl as ensureScope,yv as ensureSentryInit,qf as ensureTrackerInitialized,ep as enumerateRelationshipPaths,jn as estimatePmOutputTokens,aI as evaluateAssuranceAssertion,dI as evaluateAssuranceGate,Ux as evaluateBoundaryFixtures,RM as evaluateContextRanking,qv as evaluateDefectGateEvidence,sI as evaluateMeasurement,Am as evaluateMetricFloors,ld as evaluateMutationGuard,Qm as evaluateProvenanceCoverage,QL as evaluateReliabilityWindow,Ym as evaluateSemanticAttributionCoverage,zl as evaluateSimilarityGovernance,YA as evaluateTransition,iy as evaluateVerdictContract,UC as evaluateWorkflowPolicies,ad as executeEmbeddingBatchesWithRetry,dv as executeVectorDelete,cv as executeVectorReset,av as executeVectorUpsert,Yg as executeWorkspaceRecipe,Pl as expandAddGlobEntries,Hl as explainSourceTraceability,rM as exportAttestation,fh as extension,hh as extensionActivate,gh as extensionDeactivate,_h as extensionList,pb as extensionMigrate,OR as extractHistoryMergeReceiptDispositions,vR as extractHistoryMergeReceiptReferences,Wk as extractMcpTraceContext,cE as extractPatchFailureContext,Pp as extractReferencedPmItemIdsFromCommand,Ay as federateRelationshipGraphSnapshots,__ as files,h_ as filesDiscover,g_ as filesLookup,Tw as finalizeContextUsageDelivery,hy as findCoverageDeficits,ql as findDuplicateClusters,Oc as findGitWorkspaceRoot,BS as findHistoryIdentityDiscontinuities,Fc as findInstalledNpmPackageCandidate,rx as findPmMcpAppByUri,ko as findPmNamespacedCommand,op as findRedundantRelationshipEdges,sp as findRelationshipCutStructure,jl as findSimilarItems,Lv as finishTelemetryCommand,wT as flattenFlagListValue,my as flushTelemetryQueue,lh as focus,tp as forEachMatchedRelationshipEdge,pp as formatDuplicateEdgeGroup,sc as formatHierarchyRelation,lp as formatOrderingStorageContradiction,YE as formatPmPositionalActionFlagTip,bm as formatProfileApplyHuman,ym as formatProfileLintHuman,hm as formatProfileListHuman,gm as formatProfileShowHuman,$c as formatSchemaEvolutionMigrationHuman,wP as formatVectorIndexRecoveryWarnings,xP as formatWorkspacePositionHuman,W_ as gc,Bi as generateItemId,a_ as get,BT as getActiveCommandResult,Ow as getActiveContextIntentContracts,nn as getActiveExtensionRegistrations,Yk as getActiveMcpTraceContext,lI as getAssuranceDeclaration,Mh as getContracts,wS as getFocusedItem,Zo as getHistoryPath,LE as getItemAt,Jo as getItemPath,md as getMutationActionContract,Ec as getPmGitignoreBlock,Yo as getSettingsPath,wf as getWorkspaceContracts,JS as getWorkspaceHistoryPath,T_ as graph,yp as graphAuditBaselinePath,Jm as groupHistoryByEpisode,AL as handleServiceOverride,ck as hasMcpClientExtension,tx as hasPmMcpAppsCapability,qe as hasSubcommandFlagContractsForCommand,uv as hasVectorizationEmbeddingIdentityChanged,mv as hasVectorizationVectorDimensionChanged,GS as hashDocument,US as hashDocumentForVersion,jS as hashEmptyDocument,xS as hashHistoryPatch,kS as hashHistoryRecord,NS as hashHistoryStream,cR as hashItemScalarDecisionValue,K_ as health,Yl as hierarchyAncestors,Jl as hierarchyDescendants,Z_ as historyCompact,Q_ as historyCompactBulk,uS as historyDigest,gM as historyEntryMatchesProvenance,wI as historyItemHashVersionForRuntime,X_ as historyRedact,Y_ as historyRepair,J_ as historyRepairAll,Xv as indexBlockedByIds,ac as indexHierarchyRelations,fv as inferConsistentVectorDimension,Dn as inferPmOutputBudgetClass,w_ as init,UI as inspectCompleteListResult,hT as inspectExtensionManifestSchema,dl as inspectHistoryAuthorStream,gR as inspectMergeReceiptEvidence,AI as inspectProjectRuntimeCompatibility,Td as inspectStaleInProgressItems,Nh as inspectStaticExtensionInventory,NR as inspectStatusRoleAssignments,ZS as inspectWorkspaceHistoryState,Fm as inspectWorkspaceSnapshot,xc as installMergeFence,pk as interpretMcpResultType,Xu as isAlreadyClaimedError,Zw as isCommanderError,ol as isErrnoError,$v as isExternalDependencyReference,Fv as isExternalDependencySourceKind,me as isFileMissingError,Jb as isHostOutputSuppressed,$i as isItemAlreadyExistsError,aR as isItemScalarMissingValue,SR as isLegacyMergeReceiptSummary,h as isMcpRecord,pd as isMutationAction,Fb as isOrderingRelationshipKind,DA as isPlaceholderReferenceToken,Gi as isPmCliExpectedError,On as isPmExtensionCapabilityContract,Rn as isPmExtensionPolicyModeContract,Mn as isPmExtensionPolicySurfaceContract,In as isPmExtensionServiceNameContract,qO as isPmKnownExitCode,FO as isPmMutationReceipt,Ke as isPmSuccessfulExitCode,vn as isPmToolAction,ER as isPreDurableCloneLocalReceiptSummary,AR as isPreDurableDispositionEligibleReference,EI as isProjectMutatingInvocation,Iv as isPureSnakeCaseAlias,pw as isReadOutputBudgetExceeded,sC as isReadRowContract,Zc as isRuntimeRecord,Pv as isTerminalPlanMode,bS as isTerminalStatus,Hn as isTimestampLiteral,r0 as itemDocumentToMutationOptions,sP as itemHasSchedule,fd as jaccardSimilarity,f_ as learnings,fT as levenshteinDistanceWithinLimit,el as limitAnnotationEntries,Dp as linkedTestTrustFingerprint,_0 as lintExtensionBlueprint,gT as lintExtensionManifestSchema,Zt as lintProjectProfile,n_ as list,gi as listAgentProvenanceAdapters,ja as listAliasPluralKeys,i_ as listAllComplete,OE as listAllDocumentCandidatesCached,Hi as listAllItemMetadata,IE as listAllItemMetadataLight,cI as listAssuranceDeclarations,_I as listAssuranceVerdicts,dy as listBuiltinCorpusShapes,XP as listCoreClosedDomainContracts,CO as listGetProjectionFields,nR as listInvalidProvenanceHistoryStreamIds,bO as listListProjectionFields,yR as listMergeReceipts,ud as listMutationActions,IP as listMutationEvents,mo as listPmCommandFlagBudgets,gc as listPmCommandsForFamily,hc as listPmCommandsForTier,Me as listPmFlagLexicon,dL as listPmFlagSpellingInventory,yc as listPmMcpToolsForProfile,JN as listPmRequiredArgumentRefusalContracts,ZN as listPmSubcommandRefusalContracts,Kt as listProfiles,tL as listTrackerPreflightRecoveryContracts,Gm as listWorkspaceSnapshots,Kw as loadContextIntentRuntimeLayers,dm as loadCreateTemplateOptions,IT as loadExtensions,Ep as loadGraphAuditBaseline,dA as loadMutationCheckpoint,x as loadRelationshipGraphAdapter,zi as locateItem,bA as looksLikeGenericKeyValueEntry,vC as mapReadOutputRows,bR as markMergeReceiptReconciled,WA as matchesRuntimeFilters,xv as maybeRunFirstUseTelemetryPrompt,py as measureCorpusShapePlan,qi as measureItemMetadataReadWork,hA as mergeAdditiveTags,u0 as mergeExtensionBlueprints,lR as mergeHistoryStreams,fR as mergeItemDocuments,_R as mergeJsonDocuments,qa as mergeLinkedTestTwoTokenEntries,pR as mergeRelationshipEventStreams,zu as mergeSortedWarnings,Mv as migrateItemFilesToFormat,kE as mutateItem,PE as mutateItemWithHistoryContext,tE as mutateWorkspaceJsonWithHistory,d_ as next,bi as normalizeAgentProvenanceAdapterValue,Qc as normalizeAnnotationTransportOptions,YO as normalizeAssuranceEvaluation,XO as normalizeAssuranceMutation,za as normalizeBootstrapInvocation,MA as normalizeBulkIdsValue,cc as normalizeDependencyGraphTarget,fO as normalizeDependencySeedId,mO as normalizeDependencySourceKind,Qo as normalizeExtensionContributionInventory,aS as normalizeHistoryOperationForWrite,oR as normalizeInvalidHistoryProvenance,nA as normalizeItemAddressInvocation,ri as normalizeItemFormatVersion,ji as normalizeItemId,si as normalizeItemMetadata,_O as normalizeItemReference,Ua as normalizeLegacyExtensionActionSyntax,Ml as normalizeLinkedPath,LA as normalizeParentReferenceValue,Vt as normalizeProfileName,Ui as normalizeRawItemId,aw as normalizeReadOutputIncludeModeOptions,HS as normalizeReplayPatchOps,_d as normalizeSimilarityText,yS as normalizeStatusForRegistry,ii as normalizeStatusInput,fS as normalizeStatusInputWithRegistry,Jw as normalizeThrownExitCode,m_ as notes,Vn as nowIso,bp as openDurableGraphCache,gk as openMcpRequestState,Sx as openPmEpisode,Zl as orderingPredecessors,Ql as orderingSuccessors,NM as packContextCandidates,Gu as packRankedContextItems,Oh as packageActivate,vh as packageCatalog,Ih as packageDeactivate,Eh as packageDescribe,wh as packageDoctor,Th as packageInstall,yh as packageLifecycle,bh as packageList,Sh as packageManage,ub as packageMigrate,Ah as packageReload,Ch as packageUninstall,gC as paginateQueryRows,El as parseAddEntries,Al as parseAddGlobEntries,rl as parseAnnotationTextInput,QP as parseAtomicMutationControls,Fa as parseBootstrapCommandName,La as parseBootstrapGlobalOptions,$a as parseBootstrapHelpRequest,Va as parseBootstrapTypeValue,RA as parseBulkIdsText,Lu as parseContextDepth,Pu as parseContextFocusFields,zw as parseContextIntentDeclarations,Du as parseContextSections,FM as parseContextSignalSnapshot,yA as parseCsvKv,Vv as parseDefectChangeRiskRequest,BR as parseDefectRecurrenceCoverageRequest,zv as parseDefectRecurrencePolicy,Em as parseEvalMetricFloors,Rm as parseEvalQuerySet,Op as parseGraphSubcommand,tM as parseHistoryAttestation,_M as parseHistoryProvenanceFilters,tO as parseIntegerLimit,TS as parseItemDocument,e0 as parseItemMutationBatch,VA as parseLimit,pu as parseLinkedTestAssertionEqualsMap,uu as parseLinkedTestAssertionGteMap,iu as parseLinkedTestBoolean,su as parseLinkedTestContextMode,nu as parseLinkedTestEnvClear,ou as parseLinkedTestEnvSet,mu as parseLinkedTestJsonEntries,lu as parseLinkedTestMinLines,cu as parseLinkedTestRegexList,du as parseLinkedTestStringList,au as parseLinkedTestWorkspaceContextMode,Bh as parseMcpCachePolicy,Lh as parseMcpImplementation,tt as parseMcpInputRequests,ar as parseMcpInputResponses,ug as parseMcpSubscriptionFilter,Ol as parseMigrateEntries,nO as parseMultiValueFilter,GO as parseMutationReceipt,IA as parseOptionalNonNegativeInteger,OA as parseOptionalNumber,wN as parsePmAgentTaskTranscriptCorpus,UD as parsePmToolDiscoveryOptions,rO as parsePriority,aO as parsePriorityFilterSet,WC as parseReadOutputSession,hE as parseRegisteredItemFieldAssignments,se as parseRelationshipGraphSnapshot,vl as parseRemoveEntries,Vl as parseSourceLineRange,jA as parseStatusFilterCsv,iO as parseStringFilterSet,sd as parseTags,sf as parseTestRunMeasurements,oO as parseType,sO as parseTypeFilterSet,ul as parseUnknownAuthorHistoryEventCoordinates,NC as parseWorkflowPolicy,LC as parseWorkflowPolicyDocument,eP as partitionDecisionEntries,kA as patchPathToChangedField,$o as pathExists,uh as pauseTask,Tp as persistDurableGraphResult,sE as persistSelectedItemFormat,HI as planAgentIdentityVocabularyMutation,zM as planCompletedAtBackfill,qc as planExtensionDirectoryCopy,Qt as planProfileApplication,vN as planRelationshipEventBackfill,vp as planRelationshipRemediation,Lc as planSchemaEvolutionMigration,ll as planUnknownAuthorHistoryAcknowledgment,Um as planWorkspaceSnapshotRestore,QE as positionalShapeKey,eA as positionalSignatureKey,b0 as preflightExtension,gd as prepareSimilarityText,wA as preserveMutationStdinTokenFields,CA as preserveMutationStdinTokenLiterals,n0 as previewItemMutations,Bw as printError,jw as printResult,j_ as profile,z_ as profileApply,V_ as profileLint,B_ as profileList,q_ as profileShow,zT as projectAfterCommandItemSnapshot,ku as projectContextFocusRows,of as projectFleetAttributionAnalytics,hM as projectHistoryProvenance,qn as projectPmDiagnosticOutput,zn as projectPmDiagnosticText,tf as projectProvenanceCoverageAnalytics,Up as projectValidateCounts,tR as promoteAssuranceAssertion,yw as propagateContextUsageServingReceipt,Hx as pruneCompileCacheGenerations,pI as putAssuranceDeclaration,uI as putAssuranceDeclarationBundle,TE as queryItemMetadataIndex,CE as queryLinkedFileMetadataIndex,wE as querySimilarItemMetadataIndex,af as queryTestRunMeasurementsBelow,cn as quoteCommandArg,dn as quoteWindowsCommandArg,KP as rankCommandPaths,tl as readAnnotationEntries,Ei as readAuthorEnvironment,Ef as readBooleanOption,Aw as readContextUsageAffinity,Af as readCsvListOption,Xi as readExtensionMigrationState,Fo as readFileIfExists,Za as readFirstStringFromCommanderOptions,Qa as readFirstValueFromCommanderOptions,Zm as readHistoryAnalyticsWindow,OS as readHistoryEntries,Ii as readHistorySnapshot,Vm as readImprovementLedger,AE as readItemMetadataDerivedIndexState,Vi as readLocatedItem,EC as readOutputBudgetCollections,qC as readOutputCollectionFingerprint,SC as readOutputContinuationRowCollections,CC as readOutputContinuationRowPaths,iw as readOutputIncludeModeOptions,wC as readOutputRowCollections,TC as readOutputRowPaths,JC as readOutputSessionRemainingTokens,Ft as readPmPackageManifest,Tf as readRequiredString,Li as readSettings,aE as readSettingsWithMetadata,ed as readStringArrayFromCommanderOptions,Sf as readStringOption,Yw as readThrownExitCode,_v as readVectorizationStatusLedger,fE as readWorkflowPolicies,DC as readWorkflowPolicyField,Vw as readWorkspaceContextIntentContracts,BM as readWorkspaceContextSignals,KM as readWorkspaceMemory,kP as readWorkspacePosition,XS as reanchorHistoryEntries,tD as reconcileArtifactLedgers,on as reconcileExtensionCapabilityUsage,oE as reconcileWorkspaceJsonHistory,qT as recordAfterCommandAffectedItem,fI as recordAssuranceVerdict,gu as recordClaimSemanticAttribution,ww as recordContextUsageDelivery,Cw as recordContextUsageServing,Sw as recordContextUsageTouch,Ew as recordContextUsageTouches,bu as recordFocusSemanticAttribution,zm as recordImprovementObservation,yu as recordReleaseSemanticAttribution,vE as refreshItemMetadataDerivedIndex,Pc as refreshMergeAttributeFenceIfInstalled,RC as refreshReadOutputDeliveredCounts,gv as refreshSearchArtifactsForMutation,yi as registerAgentProvenanceAdapters,pO as registerExternalDependencyResolver,hi as registerHarnessSignalDescriptors,QT as registerOutputMaterialFieldGroups,sh as release,IC as rememberReadOutputFocusRows,mI as removeAssuranceDeclaration,Go as removeFileIfExists,Fl as renameArtifactsResultKey,Ou as renderCalendarMarkdown,Iu as renderCalendarToon,Vu as renderContextMarkdown,jc as renderExtensionDescribeMarkdown,Gc as renderExtensionSurfaceMarkdown,Wf as renderGuideMarkdown,VP as renderMissingOptionRetry,tP as renderNextMarkdown,YP as renderPmClosedDomainHelp,ln as renderPmCommand,Do as renderPmCommandAliasMigrationHint,Cc as renderPmCommandVisibilityMarkdown,lL as renderPmFlagLexiconMarkdown,nx as renderPmMcpAppHtml,GN as renderPmRefusalClosureCensusMarkdown,qA as renderRowsAsCsv,zA as renderRowsAsTable,rh as reopen,uE as replayHistoryToTarget,zS as replayToCanonicalItemDocument,qS as replayToItemDocument,sS as requireHistoryOperation,aM as requireTerminalReason,dM as requireTerminalReasonWithRecovery,$S as resealHistoryRewrite,GT as resetActiveExtensionRuntimeState,Cl as resetWorkspaceGraphCache,pi as resolveAgentSessionContextFromSignals,al as resolveAnnotationIndex,nl as resolveAnnotationInput,vS as resolveAuthor,Oi as resolveAuthorIdentity,NA as resolveBodyFileContent,cy as resolveBuiltinCorpusShape,vu as resolveCalendarOutputFormat,xO as resolveCanonicalPmErrorCodeContract,$b as resolveCanonicalRelationshipKind,AS as resolveClaimPrincipal,PA as resolveCliBulkIdsInput,lT as resolveCommandOptionPolicyState,Vx as resolveCompileCacheGeneration,qM as resolveCompletionTimestamp,eT as resolveConfiguredPmPackageRoot,SO as resolveContentFieldFilters,Mw as resolveContextIntentContract,xu as resolveContextOutputFormat,Nu as resolveContextTokenBudget,lM as resolveCreateExplicitEmptyFlag,pP as resolveEffectiveSearchMode,tv as resolveEmbeddingProviders,zc as resolveExtensionInstallSourceIdentity,Wi as resolveExtensionMigrationStatePath,vT as resolveExtensionRoots,uO as resolveExternalDependencyReference,CT as resolveFlagValueKind,mT as resolveGlobalPmRoot,Hf as resolveGuideOutputFormat,Hm as resolveHistoryEpisodeGroupIdentity,pS as resolveHistoryHashAlgorithm,iS as resolveHistoryOperation,fM as resolveHistoryProvenanceDimensions,xE as resolveHistorySubject,lE as resolveHistoryTarget,mP as resolveHybridSemanticWeight,Wo as resolveImplicitPmRoot,fw as resolveIsoOrRelative,Jv as resolveItemBlockers,Hv as resolveItemExecutionRole,t0 as resolveItemMutationDocument,Ko as resolveItemTypeRegistry,mS as resolveItemTypesFilePath,hf as resolveLinkedTestFailureExitCode,kp as resolveLinkedTestSourceRef,xp as resolveLinkedTestSourceWorkspaceRoot,$p as resolveLinkedTestTrust,Fp as resolveLinkedTestTrustBatch,mg as resolveMcpAcknowledgedSubscriptionFilter,Je as resolveMcpRequestContext,vc as resolveMergeInstallContext,wO as resolveMissingMetadataFilters,zP as resolveMissingOptionPlaceholder,iC as resolveModePairedOutputOmissionReceipt,ZM as resolveNextOutputFormat,dC as resolveOutputOmissionReceipt,Qb as resolvePmCliVersion,Lo as resolvePmCommandAlias,Ve as resolvePmCommandCapabilityFamily,Nt as resolvePmCommandExitContract,L as resolvePmCommandOperation,Un as resolvePmCommandOutputBudget,xt as resolvePmCommandOutputEnvelope,WE as resolvePmCommandPositionalContract,He as resolvePmCommandVisibilityTier,Bn as resolvePmDiagnosticOutputBudget,NO as resolvePmErrorCodeContract,ab as resolvePmFlagSemanticConcept,Ne as resolvePmHistoryOperation,Zb as resolvePmPackageRootFromModule,XE as resolvePmPositionalActionContract,xa as resolvePmPositionalActionFlagContracts,$e as resolvePmRoot,jd as resolvePmToolCustomFieldCollision,GA as resolvePriority,Ht as resolveProfile,Rc as resolveProjectMergeTypeFolders,hC as resolveQueryCursorStart,dw as resolveReadOutputDimensions,uw as resolveReadOutputEncoding,MC as resolveReadOutputRecoveryBudget,ow as resolveReadOutputSurface,aC as resolveReadRowContract,qP as resolveRecoveryCommandName,uA as resolveRegisteredSearchProvider,mA as resolveRegisteredVectorStoreAdapter,od as resolveReproducibleProcessEnvironment,Zn as resolveRuntimeFieldRegistry,Jn as resolveRuntimeStatusRegistry,rv as resolveSearchCorpusFields,lP as resolveSearchMaxResults,hP as resolveSearchPage,uP as resolveSearchScoreThreshold,fP as resolveSearchTuning,nv as resolveSemanticCorpusCharacterLimit,hu as resolveSemanticLineageIds,ZA as resolveSettingsWithSemanticRuntimeDefaults,bI as resolveSourceContextWritePolicy,Su as resolveStartTaskInProgressStatus,ee as resolveSubcommandFlagContractsForCommand,Wb as resolveTelemetryErrorCategory,sM as resolveTerminalReason,cT as resolveTypeDefinition,dT as resolveTypeName,BA as resolveTypeSynonym,XA as resolveTypeWorkflows,pl as resolveUnknownAuthorAcknowledgmentSelector,CP as resolveVectorIndexRecovery,sv as resolveVectorStores,oc as resolveWorkspaceRelationshipKindRegistry,uT as resolveWorkspaceRoot,ch as restore,cA as restoreCheckpointItems,nE as restoreWorkspaceJsonFromHistory,Bm as restoreWorkspaceSnapshot,jm as restoreWorkspaceSnapshotWithRecovery,kh as runAction,KT as runActiveBeforeMutationHooks,XT as runActiveCommandHandler,WT as runActiveOnIndexHooks,an as runActiveOnReadHooks,sn as runActiveOnWriteHooks,YT as runActiveParserOverride,JT as runActivePreflightOverride,ZT as runActiveServiceOverride,Mu as runActivity,AT as runAfterCommandHooks,Tm as runAggregate,sl as runAnnotationCommand,Hp as runAppend,HR as runAssuranceAction,KR as runAssuranceDispatch,ET as runBeforeCommandHooks,Ru as runCalendar,Yu as runClaim,Ju as runClaimNext,Wp as runClose,Yp as runCloseMany,tm as runCloseTask,_l as runComments,Xf as runCompletion,hl as runConfig,Bt as runContext,kM as runContextEvaluationCorpus,MM as runContextEvaluationScenario,Jp as runCopy,fu as runCreate,_u as runDelete,wl as runDeps,Gl as runDocs,XI as runDuplicates,Pm as runEval,xm as runEvent,Vc as runExtension,Zi as runExtensionMigrateAction,Ji as runExtensionMigrations,Kl as runFiles,Xl as runFilesDiscover,Wl as runFilesLookup,rf as runFleetAttributionAnalytics,wu as runFocus,qp as runGc,Cm as runGet,Ip as runGraph,Kf as runGuide,Rp as runHealth,cP as runHistory,nM as runHistoryAttest,XR as runHistoryCompact,ZR as runHistoryCompactBulk,RR as runHistoryMaintenance,QR as runHistoryRedact,PR as runHistoryRepair,xR as runHistoryRepairAll,Jc as runInit,Wc as runInitAgentGuidance,Vp as runLearnings,$l as runLinkedArtifacts,gf as runLinkedTests,fc as runList,km as runMeet,AP as runMergeDriver,kc as runMergeInstall,CR as runMergeReceiptEvidenceReport,TR as runMergeReceiptReport,vP as runMergeReconcile,Wu as runNext,sm as runNotes,em as runPauseTask,nm as runPlan,_m as runProfileApply,fm as runProfileLint,um as runProfileList,mm as runProfileShow,ef as runProvenanceCoverageAnalytics,w0 as runRegisteredCommandForTest,O0 as runRegisteredCommandOverrideForTest,N0 as runRegisteredExporterForTest,E0 as runRegisteredHookForTest,x0 as runRegisteredImporterForTest,k0 as runRegisteredMigrationForTest,S0 as runRegisteredMutationGuardForTest,A0 as runRegisteredParserOverrideForTest,v0 as runRegisteredPreflightOverrideForTest,I0 as runRegisteredRendererOverrideForTest,M0 as runRegisteredSearchProviderForTest,R0 as runRegisteredServiceOverrideForTest,P0 as runRegisteredVectorStoreAdapterForTest,er as runReindex,Zu as runRelease,Nm as runRemind,uM as runReopen,Xp as runRestore,Dc as runSchemaEvolutionMigration,wm as runSearch,uy as runSearchRefreshWorkerEntrypoint,Yf as runStartBackgroundRun,Qu as runStartTask,cf as runStats,pf as runTelemetry,lm as runTemplatesList,cm as runTemplatesSave,pm as runTemplatesShow,yf as runTest,bf as runTestAll,Jf as runTestRunsList,Qf as runTestRunsLogs,t_ as runTestRunsResume,Zf as runTestRunsStatus,e_ as runTestRunsStop,r_ as runTestRunsWorker,Eu as runUpdate,im as runUpdateMany,Ut as runUpgrade,Bp as runValidate,Ph as runWithActiveExtensions,D as runWithAgentSessionContext,iE as runWithConfigurationOnlySettings,Iw as runWithContextIntentContracts,Ww as runWithDiscoveredContextIntentContracts,Ti as runWithHarnessDetectionSignals,Xk as runWithMcpTraceContext,id as runWithReproducibleProcessEnvironment,Ci as runWithWorkspaceHarnessSignalDescriptors,qr as runWithWorkspaceRecipe,DI as runWorkflowPolicyAction,WR as runWorkspaceTransactionGc,Ap as saveGraphAuditBaseline,$R as scanClosureTimestamps,rR as scanExtensionHostVersions,cl as scanHistoryAuthorAttribution,ni as scanItemFormatVersions,cd as scanMutationSecrets,iR as scanProvenanceResolverHealth,Cd as scanStaleInProgressItems,UR as scanStorageIntegrity,E_ as schema,P_ as schemaAddField,R_ as schemaAddStatus,O_ as schemaAddType,L_ as schemaApplyPreset,D_ as schemaInferTypes,A_ as schemaList,x_ as schemaListFields,G_ as schemaRemapStatus,k_ as schemaRemoveField,M_ as schemaRemoveStatus,I_ as schemaRemoveType,F_ as schemaRenameField,$_ as schemaRenameType,v_ as schemaShow,N_ as schemaShowField,U_ as schemaShowStatus,HP as scoreCommandPathMatch,vM as scoreContextCandidates,OM as scoreContextCandidatesWithActiveExtensions,yd as scoreItemSimilarity,QN as scorePmGrammarRefusalClosure,BN as scorePmRefusalClosure,bd as scorePreparedItemSimilarity,rL as scoreTrackerPreflightRecoveryClosure,LS as sealHistoryRecord,hk as sealMcpRequestState,s_ as search,YM as searchWorkspaceMemory,JM as searchWorkspaceMemoryReadResult,Qv as selectActionableEntries,lC as selectCursorSemanticOptions,Bf as selectImportAuthor,zk as selectMcpClientRegistrationMode,XM as selectWorkspaceMemory,WM as selectWorkspaceMemoryRollups,Cu as semanticAttributionAffinity,Sv as sentryCaptureCliError,wv as sentryFinishCommandSpan,Av as sentryFlush,Ev as sentryLogCliUsageError,Tv as sentrySetCommandContext,Cv as sentryStartCommandSpan,di as serializeItemDocument,JP as serializeNdjsonRows,ZP as serializeNdjsonStream,ty as serveDeclaredObservation,UT as setActiveCommandContext,jT as setActiveCommandResult,xT as setActiveExtensionCommands,kT as setActiveExtensionHooks,NT as setActiveExtensionParsers,LT as setActiveExtensionPreflight,FT as setActiveExtensionRegistrations,$T as setActiveExtensionRenderers,DT as setActiveExtensionServices,SS as setFocusedItem,kv as shouldCompletePlanOnClose,Sp as shouldPersistDurableGraphCache,AA as shouldResolveMutationStdinTokenField,EA as shouldResolveMutationStdinTokens,ev as shouldRunSearchRefreshInForeground,Ul as similarityAdvisoryWarnings,bC as sliceReadOutputRowCollection,Nl as sortLinkedArtifacts,fA as splitAcceptanceCriteria,Rv as splitCommaList,ai as splitFrontMatter,cw as stabilizeReadOutputReceiptEstimates,R as stableStringify,ST as stableValueEquals,ph as startTask,Nv as startTelemetryCommand,l_ as stats,_S as statusIsTerminal,Da as stripGlobalBootstrapTokens,RP as subscribeMutationEventBatches,MP as subscribeMutationEvents,VI as summarizeAgentIdentityVocabulary,Wm as summarizeAgentModelProvenance,Xm as summarizeAgentProvenance,PM as summarizeContextEvaluationReports,uf as summarizeContextPreflight,bM as summarizeHistoryProvenance,Xc as summarizeInitResult,hR as summarizeMergeReceipt,pM as supportsCreateExplicitEmpty,oA as supportsItemIdAlias,Yb as suppressHostOutput,Oe as syncRelationshipGraphAdapter,h0 as synthesizeExtensionManifest,Na as toCompletionFlagString,qu as toContextFocusItem,Uu as toContextPackingSummary,ju as toContextRankingSummary,rT as toErrorMessage,Of as toEstimatedMinutesValue,UP as toExtensionFlagDefinitions,kf as toImportBoolean,Df as toImportConfidence,Pf as toImportInteger,Uf as toImportLinkedDocs,Gf as toImportLinkedFiles,jf as toImportLinkedTests,Ff as toImportLogEntries,$f as toImportNormalizedEnum,Lf as toImportNumberMap,If as toImportPriority,Mf as toImportStatus,xf as toImportStringList,Nf as toImportStringMap,Rf as toImportTags,CS as toItemRecord,vf as toNonEmptyImportString,tT as toNonEmptyStringOrUndefined,VS as toReplayDocument,hd as tokenizeSimilarityText,SA as transferMutationStdinTokenPolicy,bT as translateHostEnvironmentFault,th as update,Rh as upgrade,H_ as validate,rI as validateAssertionDefinition,nI as validateAssuranceDocument,oI as validateGateDefinition,o0 as validateItemMutationRows,Dl as validateLinkedPaths,Vk as validateMcpAuthorizationResponseIssuer,qk as validateMcpAuthorizationServerMetadata,Hk as validateMcpClientMetadataDocument,Lk as validateMcpHttpRequestHeaders,Tk as validateMcpJsonSchema,tI as validateMeasurementDefinition,$A as validateMissingParentReference,nw as validateReadOutputOptions,UA as validateSprintOrReleaseValue,pT as validateTypeOptions,qE as validateWorkspaceTransactionIdentity,oM as verifyAttestation,MO as verifyCliFlagInvocationParity,ZE as verifyExplicitPositionalSlotCensus,WS as verifyHistoryChain,KS as verifyHistoryChainWithVersion,NE as verifyHistoryEntries,DS as verifyHistoryRecordHash,FS as verifyHistoryRewriteEvidence,rA as verifyPmCliGrammar,tA as verifyPmCommandPositionalContracts,cL as verifyPmFlagLexicon,xN as verifyPmRecoveryKindRuntimeCoverage,Jy as verifyPmRecoveryProducerRuntimeCoverage,kN as verifyPmRecoveryReferences,$N as verifyPmRefusalClosureIdentityRatchet,DN as verifyPmRefusalClosureRatchet,PN as verifyPmRefusalReachability,wd as verifyToolOptionCliParity,Qi as withFlagAliasMetadata,TT as withHostEnvironmentBoundary,bk as withMcpCachePolicy,FC as workflowApprovalFingerprint,GC as workflowPolicyApplies,$C as workflowPolicyFingerprint,Tl as workspaceGraphCache,il as wrapOwnershipConflict,Qw as wrapThrownErrorForSentry,Ai as writeAuthorEnvironment,De as writeFileAtomic,aA as writeMutationCheckpoint,dE as writeSettings,Uw as writeStderr,Gw as writeStdout,hv as writeVectorizationStatusLedger,rE as writeWorkspaceJsonWithHistory};
|
|
32
32
|
//# sourceMappingURL=sdk.js.map
|