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