Lines 1-22javascript
3import{jsx as Pi}from"react/jsx-runtime";import{readFile as mn}from"node:fs/promises";var nr=class{tools=new Map;register(e){this.tools.set(e.name,e)}get(e){return this.tools.get(e)}getAll(){return[...this.tools.values()]}toDefinitions(){return[...this.tools.values()].map(e=>({type:"function",function:{name:e.name,description:e.description,parameters:{type:"object",properties:Object.fromEntries(Object.entries(e.parameters).map(([r,o])=>[r,{type:o.type,description:o.description,...o.enum&&{enum:o.enum},...o.properties&&{properties:o.properties},...o.items&&{items:o.items}}])),required:Object.en ...
4`),n=r.split(`
HighChild Process
Package source references child process execution.
release/index.jsView on unpkg · L2 5`),i=Math.max(o.length,n.length),s=[`--- ${t}`,`+++ ${t}`];for(let l=0;l<i;l++){let d=o[l],c=n[l];if(d===c){d!==void 0&&s.push(
6`)}function Kr(t,e){let r=e.split(`
7`);return[`--- ${t}`,"+++ /dev/null",...r.map(o=>`-${o}`)].join(`
8`)}var wn={name:"write_file",description:"Write content to a file at the given path, creating parent directories if needed",parameters:{path:{type:"string",description:"Absolute or relative path to the file to write"},content:{type:"string",description:"The content to write to the file"}},async execute(t){try{let e=ye(t.path);if(e.error)return{output:"",error:e.error};let r=t.content,o="",n=!0;try{o=await
11${qe(e.path,o,r)}`}}catch(e){return{output:"",error:`Failed to write file: ${e instanceof Error?e.message:String(e)}`}}}};W.register(wn);import{exec as bn}from"node:child_process";var yn=
12Process exited with code ${l.code}`.trim()}:{output:`${o?`[permission override used]
HighSandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
release/index.jsView on unpkg · L2 14[stderr] ${c}`:"")}`})});e?.signal?.addEventListener("abort",()=>{s.kill()},{once:!0})})}};W.register(yn);import{readFile as _n,writeFile as Sn}from"node:fs/promises";var kn={name:"edit_file",description:"Find and replace a specific text in a file. The old_string must be unique (appear exactly once) in the file.",parameters:{path:{type:"string",description:"Path to the file to edit"},old_string:{type:"string",description:"The exact text to find (must appear exactly once in the file)"},new_string:{type:"string",description:"The text to replace old_string with"}},async execute(t){try{let e=ye(t. ...
17${qe(e.path,r,s)}`}}catch(e){return{output:"",error:`edit_file failed: ${e instanceof Error?e.message:String(e)}`}}}};W.register(kn);import{readFile as Tn,writeFile as vn}from"node:fs/promises"
22${qe(e.path,r,o)}`}}catch(e){return{output:"",error:`multi_edit_file failed: ${e instanceof Error?e.message:String(e)}`}}}};W.register(Cn);import{readdir as Mn,readFile as $n,stat as Dn}from"node:fs/promises";import{resolve as En,join as Rn,relative as Nn}from"node:path";var An=1024*1024;async function qr(t,e,r,o,n,i){if(n.length>=i)return;let s;try{s=await Mn(t,{withFileTypes:!0})}catch{return}for(let l of s){if(n.length>=i)return;if(l.name==="node_modules"||l.name===".git"||l.name==="dist")continue;let d=Rn(t,l.name);if(l.isDirectory())await qr(d,e,r,o,n,i);else if(l.isFile()){if(r&&!r.test( ...
Long lines were clipped for display.