@reconcrap/boss-recommend-mcp 2.1.22 → 2.1.23

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/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
  }
@@ -3124,7 +3228,7 @@ async function handleRequest(message, workspaceRoot) {
3124
3228
  );
3125
3229
  }
3126
3230
 
3127
- if ([TOOL_RUN_RECOMMEND, TOOL_START_RUN].includes(toolName)) {
3231
+ if ([TOOL_RUN_RECOMMEND, TOOL_START_RUN, TOOL_PREPARE_RUN].includes(toolName)) {
3128
3232
  const inputError = validateRunArgs(args);
3129
3233
  if (inputError) {
3130
3234
  return createJsonRpcError(id, -32602, inputError);