aurix-ai 2.9.1 → 2.9.6

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"McpToolAdapter.js","sourceRoot":"","sources":["../../src/mcp/McpToolAdapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,MAAM,UAAU,aAAa,CAAC,UAAkB,EAAE,MAAqB;IACrE,OAAO;QACL,IAAI,EAAE,OAAO,UAAU,IAAI,MAAM,CAAC,IAAI,EAAE;QACxC,WAAW,EAAE,QAAQ,UAAU,KAAK,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,IAAI,EAAE;QACvE,UAAU,EAAE,MAAM,CAAC,WAAsC;QACzD,KAAK,CAAC,OAAO,CAAC,IAAI;YAChB,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAChD,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBAC/B,OAAO,sBAAsB,UAAU,2CAA2C,CAAC;YACrF,CAAC;YACD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBACxD,IAAI,OAAO,MAAM,KAAK,QAAQ;oBAAE,OAAO,MAAM,CAAC;gBAC9C,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;oBACzC,MAAM,CAAC,GAAG,MAAiC,CAAC;oBAC5C,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;wBACd,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;4BAC7B,OAAO,CAAC,CAAC,OAAO;iCACb,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MA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C;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Browser.d.ts","sourceRoot":"","sources":["../../src/tools/Browser.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAkD1C,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AA6WD,eAAO,MAAM,WAAW,EAAE,IAk1EzB,CAAC"}
1
+ {"version":3,"file":"Browser.d.ts","sourceRoot":"","sources":["../../src/tools/Browser.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAkD1C,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAmXD,eAAO,MAAM,WAAW,EAAE,IAw1EzB,CAAC"}
@@ -1,6 +1,21 @@
1
1
  import { launchPersistentContext, ensureBinary } from 'cloakbrowser';
2
2
  import { homedir } from 'os';
3
3
  import { join } from 'path';
4
+ // Windows: monkey-patch child_process.spawn to strip --no-sandbox from
5
+ // ALL Chromium launches. The flag comes from the cloakbrowser binary
6
+ // defaults or Playwright internals — not from our explicit args.
7
+ // On Windows Chromium, --no-sandbox triggers an "unsupported flag" warning
8
+ // and can cause silent navigation failures (about:blank).
9
+ if (process.platform === 'win32') {
10
+ const cp = await import('child_process');
11
+ const origSpawn = cp.spawn;
12
+ cp.spawn = function patchedSpawn(cmd, args, opts) {
13
+ if (args && Array.isArray(args) && typeof cmd === 'string' && /chrom/i.test(cmd)) {
14
+ args = args.filter(a => !a.startsWith('--no-sandbox') && !a.startsWith('--disable-setuid-sandbox'));
15
+ }
16
+ return origSpawn.call(this, cmd, args, opts);
17
+ };
18
+ }
4
19
  import { loadConfig } from '../agent/Config.js';
5
20
  import { visionClassify, readFileBase64, findGridTiles, humanClick, humanMove, humanHold, warmupBehavior, solveCaptchaGrid, autoSolveCaptcha, analyzeImageChallenge, _lastGridAnalyzeTime, bezierPoint, easeInOut, } from './captcha/index.js';
6
21
  function ok(msg, details) {
@@ -209,12 +224,18 @@ async function ensureBrowser() {
209
224
  '--fingerprint-webrtc-ip=auto',
210
225
  ];
211
226
  if (process.platform === 'win32') {
212
- // Strip --no-sandbox on Windows — it's invalid on Windows Chromium
213
- // and causes silent navigation failures (page stuck at about:blank).
214
- return base.filter(a => !a.startsWith('--no-sandbox'));
227
+ return base.filter(a => !a.startsWith('--no-sandbox') && !a.startsWith('--disable-setuid-sandbox'));
215
228
  }
216
229
  return base;
217
230
  })(),
231
+ // Override cloakbrowser's hardcoded ignoreDefaultArgs on Windows:
232
+ // add --no-sandbox to the strip list so Playwright removes it from
233
+ // its own Chromium defaults before launching.
234
+ ...(process.platform === 'win32' ? {
235
+ launchOptions: {
236
+ ignoreDefaultArgs: ['--enable-automation', '--enable-unsafe-swiftshader', '--no-sandbox', '--disable-setuid-sandbox'],
237
+ },
238
+ } : {}),
218
239
  };
219
240
  const parts = activeProxy.split(':');
220
241
  if (parts.length >= 2) {
@@ -561,21 +582,29 @@ Sessions: session="a"/"b"/"c" for parallel browsers. proxy="host:port:user:pass"
561
582
  return 'Error: navigate requires a URL (use value or target parameter)';
562
583
  const fullUrl = url.startsWith('http') ? url : `https://${url}`;
563
584
  await p.goto(fullUrl, { waitUntil: 'domcontentloaded', timeout });
564
- // Detect silent navigation failure — page stuck at about:blank.
565
- // Common on Windows when --no-sandbox or custom --fingerprint
566
- // flags cause Chromium to refuse to navigate. Retry with 'load'
567
- // before giving up.
568
585
  if (p.url() === 'about:blank') {
569
586
  try {
570
587
  await p.goto(fullUrl, { waitUntil: 'load', timeout: timeout * 2 });
571
588
  }
572
- catch (e) {
573
- const proxyUsed = browserProxy || pickRandomProxy();
574
- return err(`Navigation failed — page stayed at about:blank after retry`, `Possible causes:\n 1. cloakbrowser binary not installed (run: npm rebuild cloakbrowser)\n 2. Proxy unreachable (${proxyUsed || 'none'})\n 3. URL unreachable (${fullUrl})\n 4. Windows: check if cloakbrowser Chromium is actually running (not Playwright stock Chromium)`);
589
+ catch { }
590
+ }
591
+ if (p.url() === 'about:blank') {
592
+ try {
593
+ await p.goto(fullUrl, { waitUntil: 'networkidle', timeout: timeout * 3 });
575
594
  }
576
- if (p.url() === 'about:blank') {
577
- return err(`Navigation failed — page stayed at about:blank`, `cloakbrowser likely fell back to stock Chromium on Windows. Try: npm rebuild cloakbrowser`);
595
+ catch { }
596
+ }
597
+ if (p.url() === 'about:blank') {
598
+ const activeProxy = browserProxy || pickRandomProxy();
599
+ const hints = [
600
+ `Proxy: ${activeProxy || 'none'}`,
601
+ `Target: ${fullUrl}`,
602
+ `Platform: ${process.platform}`,
603
+ ];
604
+ if (process.platform === 'win32') {
605
+ hints.push('Hint: run "npm rebuild cloakbrowser" to re-download the Chromium binary');
578
606
  }
607
+ return err(`Navigation failed — page stayed at about:blank after 3 attempts`, `Possible causes:\n 1. cloakbrowser binary not installed (run: npm rebuild cloakbrowser)\n 2. Proxy unreachable (${activeProxy || 'none'})\n 3. URL unreachable (${fullUrl})\n 4. ${process.platform === 'win32' ? 'cloakbrowser Chromium binary mismatch on Windows' : 'Network or DNS issue'}`);
579
608
  }
580
609
  const title = await p.title();
581
610
  return `Navigated to: ${p.url()}\nTitle: ${title}`;