@reconcrap/boss-recommend-mcp 2.0.30 → 2.0.32

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.
@@ -5,10 +5,12 @@ import {
5
5
  measureTiming
6
6
  } from "../../core/run/timing.js";
7
7
  import { captureScrolledNodeScreenshots } from "../../core/capture/index.js";
8
+ import { waitForCvCaptureTarget } from "../../core/cv-capture-target/index.js";
8
9
  import {
9
10
  compactCvAcquisitionState,
10
11
  countParsedNetworkProfiles,
11
12
  createCvAcquisitionState,
13
+ DEFAULT_MAX_IMAGE_PAGES,
12
14
  getCvNetworkWaitPlan,
13
15
  recordCvImageFallback,
14
16
  recordCvNetworkHit,
@@ -148,7 +150,7 @@ export async function runRecruitWorkflow({
148
150
  resetBeforeSearch = true,
149
151
  resetTimeoutMs = 180000,
150
152
  cityOptionTimeoutMs = 30000,
151
- maxImagePages = 8,
153
+ maxImagePages = DEFAULT_MAX_IMAGE_PAGES,
152
154
  imageWheelDeltaY = 650,
153
155
  cvAcquisitionMode = "unknown",
154
156
  listMaxScrolls = 20,
@@ -434,15 +436,21 @@ export async function runRecruitWorkflow({
434
436
  const parsedNetworkProfileCount = countParsedNetworkProfiles(detailResult);
435
437
  let source = "network";
436
438
  let imageEvidence = null;
439
+ let captureTarget = null;
440
+ let captureTargetWait = null;
437
441
  if (parsedNetworkProfileCount > 0) {
438
442
  recordCvNetworkHit(cvAcquisitionState, {
439
443
  parsedNetworkProfileCount,
440
444
  waitResult: networkWait
441
445
  });
442
446
  } else {
443
- const captureNodeId = openedDetail.detail_state?.popup?.node_id
444
- || openedDetail.detail_state?.resumeIframe?.node_id
445
- || null;
447
+ captureTargetWait = await waitForCvCaptureTarget(client, openedDetail.detail_state, {
448
+ domain: "recruit",
449
+ timeoutMs: 6000,
450
+ intervalMs: 250
451
+ });
452
+ captureTarget = captureTargetWait.target || null;
453
+ const captureNodeId = captureTarget?.node_id || null;
446
454
  if (captureNodeId) {
447
455
  imageEvidence = await measureTiming(timings, "screenshot_capture_ms", () => captureScrolledNodeScreenshots(client, captureNodeId, {
448
456
  filePath: imageEvidenceFilePath({
@@ -456,8 +464,8 @@ export async function runRecruitWorkflow({
456
464
  quality: 72,
457
465
  optimize: true,
458
466
  resizeMaxWidth: 1100,
459
- captureViewport: true,
460
- padding: 4,
467
+ captureViewport: false,
468
+ padding: 0,
461
469
  maxScreenshots: maxImagePages,
462
470
  wheelDeltaY: imageWheelDeltaY,
463
471
  settleMs: 350,
@@ -475,7 +483,9 @@ export async function runRecruitWorkflow({
475
483
  capture_mode: "scroll_sequence",
476
484
  acquisition_reason: "network_miss_image_fallback",
477
485
  run_candidate_index: index,
478
- candidate_key: candidateKey
486
+ candidate_key: candidateKey,
487
+ capture_target: captureTarget,
488
+ capture_target_wait: captureTargetWait
479
489
  }
480
490
  }));
481
491
  source = "image";
@@ -506,7 +516,9 @@ export async function runRecruitWorkflow({
506
516
  wait_plan: waitPlan,
507
517
  network_wait: networkWait,
508
518
  parsed_network_profile_count: parsedNetworkProfileCount,
509
- image_evidence: summarizeImageEvidence(imageEvidence)
519
+ image_evidence: summarizeImageEvidence(imageEvidence),
520
+ capture_target: captureTarget || null,
521
+ capture_target_wait: captureTargetWait
510
522
  };
511
523
  screeningCandidate = detailResult.candidate;
512
524
  }
@@ -648,7 +660,7 @@ export function createRecruitRunService({
648
660
  resetBeforeSearch = true,
649
661
  resetTimeoutMs = 180000,
650
662
  cityOptionTimeoutMs = 30000,
651
- maxImagePages = 8,
663
+ maxImagePages = DEFAULT_MAX_IMAGE_PAGES,
652
664
  imageWheelDeltaY = 650,
653
665
  cvAcquisitionMode = "unknown",
654
666
  listMaxScrolls = 20,
package/src/index.js CHANGED
@@ -756,7 +756,7 @@ function createBossChatStartInputSchema({ requireFullInput = false } = {}) {
756
756
  max_image_pages: {
757
757
  type: "integer",
758
758
  minimum: 1,
759
- description: "可选,图片简历 fallback 的滚动截图页数上限"
759
+ description: "可选,图片简历 fallback 的滚动截图页数上限,默认 24"
760
760
  },
761
761
  list_max_scrolls: {
762
762
  type: "integer",
@@ -48,6 +48,7 @@ import {
48
48
  resolveBossConfiguredOutputDir,
49
49
  resolveBossScreeningConfig
50
50
  } from "./chat-runtime-config.js";
51
+ import { DEFAULT_MAX_IMAGE_PAGES } from "./core/cv-acquisition/index.js";
51
52
 
52
53
  const DEFAULT_RECOMMEND_HOST = "127.0.0.1";
53
54
  const DEFAULT_RECOMMEND_PORT = 9222;
@@ -1114,7 +1115,7 @@ function getRunOptions(args, parsed, normalized, session, configResolution = nul
1114
1115
  closeDetail: true,
1115
1116
  delayMs: parseNonNegativeInteger(args.delay_ms, 0),
1116
1117
  cardTimeoutMs: slowLive ? 180000 : 90000,
1117
- maxImagePages: parsePositiveInteger(args.max_image_pages, 8),
1118
+ maxImagePages: parsePositiveInteger(args.max_image_pages, DEFAULT_MAX_IMAGE_PAGES),
1118
1119
  imageWheelDeltaY: parsePositiveInteger(args.image_wheel_delta_y, 650),
1119
1120
  cvAcquisitionMode: normalizeText(args.cv_acquisition_mode) || "unknown",
1120
1121
  listMaxScrolls: parsePositiveInteger(args.list_max_scrolls, 20),
@@ -36,6 +36,7 @@ import {
36
36
  resolveBossConfiguredOutputDir,
37
37
  resolveBossScreeningConfig
38
38
  } from "./chat-runtime-config.js";
39
+ import { DEFAULT_MAX_IMAGE_PAGES } from "./core/cv-acquisition/index.js";
39
40
 
40
41
  const RUN_MODE_ASYNC = "async";
41
42
  const RUN_MODE_SYNC = "sync";
@@ -855,6 +856,7 @@ function getRunOptions(args, parsed, session, configResolution = null) {
855
856
  resetBeforeSearch: args.reset_search !== false,
856
857
  resetTimeoutMs: slowLive ? 300000 : 180000,
857
858
  cityOptionTimeoutMs: slowLive ? 60000 : 30000,
859
+ maxImagePages: parsePositiveInteger(args.max_image_pages, DEFAULT_MAX_IMAGE_PAGES),
858
860
  screeningMode,
859
861
  llmConfig: screeningMode === "llm" && configResolution?.ok ? {
860
862
  ...configResolution.config