@proagentstore/cli 0.4.81 → 0.4.82
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.
|
@@ -113,6 +113,9 @@ const BLOCKER_WORDS = {
|
|
|
113
113
|
captcha: { noun: "a captcha", failure: "captcha" },
|
|
114
114
|
login_required: { noun: "a sign-in", failure: "login_required" },
|
|
115
115
|
access_blocked: { noun: "a bot check or access block", failure: "access_denied" },
|
|
116
|
+
// A pause like the rest (#947): an owner who subscribes can sign in to it in that browser. The run
|
|
117
|
+
// itself never gets around one — not resumed, or still paywalled after, it is reported.
|
|
118
|
+
paywall: { noun: "a paywall", failure: "paywall" },
|
|
116
119
|
};
|
|
117
120
|
/** The role and accessible name of a snapshot line holding this ref, e.g. `- link "Next" [ref=e12]`. */
|
|
118
121
|
export function refRole(snapshot, ref) {
|
|
@@ -271,9 +274,9 @@ export class BrowserBridge {
|
|
|
271
274
|
this.pages++;
|
|
272
275
|
this.noteNavigation(state);
|
|
273
276
|
const host = hostOf(state.url) ?? "";
|
|
274
|
-
// Pauses, never obstacles (#947): a captcha, a sign-in, a bot check
|
|
277
|
+
// Pauses, never obstacles (#947): a captcha, a sign-in, a bot check, an access-control page or a paywall is
|
|
275
278
|
// for a PERSON in the browser on this machine — the run waits, and re-checks once resumed.
|
|
276
|
-
const blocker = state.captcha ? "captcha" : state.login ? "login_required" : state.accessBlocked ? "access_blocked" : null;
|
|
279
|
+
const blocker = state.captcha ? "captcha" : state.login ? "login_required" : state.accessBlocked ? "access_blocked" : state.paywall ? "paywall" : null;
|
|
277
280
|
if (blocker) {
|
|
278
281
|
const what = BLOCKER_WORDS[blocker];
|
|
279
282
|
this.host.emit({ type: "browser.blocked", url: state.url, domain: host, detail: { reason: blocker } });
|
|
@@ -281,7 +284,7 @@ export class BrowserBridge {
|
|
|
281
284
|
if (outcome !== "resumed")
|
|
282
285
|
return text(`${host} needs a person (${what.noun}) and nobody resolved it. Record it with report_source_failure (${what.failure}) and move on.`, true);
|
|
283
286
|
const after = await this.inspect();
|
|
284
|
-
if (after && (after.captcha || after.login || after.accessBlocked))
|
|
287
|
+
if (after && (after.captcha || after.login || after.accessBlocked || after.paywall))
|
|
285
288
|
return text(`${host} still shows ${what.noun}. Record it with report_source_failure (${what.failure}) and move on.`, true);
|
|
286
289
|
return text(`Resumed after the owner handled ${host}. Take a browser_snapshot to read the page.`);
|
|
287
290
|
}
|
|
@@ -297,10 +300,6 @@ export class BrowserBridge {
|
|
|
297
300
|
}
|
|
298
301
|
return text("The owner let the run read this page. It is still research only: nothing here can be filled, submitted or uploaded. Take a browser_snapshot to read it.");
|
|
299
302
|
}
|
|
300
|
-
if (state.paywall) {
|
|
301
|
-
this.host.emit({ type: "browser.blocked", url: state.url, domain: host, detail: { reason: "paywall" } });
|
|
302
|
-
return text(`${host} is behind a paywall. Do not try to get around it: record it with report_source_failure (paywall) and move on.`, true);
|
|
303
|
-
}
|
|
304
303
|
return text(toolText);
|
|
305
304
|
}
|
|
306
305
|
noteNavigation(state) {
|