@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 +12 -0
- package/dist/agentpay-gateway.d.ts.map +1 -1
- package/dist/agentpay-gateway.js +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +6 -3
- package/dist/commands/launch.d.ts +1 -1
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +6 -10
- package/dist/generated/build-config.d.ts +2 -0
- package/dist/generated/build-config.d.ts.map +1 -0
- package/dist/generated/build-config.js +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -18
- package/dist/solver/config.d.ts +0 -1
- package/dist/solver/config.d.ts.map +1 -1
- package/dist/solver/config.js +0 -22
- package/package.json +3 -1
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":"
|
|
1
|
+
{"version":3,"file":"agentpay-gateway.d.ts","sourceRoot":"","sources":["../src/agentpay-gateway.ts"],"names":[],"mappings":"AAGA,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,SAAS,EAAE,MAAM,GAAG,MAAM,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"}
|
package/dist/agentpay-gateway.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readConfig } from './solver/config.js';
|
|
2
|
-
|
|
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":"
|
|
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"}
|
package/dist/commands/init.js
CHANGED
|
@@ -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()
|
|
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
|
-
|
|
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
|
|
27
|
+
apiUrl: normalizedApiUrl,
|
|
25
28
|
},
|
|
26
29
|
});
|
|
27
30
|
}
|
|
@@ -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,
|
|
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,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;IACnB,mBAAmB,EAAE,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;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"}
|
package/dist/commands/launch.js
CHANGED
|
@@ -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
|
-
|
|
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,
|
|
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.
|
|
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
|
-
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"build-config.d.ts","sourceRoot":"","sources":["../../src/generated/build-config.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB,oDAAoD,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
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
|
|
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
|
|
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
|
|
156
|
-
const value =
|
|
157
|
-
if (!value
|
|
158
|
-
outputError(`Usage: ${browseCommand('launch', '[url]', '[--profile <name>]', '[--proxy
|
|
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 === '--
|
|
166
|
-
|
|
167
|
-
|
|
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
|
|
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,
|
|
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,
|
package/dist/solver/config.d.ts
CHANGED
|
@@ -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;
|
|
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"}
|
package/dist/solver/config.js
CHANGED
|
@@ -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.
|
|
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",
|