@enricai/barnacle 1.12.39 → 1.12.41
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/api/errors.d.ts +1 -1
- package/dist/api/errors.js +1 -1
- package/dist/api/helpers/reply.d.ts +1 -1
- package/dist/api/helpers/reply.js +1 -1
- package/dist/api/plugins/auth.js +1 -1
- package/dist/api/plugins/error-handler.js +3 -3
- package/dist/api/routes/submissions.js +2 -2
- package/dist/api/schemas/submissions.js +1 -1
- package/dist/lib/applicant-payload.js +3 -3
- package/dist/lib/datadog.js +2 -2
- package/dist/lib/dd-metrics.js +1 -1
- package/dist/lib/llm/anthropic-client.js +1 -1
- package/dist/lib/llm/judge.d.ts +1 -1
- package/dist/lib/llm/judge.js +2 -2
- package/dist/lib/llm/judges/error-messages.d.ts +2 -2
- package/dist/lib/llm/judges/error-messages.js +3 -3
- package/dist/lib/llm/judges/invalid-fields.d.ts +2 -2
- package/dist/lib/llm/judges/invalid-fields.js +3 -3
- package/dist/lib/llm/judges/modal-priority.d.ts +2 -2
- package/dist/lib/llm/judges/modal-priority.js +3 -3
- package/dist/lib/llm/judges/select-option.d.ts +2 -2
- package/dist/lib/llm/judges/select-option.js +3 -3
- package/dist/lib/llm/judges/verify-submit.d.ts +2 -2
- package/dist/lib/llm/judges/verify-submit.js +3 -3
- package/dist/lib/logging.js +2 -2
- package/dist/lib/option-matcher.js +2 -2
- package/dist/lib/statsd.js +3 -3
- package/dist/lib/telemetry/beacon-capture.d.ts +1 -1
- package/dist/lib/telemetry/beacon-capture.js +2 -2
- package/dist/lib/telemetry/call-capture.js +2 -2
- package/dist/lib/telemetry/reconciliation-source.d.ts +2 -2
- package/dist/lib/telemetry/reconciliation-source.js +5 -5
- package/dist/lib/telemetry/s3-sink.js +2 -2
- package/dist/lib/telemetry/submission-capture.js +3 -3
- package/dist/lib/telemetry/submission-query.d.ts +2 -2
- package/dist/lib/telemetry/submission-reader.d.ts +1 -1
- package/dist/lib/telemetry/submission-reader.js +2 -2
- 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 +3 -3
- package/dist/lib/tracking-click.js +4 -4
- package/dist/plugins/config-plugin.js +3 -3
- package/dist/plugins/discover.js +2 -2
- package/dist/recon/load-form-schema.d.ts +1 -1
- package/dist/recon/load-vocabulary.d.ts +1 -1
- package/dist/recon/load-vocabulary.js +1 -1
- package/dist/scraper/behavioral-signals.d.ts +1 -1
- package/dist/scraper/captcha-solver.d.ts +1 -1
- package/dist/scraper/captcha-solver.js +2 -2
- package/dist/scraper/cookie-jar.js +1 -1
- 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 +1 -1
- package/dist/scraper/deep-locator-candidates.js +3 -3
- package/dist/scraper/deep-locator-click.d.ts +1 -1
- package/dist/scraper/deep-locator-click.js +1 -1
- package/dist/scraper/deep-locator-fake.d.ts +1 -1
- package/dist/scraper/deep-locator-scan.js +1 -1
- package/dist/scraper/deep-query.js +1 -1
- package/dist/scraper/flow-runner.d.ts +50 -10
- package/dist/scraper/flow-runner.d.ts.map +1 -1
- package/dist/scraper/flow-runner.js +289 -90
- package/dist/scraper/flow-runner.js.map +1 -1
- package/dist/scraper/frame-target.js +1 -1
- package/dist/scraper/graphql-client.js +1 -1
- package/dist/scraper/http-client.d.ts +1 -1
- package/dist/scraper/http-client.js +2 -2
- package/dist/scraper/http-status-classifier.js +1 -1
- package/dist/scraper/parse-json-response.d.ts +1 -1
- package/dist/scraper/parse-json-response.js +1 -1
- package/dist/scraper/pool.d.ts +3 -3
- package/dist/scraper/pool.js +3 -3
- package/dist/scraper/rate-limited-json-client.d.ts +1 -1
- package/dist/scraper/rate-limited-json-client.js +1 -1
- package/dist/scraper/raw-fetch.js +2 -2
- package/dist/scraper/require-response-field.js +1 -1
- package/dist/scraper/retry.d.ts +1 -1
- package/dist/scraper/retry.js +1 -1
- package/dist/scraper/session-browserbase.d.ts +1 -1
- package/dist/scraper/session-browserbase.js +6 -6
- package/dist/scraper/session-create-limiter.js +1 -1
- package/dist/scraper/session-ip.js +1 -1
- package/dist/scraper/session-shared.d.ts +1 -1
- package/dist/scraper/session-steel.d.ts +2 -2
- package/dist/scraper/session-steel.js +5 -5
- package/dist/scraper/session-teardown.d.ts +1 -1
- package/dist/scraper/session-teardown.js +1 -1
- package/dist/scraper/session-warmup.d.ts +1 -1
- package/dist/scraper/session.d.ts +2 -2
- package/dist/scraper/session.js +4 -4
- package/dist/scraper/spa-readiness.js +1 -1
- package/dist/scraper/stagehand-guard.d.ts +1 -1
- package/dist/scraper/stagehand-guard.js +2 -2
- package/dist/scraper/submit-control.js +1 -1
- package/dist/scripts/llm-heal.d.ts +2 -2
- package/dist/scripts/llm-heal.js +2 -2
- package/dist/scripts/recon-browser.d.ts +15 -0
- package/dist/scripts/recon-browser.d.ts.map +1 -1
- package/dist/scripts/recon-browser.js +56 -3
- package/dist/scripts/recon-browser.js.map +1 -1
- package/dist/scripts/recon-generate-multicall-fixture.d.ts +111 -2
- package/dist/scripts/recon-generate-multicall-fixture.d.ts.map +1 -1
- package/dist/scripts/recon-generate-multicall-fixture.js +311 -0
- package/dist/scripts/recon-generate-multicall-fixture.js.map +1 -1
- package/dist/scripts/recon-generate-multiendpoint-fixture.d.ts +1 -1
- package/dist/scripts/recon-generate-repeated-section-fixture.d.ts +1 -1
- package/dist/scripts/recon-generate-repeated-section-fixture.js +1 -1
- package/dist/scripts/recon-generate.d.ts +9 -4
- package/dist/scripts/recon-generate.d.ts.map +1 -1
- package/dist/scripts/recon-generate.js +235 -32
- package/dist/scripts/recon-generate.js.map +1 -1
- package/dist/scripts/recon-http.js +1 -1
- package/dist/scripts/recon-replay-jobs.js +2 -2
- package/dist/scripts/recon-summarize.js +1 -1
- package/dist/testing/replay-integration-suite.mjs +1 -1
- package/dist/testmail/client.js +1 -1
- package/package.json +2 -2
package/dist/api/errors.d.ts
CHANGED
package/dist/api/errors.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.httpStatusString = httpStatusString;
|
|
|
6
6
|
exports.buildErrorEnvelope = buildErrorEnvelope;
|
|
7
7
|
const date_fns_1 = require("date-fns");
|
|
8
8
|
const http_status_codes_1 = require("http-status-codes");
|
|
9
|
-
const common_1 = require("
|
|
9
|
+
const common_1 = require("./schemas/common");
|
|
10
10
|
/**
|
|
11
11
|
* Maps an error code to the HTTP status we return. Status codes come
|
|
12
12
|
* from the `http-status-codes` package (battle-tested, RFC-aligned, used
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FastifyReply } from "fastify";
|
|
2
|
-
import type { ErrorCode } from "
|
|
2
|
+
import type { ErrorCode } from "../schemas/common";
|
|
3
3
|
import type { DispatchMetrics } from "../../types/dispatch-metrics";
|
|
4
4
|
/**
|
|
5
5
|
* Sends a standard error envelope on the given reply, optionally including
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.replyWithError = replyWithError;
|
|
4
|
-
const errors_1 = require("
|
|
4
|
+
const errors_1 = require("../errors");
|
|
5
5
|
/**
|
|
6
6
|
* Sends a standard error envelope on the given reply, optionally including
|
|
7
7
|
* dispatch metrics so the caller can forward step-level detail even on failures.
|
package/dist/api/plugins/auth.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const node_crypto_1 = require("node:crypto");
|
|
7
7
|
const bcryptjs_1 = require("bcryptjs");
|
|
8
8
|
const fastify_plugin_1 = __importDefault(require("fastify-plugin"));
|
|
9
|
-
const errors_1 = require("
|
|
9
|
+
const errors_1 = require("../errors");
|
|
10
10
|
const config_1 = require("../../config");
|
|
11
11
|
const logging_1 = require("../../lib/logging");
|
|
12
12
|
const logger = (0, logging_1.getLogger)({ name: "api/plugins/auth" });
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const fastify_plugin_1 = __importDefault(require("fastify-plugin"));
|
|
7
7
|
const fastify_type_provider_zod_1 = require("fastify-type-provider-zod");
|
|
8
8
|
const v4_1 = require("zod/v4");
|
|
9
|
-
const errors_1 = require("
|
|
10
|
-
const reply_1 = require("
|
|
11
|
-
const common_1 = require("
|
|
9
|
+
const errors_1 = require("../errors");
|
|
10
|
+
const reply_1 = require("../helpers/reply");
|
|
11
|
+
const common_1 = require("../schemas/common");
|
|
12
12
|
const errors_2 = require("../../scraper/errors");
|
|
13
13
|
/**
|
|
14
14
|
* Fastify plugin that replaces Fastify's default error serializer with the
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.submissionsRoutes = submissionsRoutes;
|
|
4
|
-
const envelope_1 = require("
|
|
5
|
-
const submissions_1 = require("
|
|
4
|
+
const envelope_1 = require("../helpers/envelope");
|
|
5
|
+
const submissions_1 = require("../schemas/submissions");
|
|
6
6
|
const reconciliation_source_1 = require("../../lib/telemetry/reconciliation-source");
|
|
7
7
|
const submission_query_1 = require("../../lib/telemetry/submission-query");
|
|
8
8
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.submissionsResponseSchema = exports.reconciliationRowSchema = exports.submissionsQuerystringSchema = exports.SUBMISSIONS_QUERY_LIMIT_MAX = void 0;
|
|
4
4
|
const v4_1 = require("zod/v4");
|
|
5
|
-
const common_1 = require("
|
|
5
|
+
const common_1 = require("./common");
|
|
6
6
|
const reconciliation_record_1 = require("../../lib/telemetry/reconciliation-record");
|
|
7
7
|
/**
|
|
8
8
|
* Upper bound on `limit` so a query can't ask the read path to serialize the
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.ApplicantContactSchema = void 0;
|
|
14
|
-
const application_address_1 = require("
|
|
15
|
-
const application_identity_1 = require("
|
|
16
|
-
const application_resume_1 = require("
|
|
14
|
+
const application_address_1 = require("./application-address");
|
|
15
|
+
const application_identity_1 = require("./application-identity");
|
|
16
|
+
const application_resume_1 = require("./application-resume");
|
|
17
17
|
exports.ApplicantContactSchema = application_identity_1.ApplicantIdentitySchema.omit({ Email: true })
|
|
18
18
|
.merge(application_address_1.ApplicantAddressSchema)
|
|
19
19
|
.merge(application_resume_1.ApplicantResumeSchema);
|
package/dist/lib/datadog.js
CHANGED
|
@@ -19,8 +19,8 @@ exports.getTracer = getTracer;
|
|
|
19
19
|
* tracer for log-trace correlation.
|
|
20
20
|
*/
|
|
21
21
|
const node_module_1 = require("node:module");
|
|
22
|
-
const env_1 = require("
|
|
23
|
-
const errors_1 = require("
|
|
22
|
+
const env_1 = require("./env");
|
|
23
|
+
const errors_1 = require("./errors");
|
|
24
24
|
// Matches `discover.ts`'s createRequire idiom for resolving packages at runtime.
|
|
25
25
|
// `__filename` is the same both-environments anchor `scraper/fixtures.ts` relies
|
|
26
26
|
// on: `src/lib/` under tsx, `dist/lib/` under node — either way the optional
|
package/dist/lib/dd-metrics.js
CHANGED
|
@@ -15,7 +15,7 @@ exports.recordTrackingClickDuration = recordTrackingClickDuration;
|
|
|
15
15
|
* the in-memory counters in src/scraper/metrics.ts (which power /readyz) with
|
|
16
16
|
* durable Datadog-side aggregation for alerting and dashboards.
|
|
17
17
|
*/
|
|
18
|
-
const statsd_1 = require("
|
|
18
|
+
const statsd_1 = require("./statsd");
|
|
19
19
|
function toTagArray(tags) {
|
|
20
20
|
return Object.entries(tags).map(([k, v]) => `${k}:${v}`);
|
|
21
21
|
}
|
|
@@ -8,7 +8,7 @@ exports.buildRephraseModel = buildRephraseModel;
|
|
|
8
8
|
const anthropic_1 = require("@ai-sdk/anthropic");
|
|
9
9
|
const sdk_1 = __importDefault(require("@anthropic-ai/sdk"));
|
|
10
10
|
const config_1 = require("../../config");
|
|
11
|
-
const bedrock_1 = require("
|
|
11
|
+
const bedrock_1 = require("../bedrock");
|
|
12
12
|
/**
|
|
13
13
|
* Build the shared Anthropic client used by the self-heal cascade's LLM
|
|
14
14
|
* techniques (attempt-5 rephrase, replan, judges). Returns `null` on a
|
package/dist/lib/llm/judge.d.ts
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*/
|
|
28
28
|
import type Anthropic from "@anthropic-ai/sdk";
|
|
29
29
|
import type { z } from "zod/v4";
|
|
30
|
-
import { type LlmCallInput } from "
|
|
30
|
+
import { type LlmCallInput } from "../telemetry/call-capture";
|
|
31
31
|
/** Injectable capture function — matches `captureLlmCall`'s signature. */
|
|
32
32
|
export type JudgeCaptureFn = (input: LlmCallInput) => Promise<void>;
|
|
33
33
|
export interface HaikuJudgeParams<T extends z.ZodTypeAny> {
|
package/dist/lib/llm/judge.js
CHANGED
|
@@ -30,8 +30,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
30
30
|
exports.callHaikuJudge = callHaikuJudge;
|
|
31
31
|
const node_crypto_1 = require("node:crypto");
|
|
32
32
|
const zod_1 = require("@anthropic-ai/sdk/helpers/zod");
|
|
33
|
-
const logging_1 = require("
|
|
34
|
-
const call_capture_1 = require("
|
|
33
|
+
const logging_1 = require("../logging");
|
|
34
|
+
const call_capture_1 = require("../telemetry/call-capture");
|
|
35
35
|
const logger = (0, logging_1.getLogger)({ name: "haiku-judge" });
|
|
36
36
|
/**
|
|
37
37
|
* Pinned Haiku version. We pin to a dated snapshot so prompts that
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import type Anthropic from "@anthropic-ai/sdk";
|
|
18
18
|
import type { z } from "zod/v4";
|
|
19
|
-
import { type JudgeCaptureFn } from "
|
|
20
|
-
import { ERROR_MESSAGES_SCHEMA } from "
|
|
19
|
+
import { type JudgeCaptureFn } from "../judge";
|
|
20
|
+
import { ERROR_MESSAGES_SCHEMA } from "../schemas";
|
|
21
21
|
declare const ERROR_MESSAGES_SYSTEM_PROMPT = "You are a strict error-message extractor for browser forms. Given a body-HTML excerpt, identify visible error messages and required-field warnings tied to specific form inputs.\n\nStrict criteria for extracting a message:\n- It lives inside a structural error container (class containing \"error\", \"validation\", \"feedback\", \"invalid\", \"required\", \"help-block-error\", \"form-error\", or app-prefixed equivalent), OR\n- It's inside an aria-live=\"polite\" or aria-live=\"assertive\" region, OR\n- It's directly adjacent to a field marked aria-invalid=\"true\" or data-invalid.\n\nDo NOT extract:\n- Placeholder text inside empty inputs (placeholder= attribute).\n- Help text / hint text that's always visible and explains the field (e.g. \"Format: MM/DD/YYYY\").\n- Tooltips that auto-hide on click outside.\n- Plain prose text that happens to contain words like \"error\" but isn't a structural error indicator.\n\nEach message:\n- text: the visible message string, trimmed to \u2264400 chars.\n- fieldHint: a short identifier for the field the error applies to (label text, placeholder, name= attribute, id), or null if not discoverable.\n- severity: \"error\" for structural validation failures, \"warning\" for soft hints (e.g. \"field will be required\"), \"info\" for purely informational adjacent messages.\n\nReturn up to 50 messages. Empty array when no structural error containers are visible.";
|
|
22
22
|
export interface JudgeErrorMessagesInput {
|
|
23
23
|
/** Body HTML excerpt to scan (typically the page DOM, truncated to ~8KB). */
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.ERROR_MESSAGES_SYSTEM_PROMPT = void 0;
|
|
20
20
|
exports.judgeErrorMessagesWithLLM = judgeErrorMessagesWithLLM;
|
|
21
|
-
const judge_1 = require("
|
|
22
|
-
const schemas_1 = require("
|
|
23
|
-
const call_types_1 = require("
|
|
21
|
+
const judge_1 = require("../judge");
|
|
22
|
+
const schemas_1 = require("../schemas");
|
|
23
|
+
const call_types_1 = require("../../telemetry/call-types");
|
|
24
24
|
const ERROR_MESSAGES_SYSTEM_PROMPT = `You are a strict error-message extractor for browser forms. Given a body-HTML excerpt, identify visible error messages and required-field warnings tied to specific form inputs.
|
|
25
25
|
|
|
26
26
|
Strict criteria for extracting a message:
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import type Anthropic from "@anthropic-ai/sdk";
|
|
21
21
|
import type { z } from "zod/v4";
|
|
22
|
-
import { type JudgeCaptureFn } from "
|
|
23
|
-
import { INVALID_FIELDS_SCHEMA } from "
|
|
22
|
+
import { type JudgeCaptureFn } from "../judge";
|
|
23
|
+
import { INVALID_FIELDS_SCHEMA } from "../schemas";
|
|
24
24
|
declare const INVALID_FIELDS_SYSTEM_PROMPT = "You are a strict invalid-field detector for browser forms. Given a body-HTML excerpt and (optionally) site-specific class-name prefixes, identify form fields that are structurally in an invalid/error state.\n\nStrict criteria for present=true (mark a field):\n- The container has a class containing \"invalid\" (e.g. ng-invalid, mat-form-field-invalid, is-invalid, field-invalid, app-input-invalid, etc.), OR\n- The element has aria-invalid=\"true\", OR\n- The element has data-invalid (truthy), OR\n- The container is structurally adjacent to an error-message container (class containing \"error\", \"validation\", \"feedback\", \"required\", \"help-block-error\", etc.), OR\n- The element is structurally adjacent to a visible error-text span/div that explains why it's invalid.\n\nDo NOT mark a field when:\n- Only visual styling indicates error (red border via CSS, no semantic marker).\n- The container is in a pristine/untouched state (e.g. ng-pristine ng-untouched alongside ng-invalid means the user hasn't interacted yet \u2014 that's a \"may become invalid\" state, not currently invalid).\n- The element is a hidden input or non-interactive ancestor.\n- The container is invalid ONLY because a descendant is invalid (parent-bubbled invalidity). Angular bubbles ng-invalid up to wrapping forms / lists / question containers; Bootstrap parallels this on form-group; React Hook Form propagates aria-invalid through fieldsets. When you see <ol class=\"ng-invalid\"> with <li class=\"ng-valid\"> children where ONE deeper descendant is actually invalid, report ONLY the deepest leaf that carries the failure. The leaf is the smallest container with the invalid marker AND no further invalid descendants. Reporting bubbled parents alongside the real leaf creates false positives (the parent's children look like they're invalid when they are not).\n\nWhen the supplied knownErrorClassPrefixes list is non-empty, also treat class names starting with any of those prefixes followed by \"-invalid\" or \"-error\" as structural markers (site-specific convention).\n\nReturn up to 50 fields. Top-level present=true means at least one field is currently invalid. present=false means no structural invalid markers found anywhere in the excerpt.\n\nEach field entry:\n- containerXpath: a best-effort xpath identifying the container (tag + nth-of-type)\n- label: the visible label text near the field, or null if not discoverable\n- markerKind: which marker type triggered (\"class\", \"aria\", \"data\", \"error-container\", \"other\")\n- framework: which UI library this looks like (\"angular\", \"react\", \"vue\", \"mantine\", \"chakra\", \"bootstrap\", \"other\"). Look at framework-conventional class signatures to decide.";
|
|
25
25
|
export interface JudgeInvalidFieldsInput {
|
|
26
26
|
/** Body HTML excerpt to scan (typically the page DOM, truncated to ~8KB). */
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.INVALID_FIELDS_SYSTEM_PROMPT = void 0;
|
|
23
23
|
exports.judgeInvalidFieldsWithLLM = judgeInvalidFieldsWithLLM;
|
|
24
|
-
const judge_1 = require("
|
|
25
|
-
const schemas_1 = require("
|
|
26
|
-
const call_types_1 = require("
|
|
24
|
+
const judge_1 = require("../judge");
|
|
25
|
+
const schemas_1 = require("../schemas");
|
|
26
|
+
const call_types_1 = require("../../telemetry/call-types");
|
|
27
27
|
const INVALID_FIELDS_SYSTEM_PROMPT = `You are a strict invalid-field detector for browser forms. Given a body-HTML excerpt and (optionally) site-specific class-name prefixes, identify form fields that are structurally in an invalid/error state.
|
|
28
28
|
|
|
29
29
|
Strict criteria for present=true (mark a field):
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import type Anthropic from "@anthropic-ai/sdk";
|
|
19
19
|
import type { z } from "zod/v4";
|
|
20
|
-
import { type JudgeCaptureFn } from "
|
|
21
|
-
import { MODAL_PRIORITY_SCHEMA } from "
|
|
20
|
+
import { type JudgeCaptureFn } from "../judge";
|
|
21
|
+
import { MODAL_PRIORITY_SCHEMA } from "../schemas";
|
|
22
22
|
declare const MODAL_PRIORITY_SYSTEM_PROMPT = "You are a strict modal-priority judge for browser-automation. Given a list of UI elements observed on the page (with English descriptions), identify which ones are STRUCTURALLY blocking modal/dialog/overlay components that need to be dismissed before the underlying form can be interacted with.\n\nStrict criteria for marking an index as priority:\n- Cookie consent banners (block the page until accepted/dismissed) \u2014 PRIORITY.\n- Welcome / sign-in modals with a dismiss action \u2014 PRIORITY.\n- Floating sheet/flyout/dialog/popup/overlay UIs covering form content \u2014 PRIORITY.\n- Lightbox image viewers \u2014 PRIORITY when they cover the form.\n- Drawer components when they're modal (block underlying interaction) \u2014 PRIORITY.\n\nDo NOT mark as priority:\n- Sidebars and navigation panels that are always visible by design.\n- Sticky headers / footers that don't block form interaction.\n- Tooltips / popovers that auto-dismiss on click outside.\n- Slide-out panels in responsive layouts when they're statically open.\n\nThe descriptions are English prose generated by Stagehand. Class names mentioned in the description (e.g. cdk-overlay, app-modal) are stronger evidence than keywords. Site-specific app-prefixed dialog/modal classes count as priority.\n\nReturn the indices (0-based) of priority items in the order they appear in the input. Max 50 items. Include a one-sentence rationale citing the strongest signal.";
|
|
23
23
|
export interface JudgeModalPriorityInput {
|
|
24
24
|
/** Each entry as it appears in the unfocused-observe list. Indices are 0-based. */
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.MODAL_PRIORITY_SYSTEM_PROMPT = void 0;
|
|
21
21
|
exports.judgeModalPriorityWithLLM = judgeModalPriorityWithLLM;
|
|
22
|
-
const judge_1 = require("
|
|
23
|
-
const schemas_1 = require("
|
|
24
|
-
const call_types_1 = require("
|
|
22
|
+
const judge_1 = require("../judge");
|
|
23
|
+
const schemas_1 = require("../schemas");
|
|
24
|
+
const call_types_1 = require("../../telemetry/call-types");
|
|
25
25
|
const MODAL_PRIORITY_SYSTEM_PROMPT = `You are a strict modal-priority judge for browser-automation. Given a list of UI elements observed on the page (with English descriptions), identify which ones are STRUCTURALLY blocking modal/dialog/overlay components that need to be dismissed before the underlying form can be interacted with.
|
|
26
26
|
|
|
27
27
|
Strict criteria for marking an index as priority:
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type Anthropic from "@anthropic-ai/sdk";
|
|
17
17
|
import type { z } from "zod/v4";
|
|
18
|
-
import { type JudgeCaptureFn } from "
|
|
19
|
-
import { SELECT_OPTION_SCHEMA } from "
|
|
18
|
+
import { type JudgeCaptureFn } from "../judge";
|
|
19
|
+
import { SELECT_OPTION_SCHEMA } from "../schemas";
|
|
20
20
|
declare const SELECT_OPTION_SYSTEM_PROMPT = "You are a job applicant answering a required screening dropdown on an application form. You are given a QUESTION, a HINT at the intended answer (from a generic template that may not match this specific job), and SEVERAL candidate dropdowns on the page \u2014 each with its own list of options. Exactly one dropdown (or none) is the one that answers the question.\n\nDo two things:\n1. Pick the dropdown (selectIndex) whose options actually answer the QUESTION. E.g. a nursing-education question is answered by a dropdown whose options are education levels, NOT one whose options are disability choices or countries. If NO dropdown's options fit the question, return selectIndex=null.\n2. Within that dropdown, pick the option (optionIndex) that is the most plausible, truthful answer letting a qualified candidate proceed:\n - Prefer the option semantically closest to the hint (e.g. hint \"Emergency Department\" on a cardiac role \u2192 the closest clinical specialty available).\n - For EEO / self-identification / voluntary demographic questions (race, gender, disability, veteran status), prefer a decline option (\"I do not wish to answer\", \"Prefer not to answer\", \"Decline to self-identify\").\n - For yes/no eligibility questions, choose the answer that keeps a qualified candidate eligible (usually the hint).\n - NEVER choose a disabled placeholder (\"Please select\u2026\", \"-- Select --\", empty first entry).\n\nReturn selectIndex = the 0-based index into the candidate dropdowns (or null if none fit), optionIndex = the 0-based index into THAT dropdown's options (null if selectIndex is null). Always give a one-line reason.";
|
|
21
21
|
export interface JudgeSelectOptionCandidate {
|
|
22
22
|
/** The dropdown's nearby/associated label text, when discoverable. */
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.SELECT_OPTION_SYSTEM_PROMPT = void 0;
|
|
19
19
|
exports.judgeSelectOptionWithLLM = judgeSelectOptionWithLLM;
|
|
20
|
-
const judge_1 = require("
|
|
21
|
-
const schemas_1 = require("
|
|
22
|
-
const call_types_1 = require("
|
|
20
|
+
const judge_1 = require("../judge");
|
|
21
|
+
const schemas_1 = require("../schemas");
|
|
22
|
+
const call_types_1 = require("../../telemetry/call-types");
|
|
23
23
|
const SELECT_OPTION_SYSTEM_PROMPT = `You are a job applicant answering a required screening dropdown on an application form. You are given a QUESTION, a HINT at the intended answer (from a generic template that may not match this specific job), and SEVERAL candidate dropdowns on the page — each with its own list of options. Exactly one dropdown (or none) is the one that answers the question.
|
|
24
24
|
|
|
25
25
|
Do two things:
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import type Anthropic from "@anthropic-ai/sdk";
|
|
20
20
|
import type { z } from "zod/v4";
|
|
21
|
-
import { type JudgeCaptureFn } from "
|
|
22
|
-
import { SUBMIT_VERDICT_SCHEMA } from "
|
|
21
|
+
import { type JudgeCaptureFn } from "../judge";
|
|
22
|
+
import { SUBMIT_VERDICT_SCHEMA } from "../schemas";
|
|
23
23
|
/**
|
|
24
24
|
* System prompt for the submit-verifier. The strictness rules are
|
|
25
25
|
* intentionally explicit and multi-signal — the empirical replay confirmed
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.SUBMIT_VERIFY_SYSTEM_PROMPT = void 0;
|
|
22
22
|
exports.verifySubmitWithLLM = verifySubmitWithLLM;
|
|
23
|
-
const judge_1 = require("
|
|
24
|
-
const schemas_1 = require("
|
|
25
|
-
const call_types_1 = require("
|
|
23
|
+
const judge_1 = require("../judge");
|
|
24
|
+
const schemas_1 = require("../schemas");
|
|
25
|
+
const call_types_1 = require("../../telemetry/call-types");
|
|
26
26
|
/**
|
|
27
27
|
* System prompt for the submit-verifier. The strictness rules are
|
|
28
28
|
* intentionally explicit and multi-signal — the empirical replay confirmed
|
package/dist/lib/logging.js
CHANGED
|
@@ -9,8 +9,8 @@ exports.getScriptLogger = getScriptLogger;
|
|
|
9
9
|
exports.getLogger = getLogger;
|
|
10
10
|
const date_fns_1 = require("date-fns");
|
|
11
11
|
const pino_1 = __importDefault(require("pino"));
|
|
12
|
-
const datadog_1 = require("
|
|
13
|
-
const env_1 = require("
|
|
12
|
+
const datadog_1 = require("./datadog");
|
|
13
|
+
const env_1 = require("./env");
|
|
14
14
|
const nodeEnv = (0, env_1.getNodeEnv)();
|
|
15
15
|
const isDevelopment = nodeEnv === "development";
|
|
16
16
|
const isTest = nodeEnv === "test";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SEMANTIC_EQUIVALENCES = void 0;
|
|
4
4
|
exports.matchToOptions = matchToOptions;
|
|
5
|
-
const logging_1 = require("
|
|
6
|
-
const us_states_1 = require("
|
|
5
|
+
const logging_1 = require("./logging");
|
|
6
|
+
const us_states_1 = require("./us-states");
|
|
7
7
|
const logger = (0, logging_1.getLogger)({ name: "lib/option-matcher" });
|
|
8
8
|
/**
|
|
9
9
|
* Known synonyms keyed by their canonical option value (lowercased).
|
package/dist/lib/statsd.js
CHANGED
|
@@ -14,9 +14,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
exports.getStatsD = getStatsD;
|
|
15
15
|
exports.shutdownStatsD = shutdownStatsD;
|
|
16
16
|
const node_module_1 = require("node:module");
|
|
17
|
-
const env_1 = require("
|
|
18
|
-
const errors_1 = require("
|
|
19
|
-
const logging_1 = require("
|
|
17
|
+
const env_1 = require("./env");
|
|
18
|
+
const errors_1 = require("./errors");
|
|
19
|
+
const logging_1 = require("./logging");
|
|
20
20
|
const logger = (0, logging_1.getLogger)({ name: "statsd" });
|
|
21
21
|
// See `datadog.ts` — same createRequire idiom for resolving an optional peer.
|
|
22
22
|
const requirePeer = (0, node_module_1.createRequire)(__filename);
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* throwing way to report a real `fired`/`failed` outcome for its own run.
|
|
18
18
|
*/
|
|
19
19
|
import type { z } from "zod/v4";
|
|
20
|
-
import type { beaconEventSchema } from "
|
|
20
|
+
import type { beaconEventSchema } from "./reconciliation-record";
|
|
21
21
|
/** Validated shape of one beacon-event sample. */
|
|
22
22
|
export type BeaconEventSample = z.infer<typeof beaconEventSchema>;
|
|
23
23
|
/**
|
|
@@ -22,8 +22,8 @@ exports.captureBeaconEvent = captureBeaconEvent;
|
|
|
22
22
|
exports.createBeaconOutcomeRecorder = createBeaconOutcomeRecorder;
|
|
23
23
|
const date_fns_1 = require("date-fns");
|
|
24
24
|
const config_1 = require("../../config");
|
|
25
|
-
const logging_1 = require("
|
|
26
|
-
const submission_capture_1 = require("
|
|
25
|
+
const logging_1 = require("../logging");
|
|
26
|
+
const submission_capture_1 = require("./submission-capture");
|
|
27
27
|
const logger = (0, logging_1.getLogger)({ name: "telemetry/beacon-capture" });
|
|
28
28
|
const TRACKING_URL_MAX_LENGTH = 120;
|
|
29
29
|
/**
|
|
@@ -13,8 +13,8 @@ const node_path_1 = require("node:path");
|
|
|
13
13
|
const date_fns_1 = require("date-fns");
|
|
14
14
|
const v4_1 = require("zod/v4");
|
|
15
15
|
const config_1 = require("../../config");
|
|
16
|
-
const logging_1 = require("
|
|
17
|
-
const s3_sink_1 = require("
|
|
16
|
+
const logging_1 = require("../logging");
|
|
17
|
+
const s3_sink_1 = require("./s3-sink");
|
|
18
18
|
const logger = (0, logging_1.getLogger)({ name: "telemetry/call-capture" });
|
|
19
19
|
/**
|
|
20
20
|
* Categorical failure reason for an LLM call. Surfaces post-mortem without
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
* beacon outcomes never collide, while submit records keep the plain
|
|
22
22
|
* `kind:requestId:ts` key.
|
|
23
23
|
*/
|
|
24
|
-
import { type ReconciliationRow } from "
|
|
25
|
-
import { type ListSubmissionsS3ObjectsOptions } from "
|
|
24
|
+
import { type ReconciliationRow } from "./submission-reader";
|
|
25
|
+
import { type ListSubmissionsS3ObjectsOptions } from "./submissions-s3-objects";
|
|
26
26
|
/** Options for `readDurableReconciliationRows`. */
|
|
27
27
|
export interface ReadDurableReconciliationRowsOptions extends ListSubmissionsS3ObjectsOptions {
|
|
28
28
|
/** Override the local sink path; used in tests to avoid touching the real file. */
|
|
@@ -27,11 +27,11 @@ exports.readDurableReconciliationRows = readDurableReconciliationRows;
|
|
|
27
27
|
const node_fs_1 = require("node:fs");
|
|
28
28
|
const promises_1 = require("node:fs/promises");
|
|
29
29
|
const config_1 = require("../../config");
|
|
30
|
-
const errors_1 = require("
|
|
31
|
-
const logging_1 = require("
|
|
32
|
-
const submission_reader_1 = require("
|
|
33
|
-
const submissions_s3_objects_1 = require("
|
|
34
|
-
const submissions_s3_reader_1 = require("
|
|
30
|
+
const errors_1 = require("../errors");
|
|
31
|
+
const logging_1 = require("../logging");
|
|
32
|
+
const submission_reader_1 = require("./submission-reader");
|
|
33
|
+
const submissions_s3_objects_1 = require("./submissions-s3-objects");
|
|
34
|
+
const submissions_s3_reader_1 = require("./submissions-s3-reader");
|
|
35
35
|
const logger = (0, logging_1.getLogger)({ name: "telemetry/reconciliation-source" });
|
|
36
36
|
/**
|
|
37
37
|
* Reads the local sink into raw records, exactly as `readReconciliationRows`
|
|
@@ -53,8 +53,8 @@ const node_crypto_1 = require("node:crypto");
|
|
|
53
53
|
const os = __importStar(require("node:os"));
|
|
54
54
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
55
55
|
const config_1 = require("../../config");
|
|
56
|
-
const errors_1 = require("
|
|
57
|
-
const logging_1 = require("
|
|
56
|
+
const errors_1 = require("../errors");
|
|
57
|
+
const logging_1 = require("../logging");
|
|
58
58
|
const logger = (0, logging_1.getLogger)({ name: "telemetry/s3-sink" });
|
|
59
59
|
const HARD_CAP_LINES = 5000;
|
|
60
60
|
const SHUTDOWN_FLUSH_TIMEOUT_MS = 20_000;
|
|
@@ -20,9 +20,9 @@ const promises_1 = require("node:fs/promises");
|
|
|
20
20
|
const node_path_1 = require("node:path");
|
|
21
21
|
const date_fns_1 = require("date-fns");
|
|
22
22
|
const config_1 = require("../../config");
|
|
23
|
-
const logging_1 = require("
|
|
24
|
-
const reconciliation_record_1 = require("
|
|
25
|
-
const s3_sink_1 = require("
|
|
23
|
+
const logging_1 = require("../logging");
|
|
24
|
+
const reconciliation_record_1 = require("./reconciliation-record");
|
|
25
|
+
const s3_sink_1 = require("./s3-sink");
|
|
26
26
|
const logger = (0, logging_1.getLogger)({ name: "telemetry/submission-capture" });
|
|
27
27
|
/**
|
|
28
28
|
* Validated shape of one submission envelope sample. Alias of
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* route layer composes `readDurableReconciliationRows`
|
|
7
7
|
* (`src/lib/telemetry/reconciliation-source.ts`) then this module.
|
|
8
8
|
*/
|
|
9
|
-
import type { SubmitRecord } from "
|
|
10
|
-
import type { ReconciliationRow } from "
|
|
9
|
+
import type { SubmitRecord } from "./reconciliation-record";
|
|
10
|
+
import type { ReconciliationRow } from "./submission-reader";
|
|
11
11
|
/**
|
|
12
12
|
* Filters for `queryReconciliationRows`. Every field is optional; the
|
|
13
13
|
* fields present are combined with AND. `from`/`to` bound the `ts` window
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* torn final line is expected on a live process — malformed lines are
|
|
10
10
|
* skipped with a warning rather than aborting the whole read.
|
|
11
11
|
*/
|
|
12
|
-
import { type BeaconEvent, type ReconciliationRecord, type SubmitRecord } from "
|
|
12
|
+
import { type BeaconEvent, type ReconciliationRecord, type SubmitRecord } from "./reconciliation-record";
|
|
13
13
|
/**
|
|
14
14
|
* One reconciliation row per run: the submit record's fields plus the
|
|
15
15
|
* outcome of its beacon fire, distinct from submit status so "submitted but
|
|
@@ -17,8 +17,8 @@ exports.readReconciliationRows = readReconciliationRows;
|
|
|
17
17
|
const node_fs_1 = require("node:fs");
|
|
18
18
|
const promises_1 = require("node:fs/promises");
|
|
19
19
|
const config_1 = require("../../config");
|
|
20
|
-
const logging_1 = require("
|
|
21
|
-
const reconciliation_record_1 = require("
|
|
20
|
+
const logging_1 = require("../logging");
|
|
21
|
+
const reconciliation_record_1 = require("./reconciliation-record");
|
|
22
22
|
const logger = (0, logging_1.getLogger)({ name: "telemetry/submission-reader" });
|
|
23
23
|
/**
|
|
24
24
|
* Parses raw JSON, returning `undefined` on failure instead of throwing, so
|
|
@@ -12,7 +12,7 @@ exports.listSubmissionsS3Objects = listSubmissionsS3Objects;
|
|
|
12
12
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
13
13
|
const date_fns_1 = require("date-fns");
|
|
14
14
|
const config_1 = require("../../config");
|
|
15
|
-
const logging_1 = require("
|
|
15
|
+
const logging_1 = require("../logging");
|
|
16
16
|
const logger = (0, logging_1.getLogger)({ name: "telemetry/submissions-s3-objects" });
|
|
17
17
|
const SUBMISSIONS_DIR = "submissions";
|
|
18
18
|
const MS_PER_DAY = 86_400_000;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Parallels `s3-sink.ts`'s inertness contract: no `S3Client` construction, no
|
|
11
11
|
* network calls, when `config.telemetry.s3.bucket` is unset.
|
|
12
12
|
*/
|
|
13
|
-
import type { ReconciliationRecord } from "
|
|
13
|
+
import type { ReconciliationRecord } from "./reconciliation-record";
|
|
14
14
|
/**
|
|
15
15
|
* Fetches every listed S3 object and parses its NDJSON body into
|
|
16
16
|
* reconciliation records. Objects are fetched through a `p-queue` bounded by
|
|
@@ -19,9 +19,9 @@ exports.fetchSubmissionsS3Records = fetchSubmissionsS3Records;
|
|
|
19
19
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
20
20
|
const p_queue_1 = __importDefault(require("p-queue"));
|
|
21
21
|
const config_1 = require("../../config");
|
|
22
|
-
const errors_1 = require("
|
|
23
|
-
const logging_1 = require("
|
|
24
|
-
const submission_reader_1 = require("
|
|
22
|
+
const errors_1 = require("../errors");
|
|
23
|
+
const logging_1 = require("../logging");
|
|
24
|
+
const submission_reader_1 = require("./submission-reader");
|
|
25
25
|
const logger = (0, logging_1.getLogger)({ name: "telemetry/submissions-s3-reader" });
|
|
26
26
|
let client;
|
|
27
27
|
/** Lazily constructs the S3 client. Never called on the bucket-unset path. */
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.fireTrackingClick = fireTrackingClick;
|
|
15
15
|
exports.drainTrackingClicks = drainTrackingClicks;
|
|
16
|
-
const dd_metrics_1 = require("
|
|
17
|
-
const errors_1 = require("
|
|
18
|
-
const logging_1 = require("
|
|
19
|
-
const beacon_capture_1 = require("
|
|
16
|
+
const dd_metrics_1 = require("./dd-metrics");
|
|
17
|
+
const errors_1 = require("./errors");
|
|
18
|
+
const logging_1 = require("./logging");
|
|
19
|
+
const beacon_capture_1 = require("./telemetry/beacon-capture");
|
|
20
20
|
const session_1 = require("../scraper/session");
|
|
21
21
|
const logger = (0, logging_1.getLogger)({ name: "tracking-click" });
|
|
22
22
|
const NAVIGATE_TIMEOUT_MS = 30_000;
|
|
@@ -28,9 +28,9 @@ const v4_1 = require("zod/v4");
|
|
|
28
28
|
const bedrock_1 = require("../lib/bedrock");
|
|
29
29
|
const schemas_1 = require("../lib/llm/schemas");
|
|
30
30
|
const logging_1 = require("../lib/logging");
|
|
31
|
-
const json_schema_to_zod_1 = require("
|
|
32
|
-
const plugin_api_version_1 = require("
|
|
33
|
-
const plugin_manifest_envelope_1 = require("
|
|
31
|
+
const json_schema_to_zod_1 = require("./json-schema-to-zod");
|
|
32
|
+
const plugin_api_version_1 = require("./plugin-api-version");
|
|
33
|
+
const plugin_manifest_envelope_1 = require("./plugin-manifest-envelope");
|
|
34
34
|
const errors_1 = require("../scraper/errors");
|
|
35
35
|
const flow_runner_1 = require("../scraper/flow-runner");
|
|
36
36
|
const navigate_1 = require("../scraper/navigate");
|
package/dist/plugins/discover.js
CHANGED
|
@@ -13,8 +13,8 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
13
13
|
const node_url_1 = require("node:url");
|
|
14
14
|
const v4_1 = require("zod/v4");
|
|
15
15
|
const logging_1 = require("../lib/logging");
|
|
16
|
-
const config_plugin_1 = require("
|
|
17
|
-
const plugin_api_version_1 = require("
|
|
16
|
+
const config_plugin_1 = require("./config-plugin");
|
|
17
|
+
const plugin_api_version_1 = require("./plugin-api-version");
|
|
18
18
|
const logger = (0, logging_1.getLogger)({ name: "plugins/discover" });
|
|
19
19
|
/**
|
|
20
20
|
* Statically-registered in-tree plugins. Empty by default: this engine branch
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* loads one. Exporting this would publish an import-time side effect (dynamic
|
|
6
6
|
* `import()` of arbitrary consumer code) as public API for no caller.
|
|
7
7
|
*/
|
|
8
|
-
import type { ReconFormSchema } from "
|
|
8
|
+
import type { ReconFormSchema } from "./form-schema";
|
|
9
9
|
/** The `--form-schema` value that opts a site out of form-key recovery entirely. */
|
|
10
10
|
export declare const FORM_SCHEMA_NONE = "none";
|
|
11
11
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* publish an import-time side effect (dynamic `import()` of arbitrary consumer
|
|
6
6
|
* code) as public API for no caller.
|
|
7
7
|
*/
|
|
8
|
-
import { type ReconVocabulary } from "
|
|
8
|
+
import { type ReconVocabulary } from "./vocabulary";
|
|
9
9
|
/** The `--vocabulary` value that opts a site out of splicing entirely. */
|
|
10
10
|
export declare const VOCABULARY_NONE = "none";
|
|
11
11
|
/**
|
|
@@ -12,7 +12,7 @@ exports.loadReconVocabulary = loadReconVocabulary;
|
|
|
12
12
|
const v4_1 = require("zod/v4");
|
|
13
13
|
const errors_1 = require("../lib/errors");
|
|
14
14
|
const discover_1 = require("../plugins/discover");
|
|
15
|
-
const vocabulary_1 = require("
|
|
15
|
+
const vocabulary_1 = require("./vocabulary");
|
|
16
16
|
/** The `--vocabulary` value that opts a site out of splicing entirely. */
|
|
17
17
|
exports.VOCABULARY_NONE = "none";
|
|
18
18
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* → 67%+ with CDP mouseMoved + scroll dispatched during the poll loop.
|
|
8
8
|
*/
|
|
9
9
|
import type { Page } from "@browserbasehq/stagehand";
|
|
10
|
-
import type { FrameTarget } from "
|
|
10
|
+
import type { FrameTarget } from "./frame-target";
|
|
11
11
|
/**
|
|
12
12
|
* Dispatches two synthetic mouseMoved CDP events and a window.scrollBy(0,50)
|
|
13
13
|
* on `page`, or on `frameTarget` when given a `FrameTarget` bound to a
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* `TWOCAPTCHA_API_KEY`. Kept generic (no site/plugin naming) so it stays
|
|
6
6
|
* usable by any captcha-gated flow, not just the one that motivated it.
|
|
7
7
|
*/
|
|
8
|
-
import type { FetchImpl } from "
|
|
8
|
+
import type { FetchImpl } from "./raw-fetch";
|
|
9
9
|
/** Captcha types `solveCaptcha` can be asked to solve. Only invisible hCaptcha is implemented today. */
|
|
10
10
|
export type CaptchaType = "hcaptcha";
|
|
11
11
|
/** Input to {@link solveCaptcha}. */
|