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