Lines 1-21javascript
2import{jsx as Gi}from"react/jsx-runtime";import{readFile as _n}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 ...
3`),n=r.split(`
HighChild Process
Package source references child process execution.
release/index.jsView on unpkg · L1 4`),s=Math.max(o.length,n.length),i=[`--- ${t}`,`+++ ${t}`];for(let l=0;l<s;l++){let d=o[l],c=n[l];if(d===c){d!==void 0&&i.push(
5`)}function Jr(t,e){let r=e.split(`
6`);return[`--- ${t}`,"+++ /dev/null",...r.map(o=>`-${o}`)].join(`
7`)}var Mn={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=_e(t.path);if(e.error)return{output:"",error:e.error};let r=t.content,o="",n=!0;try{o=await
10${Ke(e.path,o,r)}`}}catch(e){return{output:"",error:`Failed to write file: ${e instanceof Error?e.message:String(e)}`}}}};U.register(Mn);import{exec as $n}from"node:child_process";var Dn=
11Process 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 · L1 13[stderr] ${c}`:"")}`})});e?.signal?.addEventListener("abort",()=>{i.kill()},{once:!0})})}};U.register(Dn);import{readFile as En,writeFile as Nn}from"node:fs/promises";var Rn={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=_e(t. ...
16${Ke(e.path,r,i)}`}}catch(e){return{output:"",error:`edit_file failed: ${e instanceof Error?e.message:String(e)}`}}}};U.register(Rn);import{readFile as An,writeFile as On}from"node:fs/promises"
21${Ke(e.path,r,o)}`}}catch(e){return{output:"",error:`multi_edit_file failed: ${e instanceof Error?e.message:String(e)}`}}}};U.register(In);import{readdir as Pn,readFile as Ln,stat as jn}from"node:fs/promises";import{resolve as Fn,join as Bn,relative as Un}from"node:path";var Wn=1024*1024;async function Gr(t,e,r,o,n,s){if(n.length>=s)return;let i;try{i=await Pn(t,{withFileTypes:!0})}catch{return}for(let l of i){if(n.length>=s)return;if(l.name==="node_modules"||l.name===".git"||l.name==="dist")continue;let d=Bn(t,l.name);if(l.isDirectory())await Gr(d,e,r,o,n,s);else if(l.isFile()){if(r&&!r.test( ...
Long lines were clipped for display.