@enricai/barnacle 1.12.75 → 1.12.77
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/scraper/flow-runner.d.ts.map +1 -1
- package/dist/scraper/flow-runner.js +5 -2
- package/dist/scraper/flow-runner.js.map +1 -1
- package/dist/scraper/phantom-click.d.ts +38 -0
- package/dist/scraper/phantom-click.d.ts.map +1 -1
- package/dist/scraper/phantom-click.js +112 -2
- package/dist/scraper/phantom-click.js.map +1 -1
- package/dist/scripts/recon-browser.d.ts +4 -1
- package/dist/scripts/recon-browser.d.ts.map +1 -1
- package/dist/scripts/recon-browser.js +7 -13
- package/dist/scripts/recon-browser.js.map +1 -1
- package/dist/scripts/recon-generate.d.ts +53 -2
- package/dist/scripts/recon-generate.d.ts.map +1 -1
- package/dist/scripts/recon-generate.js +415 -21
- package/dist/scripts/recon-generate.js.map +1 -1
- package/package.json +2 -2
|
@@ -39,6 +39,14 @@ export interface PhantomClickAttempt {
|
|
|
39
39
|
* so non-submit callers and existing tests are unchanged; defaults to false.
|
|
40
40
|
*/
|
|
41
41
|
isSubmitShapedStep?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Mirrors flow-runner's own `isPlausibleStepDestination` gate on its
|
|
44
|
+
* `urlChanged`/`retryUrlChanged` signals: false when the post-URL landed
|
|
45
|
+
* on a destination (e.g. a sign-in gate) that doesn't plausibly
|
|
46
|
+
* corroborate the step's own instruction. Optional so callers/tests that
|
|
47
|
+
* don't supply it default to true (no veto), matching today's behavior.
|
|
48
|
+
*/
|
|
49
|
+
destinationPlausible?: boolean;
|
|
42
50
|
}
|
|
43
51
|
/**
|
|
44
52
|
* Credits a navigation as real only when origin or pathname actually
|
|
@@ -48,6 +56,36 @@ export interface PhantomClickAttempt {
|
|
|
48
56
|
* counts as a genuine navigation.
|
|
49
57
|
*/
|
|
50
58
|
export declare function hasOriginOrPathChanged(preUrl: string, postUrl: string): boolean;
|
|
59
|
+
/** Word-boundary phrase patterns identifying a sign-in/log-in step. */
|
|
60
|
+
export declare const SIGN_IN_PATTERNS: RegExp[];
|
|
61
|
+
/**
|
|
62
|
+
* Splits a step instruction into its comma/"to"/"and"-delimited clauses and
|
|
63
|
+
* keeps only the ones containing a recognized imperative action verb, so
|
|
64
|
+
* pattern matching (e.g. {@link SIGN_IN_PATTERNS}) targets the step's own
|
|
65
|
+
* action rather than descriptive context that merely mentions a page element.
|
|
66
|
+
* Falls back to every clause when none carry a recognized verb, preserving
|
|
67
|
+
* today's conservative whole-text behavior for unparseable instruction shapes
|
|
68
|
+
* rather than silently passing. Exported so other sign-in-shaped-instruction
|
|
69
|
+
* checks (e.g. bugfix-002) can reuse the same clause isolation. Does not split
|
|
70
|
+
* on " to " when it directly follows a {@link TO_COMPLEMENT_VERBS} verb, so
|
|
71
|
+
* "navigate to the sign in page" stays one clause instead of stranding "the
|
|
72
|
+
* sign in page" apart from its governing verb.
|
|
73
|
+
*/
|
|
74
|
+
export declare function splitIntoActionClauses(instruction: string): string[];
|
|
75
|
+
/**
|
|
76
|
+
* Gates whether a landed destination plausibly corroborates a step's own
|
|
77
|
+
* instruction, so a URL change alone is never enough to credit advancement:
|
|
78
|
+
* if the destination is sign-in-shaped but the step itself wasn't about
|
|
79
|
+
* signing in, the page bounced back to an auth gate rather than advancing.
|
|
80
|
+
* Matches {@link SIGN_IN_PATTERNS} only against the instruction's own
|
|
81
|
+
* action clause(s) (see {@link splitIntoActionClauses}), so a step whose
|
|
82
|
+
* surrounding descriptive text merely mentions a sign-in form isn't
|
|
83
|
+
* mistaken for a step that is itself about signing in. Fails open (returns
|
|
84
|
+
* true) on an unparseable postUrl, matching {@link hasOriginOrPathChanged}'s
|
|
85
|
+
* own try/catch style, since an unparseable URL gives no basis for a
|
|
86
|
+
* sign-in-shaped veto.
|
|
87
|
+
*/
|
|
88
|
+
export declare function isPlausibleStepDestination(stepInstruction: string, postUrl: string): boolean;
|
|
51
89
|
export type PhantomClickVerdict =
|
|
52
90
|
/** Stagehand reported success but pre/post shows no observable effect — a no-op click. */
|
|
53
91
|
"phantom"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phantom-click.d.ts","sourceRoot":"","sources":["../../src/scraper/phantom-click.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,qFAAqF;AACrF,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,yEAAyE;IACzE,gBAAgB,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,GAAG,EAAE,oBAAoB,CAAC;IAC1B,IAAI,EAAE,oBAAoB,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"phantom-click.d.ts","sourceRoot":"","sources":["../../src/scraper/phantom-click.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,qFAAqF;AACrF,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,yEAAyE;IACzE,gBAAgB,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,GAAG,EAAE,oBAAoB,CAAC;IAC1B,IAAI,EAAE,oBAAoB,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAWD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAE/E;AAED,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,UAA0C,CAAC;AAwDxE;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAapE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAa5F;AAED,MAAM,MAAM,mBAAmB;AAC7B,0FAA0F;AACxF,SAAS;AACX,mEAAmE;GACjE,WAAW;AACb,kKAAkK;GAChK,YAAY,CAAC;AAEjB;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,mBAAmB,GAAG,mBAAmB,CA2BtF"}
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
* same way (see recon-submit-phantom-click bug report).
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.TRIVIAL_DOM_DELTA_BYTES = void 0;
|
|
10
|
+
exports.TRIVIAL_DOM_DELTA_BYTES = exports.SIGN_IN_PATTERNS = void 0;
|
|
11
11
|
exports.hasOriginOrPathChanged = hasOriginOrPathChanged;
|
|
12
|
+
exports.splitIntoActionClauses = splitIntoActionClauses;
|
|
13
|
+
exports.isPlausibleStepDestination = isPlausibleStepDestination;
|
|
12
14
|
exports.classifyPhantomClick = classifyPhantomClick;
|
|
13
15
|
function originAndPathOf(url) {
|
|
14
16
|
try {
|
|
@@ -29,6 +31,113 @@ function originAndPathOf(url) {
|
|
|
29
31
|
function hasOriginOrPathChanged(preUrl, postUrl) {
|
|
30
32
|
return originAndPathOf(preUrl) !== originAndPathOf(postUrl);
|
|
31
33
|
}
|
|
34
|
+
/** Word-boundary phrase patterns identifying a sign-in/log-in step. */
|
|
35
|
+
exports.SIGN_IN_PATTERNS = [/\bsign[\s-]?in\b/, /\blog[\s-]?in\b/];
|
|
36
|
+
/** Collapses whitespace and lowercases, so instruction text compares consistently against {@link SIGN_IN_PATTERNS}. */
|
|
37
|
+
function normalizeForPatternMatch(instruction) {
|
|
38
|
+
return instruction.replace(/\s+/g, " ").trim().toLowerCase();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Closed list of recognized step-instruction imperative verbs, mirroring the
|
|
42
|
+
* closed-list style of recon-browser.ts's ACCOUNT_CREATION_PATTERNS/
|
|
43
|
+
* SUBMIT_SHAPED_INSTRUCTION_PATTERNS, used to isolate a step instruction's
|
|
44
|
+
* own action clause(s) from surrounding descriptive context.
|
|
45
|
+
*/
|
|
46
|
+
const STEP_ACTION_VERBS = [
|
|
47
|
+
"click",
|
|
48
|
+
"tap",
|
|
49
|
+
"press",
|
|
50
|
+
"select",
|
|
51
|
+
"choose",
|
|
52
|
+
"check",
|
|
53
|
+
"uncheck",
|
|
54
|
+
"toggle",
|
|
55
|
+
"fill",
|
|
56
|
+
"type",
|
|
57
|
+
"enter",
|
|
58
|
+
"input",
|
|
59
|
+
"upload",
|
|
60
|
+
"attach",
|
|
61
|
+
"drag",
|
|
62
|
+
"drop",
|
|
63
|
+
"scroll",
|
|
64
|
+
"submit",
|
|
65
|
+
"switch",
|
|
66
|
+
"navigate",
|
|
67
|
+
"open",
|
|
68
|
+
"expand",
|
|
69
|
+
"collapse",
|
|
70
|
+
"confirm",
|
|
71
|
+
"agree",
|
|
72
|
+
"accept",
|
|
73
|
+
"continue",
|
|
74
|
+
];
|
|
75
|
+
const STEP_ACTION_VERB_PATTERN = new RegExp(`\\b(?:${STEP_ACTION_VERBS.join("|")})\\b`);
|
|
76
|
+
/**
|
|
77
|
+
* Verbs whose own direct complement is introduced by "to" (e.g. "navigate to
|
|
78
|
+
* the sign in page"), so splitting on " to " must NOT sever them from that
|
|
79
|
+
* complement the way it severs e.g. "click sign in to continue" into
|
|
80
|
+
* independent clauses — doing so would strand the verb's own target text
|
|
81
|
+
* (which is where a sign-in-shaped match actually lives) in a clause with no
|
|
82
|
+
* recognized action verb, and {@link splitIntoActionClauses} would then
|
|
83
|
+
* discard it as non-action descriptive context.
|
|
84
|
+
*/
|
|
85
|
+
const TO_COMPLEMENT_VERBS = ["navigate", "go", "switch", "scroll", "open", "proceed"];
|
|
86
|
+
/**
|
|
87
|
+
* Splits a step instruction into its comma/"to"/"and"-delimited clauses and
|
|
88
|
+
* keeps only the ones containing a recognized imperative action verb, so
|
|
89
|
+
* pattern matching (e.g. {@link SIGN_IN_PATTERNS}) targets the step's own
|
|
90
|
+
* action rather than descriptive context that merely mentions a page element.
|
|
91
|
+
* Falls back to every clause when none carry a recognized verb, preserving
|
|
92
|
+
* today's conservative whole-text behavior for unparseable instruction shapes
|
|
93
|
+
* rather than silently passing. Exported so other sign-in-shaped-instruction
|
|
94
|
+
* checks (e.g. bugfix-002) can reuse the same clause isolation. Does not split
|
|
95
|
+
* on " to " when it directly follows a {@link TO_COMPLEMENT_VERBS} verb, so
|
|
96
|
+
* "navigate to the sign in page" stays one clause instead of stranding "the
|
|
97
|
+
* sign in page" apart from its governing verb.
|
|
98
|
+
*/
|
|
99
|
+
function splitIntoActionClauses(instruction) {
|
|
100
|
+
const normalized = normalizeForPatternMatch(instruction);
|
|
101
|
+
const toComplementPattern = new RegExp(`\\b(?:${TO_COMPLEMENT_VERBS.join("|")}) to `);
|
|
102
|
+
const toPlaceholder = "__BARNACLE_TO__";
|
|
103
|
+
const protectedText = normalized.replace(toComplementPattern, (match) => match.replace(" to ", ` ${toPlaceholder} `));
|
|
104
|
+
const clauses = protectedText
|
|
105
|
+
.split(/,| (?:to|and) /)
|
|
106
|
+
.map((clause) => clause.trim().replace(toPlaceholder, "to"))
|
|
107
|
+
.filter((clause) => clause.length > 0);
|
|
108
|
+
const actionClauses = clauses.filter((clause) => STEP_ACTION_VERB_PATTERN.test(clause));
|
|
109
|
+
return actionClauses.length > 0 ? actionClauses : clauses;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Gates whether a landed destination plausibly corroborates a step's own
|
|
113
|
+
* instruction, so a URL change alone is never enough to credit advancement:
|
|
114
|
+
* if the destination is sign-in-shaped but the step itself wasn't about
|
|
115
|
+
* signing in, the page bounced back to an auth gate rather than advancing.
|
|
116
|
+
* Matches {@link SIGN_IN_PATTERNS} only against the instruction's own
|
|
117
|
+
* action clause(s) (see {@link splitIntoActionClauses}), so a step whose
|
|
118
|
+
* surrounding descriptive text merely mentions a sign-in form isn't
|
|
119
|
+
* mistaken for a step that is itself about signing in. Fails open (returns
|
|
120
|
+
* true) on an unparseable postUrl, matching {@link hasOriginOrPathChanged}'s
|
|
121
|
+
* own try/catch style, since an unparseable URL gives no basis for a
|
|
122
|
+
* sign-in-shaped veto.
|
|
123
|
+
*/
|
|
124
|
+
function isPlausibleStepDestination(stepInstruction, postUrl) {
|
|
125
|
+
const pathname = (() => {
|
|
126
|
+
try {
|
|
127
|
+
return new URL(postUrl).pathname;
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
})();
|
|
133
|
+
if (pathname === null)
|
|
134
|
+
return true;
|
|
135
|
+
const landedOnSignIn = exports.SIGN_IN_PATTERNS.some((p) => p.test(pathname.toLowerCase()));
|
|
136
|
+
if (!landedOnSignIn)
|
|
137
|
+
return true;
|
|
138
|
+
const actionClauses = splitIntoActionClauses(stepInstruction);
|
|
139
|
+
return actionClauses.some((clause) => exports.SIGN_IN_PATTERNS.some((p) => p.test(clause)));
|
|
140
|
+
}
|
|
32
141
|
/**
|
|
33
142
|
* Bytes of body-HTML growth treated as noise rather than a real DOM effect.
|
|
34
143
|
* Reused from `describeAttemptEffectSignals`'s dom-grew-without-network
|
|
@@ -50,7 +159,8 @@ function classifyPhantomClick(attempt) {
|
|
|
50
159
|
return "unresolved";
|
|
51
160
|
const networkDelta = attempt.post.networkCount - attempt.pre.networkCount;
|
|
52
161
|
const bytesDelta = attempt.post.bodyHtmlLength - attempt.pre.bodyHtmlLength;
|
|
53
|
-
const urlChanged = hasOriginOrPathChanged(attempt.pre.url, attempt.post.url)
|
|
162
|
+
const urlChanged = hasOriginOrPathChanged(attempt.pre.url, attempt.post.url) &&
|
|
163
|
+
attempt.destinationPlausible !== false;
|
|
54
164
|
// The resolved element's OWN committed selection state changed across the
|
|
55
165
|
// click — a design-system option/toggle (Base Web `kind` flip, hashed-class
|
|
56
166
|
// swap, ARIA, native `checked`) registers here with no network, no URL, and a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phantom-click.js","sourceRoot":"","sources":["../../src/scraper/phantom-click.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"phantom-click.js","sourceRoot":"","sources":["../../src/scraper/phantom-click.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;AA+CH,SAAS,eAAe,CAAC,GAAW;IAClC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,OAAO,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,GAAG,CAAC;IACb,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,gCAAuC,MAAc,EAAE,OAAe;IACpE,OAAO,eAAe,CAAC,MAAM,CAAC,KAAK,eAAe,CAAC,OAAO,CAAC,CAAC;AAC9D,CAAC;AAED,uEAAuE;AAC1D,QAAA,gBAAgB,GAAG,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;AAExE,uHAAuH;AACvH,SAAS,wBAAwB,CAAC,WAAmB;IACnD,OAAO,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,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,IAAI;QAAE,OAAO,YAAY,CAAC;IAE3D,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;IAC1E,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAC5E,MAAM,UAAU,GACd,sBAAsB,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;QACzD,OAAO,CAAC,oBAAoB,KAAK,KAAK,CAAC;IACzC,0EAA0E;IAC1E,4EAA4E;IAC5E,8EAA8E;IAC9E,uEAAuE;IACvE,+EAA+E;IAC/E,8EAA8E;IAC9E,8EAA8E;IAC9E,+EAA+E;IAC/E,2DAA2D;IAC3D,MAAM,mBAAmB,GAAG,CAAC,OAAO,CAAC,kBAAkB,IAAI,OAAO,CAAC,mBAAmB,KAAK,IAAI,CAAC;IAChG,8EAA8E;IAC9E,4EAA4E;IAC5E,6CAA6C;IAC7C,MAAM,yBAAyB,GAC7B,CAAC,OAAO,CAAC,kBAAkB,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,QAAA,uBAAuB,CAAC;IAEjF,MAAM,SAAS,GACb,YAAY,KAAK,CAAC,IAAI,UAAU,IAAI,mBAAmB,IAAI,yBAAyB,CAAC;IACvF,OAAO,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7C,CAAC"}
|
|
@@ -488,7 +488,10 @@ export declare function hasPageAlreadyAdvancedPastStep(stepStartUrl: string, cur
|
|
|
488
488
|
* siblings `isReplanReproposingFailedStep`/`isReplanCycle`. Matches on word
|
|
489
489
|
* boundaries (not plain substring) so instructions like "redesign in the
|
|
490
490
|
* layout" or "assign in the reviewer field" don't false-positive on "sign
|
|
491
|
-
* in".
|
|
491
|
+
* in". Scopes the Sign-In match to the step's own action clause (via
|
|
492
|
+
* `splitIntoActionClauses`, shared with `isPlausibleStepDestination`) so a
|
|
493
|
+
* step that merely mentions sign-in in descriptive context isn't mistaken
|
|
494
|
+
* for one that is itself about signing in. Pure.
|
|
492
495
|
*/
|
|
493
496
|
export declare function isReplanRegressingAcrossAuthBoundary(newSteps: readonly NormalizedStep[], completedSteps: readonly string[]): boolean;
|
|
494
497
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recon-browser.d.ts","sourceRoot":"","sources":["../../src/scripts/recon-browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAMH,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AA4B3B,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,SAAS,EAEd,KAAK,eAAe,EAKpB,KAAK,mBAAmB,EAgBzB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"recon-browser.d.ts","sourceRoot":"","sources":["../../src/scripts/recon-browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAMH,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AA4B3B,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,SAAS,EAEd,KAAK,eAAe,EAKpB,KAAK,mBAAmB,EAgBzB,MAAM,uBAAuB,CAAC;AAa/B,OAAO,EAAwB,KAAK,YAAY,EAAE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B,CAAC;AAC/B,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC;AAI5C,OAAO,EACL,eAAe,EACf,eAAe,EACf,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,GACpB,CAAC"}
|
|
@@ -102,6 +102,7 @@ const cookie_jar_1 = require("../scraper/cookie-jar");
|
|
|
102
102
|
const errors_2 = require("../scraper/errors");
|
|
103
103
|
const flow_runner_1 = require("../scraper/flow-runner");
|
|
104
104
|
const frame_target_1 = require("../scraper/frame-target");
|
|
105
|
+
const phantom_click_1 = require("../scraper/phantom-click");
|
|
105
106
|
const retry_1 = require("../scraper/retry");
|
|
106
107
|
const session_1 = require("../scraper/session");
|
|
107
108
|
const session_teardown_1 = require("../scraper/session-teardown");
|
|
@@ -1184,8 +1185,6 @@ function originAndPath(url) {
|
|
|
1184
1185
|
return null;
|
|
1185
1186
|
}
|
|
1186
1187
|
}
|
|
1187
|
-
/** Word-boundary phrase patterns identifying a sign-in/log-in step, keyed lowercase like {@link ACCOUNT_CREATION_PATTERNS}. */
|
|
1188
|
-
const SIGN_IN_PATTERNS = [/\bsign[\s-]?in\b/, /\blog[\s-]?in\b/];
|
|
1189
1188
|
/**
|
|
1190
1189
|
* Detect whether the live page has already navigated away from where a step
|
|
1191
1190
|
* started, mirroring {@link findRecentPageTransition} in flow-runner.ts:
|
|
@@ -1211,12 +1210,7 @@ function hasPageAlreadyAdvancedPastStep(stepStartUrl, currentUrl, stepInstructio
|
|
|
1211
1210
|
return false;
|
|
1212
1211
|
if (start === current)
|
|
1213
1212
|
return false;
|
|
1214
|
-
|
|
1215
|
-
const landedOnSignIn = SIGN_IN_PATTERNS.some((p) => p.test(currentPathname));
|
|
1216
|
-
if (!landedOnSignIn)
|
|
1217
|
-
return true;
|
|
1218
|
-
const norm = normalizeInstruction(stepInstruction);
|
|
1219
|
-
return SIGN_IN_PATTERNS.some((p) => p.test(norm));
|
|
1213
|
+
return (0, phantom_click_1.isPlausibleStepDestination)(stepInstruction, currentUrl);
|
|
1220
1214
|
}
|
|
1221
1215
|
/** Word-boundary phrase patterns identifying an account-creation/registration step. */
|
|
1222
1216
|
const ACCOUNT_CREATION_PATTERNS = [
|
|
@@ -1237,7 +1231,10 @@ const ACCOUNT_CREATION_PATTERNS = [
|
|
|
1237
1231
|
* siblings `isReplanReproposingFailedStep`/`isReplanCycle`. Matches on word
|
|
1238
1232
|
* boundaries (not plain substring) so instructions like "redesign in the
|
|
1239
1233
|
* layout" or "assign in the reviewer field" don't false-positive on "sign
|
|
1240
|
-
* in".
|
|
1234
|
+
* in". Scopes the Sign-In match to the step's own action clause (via
|
|
1235
|
+
* `splitIntoActionClauses`, shared with `isPlausibleStepDestination`) so a
|
|
1236
|
+
* step that merely mentions sign-in in descriptive context isn't mistaken
|
|
1237
|
+
* for one that is itself about signing in. Pure.
|
|
1241
1238
|
*/
|
|
1242
1239
|
function isReplanRegressingAcrossAuthBoundary(newSteps, completedSteps) {
|
|
1243
1240
|
const hasAccountCreation = completedSteps.some((s) => {
|
|
@@ -1246,10 +1243,7 @@ function isReplanRegressingAcrossAuthBoundary(newSteps, completedSteps) {
|
|
|
1246
1243
|
});
|
|
1247
1244
|
if (!hasAccountCreation)
|
|
1248
1245
|
return false;
|
|
1249
|
-
return newSteps.some((s) =>
|
|
1250
|
-
const norm = normalizeInstruction(s.instruction);
|
|
1251
|
-
return SIGN_IN_PATTERNS.some((p) => p.test(norm));
|
|
1252
|
-
});
|
|
1246
|
+
return newSteps.some((s) => (0, phantom_click_1.splitIntoActionClauses)(s.instruction).some((clause) => phantom_click_1.SIGN_IN_PATTERNS.some((p) => p.test(clause))));
|
|
1253
1247
|
}
|
|
1254
1248
|
/** Word-boundary phrase patterns identifying submit/finalize wording in a step's own instruction text. */
|
|
1255
1249
|
const SUBMIT_SHAPED_INSTRUCTION_PATTERNS = [
|