@unbrained/pm-cli 2026.10.9 → 2026.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -36
- package/CHANGELOG.md +32 -4
- package/dist/cli/register-mutation.js +2 -2
- package/dist/cli-bundle/bundle-manifest.json +1 -382
- package/dist/cli-bundle/chunks/{chunk-P5NS7EFC.js → chunk-2JYTSTQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZNXRGATT.js → chunk-BXSXT5Z6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QQHNXCO3.js → chunk-ESRACL6K.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5MOFELIF.js → chunk-K2UTE75T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-55MK3QQM.js → chunk-KNW3RSLS.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-MEWBSWE3.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-KOGF6O6W.js → chunk-OBLO45UM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XW3BLWFF.js → chunk-RBPOO46D.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-E4XR5LKU.js → chunk-RUT3CCAG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CPZOW6L2.js → chunk-S445XEYT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5NR6TDYB.js → chunk-SSY4OSJR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5TCQ5J3V.js → chunk-YMLF6QT7.js} +75 -75
- package/dist/cli-bundle/chunks/{chunk-NIF7JOPW.js → chunk-ZWRLAOA4.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-2YOWMNWY.js → register-list-query-T6BOR67M.js} +2 -2
- package/dist/cli-bundle/chunks/register-mutation-6NXR7SAJ.js +20 -0
- package/dist/cli-bundle/chunks/{register-operations-BMK65YM3.js → register-operations-PDOBQZUJ.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-24TFFK6N.js → register-setup-MAYFPKBX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-362645PL.js → chunk-52UJEHEV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-EZ4367G4.js → chunk-EIOQNLBQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SAN3KPX4.js → chunk-GVGFUD52.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-DSLNUL2Q.js → chunk-JGFSSR3G.js} +16 -16
- package/dist/cli-bundle/focused-chunks/{chunk-IARAEFMA.js → chunk-KNJR2WUO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-MJQ253F3.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-MCVWZUGK.js → chunk-SIEGIPNT.js} +28 -28
- package/dist/cli-bundle/main.js +2 -2
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +51 -51
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +9 -9
- package/dist/core/item/item-format.d.ts +2 -0
- package/dist/core/item/item-format.js +3 -3
- package/dist/core/schema/runtime-field-values.d.ts +2 -2
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/store/item-format-migration.js +1 -1
- package/dist/core/store/item-store.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/governance/artifact-ledgers.d.ts +59 -0
- package/dist/sdk/governance/artifact-ledgers.js +2 -0
- package/dist/sdk/governance/reliability.d.ts +74 -0
- package/dist/sdk/governance/reliability.js +2 -0
- package/dist/sdk/governance.d.ts +2 -0
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/structured-mutations.d.ts +5 -1
- package/dist/sdk/structured-mutations.js +1 -1
- package/docs/QUALITY_EVIDENCE.md +52 -1
- package/docs/RELEASE_LEDGER_RECONCILIATION.md +148 -0
- package/docs/RELEASE_RELIABILITY.md +58 -3
- package/docs/RELEASING.md +34 -5
- package/docs/SDK.md +16 -2
- package/docs/TESTING.md +36 -0
- package/docs/agent-task-token-baseline.json +1 -291
- package/docs/agent-task-transcripts.json +1 -478
- package/docs/ecosystem-review-2026-09-28.json +1 -2866
- package/docs/examples/policy-restricted-extension/manifest.json +1 -22
- package/docs/examples/policy-restricted-extension/package.json +1 -8
- package/docs/examples/sdk-agent-environment/package.json +1 -8
- package/docs/examples/sdk-app-embedding/package.json +1 -9
- package/docs/examples/sdk-contract-consumer/package.json +1 -11
- package/docs/examples/sdk-custom-tool/package.json +1 -13
- package/docs/examples/starter-extension/manifest.json +1 -33
- package/docs/examples/starter-extension/package.json +1 -10
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +4 -3
- package/docs/performance/corpus-shape-comparison.json +1 -108
- package/docs/performance/latest-scale-report.json +1 -418
- package/docs/performance/scale-100k-report.json +1 -418
- package/docs/schemas/extension-manifest.schema.json +1 -165
- package/marketplace.json +1 -36
- package/package.json +1 -1
- package/packages/pm-beads/extensions/beads/manifest.json +1 -28
- package/packages/pm-beads/extensions/beads/package.json +1 -3
- package/packages/pm-beads/package.json +1 -50
- package/packages/pm-calendar/extensions/calendar/manifest.json +1 -22
- package/packages/pm-calendar/extensions/calendar/package.json +1 -3
- package/packages/pm-calendar/package.json +1 -51
- package/packages/pm-command-kit/extensions/command-kit/manifest.json +1 -22
- package/packages/pm-command-kit/extensions/command-kit/package.json +1 -3
- package/packages/pm-command-kit/package.json +1 -53
- package/packages/pm-digital-twin/extensions/digital-twin/manifest.json +1 -19
- package/packages/pm-digital-twin/extensions/digital-twin/package.json +1 -3
- package/packages/pm-digital-twin/package.json +1 -58
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -19
- package/packages/pm-governance-audit/extensions/governance-audit/package.json +1 -3
- package/packages/pm-governance-audit/package.json +1 -55
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +1 -22
- package/packages/pm-guide-shell/extensions/guide-shell/package.json +1 -3
- package/packages/pm-guide-shell/package.json +1 -52
- package/packages/pm-kanban/extensions/kanban/manifest.json +1 -19
- package/packages/pm-kanban/extensions/kanban/package.json +1 -3
- package/packages/pm-kanban/package.json +1 -57
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +1 -19
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/package.json +1 -3
- package/packages/pm-lifecycle-hooks/package.json +1 -52
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +1 -29
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/package.json +1 -3
- package/packages/pm-linked-test-adapters/package.json +1 -53
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +1 -29
- package/packages/pm-search-advanced/extensions/search-advanced/package.json +1 -3
- package/packages/pm-search-advanced/package.json +1 -54
- package/packages/pm-templates/extensions/templates/manifest.json +1 -22
- package/packages/pm-templates/extensions/templates/package.json +1 -3
- package/packages/pm-templates/package.json +1 -50
- package/packages/pm-todos/extensions/todos/manifest.json +1 -29
- package/packages/pm-todos/extensions/todos/package.json +1 -3
- package/packages/pm-todos/package.json +1 -51
- package/packages/pm-vcs/extensions/vcs/manifest.json +1 -19
- package/packages/pm-vcs/extensions/vcs/package.json +1 -3
- package/packages/pm-vcs/package.json +1 -55
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -25
- package/plugins/pm-claude/.mcp.json +1 -8
- package/plugins/pm-claude/hooks/hooks.json +1 -17
- package/plugins/pm-claude/package.json +1 -9
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -45
- package/plugins/pm-codex/.mcp.json +1 -11
- package/plugins/pm-codex/mcp.json +1 -11
- package/plugins/pm-codex/package.json +1 -9
- package/plugins/pm-codex/plugin.json +1 -45
- package/runtime-dependencies.json +1 -512
- package/dist/cli-bundle/chunks/chunk-N7GKWO4G.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-ILOWFMTV.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-2ATAD56F.js +0 -2
package/dist/cli-bundle/sdk.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{A as FM,B as GM,C as UM,D as jM,E as BM,a as Vn,b as qS,c as zS,d as VS,e as HS,f as KS,g as Jw,h as Zw,i as xa,j as Na,k as La,m as Da,n as $a,o as Fa,p as Ga,q as Ua,r as ja,s as Ba,t as qa,u as Qa,v as ed,w as td,x as rd,y as od,z as $M}from"./chunks/chunk-ZNXRGATT.js";import{A as I0,B as P0,C as M0,D as k0,E as x0,F as N0,G as L0,H as D0,I as $0,J as F0,K as G0,L as U0,M as j0,N as B0,O as q0,P as z0,Q as V0,R as H0,S as K0,T as W0,U as X0,V as Y0,W as J0,X as Z0,Y as Q0,a as o0,b as n0,c as i0,d as s0,e as a0,f as d0,g as c0,h as l0,i as p0,j as u0,k as m0,l as f0,m as _0,n as h0,o as g0,p as y0,q as b0,r as C0,s as T0,t as S0,u as E0,v as w0,w as A0,x as v0,y as O0,z as R0}from"./chunks/chunk-E4XR5LKU.js";import{a as kh}from"./chunks/chunk-NIF7JOPW.js";import{a as qM,b as zM,c as VM,d as HM}from"./chunks/chunk-KOGF6O6W.js";import{a as KM,b as WM,c as XM,d as YM,e as JM,f as ZM,g as QM,h as e0,i as t0,j as r0}from"./chunks/chunk-N7GKWO4G.js";import{$ as gm,$a as d_,$b as dh,A as rm,Aa as Pf,Ab as L_,B as om,Ba as Mf,Bb as D_,C as nm,Ca as kf,Cb as $_,D as jt,Da as xf,Db as F_,E as Bt,Ea as Nf,Eb as G_,F as qt,Fa as Lf,Fb as U_,G as zt,Ga as Df,Gb as j_,H as Vt,Ha as $f,Hb as B_,I as Ht,Ia as Ff,Ib as q_,J as Kt,Ja as Gf,Jb as z_,K as Wt,Ka as Uf,Kb as V_,L as Xt,La as jf,Lb as H_,M as Yt,Ma as Bf,Mb as K_,N as Jt,Na as qf,Nb as W_,O as im,Oa as zf,Ob as X_,P as sm,Pa as Vf,Pb as Y_,Q as am,Qa as Hf,Qb as J_,R as dm,Ra as Kf,Rb as Z_,S as cm,Sa as Zt,Sb as Q_,T as He,Ta as me,Tb as eh,U as lm,Ua as t_,Ub as th,V as pm,Va as r_,Vb as rh,W as um,Wa as o_,Wb as oh,X as mm,Xa as n_,Xb as nh,Y as fm,Ya as i_,Yb as ih,Z as _m,Za as s_,Zb as sh,_ as hm,_a as a_,_b as ah,a as $S,aa as yM,ab as c_,ac as ch,b as FS,ba as bM,bb as l_,bc as lh,c as GS,ca as CM,cb as p_,cc as ph,d as US,da as Pm,db as u_,dc as uh,e as jS,ea as Mm,eb as m_,ec as mh,f as BS,fa as km,fb as f_,fc as fh,g as Pw,ga as yf,gb as __,gc as _h,h as Mw,ha as bf,hb as h_,hc as hh,i as Vi,ia as IM,ib as g_,ic as gh,j as MR,ja as PM,jb as y_,jc as yh,k as kR,ka as MM,kb as b_,kc as bh,l as xR,la as kM,lb as C_,lc as Ch,m as NR,ma as xM,mb as T_,mc as Th,n as LR,na as NM,nb as S_,nc as Sh,o as DR,oa as LM,ob as E_,oc as Eh,p as ml,pa as DM,pb as w_,pc as wh,q as qp,qa as Cf,qb as A_,qc as Ah,r as zp,ra as Tf,rb as v_,rc as vh,s as Wp,sa as Sf,sb as O_,sc as Oh,t as Xp,ta as Ef,tb as R_,tc as Rh,u as mu,ua as wf,ub as I_,uc as Ih,v as Cu,va as Af,vb as P_,vc as Ph,w as sP,wa as vf,wb as M_,wc as Mh,x as Ve,xa as Of,xb as k_,y as em,ya as Rf,yb as x_,z as tm,za as If,zb as N_}from"./chunks/chunk-QQHNXCO3.js";import{e as GR,f as UR,g as fl,h as _l,i as Ft}from"./chunks/chunk-5MOFELIF.js";import{A as oM,B as nM,C as iM,D as sM,E as aM,F as dM,G as cM,H as lM,I as pM,J as uM,K as mM,L as fM,M as _M,N as hM,O as gM,P as Cm,Q as Tm,R as Sm,S as Em,T as wm,U as Am,V as vm,W as Om,X as Rm,Y as Im,a as Ni,b as Li,c as Di,d as $i,e as qI,f as zI,g as VI,h as HI,i as KI,j as Bp,k as WI,l as XI,m as YI,n as JI,o as ZI,q as Kp,r as ym,s as YP,t as JP,u as ZP,v as QP,w as eM,x as tM,y as bm,z as rM}from"./chunks/chunk-P5NS7EFC.js";import{$ as oR,$a as wl,$b as Np,$c as Ju,A as kO,Ab as VR,Ac as eu,Ad as ef,B as xO,Bb as HR,Bc as tu,Bd as tf,C as NO,Cb as KR,Cc as ru,Cd as rf,D as LO,Db as WR,Dc as ou,Dd as of,E as DO,Eb as XR,Ec as nu,Ed as nf,F as ze,Fa as Jc,Fb as YR,Fc as iu,Fd as sf,G as $O,Ga as Zc,Gb as hI,Gc as su,Gd as af,H as kt,Ha as Qc,Hb as gI,Hc as au,Hd as df,I as FO,Ia as el,Ib as yI,Ic as du,J as GO,Ja as tl,Jb as bI,Jc as cu,Jd as cf,K as UO,Kb as CI,Kc as lu,Kd as lf,L as jO,La as rl,Lb as TI,Lc as pu,Ld as pf,M as BO,Ma as ol,Mb as SI,Md as uf,N as qO,Na as nl,Nb as RI,Nc as nP,Nd as mf,O as zO,Oa as il,Ob as II,Oc as iP,Od as ff,P as VO,Pa as $R,Pb as Op,Pc as uu,Pd as _f,Q as HO,Qa as FR,Qb as Rp,Qc as Tu,Qd as hf,R as KO,Ra as sl,Rb as PI,Rd as gf,S as WO,Sa as al,Sb as MI,Sd as Wf,T as XO,Ta as dl,Tb as kI,Td as Xf,U as YO,Ua as cl,Ub as xI,Uc as Su,Ud as Yf,V as JO,Va as ll,Vb as NI,Vd as Jf,W as ZO,Wa as pl,Wb as Ip,Wc as Eu,Wd as Zf,X as QO,Xa as ul,Xb as Pp,Xc as Ku,Xd as Qf,Y as eR,Ya as Tl,Yb as Mp,Yc as Wu,Yd as e_,Z as tR,Za as Sl,Zb as kp,Zc as Xu,_ as rR,_a as El,_b as xp,_c as Yu,a as EO,aa as nR,ab as Al,ac as Lp,ad as Zu,b as It,ba as iR,bb as vl,bc as Dp,bd as Qu,c as wO,ca as sR,cb as Ol,cc as $p,cd as xm,d as Be,da as aR,db as Rl,dc as Fp,dd as Nm,e as ee,ea as dR,eb as Il,ec as Gp,ed as Lm,f as mc,fa as cR,fb as Pl,fc as Up,fd as Dm,gb as Ml,gc as LI,gd as $m,hb as kl,hc as DI,hd as Fm,i as qe,ib as xl,ic as $I,id as Gm,j as fc,jb as Nl,jc as FI,jd as Um,k as _c,kb as Ll,kc as GI,kd as jm,lb as Dl,lc as UI,ld as vM,m as ue,ma as Yc,mb as $l,mc as jI,md as OM,n as hc,nb as Fl,nc as BI,nd as RM,o as gc,ob as BR,oc as jp,od as Bm,p as yc,pb as Gl,pc as QI,pd as qm,q as bc,qb as Ul,qc as eP,qd as zm,r as AO,rb as jl,rc as tP,rd as Vm,s as vO,sb as Bl,sc as rP,sd as Hm,t as OO,tb as qR,tc as oP,td as Km,u as RO,ub as ql,uc as Vp,ud as Wm,v as IO,vb as zl,vc as Hp,vd as Xm,w as Pt,wb as Vl,wc as Yp,wd as Ym,x as PO,xb as Hl,xc as Jp,xd as Jm,y as MO,yb as Kl,yc as Zp,yd as Zm,z as Mt,zb as zR,zc as Qp,zd as Qm}from"./chunks/chunk-55MK3QQM.js";import{$ as xc,$a as qc,A as SR,B as ER,C as wR,D as wc,E as Ac,F as vc,G as Oc,H as Rc,I as AR,J as Ic,K as Pc,Ka as Nt,L as Mc,La as Lt,Ma as Dt,Na as $t,Oa as Dc,Qa as $c,Ra as Fc,Sa as Gc,U as vR,V as OR,X as RR,Xa as Uc,Y as IR,Ya as jc,Z as PR,_ as kc,_a as Bc,a as Dw,aa as Nc,ab as zc,b as $w,ba as Lc,bb as Vc,c as Fw,ca as xt,cb as Hc,d as Hi,e as Ki,eb as Kc,f as Wi,fb as Wc,g as Xi,gb as Xc,h as Yi,j as Cc,k as Tc,m as Sc,n as Ec,o as lR,p as pR,q as uR,r as mR,s as fR,t as _R,u as hR,v as gR,w as yR,x as bR,y as CR,z as TR}from"./chunks/chunk-5NR6TDYB.js";import{$ as pO,$a as vp,$b as _P,$c as XP,Aa as Ql,Ab as _I,Ac as BP,Ba as ep,Bc as qP,Ca as tp,Cb as EI,Cc as zP,Da as rp,Db as wI,Dc as VP,Ea as op,Eb as AI,Ec as Gt,Fa as np,Fb as vI,Fc as Iu,G as rO,Ga as ip,Gb as OI,Gc as Pu,H as oO,Ha as sp,Hb as fu,Hc as Mu,I as nO,Ia as ap,Ib as _u,Ic as ku,J as iO,Ja as dp,Jb as hu,Jc as xu,K as sO,Ka as cp,Kb as gu,Kc as Nu,L as aO,La as lp,Lb as yu,Lc as Lu,M as dO,Ma as pp,Mb as bu,Mc as Du,N as cO,Na as up,Nb as wu,Nc as $u,O as tc,Oa as mp,Ob as Au,Oc as Fu,P as rc,Pa as fp,Pb as vu,Pc as Gu,Q as oc,Qa as _p,Qb as Ou,Qc as Uu,R as nc,Ra as hp,Rb as aP,Rc as ju,S as ic,Sa as gp,Sb as dP,Sc as Bu,T as sc,Ta as yp,Tb as cP,Tc as qu,U as ac,Ua as bp,Ub as lP,Uc as zu,V as dc,Va as Cp,Vb as pP,Vc as Ut,W as cc,Wa as Tp,Wb as uP,Wc as Vu,X as lc,Xa as Sp,Xb as mP,Xc as HP,Y as pc,Ya as Ep,Yc as KP,Z as je,Za as wp,Zb as Ru,Zc as WP,_ as lO,_a as Ap,_b as fP,_c as Hu,aa as uO,ac as hP,ad as TM,b as Ow,ba as mO,bc as gP,bd as SM,c as Rw,ca as fO,cc as yP,cd as EM,d as Iw,da as _O,db as JR,dc as bP,dd as wM,e as kw,eb as ZR,ec as CP,ed as AM,f as xw,fb as QR,fc as TP,g as Nw,ga as hO,gb as eI,gc as SP,h as Lw,ha as gO,hb as tI,hc as EP,i as Uv,ia as yO,ib as rI,ic as wP,j as jv,ja as bO,jb as oI,jc as AP,k as Bv,ka as CO,kb as nI,kc as vP,l as qv,la as TO,lb as iI,lc as OP,m as zv,ma as SO,mb as sI,mc as RP,n as Vv,na as uc,nb as aI,nc as IP,o as Hv,oa as hl,ob as dI,oc as PP,p as Kv,pa as gl,pb as cI,pc as MP,q as Wv,qa as yl,qc as kP,r as Xv,ra as bl,rc as xP,s as Yv,sa as jR,sc as NP,t as Jv,tb as lI,tc as LP,u as Zv,ua as Cl,uc as DP,v as Qv,va as Wl,vb as pI,vc as $P,w as eO,wa as Xl,wb as uI,wc as FP,x as tO,xa as Yl,xc as GP,ya as Jl,yb as mI,yc as UP,za as Zl,zb as fI,zc as jP}from"./chunks/chunk-XW3BLWFF.js";import{$ as xe,$a as Ho,$c as yt,$d as mn,$e as oS,$f as tE,$g as _i,$h as qE,$i as Bi,$j as Es,$k as Ea,$l as wA,$m as nv,$n as Ad,Aa as qo,Ac as IC,Ad as fT,Ae as Fn,Af as TS,Ag as oi,Ah as wE,Ai as aw,Aj as Ji,Ak as Ys,Al as nA,An as md,Ao as Ud,Ba as zo,Bc as PC,Bd as _T,Be as Gn,Bf as SS,Bg as uE,Bh as AE,Bj as Zi,Bk as Js,Bl as iA,Bm as UA,Bn as fd,Bo as jd,Cc as MC,Cd as hT,Ce as Un,Cf as ES,Cg as mE,Ch as vE,Ci as Fi,Cj as Qi,Ck as Zs,Cm as jA,Cn as _d,Co as Bd,Dc as kC,Dd as gT,De as jn,Df as wS,Dh as OE,Di as Gi,Dj as es,Dk as Qs,Dl as sA,Dm as BA,Dn as hd,Do as qd,Ec as rn,Ed as yT,Ee as Bn,Ef as AS,Eg as ni,Eh as RE,Ei as Ui,Ej as ts,Ek as ea,El as aA,Em as qA,En as gd,Eo as zd,Fc as xC,Fd as bT,Fe as DT,Ff as vS,Fg as ii,Fh as IE,Fj as rs,Fk as ta,Fm as zA,Fn as yd,Fo as Vd,G as Fb,Gc as NC,Gd as CT,Ge as $T,Gf as OS,Gg as fE,Gh as PE,Gj as os,Gk as ra,Gm as VA,Gn as bd,Go as Hd,Hb as cC,Hc as LC,Hd as TT,He as FT,Hf as RS,Hg as si,Hh as ME,Hi as dw,Hj as ns,Hk as oa,Hl as nd,Hm as HA,Hn as Cv,Ho as Kd,Ic as DC,Id as ST,Ie as GT,If as IS,Ig as ai,Ih as kE,Ij as is,Ik as na,Il as dA,Im as KA,In as Tv,Io as Wd,J as Gb,Jb as lC,Jc as $C,Jd as ET,Je as UT,Jf as PS,Jg as _E,Jh as xE,Jj as ss,Jk as ia,Jl as cA,Jm as WA,Jn as Sv,Jo as Xd,Kb as pC,Kc as FC,Kd as wT,Ke as jT,Kf as MS,Kg as di,Kh as NE,Kj as as,Kk as sa,Kl as lA,Km as At,Kn as Ev,Ko as Yd,Lb as uC,Lc as GC,Le as BT,Lf as kS,Lg as ci,Li as ji,Lj as ds,Lk as aa,Ll as pA,Ln as wv,Lo as Jd,M as Ub,Mb as mC,Mc as UC,Md as AT,Me as qT,Mf as xS,Mg as L,Mh as LE,Mi as Et,Mj as cs,Mk as da,Ml as uA,Mm as XA,Mn as Av,Mo as Zd,Nb as fC,Nc as on,Nd as vT,Ne as zT,Nf as NS,Ng as li,Nh as Mi,Ni as cw,Nj as ls,Nk as ca,Nl as mA,Nn as vv,No as Qd,Oc as jC,Od as OT,Oe as VT,Oh as ki,Oi as lw,Oj as ps,Ok as la,Om as YA,On as Ov,Oo as ec,Pc as nn,Pd as RT,Pf as LS,Ph as DE,Pi as pw,Pj as us,Pk as pa,Pl as fA,Po as Rt,Q as jb,Qa as Qb,Qb as _C,Qd as IT,Qe as HT,Qf as DS,Qi as uw,Qj as ms,Qk as ua,Ql as _A,R as le,Ra as eC,Rb as hC,Rc as BC,Rd as PT,Re as KT,Rf as Hn,Ri as mw,Rk as ma,Rl as hA,S as Bb,Sa as tC,Sc as qC,Sd as MT,Se as WT,Sf as Kn,Si as fw,Sj as fs,Sk as fa,Sl as gA,Sm as JA,Sn as Ot,T as b,Tc as zC,Td as kT,Te as XT,Tf as Wn,Ti as _w,Tj as _s,Tk as _a,Tm as ZA,Tn as Rv,Ub as I,Uc as VC,Ud as xT,Ue as YT,Uf as WS,Ug as hE,Uh as $E,Ui as hw,Uj as hs,Uk as ha,Ul as yA,Um as QA,Un as Iv,V as Lo,Va as Vo,Vb as gC,Vc as HC,Vd as NT,Ve as JT,Vf as XS,Vg as gE,Vh as FE,Vi as gw,Vj as gs,Vk as ga,Vl as bA,Vm as id,Vn as Pv,W as ht,Wa as rC,Wb as gt,Wd as LT,We as ZT,Wf as YS,Wg as yE,Wh as GE,Wj as ys,Wk as ya,Wm as ev,Wn as Cd,X as pe,Xa as oC,Xb as yC,Xd as cn,Xe as QT,Xf as JS,Xg as pi,Xh as UE,Xi as yw,Xj as bs,Xk as ba,Xl as CA,Xn as Td,Y as Do,Ya as nC,Yd as ln,Ye as eS,Yf as ZS,Yg as ui,Yh as jE,Yi as bw,Yj as Cs,Yk as Ca,Yl as TA,Ym as tv,Yn as Sd,Za as iC,Zb as bC,Zd as pn,Ze as tS,Zf as QS,Zg as mi,Zh as BE,Zi as Cw,Zj as Ts,Zk as Ta,Zl as SA,Zm as rv,Zn as Ed,_d as un,_e as rS,_f as eE,_g as fi,_i as Tw,_j as Ss,_k as Sa,_l as EA,_m as ov,_n as wd,aa as $o,ab as Ko,ad as bt,ae as fn,af as nS,ag as rE,ah as hi,aj as qi,ak as ws,al as wa,am as AA,an as iv,ao as vd,b as vo,bb as Ne,bd as sn,be as _n,bf as iS,bg as oE,bh as gi,bi as zE,bk as As,bl as Aa,bm as vA,bn as sv,bo as Od,c as Oo,ca as qb,cb as sC,cd as an,ce as Le,cf as sS,cg as nE,ch as yi,ci as VE,cj as zi,ck as vs,cl as va,cm as OA,cn as av,co as Rd,d as Ro,da as zb,db as aC,dd as dn,de as De,df as Ct,dg as iE,dh as bi,di as HE,dj as Sw,dk as Os,dl as Oa,dm as RA,dn as dv,do as Id,e as Io,ea as Vb,eb as Wo,ee as hn,eg as sE,eh as Ci,ei as KE,ek as Rs,el as Ra,en as cv,eo as Pd,f as Pe,fa as Hb,fb as Xo,fd as KC,fe as gn,ff as Tt,fh as Ti,fi as WE,fj as Ew,fk as Is,fl as Ia,fm as IA,fn as lv,fo as Md,g as Po,ga as Kb,gd as WC,ge as yn,gf as qn,gh as Si,gi as XE,gj as ww,gk as Ps,gl as Pa,gm as PA,gn as vt,go as kd,h as N,ha as Wb,hb as Yo,hd as XC,he as bn,hf as zn,hh as Ei,hi as YE,hj as Aw,hk as Ms,hl as Ma,hm as MA,hn as pv,ho as xd,i as Me,id as YC,ie as Cn,if as St,ih as wi,ii as JE,ik as ks,im as kA,io as Nd,j as Mo,ja as Xb,jc as CC,jd as JC,je as Tn,jh as Ai,ji as ZE,jj as vw,jk as xs,jl as Ue,jm as xA,jo as Ld,k as ko,ka as Yb,kc as TC,kd as ZC,ke as Sn,kf as aS,kg as aE,kh as bE,kk as Ns,kl as Q,kn as uv,ko as Dd,l as xo,lc as SC,ld as QC,le as En,lh as CE,lj as Gw,lk as Ls,ll as ka,lm as NA,ln as mv,lo as $d,m as No,md as eT,me as wn,mf as dS,mh as vi,mj as Uw,mk as Ds,ml as za,mn as fv,n as Ib,na as Jb,nc as EC,nd as tT,ne as An,nf as $e,ng as Xn,nh as TE,ni as QE,nj as jw,nk as $s,nl as Va,nm as LA,nn as _v,no as Mv,o as ke,oc as wC,od as rT,oe as vn,of as cS,og as dE,oh as Oi,oj as Fe,ok as Fs,ol as Ha,om as DA,on as hv,oo as kv,p as _t,pd as oT,pe as On,pf as lS,pg as Yn,ph as Ri,pi as ew,pj as Bw,pk as Gs,pl as Ka,pm as $A,pn as gv,q as Pb,qa as Zb,qc as AC,qd as nT,qe as Rn,qf as pS,qh as Ii,qj as qw,qk as Us,ql as Wa,qm as FA,qn as yv,r as Mb,ra as Fo,rc as Qo,rd as iT,re as In,rf as uS,rg as cE,rh as Pi,rj as zw,rk as js,rl as Xa,rm as GA,rn as bv,ro as xv,s as kb,sa as Go,sd as sT,se as Pn,sf as mS,sg as lE,si as tw,sj as wt,sk as Bs,sl as Ya,sn as sd,so as Nv,t as xb,ta as Uo,tc as en,td as aT,te as Mn,tf as fS,tg as pE,ti as xi,tj as Ge,tk as qs,tl as Ja,tn as ad,to as Lv,u as q,ub as Jo,uc as tn,ud as dT,ue as kn,uf as _S,ug as Jn,ui as rw,uj as Vw,uk as zs,ul as Za,un as dd,uo as Dv,v as Nb,vb as Zo,vd as cT,ve as xn,vf as hS,vg as Zn,vj as Hw,vk as Vs,vl as Qw,vn as cd,vo as $v,wb as dC,wd as lT,we as Nn,wf as gS,wg as Qn,wi as ow,wj as Kw,wk as Hs,wl as eA,wn as ld,wo as Fv,x as Lb,xa as jo,xc as vC,xd as pT,xe as Ln,xf as yS,xg as ei,xi as nw,xj as Ww,xk as Ks,xl as tA,xn as pd,xo as Gv,y as Db,yc as OC,yd as uT,ye as Dn,yf as bS,yg as ti,yh as SE,yi as iw,yj as Xw,yk as Ws,yl as rA,yo as Fd,z as $b,za as Bo,zc as RC,zd as mT,ze as $n,zf as CS,zg as ri,zh as EE,zi as sw,zj as Yw,zk as Xs,zl as oA,zn as ud,zo as Gd}from"./chunks/chunk-5TCQ5J3V.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8f11e0bf-4115-55a8-bd39-c360f43cdc09")}catch{}})();var z="2026-07-28",ek=["2025-11-25","2025-06-18"],Ke=[z],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},w={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},Qt=["debug","info","notice","warning","error","critical","alert","emergency"],u=class extends Error{code;data;constructor(t,r,o={}){super(t),this.name="PmMcpProtocolError",this.code=r,this.data=o}};function _(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function xh(e){if(e===void 0)return;if(!_(e))throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,expected:"object"});let t=typeof e.name=="string"?e.name.trim():"",r=typeof e.version=="string"?e.version.trim():"";if(t.length===0||r.length===0)throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,required:["name","version"]});let o={name:t.slice(0,128),version:r.slice(0,128)};return typeof e.description=="string"&&e.description.trim()&&(o.description=e.description.trim().slice(0,1024)),typeof e.websiteUrl=="string"&&e.websiteUrl.trim()&&(o.websiteUrl=e.websiteUrl.trim().slice(0,2048)),o}function Nh(e){if(e!==void 0){if(typeof e!="string"||!Qt.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:w.logLevel,allowed:[...Qt]});return e}}function We(e){let t=_(e)?e._meta:void 0;if(!_(t))throw new u("Missing required MCP request metadata",m.invalidParams,{required:[w.protocolVersion,w.clientCapabilities]});let r=t[w.protocolVersion];if(typeof r!="string"||!Ke.includes(r))throw new u("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...Ke],requested:typeof r=="string"?r:null});let o=t[w.clientCapabilities];if(!_(o))throw new u("Invalid MCP client capabilities metadata",m.invalidParams,{field:w.clientCapabilities,expected:"object"});let n=xh(t[w.clientInfo]),i=Nh(t[w.logLevel]);return{protocolVersion:z,clientCapabilities:o,...n?{clientInfo:n}:{},...i?{logLevel:i}:{}}}function tk(e,t){if(t!==e.protocolVersion)throw new u("MCP protocol header does not match request metadata",m.headerMismatch,{header:t??null,metadata:e.protocolVersion})}function rk(e,t){let r=t.filter(o=>!Object.prototype.hasOwnProperty.call(e.clientCapabilities,o));if(r.length>0)throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:Object.fromEntries(r.map(o=>[o,{}]))})}function ok(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,[w.serverInfo]:{...t}}}}function Lh(e,t){return Xe({...e,resultType:"complete"},t)}function nk(e){let t=e.ttlMs??6e4;if(!Number.isFinite(t)||t<0)throw new u("Invalid MCP discovery cache TTL",m.invalidParams,{ttlMs:t});return Lh({supportedVersions:[...Ke],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function ik(e,t){if(_(e)&&typeof e.resultType=="string")return e.resultType;if(t==="legacy")return"complete";throw new u("Modern MCP result is missing resultType",m.invalidParams,{required:"resultType"})}import{createHash as rr,createHmac as or,timingSafeEqual as Dh}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="15b81dd0-ef1a-58be-b6ee-5975b6778993")}catch{}})();var $h=["elicitation/create","roots/list","sampling/createMessage"],er=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},nr=/^[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 Fh(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 u(`Invalid ${r}: value is not JSON serializable`,m.invalidParams,{field:r})}if(Buffer.byteLength(o,"utf8")>t)throw new u(`Invalid ${r}: payload exceeds the protocol bound`,m.invalidParams,{field:r,maximumBytes:t})}function Ze(e,t){if(!_(e))throw new u("Invalid MCP inputRequests",m.invalidParams,{field:"inputRequests",expected:"object"});let r=Object.entries(e);if(r.length===0||r.length>fe)throw new u("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:fe,observed:r.length});let o={};for(let[n,i]of r){if(!nr.test(n)||!_(i))throw new u("Invalid MCP input request entry",m.invalidParams,{field:`inputRequests.${n}`});let s=i.method;if(typeof s!="string"||!$h.includes(s))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:s??null});let a=Fh(s);if(!Object.prototype.hasOwnProperty.call(t.clientCapabilities,a))throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:{[a]:{}}});if(!_(i.params))throw new u("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 ir(e){if(!_(e))throw new u("Invalid MCP inputResponses",m.invalidParams,{field:"inputResponses",expected:"object"});let t=Object.entries(e);if(t.length>fe)throw new u("Invalid MCP inputResponses count",m.invalidParams,{maximum:fe,observed:t.length});let r={};for(let[o,n]of t){if(!nr.test(o)||!_(n))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return he(r,Je,"inputResponses"),r}function ck(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>_e)throw new u("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 u("InputRequiredResult requires inputRequests or requestState",m.invalidParams,{requiredAnyOf:["inputRequests","requestState"]});return{resultType:"input_required",...r?{inputRequests:r}:{},...t?{requestState:t}:{},_meta:{[w.serverInfo]:{...e.serverInfo}}}}function sr(e){let t=Buffer.from(e);if(t.byteLength<32)throw new u("MCP requestState signing key must contain at least 32 bytes",m.invalidParams,{minimumBytes:32});return t}function lk(e,t){if(!Number.isSafeInteger(e.expiresAt)||e.expiresAt<=0||e.method.trim().length===0||e.parameterDigest.trim().length===0||e.principal.trim().length===0)throw new u("Invalid MCP requestState payload",m.invalidParams);let r=Buffer.from(JSON.stringify({version:1,...e}),"utf8");if(r.byteLength>_e/2)throw new u("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:_e/2});let o=r.toString("base64url"),n=or("sha256",sr(t)).update(o).digest("base64url");return`${o}.${n}`}function Gh(e){if(!_(e)||e.version!==1)throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});let{expiresAt:t,method:r,parameterDigest:o,principal:n,state:i}=e;if(typeof t!="number"||!Number.isSafeInteger(t))throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});if(typeof r!="string"||typeof o!="string"||typeof n!="string")throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});return{expiresAt:t,method:r,parameterDigest:o,principal:n,state:i}}function pk(e,t,r){let[o,n,i]=e.split(".");if(!o||!n||i!==void 0)throw new u("Invalid MCP requestState encoding",m.invalidParams,{field:"requestState"});let s=Buffer.from(n,"base64url"),a=or("sha256",sr(t)).update(o).digest();if(s.byteLength!==a.byteLength||!Dh(s,a))throw new u("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let d;try{d=JSON.parse(Buffer.from(o,"base64url").toString("utf8"))}catch{d=null}let c=Gh(d),{expiresAt:l,method:p,parameterDigest:f,principal:g}=c;if(l<(r.nowMs??Date.now()))throw new u("Expired MCP requestState",m.invalidParams,{field:"requestState",expiredAt:l});if(p!==r.method||f!==r.parameterDigest||g!==r.principal)throw new u("MCP requestState binding mismatch",m.invalidParams,{field:"requestState"});return c}function uk(e){return he(e,Je,"request parameters"),rr("sha256").update(JSON.stringify(e)).digest("hex")}var tr=class{#e=new Set;#t;constructor(t=4096){if(!Number.isSafeInteger(t)||t<1)throw new u("Invalid MCP replay guard capacity",m.invalidParams,{maximumEntries:t});this.#t=t}consume(t){let r=rr("sha256").update(t).digest("hex");if(this.#e.has(r))throw new u("MCP requestState replay detected",m.invalidParams,{field:"requestState"});if(this.#e.size>=this.#t){let o=this.#e.values().next().value;this.#e.delete(o)}this.#e.add(r)}};function Uh(e){if(!Number.isSafeInteger(e.ttlMs)||e.ttlMs<0||e.cacheScope!=="public"&&e.cacheScope!=="private")throw new u("Invalid MCP cache policy",m.invalidParams,{ttlMs:e.ttlMs,cacheScope:e.cacheScope});return{ttlMs:e.ttlMs,cacheScope:e.cacheScope}}function mk(e,t){return{...e,...Uh(t)}}function jh(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function Bh(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(jh)){if(!_(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function qh(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 u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(r)||r<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(o)||o<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);return{maximumBytes:t,maximumDepth:r,maximumNodes:o}}function zh(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 Vh(e,t){if(!_(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&Bh(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function fk(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=qh(t);if(typeof e!="boolean"&&!_(e))throw new u("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 u("MCP JSON Schema exceeds validation work bounds",m.invalidParams,{maximumDepth:o,maximumNodes:n});Vh(e,a.value),zh(a,i)}return structuredClone(e)}import{randomUUID as Hh}from"node:crypto";import{readFile as Kh}from"node:fs/promises";import ar from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f3e94896-b2a0-561c-902b-71c28ddde2a1")}catch{}})();var Sk="io.modelcontextprotocol/tasks",Wh=["working","input_required","completed","failed","cancelled"],Xh=/^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,Yh=3600*1e3,Jh=1e3,ye=1024,Zh=30,Qh=2e3;function Qe(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function ge(e){let t=e.trim();if(!Xh.test(t))throw Qe("Unknown MCP task");return t}function dr(e,t){if(typeof e!="string"||!Number.isFinite(Date.parse(e)))throw new u("Corrupt MCP task record",m.invalidParams,{field:t});return e}function cr(e){if(!_(e)||typeof e.code!="number"||!Number.isFinite(e.code)||typeof e.message!="string")throw new u("Corrupt MCP task error",m.invalidParams);return{code:e.code,message:e.message.slice(0,ye),..._(e.data)?{data:structuredClone(e.data)}:{}}}function eg(e){if(!Wh.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function tg(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function rg(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function og(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function ng(e){if(e!==void 0){if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new u("Corrupt MCP task record",m.invalidParams);return e}}function ig(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function sg(e){if(!_(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?ge(e.taskId):"",r=eg(e.status),o=tg(e.principal),n=rg(e.workerPid),i=og(e.ttlMs),s=ng(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:ig(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=cr(e.error)),a.status==="input_required"&&!a.inputRequests||a.status==="completed"&&!a.result||a.status==="failed"&&!a.error)throw new u("Corrupt MCP task status payload",m.invalidParams,{status:a.status});return a}function V(e){let t={taskId:e.taskId,status:e.status,createdAt:e.createdAt,lastUpdatedAt:e.lastUpdatedAt,ttlMs:e.ttlMs,...e.statusMessage?{statusMessage:e.statusMessage}:{},...e.pollIntervalMs===void 0?{}:{pollIntervalMs:e.pollIntervalMs}};return e.status==="input_required"?{...t,status:"input_required",inputRequests:structuredClone(e.inputRequests)}:e.status==="completed"?{...t,status:"completed",result:structuredClone(e.result)}:e.status==="failed"?{...t,status:"failed",error:structuredClone(e.error)}:e.status==="cancelled"?{...t,status:"cancelled"}:{...t,status:"working"}}function te(e){return e==="completed"||e==="failed"||e==="cancelled"}function ag(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=ar.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Hh()}`),this.#i=t.workerPid??process.pid}#s(t){return ar.join(this.#e,"runtime","mcp-tasks","records",`${ge(t)}.json`)}async#d(t){try{return sg(JSON.parse(await Kh(this.#s(t),"utf8")))}catch(r){throw pe(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,Zh,this.#t,!1,!1,Qh);try{let s=await this.#d(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?Yh:t.ttlMs,i=t.pollIntervalMs??Jh;if(o.length===0||n!==null&&(!Number.isSafeInteger(n)||n<0)||!Number.isSafeInteger(i)||i<0)throw new u("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&&!ag(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 u("MCP task input request keys must be unique for the task lifetime",m.invalidParams,{reused:n});return{...o,status:"input_required",statusMessage:t.statusMessage?.trim().slice(0,ye),lastUpdatedAt:this.#r().toISOString(),inputRequests:r}}))}async update(t,r,o){let n=ir(o),i=[],s=[];return await this.#n(t,r,a=>{if(a.status!=="input_required"||!a.inputRequests)return a;let d={...a.inputRequests},c=a.inputResponses?{...a.inputResponses}:{};for(let[l,p]of Object.entries(n))Object.prototype.hasOwnProperty.call(d,l)&&(c[l]=p,delete d[l],i.push(l));return s=Object.keys(d).sort(),i.length===0?a:{...a,status:s.length===0?"working":"input_required",lastUpdatedAt:this.#r().toISOString(),inputRequests:s.length===0?void 0:d,inputResponses:c,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=cr(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 Ek(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]="15cbe26a-5716-5e8c-8700-eb36a1a056d6")}catch{}})();var be="io.modelcontextprotocol/subscriptionId",lr=256,pr=2048,dg=5e3;function cg(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),dg);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 u("Invalid MCP subscription filter",m.invalidParams,{field:`notifications.${t}`,expected:"boolean"});return e||void 0}}function lg(e){if(!_(e))throw new u("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>lr)throw new u("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:lr});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 u("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 pg(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 ur=class{#e;#t=new Map;#r;constructor(t){this.#e=structuredClone(t.capabilities),this.#r={...t.serverInfo}}get size(){return this.#t.size}async open(t){if(this.#t.has(t.id))throw new u("MCP subscription id is already active",m.invalidParams,{subscriptionId:t.id});let r=pg(lg(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 cg(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]="3681273a-e101-57a0-9446-982c450e7183")}catch{}})();var mr=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,ug=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,fr=/^[\t\x20-\x7E]*$/u,_r=new Set(["prompts/get","resources/read","tools/call"]);function mg(e){let t=new Map;for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let n=typeof o=="string"?o:o.join(", ");t.set(r.toLowerCase(),n)}return t}function A(e,t){throw new u(e,m.headerMismatch,{header:t})}function hr(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&fr.test(t)&&!mr.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function gr(e,t){let r=mr.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||!fr.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 fg(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!ug.test(o)||!["boolean","integer","string"].includes(String(n))||r.has(o.toLowerCase()))throw new u("Invalid MCP x-mcp-header annotation",m.invalidParams,{field:t.join("."),annotation:o});return r.add(o.toLowerCase()),{name:o,path:t,type:n}}function yr(e){if(!_(e))throw new u("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 u("Invalid MCP tool schema properties",m.invalidParams,{field:"inputSchema.properties"});for(let[a,d]of Object.entries(s)){if(!_(d))continue;let c=[...i,a],l=fg(d,c,r);l&&t.push(l);for(let[p,f]of Object.entries(d))if(p!=="properties"&&p!=="x-mcp-header"&&Ce(f))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:c.join("."),keyword:p});o(d,c)}}};for(let[n,i]of Object.entries(e))if(n!=="properties"&&Ce(i))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:"inputSchema",keyword:n});return o(e,[]),t}function br(e,t){let r=e;for(let o of t){if(!_(r))return;r=r[o]}return r}function Cr(e,t){let r=e==="resources/read"?t.uri:t.name;return typeof r=="string"?r:void 0}function _g(e,t){let r=_(e.arguments)?e.arguments:{},o={};for(let n of yr(t)){let i=br(r,n.path);if(i!=null){if(!(n.type==="integer"&&typeof i=="number"&&Number.isSafeInteger(i)||n.type==="boolean"&&typeof i=="boolean"||n.type==="string"&&typeof i=="string"))throw new u("Invalid MCP custom header argument",m.invalidParams,{field:n.path.join("."),expected:n.type});o[`Mcp-Param-${n.name}`]=hr(i)}}return o}function Rk(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=Cr(o,t);if(_r.has(o)){if(i===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=hr(i)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,_g(t,e.toolSchema)),n}function hg(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"),_r.has(r)){let i=e.get("mcp-name"),s=Cr(r,o);(i===void 0||s===void 0||gr(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 gg(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 yg(e){let t=_(e.params.arguments)?e.params.arguments:{};for(let r of yr(e.toolSchema)){let o=br(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),gg(r,o,gr(i,n))||A("MCP parameter header does not match request body",n)}}function Ik(e){let t=mg(e.headers),r=typeof e.request.method=="string"?e.request.method:"";hg(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&yg({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var Pk=z;import{AsyncLocalStorage as bg}from"node:async_hooks";import{createHash as Tr,timingSafeEqual as Cg}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a7c30d99-a0e4-552e-be61-0c54a455e211")}catch{}})();var y=class extends Error{httpStatus;challenge;constructor(t,r,o){super(t),this.name="PmMcpAuthorizationError",this.httpStatus=r,this.challenge=o}},Tg=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,Sg=/^[a-z][a-z0-9_*/-]{0,255}$/u,Eg=/^(?:[a-z0-9][a-z0-9_*/-]{0,240})@[a-z][a-z0-9_*/-]{0,13}$/u,wg=/^[\x20-\x2B\x2D-\x3C\x3E-\x7E]{0,255}[\x21-\x2B\x2D-\x3C\x3E-\x7E]$/u,Er=/^[\x21\x23-\x5B\x5D-\x7E]+$/u,wr=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,Ag=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,vg=/%(?![0-9A-Fa-f]{2})/u,Og=512,Rg=32,Ig=180,Pg=8192,Mg=8192,Ar=new bg;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 kg(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 Lk(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=>!Er.test(n)))throw new y("Invalid authorization scope",401);return{resource:t,authorization_servers:r,...o.length>0?{scopes_supported:o.sort()}:{}}}function Dk(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 $k(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 o=d=>{let c=e[d];if(typeof c!="string")throw new y(`Authorization server metadata requires ${d}`,401);return E(c,d).href},n=d=>{let c=e[d];return typeof c=="string"?E(c,d).href:void 0},i=o("authorization_endpoint"),s=o("token_endpoint"),a=n("registration_endpoint");return{issuer:r,authorization_endpoint:i,token_endpoint:s,code_challenge_methods_supported:[...new Set(e.code_challenge_methods_supported.filter(d=>typeof d=="string"))],...e.client_id_metadata_document_supported===!0?{client_id_metadata_document_supported:!0}:{},...a?{registration_endpoint:a}:{}}}function Fk(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 Gk(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 Uk(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 jk(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 Sr=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 xg(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?Tg.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"||!Lg(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 Ng(e){return Sg.test(e)||Eg.test(e)}function Lg(e){if(Buffer.byteLength(e,"utf8")>Og)return!1;let t=e.split(",");if(t.length>Rg)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(!Ng(s)||!wg.test(a)||r.has(s))return!1;r.add(s)}return!0}function vr(e){return Ag.test(e)&&!vg.test(e)}function Dg(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 wr.test(o)&&(n===void 0||vr(n))}function $g(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(!(!wr.test(s)||!vr(a)||!n.every(Dg)))return{key:s,serialized:t}}function Fg(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>Pg)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>Ig)throw new y("Invalid MCP baggage",403);let n=[];for(let i of o){let s=$g(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 Bk(e,t={}){let r=_(e)&&_(e._meta)?e._meta:{},o=Fg(r.baggage,t.baggageAllowlist??[]);return{...xg(r),...o?{baggage:o}:{}}}function qk(e,t){return Ar.run(structuredClone(e),t)}function zk(){let e=Ar.getStore();return e?{...e}:void 0}async function Vk(e){let t=E(e.policy.resourceMetadataUrl,"protected resource metadata URL",!0).href,r=[...new Set(e.policy.requiredScopes??[])];if(r.some(c=>!Er.test(c)))throw new y("Invalid authorization scope",401);let o=`Bearer resource_metadata="${t}"`;if(new URL(e.requestUrl,e.policy.resource).searchParams.has("access_token"))throw new y("Access tokens must not appear in URI query parameters",401,o);let n=kg(e.headers,"authorization")?.match(/^Bearer ([^\s]+)$/iu);if(!n)throw new y("Missing or malformed bearer token",401,o);let i=n[1];if(Buffer.byteLength(i,"utf8")>Mg)throw new y("Missing or malformed bearer token",401,o);let s;try{s=await e.policy.verifyAccessToken(i)}catch{throw new y("Invalid bearer token",401,o)}let a=Array.isArray(s.audience)?s.audience:[s.audience];if(s.issuer!==e.policy.issuer||!a.includes(e.policy.resource))throw new y("Bearer token issuer or audience mismatch",401,o);let d=r.filter(c=>!s.scopes.includes(c));if(d.length>0)throw new y("Bearer token has insufficient scope",403,`${o}, scope="${d.join(" ")}"`);return{...s,audience:[...a],scopes:[...s.scopes]}}function Hk(e){let t=Tr("sha256").update(e.token).digest();return r=>{let o=Tr("sha256").update(r).digest();if(!Cg(t,o))throw new y("Invalid bearer token",401);return structuredClone(e.claims)}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="46f5fe59-6b84-5c68-ad07-bb1329f4ea29")}catch{}})();var rt="io.modelcontextprotocol/ui",Te="2026-01-26",Ir="text/html;profile=mcp-app",Or=Object.freeze({specVersion:Te,mimeTypes:[Ir]});function Xk(e){let t=e.clientCapabilities.extensions;if(!_(t))return!1;let r=t[rt];if(r===void 0)return!1;if(!_(r))throw new u("Invalid MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[rt]:Or}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(Ir)||n!==void 0&&n!==Te)throw new u("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[rt]:Or}}});return!0}var Gg={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},Pr=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:Gg})));function Yk(e){return Pr.find(t=>t.uri===e)}function Jk(e){let t=new Map(Pr.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 Rr(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Zk(e){let t=Rr(e.name),r=Rr(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:Te}),n=JSON.stringify(Te);return`<!doctype html>
|
|
1
|
+
import{A as zP,B as VP,C as HP,D as KP,E as WP,a as Kn,b as Xw,c as Yw,d as Jw,e as Zw,f as Qw,g as oA,h as nA,i as La,j as Da,k as $a,m as Fa,n as Ga,o as Ua,p as ja,q as Ba,r as qa,s as za,t as Va,u as td,v as rd,w as od,x as nd,y as id,z as qP}from"./chunks/chunk-BXSXT5Z6.js";import{A as L0,B as D0,C as $0,D as F0,E as G0,F as U0,G as j0,H as B0,I as q0,J as z0,K as V0,L as H0,M as K0,N as W0,O as X0,P as Y0,Q as J0,R as Z0,S as Q0,T as ek,U as tk,V as rk,W as ok,X as nk,Y as ik,a as c0,b as l0,c as p0,d as u0,e as m0,f as f0,g as _0,h as h0,i as g0,j as y0,k as b0,l as T0,m as C0,n as w0,o as S0,p as E0,q as A0,r as v0,s as O0,t as I0,u as R0,v as M0,w as P0,x as k0,y as x0,z as N0}from"./chunks/chunk-RUT3CCAG.js";import{a as Nh}from"./chunks/chunk-ZWRLAOA4.js";import{a as XP,b as YP,c as JP,d as ZP}from"./chunks/chunk-OBLO45UM.js";import{a as QP,b as e0,c as t0,d as r0,e as o0,f as n0,g as i0,h as s0,i as a0,j as d0}from"./chunks/chunk-MEWBSWE3.js";import{$ as bm,$a as l_,$b as lh,A as nm,Aa as kf,Ab as $_,B as im,Ba as xf,Bb as F_,C as sm,Ca as Nf,Cb as G_,D as qt,Da as Lf,Db as U_,E as zt,Ea as Df,Eb as j_,F as Vt,Fa as $f,Fb as B_,G as Ht,Ga as Ff,Gb as q_,H as Kt,Ha as Gf,Hb as z_,I as Wt,Ia as Uf,Ib as V_,J as Xt,Ja as jf,Jb as H_,K as Yt,Ka as Bf,Kb as K_,L as Jt,La as qf,Lb as W_,M as Zt,Ma as zf,Mb as X_,N as Qt,Na as Vf,Nb as Y_,O as am,Oa as Hf,Ob as J_,P as dm,Pa as Kf,Pb as Z_,Q as cm,Qa as Wf,Qb as Q_,R as lm,Ra as Xf,Rb as eh,S as pm,Sa as er,Sb as th,T as Xe,Ta as he,Tb as rh,U as um,Ua as o_,Ub as oh,V as mm,Va as n_,Vb as nh,W as fm,Wa as i_,Wb as ih,X as _m,Xa as s_,Xb as sh,Y as hm,Ya as a_,Yb as ah,Z as gm,Za as d_,Zb as dh,_ as ym,_a as c_,_b as ch,a as qw,aa as EP,ab as p_,ac as ph,b as zw,ba as AP,bb as u_,bc as uh,c as Vw,ca as vP,cb as m_,cc as mh,d as Hw,da as km,db as f_,dc as fh,e as Kw,ea as xm,eb as __,ec as _h,f as Ww,fa as Nm,fb as h_,fc as hh,g as DE,ga as Tf,gb as g_,gc as gh,h as $E,ha as Cf,hb as y_,hc as yh,i as Ki,ia as LP,ib as b_,ic as bh,j as $I,ja as DP,jb as T_,jc as Th,k as FI,ka as $P,kb as C_,kc as Ch,l as GI,la as FP,lb as w_,lc as wh,m as UI,ma as GP,mb as S_,mc as Sh,n as jI,na as UP,nb as E_,nc as Eh,o as BI,oa as jP,ob as A_,oc as Ah,p as _l,pa as BP,pb as v_,pc as vh,q as Vp,qa as wf,qb as O_,qc as Oh,r as Hp,ra as Sf,rb as I_,rc as Ih,s as Yp,sa as Ef,sb as R_,sc as Rh,t as Jp,ta as Af,tb as M_,tc as Mh,u as _u,ua as vf,ub as P_,uc as Ph,v as wu,va as Of,vb as k_,vc as kh,w as uM,wa as If,wb as x_,wc as xh,x as We,xa as Rf,xb as N_,y as rm,ya as Mf,yb as L_,z as om,za as Pf,zb as D_}from"./chunks/chunk-ESRACL6K.js";import{e as VI,f as HI,g as hl,h as gl,i as Ut}from"./chunks/chunk-K2UTE75T.js";import{A as cP,B as lP,C as pP,D as uP,E as mP,F as fP,G as _P,H as hP,I as gP,J as yP,K as bP,L as TP,M as CP,N as wP,O as SP,P as wm,Q as Sm,R as Em,S as Am,T as vm,U as Om,V as Im,W as Rm,X as Mm,Y as Pm,a as Di,b as $i,c as Fi,d as Gi,e as XR,f as YR,g as JR,h as ZR,i as QR,j as zp,k as eM,l as tM,m as rM,n as oM,o as nM,q as Xp,r as Tm,s as rP,t as oP,u as nP,v as iP,w as sP,x as aP,y as Cm,z as dP}from"./chunks/chunk-2JYTSTQP.js";import{$ as cI,$a as vl,$b as Dp,$c as Qu,A as FO,Ab as JI,Ac as ru,Ad as rf,B as GO,Bb as ZI,Bc as ou,Bd as of,C as UO,Cb as QI,Cc as nu,Cd as nf,D as jO,Db as eR,Dc as iu,Dd as sf,E as BO,Eb as tR,Ec as su,Ed as af,F as Ke,Fa as Qc,Fb as rR,Fc as au,Fd as df,G as qO,Ga as el,Gb as wR,Gc as du,Gd as cf,H as Nt,Ha as tl,Hb as SR,Hc as cu,Hd as lf,I as zO,Ia as rl,Ib as ER,Ic as lu,J as VO,Ja as ol,Jb as AR,Jc as pu,Jd as pf,K as HO,Kb as vR,Kc as uu,Kd as uf,L as KO,La as nl,Lb as OR,Lc as mu,Ld as mf,M as WO,Ma as il,Mb as IR,Md as ff,N as XO,Na as sl,Nb as NR,Nc as lM,Nd as _f,O as YO,Oa as al,Ob as LR,Oc as pM,Od as hf,P as JO,Pa as qI,Pb as Rp,Pc as fu,Pd as gf,Q as ZO,Qa as zI,Qb as Mp,Qc as Su,Qd as yf,R as QO,Ra as dl,Rb as DR,Rd as bf,S as eI,Sa as cl,Sb as $R,Sd as Yf,T as tI,Ta as ll,Tb as FR,Td as Jf,U as rI,Ua as pl,Ub as GR,Uc as Eu,Ud as Zf,V as oI,Va as ul,Vb as UR,Vd as Qf,W as nI,Wa as ml,Wb as Pp,Wc as Au,Wd as e_,X as iI,Xa as fl,Xb as kp,Xc as Xu,Xd as t_,Y as sI,Ya as Sl,Yb as xp,Yc as Yu,Yd as r_,Z as aI,Za as El,Zb as Np,Zc as Ju,_ as dI,_a as Al,_b as Lp,_c as Zu,a as RO,aa as lI,ab as Ol,ac as $p,ad as em,b as Pt,ba as pI,bb as Il,bc as Fp,bd as tm,c as MO,ca as uI,cb as Rl,cc as Gp,cd as Lm,d as Ve,da as mI,db as Ml,dc as Up,dd as Dm,e as te,ea as fI,eb as Pl,ec as jp,ed as $m,f as _c,fa as _I,fb as kl,fc as Bp,fd as Fm,gb as xl,gc as jR,gd as Gm,hb as Nl,hc as BR,hd as Um,i as He,ib as Ll,ic as qR,id as jm,j as hc,jb as Dl,jc as zR,jd as Bm,k as gc,kb as $l,kc as VR,kd as qm,lb as Fl,lc as HR,ld as kP,m as _e,ma as Zc,mb as Gl,mc as KR,md as xP,n as yc,nb as Ul,nc as WR,nd as NP,o as bc,ob as WI,oc as qp,od as zm,p as Tc,pb as jl,pc as iM,pd as Vm,q as Cc,qb as Bl,qc as sM,qd as Hm,r as PO,rb as ql,rc as aM,rd as Km,s as kO,sb as zl,sc as dM,sd as Wm,t as xO,tb as XI,tc as cM,td as Xm,u as NO,ub as Vl,uc as Kp,ud as Ym,v as LO,vb as Hl,vc as Wp,vd as Jm,w as kt,wb as Kl,wc as Zp,wd as Zm,x as DO,xb as Wl,xc as Qp,xd as Qm,y as $O,yb as Xl,yc as eu,yd as ef,z as xt,zb as YI,zc as tu,zd as tf}from"./chunks/chunk-KNW3RSLS.js";import{$ as Lc,$a as Vc,A as II,B as RI,C as MI,D as vc,E as Oc,F as Ic,G as Rc,H as Mc,I as PI,J as Pc,K as kc,Ka as Dt,L as xc,La as $t,Ma as Ft,Na as Gt,Oa as Fc,Qa as Gc,Ra as Uc,Sa as jc,U as kI,V as xI,X as NI,Xa as Bc,Y as LI,Ya as qc,Z as DI,_ as Nc,_a as zc,a as BE,aa as Dc,ab as Hc,b as qE,ba as $c,bb as Kc,c as zE,ca as Lt,cb as Wc,d as Wi,e as Xi,eb as Xc,f as Yi,fb as Yc,g as Ji,gb as Jc,h as Zi,j as wc,k as Sc,m as Ec,n as Ac,o as hI,p as gI,q as yI,r as bI,s as TI,t as CI,u as wI,v as SI,w as EI,x as AI,y as vI,z as OI}from"./chunks/chunk-SSY4OSJR.js";import{$ as gO,$a as Ip,$b as CM,$c as tP,Aa as tp,Ab as CR,Ac as WM,Ba as rp,Bc as XM,Ca as op,Cb as RR,Cc as YM,Da as np,Db as MR,Dc as JM,Ea as ip,Eb as PR,Ec as jt,Fa as sp,Fb as kR,Fc as Pu,G as dO,Ga as ap,Gb as xR,Gc as ku,H as cO,Ha as dp,Hb as hu,Hc as xu,I as lO,Ia as cp,Ib as gu,Ic as Nu,J as pO,Ja as lp,Jb as yu,Jc as Lu,K as uO,Ka as pp,Kb as bu,Kc as Du,L as mO,La as up,Lb as Tu,Lc as $u,M as fO,Ma as mp,Mb as Cu,Mc as Fu,N as _O,Na as fp,Nb as vu,Nc as Gu,O as oc,Oa as _p,Ob as Ou,Oc as Uu,P as nc,Pa as hp,Pb as Iu,Pc as ju,Q as ic,Qa as gp,Qb as Ru,Qc as Bu,R as sc,Ra as yp,Rb as mM,Rc as qu,S as ac,Sa as bp,Sb as fM,Sc as zu,T as dc,Ta as Tp,Tb as _M,Tc as Vu,U as cc,Ua as Cp,Ub as hM,Uc as Hu,V as lc,Va as wp,Vb as gM,Vc as Bt,W as pc,Wa as Sp,Wb as yM,Wc as Ku,X as uc,Xa as Ep,Xb as bM,Xc as ZM,Y as mc,Ya as Ap,Yc as QM,Z as ze,Za as vp,Zb as Mu,Zc as eP,_ as hO,_a as Op,_b as TM,_c as Wu,aa as yO,ac as wM,ad as OP,b as xE,ba as bO,bc as SM,bd as IP,c as NE,ca as TO,cc as EM,cd as RP,d as LE,da as CO,db as oR,dc as AM,dd as MP,e as FE,eb as nR,ec as vM,ed as PP,f as GE,fb as iR,fc as OM,g as UE,ga as wO,gb as sR,gc as IM,h as jE,ha as SO,hb as aR,hc as RM,i as Hv,ia as EO,ib as dR,ic as MM,j as Kv,ja as AO,jb as cR,jc as PM,k as Wv,ka as vO,kb as lR,kc as kM,l as Xv,la as OO,lb as pR,lc as xM,m as Yv,ma as IO,mb as uR,mc as NM,n as Jv,na as fc,nb as mR,nc as LM,o as Zv,oa as yl,ob as fR,oc as DM,p as Qv,pa as bl,pb as _R,pc as $M,q as eO,qa as Tl,qc as FM,r as tO,ra as Cl,rc as GM,s as rO,sa as KI,sc as UM,t as oO,tb as hR,tc as jM,u as nO,ua as wl,uc as BM,v as iO,va as Yl,vb as gR,vc as qM,w as sO,wa as Jl,wb as yR,wc as zM,x as aO,xa as Zl,xc as VM,ya as Ql,yb as bR,yc as HM,za as ep,zb as TR,zc as KM}from"./chunks/chunk-RBPOO46D.js";import{$ as De,$a as Wo,$c as Ct,$d as _n,$e as cw,$f as aS,$g as hi,$i as OE,$j as Es,$k as Ea,$l as RA,$m as cv,$n as vd,Aa as Vo,Ac as LT,Ad as TC,Ae as Un,Af as Ow,Ag as ni,Ah as RS,Ai as uE,Aj as rA,Ak as Js,Al as cA,An as fd,Ao as jd,Ba as Ho,Bc as DT,Bd as CC,Be as jn,Bf as Iw,Bg as ii,Bh as MS,Bi as mE,Bj as Qi,Bk as Zs,Bl as lA,Bn as _d,Bo as Bd,Cc as $T,Cd as wC,Ce as Bn,Cf as Rw,Cg as yS,Ch as PS,Cj as es,Ck as Qs,Cl as pA,Cm as HA,Cn as hd,Co as qd,Dc as FT,Dd as SC,De as qn,Df as Mw,Dg as bS,Dh as kS,Di as Ui,Dj as ts,Dk as ea,Dm as KA,Dn as gd,Do as zd,Ec as nn,Ed as EC,Ee as zn,Ef as Pw,Eh as xS,Ei as ji,Ej as rs,Ek as ta,El as uA,Em as WA,En as yd,Eo as Vd,Fc as GT,Fd as AC,Fe as BC,Ff as kw,Fg as si,Fh as NS,Fi as Bi,Fj as os,Fk as ra,Fl as mA,Fm as XA,Fn as bd,Fo as Hd,G as zb,Gc as UT,Gd as vC,Ge as qC,Gf as xw,Gg as ai,Gh as LS,Gj as ns,Gk as oa,Gm as YA,Gn as Td,Go as Kd,Hb as _T,Hc as jT,Hd as OC,He as zC,Hf as Nw,Hg as TS,Hh as DS,Hj as is,Hk as na,Hm as JA,Hn as Cd,Ho as Wd,Ic as BT,Id as IC,Ie as VC,If as Lw,Ig as di,Ih as $S,Ii as fE,Ij as ss,Ik as ia,Il as sd,Im as ZA,In as vv,Io as Xd,J as Vb,Jb as hT,Jc as qT,Jd as RC,Je as HC,Jf as Dw,Jg as ci,Jh as FS,Jj as as,Jk as sa,Jl as fA,Jm as QA,Jn as Ov,Jo as Yd,Kb as gT,Kc as zT,Kd as MC,Ke as KC,Kf as $w,Kg as CS,Kh as GS,Kj as ds,Kk as aa,Kl as _A,Km as ev,Kn as Iv,Ko as Jd,Lb as yT,Lc as VT,Le as WC,Lf as Fw,Lg as li,Lh as US,Lj as cs,Lk as da,Ll as hA,Lm as Ot,Ln as Rv,Lo as Zd,M as Hb,Mb as bT,Mc as HT,Md as PC,Me as XC,Mf as Gw,Mg as pi,Mi as qi,Mj as ls,Mk as ca,Ml as gA,Mn as Mv,Mo as Qd,Nb as TT,Nc as sn,Nd as kC,Ne as YC,Nf as Uw,Ng as D,Nh as jS,Ni as At,Nj as ps,Nk as la,Nl as yA,Nm as tv,Nn as Pv,No as ec,Oc as KT,Od as xC,Oe as JC,Og as ui,Oh as xi,Oi as _E,Oj as us,Ok as pa,Ol as bA,On as kv,Oo as tc,Pc as an,Pd as NC,Pf as jw,Ph as Ni,Pi as hE,Pj as ms,Pk as ua,Pm as rv,Pn as xv,Po as rc,Q as Kb,Qa as iT,Qb as CT,Qd as LC,Qe as ZC,Qf as Bw,Qh as BS,Qi as gE,Qj as fs,Qk as ma,Ql as TA,Qo as Mt,R as ue,Ra as sT,Rb as wT,Rc as WT,Rd as DC,Re as QC,Rf as Wn,Ri as yE,Rj as _s,Rk as fa,Rl as CA,S as Wb,Sa as aT,Sc as XT,Sd as $C,Se as ew,Sf as Xn,Si as bE,Sk as _a,Sl as wA,T as b,Tc as YT,Td as FC,Te as tw,Tf as Yn,Ti as TE,Tj as hs,Tk as ha,Tl as SA,Tm as ov,Tn as Rt,Ub as R,Uc as JT,Ud as GC,Ue as rw,Uf as eS,Ui as CE,Uj as gs,Uk as ga,Um as nv,Un as Nv,V as $o,Va as Ko,Vb as ST,Vc as ZT,Vd as UC,Ve as ow,Vf as tS,Vg as wS,Vh as qS,Vi as wE,Vj as ys,Vk as ya,Vl as EA,Vm as iv,Vn as Lv,W as bt,Wa as dT,Wb as Tt,Wd as jC,We as nw,Wf as rS,Wg as SS,Wh as zS,Wi as SE,Wj as bs,Wk as ba,Wl as AA,Wm as ad,Wn as Dv,X as me,Xa as cT,Xb as ET,Xd as pn,Xe as iw,Xf as oS,Xg as ES,Xh as VS,Xj as Ts,Xk as Ta,Xm as sv,Xn as wd,Y as Fo,Ya as lT,Yd as un,Ye as sw,Yf as nS,Yg as mi,Yh as HS,Yi as EE,Yj as Cs,Yk as Ca,Yl as vA,Yn as Sd,Za as pT,Zb as AT,Zd as mn,Ze as aw,Zf as iS,Zg as fi,Zh as KS,Zi as AE,Zj as ws,Zk as wa,Zl as OA,Zm as av,Zn as Ed,_d as fn,_e as dw,_f as sS,_g as _i,_h as WS,_i as vE,_j as Ss,_k as Sa,_l as IA,_m as dv,_n as Ad,aa as Go,ab as Xo,ad as wt,ae as hn,af as lw,ag as dS,ah as gi,ai as XS,aj as zi,ak as As,al as Aa,am as MA,an as lv,ao as Od,b as Io,bb as $e,bd as dn,be as gn,bf as pw,bg as cS,bh as yi,bj as Vi,bk as vs,bl as va,bm as PA,bn as pv,bo as Id,c as Ro,ca as Xb,cb as uT,cd as cn,ce as Fe,cf as uw,cg as lS,ch as bi,ci as YS,ck as Os,cl as Oa,cm as kA,cn as uv,co as Rd,d as Mo,da as Yb,db as mT,dd as ln,de as Ge,df as St,dg as pS,dh as Ti,di as JS,dj as Hi,dk as Is,dl as Ia,dm as xA,dn as mv,do as Md,e as Po,ea as Jb,eb as Yo,ee as yn,eg as uS,eh as Ci,ei as ZS,ej as IE,ek as Rs,el as Ra,em as NA,en as fv,eo as Pd,f as xe,fa as Zb,fb as Jo,fd as QT,fe as bn,ff as Et,fh as wi,fi as QS,fk as Ms,fl as Ma,fn as _v,fo as kd,g as ko,ga as Qb,gd as eC,ge as Tn,gf as Vn,gh as Si,gi as eE,gj as RE,gk as Ps,gl as Pa,gm as LA,gn as hv,go as xd,h as L,ha as eT,hb as Zo,hd as tC,he as Cn,hf as Hn,hh as Ei,hi as tE,hj as ME,hk as ks,hl as ka,hm as DA,hn as It,ho as Nd,i as Ne,id as rC,ie as wn,if as fe,ih as Ai,ii as rE,ij as PE,ik as xs,il as xa,im as $A,in as gv,io as Ld,j as xo,ja as tT,jc as vT,jd as oC,je as Sn,jh as vi,ji as oE,jk as Ns,jm as FA,jo as Dd,k as No,ka as rT,kc as OT,kd as nC,ke as En,kf as mw,kg as mS,kh as Oi,ki as nE,kj as kE,kk as Ls,kl as qe,km as GA,ko as $d,l as Lo,lc as IT,ld as iC,le as An,lh as AS,lk as Ds,ll as ee,ln as yv,lo as Fd,m as Do,md as sC,me as vn,mf as fw,mh as vS,mj as VE,mk as $s,ml as Na,mm as UA,mn as bv,mo as Gd,n as Lb,na as oT,nc as RT,nd as aC,ne as On,nf as Ue,ng as Jn,nh as Ii,nj as HE,nk as Fs,nl as Ha,nn as Tv,o as Le,oc as MT,od as dC,oe as In,of as _w,og as fS,oh as OS,oi as iE,oj as KE,ok as Gs,ol as Ka,om as jA,on as Cv,oo as $v,p as yt,pd as cC,pe as Rn,pf as hw,pg as Zn,ph as Ri,pj as je,pk as Us,pl as Wa,pm as BA,pn as wv,po as Fv,q as Db,qa as nT,qc as PT,qd as lC,qe as Mn,qf as gw,qh as Mi,qi as sE,qj as WE,qk as js,ql as Xa,qm as qA,qn as Sv,r as $b,ra as Uo,rc as tn,rd as pC,re as Pn,rf as yw,rg as _S,rh as Pi,rj as XE,rk as Bs,rl as Ya,rm as zA,rn as Ev,s as Fb,sa as jo,sd as uC,se as kn,sf as bw,sh as ki,sj as YE,sk as qs,sl as Ja,sm as VA,sn as Av,so as Gv,t as Gb,ta as Bo,tc as rn,td as mC,te as xn,tf as Tw,tg as hS,ti as aE,tj as vt,tk as zs,tl as Za,tn as dd,to as Uv,u as z,ub as Qo,uc as on,ud as fC,ue as Nn,uf as Cw,ug as gS,ui as Li,uj as Be,uk as Vs,ul as Qa,un as cd,uo as jv,v as Ub,vb as en,vd as _C,ve as Ln,vf as ww,vg as Qn,vi as dE,vj as JE,vk as Hs,vl as ed,vn as ld,vo as Bv,wb as fT,wd as hC,we as Dn,wf as Sw,wg as ei,wj as ZE,wk as Ks,wl as iA,wn as pd,wo as qv,x as jb,xa as qo,xc as kT,xd as gC,xe as $n,xf as Ew,xg as ti,xi as cE,xj as QE,xk as Ws,xl as sA,xn as ud,xo as zv,y as Bb,yc as xT,yd as yC,ye as Fn,yf as Aw,yg as ri,yi as lE,yj as eA,yk as Xs,yl as aA,yn as md,yo as Vv,z as qb,za as zo,zc as NT,zd as bC,ze as Gn,zf as vw,zg as oi,zh as IS,zi as pE,zj as tA,zk as Ys,zl as dA,zo as Ud}from"./chunks/chunk-YMLF6QT7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8f11e0bf-4115-55a8-bd39-c360f43cdc09")}catch{}})();var V="2026-07-28",sk=["2025-11-25","2025-06-18"],Ye=[V],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},E={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},tr=["debug","info","notice","warning","error","critical","alert","emergency"],u=class extends Error{code;data;constructor(t,r,o={}){super(t),this.name="PmMcpProtocolError",this.code=r,this.data=o}};function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Lh(e){if(e===void 0)return;if(!h(e))throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:E.clientInfo,expected:"object"});let t=typeof e.name=="string"?e.name.trim():"",r=typeof e.version=="string"?e.version.trim():"";if(t.length===0||r.length===0)throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:E.clientInfo,required:["name","version"]});let o={name:t.slice(0,128),version:r.slice(0,128)};return typeof e.description=="string"&&e.description.trim()&&(o.description=e.description.trim().slice(0,1024)),typeof e.websiteUrl=="string"&&e.websiteUrl.trim()&&(o.websiteUrl=e.websiteUrl.trim().slice(0,2048)),o}function Dh(e){if(e!==void 0){if(typeof e!="string"||!tr.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:E.logLevel,allowed:[...tr]});return e}}function Je(e){let t=h(e)?e._meta:void 0;if(!h(t))throw new u("Missing required MCP request metadata",m.invalidParams,{required:[E.protocolVersion,E.clientCapabilities]});let r=t[E.protocolVersion];if(typeof r!="string"||!Ye.includes(r))throw new u("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...Ye],requested:typeof r=="string"?r:null});let o=t[E.clientCapabilities];if(!h(o))throw new u("Invalid MCP client capabilities metadata",m.invalidParams,{field:E.clientCapabilities,expected:"object"});let n=Lh(t[E.clientInfo]),s=Dh(t[E.logLevel]);return{protocolVersion:V,clientCapabilities:o,...n?{clientInfo:n}:{},...s?{logLevel:s}:{}}}function ak(e,t){if(t!==e.protocolVersion)throw new u("MCP protocol header does not match request metadata",m.headerMismatch,{header:t??null,metadata:e.protocolVersion})}function dk(e,t){let r=t.filter(o=>!Object.prototype.hasOwnProperty.call(e.clientCapabilities,o));if(r.length>0)throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:Object.fromEntries(r.map(o=>[o,{}]))})}function ck(e,t){let r=e.clientCapabilities.extensions;return h(r)&&h(r[t])}function Ze(e,t){let r=h(e._meta)?e._meta:{};return{...e,_meta:{...r,[E.serverInfo]:{...t}}}}function $h(e,t){return Ze({...e,resultType:"complete"},t)}function lk(e){let t=e.ttlMs??6e4;if(!Number.isFinite(t)||t<0)throw new u("Invalid MCP discovery cache TTL",m.invalidParams,{ttlMs:t});return $h({supportedVersions:[...Ye],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function pk(e,t){if(h(e)&&typeof e.resultType=="string")return e.resultType;if(t==="legacy")return"complete";throw new u("Modern MCP result is missing resultType",m.invalidParams,{required:"resultType"})}import{createHash as nr,createHmac as ir,timingSafeEqual as Fh}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="15b81dd0-ef1a-58be-b6ee-5975b6778993")}catch{}})();var Gh=["elicitation/create","roots/list","sampling/createMessage"],rr=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},sr=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,ge=32,et=64*1024,ye=16*1024,Qe={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function Uh(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function be(e,t,r){let o;try{o=JSON.stringify(e)}catch{throw new u(`Invalid ${r}: value is not JSON serializable`,m.invalidParams,{field:r})}if(Buffer.byteLength(o,"utf8")>t)throw new u(`Invalid ${r}: payload exceeds the protocol bound`,m.invalidParams,{field:r,maximumBytes:t})}function tt(e,t){if(!h(e))throw new u("Invalid MCP inputRequests",m.invalidParams,{field:"inputRequests",expected:"object"});let r=Object.entries(e);if(r.length===0||r.length>ge)throw new u("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:ge,observed:r.length});let o={};for(let[n,s]of r){if(!sr.test(n)||!h(s))throw new u("Invalid MCP input request entry",m.invalidParams,{field:`inputRequests.${n}`});let i=s.method;if(typeof i!="string"||!Gh.includes(i))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:i??null});let a=Uh(i);if(!Object.prototype.hasOwnProperty.call(t.clientCapabilities,a))throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:{[a]:{}}});if(!h(s.params))throw new u("Invalid MCP input request parameters",m.invalidParams,{field:`inputRequests.${n}.params`,expected:"object"});o[n]={method:i,params:structuredClone(s.params)}}return be(o,et,"inputRequests"),o}function ar(e){if(!h(e))throw new u("Invalid MCP inputResponses",m.invalidParams,{field:"inputResponses",expected:"object"});let t=Object.entries(e);if(t.length>ge)throw new u("Invalid MCP inputResponses count",m.invalidParams,{maximum:ge,observed:t.length});let r={};for(let[o,n]of t){if(!sr.test(o)||!h(n))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return be(r,et,"inputResponses"),r}function _k(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>ye)throw new u("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:ye});let r=e.inputRequests===void 0?void 0:tt(e.inputRequests,e.requestContext);if(r===void 0&&!t)throw new u("InputRequiredResult requires inputRequests or requestState",m.invalidParams,{requiredAnyOf:["inputRequests","requestState"]});return{resultType:"input_required",...r?{inputRequests:r}:{},...t?{requestState:t}:{},_meta:{[E.serverInfo]:{...e.serverInfo}}}}function dr(e){let t=Buffer.from(e);if(t.byteLength<32)throw new u("MCP requestState signing key must contain at least 32 bytes",m.invalidParams,{minimumBytes:32});return t}function hk(e,t){if(!Number.isSafeInteger(e.expiresAt)||e.expiresAt<=0||e.method.trim().length===0||e.parameterDigest.trim().length===0||e.principal.trim().length===0)throw new u("Invalid MCP requestState payload",m.invalidParams);let r=Buffer.from(JSON.stringify({version:1,...e}),"utf8");if(r.byteLength>ye/2)throw new u("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:ye/2});let o=r.toString("base64url"),n=ir("sha256",dr(t)).update(o).digest("base64url");return`${o}.${n}`}function jh(e){if(!h(e)||e.version!==1)throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});let{expiresAt:t,method:r,parameterDigest:o,principal:n,state:s}=e;if(typeof t!="number"||!Number.isSafeInteger(t))throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});if(typeof r!="string"||typeof o!="string"||typeof n!="string")throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});return{expiresAt:t,method:r,parameterDigest:o,principal:n,state:s}}function gk(e,t,r){let[o,n,s]=e.split(".");if(!o||!n||s!==void 0)throw new u("Invalid MCP requestState encoding",m.invalidParams,{field:"requestState"});let i=Buffer.from(n,"base64url"),a=ir("sha256",dr(t)).update(o).digest();if(i.byteLength!==a.byteLength||!Fh(i,a))throw new u("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let d;try{d=JSON.parse(Buffer.from(o,"base64url").toString("utf8"))}catch{d=null}let c=jh(d),{expiresAt:l,method:p,parameterDigest:f,principal:_}=c;if(l<(r.nowMs??Date.now()))throw new u("Expired MCP requestState",m.invalidParams,{field:"requestState",expiredAt:l});if(p!==r.method||f!==r.parameterDigest||_!==r.principal)throw new u("MCP requestState binding mismatch",m.invalidParams,{field:"requestState"});return c}function yk(e){return be(e,et,"request parameters"),nr("sha256").update(JSON.stringify(e)).digest("hex")}var or=class{#e=new Set;#t;constructor(t=4096){if(!Number.isSafeInteger(t)||t<1)throw new u("Invalid MCP replay guard capacity",m.invalidParams,{maximumEntries:t});this.#t=t}consume(t){let r=nr("sha256").update(t).digest("hex");if(this.#e.has(r))throw new u("MCP requestState replay detected",m.invalidParams,{field:"requestState"});if(this.#e.size>=this.#t){let o=this.#e.values().next().value;this.#e.delete(o)}this.#e.add(r)}};function Bh(e){if(!Number.isSafeInteger(e.ttlMs)||e.ttlMs<0||e.cacheScope!=="public"&&e.cacheScope!=="private")throw new u("Invalid MCP cache policy",m.invalidParams,{ttlMs:e.ttlMs,cacheScope:e.cacheScope});return{ttlMs:e.ttlMs,cacheScope:e.cacheScope}}function bk(e,t){return{...e,...Bh(t)}}function qh(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function zh(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(qh)){if(!h(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function Vh(e){let t=e.maxBytes??Qe.maxBytes,r=e.maxDepth??Qe.maxDepth,o=e.maxNodes??Qe.maxNodes;if(!Number.isSafeInteger(t)||t<2)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(r)||r<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(o)||o<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);return{maximumBytes:t,maximumDepth:r,maximumNodes:o}}function Hh(e,t){let r=Array.isArray(e.value)?e.value:h(e.value)?Object.values(e.value):[];for(let o of r)t.push({value:o,depth:e.depth+1})}function Kh(e,t){if(!h(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&zh(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function Tk(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=Vh(t);if(typeof e!="boolean"&&!h(e))throw new u("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});be(e,r,"JSON Schema");let s=[{value:e,depth:0}],i=0;for(;s.length>0;){let a=s.pop();if(i+=1,i>n||a.depth>o)throw new u("MCP JSON Schema exceeds validation work bounds",m.invalidParams,{maximumDepth:o,maximumNodes:n});Kh(e,a.value),Hh(a,s)}return structuredClone(e)}import{randomUUID as Wh}from"node:crypto";import{readFile as Xh}from"node:fs/promises";import cr from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f3e94896-b2a0-561c-902b-71c28ddde2a1")}catch{}})();var Ik="io.modelcontextprotocol/tasks",Yh=["working","input_required","completed","failed","cancelled"],Jh=/^mcp-task-[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu,Zh=3600*1e3,Qh=1e3,Ce=1024,eg=30,tg=2e3;function rt(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function Te(e){let t=e.trim();if(!Jh.test(t))throw rt("Unknown MCP task");return t}function lr(e,t){if(typeof e!="string"||!Number.isFinite(Date.parse(e)))throw new u("Corrupt MCP task record",m.invalidParams,{field:t});return e}function pr(e){if(!h(e)||typeof e.code!="number"||!Number.isFinite(e.code)||typeof e.message!="string")throw new u("Corrupt MCP task error",m.invalidParams);return{code:e.code,message:e.message.slice(0,Ce),...h(e.data)?{data:structuredClone(e.data)}:{}}}function rg(e){if(!Yh.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function og(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function ng(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function ig(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function sg(e){if(e!==void 0){if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new u("Corrupt MCP task record",m.invalidParams);return e}}function ag(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function dg(e){if(!h(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?Te(e.taskId):"",r=rg(e.status),o=og(e.principal),n=ng(e.workerPid),s=ig(e.ttlMs),i=sg(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:lr(e.createdAt,"createdAt"),lastUpdatedAt:lr(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:s,consumedInputKeys:ag(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,Ce)}:{},...typeof i=="number"?{pollIntervalMs:i}:{}};if(h(e.inputRequests)&&(a.inputRequests=structuredClone(e.inputRequests)),h(e.inputResponses)&&(a.inputResponses=structuredClone(e.inputResponses)),h(e.result)&&(a.result=structuredClone(e.result)),e.error!==void 0&&(a.error=pr(e.error)),a.status==="input_required"&&!a.inputRequests||a.status==="completed"&&!a.result||a.status==="failed"&&!a.error)throw new u("Corrupt MCP task status payload",m.invalidParams,{status:a.status});return a}function H(e){let t={taskId:e.taskId,status:e.status,createdAt:e.createdAt,lastUpdatedAt:e.lastUpdatedAt,ttlMs:e.ttlMs,...e.statusMessage?{statusMessage:e.statusMessage}:{},...e.pollIntervalMs===void 0?{}:{pollIntervalMs:e.pollIntervalMs}};return e.status==="input_required"?{...t,status:"input_required",inputRequests:structuredClone(e.inputRequests)}:e.status==="completed"?{...t,status:"completed",result:structuredClone(e.result)}:e.status==="failed"?{...t,status:"failed",error:structuredClone(e.error)}:e.status==="cancelled"?{...t,status:"cancelled"}:{...t,status:"working"}}function re(e){return e==="completed"||e==="failed"||e==="cancelled"}function cg(e){try{return process.kill(e,0),!0}catch(t){return!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ESRCH")}}var ot=class{#e;#t;#r;#o;#i;constructor(t){this.#e=cr.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Wh()}`),this.#i=t.workerPid??process.pid}#s(t){return cr.join(this.#e,"runtime","mcp-tasks","records",`${Te(t)}.json`)}async#d(t){try{return dg(JSON.parse(await Xh(this.#s(t),"utf8")))}catch(r){throw me(r)||r instanceof SyntaxError?rt("Unknown MCP task"):r}}async#a(t){await De(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
|
|
2
|
+
`)}async#n(t,r,o){let n=Te(t),s=await Ue(this.#e,n,eg,this.#t,!1,!1,tg);try{let i=await this.#d(n);if(i.principal!==r)throw rt("Unknown MCP task");let a=o(i);return await this.#a(a),a}finally{await s()}}async create(t){let r=Te(this.#o()),o=t.principal.trim(),n=t.ttlMs===void 0?Zh:t.ttlMs,s=t.pollIntervalMs??Qh;if(o.length===0||n!==null&&(!Number.isSafeInteger(n)||n<0)||!Number.isSafeInteger(s)||s<0)throw new u("Invalid MCP task creation options",m.invalidParams);let i=this.#r().toISOString(),a={version:1,taskId:r,status:"working",createdAt:i,lastUpdatedAt:i,ttlMs:n,pollIntervalMs:s,principal:o,workerPid:this.#i,consumedInputKeys:[],...t.statusMessage?.trim()?{statusMessage:t.statusMessage.trim().slice(0,Ce)}:{}};return await this.#a(a),{...H(a),resultType:"task"}}async get(t,r){return H(await this.#n(t,r,o=>{if(re(o.status))return o;let n=this.#r().getTime(),s=o.ttlMs!==null&&Date.parse(o.createdAt)+o.ttlMs<=n,i=o.workerPid!==this.#i&&!cg(o.workerPid);return!s&&!i?o:{...o,status:"failed",statusMessage:s?"Task retention expired before completion.":"Task worker ended before recording a terminal result.",lastUpdatedAt:this.#r().toISOString(),error:{code:-32603,message:s?"MCP task expired":"MCP task worker unavailable after restart",data:{recoverable:!1,createNewTask:!0}},inputRequests:void 0}}))}async requireInput(t){let r=tt(t.inputRequests,t.requestContext);return H(await this.#n(t.taskId,t.principal,o=>{if(re(o.status))return o;let n=Object.keys(r).filter(s=>o.consumedInputKeys.includes(s));if(n.length>0)throw new u("MCP task input request keys must be unique for the task lifetime",m.invalidParams,{reused:n});return{...o,status:"input_required",statusMessage:t.statusMessage?.trim().slice(0,Ce),lastUpdatedAt:this.#r().toISOString(),inputRequests:r}}))}async update(t,r,o){let n=ar(o),s=[],i=[];return await this.#n(t,r,a=>{if(a.status!=="input_required"||!a.inputRequests)return a;let d={...a.inputRequests},c=a.inputResponses?{...a.inputResponses}:{};for(let[l,p]of Object.entries(n))Object.prototype.hasOwnProperty.call(d,l)&&(c[l]=p,delete d[l],s.push(l));return i=Object.keys(d).sort(),s.length===0?a:{...a,status:i.length===0?"working":"input_required",lastUpdatedAt:this.#r().toISOString(),inputRequests:i.length===0?void 0:d,inputResponses:c,consumedInputKeys:[...new Set([...a.consumedInputKeys,...s])].sort()}}),{acceptedKeys:s.sort(),remainingKeys:i}}async takeInputResponses(t,r){let o={};return await this.#n(t,r,n=>(o=structuredClone(n.inputResponses??{}),Object.keys(o).length===0?n:{...n,inputResponses:void 0})),o}async complete(t,r,o){return H(await this.#n(t,r,n=>re(n.status)?n:{...n,status:"completed",statusMessage:"Task completed.",lastUpdatedAt:this.#r().toISOString(),result:structuredClone(o),inputRequests:void 0,error:void 0}))}async fail(t,r,o){let n=pr(o);return H(await this.#n(t,r,s=>re(s.status)?s:{...s,status:"failed",statusMessage:n.message,lastUpdatedAt:this.#r().toISOString(),error:n,inputRequests:void 0,result:void 0}))}async cancel(t,r){return H(await this.#n(t,r,o=>re(o.status)?o:{...o,status:"cancelled",statusMessage:"Task cancelled by the client.",lastUpdatedAt:this.#r().toISOString(),inputRequests:void 0,result:void 0,error:void 0}))}};function Rk(e){return new ot(e)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="15cbe26a-5716-5e8c-8700-eb36a1a056d6")}catch{}})();var we="io.modelcontextprotocol/subscriptionId",ur=256,mr=2048,lg=5e3;function pg(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),lg);n.unref(),Promise.resolve().then(()=>e(t)).then(()=>{clearTimeout(n),r()},s=>{clearTimeout(n),o(s instanceof Error?s:new Error(String(s)))})})}function nt(e,t){if(e!==void 0){if(typeof e!="boolean")throw new u("Invalid MCP subscription filter",m.invalidParams,{field:`notifications.${t}`,expected:"boolean"});return e||void 0}}function ug(e){if(!h(e))throw new u("Invalid MCP subscription filter",m.invalidParams,{field:"notifications",expected:"object"});let t=nt(e.toolsListChanged,"toolsListChanged"),r=nt(e.promptsListChanged,"promptsListChanged"),o=nt(e.resourcesListChanged,"resourcesListChanged"),n;if(e.resourceSubscriptions!==void 0){if(!Array.isArray(e.resourceSubscriptions)||e.resourceSubscriptions.length>ur)throw new u("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:ur});let s=new Set;for(let i of e.resourceSubscriptions){if(typeof i!="string"||i.trim().length===0||Buffer.byteLength(i,"utf8")>mr)throw new u("Invalid MCP resource subscription URI",m.invalidParams,{field:"notifications.resourceSubscriptions",maximumBytes:mr});s.add(i)}s.size>0&&(n=[...s].sort())}return{...t?{toolsListChanged:t}:{},...r?{promptsListChanged:r}:{},...o?{resourcesListChanged:o}:{},...n?{resourceSubscriptions:n}:{}}}function mg(e,t){return{...e.toolsListChanged&&t.tools?.listChanged?{toolsListChanged:!0}:{},...e.promptsListChanged&&t.prompts?.listChanged?{promptsListChanged:!0}:{},...e.resourcesListChanged&&t.resources?.listChanged?{resourcesListChanged:!0}:{},...e.resourceSubscriptions&&t.resources?.subscribe?{resourceSubscriptions:[...e.resourceSubscriptions]}:{}}}var fr=class{#e;#t=new Map;#r;constructor(t){this.#e=structuredClone(t.capabilities),this.#r={...t.serverInfo}}get size(){return this.#t.size}async open(t){if(this.#t.has(t.id))throw new u("MCP subscription id is already active",m.invalidParams,{subscriptionId:t.id});let r=mg(ug(t.notifications),this.#e),o={filter:r,sink:t.sink,writeQueue:Promise.resolve()};this.#t.set(t.id,o);try{await this.#o(t.id,o,{jsonrpc:"2.0",method:"notifications/subscriptions/acknowledged",params:{_meta:{[we]:t.id},notifications:structuredClone(r)}},!0)}catch(n){throw this.#t.delete(t.id),n}return structuredClone(r)}async emitListChanged(t){let r=`${t}ListChanged`,o=`notifications/${t}/list_changed`,n=[];for(let[s,i]of this.#t)i.filter[r]===!0&&n.push(this.#o(s,i,{jsonrpc:"2.0",method:o,params:{_meta:{[we]:s}}}));return(await Promise.all(n)).filter(Boolean).length}async emitResourceUpdated(t){let r=[];for(let[o,n]of this.#t)n.filter.resourceSubscriptions?.includes(t)&&r.push(this.#o(o,n,{jsonrpc:"2.0",method:"notifications/resources/updated",params:{_meta:{[we]:o},uri:t}}));return(await Promise.all(r)).filter(Boolean).length}async#o(t,r,o,n=!1){let s=r.writeQueue.then(async()=>{if(this.#t.get(t)!==r)return!1;try{return await pg(r.sink,o),!0}catch(i){if(this.#t.get(t)===r&&this.#t.delete(t),n)throw i;return!1}});return r.writeQueue=s.then(()=>{},()=>{}),s}close(t){if(this.#t.delete(t))return{...Ze({resultType:"complete",_meta:{[we]:t}},this.#r)}}closeAll(){let t=[];for(let r of this.#t.keys()){let o=this.close(r);t.push({id:r,result:o})}return t}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3681273a-e101-57a0-9446-982c450e7183")}catch{}})();var _r=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,fg=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,hr=/^[\t\x20-\x7E]*$/u,gr=new Set(["prompts/get","resources/read","tools/call"]);function _g(e){let t=new Map;for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let n=typeof o=="string"?o:o.join(", ");t.set(r.toLowerCase(),n)}return t}function A(e,t){throw new u(e,m.headerMismatch,{header:t})}function yr(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&hr.test(t)&&!_r.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function br(e,t){let r=_r.exec(e);if(r){let o=r[1],n=Buffer.from(o,"base64");return n.toString("base64")!==o||n.length===0?A("Malformed MCP Base64 header value",t):n.toString("utf8")}return e.length===0||e.trim()!==e||!hr.test(e)?A("Malformed MCP header value",t):e}function Se(e){return Array.isArray(e)?e.some(Se):h(e)?Object.prototype.hasOwnProperty.call(e,"x-mcp-header")||Object.values(e).some(Se):!1}function hg(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!fg.test(o)||!["boolean","integer","string"].includes(String(n))||r.has(o.toLowerCase()))throw new u("Invalid MCP x-mcp-header annotation",m.invalidParams,{field:t.join("."),annotation:o});return r.add(o.toLowerCase()),{name:o,path:t,type:n}}function Tr(e){if(!h(e))throw new u("Invalid MCP tool schema",m.invalidParams,{field:"inputSchema",expected:"object"});let t=[],r=new Set,o=(n,s)=>{let i=n.properties;if(i!==void 0){if(!h(i))throw new u("Invalid MCP tool schema properties",m.invalidParams,{field:"inputSchema.properties"});for(let[a,d]of Object.entries(i)){if(!h(d))continue;let c=[...s,a],l=hg(d,c,r);l&&t.push(l);for(let[p,f]of Object.entries(d))if(p!=="properties"&&p!=="x-mcp-header"&&Se(f))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:c.join("."),keyword:p});o(d,c)}}};for(let[n,s]of Object.entries(e))if(n!=="properties"&&Se(s))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:"inputSchema",keyword:n});return o(e,[]),t}function Cr(e,t){let r=e;for(let o of t){if(!h(r))return;r=r[o]}return r}function wr(e,t){let r=e==="resources/read"?t.uri:t.name;return typeof r=="string"?r:void 0}function gg(e,t){let r=h(e.arguments)?e.arguments:{},o={};for(let n of Tr(t)){let s=Cr(r,n.path);if(s!=null){if(!(n.type==="integer"&&typeof s=="number"&&Number.isSafeInteger(s)||n.type==="boolean"&&typeof s=="boolean"||n.type==="string"&&typeof s=="string"))throw new u("Invalid MCP custom header argument",m.invalidParams,{field:n.path.join("."),expected:n.type});o[`Mcp-Param-${n.name}`]=yr(s)}}return o}function Nk(e){let t=h(e.request.params)?e.request.params:void 0,r=Je(t),o=e.request.method;if(typeof o!="string"||o.length===0)return A("Missing MCP request method","Mcp-Method");let n={Accept:"application/json, text/event-stream","Content-Type":"application/json","MCP-Protocol-Version":r.protocolVersion,"Mcp-Method":o},s=wr(o,t);if(gr.has(o)){if(s===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=yr(s)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,gg(t,e.toolSchema)),n}function yg(e,t){let r=t.method;(typeof r!="string"||r.length===0)&&A("Missing MCP request method","Mcp-Method");let o=h(t.params)?t.params:void 0,n=Je(o).protocolVersion;if(e.get("mcp-protocol-version")!==n&&A("MCP protocol header does not match request metadata","MCP-Protocol-Version"),e.get("mcp-method")!==r&&A("MCP method header does not match request body","Mcp-Method"),gr.has(r)){let s=e.get("mcp-name"),i=wr(r,o);(s===void 0||i===void 0||br(s,"Mcp-Name")!==i)&&A("MCP name header does not match request body","Mcp-Name")}e.has("last-event-id")&&A("MCP SSE resumability is not supported","Last-Event-ID")}function bg(e,t,r){return e.type==="integer"?typeof t=="number"&&Number.isSafeInteger(t)&&Number(r)===t:e.type==="boolean"?typeof t=="boolean"&&r===String(t):typeof t=="string"&&r===t}function Tg(e){let t=h(e.params.arguments)?e.params.arguments:{};for(let r of Tr(e.toolSchema)){let o=Cr(t,r.path),n=`Mcp-Param-${r.name}`,s=e.headers.get(n.toLowerCase());if(o==null){s!==void 0&&A("Unexpected MCP parameter header",n);continue}s===void 0&&A("Missing MCP parameter header",n),bg(r,o,br(s,n))||A("MCP parameter header does not match request body",n)}}function Lk(e){let t=_g(e.headers),r=typeof e.request.method=="string"?e.request.method:"";yg(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&Tg({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var Dk=V;import{AsyncLocalStorage as Cg}from"node:async_hooks";import{createHash as Sr,timingSafeEqual as wg}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a7c30d99-a0e4-552e-be61-0c54a455e211")}catch{}})();var y=class extends Error{httpStatus;challenge;constructor(t,r,o){super(t),this.name="PmMcpAuthorizationError",this.httpStatus=r,this.challenge=o}},Sg=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,Eg=/^[a-z][a-z0-9_*/-]{0,255}$/u,Ag=/^(?:[a-z0-9][a-z0-9_*/-]{0,240})@[a-z][a-z0-9_*/-]{0,13}$/u,vg=/^[\x20-\x2B\x2D-\x3C\x3E-\x7E]{0,255}[\x21-\x2B\x2D-\x3C\x3E-\x7E]$/u,Ar=/^[\x21\x23-\x5B\x5D-\x7E]+$/u,vr=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,Og=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,Ig=/%(?![0-9A-Fa-f]{2})/u,Rg=512,Mg=32,Pg=180,kg=8192,xg=8192,Or=new Cg;function S(e,t,r=!1){if(new RegExp("\\p{Cc}","u").test(e))throw new y(`Invalid ${t}`,401);let o;try{o=new URL(e)}catch{throw new y(`Invalid ${t}`,401)}let n=o.hostname==="127.0.0.1"||o.hostname==="localhost";if(o.hash.length>0||o.protocol!=="https:"&&!(r&&n&&o.protocol==="http:"))throw new y(`Invalid ${t}`,401);return o}function Ng(e,t){let r=t.toLowerCase();for(let[o,n]of Object.entries(e))if(!(o.toLowerCase()!==r||n===void 0))return typeof n=="string"?n:n.join(", ")}function jk(e){let t=S(e.resource,"protected resource URI",!0).href.replace(/\/$/u,"");if(e.authorizationServers.length===0)throw new y("Protected resource metadata requires an authorization server",401);let r=e.authorizationServers.map(n=>S(n,"authorization server issuer").href.replace(/\/$/u,"")),o=[...new Set(e.scopes??[])];if(o.some(n=>!Ar.test(n)))throw new y("Invalid authorization scope",401);return{resource:t,authorization_servers:r,...o.length>0?{scopes_supported:o.sort()}:{}}}function Bk(e){let t=S(e,"authorization server issuer"),r=t.pathname.replace(/^\/+|\/+$/gu,""),o=t.origin;return r?[`${o}/.well-known/oauth-authorization-server/${r}`,`${o}/.well-known/openid-configuration/${r}`,`${o}/${r}/.well-known/openid-configuration`]:[`${o}/.well-known/oauth-authorization-server`,`${o}/.well-known/openid-configuration`]}function qk(e,t){if(!h(e)||typeof e.issuer!="string")throw new y("Invalid authorization server metadata",401);let r=S(t,"expected issuer").href.replace(/\/$/u,"");if(S(e.issuer,"metadata issuer").href.replace(/\/$/u,"")!==r)throw new y("Authorization server issuer mismatch",401);if(!Array.isArray(e.code_challenge_methods_supported)||!e.code_challenge_methods_supported.includes("S256"))throw new y("Authorization server does not support required S256 PKCE",401);let o=d=>{let c=e[d];if(typeof c!="string")throw new y(`Authorization server metadata requires ${d}`,401);return S(c,d).href},n=d=>{let c=e[d];return typeof c=="string"?S(c,d).href:void 0},s=o("authorization_endpoint"),i=o("token_endpoint"),a=n("registration_endpoint");return{issuer:r,authorization_endpoint:s,token_endpoint:i,code_challenge_methods_supported:[...new Set(e.code_challenge_methods_supported.filter(d=>typeof d=="string"))],...e.client_id_metadata_document_supported===!0?{client_id_metadata_document_supported:!0}:{},...a?{registration_endpoint:a}:{}}}function zk(e){return e.hasPreRegisteredClient?"pre_registered":e.metadata.client_id_metadata_document_supported?"client_id_metadata_document":e.metadata.registration_endpoint?"dynamic":"user_supplied"}function Vk(e){if(e.responseIssuer===void 0){if(e.issuerParameterSupported)throw new y("Authorization response omitted the advertised issuer",401);return}if(e.responseIssuer!==e.expectedIssuer)throw new y("Authorization response issuer mismatch",401)}function Hk(e,t){let r=S(t,"client metadata document URL");if(r.pathname==="/"||!h(e)||e.client_id!==r.href||typeof e.client_name!="string"||e.client_name.trim().length===0||!Array.isArray(e.redirect_uris)||e.redirect_uris.length===0)throw new y("Invalid Client ID Metadata Document",401);for(let o of e.redirect_uris){if(typeof o!="string")throw new y("Invalid client redirect URI",401);S(o,"client redirect URI",!0)}return structuredClone(e)}function Kk(e){if(e.redirectUris.length===0||e.clientName.trim().length===0)throw new y("Invalid dynamic client registration metadata",401);let t=e.redirectUris.map(r=>S(r,"redirect URI",!0).href);return{application_type:e.applicationType,client_name:e.clientName.trim().slice(0,128),redirect_uris:t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"}}var Er=class{#e=new Map;set(t,r){let o=S(t,"credential issuer").href;this.#e.set(o,structuredClone(r))}get(t){let r=S(t,"credential issuer").href,o=this.#e.get(r);return o?structuredClone(o):void 0}delete(t){let r=S(t,"credential issuer").href;return this.#e.delete(r)}};function Lg(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?Sg.exec(t):null;if(!o)throw new y("Invalid MCP traceparent",403);let n=o[1],s=o[2];if(/^0+$/u.test(n)||/^0+$/u.test(s))throw new y("Invalid MCP traceparent",403)}if(r!==void 0&&(typeof r!="string"||!$g(r)))throw new y("Invalid MCP tracestate",403);return{...typeof t=="string"?{traceparent:t}:{},...typeof r=="string"?{tracestate:r}:{}}}function $(e){return e.replace(/^[ \t]*|[ \t]*$/gu,"")}function Dg(e){return Eg.test(e)||Ag.test(e)}function $g(e){if(Buffer.byteLength(e,"utf8")>Rg)return!1;let t=e.split(",");if(t.length>Mg)return!1;let r=new Set;for(let o of t){let n=$(o);if(n.length===0)continue;let s=n.indexOf("="),i=s>0?n.slice(0,s):"",a=s>0?n.slice(s+1):"";if(!Dg(i)||!vg.test(a)||r.has(i))return!1;r.add(i)}return!0}function Ir(e){return Og.test(e)&&!Ig.test(e)}function Fg(e){let t=$(e),r=t.indexOf("="),o=$(r>=0?t.slice(0,r):t),n=r>=0?$(t.slice(r+1)):void 0;return vr.test(o)&&(n===void 0||Ir(n))}function Gg(e){let t=$(e),r=t.split(";"),o=r[0],n=r.slice(1),s=o.indexOf("="),i=$(s>0?o.slice(0,s):""),a=s>0?$(o.slice(s+1)):"";if(!(!vr.test(i)||!Ir(a)||!n.every(Fg)))return{key:i,serialized:t}}function Ug(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>kg)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>Pg)throw new y("Invalid MCP baggage",403);let n=[];for(let s of o){let i=Gg(s);if(!i)throw new y("Invalid MCP baggage",403);r.has(i.key)&&n.push(i.serialized)}return n.length>0?n.join(","):void 0}function Wk(e,t={}){let r=h(e)&&h(e._meta)?e._meta:{},o=Ug(r.baggage,t.baggageAllowlist??[]);return{...Lg(r),...o?{baggage:o}:{}}}function Xk(e,t){return Or.run(structuredClone(e),t)}function Yk(){let e=Or.getStore();return e?{...e}:void 0}async function Jk(e){let t=S(e.policy.resourceMetadataUrl,"protected resource metadata URL",!0).href,r=[...new Set(e.policy.requiredScopes??[])];if(r.some(c=>!Ar.test(c)))throw new y("Invalid authorization scope",401);let o=`Bearer resource_metadata="${t}"`;if(new URL(e.requestUrl,e.policy.resource).searchParams.has("access_token"))throw new y("Access tokens must not appear in URI query parameters",401,o);let n=Ng(e.headers,"authorization")?.match(/^Bearer ([^\s]+)$/iu);if(!n)throw new y("Missing or malformed bearer token",401,o);let s=n[1];if(Buffer.byteLength(s,"utf8")>xg)throw new y("Missing or malformed bearer token",401,o);let i;try{i=await e.policy.verifyAccessToken(s)}catch{throw new y("Invalid bearer token",401,o)}let a=Array.isArray(i.audience)?i.audience:[i.audience];if(i.issuer!==e.policy.issuer||!a.includes(e.policy.resource))throw new y("Bearer token issuer or audience mismatch",401,o);let d=r.filter(c=>!i.scopes.includes(c));if(d.length>0)throw new y("Bearer token has insufficient scope",403,`${o}, scope="${d.join(" ")}"`);return{...i,audience:[...a],scopes:[...i.scopes]}}function Zk(e){let t=Sr("sha256").update(e.token).digest();return r=>{let o=Sr("sha256").update(r).digest();if(!wg(t,o))throw new y("Invalid bearer token",401);return structuredClone(e.claims)}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="46f5fe59-6b84-5c68-ad07-bb1329f4ea29")}catch{}})();var it="io.modelcontextprotocol/ui",Ee="2026-01-26",Pr="text/html;profile=mcp-app",Rr=Object.freeze({specVersion:Ee,mimeTypes:[Pr]});function tx(e){let t=e.clientCapabilities.extensions;if(!h(t))return!1;let r=t[it];if(r===void 0)return!1;if(!h(r))throw new u("Invalid MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:Rr}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(Pr)||n!==void 0&&n!==Ee)throw new u("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:Rr}}});return!0}var jg={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},kr=Object.freeze([{id:"context",name:"Context explorer",description:"Inspect bounded project context, provenance, omissions, and token accounting.",toolName:"pm_context",uri:"ui://pm/context.html"},{id:"graph",name:"Relationship graph",description:"Explore typed relationships, explaining paths, and graph-governance evidence.",toolName:"pm_graph",uri:"ui://pm/graph.html"},{id:"plan",name:"Plan and milestone view",description:"Review durable plan steps, dependencies, decisions, discoveries, and validation state.",toolName:"pm_plan",uri:"ui://pm/plan.html"},{id:"assurance",name:"Assurance dashboard",description:"Inspect validation verdicts, evidence, omissions, and actionable recovery paths.",toolName:"pm_validate",uri:"ui://pm/assurance.html"},{id:"operations",name:"Long-operation view",description:"Inspect durable test and operation results without creating a second task store.",toolName:"pm_test",uri:"ui://pm/operations.html"}].map(e=>({...e,toolMeta:{resourceUri:e.uri,visibility:["model","app"]},resourceMeta:jg})));function rx(e){return kr.find(t=>t.uri===e)}function ox(e){let t=new Map(kr.map(r=>[r.toolName,r]));return e.map(r=>{let o=t.get(r.name);return o?{...r,_meta:{...r._meta,ui:o.toolMeta}}:{...r}})}function Mr(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function nx(e){let t=Mr(e.name),r=Mr(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:Ee}),n=JSON.stringify(Ee);return`<!doctype html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
@@ -22,11 +22,11 @@ import{A as FM,B as GM,C as UM,D as jM,E as BM,a as Vn,b as qS,c as zS,d as VS,e
|
|
|
22
22
|
(()=>{"use strict";const MAX=24000,status=document.querySelector("#status"),result=document.querySelector("#result"),input=document.querySelector("#input"),pending=new Map();let nextId=1;const render=(node,value)=>{let text;try{text=typeof value==="string"?value:JSON.stringify(value,null,2)}catch{text="Result could not be serialized."}if(text.length>MAX)text=text.slice(0,MAX)+"\\n\\n[View truncated at "+MAX+" characters; use the authoritative pm tool with a cursor or narrower projection.]";node.textContent=text};const send=(message)=>window.parent.postMessage(message,"*");window.addEventListener("message",event=>{if(event.source!==window.parent||!event.data||event.data.jsonrpc!=="2.0")return;const message=event.data;if(message.id!==undefined&&pending.has(message.id)){pending.get(message.id)(message);pending.delete(message.id);return}if(message.method==="ui/notifications/tool-input"||message.method==="ui/notifications/tool-input-partial"){render(input,message.params?.arguments??message.params);status.textContent="Input received"}else if(message.method==="ui/notifications/tool-result"){render(result,message.params);status.textContent="Current tool result"}else if(message.method==="ui/notifications/tool-cancelled"){status.textContent="Tool call cancelled";status.classList.add("notice")}else if(message.method==="ui/notifications/host-context-changed"&&message.params?.theme){document.documentElement.style.colorScheme=message.params.theme}});const request=(method,params)=>new Promise(resolve=>{const id=nextId++;pending.set(id,resolve);send({jsonrpc:"2.0",id,method,params})});document.querySelector("#copy").addEventListener("click",async()=>{const text=result.textContent+"\\n\\n"+input.textContent;try{await navigator.clipboard.writeText(text);status.textContent="Visible evidence copied"}catch{status.textContent="Clipboard permission unavailable";status.classList.add("notice")}});request("ui/initialize",{appInfo:${o},appCapabilities:{},protocolVersion:${n}}).then(message=>{if(message.error){status.textContent="Host rejected MCP App initialization";status.classList.add("notice");return}send({jsonrpc:"2.0",method:"ui/notifications/initialized"});status.textContent="Connected \u2014 awaiting authoritative result"})})();
|
|
23
23
|
</script>
|
|
24
24
|
</body>
|
|
25
|
-
</html>`}import{createHash as
|
|
26
|
-
`)).digest("hex");o.set(a.name,{uri:`skill://${a.name}/SKILL.md`,frontmatter:p,resources:f,_meta:{contractVersion:1,extensionRevision:
|
|
27
|
-
`)).digest("hex").slice(0,16)}#r(t,r){if(!t)return 0;try{let o=JSON.parse(Buffer.from(t,"base64url").toString("utf8"));return(typeof o!="object"||o===null||!("fingerprint"in o)||o.fingerprint!==this.#t||!("scope"in o)||o.scope!==r||!("offset"in o)||!Number.isInteger(o.offset)||Number(o.offset)<0)&&T("Skill cursor is invalid or stale."),Number(o.offset)}catch(o){if(o instanceof u)throw o;return T("Skill cursor is invalid or stale.")}}#o(t,r){return Buffer.from(JSON.stringify({fingerprint:this.#t,offset:t,scope:r})).toString("base64url")}static async load(t){let r=await Lr(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 Lr(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;xr.has(r)||T(`Skill list limit must be an integer from 1 to ${P.maxPageSize}.`);let o=this.#r(t.cursor,"skills/list"),n=[...this.#e.values()].sort((d,c)=>d.uri.localeCompare(c.uri)),i=n.slice(o,o+r),s=o+i.length,a=s<n.length;return{skills:i.map(Dr),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"}),Dr(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(c=>c.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"},d=Nr(n,i);return d!=="application/octet-stream"?{contents:[{uri:t,mimeType:d,text:i.toString("utf8"),_meta:a}]}:{contents:[{uri:t,mimeType:d,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]}`,d=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,...Eo]=B.split("/"),wo=`${a}/${s}${R}`,Ao=n.files.get(`${s}${R}`);d.set(R,{uri:wo,name:R,mimeType:Eo.length>0?"inode/directory":Nr(R,Ao)})}i.length>0&&d.size===0&&T(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let c=r.limit??P.maxPageSize;xr.has(c)||T(`Skill directory limit must be an integer from 1 to ${P.maxPageSize}.`);let l=this.#r(r.cursor,t),p=[...d.values()].sort((C,S)=>C.uri.localeCompare(S.uri)),f=p.slice(l,l+c),g=l+f.length,h=g<p.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]="2b24276b-948b-50bd-bfd9-f429cd74be70")}catch{}})();var Ur="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!==Ur)throw new Error(`Unsupported workspace recipe schema: ${e.schema}`);let t=Ct(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 jr(e,t){let r=Se(e);return Tt(r,t)}async function Wg(e,t){return jr(e,async()=>{let r=[];for(let[o,n]of e.operations.entries())r.push(await t(n,o));return r})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c234be1c-35b7-5388-8a70-a012e9a34389")}catch{}})();var Br="pm.agent-observation/v1",qr="pm.agent-verdict/v1",zr="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 Xg(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 Yg(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 Jg(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 Zg(e){if(e.schema!==Br)throw new Error(`observation.schema must be ${Br}.`);return k(e.id,"observation.id"),O(e.version,"observation.version"),Xg(e.reads),Yg(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")),Jg(e.tiers),re(structuredClone(e))}function _x(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 Qg(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"),d=Math.ceil(a/4);if(d<=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:d,calibration_basis:"emitted_bytes"}}}return{status:"refused",reason:"no_declared_tier_fits_budget",receipt:{contract_id:e.id,contract_version:e.version,served_tier:null,degraded:e.tiers.length>1,attempted_tiers:o,emitted_bytes:null,estimated_tokens:null,calibration_basis:"emitted_bytes"}}}function $(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 Vr(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 ey(e){return`/${$(e,"verdict predicate path").map(t=>t.replaceAll("~","~0").replaceAll("/","~1")).join("/")}`}function ty(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 ry(e){if(e.schema!==qr)throw new Error(`verdict.schema must be ${qr}.`);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}.`);ty(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 oy(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),d=Vr(t.state,a.path),c=a.kind==="field_present"?d!==void 0:a.kind==="field_absent"?d===void 0:I(d)===I(a.expected);return{id:s,outcome:c?"satisfied":"violated",evidence_pointer:`${t.snapshot_id}#${ey(a.path)}`,evidence_digest:gt(I(d))}}),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 hx(e){if(e.schema!==zr)throw new Error(`episode.schema must be ${zr}.`);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 Zg(e.observation),ry(e.verdict),Se(e.recipe),re(structuredClone(e))}function ny(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 iy(e,t){let r={};for(let o of t)ny(r,o,Vr(e,o));return r}async function gx(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"}},d=await L(a,()=>t.reset(e.recipe));r.push({sequence:1,kind:"reset",state_id:d.state_id});let c=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 p=await t.readRecordedState(),f=await Qg(e.observation,async g=>iy(p.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??p.snapshot_id}),f},l=async(p=!1)=>{if(i&&!p)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let f=await t.readRecordedState(),g=oy(e.verdict,f);return r.push({sequence:r.length+1,kind:"verdict",state_id:f.snapshot_id}),g};return{observe:()=>L(a,c),step:async p=>{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(p));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(p=>(r.push({sequence:r.length+1,kind:"close",state_id:p.snapshot_id}),{verdict:p,trajectory:re(structuredClone(r))})).catch(p=>{throw i=!1,p}).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]="14472bc2-ebca-5b9c-9462-bd8694b630a0")}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 Kr(e){if(!(typeof e!="object"||e===null||Object.isFrozen(e))){for(let t of Object.values(e))Kr(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 Kr(t),t}var Ee=[{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:Ee,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:Ee,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:Ee,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:Ee,author_cardinality:24,component_count:5,include_cycles:!1,custom_types:["Archive"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["archive_source"]})});function sy(){return Object.keys(W).sort().map(e=>W[e])}function ay(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 Hr=new WeakMap;function Wr(e,t){if(e===0)return[];let r=Hr.get(t);r===void 0&&(r=t.edge_kind_mix.flatMap(n=>Array.from({length:n.weight},()=>n.kind)),Hr.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 dy(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,d=1;for(let S=0;S<e.hierarchy_depth;S+=1)a=Math.min(Number.MAX_SAFE_INTEGER,a+d),d=Math.min(Number.MAX_SAFE_INTEGER,d*e.hierarchy_fanout);let c=s%a,l=s-c,p=c===0?void 0:i+(l+Math.floor((c-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")}`,...p===void 0?{}:{parent:`pm-s${p.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:Wr(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,Wr(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 d=Math.floor(this.itemCount/100),c=this.itemCount%100,l=d*a+Math.max(0,a+c-100),p=d*a+Math.min(a,c),f=this.annotations[s];(f<l||f>p)&&o.push(`${s}:${f}!in[${l},${p}]`)}let n=new Set([...Object.keys(this.edgeKinds),...Object.keys(this.expectedEdgeKinds)]);for(let s of[...n].sort()){let a=this.edgeKinds[s]??0,d=this.expectedEdgeKinds[s]??0;a!==d&&o.push(`edge_kind:${s}:${a}!=${d}`)}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 Xr(e){return new st(e)}function cy(e,t){let r=Xr(e);for(let o of t)r.add(o);return r.finish()}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="48d03e9b-14a4-545c-8e5d-5f5f2092a113")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6a6b2905-b6b7-5b46-b87d-8b8287e37745")}catch{}})();async function ly(){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 py(){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]="c1cb8d82-20a6-5460-a0ff-f55312911218")}catch{}})();var Yr=["lines","branches","functions","statements"];function uy(e,t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError(`Coverage entry for ${e} must be an object.`)}function my(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 fy(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)){uy(r,o);for(let n of Yr){let i=my(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]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var _y=["captured_redacted","captured_verbatim"],hy=[{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 gy(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||!_y.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 hy)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 yy(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")&&St(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 by(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?gy(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 yy(e,r)}function Nx(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 d=a,c=v(d.id)?d.id:void 0;if(c!==void 0&&n.has(c)){o.push({boundary_id:c,kind:"duplicate_boundary",detail:`Boundary ${c} is inventoried more than once.`});continue}c!==void 0&&n.add(c);let l=by(d,t,r.getTime());i+=l.captured,s+=l.waived,o.push(...l.findings)}return o.sort((a,d)=>a.boundary_id!==d.boundary_id?a.boundary_id.localeCompare(d.boundary_id):a.kind.localeCompare(d.kind)),{ok:o.length===0,boundary_count:e.boundaries.length,captured_count: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]="aacf5738-098d-50f9-b619-19e472b577ea")}catch{}})();var Jr=300*1e3,Cy=3;function Gx(e){return(e?.trim()||"development").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\./,"_")}function Ux(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(c=>c!==r).flatMap(c=>{try{return[{name:c,mtimeMs:X.statSync(at.join(e,c)).mtimeMs}]}catch(l){if(l instanceof Error&&"code"in l&&pe(l))return[];throw l}}).sort((c,l)=>l.mtimeMs-c.mtimeMs||c.name.localeCompare(l.name)),s=i.filter(c=>n.getTime()-c.mtimeMs<Jr),a=Math.max(0,Cy-1-s.length),d=i.filter(c=>n.getTime()-c.mtimeMs>=Jr).slice(a).map(c=>c.name).sort((c,l)=>c.localeCompare(l));for(let c of d)X.rmSync(at.join(e,c),{recursive:!0,force:!0,maxRetries:3,retryDelay:50});return{retained:r,removed:d}}import{createHash as Ty}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ff60bc5b-bd85-5b3c-9a55-21e7e72477ac")}catch{}})();var dt=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:dt,fingerprint:Ty("sha256").update(I({nodes:n,edges:i,kinds:s})).digest("hex"),created_at:new Date(o).toISOString(),nodes:n,edges:i,kinds:s})}function Sy(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ie(e){if(!Sy(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==dt)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 we(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 Ey(e,t={}){let r=e.map(ie),o=new Map;for(let s of r)for(let a of s.snapshot.kinds){let d=o.get(a.kind);if(d&&I(d)!==I(a))throw new TypeError(`Conflicting federated relationship kind: ${a.kind}`);o.set(a.kind,a)}let n=new 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]="e47f9bb8-f98e-5159-9116-29c3e6fedfc3")}catch{}})();function Zr(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${t} must be a positive integer`);return e}function wy(e){let t=Zr(e.nodeCount,"nodeCount"),r=Zr(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 Qr(e,t={}){let r=t.workspace?.trim()||"pm-graph-conformance",o=_t(),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 we(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 we(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 Ay(e){return Qr(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]="f5567aa1-0268-574d-907b-38d6249538ce")}catch{}})();var ct=2,vy=["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 eo(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 Oy(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 Ry(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=yt(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=bt(t.slice(s+1));l!==void 0&&(a=Me(`history ${l}`))}let d=kt(a);if(!ze(r)||r!==0&&!d?.exit_codes.some(l=>l===r))throw new TypeError(`${e} successful output must use exit code 0 or a command-declared successful effect exit`);let c=Mt(a).kind;if(o!==c)throw new TypeError(`${e} expected ${o}, but ${a} declares ${c}`)}function Iy(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=eo(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"&&!Pt.includes(a))throw new TypeError(`${o}.expected_output_kind is unsupported`);let d=a,c=e.expected_accounting_mode;if(!vy.includes(c))throw new TypeError(`${o}.expected_accounting_mode is unsupported`);let l=c;if(l==="independent_transport"&&d!=="refusal")throw new TypeError(`${o} independent_transport accounting is supported only for refusal steps`);let p=eo(e.required_fields,`${o}.required_fields`);if(p.some(S=>S.split(".").some(B=>B.length===0)))throw new TypeError(`${o}.required_fields must contain dot-separated own-property paths`);let f=Oy(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 Ry(o,i,s,d,g,h),{id:n,args:i,expected_exit_code:s,expected_output_kind:d,expected_accounting_mode:l,required_fields:p,...f?{expected_field_values:f}:{},...g?{expected_error_code:g}:{},...h?{expected_refusal_surface:h}:{},...C?{recovery_for:C}:{}}}function Py(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)=>Iy(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 hN(e){if(!Ae(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==ct)throw new TypeError(`agent-task transcript corpus version must be ${String(ct)}`);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)=>Py(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:ct,tasks:t}}import{createHash as to}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7163a078-d8be-5bca-813f-c941fcb8e406")}catch{}})();function ro(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${t} must be non-empty`);return e.trim()}function CN(e,t){let r=ro(t.migrationId,"migrationId"),o=ro(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(),d=s.graph.edges().map(f=>{let g=to("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`})}),c=to("sha256").update(JSON.stringify({migrationId:r,nodes:a,events:d})).digest("hex"),l=new Set([...t.existingEventIds??[]].filter(f=>typeof f=="string").map(f=>f.trim()).filter(Boolean)),p=d.filter(f=>!l.has(f.eventId));return Object.freeze({migration_id:r,fingerprint:c,nodes:a,events:Object.freeze(p),edge_count:d.length,skipped_existing_count:d.length-p.length,duplicate_dependency_rows:s.duplicateRows.length,dangling_reference_count:s.dangling.active.length+s.dangling.legacy_terminal.length})}import*as oo from"node:module";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7a1d7194-6ff1-5365-ab64-80b47b0176d7")}catch{}})();var ae=["suggested_retry","candidate_command","example","next_step","migration_hint","restore_with"],pt={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"}},SN=Object.freeze(Object.keys(pt));function no(e){if(Object.hasOwn(pt,e))return pt[e]}var My=new Set([..."=([{,:;!?&|+-*%^~<>","=>"]);function Z(e,t){return e<t?-1:e>t?1:0}function ky(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 xy(e){return e===void 0||e.kind==="punctuator"&&My.has(e.value)||e.kind==="identifier"&&["return","case","throw","else","yield"].includes(e.value)}function Ny(e,t){if(/\s/u.test(e[t]))return t+1;if(e.startsWith("//",t)){let r=e.indexOf(`
|
|
28
|
-
`,t+2);return r===-1?e.length:r+1}if(e.startsWith("/*",t))return e.indexOf("*/",t+2)+2}function
|
|
29
|
-
`&&t.push(r+1);return t}function
|
|
30
|
-
`)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d252409d-e33e-5c9e-9671-789f0ee87312")}catch{}})();function Jy(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 Zy(e){return[e.exit_code!==le.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 ${le.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."},...Jy(e)]}function DN(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 Zy(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]="39b4e1fe-a34a-5ffc-9447-eaf8c46863c7")}catch{}})();var ao="not-a-declared-action";function Qy(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 de(e){return e.replaceAll(/[^a-z0-9]+/gu,"-").replaceAll(/^-|-$/gu,"")}function VN(e=Ge.filter(t=>wt.some(r=>r.command===t.command&&r.disposition!=="package_owned"))){let t=new Set(e.filter(({command:r})=>!r.includes(" ")).map(({command:r})=>de(r)));return e.flatMap(r=>r.slots.flatMap((o,n)=>{if(!o.required)return[];let i=r.command.split(" "),s=de(r.command),a=i.length>1&&t.has(s)?i.map(de).join("--"):s,d=Q(r.command).flatMap(l=>l.required?[l.flag,...l.value_name?["example"]:[]]:[]),c=Fe.some(l=>l.command===r.command);return[{probe_id:`required-argument-${a}-${de(o.name)}`,command:r.command,refusal_args:[...i,...r.slots.slice(0,n).map(l=>Qy(r.command,l)),...d],recovery_args:[...i,"--help"],error_code:c&&!r.command.startsWith("assurance ")?"invalid_argument_value":/^extension (?:activate|adopt|deactivate|uninstall)$/u.test(r.command)?"missing_lifecycle_target":"missing_required_argument",missing_argument:o.name,missing_argument_index:n}]})).sort((r,o)=>r.probe_id.localeCompare(o.probe_id))}function eb(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 xt;default:throw new Error(`Required positional action family ${e} has no authoritative value domain.`)}}function HN(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-${de(t)}`,command:t,refusal_args:[...r,ao],recovery_args:[...r,"--help"],error_code:"unknown_subcommand",rejected_value:ao,allowed_values:[...eb(t)].sort()}}).sort((t,r)=>t.probe_id.localeCompare(r.probe_id))}function tb(e,t){let r=[...t].sort();return e.length===t.length&&[...e].sort().every((o,n)=>o===r[n])}function rb(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&&!tb(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 KN(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=>rb(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]="d3795bc4-fbe5-5ca4-bc90-b72a2d469dc7")}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 XN(){return mt.map(e=>({...e}))}function ob(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 YN(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=ob(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]="fcb59bee-0fdb-5b17-8568-775a15d53466")}catch{}})();var ve,nb=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 ib(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=nb[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 e=ee.filter(({command:n})=>Ue(n)).flatMap(({command:n,family:i})=>It(n,Q(n)).map(s=>({command:n,family:i,concept:ib(n,s.flag),flag:s.flag,aliases:Object.freeze([...s.aliases??[]]),value_kind:s.repeatable?"list":s.flag==="--limit"?"number":s.value_type}))),t=new Set(e.flatMap(n=>n.aliases.map(i=>`${n.command}:${i}`))),r=e.filter(n=>!t.has(`${n.command}:${n.flag}`)),o=new Map;for(let n of r){let i=o.get(n.concept)??new Set;i.add(n.value_kind),o.set(n.concept,i)}return ve=Object.freeze(r.map(n=>Object.freeze({...n,concept:o.get(n.concept)?.size===1?n.concept:`${n.concept}@${n.command}`}))),ve}function rL(){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 co=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:100,copy:24,focus:22,list:86,"list-all":86,"list-draft":84,"list-open":84,"list-in-progress":84,"list-blocked":84,"list-closed":84,"list-canceled":84,aggregate:40,context:45,ctx:45,get:30,graph:34,search:78,duplicates:25,eval:25,next:38,history:35,events:33,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:27,schema:43,profile:22,activity:35,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:31,notes:35,learnings:31,files:39,docs:30,deps:32,plan:109,test:53,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:24,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),lo=Object.freeze({...co,...Object.fromEntries(Pe.flatMap(({alias:e,canonical:t})=>{let r=co[e];return r===void 0?[]:[[t,r]]}))});function po(){let e=new Map(Object.keys(lo).map(t=>[t,0]));for(let{command:t}of Oe())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(lo).map(([t,r])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:r})))}function sb(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 db(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 d of n.accepted_spellings)a.has(d)||r.push({code:"removed_compatibility_spelling",command:n.command,detail:`${d} no longer resolves to ${n.canonical_flag}.`})}}function oL(e=Oe(),t=po(),r=[]){let o=[],n=new Map,i=new Map,s=new Map,a=new Map;for(let d of e){let c=`${d.command}:${d.flag}`;n.has(c)?o.push({code:"duplicate_canonical_flag",command:d.command,detail:`${d.flag} has more than one canonical row.`}):n.set(c,d),a.set(d.command,(a.get(d.command)??0)+1);let l=i.get(d.concept);l!==void 0&&l!==d.value_kind?o.push({code:"inconsistent_concept_kind",command:d.command,detail:`${d.concept} uses both ${l} and ${d.value_kind}.`}):i.set(d.concept,d.value_kind);let p=s.get(d.concept);p!==void 0&&p!==d.flag?o.push({code:"semantic_spelling_collision",command:d.command,detail:`${d.concept} is canonicalized by both ${p} and ${d.flag}.`}):s.set(d.concept,d.flag)}return sb(e,n,o),ab(a,t,o),db(e,r,o),o.sort((d,c)=>d.command.localeCompare(c.command)||d.code.localeCompare(c.code)||d.detail.localeCompare(c.detail)),{ok:o.length===0,entry_count:e.length,budget_count:t.length,concept_count:new Set(e.map(({concept:d})=>d)).size,baseline_entry_count:r.length,findings:o}}function nL(){let e=Oe(),t=po(),r=new Map(t.map(({command:o})=>[o,"unknown"]));for(let{command:o,family:n}of e)r.set(o,n);return["# Generated flag lexicon budgets","","This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not consume canonical budget.","","| Command | Capability family | Canonical flags | Maximum |","| --- | --- | ---: | ---: |",...t.map(({command:o,current:n,maximum:i})=>{let s=r.get(o);return`| \`${o}\` | ${s} | ${n} | ${i} |`}),""].join(`
|
|
31
|
-
`)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4e72da21-425b-568d-9174-bc5021e1d4f4")}catch{}})();function sL(e){return e}function aL(e){return e}function dL(e){return e}function cL(e){return e}function lL(e){return e}function pL(e){return e}function uL(e){return e}function mL(e){return e}function fL(e){return e}function _L(e){return e}function hL(e){return e}function gL(e){return e}function yL(e){return e}function bL(e){return{handled:!0,result:e}}function CL(){return{handled:!1}}function TL(e){return e}function SL(e){return e}function EL(e){return e}function wL(e){return e}function AL(e){return e}function vL(e){return e}function OL(e){return e}function RL(e){return e}function IL(e){return e}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="68ca9ab1-91e0-5020-859e-fc1f1f6dcc56")}catch{}})();function cb(e={},t={}){return new me(t).extension(void 0,{...e,migrate:!0})}function lb(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 mo,createHmac as pb,randomBytes as ub,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]="837ee381-0838-55d3-bcdf-7352fb76661d")}catch{}})();var AD="dev.unbrained.pm/progressive-tool-discovery",vD=Object.freeze({version:1,discoveryTool:"pm_discover",canonicalResult:"structuredContent.result",compatibilityText:"pointer"}),fb=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}),_b=Object.freeze(["profile_changed","tool_contract_changed","workspace_extension_changed","authorization_changed","ranking_signal_changed","cursor_integrity_key_rotated"]),fo={core:0,standard:1,full:2,internal:3},_o=Object.freeze(["core","standard","full"]),hb=new Set(["core","standard","full","custom"]),ho=new Set(ee.map(({family:e})=>e)),gb=ub(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 go(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 yo(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 bo(e){if(e!==void 0&&typeof e!="boolean")throw new b("pm tool discovery includeSchema must be a boolean.",64);return e===!0}function Co(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new b("pm tool discovery options must be an object.",64)}function yb(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 OD(e){if(Co(e),e.family!==void 0&&(typeof e.family!="string"||!ho.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"||!_o.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:go(e.limit)}:{},...e.cursor!==void 0?{cursor:Ie(e.cursor,"cursor")}:{},...e.includeSchema!==void 0?{includeSchema:bo(e.includeSchema)}:{},...e.outputBudget!==void 0?{outputBudget:yo(e.outputBudget)}:{}}}function bb(e){return e===void 0||!Number.isFinite(e)?0:Math.min(1,Math.max(0,e))}function ce(e){return[...new Set(e.toLowerCase().match(/[a-z0-9]+/gu)??[])].sort()}function Cb(e,t){let r=ce(e);if(r.length===0)return 0;let o=new Set(ce(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 Tb(e,t){let r=ce(e);if(r.length===0)return 0;let o=t.toLowerCase(),n=ce(t),i=r.filter(a=>n.some(d=>d.startsWith(a)||a.startsWith(d))).length,s=o.includes(e.toLowerCase())?.2:0;return Math.min(1,i/r.length+s)}function uo(e){return mo("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function To(e,t,r){return pb("sha256",r).update(JSON.stringify({version:1,fingerprint:e,offset:t})).digest("base64url")}function Sb(e,t,r){let o={version:1,offset:t,signature:To(e,t,r)};return Buffer.from(JSON.stringify(o),"utf8").toString("base64url")}function Eb(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(To(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 ft(e,t,r){return{value:bb(e),weight:t,available:r!=="unavailable",source:r}}function Re(e,t,r){return ft(e??t,r,e===void 0?"computed":"host")}function wb(e,t,r){let o=Object.hasOwn(ue,e.name)?ue[e.name]:"help",n=Be(o),i=`${e.name} ${e.description} ${o} ${n}`,s=Cb(t,i),a=new Set(ce(t)),d={lexical:ft(s,j.lexical,"computed"),semantic:Re(e.signals?.semantic,Tb(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,fb.includes(e.name)?1:0,j.usage)},c=Object.values(d).reduce((l,p)=>l+p.value*p.weight,0);return{name:e.name,description:e.description,command:o,tier:qe(o),family:n,score:Number(c.toFixed(6)),signals:d,...r?{input_schema:structuredClone(e.inputSchema)}:{}}}function Ab(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"||!_o.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"||!ho.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"||!hb.has(e.profile)))throw new b("pm tool discovery profile must be core, standard, full, or custom.",64)}function vb(e){let t=Ie(e.query===void 0?"":e.query,"query").trim().replace(/\s+/gu," ");Ie(e.cursor===void 0?"":e.cursor,"cursor");let r=go(e.limit===void 0?10:e.limit),o=yo(e.outputBudget===void 0?1200:e.outputBudget);return Ab(e),{query:t,includeSchema:bo(e.includeSchema),limit:r,budget:o,maximumTier:fo[e.tier??"full"],profile:e.profile===void 0?"core":e.profile}}function So(e,t,r){let o=r??e.tools.reduce((s,a,d)=>s+(d===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"),d=Math.ceil((a+o)/4);if(d===i)break;i=d}return i}function Ob(e,t,r){return e.filter(o=>o.authorized!==!1).map(o=>wb(o,r.query,r.includeSchema)).filter(o=>o.tier!=="internal"&&fo[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 Rb(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(So(r(i+1),t,a)>t)break;o.push(s),n=a}return o}function RD(e,t={}){yb(e),Co(t);let r=vb(t),o=t.cursorIntegrityKey??gb,n=Ob(e,t,r),i=uo({query:r.query,family:t.family??null,tier:t.tier??"full",includeSchema:r.includeSchema,profile:r.profile,ranked:n}),s=Eb(t.cursor,i,n.length,o),a=n.slice(s,s+r.limit),d=[];r.includeSchema||d.push({name:"input_schema",reason:"compact_projection",restore_with:"Set includeSchema=true."}),s+r.limit<n.length&&d.push({name:"tools",reason:"limit",restore_with:"Continue with next_cursor or increase limit."});let c={result_type:"pm_tool_discovery",contract_version:1,query:r.query,profile:r.profile,total:n.length,ranking_policy:{version:1,formula:"weighted_sum_then_name",weights:j},cache:{key:uo({fingerprint:i,cursorIntegrityKey:mo("sha256").update(o).digest("hex"),limit:r.limit,offset:s,budget:r.budget}),ttl_ms:3e4,scope:"private",invalidates_on:_b}},l=(h,C=h.length)=>{let S=s+C,B=S<n.length,R=[...d];return C<a.length&&R.push({name:"tools",reason:"token_budget",restore_with:"Continue with next_cursor or increase outputBudget."}),{...c,tools:[...h],returned:C,has_more:B,...B?{next_cursor:Sb(i,S,o)}:{},omission_receipt:{has_omissions:R.length>0,omitted:R}}},p=h=>{let C=l(h),S=So(C,r.budget);return{...C,token_cost:{estimated_tokens:S,budget:r.budget,within_budget:r.budget==="unbounded"||S<=r.budget}}},f=Rb(a,r.budget,h=>l([],h)),g=p(f);if(a.length>0&&f.length===0){let h=p([a[0]]).token_cost.estimated_tokens;throw new b(`pm tool discovery outputBudget is too small to return a tool; increase it to at least ${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]="d007edcb-46f0-5546-b804-27d86afe23e7")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3819479a-4ad7-5a06-8f76-e703037b2bf3")}catch{}})();export{jv as ACTIONABILITY_ORDERING_KINDS,Xa as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,ya as ACTIVITY_FLAG_CONTRACTS,pi as AGENT_PROVENANCE_DIMENSIONS,rs as AGGREGATE_FLAG_CONTRACTS,Bs as APPEND_FLAG_CONTRACTS,FI as ASSURANCE_ACTIONS,GI as ASSURANCE_DECLARATION_KINDS,VO as ASSURANCE_DOCUMENT_VERSION,da as ASSURANCE_FLAG_CONTRACTS,HO as ASSURANCE_GATE_TRIGGERS,KO as ASSURANCE_MEASUREMENT_SOURCE_KINDS,zR as ASSURANCE_PRESET_IDS,jO as AssuranceEvaluationRefusalError,UO as AssuranceMutationRefusalError,BO as AssuranceSourceResolutionError,Jn as BASELINE_ITEM_FORMAT_VERSION,_y as BOUNDARY_FIXTURE_CAPTURE_SOURCES,pO as BRIEF_LIST_FIELDS,mi as BUILTIN_AGENT_PROVENANCE_ADAPTERS,W as BUILTIN_CORPUS_SHAPES,ui as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,Fo as BUILTIN_ITEM_TYPE_VALUES,Bt as BUILTIN_PROFILES,Ib as BUILTIN_RELATIONSHIP_KINDS,Ha as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,ga as CALENDAR_FLAG_CONTRACTS,qs as CLAIM_FLAG_CONTRACTS,jd as CLOSE_ACTION_OPTION_KEYS,Us as CLOSE_FLAG_CONTRACTS,js as CLOSE_MANY_FLAG_CONTRACTS,Xs as CLOSE_TASK_FLAG_CONTRACTS,os as COMMENTS_FLAG_CONTRACTS,Qb as COMMON_MUTATION_COMMAND_OPTION_KEYS,Pa as COMPLETION_FLAG_CONTRACTS,zo as CONFIDENCE_TEXT_VALUES,ys as CONFIG_FLAG_CONTRACTS,Ka as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,SP as CONTEXT_EVALUATION_METRIC_NAMES,Ca as CONTEXT_FLAG_CONTRACTS,Gt as CONTEXT_OUTPUT_VALUES,OP as CONTEXT_PACKING_PROFILES,fP as CONTEXT_RECENCY_EPOCH,yP as CONTEXT_RELEVANCE_SERVICE,hP as CONTEXT_RELEVANCE_SIGNAL_NAMES,PP as CONTEXT_SIGNAL_SET_VERSION,IP as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,MP as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,cS as CONTEXT_USAGE_LIMITS,Ia as CONTRACTS_FLAG_CONTRACTS,ma as COPY_FLAG_CONTRACTS,Xd as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Jd as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Yd as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,Gb as CREATE_DIRECT_CLOSE_REASON_DEFAULT,ca as CREATE_FLAG_CONTRACTS,nE as CURRENT_HISTORY_HASH_ALGORITHM,SE as CURRENT_HISTORY_ITEM_HASH_VERSION,wE as CURRENT_HISTORY_RECORD_HASH_VERSION,Zn as CURRENT_ITEM_FORMAT_VERSION,LP as ContextSignalStore,lS as ContextUsageValidationError,aP as DEFAULT_AUTHOR_IDENTITY_VOCABULARY,ZP as DEFAULT_CHILD_SAMPLE_LIMIT,lO as DEFAULT_COMPACT_LIST_FIELDS,gw as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,Rm as DEFAULT_EVAL_QUERIES_RELATIVE_PATH,QI as DEFAULT_TERMINAL_TRANSITION_POLICY,GP as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,xv as DEFECT_ESCAPE_CLASSES,Nv as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Vs as DELETE_FLAG_CONTRACTS,jo as DEPENDENCY_KIND_VALUES,Ea as DEPS_FLAG_CONTRACTS,as as DOCS_FLAG_CONTRACTS,ia as DUPLICATES_FLAG_CONTRACTS,hI as DURABLE_MERGE_RECEIPT_INTRODUCED_AT,Aa as EVAL_FLAG_CONTRACTS,Tm as EVAL_METRIC_NAMES,Am as EVAL_QUERY_SET_CONTRACT,vm as EVAL_QUERY_SET_EXAMPLE,wm as EVAL_QUERY_SET_SCHEMA_ID,ba as EVENTS_FLAG_CONTRACTS,Js as EVENT_FLAG_CONTRACTS,ko as EXECUTABLE_COMMAND_ALIASES,le as EXIT_CODE,Is as EXTENSION_ACTIVATE_FLAG_CONTRACTS,Rs as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,Ds as EXTENSION_ADOPT_FLAG_CONTRACTS,IM as EXTENSION_CAPABILITIES,$b as EXTENSION_CAPABILITY_CONTRACT,Lb as EXTENSION_CAPABILITY_CONTRACT_VERSION,Db as EXTENSION_CAPABILITY_LEGACY_ALIASES,Qo as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,Ls as EXTENSION_CATALOG_FLAG_CONTRACTS,Ps as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,Os as EXTENSION_DESCRIBE_FLAG_CONTRACTS,Ns as EXTENSION_DOCTOR_FLAG_CONTRACTS,vs as EXTENSION_EXPLORE_FLAG_CONTRACTS,bs as EXTENSION_FLAG_CONTRACTS,Ts as EXTENSION_INIT_FLAG_CONTRACTS,ws as EXTENSION_INSTALL_FLAG_CONTRACTS,ks as EXTENSION_MANAGE_FLAG_CONTRACTS,Ms as EXTENSION_MIGRATE_FLAG_CONTRACTS,PM as EXTENSION_POLICY_MODES,MM as EXTENSION_POLICY_SURFACES,xs as EXTENSION_RELOAD_FLAG_CONTRACTS,xM as EXTENSION_SANDBOX_PROFILES,Cs as EXTENSION_SCOPE_FLAG_CONTRACTS,kM as EXTENSION_TRUST_MODES,As as EXTENSION_UNINSTALL_FLAG_CONTRACTS,nO as EXTERNAL_DEPENDENCY_RESOLUTION_STATUSES,rO as EXTERNAL_DEPENDENCY_SOURCE_KIND,oO as EXTERNAL_DEPENDENCY_SOURCE_KIND_ALIAS,ss as FILES_FLAG_CONTRACTS,fa as FOCUS_FLAG_CONTRACTS,oa as GC_FLAG_CONTRACTS,fO as GET_DEPTH_VALUES,Ta as GET_FLAG_CONTRACTS,es as GLOBAL_FLAG_CONTRACTS,fp as GRAPH_DURABLE_CACHE_MIN_ITEMS,mp as GRAPH_DURABLE_CACHE_VERSION,wa as GRAPH_FLAG_CONTRACTS,Gw as GRAPH_QUERY_DEFAULTS,Le as GRAPH_SUBCOMMAND_VALUES,Sa as GUIDE_FLAG_CONTRACTS,sa as HEALTH_FLAG_CONTRACTS,us as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,$R as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,zI as HISTORY_COMPACT_BULK_DEFAULT_MIN_ENTRIES,ms as HISTORY_COMPACT_FLAG_CONTRACTS,Oi as HISTORY_EVENT_CLASSIFICATION_VERSION,ds as HISTORY_FLAG_CONTRACTS,rE as HISTORY_HASH_ALGORITHMS,fR as HISTORY_ITEM_HASH_VERSION_3_INTRODUCED_IN,ls as HISTORY_REDACT_FLAG_CONTRACTS,ps as HISTORY_REPAIR_FLAG_CONTRACTS,zc as INIT_AGENT_GUIDANCE_MODE_VALUES,gs as INIT_FLAG_CONTRACTS,$s as INSTALL_FLAG_CONTRACTS,qo as ISSUE_SEVERITY_VALUES,pa as ITEM_COMPLETE_FLAG_CONTRACTS,aI as ITEM_LATEST_TIMESTAMP_FIELDS,Fb as ITEM_METADATA_KEY_ORDER,la as ITEM_MUTATE_FLAG_CONTRACTS,ua as ITEM_REOPEN_FLAG_CONTRACTS,eI as ITEM_SCALAR_MISSING_VALUE,Go as ITEM_TYPE_VALUES,sI as ITEM_UNION_COLLECTION_FIELDS,NP as JsonFileContextSignalStoreAdapter,is as LEARNINGS_FLAG_CONTRACTS,oE as LEGACY_HISTORY_HASH_ALGORITHM,Zp as LINKED_TEST_ENV_NAME_PATTERN,Qp as LINKED_TEST_PM_CONTEXT_MODE_VALUES,Jp as LINKED_TEST_PROTECTED_ENV_KEYS,eu as LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,za as LIST_COMMANDER_STRING_OPTION_CONTRACTS,uO as LIST_COMMAND_DEFAULT_PROJECTIONS,LM as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,ts as LIST_FILTER_FLAG_CONTRACTS,yO as LIST_SORT_FIELDS,bO as LIST_SORT_ORDER_VALUES,Ri as MAINTENANCE_HISTORY_OPERATIONS,JP as MAX_CHILD_PROJECTION_ITEMS,vT as MAX_WORKFLOW_POLICIES,OT as MAX_WORKFLOW_POLICY_TERMS,Ys as MEET_FLAG_CONTRACTS,yM as MERGE_DRIVER_ARTIFACT_VALUES,cs as MERGE_FLAG_CONTRACTS,De as MERGE_SUBCOMMAND_VALUES,TM as MUTATION_EVENT_WIRE_BUDGET,ne as MemoryRelationshipGraphAdapter,Wa as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,Oa as NEXT_FLAG_CONTRACTS,Vu as NEXT_OUTPUT_VALUES,ns as NOTES_FLAG_CONTRACTS,Ss as PACKAGE_FLAG_CONTRACTS,Es as PACKAGE_INIT_FLAG_CONTRACTS,Ws as PAUSE_TASK_FLAG_CONTRACTS,Ud as PLAN_CREATE_METADATA_PARAMETER_KEYS,hs as PLAN_FLAG_CONTRACTS,em as PLAN_SHOW_DEPTH_VALUES,Ve as PLAN_SUBCOMMANDS,tm as PLAN_TEMPLATE_NAMES,vy as PM_AGENT_TASK_ACCOUNTING_MODES,ct as PM_AGENT_TASK_TRANSCRIPT_VERSION,Ro as PM_BULK_LIFECYCLE_COMMAND_ALIASES,Ni as PM_CLI_EXPECTED_ERROR_NAME,Vw as PM_CLI_GRAMMAR_CONTRACT,Uw as PM_CLI_GRAMMAR_NOUNS,bn as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,jw as PM_CLI_SHARED_VERBS,Mo as PM_COMMAND_ALIAS_CONTRACTS,ee as PM_COMMAND_CAPABILITY_CONTRACTS,wt as PM_COMMAND_DESTINATION_CONTRACTS,LO as PM_COMMAND_EXIT_CONTRACTS,NO as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,$n as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,MO as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,Ge as PM_COMMAND_POSITIONAL_CONTRACTS,mc as PM_COMMAND_VISIBILITY_CONTRACTS,MR as PM_COMPLETE_LIST_FINDING_CODES,$S as PM_CONTEXT_INTENTS_FILE,CS 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,zr as PM_EPISODE_SCHEMA,IO as PM_ERROR_CODE_CATALOG,AO as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Yr as PM_EXACT_COVERAGE_METRICS,cn as PM_EXTENSION_CAPABILITY_CONTRACTS,hn as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,pn 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,un as PM_EXTENSION_TRUST_MODE_CONTRACTS,SR as PM_GITATTRIBUTES_END,TR as PM_GITATTRIBUTES_START,wR as PM_GITATTRIBUTES_V2_END,ER as PM_GITATTRIBUTES_V2_START,Tc as PM_GITIGNORE_END,Cc as PM_GITIGNORE_START,WI as PM_HISTORY_ATTESTATION_CONTRACT,vo as PM_HISTORY_COMMAND_ALIASES,YS as PM_HISTORY_OPERATION_ALIASES,ZS as PM_HISTORY_OPERATION_CONTRACT,JS as PM_HISTORY_OPERATION_PATTERNS,yn as PM_ITEM_ACTION_SUBCOMMANDS,WS as PM_ITEM_HISTORY_OPERATIONS,rt as PM_MCP_APPS_EXTENSION,Or as PM_MCP_APPS_SERVER_CAPABILITY,Te as PM_MCP_APPS_SPEC_VERSION,Pr as PM_MCP_APP_CONTRACTS,Ir as PM_MCP_APP_MIME_TYPE,fb as PM_MCP_ENTRY_TOOL_NAMES,m as PM_MCP_ERROR_CODES,Pk as PM_MCP_HTTP_PROTOCOL_VERSION,$h as PM_MCP_INPUT_REQUEST_METHODS,ek as PM_MCP_LEGACY_PROTOCOL_VERSIONS,Qt as PM_MCP_LOG_LEVELS,w as PM_MCP_META_KEYS,AD as PM_MCP_PROGRESSIVE_DISCOVERY_EXTENSION,vD as PM_MCP_PROGRESSIVE_DISCOVERY_SERVER_CAPABILITY,yc as PM_MCP_PROMPT_CONTRACTS,z as PM_MCP_PROTOCOL_VERSION,gc as PM_MCP_RESOURCE_CONTRACTS,nt as PM_MCP_SKILLS_DRAFT_REVISION,Mr as PM_MCP_SKILLS_EXTENSION,qg 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,Sk as PM_MCP_TASKS_EXTENSION,Wh as PM_MCP_TASK_STATUSES,ue as PM_MCP_TOOL_COMMAND_CONTRACTS,YC as PM_MODE_PAIRED_OUTPUT_PROJECTION_CONTRACTS,sd as PM_MUTATION_ACTION_CONTRACTS,Pe as PM_NAMESPACED_COMMAND_ALIASES,Br as PM_OBSERVATION_SCHEMA,Pn as PM_OUTPUT_BUDGET_CLASSES,In as PM_OUTPUT_DEGRADATION_STEPS,Pt as PM_OUTPUT_ENVELOPE_KINDS,Lt as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,gn as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,Nt as PM_PACKAGE_RESOURCE_KINDS,Fe as PM_POSITIONAL_ACTION_CONTRACTS,Wd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Hd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,XT as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,DT as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,HT as PM_READ_OUTPUT_DIMENSIONS,WT as PM_READ_OUTPUT_OPTION_FLAGS,jT as PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS,UT as PM_READ_OUTPUT_SESSION_MIN_TOKENS,KT as PM_READ_OUTPUT_SURFACES,YT as PM_READ_OUTPUT_SURFACE_CONTRACTS,XC as PM_READ_ROW_CONTRACTS,WC as PM_READ_ROW_JQ_SELECTOR,SN as PM_RECOVERY_REFERENCE_FIELDS,ae as PM_RECOVERY_REFERENCE_KINDS,Yy as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,so as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2,IN as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE,io as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2,Io as PM_RELOCATED_COMMAND_ALIASES,ed as PM_REPRODUCIBLE_PROCESS_ENV,DO as PM_SUCCESS_EXIT_CODES,Cn as PM_TOOL_ACTIONS,Bd as PM_TOOL_ACTION_PARAMETER_CONTRACTS,Kd as PM_TOOL_PARAMETERS_SCHEMA,Vd as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,zd as PM_TOOL_PARAMETERS_SCHEMA_VERSION,Fd as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,qr as PM_VERDICT_SCHEMA,XS as PM_WORKSPACE_HISTORY_OPERATIONS,Ur as PM_WORKSPACE_RECIPE_SCHEMA,_s as PROFILE_FLAG_CONTRACTS,Xt as PROFILE_LINT_CODES,Wt as PROFILE_LINT_DIMENSIONS,jt as PROFILE_NAMES,He as PROFILE_SUBCOMMANDS,b as PmCliError,me as PmClient,kR as PmCompleteListValidationError,y as PmMcpAuthorizationError,er as PmMcpInputRequiredError,Sr as PmMcpIssuerCredentialStore,u as PmMcpProtocolError,tr as PmMcpRequestStateReplayGuard,$r as PmMcpSkillRegistry,ur as PmMcpSubscriptionRegistry,et as PmMcpTaskStore,uT as QUERY_CURSOR_CONTRACT,Gs as REINDEX_FLAG_CONTRACTS,KA as REINDEX_LOCK_ID,dt as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Hs as RELEASE_FLAG_CONTRACTS,Zs as REMIND_FLAG_CONTRACTS,Et as RESERVED_ITEM_FIELD_NAMES,zs as RESTORE_FLAG_CONTRACTS,Bo as RISK_VALUES,Pw as RelationshipEventLog,Mw as RelationshipEventStore,q as RelationshipGraph,ke as RelationshipKindRegistry,fs as SCHEMA_FLAG_CONTRACTS,Va as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,DM as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ra as SEARCH_FLAG_CONTRACTS,yu as SEMANTIC_ATTRIBUTION_LIMITS,jb as SETTINGS_DEFAULTS,xm as SNAPSHOT_SCHEMA,pR as SOURCE_CONTEXT_ACCESS_ENV,uR as SOURCE_CONTEXT_WRITE_OVERRIDE_ENV,Ks as START_TASK_FLAG_CONTRACTS,na as STATS_FLAG_CONTRACTS,Uo as STATUS_VALUES,Qi as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,Ii as SUBSTANTIVE_HISTORY_OPERATIONS,EE as SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,AE as SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,qb as SUPPRESS_HOST_OUTPUT_MARKER,ta as TELEMETRY_FLAG_CONTRACTS,df as TELEMETRY_SUBCOMMANDS,ea as TEST_ALL_FLAG_CONTRACTS,Qs as TEST_FLAG_CONTRACTS,ra as TEST_RUNS_FLAG_CONTRACTS,rf as TEST_RUN_MEASUREMENT_LIMIT,Nd as TOOL_ACTIVITY_OPTION_CONTRACTS,Sd as TOOL_AGGREGATE_OPTION_CONTRACTS,Pd as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,xd as TOOL_CALENDAR_OPTION_CONTRACTS,kd as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,Ld as TOOL_CONTEXT_OPTION_CONTRACTS,Od as TOOL_CREATE_OPTION_CONTRACTS,vd as TOOL_CREATE_OPTION_CONTRACT_SOURCE,Dd as TOOL_DEPS_OPTION_CONTRACTS,$d as TOOL_GRAPH_OPTION_CONTRACTS,Td as TOOL_LIST_FILTER_OPTION_CONTRACTS,Ed as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,Ad as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,wd as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,Md as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,Id as TOOL_UPDATE_OPTION_CONTRACTS,Rd as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,Ub as TYPE_TO_FOLDER,nA as UNKNOWN_SUBCOMMAND_COMPATIBILITY_CODES,Zd as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,ec as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Qd as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,_a as UPDATE_FLAG_CONTRACTS,ha as UPDATE_MANY_FLAG_CONTRACTS,Fs as UPGRADE_FLAG_CONTRACTS,aa as VALIDATE_FLAG_CONTRACTS,AT as WORKFLOW_POLICY_ACTIONS,OR as WORKFLOW_POLICY_DOCUMENT_SCHEMA,vR as WORKFLOW_POLICY_SCHEMA,va as WORKSPACE_FLAG_CONTRACTS,zE as WORKSPACE_HISTORY_ID,Nm as WORKSPACE_SNAPSHOT_ACTIONS,gl as WorkspaceGraphCache,Dw as WorkspaceTransactionInterruptedError,Bp as _testOnly,YP as _testOnlyAggregateCommand,_l as _testOnlyConfigCommand,rM as _testOnlyGetCommand,Rp as _testOnlyHealthCommand,Wc as _testOnlyInit,Vc as _testOnlyInitAgentGuidance,r0 as _testOnlyItemTransaction,AM as _testOnlyMutationEvents,KP as _testOnlyNextCommand,gM as _testOnlySearchCommand,BR as _testOnlySimilarity,im as _testOnlyTemplates,Gp as _testOnlyValidateCommand,RM as _testOnlyWorkspacePosition,WR as acceptAssuranceProposals,$p as acknowledgeLinkedTests,ul as acknowledgeUnknownAuthorHistoryEvents,pl as acknowledgeUnknownAuthorHistoryEventsFromTransport,yw as acquireItemMetadataDerivedIndexLock,$e as acquireLock,f0 as activateExtensionForTest,EC as activateExtensions,li as agentSessionEnvironment,a_ as aggregate,Vm as analyzeAgentProvenanceDescriptorCoverage,Dv as analyzeDefectChangeRisk,$I as analyzeDefectRecurrenceCoverage,Ul as analyzeDuplicateItems,xw as analyzeGraphImpact,oc as analyzeHierarchyIntegrity,Nw as analyzeKnowledgeGraph,FO as analyzePmCommandExitConformance,En as analyzePmToolActionParity,wI as analyzeReconciliationDiscard,kw as analyzeRelationshipExecution,ip as analyzeRelationshipSchedule,Mh as analyzeSdkActionCoverage,Rt as analyzeSdkCliParameterCompleteness,b_ as append,ki as appendHistoryEntry,WE as appendWorkspaceAuditEvent,KE as appendWorkspaceHistoryChange,cA as applyAcceptanceCriteriaMutations,HR as applyAssurancePreset,$a as applyBootstrapPagerPolicy,kI as applyClosureTimestampFix,AS as applyContextIntentProjection,zu as applyContextTagProjection,CO as applyFilterValueEcho,iw as applyHistoryPatch,Qa as applyInvocationAuthorOverride,vl as applyPathMigrations,nS as applyReadOutputDimensions,eS as applyReadOutputIncludeModes,qT as applyReadOutputSessionReferences,pw as applyRegisteredItemFieldDefaultsAndValidation,Pl as applyStandaloneNote,Wi as applyStoredExtensionMigrationState,pA as applyTagRemovals,oP as applyTerminalOrderingPolicy,Ml as artifactKey,Zb as asRecordClone,Jb as asRecordOrNull,je as assembleWorkspaceRelationshipGraph,DR as assertCompleteListResult,W0 as assertExtensionBlueprint,K0 as assertExtensionCapabilityUsage,I0 as assertExtensionDeactivated,J0 as assertExtensionManifestCompatible,Y0 as assertExtensionManifestMatchesBlueprint,Z0 as assertExtensionPreflight,sc as assertHierarchyMutationAllowed,VI as assertHistoryCompactTarget,vI as assertHistoryRepairTarget,Wn as assertInitializedTracker,Ol as assertLinkedArtifactMutationIsUnambiguous,rk as assertMcpClientCapabilities,tk as assertMcpProtocolHeader,Ay as assertMemoryRelationshipGraphAdapterConformance,fA as assertNoUnknownCsvKeys,P0 as assertPackageManifest,kA as assertParentReferenceIsNotSelf,sx as assertPmMcpSkillsCapability,X0 as assertProjectProfile,CR as assertProjectRuntimeCompatibility,JC as assertProjectionModeChoice,Kn as assertReadableTrackerRoot,M0 as assertRegisteredCommandContract,j0 as assertRegisteredCommandOverride,$0 as assertRegisteredExporter,k0 as assertRegisteredFlags,x0 as assertRegisteredHook,D0 as assertRegisteredImporter,F0 as assertRegisteredItemField,G0 as assertRegisteredItemType,H0 as assertRegisteredMigration,B0 as assertRegisteredParserOverride,q0 as assertRegisteredPreflightOverride,U0 as assertRegisteredProfile,z0 as assertRegisteredRendererOverride,N0 as assertRegisteredSearchProvider,V0 as assertRegisteredServiceOverride,L0 as assertRegisteredVectorStoreAdapter,xb as assertRelationshipEdgeAllowed,Qr as assertRelationshipGraphAdapterConformance,Qw as assertSchemaPreviewSupported,WO as assuranceAssertionUpdateIsLoosening,RS as attachContextIntentReceipt,pS as attachContextUsageServingReceipt,xp as attachLinkedTestMutationProvenance,kp as attachLinkedTestProvenance,Xe as attachMcpServerInfo,oT as attachOutputOmissionReceipt,PS as attachOutputTokenAccounting,IS as attachReadOutputContracts,zT as attachReadOutputSessionReceipt,Rc as auditMergeAttributeFence,AR as auditMergeDriverConfiguration,pp as auditWorkspaceRelationshipGraph,Vk as authorizeMcpHttpRequest,di as boundAgentEpisodeIdentity,TT as boundReadOutputRows,Uu as buildChildrenByParent,pM as buildCompactSearchFilterSummary,TO as buildContentFilterEcho,xP as buildContextSignalSnapshot,dy as buildCorpusShapeItemPlan,Lv as buildDefectRecurrenceIndex,Fc as buildExtensionDescribeResult,Uc as buildExtensionInstallPlan,SO as buildGovernanceMissingFilterEcho,UA as buildInvalidTypeError,QP as buildItemChildrenRollup,e0 as buildItemCompletionMutations,gP as buildItemContextRelevanceCandidates,ww as buildItemNotFoundError,tM as buildItemSchedule,xI as buildLinkedFileRepairReport,Dk as buildMcpAuthorizationDiscoveryUrls,Lh as buildMcpCompleteResult,nk as buildMcpDiscoverResult,jk as buildMcpDynamicRegistrationMetadata,Rk as buildMcpHttpRequestHeaders,ck as buildMcpInputRequiredResult,Lk as buildMcpProtectedResourceMetadata,vc as buildMergeAttributePatterns,qd as buildPmActionToolInputSchema,kN as buildPmRefusalClosureCensus,jR as buildRelationshipContext,JA as buildSearchCorpus,QA as buildSemanticCorpusInput,II as buildStatusRoleWarnings,Hn as buildTrackerInitializationRecovery,nv as buildVectorizationEmbeddingIdentity,iv as buildVectorizationEmbeddingMetadata,uM as buildVerboseSearchFilters,RR as buildWorkflowCompletenessCheck,UP as buildWorkspaceMemorySnapshot,ai as canonicalDocument,eC as canonicalizeCommandOptionKey,BM as canonicalizeCommandSuggestions,_P as canonicalizeContextRecencyCoordinate,Pb as canonicalizeRelationshipKind,EN as censusPmRecoveryReferenceProducers,LR as certifyCompleteListResult,u0 as checkExtensionManifestCompatibility,rh as claim,oh as claimNext,FR as classifyHistoryAuthorEvent,Pi as classifyHistoryEvent,SI as classifyHistoryMergeReceiptReferences,uC as classifyHostEnvironmentFault,fM as classifyImplicitSemanticFallbackReason,ti as classifyItemFormatVersion,pf as classifyLinkedTestCommandSafety,uf as classifyLinkedTestFailure,UC as clearActiveExtensionHooks,bp as clearDurableGraphCache,yE as clearFocusedItem,bf as clearWorkspaceContractsCache,th as close,Vp as closeItem,ph as closeTask,Ua as coalesceRepeatedListFlags,Bv as collectBlockedByIds,zv as collectBlockedByIdsFromCorpus,mS as collectContextUsageDeliveredItemIds,lc as collectDanglingDependencyReferences,Hv as collectDependencyBlockedIds,dc as collectDuplicateDependencyRows,lp as collectDuplicateRelationshipEdgeGroups,mM as collectErrorCauseCodes,rc as collectHierarchyRelations,yr as collectMcpHeaderAnnotations,pc as collectMissingDependencyTargetIds,Yp as collectNewOrderingCycleWarnings,ap as collectOrderingCycles,cc as collectOrderingStorageContradictions,US as collectPackageContextIntentContracts,$t as collectPackageExtensionDirectories,cw as collectRegisteredItemFieldNames,lE as collectRuntimeCreateFieldValues,jA as collectRuntimeFilterValues,pE as collectRuntimeUpdateFieldValues,Lu as collectSubtreeIds,en as collectUsedExtensionCapabilities,tC as commandOptionFlagLabel,l_ as comments,qf as commitImportedItem,t0 as commitItemCompletion,QM as commitItemMutations,Fw as commitWorkspaceTransaction,Zi as compactFlagAliasContracts,Du as compareCriticalItems,_R as comparePmDateVersions,Lw as compareRelationshipSnapshots,aS as compareTimestampStrings,uP as compileHistoryProvenanceMatcher,ES as composeContextIntentContracts,i0 as composeExtension,p0 as composeExtensionPackage,Wv as computeActionabilityReport,OA as computeHistoryDiff,op as computeRelationshipCentrality,rp as computeRelationshipDominators,hl as computeWorkspaceGraphFingerprint,T_ as config,GC as consumeAfterCommandAffectedItems,t_ as context,OS as contextIntentRowId,ih as copy,mf as countFailureCategories,bT as countReadOutputRows,Z_ as create,VR as createAssurancePreset,LI as createAssuranceWorkspaceContext,eA as createCheckpointId,xR as createCompleteListOptions,wC as createCoreCommandHookContext,Xr as createCorpusShapeMeasurement,QO as createEmptyAssuranceDocument,cC as createEmptyExtensionRegistrationRegistry,Vi as createExtensionCommandSdk,Zo as createExtensionContributionInventory,Q0 as createExtensionTestHarness,Mi as createHistoryEntry,Tv as createLazyModule,IR as createLifecycleCompletenessPolicies,Hk as createMcpStaticBearerVerifier,Ek as createMcpTaskStore,Ew as createMutationGuardSdk,ZC as createOutputOmissionReceipt,Di as createPmCliExpectedError,Vn as createPmCliProgram,Ln as createPmCommandOutputBudget,iT as createQueryFingerprint,wy as createRelationshipGraphScaleFixture,J as createRelationshipGraphSnapshot,_t as createRelationshipKindRegistry,rd as createReproducibleProcessRunner,cM as createSearchCursorFingerprint,AC as createSerialQueue,CA as createStdinTokenResolver,iA as createUnknownSubcommandError,LT as createWorkflowPolicyEvaluator,Lm as createWorkspaceSnapshot,_0 as deactivateExtensionForTest,CL as declineServiceOverride,vS as decodeContextIntentCursor,Cv as decodeHtmlEntitiesInOptions,gr as decodeMcpHttpHeaderValue,kS as decodePmTableRows,cT as decodeQueryCursor,aT as decodeQueryCursorEnvelope,dT as decodeQueryCursorState,GT as decodeReadOutputContinuationCursor,Jk as decoratePmMcpToolsWithApps,xl as dedupeLinkedArtifacts,bP as defaultScoreContextCandidates,vL as defineAfterCommandHook,wL as defineBeforeCommandHook,AL as defineBeforeMutationHook,dL as defineCommand,_L as defineCommandOverride,K as defineCorpusShape,hx as defineEpisodeSpecification,EL as defineExporter,o0 as defineExtension,n0 as defineExtensionBlueprint,sL as defineExtensionManifest,cL as defineFlag,SL as defineImporter,pL as defineItemField,lL as defineItemType,uL as defineMigration,Zg as defineObservationContract,IL as defineOnIndexHook,RL as defineOnReadHook,OL as defineOnWriteHook,hL as defineParserOverride,Dn as definePmCommandOutputBudget,PO as definePmCommandOutputEnvelope,vO as definePmErrorCodeCatalog,gL as definePreflightOverride,aL as defineProjectProfile,TL as defineRendererOverride,mL as defineSearchProvider,yL as defineServiceOverride,fL as defineVectorStoreAdapter,ry as defineVerdictContract,Se as defineWorkspaceRecipe,sh as deleteItem,jm as deleteWorkspaceSnapshot,Nb as dependencyToRelationship,g_ as deps,KR as deriveAssuranceProposals,PI as deriveClosureTimestamp,a0 as deriveExtensionCapabilities,GO as derivePmBulkMutationEffect,wN as derivePmRecoveryReferenceObligations,sp as deriveRelationshipDeadlines,kc as deriveSchemaEvolutionMigrationId,mv as deriveTelemetryCommandResolution,VA as describeAllowedTransitions,lR as describeExtensionActivation,d0 as describeExtensionBlueprint,Eu as describeItemOwnershipConflict,_x as describeObservationCost,Ht as describeProfileComposition,Kt as describeProjectProfile,qS as describeUnknownError,Ci as detectAgentIdentity,wi as detectHarnessIdentity,ep as detectRelationshipCommunities,Ti as diagnoseAgentIdentity,up as diffRelationshipAuditSnapshots,sf as diffTestRunMeasurements,uk as digestMcpRequestParameters,TC as discoverExtensions,Ko as discoverNearbyPmRoot,RD as discoverPmTools,gR as discoverProjectRuntimeVersionPins,h_ as docs,c_ as duplicates,_p as durableGraphCachePath,Cp as durableGraphCacheStatus,Qn as effectiveItemFormatVersion,Pv as emitTelemetryErrorEvent,Bf as emptyImportedDocument,rI as encodeItemScalarDecisionValue,hr as encodeMcpHttpHeaderValue,MS as encodePmTableRows,sT as encodeQueryCursor,FT as encodeReadOutputContinuationCursor,uw as enforceHistoryStreamPolicyForItem,mw as enforceHistoryStreamPolicyForItems,EO as enrichCliFlagInvocationContract,It as enrichCliFlagInvocationContracts,aw as ensureMaterializedHistoryTarget,Ec as ensurePmGitignore,Tl as ensureScope,uv as ensureSentryInit,jf as ensureTrackerInitialized,Zl as enumerateRelationshipPaths,Gn as estimatePmOutputTokens,tR as evaluateAssuranceAssertion,rR as evaluateAssuranceGate,Nx as evaluateBoundaryFixtures,EP as evaluateContextRanking,$v as evaluateDefectGateEvidence,eR as evaluateMeasurement,Em as evaluateMetricFloors,dd as evaluateMutationGuard,Jm as evaluateProvenanceCoverage,Wm as evaluateSemanticAttributionCoverage,Bl as evaluateSimilarityGovernance,zA as evaluateTransition,oy as evaluateVerdictContract,NT as evaluateWorkflowPolicies,id as executeEmbeddingBatchesWithRetry,rv as executeVectorDelete,ov as executeVectorReset,tv as executeVectorUpsert,Wg as executeWorkspaceRecipe,Il as expandAddGlobEntries,zl as explainSourceTraceability,YI as exportAttestation,uh as extension,fh as extensionActivate,_h as extensionDeactivate,mh as extensionList,cb as extensionMigrate,TI as extractHistoryMergeReceiptDispositions,CI as extractHistoryMergeReceiptReferences,Bk as extractMcpTraceContext,ow as extractPatchFailureContext,Ip as extractReferencedPmItemIdsFromCommand,Ey as federateRelationshipGraphSnapshots,m_ as files,f_ as filesDiscover,__ as filesLookup,fS as finalizeContextUsageDelivery,fy as findCoverageDeficits,jl as findDuplicateClusters,Ac as findGitWorkspaceRoot,DE as findHistoryIdentityDiscontinuities,Dc as findInstalledNpmPackageCandidate,Yk as findPmMcpAppByUri,Po as findPmNamespacedCommand,tp as findRedundantRelationshipEdges,np as findRelationshipCutStructure,Gl as findSimilarItems,Iv as finishTelemetryCommand,hC as flattenFlagListValue,py as flushTelemetryQueue,dh as focus,Ql as forEachMatchedRelationshipEdge,cp as formatDuplicateEdgeGroup,nc as formatHierarchyRelation,dp as formatOrderingStorageContradiction,zw as formatPmPositionalActionFlagTip,gm as formatProfileApplyHuman,hm as formatProfileLintHuman,fm as formatProfileListHuman,_m as formatProfileShowHuman,Lc as formatSchemaEvolutionMigrationHuman,hM as formatVectorIndexRecoveryWarnings,OM as formatWorkspacePositionHuman,H_ as gc,Ui as generateItemId,i_ as get,DC as getActiveCommandResult,TS as getActiveContextIntentContracts,rn as getActiveExtensionRegistrations,zk as getActiveMcpTraceContext,nR as getAssuranceDeclaration,Rh as getContracts,hE as getFocusedItem,Yo as getHistoryPath,Iw as getItemAt,Xo as getItemPath,pd as getMutationActionContract,Sc as getPmGitignoreBlock,Wo as getSettingsPath,Cf as getWorkspaceContracts,VE as getWorkspaceHistoryPath,y_ as graph,hp as graphAuditBaselinePath,Xm as groupHistoryByEpisode,bL as handleServiceOverride,ok as hasMcpClientExtension,Xk as hasPmMcpAppsCapability,Ue as hasSubcommandFlagContractsForCommand,sv as hasVectorizationEmbeddingIdentityChanged,av as hasVectorizationVectorDimensionChanged,xE as hashDocument,NE as hashDocumentForVersion,LE as hashEmptyDocument,OE as hashHistoryPatch,vE as hashHistoryRecord,RE as hashHistoryStream,oI as hashItemScalarDecisionValue,V_ as health,Wl as hierarchyAncestors,Xl as hierarchyDescendants,Y_ as historyCompact,J_ as historyCompactBulk,sE as historyDigest,pP as historyEntryMatchesProvenance,hR as historyItemHashVersionForRuntime,K_ as historyRedact,W_ as historyRepair,X_ as historyRepairAll,qv as indexBlockedByIds,ic as indexHierarchyRelations,dv as inferConsistentVectorDimension,Nn as inferPmOutputBudgetClass,C_ as init,NR as inspectCompleteListResult,lC as inspectExtensionManifestSchema,sl as inspectHistoryAuthorStream,pI as inspectMergeReceiptEvidence,bR as inspectProjectRuntimeCompatibility,yd as inspectStaleInProgressItems,kh as inspectStaticExtensionInventory,RI as inspectStatusRoleAssignments,HE as inspectWorkspaceHistoryState,Dm as inspectWorkspaceSnapshot,Mc as installMergeFence,ik as interpretMcpResultType,Ku as isAlreadyClaimedError,HS as isCommanderError,tl as isErrnoError,Mv as isExternalDependencyReference,kv as isExternalDependencySourceKind,pe as isFileMissingError,Vb as isHostOutputSuppressed,Li as isItemAlreadyExistsError,tI as isItemScalarMissingValue,gI as isLegacyMergeReceiptSummary,_ as isMcpRecord,cd as isMutationAction,kb as isOrderingRelationshipKind,PA as isPlaceholderReferenceToken,$i as isPmCliExpectedError,An as isPmExtensionCapabilityContract,On as isPmExtensionPolicyModeContract,Rn as isPmExtensionPolicySurfaceContract,vn as isPmExtensionServiceNameContract,$O as isPmKnownExitCode,kO as isPmMutationReceipt,ze as isPmSuccessfulExitCode,wn as isPmToolAction,yI as isPreDurableCloneLocalReceiptSummary,bI as isPreDurableDispositionEligibleReference,yR as isProjectMutatingInvocation,Sv as isPureSnakeCaseAlias,iS as isReadOutputBudgetExceeded,eT as isReadRowContract,Yc as isRuntimeRecord,Av as isTerminalPlanMode,mE as isTerminalStatus,zn as isTimestampLiteral,YM as itemDocumentToMutationOptions,eM as itemHasSchedule,ud as jaccardSimilarity,u_ as learnings,dC as levenshteinDistanceWithinLimit,Zc as limitAnnotationEntries,Np as linkedTestTrustFingerprint,c0 as lintExtensionBlueprint,pC as lintExtensionManifestSchema,Yt as lintProjectProfile,r_ as list,_i as listAgentProvenanceAdapters,Ga as listAliasPluralKeys,o_ as listAllComplete,Tw as listAllDocumentCandidatesCached,zi as listAllItemMetadata,Sw as listAllItemMetadataLight,oR as listAssuranceDeclarations,cR as listAssuranceVerdicts,sy as listBuiltinCorpusShapes,qM as listCoreClosedDomainContracts,_O as listGetProjectionFields,ZR as listInvalidProvenanceHistoryStreamIds,mO as listListProjectionFields,uI as listMergeReceipts,ld as listMutationActions,SM as listMutationEvents,po as listPmCommandFlagBudgets,_c as listPmCommandsForFamily,fc as listPmCommandsForTier,Oe as listPmFlagLexicon,rL as listPmFlagSpellingInventory,hc as listPmMcpToolsForProfile,VN as listPmRequiredArgumentRefusalContracts,HN as listPmSubcommandRefusalContracts,Vt as listProfiles,XN as listTrackerPreflightRecoveryContracts,$m as listWorkspaceSnapshots,jS as loadContextIntentRuntimeLayers,sm as loadCreateTemplateOptions,SC as loadExtensions,Sp as loadGraphAuditBaseline,rA as loadMutationCheckpoint,x as loadRelationshipGraphAdapter,Bi as locateItem,mA as looksLikeGenericKeyValueEntry,CT as mapReadOutputRows,mI as markMergeReceiptReconciled,BA as matchesRuntimeFilters,Ov as maybeRunFirstUseTelemetryPrompt,cy as measureCorpusShapePlan,ji as measureItemMetadataReadWork,lA as mergeAdditiveTags,s0 as mergeExtensionBlueprints,nI as mergeHistoryStreams,dI as mergeItemDocuments,cI as mergeJsonDocuments,ja as mergeLinkedTestTwoTokenEntries,iI as mergeRelationshipEventStreams,Bu as mergeSortedWarnings,wv as migrateItemFilesToFormat,vw as mutateItem,Aw as mutateItemWithHistoryContext,XE as mutateWorkspaceJsonWithHistory,s_ as next,gi as normalizeAgentProvenanceAdapterValue,Jc as normalizeAnnotationTransportOptions,zO as normalizeAssuranceEvaluation,qO as normalizeAssuranceMutation,Ba as normalizeBootstrapInvocation,wA as normalizeBulkIdsValue,ac as normalizeDependencyGraphTarget,dO as normalizeDependencySeedId,aO as normalizeDependencySourceKind,Jo as normalizeExtensionContributionInventory,tE as normalizeHistoryOperationForWrite,JR as normalizeInvalidHistoryProvenance,Zw as normalizeItemAddressInvocation,ei as normalizeItemFormatVersion,Gi as normalizeItemId,ni as normalizeItemMetadata,cO as normalizeItemReference,Fa as normalizeLegacyExtensionActionSyntax,Rl as normalizeLinkedPath,IA as normalizeParentReferenceValue,qt as normalizeProfileName,Fi as normalizeRawItemId,tS as normalizeReadOutputIncludeModeOptions,UE as normalizeReplayPatchOps,md as normalizeSimilarityText,uE as normalizeStatusForRegistry,oi as normalizeStatusInput,dE as normalizeStatusInputWithRegistry,VS as normalizeThrownExitCode,p_ as notes,qn as nowIso,gp as openDurableGraphCache,pk as openMcpRequestState,gx as openPmEpisode,Yl as orderingPredecessors,Jl as orderingSuccessors,RP as packContextCandidates,$u as packRankedContextItems,Ah as packageActivate,wh as packageCatalog,vh as packageDeactivate,Sh as packageDescribe,Ch as packageDoctor,yh as packageInstall,hh as packageLifecycle,gh as packageList,Th as packageManage,lb as packageMigrate,Eh as packageReload,bh as packageUninstall,pT as paginateQueryRows,Sl as parseAddEntries,El as parseAddGlobEntries,el as parseAnnotationTextInput,KM as parseAtomicMutationControls,Da as parseBootstrapCommandName,xa as parseBootstrapGlobalOptions,La as parseBootstrapHelpRequest,qa as parseBootstrapTypeValue,EA as parseBulkIdsText,xu as parseContextDepth,Iu as parseContextFocusFields,FS as parseContextIntentDeclarations,Nu as parseContextSections,kP as parseContextSignalSnapshot,uA as parseCsvKv,Gv as parseDefectChangeRiskRequest,DI as parseDefectRecurrenceCoverageRequest,Fv as parseDefectRecurrencePolicy,Sm as parseEvalMetricFloors,Om as parseEvalQuerySet,Ap as parseGraphSubcommand,XI as parseHistoryAttestation,cP as parseHistoryProvenanceFilters,Xv as parseIntegerLimit,fE as parseItemDocument,WM as parseItemMutationBatch,GA as parseLimit,cu as parseLinkedTestAssertionEqualsMap,lu as parseLinkedTestAssertionGteMap,ou as parseLinkedTestBoolean,nu as parseLinkedTestContextMode,ru as parseLinkedTestEnvClear,tu as parseLinkedTestEnvSet,pu as parseLinkedTestJsonEntries,du as parseLinkedTestMinLines,au as parseLinkedTestRegexList,su as parseLinkedTestStringList,iu as parseLinkedTestWorkspaceContextMode,Uh as parseMcpCachePolicy,xh as parseMcpImplementation,Ze as parseMcpInputRequests,ir as parseMcpInputResponses,lg as parseMcpSubscriptionFilter,Al as parseMigrateEntries,Zv as parseMultiValueFilter,xO as parseMutationReceipt,SA as parseOptionalNonNegativeInteger,TA as parseOptionalNumber,hN as parsePmAgentTaskTranscriptCorpus,OD as parsePmToolDiscoveryOptions,Yv as parsePriority,tO as parsePriorityFilterSet,BT as parseReadOutputSession,lw as parseRegisteredItemFieldAssignments,ie as parseRelationshipGraphSnapshot,wl as parseRemoveEntries,ql as parseSourceLineRange,LA as parseStatusFilterCsv,Qv as parseStringFilterSet,nd as parseTags,of as parseTestRunMeasurements,Jv as parseType,eO as parseTypeFilterSet,ll as parseUnknownAuthorHistoryEventCoordinates,RT as parseWorkflowPolicy,IT as parseWorkflowPolicyDocument,WP as partitionDecisionEntries,vA as patchPathToChangedField,Lo as pathExists,lh as pauseTask,yp as persistDurableGraphResult,ew as persistSelectedItemFormat,UR as planAgentIdentityVocabularyMutation,FP as planCompletedAtBackfill,jc as planExtensionDirectoryCopy,Jt as planProfileApplication,CN as planRelationshipEventBackfill,wp as planRelationshipRemediation,xc as planSchemaEvolutionMigration,dl as planUnknownAuthorHistoryAcknowledgment,Fm as planWorkspaceSnapshotRestore,Kw as positionalShapeKey,Ww as positionalSignatureKey,m0 as preflightExtension,_d as prepareSimilarityText,hA as preserveMutationStdinTokenFields,_A as preserveMutationStdinTokenLiterals,ZM as previewItemMutations,DS as printError,LS as printResult,G_ as profile,B_ as profileApply,q_ as profileLint,U_ as profileList,j_ as profileShow,FC as projectAfterCommandItemSnapshot,Pu as projectContextFocusRows,tf as projectFleetAttributionAnalytics,lP as projectHistoryProvenance,jn as projectPmDiagnosticOutput,Bn as projectPmDiagnosticText,Qm as projectProvenanceCoverageAnalytics,Fp as projectValidateCounts,XR as promoteAssuranceAssertion,uS as propagateContextUsageServingReceipt,Ux as pruneCompileCacheGenerations,iR as putAssuranceDeclaration,sR as putAssuranceDeclarationBundle,fw as queryItemMetadataIndex,_w as queryLinkedFileMetadataIndex,hw as querySimilarItemMetadataIndex,nf as queryTestRunMeasurementsBelow,an as quoteCommandArg,sn as quoteWindowsCommandArg,jM as rankCommandPaths,Qc as readAnnotationEntries,Si as readAuthorEnvironment,Sf as readBooleanOption,bS as readContextUsageAffinity,Ef as readCsvListOption,Ki as readExtensionMigrationState,Do as readFileIfExists,Ya as readFirstStringFromCommanderOptions,Ja as readFirstValueFromCommanderOptions,Ym as readHistoryAnalyticsWindow,TE as readHistoryEntries,vi as readHistorySnapshot,qm as readImprovementLedger,bw as readItemMetadataDerivedIndexState,qi as readLocatedItem,yT as readOutputBudgetCollections,$T as readOutputCollectionFingerprint,gT as readOutputContinuationRowCollections,_T as readOutputContinuationRowPaths,QT as readOutputIncludeModeOptions,hT as readOutputRowCollections,fT as readOutputRowPaths,VT as readOutputSessionRemainingTokens,Dt as readPmPackageManifest,yf as readRequiredString,xi as readSettings,tw as readSettingsWithMetadata,Za as readStringArrayFromCommanderOptions,Tf as readStringOption,zS as readThrownExitCode,cv as readVectorizationStatusLedger,dw as readWorkflowPolicies,PT as readWorkflowPolicyField,GS as readWorkspaceContextIntentContracts,DP as readWorkspaceContextSignals,jP as readWorkspaceMemory,vM as readWorkspacePosition,qE as reanchorHistoryEntries,tn as reconcileExtensionCapabilityUsage,JE as reconcileWorkspaceJsonHistory,$C as recordAfterCommandAffectedItem,dR as recordAssuranceVerdict,_u as recordClaimSemanticAttribution,hS as recordContextUsageDelivery,_S as recordContextUsageServing,gS as recordContextUsageTouch,yS as recordContextUsageTouches,gu as recordFocusSemanticAttribution,Bm as recordImprovementObservation,hu as recordReleaseSemanticAttribution,Cw as refreshItemMetadataDerivedIndex,Ic as refreshMergeAttributeFenceIfInstalled,ET as refreshReadOutputDeliveredCounts,pv as refreshSearchArtifactsForMutation,hi as registerAgentProvenanceAdapters,iO as registerExternalDependencyResolver,fi as registerHarnessSignalDescriptors,KC as registerOutputMaterialFieldGroups,nh as release,ST as rememberReadOutputFocusRows,aR as removeAssuranceDeclaration,$o as removeFileIfExists,Dl as renameArtifactsResultKey,Au as renderCalendarMarkdown,vu as renderCalendarToon,qu as renderContextMarkdown,Gc as renderExtensionDescribeMarkdown,$c as renderExtensionSurfaceMarkdown,Hf as renderGuideMarkdown,GM as renderMissingOptionRetry,XP as renderNextMarkdown,zM as renderPmClosedDomainHelp,dn as renderPmCommand,No as renderPmCommandAliasMigrationHint,bc as renderPmCommandVisibilityMarkdown,nL as renderPmFlagLexiconMarkdown,Zk as renderPmMcpAppHtml,xN as renderPmRefusalClosureCensusMarkdown,$A as renderRowsAsCsv,FA as renderRowsAsTable,eh as reopen,sw as replayHistoryToTarget,FE as replayToCanonicalItemDocument,$E as replayToItemDocument,eE as requireHistoryOperation,tP as requireTerminalReason,rP as requireTerminalReasonWithRecovery,ME as resealHistoryRewrite,xC as resetActiveExtensionRuntimeState,bl as resetWorkspaceGraphCache,ci as resolveAgentSessionContextFromSignals,il as resolveAnnotationIndex,rl as resolveAnnotationInput,CE as resolveAuthor,Ai as resolveAuthorIdentity,RA as resolveBodyFileContent,ay as resolveBuiltinCorpusShape,wu as resolveCalendarOutputFormat,OO as resolveCanonicalPmErrorCodeContract,Mb as resolveCanonicalRelationshipKind,bE as resolveClaimPrincipal,AA as resolveCliBulkIdsInput,nC as resolveCommandOptionPolicyState,Gx as resolveCompileCacheGeneration,$P as resolveCompletionTimestamp,Wb as resolveConfiguredPmPackageRoot,gO as resolveContentFieldFilters,wS as resolveContextIntentContract,Mu as resolveContextOutputFormat,ku as resolveContextTokenBudget,nP as resolveCreateExplicitEmptyFlag,iM as resolveEffectiveSearchMode,XA as resolveEmbeddingProviders,Bc as resolveExtensionInstallSourceIdentity,Hi as resolveExtensionMigrationStatePath,CC as resolveExtensionRoots,sO as resolveExternalDependencyReference,_C as resolveFlagValueKind,aC as resolveGlobalPmRoot,zf as resolveGuideOutputFormat,zm as resolveHistoryEpisodeGroupIdentity,iE as resolveHistoryHashAlgorithm,QS as resolveHistoryOperation,dP as resolveHistoryProvenanceDimensions,Ow as resolveHistorySubject,nw as resolveHistoryTarget,aM as resolveHybridSemanticWeight,Ho as resolveImplicitPmRoot,dS as resolveIsoOrRelative,Vv as resolveItemBlockers,Uv as resolveItemExecutionRole,XM as resolveItemMutationDocument,Vo as resolveItemTypeRegistry,aE as resolveItemTypesFilePath,ff as resolveLinkedTestFailureExitCode,Pp as resolveLinkedTestSourceRef,Mp as resolveLinkedTestSourceWorkspaceRoot,Lp as resolveLinkedTestTrust,Dp as resolveLinkedTestTrustBatch,pg as resolveMcpAcknowledgedSubscriptionFilter,We as resolveMcpRequestContext,wc as resolveMergeInstallContext,hO as resolveMissingMetadataFilters,FM as resolveMissingOptionPlaceholder,QC as resolveModePairedOutputOmissionReceipt,HP as resolveNextOutputFormat,rT as resolveOutputOmissionReceipt,Kb as resolvePmCliVersion,xo as resolvePmCommandAlias,Be as resolvePmCommandCapabilityFamily,kt as resolvePmCommandExitContract,N as resolvePmCommandOperation,Fn as resolvePmCommandOutputBudget,Mt as resolvePmCommandOutputEnvelope,Bw as resolvePmCommandPositionalContract,qe as resolvePmCommandVisibilityTier,Un as resolvePmDiagnosticOutputBudget,RO as resolvePmErrorCodeContract,ib as resolvePmFlagSemanticConcept,Me as resolvePmHistoryOperation,Hb as resolvePmPackageRootFromModule,qw as resolvePmPositionalActionContract,Ma as resolvePmPositionalActionFlagContracts,Ne as resolvePmRoot,Gd as resolvePmToolCustomFieldCollision,xA as resolvePriority,zt as resolveProfile,Oc as resolveProjectMergeTypeFolders,lT as resolveQueryCursorStart,rS as resolveReadOutputDimensions,sS as resolveReadOutputEncoding,wT as resolveReadOutputRecoveryBudget,JT as resolveReadOutputSurface,tT as resolveReadRowContract,$M as resolveRecoveryCommandName,sA as resolveRegisteredSearchProvider,aA as resolveRegisteredVectorStoreAdapter,td as resolveReproducibleProcessEnvironment,Yn as resolveRuntimeFieldRegistry,Xn as resolveRuntimeStatusRegistry,YA as resolveSearchCorpusFields,nM as resolveSearchMaxResults,lM as resolveSearchPage,sM as resolveSearchScoreThreshold,dM as resolveSearchTuning,ZA as resolveSemanticCorpusCharacterLimit,fu as resolveSemanticLineageIds,HA as resolveSettingsWithSemanticRuntimeDefaults,mR as resolveSourceContextWritePolicy,Tu as resolveStartTaskInProgressStatus,Q as resolveSubcommandFlagContractsForCommand,Bb as resolveTelemetryErrorCategory,eP as resolveTerminalReason,oC as resolveTypeDefinition,rC as resolveTypeName,DA as resolveTypeSynonym,qA as resolveTypeWorkflows,cl as resolveUnknownAuthorAcknowledgmentSelector,_M as resolveVectorIndexRecovery,ev as resolveVectorStores,tc as resolveWorkspaceRelationshipKindRegistry,sC as resolveWorkspaceRoot,ah as restore,oA as restoreCheckpointItems,ZE as restoreWorkspaceJsonFromHistory,Um as restoreWorkspaceSnapshot,Gm as restoreWorkspaceSnapshotWithRecovery,Ph as runAction,jC as runActiveBeforeMutationHooks,qC as runActiveCommandHandler,BC as runActiveOnIndexHooks,nn as runActiveOnReadHooks,on as runActiveOnWriteHooks,zC as runActiveParserOverride,VC as runActivePreflightOverride,HC as runActiveServiceOverride,Ru as runActivity,bC as runAfterCommandHooks,ym as runAggregate,nl as runAnnotationCommand,zp as runAppend,UI as runAssuranceAction,jI as runAssuranceDispatch,yC as runBeforeCommandHooks,Ou as runCalendar,Wu as runClaim,Xu as runClaimNext,Hp as runClose,Wp as runCloseMany,Qu as runCloseTask,ml as runComments,Kf as runCompletion,fl as runConfig,Ut as runContext,vP as runContextEvaluationCorpus,wP as runContextEvaluationScenario,Xp as runCopy,uu as runCreate,mu as runDelete,Cl as runDeps,$l as runDocs,qR as runDuplicates,Im as runEval,Mm as runEvent,qc as runExtension,Yi as runExtensionMigrateAction,Xi as runExtensionMigrations,Vl as runFiles,Kl as runFilesDiscover,Hl as runFilesLookup,ef as runFleetAttributionAnalytics,Cu as runFocus,jp as runGc,bm as runGet,vp as runGraph,Vf as runGuide,Op as runHealth,oM as runHistory,ZI as runHistoryAttest,qI as runHistoryCompact,HI as runHistoryCompactBulk,EI as runHistoryMaintenance,KI as runHistoryRedact,AI as runHistoryRepair,OI as runHistoryRepairAll,Xc as runInit,Hc as runInitAgentGuidance,qp as runLearnings,Ll as runLinkedArtifacts,_f as runLinkedTests,uc as runList,Pm as runMeet,bM as runMergeDriver,Pc as runMergeInstall,_I as runMergeReceiptEvidenceReport,fI as runMergeReceiptReport,CM as runMergeReconcile,Hu as runNext,nm as runNotes,Zu as runPauseTask,rm as runPlan,mm as runProfileApply,um as runProfileLint,lm as runProfileList,pm as runProfileShow,Zm as runProvenanceCoverageAnalytics,h0 as runRegisteredCommandForTest,T0 as runRegisteredCommandOverrideForTest,R0 as runRegisteredExporterForTest,y0 as runRegisteredHookForTest,O0 as runRegisteredImporterForTest,v0 as runRegisteredMigrationForTest,g0 as runRegisteredMutationGuardForTest,b0 as runRegisteredParserOverrideForTest,C0 as runRegisteredPreflightOverrideForTest,S0 as runRegisteredRendererOverrideForTest,w0 as runRegisteredSearchProviderForTest,E0 as runRegisteredServiceOverrideForTest,A0 as runRegisteredVectorStoreAdapterForTest,Zt as runReindex,Yu as runRelease,km as runRemind,sP as runReopen,Kp as runRestore,Nc as runSchemaEvolutionMigration,Cm as runSearch,ly as runSearchRefreshWorkerEntrypoint,Wf as runStartBackgroundRun,Ju as runStartTask,af as runStats,cf as runTelemetry,dm as runTemplatesList,am as runTemplatesSave,cm as runTemplatesShow,hf as runTest,gf as runTestAll,Xf as runTestRunsList,Jf as runTestRunsLogs,Qf as runTestRunsResume,Yf as runTestRunsStatus,Zf as runTestRunsStop,e_ as runTestRunsWorker,Su as runUpdate,om as runUpdateMany,Ft as runUpgrade,Up as runValidate,Ih as runWithActiveExtensions,L as runWithAgentSessionContext,QE as runWithConfigurationOnlySettings,SS as runWithContextIntentContracts,BS as runWithDiscoveredContextIntentContracts,yi as runWithHarnessDetectionSignals,qk as runWithMcpTraceContext,od as runWithReproducibleProcessEnvironment,bi as runWithWorkspaceHarnessSignalDescriptors,jr as runWithWorkspaceRecipe,PR as runWorkflowPolicyAction,BI as runWorkspaceTransactionGc,Ep as saveGraphAuditBaseline,MI as scanClosureTimestamps,YR as scanExtensionHostVersions,al as scanHistoryAuthorAttribution,ri as scanItemFormatVersions,ad as scanMutationSecrets,QR as scanProvenanceResolverHealth,bd as scanStaleInProgressItems,NI as scanStorageIntegrity,S_ as schema,I_ as schemaAddField,O_ as schemaAddStatus,A_ as schemaAddType,x_ as schemaApplyPreset,N_ as schemaInferTypes,E_ as schemaList,M_ as schemaListFields,$_ as schemaRemapStatus,P_ as schemaRemoveField,R_ as schemaRemoveStatus,v_ as schemaRemoveType,D_ as schemaRenameField,L_ as schemaRenameType,w_ as schemaShow,k_ as schemaShowField,F_ as schemaShowStatus,UM as scoreCommandPathMatch,CP as scoreContextCandidates,TP as scoreContextCandidatesWithActiveExtensions,hd as scoreItemSimilarity,KN as scorePmGrammarRefusalClosure,DN as scorePmRefusalClosure,gd as scorePreparedItemSimilarity,YN as scoreTrackerPreflightRecoveryClosure,IE as sealHistoryRecord,lk as sealMcpRequestState,n_ as search,zP as searchWorkspaceMemory,VP as searchWorkspaceMemoryReadResult,Kv as selectActionableEntries,nT as selectCursorSemanticOptions,Uf as selectImportAuthor,Fk as selectMcpClientRegistrationMode,qP as selectWorkspaceMemory,BP as selectWorkspaceMemoryRollups,bu as semanticAttributionAffinity,gv as sentryCaptureCliError,hv as sentryFinishCommandSpan,bv as sentryFlush,yv as sentryLogCliUsageError,fv as sentrySetCommandContext,_v as sentryStartCommandSpan,si as serializeItemDocument,VM as serializeNdjsonRows,HM as serializeNdjsonStream,Qg as serveDeclaredObservation,NC as setActiveCommandContext,LC as setActiveCommandResult,OC as setActiveExtensionCommands,vC as setActiveExtensionHooks,RC as setActiveExtensionParsers,IC as setActiveExtensionPreflight,kC as setActiveExtensionRegistrations,MC as setActiveExtensionRenderers,PC as setActiveExtensionServices,gE as setFocusedItem,vv as shouldCompletePlanOnClose,Tp as shouldPersistDurableGraphCache,bA as shouldResolveMutationStdinTokenField,yA as shouldResolveMutationStdinTokens,WA as shouldRunSearchRefreshInForeground,Fl as similarityAdvisoryWarnings,mT as sliceReadOutputRowCollection,kl as sortLinkedArtifacts,dA as splitAcceptanceCriteria,Ev as splitCommaList,ii as splitFrontMatter,oS as stabilizeReadOutputReceiptEstimates,I as stableStringify,gC as stableValueEquals,ch as startTask,Rv as startTelemetryCommand,d_ as stats,cE as statusIsTerminal,Na as stripGlobalBootstrapTokens,EM as subscribeMutationEventBatches,wM as subscribeMutationEvents,GR as summarizeAgentIdentityVocabulary,Hm as summarizeAgentModelProvenance,Km as summarizeAgentProvenance,AP as summarizeContextEvaluationReports,lf as summarizeContextPreflight,mP as summarizeHistoryProvenance,Kc as summarizeInitResult,lI as summarizeMergeReceipt,iP as supportsCreateExplicitEmpty,Jw as supportsItemIdAlias,zb as suppressHostOutput,we as syncRelationshipGraphAdapter,l0 as synthesizeExtensionManifest,ka as toCompletionFlagString,ju as toContextFocusItem,Fu as toContextPackingSummary,Gu as toContextRankingSummary,Yb as toErrorMessage,Af as toEstimatedMinutesValue,NM as toExtensionFlagDefinitions,Pf as toImportBoolean,Nf as toImportConfidence,If as toImportInteger,Ff as toImportLinkedDocs,$f as toImportLinkedFiles,Gf as toImportLinkedTests,Df as toImportLogEntries,Lf as toImportNormalizedEnum,xf as toImportNumberMap,vf as toImportPriority,Rf as toImportStatus,Mf as toImportStringList,kf as toImportStringMap,Of as toImportTags,_E as toItemRecord,wf as toNonEmptyImportString,Xb as toNonEmptyStringOrUndefined,GE as toReplayDocument,fd as tokenizeSimilarityText,gA as transferMutationStdinTokenPolicy,mC as translateHostEnvironmentFault,Q_ as update,Oh as upgrade,z_ as validate,YO as validateAssertionDefinition,ZO as validateAssuranceDocument,JO as validateGateDefinition,JM as validateItemMutationRows,Nl as validateLinkedPaths,Gk as validateMcpAuthorizationResponseIssuer,$k as validateMcpAuthorizationServerMetadata,Uk as validateMcpClientMetadataDocument,Ik as validateMcpHttpRequestHeaders,fk as validateMcpJsonSchema,XO as validateMeasurementDefinition,MA as validateMissingParentReference,ZT as validateReadOutputOptions,NA as validateSprintOrReleaseValue,iC as validateTypeOptions,$w as validateWorkspaceTransactionIdentity,JI as verifyAttestation,wO as verifyCliFlagInvocationParity,Hw as verifyExplicitPositionalSlotCensus,BE as verifyHistoryChain,jE as verifyHistoryChainWithVersion,Rw as verifyHistoryEntries,PE as verifyHistoryRecordHash,kE as verifyHistoryRewriteEvidence,Yw as verifyPmCliGrammar,Xw as verifyPmCommandPositionalContracts,oL as verifyPmFlagLexicon,ON as verifyPmRecoveryKindRuntimeCoverage,Xy as verifyPmRecoveryProducerRuntimeCoverage,vN as verifyPmRecoveryReferences,MN as verifyPmRefusalClosureIdentityRatchet,PN as verifyPmRefusalClosureRatchet,AN as verifyPmRefusalReachability,Cd as verifyToolOptionCliParity,Ji as withFlagAliasMetadata,fC as withHostEnvironmentBoundary,mk as withMcpCachePolicy,kT as workflowApprovalFingerprint,xT as workflowPolicyApplies,MT as workflowPolicyFingerprint,yl as workspaceGraphCache,ol as wrapOwnershipConflict,KS as wrapThrownErrorForSentry,Ei as writeAuthorEnvironment,xe as writeFileAtomic,tA as writeMutationCheckpoint,rw as writeSettings,NS as writeStderr,xS as writeStdout,lv as writeVectorizationStatusLedger,YE as writeWorkspaceJsonWithHistory};
|
|
25
|
+
</html>`}import{createHash as st}from"node:crypto";import{lstat as Bg,readdir as Ur,readFile as qg}from"node:fs/promises";import P from"node:path";import{parseDocument as zg}from"yaml";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="eafd8bc3-0da1-5220-8fb1-6967eecdb6bf")}catch{}})();var xr="io.modelcontextprotocol/skills",at="SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03",Vg=Object.freeze({revision:at,status:"draft",directoryRead:!0});function ux(e,t=!1){let r=e.clientCapabilities.extensions,o=h(r)?r[xr]:void 0;if(!h(o)||o.revision!==at||t&&o.directoryRead!==!0)throw new u("Missing or incompatible Skills over MCP draft capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[xr]:Vg}}})}var M=Object.freeze({maxFilesPerSkill:512,maxFileBytes:16*1024*1024,maxSkillBytes:16*1024*1024,defaultPageSize:20,maxPageSize:100}),Nr=100,Hg=32*1024*1024,Kg=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Lr=new Set(Array.from({length:M.maxPageSize},(e,t)=>t+1));function C(e,t){throw new u(e,-32602,t)}function Dr(e,t){try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),e.endsWith(".md")?"text/markdown":"text/plain"}catch{return"application/octet-stream"}}function Wg(e,t){let r=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/u.exec(e);r||C(`Skill ${t} is missing YAML frontmatter.`);let o=zg(r[1],{prettyErrors:!1,strict:!0,uniqueKeys:!0});o.errors.length>0&&C(`Skill ${t} has invalid YAML frontmatter.`,{errors:o.errors.map(s=>s.message)});let n;try{n=o.toJS({maxAliasCount:0})}catch(s){C(`Skill ${t} has unsupported YAML aliases.`,{error:String(s)})}return(typeof n!="object"||n===null||Array.isArray(n))&&C(`Skill ${t} frontmatter must be an object.`),n}async function Xg(e,t,r,o){return r>M.maxFileBytes&&C(`Skill resource exceeds the per-file limit: ${t}.`),o.files+=1,o.files>M.maxFilesPerSkill&&C(`Skill exceeds ${M.maxFilesPerSkill} files.`),o.skillBytes+=r,o.skillBytes>M.maxSkillBytes&&C(`Skill exceeds the aggregate byte limit: ${t}.`),o.originBytes.value+=r,o.originBytes.value>Hg&&C(`Skill origin exceeds the aggregate byte limit: ${t}.`),qg(e)}async function jr(e,t,r){let o=P.join(e,t),n=await Ur(o,{withFileTypes:!0}),s=[];for(let i of n.sort((a,d)=>a.name.localeCompare(d.name))){let a=P.posix.join(t.split(P.sep).join("/"),i.name),d=P.join(e,...a.split("/")),c=await Bg(d);c.isSymbolicLink()&&C(`Skill resource must not be a symbolic link: ${a}.`),c.isDirectory()?s.push(...await jr(e,a,r)):c.isFile()?s.push({relative:a,bytes:await Xg(d,a,c.size,r)}):C(`Skill resource must be a regular file or directory: ${a}.`)}return s}async function $r(e,t,r){let o=new Map,n;try{n=await Ur(e,{withFileTypes:!0})}catch(a){if(bt(a))return o;throw a}let s=n.filter(a=>a.isDirectory()&&Kg.test(a.name)).sort((a,d)=>a.name.localeCompare(d.name));s.length>Nr&&C(`Skill origin exceeds ${Nr} directories.`);let i={value:0};for(let a of s){let d=await jr(P.join(e,a.name),"",{files:0,skillBytes:0,originBytes:i}),c=d.reduce((g,T)=>g+T.bytes.byteLength,0),l=d.find(g=>g.relative==="SKILL.md");if(!l)continue;let p=Wg(l.bytes.toString("utf8"),a.name);p.name!==a.name&&C(`Skill directory ${a.name} must match frontmatter name.`,{actual:p.name??null,expected:a.name}),(typeof p.description!="string"||p.description.trim().length===0)&&C(`Skill ${a.name} requires a non-empty frontmatter description.`,{required:["description"]});let f=d.map(g=>({uri:`skill://${a.name}/${g.relative}`,digest:`sha256:${st("sha256").update(g.bytes).digest("hex")}`,size:g.bytes.byteLength})),_=st("sha256").update(f.map(g=>`${g.uri}:${g.digest}`).join(`
|
|
26
|
+
`)).digest("hex");o.set(a.name,{uri:`skill://${a.name}/SKILL.md`,frontmatter:p,resources:f,_meta:{contractVersion:1,extensionRevision:at,origin:t,packageVersion:r,protocolVersion:V,trust:"untrusted",estimatedTokens:Math.ceil(c/4)},files:new Map(d.map(g=>[g.relative,g.bytes])),fingerprint:_})}return o}function Fr(e){let{files:t,fingerprint:r,...o}=e;return o}var Gr=class e{#e;#t;constructor(t){this.#e=t,this.#t=st("sha256").update([...t.entries()].sort(([r],[o])=>r.localeCompare(o)).map(([r,o])=>`${r}:${o.fingerprint}`).join(`
|
|
27
|
+
`)).digest("hex").slice(0,16)}#r(t,r){if(!t)return 0;try{let o=JSON.parse(Buffer.from(t,"base64url").toString("utf8"));return(typeof o!="object"||o===null||!("fingerprint"in o)||o.fingerprint!==this.#t||!("scope"in o)||o.scope!==r||!("offset"in o)||!Number.isInteger(o.offset)||Number(o.offset)<0)&&C("Skill cursor is invalid or stale."),Number(o.offset)}catch(o){if(o instanceof u)throw o;return C("Skill cursor is invalid or stale.")}}#o(t,r){return Buffer.from(JSON.stringify({fingerprint:this.#t,offset:t,scope:r})).toString("base64url")}static async load(t){let r=await $r(P.join(t.packageRoot,".agents","skills"),"package",t.packageVersion);if(t.workspaceRoot){let o=P.resolve(t.packageRoot,".agents","skills"),n=P.resolve(t.workspaceRoot,".agents","skills");if(n!==o){let s=await $r(n,"workspace",t.packageVersion);for(let[i,a]of s)r.set(i,a)}}return new e(r)}list(t={}){let r=t.limit??M.defaultPageSize;Lr.has(r)||C(`Skill list limit must be an integer from 1 to ${M.maxPageSize}.`);let o=this.#r(t.cursor,"skills/list"),n=[...this.#e.values()].sort((d,c)=>d.uri.localeCompare(c.uri)),s=n.slice(o,o+r),i=o+s.length,a=i<n.length;return{skills:s.map(Fr),hasMore:a,...a?{nextCursor:this.#o(i,"skills/list")}:{}}}get(t){let r=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/SKILL\.md$/u.exec(t),o=r?this.#e.get(r[1]):void 0;return o||C(`Unknown pm MCP skill: ${t}.`,{field:"uri"}),Fr(o)}read(t){let r=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/(.+)$/u.exec(t),o=r?this.#e.get(r[1]):void 0,n=r?.[2]??"",s=o&&n?o.files.get(n):void 0,i=o?.resources.find(c=>c.uri===t);(!o||!s||!i)&&C(`Unknown pm MCP skill resource: ${t}.`,{field:"uri"});let a={digest:i.digest,origin:o._meta.origin,trust:"untrusted"},d=Dr(n,s);return d!=="application/octet-stream"?{contents:[{uri:t,mimeType:d,text:s.toString("utf8"),_meta:a}]}:{contents:[{uri:t,mimeType:d,blob:s.toString("base64"),_meta:a}]}}readDirectory(t,r={}){let o=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(.+))?$/u.exec(t),n=o?this.#e.get(o[1]):void 0;n||C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let s=(o?.[2]??"").replace(/\/$/u,""),i=s.length>0?`${s}/`:"",a=`skill://${o[1]}`,d=new Map;for(let T of n.resources){let w=T.uri.slice(`${a}/`.length);if(!w.startsWith(i))continue;let q=w.slice(i.length),[I,...Ao]=q.split("/"),vo=`${a}/${i}${I}`,Oo=n.files.get(`${i}${I}`);d.set(I,{uri:vo,name:I,mimeType:Ao.length>0?"inode/directory":Dr(I,Oo)})}s.length>0&&d.size===0&&C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let c=r.limit??M.maxPageSize;Lr.has(c)||C(`Skill directory limit must be an integer from 1 to ${M.maxPageSize}.`);let l=this.#r(r.cursor,t),p=[...d.values()].sort((T,w)=>T.uri.localeCompare(w.uri)),f=p.slice(l,l+c),_=l+f.length,g=_<p.length;return{resources:f,hasMore:g,...g?{nextCursor:this.#o(_,t)}:{}}}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38023567-8a5b-5e25-8d71-5112f74d1894")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2b24276b-948b-50bd-bfd9-f429cd74be70")}catch{}})();var Br="https://schema.unbrained.dev/pm/workspace-recipe/v1";function dt(e,t){if(e===null||typeof e=="boolean"||typeof e=="string")return e;if(typeof e=="number"){if(!Number.isFinite(e))throw new Error(`Workspace recipe JSON number must be finite at ${t}`);return e}if(Array.isArray(e))return Object.freeze(e.map((r,o)=>dt(r,`${t}[${o}]`)));if(typeof e!="object"||Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw new Error(`Workspace recipe input must contain JSON values at ${t}`);return Object.freeze(Object.fromEntries(Object.entries(e).map(([r,o])=>[r,dt(o,`${t}.${r}`)])))}function Ae(e){if(e.schema!==Br)throw new Error(`Unsupported workspace recipe schema: ${e.schema}`);let t=St(e);if(e.operations.some(r=>r.action.trim().length===0||r.input===null||Array.isArray(r.input)))throw new Error("Workspace recipe operations require an action and object input");return Object.freeze({...t,operations:Object.freeze(e.operations.map((r,o)=>Object.freeze({action:r.action,input:dt(r.input,`operations[${o}].input`)})))})}async function qr(e,t){let r=Ae(e);return Et(r,t)}async function Yg(e,t){return qr(e,async()=>{let r=[];for(let[o,n]of e.operations.entries())r.push(await t(n,o));return r})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c234be1c-35b7-5388-8a70-a012e9a34389")}catch{}})();var zr="pm.agent-observation/v1",Vr="pm.agent-verdict/v1",Hr="pm.agent-episode/v1";function O(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer.`)}function k(e,t){if(e.trim().length===0)throw new Error(`${t} must not be empty.`)}function oe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))oe(t)}return e}function Jg(e){if(e.length===0)throw new Error("observation.reads must declare at least one bounded read.");let t=0;for(let r of e)if(k(r.command,"observation.reads.command"),O(r.budget_tokens,"observation.reads.budget_tokens"),t+=r.budget_tokens,!Number.isSafeInteger(t))throw new Error("observation read ceilings exceed safe integer range.")}function Zg(e){if(e.basis!=="emitted_bytes")throw new Error("observation calibration must use emitted_bytes.");for(let r of e.samples)if(!Number.isSafeInteger(r)||r<0)throw new Error("observation calibration samples must be non-negative safe integers.");if(e.samples.length===0)throw new Error("observation calibration must include at least one sample.");if(O(e.expected_emitted_bytes,"observation.calibration.expected_emitted_bytes"),!Number.isSafeInteger(e.tolerance_bytes)||e.tolerance_bytes<0)throw new Error("observation.calibration.tolerance_bytes must be a non-negative safe integer.");let t=e.samples.reduce((r,o)=>r+o,0)/e.samples.length;if(Math.abs(t-e.expected_emitted_bytes)>e.tolerance_bytes)throw new Error("observation expected_emitted_bytes is outside the calibrated sample tolerance.")}function Qg(e){if(e.length===0)throw new Error("observation.tiers must declare a degradation ladder.");let t=new Set,r=Number.POSITIVE_INFINITY;for(let o of e){if(k(o.id,"observation.tiers.id"),O(o.max_tokens,"observation.tiers.max_tokens"),t.has(o.id))throw new Error(`Duplicate observation tier: ${o.id}.`);if(t.add(o.id),o.max_tokens>r)throw new Error("observation tiers must be ordered from largest to smallest max_tokens.");r=o.max_tokens;let n=new Set;for(let s of o.fields){if(F(s,"observation.tiers.fields"),n.has(s))throw new Error(`Duplicate observation tier field: ${s}.`);n.add(s)}}}function ey(e){if(e.schema!==zr)throw new Error(`observation.schema must be ${zr}.`);return k(e.id,"observation.id"),O(e.version,"observation.version"),Jg(e.reads),Zg(e.calibration),e.corpus_dependence.kind==="bounded"&&(k(e.corpus_dependence.dimension,"observation.corpus_dependence.dimension"),O(e.corpus_dependence.maximum,"observation.corpus_dependence.maximum")),Qg(e.tiers),oe(structuredClone(e))}function Cx(e){return{contract_id:e.id,contract_version:e.version,guaranteed_ceiling_tokens:e.reads.reduce((t,r)=>t+r.budget_tokens,0),expected_emitted_bytes:e.calibration.expected_emitted_bytes,expected_tokens:Math.ceil(e.calibration.expected_emitted_bytes/4),tolerance_bytes:e.calibration.tolerance_bytes,calibration_basis:"emitted_bytes",corpus_dependence:e.corpus_dependence}}async function ty(e,t,r){O(r.budget_tokens,"observation request budget_tokens");let o=[];for(let[n,s]of e.tiers.entries()){o.push(s.id);let i=await t(s),a=Buffer.byteLength(R(i),"utf8"),d=Math.ceil(a/4);if(d<=Math.min(r.budget_tokens,s.max_tokens))return{status:"served",payload:i,receipt:{contract_id:e.id,contract_version:e.version,served_tier:s.id,degraded:n>0,attempted_tiers:o,emitted_bytes:a,estimated_tokens:d,calibration_basis:"emitted_bytes"}}}return{status:"refused",reason:"no_declared_tier_fits_budget",receipt:{contract_id:e.id,contract_version:e.version,served_tier:null,degraded:e.tiers.length>1,attempted_tiers:o,emitted_bytes:null,estimated_tokens:null,calibration_basis:"emitted_bytes"}}}function F(e,t){let r=e.split(".");if(r.some(o=>o.length===0||o==="__proto__"||o==="prototype"||o==="constructor"))throw new Error(`${t} must be a safe, non-empty dot-separated path.`);return r}function Kr(e,t){let r=e;for(let o of F(t,"recorded field path")){if(r===null||typeof r!="object"||!Object.hasOwn(r,o))return;r=r[o]}return r}function ry(e){return`/${F(e,"verdict predicate path").map(t=>t.replaceAll("~","~0").replaceAll("/","~1")).join("/")}`}function oy(e){if(e.kind!=="field_equals")return;let t;try{t=JSON.stringify(e.expected)}catch{throw new Error(`Expected value for verdict predicate ${e.id} must be JSON serializable.`)}if(t===void 0)throw new Error(`Expected value for verdict predicate ${e.id} must be JSON serializable.`)}function ny(e){if(e.schema!==Vr)throw new Error(`verdict.schema must be ${Vr}.`);k(e.id,"verdict.id"),O(e.version,"verdict.version");let t=new Set;for(let o of e.predicates){k(o.id,"verdict.predicates.id"),F(o.path,"verdict.predicates.path");let n=o.kind;if(n!=="field_equals"&&n!=="field_present"&&n!=="field_absent")throw new Error(`Unsupported verdict predicate kind for ${o.id}.`);if(t.has(o.id))throw new Error(`Duplicate verdict predicate: ${o.id}.`);oy(o),t.add(o.id)}if(e.composition.operator!=="all"&&e.composition.operator!=="any")throw new Error("verdict composition operator must be all or any.");if(e.composition.predicate_ids.length!==e.predicates.length)throw new Error("verdict composition must reference every predicate exactly once.");let r=new Set(e.composition.predicate_ids);if(r.size!==e.composition.predicate_ids.length||[...r].some(o=>!t.has(o)))throw new Error("verdict composition contains duplicate or unknown predicate ids.");return oe(structuredClone(e))}function iy(e,t){if(e.predicates.length===0)return{contract_id:e.id,contract_version:e.version,snapshot_id:t.snapshot_id,outcome:"not_applicable",score:null,policy:"verdict_only_no_reward",reason:"no_predicates_declared",predicates:[]};let r=new Map(e.predicates.map(i=>[i.id,i])),o=e.composition.predicate_ids.map(i=>{let a=r.get(i),d=Kr(t.state,a.path),c=a.kind==="field_present"?d!==void 0:a.kind==="field_absent"?d===void 0:R(d)===R(a.expected);return{id:i,outcome:c?"satisfied":"violated",evidence_pointer:`${t.snapshot_id}#${ry(a.path)}`,evidence_digest:Tt(R(d))}}),n=o.filter(i=>i.outcome==="satisfied").length,s=e.composition.operator==="all"?n===o.length:n>0;return{contract_id:e.id,contract_version:e.version,snapshot_id:t.snapshot_id,outcome:s?"satisfied":"violated",score:n/o.length,policy:"verdict_only_no_reward",predicates:o}}function wx(e){if(e.schema!==Hr)throw new Error(`episode.schema must be ${Hr}.`);if(k(e.id,"episode.id"),O(e.version,"episode.version"),!["benchmark","evaluation","training","scale_transfer"].includes(e.mode))throw new Error("episode.mode is not supported.");if(e.task_item_ids.length===0)throw new Error("episode.task_item_ids must declare at least one pm item.");for(let t of e.task_item_ids)k(t,"episode.task_item_ids");O(e.limits.max_actions,"episode.limits.max_actions"),O(e.limits.max_observations,"episode.limits.max_observations"),O(e.limits.max_tokens_per_observation,"episode.limits.max_tokens_per_observation");for(let t of e.observable_fields)F(t,"episode.observable_fields");for(let t of e.withheld_fields)F(t,"episode.withheld_fields");for(let t of e.observable_fields){let r=e.withheld_fields.find(o=>t===o||t.startsWith(`${o}.`)||o.startsWith(`${t}.`));if(r!==void 0)throw new Error(`Observable field ${t} overlaps withheld field ${r}.`)}for(let t of e.observation.tiers)for(let r of t.fields)if(!e.observable_fields.includes(r))throw new Error(`Observation tier field ${r} is not declared observable.`);return ey(e.observation),ny(e.verdict),Ae(e.recipe),oe(structuredClone(e))}function sy(e,t,r){let o=F(t,"observation projection field"),n=e;for(let[s,i]of o.entries()){if(s===o.length-1){r!==void 0&&(n[i]=structuredClone(r));return}let a=n[i];(a===null||typeof a!="object"||Array.isArray(a))&&(n[i]={}),n=n[i]}}function ay(e,t){let r={};for(let o of t)sy(r,o,Kr(e,o));return r}async function Sx(e,t){let r=[],o=0,n=0,s=!1,i,a={episode:{id:e.id,label:`pm agent environment v${e.version}`},provenance:{role:e.mode,topic:"agent-environment"}},d=await D(a,()=>t.reset(e.recipe));r.push({sequence:1,kind:"reset",state_id:d.state_id});let c=async()=>{if(s)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let p=await t.readRecordedState(),f=await ty(e.observation,async _=>ay(p.state,_.fields),{budget_tokens:e.limits.max_tokens_per_observation});return r.push({sequence:r.length+1,kind:"observation",state_id:f.receipt.served_tier??p.snapshot_id}),f},l=async(p=!1)=>{if(s&&!p)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let f=await t.readRecordedState(),_=iy(e.verdict,f);return r.push({sequence:r.length+1,kind:"verdict",state_id:f.snapshot_id}),_};return{observe:()=>D(a,c),step:async p=>{if(s)throw new Error("episode is already closed.");if(o>=e.limits.max_actions)throw new Error("episode exceeded limits.max_actions.");o+=1;let f=await D(a,()=>t.execute(p));return r.push({sequence:r.length+1,kind:"action",state_id:f.state_id}),f},score:()=>D(a,l),close:()=>i!==void 0?i:s?Promise.reject(new Error("episode is already closed.")):(s=!0,i=D(a,()=>l(!0)).then(p=>(r.push({sequence:r.length+1,kind:"close",state_id:p.snapshot_id}),{verdict:p,trajectory:oe(structuredClone(r))})).catch(p=>{throw s=!1,p}).finally(()=>{i=void 0}),i)}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="14472bc2-ebca-5b9c-9462-bd8694b630a0")}catch{}})();var G="https://schema.unbrained.dev/pm/corpus-shape/v1";function K(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError(`Corpus shape ${t} must be a positive safe integer`);return e}function ne(e,t){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Corpus shape ${t} must be a non-negative safe integer`);return e}function Xr(e){if(!(typeof e!="object"||e===null||Object.isFrozen(e))){for(let t of Object.values(e))Xr(t);Object.freeze(e)}}function W(e){if(e.schema!==G)throw new TypeError(`Unsupported corpus shape schema: ${e.schema}`);if(e.name.trim().length===0||e.description.trim().length===0)throw new TypeError("Corpus shape name and description must be non-empty");if(K(e.hierarchy_depth,"hierarchy_depth"),K(e.hierarchy_fanout,"hierarchy_fanout"),ne(e.age_span_days,"age_span_days"),K(e.history_entries_per_item,"history_entries_per_item"),ne(e.comments_per_100_items,"comments_per_100_items"),ne(e.notes_per_100_items,"notes_per_100_items"),ne(e.learnings_per_100_items,"learnings_per_100_items"),K(e.author_cardinality,"author_cardinality"),K(e.component_count,"component_count"),e.edge_kind_mix.length===0||e.edge_kind_mix.some(r=>r.kind.trim().length===0||r.weight<=0))throw new TypeError("Corpus shape edge_kind_mix requires non-empty kinds with positive weights");if(e.terminal_statuses.some(r=>!e.custom_statuses.includes(r)))throw new TypeError("Corpus shape terminal_statuses must be declared in custom_statuses");let t=structuredClone(e);return Xr(t),t}var ve=[{kind:"implements",weight:5},{kind:"blocked_by",weight:2},{kind:"discovered_from",weight:2},{kind:"verifies",weight:2},{kind:"supersedes",weight:1},{kind:"related",weight:4}],X=Object.freeze({scratch:W({schema:G,name:"scratch",description:"Seconds-old, shallow project with minimal history.",hierarchy_depth:2,hierarchy_fanout:50,age_span_days:0,history_entries_per_item:1,comments_per_100_items:2,notes_per_100_items:1,learnings_per_100_items:1,edge_kind_mix:[{kind:"related",weight:1}],author_cardinality:2,component_count:1,include_cycles:!1,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),representative:W({schema:G,name:"representative",description:"Medium-lived project with rich evidence and typed lineage.",hierarchy_depth:5,hierarchy_fanout:8,age_span_days:730,history_entries_per_item:12,comments_per_100_items:30,notes_per_100_items:12,learnings_per_100_items:10,edge_kind_mix:ve,author_cardinality:32,component_count:1,include_cycles:!1,custom_types:["Experiment"],custom_statuses:["review"],terminal_statuses:[],custom_fields:["domain"]}),"deep-graph":W({schema:G,name:"deep-graph",description:"Deep typed relationship graph with deterministic cycles.",hierarchy_depth:16,hierarchy_fanout:2,age_span_days:3650,history_entries_per_item:6,comments_per_100_items:15,notes_per_100_items:8,learnings_per_100_items:8,edge_kind_mix:ve,author_cardinality:16,component_count:1,include_cycles:!0,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),"multi-decade":W({schema:G,name:"multi-decade",description:"Thirty-year event history with dense per-item evolution.",hierarchy_depth:6,hierarchy_fanout:6,age_span_days:10958,history_entries_per_item:24,comments_per_100_items:40,notes_per_100_items:20,learnings_per_100_items:16,edge_kind_mix:ve,author_cardinality:64,component_count:1,include_cycles:!1,custom_types:["Program"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["portfolio"]}),"disconnected-archive":W({schema:G,name:"disconnected-archive",description:"Multiple disconnected historical project components.",hierarchy_depth:4,hierarchy_fanout:10,age_span_days:7305,history_entries_per_item:8,comments_per_100_items:10,notes_per_100_items:5,learnings_per_100_items:6,edge_kind_mix:ve,author_cardinality:24,component_count:5,include_cycles:!1,custom_types:["Archive"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["archive_source"]})});function dy(){return Object.keys(X).sort().map(e=>X[e])}function cy(e){let t=e.trim().toLowerCase();if(!Object.hasOwn(X,t))throw new TypeError(`Unknown corpus shape "${e}". Available: ${Object.keys(X).join(", ")}`);return X[t]}var Wr=new WeakMap;function Yr(e,t){if(e===0)return[];let r=Wr.get(t);r===void 0&&(r=t.edge_kind_mix.flatMap(n=>Array.from({length:n.weight},()=>n.kind)),Wr.set(t,r));let o=[r[e%r.length]];return t.include_cycles&&e>2&&e%17===0&&o.push("related"),[...new Set(o)]}function ly(e,t,r,o=42){if(ne(t,"item index"),K(r,"item count"),t>=r)throw new RangeError(`Corpus item index ${t} exceeds ${r}`);let n=Math.min(e.component_count,r),s=t%n,i=Math.floor(t/n),a=0,d=1;for(let w=0;w<e.hierarchy_depth;w+=1)a=Math.min(Number.MAX_SAFE_INTEGER,a+d),d=Math.min(Number.MAX_SAFE_INTEGER,d*e.hierarchy_fanout);let c=i%a,l=i-c,p=c===0?void 0:s+(l+Math.floor((c-1)/e.hierarchy_fanout))*n,f=Date.UTC(2026,0,1),_=e.age_span_days*864e5,g=new Date(f+(r===1?0:Math.round(t/(r-1)*_))).toISOString(),T=(t*37+o)%100;return{index:t,id:`pm-s${t.toString(36).padStart(7,"0")}`,...p===void 0?{}:{parent:`pm-s${p.toString(36).padStart(7,"0")}`},component:s,timestamp:g,author:`pm-corpus-agent-${(t+o)%Math.min(e.author_cardinality,r)}`,history_entry_count:e.history_entries_per_item,dependency_kinds:Yr(t,e),has_comment:T<e.comments_per_100_items,has_note:T<e.notes_per_100_items,has_learning:T<e.learnings_per_100_items,...e.custom_types.length>0&&t%11===0?{custom_type:e.custom_types[t%e.custom_types.length]}:{},...e.custom_statuses.length>0&&t%13===0?{custom_status:e.custom_statuses[t%e.custom_statuses.length]}:{}}}var ct=class{shape;authors=new Set;components=new Set;depths=new Map;childCounts=new Map;edgeKinds={};expectedEdgeKinds={};annotations={comments:0,notes:0,learnings:0};annotationFields;planMismatches=[];itemCount=0;observedDepth=0;observedFanout=0;historyEntryCount=0;firstTimestamp=null;lastTimestamp=null;constructor(t){this.shape=t,this.annotationFields=[["comments","has_comment",t.comments_per_100_items],["notes","has_note",t.notes_per_100_items],["learnings","has_learning",t.learnings_per_100_items]]}recordMismatch(t,r){t&&this.planMismatches.push(r)}recordEdgeKinds(t,r){for(let o of r)t[o]=(t[o]??0)+1}add(t){this.itemCount+=1,this.authors.add(t.author),this.components.add(t.component),this.recordMismatch(this.depths.has(t.id),`duplicate_id:${t.id}`);let r=1;if(t.parent!==void 0){let o=this.depths.get(t.parent);this.recordMismatch(o===void 0,`parent_missing:${t.parent}`),r=(o??0)+1;let n=(this.childCounts.get(t.parent)??0)+1;this.childCounts.set(t.parent,n),this.observedFanout=Math.max(this.observedFanout,n)}this.depths.set(t.id,r),this.observedDepth=Math.max(this.observedDepth,r),this.historyEntryCount+=t.history_entry_count,this.recordMismatch(t.history_entry_count!==this.shape.history_entries_per_item,"history_entries_per_item:drift"),this.firstTimestamp=this.firstTimestamp===null||t.timestamp<this.firstTimestamp?t.timestamp:this.firstTimestamp,this.lastTimestamp=this.lastTimestamp===null||t.timestamp>this.lastTimestamp?t.timestamp:this.lastTimestamp;for(let[o,n]of this.annotationFields)this.annotations[o]+=Number(t[n]);this.recordEdgeKinds(this.edgeKinds,t.dependency_kinds),this.recordEdgeKinds(this.expectedEdgeKinds,Yr(t.index,this.shape))}finish(){let t=Math.min(this.shape.author_cardinality,this.itemCount),r=Math.min(this.shape.component_count,this.itemCount),o=[...this.planMismatches,...this.itemCount===0?["item_count:empty"]:[],...this.authors.size===t?[]:[`author_count:${this.authors.size}!=${t}`],...this.components.size===r?[]:[`component_count:${this.components.size}!=${r}`],...this.observedDepth<=this.shape.hierarchy_depth?[]:[`hierarchy_depth:${this.observedDepth}>${this.shape.hierarchy_depth}`],...this.observedFanout<=this.shape.hierarchy_fanout?[]:[`hierarchy_fanout:${this.observedFanout}>${this.shape.hierarchy_fanout}`]];for(let[i,,a]of this.annotationFields){let d=Math.floor(this.itemCount/100),c=this.itemCount%100,l=d*a+Math.max(0,a+c-100),p=d*a+Math.min(a,c),f=this.annotations[i];(f<l||f>p)&&o.push(`${i}:${f}!in[${l},${p}]`)}let n=new Set([...Object.keys(this.edgeKinds),...Object.keys(this.expectedEdgeKinds)]);for(let i of[...n].sort()){let a=this.edgeKinds[i]??0,d=this.expectedEdgeKinds[i]??0;a!==d&&o.push(`edge_kind:${i}:${a}!=${d}`)}let s=[...new Set(o)];return{shape:this.shape.name,item_count:this.itemCount,author_count:this.authors.size,component_count:this.components.size,hierarchy_depth:this.observedDepth,hierarchy_fanout:this.observedFanout,timestamp_range:{first:this.firstTimestamp,last:this.lastTimestamp},history_entry_count:this.historyEntryCount,annotations:{...this.annotations},edge_kinds:{...this.edgeKinds},matches_declaration:s.length===0,mismatches:s}}};function Jr(e){return new ct(e)}function py(e,t){let r=Jr(e);for(let o of t)r.add(o);return r.finish()}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="48d03e9b-14a4-545c-8e5d-5f5f2092a113")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6a6b2905-b6b7-5b46-b87d-8b8287e37745")}catch{}})();async function uy(){let e=$e(process.cwd(),process.env.PM_PATH);await Ot(e,(t,r)=>It(t,r,{apply_runtime_defaults:!0}))}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4534b1c9-de27-5745-88f2-641b00b94714")}catch{}})();async function my(){await Rt()}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c1cb8d82-20a6-5460-a0ff-f55312911218")}catch{}})();var Zr=["lines","branches","functions","statements"];function fy(e,t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError(`Coverage entry for ${e} must be an object.`)}function _y(e,t,r){if(typeof r!="object"||r===null||Array.isArray(r))throw new TypeError(`Coverage entry ${e} has invalid ${t} counts.`);let o=r;if(typeof o.covered!="number"||typeof o.total!="number"||!Number.isInteger(o.covered)||!Number.isInteger(o.total)||o.covered<0||o.total<o.covered)throw new TypeError(`Coverage entry ${e} has invalid ${t} counts.`);return{covered:o.covered,total:o.total}}function hy(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Coverage summary must be a JSON object.");if(!("total"in e))throw new TypeError("Coverage summary is missing the total entry.");let t=[];for(let[r,o]of Object.entries(e)){fy(r,o);for(let n of Zr){let s=_y(r,n,o[n]),i=s.total-s.covered;i>0&&t.push({file:r,metric:n,uncovered:i,...s})}}return t}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var gy=["captured_redacted","captured_verbatim"],yy=[{label:"home directory",pattern:/(?:\/home\/|\/Users\/)[^/\s"']+/u},{label:"GitHub token",pattern:/\b(?:gh[oprsu]_[A-Za-z0-9_]{20,})\b/u},{label:"npm token",pattern:/\bnpm_[A-Za-z0-9]{20,}\b/u},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u}];function v(e){return typeof e=="string"&&e.trim().length>0}function by(e,t){if(typeof t!="object"||t===null||Array.isArray(t))return[{boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} must contain a JSON object.`}];let r=t,o=[];r.boundary_id!==e.id&&o.push({boundary_id:e.id,kind:"fixture_boundary_mismatch",detail:`${e.fixture_path} names ${String(r.boundary_id)} instead of ${e.id}.`}),(r.version!==1||!gy.includes(r.capture_source)||!v(r.capture_provenance)||!Array.isArray(r.redactions)||!r.redactions.every(v)||!("input"in r)||!("observed"in r))&&o.push({boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} lacks captured provenance, redaction metadata, input, or observed output.`});let n=JSON.stringify(t);for(let s of yy)s.pattern.test(n)&&o.push({boundary_id:e.id,kind:"unsafe_fixture",detail:`${e.fixture_path} contains a possible ${s.label}.`});return o}function Ty(e,t){let r=Date.parse(e.waiver_expires_at),o=v(e.waiver_reason)&&v(e.waiver_owner)&&e.waiver_expires_at.endsWith("Z")&&fe(e.waiver_expires_at)&&Number.isFinite(r);return{captured:0,waived:o&&r>=t?1:0,findings:o?r<t?[{boundary_id:e.id,kind:"expired_waiver",detail:`Boundary ${e.id} waiver expired at ${e.waiver_expires_at}.`}]:[]:[{boundary_id:e.id,kind:"invalid_waiver",detail:`Boundary ${e.id} waiver requires reason, owner, and an RFC 3339 UTC expiry.`}]}}function Cy(e,t,r){if(!v(e.id)||!v(e.producer)||!v(e.consumer)||!v(e.format))return{captured:0,waived:0,findings:[{boundary_id:v(e.id)?e.id:"unknown",kind:"invalid_boundary",detail:"Each boundary requires non-empty id, producer, consumer, and format."}]};if("fixture_path"in e){let o=t[e.fixture_path],n=v(e.fixture_path)&&e.fixture_path in t?by(e,o):[{boundary_id:e.id,kind:"missing_fixture",detail:`Boundary ${e.id} fixture ${String(e.fixture_path)} is missing.`}];return{captured:n.length===0?1:0,waived:0,findings:n}}return Ty(e,r)}function Ux(e,t,r=new Date){let o=[];if(e.version!==1||!v(e.inventory_scope)||!Array.isArray(e.boundaries))return{ok:!1,boundary_count:0,captured_count:0,waived_count:0,findings:[{boundary_id:"registry",kind:"invalid_registry",detail:"Boundary registry requires version 1, inventory_scope, and boundaries."}]};let n=new Set,s=0,i=0;for(let a of e.boundaries){if(typeof a!="object"||a===null||Array.isArray(a)){o.push({boundary_id:"unknown",kind:"invalid_boundary",detail:"Each boundary must be a JSON object."});continue}let d=a,c=v(d.id)?d.id:void 0;if(c!==void 0&&n.has(c)){o.push({boundary_id:c,kind:"duplicate_boundary",detail:`Boundary ${c} is inventoried more than once.`});continue}c!==void 0&&n.add(c);let l=Cy(d,t,r.getTime());s+=l.captured,i+=l.waived,o.push(...l.findings)}return o.sort((a,d)=>a.boundary_id!==d.boundary_id?a.boundary_id.localeCompare(d.boundary_id):a.kind.localeCompare(d.kind)),{ok:o.length===0,boundary_count:e.boundaries.length,captured_count:s,waived_count:i,findings:o}}import Y from"node:fs";import lt from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="aacf5738-098d-50f9-b619-19e472b577ea")}catch{}})();var Qr=300*1e3,wy=3;function Vx(e){return(e?.trim()||"development").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\./,"_")}function Hx(e,t){let r=t.trim();if(!/^[a-zA-Z0-9_-][a-zA-Z0-9._-]*$/.test(r))throw new TypeError("Compile-cache generation must be a safe non-empty filename token.");Y.mkdirSync(e,{recursive:!0});let o=lt.join(e,r);Y.mkdirSync(o,{recursive:!0});let n=new Date;Y.utimesSync(o,n,n);let s=Y.readdirSync(e).filter(c=>c!==r).flatMap(c=>{try{return[{name:c,mtimeMs:Y.statSync(lt.join(e,c)).mtimeMs}]}catch(l){if(l instanceof Error&&"code"in l&&me(l))return[];throw l}}).sort((c,l)=>l.mtimeMs-c.mtimeMs||c.name.localeCompare(l.name)),i=s.filter(c=>n.getTime()-c.mtimeMs<Qr),a=Math.max(0,wy-1-i.length),d=s.filter(c=>n.getTime()-c.mtimeMs>=Qr).slice(a).map(c=>c.name).sort((c,l)=>c.localeCompare(l));for(let c of d)Y.rmSync(lt.join(e,c),{recursive:!0,force:!0,maxRetries:3,retryDelay:50});return{retained:r,removed:d}}import{createHash as Sy}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ff60bc5b-bd85-5b3c-9a55-21e7e72477ac")}catch{}})();var pt=1;function J(e){e?.throwIfAborted()}function U(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${t} must be non-empty`);return e.trim()}function Z(e,t,r={}){let o=Date.parse(r.createdAt??new Date().toISOString());if(!Number.isFinite(o))throw new TypeError("Relationship graph createdAt must be a valid timestamp");let n=e.nodes(),s=e.edges(),i=t.list();return Object.freeze({version:pt,fingerprint:Sy("sha256").update(R({nodes:n,edges:s,kinds:i})).digest("hex"),created_at:new Date(o).toISOString(),nodes:n,edges:s,kinds:i})}function Ey(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function se(e){if(!Ey(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==pt)throw new TypeError(`Unsupported relationship graph snapshot version: ${String(e.version)}`);if(!Array.isArray(e.nodes)||e.nodes.some(n=>typeof n!="string"))throw new TypeError("Relationship graph snapshot nodes must be strings");if(!Array.isArray(e.edges)||!Array.isArray(e.kinds))throw new TypeError("Relationship graph snapshot edges and kinds must be arrays");if(typeof e.created_at!="string"||!Number.isFinite(Date.parse(e.created_at)))throw new TypeError("Relationship graph snapshot created_at must be valid");if(typeof e.fingerprint!="string")throw new TypeError("Relationship graph snapshot fingerprint must be a string");let t=new Le([]);for(let n of e.kinds)t.register(n);let r=new z(e.nodes,e.edges,t),o=Z(r,t,{createdAt:e.created_at});if(o.fingerprint!==e.fingerprint)throw new TypeError("Relationship graph snapshot fingerprint mismatch");return{snapshot:o,registry:t,graph:r}}async function x(e,t){U(e.name,"adapter name");let r=U(t.workspace,"workspace");J(t.signal);let o=await e.read({...t,workspace:r});return J(t.signal),o===null?null:se(o)}async function Oe(e,t){let r=U(t.workspace,"workspace"),o=se(t.snapshot).snapshot,n=await x(e,{workspace:r,signal:t.signal});if(n?.snapshot.fingerprint===o.fingerprint)return{adapter:e.name,workspace:r,disposition:"current",fingerprint:o.fingerprint,previous_fingerprint:n.snapshot.fingerprint,node_count:o.nodes.length,edge_count:o.edges.length};if(J(t.signal),await e.replace({workspace:r,signal:t.signal,snapshot:o,expected_fingerprint:n?.snapshot.fingerprint??null}),(await x(e,{workspace:r,signal:t.signal}))?.snapshot.fingerprint!==o.fingerprint)throw new Error(`Relationship graph adapter "${e.name}" did not expose the replaced snapshot`);return{adapter:e.name,workspace:r,disposition:"written",fingerprint:o.fingerprint,...n?{previous_fingerprint:n.snapshot.fingerprint}:{},node_count:o.nodes.length,edge_count:o.edges.length}}function Ay(e,t={}){let r=e.map(se),o=new Map;for(let i of r)for(let a of i.snapshot.kinds){let d=o.get(a.kind);if(d&&R(d)!==R(a))throw new TypeError(`Conflicting federated relationship kind: ${a.kind}`);o.set(a.kind,a)}let n=new Le([...o.values()].sort((i,a)=>i.kind.localeCompare(a.kind))),s=new z(new Set(r.flatMap(i=>[...i.snapshot.nodes])),r.flatMap(i=>[...i.snapshot.edges]),n);return Z(s,n,t)}var ie=class{name;#e=new Map;constructor(t="memory"){this.name=U(t,"adapter name")}async read(t){J(t.signal);let r=this.#e.get(U(t.workspace,"workspace"));return r?structuredClone(r):null}async replace(t){J(t.signal);let r=U(t.workspace,"workspace"),o=this.#e.get(r);if(t.expected_fingerprint!==void 0&&(o?.fingerprint??null)!==t.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${r}`);this.#e.set(r,structuredClone(se(t.snapshot).snapshot))}async clear(t){J(t.signal);let r=U(t.workspace,"workspace"),o=this.#e.get(r);if(t.expected_fingerprint!==void 0&&(o?.fingerprint??null)!==t.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${r}`);this.#e.delete(r)}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e47f9bb8-f98e-5159-9116-29c3e6fedfc3")}catch{}})();function eo(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${t} must be a positive integer`);return e}function vy(e){let t=eo(e.nodeCount,"nodeCount"),r=eo(e.edgeStride??1,"edgeStride"),o=e.topology??"chain";if(!["chain","star","disconnected"].includes(o))throw new TypeError(`Unsupported relationship graph topology: ${o}`);let n=(e.kind??"related").trim(),s=(e.idPrefix??"node").trim();if(!n||!s)throw new TypeError("Relationship graph kind and idPrefix must be non-empty");let i=o==="disconnected"?0:Math.floor((t-1)/r);return{node_count:t,edge_count:i,edge_basis:"fixture_generated",nodes:{*[Symbol.iterator](){for(let a=0;a<t;a+=1)yield`${s}-${a}`}},edges:{*[Symbol.iterator](){if(o!=="disconnected")for(let a=r;a<t;a+=r)yield{source:`${s}-${o==="star"?0:a-r}`,target:`${s}-${a}`,kind:n}}}}}function j(e,t){if(!e)throw new Error(`Relationship graph adapter conformance: ${t}`)}async function to(e,t={}){let r=t.workspace?.trim()||"pm-graph-conformance",o=yt(),n=Z(new z(["a","b"],[{source:"a",target:"b",kind:"related"}],o),o,{createdAt:"2026-01-01T00:00:00.000Z"}),s=Z(new z(["a","b","c"],[{source:"a",target:"b",kind:"related"},{source:"b",target:"c",kind:"blocked_by"}],o),o,{createdAt:"2026-01-02T00:00:00.000Z"}),i=[];j(await x(e,{workspace:r})===null,"workspace must start empty"),i.push({name:"empty-read",passed:!0});let a=await Oe(e,{workspace:r,snapshot:n});j(a.disposition==="written","first sync must write"),i.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:r})).nodes.push("mutated-reader-copy"),j((await x(e,{workspace:r}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),i.push({name:"read-isolation",passed:!0}),j((await Oe(e,{workspace:r,snapshot:n})).disposition==="current","identical sync must be idempotent"),i.push({name:"idempotent-sync",passed:!0}),await e.replace({workspace:r,snapshot:s,expected_fingerprint:n.fingerprint}),j((await x(e,{workspace:r}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),i.push({name:"replacement-visibility",passed:!0});let d=!1;try{await e.replace({workspace:r,snapshot:n,expected_fingerprint:n.fingerprint})}catch{d=!0}return j(d,"stale compare-and-swap must fail"),i.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:r,expected_fingerprint:s.fingerprint}),j(await x(e,{workspace:r})===null,"clear must remove the workspace"),i.push({name:"clear",passed:!0})),{adapter:e.name,workspace:r,cases:Object.freeze(i),clear_supported:e.clear!==void 0}}function Oy(e){return to(new ie,e?{workspace:e}:{})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="df28925a-72d8-5d39-accf-e295ee01d3f9")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d45a8203-4501-5797-a6cc-a2e7844adec9")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f5567aa1-0268-574d-907b-38d6249538ce")}catch{}})();var ut=2,Iy=["self_reported","independent_transport"];function Ie(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ae(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function ro(e,t,r=!1){if(!Array.isArray(e)||e.length===0)throw new TypeError(`${t} must be a non-empty string array`);return e.map((o,n)=>{let s=ae(o,`${t}[${String(n)}]`);return r?o:s})}function mt(e,t){return e===void 0?void 0:ae(e,t)}function Ry(e,t){if(e===void 0)return;if(!Ie(e)||Object.keys(e).length===0)throw new TypeError(`${t} must be a non-empty object`);let r=Object.entries(e).map(([o,n])=>{if(o.length===0||o.split(".").some(s=>s.length===0))throw new TypeError(`${t} must use dot-separated own-property paths`);if(n!==null&&typeof n!="string"&&typeof n!="boolean"&&(typeof n!="number"||!Number.isFinite(n)))throw new TypeError(`${t} values must be JSON primitives`);return[o,n]});return Object.fromEntries(r)}function My(e,t,r,o,n,s){if(o==="refusal"){if(Ke(r)||n===void 0||s===void 0)throw new TypeError(`${e} refusal steps require a non-success exit, error code, and refusal surface`);return}if(n!==void 0||s!==void 0)throw new TypeError(`${e} only refusal steps may declare expected_error_code or expected_refusal_surface`);let i=Ct(t);if(i===void 0)throw new TypeError(`${e}.args must identify a command after global flags`);let a=t[i].trim().toLowerCase();if(a==="history"){let l=wt(t.slice(i+1));l!==void 0&&(a=Ne(`history ${l}`))}let d=Nt(a);if(!Ke(r)||r!==0&&!d?.exit_codes.some(l=>l===r))throw new TypeError(`${e} successful output must use exit code 0 or a command-declared successful effect exit`);let c=xt(a).kind;if(o!==c)throw new TypeError(`${e} expected ${o}, but ${a} declares ${c}`)}function Py(e,t,r){if(!Ie(e))throw new TypeError(`tasks.${t}.steps[${String(r)}] must be an object`);let o=`tasks.${t}.steps[${String(r)}]`,n=ae(e.id,`${o}.id`),s=ro(e.args,`${o}.args`,!0),i=e.expected_exit_code;if(typeof i!="number"||!Number.isSafeInteger(i))throw new TypeError(`${o}.expected_exit_code must be a safe integer`);let a=e.expected_output_kind;if(a!=="refusal"&&!kt.includes(a))throw new TypeError(`${o}.expected_output_kind is unsupported`);let d=a,c=e.expected_accounting_mode;if(!Iy.includes(c))throw new TypeError(`${o}.expected_accounting_mode is unsupported`);let l=c;if(l==="independent_transport"&&d!=="refusal")throw new TypeError(`${o} independent_transport accounting is supported only for refusal steps`);let p=ro(e.required_fields,`${o}.required_fields`);if(p.some(w=>w.split(".").some(q=>q.length===0)))throw new TypeError(`${o}.required_fields must contain dot-separated own-property paths`);let f=Ry(e.expected_field_values,`${o}.expected_field_values`),_=mt(e.expected_error_code,`${o}.expected_error_code`),g=mt(e.expected_refusal_surface,`${o}.expected_refusal_surface`),T=mt(e.recovery_for,`${o}.recovery_for`);return My(o,s,i,d,_,g),{id:n,args:s,expected_exit_code:i,expected_output_kind:d,expected_accounting_mode:l,required_fields:p,...f?{expected_field_values:f}:{},..._?{expected_error_code:_}:{},...g?{expected_refusal_surface:g}:{},...T?{recovery_for:T}:{}}}function ky(e,t){if(!Ie(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let r=ae(e.id,`tasks[${String(t)}].id`),o=ae(e.description,`tasks.${r}.description`);if(!Array.isArray(e.steps)||e.steps.length===0)throw new TypeError(`tasks.${r}.steps must be a non-empty array`);let n=e.steps.map((i,a)=>Py(i,r,a)),s=new Map;for(let i of n){if(s.has(i.id))throw new TypeError(`tasks.${r} contains duplicate step id ${i.id}`);if(i.recovery_for!==void 0&&(s.get(i.recovery_for)?.expected_output_kind!=="refusal"||i.expected_output_kind==="refusal"))throw new TypeError(`tasks.${r}.${i.id} recovery_for must reference an earlier refusal and declare successful output`);s.set(i.id,i)}if(n.at(-1)?.expected_output_kind==="refusal")throw new TypeError(`tasks.${r} completed task must terminate with successful output`);for(let i of n)if(i.expected_output_kind==="refusal"&&!n.some(a=>a.recovery_for===i.id))throw new TypeError(`tasks.${r}.${i.id} refusal must have a later successful recovery_for step`);return{id:r,description:o,steps:n}}function wN(e){if(!Ie(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==ut)throw new TypeError(`agent-task transcript corpus version must be ${String(ut)}`);if(!Array.isArray(e.tasks)||e.tasks.length===0)throw new TypeError("agent-task transcript corpus tasks must be non-empty");let t=e.tasks.map((o,n)=>ky(o,n)),r=new Set;for(let o of t){if(r.has(o.id))throw new TypeError(`duplicate agent-task transcript id ${o.id}`);r.add(o.id)}return{version:ut,tasks:t}}import{createHash as oo}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7163a078-d8be-5bca-813f-c941fcb8e406")}catch{}})();function no(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${t} must be non-empty`);return e.trim()}function vN(e,t){let r=no(t.migrationId,"migrationId"),o=no(t.author,"author"),n=Date.parse(t.timestamp);if(!Number.isFinite(n))throw new TypeError("Relationship backfill timestamp must be valid");let s=new Date(n).toISOString(),i=ze(e,void 0,t.registry),a=i.graph.nodes(),d=i.graph.edges().map(f=>{let _=oo("sha256").update(JSON.stringify([r,f.kind,f.source,f.target,f.createdAt??null,f.author??null,f.payload??null])).digest("hex").slice(0,24);return Object.freeze({eventId:`backfill:${r}:${_}`,relationshipId:`migration:${r}:${_}`,action:"add",edge:f,author:o,timestamp:s,reason:`Backfill ${r} from legacy item metadata`})}),c=oo("sha256").update(JSON.stringify({migrationId:r,nodes:a,events:d})).digest("hex"),l=new Set([...t.existingEventIds??[]].filter(f=>typeof f=="string").map(f=>f.trim()).filter(Boolean)),p=d.filter(f=>!l.has(f.eventId));return Object.freeze({migration_id:r,fingerprint:c,nodes:a,events:Object.freeze(p),edge_count:d.length,skipped_existing_count:d.length-p.length,duplicate_dependency_rows:i.duplicateRows.length,dangling_reference_count:i.dangling.active.length+i.dangling.legacy_terminal.length})}import*as io from"node:module";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7a1d7194-6ff1-5365-ab64-80b47b0176d7")}catch{}})();var de=["suggested_retry","candidate_command","example","next_step","migration_hint","restore_with"],ft={suggested_retry:{kind:"suggested_retry",semantics:"recovery"},retry_command:{kind:"suggested_retry",semantics:"recovery"},candidate_command:{kind:"candidate_command",semantics:"recovery"},candidate_commands:{kind:"candidate_command",semantics:"recovery"},fallback_candidates:{kind:"candidate_command",semantics:"recovery",nested_value_field:"command"},next_best_command:{kind:"candidate_command",semantics:"recovery"},example:{kind:"example",semantics:"recovery"},examples:{kind:"example",semantics:"recovery"},next_step:{kind:"next_step",semantics:"recovery"},next_steps:{kind:"next_step",semantics:"recovery"},suggested_next_steps:{kind:"next_step",semantics:"recovery"},migration_hint:{kind:"migration_hint",semantics:"replacement"},migration_hints:{kind:"migration_hint",semantics:"replacement"},restore_with:{kind:"restore_with",semantics:"behavior_preserving"}},IN=Object.freeze(Object.keys(ft));function so(e){if(Object.hasOwn(ft,e))return ft[e]}var xy=new Set([..."=([{,:;!?&|+-*%^~<>","=>"]);function Q(e,t){return e<t?-1:e>t?1:0}function Ny(e,t){let r=e[t],o=t+1,n="";for(;o<e.length&&e[o]!==r;)e[o]==="\\"?o+=2:(n+=e[o],o+=1);return e[o]===r&&(o+=1),{next:o,value:n}}function Ly(e){return e===void 0||e.kind==="punctuator"&&xy.has(e.value)||e.kind==="identifier"&&["return","case","throw","else","yield"].includes(e.value)}function Dy(e,t){if(/\s/u.test(e[t]))return t+1;if(e.startsWith("//",t)){let r=e.indexOf(`
|
|
28
|
+
`,t+2);return r===-1?e.length:r+1}if(e.startsWith("/*",t))return e.indexOf("*/",t+2)+2}function $y(e,t,r){if(e[t]!=="/"||!Ly(r))return;let o=t+1,n=!1;for(;o<e.length;)if(e[o]==="\\")o+=2;else if(e[o]==="[")n=!0,o+=1;else if(e[o]==="]")n=!1,o+=1;else if(e[o]==="/"&&!n){for(o+=1;/[A-Za-z]/u.test(e.charAt(o));)o+=1;return o}else o+=1;return o}function Fy(e,t){let r=e[t];if(r==="'"||r==='"'||r==="`"){let n=Ny(e,t);return r==="`"?{next:n.next}:{next:n.next,token:{kind:"string",value:n.value,offset:t+1}}}if(/[A-Za-z_$]/u.test(r)){let n=t+1;for(;/[A-Za-z0-9_$]/u.test(e[n]??"");)n+=1;return{next:n,token:{kind:"identifier",value:e.slice(t,n),offset:t}}}let o=e.startsWith("=>",t)?"=>":r;return{next:t+o.length,token:{kind:"punctuator",value:o,offset:t}}}function Gy(e){let t=[],r=0;for(;r<e.length;){let o=Dy(e,r);if(o!==void 0){r=o;continue}let n=$y(e,r,t.at(-1));if(n!==void 0){r=n;continue}let s=Fy(e,r);s.token&&t.push(s.token),r=s.next}return t}var Uy=new Set(["object","block","pattern"]),jy=new Set(["const","let","var"]),By=new Set(["}",")","]"]),qy=new Set(["=","(","[",",",":","?","return"]);function zy(e,t,r){if([...r].reverse().find(n=>Uy.has(n.kind))?.kind==="pattern"||r.at(-1)?.kind==="paren"&&r.at(-1)?.parameter_list)return"pattern";let o=e[t-1];return o?.kind==="identifier"&&jy.has(o.value)?"pattern":o?.value==="=>"||o?.value===")"?"block":o&&qy.has(o.value)?"object":"block"}function Vy(e,t,r){let o=e[t];if(o.value==="{"){let i=zy(e,t,r);return{kind:i,...i==="object"?{member_start:!0,candidates:[]}:{}}}if(o.value==="[")return{kind:"array"};if(o.value!=="(")return;let n=e[t-1],s=e[t-2];return{kind:"paren",...n?.value==="function"||s?.value==="function"?{parameter_list:!0}:{}}}function Hy(e,t,r){if(!(e?.kind!=="object"||!e.member_start||t.kind!=="identifier"&&t.kind!=="string"||r?.value!==":"||!/^[A-Za-z][A-Za-z0-9_]*$/u.test(t.value)))return{field:t.value,offset:t.offset}}function Ky(e,t){return e[t+1]?.value===")"&&e[t+2]?.value==="=>"||e[t+1]?.value==="="}function Wy(e){let t=Gy(io.stripTypeScriptTypes(e,{mode:"strip"})),r=[],o=[];for(let[n,s]of t.entries()){let i=o.at(-1),a=Hy(i,s,t[n+1]);a&&i.candidates.push(a);let d=Vy(t,n,o);if(d)o.push(d);else if(By.has(s.value)){let c=o.pop();c?.kind==="object"&&!Ky(t,n)&&r.push(...c.candidates)}else s.value===","&&i?.kind==="object"?i.member_start=!0:i?.kind==="object"&&s.value!==":"&&(i.member_start=!1)}return r}function Xy(e){let t=[0];for(let r=0;r<e.length;r+=1)e[r]===`
|
|
29
|
+
`&&t.push(r+1);return t}function Yy(e,t){let r=0,o=e.length;for(;r<o;){let n=Math.floor((r+o)/2);e[n]<=t?r=n+1:o=n}return r}function RN(e){let t=[],r=[];for(let n of[...e].sort((s,i)=>Q(s.path,i.path))){let s=Xy(n.content),i;try{i=Wy(n.content)}catch(a){r.push({kind:"invalid_source",subject:n.path,detail:`${n.path} could not be parsed for recovery producers: ${String(a)}.`});continue}for(let a of i){let d=a.field,c=Yy(s,a.offset),l=so(d);l?t.push({path:n.path,line:c,field:d,kind:l.kind}):/(?:retry_command|candidate_command|fallback_candidate|next_best_command|example|next_step|migration_hint|restore_with)/u.test(d)&&!/(?:_total|_truncated)$/u.test(d)&&r.push({kind:"unknown_recovery_field",subject:`${n.path}:${c}:${d}`,detail:`${d} resembles a recovery reference but has no typed field contract.`})}}let o=Object.fromEntries(de.map(n=>[n,t.filter(s=>s.kind===n).length]));for(let n of de)o[n]===0&&r.push({kind:"missing_kind_producer",subject:n,detail:`No source producer emits the ${n} recovery-reference kind.`});return t.sort((n,s)=>n.path!==s.path?Q(n.path,s.path):n.line!==s.line?n.line-s.line:Q(n.field,s.field)),r.sort((n,s)=>n.subject!==s.subject?Q(n.subject,s.subject):Q(n.kind,s.kind)),{ok:r.length===0,scanned_file_count:e.length,producer_count:t.length,producer_count_by_kind:o,producers:t,findings:r}}function MN(e,t){let r=[],o=(n,s)=>{if(Array.isArray(n)){n.forEach((i,a)=>o(i,[...s,String(a)]));return}if(!(typeof n!="object"||n===null))for(let[i,a]of Object.entries(n).sort(([d],[c])=>Q(d,c))){let d=so(i),c=d?.kind==="migration_hint"&&n.semantics==="behavior_preserving"?{...d,semantics:"behavior_preserving"}:d,l=[a].flat();c!==void 0&&l.forEach((p,f)=>{let _="nested_value_field"in c&&typeof c.nested_value_field=="string"?c.nested_value_field:void 0,g=_&&typeof p=="object"&&p!==null&&!Array.isArray(p)?p[_]:p;if(typeof g!="string"||g.trim().length===0)return;let T=[...s,i,String(f)].map(w=>encodeURIComponent(w)).join("/");r.push({id:`${e}:${c.kind}:${T}`,probe_id:e,kind:c.kind,semantics:c.semantics,value:g})}),o(a,[...s,i])}};return o(t,[]),r}function PN(e,t){let r=e.flatMap(i=>(i.owned_states??[]).map(a=>({contract:i,state:a}))),o=[],n=new Map;for(let i of t){if(n.has(i.probe_id)){o.push({kind:"duplicate_probe",probe_id:i.probe_id,detail:`Observation ${i.probe_id} was supplied more than once.`});continue}n.set(i.probe_id,i)}let s=new Set(r.map(({state:i})=>i.probe_id));for(let{contract:i,state:a}of r){let d=n.get(a.probe_id);if(!d){o.push({kind:"missing_probe",probe_id:a.probe_id,detail:`No entrypoint observation was recorded for ${i.code}.`});continue}d.code!==i.code&&o.push({kind:"wrong_error_code",probe_id:a.probe_id,detail:`Expected ${i.code}; observed ${d.code}.`}),d.exit_class!==a.expected_exit_class&&o.push({kind:"wrong_exit_class",probe_id:a.probe_id,detail:`Expected ${a.expected_exit_class}; observed ${d.exit_class}.`}),a.entrypoints.includes(d.entrypoint)||o.push({kind:"wrong_entrypoint",probe_id:a.probe_id,detail:`Expected one of ${a.entrypoints.join(", ")}; observed ${d.entrypoint}.`})}for(let i of t)s.has(i.probe_id)||o.push({kind:"undeclared_probe",probe_id:i.probe_id,detail:`Observation ${i.probe_id} has no catalog declaration.`});return o.sort((i,a)=>i.probe_id!==a.probe_id?i.probe_id.localeCompare(a.probe_id):i.kind.localeCompare(a.kind)),{ok:o.length===0,declared_probe_count:r.length,observed_probe_count:t.length,findings:o}}function kN(e,t){let r=[],o=new Set,n=new Set;for(let d of e){if(o.has(d.id)){n.add(d.id),r.push({kind:"duplicate_obligation",reference_id:d.id,detail:`Recovery obligation ${d.id} was declared more than once.`});continue}o.add(d.id)}let s=new Map;for(let d of t){if(s.has(d.id)){r.push({kind:"duplicate_observation",reference_id:d.id,detail:`Recovery reference ${d.id} was observed more than once.`});continue}s.set(d.id,d),o.has(d.id)||r.push({kind:"undeclared_observation",reference_id:d.id,detail:`Recovery observation ${d.id} has no emitted obligation.`})}for(let d of e){if(n.has(d.id))continue;let c=s.get(d.id);c?c.reachable?c.semantics!==d.semantics&&r.push({kind:"wrong_semantics",reference_id:d.id,detail:`Recovery reference ${d.value} promised ${d.semantics}; proof demonstrated ${c.semantics}.`}):r.push({kind:"unreachable_reference",reference_id:d.id,detail:`Recovery reference ${d.value} did not reach its promised target.`}):r.push({kind:"missing_observation",reference_id:d.id,detail:`No reachability proof was recorded for ${d.kind} ${d.value}.`})}let i=de.map(d=>{let c=e.filter(p=>p.kind===d),l=c.filter(p=>!n.has(p.id)).map(p=>s.get(p.id)).filter(p=>p!==void 0);return{kind:d,declared:c.length,observed:l.length,passed:c.filter(p=>{let f=s.get(p.id);return!n.has(p.id)&&f?.reachable===!0&&f.semantics===p.semantics}).length}});r.sort((d,c)=>d.reference_id!==c.reference_id?d.reference_id.localeCompare(c.reference_id):d.kind.localeCompare(c.kind));let a=i.reduce((d,c)=>d+c.passed,0);return{ok:r.length===0,declared_reference_count:e.length,observed_reference_count:t.length,pass_fraction:o.size===0?1:a/o.size,coverage_by_kind:i,findings:r}}function Jy(e,t){let r=new Map(de.map(s=>[s,new Set]));for(let s of t)r.get(s.kind).add(s.value);let o=de.map(s=>({kind:s,source_producers:e.producer_count_by_kind[s],runtime_values:r.get(s).size})),n=o.filter(({source_producers:s,runtime_values:i})=>s>0&&i===0).map(({kind:s})=>s);return{ok:e.ok&&n.length===0,source_producer_count:e.producer_count,runtime_value_count:o.reduce((s,{runtime_values:i})=>s+i,0),coverage_by_kind:o,missing_runtime_kinds:n}}var xN=Jy;(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2b2197f3-7203-52c8-9cc7-f714b33a9306")}catch{}})();var LN=16,Zy=Object.freeze(["bulk_ids_input_empty","bulk_ids_input_missing_path","bulk_ids_input_unreadable","invalid_argument_value","missing_lifecycle_target","missing_required_argument","projection_options_mutually_exclusive","tracker_not_initialized","tracker_root_missing","tracker_root_not_directory","tracker_root_unreadable","unknown_context_intent","unknown_field_projection","unknown_option","unknown_subcommand"]),ao=18,co=Object.freeze([...Zy,"manifest_unknown_key","no_version_bounds_declared"].sort((e,t)=>e.localeCompare(t)));function DN(e,t=ao){return{ok:e.executable_error_code_count>=t,baseline:t,actual:e.executable_error_code_count}}function $N(e,t=co){let r=new Set(e.rows.filter(({disposition:n})=>n==="executable").map(({canonical_code:n})=>n)),o=t.filter(n=>!r.has(n));return{ok:o.length===0,required_canonical_codes:[...t],missing_required_canonical_codes:o}}function _t(e,t){let r=e.get(t);if(r)return r;let o={kinds:new Set,probeIds:new Set};return e.set(t,o),o}function FN(e,t,r){let o=new Map(e.map(l=>[l.code,l.canonical_code??l.code])),n=new Map,s=0,i=0;for(let l of e){let p=_t(n,l.canonical_code??l.code);for(let f of l.owned_states??[])p.kinds.add("owned_state"),p.probeIds.add(f.probe_id)}for(let l of t){let p=o.get(l.error_code);if(p===void 0)continue;s+=1;let f=_t(n,p);f.kinds.add("closed_domain"),f.probeIds.add(l.probe_id)}for(let l of r){let p=o.get(l.error_code);if(p===void 0)continue;i+=1;let f=_t(n,p);f.kinds.add("grammar"),f.probeIds.add(l.probe_id)}let a=e.map(l=>{let p=l.canonical_code??l.code,f=n.get(p),_=[...f.probeIds].sort();return{code:l.code,canonical_code:p,disposition:_.length>0?"executable":"uncovered",evidence_kinds:[...f.kinds].sort(),probe_ids:_}}).sort((l,p)=>l.code<p.code?-1:1),d=a.filter(({disposition:l})=>l==="uncovered").map(({code:l})=>l),c=a.length-d.length;return{ok:d.length===0,catalog_error_code_count:a.length,executable_error_code_count:c,uncovered_error_code_count:d.length,coverage_fraction:a.length===0?1:c/a.length,closed_domain_probe_count:s,grammar_probe_count:i,uncovered_error_codes:d,rows:a}}function GN(e){let t=e.rows.map(r=>`| \`${r.code}\` | \`${r.canonical_code}\` | ${r.disposition} | ${r.evidence_kinds.join(", ")||"none"} | ${r.probe_ids.length} |`);return["# Generated refusal closure census","","Tracker: `pm-f05lsg`.","","Every catalog code is listed. An `uncovered` row is an explicit closure obligation, never an omission or implied approval.","",`- Catalog error codes: ${e.catalog_error_code_count}`,`- Executable error codes: ${e.executable_error_code_count}`,`- Executable-code ratchet floor: ${ao}`,`- Required executable canonical codes: ${co.map(r=>`\`${r}\``).join(", ")}`,`- Uncovered error codes: ${e.uncovered_error_code_count}`,`- Coverage fraction: ${e.coverage_fraction.toFixed(6)}`,`- Closed-domain probes: ${e.closed_domain_probe_count}`,`- Grammar probes: ${e.grammar_probe_count}`,"","| Error code | Canonical code | Disposition | Evidence kinds | Probe count |","| --- | --- | --- | --- | --- |",...t,""].join(`
|
|
30
|
+
`)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d252409d-e33e-5c9e-9671-789f0ee87312")}catch{}})();function Qy(e){return[e.expected_error_code!==void 0&&e.error_code!==e.expected_error_code?{code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected error code ${e.expected_error_code}, received ${e.error_code??"<missing>"}.`}:void 0,e.expected_allowed_values!==void 0&&JSON.stringify([...e.allowed_values].sort())!==JSON.stringify([...e.expected_allowed_values].sort())?{code:"incomplete_allowed_values",probe_id:e.probe_id,detail:"The refusal's accepted domain differs from the SDK-owned domain contract."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)===0?{code:"missing_suggested_retry_args",probe_id:e.probe_id,detail:"The refusal omitted shell-free suggested retry arguments."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)>0&&JSON.stringify(e.suggested_retry_args)!==JSON.stringify(e.expected_suggested_retry_args)?{code:"suggested_retry_args_mismatch",probe_id:e.probe_id,detail:"The refusal's suggested retry arguments differ from the SDK-owned contract."}:void 0]}function eb(e){return[e.exit_code!==ue.USAGE?{code:"non_refusal_exit",probe_id:e.probe_id,detail:`${e.entrypoint} returned exit code ${e.exit_code}; a structured usage refusal must return ${ue.USAGE}.`}:void 0,e.allowed_values_required!==!1&&e.allowed_values.length===0?{code:"missing_allowed_values",probe_id:e.probe_id,detail:"The refusal omitted its complete accepted value domain."}:void 0,e.allowed_values.includes(e.rejected_value)?{code:"accepted_rejected_value",probe_id:e.probe_id,detail:`${e.rejected_value} is both rejected and advertised as allowed.`}:void 0,e.suggested_retry.trim().length===0?{code:"missing_suggested_retry",probe_id:e.probe_id,detail:"The refusal omitted an executable suggested retry."}:void 0,e.retry_succeeded?void 0:{code:"retry_failed",probe_id:e.probe_id,detail:"The advertised suggested retry did not succeed."},...Qy(e)]}function BN(e){let t=[],r=new Set,o=0;e.length===0&&t.push({code:"empty_corpus",probe_id:"corpus",detail:"At least one real refusal observation is required."});for(let n of e){if(r.has(n.probe_id)){t.push({code:"duplicate_probe",probe_id:n.probe_id,detail:`${n.probe_id} was supplied more than once.`});continue}r.add(n.probe_id);let s=t.length;for(let i of eb(n))i!==void 0&&t.push(i);t.length===s&&(o+=1)}return t.sort((n,s)=>n.probe_id!==s.probe_id?n.probe_id.localeCompare(s.probe_id):n.code.localeCompare(s.code)),{ok:t.length===0,probe_count:r.size,closed_probe_count:o,closure_fraction:r.size===0?0:o/r.size,findings:t}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="39b4e1fe-a34a-5ffc-9447-eaf8c46863c7")}catch{}})();var lo="not-a-declared-action";function tb(e,t){if(e.startsWith("assurance ")&&t.name==="kind")return"measurement";switch(t.value_kind){case"integer":return"1";case"item_id":return"pm-domain";case"action":throw new Error(`Cannot synthesize a preceding action value for positional slot ${t.name}.`);default:return"example"}}function ce(e){return e.replaceAll(/[^a-z0-9]+/gu,"-").replaceAll(/^-|-$/gu,"")}function JN(e=Be.filter(t=>vt.some(r=>r.command===t.command&&r.disposition!=="package_owned"))){let t=new Set(e.filter(({command:r})=>!r.includes(" ")).map(({command:r})=>ce(r)));return e.flatMap(r=>r.slots.flatMap((o,n)=>{if(!o.required)return[];let s=r.command.split(" "),i=ce(r.command),a=s.length>1&&t.has(i)?s.map(ce).join("--"):i,d=ee(r.command).flatMap(l=>l.required?[l.flag,...l.value_name?["example"]:[]]:[]),c=je.some(l=>l.command===r.command);return[{probe_id:`required-argument-${a}-${ce(o.name)}`,command:r.command,refusal_args:[...s,...r.slots.slice(0,n).map(l=>tb(r.command,l)),...d],recovery_args:[...s,"--help"],error_code:c&&!r.command.startsWith("assurance ")?"invalid_argument_value":/^extension (?:activate|adopt|deactivate|uninstall)$/u.test(r.command)?"missing_lifecycle_target":"missing_required_argument",missing_argument:o.name,missing_argument_index:n}]})).sort((r,o)=>r.probe_id.localeCompare(o.probe_id))}function rb(e){switch(L(e)){case"assurance":case"workspace snapshot":return je.filter(({parent:t})=>t===e).map(({action:t})=>t);case"graph":return Fe;case"merge":return Ge;case"plan":return We;case"profile":return Xe;case"schema":return Lt;default:throw new Error(`Required positional action family ${e} has no authoritative value domain.`)}}function ZN(e=Be){return e.filter(({slots:t})=>t[0]?.required===!0&&t[0].value_kind==="action").map(({command:t})=>{let r=t.split(" ");return{probe_id:`unknown-subcommand-${ce(t)}`,command:t,refusal_args:[...r,lo],recovery_args:[...r,"--help"],error_code:"unknown_subcommand",rejected_value:lo,allowed_values:[...rb(t)].sort()}}).sort((t,r)=>t.probe_id.localeCompare(r.probe_id))}function ob(e,t){let r=[...t].sort();return e.length===t.length&&[...e].sort().every((o,n)=>o===r[n])}function nb(e,t){if(!t)return[{code:"refusal_probe_missing",probe_id:e.probe_id,detail:`${e.probe_id} has no runtime observation.`}];let r=[];return t.error_code!==e.error_code&&r.push({code:"refusal_error_code_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} emitted ${t.error_code||"<none>"}; expected ${e.error_code}.`}),t.exit_code!==2&&r.push({code:"refusal_exit_code_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} exited ${t.exit_code}; expected usage exit 2.`}),"allowed_values"in e&&!ob(t.allowed_values,e.allowed_values)&&r.push({code:"refusal_allowed_values_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} did not expose its complete action domain.`}),t.recovery_succeeded||r.push({code:"refusal_recovery_failed",probe_id:e.probe_id,detail:`${e.probe_id} help recovery did not succeed.`}),t.refusal_mutated_state&&r.push({code:"refusal_mutated_state",probe_id:e.probe_id,detail:`${e.probe_id} changed tracker state while refusing input${t.mutated_paths?.length?`: ${t.mutated_paths.join(", ")}`:"."}`}),r}function QN(e,t){let r=new Map(e.map(i=>[i.probe_id,i])),o=new Map(t.map(i=>[i.probe_id,i])),n=[...e.flatMap(i=>nb(i,o.get(i.probe_id))),...t.filter(i=>!r.has(i.probe_id)).map(i=>({code:"unexpected_refusal_probe",probe_id:i.probe_id,detail:`${i.probe_id} has no declared grammar refusal contract.`}))];n.sort((i,a)=>i.probe_id.localeCompare(a.probe_id)||i.code.localeCompare(a.code));let s=new Set(n.map(({probe_id:i})=>i));return{ok:n.length===0,probe_count:e.length,closed_probe_count:e.filter(({probe_id:i})=>!s.has(i)).length,findings:n}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d3795bc4-fbe5-5ca4-bc90-b72a2d469dc7")}catch{}})();var ht=[{probe_id:"tracker-root-missing",failure_kind:"missing_root",expected_error_code:"tracker_root_missing",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-settings-missing",failure_kind:"settings_missing",expected_error_code:"tracker_not_initialized",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-not-directory",failure_kind:"not_directory",expected_error_code:"tracker_root_not_directory",expected_exit_code:2,recovery_kind:"select_directory"},{probe_id:"tracker-root-unreadable",failure_kind:"unreadable_root",expected_error_code:"tracker_root_unreadable",expected_exit_code:1,recovery_kind:"repair_permissions"}];function tL(){return ht.map(e=>({...e}))}function ib(e,t){let r=[];t.error_code!==e.expected_error_code&&r.push({code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected ${e.expected_error_code}, received ${t.error_code}.`}),t.exit_code!==e.expected_exit_code&&r.push({code:"exit_code_mismatch",probe_id:e.probe_id,detail:`Expected exit ${e.expected_exit_code}, received ${t.exit_code}.`}),t.recovery_kind!==e.recovery_kind&&r.push({code:"recovery_kind_mismatch",probe_id:e.probe_id,detail:`Expected ${e.recovery_kind}, received ${t.recovery_kind}.`});let o=t.suggested_retry_args.indexOf("init"),n=o===0||o===2&&t.suggested_retry_args[0]==="--pm-path"&&t.suggested_retry_args[1]?.length>0;return e.recovery_kind==="initialize"&&!n&&r.push({code:"missing_init_recovery",probe_id:e.probe_id,detail:"Missing and uninitialized roots must emit a tokenized init retry."}),(t.unsafe_init_recommended||e.recovery_kind!=="initialize"&&t.suggested_retry_args.includes("init"))&&r.push({code:"unsafe_init_recovery",probe_id:e.probe_id,detail:"A tracker root that cannot be initialized safely must not recommend initialization."}),t.retry_succeeded||r.push({code:"retry_failed",probe_id:e.probe_id,detail:"The emitted retry or safe alternate-root recovery did not execute successfully."}),r}function rL(e){let t=new Map(e.map(n=>[n.probe_id,n])),r=[],o=0;for(let n of ht){let s=t.get(n.probe_id);if(s===void 0){r.push({code:"missing_probe",probe_id:n.probe_id,detail:"No runtime observation was supplied for this contract."});continue}let i=ib(n,s);r.push(...i),i.length===0&&(o+=1)}return r.sort((n,s)=>n.probe_id.localeCompare(s.probe_id)||n.code.localeCompare(s.code)),{ok:r.length===0,probe_count:ht.length,closed_probe_count:o,findings:r}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fcb59bee-0fdb-5b17-8568-775a15d53466")}catch{}})();var Re,sb=Object.freeze({list:"list-item-projection","list-all":"list-item-projection","list-draft":"list-item-projection","list-open":"list-item-projection","list-in-progress":"list-item-projection","list-blocked":"list-item-projection","list-closed":"list-item-projection","list-canceled":"list-item-projection",get:"get-item-projection",graph:"graph-detail-projection",search:"search-result-projection",history:"history-entry-projection",events:"mutation-event-projection",activity:"activity-entry-projection",deps:"dependency-graph-projection",health:"health-diagnostic-projection",validate:"validation-diagnostic-projection",contracts:"contract-catalog-projection"});function ab(e,t){if(t==="--limit")return"result-row-limit";if(t==="--node-limit")return"graph-node-limit";if(t==="--edge-limit")return"graph-edge-limit";if(t==="--output-limit")return"rendered-output-row-limit";if(t==="--output-budget")return"rendered-output-byte-budget";if(t==="--token-budget")return"context-intent-token-budget";if(t==="--full"){let r=sb[L(e)];if(r===void 0)throw new Error(`Command ${e} exposes --full without a registered projection concept.`);return r}return t!=="--file"?t.slice(2):["create","update","update-many"].includes(L(e))?"linked-file-path":["comments","notes","learnings"].includes(L(e))?"entry-file-input":"plan-definition-file"}function Me(){if(Re!==void 0)return Re;let e=te.filter(({command:n})=>qe(n)).flatMap(({command:n,family:s})=>Pt(n,ee(n)).map(i=>({command:n,family:s,concept:ab(n,i.flag),flag:i.flag,aliases:Object.freeze([...i.aliases??[]]),value_kind:i.repeatable?"list":i.flag==="--limit"?"number":i.value_type}))),t=new Set(e.flatMap(n=>n.aliases.map(s=>`${n.command}:${s}`))),r=e.filter(n=>!t.has(`${n.command}:${n.flag}`)),o=new Map;for(let n of r){let s=o.get(n.concept)??new Set;s.add(n.value_kind),o.set(n.concept,s)}return Re=Object.freeze(r.map(n=>Object.freeze({...n,concept:o.get(n.concept)?.size===1?n.concept:`${n.concept}@${n.command}`}))),Re}function dL(){return Object.freeze(Me().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var po=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:100,copy:24,focus:22,list:86,"list-all":86,"list-draft":84,"list-open":84,"list-in-progress":84,"list-blocked":84,"list-closed":84,"list-canceled":84,aggregate:40,context:45,ctx:45,get:30,graph:34,search:78,duplicates:25,eval:25,next:38,history:35,events:33,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:27,schema:43,profile:22,activity:35,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:31,notes:35,learnings:31,files:39,docs:30,deps:32,plan:109,test:53,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:24,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),uo=Object.freeze({...po,...Object.fromEntries(xe.flatMap(({alias:e,canonical:t})=>{let r=po[e];return r===void 0?[]:[[t,r]]}))});function mo(){let e=new Map(Object.keys(uo).map(t=>[t,0]));for(let{command:t}of Me())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(uo).map(([t,r])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:r})))}function db(e,t,r){for(let o of e)for(let n of o.aliases){let s=t.get(`${o.command}:${n}`);s===void 0||s.flag===o.flag||r.push({code:"alias_collision",command:o.command,detail:`${n} aliases ${o.flag} but is canonical for ${s.flag}.`})}}function cb(e,t,r){let o=new Set(t.map(({command:n})=>n));for(let n of e.keys())o.has(n)||r.push({code:"missing_budget",command:n,detail:`${n} has canonical flags but no persisted budget.`});for(let n of t){let s=e.get(n.command)??0;s===0&&r.push({code:"stale_budget",command:n.command,detail:`${n.command} has a persisted budget but no canonical flags.`}),!(s<=n.maximum)&&r.push({code:"budget_exceeded",command:n.command,detail:`${s} canonical flags exceed the ratcheted maximum ${n.maximum}.`})}}function lb(e,t,r){let o=new Map(e.map(n=>[`${n.command}:${n.flag}`,n]));for(let n of t){let s=`${n.command}:${n.canonical_flag}`,i=o.get(s);if(!i){r.push({code:"removed_canonical_spelling",command:n.command,detail:`${n.canonical_flag} disappeared from the executable spelling inventory.`});continue}let a=new Set([i.flag,...i.aliases]);for(let d of n.accepted_spellings)a.has(d)||r.push({code:"removed_compatibility_spelling",command:n.command,detail:`${d} no longer resolves to ${n.canonical_flag}.`})}}function cL(e=Me(),t=mo(),r=[]){let o=[],n=new Map,s=new Map,i=new Map,a=new Map;for(let d of e){let c=`${d.command}:${d.flag}`;n.has(c)?o.push({code:"duplicate_canonical_flag",command:d.command,detail:`${d.flag} has more than one canonical row.`}):n.set(c,d),a.set(d.command,(a.get(d.command)??0)+1);let l=s.get(d.concept);l!==void 0&&l!==d.value_kind?o.push({code:"inconsistent_concept_kind",command:d.command,detail:`${d.concept} uses both ${l} and ${d.value_kind}.`}):s.set(d.concept,d.value_kind);let p=i.get(d.concept);p!==void 0&&p!==d.flag?o.push({code:"semantic_spelling_collision",command:d.command,detail:`${d.concept} is canonicalized by both ${p} and ${d.flag}.`}):i.set(d.concept,d.flag)}return db(e,n,o),cb(a,t,o),lb(e,r,o),o.sort((d,c)=>d.command.localeCompare(c.command)||d.code.localeCompare(c.code)||d.detail.localeCompare(c.detail)),{ok:o.length===0,entry_count:e.length,budget_count:t.length,concept_count:new Set(e.map(({concept:d})=>d)).size,baseline_entry_count:r.length,findings:o}}function lL(){let e=Me(),t=mo(),r=new Map(t.map(({command:o})=>[o,"unknown"]));for(let{command:o,family:n}of e)r.set(o,n);return["# Generated flag lexicon budgets","","This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not consume canonical budget.","","| Command | Capability family | Canonical flags | Maximum |","| --- | --- | ---: | ---: |",...t.map(({command:o,current:n,maximum:s})=>{let i=r.get(o);return`| \`${o}\` | ${i} | ${n} | ${s} |`}),""].join(`
|
|
31
|
+
`)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4e72da21-425b-568d-9174-bc5021e1d4f4")}catch{}})();function uL(e){return e}function mL(e){return e}function fL(e){return e}function _L(e){return e}function hL(e){return e}function gL(e){return e}function yL(e){return e}function bL(e){return e}function TL(e){return e}function CL(e){return e}function wL(e){return e}function SL(e){return e}function EL(e){return e}function AL(e){return{handled:!0,result:e}}function vL(){return{handled:!1}}function OL(e){return e}function IL(e){return e}function RL(e){return e}function ML(e){return e}function PL(e){return e}function kL(e){return e}function xL(e){return e}function NL(e){return e}function LL(e){return e}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="68ca9ab1-91e0-5020-859e-fc1f1f6dcc56")}catch{}})();function pb(e={},t={}){return new he(t).extension(void 0,{...e,migrate:!0})}function ub(e={},t={}){return new he(t).packageMigrate(e)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="af4da99c-f557-5bf7-a439-c14878e4970d")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function N(e){if(typeof e!="string"||!fe(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function mb(e){let t=N(e.window_start),r=N(e.window_end);if(t>=r||!Number.isFinite(e.max_failure_rate)||e.max_failure_rate<0||e.max_failure_rate>=1||!Number.isSafeInteger(e.min_completed_attempts)||e.min_completed_attempts<1)throw new TypeError("Invalid reliability window policy.");if(e.families.length===0||e.families.some(o=>typeof o!="string"||o.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:t,end:r}}function fb(e,t,r,o){let n=new Map(t.map(i=>[i,[]])),s=new Set;for(let i of e){if(typeof i.id!="string"||i.id.trim().length===0||s.has(i.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");s.add(i.id);let a=n.get(i.family);if(!a||!["success","failure","pending"].includes(i.outcome)||i.cause!==void 0&&(!["product","infrastructure","unknown"].includes(i.cause)||i.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let d=N(i.started_at);if(i.repaired_at!==void 0&&(N(i.repaired_at)<d||i.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");d>=r&&d<o&&a.push(i)}return n}function QL(e,t){let{start:r,end:o}=mb(t),n=[...fb(e,t.families,r,o)].map(([s,i])=>{let a=i.filter(_=>_.outcome==="failure"),d=i.filter(_=>_.outcome!=="pending").length,c=d===0?null:a.length/d,l=a.filter(_=>_.repaired_at!==void 0&&N(_.repaired_at)<o),p={product:0,infrastructure:0,unknown:0};for(let _ of a)p[_.cause??"unknown"]+=1;let f=[];return d<t.min_completed_attempts&&f.push("insufficient_completed_attempts"),c!==null&&c>t.max_failure_rate&&f.push("failure_rate"),{family:s,attempts:i.length,completed:d,failed:a.length,pending:i.length-d,failure_rate:c,affected_days:[...new Set(a.map(_=>new Date(N(_.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:l.map(_=>(N(_.repaired_at)-N(_.started_at))/6e4).sort((_,g)=>_-g),unresolved:a.length-l.length,causes:p,violations:f,ok:f.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(r).toISOString(),window_end:new Date(o).toISOString(),ok:n.every(s=>s.ok),families:n}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="415e07d5-008a-5a96-ad7d-eb630aa08f57")}catch{}})();function le(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function _b(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let t=new Map;for(let r of e){if(r===null||typeof r!="object"||!le(r.name)||t.has(r.name)||r.complete!==!0)throw new TypeError("Expected unique complete artifact ledgers.");if(!Array.isArray(r.identities))throw new TypeError("Invalid or duplicate artifact identity.");let o=new Set(r.identities);if(o.size!==r.identities.length||r.identities.some(n=>!le(n)))throw new TypeError("Invalid or duplicate artifact identity.");t.set(r.name,o)}if([...t.values()].every(r=>r.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return t}function hb(e,t){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let r=new Map;for(let o of e){if(o===null||typeof o!="object"||!le(o.identity)||r.has(o.identity)||!le(o.reason)||!le(o.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let n=o.missing_from;if(!Array.isArray(n)||n.length===0||n.length>=t.length||new Set(n).size!==n.length||n.some(s=>!t.includes(s)))throw new TypeError("Invalid artifact exception ledger signature.");r.set(o.identity,o)}return r}function tD(e,t=[]){let r=_b(e),o=[...r.keys()].sort(),n=hb(t,o),s=[...new Set([...r.values()].flatMap(c=>[...c]))].sort(),i=[],a=new Set;for(let c of s){let l=o.filter(_=>!r.get(_).has(c));if(l.length===0)continue;let p=n.get(c),f=p!==void 0&&JSON.stringify([...p.missing_from].sort())===JSON.stringify(l);f&&a.add(c),i.push({identity:c,present_in:o.filter(_=>r.get(_).has(c)),missing_from:l,disposition:f?{reason:p.reason,evidence:p.evidence}:null})}let d=[...n.keys()].filter(c=>!a.has(c)).sort();return{schema:"pm-artifact-ledgers/1",ok:i.every(c=>c.disposition!==null)&&d.length===0,counts:Object.fromEntries(o.map(c=>[c,r.get(c).size])),findings:i,stale_exceptions:d}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fca4e9bb-3a30-512e-9929-565ab6c11c54")}catch{}})();import{createHash as _o,createHmac as gb,randomBytes as yb,timingSafeEqual as bb}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="837ee381-0838-55d3-bcdf-7352fb76661d")}catch{}})();var FD="dev.unbrained.pm/progressive-tool-discovery",GD=Object.freeze({version:1,discoveryTool:"pm_discover",canonicalResult:"structuredContent.result",compatibilityText:"pointer"}),Tb=Object.freeze(["pm_discover","pm_next","pm_context","pm_search","pm_get"]),B=Object.freeze({lexical:.4,semantic:.2,graph:.1,permission:.15,freshness:.05,usage:.1}),Cb=Object.freeze(["profile_changed","tool_contract_changed","workspace_extension_changed","authorization_changed","ranking_signal_changed","cursor_integrity_key_rotated"]),ho={core:0,standard:1,full:2,internal:3},go=Object.freeze(["core","standard","full"]),wb=new Set(["core","standard","full","custom"]),yo=new Set(te.map(({family:e})=>e)),Sb=yb(32);function ke(e,t){if(typeof e!="string")throw new b(`pm tool discovery ${t} must be a string of at most 4096 Unicode characters.`,64);let r=e[Symbol.iterator](),o=0;for(let n=r.next();!n.done;n=r.next())if(o+=1,o>4096)throw new b(`pm tool discovery ${t} must be a string of at most 4096 Unicode characters.`,64);return e}function bo(e){if(!Number.isInteger(e)||Number(e)<1||Number(e)>100)throw new b("pm tool discovery limit must be from 1 through 100.",64);return Number(e)}function To(e){if(e!=="unbounded"&&(!Number.isInteger(e)||Number(e)<128))throw new b("pm tool discovery outputBudget must be unbounded or an integer of at least 128.",64);return e==="unbounded"?e:Number(e)}function Co(e){if(e!==void 0&&typeof e!="boolean")throw new b("pm tool discovery includeSchema must be a boolean.",64);return e===!0}function wo(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new b("pm tool discovery options must be an object.",64)}function Eb(e){if(!Array.isArray(e))throw new b("pm tool discovery candidates must be an array.",64);for(let[t,r]of e.entries()){if(r===null||typeof r!="object"||Array.isArray(r))throw new b(`pm tool discovery candidate ${t} must be an object.`,64);if(typeof r.name!="string"||r.name.trim().length===0)throw new b(`pm tool discovery candidate ${t} name must be a non-empty string.`,64);if(typeof r.description!="string"||r.description.trim().length===0)throw new b(`pm tool discovery candidate ${t} description must be a non-empty string.`,64);if(r.inputSchema===null||typeof r.inputSchema!="object"||Array.isArray(r.inputSchema))throw new b(`pm tool discovery candidate ${t} inputSchema must be an object.`,64);if(r.authorized!==void 0&&typeof r.authorized!="boolean")throw new b(`pm tool discovery candidate ${t} authorized must be a boolean.`,64)}}function UD(e){if(wo(e),e.family!==void 0&&(typeof e.family!="string"||!yo.has(e.family)))throw new b("pm tool discovery family must be a declared capability family.",64);if(e.tier!==void 0&&(typeof e.tier!="string"||!go.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);return{...e.query!==void 0?{query:ke(e.query,"query")}:{},...e.family!==void 0?{family:e.family}:{},...e.tier!==void 0?{tier:e.tier}:{},...e.limit!==void 0?{limit:bo(e.limit)}:{},...e.cursor!==void 0?{cursor:ke(e.cursor,"cursor")}:{},...e.includeSchema!==void 0?{includeSchema:Co(e.includeSchema)}:{},...e.outputBudget!==void 0?{outputBudget:To(e.outputBudget)}:{}}}function Ab(e){return e===void 0||!Number.isFinite(e)?0:Math.min(1,Math.max(0,e))}function pe(e){return[...new Set(e.toLowerCase().match(/[a-z0-9]+/gu)??[])].sort()}function vb(e,t){let r=pe(e);if(r.length===0)return 0;let o=new Set(pe(t)),n=r.filter(i=>o.has(i)).length,s=t.toLowerCase().includes(e.toLowerCase())?.25:0;return Math.min(1,n/r.length+s)}function Ob(e,t){let r=pe(e);if(r.length===0)return 0;let o=t.toLowerCase(),n=pe(t),s=r.filter(a=>n.some(d=>d.startsWith(a)||a.startsWith(d))).length,i=o.includes(e.toLowerCase())?.2:0;return Math.min(1,s/r.length+i)}function fo(e){return _o("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function So(e,t,r){return gb("sha256",r).update(JSON.stringify({version:1,fingerprint:e,offset:t})).digest("base64url")}function Ib(e,t,r){let o={version:1,offset:t,signature:So(e,t,r)};return Buffer.from(JSON.stringify(o),"utf8").toString("base64url")}function Rb(e,t,r,o){if(e===void 0)return 0;try{let n=JSON.parse(Buffer.from(e,"base64url").toString("utf8"));if(n.version!==1||!Number.isInteger(n.offset)||(n.offset??-1)<0||Number(n.offset)>r||typeof n.signature!="string")throw new Error("cursor fields do not match the request");let s=Buffer.from(So(t,n.offset,o),"base64url"),i=Buffer.from(n.signature,"base64url");if(i.length!==s.length||!bb(i,s))throw new Error("cursor signature does not match the request");return n.offset}catch(n){throw new b("Invalid or stale pm tool discovery cursor; restart discovery without cursor.",64,{reason:String(n)})}}function gt(e,t,r){return{value:Ab(e),weight:t,available:r!=="unavailable",source:r}}function Pe(e,t,r){return gt(e??t,r,e===void 0?"computed":"host")}function Mb(e,t,r){let o=Object.hasOwn(_e,e.name)?_e[e.name]:"help",n=Ve(o),s=`${e.name} ${e.description} ${o} ${n}`,i=vb(t,s),a=new Set(pe(t)),d={lexical:gt(i,B.lexical,"computed"),semantic:Pe(e.signals?.semantic,Ob(t,s),B.semantic),graph:Pe(e.signals?.graph,a.has(n)||a.has(o)?1:0,B.graph),permission:gt(1,B.permission,"authorization"),freshness:Pe(e.signals?.freshness,1,B.freshness),usage:Pe(e.signals?.usage,Tb.includes(e.name)?1:0,B.usage)},c=Object.values(d).reduce((l,p)=>l+p.value*p.weight,0);return{name:e.name,description:e.description,command:o,tier:He(o),family:n,score:Number(c.toFixed(6)),signals:d,...r?{input_schema:structuredClone(e.inputSchema)}:{}}}function Pb(e){if(e.cursorIntegrityKey!==void 0&&(!(e.cursorIntegrityKey instanceof Uint8Array)||e.cursorIntegrityKey.byteLength<32))throw new b("pm tool discovery cursorIntegrityKey must contain at least 32 bytes.",64);if(e.tier!==void 0&&(typeof e.tier!="string"||!go.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);if(e.family!==void 0&&(typeof e.family!="string"||!yo.has(e.family)))throw new b("pm tool discovery family must be a declared capability family.",64);if(e.profile!==void 0&&(typeof e.profile!="string"||!wb.has(e.profile)))throw new b("pm tool discovery profile must be core, standard, full, or custom.",64)}function kb(e){let t=ke(e.query===void 0?"":e.query,"query").trim().replace(/\s+/gu," ");ke(e.cursor===void 0?"":e.cursor,"cursor");let r=bo(e.limit===void 0?10:e.limit),o=To(e.outputBudget===void 0?1200:e.outputBudget);return Pb(e),{query:t,includeSchema:Co(e.includeSchema),limit:r,budget:o,maximumTier:ho[e.tier??"full"],profile:e.profile===void 0?"core":e.profile}}function Eo(e,t,r){let o=r??e.tools.reduce((i,a,d)=>i+(d===0?0:1)+Buffer.byteLength(JSON.stringify(a),"utf8"),0),n={...e,tools:[]},s=0;for(let i=0;i<4;i+=1){let a=Buffer.byteLength(JSON.stringify({...n,token_cost:{estimated_tokens:s,budget:t,within_budget:!0}}),"utf8"),d=Math.ceil((a+o)/4);if(d===s)break;s=d}return s}function xb(e,t,r){return e.filter(o=>o.authorized!==!1).map(o=>Mb(o,r.query,r.includeSchema)).filter(o=>o.tier!=="internal"&&ho[o.tier]<=r.maximumTier&&(t.family===void 0||o.family===t.family)).sort((o,n)=>n.score-o.score||(o.name<n.name?-1:o.name>n.name?1:0))}function Nb(e,t,r){if(t==="unbounded")return[...e];let o=[],n=0;for(let[s,i]of e.entries()){let a=n+(s===0?0:1)+Buffer.byteLength(JSON.stringify(i),"utf8");if(Eo(r(s+1),t,a)>t)break;o.push(i),n=a}return o}function jD(e,t={}){Eb(e),wo(t);let r=kb(t),o=t.cursorIntegrityKey??Sb,n=xb(e,t,r),s=fo({query:r.query,family:t.family??null,tier:t.tier??"full",includeSchema:r.includeSchema,profile:r.profile,ranked:n}),i=Rb(t.cursor,s,n.length,o),a=n.slice(i,i+r.limit),d=[];r.includeSchema||d.push({name:"input_schema",reason:"compact_projection",restore_with:"Set includeSchema=true."}),i+r.limit<n.length&&d.push({name:"tools",reason:"limit",restore_with:"Continue with next_cursor or increase limit."});let c={result_type:"pm_tool_discovery",contract_version:1,query:r.query,profile:r.profile,total:n.length,ranking_policy:{version:1,formula:"weighted_sum_then_name",weights:B},cache:{key:fo({fingerprint:s,cursorIntegrityKey:_o("sha256").update(o).digest("hex"),limit:r.limit,offset:i,budget:r.budget}),ttl_ms:3e4,scope:"private",invalidates_on:Cb}},l=(g,T=g.length)=>{let w=i+T,q=w<n.length,I=[...d];return T<a.length&&I.push({name:"tools",reason:"token_budget",restore_with:"Continue with next_cursor or increase outputBudget."}),{...c,tools:[...g],returned:T,has_more:q,...q?{next_cursor:Ib(s,w,o)}:{},omission_receipt:{has_omissions:I.length>0,omitted:I}}},p=g=>{let T=l(g),w=Eo(T,r.budget);return{...T,token_cost:{estimated_tokens:w,budget:r.budget,within_budget:r.budget==="unbounded"||w<=r.budget}}},f=Nb(a,r.budget,g=>l([],g)),_=p(f);if(a.length>0&&f.length===0){let g=p([a[0]]).token_cost.estimated_tokens;throw new b(`pm tool discovery outputBudget is too small to return a tool; increase it to at least ${g}.`,64,{required:String(g)})}if(r.budget!=="unbounded"&&_.token_cost.estimated_tokens>r.budget)throw new b(`pm tool discovery outputBudget is too small; at least ${_.token_cost.estimated_tokens} estimated tokens are required for this page.`,64,{required:String(_.token_cost.estimated_tokens)});return _}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d007edcb-46f0-5546-b804-27d86afe23e7")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3819479a-4ad7-5a06-8f76-e703037b2bf3")}catch{}})();export{Kv as ACTIONABILITY_ORDERING_KINDS,Ja as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,Ta as ACTIVITY_FLAG_CONTRACTS,mi as AGENT_PROVENANCE_DIMENSIONS,ns as AGGREGATE_FLAG_CONTRACTS,zs as APPEND_FLAG_CONTRACTS,zR as ASSURANCE_ACTIONS,VR as ASSURANCE_DECLARATION_KINDS,JO as ASSURANCE_DOCUMENT_VERSION,la as ASSURANCE_FLAG_CONTRACTS,ZO as ASSURANCE_GATE_TRIGGERS,QO as ASSURANCE_MEASUREMENT_SOURCE_KINDS,YI as ASSURANCE_PRESET_IDS,KO as AssuranceEvaluationRefusalError,HO as AssuranceMutationRefusalError,WO as AssuranceSourceResolutionError,Qn as BASELINE_ITEM_FORMAT_VERSION,gy as BOUNDARY_FIXTURE_CAPTURE_SOURCES,gO as BRIEF_LIST_FIELDS,_i as BUILTIN_AGENT_PROVENANCE_ADAPTERS,X as BUILTIN_CORPUS_SHAPES,fi as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,Uo as BUILTIN_ITEM_TYPE_VALUES,zt as BUILTIN_PROFILES,Lb as BUILTIN_RELATIONSHIP_KINDS,Wa as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,ba as CALENDAR_FLAG_CONTRACTS,Vs as CLAIM_FLAG_CONTRACTS,qd as CLOSE_ACTION_OPTION_KEYS,Bs as CLOSE_FLAG_CONTRACTS,qs as CLOSE_MANY_FLAG_CONTRACTS,Js as CLOSE_TASK_FLAG_CONTRACTS,is as COMMENTS_FLAG_CONTRACTS,iT as COMMON_MUTATION_COMMAND_OPTION_KEYS,ka as COMPLETION_FLAG_CONTRACTS,Ho as CONFIDENCE_TEXT_VALUES,Ts as CONFIG_FLAG_CONTRACTS,Xa as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,IM as CONTEXT_EVALUATION_METRIC_NAMES,wa as CONTEXT_FLAG_CONTRACTS,jt as CONTEXT_OUTPUT_VALUES,xM as CONTEXT_PACKING_PROFILES,TM as CONTEXT_RECENCY_EPOCH,EM as CONTEXT_RELEVANCE_SERVICE,wM as CONTEXT_RELEVANCE_SIGNAL_NAMES,DM as CONTEXT_SIGNAL_SET_VERSION,LM as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,$M as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,_w as CONTEXT_USAGE_LIMITS,Pa as CONTRACTS_FLAG_CONTRACTS,_a as COPY_FLAG_CONTRACTS,Jd as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Qd as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Zd as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,Vb as CREATE_DIRECT_CLOSE_REASON_DEFAULT,pa as CREATE_FLAG_CONTRACTS,lS as CURRENT_HISTORY_HASH_ALGORITHM,IS as CURRENT_HISTORY_ITEM_HASH_VERSION,MS as CURRENT_HISTORY_RECORD_HASH_VERSION,ei as CURRENT_ITEM_FORMAT_VERSION,jM as ContextSignalStore,hw as ContextUsageValidationError,mM as DEFAULT_AUTHOR_IDENTITY_VOCABULARY,nP as DEFAULT_CHILD_SAMPLE_LIMIT,hO as DEFAULT_COMPACT_LIST_FIELDS,SE as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,Mm as DEFAULT_EVAL_QUERIES_RELATIVE_PATH,iM as DEFAULT_TERMINAL_TRANSITION_POLICY,VM as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,Gv as DEFECT_ESCAPE_CLASSES,Uv as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Ks as DELETE_FLAG_CONTRACTS,qo as DEPENDENCY_KIND_VALUES,Aa as DEPS_FLAG_CONTRACTS,cs as DOCS_FLAG_CONTRACTS,aa as DUPLICATES_FLAG_CONTRACTS,wR as DURABLE_MERGE_RECEIPT_INTRODUCED_AT,Oa as EVAL_FLAG_CONTRACTS,Sm as EVAL_METRIC_NAMES,Om as EVAL_QUERY_SET_CONTRACT,Im as EVAL_QUERY_SET_EXAMPLE,vm as EVAL_QUERY_SET_SCHEMA_ID,Ca as EVENTS_FLAG_CONTRACTS,Qs as EVENT_FLAG_CONTRACTS,No as EXECUTABLE_COMMAND_ALIASES,ue as EXIT_CODE,Ps as EXTENSION_ACTIVATE_FLAG_CONTRACTS,Ms as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,Fs as EXTENSION_ADOPT_FLAG_CONTRACTS,LP as EXTENSION_CAPABILITIES,qb as EXTENSION_CAPABILITY_CONTRACT,jb as EXTENSION_CAPABILITY_CONTRACT_VERSION,Bb as EXTENSION_CAPABILITY_LEGACY_ALIASES,tn as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,$s as EXTENSION_CATALOG_FLAG_CONTRACTS,ks as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,Rs as EXTENSION_DESCRIBE_FLAG_CONTRACTS,Ds as EXTENSION_DOCTOR_FLAG_CONTRACTS,Is as EXTENSION_EXPLORE_FLAG_CONTRACTS,Cs as EXTENSION_FLAG_CONTRACTS,Ss as EXTENSION_INIT_FLAG_CONTRACTS,vs as EXTENSION_INSTALL_FLAG_CONTRACTS,Ns as EXTENSION_MANAGE_FLAG_CONTRACTS,xs as EXTENSION_MIGRATE_FLAG_CONTRACTS,DP as EXTENSION_POLICY_MODES,$P as EXTENSION_POLICY_SURFACES,Ls as EXTENSION_RELOAD_FLAG_CONTRACTS,GP as EXTENSION_SANDBOX_PROFILES,ws as EXTENSION_SCOPE_FLAG_CONTRACTS,FP as EXTENSION_TRUST_MODES,Os as EXTENSION_UNINSTALL_FLAG_CONTRACTS,lO as EXTERNAL_DEPENDENCY_RESOLUTION_STATUSES,dO as EXTERNAL_DEPENDENCY_SOURCE_KIND,cO as EXTERNAL_DEPENDENCY_SOURCE_KIND_ALIAS,ds as FILES_FLAG_CONTRACTS,ha as FOCUS_FLAG_CONTRACTS,ia as GC_FLAG_CONTRACTS,TO as GET_DEPTH_VALUES,Sa as GET_FLAG_CONTRACTS,rs as GLOBAL_FLAG_CONTRACTS,hp as GRAPH_DURABLE_CACHE_MIN_ITEMS,_p as GRAPH_DURABLE_CACHE_VERSION,va as GRAPH_FLAG_CONTRACTS,VE as GRAPH_QUERY_DEFAULTS,Fe as GRAPH_SUBCOMMAND_VALUES,Ea as GUIDE_FLAG_CONTRACTS,da as HEALTH_FLAG_CONTRACTS,fs as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,qI as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,YR as HISTORY_COMPACT_BULK_DEFAULT_MIN_ENTRIES,_s as HISTORY_COMPACT_FLAG_CONTRACTS,Ri as HISTORY_EVENT_CLASSIFICATION_VERSION,ls as HISTORY_FLAG_CONTRACTS,dS as HISTORY_HASH_ALGORITHMS,TI as HISTORY_ITEM_HASH_VERSION_3_INTRODUCED_IN,us as HISTORY_REDACT_FLAG_CONTRACTS,ms as HISTORY_REPAIR_FLAG_CONTRACTS,Hc as INIT_AGENT_GUIDANCE_MODE_VALUES,bs as INIT_FLAG_CONTRACTS,Gs as INSTALL_FLAG_CONTRACTS,Vo as ISSUE_SEVERITY_VALUES,ma as ITEM_COMPLETE_FLAG_CONTRACTS,mR as ITEM_LATEST_TIMESTAMP_FIELDS,zb as ITEM_METADATA_KEY_ORDER,ua as ITEM_MUTATE_FLAG_CONTRACTS,fa as ITEM_REOPEN_FLAG_CONTRACTS,sR as ITEM_SCALAR_MISSING_VALUE,jo as ITEM_TYPE_VALUES,uR as ITEM_UNION_COLLECTION_FIELDS,UM as JsonFileContextSignalStoreAdapter,as as LEARNINGS_FLAG_CONTRACTS,cS as LEGACY_HISTORY_HASH_ALGORITHM,eu as LINKED_TEST_ENV_NAME_PATTERN,tu as LINKED_TEST_PM_CONTEXT_MODE_VALUES,Qp as LINKED_TEST_PROTECTED_ENV_KEYS,ru as LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,Ha as LIST_COMMANDER_STRING_OPTION_CONTRACTS,yO as LIST_COMMAND_DEFAULT_PROJECTIONS,jP as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,os as LIST_FILTER_FLAG_CONTRACTS,EO as LIST_SORT_FIELDS,AO as LIST_SORT_ORDER_VALUES,Mi as MAINTENANCE_HISTORY_OPERATIONS,oP as MAX_CHILD_PROJECTION_ITEMS,kC as MAX_WORKFLOW_POLICIES,xC as MAX_WORKFLOW_POLICY_TERMS,Zs as MEET_FLAG_CONTRACTS,EP as MERGE_DRIVER_ARTIFACT_VALUES,ps as MERGE_FLAG_CONTRACTS,Ge as MERGE_SUBCOMMAND_VALUES,OP as MUTATION_EVENT_WIRE_BUDGET,ie as MemoryRelationshipGraphAdapter,Ya as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,Ra as NEXT_FLAG_CONTRACTS,Ku as NEXT_OUTPUT_VALUES,ss as NOTES_FLAG_CONTRACTS,Es as PACKAGE_FLAG_CONTRACTS,As as PACKAGE_INIT_FLAG_CONTRACTS,Ys as PAUSE_TASK_FLAG_CONTRACTS,Bd as PLAN_CREATE_METADATA_PARAMETER_KEYS,ys as PLAN_FLAG_CONTRACTS,rm as PLAN_SHOW_DEPTH_VALUES,We as PLAN_SUBCOMMANDS,om as PLAN_TEMPLATE_NAMES,Iy as PM_AGENT_TASK_ACCOUNTING_MODES,ut as PM_AGENT_TASK_TRANSCRIPT_VERSION,Mo as PM_BULK_LIFECYCLE_COMMAND_ALIASES,Di as PM_CLI_EXPECTED_ERROR_NAME,JE as PM_CLI_GRAMMAR_CONTRACT,HE as PM_CLI_GRAMMAR_NOUNS,Cn as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,KE as PM_CLI_SHARED_VERBS,xo as PM_COMMAND_ALIAS_CONTRACTS,te as PM_COMMAND_CAPABILITY_CONTRACTS,vt as PM_COMMAND_DESTINATION_CONTRACTS,jO as PM_COMMAND_EXIT_CONTRACTS,UO as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Gn as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,$O as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,Be as PM_COMMAND_POSITIONAL_CONTRACTS,_c as PM_COMMAND_VISIBILITY_CONTRACTS,$I as PM_COMPLETE_LIST_FINDING_CODES,qw as PM_CONTEXT_INTENTS_FILE,vw as PM_CONTEXT_INTENT_CONTRACTS,Ro as PM_CONTEXT_OPS_COMMAND_ALIASES,gn as PM_CORE_COMMAND_NAMES,G as PM_CORPUS_SHAPE_SCHEMA,Sn as PM_DEPRECATED_TOOL_ACTIONS,Nn as PM_DIAGNOSTIC_DEGRADATION_STEPS,Ln as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,xn as PM_DIAGNOSTIC_OUTPUT_CLASSES,En as PM_DISCOVERABLE_TOOL_ACTIONS,Hr as PM_EPISODE_SCHEMA,LO as PM_ERROR_CODE_CATALOG,PO as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Zr as PM_EXACT_COVERAGE_METRICS,pn as PM_EXTENSION_CAPABILITY_CONTRACTS,yn as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,mn as PM_EXTENSION_POLICY_MODE_CONTRACTS,hn as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,_n as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,un as PM_EXTENSION_SERVICE_NAME_CONTRACTS,fn as PM_EXTENSION_TRUST_MODE_CONTRACTS,II as PM_GITATTRIBUTES_END,OI as PM_GITATTRIBUTES_START,MI as PM_GITATTRIBUTES_V2_END,RI as PM_GITATTRIBUTES_V2_START,Sc as PM_GITIGNORE_END,wc as PM_GITIGNORE_START,eM as PM_HISTORY_ATTESTATION_CONTRACT,Io as PM_HISTORY_COMMAND_ALIASES,rS as PM_HISTORY_OPERATION_ALIASES,nS as PM_HISTORY_OPERATION_CONTRACT,oS as PM_HISTORY_OPERATION_PATTERNS,Tn as PM_ITEM_ACTION_SUBCOMMANDS,eS as PM_ITEM_HISTORY_OPERATIONS,it as PM_MCP_APPS_EXTENSION,Rr as PM_MCP_APPS_SERVER_CAPABILITY,Ee as PM_MCP_APPS_SPEC_VERSION,kr as PM_MCP_APP_CONTRACTS,Pr as PM_MCP_APP_MIME_TYPE,Tb as PM_MCP_ENTRY_TOOL_NAMES,m as PM_MCP_ERROR_CODES,Dk as PM_MCP_HTTP_PROTOCOL_VERSION,Gh as PM_MCP_INPUT_REQUEST_METHODS,sk as PM_MCP_LEGACY_PROTOCOL_VERSIONS,tr as PM_MCP_LOG_LEVELS,E as PM_MCP_META_KEYS,FD as PM_MCP_PROGRESSIVE_DISCOVERY_EXTENSION,GD as PM_MCP_PROGRESSIVE_DISCOVERY_SERVER_CAPABILITY,Tc as PM_MCP_PROMPT_CONTRACTS,V as PM_MCP_PROTOCOL_VERSION,bc as PM_MCP_RESOURCE_CONTRACTS,at as PM_MCP_SKILLS_DRAFT_REVISION,xr as PM_MCP_SKILLS_EXTENSION,Vg as PM_MCP_SKILLS_SERVER_CAPABILITY,M as PM_MCP_SKILL_LIMITS,we as PM_MCP_SUBSCRIPTION_ID_META_KEY,Ye as PM_MCP_SUPPORTED_PROTOCOL_VERSIONS,Ik as PM_MCP_TASKS_EXTENSION,Yh as PM_MCP_TASK_STATUSES,_e as PM_MCP_TOOL_COMMAND_CONTRACTS,rC as PM_MODE_PAIRED_OUTPUT_PROJECTION_CONTRACTS,dd as PM_MUTATION_ACTION_CONTRACTS,xe as PM_NAMESPACED_COMMAND_ALIASES,zr as PM_OBSERVATION_SCHEMA,kn as PM_OUTPUT_BUDGET_CLASSES,Pn as PM_OUTPUT_DEGRADATION_STEPS,kt as PM_OUTPUT_ENVELOPE_KINDS,$t as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,bn as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,Dt as PM_PACKAGE_RESOURCE_KINDS,je as PM_POSITIONAL_ACTION_CONTRACTS,Yd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Wd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,tw as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,BC as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,ZC as PM_READ_OUTPUT_DIMENSIONS,ew as PM_READ_OUTPUT_OPTION_FLAGS,KC as PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS,HC as PM_READ_OUTPUT_SESSION_MIN_TOKENS,QC as PM_READ_OUTPUT_SURFACES,rw as PM_READ_OUTPUT_SURFACE_CONTRACTS,tC as PM_READ_ROW_CONTRACTS,eC as PM_READ_ROW_JQ_SELECTOR,IN as PM_RECOVERY_REFERENCE_FIELDS,de as PM_RECOVERY_REFERENCE_KINDS,Zy as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,co as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2,LN as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE,ao as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2,Po as PM_RELOCATED_COMMAND_ALIASES,rd as PM_REPRODUCIBLE_PROCESS_ENV,BO as PM_SUCCESS_EXIT_CODES,wn as PM_TOOL_ACTIONS,zd as PM_TOOL_ACTION_PARAMETER_CONTRACTS,Xd as PM_TOOL_PARAMETERS_SCHEMA,Kd as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,Hd as PM_TOOL_PARAMETERS_SCHEMA_VERSION,Ud as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,Vr as PM_VERDICT_SCHEMA,tS as PM_WORKSPACE_HISTORY_OPERATIONS,Br as PM_WORKSPACE_RECIPE_SCHEMA,gs as PROFILE_FLAG_CONTRACTS,Jt as PROFILE_LINT_CODES,Yt as PROFILE_LINT_DIMENSIONS,qt as PROFILE_NAMES,Xe as PROFILE_SUBCOMMANDS,b as PmCliError,he as PmClient,FI as PmCompleteListValidationError,y as PmMcpAuthorizationError,rr as PmMcpInputRequiredError,Er as PmMcpIssuerCredentialStore,u as PmMcpProtocolError,or as PmMcpRequestStateReplayGuard,Gr as PmMcpSkillRegistry,fr as PmMcpSubscriptionRegistry,ot as PmMcpTaskStore,yC as QUERY_CURSOR_CONTRACT,js as REINDEX_FLAG_CONTRACTS,QA as REINDEX_LOCK_ID,pt as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Ws as RELEASE_FLAG_CONTRACTS,ea as REMIND_FLAG_CONTRACTS,At as RESERVED_ITEM_FIELD_NAMES,Hs as RESTORE_FLAG_CONTRACTS,zo as RISK_VALUES,DE as RelationshipEventLog,$E as RelationshipEventStore,z as RelationshipGraph,Le as RelationshipKindRegistry,hs as SCHEMA_FLAG_CONTRACTS,Ka as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,BP as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ma as SEARCH_FLAG_CONTRACTS,Tu as SEMANTIC_ATTRIBUTION_LIMITS,Kb as SETTINGS_DEFAULTS,Lm as SNAPSHOT_SCHEMA,gI as SOURCE_CONTEXT_ACCESS_ENV,yI as SOURCE_CONTEXT_WRITE_OVERRIDE_ENV,Xs as START_TASK_FLAG_CONTRACTS,sa as STATS_FLAG_CONTRACTS,Bo as STATUS_VALUES,ts as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,Pi as SUBSTANTIVE_HISTORY_OPERATIONS,RS as SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,PS as SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,Xb as SUPPRESS_HOST_OUTPUT_MARKER,oa as TELEMETRY_FLAG_CONTRACTS,lf as TELEMETRY_SUBCOMMANDS,ra as TEST_ALL_FLAG_CONTRACTS,ta as TEST_FLAG_CONTRACTS,na as TEST_RUNS_FLAG_CONTRACTS,nf as TEST_RUN_MEASUREMENT_LIMIT,Dd as TOOL_ACTIVITY_OPTION_CONTRACTS,Ed as TOOL_AGGREGATE_OPTION_CONTRACTS,kd as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,Ld as TOOL_CALENDAR_OPTION_CONTRACTS,Nd as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,$d as TOOL_CONTEXT_OPTION_CONTRACTS,Rd as TOOL_CREATE_OPTION_CONTRACTS,Id as TOOL_CREATE_OPTION_CONTRACT_SOURCE,Fd as TOOL_DEPS_OPTION_CONTRACTS,Gd as TOOL_GRAPH_OPTION_CONTRACTS,Sd as TOOL_LIST_FILTER_OPTION_CONTRACTS,Ad as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,Od as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,vd as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,xd as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,Pd as TOOL_UPDATE_OPTION_CONTRACTS,Md as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,Hb as TYPE_TO_FOLDER,lA as UNKNOWN_SUBCOMMAND_COMPATIBILITY_CODES,ec as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,rc as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,tc as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,ga as UPDATE_FLAG_CONTRACTS,ya as UPDATE_MANY_FLAG_CONTRACTS,Us as UPGRADE_FLAG_CONTRACTS,ca as VALIDATE_FLAG_CONTRACTS,PC as WORKFLOW_POLICY_ACTIONS,xI as WORKFLOW_POLICY_DOCUMENT_SCHEMA,kI as WORKFLOW_POLICY_SCHEMA,Ia as WORKSPACE_FLAG_CONTRACTS,YS as WORKSPACE_HISTORY_ID,Dm as WORKSPACE_SNAPSHOT_ACTIONS,bl as WorkspaceGraphCache,BE as WorkspaceTransactionInterruptedError,zp as _testOnly,rP as _testOnlyAggregateCommand,gl as _testOnlyConfigCommand,dP as _testOnlyGetCommand,Mp as _testOnlyHealthCommand,Yc as _testOnlyInit,Kc as _testOnlyInitAgentGuidance,d0 as _testOnlyItemTransaction,PP as _testOnlyMutationEvents,QM as _testOnlyNextCommand,SP as _testOnlySearchCommand,WI as _testOnlySimilarity,am as _testOnlyTemplates,jp as _testOnlyValidateCommand,NP as _testOnlyWorkspacePosition,eR as acceptAssuranceProposals,Gp as acknowledgeLinkedTests,fl as acknowledgeUnknownAuthorHistoryEvents,ml as acknowledgeUnknownAuthorHistoryEventsFromTransport,EE as acquireItemMetadataDerivedIndexLock,Ue as acquireLock,T0 as activateExtensionForTest,RT as activateExtensions,ui as agentSessionEnvironment,c_ as aggregate,Km as analyzeAgentProvenanceDescriptorCoverage,Bv as analyzeDefectChangeRisk,qR as analyzeDefectRecurrenceCoverage,Bl as analyzeDuplicateItems,GE as analyzeGraphImpact,ic as analyzeHierarchyIntegrity,UE as analyzeKnowledgeGraph,zO as analyzePmCommandExitConformance,An as analyzePmToolActionParity,MR as analyzeReconciliationDiscard,FE as analyzeRelationshipExecution,ap as analyzeRelationshipSchedule,xh as analyzeSdkActionCoverage,Mt as analyzeSdkCliParameterCompleteness,C_ as append,Ni as appendHistoryEntry,eE as appendWorkspaceAuditEvent,QS as appendWorkspaceHistoryChange,_A as applyAcceptanceCriteriaMutations,ZI as applyAssurancePreset,Ga as applyBootstrapPagerPolicy,FR as applyClosureTimestampFix,Pw as applyContextIntentProjection,Hu as applyContextTagProjection,vO as applyFilterValueEcho,pE as applyHistoryPatch,td as applyInvocationAuthorOverride,Il as applyPathMigrations,lw as applyReadOutputDimensions,sw as applyReadOutputIncludeModes,XC as applyReadOutputSessionReferences,gE as applyRegisteredItemFieldDefaultsAndValidation,kl as applyStandaloneNote,Yi as applyStoredExtensionMigrationState,gA as applyTagRemovals,cM as applyTerminalOrderingPolicy,xl as artifactKey,nT as asRecordClone,oT as asRecordOrNull,ze as assembleWorkspaceRelationshipGraph,BI as assertCompleteListResult,ek as assertExtensionBlueprint,Q0 as assertExtensionCapabilityUsage,L0 as assertExtensionDeactivated,ok as assertExtensionManifestCompatible,rk as assertExtensionManifestMatchesBlueprint,nk as assertExtensionPreflight,dc as assertHierarchyMutationAllowed,JR as assertHistoryCompactTarget,kR as assertHistoryRepairTarget,Yn as assertInitializedTracker,Rl as assertLinkedArtifactMutationIsUnambiguous,dk as assertMcpClientCapabilities,ak as assertMcpProtocolHeader,Oy as assertMemoryRelationshipGraphAdapterConformance,TA as assertNoUnknownCsvKeys,D0 as assertPackageManifest,FA as assertParentReferenceIsNotSelf,ux as assertPmMcpSkillsCapability,tk as assertProjectProfile,vI as assertProjectRuntimeCompatibility,oC as assertProjectionModeChoice,Xn as assertReadableTrackerRoot,$0 as assertRegisteredCommandContract,K0 as assertRegisteredCommandOverride,q0 as assertRegisteredExporter,F0 as assertRegisteredFlags,G0 as assertRegisteredHook,B0 as assertRegisteredImporter,z0 as assertRegisteredItemField,V0 as assertRegisteredItemType,Z0 as assertRegisteredMigration,W0 as assertRegisteredParserOverride,X0 as assertRegisteredPreflightOverride,H0 as assertRegisteredProfile,Y0 as assertRegisteredRendererOverride,U0 as assertRegisteredSearchProvider,J0 as assertRegisteredServiceOverride,j0 as assertRegisteredVectorStoreAdapter,Gb as assertRelationshipEdgeAllowed,to as assertRelationshipGraphAdapterConformance,iA as assertSchemaPreviewSupported,eI as assuranceAssertionUpdateIsLoosening,Nw as attachContextIntentReceipt,gw as attachContextUsageServingReceipt,Lp as attachLinkedTestMutationProvenance,Np as attachLinkedTestProvenance,Ze as attachMcpServerInfo,cC as attachOutputOmissionReceipt,Dw as attachOutputTokenAccounting,Lw as attachReadOutputContracts,YC as attachReadOutputSessionReceipt,Mc as auditMergeAttributeFence,PI as auditMergeDriverConfiguration,mp as auditWorkspaceRelationshipGraph,Jk as authorizeMcpHttpRequest,li as boundAgentEpisodeIdentity,OC as boundReadOutputRows,Bu as buildChildrenByParent,gP as buildCompactSearchFilterSummary,OO as buildContentFilterEcho,GM as buildContextSignalSnapshot,ly as buildCorpusShapeItemPlan,jv as buildDefectRecurrenceIndex,Uc as buildExtensionDescribeResult,Bc as buildExtensionInstallPlan,IO as buildGovernanceMissingFilterEcho,HA as buildInvalidTypeError,iP as buildItemChildrenRollup,s0 as buildItemCompletionMutations,SM as buildItemContextRelevanceCandidates,ME as buildItemNotFoundError,aP as buildItemSchedule,GR as buildLinkedFileRepairReport,Bk as buildMcpAuthorizationDiscoveryUrls,$h as buildMcpCompleteResult,lk as buildMcpDiscoverResult,Kk as buildMcpDynamicRegistrationMetadata,Nk as buildMcpHttpRequestHeaders,_k as buildMcpInputRequiredResult,jk as buildMcpProtectedResourceMetadata,Ic as buildMergeAttributePatterns,Vd as buildPmActionToolInputSchema,FN as buildPmRefusalClosureCensus,KI as buildRelationshipContext,ov as buildSearchCorpus,iv as buildSemanticCorpusInput,LR as buildStatusRoleWarnings,Wn as buildTrackerInitializationRecovery,lv as buildVectorizationEmbeddingIdentity,pv as buildVectorizationEmbeddingMetadata,yP as buildVerboseSearchFilters,NI as buildWorkflowCompletenessCheck,HM as buildWorkspaceMemorySnapshot,ci as canonicalDocument,sT as canonicalizeCommandOptionKey,WP as canonicalizeCommandSuggestions,CM as canonicalizeContextRecencyCoordinate,Db as canonicalizeRelationshipKind,RN as censusPmRecoveryReferenceProducers,jI as certifyCompleteListResult,y0 as checkExtensionManifestCompatibility,nh as claim,ih as claimNext,zI as classifyHistoryAuthorEvent,ki as classifyHistoryEvent,IR as classifyHistoryMergeReceiptReferences,yT as classifyHostEnvironmentFault,TP as classifyImplicitSemanticFallbackReason,oi as classifyItemFormatVersion,mf as classifyLinkedTestCommandSafety,ff as classifyLinkedTestFailure,HT as clearActiveExtensionHooks,Cp as clearDurableGraphCache,ES as clearFocusedItem,Cf as clearWorkspaceContractsCache,oh as close,Kp as closeItem,mh as closeTask,Ba as coalesceRepeatedListFlags,Wv as collectBlockedByIds,Yv as collectBlockedByIdsFromCorpus,bw as collectContextUsageDeliveredItemIds,uc as collectDanglingDependencyReferences,Zv as collectDependencyBlockedIds,lc as collectDuplicateDependencyRows,up as collectDuplicateRelationshipEdgeGroups,bP as collectErrorCauseCodes,nc as collectHierarchyRelations,Tr as collectMcpHeaderAnnotations,mc as collectMissingDependencyTargetIds,Zp as collectNewOrderingCycleWarnings,cp as collectOrderingCycles,pc as collectOrderingStorageContradictions,Hw as collectPackageContextIntentContracts,Gt as collectPackageExtensionDirectories,_E as collectRegisteredItemFieldNames,hS as collectRuntimeCreateFieldValues,KA as collectRuntimeFilterValues,gS as collectRuntimeUpdateFieldValues,$u as collectSubtreeIds,rn as collectUsedExtensionCapabilities,aT as commandOptionFlagLabel,u_ as comments,Vf as commitImportedItem,a0 as commitItemCompletion,i0 as commitItemMutations,zE as commitWorkspaceTransaction,es as compactFlagAliasContracts,Fu as compareCriticalItems,CI as comparePmDateVersions,jE as compareRelationshipSnapshots,mw as compareTimestampStrings,yM as compileHistoryProvenanceMatcher,Rw as composeContextIntentContracts,p0 as composeExtension,g0 as composeExtensionPackage,eO as computeActionabilityReport,xA as computeHistoryDiff,ip as computeRelationshipCentrality,np as computeRelationshipDominators,yl as computeWorkspaceGraphFingerprint,S_ as config,VT as consumeAfterCommandAffectedItems,o_ as context,xw as contextIntentRowId,ah as copy,_f as countFailureCategories,AC as countReadOutputRows,eh as create,JI as createAssurancePreset,jR as createAssuranceWorkspaceContext,sA as createCheckpointId,GI as createCompleteListOptions,MT as createCoreCommandHookContext,Jr as createCorpusShapeMeasurement,iI as createEmptyAssuranceDocument,_T as createEmptyExtensionRegistrationRegistry,Ki as createExtensionCommandSdk,en as createExtensionContributionInventory,ik as createExtensionTestHarness,xi as createHistoryEntry,Ov as createLazyModule,LI as createLifecycleCompletenessPolicies,Zk as createMcpStaticBearerVerifier,Rk as createMcpTaskStore,RE as createMutationGuardSdk,nC as createOutputOmissionReceipt,Fi as createPmCliExpectedError,Kn as createPmCliProgram,$n as createPmCommandOutputBudget,pC as createQueryFingerprint,vy as createRelationshipGraphScaleFixture,Z as createRelationshipGraphSnapshot,yt as createRelationshipKindRegistry,nd as createReproducibleProcessRunner,_P as createSearchCursorFingerprint,PT as createSerialQueue,vA as createStdinTokenResolver,pA as createUnknownSubcommandError,jC as createWorkflowPolicyEvaluator,$m as createWorkspaceSnapshot,C0 as deactivateExtensionForTest,vL as declineServiceOverride,kw as decodeContextIntentCursor,vv as decodeHtmlEntitiesInOptions,br as decodeMcpHttpHeaderValue,Fw as decodePmTableRows,_C as decodeQueryCursor,mC as decodeQueryCursorEnvelope,fC as decodeQueryCursorState,VC as decodeReadOutputContinuationCursor,ox as decoratePmMcpToolsWithApps,Ll as dedupeLinkedArtifacts,AM as defaultScoreContextCandidates,kL as defineAfterCommandHook,ML as defineBeforeCommandHook,PL as defineBeforeMutationHook,fL as defineCommand,CL as defineCommandOverride,W as defineCorpusShape,wx as defineEpisodeSpecification,RL as defineExporter,c0 as defineExtension,l0 as defineExtensionBlueprint,uL as defineExtensionManifest,_L as defineFlag,IL as defineImporter,gL as defineItemField,hL as defineItemType,yL as defineMigration,ey as defineObservationContract,LL as defineOnIndexHook,NL as defineOnReadHook,xL as defineOnWriteHook,wL as defineParserOverride,Fn as definePmCommandOutputBudget,DO as definePmCommandOutputEnvelope,kO as definePmErrorCodeCatalog,SL as definePreflightOverride,mL as defineProjectProfile,OL as defineRendererOverride,bL as defineSearchProvider,EL as defineServiceOverride,TL as defineVectorStoreAdapter,ny as defineVerdictContract,Ae as defineWorkspaceRecipe,dh as deleteItem,qm as deleteWorkspaceSnapshot,Ub as dependencyToRelationship,b_ as deps,QI as deriveAssuranceProposals,DR as deriveClosureTimestamp,m0 as deriveExtensionCapabilities,VO as derivePmBulkMutationEffect,MN as derivePmRecoveryReferenceObligations,dp as deriveRelationshipDeadlines,Nc as deriveSchemaEvolutionMigrationId,bv as deriveTelemetryCommandResolution,JA as describeAllowedTransitions,hI as describeExtensionActivation,f0 as describeExtensionBlueprint,Au as describeItemOwnershipConflict,Cx as describeObservationCost,Wt as describeProfileComposition,Xt as describeProjectProfile,Xw as describeUnknownError,wi as detectAgentIdentity,vi as detectHarnessIdentity,rp as detectRelationshipCommunities,Si as diagnoseAgentIdentity,fp as diffRelationshipAuditSnapshots,df as diffTestRunMeasurements,yk as digestMcpRequestParameters,OT as discoverExtensions,Xo as discoverNearbyPmRoot,jD as discoverPmTools,SI as discoverProjectRuntimeVersionPins,y_ as docs,p_ as duplicates,gp as durableGraphCachePath,wp as durableGraphCacheStatus,ti as effectiveItemFormatVersion,Dv as emitTelemetryErrorEvent,zf as emptyImportedDocument,dR as encodeItemScalarDecisionValue,yr as encodeMcpHttpHeaderValue,$w as encodePmTableRows,uC as encodeQueryCursor,zC as encodeReadOutputContinuationCursor,yE as enforceHistoryStreamPolicyForItem,bE as enforceHistoryStreamPolicyForItems,RO as enrichCliFlagInvocationContract,Pt as enrichCliFlagInvocationContracts,mE as ensureMaterializedHistoryTarget,Ac as ensurePmGitignore,Sl as ensureScope,yv as ensureSentryInit,qf as ensureTrackerInitialized,ep as enumerateRelationshipPaths,jn as estimatePmOutputTokens,aI as evaluateAssuranceAssertion,dI as evaluateAssuranceGate,Ux as evaluateBoundaryFixtures,RM as evaluateContextRanking,qv as evaluateDefectGateEvidence,sI as evaluateMeasurement,Am as evaluateMetricFloors,ld as evaluateMutationGuard,Qm as evaluateProvenanceCoverage,QL as evaluateReliabilityWindow,Ym as evaluateSemanticAttributionCoverage,zl as evaluateSimilarityGovernance,YA as evaluateTransition,iy as evaluateVerdictContract,UC as evaluateWorkflowPolicies,ad as executeEmbeddingBatchesWithRetry,dv as executeVectorDelete,cv as executeVectorReset,av as executeVectorUpsert,Yg as executeWorkspaceRecipe,Pl as expandAddGlobEntries,Hl as explainSourceTraceability,rM as exportAttestation,fh as extension,hh as extensionActivate,gh as extensionDeactivate,_h as extensionList,pb as extensionMigrate,OR as extractHistoryMergeReceiptDispositions,vR as extractHistoryMergeReceiptReferences,Wk as extractMcpTraceContext,cE as extractPatchFailureContext,Pp as extractReferencedPmItemIdsFromCommand,Ay as federateRelationshipGraphSnapshots,__ as files,h_ as filesDiscover,g_ as filesLookup,Tw as finalizeContextUsageDelivery,hy as findCoverageDeficits,ql as findDuplicateClusters,Oc as findGitWorkspaceRoot,BS as findHistoryIdentityDiscontinuities,Fc as findInstalledNpmPackageCandidate,rx as findPmMcpAppByUri,ko as findPmNamespacedCommand,op as findRedundantRelationshipEdges,sp as findRelationshipCutStructure,jl as findSimilarItems,Lv as finishTelemetryCommand,wT as flattenFlagListValue,my as flushTelemetryQueue,lh as focus,tp as forEachMatchedRelationshipEdge,pp as formatDuplicateEdgeGroup,sc as formatHierarchyRelation,lp as formatOrderingStorageContradiction,YE as formatPmPositionalActionFlagTip,bm as formatProfileApplyHuman,ym as formatProfileLintHuman,hm as formatProfileListHuman,gm as formatProfileShowHuman,$c as formatSchemaEvolutionMigrationHuman,wP as formatVectorIndexRecoveryWarnings,xP as formatWorkspacePositionHuman,W_ as gc,Bi as generateItemId,a_ as get,BT as getActiveCommandResult,Ow as getActiveContextIntentContracts,nn as getActiveExtensionRegistrations,Yk as getActiveMcpTraceContext,lI as getAssuranceDeclaration,Mh as getContracts,wS as getFocusedItem,Zo as getHistoryPath,LE as getItemAt,Jo as getItemPath,md as getMutationActionContract,Ec as getPmGitignoreBlock,Yo as getSettingsPath,wf as getWorkspaceContracts,JS as getWorkspaceHistoryPath,T_ as graph,yp as graphAuditBaselinePath,Jm as groupHistoryByEpisode,AL as handleServiceOverride,ck as hasMcpClientExtension,tx as hasPmMcpAppsCapability,qe as hasSubcommandFlagContractsForCommand,uv as hasVectorizationEmbeddingIdentityChanged,mv as hasVectorizationVectorDimensionChanged,GS as hashDocument,US as hashDocumentForVersion,jS as hashEmptyDocument,xS as hashHistoryPatch,kS as hashHistoryRecord,NS as hashHistoryStream,cR as hashItemScalarDecisionValue,K_ as health,Yl as hierarchyAncestors,Jl as hierarchyDescendants,Z_ as historyCompact,Q_ as historyCompactBulk,uS as historyDigest,gM as historyEntryMatchesProvenance,wI as historyItemHashVersionForRuntime,X_ as historyRedact,Y_ as historyRepair,J_ as historyRepairAll,Xv as indexBlockedByIds,ac as indexHierarchyRelations,fv as inferConsistentVectorDimension,Dn as inferPmOutputBudgetClass,w_ as init,UI as inspectCompleteListResult,hT as inspectExtensionManifestSchema,dl as inspectHistoryAuthorStream,gR as inspectMergeReceiptEvidence,AI as inspectProjectRuntimeCompatibility,Td as inspectStaleInProgressItems,Nh as inspectStaticExtensionInventory,NR as inspectStatusRoleAssignments,ZS as inspectWorkspaceHistoryState,Fm as inspectWorkspaceSnapshot,xc as installMergeFence,pk as interpretMcpResultType,Xu as isAlreadyClaimedError,Zw as isCommanderError,ol as isErrnoError,$v as isExternalDependencyReference,Fv as isExternalDependencySourceKind,me as isFileMissingError,Jb as isHostOutputSuppressed,$i as isItemAlreadyExistsError,aR as isItemScalarMissingValue,SR as isLegacyMergeReceiptSummary,h as isMcpRecord,pd as isMutationAction,Fb as isOrderingRelationshipKind,DA as isPlaceholderReferenceToken,Gi as isPmCliExpectedError,On as isPmExtensionCapabilityContract,Rn as isPmExtensionPolicyModeContract,Mn as isPmExtensionPolicySurfaceContract,In as isPmExtensionServiceNameContract,qO as isPmKnownExitCode,FO as isPmMutationReceipt,Ke as isPmSuccessfulExitCode,vn as isPmToolAction,ER as isPreDurableCloneLocalReceiptSummary,AR as isPreDurableDispositionEligibleReference,EI as isProjectMutatingInvocation,Iv as isPureSnakeCaseAlias,pw as isReadOutputBudgetExceeded,sC as isReadRowContract,Zc as isRuntimeRecord,Pv as isTerminalPlanMode,bS as isTerminalStatus,Hn as isTimestampLiteral,r0 as itemDocumentToMutationOptions,sP as itemHasSchedule,fd as jaccardSimilarity,f_ as learnings,fT as levenshteinDistanceWithinLimit,el as limitAnnotationEntries,Dp as linkedTestTrustFingerprint,_0 as lintExtensionBlueprint,gT as lintExtensionManifestSchema,Zt as lintProjectProfile,n_ as list,gi as listAgentProvenanceAdapters,ja as listAliasPluralKeys,i_ as listAllComplete,OE as listAllDocumentCandidatesCached,Hi as listAllItemMetadata,IE as listAllItemMetadataLight,cI as listAssuranceDeclarations,_I as listAssuranceVerdicts,dy as listBuiltinCorpusShapes,XP as listCoreClosedDomainContracts,CO as listGetProjectionFields,nR as listInvalidProvenanceHistoryStreamIds,bO as listListProjectionFields,yR as listMergeReceipts,ud as listMutationActions,IP as listMutationEvents,mo as listPmCommandFlagBudgets,gc as listPmCommandsForFamily,hc as listPmCommandsForTier,Me as listPmFlagLexicon,dL as listPmFlagSpellingInventory,yc as listPmMcpToolsForProfile,JN as listPmRequiredArgumentRefusalContracts,ZN as listPmSubcommandRefusalContracts,Kt as listProfiles,tL as listTrackerPreflightRecoveryContracts,Gm as listWorkspaceSnapshots,Kw as loadContextIntentRuntimeLayers,dm as loadCreateTemplateOptions,IT as loadExtensions,Ep as loadGraphAuditBaseline,dA as loadMutationCheckpoint,x as loadRelationshipGraphAdapter,zi as locateItem,bA as looksLikeGenericKeyValueEntry,vC as mapReadOutputRows,bR as markMergeReceiptReconciled,WA as matchesRuntimeFilters,xv as maybeRunFirstUseTelemetryPrompt,py as measureCorpusShapePlan,qi as measureItemMetadataReadWork,hA as mergeAdditiveTags,u0 as mergeExtensionBlueprints,lR as mergeHistoryStreams,fR as mergeItemDocuments,_R as mergeJsonDocuments,qa as mergeLinkedTestTwoTokenEntries,pR as mergeRelationshipEventStreams,zu as mergeSortedWarnings,Mv as migrateItemFilesToFormat,kE as mutateItem,PE as mutateItemWithHistoryContext,tE as mutateWorkspaceJsonWithHistory,d_ as next,bi as normalizeAgentProvenanceAdapterValue,Qc as normalizeAnnotationTransportOptions,YO as normalizeAssuranceEvaluation,XO as normalizeAssuranceMutation,za as normalizeBootstrapInvocation,MA as normalizeBulkIdsValue,cc as normalizeDependencyGraphTarget,fO as normalizeDependencySeedId,mO as normalizeDependencySourceKind,Qo as normalizeExtensionContributionInventory,aS as normalizeHistoryOperationForWrite,oR as normalizeInvalidHistoryProvenance,nA as normalizeItemAddressInvocation,ri as normalizeItemFormatVersion,ji as normalizeItemId,si as normalizeItemMetadata,_O as normalizeItemReference,Ua as normalizeLegacyExtensionActionSyntax,Ml as normalizeLinkedPath,LA as normalizeParentReferenceValue,Vt as normalizeProfileName,Ui as normalizeRawItemId,aw as normalizeReadOutputIncludeModeOptions,HS as normalizeReplayPatchOps,_d as normalizeSimilarityText,yS as normalizeStatusForRegistry,ii as normalizeStatusInput,fS as normalizeStatusInputWithRegistry,Jw as normalizeThrownExitCode,m_ as notes,Vn as nowIso,bp as openDurableGraphCache,gk as openMcpRequestState,Sx as openPmEpisode,Zl as orderingPredecessors,Ql as orderingSuccessors,NM as packContextCandidates,Gu as packRankedContextItems,Oh as packageActivate,vh as packageCatalog,Ih as packageDeactivate,Eh as packageDescribe,wh as packageDoctor,Th as packageInstall,yh as packageLifecycle,bh as packageList,Sh as packageManage,ub as packageMigrate,Ah as packageReload,Ch as packageUninstall,gC as paginateQueryRows,El as parseAddEntries,Al as parseAddGlobEntries,rl as parseAnnotationTextInput,QP as parseAtomicMutationControls,Fa as parseBootstrapCommandName,La as parseBootstrapGlobalOptions,$a as parseBootstrapHelpRequest,Va as parseBootstrapTypeValue,RA as parseBulkIdsText,Lu as parseContextDepth,Pu as parseContextFocusFields,zw as parseContextIntentDeclarations,Du as parseContextSections,FM as parseContextSignalSnapshot,yA as parseCsvKv,Vv as parseDefectChangeRiskRequest,BR as parseDefectRecurrenceCoverageRequest,zv as parseDefectRecurrencePolicy,Em as parseEvalMetricFloors,Rm as parseEvalQuerySet,Op as parseGraphSubcommand,tM as parseHistoryAttestation,_M as parseHistoryProvenanceFilters,tO as parseIntegerLimit,TS as parseItemDocument,e0 as parseItemMutationBatch,VA as parseLimit,pu as parseLinkedTestAssertionEqualsMap,uu as parseLinkedTestAssertionGteMap,iu as parseLinkedTestBoolean,su as parseLinkedTestContextMode,nu as parseLinkedTestEnvClear,ou as parseLinkedTestEnvSet,mu as parseLinkedTestJsonEntries,lu as parseLinkedTestMinLines,cu as parseLinkedTestRegexList,du as parseLinkedTestStringList,au as parseLinkedTestWorkspaceContextMode,Bh as parseMcpCachePolicy,Lh as parseMcpImplementation,tt as parseMcpInputRequests,ar as parseMcpInputResponses,ug as parseMcpSubscriptionFilter,Ol as parseMigrateEntries,nO as parseMultiValueFilter,GO as parseMutationReceipt,IA as parseOptionalNonNegativeInteger,OA as parseOptionalNumber,wN as parsePmAgentTaskTranscriptCorpus,UD as parsePmToolDiscoveryOptions,rO as parsePriority,aO as parsePriorityFilterSet,WC as parseReadOutputSession,hE as parseRegisteredItemFieldAssignments,se as parseRelationshipGraphSnapshot,vl as parseRemoveEntries,Vl as parseSourceLineRange,jA as parseStatusFilterCsv,iO as parseStringFilterSet,sd as parseTags,sf as parseTestRunMeasurements,oO as parseType,sO as parseTypeFilterSet,ul as parseUnknownAuthorHistoryEventCoordinates,NC as parseWorkflowPolicy,LC as parseWorkflowPolicyDocument,eP as partitionDecisionEntries,kA as patchPathToChangedField,$o as pathExists,uh as pauseTask,Tp as persistDurableGraphResult,sE as persistSelectedItemFormat,HI as planAgentIdentityVocabularyMutation,zM as planCompletedAtBackfill,qc as planExtensionDirectoryCopy,Qt as planProfileApplication,vN as planRelationshipEventBackfill,vp as planRelationshipRemediation,Lc as planSchemaEvolutionMigration,ll as planUnknownAuthorHistoryAcknowledgment,Um as planWorkspaceSnapshotRestore,QE as positionalShapeKey,eA as positionalSignatureKey,b0 as preflightExtension,gd as prepareSimilarityText,wA as preserveMutationStdinTokenFields,CA as preserveMutationStdinTokenLiterals,n0 as previewItemMutations,Bw as printError,jw as printResult,j_ as profile,z_ as profileApply,V_ as profileLint,B_ as profileList,q_ as profileShow,zT as projectAfterCommandItemSnapshot,ku as projectContextFocusRows,of as projectFleetAttributionAnalytics,hM as projectHistoryProvenance,qn as projectPmDiagnosticOutput,zn as projectPmDiagnosticText,tf as projectProvenanceCoverageAnalytics,Up as projectValidateCounts,tR as promoteAssuranceAssertion,yw as propagateContextUsageServingReceipt,Hx as pruneCompileCacheGenerations,pI as putAssuranceDeclaration,uI as putAssuranceDeclarationBundle,TE as queryItemMetadataIndex,CE as queryLinkedFileMetadataIndex,wE as querySimilarItemMetadataIndex,af as queryTestRunMeasurementsBelow,cn as quoteCommandArg,dn as quoteWindowsCommandArg,KP as rankCommandPaths,tl as readAnnotationEntries,Ei as readAuthorEnvironment,Ef as readBooleanOption,Aw as readContextUsageAffinity,Af as readCsvListOption,Xi as readExtensionMigrationState,Fo as readFileIfExists,Za as readFirstStringFromCommanderOptions,Qa as readFirstValueFromCommanderOptions,Zm as readHistoryAnalyticsWindow,OS as readHistoryEntries,Ii as readHistorySnapshot,Vm as readImprovementLedger,AE as readItemMetadataDerivedIndexState,Vi as readLocatedItem,EC as readOutputBudgetCollections,qC as readOutputCollectionFingerprint,SC as readOutputContinuationRowCollections,CC as readOutputContinuationRowPaths,iw as readOutputIncludeModeOptions,wC as readOutputRowCollections,TC as readOutputRowPaths,JC as readOutputSessionRemainingTokens,Ft as readPmPackageManifest,Tf as readRequiredString,Li as readSettings,aE as readSettingsWithMetadata,ed as readStringArrayFromCommanderOptions,Sf as readStringOption,Yw as readThrownExitCode,_v as readVectorizationStatusLedger,fE as readWorkflowPolicies,DC as readWorkflowPolicyField,Vw as readWorkspaceContextIntentContracts,BM as readWorkspaceContextSignals,KM as readWorkspaceMemory,kP as readWorkspacePosition,XS as reanchorHistoryEntries,tD as reconcileArtifactLedgers,on as reconcileExtensionCapabilityUsage,oE as reconcileWorkspaceJsonHistory,qT as recordAfterCommandAffectedItem,fI as recordAssuranceVerdict,gu as recordClaimSemanticAttribution,ww as recordContextUsageDelivery,Cw as recordContextUsageServing,Sw as recordContextUsageTouch,Ew as recordContextUsageTouches,bu as recordFocusSemanticAttribution,zm as recordImprovementObservation,yu as recordReleaseSemanticAttribution,vE as refreshItemMetadataDerivedIndex,Pc as refreshMergeAttributeFenceIfInstalled,RC as refreshReadOutputDeliveredCounts,gv as refreshSearchArtifactsForMutation,yi as registerAgentProvenanceAdapters,pO as registerExternalDependencyResolver,hi as registerHarnessSignalDescriptors,QT as registerOutputMaterialFieldGroups,sh as release,IC as rememberReadOutputFocusRows,mI as removeAssuranceDeclaration,Go as removeFileIfExists,Fl as renameArtifactsResultKey,Ou as renderCalendarMarkdown,Iu as renderCalendarToon,Vu as renderContextMarkdown,jc as renderExtensionDescribeMarkdown,Gc as renderExtensionSurfaceMarkdown,Wf as renderGuideMarkdown,VP as renderMissingOptionRetry,tP as renderNextMarkdown,YP as renderPmClosedDomainHelp,ln as renderPmCommand,Do as renderPmCommandAliasMigrationHint,Cc as renderPmCommandVisibilityMarkdown,lL as renderPmFlagLexiconMarkdown,nx as renderPmMcpAppHtml,GN as renderPmRefusalClosureCensusMarkdown,qA as renderRowsAsCsv,zA as renderRowsAsTable,rh as reopen,uE as replayHistoryToTarget,zS as replayToCanonicalItemDocument,qS as replayToItemDocument,sS as requireHistoryOperation,aM as requireTerminalReason,dM as requireTerminalReasonWithRecovery,$S as resealHistoryRewrite,GT as resetActiveExtensionRuntimeState,Cl as resetWorkspaceGraphCache,pi as resolveAgentSessionContextFromSignals,al as resolveAnnotationIndex,nl as resolveAnnotationInput,vS as resolveAuthor,Oi as resolveAuthorIdentity,NA as resolveBodyFileContent,cy as resolveBuiltinCorpusShape,vu as resolveCalendarOutputFormat,xO as resolveCanonicalPmErrorCodeContract,$b as resolveCanonicalRelationshipKind,AS as resolveClaimPrincipal,PA as resolveCliBulkIdsInput,lT as resolveCommandOptionPolicyState,Vx as resolveCompileCacheGeneration,qM as resolveCompletionTimestamp,eT as resolveConfiguredPmPackageRoot,SO as resolveContentFieldFilters,Mw as resolveContextIntentContract,xu as resolveContextOutputFormat,Nu as resolveContextTokenBudget,lM as resolveCreateExplicitEmptyFlag,pP as resolveEffectiveSearchMode,tv as resolveEmbeddingProviders,zc as resolveExtensionInstallSourceIdentity,Wi as resolveExtensionMigrationStatePath,vT as resolveExtensionRoots,uO as resolveExternalDependencyReference,CT as resolveFlagValueKind,mT as resolveGlobalPmRoot,Hf as resolveGuideOutputFormat,Hm as resolveHistoryEpisodeGroupIdentity,pS as resolveHistoryHashAlgorithm,iS as resolveHistoryOperation,fM as resolveHistoryProvenanceDimensions,xE as resolveHistorySubject,lE as resolveHistoryTarget,mP as resolveHybridSemanticWeight,Wo as resolveImplicitPmRoot,fw as resolveIsoOrRelative,Jv as resolveItemBlockers,Hv as resolveItemExecutionRole,t0 as resolveItemMutationDocument,Ko as resolveItemTypeRegistry,mS as resolveItemTypesFilePath,hf as resolveLinkedTestFailureExitCode,kp as resolveLinkedTestSourceRef,xp as resolveLinkedTestSourceWorkspaceRoot,$p as resolveLinkedTestTrust,Fp as resolveLinkedTestTrustBatch,mg as resolveMcpAcknowledgedSubscriptionFilter,Je as resolveMcpRequestContext,vc as resolveMergeInstallContext,wO as resolveMissingMetadataFilters,zP as resolveMissingOptionPlaceholder,iC as resolveModePairedOutputOmissionReceipt,ZM as resolveNextOutputFormat,dC as resolveOutputOmissionReceipt,Qb as resolvePmCliVersion,Lo as resolvePmCommandAlias,Ve as resolvePmCommandCapabilityFamily,Nt as resolvePmCommandExitContract,L as resolvePmCommandOperation,Un as resolvePmCommandOutputBudget,xt as resolvePmCommandOutputEnvelope,WE as resolvePmCommandPositionalContract,He as resolvePmCommandVisibilityTier,Bn as resolvePmDiagnosticOutputBudget,NO as resolvePmErrorCodeContract,ab as resolvePmFlagSemanticConcept,Ne as resolvePmHistoryOperation,Zb as resolvePmPackageRootFromModule,XE as resolvePmPositionalActionContract,xa as resolvePmPositionalActionFlagContracts,$e as resolvePmRoot,jd as resolvePmToolCustomFieldCollision,GA as resolvePriority,Ht as resolveProfile,Rc as resolveProjectMergeTypeFolders,hC as resolveQueryCursorStart,dw as resolveReadOutputDimensions,uw as resolveReadOutputEncoding,MC as resolveReadOutputRecoveryBudget,ow as resolveReadOutputSurface,aC as resolveReadRowContract,qP as resolveRecoveryCommandName,uA as resolveRegisteredSearchProvider,mA as resolveRegisteredVectorStoreAdapter,od as resolveReproducibleProcessEnvironment,Zn as resolveRuntimeFieldRegistry,Jn as resolveRuntimeStatusRegistry,rv as resolveSearchCorpusFields,lP as resolveSearchMaxResults,hP as resolveSearchPage,uP as resolveSearchScoreThreshold,fP as resolveSearchTuning,nv as resolveSemanticCorpusCharacterLimit,hu as resolveSemanticLineageIds,ZA as resolveSettingsWithSemanticRuntimeDefaults,bI as resolveSourceContextWritePolicy,Su as resolveStartTaskInProgressStatus,ee as resolveSubcommandFlagContractsForCommand,Wb as resolveTelemetryErrorCategory,sM as resolveTerminalReason,cT as resolveTypeDefinition,dT as resolveTypeName,BA as resolveTypeSynonym,XA as resolveTypeWorkflows,pl as resolveUnknownAuthorAcknowledgmentSelector,CP as resolveVectorIndexRecovery,sv as resolveVectorStores,oc as resolveWorkspaceRelationshipKindRegistry,uT as resolveWorkspaceRoot,ch as restore,cA as restoreCheckpointItems,nE as restoreWorkspaceJsonFromHistory,Bm as restoreWorkspaceSnapshot,jm as restoreWorkspaceSnapshotWithRecovery,kh as runAction,KT as runActiveBeforeMutationHooks,XT as runActiveCommandHandler,WT as runActiveOnIndexHooks,an as runActiveOnReadHooks,sn as runActiveOnWriteHooks,YT as runActiveParserOverride,JT as runActivePreflightOverride,ZT as runActiveServiceOverride,Mu as runActivity,AT as runAfterCommandHooks,Tm as runAggregate,sl as runAnnotationCommand,Hp as runAppend,HR as runAssuranceAction,KR as runAssuranceDispatch,ET as runBeforeCommandHooks,Ru as runCalendar,Yu as runClaim,Ju as runClaimNext,Wp as runClose,Yp as runCloseMany,tm as runCloseTask,_l as runComments,Xf as runCompletion,hl as runConfig,Bt as runContext,kM as runContextEvaluationCorpus,MM as runContextEvaluationScenario,Jp as runCopy,fu as runCreate,_u as runDelete,wl as runDeps,Gl as runDocs,XI as runDuplicates,Pm as runEval,xm as runEvent,Vc as runExtension,Zi as runExtensionMigrateAction,Ji as runExtensionMigrations,Kl as runFiles,Xl as runFilesDiscover,Wl as runFilesLookup,rf as runFleetAttributionAnalytics,wu as runFocus,qp as runGc,Cm as runGet,Ip as runGraph,Kf as runGuide,Rp as runHealth,cP as runHistory,nM as runHistoryAttest,XR as runHistoryCompact,ZR as runHistoryCompactBulk,RR as runHistoryMaintenance,QR as runHistoryRedact,PR as runHistoryRepair,xR as runHistoryRepairAll,Jc as runInit,Wc as runInitAgentGuidance,Vp as runLearnings,$l as runLinkedArtifacts,gf as runLinkedTests,fc as runList,km as runMeet,AP as runMergeDriver,kc as runMergeInstall,CR as runMergeReceiptEvidenceReport,TR as runMergeReceiptReport,vP as runMergeReconcile,Wu as runNext,sm as runNotes,em as runPauseTask,nm as runPlan,_m as runProfileApply,fm as runProfileLint,um as runProfileList,mm as runProfileShow,ef as runProvenanceCoverageAnalytics,w0 as runRegisteredCommandForTest,O0 as runRegisteredCommandOverrideForTest,N0 as runRegisteredExporterForTest,E0 as runRegisteredHookForTest,x0 as runRegisteredImporterForTest,k0 as runRegisteredMigrationForTest,S0 as runRegisteredMutationGuardForTest,A0 as runRegisteredParserOverrideForTest,v0 as runRegisteredPreflightOverrideForTest,I0 as runRegisteredRendererOverrideForTest,M0 as runRegisteredSearchProviderForTest,R0 as runRegisteredServiceOverrideForTest,P0 as runRegisteredVectorStoreAdapterForTest,er as runReindex,Zu as runRelease,Nm as runRemind,uM as runReopen,Xp as runRestore,Dc as runSchemaEvolutionMigration,wm as runSearch,uy as runSearchRefreshWorkerEntrypoint,Yf as runStartBackgroundRun,Qu as runStartTask,cf as runStats,pf as runTelemetry,lm as runTemplatesList,cm as runTemplatesSave,pm as runTemplatesShow,yf as runTest,bf as runTestAll,Jf as runTestRunsList,Qf as runTestRunsLogs,t_ as runTestRunsResume,Zf as runTestRunsStatus,e_ as runTestRunsStop,r_ as runTestRunsWorker,Eu as runUpdate,im as runUpdateMany,Ut as runUpgrade,Bp as runValidate,Ph as runWithActiveExtensions,D as runWithAgentSessionContext,iE as runWithConfigurationOnlySettings,Iw as runWithContextIntentContracts,Ww as runWithDiscoveredContextIntentContracts,Ti as runWithHarnessDetectionSignals,Xk as runWithMcpTraceContext,id as runWithReproducibleProcessEnvironment,Ci as runWithWorkspaceHarnessSignalDescriptors,qr as runWithWorkspaceRecipe,DI as runWorkflowPolicyAction,WR as runWorkspaceTransactionGc,Ap as saveGraphAuditBaseline,$R as scanClosureTimestamps,rR as scanExtensionHostVersions,cl as scanHistoryAuthorAttribution,ni as scanItemFormatVersions,cd as scanMutationSecrets,iR as scanProvenanceResolverHealth,Cd as scanStaleInProgressItems,UR as scanStorageIntegrity,E_ as schema,P_ as schemaAddField,R_ as schemaAddStatus,O_ as schemaAddType,L_ as schemaApplyPreset,D_ as schemaInferTypes,A_ as schemaList,x_ as schemaListFields,G_ as schemaRemapStatus,k_ as schemaRemoveField,M_ as schemaRemoveStatus,I_ as schemaRemoveType,F_ as schemaRenameField,$_ as schemaRenameType,v_ as schemaShow,N_ as schemaShowField,U_ as schemaShowStatus,HP as scoreCommandPathMatch,vM as scoreContextCandidates,OM as scoreContextCandidatesWithActiveExtensions,yd as scoreItemSimilarity,QN as scorePmGrammarRefusalClosure,BN as scorePmRefusalClosure,bd as scorePreparedItemSimilarity,rL as scoreTrackerPreflightRecoveryClosure,LS as sealHistoryRecord,hk as sealMcpRequestState,s_ as search,YM as searchWorkspaceMemory,JM as searchWorkspaceMemoryReadResult,Qv as selectActionableEntries,lC as selectCursorSemanticOptions,Bf as selectImportAuthor,zk as selectMcpClientRegistrationMode,XM as selectWorkspaceMemory,WM as selectWorkspaceMemoryRollups,Cu as semanticAttributionAffinity,Sv as sentryCaptureCliError,wv as sentryFinishCommandSpan,Av as sentryFlush,Ev as sentryLogCliUsageError,Tv as sentrySetCommandContext,Cv as sentryStartCommandSpan,di as serializeItemDocument,JP as serializeNdjsonRows,ZP as serializeNdjsonStream,ty as serveDeclaredObservation,UT as setActiveCommandContext,jT as setActiveCommandResult,xT as setActiveExtensionCommands,kT as setActiveExtensionHooks,NT as setActiveExtensionParsers,LT as setActiveExtensionPreflight,FT as setActiveExtensionRegistrations,$T as setActiveExtensionRenderers,DT as setActiveExtensionServices,SS as setFocusedItem,kv as shouldCompletePlanOnClose,Sp as shouldPersistDurableGraphCache,AA as shouldResolveMutationStdinTokenField,EA as shouldResolveMutationStdinTokens,ev as shouldRunSearchRefreshInForeground,Ul as similarityAdvisoryWarnings,bC as sliceReadOutputRowCollection,Nl as sortLinkedArtifacts,fA as splitAcceptanceCriteria,Rv as splitCommaList,ai as splitFrontMatter,cw as stabilizeReadOutputReceiptEstimates,R as stableStringify,ST as stableValueEquals,ph as startTask,Nv as startTelemetryCommand,l_ as stats,_S as statusIsTerminal,Da as stripGlobalBootstrapTokens,RP as subscribeMutationEventBatches,MP as subscribeMutationEvents,VI as summarizeAgentIdentityVocabulary,Wm as summarizeAgentModelProvenance,Xm as summarizeAgentProvenance,PM as summarizeContextEvaluationReports,uf as summarizeContextPreflight,bM as summarizeHistoryProvenance,Xc as summarizeInitResult,hR as summarizeMergeReceipt,pM as supportsCreateExplicitEmpty,oA as supportsItemIdAlias,Yb as suppressHostOutput,Oe as syncRelationshipGraphAdapter,h0 as synthesizeExtensionManifest,Na as toCompletionFlagString,qu as toContextFocusItem,Uu as toContextPackingSummary,ju as toContextRankingSummary,rT as toErrorMessage,Of as toEstimatedMinutesValue,UP as toExtensionFlagDefinitions,kf as toImportBoolean,Df as toImportConfidence,Pf as toImportInteger,Uf as toImportLinkedDocs,Gf as toImportLinkedFiles,jf as toImportLinkedTests,Ff as toImportLogEntries,$f as toImportNormalizedEnum,Lf as toImportNumberMap,If as toImportPriority,Mf as toImportStatus,xf as toImportStringList,Nf as toImportStringMap,Rf as toImportTags,CS as toItemRecord,vf as toNonEmptyImportString,tT as toNonEmptyStringOrUndefined,VS as toReplayDocument,hd as tokenizeSimilarityText,SA as transferMutationStdinTokenPolicy,bT as translateHostEnvironmentFault,th as update,Rh as upgrade,H_ as validate,rI as validateAssertionDefinition,nI as validateAssuranceDocument,oI as validateGateDefinition,o0 as validateItemMutationRows,Dl as validateLinkedPaths,Vk as validateMcpAuthorizationResponseIssuer,qk as validateMcpAuthorizationServerMetadata,Hk as validateMcpClientMetadataDocument,Lk as validateMcpHttpRequestHeaders,Tk as validateMcpJsonSchema,tI as validateMeasurementDefinition,$A as validateMissingParentReference,nw as validateReadOutputOptions,UA as validateSprintOrReleaseValue,pT as validateTypeOptions,qE as validateWorkspaceTransactionIdentity,oM as verifyAttestation,MO as verifyCliFlagInvocationParity,ZE as verifyExplicitPositionalSlotCensus,WS as verifyHistoryChain,KS as verifyHistoryChainWithVersion,NE as verifyHistoryEntries,DS as verifyHistoryRecordHash,FS as verifyHistoryRewriteEvidence,rA as verifyPmCliGrammar,tA as verifyPmCommandPositionalContracts,cL as verifyPmFlagLexicon,xN as verifyPmRecoveryKindRuntimeCoverage,Jy as verifyPmRecoveryProducerRuntimeCoverage,kN as verifyPmRecoveryReferences,$N as verifyPmRefusalClosureIdentityRatchet,DN as verifyPmRefusalClosureRatchet,PN as verifyPmRefusalReachability,wd as verifyToolOptionCliParity,Qi as withFlagAliasMetadata,TT as withHostEnvironmentBoundary,bk as withMcpCachePolicy,FC as workflowApprovalFingerprint,GC as workflowPolicyApplies,$C as workflowPolicyFingerprint,Tl as workspaceGraphCache,il as wrapOwnershipConflict,Qw as wrapThrownErrorForSentry,Ai as writeAuthorEnvironment,De as writeFileAtomic,aA as writeMutationCheckpoint,dE as writeSettings,Uw as writeStderr,Gw as writeStdout,hv as writeVectorizationStatusLedger,rE as writeWorkspaceJsonWithHistory};
|
|
32
32
|
//# sourceMappingURL=sdk.js.map
|