@shiplightai/mcp 0.1.48 → 0.1.49

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 (48) hide show
  1. package/chrome-extension/background.js +11 -2
  2. package/dist/agentHelpers-242MN5TR-AK52N3RJ.js +4 -0
  3. package/dist/agentLogin-VLDCPI66-52P67BMY.js +4 -0
  4. package/dist/chunk-34YV5HSR.js +3999 -0
  5. package/dist/chunk-3KLJZX63.js +34 -0
  6. package/dist/chunk-5YN4X7LV.js +31 -0
  7. package/dist/chunk-67R4GP2H.js +4 -0
  8. package/dist/chunk-7W6YLS2E.js +22 -0
  9. package/dist/chunk-AFEFEPKR.js +4 -0
  10. package/dist/chunk-B7PRQ6ZM.js +4 -0
  11. package/dist/chunk-ETDHHU35.js +4 -0
  12. package/dist/chunk-FUPXB4VL.js +9 -0
  13. package/dist/chunk-GZSLCYQ7.js +192 -0
  14. package/dist/chunk-HHCLRZRA.js +15 -0
  15. package/dist/chunk-HQNPMIQW.js +200 -0
  16. package/dist/chunk-JKHKVGEC.js +4 -0
  17. package/dist/chunk-JT3U4KNR.js +59 -0
  18. package/dist/chunk-K7YTTSET.js +4 -0
  19. package/dist/chunk-KW4N7WFX.js +38 -0
  20. package/dist/chunk-LM633YUO.js +4 -0
  21. package/dist/chunk-ORSFJVJL.js +221 -0
  22. package/dist/chunk-PFLXO7G4.js +6 -0
  23. package/dist/chunk-PWGR4MG7.js +4 -0
  24. package/dist/chunk-RSM4LZ5P.js +4237 -0
  25. package/dist/chunk-Z3E7FIDS.js +17 -0
  26. package/dist/dist-CBGK26LV-CIQ64GXB.js +15 -0
  27. package/dist/dist-N7YI5OTM.js +4 -0
  28. package/dist/dist-VVPHZ43R.js +4 -0
  29. package/dist/dist-YNN5UBVC.js +4 -0
  30. package/dist/esm-7LSQY7YM.js +153 -0
  31. package/dist/fileFromPath-7DXRMRQU.js +19 -0
  32. package/dist/handler-2DVP4PMD-IFR4HH7D.js +4 -0
  33. package/dist/import-meta-resolve-GTPXFCVK.js +6 -0
  34. package/dist/index.js +21 -9352
  35. package/dist/lib-ZSSBUTBS.js +588 -0
  36. package/dist/magic-string.es-LGBSB5S5.js +16 -0
  37. package/dist/multipart-parser-JC2L5VJI.js +5 -0
  38. package/dist/multipart-parser-TJWXZEMW-OF3QE73Z.js +5 -0
  39. package/dist/relayBrowserCache-QL6LD4JJ-TKU47MOI.js +4 -0
  40. package/dist/server-KGF6BY7H.js +22 -0
  41. package/dist/src-B7EYCIZ4-XWOBV3GQ.js +6 -0
  42. package/dist/src-SYQHKG2Q.js +6 -0
  43. package/dist/task-2JIXKMIY-CMX3BD6Z.js +193 -0
  44. package/dist/token-AWIWOSVF.js +4 -0
  45. package/dist/token-QK7JKAKS.js +4 -0
  46. package/dist/token-util-GL5PN7CJ.js +4 -0
  47. package/dist/token-util-TEE5GKZ2.js +4 -0
  48. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "module";
3
+ const require = __createRequire(import.meta.url);
4
+ import{b as i}from"./chunk-JKHKVGEC.js";import{createRequire as r}from"module";import{appendFileSync as s}from"fs";var $=r(import.meta.url),g=class{constructor(){this.initialized=!1}init(){if(this.initialized)return;let o=i().agentLogPath;if(o)try{s(o,`
5
+ === Agent Execution Log ===
6
+ Started: ${new Date().toISOString()}
7
+
8
+ `),this.initialized=!0}catch(e){console.error(`[AgentLogger] Failed to initialize log file: ${e.message}`)}}log(o){let e=i().agentLogPath;if(e){this.initialized||this.init();try{let t=new Date().toISOString();s(e,`[${t}] ${o}
9
+ `)}catch{}}}section(o){this.log(`
10
+ ${"=".repeat(60)}
11
+ ${o}
12
+ ${"=".repeat(60)}`)}step(o,e,t){this.section(`Step ${o}/${e}`),t.task&&this.log(`Task: ${t.task}`),t.url&&this.log(`URL: ${t.url}`),t.thinking&&this.log(`Thinking: ${t.thinking}`),t.evaluation&&this.log(`Evaluation: ${t.evaluation}`),t.memory&&this.log(`Memory: ${t.memory}`),t.goal&&this.log(`Goal: ${t.goal}`),t.actions&&this.log(`Actions: ${t.actions}`)}llmCall(o,e,t){if(this.log(`LLM Call: ${o}`),this.log(`Duration: ${(e/1e3).toFixed(2)}s`),t){let a=t.promptTokens||t.inputTokens||0,n=t.completionTokens||t.outputTokens||0,l=t.totalTokens||0;this.log(`Tokens: ${a} prompt + ${n} completion = ${l} total`)}}thinking(o){this.log(`Native Thinking:
13
+ ${o}`)}prompt(o,e){this.section("LLM Prompt"),this.log(`System Prompt:
14
+ ${o}`),this.log(`
15
+ User Prompt:
16
+ ${e}`)}response(o){this.log(`LLM Response:
17
+ ${o}`)}error(o,e){this.log(`ERROR: ${o}`),e&&(this.log(`Error details: ${e.message}`),e.stack&&this.log(`Stack: ${e.stack}`))}isEnabled(){return!!i().agentLogPath}},c=new g;export{c as a};
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "module";
3
+ const require = __createRequire(import.meta.url);
4
+ import{a as w,c as _}from"./chunk-ETDHHU35.js";import"./chunk-LM633YUO.js";import{createRequire as I}from"module";var G=I(import.meta.url),M=_((n,m)=>{"use strict";var v=1e3,d=v*60,h=d*60,r=h*24,g=r*7,b=r*365.25;m.exports=function(e,t){t=t||{};var i=typeof e;if(i==="string"&&e.length>0)return u(e);if(i==="number"&&isFinite(e))return t.long?o(e):p(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function u(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var i=parseFloat(t[1]),a=(t[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return i*b;case"weeks":case"week":case"w":return i*g;case"days":case"day":case"d":return i*r;case"hours":case"hour":case"hrs":case"hr":case"h":return i*h;case"minutes":case"minute":case"mins":case"min":case"m":return i*d;case"seconds":case"second":case"secs":case"sec":case"s":return i*v;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function p(e){var t=Math.abs(e);return t>=r?Math.round(e/r)+"d":t>=h?Math.round(e/h)+"h":t>=d?Math.round(e/d)+"m":t>=v?Math.round(e/v)+"s":e+"ms"}function o(e){var t=Math.abs(e);return t>=r?s(e,t,r,"day"):t>=h?s(e,t,h,"hour"):t>=d?s(e,t,d,"minute"):t>=v?s(e,t,v,"second"):e+" ms"}function s(e,t,i,a){var C=t>=i*1.5;return Math.round(e/i)+" "+a+(C?"s":"")}}),j=_((n,m)=>{"use strict";function v(d){r.debug=r,r.default=r,r.coerce=s,r.disable=p,r.enable=b,r.enabled=o,r.humanize=M(),r.destroy=e,Object.keys(d).forEach(t=>{r[t]=d[t]}),r.names=[],r.skips=[],r.formatters={};function h(t){let i=0;for(let a=0;a<t.length;a++)i=(i<<5)-i+t.charCodeAt(a),i|=0;return r.colors[Math.abs(i)%r.colors.length]}r.selectColor=h;function r(t){let i,a=null,C,c;function l(...f){if(!l.enabled)return;let y=l,O=Number(new Date),R=O-(i||O);y.diff=R,y.prev=i,y.curr=O,i=O,f[0]=r.coerce(f[0]),typeof f[0]!="string"&&f.unshift("%O");let F=0;f[0]=f[0].replace(/%([a-zA-Z%])/g,(E,P)=>{if(E==="%%")return"%";F++;let k=r.formatters[P];if(typeof k=="function"){let S=f[F];E=k.call(y,S),f.splice(F,1),F--}return E}),r.formatArgs.call(y,f),(y.log||r.log).apply(y,f)}return l.namespace=t,l.useColors=r.useColors(),l.color=r.selectColor(t),l.extend=g,l.destroy=r.destroy,Object.defineProperty(l,"enabled",{enumerable:!0,configurable:!1,get:()=>a!==null?a:(C!==r.namespaces&&(C=r.namespaces,c=r.enabled(t)),c),set:f=>{a=f}}),typeof r.init=="function"&&r.init(l),l}function g(t,i){let a=r(this.namespace+(typeof i>"u"?":":i)+t);return a.log=this.log,a}function b(t){r.save(t),r.namespaces=t,r.names=[],r.skips=[];let i=(typeof t=="string"?t:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let a of i)a[0]==="-"?r.skips.push(a.slice(1)):r.names.push(a)}function u(t,i){let a=0,C=0,c=-1,l=0;for(;a<t.length;)if(C<i.length&&(i[C]===t[a]||i[C]==="*"))i[C]==="*"?(c=C,l=a,C++):(a++,C++);else if(c!==-1)C=c+1,l++,a=l;else return!1;for(;C<i.length&&i[C]==="*";)C++;return C===i.length}function p(){let t=[...r.names,...r.skips.map(i=>"-"+i)].join(",");return r.enable(""),t}function o(t){for(let i of r.skips)if(u(t,i))return!1;for(let i of r.names)if(u(t,i))return!0;return!1}function s(t){return t instanceof Error?t.stack||t.message:t}function e(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}m.exports=v}),T=_((n,m)=>{"use strict";n.formatArgs=d,n.save=h,n.load=r,n.useColors=v,n.storage=g(),n.destroy=(()=>{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function v(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let u;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(u=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(u[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function d(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+m.exports.humanize(this.diff),!this.useColors)return;let p="color: "+this.color;u.splice(1,0,p,"color: inherit");let o=0,s=0;u[0].replace(/%[a-zA-Z%]/g,e=>{e!=="%%"&&(o++,e==="%c"&&(s=o))}),u.splice(s,0,p)}n.log=console.debug||console.log||(()=>{});function h(u){try{u?n.storage.setItem("debug",u):n.storage.removeItem("debug")}catch{}}function r(){let u;try{u=n.storage.getItem("debug")||n.storage.getItem("DEBUG")}catch{}return!u&&typeof process<"u"&&"env"in process&&(u=process.env.DEBUG),u}function g(){try{return localStorage}catch{}}m.exports=j()(n);var{formatters:b}=m.exports;b.j=function(u){try{return JSON.stringify(u)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}}),N=_((n,m)=>{"use strict";m.exports=(v,d=process.argv)=>{let h=v.startsWith("-")?"":v.length===1?"-":"--",r=d.indexOf(h+v),g=d.indexOf("--");return r!==-1&&(g===-1||r<g)}}),B=_((n,m)=>{"use strict";var v=w("os"),d=w("tty"),h=N(),{env:r}=process,g;h("no-color")||h("no-colors")||h("color=false")||h("color=never")?g=0:(h("color")||h("colors")||h("color=true")||h("color=always"))&&(g=1),"FORCE_COLOR"in r&&(r.FORCE_COLOR==="true"?g=1:r.FORCE_COLOR==="false"?g=0:g=r.FORCE_COLOR.length===0?1:Math.min(parseInt(r.FORCE_COLOR,10),3));function b(o){return o===0?!1:{level:o,hasBasic:!0,has256:o>=2,has16m:o>=3}}function u(o,s){if(g===0)return 0;if(h("color=16m")||h("color=full")||h("color=truecolor"))return 3;if(h("color=256"))return 2;if(o&&!s&&g===void 0)return 0;let e=g||0;if(r.TERM==="dumb")return e;if(process.platform==="win32"){let t=v.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(t=>t in r)||r.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in r){let t=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:e}function p(o){let s=u(o,o&&o.isTTY);return b(s)}m.exports={supportsColor:p,stdout:b(u(!0,d.isatty(1))),stderr:b(u(!0,d.isatty(2)))}}),L=_((n,m)=>{"use strict";var v=w("tty"),d=w("util");n.init=o,n.log=b,n.formatArgs=r,n.save=u,n.load=p,n.useColors=h,n.destroy=d.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),n.colors=[6,2,3,4,5,1];try{let e=B();e&&(e.stderr||e).level>=2&&(n.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}n.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let i=t.substring(6).toLowerCase().replace(/_([a-z])/g,(C,c)=>c.toUpperCase()),a=process.env[t];return/^(yes|on|true|enabled)$/i.test(a)?a=!0:/^(no|off|false|disabled)$/i.test(a)?a=!1:a==="null"?a=null:a=Number(a),e[i]=a,e},{});function h(){return"colors"in n.inspectOpts?!!n.inspectOpts.colors:v.isatty(process.stderr.fd)}function r(e){let{namespace:t,useColors:i}=this;if(i){let a=this.color,C="\x1B[3"+(a<8?a:"8;5;"+a),c=` ${C};1m${t} \x1B[0m`;e[0]=c+e[0].split(`
5
+ `).join(`
6
+ `+c),e.push(C+"m+"+m.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=g()+t+" "+e[0]}function g(){return n.inspectOpts.hideDate?"":new Date().toISOString()+" "}function b(...e){return process.stderr.write(d.formatWithOptions(n.inspectOpts,...e)+`
7
+ `)}function u(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function p(){return process.env.DEBUG}function o(e){e.inspectOpts={};let t=Object.keys(n.inspectOpts);for(let i=0;i<t.length;i++)e.inspectOpts[t[i]]=n.inspectOpts[t[i]]}m.exports=j()(n);var{formatters:s}=m.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,d.inspect(e,this.inspectOpts).split(`
8
+ `).map(t=>t.trim()).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,d.inspect(e,this.inspectOpts)}}),A=_((n,m)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?m.exports=T():m.exports=L()}),$=_(n=>{"use strict";var m=n&&n.__createBinding||(Object.create?function(p,o,s,e){e===void 0&&(e=s);var t=Object.getOwnPropertyDescriptor(o,s);(!t||("get"in t?!o.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(p,e,t)}:function(p,o,s,e){e===void 0&&(e=s),p[e]=o[s]}),v=n&&n.__setModuleDefault||(Object.create?function(p,o){Object.defineProperty(p,"default",{enumerable:!0,value:o})}:function(p,o){p.default=o}),d=n&&n.__importStar||function(p){if(p&&p.__esModule)return p;var o={};if(p!=null)for(var s in p)s!=="default"&&Object.prototype.hasOwnProperty.call(p,s)&&m(o,p,s);return v(o,p),o};Object.defineProperty(n,"__esModule",{value:!0}),n.req=n.json=n.toBuffer=void 0;var h=d(w("http")),r=d(w("https"));async function g(p){let o=0,s=[];for await(let e of p)o+=e.length,s.push(e);return Buffer.concat(s,o)}n.toBuffer=g;async function b(p){let o=(await g(p)).toString("utf8");try{return JSON.parse(o)}catch(s){let e=s;throw e.message+=` (input: ${o})`,e}}n.json=b;function u(p,o={}){let s=((typeof p=="string"?p:p.href).startsWith("https:")?r:h).request(p,o),e=new Promise((t,i)=>{s.once("response",t).once("error",i).end()});return s.then=e.then.bind(e),s}n.req=u}),D=_(n=>{"use strict";var m=n&&n.__createBinding||(Object.create?function(o,s,e,t){t===void 0&&(t=e);var i=Object.getOwnPropertyDescriptor(s,e);(!i||("get"in i?!s.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return s[e]}}),Object.defineProperty(o,t,i)}:function(o,s,e,t){t===void 0&&(t=e),o[t]=s[e]}),v=n&&n.__setModuleDefault||(Object.create?function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}:function(o,s){o.default=s}),d=n&&n.__importStar||function(o){if(o&&o.__esModule)return o;var s={};if(o!=null)for(var e in o)e!=="default"&&Object.prototype.hasOwnProperty.call(o,e)&&m(s,o,e);return v(s,o),s},h=n&&n.__exportStar||function(o,s){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(s,e)&&m(s,o,e)};Object.defineProperty(n,"__esModule",{value:!0}),n.Agent=void 0;var r=d(w("net")),g=d(w("http")),b=w("https");h($(),n);var u=Symbol("AgentBaseInternalState"),p=class extends g.Agent{constructor(o){super(o),this[u]={}}isSecureEndpoint(o){if(o){if(typeof o.secureEndpoint=="boolean")return o.secureEndpoint;if(typeof o.protocol=="string")return o.protocol==="https:"}let{stack:s}=new Error;return typeof s!="string"?!1:s.split(`
9
+ `).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}incrementSockets(o){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[o]||(this.sockets[o]=[]);let s=new r.Socket({writable:!1});return this.sockets[o].push(s),this.totalSocketCount++,s}decrementSockets(o,s){if(!this.sockets[o]||s===null)return;let e=this.sockets[o],t=e.indexOf(s);t!==-1&&(e.splice(t,1),this.totalSocketCount--,e.length===0&&delete this.sockets[o])}getName(o){return this.isSecureEndpoint(o)?b.Agent.prototype.getName.call(this,o):super.getName(o)}createSocket(o,s,e){let t={...s,secureEndpoint:this.isSecureEndpoint(s)},i=this.getName(t),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(o,t)).then(C=>{if(this.decrementSockets(i,a),C instanceof g.Agent)try{return C.addRequest(o,t)}catch(c){return e(c)}this[u].currentSocket=C,super.createSocket(o,s,e)},C=>{this.decrementSockets(i,a),e(C)})}createConnection(){let o=this[u].currentSocket;if(this[u].currentSocket=void 0,!o)throw new Error("No socket was returned in the `connect()` function");return o}get defaultPort(){return this[u].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(o){this[u]&&(this[u].defaultPort=o)}get protocol(){return this[u].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(o){this[u]&&(this[u].protocol=o)}};n.Agent=p}),H=_(n=>{"use strict";var m=n&&n.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:!0}),n.parseProxyResponse=void 0;var v=m(A()),d=(0,v.default)("https-proxy-agent:parse-proxy-response");function h(r){return new Promise((g,b)=>{let u=0,p=[];function o(){let a=r.read();a?i(a):r.once("readable",o)}function s(){r.removeListener("end",e),r.removeListener("error",t),r.removeListener("readable",o)}function e(){s(),d("onend"),b(new Error("Proxy connection ended before receiving CONNECT response"))}function t(a){s(),d("onerror %o",a),b(a)}function i(a){p.push(a),u+=a.length;let C=Buffer.concat(p,u),c=C.indexOf(`\r
10
+ \r
11
+ `);if(c===-1){d("have not received end of HTTP headers yet..."),o();return}let l=C.slice(0,c).toString("ascii").split(`\r
12
+ `),f=l.shift();if(!f)return r.destroy(),b(new Error("No header received from proxy CONNECT response"));let y=f.split(" "),O=+y[1],R=y.slice(2).join(" "),F={};for(let E of l){if(!E)continue;let P=E.indexOf(":");if(P===-1)return r.destroy(),b(new Error(`Invalid header from proxy CONNECT response: "${E}"`));let k=E.slice(0,P).toLowerCase(),S=E.slice(P+1).trimStart(),x=F[k];typeof x=="string"?F[k]=[x,S]:Array.isArray(x)?x.push(S):F[k]=S}d("got proxy server response: %o %o",f,F),s(),g({connect:{statusCode:O,statusText:R,headers:F},buffered:C})}r.on("error",t),r.on("end",e),o()})}n.parseProxyResponse=h}),U=_(n=>{var m=n&&n.__createBinding||(Object.create?function(c,l,f,y){y===void 0&&(y=f);var O=Object.getOwnPropertyDescriptor(l,f);(!O||("get"in O?!l.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(c,y,O)}:function(c,l,f,y){y===void 0&&(y=f),c[y]=l[f]}),v=n&&n.__setModuleDefault||(Object.create?function(c,l){Object.defineProperty(c,"default",{enumerable:!0,value:l})}:function(c,l){c.default=l}),d=n&&n.__importStar||function(c){if(c&&c.__esModule)return c;var l={};if(c!=null)for(var f in c)f!=="default"&&Object.prototype.hasOwnProperty.call(c,f)&&m(l,c,f);return v(l,c),l},h=n&&n.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(n,"__esModule",{value:!0}),n.HttpsProxyAgent=void 0;var r=d(w("net")),g=d(w("tls")),b=h(w("assert")),u=h(A()),p=D(),o=w("url"),s=H(),e=(0,u.default)("https-proxy-agent"),t=c=>c.servername===void 0&&c.host&&!r.isIP(c.host)?{...c,servername:c.host}:c,i=class extends p.Agent{constructor(c,l){super(l),this.options={path:void 0},this.proxy=typeof c=="string"?new o.URL(c):c,this.proxyHeaders=l?.headers??{},e("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let f=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),y=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...l?C(l,"headers"):null,host:f,port:y}}async connect(c,l){let{proxy:f}=this;if(!l.host)throw new TypeError('No "host" provided');let y;f.protocol==="https:"?(e("Creating `tls.Socket`: %o",this.connectOpts),y=g.connect(t(this.connectOpts))):(e("Creating `net.Socket`: %o",this.connectOpts),y=r.connect(this.connectOpts));let O=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},R=r.isIPv6(l.host)?`[${l.host}]`:l.host,F=`CONNECT ${R}:${l.port} HTTP/1.1\r
13
+ `;if(f.username||f.password){let x=`${decodeURIComponent(f.username)}:${decodeURIComponent(f.password)}`;O["Proxy-Authorization"]=`Basic ${Buffer.from(x).toString("base64")}`}O.Host=`${R}:${l.port}`,O["Proxy-Connection"]||(O["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let x of Object.keys(O))F+=`${x}: ${O[x]}\r
14
+ `;let E=(0,s.parseProxyResponse)(y);y.write(`${F}\r
15
+ `);let{connect:P,buffered:k}=await E;if(c.emit("proxyConnect",P),this.emit("proxyConnect",P,c),P.statusCode===200)return c.once("socket",a),l.secureEndpoint?(e("Upgrading socket connection to TLS"),g.connect({...C(t(l),"host","path","port"),socket:y})):y;y.destroy();let S=new r.Socket({writable:!1});return S.readable=!0,c.once("socket",x=>{e("Replaying proxy buffer for failed request"),(0,b.default)(x.listenerCount("data")>0),x.push(k),x.push(null)}),S}};i.protocols=["http","https"],n.HttpsProxyAgent=i;function a(c){c.resume()}function C(c,...l){let f={},y;for(y in c)l.includes(y)||(f[y]=c[y]);return f}}),J=U();export{J as default};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "module";
3
+ const require = __createRequire(import.meta.url);
4
+ import{b as a}from"./chunk-HHCLRZRA.js";import"./chunk-67R4GP2H.js";import"./chunk-LM633YUO.js";export default a();
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "module";
3
+ const require = __createRequire(import.meta.url);
4
+ import{$,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a as b,b as c,c as d,d as e,e as f,f as g,g as h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-RSM4LZ5P.js";import"./chunk-7W6YLS2E.js";import"./chunk-AFEFEPKR.js";import{r as a}from"./chunk-GZSLCYQ7.js";import"./chunk-HQNPMIQW.js";import"./chunk-JT3U4KNR.js";import"./chunk-HHCLRZRA.js";import"./chunk-67R4GP2H.js";import"./chunk-ORSFJVJL.js";import"./chunk-34YV5HSR.js";import"./chunk-Z3E7FIDS.js";import"./chunk-B7PRQ6ZM.js";import"./chunk-KW4N7WFX.js";import"./chunk-PFLXO7G4.js";import"./chunk-JKHKVGEC.js";import"./chunk-ETDHHU35.js";import"./chunk-LM633YUO.js";export{p as ACT_SUPPORTED_ACTIONS,f as ActionEntitySchema,P as BrowserTools,R as DataTools,Q as DebugTools,k as ExtensionRelayServer,U as LocalTestTools,m as PROMPTS,V as RESOURCES,r as RelayTools,i as SessionManager,q as SessionTools,g as StatementSchema,S as TestCaseTools,h as TestFlowSchema,$ as TestFlowTools,T as TestResultTools,j as TokenApiClient,l as ToolRegistry,a as WebAgent,x as actHandler,v as actSchema,D as clearExecutionHistoryHandler,B as clearExecutionHistorySchema,C as clearExecutionHistoryToolMeta,N as getActSchema,O as getActToolDefinition,w as getActToolMeta,Y as getActionEntitySchemaResource,M as getLocatorsHandler,K as getLocatorsSchema,L as getLocatorsToolMeta,G as getPageInfoHandler,E as getPageInfoSchema,F as getPageInfoToolMeta,n as getPrompt,_ as getResource,W as getTestFlowJsonSchemaResource,X as getTestFlowYamlSchemaResource,c as hasLlmKey,J as inspectPageHandler,H as inspectPageSchema,I as inspectPageToolMeta,b as isLlmAction,o as listPrompts,Z as listResources,e as missingApiTokenError,d as missingLlmKeyError,u as navigateHandler,s as navigateSchema,t as navigateToolMeta,A as updateVariablesHandler,y as updateVariablesSchema,z as updateVariablesToolMeta};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "module";
3
+ const require = __createRequire(import.meta.url);
4
+ import{a as N,b as O,c as P,d as Q,e as R,f as S,g as T,h as U,i as V,j as W,k as X,l as Y,m as Z,n as _,o as $,p as aa,q as ba,r as ca,s as da,t as ea,u as fa}from"./chunk-GZSLCYQ7.js";import{i as k,j as l,k as m,l as n}from"./chunk-HQNPMIQW.js";import{a as e,c as f,d as g,e as h,f as i,g as j}from"./chunk-JT3U4KNR.js";import{b as I,e as J,f as K,g as L,h as M}from"./chunk-ORSFJVJL.js";import{a as o,b as p,c as q,d as r,e as s,f as t,g as u,h as v,i as w,j as x,k as y,l as z,m as A}from"./chunk-34YV5HSR.js";import"./chunk-Z3E7FIDS.js";import"./chunk-B7PRQ6ZM.js";import{C as G,E as H}from"./chunk-KW4N7WFX.js";import{g as B,h as C,i as D,k as E,l as F}from"./chunk-PFLXO7G4.js";import{a,b,c,i as d}from"./chunk-JKHKVGEC.js";import"./chunk-ETDHHU35.js";import"./chunk-LM633YUO.js";export{H as ActionHandler,G as ActionHelper,ca as Agent,$ as AgentServices,aa as AgentStepEventTypes,ba as AgentTaskFailedError,Z as BrowserManager,v as DEFAULT_EVENT_LISTENER_LIMIT,z as DomService,u as EVENT_LISTENER_CANDIDATE_SELECTORS,A as HistoryTreeProcessor,e as INIT_SCRIPT,t as INTERACTION_EVENT_TYPES,s as INTERACTIVE_ROLES,d as LogLevel,k as LoginType,X as MCPToolProvider,I as OpenAIToolProvider,fa as SDK_VERSION,o as ToolRegistry,l as TwoFactorAuthType,n as VariableStore,ca as WebAgent,a as configureSdk,ea as createAgent,da as createAgentContext,U as createToolRegistry,V as createToolRegistryWithCapabilities,S as ensureToolsRegistered,L as evaluateStatement,K as executeStep,Y as exportMCPTools,y as filterInteractionListeners,J as generateActionStep,F as getActionEntityLocatorInfo,g as getBrowserCdpUrl,W as getCapabilitySummary,E as getFramePath,q as getModel,i as getPageInfo,h as getPageWsUrl,_ as getPlatformFromDeviceName,r as getProviderOptions,b as getSdkConfig,T as getToolRegistry,N as injectUserFunction,x as isInteractionEventType,w as isInteractiveRole,Q as loadKnowledgeMappings,P as loadKnowledges,O as loadUserFunctions,c as logger,f as newBrowserContext,R as parseSSEStream,B as pickBestLocator,C as pickBestLocatorForElement,D as pickBestLocators,m as replaceVariables,M as runTask,j as setWindowBounds,p as toolRegistry};