Lines 1-21javascript
2import{b as Sc}from"./chunk-XTF6ELXT.js";import{a as rt,b as v,c as _e,d as ge,e as kt,f as p,g as lc,h as C,i as $,j as se,k as ae,l as ve,m as Vt,n as bc}from"./chunk-A2GX3PYV.js";import{$ as Go,$a as js,$b as wa,$c as Y,A as Lo,Aa as qt,Ab as ta,Ac as _a,Ad as dc,B as hn,Ba as cs,Bb as na,Bc as qa,Bd as uc,C as Ao,Ca as ls,Cb as ra,Cc as nt,Cd as pc,D as Do,Da as ds,Db as ia,Dc as Oe,Dd as it,E as yn,Ea as bt,Eb as oa,Ec as Ne,Ed as mc,Fa as us,Fb as sa,Fd as Se,G as et,Ga as ps,Gb as aa,Gc as Ba,Gd as fc,H as gt,Hb as ca,Hc as Va,Hd as ue,I as Oo,Ia as ms,Ib as la,Ic as Ha,Id as Dn,J as No ...
3`).map(n=>n.slice(3).trim()).filter(n=>n!=="").sort()}function Of(e,t){for(let n of["node_modules"]){let r=ce(e,n),i=ce(t,n);if(xe(r)&&!xe(i))try{Rf(r,i,"junction")}catch{}}}function Tc(e,t){let n=new Map;for(let r of t.entries){let i=n.get(r.file)??[];i.push({start:r.startLine,end:r.endLine}),n.set(r.file,i)}for(let[r,i]of n){let o=ce(e,r);xe(o)&&kf(o,Nf(vf(o,"utf-8"),i,{rust:r.endsWith(".rs")}))}}function Yr(e,t){for(let n of t)Tc(e,n)}function Ic(e,t){let n=wc(ce(Pc(),"scip-cleanup-patch-"));try{return $t("git",["-C",e,"worktree","add","--detach","--force",n,"HEAD"],{stdio:"ignore"}),Yr(n,t ...
4`),i=(n.rust===!0?Ff(e):Po(e)).split(`
5`),o=new Set;for(let s of t){let a=Mf(r,s.start),c=qf(i,a,Math.min(s.end,r.length-1));for(let l=a;l<=c&&l<r.length;l++)o.add(l)}return r.filter((s,a)=>!o.has(a)).join(`
6`)}function Ff(e){return e.replace(/\/\/.*$/gm,t=>t.replace(/[^\r\n]/g," ")).replace(/\/\*[\s\S]*?\*\//g,t=>t.replace(/[^\r\n]/g," ")).replace(/"(?:\\.|[^"\\\r\n])*"/g,t=>t.replace(/[^\r\n]/g," "))}function Mf(e,t){let n=t;for(;n>0;){let r=(e[n-1]??"").trim();if(/^(?:\/\/\/|\/\/!|#\[|#!\[|\/\*\*|\*|\*\/|@\w)/.test(r))n-=1;else break}return n}var _f=200;function qf(e,t,n){let r=0;for(let i=t;i<e.length;i++){for(let o of e[i]??"")o==="("||o==="["||o==="{"?r+=1:(o===")"||o==="]"||o==="}")&&(r-=1);if(i>=n&&r<=0)return i;if(i-n>_f)break}return n}function Rc(e,t,n){let r=Sf(e.binary,e.args,{cwd:t,en ...
7${r.stderr??""}`;if(r.status===0)return{ok:!0,exitCode:0,rawErrors:[],diagnostics:[],parseBasis:"heuristic",outputTail:kc(i)};let o=Bf(e.label,i),s=o.diagnostics.length>0?o.diagnostics:r.error?[{file:"",message:String(r.error),parseBasis:"heuristic"}]:[];return{ok:!1,exitCode:r.status,rawErrors:s.map(Kf),diagnostics:s,parseBasis:o.parseBasis,outputTail:kc(i)}}function Bf(e,t){if(e.startsWith("tsc")||e.startsWith("npx tsc"))return{diagnostics:Vf(t),parseBasis:"tsc"};if(e.startsWith("go build"))return{diagnostics:Hf(t),parseBasis:"go"};if(e.startsWith("ruff")){let n=Wf(t);return n.length>0?{diag ...
8`)){if(!n.trim().startsWith("{"))continue;let r=zr(n);if(!r||typeof r!="object")continue;let i=r;if(i.reason!=="compiler-message")continue;let o=i.message;if(!o||typeof o!="object")continue;let s=o;if(s.level!=="error")continue;let l=(Array.isArray(s.spans)?s.spans:[]).find(u=>!!u&&typeof u=="object"&&u.is_primary===!0),d=s.code;t.push({file:typeof l?.file_name=="string"?l.file_name:"",line:typeof l?.line_start=="number"?l.line_start:void 0,column:typeof l?.column_start=="number"?l.column_start:void 0,code:d&&typeof d=="object"&&typeof d.code=="string"?String(d.code):void 0,message:typeof s.me ...
9`).map(t=>t.trim()).filter(t=>/\berror\b/i.test(t)).map(t=>({file:"",message:t,parseBasis:"heuristic"}))}function Kf(e){let t=e.file.length>0?`${e.file}${e.line?`:${e.line}`:""}${e.column?`:${e.column}`:""}: `:"",n=e.code?`${e.code} `:"";return`${t}${n}${e.message}`.trim()}function Ec(e){let t=e.trim();if(t.length===0)return null;if(t.startsWith("{")||t.startsWith("["))return zr(t);let n=Math.min(...[t.indexOf("{"),t.indexOf("[")].filter(r=>r>=0));return Number.isFinite(n)?zr(t.slice(n)):null}function zr(e){try{return JSON.parse(e)}catch{return null}}function kc(e,t=10){return e.split(`
10`).map(n=>n.trim()).filter(n=>n.length>0).slice(-t)}var Ac={typescript:[".ts",".tsx",".mts",".cts"],javascript:[".js",".jsx",".vue"],java:[".java"],scala:[".scala"],kotlin:[".kt",".kts"],rust:[".rs"],python:[".py",".pyi"],ruby:[".rb"],go:[".go"],cpp:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],c:[".c",".h"],csharp:[".cs"],vb:[".vb"],dart:[".dart"],php:[".php"],clojure:[".clj",".cljs",".cljc"]},Yf={typescript:"typescript",javascript:"javascript",java:"java",scala:"scala",kotlin:"kotlin",rust:"rust",python:"python",ruby:"ruby",cpp:"cpp",c:"c",csharp:"csharp",vb:"vb",php:"php",clojure:"clojure"},Xf= ...
11`)}function Fn(e,t={}){let n={written:[],unchanged:[],skipped:[]};return ug(e,n),t.gitHook&&pg(e,n),n}function _c(e,t={}){let n={removed:[],unchanged:[],skipped:[]};return Fc(e,"AGENTS.md",t,n),Fc(e,"CLAUDE.md",t,n),mg(e,t,n),n}function ug(e,t){let n=[ot,"## scip-query","","This repo is indexed by scip-query (compiler-resolved code intelligence).","","- Unsure how to explore, plan, verify, or clean up here: invoke the `scip-query` skill \u2014 it routes to the right specialist skill.","- Each specialist skill carries its own command shortlist \u2014 prefer it over the full `_shared` catalog.", ...
12`);Nc(e,"AGENTS.md",n,t);let r=Pt(st(e,"CLAUDE.md"))?Ct(st(e,"CLAUDE.md"),"utf-8"):"";if(r.includes("@AGENTS.md")&&!r.includes(ot)){t.unchanged.push("CLAUDE.md");return}let i=[ot,"@AGENTS.md",On].join(`
13`);Nc(e,"CLAUDE.md",i,t)}function Nc(e,t,n,r){let i=st(e,t),o=Pt(i)?Ct(i,"utf-8"):"",s;if(o.includes(ot)){let a=new RegExp(`${ot}[\\s\\S]*?${On}`);s=o.replace(a,n)}else s=o.length>0?`${o.replace(/\n*$/,`
17`;s===o?r.unchanged.push(t):(ni(i,s),r.written.push(t))}function Fc(e,t,n,r){let i=st(e,t);if(!Pt(i)){r.unchanged.push(t);return}let o=Ct(i,"utf-8");if(!o.includes(ot)){r.unchanged.push(t);return}let s=new RegExp(`${ot}[\\s\\S]*?${On}`),a=o.replace(s,"").replace(/\n{3,}/g,`
19`).trim();r.removed.push(t),!n.dryRun&&(a.length===0?Mc(i,{force:!0}):ni(i,`${a}
20`))}function pg(e,t){let n=st(e,".git","hooks");if(!Pt(n)){t.skipped.push({target:".git/hooks/pre-commit",reason:"no .git/hooks directory (not a git repository?)"});return}let r=st(n,"pre-commit"),i=["#!/bin/sh",ti,"scip-query diff-gate || {",' echo "scip-query diff-gate failed \u2014 fix findings or commit with --no-verify to knowingly accept." >&2'," exit 1","}",""].join(`
LowWeak Crypto
Package source references weak cryptographic algorithms.
dist/command-descriptors-7UUURHWT.jsView on unpkg · L1 21`);if(Pt(r)){let o=Ct(r,"utf-8");if(o.includes(ti)){if(o===i){t.unchanged.push(".git/hooks/pre-commit");return}}else{t.skipped.push({target:".git/hooks/pre-commit",reason:"a pre-commit hook already exists \u2014 add `scip-query diff-gate` to it manually"});return}}ni(r,i),dg(r,493),t.written.push(".git/hooks/pre-commit")}function mg(e,t,n){let r=st(e,".git","hooks","pre-commit");if(!Pt(r)){n.unchanged.push(".git/hooks/pre-commit");return}if(!Ct(r,"utf-8").includes(ti)){n.skipped.push({target:".git/hooks/pre-commit",reason:"pre-commit hook is not managed by scip-query"});return}n.removed.push(" ...
Long lines were clipped for display.