oioxo-mcp 0.5.61 → 0.5.63

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.
Files changed (2) hide show
  1. package/bundle/cli.js +2 -2
  2. package/package.json +1 -1
package/bundle/cli.js CHANGED
@@ -603,7 +603,7 @@ ${h}`,"archive listing"):{kind:a,text:"",truncated:!1,refused:!0,note:"Archive a
603
603
  `)}}return null}function mft(t,e){let r=cC(t),n=0,i=0;for(let s of e){let a=cC(s.search),c=cC(s.replace);if(!a.trim()){r=c,n++;continue}let d=fft(r,a,c)??hft(r,a,c)??pft(r,a,c);if(d==null){i++;continue}r=d,n++}return{content:r,applied:n,failed:i}}function vwe(t,e,r){let n=e.length===1?e[0].path:void 0,i=r??n,s=lft(t,i);if(!s.length)return{edits:[],applied:0,failed:0};let a=new Map;for(let x of s){let y=x.path??i;y&&(a.get(y)??a.set(y,[]).get(y)).push(x)}let c=new Map(e.map(x=>[x.path,cC(x.content)])),d=[],h=0,p=0;for(let[x,y]of a){let v=c.get(x)??"",_=mft(v,y);h+=_.applied,p+=_.failed,_.content!==v&&d.push({path:x,content:_.content.replace(/\n+$/,`
604
604
  `)})}return{edits:d,applied:h,failed:p}}var cC,hG,bwe=ce(()=>{"use strict";cC=t=>t.replace(/\r\n/g,`
605
605
  `),hG=/<{3,}\s*SEARCH\s*\n([\s\S]*?)\n?={3,}[ \t]*\n([\s\S]*?)\n?>{3,}\s*REPLACE/gi});function GP(t,e){let r=new Map(t.map(n=>[n.path,n.content]));for(let n of e)r.set(n.path,n.content);return[...r].map(([n,i])=>({path:n,content:i}))}function xft(t,e){let r=[],n=new RegExp(`(?<![\\w$])${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![\\w$])`);for(let i of t){if(!ZP(i.path))continue;let s=i.content.split(`
606
- `);for(let a=0;a<s.length;a++)n.test(s[a])&&r.push({path:i.path,line:a+1,text:s[a].trim().slice(0,160)})}return r}function yft(t,e){let r=[];for(let n of t)if(ZP(n.path))for(let i of q8(n.path,n.content))i.name===e&&r.push({path:n.path,line:i.line,kind:i.kind,signature:i.signature});return r}function vft(t){if(!t.includes("<")&&!t.includes("{"))return t;let e=t;return e=e.replace(/<\/?(?:rewrite_file|rewrite|edit_file|new_content|content|file|uri|path)\b[^>]*<?>?/gi," "),e=e.replace(/\{\s*"tool"\s*:\s*"[^"]+"\s*,?\s*"args"\s*:\s*\{[\s\S]*?\}\s*\}/gi," "),e=e.replace(/\{\s*"tool"\s*:\s*"[^"]+"\s*\}/gi," "),e.replace(/[ \t]{2,}/g," ").replace(/\n[ \t]+/g,`
606
+ `);for(let a=0;a<s.length;a++)n.test(s[a])&&r.push({path:i.path,line:a+1,text:s[a].trim().slice(0,160)})}return r}function yft(t,e){let r=[];for(let n of t)if(ZP(n.path))for(let i of q8(n.path,n.content))i.name===e&&r.push({path:n.path,line:i.line,kind:i.kind,signature:i.signature});return r}function vft(t){if(!t.includes("<")&&!t.includes("{"))return t;let e=t,r=/<\/?(?:rewrite_file|rewrite|edit_file)\b/i.exec(e);if(r){let n=/<\/(?:rewrite_file|rewrite|edit_file|file|content|new_content)\s*>/gi,i=-1,s;for(;(s=n.exec(e))!==null;)i=s.index+s[0].length;e=i>r.index?e.slice(0,r.index)+" "+e.slice(i):e.slice(0,r.index)+" "}return e=e.replace(/<\/?(?:rewrite_file|rewrite|edit_file|new_content|content|file|uri|path)\b[^>]*<?>?/gi," "),e=e.replace(/(^|[\s>])(?:uri|new_content|content|path)\s*>/gi,"$1 "),e=e.replace(/\{\s*"tool"\s*:\s*"[^"]+"\s*,?\s*"args"\s*:\s*\{[\s\S]*?\}\s*\}/gi," "),e=e.replace(/\{\s*"tool"\s*:\s*"[^"]+"\s*\}/gi," "),e.replace(/[ \t]{2,}/g," ").replace(/\n[ \t]+/g,`
607
607
  `).replace(/\n{3,}/g,`
608
608
 
609
609
  `)}function KP(t,e){if(e&&e.trim())return e;let r=[...t.matchAll(/```[a-zA-Z0-9+\-.]*\n([\s\S]*?)```/g)].map(n=>n[1]);for(let n of r){let i=n.replace(/\n$/,"");try{let s=JSON.parse(i.trim());if(s&&typeof s.tool=="string")continue}catch{}if(i.trim())return i}return e||""}function wwe(t){let e=[...t.matchAll(/```[a-zA-Z0-9+\-.]*\n([\s\S]*?)```/g)].map(r=>r[1]);for(let r of e){let n=r.replace(/\n$/,"");try{let a=JSON.parse(n.trim());if(a&&typeof a.tool=="string")continue}catch{}let s=(n.split(`
@@ -1271,7 +1271,7 @@ ${T.snippet}`:""}`).join(`
1271
1271
  `);return Gs(A||"No results.")}catch(v){return Gs(`web_search failed: ${v instanceof Error?v.message:"error"}`)}}),e.tool("fetch_url","Fetch a web page (http/https only) and return its readable text. Use to read a doc/article \u2014 typically a URL found via web_search.",{url:ao.string().describe("The full http(s) URL.")},async({url:x})=>{let y=await VS();if(!y.ok)return HS(y.message);try{let _=await(await fetch(`${Us}/tools/fetch?url=${encodeURIComponent(x)}`,{signal:AbortSignal.timeout(12e3)})).json();return Gs(_.error?`fetch_url failed: ${_.error}`:_.text??"(empty)")}catch(v){return Gs(`fetch_url failed: ${v instanceof Error?v.message:"error"}`)}});let c=null,d=!1,h=async x=>{if(d=x,c)return c;let{makePlaywrightBackend:y}=await Promise.resolve().then(()=>(yce(),xce)),{BrowserController:v}=await Promise.resolve().then(()=>(LM(),rLe)),_=await y({headless:!1});return c=new v(_,{confirmNavigate:async()=>d,allowEvaluate:!1}),c};e.tool("browser",'Drive a REAL browser on this machine to see and test web pages \u2014 navigate, read a numbered snapshot of clickable elements, click/type by ref, screenshot. Runs LOCALLY (the page never leaves the device). Local URLs (localhost) are always allowed; set allow_external:true to permit other sites. Call one verb at a time; after navigate the result lists elements like [3] button "Sign in" \u2014 click by that ref.',{verb:ao.enum(["navigate","snapshot","screenshot","click","type","waitFor","scrollTo","back","reload","close"]).describe("The action."),url:ao.string().optional().describe("For navigate: the URL."),ref:ao.number().optional().describe("For click/type/scrollTo: element number from the latest snapshot."),text:ao.string().optional().describe("For type: text to enter. For click: visible text to match. For waitFor: text to wait for."),selector:ao.string().optional().describe("Optional CSS selector (prefer ref)."),submit:ao.boolean().optional().describe("For type: press Enter after typing."),allow_external:ao.boolean().optional().describe("Permit navigating to non-local sites (privacy gate; default false).")},async({verb:x,url:y,ref:v,text:_,selector:A,submit:T,allow_external:k})=>{let C=await VS();if(!C.ok)return HS(C.message);try{let E=await h(!!k);if(x==="close")return await E.dispose(),c=null,Gs("Browser closed.");let I=await E.run({verb:x,url:y,ref:v,text:_,selector:A,submit:T});if(!I.ok)return Gs(`browser ${x} failed: ${I.error??"unknown error"}`);let R=`${I.title||""} \u2014 ${I.url}`.trim(),U=I.snapshot?`
1272
1272
  ${I.snapshot}`:"",B=I.consoleErrors?.length?`
1273
1273
  console errors: ${I.consoleErrors.slice(0,3).join(" | ")}`:"",H=I.screenshot?`
1274
- (screenshot captured: ${I.screenshot.length} bytes \u2014 not shown as text)`:"";return Gs(`${R}${U}${B}${H}`.trim()||"OK")}catch(E){return Gs(`browser failed: ${E instanceof Error?E.message:"error"}`)}});let p=new UM;await e.connect(p)}L8();$8();_l();var Fce=(()=>{try{return"0.5.61"}catch{}try{return ALe(import.meta.url)("../../package.json").version}catch{return"0.0.0"}})(),TIt=`OIOXO ${Fce} \u2014 context engine + terminal coding agent (https://oioxo.com)
1274
+ (screenshot captured: ${I.screenshot.length} bytes \u2014 not shown as text)`:"";return Gs(`${R}${U}${B}${H}`.trim()||"OK")}catch(E){return Gs(`browser failed: ${E instanceof Error?E.message:"error"}`)}});let p=new UM;await e.connect(p)}L8();$8();_l();var Fce=(()=>{try{return"0.5.63"}catch{}try{return ALe(import.meta.url)("../../package.json").version}catch{return"0.0.0"}})(),TIt=`OIOXO ${Fce} \u2014 context engine + terminal coding agent (https://oioxo.com)
1275
1275
 
1276
1276
  Private, on your device. Cut your AI bill by up to ~90% in Copilot, Cursor & Claude,
1277
1277
  and code from your terminal \u2014 nothing leaves your machine.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oioxo-mcp",
3
- "version": "0.5.61",
3
+ "version": "0.5.63",
4
4
  "description": "OIOXO — cut your AI bill by up to ~90%: it feeds Claude Code, Copilot, Cursor and any MCP agent only the relevant slice of your codebase instead of whole files. Also a private terminal coding agent (`oioxo code`, on-device with --local or any key). Runs on your device; your own devices can build together over Wi-Fi.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",