unbrowse 3.7.0-preview.3 → 3.7.0-preview.4
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/cli.js +47 -17
- package/dist/mcp.js +4 -4
- package/dist/server.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ var __promiseAll = (args) => Promise.all(args);
|
|
|
31
31
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
32
32
|
|
|
33
33
|
// ../../src/build-info.generated.ts
|
|
34
|
-
var BUILD_RELEASE_VERSION = "3.7.0-preview.
|
|
34
|
+
var BUILD_RELEASE_VERSION = "3.7.0-preview.4", BUILD_GIT_SHA = "989697af2dfd", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMy43LjAtcHJldmlldy40IiwiZ2l0X3NoYSI6Ijk4OTY5N2FmMmRmZCIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFAOTg5Njk3YWYyZGZkIiwiaXNzdWVkX2F0IjoiMjAyNi0wNC0xMFQwODoxMTowOS40MzRaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "F2X5UWb9JvjD7-NVKq9uOeZ3Alwpjhxs5as_-YGmjl4", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai";
|
|
35
35
|
|
|
36
36
|
// ../../src/version.ts
|
|
37
37
|
import { createHash } from "crypto";
|
|
@@ -3375,43 +3375,59 @@ async function bootstrapAgentMailKey() {
|
|
|
3375
3375
|
let currentUrl = await getCurrentUrl(tabId);
|
|
3376
3376
|
let onDashboard = typeof currentUrl === "string" && currentUrl.includes("/dashboard");
|
|
3377
3377
|
if (!onDashboard) {
|
|
3378
|
-
log("bootstrap-agentmail", "not logged in — looking for
|
|
3379
|
-
const
|
|
3380
|
-
// Clerk
|
|
3378
|
+
log("bootstrap-agentmail", "not logged in — looking for social OAuth");
|
|
3379
|
+
const clickResult = await evaluate(tabId, `(() => {
|
|
3380
|
+
// Clerk's social button class pattern
|
|
3381
|
+
const socialBtns = document.querySelectorAll('.cl-socialButtonsBlockButton, [data-provider]');
|
|
3382
|
+
for (const btn of socialBtns) {
|
|
3383
|
+
const text = (btn.textContent || '').toLowerCase();
|
|
3384
|
+
const provider = btn.getAttribute('data-provider') || '';
|
|
3385
|
+
// Match any social provider — Google, GitHub, etc.
|
|
3386
|
+
if (text || provider) {
|
|
3387
|
+
btn.click();
|
|
3388
|
+
return 'clicked:' + (provider || text.slice(0, 20));
|
|
3389
|
+
}
|
|
3390
|
+
}
|
|
3391
|
+
// Fallback: look for any button with a known OAuth provider name
|
|
3381
3392
|
const btns = document.querySelectorAll('button, a');
|
|
3382
3393
|
for (const btn of btns) {
|
|
3383
3394
|
const text = (btn.textContent || '').toLowerCase();
|
|
3384
|
-
|
|
3385
|
-
if (text.includes('github') || ariaLabel.includes('github') ||
|
|
3386
|
-
btn.querySelector('img[alt*="github" i], svg[aria-label*="github" i]')) {
|
|
3395
|
+
if (text.includes('google') || text.includes('github') || text.includes('continue with')) {
|
|
3387
3396
|
btn.click();
|
|
3388
|
-
return 'clicked';
|
|
3397
|
+
return 'clicked:' + text.slice(0, 30);
|
|
3389
3398
|
}
|
|
3390
3399
|
}
|
|
3391
|
-
// Also check for social login containers
|
|
3392
|
-
const social = document.querySelector('.cl-socialButtonsBlockButton__github, [data-provider="github"]');
|
|
3393
|
-
if (social) { social.click(); return 'clicked'; }
|
|
3394
3400
|
return 'not_found';
|
|
3395
3401
|
})()`);
|
|
3396
|
-
|
|
3397
|
-
|
|
3402
|
+
const clickStr = typeof clickResult === "string" ? clickResult : String(clickResult);
|
|
3403
|
+
log("bootstrap-agentmail", `social button result: ${clickStr}`);
|
|
3404
|
+
if (clickStr.startsWith("clicked")) {
|
|
3405
|
+
log("bootstrap-agentmail", "clicked social OAuth — waiting for redirect");
|
|
3398
3406
|
const start2 = Date.now();
|
|
3399
3407
|
while (Date.now() - start2 < AUTH_TIMEOUT_MS) {
|
|
3400
3408
|
await new Promise((r) => setTimeout(r, 2000));
|
|
3401
3409
|
currentUrl = await getCurrentUrl(tabId);
|
|
3402
3410
|
if (typeof currentUrl === "string" && currentUrl.includes("/dashboard")) {
|
|
3403
3411
|
onDashboard = true;
|
|
3404
|
-
log("bootstrap-agentmail", "
|
|
3412
|
+
log("bootstrap-agentmail", "OAuth completed — on dashboard");
|
|
3405
3413
|
break;
|
|
3406
3414
|
}
|
|
3407
3415
|
}
|
|
3408
3416
|
}
|
|
3409
3417
|
if (!onDashboard) {
|
|
3410
3418
|
log("bootstrap-agentmail", "could not auto-login — manual setup needed");
|
|
3419
|
+
const pageInfo = await evaluate(tabId, `JSON.stringify({
|
|
3420
|
+
url: window.location.href,
|
|
3421
|
+
title: document.title,
|
|
3422
|
+
visible_buttons: Array.from(document.querySelectorAll('button,a'))
|
|
3423
|
+
.map(e => (e.textContent || '').trim().slice(0, 30))
|
|
3424
|
+
.filter(t => t)
|
|
3425
|
+
.slice(0, 10),
|
|
3426
|
+
})`).catch(() => "{}");
|
|
3411
3427
|
return {
|
|
3412
3428
|
success: false,
|
|
3413
3429
|
method: "manual",
|
|
3414
|
-
error:
|
|
3430
|
+
error: `Could not auto-login to AgentMail console. Page state: ${pageInfo}. Sign up at https://console.agentmail.to and create an API key manually, then: export AGENTMAIL_API_KEY=<key>`
|
|
3415
3431
|
};
|
|
3416
3432
|
}
|
|
3417
3433
|
}
|
|
@@ -7603,8 +7619,22 @@ async function cmdLoginAuto(args, flags) {
|
|
|
7603
7619
|
}
|
|
7604
7620
|
})();
|
|
7605
7621
|
const { autonomousEmailLogin: autonomousEmailLogin3, isAgentMailAvailable: isAgentMailAvailable3 } = await init_agent_mail2().then(() => exports_agent_mail2);
|
|
7606
|
-
if (!isAgentMailAvailable3())
|
|
7607
|
-
|
|
7622
|
+
if (!isAgentMailAvailable3()) {
|
|
7623
|
+
info(`[login-auto] AGENTMAIL_API_KEY not set \u2014 attempting auto-bootstrap via console.agentmail.to`);
|
|
7624
|
+
try {
|
|
7625
|
+
const { bootstrapAgentMailKey: bootstrapAgentMailKey2 } = await init_bootstrap_agentmail().then(() => exports_bootstrap_agentmail);
|
|
7626
|
+
const bootstrap = await bootstrapAgentMailKey2();
|
|
7627
|
+
if (bootstrap.success && bootstrap.api_key) {
|
|
7628
|
+
process.env.AGENTMAIL_API_KEY = bootstrap.api_key;
|
|
7629
|
+
info(`[login-auto] bootstrapped AgentMail key via ${bootstrap.method ?? "browser"}`);
|
|
7630
|
+
} else {
|
|
7631
|
+
return die(`AGENTMAIL_API_KEY not set and bootstrap failed: ${bootstrap.error ?? "unknown"}. Get a key at https://agentmail.to and run: export AGENTMAIL_API_KEY=<key>`);
|
|
7632
|
+
}
|
|
7633
|
+
} catch (err) {
|
|
7634
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
7635
|
+
return die(`AGENTMAIL_API_KEY not set and bootstrap errored: ${msg}. Get a key at https://agentmail.to and run: export AGENTMAIL_API_KEY=<key>`);
|
|
7636
|
+
}
|
|
7637
|
+
}
|
|
7608
7638
|
info(`[login-auto] creating agent email for ${domain}...`);
|
|
7609
7639
|
const session = await autonomousEmailLogin3(domain);
|
|
7610
7640
|
info(`[login-auto] email: ${session.email}`);
|
package/dist/mcp.js
CHANGED
|
@@ -225,11 +225,11 @@ import { dirname, join, parse } from "path";
|
|
|
225
225
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
226
226
|
|
|
227
227
|
// ../../src/build-info.generated.ts
|
|
228
|
-
var BUILD_RELEASE_VERSION = "3.7.0-preview.
|
|
229
|
-
var BUILD_GIT_SHA = "
|
|
228
|
+
var BUILD_RELEASE_VERSION = "3.7.0-preview.4";
|
|
229
|
+
var BUILD_GIT_SHA = "989697af2dfd";
|
|
230
230
|
var BUILD_CODE_HASH = "5d9ebf619c61";
|
|
231
|
-
var BUILD_RELEASE_MANIFEST_BASE64 = "
|
|
232
|
-
var BUILD_RELEASE_MANIFEST_SIGNATURE = "
|
|
231
|
+
var BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMy43LjAtcHJldmlldy40IiwiZ2l0X3NoYSI6Ijk4OTY5N2FmMmRmZCIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFAOTg5Njk3YWYyZGZkIiwiaXNzdWVkX2F0IjoiMjAyNi0wNC0xMFQwODoxMTowOS40MzRaIn0";
|
|
232
|
+
var BUILD_RELEASE_MANIFEST_SIGNATURE = "F2X5UWb9JvjD7-NVKq9uOeZ3Alwpjhxs5as_-YGmjl4";
|
|
233
233
|
var BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai";
|
|
234
234
|
|
|
235
235
|
// ../../src/version.ts
|
package/dist/server.js
CHANGED
|
@@ -7120,7 +7120,7 @@ var init_capture = __esm(async () => {
|
|
|
7120
7120
|
});
|
|
7121
7121
|
|
|
7122
7122
|
// ../../src/build-info.generated.ts
|
|
7123
|
-
var BUILD_RELEASE_VERSION = "3.7.0-preview.
|
|
7123
|
+
var BUILD_RELEASE_VERSION = "3.7.0-preview.4", BUILD_GIT_SHA = "989697af2dfd", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMy43LjAtcHJldmlldy40IiwiZ2l0X3NoYSI6Ijk4OTY5N2FmMmRmZCIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFAOTg5Njk3YWYyZGZkIiwiaXNzdWVkX2F0IjoiMjAyNi0wNC0xMFQwODoxMTowOS40MzRaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "F2X5UWb9JvjD7-NVKq9uOeZ3Alwpjhxs5as_-YGmjl4", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai";
|
|
7124
7124
|
|
|
7125
7125
|
// ../../src/version.ts
|
|
7126
7126
|
import { createHash as createHash2 } from "crypto";
|
package/package.json
CHANGED