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