@reconcrap/boss-recommend-mcp 2.0.47 → 2.0.48
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/bin/boss-recommend-mcp.js +4 -4
- package/config/screening-config.example.json +27 -27
- package/package.json +1 -1
- package/scripts/postinstall.cjs +44 -44
- package/skills/boss-chat/README.md +39 -39
- package/skills/boss-chat/SKILL.md +93 -93
- package/skills/boss-recommend-pipeline/README.md +12 -12
- package/skills/boss-recommend-pipeline/SKILL.md +180 -180
- package/skills/boss-recruit-pipeline/README.md +17 -17
- package/skills/boss-recruit-pipeline/SKILL.md +58 -58
- package/src/chat-mcp.js +1780 -1780
- package/src/chat-runtime-config.js +749 -749
- package/src/cli.js +3054 -3054
- package/src/core/boss-cards/index.js +199 -199
- package/src/core/browser/index.js +1586 -1453
- package/src/core/capture/index.js +1201 -1201
- package/src/core/cv-acquisition/index.js +238 -238
- package/src/core/cv-capture-target/index.js +299 -299
- package/src/core/greet-quota/index.js +54 -54
- package/src/core/infinite-list/index.js +1326 -1326
- package/src/core/reporting/legacy-csv.js +341 -341
- package/src/core/run/timing.js +33 -33
- package/src/core/self-heal/index.js +973 -973
- package/src/core/self-heal/viewport.js +564 -564
- package/src/domains/chat/cards.js +137 -137
- package/src/domains/chat/constants.js +221 -221
- package/src/domains/chat/detail.js +1668 -1668
- package/src/domains/chat/index.js +7 -7
- package/src/domains/chat/jobs.js +592 -592
- package/src/domains/chat/page-guard.js +98 -98
- package/src/domains/chat/roots.js +56 -56
- package/src/domains/chat/run-service.js +1977 -1977
- package/src/domains/recommend/actions.js +457 -457
- package/src/domains/recommend/cards.js +243 -243
- package/src/domains/recommend/constants.js +165 -165
- package/src/domains/recommend/filters.js +610 -610
- package/src/domains/recommend/index.js +10 -10
- package/src/domains/recommend/jobs.js +316 -316
- package/src/domains/recommend/refresh.js +472 -472
- package/src/domains/recommend/roots.js +80 -80
- package/src/domains/recommend/scopes.js +246 -246
- package/src/domains/recruit/actions.js +277 -277
- package/src/domains/recruit/cards.js +74 -74
- package/src/domains/recruit/constants.js +167 -167
- package/src/domains/recruit/detail.js +461 -461
- package/src/domains/recruit/index.js +9 -9
- package/src/domains/recruit/instruction-parser.js +451 -451
- package/src/domains/recruit/refresh.js +44 -44
- package/src/domains/recruit/roots.js +68 -68
- package/src/domains/recruit/run-service.js +1207 -1207
- package/src/domains/recruit/search.js +1202 -1202
- package/src/recommend-mcp.js +22 -22
- package/src/recruit-mcp.js +1338 -1338
|
@@ -1,461 +1,461 @@
|
|
|
1
|
-
import {
|
|
2
|
-
clickNodeCenter,
|
|
3
|
-
clickPoint,
|
|
4
|
-
DETERMINISTIC_CLICK_OPTIONS,
|
|
5
|
-
getFrameDocumentNodeId,
|
|
6
|
-
getNodeBox,
|
|
7
|
-
getOuterHTML,
|
|
8
|
-
pressKey,
|
|
9
|
-
querySelectorAll,
|
|
10
|
-
sleep
|
|
11
|
-
} from "../../core/browser/index.js";
|
|
12
|
-
import {
|
|
13
|
-
buildScreeningCandidateFromDetail,
|
|
14
|
-
htmlToText
|
|
15
|
-
} from "../../core/screening/index.js";
|
|
16
|
-
import {
|
|
17
|
-
RECRUIT_DETAIL_CLOSE_SELECTORS,
|
|
18
|
-
RECRUIT_DETAIL_NETWORK_PATTERNS,
|
|
19
|
-
RECRUIT_DETAIL_POPUP_SELECTORS,
|
|
20
|
-
RECRUIT_DETAIL_RESUME_IFRAME_SELECTORS
|
|
21
|
-
} from "./constants.js";
|
|
22
|
-
import {
|
|
23
|
-
getRecruitRoots
|
|
24
|
-
} from "./roots.js";
|
|
25
|
-
|
|
26
|
-
export function matchesRecruitDetailNetwork(url) {
|
|
27
|
-
return RECRUIT_DETAIL_NETWORK_PATTERNS.some((pattern) => pattern.test(String(url || "")));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function createRecruitDetailNetworkRecorder(client) {
|
|
31
|
-
const events = [];
|
|
32
|
-
client.Network.responseReceived((event) => {
|
|
33
|
-
const url = event?.response?.url || "";
|
|
34
|
-
if (!matchesRecruitDetailNetwork(url)) return;
|
|
35
|
-
events.push({
|
|
36
|
-
requestId: event.requestId,
|
|
37
|
-
url,
|
|
38
|
-
status: event.response?.status,
|
|
39
|
-
mimeType: event.response?.mimeType,
|
|
40
|
-
type: event.type
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
if (typeof client.Network.loadingFinished === "function") {
|
|
44
|
-
client.Network.loadingFinished((event) => {
|
|
45
|
-
const found = events.find((item) => item.requestId === event.requestId);
|
|
46
|
-
if (!found) return;
|
|
47
|
-
found.loading_finished = true;
|
|
48
|
-
found.encodedDataLength = event.encodedDataLength;
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
if (typeof client.Network.loadingFailed === "function") {
|
|
52
|
-
client.Network.loadingFailed((event) => {
|
|
53
|
-
const found = events.find((item) => item.requestId === event.requestId);
|
|
54
|
-
if (!found) return;
|
|
55
|
-
found.loading_failed = true;
|
|
56
|
-
found.loading_error = event.errorText || event.blockedReason || "Network loading failed";
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
events,
|
|
61
|
-
clear() {
|
|
62
|
-
events.length = 0;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export async function waitForRecruitDetailNetworkEvents(recorder, {
|
|
68
|
-
minCount = 1,
|
|
69
|
-
requireLoaded = true,
|
|
70
|
-
timeoutMs = 3500,
|
|
71
|
-
intervalMs = 100
|
|
72
|
-
} = {}) {
|
|
73
|
-
const started = Date.now();
|
|
74
|
-
const events = Array.isArray(recorder) ? recorder : recorder?.events || [];
|
|
75
|
-
let matching = [];
|
|
76
|
-
while (Date.now() - started <= timeoutMs) {
|
|
77
|
-
matching = events.filter((event) => (
|
|
78
|
-
!requireLoaded
|
|
79
|
-
|| event.loading_finished === true
|
|
80
|
-
|| event.loading_failed === true
|
|
81
|
-
));
|
|
82
|
-
if (matching.length >= minCount) {
|
|
83
|
-
return {
|
|
84
|
-
ok: true,
|
|
85
|
-
elapsed_ms: Date.now() - started,
|
|
86
|
-
count: matching.length,
|
|
87
|
-
events: matching
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
await sleep(intervalMs);
|
|
91
|
-
}
|
|
92
|
-
return {
|
|
93
|
-
ok: false,
|
|
94
|
-
elapsed_ms: Date.now() - started,
|
|
95
|
-
count: matching.length,
|
|
96
|
-
events: matching,
|
|
97
|
-
total_event_count: events.length
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export async function readRecruitDetailNetworkBodies(client, events = [], {
|
|
102
|
-
limit = 10
|
|
103
|
-
} = {}) {
|
|
104
|
-
const bodies = [];
|
|
105
|
-
for (const event of events.slice(0, limit)) {
|
|
106
|
-
try {
|
|
107
|
-
const body = await client.Network.getResponseBody({ requestId: event.requestId });
|
|
108
|
-
bodies.push({
|
|
109
|
-
...event,
|
|
110
|
-
body,
|
|
111
|
-
body_length: String(body?.body || "").length
|
|
112
|
-
});
|
|
113
|
-
} catch (error) {
|
|
114
|
-
bodies.push({
|
|
115
|
-
...event,
|
|
116
|
-
body_error: error?.message || String(error)
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
return bodies;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export async function waitForRecruitDetail(client, {
|
|
124
|
-
timeoutMs = 12000,
|
|
125
|
-
intervalMs = 250
|
|
126
|
-
} = {}) {
|
|
127
|
-
const started = Date.now();
|
|
128
|
-
let lastState = null;
|
|
129
|
-
while (Date.now() - started <= timeoutMs) {
|
|
130
|
-
const rootState = await getRecruitRoots(client);
|
|
131
|
-
const popup = await findVisibleDetailTarget(client, rootState.roots, RECRUIT_DETAIL_POPUP_SELECTORS);
|
|
132
|
-
const resumeIframe = await findVisibleDetailTarget(client, rootState.roots, RECRUIT_DETAIL_RESUME_IFRAME_SELECTORS);
|
|
133
|
-
lastState = {
|
|
134
|
-
iframe: rootState.iframe,
|
|
135
|
-
roots: rootState.roots,
|
|
136
|
-
popup,
|
|
137
|
-
resumeIframe
|
|
138
|
-
};
|
|
139
|
-
if (popup || resumeIframe) return lastState;
|
|
140
|
-
await sleep(intervalMs);
|
|
141
|
-
}
|
|
142
|
-
return lastState;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
async function findVisibleDetailTarget(client, roots, selectors) {
|
|
146
|
-
for (const root of roots) {
|
|
147
|
-
if (!root?.nodeId) continue;
|
|
148
|
-
for (const selector of selectors) {
|
|
149
|
-
const nodeIds = await querySelectorAll(client, root.nodeId, selector);
|
|
150
|
-
for (const nodeId of nodeIds) {
|
|
151
|
-
try {
|
|
152
|
-
const box = await getNodeBox(client, nodeId);
|
|
153
|
-
if (box.rect.width > 2 && box.rect.height > 2) {
|
|
154
|
-
return {
|
|
155
|
-
root: root.name,
|
|
156
|
-
root_node_id: root.nodeId,
|
|
157
|
-
selector,
|
|
158
|
-
node_id: nodeId,
|
|
159
|
-
center: box.center,
|
|
160
|
-
rect: box.rect
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
} catch {}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return null;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export async function readRecruitDetailHtml(client, detailState) {
|
|
171
|
-
let popupHTML = "";
|
|
172
|
-
let resumeHTML = "";
|
|
173
|
-
let resumeIframeDocumentNodeId = null;
|
|
174
|
-
|
|
175
|
-
if (detailState?.popup?.node_id) {
|
|
176
|
-
popupHTML = await getOuterHTML(client, detailState.popup.node_id);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (detailState?.resumeIframe?.node_id) {
|
|
180
|
-
resumeIframeDocumentNodeId = await getFrameDocumentNodeId(client, detailState.resumeIframe.node_id);
|
|
181
|
-
resumeHTML = await getOuterHTML(client, resumeIframeDocumentNodeId);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
return {
|
|
185
|
-
popupHTML,
|
|
186
|
-
resumeHTML,
|
|
187
|
-
resumeIframeDocumentNodeId,
|
|
188
|
-
popupText: htmlToText(popupHTML),
|
|
189
|
-
resumeText: htmlToText(resumeHTML)
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export async function waitForRecruitDetailContent(client, {
|
|
194
|
-
minTextLength = 200,
|
|
195
|
-
timeoutMs = 6000,
|
|
196
|
-
intervalMs = 200
|
|
197
|
-
} = {}) {
|
|
198
|
-
const started = Date.now();
|
|
199
|
-
let lastState = null;
|
|
200
|
-
let lastHtml = null;
|
|
201
|
-
let lastError = null;
|
|
202
|
-
while (Date.now() - started <= timeoutMs) {
|
|
203
|
-
try {
|
|
204
|
-
lastState = await waitForRecruitDetail(client, {
|
|
205
|
-
timeoutMs: 500,
|
|
206
|
-
intervalMs: 100
|
|
207
|
-
});
|
|
208
|
-
if (lastState?.popup || lastState?.resumeIframe) {
|
|
209
|
-
lastHtml = await readRecruitDetailHtml(client, lastState);
|
|
210
|
-
const textLength = (lastHtml.popupText || "").length + (lastHtml.resumeText || "").length;
|
|
211
|
-
if (textLength >= minTextLength) {
|
|
212
|
-
return {
|
|
213
|
-
ok: true,
|
|
214
|
-
elapsed_ms: Date.now() - started,
|
|
215
|
-
text_length: textLength,
|
|
216
|
-
detail_state: lastState,
|
|
217
|
-
detail_html: lastHtml
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
} catch (error) {
|
|
222
|
-
lastError = error;
|
|
223
|
-
}
|
|
224
|
-
await sleep(intervalMs);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
const textLength = (lastHtml?.popupText || "").length + (lastHtml?.resumeText || "").length;
|
|
228
|
-
return {
|
|
229
|
-
ok: false,
|
|
230
|
-
elapsed_ms: Date.now() - started,
|
|
231
|
-
text_length: textLength,
|
|
232
|
-
detail_state: lastState,
|
|
233
|
-
detail_html: lastHtml,
|
|
234
|
-
error: lastError?.message || null
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export async function openRecruitCardDetail(client, cardNodeId, {
|
|
239
|
-
timeoutMs = 12000
|
|
240
|
-
} = {}) {
|
|
241
|
-
const openedStarted = Date.now();
|
|
242
|
-
const attempts = [];
|
|
243
|
-
const clickStarted = Date.now();
|
|
244
|
-
const cardBox = await clickNodeCenter(client, cardNodeId, {
|
|
245
|
-
scrollIntoView: true
|
|
246
|
-
});
|
|
247
|
-
let candidateClickMs = Date.now() - clickStarted;
|
|
248
|
-
attempts.push({
|
|
249
|
-
mode: "card-center",
|
|
250
|
-
center: cardBox.center
|
|
251
|
-
});
|
|
252
|
-
const detailStarted = Date.now();
|
|
253
|
-
let detailState = await waitForRecruitDetail(client, { timeoutMs });
|
|
254
|
-
|
|
255
|
-
if (!detailState?.popup && !detailState?.resumeIframe) {
|
|
256
|
-
const fallbackClickStarted = Date.now();
|
|
257
|
-
const leftTitlePoint = {
|
|
258
|
-
x: cardBox.rect.x + Math.min(140, Math.max(40, cardBox.rect.width * 0.2)),
|
|
259
|
-
y: cardBox.rect.y + Math.min(42, Math.max(24, cardBox.rect.height * 0.28))
|
|
260
|
-
};
|
|
261
|
-
await clickPoint(client, leftTitlePoint.x, leftTitlePoint.y, {
|
|
262
|
-
clickCount: 2,
|
|
263
|
-
delayMs: 120
|
|
264
|
-
});
|
|
265
|
-
candidateClickMs += Date.now() - fallbackClickStarted;
|
|
266
|
-
attempts.push({
|
|
267
|
-
mode: "card-left-title-double-click",
|
|
268
|
-
center: leftTitlePoint
|
|
269
|
-
});
|
|
270
|
-
detailState = await waitForRecruitDetail(client, {
|
|
271
|
-
timeoutMs: Math.max(3000, Math.floor(timeoutMs / 2))
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
if (!detailState?.popup && !detailState?.resumeIframe) {
|
|
276
|
-
throw new Error("Recruit candidate detail did not open or no known detail selectors mounted");
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return {
|
|
280
|
-
card_box: cardBox,
|
|
281
|
-
open_attempts: attempts,
|
|
282
|
-
detail_state: detailState,
|
|
283
|
-
timings: {
|
|
284
|
-
candidate_click_ms: candidateClickMs,
|
|
285
|
-
detail_open_ms: Date.now() - detailStarted,
|
|
286
|
-
open_total_ms: Date.now() - openedStarted
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
export async function closeRecruitDetail(client, {
|
|
292
|
-
attemptsLimit = 3
|
|
293
|
-
} = {}) {
|
|
294
|
-
const attempts = [];
|
|
295
|
-
for (let index = 0; index < attemptsLimit; index += 1) {
|
|
296
|
-
const existingState = await waitForRecruitDetail(client, { timeoutMs: 500 });
|
|
297
|
-
if (!existingState?.popup && !existingState?.resumeIframe) {
|
|
298
|
-
return {
|
|
299
|
-
closed: true,
|
|
300
|
-
attempts
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
const rootState = await getRecruitRoots(client);
|
|
305
|
-
const closeTarget = await findVisibleCloseTarget(client, rootState.roots, RECRUIT_DETAIL_CLOSE_SELECTORS);
|
|
306
|
-
if (closeTarget) {
|
|
307
|
-
try {
|
|
308
|
-
if (closeTarget.center) {
|
|
309
|
-
await clickPoint(client, closeTarget.center.x, closeTarget.center.y, DETERMINISTIC_CLICK_OPTIONS);
|
|
310
|
-
} else {
|
|
311
|
-
await clickNodeCenter(client, closeTarget.node_id, DETERMINISTIC_CLICK_OPTIONS);
|
|
312
|
-
}
|
|
313
|
-
attempts.push({
|
|
314
|
-
mode: "close-selector",
|
|
315
|
-
selector: closeTarget.selector,
|
|
316
|
-
root: closeTarget.root
|
|
317
|
-
});
|
|
318
|
-
} catch (error) {
|
|
319
|
-
attempts.push({
|
|
320
|
-
mode: "close-selector-error",
|
|
321
|
-
selector: closeTarget.selector,
|
|
322
|
-
root: closeTarget.root,
|
|
323
|
-
error: error?.message || String(error)
|
|
324
|
-
});
|
|
325
|
-
await pressEscape(client);
|
|
326
|
-
attempts.push({ mode: "Escape-after-close-selector-error" });
|
|
327
|
-
}
|
|
328
|
-
await sleep(700);
|
|
329
|
-
} else {
|
|
330
|
-
await pressEscape(client);
|
|
331
|
-
attempts.push({ mode: "Escape" });
|
|
332
|
-
await sleep(700);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
let state = await waitForRecruitDetail(client, { timeoutMs: 1000 });
|
|
336
|
-
if (!state?.popup && !state?.resumeIframe) {
|
|
337
|
-
return {
|
|
338
|
-
closed: true,
|
|
339
|
-
attempts
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
await pressEscape(client);
|
|
344
|
-
attempts.push({ mode: "Escape-fallback" });
|
|
345
|
-
await sleep(700);
|
|
346
|
-
|
|
347
|
-
state = await waitForRecruitDetail(client, { timeoutMs: 1000 });
|
|
348
|
-
if (!state?.popup && !state?.resumeIframe) {
|
|
349
|
-
return {
|
|
350
|
-
closed: true,
|
|
351
|
-
attempts
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
return {
|
|
357
|
-
closed: false,
|
|
358
|
-
attempts
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
async function findVisibleCloseTarget(client, roots, selectors) {
|
|
363
|
-
let fallback = null;
|
|
364
|
-
for (const root of roots) {
|
|
365
|
-
if (!root?.nodeId) continue;
|
|
366
|
-
for (const selector of selectors) {
|
|
367
|
-
const nodeIds = await querySelectorAll(client, root.nodeId, selector);
|
|
368
|
-
for (const nodeId of nodeIds) {
|
|
369
|
-
const target = {
|
|
370
|
-
root: root.name,
|
|
371
|
-
root_node_id: root.nodeId,
|
|
372
|
-
selector,
|
|
373
|
-
node_id: nodeId
|
|
374
|
-
};
|
|
375
|
-
if (!fallback) fallback = target;
|
|
376
|
-
try {
|
|
377
|
-
const box = await getNodeBox(client, nodeId);
|
|
378
|
-
if (box.rect.width > 2 && box.rect.height > 2) {
|
|
379
|
-
return {
|
|
380
|
-
...target,
|
|
381
|
-
center: box.center,
|
|
382
|
-
rect: box.rect
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
} catch {}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
return fallback;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
async function pressEscape(client) {
|
|
393
|
-
await pressKey(client, "Escape", {
|
|
394
|
-
code: "Escape",
|
|
395
|
-
windowsVirtualKeyCode: 27,
|
|
396
|
-
nativeVirtualKeyCode: 27
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
export async function extractRecruitDetailCandidate(client, {
|
|
401
|
-
cardCandidate,
|
|
402
|
-
cardNodeId,
|
|
403
|
-
detailState,
|
|
404
|
-
detailHtml: providedDetailHtml = null,
|
|
405
|
-
networkEvents = [],
|
|
406
|
-
targetUrl = "",
|
|
407
|
-
closeDetail = true,
|
|
408
|
-
networkParseRetryMs = 1800,
|
|
409
|
-
networkParseIntervalMs = 250
|
|
410
|
-
} = {}) {
|
|
411
|
-
const detailHtml = providedDetailHtml || await readRecruitDetailHtml(client, detailState);
|
|
412
|
-
const detailText = [
|
|
413
|
-
detailHtml.popupText,
|
|
414
|
-
detailHtml.resumeText
|
|
415
|
-
].filter(Boolean).join("\n\n");
|
|
416
|
-
|
|
417
|
-
const parseStarted = Date.now();
|
|
418
|
-
let networkBodies = [];
|
|
419
|
-
let detailCandidateResult = null;
|
|
420
|
-
do {
|
|
421
|
-
networkBodies = await readRecruitDetailNetworkBodies(client, networkEvents);
|
|
422
|
-
detailCandidateResult = buildScreeningCandidateFromDetail({
|
|
423
|
-
domain: "recruit",
|
|
424
|
-
cardCandidate,
|
|
425
|
-
detailText,
|
|
426
|
-
networkBodies,
|
|
427
|
-
metadata: {
|
|
428
|
-
target_url: targetUrl,
|
|
429
|
-
card_node_id: cardNodeId,
|
|
430
|
-
detail_popup_selector: detailState?.popup?.selector || null,
|
|
431
|
-
detail_popup_root: detailState?.popup?.root || null,
|
|
432
|
-
resume_iframe_selector: detailState?.resumeIframe?.selector || null,
|
|
433
|
-
resume_iframe_root: detailState?.resumeIframe?.root || null,
|
|
434
|
-
resume_iframe_document_node_id: detailHtml.resumeIframeDocumentNodeId
|
|
435
|
-
}
|
|
436
|
-
});
|
|
437
|
-
if (detailCandidateResult.parsed_network_profiles.some((item) => item.ok)) break;
|
|
438
|
-
if (Date.now() - parseStarted >= Math.max(0, Number(networkParseRetryMs) || 0)) break;
|
|
439
|
-
await sleep(Math.max(50, Number(networkParseIntervalMs) || 250));
|
|
440
|
-
} while (true);
|
|
441
|
-
|
|
442
|
-
let closeResult = null;
|
|
443
|
-
if (closeDetail) {
|
|
444
|
-
closeResult = await closeRecruitDetail(client);
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
return {
|
|
448
|
-
candidate: detailCandidateResult.candidate,
|
|
449
|
-
parsed_network_profiles: detailCandidateResult.parsed_network_profiles,
|
|
450
|
-
network_bodies: networkBodies,
|
|
451
|
-
network_parse_retry_elapsed_ms: Date.now() - parseStarted,
|
|
452
|
-
network_event_count: networkEvents.length,
|
|
453
|
-
detail: {
|
|
454
|
-
popup_text: detailHtml.popupText,
|
|
455
|
-
resume_text: detailHtml.resumeText,
|
|
456
|
-
popup_html_length: detailHtml.popupHTML.length,
|
|
457
|
-
resume_html_length: detailHtml.resumeHTML.length
|
|
458
|
-
},
|
|
459
|
-
close_result: closeResult
|
|
460
|
-
};
|
|
461
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
clickNodeCenter,
|
|
3
|
+
clickPoint,
|
|
4
|
+
DETERMINISTIC_CLICK_OPTIONS,
|
|
5
|
+
getFrameDocumentNodeId,
|
|
6
|
+
getNodeBox,
|
|
7
|
+
getOuterHTML,
|
|
8
|
+
pressKey,
|
|
9
|
+
querySelectorAll,
|
|
10
|
+
sleep
|
|
11
|
+
} from "../../core/browser/index.js";
|
|
12
|
+
import {
|
|
13
|
+
buildScreeningCandidateFromDetail,
|
|
14
|
+
htmlToText
|
|
15
|
+
} from "../../core/screening/index.js";
|
|
16
|
+
import {
|
|
17
|
+
RECRUIT_DETAIL_CLOSE_SELECTORS,
|
|
18
|
+
RECRUIT_DETAIL_NETWORK_PATTERNS,
|
|
19
|
+
RECRUIT_DETAIL_POPUP_SELECTORS,
|
|
20
|
+
RECRUIT_DETAIL_RESUME_IFRAME_SELECTORS
|
|
21
|
+
} from "./constants.js";
|
|
22
|
+
import {
|
|
23
|
+
getRecruitRoots
|
|
24
|
+
} from "./roots.js";
|
|
25
|
+
|
|
26
|
+
export function matchesRecruitDetailNetwork(url) {
|
|
27
|
+
return RECRUIT_DETAIL_NETWORK_PATTERNS.some((pattern) => pattern.test(String(url || "")));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function createRecruitDetailNetworkRecorder(client) {
|
|
31
|
+
const events = [];
|
|
32
|
+
client.Network.responseReceived((event) => {
|
|
33
|
+
const url = event?.response?.url || "";
|
|
34
|
+
if (!matchesRecruitDetailNetwork(url)) return;
|
|
35
|
+
events.push({
|
|
36
|
+
requestId: event.requestId,
|
|
37
|
+
url,
|
|
38
|
+
status: event.response?.status,
|
|
39
|
+
mimeType: event.response?.mimeType,
|
|
40
|
+
type: event.type
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
if (typeof client.Network.loadingFinished === "function") {
|
|
44
|
+
client.Network.loadingFinished((event) => {
|
|
45
|
+
const found = events.find((item) => item.requestId === event.requestId);
|
|
46
|
+
if (!found) return;
|
|
47
|
+
found.loading_finished = true;
|
|
48
|
+
found.encodedDataLength = event.encodedDataLength;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if (typeof client.Network.loadingFailed === "function") {
|
|
52
|
+
client.Network.loadingFailed((event) => {
|
|
53
|
+
const found = events.find((item) => item.requestId === event.requestId);
|
|
54
|
+
if (!found) return;
|
|
55
|
+
found.loading_failed = true;
|
|
56
|
+
found.loading_error = event.errorText || event.blockedReason || "Network loading failed";
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
events,
|
|
61
|
+
clear() {
|
|
62
|
+
events.length = 0;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export async function waitForRecruitDetailNetworkEvents(recorder, {
|
|
68
|
+
minCount = 1,
|
|
69
|
+
requireLoaded = true,
|
|
70
|
+
timeoutMs = 3500,
|
|
71
|
+
intervalMs = 100
|
|
72
|
+
} = {}) {
|
|
73
|
+
const started = Date.now();
|
|
74
|
+
const events = Array.isArray(recorder) ? recorder : recorder?.events || [];
|
|
75
|
+
let matching = [];
|
|
76
|
+
while (Date.now() - started <= timeoutMs) {
|
|
77
|
+
matching = events.filter((event) => (
|
|
78
|
+
!requireLoaded
|
|
79
|
+
|| event.loading_finished === true
|
|
80
|
+
|| event.loading_failed === true
|
|
81
|
+
));
|
|
82
|
+
if (matching.length >= minCount) {
|
|
83
|
+
return {
|
|
84
|
+
ok: true,
|
|
85
|
+
elapsed_ms: Date.now() - started,
|
|
86
|
+
count: matching.length,
|
|
87
|
+
events: matching
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
await sleep(intervalMs);
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
ok: false,
|
|
94
|
+
elapsed_ms: Date.now() - started,
|
|
95
|
+
count: matching.length,
|
|
96
|
+
events: matching,
|
|
97
|
+
total_event_count: events.length
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export async function readRecruitDetailNetworkBodies(client, events = [], {
|
|
102
|
+
limit = 10
|
|
103
|
+
} = {}) {
|
|
104
|
+
const bodies = [];
|
|
105
|
+
for (const event of events.slice(0, limit)) {
|
|
106
|
+
try {
|
|
107
|
+
const body = await client.Network.getResponseBody({ requestId: event.requestId });
|
|
108
|
+
bodies.push({
|
|
109
|
+
...event,
|
|
110
|
+
body,
|
|
111
|
+
body_length: String(body?.body || "").length
|
|
112
|
+
});
|
|
113
|
+
} catch (error) {
|
|
114
|
+
bodies.push({
|
|
115
|
+
...event,
|
|
116
|
+
body_error: error?.message || String(error)
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return bodies;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export async function waitForRecruitDetail(client, {
|
|
124
|
+
timeoutMs = 12000,
|
|
125
|
+
intervalMs = 250
|
|
126
|
+
} = {}) {
|
|
127
|
+
const started = Date.now();
|
|
128
|
+
let lastState = null;
|
|
129
|
+
while (Date.now() - started <= timeoutMs) {
|
|
130
|
+
const rootState = await getRecruitRoots(client);
|
|
131
|
+
const popup = await findVisibleDetailTarget(client, rootState.roots, RECRUIT_DETAIL_POPUP_SELECTORS);
|
|
132
|
+
const resumeIframe = await findVisibleDetailTarget(client, rootState.roots, RECRUIT_DETAIL_RESUME_IFRAME_SELECTORS);
|
|
133
|
+
lastState = {
|
|
134
|
+
iframe: rootState.iframe,
|
|
135
|
+
roots: rootState.roots,
|
|
136
|
+
popup,
|
|
137
|
+
resumeIframe
|
|
138
|
+
};
|
|
139
|
+
if (popup || resumeIframe) return lastState;
|
|
140
|
+
await sleep(intervalMs);
|
|
141
|
+
}
|
|
142
|
+
return lastState;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
async function findVisibleDetailTarget(client, roots, selectors) {
|
|
146
|
+
for (const root of roots) {
|
|
147
|
+
if (!root?.nodeId) continue;
|
|
148
|
+
for (const selector of selectors) {
|
|
149
|
+
const nodeIds = await querySelectorAll(client, root.nodeId, selector);
|
|
150
|
+
for (const nodeId of nodeIds) {
|
|
151
|
+
try {
|
|
152
|
+
const box = await getNodeBox(client, nodeId);
|
|
153
|
+
if (box.rect.width > 2 && box.rect.height > 2) {
|
|
154
|
+
return {
|
|
155
|
+
root: root.name,
|
|
156
|
+
root_node_id: root.nodeId,
|
|
157
|
+
selector,
|
|
158
|
+
node_id: nodeId,
|
|
159
|
+
center: box.center,
|
|
160
|
+
rect: box.rect
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
} catch {}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export async function readRecruitDetailHtml(client, detailState) {
|
|
171
|
+
let popupHTML = "";
|
|
172
|
+
let resumeHTML = "";
|
|
173
|
+
let resumeIframeDocumentNodeId = null;
|
|
174
|
+
|
|
175
|
+
if (detailState?.popup?.node_id) {
|
|
176
|
+
popupHTML = await getOuterHTML(client, detailState.popup.node_id);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (detailState?.resumeIframe?.node_id) {
|
|
180
|
+
resumeIframeDocumentNodeId = await getFrameDocumentNodeId(client, detailState.resumeIframe.node_id);
|
|
181
|
+
resumeHTML = await getOuterHTML(client, resumeIframeDocumentNodeId);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return {
|
|
185
|
+
popupHTML,
|
|
186
|
+
resumeHTML,
|
|
187
|
+
resumeIframeDocumentNodeId,
|
|
188
|
+
popupText: htmlToText(popupHTML),
|
|
189
|
+
resumeText: htmlToText(resumeHTML)
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export async function waitForRecruitDetailContent(client, {
|
|
194
|
+
minTextLength = 200,
|
|
195
|
+
timeoutMs = 6000,
|
|
196
|
+
intervalMs = 200
|
|
197
|
+
} = {}) {
|
|
198
|
+
const started = Date.now();
|
|
199
|
+
let lastState = null;
|
|
200
|
+
let lastHtml = null;
|
|
201
|
+
let lastError = null;
|
|
202
|
+
while (Date.now() - started <= timeoutMs) {
|
|
203
|
+
try {
|
|
204
|
+
lastState = await waitForRecruitDetail(client, {
|
|
205
|
+
timeoutMs: 500,
|
|
206
|
+
intervalMs: 100
|
|
207
|
+
});
|
|
208
|
+
if (lastState?.popup || lastState?.resumeIframe) {
|
|
209
|
+
lastHtml = await readRecruitDetailHtml(client, lastState);
|
|
210
|
+
const textLength = (lastHtml.popupText || "").length + (lastHtml.resumeText || "").length;
|
|
211
|
+
if (textLength >= minTextLength) {
|
|
212
|
+
return {
|
|
213
|
+
ok: true,
|
|
214
|
+
elapsed_ms: Date.now() - started,
|
|
215
|
+
text_length: textLength,
|
|
216
|
+
detail_state: lastState,
|
|
217
|
+
detail_html: lastHtml
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
} catch (error) {
|
|
222
|
+
lastError = error;
|
|
223
|
+
}
|
|
224
|
+
await sleep(intervalMs);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const textLength = (lastHtml?.popupText || "").length + (lastHtml?.resumeText || "").length;
|
|
228
|
+
return {
|
|
229
|
+
ok: false,
|
|
230
|
+
elapsed_ms: Date.now() - started,
|
|
231
|
+
text_length: textLength,
|
|
232
|
+
detail_state: lastState,
|
|
233
|
+
detail_html: lastHtml,
|
|
234
|
+
error: lastError?.message || null
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export async function openRecruitCardDetail(client, cardNodeId, {
|
|
239
|
+
timeoutMs = 12000
|
|
240
|
+
} = {}) {
|
|
241
|
+
const openedStarted = Date.now();
|
|
242
|
+
const attempts = [];
|
|
243
|
+
const clickStarted = Date.now();
|
|
244
|
+
const cardBox = await clickNodeCenter(client, cardNodeId, {
|
|
245
|
+
scrollIntoView: true
|
|
246
|
+
});
|
|
247
|
+
let candidateClickMs = Date.now() - clickStarted;
|
|
248
|
+
attempts.push({
|
|
249
|
+
mode: "card-center",
|
|
250
|
+
center: cardBox.center
|
|
251
|
+
});
|
|
252
|
+
const detailStarted = Date.now();
|
|
253
|
+
let detailState = await waitForRecruitDetail(client, { timeoutMs });
|
|
254
|
+
|
|
255
|
+
if (!detailState?.popup && !detailState?.resumeIframe) {
|
|
256
|
+
const fallbackClickStarted = Date.now();
|
|
257
|
+
const leftTitlePoint = {
|
|
258
|
+
x: cardBox.rect.x + Math.min(140, Math.max(40, cardBox.rect.width * 0.2)),
|
|
259
|
+
y: cardBox.rect.y + Math.min(42, Math.max(24, cardBox.rect.height * 0.28))
|
|
260
|
+
};
|
|
261
|
+
await clickPoint(client, leftTitlePoint.x, leftTitlePoint.y, {
|
|
262
|
+
clickCount: 2,
|
|
263
|
+
delayMs: 120
|
|
264
|
+
});
|
|
265
|
+
candidateClickMs += Date.now() - fallbackClickStarted;
|
|
266
|
+
attempts.push({
|
|
267
|
+
mode: "card-left-title-double-click",
|
|
268
|
+
center: leftTitlePoint
|
|
269
|
+
});
|
|
270
|
+
detailState = await waitForRecruitDetail(client, {
|
|
271
|
+
timeoutMs: Math.max(3000, Math.floor(timeoutMs / 2))
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (!detailState?.popup && !detailState?.resumeIframe) {
|
|
276
|
+
throw new Error("Recruit candidate detail did not open or no known detail selectors mounted");
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return {
|
|
280
|
+
card_box: cardBox,
|
|
281
|
+
open_attempts: attempts,
|
|
282
|
+
detail_state: detailState,
|
|
283
|
+
timings: {
|
|
284
|
+
candidate_click_ms: candidateClickMs,
|
|
285
|
+
detail_open_ms: Date.now() - detailStarted,
|
|
286
|
+
open_total_ms: Date.now() - openedStarted
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export async function closeRecruitDetail(client, {
|
|
292
|
+
attemptsLimit = 3
|
|
293
|
+
} = {}) {
|
|
294
|
+
const attempts = [];
|
|
295
|
+
for (let index = 0; index < attemptsLimit; index += 1) {
|
|
296
|
+
const existingState = await waitForRecruitDetail(client, { timeoutMs: 500 });
|
|
297
|
+
if (!existingState?.popup && !existingState?.resumeIframe) {
|
|
298
|
+
return {
|
|
299
|
+
closed: true,
|
|
300
|
+
attempts
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const rootState = await getRecruitRoots(client);
|
|
305
|
+
const closeTarget = await findVisibleCloseTarget(client, rootState.roots, RECRUIT_DETAIL_CLOSE_SELECTORS);
|
|
306
|
+
if (closeTarget) {
|
|
307
|
+
try {
|
|
308
|
+
if (closeTarget.center) {
|
|
309
|
+
await clickPoint(client, closeTarget.center.x, closeTarget.center.y, DETERMINISTIC_CLICK_OPTIONS);
|
|
310
|
+
} else {
|
|
311
|
+
await clickNodeCenter(client, closeTarget.node_id, DETERMINISTIC_CLICK_OPTIONS);
|
|
312
|
+
}
|
|
313
|
+
attempts.push({
|
|
314
|
+
mode: "close-selector",
|
|
315
|
+
selector: closeTarget.selector,
|
|
316
|
+
root: closeTarget.root
|
|
317
|
+
});
|
|
318
|
+
} catch (error) {
|
|
319
|
+
attempts.push({
|
|
320
|
+
mode: "close-selector-error",
|
|
321
|
+
selector: closeTarget.selector,
|
|
322
|
+
root: closeTarget.root,
|
|
323
|
+
error: error?.message || String(error)
|
|
324
|
+
});
|
|
325
|
+
await pressEscape(client);
|
|
326
|
+
attempts.push({ mode: "Escape-after-close-selector-error" });
|
|
327
|
+
}
|
|
328
|
+
await sleep(700);
|
|
329
|
+
} else {
|
|
330
|
+
await pressEscape(client);
|
|
331
|
+
attempts.push({ mode: "Escape" });
|
|
332
|
+
await sleep(700);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
let state = await waitForRecruitDetail(client, { timeoutMs: 1000 });
|
|
336
|
+
if (!state?.popup && !state?.resumeIframe) {
|
|
337
|
+
return {
|
|
338
|
+
closed: true,
|
|
339
|
+
attempts
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
await pressEscape(client);
|
|
344
|
+
attempts.push({ mode: "Escape-fallback" });
|
|
345
|
+
await sleep(700);
|
|
346
|
+
|
|
347
|
+
state = await waitForRecruitDetail(client, { timeoutMs: 1000 });
|
|
348
|
+
if (!state?.popup && !state?.resumeIframe) {
|
|
349
|
+
return {
|
|
350
|
+
closed: true,
|
|
351
|
+
attempts
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
return {
|
|
357
|
+
closed: false,
|
|
358
|
+
attempts
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
async function findVisibleCloseTarget(client, roots, selectors) {
|
|
363
|
+
let fallback = null;
|
|
364
|
+
for (const root of roots) {
|
|
365
|
+
if (!root?.nodeId) continue;
|
|
366
|
+
for (const selector of selectors) {
|
|
367
|
+
const nodeIds = await querySelectorAll(client, root.nodeId, selector);
|
|
368
|
+
for (const nodeId of nodeIds) {
|
|
369
|
+
const target = {
|
|
370
|
+
root: root.name,
|
|
371
|
+
root_node_id: root.nodeId,
|
|
372
|
+
selector,
|
|
373
|
+
node_id: nodeId
|
|
374
|
+
};
|
|
375
|
+
if (!fallback) fallback = target;
|
|
376
|
+
try {
|
|
377
|
+
const box = await getNodeBox(client, nodeId);
|
|
378
|
+
if (box.rect.width > 2 && box.rect.height > 2) {
|
|
379
|
+
return {
|
|
380
|
+
...target,
|
|
381
|
+
center: box.center,
|
|
382
|
+
rect: box.rect
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
} catch {}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
return fallback;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
async function pressEscape(client) {
|
|
393
|
+
await pressKey(client, "Escape", {
|
|
394
|
+
code: "Escape",
|
|
395
|
+
windowsVirtualKeyCode: 27,
|
|
396
|
+
nativeVirtualKeyCode: 27
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export async function extractRecruitDetailCandidate(client, {
|
|
401
|
+
cardCandidate,
|
|
402
|
+
cardNodeId,
|
|
403
|
+
detailState,
|
|
404
|
+
detailHtml: providedDetailHtml = null,
|
|
405
|
+
networkEvents = [],
|
|
406
|
+
targetUrl = "",
|
|
407
|
+
closeDetail = true,
|
|
408
|
+
networkParseRetryMs = 1800,
|
|
409
|
+
networkParseIntervalMs = 250
|
|
410
|
+
} = {}) {
|
|
411
|
+
const detailHtml = providedDetailHtml || await readRecruitDetailHtml(client, detailState);
|
|
412
|
+
const detailText = [
|
|
413
|
+
detailHtml.popupText,
|
|
414
|
+
detailHtml.resumeText
|
|
415
|
+
].filter(Boolean).join("\n\n");
|
|
416
|
+
|
|
417
|
+
const parseStarted = Date.now();
|
|
418
|
+
let networkBodies = [];
|
|
419
|
+
let detailCandidateResult = null;
|
|
420
|
+
do {
|
|
421
|
+
networkBodies = await readRecruitDetailNetworkBodies(client, networkEvents);
|
|
422
|
+
detailCandidateResult = buildScreeningCandidateFromDetail({
|
|
423
|
+
domain: "recruit",
|
|
424
|
+
cardCandidate,
|
|
425
|
+
detailText,
|
|
426
|
+
networkBodies,
|
|
427
|
+
metadata: {
|
|
428
|
+
target_url: targetUrl,
|
|
429
|
+
card_node_id: cardNodeId,
|
|
430
|
+
detail_popup_selector: detailState?.popup?.selector || null,
|
|
431
|
+
detail_popup_root: detailState?.popup?.root || null,
|
|
432
|
+
resume_iframe_selector: detailState?.resumeIframe?.selector || null,
|
|
433
|
+
resume_iframe_root: detailState?.resumeIframe?.root || null,
|
|
434
|
+
resume_iframe_document_node_id: detailHtml.resumeIframeDocumentNodeId
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
if (detailCandidateResult.parsed_network_profiles.some((item) => item.ok)) break;
|
|
438
|
+
if (Date.now() - parseStarted >= Math.max(0, Number(networkParseRetryMs) || 0)) break;
|
|
439
|
+
await sleep(Math.max(50, Number(networkParseIntervalMs) || 250));
|
|
440
|
+
} while (true);
|
|
441
|
+
|
|
442
|
+
let closeResult = null;
|
|
443
|
+
if (closeDetail) {
|
|
444
|
+
closeResult = await closeRecruitDetail(client);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return {
|
|
448
|
+
candidate: detailCandidateResult.candidate,
|
|
449
|
+
parsed_network_profiles: detailCandidateResult.parsed_network_profiles,
|
|
450
|
+
network_bodies: networkBodies,
|
|
451
|
+
network_parse_retry_elapsed_ms: Date.now() - parseStarted,
|
|
452
|
+
network_event_count: networkEvents.length,
|
|
453
|
+
detail: {
|
|
454
|
+
popup_text: detailHtml.popupText,
|
|
455
|
+
resume_text: detailHtml.resumeText,
|
|
456
|
+
popup_html_length: detailHtml.popupHTML.length,
|
|
457
|
+
resume_html_length: detailHtml.resumeHTML.length
|
|
458
|
+
},
|
|
459
|
+
close_result: closeResult
|
|
460
|
+
};
|
|
461
|
+
}
|