@nuanu-ai/agentbrowse 0.2.33 → 0.2.34

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.
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { preflightAgentpayGateway } from './agentpay-gateway.js';
7
7
  import { browseCommand, browseCommandName } from './command-name.js';
8
8
  import { loadSession } from './session.js';
9
9
  import { outputError, outputJSON, fatal, info } from './output.js';
10
- import { applyDemoProxyBootstrapFromEnv } from './solver/config.js';
10
+ import { applyDemoProxyBootstrap } from './solver/config.js';
11
11
  function usageText() {
12
12
  return `Usage: ${browseCommandName()} <command> [args] [options]
13
13
 
@@ -215,7 +215,7 @@ function requireSessionRecord() {
215
215
  };
216
216
  }
217
217
  async function main(argv = process.argv) {
218
- applyDemoProxyBootstrapFromEnv();
218
+ applyDemoProxyBootstrap();
219
219
  const parsed = getCommand(argv);
220
220
  if (!parsed)
221
221
  process.exit(1);
@@ -5,7 +5,7 @@ export declare function getConfigPath(): string;
5
5
  export declare function ensureDirs(): void;
6
6
  export declare function readConfig(): SolverConfig;
7
7
  export declare function writeConfig(config: SolverConfig): void;
8
- export declare function applyDemoProxyBootstrapFromEnv(): boolean;
8
+ export declare function applyDemoProxyBootstrap(): boolean;
9
9
  export declare function getProfileDir(profileName: string): string;
10
10
  export declare function getExistingProfileDir(profileName: string): string | null;
11
11
  export declare function getUserDataDir(profileName: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/solver/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAW/C,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAQvC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED,wBAAgB,UAAU,IAAI,YAAY,CAYzC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAGtD;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAmBxD;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUxE;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE9D"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/solver/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAW/C,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAQvC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED,wBAAgB,UAAU,IAAI,YAAY,CAYzC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAGtD;AAED,wBAAgB,uBAAuB,IAAI,OAAO,CAuBjD;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUxE;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE9D"}
@@ -8,7 +8,7 @@ const PRIMARY_CONFIG_PATH = path.join(PRIMARY_DIR, 'config.json');
8
8
  const LEGACY_CONFIG_PATH = path.join(LEGACY_DIR, 'config.json');
9
9
  const PRIMARY_PROFILES_DIR = path.join(PRIMARY_DIR, 'profiles');
10
10
  const LEGACY_PROFILES_DIR = path.join(LEGACY_DIR, 'profiles');
11
- const DEMO_PROXY_ENV = 'AGENTBROWSE_DEMO_PROXY';
11
+ const DEMO_PROXY_PLACEHOLDER = 'http://user:pass@31.98.19.10:6186/';
12
12
  export function getSolverDir() {
13
13
  return PRIMARY_DIR;
14
14
  }
@@ -46,20 +46,23 @@ export function writeConfig(config) {
46
46
  ensureDirs();
47
47
  fs.writeFileSync(PRIMARY_CONFIG_PATH, JSON.stringify(config, null, 2) + '\n', 'utf-8');
48
48
  }
49
- export function applyDemoProxyBootstrapFromEnv() {
50
- const demoProxy = process.env[DEMO_PROXY_ENV]?.trim();
51
- if (!demoProxy) {
49
+ export function applyDemoProxyBootstrap() {
50
+ const existingProxy = readConfig().defaults?.proxy;
51
+ if (typeof existingProxy === 'string' && existingProxy.trim().length > 0) {
52
52
  return false;
53
53
  }
54
- const current = readConfig();
55
- if (current.defaults?.proxy === demoProxy) {
54
+ if (existingProxy &&
55
+ typeof existingProxy === 'object' &&
56
+ typeof existingProxy.server === 'string' &&
57
+ existingProxy.server.trim().length > 0) {
56
58
  return false;
57
59
  }
60
+ const current = readConfig();
58
61
  writeConfig({
59
62
  ...current,
60
63
  defaults: {
61
64
  ...current.defaults,
62
- proxy: demoProxy,
65
+ proxy: DEMO_PROXY_PLACEHOLDER,
63
66
  },
64
67
  });
65
68
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuanu-ai/agentbrowse",
3
- "version": "0.2.33",
3
+ "version": "0.2.34",
4
4
  "type": "module",
5
5
  "description": "Browser automation CLI for AI agents: control a CDP browser, observe UI surfaces, act on refs, extract data, capture screenshots, complete protected fills, and solve captchas",
6
6
  "keywords": [