@sreetej510/pi-shipd-checks 0.1.6 → 0.1.8
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/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var Ed=Object.defineProperty;var xt=(e,t)=>{for(var n in t)Ed(e,n,{get:t[n],enum
|
|
|
7
7
|
`,e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>[]))),([t,n])=>[t,n]),_p=(e,t=[])=>o(o(qa(e),([n,r])=>o(vy(r),([a,s])=>[[n,a],s])),([n,r])=>_p(r,[...t,n]),()=>[t,e]),ky=e=>o(o(_p(e),([t,n])=>o(o(o(qa(n),([r,a])=>[[r],a]),([r,a])=>[r,a],()=>o([[],n],([r,a])=>[r,a],()=>[])),([r,a])=>[[t,r],a])),([t,n])=>[zm(t),n]),qa=e=>o(o(Ty(e),([t,n])=>o(o(hy(n),([r,a])=>[r,a],()=>o(Iy(n),([r,a])=>[r,a],()=>o(by(n),([r,a])=>[r,a],()=>o($y(n),([r,a])=>[r,a],()=>[])))),([r,a])=>o(xp(a),([s,m])=>[[t,r,s],m]))),([t,n])=>[Bm(t),n]),Ey=e=>o(o(qa(e),([t,n])=>o(ky(n),([r,a])=>[[t,r],a])),([t,n])=>[Wm(t),n]),zp=e=>o(o(Ey(e),([t,n])=>[t,n],()=>o(Rx(e),([t,n])=>[t,n],()=>o(w(e),([t,n])=>[t,n],()=>[]))),([t,n])=>[t,n]);function Bp(e){let t=Sa(`\`${e}\``);return i.IsEqual(t.length,2)?t[0]:V()}function Ry(e){return e.join("|")}function Oy(e){return e.slice(1,e.length-1)}function Py(e,t,n){return dt(t,`${n}${e}`)}function Sy(e,t){return dt(e,`${t}${mi}`)}function My(e,t){return dt(e,`${t}${mr}`)}function Cy(e,t){return dt(e,`${t}${ur}`)}function Ay(e,t){return Mn(k([O("false"),O("true")]),e,t)}function qy(e,t){return dt(e,`${t}${cr}`)}function Ly(e,t,n){return dt(t,`${n}${Oy(e)}`)}function jy(e,t,n){let r=Cn(e,{});return Mn(r,t,n)}function Fy(e,t,n){let r=ke(e);return Mn(r,t,n)}function Wp(e,t,n,r=[]){return i.ShiftLeft(e,(a,s)=>Wp(s,t,n,[...r,Mn(a,[],"")]),()=>dt(t,`${n}(${Ry(r)})`))}function Mn(e,t,n){return de(e)?Fy(e.enum,t,n):fe(e)?My(t,n):C(e)?Py(e.const,t,n):_e(e)?Sy(t,n):Re(e)?Ay(t,n):J(e)?Cy(t,n):ge(e)?qy(t,n):Z(e)?Ly(e.pattern,t,n):Hp(e)?jy(e.parameters[0],t,n):y(e)?Wp(e.anyOf,t,n):_o}function dt(e,t){return i.ShiftLeft(e,(n,r)=>Mn(n,r,t),()=>t)}function Dy(e){return`^${dt(e,"")}$`}function Vp(e){let t=Dy(e);return dr(t)}function Cn(e,t){return v(e)?p.Update(Vp(e),{},t):Tr(e,t)}function Yp(e,t,n,r){let a=Ee(e,t,n);return Cn(a,r)}function Tr(e,t={}){return h("TemplateLiteral",[e],t)}function Hp(e){return Q(e)&&i.HasPropertyKey(e,"action")&&i.IsEqual(e.action,"TemplateLiteral")}function Jp(e){return Cn(e,{})}function Ny(e){let t=Bp(e);return Jp(t)}function Zp(e,t={}){let n=i.IsString(e)?Ny(e):Jp(e);return p.Update(n,{},t)}function Z(e){return x(e,"TemplateLiteral")}var b={};xt(b,{ExtendsFalse:()=>T,ExtendsTrue:()=>g,ExtendsUnion:()=>La,IsExtendsFalse:()=>Ky,IsExtendsTrue:()=>Qp,IsExtendsTrueLike:()=>Wt,IsExtendsUnion:()=>Xp,Match:()=>K});function La(e){return p.Create({"~kind":"ExtendsUnion"},{inferred:e})}function Xp(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"inferred")&&i.IsEqual(e["~kind"],"ExtendsUnion")&&i.IsObject(e.inferred)}function g(e){return p.Create({"~kind":"ExtendsTrue"},{inferred:e})}function Qp(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"inferred")&&i.IsEqual(e["~kind"],"ExtendsTrue")&&i.IsObject(e.inferred)}function T(){return p.Create({"~kind":"ExtendsFalse"},{})}function Ky(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.IsEqual(e["~kind"],"ExtendsFalse")}function Wt(e){return Xp(e)||Qp(e)}function K(e,t,n){return Wt(e)?t(e.inferred):n()}function Uy(e,t,n,r){return K(P(e,n,r),a=>g(p.Assign(p.Assign(e,a),{[t]:n})),()=>T())}function Gy(e,t){return g(e)}function _y(e,t,n,r,a){return K(P(e,t,n),s=>K(P(s,t,r),m=>g(m),()=>T()),()=>K(P(e,t,a),s=>g(s),()=>T()))}function zy(e,t,n){let r=ke(n);return P(e,t,r)}function eu(e,t,n){return i.ShiftLeft(n,(r,a)=>K(P(e,t,r),s=>eu(s,t,a),()=>T()),()=>g(e))}function By(e,t,n){let r=he(n);return P(e,t,r)}function tu(e,t,n){return i.ShiftLeft(n,(r,a)=>K(P(e,t,r),s=>g(s),()=>tu(e,t,a)),()=>T())}function A(e,t,n){return Y(n)?Gy(e,t):z(n)?_y(e,t,n.if,n.then,n.else):de(n)?zy(e,t,n.enum):W(n)?Uy(e,n.name,t,n.extends):R(n)?eu(e,t,n.allOf):Z(n)?By(e,t,n.pattern):y(n)?tu(e,t,n.anyOf):ee(n)?g(e):T()}function nu(e,t,n){return W(n)?A(e,t,n):Y(n)?g(e):ee(n)?g(e):La(e)}function Wy(e,t){let n=Tt(e),r=Tt(t);return n&&r||!n&&r?!0:!(n&&!r)}function ru(e,t,n,r){return U(r)?Wy(t,r)?P(e,n,r.items):T():A(e,t,r)}function au(e,t,n){return _e(n)?g(e):A(e,t,n)}function ou(e,t,n){return Re(n)?g(e):A(e,t,n)}function Vy(e,t,n,r,a){let s=W(r)?t:r,m=W(r)?r:t,c=ue(t),l=ue(r);return!c&&l?T():K(P(e,s,m),I=>An(I,n,a),()=>T())}function Hy(e,t,n,r){return i.ShiftLeft(r,(a,s)=>Vy(e,t,n,a,s),()=>ue(t)?g(e):T())}function Yy(e,t,n){return i.ShiftLeft(t,(r,a)=>Hy(e,r,a,n),()=>g(e))}function An(e,t,n){return Yy(e,t,n)}function Yr(e,t,n){return ze(n)?g(e):P(e,t,n)}function iu(e,t,n,r){return Y(r)?g(e):ee(r)?g(e):te(r)?K(An(e,t,r.parameters),a=>Yr(a,n,r.instanceType),()=>T()):T()}function su(e,t,n,r,a){return K(P(e,t,a),()=>P(e,n,a),()=>P(e,r,a))}function mu(e,t,n){let r=ke(t);return P(e,r,n)}function pu(e,t,n,r){return Y(r)?g(e):ee(r)?g(e):ne(r)?K(An(e,t,r.parameters),a=>Yr(a,n,r.returnType),()=>T()):T()}function uu(e,t,n){return fe(n)?g(e):J(n)?g(e):A(e,t,n)}function cu(e,t,n){let r=G(t);return P(e,r,n)}function Jr(e,t,n){return t===n?g(e):T()}function Jy(e,t,n){return C(n)?Jr(e,t,n.const):_e(n)?g(e):A(e,O(t),n)}function Zy(e,t,n){return C(n)?Jr(e,t,n.const):Re(n)?g(e):A(e,O(t),n)}function Xy(e,t,n){return C(n)?Jr(e,t,n.const):J(n)?g(e):A(e,O(t),n)}function Qy(e,t,n){return C(n)?Jr(e,t,n.const):ge(n)?g(e):A(e,O(t),n)}function lu(e,t,n){return i.IsBigInt(t.const)?Jy(e,t.const,n):i.IsBoolean(t.const)?Zy(e,t.const,n):i.IsNumber(t.const)?Xy(e,t.const,n):i.IsString(t.const)?Qy(e,t.const,n):V()}function du(e,t,n){return W(n)?A(e,t,n):g(e)}function fu(e,t,n){return jt(n)?g(e):A(e,t,n)}function gu(e,t,n){return J(n)?g(e):A(e,t,n)}function eh(e,t,n){return ue(t)?ue(n)?g(e):T():g(e)}function th(e,t,n){return W(n)&&it(n.extends)?T():K(P(e,t,n),r=>eh(r,t,n),()=>T())}function nh(e,t){return e.reduce((n,r)=>r in t?Wt(t[r])?{...n,...t[r].inferred}:V():V(),{})}function rh(e,t,n){let r={};for(let m of i.Keys(n))r[m]=m in t?th({},t[m],n[m]):ue(n[m])?W(n[m])?g(p.Assign(e,{[n[m].name]:n[m].extends})):g(e):T();let a=i.Values(r).every(m=>Wt(m)),s=a?nh(i.Keys(r),r):{};return a?g(s):T()}function ah(e,t,n){let r=rh(e,t,n);return Wt(r)?g(p.Assign(e,r.inferred)):T()}function oh(e,t,n){return ah(e,t,n)}function ih(e,t){return i.Keys(t).reduce((n,r)=>({...n,[r]:i.HasPropertyKey(e,r)?y(n[r])?k([...n[r].anyOf,t[r]]):k([e[r],t[r]]):t[r]}),e)}function xu(e,t,n,r){return i.ShiftLeft(t,(a,s)=>K(P({},e[a],n),m=>xu(e,s,n,ih(r,m)),()=>T()),()=>g(r))}function sh(e,t,n,r){let a=i.Keys(t);return xu(t,a,r,e)}function yu(e,t,n){return pe(n)?sh(e,t,Se(n),xe(n)):M(n)?oh(e,t,n.properties):A(e,$(t),n)}function mh(e,t){return i.IsEqual(i.Keys(t).length,0)?g(e):T()}function ph(e,t,n,r,a){return P(e,n,a)}function hu(e,t,n,r){return pe(r)?ph(e,hr(t),n,hr(Se(r)),xe(r)):M(r)?mh(e,r.properties):Y(r)?g(e):ee(r)?g(e):T()}function Iu(e,t,n){return ge(n)?g(e):A(e,t,n)}function bu(e,t,n){return st(n)?g(e):A(e,t,n)}function $u(e,t,n){let r=he(t);return P(e,r,n)}function ja(e,t){return p.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function qn(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"name")&&i.HasPropertyKey(e,"type")&&i.IsEqual(e["~kind"],"Inferrable")&&i.IsString(e.name)&&i.IsObject(e.type)}function Fa(e){return ut(e)?W(e.items)?U(e.items.extends)?ja(e.items.name,e.items.extends.items):ee(e.items.extends)?ja(e.items.name,e.items.extends):void 0:V():void 0}function Zr(e){return W(e)?ja(e.name,e.extends):void 0}function Da(e,t,n=[]){return i.ShiftLeft(e,(r,a)=>K(P({},r,t),()=>Da(a,t,[...n,r]),()=>{}),()=>n)}function Tu(e,t,n,r){let a=Da(n,r);return i.IsArray(a)?g(p.Assign(e,{[t]:X(a)})):T()}function Xr(e,t,n,r){let a=Da(n,r);return i.IsArray(a)?g(p.Assign(e,{[t]:k(a)})):T()}function uh(e){return[...e].reverse()}function Na(e,t){return t?uh(e):e}function ch(e){let t=e.length>0?e[0]:void 0,n=Q(t)?Fa(t):void 0;return Q(n)}function lh(e,t,n,r,a,s){return K(P(e,n,a),m=>vu(m,t,r,s),()=>T())}function dh(e,t,n,r,a){let s=Fa(r);return qn(s)?Tu(e,s.name,Na(n,t),s.type):i.ShiftLeft(n,(m,c)=>lh(e,t,m,c,r,a),()=>T())}function fh(e,t,n,r){return i.ShiftLeft(r,(a,s)=>dh(e,t,n,a,s),()=>i.IsEqual(n.length,0)?g(e):T())}function vu(e,t,n,r){return fh(e,t,n,r)}function gh(e,t,n){let r=ft(e,N([],[]),n),a=ch(r);return vu(e,a,Na(t,a),Na(r,a))}function ku(e,t,n){let r=Zr(n);return qn(r)?Xr(e,r.name,t,r.type):i.ShiftLeft(t,(a,s)=>K(P(e,a,n),m=>ku(m,s,n),()=>T()),()=>g(e))}function Eu(e,t,n){let r=ft(e,N([],[]),t);return F(n)?gh(e,r,n.items):U(n)?ku(e,r,n.items):A(e,X(r),n)}function wu(e,t,n){return ze(n)?g(e):Gt(n)?g(e):A(e,t,n)}function Ru(e,t,n){return i.ShiftLeft(n,(r,a)=>K(P(e,t,r),s=>g(s),()=>Ru(e,t,a)),()=>T())}function Ka(e,t,n){return i.ShiftLeft(t,(r,a)=>K(Ru(e,r,n),s=>Ka(s,a,n),()=>T()),()=>g(e))}function Ou(e,t,n){let r=Zr(n);return qn(r)?Xr(e,r.name,t,r.type):y(n)?Ka(e,t,n.anyOf):Ka(e,t,[n])}function Pu(e,t,n){return W(n)?A(e,t,n):Y(n)?g(e):ee(n)?g(e):T()}function Su(e,t,n){return ze(n)?g(e):A(e,t,n)}function P(e,t,n){return Y(t)?nu(e,t,n):U(t)?ru(e,t,t.items,n):_e(t)?au(e,t,n):Re(t)?ou(e,t,n):te(t)?iu(e,t.parameters,t.instanceType,n):z(t)?su(e,t.if,t.then,t.else,n):de(t)?mu(e,t.enum,n):ne(t)?pu(e,t.parameters,t.returnType,n):fe(t)?uu(e,t,n):R(t)?cu(e,t.allOf,n):C(t)?lu(e,t,n):it(t)?du(e,t,n):jt(t)?fu(e,t,n):J(t)?gu(e,t,n):M(t)?yu(e,t.properties,n):pe(t)?hu(e,Se(t),xe(t),n):ge(t)?Iu(e,t,n):st(t)?bu(e,t,n):Z(t)?$u(e,t.pattern,n):F(t)?Eu(e,t.items,n):Gt(t)?wu(e,t,n):y(t)?Ou(e,t.anyOf,n):ee(t)?Pu(e,t,n):ze(t)?Su(e,t,n):T()}function xh(e,t){return G([...e,$(t)])}function Ua(e,t,n){return v(e)?p.Update(xh(e,t),{},n):wn(e,t,n)}function Mu(e,t,n,r,a){let s=Ee(e,t,n),m=Ln(e,t,r);return Ua(s,m,a)}function wn(e,t,n={}){return h("Interface",[e,t],n)}function Vt(e){return Q(e)&&i.HasPropertyKey(e,"action")&&i.IsEqual(e.action,"Interface")}function Cu(e,t,n={}){return Ua(e,t,n)}function yh(e,t,n){return e.includes(n)?!0:jn([...e,n],t,t[n])}function Au(e,t,n){let r=rr(n);return Pt(e,t,r)}function Pt(e,t,n){return i.ShiftLeft(n,(r,a)=>jn(e,t,r)?!0:Pt(e,t,a),()=>!1)}function jn(e,t,n){return re(n)?yh(e,t,n.$ref):U(n)?jn(e,t,n.items):te(n)?Pt(e,t,[...n.parameters,n.instanceType]):ne(n)?Pt(e,t,[...n.parameters,n.returnType]):Vt(n)?Au(e,t,n.parameters[1]):R(n)?Pt(e,t,n.allOf):M(n)?Au(e,t,n.properties):y(n)?Pt(e,t,n.anyOf):F(n)?Pt(e,t,n.items):pe(n)?jn(e,t,xe(n)):!1}function qu(e,t,n){return jn(e,t,n)}function hh(e,t){return t.reduce((n,r)=>qu([r],e,e[r])?[...n,r]:n,[])}function Lu(e){let t=nr(e);return hh(e,t)}function Ih(e,t,n){return n.includes(t)?n:t in e?Fn(e,e[t],[...n,t]):V()}function ju(e,t,n){let r=rr(t);return Ht(e,r,n)}function Ht(e,t,n){return t.reduce((r,a)=>Fn(e,a,r),n)}function Fn(e,t,n){return re(t)?Ih(e,t.$ref,n):U(t)?Fn(e,t.items,n):te(t)?Ht(e,[...t.parameters,t.instanceType],n):ne(t)?Ht(e,[...t.parameters,t.returnType],n):Vt(t)?ju(e,t.parameters[1],n):R(t)?Ht(e,t.allOf,n):M(t)?ju(e,t.properties,n):y(t)?Ht(e,t.anyOf,n):F(t)?Ht(e,t.items,n):pe(t)?Fn(e,xe(t),n):n}function Fu(e,t,n){return Fn(e,n,[t])}function bh(e){return At()}function $h(e){return i.Keys(e).reduce((t,n)=>({...t,[n]:St(e[n])}),{})}function Dn(e){return e.reduce((t,n)=>[...t,St(n)],[])}function St(e){return re(e)?bh(e.$ref):U(e)?ve(St(e.items),tr(e)):te(e)?Fe(Dn(e.parameters),St(e.instanceType)):ne(e)?De(Dn(e.parameters),St(e.returnType)):R(e)?ce(Dn(e.allOf)):M(e)?$($h(e.properties)):pe(e)?yr(Kt(e),St(xe(e))):y(e)?k(Dn(e.anyOf)):F(e)?X(Dn(e.items)):e}function Th(e,t){return t in e?St(e[t]):ae()}function Du(e){return Th(e.$defs,e.$ref)}function vh(e,t,n){let r=Ee(e,N([],[]),t),a=Ln({},N([],[]),n);return G([...r,$(a)])}function kh(e,t){return i.Keys(e).filter(r=>t.includes(r)).reduce((r,a)=>{let s=e[a],m=Vt(s)?vh(e,s.parameters[0],s.parameters[1]):s;return{...r,[a]:m}},{})}function Nu(e,t,n){let r=Fu(e,t,n),a=kh(e,r);return Ke(a,t)}function Ku(e,t){return t in e?re(e[t])?Ku(e,e[t].$ref):e[t]:L()}function Be(e,t){return Ku(e,t)}function Uu(e){return se(e)?Du(e):ar(e)?ae():e}function me(e,t,n){let r=Uu(t),a=Uu(n);return P(e,r,a)}var bn="equal",Eh="disjoint",$n="left-inside",Tn="right-inside";function Dt(e,t){let n=[ee(e)?b.ExtendsFalse():me({},e,t),ee(e)?b.ExtendsTrue({}):me({},t,e)];return b.IsExtendsTrueLike(n[0])&&b.IsExtendsTrueLike(n[1])?bn:b.IsExtendsTrueLike(n[0])&&b.IsExtendsFalse(n[1])?$n:b.IsExtendsFalse(n[0])&&b.IsExtendsTrueLike(n[1])?Tn:Eh}function wh(e,t){return t.filter(n=>Dt(e,n)!==Tn)}function Rh(e,t){let n=t.some(r=>{let a=Dt(e,r);return i.IsEqual(a,$n)||i.IsEqual(a,bn)});return i.IsEqual(n,!1)}function Oh(e,t){let n=Pe(e);return Y(n)?[n]:Rh(n,t)?[...wh(n,t),n]:t}function Ph(e){return e.reduce((t,n)=>M(n)?[...t,n]:it(n)?t:Oh(n,t),[])}function Ia(e){let t=Ph(e);return kn(t)}function Ga(e,t){return p.Update(Pe(e),{},t)}function Gu(e,t,n,r){let a=d(e,t,n);return Ga(a,r)}function Nn(e,t=[]){return at(e)&&i.IsEqual(e.action,"Conditional")?re(e.parameters[0])?Nn(e.parameters[2],Nn(e.parameters[3],[...t,e.parameters[0].$ref])):Nn(e.parameters[2],Nn(e.parameters[3],t)):at(e)&&i.IsEqual(e.action,"Mapped")&&at(e.parameters[1])&&i.IsEqual(e.parameters[1].action,"KeyOf")&&re(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function Sh(e,t){return e.reduce((n,r)=>[...n,t.includes(r.name)],[])}function Bu(e,t,n=[]){return i.ShiftLeft(e,(r,a)=>i.ShiftLeft(t,(s,m)=>Bu(a,m,[...n,[s,r]]),()=>n),()=>n)}function Mh(e){return y(e)?[...e.anyOf]:[e]}function Ch(e,t){return e.reduce((n,r)=>[...n,[...r,t]],[])}function _u(e,t){return t.reduce((n,r)=>[...n,...Ch(e,r)],[])}function zu(e){return e.reduce((t,n)=>i.IsEqual(n[0],!0)?_u(t,Mh(n[1])):_u(t,[n[1]]),[[]])}function Wu(e,t,n){let r=Nn(n),a=Sh(e,r),s=Bu(t,a);return at(n)&&i.IsEqual(n.action,"Conditional")||at(n)&&i.IsEqual(n.action,"Mapped")?zu(s):[t]}function Ah(){return["(not-resolvable)",L()]}function qh(){return["(not-generic)",L()]}function Lh(e,t,n){return[e,ot(t,n)]}function jh(e,t,n){return t in e?Vu(e,t,e[t],n):Ah()}function Vu(e,t,n,r){return Ct(n)?Lh(t,n.parameters,n.expression):re(n)?jh(e,n.$ref,r):qh()}function Hu(e,t,n){return Vu(e,"(anonymous)",t,n)}function Fh(e,t,n){if(W(t)||Yt(t)||b.IsExtendsTrueLike(me({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw new Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function Yu(e,t,n,r,a){let s=d(e,t,a);return Fh(n,s,r),p.Assign(e,{[n]:s})}function Dh(e,t,n,r,a){let s=d(e,t,n.extends),m=d(e,t,n.equals);return i.ShiftLeft(a,(c,l)=>_a(Yu(e,t,n.name,s,c),t,r,l),()=>_a(Yu(e,t,n.name,s,m),t,r,[]))}function _a(e,t,n,r){return i.ShiftLeft(n,(a,s)=>Dh(e,t,a,s,r),()=>e)}function Ju(e,t,n,r){return _a(e,t,n,r)}function Nh(e){return i.IsGreaterThan(e.callstack.length,0)?e.callstack[e.callstack.length-1]:""}function Kh(e,t){return i.IsEqual(Nh(e),t)}function Uh(e,t,n,r,a,s){let m=Ju(e,t,r,s),c=d(m,N([...t.callstack,n.$ref],t.visited),a);return d(m,N([],[]),c)}function Gh(e,t,n,r,a,s){return s.reduce((m,c)=>[...m,Uh(e,t,n,r,a,c)],[])}function _h(e,t,n,r,a,s){let m=Wu(r,s,a),c=Gh(e,t,n,r,a,m);return i.IsEqual(c.length,1)?c[0]:be(c)}function Qr(e,t,n,r){let a=Ee(e,t,r),s=Hu(e,n,r),m=s[0],c=s[1];return Ct(c)?Kh(t,m)?Rn(Je(m),a):_h(e,t,Je(m),c.parameters,c.expression,a):Rn(n,a)}function Rn(e,t){return p.Create({"~kind":"Call"},{type:"call",target:e,arguments:t},{})}function Zu(e,t){return Qr({},N([],[]),e,t)}function Yt(e){return x(e,"Call")}function zh(e){return p.Discard(e,["~immutable"])}function Xu(e,t){return p.Update(zh(e),{},t)}function Qu(e,t,n,r){let a=d(e,t,n);return Xu(a,r)}function ec(e,t){return e(t)}function tc(e,t){return i.IsString(t)?O(ec(e,t)):O(t)}function nc(e,t){let n=he(t);return Qe(e,n)}function rc(e,t){let n=t.map(r=>Qe(e,r));return k(n)}function Qe(e,t){return C(t)?tc(e,t.const):Z(t)?nc(e,t.pattern):y(t)?rc(e,t.anyOf):t}function vr(e,t={}){return h("Capitalize",[e],t)}function ac(e,t={}){return za(e,t)}function kr(e,t={}){return h("Lowercase",[e],t)}function oc(e,t={}){return Ba(e,t)}function Er(e,t={}){return h("Uncapitalize",[e],t)}function ic(e,t={}){return Wa(e,t)}function wr(e,t={}){return h("Uppercase",[e],t)}function sc(e,t={}){return Va(e,t)}var Bh=e=>e[0].toUpperCase()+e.slice(1),Wh=e=>e.toLowerCase(),Vh=e=>e[0].toLowerCase()+e.slice(1),Hh=e=>e.toUpperCase();function za(e,t){return v([e])?p.Update(Qe(Bh,e),{},t):vr(e,t)}function Ba(e,t){return v([e])?p.Update(Qe(Wh,e),{},t):kr(e,t)}function Wa(e,t){return v([e])?p.Update(Qe(Vh,e),{},t):Er(e,t)}function Va(e,t){return v([e])?p.Update(Qe(Hh,e),{},t):wr(e,t)}function mc(e,t,n,r){let a=d(e,t,n);return za(a,r)}function pc(e,t,n,r){let a=d(e,t,n);return Ba(a,r)}function uc(e,t,n,r){let a=d(e,t,n);return Wa(a,r)}function cc(e,t,n,r){let a=d(e,t,n);return Va(a,r)}function Rr(e,t,n,r,a={}){return h("Conditional",[e,t,n,r],a)}function lc(e,t,n,r,a={}){return Ha({},N([],[]),e,t,n,r,a)}function Yh(e,t,n,r,a,s){let m=me(e,n,r);return b.IsExtendsUnion(m)?k([d(m.inferred,t,a),d(e,t,s)]):b.IsExtendsTrue(m)?d(m.inferred,t,a):d(e,t,s)}function Ha(e,t,n,r,a,s,m){return v([n,r])?p.Update(Yh(e,t,n,r,a,s),{},m):Rr(n,r,a,s,m)}function dc(e,t,n,r,a,s,m){let c=d(e,t,n),l=d(e,t,r);return Ha(e,t,c,l,a,s,m)}function Or(e,t={}){return h("ConstructorParameters",[e],t)}function fc(e,t={}){return Ya(e,t)}function Jh(e){let t=te(e)?e.parameters:[],n=ft({},N([],[]),t);return X(n)}function Ya(e,t){return v([e])?p.Update(Jh(e),{},t):Or(e,t)}function gc(e,t,n,r){let a=d(e,t,n);return Ya(a,r)}function Pr(e,t,n={}){return h("Exclude",[e,t],n)}function xc(e,t,n={}){return Kn(e,t,n)}function Kn(e,t,n){return v([e,t])?p.Update(gr(e,t),{},n):Pr(e,t,n)}function yc(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return Kn(s,m,a)}function Sr(e,t,n={}){return h("Extract",[e,t],n)}function hc(e,t,n={}){return Ja(e,t,n)}function Zh(e,t){let n=me({},e,t);return b.IsExtendsTrueLike(n)?[e]:[]}function Xh(e,t){return e.reduce((n,r)=>[...n,...Zh(r,t)],[])}function Ic(e,t){let n=Pe(e),r=y(n)?n.anyOf:[n],a=Xh(r,t);return be(a)}function Ja(e,t,n){return v([e,t])?p.Update(Ic(e,t),{},n):Sr(e,t,n)}function bc(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return Ja(s,m,a)}function Qh(e){return e.reduce((t,n)=>pr(n)?[...t,O(n)]:t,[])}function Jt(e){let t=Qh(e);return k(t)}function On(e,t,n={}){return h("Index",[e,t],n)}function $c(e,t,n={}){let r=i.IsArray(t)?Jt(t):t;return Za(e,r,n)}function Tc(e,t){let n=Be(e,t);return we(n)}function vc(e,t,n){let r=je(e,t,n);return we(r)}function eI(e,t){let n=i.Keys(e).filter(f=>!i.HasPropertyKey(t,f)),r=i.Keys(t).filter(f=>!i.HasPropertyKey(e,f)),a=i.Keys(e).filter(f=>i.HasPropertyKey(t,f)),s=n.reduce((f,q)=>({...f,[q]:e[q]}),{}),m=r.reduce((f,q)=>({...f,[q]:t[q]}),{}),c=a.reduce((f,q)=>({...f,[q]:G([e[q],t[q]])}),{}),l=p.Assign(s,m);return p.Assign(l,c)}function kc(e){return e.reduce((t,n)=>eI(t,we(n)),{})}function Ec(e){let t=Si(X(e));return we(t)}function tI(e,t){return i.Keys(e).filter(a=>a in t).reduce((a,s)=>({...a,[s]:be([e[s],t[s]])}),{})}function wc(e,t){return i.ShiftLeft(e,(n,r)=>wc(r,tI(t,we(n))),()=>t)}function Rc(e){return i.ShiftLeft(e,(t,n)=>wc(n,we(t)),()=>V())}function we(e){return se(e)?Tc(e.$defs,e.$ref):z(e)?vc(e.if,e.then,e.else):R(e)?kc(e.allOf):y(e)?Rc(e.anyOf):F(e)?Ec(e.items):M(e)?e.properties:{}}function Zt(e){let t=we(e);return $(t)}var nI=new RegExp("^(?:0|[1-9][0-9]*)$");function Xt(e){let t=`${e}`;return nI.test(t)?parseInt(t):e}function rI(e){return O(Xt(e))}function Oc(e){return e.map(t=>Pc(t))}function Pc(e){return R(e)?ce(Oc(e.allOf)):y(e)?k(Oc(e.anyOf)):C(e)?rI(e.const):e}function Sc(e,t){let n=Pc(t),r=me({},n,Ie());return b.IsExtendsTrueLike(r)?e:C(t)&&i.IsEqual(t.const,"length")?Ie():L()}function Mc(e,t){let n=Be(e,t);return $e(n)}function Cc(e,t,n){let r=je(e,t,n);return $e(r)}function Ac(e){let t=ke(e);return $e(t)}function qc(e){let t=G(e);return $e(t)}function Lc(e){return[`${e}`]}function jc(e){let t=he(e);return $e(t)}function Fc(e){return e.reduce((t,n)=>[...t,...$e(n)],[])}function $e(e){return se(e)?Mc(e.$defs,e.$ref):z(e)?Cc(e.if,e.then,e.else):de(e)?Ac(e.enum):R(e)?qc(e.allOf):C(e)?Lc(e.const):Z(e)?jc(e.pattern):y(e)?Fc(e.anyOf):[]}function Qt(e){return $e(e)}function Un(e,t){return t.map(n=>Gn(e,n))}function Gn(e,t){return U(t)?ve(Gn(e,t.items)):te(t)?Fe(Un(e,t.parameters),Gn(e,t.instanceType)):ne(t)?De(Un(e,t.parameters),Gn(e,t.returnType)):F(t)?X(Un(e,t.items)):y(t)?k(Un(e,t.anyOf)):R(t)?ce(Un(e,t.allOf)):br(t)?$(e):t}function Dc(e,t){return Gn(e,t)}function aI(e,t){let n=t in e?e[t]:L();return Dc(e,n)}function Nc(e,t){return t.reduce((n,r)=>[...n,aI(e,r)],[])}function oI(e,t){let n=Qt(t),r=Nc(e,n);return be(r)}var iI=new RegExp(pt);function sI(e){return e.filter(n=>iI.test(n))}function mI(e){let t=nr(e),n=sI(t),r=Nc(e,n);return be(r)}function Kc(e,t){return J(t)?mI(e):oI(e,t)}function pI(e){return O(Xt(e))}function Uc(e){return e.map(t=>Xa(t))}function Xa(e){return R(e)?ce(Uc(e.allOf)):y(e)?k(Uc(e.anyOf)):C(e)?pI(e.const):e}function uI(e,t){return e.reduceRight((n,r,a)=>{let s=me({},O(a),t);return b.IsExtendsTrueLike(s)?[r,...n]:n},[])}function cI(e,t){let n=Xa(t),r=uI(e,n);return Ze(r)}function lI(e){return Ze(e)}function Gc(e,t){return C(t)&&i.IsEqual(t.const,"length")?O(e.length):J(t)||fe(t)?lI(e):cI(e,t)}function _c(e,t){return U(e)?Sc(e.items,t):M(e)?Kc(e.properties,t):F(e)?Gc(e.items,t):L()}function dI(e){return se(e)||z(e)||R(e)||y(e)?Zt(e):e}function Za(e,t,n){return v([e,t])?p.Update(_c(dI(e),t),{},n):On(e,t,n)}function zc(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return Za(s,m,a)}function Mr(e,t={}){return h("InstanceType",[e],t)}function Bc(e,t={}){return Qa(e,t)}function fI(e){return te(e)?e.instanceType:L()}function Qa(e,t){return v([e])?p.Update(fI(e),{},t):Mr(e,t)}function Wc(e,t,n,r={}){let a=d(e,t,n);return Qa(a,r)}function Pn(e,t={}){return h("KeyOf",[e],t)}function Vc(e,t={}){return eo(e,t)}function Hc(){return k([Ie(),Oe(),Ft()])}function Yc(e){return Ie()}function gI(e){return e.reduce((n,r)=>pr(r)?[...n,O(Xt(r))]:V(),[])}function Jc(e){let t=i.Keys(e),n=gI(t);return Ze(n)}function Zc(e){return Kt(e)}function Xc(e){let t=e.map((n,r)=>O(r));return Ze(t)}function Qc(e){return Y(e)?Hc():U(e)?Yc(e.items):M(e)?Jc(e.properties):pe(e)?Zc(e):F(e)?Xc(e.items):L()}function xI(e){return se(e)||z(e)||R(e)||y(e)?Zt(e):e}function eo(e,t){return v([e])?p.Update(Qc(xI(e)),{},t):Pn(e,t)}function el(e,t,n,r){let a=d(e,t,n);return eo(a,r)}function En(e,t,n,r,a={}){return h("Mapped",[e,t,n,r],a)}function tl(e,t,n,r,a={}){return to({},N([],[]),e,t,n,r,a)}function yI(e){let t=he(e);return ea(t)}function hI(e){return e.reduce((t,n)=>[...t,...ea(n)],[])}function II(e){let t=ke(e);return ea(t)}function bI(e){return i.IsNumber(e)?[O(`${e}`)]:[O(e)]}function ea(e){return de(e)?II(e.enum):C(e)?bI(e.const):Z(e)?yI(e.pattern):y(e)?hI(e.anyOf):[e]}function nl(e){return ea(e)}function $I(e){return Z(e)?he(e.pattern):e}function TI(e,t,n,r,a,s){let m=p.Assign(e,{[n.name]:r}),c=d(m,t,a),l=$I(c),I=d(m,t,s);return ui(l)||ci(l)?{[l.const]:I}:{}}function vI(e,t,n,r,a,s){return r.reduce((m,c)=>[...m,TI(e,t,n,c,a,s)],[])}function kI(e){return e.reduce((t,n)=>[...t,$(n)],[])}function rl(e,t,n,r,a,s){let m=nl(r),c=vI(e,t,n,m,a,s),l=kI(c);return G(l)}function to(e,t,n,r,a,s,m){return v([r])?p.Update(rl(e,t,n,r,a,s),{},m):En(n,r,a,s,m)}function al(e,t,n,r,a,s,m){let c=d(e,t,r);return to(e,t,n,c,a,s,m)}function EI(e,t,n){let r=p.Assign(e,t);return i.Keys(t).filter(s=>n.includes(s)).reduce((s,m)=>({...s,[m]:Nu(r,m,t[m])}),{})}function wI(e,t,n){let r=p.Assign(e,t);return i.Keys(t).filter(s=>!n.includes(s)).reduce((s,m)=>({...s,[m]:d(r,N([],[]),t[m])}),{})}function RI(e,t,n){let r=Lu(t),a=EI(e,t,r),s=wI(e,t,r),m={...a,...s};return p.Update(m,{},n)}function ta(e,t,n,r){return RI(e,n,r)}function Cr(e,t={}){return h("NonNullable",[e],t)}function ol(e,t={}){return no(e,t)}function OI(e){let t=k([Lt(),Ut()]);return Kn(e,t,{})}function no(e,t){return v([e])?p.Update(OI(e),{},t):Cr(e,t)}function il(e,t,n,r){let a=d(e,t,n);return no(a,r)}function Ar(e,t,n={}){return h("Omit",[e,t],n)}function sl(e,t,n={}){let r=i.IsArray(t)?Jt(t):t;return ro(e,r,n)}function na(e){let t=Zt(e);return M(t)?t.properties:V()}function PI(e,t){return i.Keys(e).reduce((r,a)=>t.includes(a)?r:{...r,[a]:e[a]},{})}function ml(e,t){let n=na(e),r=Qt(t),a=PI(n,r);return $(a)}function ro(e,t,n){return v([e,t])?p.Update(ml(e,t),{},n):Ar(e,t,n)}function pl(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return ro(s,m,a)}function qr(e,t={}){return h("Parameters",[e],t)}function ul(e,t={}){return ao(e,t)}function SI(e){let t=ne(e)?e.parameters:[],n=ft({},N([],[]),t);return X(n)}function ao(e,t){return v([e])?p.Update(SI(e),{},t):qr(e,t)}function cl(e,t,n,r){let a=d(e,t,n);return ao(a,r)}function Lr(e,t={}){return h("Partial",[e],t)}function ll(e,t={}){return oo(e,t)}function dl(e,t){let n=Be(e,t),r=We(n);return Ke(p.Assign(e,{[t]:r}),t)}function fl(e,t,n){let r=je(e,t,n);return We(r)}function gl(e){let t=G(e);return We(t)}function xl(e){let t=e.map(n=>We(n));return k(t)}function yl(e){let t=i.Keys(e).reduce((r,a)=>({...r,[a]:bt(e[a])}),{});return $(t)}function We(e){return se(e)?dl(e.$defs,e.$ref):z(e)?fl(e.if,e.then,e.else):R(e)?gl(e.allOf):y(e)?xl(e.anyOf):M(e)?yl(e.properties):$({})}function oo(e,t){return v([e])?p.Update(We(e),{},t):Lr(e,t)}function hl(e,t,n,r){let a=d(e,t,n);return oo(a,r)}function jr(e,t,n={}){return h("Pick",[e,t],n)}function Il(e,t,n={}){let r=i.IsArray(t)?Jt(t):t;return io(e,r,n)}function MI(e,t){return i.Keys(e).reduce((r,a)=>t.includes(a)?p.Assign(r,{[a]:e[a]}):r,{})}function bl(e,t){let n=na(e),r=Qt(t),a=MI(n,r);return $(a)}function io(e,t,n){return v([e,t])?p.Update(bl(e,t),{},n):jr(e,t,n)}function $l(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return io(s,m,a)}function Fr(e,t={}){return h("ReadonlyObject",[e],t)}function so(e,t={}){return mo(e,t)}var Tl=so;function vl(e){return qt(ve(e))}function kl(e,t){let n=Be(e,t),r=Ve(n);return Ke(p.Assign(e,{[t]:r}),t)}function El(e,t,n){let r=je(e,t,n);return Ve(r)}function wl(e){let t=G(e);return Ve(t)}function Rl(e){let t=i.Keys(e).reduce((r,a)=>({...r,[a]:vt(e[a])}),{});return $(t)}function Ol(e){return qt(X(e))}function Pl(e){let t=e.map(n=>Ve(n));return k(t)}function Ve(e){return U(e)?vl(e.items):se(e)?kl(e.$defs,e.$ref):z(e)?El(e.if,e.then,e.else):R(e)?wl(e.allOf):M(e)?Rl(e.properties):F(e)?Ol(e.items):y(e)?Pl(e.anyOf):e}function mo(e,t){return v([e])?p.Update(Ve(e),{},t):Fr(e)}function Sl(e,t,n,r){let a=d(e,t,n);return mo(a,r)}function Ml(e,t,n,r){return t.visited.includes(r)?n:r in e?d(e,N(t.callstack,[...t.visited,r]),e[r]):n}function Cl(e,t){let n=Be(e,t),r=He(n);return Ke(p.Assign(e,{[t]:r}),t)}function Al(e,t,n){let r=je(e,t,n);return He(r)}function ql(e){let t=G(e);return He(t)}function Ll(e){let t=e.map(n=>He(n));return k(t)}function jl(e){let t=i.Keys(e).reduce((r,a)=>({...r,[a]:fr(e[a])}),{});return $(t)}function He(e){return se(e)?Cl(e.$defs,e.$ref):z(e)?Al(e.if,e.then,e.else):R(e)?ql(e.allOf):y(e)?Ll(e.anyOf):M(e)?jl(e.properties):$({})}function Dr(e,t={}){return h("Required",[e],t)}function Fl(e,t={}){return po(e,t)}function po(e,t){return v([e])?p.Update(He(e),{},t):Dr(e,t)}function Dl(e,t,n,r){let a=d(e,t,n);return po(a,r)}function Nr(e,t={}){return h("ReturnType",[e],t)}function Nl(e,t={}){return uo(e,t)}function CI(e){return ne(e)?e.returnType:L()}function uo(e,t){return v([e])?p.Update(CI(e),{},t):Nr(e,t)}function Kl(e,t,n,r={}){let a=d(e,t,n);return uo(a,r)}function Kr(e,t){return h("With",[e,t],{})}function Ul(e,t){return co(e,t)}function co(e,t){return v([e])?p.Update(e,{},t):Kr(e,t)}function Gl(e,t,n,r){let a=d(e,t,n);return co(a,r)}function AI(e){return ut(e)?F(e.items)?lo(e.items.items):W(e.items)?[e]:re(e.items)?[e]:[L()]:[e]}function lo(e){return e.reduce((n,r)=>[...n,...AI(r)],[])}function N(e,t){return{callstack:e,visited:t}}function v(e){return i.ShiftLeft(e,(t,n)=>re(t)?!1:v(n),()=>!0)}function Ln(e,t,n){return i.Keys(n).reduce((r,a)=>({...r,[a]:d(e,t,n[a])}),{})}function ft(e,t,n){let r=Ee(e,t,n);return lo(r)}function Ee(e,t,n){return n.map(r=>d(e,t,r))}function qI(e,t){let n=ue(e)?dn(t,{}):t,r=kt(e)?ln(n,{}):n;return Tt(e)?_n(r,{}):r}function LI(e,t,n,r,a){return i.IsEqual(n,"AddImmutable")?_l(e,t,r[0],a):i.IsEqual(n,"RemoveImmutable")?Qu(e,t,r[0],a):i.IsEqual(n,"AddReadonly")?No(e,t,r[0],a):i.IsEqual(n,"RemoveReadonly")?Ei(e,t,r[0],a):i.IsEqual(n,"AddOptional")?Ko(e,t,r[0],a):i.IsEqual(n,"RemoveOptional")?Oi(e,t,r[0],a):i.IsEqual(n,"Capitalize")?mc(e,t,r[0],a):i.IsEqual(n,"Conditional")?dc(e,t,r[0],r[1],r[2],r[3],a):i.IsEqual(n,"ConstructorParameters")?gc(e,t,r[0],a):i.IsEqual(n,"Evaluate")?Gu(e,t,r[0],a):i.IsEqual(n,"Exclude")?yc(e,t,r[0],r[1],a):i.IsEqual(n,"Extract")?bc(e,t,r[0],r[1],a):i.IsEqual(n,"Index")?zc(e,t,r[0],r[1],a):i.IsEqual(n,"InstanceType")?Wc(e,t,r[0],a):i.IsEqual(n,"Interface")?Mu(e,t,r[0],r[1],a):i.IsEqual(n,"KeyOf")?el(e,t,r[0],a):i.IsEqual(n,"Lowercase")?pc(e,t,r[0],a):i.IsEqual(n,"Mapped")?al(e,t,r[0],r[1],r[2],r[3],a):i.IsEqual(n,"Module")?ta(e,t,r[0],a):i.IsEqual(n,"NonNullable")?il(e,t,r[0],a):i.IsEqual(n,"Pick")?$l(e,t,r[0],r[1],a):i.IsEqual(n,"Parameters")?cl(e,t,r[0],a):i.IsEqual(n,"Partial")?hl(e,t,r[0],a):i.IsEqual(n,"Omit")?pl(e,t,r[0],r[1],a):i.IsEqual(n,"ReadonlyObject")?Sl(e,t,r[0],a):i.IsEqual(n,"Record")?Bi(e,t,r[0],r[1],a):i.IsEqual(n,"Required")?Dl(e,t,r[0],a):i.IsEqual(n,"ReturnType")?Kl(e,t,r[0],a):i.IsEqual(n,"TemplateLiteral")?Yp(e,t,r[0],a):i.IsEqual(n,"Uncapitalize")?uc(e,t,r[0],a):i.IsEqual(n,"Uppercase")?cc(e,t,r[0],a):i.IsEqual(n,"With")?Gl(e,t,r[0],r[1]):h(n,r,a)}function jI(e,t,n){let r=re(n)?Ml(e,t,n,n.$ref):U(n)?ve(d(e,t,n.items),tr(n)):Yt(n)?Qr(e,t,n.target,n.arguments):te(n)?Fe(Ee(e,t,n.parameters),d(e,t,n.instanceType),Uo(n)):ne(n)?De(Ee(e,t,n.parameters),d(e,t,n.returnType),Go(n)):z(n)?$t(d(e,t,n.if),d(e,t,n.then),d(e,t,n.else),Ho(n)):R(n)?ce(Ee(e,t,n.allOf),Qo(n)):M(n)?$(Ln(e,t,n.properties),Wo(n)):pe(n)?Wi(Se(n),d(e,t,xe(n))):ut(n)?Rt(d(e,t,n.items)):F(n)?X(ft(e,t,n.items),ki(n)):y(n)?k(Ee(e,t,n.anyOf),di(n)):n;return qI(n,r)}function d(e,t,n){return at(n)?LI(e,t,n.action,n.parameters,n.options):jI(e,t,n)}function fo(e,t){return d(e,N([],[]),t)}function FI(e){return p.Update(e,{"~immutable":!0},{})}function _n(e,t){return p.Update(FI(e),{},t)}function _l(e,t,n,r){let a=d(e,t,n);return _n(a,r)}function Vm(e,t={}){return h("AddImmutable",[e],t)}function qt(e,t={}){return _n(e,t)}function Hm(e,t={}){return h("Evaluate",[e],t)}function zl(e,t={}){return Ga(e,t)}function Ym(e,t={}){return h("Module",[e],t)}function Bl(e,t={}){return ta({},N([],[]),e,t)}function Wl(...e){let[t,n,r]=Ue.Match(e,{2:(m,c)=>i.IsString(m)?[{},m,c]:[m,c,{}],3:(m,c,l)=>[m,c,l],1:m=>[{},m,{}]}),a=zp(n),s=i.IsArray(a)&&i.IsEqual(a.length,2)?d(t,N([],[]),a[0]):L();return p.Update(s,{},r)}var H={};xt(H,{Any:()=>At,Array:()=>ve,BigInt:()=>yn,Boolean:()=>sr,Call:()=>Zu,Capitalize:()=>ac,Codec:()=>ir,Conditional:()=>lc,Constructor:()=>Fe,ConstructorParameters:()=>fc,Cyclic:()=>Ke,Decode:()=>ri,DecodeBuilder:()=>xn,Dependent:()=>$t,Encode:()=>ai,EncodeBuilder:()=>gn,Enum:()=>Xo,Evaluate:()=>zl,Exclude:()=>xc,Extends:()=>me,ExtendsResult:()=>b,Extract:()=>hc,Function:()=>De,Generic:()=>ot,Identifier:()=>hn,Immutable:()=>oi,Index:()=>$c,Infer:()=>fn,InstanceType:()=>Bc,Instantiate:()=>fo,Integer:()=>Et,Interface:()=>Cu,Intersect:()=>ce,IsAny:()=>Y,IsArray:()=>U,IsBigInt:()=>_e,IsBoolean:()=>Re,IsCall:()=>Yt,IsCodec:()=>or,IsConstructor:()=>te,IsCyclic:()=>se,IsDependent:()=>z,IsEnum:()=>de,IsEnumValue:()=>Zo,IsFunction:()=>ne,IsGeneric:()=>Ct,IsIdentifier:()=>pi,IsImmutable:()=>Tt,IsInfer:()=>W,IsInteger:()=>fe,IsIntersect:()=>R,IsKind:()=>x,IsLiteral:()=>C,IsNever:()=>it,IsNull:()=>jt,IsNumber:()=>J,IsObject:()=>M,IsOptional:()=>ue,IsParameter:()=>li,IsReadonly:()=>kt,IsRecord:()=>pe,IsRef:()=>re,IsRefine:()=>da,IsRest:()=>ut,IsSchema:()=>Q,IsString:()=>ge,IsSymbol:()=>st,IsTemplateLiteral:()=>Z,IsThis:()=>br,IsTuple:()=>F,IsUndefined:()=>Gt,IsUnion:()=>y,IsUnknown:()=>ee,IsUnsafe:()=>ar,IsVoid:()=>ze,KeyOf:()=>Vc,Literal:()=>O,Lowercase:()=>oc,Mapped:()=>tl,Module:()=>Bl,Never:()=>L,NonNullable:()=>ol,Null:()=>Lt,Number:()=>Ie,Object:()=>$,Omit:()=>sl,Optional:()=>zo,Parameter:()=>wt,Parameters:()=>ul,Partial:()=>ll,Pick:()=>Il,Readonly:()=>ii,ReadonlyObject:()=>so,ReadonlyType:()=>Tl,Record:()=>yr,RecordKey:()=>Kt,RecordPattern:()=>Se,RecordValue:()=>xe,Ref:()=>Je,Refine:()=>si,Required:()=>Fl,Rest:()=>Rt,ReturnType:()=>Nl,Script:()=>Wl,String:()=>Oe,Symbol:()=>Ft,TemplateLiteral:()=>Zp,This:()=>Ir,Tuple:()=>X,Uncapitalize:()=>ic,Undefined:()=>Ut,Union:()=>k,Unknown:()=>ae,Unsafe:()=>Vo,Uppercase:()=>sc,Void:()=>$r,With:()=>Ul});var en="submit_review_report",zn="submit_test_gap_candidates",Bn="submit_filtered_test_gaps",DI=H.Object({verdict:H.Union([H.Literal("PASS"),H.Literal("FAIL")],{description:"FAIL only for a genuine blocking issue (clear rubric violation, agent-fault-worthy gap, unfair/undiscoverable test requirement, or a real determinism/regression risk). Optional, minor, or stylistic points are NOT grounds for FAIL \u2014 put those in `notes` instead and use PASS."}),summary:H.String({description:"One short sentence summarizing the verdict."}),reasons:H.Array(H.String(),{description:"Specific BLOCKING justifications only, citing rubric item IDs and concrete evidence from the files you read. Required (non-empty) when verdict is FAIL. Use an empty array when verdict is PASS."}),notes:H.Array(H.String(),{description:"Non-blocking, optional/minor observations or suggested improvements \u2014 the kind of feedback a real reviewer leaves as 'Minor/optional' without failing the task. Include these regardless of verdict; use an empty array if you truly have none."})});function Vl(e){return{name:en,label:"Submit Review Report",description:"Submit your final verdict for this review. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after you have finished reading and analyzing the relevant files. Do not write a plain-text final answer instead of calling this tool.",parameters:DI,async execute(t,n){return e.report={verdict:n.verdict,summary:n.summary,reasons:n.reasons??[],notes:n.notes??[]},{content:[{type:"text",text:`Report recorded: ${n.verdict}`}],details:void 0}}}}var NI=H.Object({gaps:H.Array(H.Object({description:H.String({description:"The specific untested behavior or edge case, in plain terms. Prefix with POSITIVE: or NEGATIVE: to indicate whether this is a missing required-behavior test or a missing forbidden/wrong-behavior test."}),risk:H.String({description:"Concretely why a plausible-but-incorrect implementation could still pass every test in test.patch despite missing, misimplementing, or violating this behavior (including doing a forbidden thing because no test asserts it must not happen)."})}),{description:"Candidate behavioral test gaps (positive and negative) grounded in agent_prompt.md or clear existing repo behavior. Use an empty array if you found none \u2014 do not manufacture gaps just to report something."})});function Hl(e){return{name:zn,label:"Submit Candidate Test Gaps",description:"Submit your candidate list of behavioral test gaps. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after you have finished reading and analyzing the relevant files.",parameters:NI,async execute(t,n){let r=n.gaps??[];return e.gaps=r,{content:[{type:"text",text:`Recorded ${r.length} candidate gap(s)`}],details:void 0}}}}var KI=H.Object({gaps:H.Array(H.Object({description:H.String({description:"The confirmed, real, fair test gap (may be reworded for clarity). Keep POSITIVE:/NEGATIVE: prefix when applicable."}),justification:H.String({description:"Why this is genuinely grounded in agent_prompt.md or the repo, fair to test per the fairness methodology, and a real (non-duplicate) coverage hole in test.patch \u2014 for negative gaps, cite the prompt's prohibition/constraint and why no existing test catches the forbidden outcome."})}),{description:"The filtered, final list of confirmed test gaps. Use an empty array if none of the candidates survive strict scrutiny."})});function Yl(e){return{name:Bn,label:"Submit Filtered Test Gaps",description:"Submit your final, strictly filtered list of confirmed test gaps. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after you have independently verified each candidate.",parameters:KI,async execute(t,n){let r=n.gaps??[];return e.gaps=r,{content:[{type:"text",text:`Confirmed ${r.length} gap(s) after filtering`}],details:void 0}}}}var UI={description:"Focus area: the task description in `agent_prompt.md`. Judge it strictly against rubric items P1-P5 below. You do not need to judge the tests or solution \u2014 other reviewers cover those.",tests:"Focus area: the tests added in `test.patch` (a unified diff). Judge them strictly against rubric items T1-T6 below. You cannot execute code or apply the patch, so read the diff carefully and reason about determinism, coverage, and strictness directly from the added code. Read `agent_prompt.md` for context on what behavior is in scope, and skim `solution.patch` only to understand what the tests are checking. Do not judge the description or the solution's code quality.\nMandatory symbol-fairness check: for every non-trivial method/function/property/export name that a test calls, mutates, mocks, or asserts on, use grep/read on the repository (the pre-existing code, not solution.patch) to confirm it actually exists there, OR confirm it is explicitly named in `agent_prompt.md`. Pay special attention to any such name that is new/invented and that duplicates, shadows, or conflicts with an existing, differently-named public API doing the same thing (e.g. a test calling `setFoo(...)` when the repo's real, visible API is `setBar(...)`) \u2014 that is a textbook unfair/undiscoverable test per the fairness methodology, and is blocking on its own even if every other test in the patch is fine.",solution:"Focus area: the golden solution in `solution.patch` (a unified diff). Judge it strictly against rubric items S1-S4 below. Read `agent_prompt.md` for the requirements and `test.patch` to see what must pass, and use read/grep/ls/find on the rest of the repository to check for regressions, inconsistent style, and irrelevant/unexplained changes. Do not judge the description's wording or the tests' coverage.\nMandatory dead-code check: scan every added/changed line in `solution.patch` for unused code \u2014 variables, parameters, imports, functions/methods, or fields that are declared/assigned but never read or called anywhere (including by `test.patch`) \u2014 and for dead/unreachable code (branches, conditions, or statements that can never execute, or code left behind after a return/throw/break that makes it unreachable). Use grep to confirm a symbol truly has no other usages in the repo before flagging it. This is a rubric S4 violation and is blocking on its own, even if the rest of the solution is otherwise excellent."};function Jl(e,t,n){let r=["You are a careful, calibrated reviewer for a coding-agent benchmark task.","You are working inside a throwaway, read-only copy of a git repository (this is your current directory). You have access to read/grep/find/ls tools only \u2014 you cannot execute code, apply patches, or edit files.","The repo root may contain: `agent_prompt.md` (the task description), `test.patch` (unified diff adding tests), and `solution.patch` (unified diff of the golden solution). Read whichever are relevant to your focus, and read the rest of the repository as needed via grep/read/ls/find to judge things against real repo context.","",UI[e.key],"","Checklist for your focus area:",t];return n&&r.push("","Fairness methodology (use this to judge whether an issue is actually blocking, and to distinguish agent-fault from prompt-ambiguity from test-flaw problems):",n),r.push("","How to set the verdict \u2014 calibrate, don't nitpick:","FAIL only for a genuine BLOCKING issue: a checklist item is clearly violated, a requirement stated in `agent_prompt.md` is untested or contradicted, a test asserts something unfair/undiscoverable per the fairness methodology above (private internals, exact class names not in the prompt, exact call order, reference-solution-only structure, etc.), a test is genuinely non-deterministic in a way that risks real CI flakiness (real network calls, unseeded randomness, race-prone ordering), or the solution has a real regression, missing requirement, or unrelated/unexplained change.","Do NOT fail for: optional coverage suggestions, 'would also be nice to test X', dead/unused code that doesn't affect correctness, minor style inconsistencies, or defensible implementation choices the prompt didn't forbid. These are exactly the kind of thing a real reviewer leaves as a 'Minor/optional' note without failing the task \u2014 put them in `notes` and still return PASS.","When genuinely torn between PASS and FAIL, default to PASS with the concern captured in `notes`, unless the issue would let a materially incorrect agent solution pass the hidden tests, or would unfairly fail a correct one \u2014 that is always blocking.","A single blocking issue is enough to FAIL, even if it affects only one test or one line out of many, and even if the rest of the suite is excellent. Do NOT average it away or let a large, otherwise-strong test suite talk you into a PASS \u2014 one unfair or undiscoverable test (e.g. requiring a private/invented API name that doesn't exist in the repo and isn't named in the prompt, especially one that conflicts with an existing, differently-named public API) is exactly as blocking as many.","",`When you are done analyzing, call the \`${en}\` tool exactly once with your structured verdict. That tool call is your only way to report a result.`),r.join(`
|
|
8
8
|
`)}function Zl(e,t){let n=["You are an exhaustive, research-minded test-coverage analyst for a coding-agent benchmark task. Your mandate is to dig as deep as possible and surface EVERY genuine behavioral test gap you can find \u2014 positive AND negative \u2014 not just the first one or two obvious ones. Treat a short list as a signal that you stopped too early, not as success.","You are working inside a throwaway, read-only copy of a git repository (this is your current directory). You have access to read/grep/find/ls tools only \u2014 you cannot execute code, apply patches, or edit files.","The repo root contains `agent_prompt.md` (the task description given to a coding agent), `test.patch` (a unified diff adding the hidden tests that will grade that agent's solution), and `solution.patch` (a unified diff of one golden/reference solution).","","Your job: find real BEHAVIORAL TEST GAPS \u2014 both positive and negative. A gap is required or clearly-implied behavior from `agent_prompt.md` (and, where relevant, obvious existing repo conventions) that `test.patch` does NOT actually verify \u2014 such that a plausible alternative implementation could satisfy `agent_prompt.md` on its face, differ from `solution.patch`, get that behavior wrong or skip it entirely, and STILL pass every test in `test.patch` as written.","","Coverage must include BOTH directions:","- POSITIVE gaps: required behavior that should happen but is never asserted (the happy path, side effects, state changes, outputs, or transitions the prompt requires).","- NEGATIVE gaps: forbidden behavior, invalid states, or wrong outcomes that should NOT happen but are never asserted against. These are often the most dangerous holes: an agent can violate `agent_prompt.md` in a material way \u2014 doing something it must not do, leaving something enabled when it should be disabled, applying an effect to the wrong target, skipping a guard, or accepting invalid input \u2014 and still pass every test if the suite only checks that the correct action works, not that incorrect actions are rejected.","","Be systematic and exhaustive \u2014 do not stop after finding one or two gaps. Work through ALL of the following passes before you consider yourself done:","1. Go through `agent_prompt.md` sentence by sentence. For every distinct requirement, constraint, or implied rule, explicitly check which test(s) in `test.patch` exercise it, and how thoroughly \u2014 both the required outcome AND any paired forbidden/wrong outcome.","2. Go through `solution.patch` branch by branch \u2014 every conditional, loop, early return, error path, guard, and state transition. For each one, ask whether `test.patch` actually forces that branch to be taken and its outcome checked, or whether an implementation that got that branch wrong would still pass.","3. Systematically consider standard edge-case categories against the required behavior: boundary/limit values, empty/missing/null/zero inputs, duplicate or repeated inputs, ordering and interleaving, concurrent or repeated invocations, error/failure/rollback paths, interaction between two or more required behaviors at once (not just each in isolation), and state left behind after an operation.","4. Cross-check overlapping/interacting requirements \u2014 behaviors that are each tested alone but never tested together \u2014 since that's exactly where a plausible-looking but incomplete implementation slips through.","5. NEGATIVE-CASE PASS (mandatory \u2014 do not skip): re-read `agent_prompt.md` specifically for prohibitions, conditions, guards, and 'only when' / 'must not' / 'never' / 'disabled when' / 'should not' language. For each one, ask: does `test.patch` assert that the WRONG thing does NOT happen? Examples of negative gaps:"," - A control that must be disabled/unavailable in a given state, but no test ever drives that state and asserts it stays disabled (an agent could leave it always enabled)."," - An operation that must NOT affect a separate scope/target (isolation, cross-contamination), but tests only verify the correct scope changes \u2014 never that the wrong scope is untouched."," - A side effect that must NOT occur (no duplicate entries, no spurious history step, no refresh on no-op), but tests never trigger the scenario where a sloppy implementation would create one."," - Invalid, out-of-order, or repeated input that should be ignored/rejected/coalesced differently, but tests never assert the incorrect handling would fail."," - A rollback/undo boundary where the first action must NOT be undoable, or redo must NOT be available when nothing was undone \u2014 but tests only exercise the happy undo/redo path."," - Mutual exclusion: two behaviors required to stay independent, but no test proves doing A does not silently change B.","For every prompt requirement, ask BOTH: 'Is the correct behavior tested?' AND 'Is there a corresponding test that would catch an agent doing the opposite, the forbidden thing, or applying it in the wrong context?' If only the first is tested, the second is a gap.","Do not filter yourself or self-censor for volume. List every gap that survives your own check against the ground rules below \u2014 a long, thorough list is expected and desired. A separate, independent agent will strictly filter this list afterward, so your job here is coverage and recall, not brevity.","","Ground rules \u2014 do not overreach:","- Every gap must trace back to a specific requirement or sentence in `agent_prompt.md`, or to behavior that is unambiguous from the existing, visible repo. Do not invent requirements the prompt doesn't support.","- Negative gaps must be grounded in an explicit or clearly implied prohibition/constraint in `agent_prompt.md` \u2014 not generic 'more negative tests would be nice'. The forbidden outcome must be part of the task contract.","- Do not propose gaps for things `agent_prompt.md` leaves intentionally open, or for implementation details/style the prompt doesn't mandate.","- Read `test.patch` carefully before deciding something is untested \u2014 do not propose a gap that an existing test already covers (even indirectly). A single test that asserts both the positive outcome AND that the forbidden/wrong outcome did not occur counts as covered.","","For reference, here is the checklist for the tests focus area (use it to calibrate what good coverage looks like, not as a list of gaps to report verbatim):",e];return t&&n.push("","Fairness methodology (context on what a fair, in-scope requirement looks like):",t),n.push("","For each gap, describe: (1) the specific untested behavior/edge case \u2014 say explicitly if it is a POSITIVE gap (required behavior never verified) or a NEGATIVE gap (forbidden/wrong behavior never asserted against) \u2014 in plain terms, and (2) concretely why a plausible-but-incorrect implementation would still pass every given test despite missing, misimplementing, or violating this requirement.",`When you are done \u2014 after completing ALL the passes above \u2014 call the \`${zn}\` tool exactly once with your full candidate list (empty only if, after genuinely exhaustive analysis, none exist). That tool call is your only way to report a result.`),n.join(`
|
|
9
9
|
`)}function Xl(e,t,n){let r=["You are a strict, skeptical fairness auditor for a coding-agent benchmark task.","You are working inside a throwaway, read-only copy of a git repository (this is your current directory). You have access to read/grep/find/ls tools only \u2014 you cannot execute code, apply patches, or edit files.","Another research agent reviewed this same task (`agent_prompt.md`, `test.patch`, `solution.patch`, and the repo) and proposed the following CANDIDATE test gaps \u2014 required-but-untested behaviors (positive and negative) it believes are missing from `test.patch`:","",JSON.stringify(e,null,2),"","Your job is to independently re-verify the files yourself and FILTER this list down to only candidates that are ALL of the following:","1. Genuinely grounded \u2014 actually required by a specific statement in `agent_prompt.md`, or unambiguous from clearly visible, existing repo behavior. Drop anything speculative, nice-to-have, or invented beyond what the prompt actually asks for.","2. Fair to test \u2014 verifying it would not require undiscoverable private internals, an invented/unnamed API, or exact incidental structure that only `solution.patch` happens to use. Judge this precisely against the fairness methodology below.","3. A real, distinct coverage hole \u2014 re-check `test.patch` yourself; drop any candidate an existing test already covers, and drop near-duplicate candidates (keep only the clearest phrasing of each distinct gap). For negative-case candidates, keep them only if `test.patch` does not already assert that the forbidden/wrong outcome does not occur.","","Be strict: when genuinely unsure whether a candidate holds up, drop it rather than keep it. It is fine \u2014 expected, even \u2014 to return an empty list if none of the candidates survive scrutiny.","","Checklist for the tests focus area, for calibration:",t];return n&&r.push("","Fairness methodology:",n),r.push("","For every gap you keep, give a short justification citing where in `agent_prompt.md` or the repo it is grounded.",`When you are done, call the \`${Bn}\` tool exactly once with your final filtered list (which may be empty). That tool call is your only way to report a result.`),r.join(`
|
|
10
|
-
`)}var Ql=900*1e3,yo=["read","grep","find","ls"];async function ho(e,t){let n=t.aborted?"cancelled":"done";return await Promise.race([e().then(()=>{t.aborted||(n="done")}),new Promise(r=>{setTimeout(()=>{n="timedOut",r()},Ql)}),new Promise(r=>{if(t.aborted)return r();t.addEventListener("abort",()=>{n="cancelled",r()},{once:!0})})]),n}async function ed(e){let t={},n=e.model,{session:r}=await go({cwd:e.tempDir,model:n,thinkingLevel:e.thinkingLevel==="off"?void 0:e.thinkingLevel,tools:[...yo,en],customTools:[Vl(t)],sessionManager:xo.inMemory()});try{let a=await ho(async()=>{await r.prompt(Jl(e.role,e.rubric,e.fairnessRules))
|
|
10
|
+
`)}var Ql=900*1e3,yo=["read","grep","find","ls"];async function ho(e,t){let n=t.aborted?"cancelled":"done";return await Promise.race([e().then(()=>{t.aborted||(n="done")}),new Promise(r=>{setTimeout(()=>{n="timedOut",r()},Ql)}),new Promise(r=>{if(t.aborted)return r();t.addEventListener("abort",()=>{n="cancelled",r()},{once:!0})})]),n}async function ed(e){let t={},n=e.model,{session:r}=await go({cwd:e.tempDir,model:n,thinkingLevel:e.thinkingLevel==="off"?void 0:e.thinkingLevel,tools:[...yo,en],customTools:[Vl(t)],sessionManager:xo.inMemory()});try{let a=await ho(async()=>{await r.prompt(Jl(e.role,e.rubric,e.fairnessRules))},e.cancelSignal);if(a==="cancelled")return await r.abort(),{verdict:"FAIL",summary:`${e.role.label} reviewer cancelled`,reasons:["Cancelled by user."],notes:[]};if(a==="timedOut")return await r.abort(),{verdict:"FAIL",summary:`${e.role.label} reviewer timed out`,reasons:[`Reviewer did not finish within ${Ql/1e3}s.`],notes:[]}}catch(a){return{verdict:"FAIL",summary:`${e.role.label} reviewer errored`,reasons:[`Reviewer agent failed: ${a instanceof Error?a.message:String(a)}`],notes:[]}}return t.report?t.report:{verdict:"FAIL",summary:`${e.role.label} reviewer did not submit a report`,reasons:[`The reviewer agent finished without calling ${en}.`],notes:[]}}async function td(e){let t={},n=e.model,{session:r}=await go({cwd:e.tempDir,model:n,thinkingLevel:e.thinkingLevel==="off"?void 0:e.thinkingLevel,tools:[...yo,zn],customTools:[Hl(t)],sessionManager:xo.inMemory()});try{let a=await ho(async()=>{await r.prompt(Zl(e.testRubric,e.fairnessRules))},e.cancelSignal);if(a!=="done")return await r.abort(),{status:a,gaps:[]}}catch{return{status:"error",gaps:[]}}return t.gaps?{status:"ok",gaps:t.gaps}:{status:"noSubmission",gaps:[]}}async function nd(e){let t={},n=e.model,{session:r}=await go({cwd:e.tempDir,model:n,thinkingLevel:e.thinkingLevel==="off"?void 0:e.thinkingLevel,tools:[...yo,Bn],customTools:[Yl(t)],sessionManager:xo.inMemory()});try{let a=await ho(async()=>{await r.prompt(Xl(e.candidates,e.testRubric,e.fairnessRules))},e.cancelSignal);if(a!=="done")return await r.abort(),{status:a,gaps:[]}}catch{return{status:"error",gaps:[]}}return t.gaps?{status:"ok",gaps:t.gaps}:{status:"noSubmission",gaps:[]}}import{existsSync as oa,mkdirSync as GI,readFileSync as Io,writeFileSync as _I}from"node:fs";import{dirname as zI,join as rd}from"node:path";import{getAgentDir as ad}from"@earendil-works/pi-coding-agent";var ra=rd(ad(),"checks-config.json"),aa=rd(ad(),"settings.json"),BI=["off","minimal","low","medium","high","xhigh","max"];function od(e){return e?.reasoning?BI.filter(t=>{let n=e.thinkingLevelMap?.[t];return n===null?!1:t==="xhigh"||t==="max"?n!==void 0:!0}):["off"]}function bo(){try{if(!oa(ra))return null;let e=JSON.parse(Io(ra,"utf-8"));if(e.provider&&e.modelId&&e.thinkingLevel)return e}catch{}return null}function id(e){let t=zI(ra);oa(t)||GI(t,{recursive:!0}),_I(ra,JSON.stringify(e,null,2),"utf-8")}function sd(){try{return oa(aa)?JSON.parse(Io(aa,"utf-8")).enabledModels??[]:[]}catch{return[]}}function md(e){let t=e.indexOf("/");return t<=0||t===e.length-1?null:{provider:e.slice(0,t),modelId:e.slice(t+1)}}function WI(){try{if(oa(aa))return JSON.parse(Io(aa,"utf-8"))}catch{}return{}}function pd(){let e=WI().shellPath;return e||(process.platform==="win32"?"C:\\Program Files\\Git\\bin\\bash.exe":"bash")}function VI(e){return e.replace(/\\/g,"/")}function HI(e){return`'${e.replace(/'/g,"'\\''")}'`}async function ud(e,t,n){if((await e.exec("git",["rev-parse","HEAD"],{cwd:t,timeout:15e3})).code!==0)return{status:"error",error:"Not a git repository, or it has no commits yet."};let a=`git archive HEAD | tar -x -C ${HI(VI(n))}`,s=await e.exec(pd(),["-c",a],{cwd:t,timeout:6e4});return s.code!==0?{status:"error",error:s.stderr?.trim()||`git archive failed (exit ${s.code})`}:{status:"ok"}}var Me="checks_progress";function et(e,t,n){let r=n>0?Math.min(1,t/n):0,a=Math.round(24*r),s="\u2588".repeat(a)+"\u2591".repeat(Math.max(0,24-a));return[`checks: ${e} [${s}] ${t}/${n}`]}import{existsSync as YI,readFileSync as JI}from"node:fs";var tt=[{key:"description",label:"Description",rubricHeading:/^## The problem description/i},{key:"tests",label:"Tests",rubricHeading:/^## The tests/i},{key:"solution",label:"Solution",rubricHeading:/^## The solution/i}];var $o=["agent_prompt.md","solution.patch","test.patch"];function cd(e){try{if(!YI(e))return{};let t=JSON.parse(JI(e,"utf-8"));return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}catch{return{}}}function ld(e){let{existingReport:t,config:n,runReviewers:r,byRole:a,runGapStages:s,testGaps:m,gapAnalysisIncomplete:c,gapFinderStatus:l,gapFilterStatus:I}=e,f={...t,timestamp:new Date().toISOString(),model:`${n.provider}/${n.modelId}`,thinkingLevel:n.thinkingLevel};if(r){let j={...t.reports&&typeof t.reports=="object"?t.reports:{},...a};f.reports=j,tt.every(ie=>j[ie.key])?f.overall=tt.every(ie=>j[ie.key].verdict==="PASS")?"PASS":"FAIL":delete f.overall}return s&&(f.testGaps=m,c?f.testGapAnalysisNote=`Gap analysis did not fully complete (finder: ${l}, filter: ${I}); testGaps may be incomplete.`:delete f.testGapAnalysisNote),f}function dd(e){let{merged:t,runReviewers:n,activeRoles:r,byRole:a,runGapStages:s}=e,m=typeof t.overall=="string"?t.overall:void 0,c=Array.isArray(t.testGaps)?t.testGaps.length:0,l=n?Object.fromEntries(r.filter(f=>a[f.key]).map(f=>[f.key,a[f.key].verdict])):void 0,I=[];if(l&&I.push(r.map(f=>`${f.label}: ${l[f.key]??"?"}`).join(", ")),m){let f=m==="PASS"&&c>0?" (with test gaps)":"";I.push(`Overall: ${m}${f}`)}return s&&I.push(c>0?`${c} test gap(s) found`:"no test gaps found"),{content:`Checks: ${I.join(" | ")}`,details:{overall:m,hasTestGaps:c>0,gapsCount:c,roleVerdicts:l,showGaps:s}}}var fd=`## The problem description (aka the task)\r
|
|
11
11
|
P1: Aligns with the repo's philosophy\r
|
|
12
12
|
P2: Self-contained \u2014 solvable from the repo and description alone\r
|
|
13
13
|
P3: Clear, concise, and unambiguous \u2014 describes what to build or fix and don't leave points for guessing\r
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sreetej510/pi-shipd-checks",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Pi extension that runs a strict, multi-agent fairness review of a benchmark task's agent_prompt.md, test.patch, and solution.patch, plus behavioral test-gap analysis, via /checks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|