@reconcrap/boss-recommend-mcp 2.0.27 → 2.0.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reconcrap/boss-recommend-mcp",
3
- "version": "2.0.27",
3
+ "version": "2.0.28",
4
4
  "description": "Unified MCP pipeline for recommend-page filtering and screening on Boss Zhipin",
5
5
  "keywords": [
6
6
  "boss",
@@ -23,19 +23,28 @@ function normalizeJobText(value) {
23
23
  return normalizeText(value).replace(/\s+/g, "");
24
24
  }
25
25
 
26
- function trimSalarySuffix(label) {
26
+ function stripSalaryText(label) {
27
27
  return normalizeText(label)
28
- .replace(/\s+(?:\d+(?:-\d+)?K|面议|\d+-\d+元\/天).*$/i, "")
28
+ .replace(/\s*[((]\s*(?:\d+(?:-\d+)?K|面议|\d+-\d+元\/天)\s*[))]\s*$/i, "")
29
+ .replace(/\s+(?:\d+(?:-\d+)?K|面议|\d+-\d+元\/天)\s*$/i, "")
29
30
  .trim();
30
31
  }
31
32
 
33
+ function trimSalarySuffix(label) {
34
+ return stripSalaryText(label);
35
+ }
36
+
32
37
  export function jobLabelMatches(optionLabel, targetLabel) {
33
38
  const option = normalizeJobText(optionLabel);
34
39
  const target = normalizeJobText(targetLabel);
40
+ const optionWithoutSalary = normalizeJobText(stripSalaryText(optionLabel));
41
+ const targetWithoutSalary = normalizeJobText(stripSalaryText(targetLabel));
35
42
  if (!option || !target) return false;
36
43
  return option === target
37
44
  || option.startsWith(target)
38
- || normalizeJobText(trimSalarySuffix(optionLabel)) === target;
45
+ || optionWithoutSalary === target
46
+ || option === targetWithoutSalary
47
+ || optionWithoutSalary === targetWithoutSalary;
39
48
  }
40
49
 
41
50
  function isVisibleBox(box) {