@nuanu-ai/agentbrowse 0.2.35 → 0.2.36

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.
@@ -1 +1 @@
1
- {"version":3,"file":"agentpay-gateway.d.ts","sourceRoot":"","sources":["../src/agentpay-gateway.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAiCD,wBAAgB,+BAA+B,IAAI,qBAAqB,GAAG,IAAI,CAoB9E;AAED,wBAAgB,4BAA4B,IAAI,qBAAqB,CAMpE;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAG5E;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAI/E"}
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;AAYD,wBAAgB,+BAA+B,IAAI,qBAAqB,GAAG,IAAI,CAiB9E;AAED,wBAAgB,4BAA4B,IAAI,qBAAqB,CAMpE;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAG5E;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAI/E"}
@@ -1,7 +1,4 @@
1
1
  import { readConfig } from './solver/config.js';
2
- import { readFileSync } from 'node:fs';
3
- import { homedir } from 'node:os';
4
- import { join } from 'node:path';
5
2
  const DEFAULT_AGENTPAY_API_URL = 'https://durcottggsiesxxqzvbb.supabase.co/functions/v1/api';
6
3
  function trimOrUndefined(value) {
7
4
  if (!value)
@@ -12,30 +9,12 @@ function trimOrUndefined(value) {
12
9
  function normalizeApiUrl(value) {
13
10
  return value.replace(/\/$/, '');
14
11
  }
15
- function readAgentpayCliConfig() {
16
- const primaryPath = join(homedir(), '.agentpay', 'config.json');
17
- const legacyPath = join(homedir(), '.agentpay', 'agentpay-cli', 'config.json');
18
- try {
19
- return JSON.parse(readFileSync(primaryPath, 'utf-8'));
20
- }
21
- catch {
22
- try {
23
- return JSON.parse(readFileSync(legacyPath, 'utf-8'));
24
- }
25
- catch {
26
- return {};
27
- }
28
- }
29
- }
30
12
  export function tryResolveAgentpayGatewayConfig() {
31
13
  const solverConfig = readConfig();
32
- const cliConfig = readAgentpayCliConfig();
33
14
  const apiKey = trimOrUndefined(process.env.AGENTPAY_API_KEY) ||
34
- trimOrUndefined(solverConfig.agentpay?.apiKey) ||
35
- trimOrUndefined(cliConfig.agentpay?.apiKey);
15
+ trimOrUndefined(solverConfig.agentpay?.apiKey);
36
16
  const apiUrl = trimOrUndefined(process.env.AGENTPAY_API_URL) ||
37
17
  trimOrUndefined(solverConfig.agentpay?.apiUrl) ||
38
- trimOrUndefined(cliConfig.agentpay?.apiUrl) ||
39
18
  DEFAULT_AGENTPAY_API_URL;
40
19
  if (!apiKey) {
41
20
  return null;
@@ -3,7 +3,7 @@ import os from 'node:os';
3
3
  import path from 'node:path';
4
4
  const AGENTPAY_DIR = path.join(os.homedir(), '.agentpay');
5
5
  const PRIMARY_DIR = path.join(AGENTPAY_DIR, 'agentbrowse');
6
- const PRIMARY_CONFIG_PATH = path.join(PRIMARY_DIR, 'config.json');
6
+ const PRIMARY_CONFIG_PATH = path.join(AGENTPAY_DIR, 'config.json');
7
7
  const PRIMARY_PROFILES_DIR = path.join(PRIMARY_DIR, 'profiles');
8
8
  const DEMO_PROXY_PLACEHOLDER = 'http://user:pass@31.98.19.10:6186/';
9
9
  export function getSolverDir() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuanu-ai/agentbrowse",
3
- "version": "0.2.35",
3
+ "version": "0.2.36",
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": [