@reconcrap/boss-recommend-mcp 2.1.22 → 2.1.24

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.
Files changed (66) hide show
  1. package/README.md +5 -0
  2. package/bin/boss-recommend-mcp.js +4 -4
  3. package/package.json +14 -8
  4. package/scripts/install-macos.sh +280 -280
  5. package/scripts/postinstall.cjs +44 -44
  6. package/skills/boss-chat/README.md +43 -42
  7. package/skills/boss-chat/SKILL.md +107 -106
  8. package/skills/boss-recommend-pipeline/README.md +13 -13
  9. package/skills/boss-recommend-pipeline/SKILL.md +47 -47
  10. package/skills/boss-recruit-pipeline/README.md +19 -19
  11. package/skills/boss-recruit-pipeline/SKILL.md +89 -89
  12. package/src/chat-mcp.js +301 -127
  13. package/src/core/boss-cards/index.js +199 -199
  14. package/src/core/browser/index.js +291 -114
  15. package/src/core/capture/index.js +2930 -1201
  16. package/src/core/cv-acquisition/index.js +512 -238
  17. package/src/core/cv-capture-target/index.js +513 -299
  18. package/src/core/greet-quota/index.js +71 -71
  19. package/src/core/infinite-list/index.js +11 -2
  20. package/src/core/reporting/legacy-csv.js +12 -12
  21. package/src/core/run/detached-launcher.js +305 -0
  22. package/src/core/run/index.js +112 -42
  23. package/src/core/run/timing.js +33 -33
  24. package/src/core/run/windows-detached-worker.ps1 +106 -0
  25. package/src/core/screening/index.js +2135 -2135
  26. package/src/core/self-heal/index.js +989 -973
  27. package/src/core/self-heal/viewport.js +1505 -564
  28. package/src/detached-worker.js +99 -99
  29. package/src/domains/chat/action-journal.js +443 -0
  30. package/src/domains/chat/cards.js +137 -137
  31. package/src/domains/chat/constants.js +9 -9
  32. package/src/domains/chat/detail.js +1684 -401
  33. package/src/domains/chat/index.js +8 -7
  34. package/src/domains/chat/jobs.js +620 -620
  35. package/src/domains/chat/page-guard.js +157 -122
  36. package/src/domains/chat/roots.js +56 -56
  37. package/src/domains/chat/run-service.js +1801 -760
  38. package/src/domains/common/account-rights-panel.js +314 -314
  39. package/src/domains/common/recovery-settle.js +159 -159
  40. package/src/domains/recommend/actions.js +515 -472
  41. package/src/domains/recommend/cards.js +243 -243
  42. package/src/domains/recommend/colleague-contact.js +333 -333
  43. package/src/domains/recommend/constants.js +92 -92
  44. package/src/domains/recommend/detail.js +12 -3
  45. package/src/domains/recommend/filters.js +611 -611
  46. package/src/domains/recommend/index.js +9 -9
  47. package/src/domains/recommend/jobs.js +542 -542
  48. package/src/domains/recommend/location.js +736 -736
  49. package/src/domains/recommend/refresh.js +410 -329
  50. package/src/domains/recommend/roots.js +80 -80
  51. package/src/domains/recommend/run-service.js +1783 -592
  52. package/src/domains/recommend/scopes.js +246 -246
  53. package/src/domains/recruit/actions.js +277 -277
  54. package/src/domains/recruit/cards.js +74 -74
  55. package/src/domains/recruit/constants.js +236 -236
  56. package/src/domains/recruit/detail.js +588 -588
  57. package/src/domains/recruit/index.js +9 -9
  58. package/src/domains/recruit/instruction-parser.js +866 -866
  59. package/src/domains/recruit/refresh.js +45 -45
  60. package/src/domains/recruit/roots.js +68 -68
  61. package/src/domains/recruit/run-service.js +1817 -1620
  62. package/src/domains/recruit/search.js +3229 -3229
  63. package/src/index.js +124 -5
  64. package/src/parser.js +1296 -1296
  65. package/src/recommend-mcp.js +515 -80
  66. package/src/recommend-scheduler.js +66 -0
package/src/index.js CHANGED
@@ -995,6 +995,21 @@ function createRunInputSchema() {
995
995
  type: "boolean",
996
996
  description: "高级测试开关;默认 false。只有显式为 true 时才允许 deterministic/local scorer、跳过筛选器、card-only、dry-run 后置动作等调试路径"
997
997
  },
998
+ debug_force_list_end_after_processed: {
999
+ type: "integer",
1000
+ minimum: 1,
1001
+ description: "仅限 debug_test_mode=true 的 live 诊断:在完成指定候选人数后的循环边界恰好一次模拟列表到底,并进入真实 Page.reload 刷新/筛选重放分支。与另外两个 debug_force_*_after_processed 参数互斥。"
1002
+ },
1003
+ debug_force_context_recovery_after_processed: {
1004
+ type: "integer",
1005
+ minimum: 1,
1006
+ description: "仅限 debug_test_mode=true 的 live 诊断:在完成指定候选人数后的循环边界恰好一次调用真实 recommend 上下文恢复与筛选重放。与另外两个 debug_force_*_after_processed 参数互斥。"
1007
+ },
1008
+ debug_force_cdp_reconnect_after_processed: {
1009
+ type: "integer",
1010
+ minimum: 1,
1011
+ description: "仅限 debug_test_mode=true 的 live 诊断:在完成指定候选人数后的循环边界恰好一次关闭当前原始 CDP 连接,随后依赖 guarded client 原生重连继续。不会执行页面脚本。与另外两个 debug_force_*_after_processed 参数互斥。"
1012
+ },
998
1013
  screening_mode: {
999
1014
  type: "string",
1000
1015
  enum: ["llm", "deterministic"],
@@ -1347,10 +1362,49 @@ function createListRecommendJobsInputSchema() {
1347
1362
 
1348
1363
  function createScheduleRunInputSchema() {
1349
1364
  const base = createRunInputSchema();
1365
+ const properties = { ...base.properties };
1366
+ for (const field of [
1367
+ "debug_test_mode",
1368
+ "debug_force_list_end_after_processed",
1369
+ "debug_force_context_recovery_after_processed",
1370
+ "debug_force_cdp_reconnect_after_processed"
1371
+ ]) {
1372
+ delete properties[field];
1373
+ }
1374
+ properties.screening_mode = {
1375
+ ...properties.screening_mode,
1376
+ enum: ["llm"],
1377
+ description: "定时 Recommend 仅允许生产 LLM 筛选;deterministic/local 调试模式不可定时。"
1378
+ };
1379
+ properties.use_llm = {
1380
+ ...properties.use_llm,
1381
+ enum: [true],
1382
+ description: "定时 Recommend 仅允许 true;use_llm=false 属于调试模式。"
1383
+ };
1384
+ properties.detail_limit = {
1385
+ ...properties.detail_limit,
1386
+ minimum: 1
1387
+ };
1388
+ properties.allow_card_only_screening = {
1389
+ ...properties.allow_card_only_screening,
1390
+ enum: [false]
1391
+ };
1392
+ properties.dry_run_post_action = {
1393
+ ...properties.dry_run_post_action,
1394
+ enum: [false]
1395
+ };
1396
+ properties.no_filter = {
1397
+ ...properties.no_filter,
1398
+ enum: [false]
1399
+ };
1400
+ properties.filter_enabled = {
1401
+ ...properties.filter_enabled,
1402
+ enum: [true]
1403
+ };
1350
1404
  return {
1351
1405
  ...base,
1352
1406
  properties: {
1353
- ...base.properties,
1407
+ ...properties,
1354
1408
  schedule_id: {
1355
1409
  type: "string",
1356
1410
  description: "可选,自定义定时任务 id;默认自动生成"
@@ -1463,6 +1517,10 @@ function createCompactRunInputSchema() {
1463
1517
  slow_live: { type: "boolean" },
1464
1518
  delay_ms: { type: "integer", minimum: 0 },
1465
1519
  detail_limit: { type: "integer", minimum: 0 },
1520
+ debug_test_mode: { type: "boolean" },
1521
+ debug_force_list_end_after_processed: { type: "integer", minimum: 1 },
1522
+ debug_force_context_recovery_after_processed: { type: "integer", minimum: 1 },
1523
+ debug_force_cdp_reconnect_after_processed: { type: "integer", minimum: 1 },
1466
1524
  execute_post_action: { type: "boolean" },
1467
1525
  no_filter: { type: "boolean" },
1468
1526
  dry_run: { type: "boolean" }
@@ -1474,10 +1532,31 @@ function createCompactRunInputSchema() {
1474
1532
 
1475
1533
  function createCompactScheduleRunInputSchema() {
1476
1534
  const base = createCompactRunInputSchema();
1535
+ const properties = { ...base.properties };
1536
+ for (const field of [
1537
+ "debug_test_mode",
1538
+ "debug_force_list_end_after_processed",
1539
+ "debug_force_context_recovery_after_processed",
1540
+ "debug_force_cdp_reconnect_after_processed"
1541
+ ]) {
1542
+ delete properties[field];
1543
+ }
1544
+ properties.detail_limit = {
1545
+ ...properties.detail_limit,
1546
+ minimum: 1
1547
+ };
1548
+ properties.no_filter = {
1549
+ ...properties.no_filter,
1550
+ enum: [false]
1551
+ };
1552
+ properties.dry_run = {
1553
+ ...properties.dry_run,
1554
+ enum: [false]
1555
+ };
1477
1556
  return {
1478
1557
  ...base,
1479
1558
  properties: {
1480
- ...base.properties,
1559
+ ...properties,
1481
1560
  schedule_id: {
1482
1561
  type: "string",
1483
1562
  description: "可选,自定义定时任务 id;默认自动生成"
@@ -1834,7 +1913,32 @@ function validateRunArgs(args) {
1834
1913
  return "arguments must be an object";
1835
1914
  }
1836
1915
  if (!args.instruction || typeof args.instruction !== "string") {
1837
- return "instruction is required and must be a string";
1916
+ return "instruction is required and must be a string";
1917
+ }
1918
+ if (
1919
+ Object.prototype.hasOwnProperty.call(args, "debug_test_mode")
1920
+ && typeof args.debug_test_mode !== "boolean"
1921
+ ) {
1922
+ return "debug_test_mode must be a boolean";
1923
+ }
1924
+ const debugBoundaryFields = [
1925
+ "debug_force_list_end_after_processed",
1926
+ "debug_force_context_recovery_after_processed",
1927
+ "debug_force_cdp_reconnect_after_processed"
1928
+ ];
1929
+ const configuredDebugBoundaries = [];
1930
+ for (const field of debugBoundaryFields) {
1931
+ if (!Object.prototype.hasOwnProperty.call(args, field)) continue;
1932
+ if (!Number.isInteger(args[field]) || args[field] <= 0) {
1933
+ return `${field} must be a positive integer`;
1934
+ }
1935
+ configuredDebugBoundaries.push(field);
1936
+ }
1937
+ if (configuredDebugBoundaries.length > 1) {
1938
+ return `${configuredDebugBoundaries.join(", ")} are mutually exclusive`;
1939
+ }
1940
+ if (configuredDebugBoundaries.length && args.debug_test_mode !== true) {
1941
+ return `${configuredDebugBoundaries[0]} requires debug_test_mode=true`;
1838
1942
  }
1839
1943
  return null;
1840
1944
  }
@@ -2173,6 +2277,20 @@ function parseDetachedWorkerOptions(argv = process.argv.slice(2)) {
2173
2277
  };
2174
2278
  }
2175
2279
 
2280
+ function canonicalExecutablePath(value = "") {
2281
+ const resolved = path.resolve(String(value || ""));
2282
+ try {
2283
+ return fs.realpathSync.native(resolved);
2284
+ } catch {
2285
+ return resolved;
2286
+ }
2287
+ }
2288
+
2289
+ function isMainModulePath(argvPath = "", modulePath = "") {
2290
+ if (!argvPath || !modulePath) return false;
2291
+ return canonicalExecutablePath(argvPath) === canonicalExecutablePath(modulePath);
2292
+ }
2293
+
2176
2294
  function launchDetachedRunWorker({ runId, resumeRun = false }) {
2177
2295
  const childArgs = [thisFilePath, DETACHED_WORKER_FLAG, DETACHED_WORKER_RUN_ID_FLAG, String(runId)];
2178
2296
  if (resumeRun) {
@@ -3124,7 +3242,7 @@ async function handleRequest(message, workspaceRoot) {
3124
3242
  );
3125
3243
  }
3126
3244
 
3127
- if ([TOOL_RUN_RECOMMEND, TOOL_START_RUN].includes(toolName)) {
3245
+ if ([TOOL_RUN_RECOMMEND, TOOL_START_RUN, TOOL_PREPARE_RUN].includes(toolName)) {
3128
3246
  const inputError = validateRunArgs(args);
3129
3247
  if (inputError) {
3130
3248
  return createJsonRpcError(id, -32602, inputError);
@@ -3369,6 +3487,7 @@ export const __testables = {
3369
3487
  createToolsSchema,
3370
3488
  getConfiguredMcpToolset,
3371
3489
  normalizeMcpToolset,
3490
+ isMainModulePath,
3372
3491
  handleRequest,
3373
3492
  runDetachedWorkerForTests(options = {}) {
3374
3493
  return runDetachedWorker(options);
@@ -3430,7 +3549,7 @@ export const __testables = {
3430
3549
  };
3431
3550
 
3432
3551
  const thisFilePath = fileURLToPath(import.meta.url);
3433
- if (process.argv[1] && path.resolve(process.argv[1]) === thisFilePath) {
3552
+ if (isMainModulePath(process.argv[1], thisFilePath)) {
3434
3553
  const detachedWorkerOptions = parseDetachedWorkerOptions(process.argv.slice(2));
3435
3554
  if (detachedWorkerOptions) {
3436
3555
  installDetachedWorkerFailureHandlers(detachedWorkerOptions.runId);