@enricai/barnacle 1.6.1 → 1.6.3
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 +36 -29
- package/dist/api/errors.d.ts +3 -3
- package/dist/api/errors.d.ts.map +1 -1
- package/dist/api/errors.js +4 -4
- package/dist/api/errors.js.map +1 -1
- package/dist/api/helpers/reply.d.ts +1 -1
- package/dist/api/helpers/reply.js +1 -1
- package/dist/cache/keyed-ttl-cache.d.ts +4 -4
- package/dist/cache/keyed-ttl-cache.js +2 -2
- package/dist/lib/applicant-payload.d.ts +4 -4
- package/dist/lib/applicant-payload.js +4 -4
- package/dist/lib/application-address.d.ts +3 -3
- package/dist/lib/application-address.js +5 -5
- package/dist/lib/application-address.js.map +1 -1
- package/dist/lib/application-resume.d.ts +4 -4
- package/dist/lib/application-resume.js +4 -4
- package/dist/lib/dispatch-metrics.js +1 -1
- package/dist/lib/llm/judges/verify-submit.d.ts +1 -1
- package/dist/lib/llm/judges/verify-submit.js +1 -1
- package/dist/lib/llm/schemas.js +3 -3
- package/dist/lib/phone.d.ts +1 -1
- package/dist/lib/phone.js +1 -1
- package/dist/lib/telemetry/call-types.d.ts +1 -1
- package/dist/lib/telemetry/call-types.js +1 -1
- package/dist/lib/tracking-click.d.ts +5 -3
- package/dist/lib/tracking-click.d.ts.map +1 -1
- package/dist/lib/tracking-click.js +5 -3
- package/dist/lib/tracking-click.js.map +1 -1
- package/dist/lib/us-states.d.ts +1 -1
- package/dist/lib/us-states.js +1 -1
- package/dist/plugins/loader.js +2 -2
- package/dist/scraper/cookie-jar.d.ts +2 -2
- package/dist/scraper/cookie-jar.js +2 -2
- package/dist/scraper/deep-query.d.ts +36 -0
- package/dist/scraper/deep-query.d.ts.map +1 -0
- package/dist/scraper/deep-query.js +87 -0
- package/dist/scraper/deep-query.js.map +1 -0
- package/dist/scraper/errors.d.ts +12 -14
- package/dist/scraper/errors.d.ts.map +1 -1
- package/dist/scraper/errors.js +12 -17
- package/dist/scraper/errors.js.map +1 -1
- package/dist/scraper/flow-runner.d.ts +97 -30
- package/dist/scraper/flow-runner.d.ts.map +1 -1
- package/dist/scraper/flow-runner.js +304 -104
- package/dist/scraper/flow-runner.js.map +1 -1
- package/dist/scraper/http-client.d.ts +11 -1
- package/dist/scraper/http-client.d.ts.map +1 -1
- package/dist/scraper/http-client.js +90 -3
- package/dist/scraper/http-client.js.map +1 -1
- package/dist/scraper/phantom-click.d.ts +45 -0
- package/dist/scraper/phantom-click.d.ts.map +1 -0
- package/dist/scraper/phantom-click.js +37 -0
- package/dist/scraper/phantom-click.js.map +1 -0
- package/dist/scraper/raw-fetch.d.ts +2 -2
- package/dist/scraper/raw-fetch.js +1 -1
- package/dist/scraper/require-response-field.d.ts +1 -1
- package/dist/scraper/require-response-field.js +1 -1
- package/dist/scraper/session-browserbase.d.ts +48 -0
- package/dist/scraper/session-browserbase.d.ts.map +1 -1
- package/dist/scraper/session-browserbase.js +10 -5
- package/dist/scraper/session-browserbase.js.map +1 -1
- package/dist/scraper/session-shared.d.ts +6 -0
- package/dist/scraper/session-shared.d.ts.map +1 -1
- package/dist/scraper/session-shared.js.map +1 -1
- package/dist/scraper/session-warmup.d.ts +1 -1
- package/dist/scraper/session-warmup.js +1 -1
- package/dist/scraper/submit-control.d.ts +51 -0
- package/dist/scraper/submit-control.d.ts.map +1 -0
- package/dist/scraper/submit-control.js +142 -0
- package/dist/scraper/submit-control.js.map +1 -0
- package/dist/scripts/migrate-telemetry-dir-names.d.ts +2 -2
- package/dist/scripts/migrate-telemetry-dir-names.d.ts.map +1 -1
- package/dist/scripts/migrate-telemetry-dir-names.js +1 -1
- package/dist/scripts/recon-browser.d.ts +25 -20
- package/dist/scripts/recon-browser.d.ts.map +1 -1
- package/dist/scripts/recon-browser.js +65 -56
- package/dist/scripts/recon-browser.js.map +1 -1
- package/dist/scripts/recon-generate.d.ts +52 -7
- package/dist/scripts/recon-generate.d.ts.map +1 -1
- package/dist/scripts/recon-generate.js +73 -31
- package/dist/scripts/recon-generate.js.map +1 -1
- package/dist/scripts/recon-http.d.ts +36 -5
- package/dist/scripts/recon-http.d.ts.map +1 -1
- package/dist/scripts/recon-http.js +77 -47
- package/dist/scripts/recon-http.js.map +1 -1
- package/dist/scripts/recon-replay-jobs.d.ts +32 -3
- package/dist/scripts/recon-replay-jobs.d.ts.map +1 -1
- package/dist/scripts/recon-replay-jobs.js +46 -29
- package/dist/scripts/recon-replay-jobs.js.map +1 -1
- package/dist/scripts/recon-shared.d.ts +45 -0
- package/dist/scripts/recon-shared.d.ts.map +1 -1
- package/dist/scripts/recon-shared.js +117 -0
- package/dist/scripts/recon-shared.js.map +1 -1
- package/dist/scripts/recon-summarize.d.ts +5 -1
- package/dist/scripts/recon-summarize.d.ts.map +1 -1
- package/dist/scripts/recon-summarize.js +19 -7
- package/dist/scripts/recon-summarize.js.map +1 -1
- package/dist/site-plugin.d.ts +4 -4
- package/dist/testing/persona-fixture.d.ts +4 -4
- package/dist/testing/persona-fixture.d.ts.map +1 -1
- package/dist/testing/persona-fixture.js +4 -4
- package/dist/testing/persona-fixture.js.map +1 -1
- package/dist/types/dispatch-metrics.d.ts +1 -1
- package/dist/types/dispatch-metrics.js +1 -1
- package/package.json +1 -1
|
@@ -6,15 +6,108 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.COOKIES_DIR = exports.STEP_FAILURES_DIR = exports.AUX_DIR = exports.REPLAYS_DIR = exports.CAPTURES_DIR = void 0;
|
|
9
|
+
exports.resolveReconRunDir = resolveReconRunDir;
|
|
10
|
+
exports.resolveLatestReconRunRoot = resolveLatestReconRunRoot;
|
|
9
11
|
exports.readJsonDir = readJsonDir;
|
|
12
|
+
exports.readSuccessUrlFragments = readSuccessUrlFragments;
|
|
10
13
|
exports.tallyResponseHeaders = tallyResponseHeaders;
|
|
14
|
+
const node_crypto_1 = require("node:crypto");
|
|
11
15
|
const node_fs_1 = require("node:fs");
|
|
12
16
|
const node_path_1 = require("node:path");
|
|
17
|
+
const date_fns_1 = require("date-fns");
|
|
18
|
+
const logging_1 = require("../lib/logging");
|
|
19
|
+
const logger = (0, logging_1.getScriptLogger)("recon-shared");
|
|
20
|
+
/**
|
|
21
|
+
* Legacy process-global paths, kept exported for back-compat since
|
|
22
|
+
* `recon-shared` is a published package subpath. New callers should use
|
|
23
|
+
* {@link resolveReconRunDir} instead — these do not get per-run namespacing.
|
|
24
|
+
*/
|
|
13
25
|
exports.CAPTURES_DIR = "/tmp/recon/graphql";
|
|
14
26
|
exports.REPLAYS_DIR = "/tmp/recon/replays";
|
|
15
27
|
exports.AUX_DIR = "/tmp/recon/aux";
|
|
16
28
|
exports.STEP_FAILURES_DIR = "/tmp/recon/step-failures";
|
|
17
29
|
exports.COOKIES_DIR = "/tmp/recon/cookies";
|
|
30
|
+
/** Subdirectory names created under every resolved recon run root. */
|
|
31
|
+
const RUN_SUBDIRS = ["graphql", "cookies", "replays", "aux", "step-failures"];
|
|
32
|
+
/** Memoized so repeated calls within one process share a single run root and runId. */
|
|
33
|
+
let memoizedRunDir = null;
|
|
34
|
+
function generateRunId() {
|
|
35
|
+
const timestamp = (0, date_fns_1.format)(new Date(), "yyyyMMdd-HHmmss");
|
|
36
|
+
const suffix = (0, node_crypto_1.randomUUID)().replace(/-/g, "").slice(0, 4);
|
|
37
|
+
return `${timestamp}-${suffix}`;
|
|
38
|
+
}
|
|
39
|
+
/** Base directory every recon run is rooted under; `RECON_OUT_DIR` overrides the `/tmp/recon` default. */
|
|
40
|
+
function reconOutBaseDir() {
|
|
41
|
+
return process.env.RECON_OUT_DIR || "/tmp/recon";
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolves (and creates) the run-scoped root directory recon scripts should
|
|
45
|
+
* write output under, namespacing every run so concurrent or repeated runs
|
|
46
|
+
* stop silently colliding in a shared `/tmp/recon` tree. Memoized per
|
|
47
|
+
* process so a run's counter-based filenames stay in one namespace across
|
|
48
|
+
* every call site.
|
|
49
|
+
*
|
|
50
|
+
* `RECON_RUN_ID` pins a deterministic runId (e.g. for tests or replays of a
|
|
51
|
+
* known run); `RECON_OUT_DIR` overrides the base directory runs are rooted
|
|
52
|
+
* under (default `/tmp/recon`).
|
|
53
|
+
*/
|
|
54
|
+
function resolveReconRunDir() {
|
|
55
|
+
if (memoizedRunDir) {
|
|
56
|
+
return memoizedRunDir;
|
|
57
|
+
}
|
|
58
|
+
const runId = process.env.RECON_RUN_ID || generateRunId();
|
|
59
|
+
const baseDir = reconOutBaseDir();
|
|
60
|
+
const root = (0, node_path_1.join)(baseDir, runId);
|
|
61
|
+
const runDir = {
|
|
62
|
+
runId,
|
|
63
|
+
root,
|
|
64
|
+
graphqlDir: (0, node_path_1.join)(root, "graphql"),
|
|
65
|
+
cookiesDir: (0, node_path_1.join)(root, "cookies"),
|
|
66
|
+
replaysDir: (0, node_path_1.join)(root, "replays"),
|
|
67
|
+
auxDir: (0, node_path_1.join)(root, "aux"),
|
|
68
|
+
stepFailuresDir: (0, node_path_1.join)(root, "step-failures"),
|
|
69
|
+
};
|
|
70
|
+
for (const subdir of RUN_SUBDIRS) {
|
|
71
|
+
(0, node_fs_1.mkdirSync)((0, node_path_1.join)(root, subdir), { recursive: true });
|
|
72
|
+
}
|
|
73
|
+
logger.info(`resolved recon run dir: runId=${runId}, root=${root}`);
|
|
74
|
+
memoizedRunDir = runDir;
|
|
75
|
+
return memoizedRunDir;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Resolves the run root a reader (recon-generate, recon-summarize) should
|
|
79
|
+
* read from: an explicit `runDir` wins, `RECON_RUN_ID` pins a specific run
|
|
80
|
+
* under the base dir, and otherwise this picks the most recently modified
|
|
81
|
+
* run subdirectory — the run root recon-browser/recon-http just wrote to —
|
|
82
|
+
* so the existing "recon, then generate" two-command workflow keeps working
|
|
83
|
+
* without operators passing a run dir by hand.
|
|
84
|
+
*/
|
|
85
|
+
function resolveLatestReconRunRoot(runDir) {
|
|
86
|
+
if (runDir)
|
|
87
|
+
return runDir;
|
|
88
|
+
const baseDir = reconOutBaseDir();
|
|
89
|
+
if (process.env.RECON_RUN_ID)
|
|
90
|
+
return (0, node_path_1.join)(baseDir, process.env.RECON_RUN_ID);
|
|
91
|
+
const candidates = (() => {
|
|
92
|
+
try {
|
|
93
|
+
return (0, node_fs_1.readdirSync)(baseDir, { withFileTypes: true })
|
|
94
|
+
.filter((entry) => entry.isDirectory())
|
|
95
|
+
.map((entry) => (0, node_path_1.join)(baseDir, entry.name));
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
return [];
|
|
99
|
+
}
|
|
100
|
+
})();
|
|
101
|
+
const latest = candidates
|
|
102
|
+
.map((dir) => ({ dir, mtimeMs: (0, node_fs_1.statSync)(dir).mtimeMs }))
|
|
103
|
+
.sort((a, b) => b.mtimeMs - a.mtimeMs)[0]?.dir;
|
|
104
|
+
if (!latest) {
|
|
105
|
+
logger.info(`no recon run roots found under ${baseDir}; falling back to legacy path`);
|
|
106
|
+
return baseDir;
|
|
107
|
+
}
|
|
108
|
+
logger.info(`resolved latest recon run root: ${latest}`);
|
|
109
|
+
return latest;
|
|
110
|
+
}
|
|
18
111
|
function readJsonDir(dir, exclude = []) {
|
|
19
112
|
try {
|
|
20
113
|
return (0, node_fs_1.readdirSync)(dir)
|
|
@@ -26,6 +119,30 @@ function readJsonDir(dir, exclude = []) {
|
|
|
26
119
|
return [];
|
|
27
120
|
}
|
|
28
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Reads just `successUrlFragments` out of a recon flow file.
|
|
124
|
+
*
|
|
125
|
+
* Why a separate reader rather than reusing recon-browser's `parseReconFlow`:
|
|
126
|
+
* that parser exits the process on a malformed flow file, which is right for a
|
|
127
|
+
* recon run but wrong for the replay driver — a bad flow file must not abort a
|
|
128
|
+
* sweep over a field that only decorates the report. Returns `[]` for the legacy
|
|
129
|
+
* bare-array flow shape, and `[]` (with a warning) on any read/parse failure.
|
|
130
|
+
*/
|
|
131
|
+
function readSuccessUrlFragments(flowFile) {
|
|
132
|
+
try {
|
|
133
|
+
const parsed = JSON.parse((0, node_fs_1.readFileSync)(flowFile, "utf8"));
|
|
134
|
+
if (Array.isArray(parsed))
|
|
135
|
+
return [];
|
|
136
|
+
const fragments = parsed.successUrlFragments;
|
|
137
|
+
if (!Array.isArray(fragments))
|
|
138
|
+
return [];
|
|
139
|
+
return fragments.filter((f) => typeof f === "string" && f.length > 0);
|
|
140
|
+
}
|
|
141
|
+
catch (err) {
|
|
142
|
+
logger.warn(`flow file '${flowFile}' unreadable for successUrlFragments, terminal-URL detection disabled: ${err instanceof Error ? err.message : String(err)}`);
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
}
|
|
29
146
|
/**
|
|
30
147
|
* Counts how often each response header appears across successful replays.
|
|
31
148
|
* Infrastructure headers that are never load-bearing on the request side are
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recon-shared.js","sourceRoot":"","sources":["../../src/scripts/recon-shared.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"recon-shared.js","sourceRoot":"","sources":["../../src/scripts/recon-shared.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;AAEH,6CAAyC;AACzC,qCAAyE;AACzE,yCAAiC;AAEjC,uCAAkC;AAElC,2CAAgD;AAEhD,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,cAAc,CAAC,CAAC;AAE/C;;;;GAIG;AACU,QAAA,YAAY,GAAG,oBAAoB,CAAC;AACpC,QAAA,WAAW,GAAG,oBAAoB,CAAC;AACnC,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAC3B,QAAA,iBAAiB,GAAG,0BAA0B,CAAC;AAC/C,QAAA,WAAW,GAAG,oBAAoB,CAAC;AAEhD,sEAAsE;AACtE,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK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AAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -5,11 +5,15 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Usage:
|
|
7
7
|
* pnpm tsx src/scripts/recon-summarize.ts \
|
|
8
|
-
* [--site-id <id>] [--out docs/target-recon.md]
|
|
8
|
+
* [--site-id <id>] [--out docs/target-recon.md] [--run-dir <path>]
|
|
9
9
|
*
|
|
10
10
|
* When --site-id is provided, path placeholders in the output (src/sites/<id>/...)
|
|
11
11
|
* are replaced with the real site ID and the default output path becomes
|
|
12
12
|
* docs/<site-id>-recon.md.
|
|
13
|
+
*
|
|
14
|
+
* --run-dir selects which run root to read; defaults to the most recently
|
|
15
|
+
* modified run root under the recon output base dir (see
|
|
16
|
+
* {@link resolveLatestReconRunRoot}).
|
|
13
17
|
*/
|
|
14
18
|
export {};
|
|
15
19
|
//# sourceMappingURL=recon-summarize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recon-summarize.d.ts","sourceRoot":"","sources":["../../src/scripts/recon-summarize.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"recon-summarize.d.ts","sourceRoot":"","sources":["../../src/scripts/recon-summarize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|
|
@@ -6,11 +6,15 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
8
|
* pnpm tsx src/scripts/recon-summarize.ts \
|
|
9
|
-
* [--site-id <id>] [--out docs/target-recon.md]
|
|
9
|
+
* [--site-id <id>] [--out docs/target-recon.md] [--run-dir <path>]
|
|
10
10
|
*
|
|
11
11
|
* When --site-id is provided, path placeholders in the output (src/sites/<id>/...)
|
|
12
12
|
* are replaced with the real site ID and the default output path becomes
|
|
13
13
|
* docs/<site-id>-recon.md.
|
|
14
|
+
*
|
|
15
|
+
* --run-dir selects which run root to read; defaults to the most recently
|
|
16
|
+
* modified run root under the recon output base dir (see
|
|
17
|
+
* {@link resolveLatestReconRunRoot}).
|
|
14
18
|
*/
|
|
15
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
20
|
const node_fs_1 = require("node:fs");
|
|
@@ -32,22 +36,30 @@ async function main() {
|
|
|
32
36
|
const args = process.argv.slice(2);
|
|
33
37
|
let siteId = PLACEHOLDER_ID;
|
|
34
38
|
let outPath = null;
|
|
39
|
+
let runDir;
|
|
35
40
|
for (let i = 0; i < args.length; i++) {
|
|
36
41
|
if (args[i] === "--site-id" && args[i + 1])
|
|
37
42
|
siteId = args[++i];
|
|
38
43
|
else if (args[i] === "--out" && args[i + 1])
|
|
39
44
|
outPath = args[++i];
|
|
45
|
+
else if (args[i] === "--run-dir" && args[i + 1])
|
|
46
|
+
runDir = args[++i];
|
|
40
47
|
}
|
|
41
48
|
// Default output path is scoped to site ID when one is provided.
|
|
42
49
|
outPath ??= siteId !== PLACEHOLDER_ID ? `docs/${siteId}-recon.md` : DEFAULT_OUT;
|
|
43
|
-
const
|
|
44
|
-
|
|
50
|
+
const runRoot = (0, recon_shared_1.resolveLatestReconRunRoot)(runDir);
|
|
51
|
+
logger.info(`reading recon artifacts from ${runRoot}`);
|
|
52
|
+
const capturesDir = (0, node_path_1.join)(runRoot, "graphql");
|
|
53
|
+
const replaysDir = (0, node_path_1.join)(runRoot, "replays");
|
|
54
|
+
const auxDir = (0, node_path_1.join)(runRoot, "aux");
|
|
55
|
+
const captures = (0, recon_shared_1.readJsonDir)(capturesDir);
|
|
56
|
+
const replays = (0, recon_shared_1.readJsonDir)(replaysDir, [
|
|
45
57
|
"rate-limit.json",
|
|
46
58
|
"introspection-schema.json",
|
|
47
59
|
]);
|
|
48
60
|
const rateLimitRaw = (() => {
|
|
49
61
|
try {
|
|
50
|
-
return JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(
|
|
62
|
+
return JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(replaysDir, "rate-limit.json"), "utf8"));
|
|
51
63
|
}
|
|
52
64
|
catch {
|
|
53
65
|
return [];
|
|
@@ -55,7 +67,7 @@ async function main() {
|
|
|
55
67
|
})();
|
|
56
68
|
const auxFiles = (() => {
|
|
57
69
|
try {
|
|
58
|
-
return (0, node_fs_1.readdirSync)(
|
|
70
|
+
return (0, node_fs_1.readdirSync)(auxDir)
|
|
59
71
|
.filter((f) => f.endsWith(".json"))
|
|
60
72
|
.sort();
|
|
61
73
|
}
|
|
@@ -201,7 +213,7 @@ async function main() {
|
|
|
201
213
|
auxFiles.length === 0
|
|
202
214
|
? "_No auxiliary fixtures detected. Run Phase 3B (recon-http.ts) to probe static endpoints._"
|
|
203
215
|
: [
|
|
204
|
-
`_Downloaded to \`${
|
|
216
|
+
`_Downloaded to \`${auxDir}\` — commit each as a static fixture in \`src/sites/<id>/fixtures/\`._`,
|
|
205
217
|
``,
|
|
206
218
|
...auxFiles.map((f) => `- \`${f}\` — commit as \`src/sites/<id>/fixtures/${f}\``),
|
|
207
219
|
].join("\n"),
|
|
@@ -214,7 +226,7 @@ async function main() {
|
|
|
214
226
|
`## Maintenance`,
|
|
215
227
|
``,
|
|
216
228
|
`When smoke test fails: re-run \`pnpm tsx src/scripts/recon-browser.ts\` → diff`,
|
|
217
|
-
|
|
229
|
+
`\`${capturesDir}/*<operationName>*.json\` against \`src/sites/<id>/contract.ts\``,
|
|
218
230
|
`→ update query / headers / Zod schema → ship.`,
|
|
219
231
|
``,
|
|
220
232
|
`---`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recon-summarize.js","sourceRoot":"","sources":["../../src/scripts/recon-summarize.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"recon-summarize.js","sourceRoot":"","sources":["../../src/scripts/recon-summarize.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;AAEH,qCAA8E;AAC9E,yCAA0C;AAE1C,yCAA8C;AAC9C,2CAAgD;AAChD,yDAOgC;AAEhC,MAAM,MAAM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|
package/dist/site-plugin.d.ts
CHANGED
|
@@ -106,8 +106,8 @@ export interface SitePluginMeta {
|
|
|
106
106
|
/**
|
|
107
107
|
* When true, sessions allocated for this plugin's browser fallback opt
|
|
108
108
|
* into Browserbase's Scale Plan stealth profile (Windows desktop fingerprint
|
|
109
|
-
* + solveCaptchas). DataDome-protected flows
|
|
110
|
-
*
|
|
109
|
+
* + solveCaptchas). DataDome-protected flows need this to clear the
|
|
110
|
+
* silent fingerprint wall. Defaults to
|
|
111
111
|
* false to avoid the cost penalty on plugins that don't need it.
|
|
112
112
|
*/
|
|
113
113
|
advancedStealth?: boolean;
|
|
@@ -189,8 +189,8 @@ export interface SitePluginResult<TData = Record<string, unknown>> {
|
|
|
189
189
|
auditPayload?: Record<string, unknown>;
|
|
190
190
|
/**
|
|
191
191
|
* Step-level dispatch metrics attached by core after finalize(). Included in
|
|
192
|
-
* the response envelope so
|
|
193
|
-
* warehouse analysis.
|
|
192
|
+
* the response envelope so the caller can forward into Segment events for
|
|
193
|
+
* A/B warehouse analysis.
|
|
194
194
|
*/
|
|
195
195
|
metrics?: DispatchMetrics;
|
|
196
196
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Standard test persona used by recon runs + integration tests. Centralised
|
|
3
3
|
* so every plugin uses the same identity (helps cross-site audit-log
|
|
4
4
|
* correlation) and so we change it in one place when a field gets rejected
|
|
5
|
-
* by a new validator (e.g. the 555 → 310 phone-number swap during
|
|
6
|
-
*
|
|
5
|
+
* by a new validator (e.g. the 555 → 310 phone-number swap during a
|
|
6
|
+
* recon investigation).
|
|
7
7
|
*
|
|
8
8
|
* The Email field is intentionally omitted — callers should compose the
|
|
9
9
|
* payload by combining this fixture with a freshly allocated testmail.app
|
|
@@ -31,8 +31,8 @@ export declare const TEST_PERSONA: {
|
|
|
31
31
|
/** Full state name for forms that want the long form. */
|
|
32
32
|
readonly StateName: "Texas";
|
|
33
33
|
readonly PostalCode: "78701";
|
|
34
|
-
/** Texas county for Austin. Required by tenants
|
|
35
|
-
*
|
|
34
|
+
/** Texas county for Austin. Required by tenants that nest a County
|
|
35
|
+
* field inside the Address group. */
|
|
36
36
|
readonly County: "Travis County";
|
|
37
37
|
/** Long-form for `<select>`s that show country names. */
|
|
38
38
|
readonly CountryName: "United States";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persona-fixture.d.ts","sourceRoot":"","sources":["../../src/testing/persona-fixture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY;aACvB,SAAS,EAAE,UAAU;aACrB,QAAQ,EAAE,WAAW;IACrB;;;;;;;;;OASG;aACH,KAAK,EAAE,iBAAiB;aACxB,OAAO;iBACL,KAAK,EAAE,eAAe;iBACtB,IAAI,EAAE,QAAQ;QACd,gEAAgE;iBAChE,iBAAiB,EAAE,IAAI;QACvB,yDAAyD;iBACzD,SAAS,EAAE,OAAO;iBAClB,UAAU,EAAE,OAAO;QACnB;
|
|
1
|
+
{"version":3,"file":"persona-fixture.d.ts","sourceRoot":"","sources":["../../src/testing/persona-fixture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY;aACvB,SAAS,EAAE,UAAU;aACrB,QAAQ,EAAE,WAAW;IACrB;;;;;;;;;OASG;aACH,KAAK,EAAE,iBAAiB;aACxB,OAAO;iBACL,KAAK,EAAE,eAAe;iBACtB,IAAI,EAAE,QAAQ;QACd,gEAAgE;iBAChE,iBAAiB,EAAE,IAAI;QACvB,yDAAyD;iBACzD,SAAS,EAAE,OAAO;iBAClB,UAAU,EAAE,OAAO;QACnB;6CACqC;iBACrC,MAAM,EAAE,eAAe;QACvB,yDAAyD;iBACzD,WAAW,EAAE,eAAe;QAC5B,iDAAiD;iBACjD,WAAW,EAAE,IAAI;;IAEnB;;;;OAIG;aACH,GAAG,EAAE,aAAa;aAClB,WAAW,EAAE,YAAY;IACzB,gFAAgF;aAChF,UAAU;iBACR,KAAK,EAAE,+BAA+B;iBACtC,WAAW,EAAE,eAAe;iBAC5B,YAAY,EAAE,iBAAiB;iBAC/B,SAAS,EAAE,YAAY;iBACvB,OAAO,EAAE,YAAY;iBACrB,mBAAmB,EACjB,8FAA8F;;IAElG,+EAA+E;aAC/E,UAAU;iBAEN,SAAS,EAAE,KAAK;iBAChB,QAAQ,EAAE,OAAO;iBACjB,KAAK,EAAE,2BAA2B;iBAClC,KAAK,EAAE,iBAAiB;;iBAGxB,SAAS,EAAE,OAAO;iBAClB,QAAQ,EAAE,SAAS;iBACnB,KAAK,EAAE,+BAA+B;iBACtC,KAAK,EAAE,iBAAiB;;iBAGxB,SAAS,EAAE,QAAQ;iBACnB,QAAQ,EAAE,OAAO;iBACjB,KAAK,EAAE,8BAA8B;iBACrC,KAAK,EAAE,iBAAiB;;IAG5B,yDAAyD;aACzD,aAAa,EAAE,oBAAoB;CAC3B,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC"}
|
|
@@ -5,8 +5,8 @@ exports.TEST_PERSONA = void 0;
|
|
|
5
5
|
* Standard test persona used by recon runs + integration tests. Centralised
|
|
6
6
|
* so every plugin uses the same identity (helps cross-site audit-log
|
|
7
7
|
* correlation) and so we change it in one place when a field gets rejected
|
|
8
|
-
* by a new validator (e.g. the 555 → 310 phone-number swap during
|
|
9
|
-
*
|
|
8
|
+
* by a new validator (e.g. the 555 → 310 phone-number swap during a
|
|
9
|
+
* recon investigation).
|
|
10
10
|
*
|
|
11
11
|
* The Email field is intentionally omitted — callers should compose the
|
|
12
12
|
* payload by combining this fixture with a freshly allocated testmail.app
|
|
@@ -34,8 +34,8 @@ exports.TEST_PERSONA = {
|
|
|
34
34
|
/** Full state name for forms that want the long form. */
|
|
35
35
|
StateName: "Texas",
|
|
36
36
|
PostalCode: "78701",
|
|
37
|
-
/** Texas county for Austin. Required by tenants
|
|
38
|
-
*
|
|
37
|
+
/** Texas county for Austin. Required by tenants that nest a County
|
|
38
|
+
* field inside the Address group. */
|
|
39
39
|
County: "Travis County",
|
|
40
40
|
/** Long-form for `<select>`s that show country names. */
|
|
41
41
|
CountryName: "United States",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persona-fixture.js","sourceRoot":"","sources":["../../src/testing/persona-fixture.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACU,QAAA,YAAY,GAAG;IAC1B,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE,WAAW;IACrB;;;;;;;;;OASG;IACH,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE;QACP,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,QAAQ;QACd,gEAAgE;QAChE,iBAAiB,EAAE,IAAI;QACvB,yDAAyD;QACzD,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,OAAO;QACnB;
|
|
1
|
+
{"version":3,"file":"persona-fixture.js","sourceRoot":"","sources":["../../src/testing/persona-fixture.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACU,QAAA,YAAY,GAAG;IAC1B,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE,WAAW;IACrB;;;;;;;;;OASG;IACH,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE;QACP,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,QAAQ;QACd,gEAAgE;QAChE,iBAAiB,EAAE,IAAI;QACvB,yDAAyD;QACzD,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,OAAO;QACnB;6CACqC;QACrC,MAAM,EAAE,eAAe;QACvB,yDAAyD;QACzD,WAAW,EAAE,eAAe;QAC5B,iDAAiD;QACjD,WAAW,EAAE,IAAI;KAClB;IACD;;;;OAIG;IACH,GAAG,EAAE,aAAa;IAClB,WAAW,EAAE,YAAY;IACzB,gFAAgF;IAChF,UAAU,EAAE;QACV,KAAK,EAAE,+BAA+B;QACtC,WAAW,EAAE,eAAe;QAC5B,YAAY,EAAE,iBAAiB;QAC/B,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,YAAY;QACrB,mBAAmB,EACjB,8FAA8F;KACjG;IACD,+EAA+E;IAC/E,UAAU,EAAE;QACV;YACE,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,iBAAiB;SACzB;QACD;YACE,SAAS,EAAE,OAAO;YAClB,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,+BAA+B;YACtC,KAAK,EAAE,iBAAiB;SACzB;QACD;YACE,SAAS,EAAE,QAAQ;YACnB,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,8BAA8B;YACrC,KAAK,EAAE,iBAAiB;SACzB;KACF;IACD,yDAAyD;IACzD,aAAa,EAAE,oBAAoB;CAC3B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Structured metrics payload attached to dispatch responses so
|
|
2
|
+
* Structured metrics payload attached to dispatch responses so the caller can
|
|
3
3
|
* forward step-level detail into Segment events for A/B warehouse analysis.
|
|
4
4
|
*/
|
|
5
5
|
import { z } from "zod/v4";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Structured metrics payload attached to dispatch responses so
|
|
3
|
+
* Structured metrics payload attached to dispatch responses so the caller can
|
|
4
4
|
* forward step-level detail into Segment events for A/B warehouse analysis.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enricai/barnacle",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "Site-agnostic browser automation engine. POST a structured payload to a typed endpoint; Barnacle drives a Steel + Stagehand session through the target site and returns a structured result.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Enricai",
|