@enricai/barnacle 1.9.8 → 1.9.9
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 +6 -6
- package/dist/api/errors.d.ts +1 -1
- package/dist/api/errors.d.ts.map +1 -1
- package/dist/api/errors.js +3 -3
- package/dist/api/errors.js.map +1 -1
- package/dist/api/plugins/error-handler.js +1 -1
- package/dist/api/plugins/error-handler.js.map +1 -1
- package/dist/api/routes/submissions.d.ts +1 -1
- package/dist/api/schemas/telemetry.d.ts +1 -1
- package/dist/api/schemas/telemetry.js +1 -1
- package/dist/cache/response-cache.d.ts +1 -1
- package/dist/cache/response-cache.js +2 -2
- package/dist/config.d.ts +4 -4
- package/dist/lib/llm/judges/invalid-fields.d.ts +1 -1
- package/dist/lib/llm/judges/invalid-fields.d.ts.map +1 -1
- package/dist/lib/llm/judges/invalid-fields.js +1 -1
- package/dist/lib/llm/judges/verify-submit.js +1 -1
- package/dist/lib/logging.d.ts +1 -1
- package/dist/lib/logging.js +1 -1
- package/dist/lib/telemetry/beacon-capture.d.ts +1 -1
- package/dist/lib/telemetry/beacon-capture.js +1 -1
- package/dist/lib/telemetry/call-capture.d.ts +1 -1
- package/dist/lib/telemetry/call-capture.js +1 -1
- package/dist/lib/telemetry/reconciliation-source.d.ts +4 -4
- package/dist/lib/telemetry/reconciliation-source.js +5 -5
- package/dist/lib/telemetry/run-telemetry.d.ts +1 -1
- package/dist/lib/telemetry/run-telemetry.js +1 -1
- package/dist/lib/telemetry/s3-sink.d.ts +1 -1
- package/dist/lib/telemetry/s3-sink.js +1 -1
- package/dist/lib/telemetry/submissions-s3-objects.d.ts +1 -1
- package/dist/lib/telemetry/submissions-s3-objects.js +1 -1
- package/dist/lib/telemetry/submissions-s3-reader.d.ts +1 -1
- package/dist/lib/telemetry/submissions-s3-reader.js +1 -1
- package/dist/plugins/config-plugin.js +2 -2
- package/dist/recon/load-form-schema.d.ts +1 -1
- package/dist/recon/load-form-schema.js +1 -1
- package/dist/recon/load-vocabulary.d.ts +1 -1
- package/dist/recon/load-vocabulary.js +2 -2
- package/dist/scraper/deep-locator-actuate.d.ts +1 -1
- package/dist/scraper/deep-locator-actuate.js +3 -3
- package/dist/scraper/deep-locator-candidates.d.ts +2 -2
- package/dist/scraper/deep-locator-candidates.js +3 -3
- package/dist/scraper/deep-locator-fake.d.ts +8 -8
- package/dist/scraper/deep-locator-fake.d.ts.map +1 -1
- package/dist/scraper/deep-locator-fake.js +5 -5
- package/dist/scraper/deep-locator-fake.js.map +1 -1
- package/dist/scraper/deep-locator-scan.d.ts +5 -5
- package/dist/scraper/deep-locator-scan.js +7 -7
- package/dist/scraper/deep-query.js +1 -1
- package/dist/scraper/errors.d.ts +2 -2
- package/dist/scraper/errors.js +2 -2
- package/dist/scraper/flow-runner.d.ts +6 -6
- package/dist/scraper/flow-runner.js +18 -18
- package/dist/scraper/flow-runner.js.map +1 -1
- package/dist/scraper/frame-target.js +1 -1
- package/dist/scraper/http-client.js +1 -1
- package/dist/scraper/metrics.d.ts +1 -1
- package/dist/scraper/metrics.js +1 -1
- package/dist/scraper/phantom-click.d.ts +1 -1
- package/dist/scraper/phantom-click.d.ts.map +1 -1
- package/dist/scraper/retry.js +1 -1
- package/dist/scraper/retry.js.map +1 -1
- package/dist/scraper/session-browserbase.d.ts +3 -3
- package/dist/scraper/session-browserbase.js +4 -4
- package/dist/scraper/session-browserbase.js.map +1 -1
- package/dist/scraper/session-shared.d.ts +2 -2
- package/dist/scraper/stagehand-guard.d.ts +4 -4
- package/dist/scraper/stagehand-guard.js +5 -5
- package/dist/scraper/submit-control.js +1 -1
- package/dist/scripts/judge-llm-batch.d.ts +1 -1
- package/dist/scripts/llm-heal.d.ts +1 -1
- package/dist/scripts/recon-browser.d.ts +1 -1
- package/dist/scripts/recon-browser.js +2 -2
- package/dist/scripts/recon-generate-multicall-fixture.d.ts +1 -1
- package/dist/scripts/recon-generate.d.ts +11 -1
- package/dist/scripts/recon-generate.d.ts.map +1 -1
- package/dist/scripts/recon-generate.js +28 -4
- package/dist/scripts/recon-generate.js.map +1 -1
- package/dist/scripts/recon-heal.js +1 -1
- package/dist/scripts/recon-heal.js.map +1 -1
- package/dist/scripts/recon-http.d.ts +1 -1
- package/dist/scripts/recon-http.js +1 -1
- package/dist/scripts/recon-shared.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/site-plugin.d.ts +1 -1
- package/dist/testing/contract-parity-suite.d.mts +1 -1
- package/dist/testing/contract-parity-suite.mjs +1 -1
- package/dist/testing/coverage-guard-suite.d.mts +1 -1
- package/dist/testing/coverage-guard-suite.mjs +1 -1
- package/dist/testing/replay-integration-suite.d.mts +1 -1
- package/package.json +2 -2
|
@@ -126,7 +126,7 @@ function originOf(url) {
|
|
|
126
126
|
* poll loop even starts (making an unclamped deadline unreachable) and a
|
|
127
127
|
* page with several candidate frames would otherwise pay
|
|
128
128
|
* `(1 + frames) * evaluateTimeoutMs` in one pass regardless of `deadline`.
|
|
129
|
-
* The candidate loop always probes its first candidate —
|
|
129
|
+
* The candidate loop always probes its first candidate — paralleling the
|
|
130
130
|
* top-level probe's "runs once regardless of budget" guarantee, since a
|
|
131
131
|
* `timeoutMs: 0` re-resolution (`flow-runner.ts`'s `reresolveFrameTargetIfLost`)
|
|
132
132
|
* must still be able to pick up a frame that has already attached — but
|
|
@@ -96,7 +96,7 @@ function findHeaderCaseInsensitive(headers, name) {
|
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Parses a `name=value; name=value` Cookie header string into per-cookie
|
|
99
|
-
* entries,
|
|
99
|
+
* entries, paralleling the pair-splitting `extractCookieValue` already does
|
|
100
100
|
* for `Set-Cookie`. Skips malformed segments (no `=`) rather than throwing —
|
|
101
101
|
* an operator-authored `baseHeaders` or per-call `init.headers` Cookie value
|
|
102
102
|
* is untrusted input, not a value this module produced.
|
|
@@ -34,7 +34,7 @@ export declare function recordRateLimitRejection(siteId: string): void;
|
|
|
34
34
|
* Reservoir is capped at RESERVOIR_SIZE to bound memory; once full, a random
|
|
35
35
|
* slot is replaced (Vitter's Algorithm R). Called by dispatch() on non-cached
|
|
36
36
|
* hot-path successes only — cache hits are memory reads and must not bias the
|
|
37
|
-
*
|
|
37
|
+
* target site latency signal.
|
|
38
38
|
*/
|
|
39
39
|
export declare function recordHotPathLatency(siteId: string, latencyMs: number): void;
|
|
40
40
|
/**
|
package/dist/scraper/metrics.js
CHANGED
|
@@ -52,7 +52,7 @@ function recordRateLimitRejection(siteId) {
|
|
|
52
52
|
* Reservoir is capped at RESERVOIR_SIZE to bound memory; once full, a random
|
|
53
53
|
* slot is replaced (Vitter's Algorithm R). Called by dispatch() on non-cached
|
|
54
54
|
* hot-path successes only — cache hits are memory reads and must not bias the
|
|
55
|
-
*
|
|
55
|
+
* target site latency signal.
|
|
56
56
|
*/
|
|
57
57
|
function recordHotPathLatency(siteId, latencyMs) {
|
|
58
58
|
const entry = ensureEntry(siteId);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* escalate immediately instead of repeating techniques that all no-op the
|
|
6
6
|
* same way (see recon-submit-phantom-click bug report).
|
|
7
7
|
*/
|
|
8
|
-
/** Cheap snapshot of side effects — field names
|
|
8
|
+
/** Cheap snapshot of side effects — field names match flow-runner's StepSnapshot. */
|
|
9
9
|
export interface PhantomClickSnapshot {
|
|
10
10
|
networkCount: number;
|
|
11
11
|
url: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phantom-click.d.ts","sourceRoot":"","sources":["../../src/scraper/phantom-click.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,
|
|
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;CAC5B;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,CAStF"}
|
package/dist/scraper/retry.js
CHANGED
|
@@ -64,7 +64,7 @@ async function withScraperRetry(task, options = {}) {
|
|
|
64
64
|
// Task 10: CAPTCHA hit — log it. p-retry skips onFailedAttempt
|
|
65
65
|
// for AbortError, so the warn log below is the only signal a
|
|
66
66
|
// captcha was encountered before it propagates to callers.
|
|
67
|
-
logger.error(`captcha encountered
|
|
67
|
+
logger.error(`captcha encountered on the target site — aborting retry: ${err.message}`);
|
|
68
68
|
throw new p_retry_1.AbortError(err.message);
|
|
69
69
|
}
|
|
70
70
|
if (err instanceof errors_2.EmptyResultsError) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/scraper/retry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA6C;AAE7C,yCAA8C;AAC9C,2CAA0C;AAC1C,6CAQ0B;AAE1B,MAAM,MAAM,GAAG,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;AAgBpD;;;;;;;;;;;GAWG;AACI,KAAK,2BACV,IAAsB,EACtB,OAAO,GAAiB,EAAE;IAE1B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,CAAC,CA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BAAc,EAAC,GAAG,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IACpC,IAAI,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,qBAAY,CAAC,OAAO,CAAC,CAAC;IAChE,IAAI,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7D,OAAO,IAAI,4BAAmB,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IACD,IACE,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC1B,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAChC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EAC3B,CAAC;QACD,OAAO,IAAI,6BAAoB,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QAC5D,OAAO,IAAI,0BAAiB,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,4BAAmB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -15,7 +15,7 @@ export interface StagehandLogLine {
|
|
|
15
15
|
}>;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Build a custom Stagehand logger that filters out the noisy
|
|
18
|
+
* Build a custom Stagehand logger that filters out the noisy
|
|
19
19
|
* `AI_TypeValidationError` schema-validation spam. The errors come from
|
|
20
20
|
* Stagehand's internal Haiku LLM returning bare integers like "4671"
|
|
21
21
|
* when its Zod schema requires "N-N" format (regex /^\\d+-\\d+$/ at
|
|
@@ -33,7 +33,7 @@ export interface StagehandLogLine {
|
|
|
33
33
|
* AND the cause body contains both `AI_TypeValidationError` and
|
|
34
34
|
* `elementId`. Other AISDK errors (rate limits, malformed requests,
|
|
35
35
|
* server errors) pass through unchanged. Site-agnostic — the
|
|
36
|
-
*
|
|
36
|
+
* Stagehand bug is universal across tenants.
|
|
37
37
|
*
|
|
38
38
|
* Returns the callback + a `reportSuppressed` function that the
|
|
39
39
|
* session teardown calls to log the final suppression count, plus a
|
|
@@ -93,7 +93,7 @@ export declare function makeOutboundIpAccessor(resolve: () => Promise<string | n
|
|
|
93
93
|
* enabled we also force `solveCaptchas: true` (explicit; Browserbase defaults
|
|
94
94
|
* it on) and pin a Windows desktop fingerprint — DataDome-protected sites react
|
|
95
95
|
* significantly better to Windows OS signals than the default mac/linux mix.
|
|
96
|
-
* The combination
|
|
96
|
+
* The combination parallels a production Stagehand preset validated against such
|
|
97
97
|
* sites, not Browserbase's defaults.
|
|
98
98
|
*
|
|
99
99
|
* `browserbaseSessionCreateParams` forwards caller-supplied Browserbase session
|
|
@@ -13,7 +13,7 @@ const session_shared_1 = require("../scraper/session-shared");
|
|
|
13
13
|
const throttle_1 = require("../scraper/throttle");
|
|
14
14
|
const logger = (0, logging_1.getLogger)({ name: "scraper/session-browserbase" });
|
|
15
15
|
/**
|
|
16
|
-
* Build a custom Stagehand logger that filters out the noisy
|
|
16
|
+
* Build a custom Stagehand logger that filters out the noisy
|
|
17
17
|
* `AI_TypeValidationError` schema-validation spam. The errors come from
|
|
18
18
|
* Stagehand's internal Haiku LLM returning bare integers like "4671"
|
|
19
19
|
* when its Zod schema requires "N-N" format (regex /^\\d+-\\d+$/ at
|
|
@@ -31,7 +31,7 @@ const logger = (0, logging_1.getLogger)({ name: "scraper/session-browserbase" })
|
|
|
31
31
|
* AND the cause body contains both `AI_TypeValidationError` and
|
|
32
32
|
* `elementId`. Other AISDK errors (rate limits, malformed requests,
|
|
33
33
|
* server errors) pass through unchanged. Site-agnostic — the
|
|
34
|
-
*
|
|
34
|
+
* Stagehand bug is universal across tenants.
|
|
35
35
|
*
|
|
36
36
|
* Returns the callback + a `reportSuppressed` function that the
|
|
37
37
|
* session teardown calls to log the final suppression count, plus a
|
|
@@ -64,7 +64,7 @@ function makeFilteredStagehandLogger(pinoLogger) {
|
|
|
64
64
|
};
|
|
65
65
|
const reportSuppressed = () => {
|
|
66
66
|
if (suppressedCount > 0) {
|
|
67
|
-
pinoLogger.info(`stagehand-logger: suppressed ${suppressedCount} AISDK elementId-regex errors (
|
|
67
|
+
pinoLogger.info(`stagehand-logger: suppressed ${suppressedCount} AISDK elementId-regex errors (Stagehand bug; cascade Fix 1B handles consequence)`);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
const getSuppressedCount = () => suppressedCount;
|
|
@@ -124,7 +124,7 @@ function makeOutboundIpAccessor(resolve, opts) {
|
|
|
124
124
|
* enabled we also force `solveCaptchas: true` (explicit; Browserbase defaults
|
|
125
125
|
* it on) and pin a Windows desktop fingerprint — DataDome-protected sites react
|
|
126
126
|
* significantly better to Windows OS signals than the default mac/linux mix.
|
|
127
|
-
* The combination
|
|
127
|
+
* The combination parallels a production Stagehand preset validated against such
|
|
128
128
|
* sites, not Browserbase's defaults.
|
|
129
129
|
*
|
|
130
130
|
* `browserbaseSessionCreateParams` forwards caller-supplied Browserbase session
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-browserbase.js","sourceRoot":"","sources":["../../src/scraper/session-browserbase.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2F;AAE3F,qCAAkC;AAClC,2CAAmD;AACnD,yCAA8C;AAC9C,2CAA0C;AAC1C,qDAAgE;AAChE,6DAKkC;AAClC,iDAA0D;AAG1D,MAAM,MAAM,GAAG,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC,CAAC;AAclE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qCAA4C,UAAkB;IAK5D,IAAI,eAAe,GAAG,CAAC,CAAC;IACxB,MAAM,QAAQ,GAAG,CAAC,IAAsB,EAAQ,EAAE;QAChD,IAAI,IAAI,CAAC,QAAQ,KAAK,a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,IAAI,QAAQ,CAAC,MAAM,YAAY,mBAAmB,oBAAoB,eAAe,EAAE,CAC3J,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,+BAAoB,GAAE,CAAC;IAEvC,MAAM,aAAa,GAAG,sBAAsB,CAC1C,GAAG,EAAE,CACH,IAAA,qCAAwB,EAAC,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;QAC1D,OAAO,EAAE,eAAM,CAAC,OAAO,CAAC,gBAAgB;QACxC,SAAS,EAAE,eAAM,CAAC,OAAO,CAAC,kBAAkB;QAC5C,MAAM;KACP,CAAC,EACJ,EAAE,OAAO,EAAE,eAAM,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAC7C,CAAC;IAEF,MAAM,KAAK,GAAG,KAAK,IAAmB,EAAE;QACtC,IAAI,CAAC;YACH,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,CAAC,sCAAsC,SAAS,KAAK,IAAA,uBAAc,EAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACzF,CAAC;QACD,MAAM,OAAO,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,2BAA2B,EAAE,CAAC;IAChC,CAAC,CAAC;IAEF,OAAO;QACL,SAAS;QACT,OAAO;QACP,SAAS;QACT,QAAQ,EAAE,aAAa;QACvB,KAAK;QACL,qCAAqC;QACrC,aAAa;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -20,7 +20,7 @@ export interface BrowserSessionOptions {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* A live browser session paired with the per-session action limiter.
|
|
23
|
-
* Callers MUST call `close()` in a `finally` block so the
|
|
23
|
+
* Callers MUST call `close()` in a `finally` block so the remote provider
|
|
24
24
|
* stops billing and the underlying browser process is released.
|
|
25
25
|
*/
|
|
26
26
|
export interface BrowserSession {
|
|
@@ -34,7 +34,7 @@ export interface BrowserSession {
|
|
|
34
34
|
/**
|
|
35
35
|
* Live count of suppressed AISDK elementId-regex errors so far this
|
|
36
36
|
* session. Only present on providers that filter Stagehand's logger for
|
|
37
|
-
* this
|
|
37
|
+
* this Stagehand error (currently Browserbase); absent on Steel.
|
|
38
38
|
*/
|
|
39
39
|
getSuppressedAisdkElementIdErrorCount?: () => number;
|
|
40
40
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - `act` and `observe`: Stagehand owns the underlying LLM call and does
|
|
10
10
|
* not expose a caller-provided schema field on `ActOptions` /
|
|
11
11
|
* `ObserveOptions`. The strictest enforcement Stagehand's API allows is
|
|
12
|
-
* caller-side `safeParse` of the RETURN ENVELOPE against Zod
|
|
12
|
+
* caller-side `safeParse` of the RETURN ENVELOPE against Zod parallels of
|
|
13
13
|
* Stagehand's public types (`ActResult`, `Action`). On envelope drift
|
|
14
14
|
* (a Stagehand SDK upgrade that widens the shape, or a Stagehand bug
|
|
15
15
|
* that emits malformed JSON), the wrapper throws
|
|
@@ -49,7 +49,7 @@ import { type FrameTarget } from "../scraper/frame-target";
|
|
|
49
49
|
*/
|
|
50
50
|
export type StagehandCaptureFn = (input: LlmCallInput) => Promise<void>;
|
|
51
51
|
/**
|
|
52
|
-
* Zod
|
|
52
|
+
* Zod parallel of Stagehand's public `Action` shape (from
|
|
53
53
|
* `@browserbasehq/stagehand/.../public/methods.d.ts`):
|
|
54
54
|
*
|
|
55
55
|
* interface Action {
|
|
@@ -70,7 +70,7 @@ export declare const ACTION_SCHEMA: z.ZodObject<{
|
|
|
70
70
|
arguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
71
71
|
}, z.core.$strip>;
|
|
72
72
|
/**
|
|
73
|
-
* Zod
|
|
73
|
+
* Zod parallel of Stagehand's public `ActResult` shape. The `actions` array
|
|
74
74
|
* is sometimes empty when Stagehand acted via a path that doesn't echo the
|
|
75
75
|
* action back; the cascade's resolvedAction fallback already handles that
|
|
76
76
|
* case. We accept empty arrays here as valid per the SDK contract.
|
|
@@ -130,7 +130,7 @@ export declare class StagehandSchemaError extends Error {
|
|
|
130
130
|
*/
|
|
131
131
|
export declare function guardedAct(stagehand: Stagehand, input: string | Action, options?: ActOptions, captureFn?: StagehandCaptureFn, _frameTarget?: FrameTarget): Promise<ActResult>;
|
|
132
132
|
/**
|
|
133
|
-
* Schema-guarded wrapper around Stagehand's `observe`.
|
|
133
|
+
* Schema-guarded wrapper around Stagehand's `observe`. Parallels the
|
|
134
134
|
* Stagehand overloads: no args, options-only, instruction-only,
|
|
135
135
|
* instruction + options. On envelope drift (the `Action[]` shape changes),
|
|
136
136
|
* throws `StagehandSchemaError`.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - `act` and `observe`: Stagehand owns the underlying LLM call and does
|
|
11
11
|
* not expose a caller-provided schema field on `ActOptions` /
|
|
12
12
|
* `ObserveOptions`. The strictest enforcement Stagehand's API allows is
|
|
13
|
-
* caller-side `safeParse` of the RETURN ENVELOPE against Zod
|
|
13
|
+
* caller-side `safeParse` of the RETURN ENVELOPE against Zod parallels of
|
|
14
14
|
* Stagehand's public types (`ActResult`, `Action`). On envelope drift
|
|
15
15
|
* (a Stagehand SDK upgrade that widens the shape, or a Stagehand bug
|
|
16
16
|
* that emits malformed JSON), the wrapper throws
|
|
@@ -50,13 +50,13 @@ const frame_target_1 = require("../scraper/frame-target");
|
|
|
50
50
|
const watchdog_1 = require("../scraper/watchdog");
|
|
51
51
|
/**
|
|
52
52
|
* Fallback watchdog bound for a guarded call whose caller passes no
|
|
53
|
-
* `options.timeout`.
|
|
53
|
+
* `options.timeout`. Parallels `STEP_WATCHDOG_MS` (`@/scraper/flow-runner`) by
|
|
54
54
|
* convention rather than by import — `flow-runner.ts` imports `guardedAct`/
|
|
55
55
|
* `guardedObserve` from this module, so importing back would cycle.
|
|
56
56
|
*/
|
|
57
57
|
const DEFAULT_GUARD_TIMEOUT_MS = 120_000;
|
|
58
58
|
/**
|
|
59
|
-
* Zod
|
|
59
|
+
* Zod parallel of Stagehand's public `Action` shape (from
|
|
60
60
|
* `@browserbasehq/stagehand/.../public/methods.d.ts`):
|
|
61
61
|
*
|
|
62
62
|
* interface Action {
|
|
@@ -77,7 +77,7 @@ exports.ACTION_SCHEMA = v4_1.z.object({
|
|
|
77
77
|
arguments: v4_1.z.array(v4_1.z.string()).optional(),
|
|
78
78
|
});
|
|
79
79
|
/**
|
|
80
|
-
* Zod
|
|
80
|
+
* Zod parallel of Stagehand's public `ActResult` shape. The `actions` array
|
|
81
81
|
* is sometimes empty when Stagehand acted via a path that doesn't echo the
|
|
82
82
|
* action back; the cascade's resolvedAction fallback already handles that
|
|
83
83
|
* case. We accept empty arrays here as valid per the SDK contract.
|
|
@@ -229,7 +229,7 @@ async function guardedAct(stagehand, input, options, captureFn, _frameTarget) {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
232
|
-
* Schema-guarded wrapper around Stagehand's `observe`.
|
|
232
|
+
* Schema-guarded wrapper around Stagehand's `observe`. Parallels the
|
|
233
233
|
* Stagehand overloads: no args, options-only, instruction-only,
|
|
234
234
|
* instruction + options. On envelope drift (the `Action[]` shape changes),
|
|
235
235
|
* throws `StagehandSchemaError`.
|
|
@@ -25,7 +25,7 @@ const NEGATIVE_TEXT_EXPR = `((text) => {
|
|
|
25
25
|
})`;
|
|
26
26
|
/**
|
|
27
27
|
* Normalizes an element's accessible name to lowercase, whitespace-collapsed
|
|
28
|
-
* text, preferring `aria-label` over visible `textContent` (
|
|
28
|
+
* text, preferring `aria-label` over visible `textContent` (parallels
|
|
29
29
|
* `SUBMIT_SHAPED_EL_EXPR`'s own normalization in deep-query.ts so both
|
|
30
30
|
* modules treat the same DOM the same way).
|
|
31
31
|
*/
|
|
@@ -30,7 +30,7 @@ export interface SampleScore {
|
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Injectable scorer — real implementation calls the LLM; dry-run stub
|
|
33
|
-
* returns deterministic values.
|
|
33
|
+
* returns deterministic values. Matches recon-heal's requestPatchFn injection
|
|
34
34
|
* so the deterministic core (parse/aggregate/write) is fully unit-testable.
|
|
35
35
|
*/
|
|
36
36
|
export type ScorerFn = (sample: LlmCallSample) => Promise<SampleScore>;
|
|
@@ -29,7 +29,7 @@ import { type ScorerFn } from "../scripts/judge-llm-batch";
|
|
|
29
29
|
import { type FlowPatch, type HealVerdict, type IterationRecord } from "../scripts/recon-heal";
|
|
30
30
|
/**
|
|
31
31
|
* Persistent state written after each iteration so the operator can inspect
|
|
32
|
-
* progress.
|
|
32
|
+
* progress. Matches recon-heal's HealState but scoped to prompt-template arms.
|
|
33
33
|
*/
|
|
34
34
|
export interface LlmHealState {
|
|
35
35
|
callType: string;
|
|
@@ -363,7 +363,7 @@ export declare function renderStepWindow(steps: readonly string[], options?: {
|
|
|
363
363
|
* Detect a "false-premise loop" — the current cascade-exhausted step
|
|
364
364
|
* shares a slug-prefix with at least N prior replans' failed steps,
|
|
365
365
|
* suggesting the flow's element model for THIS widget family doesn't
|
|
366
|
-
* match the actual DOM. Slug derivation
|
|
366
|
+
* match the actual DOM. Slug derivation matches the `currentPhase`
|
|
367
367
|
* pattern at recon-browser.ts:5001 (24-char alphanumeric prefix of
|
|
368
368
|
* normalized instruction). When the threshold is exceeded, callers
|
|
369
369
|
* inject an ELEMENT MODEL CHECK section into the replan prompt so the
|
|
@@ -501,7 +501,7 @@ exports.RECON_FLOW_FILE_SCHEMA = v4_1.z.union([
|
|
|
501
501
|
/**
|
|
502
502
|
* CSS selector of a cross-origin `<iframe>` the flow's target elements
|
|
503
503
|
* live inside (e.g. an embedded apply wizard embedded rather than top-window
|
|
504
|
-
* navigated).
|
|
504
|
+
* navigated). Matches `flowSchema.frameSelector` in
|
|
505
505
|
* `src/plugins/config-plugin.ts` so a hand-authored recon flow file and
|
|
506
506
|
* a config-plugin manifest use the same declaration. Omitted (default)
|
|
507
507
|
* preserves today's behavior: the flow drives the main frame.
|
|
@@ -950,7 +950,7 @@ function renderStepWindow(steps, options = {}) {
|
|
|
950
950
|
* Detect a "false-premise loop" — the current cascade-exhausted step
|
|
951
951
|
* shares a slug-prefix with at least N prior replans' failed steps,
|
|
952
952
|
* suggesting the flow's element model for THIS widget family doesn't
|
|
953
|
-
* match the actual DOM. Slug derivation
|
|
953
|
+
* match the actual DOM. Slug derivation matches the `currentPhase`
|
|
954
954
|
* pattern at recon-browser.ts:5001 (24-char alphanumeric prefix of
|
|
955
955
|
* normalized instruction). When the threshold is exceeded, callers
|
|
956
956
|
* inject an ELEMENT MODEL CHECK section into the replan prompt so the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Capture } from "../scripts/recon-shared";
|
|
2
|
-
/** Structural
|
|
2
|
+
/** Structural match of recon-generate.ts's internal (unexported) `ActionStep` —
|
|
3
3
|
* `capture`/`varName`/`produces`/`isMultipart`/`isCrossDomain`, per
|
|
4
4
|
* recon-generate.ts:1384-1397. Kept local rather than imported since the
|
|
5
5
|
* source type isn't exported and every consumer of `selectPayloadAction` only
|
|
@@ -527,6 +527,16 @@ interface ProducerBoundaryBinding {
|
|
|
527
527
|
* coordinate — and only WHOLE request-body leaves qualify, so every returned
|
|
528
528
|
* value is one the whole-value pass will bind (and whose field must be declared).
|
|
529
529
|
*
|
|
530
|
+
* A field is NOT a caller coordinate when it is a per-step POSITION CONSTANT — the
|
|
531
|
+
* step's own identifier that the harness varies as it walks the wizard (like
|
|
532
|
+
* `stepIndex`). Such a field is produced-and-re-sent on every step, so it looks
|
|
533
|
+
* like a coordinate, but each producer step echoes a DIFFERENT value; a genuine
|
|
534
|
+
* coordinate (a jobId) is echoed with the SAME value on every step and the
|
|
535
|
+
* per-value dedupe below leaves it a single entry. So any field bound to ≥2
|
|
536
|
+
* distinct values across its producer steps is dropped wholesale: each step keeps
|
|
537
|
+
* its own captured literal and the field is never declared as caller input.
|
|
538
|
+
* Site-agnostic — the signal is value cardinality per field, not any field name.
|
|
539
|
+
*
|
|
530
540
|
* @param actions the compiled action steps (carry produces[] + request bodies)
|
|
531
541
|
* @param alreadyBound capture value → existing accessor; a `payload.*` accessor
|
|
532
542
|
* is reused, a non-payload one (e.g. `txnId`) vetoes the value
|
|
@@ -657,7 +667,7 @@ export declare function emitBrowserFlowTs(opts: {
|
|
|
657
667
|
hasMultipartStep?: boolean;
|
|
658
668
|
vocabulary?: ReconVocabulary;
|
|
659
669
|
/** CSS selector of a cross-origin `<iframe>` the flow's target elements live
|
|
660
|
-
* inside, from the recon flow file's object-form `frameSelector`.
|
|
670
|
+
* inside, from the recon flow file's object-form `frameSelector`. Matches
|
|
661
671
|
* `spec.flow.frameSelector` in `src/plugins/config-plugin.ts` so a generated
|
|
662
672
|
* plugin keeps the same cross-origin iframe capability the recon flow used.
|
|
663
673
|
* Omitted (undefined) preserves today's main-frame-only generation. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recon-generate.d.ts","sourceRoot":"","sources":["../../src/scripts/recon-generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAiBH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EACL,KAAK,OAAO,EAKb,MAAM,wBAAwB,CAAC;AA2BhC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,OAAO,EACnB,UAAU,GAAE,eAAkC,GAC7C,MAAM,GAAG,IAAI,CAoBf;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,CAAC,UAAU,GACrB,MAAM,GAAG,IAAI,CAsBf;AAED;;;;;;;;;;;;;;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AE,CAAC;IAC3B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B;;;;2EAIuE;IACvE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,CAsInD;AAED;mEACmE;AACnE,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAgB5E"}
|
|
@@ -1657,10 +1657,10 @@ function locateFormEnvelopePath(parsedBody) {
|
|
|
1657
1657
|
if (candidates.length === 0)
|
|
1658
1658
|
return [];
|
|
1659
1659
|
const maxP = Math.max(...candidates.map((c) => c.primitives));
|
|
1660
|
-
// The analytics blob (`eventData`)
|
|
1660
|
+
// The analytics blob (`eventData`) parallels the form, so the object with the
|
|
1661
1661
|
// MOST primitives can be a deep descendant of the true envelope. Pick the
|
|
1662
1662
|
// SHALLOWEST primitive-rich object (≥ half the max) instead — that is the
|
|
1663
|
-
// form envelope itself, whose analytics
|
|
1663
|
+
// form envelope itself, whose analytics copy sits below it. Tie-break on a
|
|
1664
1664
|
// higher primitive count. Threshold is relative, not a magic key name.
|
|
1665
1665
|
const rich = candidates.filter((c) => c.primitives >= Math.max(1, maxP / 2));
|
|
1666
1666
|
// No object carries a scalar field (maxP === 0): the body root is the only
|
|
@@ -2200,6 +2200,16 @@ function interpolateStateValues(template, priorSteps, payloadAccessorByValue = n
|
|
|
2200
2200
|
* coordinate — and only WHOLE request-body leaves qualify, so every returned
|
|
2201
2201
|
* value is one the whole-value pass will bind (and whose field must be declared).
|
|
2202
2202
|
*
|
|
2203
|
+
* A field is NOT a caller coordinate when it is a per-step POSITION CONSTANT — the
|
|
2204
|
+
* step's own identifier that the harness varies as it walks the wizard (like
|
|
2205
|
+
* `stepIndex`). Such a field is produced-and-re-sent on every step, so it looks
|
|
2206
|
+
* like a coordinate, but each producer step echoes a DIFFERENT value; a genuine
|
|
2207
|
+
* coordinate (a jobId) is echoed with the SAME value on every step and the
|
|
2208
|
+
* per-value dedupe below leaves it a single entry. So any field bound to ≥2
|
|
2209
|
+
* distinct values across its producer steps is dropped wholesale: each step keeps
|
|
2210
|
+
* its own captured literal and the field is never declared as caller input.
|
|
2211
|
+
* Site-agnostic — the signal is value cardinality per field, not any field name.
|
|
2212
|
+
*
|
|
2203
2213
|
* @param actions the compiled action steps (carry produces[] + request bodies)
|
|
2204
2214
|
* @param alreadyBound capture value → existing accessor; a `payload.*` accessor
|
|
2205
2215
|
* is reused, a non-payload one (e.g. `txnId`) vetoes the value
|
|
@@ -2260,6 +2270,20 @@ function deriveProducerBoundaryBindings(actions, alreadyBound) {
|
|
|
2260
2270
|
bindings.set(value, { accessor: `payload.${field}`, field, producerIndex: i });
|
|
2261
2271
|
}
|
|
2262
2272
|
}
|
|
2273
|
+
// Drop per-step position constants: a field bound to ≥2 distinct values across
|
|
2274
|
+
// its producer steps is the step's own identifier the harness walked, not a
|
|
2275
|
+
// caller coordinate (which is echoed with one stable value). Removing every
|
|
2276
|
+
// entry leaves each step's captured literal in place and undeclared.
|
|
2277
|
+
const distinctValuesByField = new Map();
|
|
2278
|
+
for (const [value, binding] of bindings) {
|
|
2279
|
+
const values = distinctValuesByField.get(binding.field) ?? new Set();
|
|
2280
|
+
values.add(value);
|
|
2281
|
+
distinctValuesByField.set(binding.field, values);
|
|
2282
|
+
}
|
|
2283
|
+
for (const [value, binding] of [...bindings]) {
|
|
2284
|
+
if ((distinctValuesByField.get(binding.field)?.size ?? 0) >= 2)
|
|
2285
|
+
bindings.delete(value);
|
|
2286
|
+
}
|
|
2263
2287
|
return bindings;
|
|
2264
2288
|
}
|
|
2265
2289
|
/**
|
|
@@ -2518,7 +2542,7 @@ function applyPayloadKeyValueSubstitutions(template, inputBody, additionalBodies
|
|
|
2518
2542
|
* Documented closed set of JSON-key-name fragments (matched case-insensitively)
|
|
2519
2543
|
* that mark a value as a per-request TIMESTAMP the plugin must generate fresh at
|
|
2520
2544
|
* call time, not replay from the capture. Closed set per the no-regex-on-open-
|
|
2521
|
-
* sets feedback,
|
|
2545
|
+
* sets feedback, matching {@link CACHE_BUSTER_QUERY_KEYS}'s posture. A frozen
|
|
2522
2546
|
* capture timestamp would make every submission claim the recon instant.
|
|
2523
2547
|
*/
|
|
2524
2548
|
const VOLATILE_TIMESTAMP_KEY_FRAGMENTS = ["timestamp", "esign", "signeddate", "signedat"];
|
|
@@ -3299,7 +3323,7 @@ function emitContractTs(opts) {
|
|
|
3299
3323
|
: "";
|
|
3300
3324
|
// optionSchemaExtension is appended LAST so option enums show up at the
|
|
3301
3325
|
// end of the payload type — the section ordering (base, multipart fields,
|
|
3302
|
-
// form-schema fields, option enums, raw-option fields)
|
|
3326
|
+
// form-schema fields, option enums, raw-option fields) matches the body
|
|
3303
3327
|
// emit order and keeps the generated payload type readable.
|
|
3304
3328
|
const payloadSchemaExpr = hasMultipartStep
|
|
3305
3329
|
? `${basePayloadSchemaExpr}.extend({\n Resume: z.instanceof(Buffer),\n ResumeContentType: z.string(),\n ResumeFilename: z.string(),\n})${formFieldsExtension}${splicedFieldsExtension}${optionSchemaExtension}${rawOptionSchemaExtension}${additionalBodyKeysExtension}${structuredKeysExtension}`
|