@nuanu-ai/agentbrowse 0.2.48 → 0.2.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.
package/README.md CHANGED
@@ -65,6 +65,18 @@ that page. Avoid `launch` on a blank tab followed immediately by
65
65
  `start-session` and `navigate`, because the first workflow session and timeline
66
66
  will otherwise begin on the current page state, often `about:blank`.
67
67
 
68
+ `launch` is direct/proxyless by default. Add `--proxy` only when you want to
69
+ use a proxy for the current run:
70
+
71
+ ```bash
72
+ agentbrowse launch https://example.com --proxy
73
+ agentbrowse launch https://example.com --proxy http://proxy.example:8080
74
+ agentbrowse launch https://example.com --proxy=http://proxy.example:8080
75
+ ```
76
+
77
+ Bare `--proxy` uses `defaults.proxy` from the config. Passing a URL after
78
+ `--proxy` (or via `--proxy=...`) is a one-off override and does not persist it.
79
+
68
80
  If an older workflow session is still open in the persisted browser context,
69
81
  `launch` cancels that session first before replacing the browser record.
70
82
 
@@ -1 +1 @@
1
- {"version":3,"file":"agentpay-gateway.d.ts","sourceRoot":"","sources":["../src/agentpay-gateway.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAgBD,wBAAgB,+BAA+B,IAAI,qBAAqB,GAAG,IAAI,CAgB9E;AAED,wBAAgB,4BAA4B,IAAI,qBAAqB,CAMpE;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAG5E;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjF;AAED,wBAAgB,qCAAqC,CAAC,MAAM,EAAE,MAAM,EAAE,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CAE/F;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEvF;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzF;AAED,wBAAgB,qCAAqC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE/F;AAED,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,CAER;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,CAKR;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAI/E"}
@@ -1,5 +1,5 @@
1
1
  import { readConfig } from './solver/config.js';
2
- const DEFAULT_AGENTPAY_API_URL = 'https://durcottggsiesxxqzvbb.supabase.co/functions/v1/api';
2
+ import { DEFAULT_AGENTPAY_API_URL } from './generated/build-config.js';
3
3
  function trimOrUndefined(value) {
4
4
  if (!value)
5
5
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAOA,wBAAsB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBzE"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAQA,wBAAsB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BzE"}
@@ -1,4 +1,5 @@
1
1
  import { outputJSON } from '../output.js';
2
+ import { DEFAULT_AGENTPAY_API_URL } from '../generated/build-config.js';
2
3
  import { getConfigPath, readConfig, writeConfig } from '../solver/config.js';
3
4
  function normalizeApiUrl(value) {
4
5
  return value.replace(/\/$/, '');
@@ -6,13 +7,15 @@ function normalizeApiUrl(value) {
6
7
  export async function init(apiKey, apiUrl) {
7
8
  const config = readConfig();
8
9
  const normalizedApiKey = apiKey.trim();
9
- const normalizedApiUrl = apiUrl?.trim() ? normalizeApiUrl(apiUrl.trim()) : undefined;
10
+ const normalizedApiUrl = apiUrl?.trim()
11
+ ? normalizeApiUrl(apiUrl.trim())
12
+ : DEFAULT_AGENTPAY_API_URL;
10
13
  const nextConfig = {
11
14
  ...config,
12
15
  agentpay: {
13
16
  ...(config.agentpay ?? {}),
14
17
  apiKey: normalizedApiKey,
15
- ...(normalizedApiUrl ? { apiUrl: normalizedApiUrl } : {}),
18
+ apiUrl: normalizedApiUrl,
16
19
  },
17
20
  };
18
21
  writeConfig(nextConfig);
@@ -21,7 +24,7 @@ export async function init(apiKey, apiUrl) {
21
24
  configPath: getConfigPath(),
22
25
  agentpay: {
23
26
  apiKeyConfigured: true,
24
- apiUrl: normalizedApiUrl ?? null,
27
+ apiUrl: normalizedApiUrl,
25
28
  },
26
29
  });
27
30
  }
@@ -5,8 +5,8 @@ export type LaunchCliOptions = {
5
5
  compact?: boolean;
6
6
  profile?: string;
7
7
  headless?: boolean;
8
+ useProxy?: boolean;
8
9
  proxy?: string;
9
- noProxy?: boolean;
10
10
  };
11
11
  export type LaunchSuccessResult = {
12
12
  success: true;
@@ -1 +1 @@
1
- {"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../src/commands/launch.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgCH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE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;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,uBAAuB,CAAC;IAC/B,WAAW,EAAE,SAAS,CAAC;IACvB,OAAO,EAAE,wBAAwB,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAErE,wBAAsB,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAgBzF"}
@@ -27,9 +27,9 @@ export async function launch(url, opts) {
27
27
  const compact = opts?.compact ?? true;
28
28
  const profileName = opts?.profile ?? DEFAULT_PROFILE;
29
29
  const headless = opts?.headless ?? false;
30
+ const useProxy = opts?.useProxy ?? false;
30
31
  const proxyOverride = opts?.proxy;
31
- const noProxy = opts?.noProxy ?? false;
32
- return launchManaged(url, profileName, headless, compact, proxyOverride, noProxy);
32
+ return launchManaged(url, profileName, headless, compact, useProxy, proxyOverride);
33
33
  }
34
34
  async function cleanupOwnedSession(existingSession) {
35
35
  const excludePids = new Set();
@@ -158,7 +158,7 @@ function buildLaunchFailure(err) {
158
158
  reason: formatUnknownError(err),
159
159
  };
160
160
  }
161
- async function launchManaged(url, profileName, headless, compact, proxyOverride, noProxy = false) {
161
+ async function launchManaged(url, profileName, headless, compact, useProxy = false, proxyOverride) {
162
162
  let session;
163
163
  let browser = null;
164
164
  let runtimeProxy;
@@ -166,10 +166,9 @@ async function launchManaged(url, profileName, headless, compact, proxyOverride,
166
166
  const baseProfile = ensureProfile(profileName);
167
167
  const config = readConfig();
168
168
  runtimeProxy = resolveLaunchProxy({
169
- profileProxy: baseProfile.fingerprint.proxy,
170
169
  configProxy: config.defaults?.proxy,
170
+ useProxy,
171
171
  cliProxy: proxyOverride,
172
- noProxy,
173
172
  });
174
173
  const profile = withLaunchProxy(baseProfile, runtimeProxy);
175
174
  const gateway = tryResolveAgentpayGatewayConfig();
@@ -255,7 +254,7 @@ function formatUnknownError(err) {
255
254
  return String(err);
256
255
  }
257
256
  function resolveLaunchProxy(options) {
258
- if (options.noProxy) {
257
+ if (!options.useProxy) {
259
258
  return undefined;
260
259
  }
261
260
  if (options.cliProxy) {
@@ -264,10 +263,7 @@ function resolveLaunchProxy(options) {
264
263
  if (options.configProxy) {
265
264
  return normalizeProxySetting(options.configProxy);
266
265
  }
267
- if (options.profileProxy) {
268
- return normalizeProxySetting(options.profileProxy);
269
- }
270
- return undefined;
266
+ throw new Error('Proxy launch requested but no proxy is configured. Pass `--proxy <url>` or set defaults.proxy in ~/.agentpay/config.json.');
271
267
  }
272
268
  function withLaunchProxy(profile, proxy) {
273
269
  return {
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_AGENTPAY_API_URL = "https://agents-api.mercuryo.io/functions/v1/api";
2
+ //# sourceMappingURL=build-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-config.d.ts","sourceRoot":"","sources":["../../src/generated/build-config.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB,oDAAoD,CAAC"}
@@ -0,0 +1,2 @@
1
+ // Generated build config. Local development keeps the dev API by default.
2
+ export const DEFAULT_AGENTPAY_API_URL = 'https://agents-api.mercuryo.io/functions/v1/api';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAkYA,iBAAe,IAAI,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqMhE;AAED,OAAO,EAAE,IAAI,EAAE,CAAC;AAEhB,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAWzF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAoYA,iBAAe,IAAI,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoMhE;AAED,OAAO,EAAE,IAAI,EAAE,CAAC;AAEhB,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAWzF"}
package/dist/index.js CHANGED
@@ -8,7 +8,6 @@ import { browseCommand, browseCommandName } from './command-name.js';
8
8
  import { assertSemanticObserveRuntimeSupport } from './commands/semantic-observe-lexical.js';
9
9
  import { loadSession } from './session.js';
10
10
  import { outputContractFailure, outputError, outputJSON, fatal, info } from './output.js';
11
- import { applyDemoProxyBootstrap } from './solver/config.js';
12
11
  function usageText() {
13
12
  return `Usage: ${browseCommandName()} <command> [args] [options]
14
13
 
@@ -37,8 +36,7 @@ Options:
37
36
  --compact Launch browser in compact window size (1280x900, default)
38
37
  --full Launch browser in full-size window
39
38
  --profile <name> Solver profile name for launch (default: "default")
40
- --proxy <url> Launch browser through proxy for this run only
41
- --proxyless Ignore configured/profile proxy for this run only
39
+ --proxy [url] Launch through configured proxy, or use one-off override URL
42
40
  --headful Explicit alias for headful browser mode (default)
43
41
  --headless Launch browser in headless mode
44
42
  --path <file> Output path for screenshot
@@ -123,8 +121,8 @@ function parseLaunchArgs(args) {
123
121
  let compact = true;
124
122
  let profile;
125
123
  let headless = false;
124
+ let useProxy = false;
126
125
  let proxy;
127
- let noProxy = false;
128
126
  for (let i = 0; i < args.length; i++) {
129
127
  const arg = args[i];
130
128
  if (arg === '--headless') {
@@ -146,36 +144,40 @@ function parseLaunchArgs(args) {
146
144
  if (arg === '--profile') {
147
145
  const value = args[i + 1];
148
146
  if (!value || value.startsWith('--')) {
149
- outputError(`Usage: ${browseCommand('launch', '[url]', '[--profile <name>]', '[--proxy <url>|--proxyless]', '[--headful|--headless]')}`);
147
+ outputError(`Usage: ${browseCommand('launch', '[url]', '[--profile <name>]', '[--proxy [url]]', '[--headful|--headless]')}`);
150
148
  }
151
149
  profile = value;
152
150
  i += 1;
153
151
  continue;
154
152
  }
155
- if (arg === '--proxy') {
156
- const value = args[i + 1];
157
- if (!value || value.startsWith('--')) {
158
- outputError(`Usage: ${browseCommand('launch', '[url]', '[--profile <name>]', '[--proxy <url>|--proxyless]', '[--headful|--headless]')}`);
153
+ if (arg.startsWith('--proxy=')) {
154
+ const value = arg.slice('--proxy='.length).trim();
155
+ if (!value) {
156
+ outputError(`Usage: ${browseCommand('launch', '[url]', '[--profile <name>]', '[--proxy [url]]', '[--headful|--headless]')}`);
159
157
  }
158
+ useProxy = true;
160
159
  proxy = value;
161
- noProxy = false;
162
- i += 1;
163
160
  continue;
164
161
  }
165
- if (arg === '--proxyless') {
166
- proxy = undefined;
167
- noProxy = true;
162
+ if (arg === '--proxy') {
163
+ useProxy = true;
164
+ const value = args[i + 1];
165
+ const trailingPositionals = args.slice(i + 1).filter((entry) => !entry.startsWith('--'));
166
+ if (value && !value.startsWith('--') && (url || trailingPositionals.length > 1)) {
167
+ proxy = value;
168
+ i += 1;
169
+ }
168
170
  continue;
169
171
  }
170
172
  if (arg.startsWith('--')) {
171
173
  outputError(`Unknown launch option: ${arg}`);
172
174
  }
173
175
  if (url) {
174
- outputError(`Usage: ${browseCommand('launch', '[url]', '[--profile <name>]', '[--proxy <url>|--proxyless]', '[--headful|--headless]')}`);
176
+ outputError(`Usage: ${browseCommand('launch', '[url]', '[--profile <name>]', '[--proxy [url]]', '[--headful|--headless]')}`);
175
177
  }
176
178
  url = arg;
177
179
  }
178
- return { url, compact, profile, headless, proxy, noProxy };
180
+ return { url, compact, profile, headless, useProxy, proxy };
179
181
  }
180
182
  function parseCaptchaTimeout(args) {
181
183
  const timeoutRaw = getFlag(args, '--timeout');
@@ -299,7 +301,6 @@ function requireProductSessionRecord(command) {
299
301
  });
300
302
  }
301
303
  async function main(argv = process.argv) {
302
- applyDemoProxyBootstrap();
303
304
  const parsed = getCommand(argv);
304
305
  if (!parsed)
305
306
  process.exit(1);
@@ -337,8 +338,8 @@ async function main(argv = process.argv) {
337
338
  compact: launchArgs.compact,
338
339
  profile: launchArgs.profile,
339
340
  headless: launchArgs.headless,
341
+ useProxy: launchArgs.useProxy,
340
342
  proxy: launchArgs.proxy,
341
- noProxy: launchArgs.noProxy,
342
343
  });
343
344
  const updateNotice = await Promise.race([
344
345
  updateNoticePromise,
@@ -5,7 +5,6 @@ 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 applyDemoProxyBootstrap(): boolean;
9
8
  export declare function getProfileDir(profileName: string): string;
10
9
  export declare function getExistingProfileDir(profileName: string): string | null;
11
10
  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;AAQ/C,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED,wBAAgB,UAAU,IAAI,YAAY,CAOzC;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,CAMxE;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;AAO/C,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED,wBAAgB,UAAU,IAAI,YAAY,CAOzC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAGtD;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMxE;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE9D"}
@@ -5,7 +5,6 @@ const AGENTPAY_DIR = path.join(os.homedir(), '.agentpay');
5
5
  const PRIMARY_DIR = path.join(AGENTPAY_DIR, 'agentbrowse');
6
6
  const PRIMARY_CONFIG_PATH = path.join(AGENTPAY_DIR, 'config.json');
7
7
  const PRIMARY_PROFILES_DIR = path.join(PRIMARY_DIR, 'profiles');
8
- const DEMO_PROXY_PLACEHOLDER = 'http://user:pass@31.98.19.10:6186/';
9
8
  export function getSolverDir() {
10
9
  return PRIMARY_DIR;
11
10
  }
@@ -31,27 +30,6 @@ export function writeConfig(config) {
31
30
  ensureDirs();
32
31
  fs.writeFileSync(PRIMARY_CONFIG_PATH, JSON.stringify(config, null, 2) + '\n', 'utf-8');
33
32
  }
34
- export function applyDemoProxyBootstrap() {
35
- const existingProxy = readConfig().defaults?.proxy;
36
- if (typeof existingProxy === 'string' && existingProxy.trim().length > 0) {
37
- return false;
38
- }
39
- if (existingProxy &&
40
- typeof existingProxy === 'object' &&
41
- typeof existingProxy.server === 'string' &&
42
- existingProxy.server.trim().length > 0) {
43
- return false;
44
- }
45
- const current = readConfig();
46
- writeConfig({
47
- ...current,
48
- defaults: {
49
- ...current.defaults,
50
- proxy: DEMO_PROXY_PLACEHOLDER,
51
- },
52
- });
53
- return true;
54
- }
55
33
  export function getProfileDir(profileName) {
56
34
  return path.join(PRIMARY_PROFILES_DIR, profileName);
57
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuanu-ai/agentbrowse",
3
- "version": "0.2.48",
3
+ "version": "0.2.49",
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": [
@@ -41,6 +41,8 @@
41
41
  "node": ">=18.0.0"
42
42
  },
43
43
  "scripts": {
44
+ "build:config:dev": "node scripts/write-build-config.mjs https://durcottggsiesxxqzvbb.supabase.co/functions/v1/api",
45
+ "build:config:prod": "node scripts/write-build-config.mjs https://agents-api.mercuryo.io/functions/v1/api",
44
46
  "build": "node -e \"require('node:fs').rmSync('dist',{ recursive: true, force: true })\" && tsc -p tsconfig.build.json",
45
47
  "agentbrowse": "tsx src/index.ts",
46
48
  "poc:browserql": "tsx poc/browserql-execution-layer/src/cli.ts",