@reconcrap/boss-recommend-mcp 1.1.12 → 1.2.1
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 +1 -1
- package/skills/boss-recommend-pipeline/SKILL.md +4 -3
- package/src/adapters.js +33 -19
- package/src/cli.js +1 -0
- package/src/index.js +327 -225
- package/src/parser.js +9 -4
- package/src/pipeline.js +7 -3
- package/src/test-adapters-runtime.js +107 -0
- package/src/test-index-async.js +33 -5
- package/src/test-parser.js +16 -0
- package/src/test-pipeline.js +78 -1
- package/vendor/boss-recommend-screen-cli/boss-recommend-screen-cli.cjs +95 -18
- package/vendor/boss-recommend-screen-cli/test-recoverable-resume-failures.cjs +16 -0
- package/vendor/boss-recommend-search-cli/src/cli.js +14 -6
- package/vendor/boss-recommend-search-cli/src/test-job-selection.js +2 -0
|
@@ -41,6 +41,7 @@ function normalizePageScope(value) {
|
|
|
41
41
|
const normalized = normalizeText(value).toLowerCase();
|
|
42
42
|
if (!normalized) return null;
|
|
43
43
|
if (["recommend", "推荐", "推荐页", "推荐页面"].includes(normalized)) return "recommend";
|
|
44
|
+
if (["latest", "最新", "最新页", "最新页面"].includes(normalized)) return "latest";
|
|
44
45
|
if (["featured", "精选", "精选页", "精选页面", "精选牛人"].includes(normalized)) return "featured";
|
|
45
46
|
return null;
|
|
46
47
|
}
|
|
@@ -1449,6 +1450,8 @@ class RecommendSearchCli {
|
|
|
1449
1450
|
const recommendCandidates = cards.filter((card) => card.querySelector('.card-inner[data-geekid]'));
|
|
1450
1451
|
const featuredCards = Array.from(doc.querySelectorAll('li.geek-info-card'));
|
|
1451
1452
|
const featuredCandidates = featuredCards.filter((card) => card.querySelector('a[data-geekid]'));
|
|
1453
|
+
const latestCards = Array.from(doc.querySelectorAll('.candidate-card-wrap'));
|
|
1454
|
+
const latestCandidates = latestCards.filter((card) => card.querySelector('.card-inner[data-geek], [data-geek]'));
|
|
1452
1455
|
const tabs = Array.from(doc.querySelectorAll('li.tab-item[data-status], li[data-status][class*="tab"]'));
|
|
1453
1456
|
const activeTab = tabs.find((node) => {
|
|
1454
1457
|
const className = String(node.className || '');
|
|
@@ -1457,22 +1460,27 @@ class RecommendSearchCli {
|
|
|
1457
1460
|
}) || null;
|
|
1458
1461
|
const activeTabStatus = activeTab ? String(activeTab.getAttribute('data-status') || '') : '';
|
|
1459
1462
|
const inferredStatus = activeTabStatus
|
|
1460
|
-
|| (featuredCandidates.length > 0 && recommendCandidates.length === 0
|
|
1463
|
+
|| (featuredCandidates.length > 0 && recommendCandidates.length === 0 && latestCandidates.length === 0
|
|
1461
1464
|
? '3'
|
|
1462
|
-
:
|
|
1463
|
-
? '
|
|
1464
|
-
:
|
|
1465
|
+
: latestCandidates.length > 0 && recommendCandidates.length === 0 && featuredCandidates.length === 0
|
|
1466
|
+
? '1'
|
|
1467
|
+
: recommendCandidates.length > 0 && featuredCandidates.length === 0 && latestCandidates.length === 0
|
|
1468
|
+
? '0'
|
|
1469
|
+
: '');
|
|
1465
1470
|
const effectiveCount = inferredStatus === '3'
|
|
1466
1471
|
? featuredCandidates.length
|
|
1472
|
+
: inferredStatus === '1'
|
|
1473
|
+
? latestCandidates.length
|
|
1467
1474
|
: inferredStatus === '0'
|
|
1468
1475
|
? recommendCandidates.length
|
|
1469
|
-
: Math.max(recommendCandidates.length, featuredCandidates.length);
|
|
1476
|
+
: Math.max(recommendCandidates.length, featuredCandidates.length, latestCandidates.length);
|
|
1470
1477
|
const body = doc.body;
|
|
1471
1478
|
return {
|
|
1472
1479
|
ok: true,
|
|
1473
1480
|
candidateCount: effectiveCount,
|
|
1474
1481
|
recommendCandidateCount: recommendCandidates.length,
|
|
1475
1482
|
featuredCandidateCount: featuredCandidates.length,
|
|
1483
|
+
latestCandidateCount: latestCandidates.length,
|
|
1476
1484
|
activeTabStatus: inferredStatus || null,
|
|
1477
1485
|
totalCardCount: cards.length,
|
|
1478
1486
|
scrollTop: body ? body.scrollTop : 0,
|
|
@@ -1508,7 +1516,7 @@ class RecommendSearchCli {
|
|
|
1508
1516
|
console.log(JSON.stringify({
|
|
1509
1517
|
status: "COMPLETED",
|
|
1510
1518
|
result: {
|
|
1511
|
-
usage: "node src/cli.js --school-tag 985/211 --degree 本科及以上 --gender 男 --recent-not-view 近14天没有 --job \"算法工程师(视频/图像模型方向) _ 杭州\" --page-scope recommend|featured --port 9222",
|
|
1519
|
+
usage: "node src/cli.js --school-tag 985/211 --degree 本科及以上 --gender 男 --recent-not-view 近14天没有 --job \"算法工程师(视频/图像模型方向) _ 杭州\" --page-scope recommend|latest|featured --port 9222",
|
|
1512
1520
|
list_jobs_usage: "node src/cli.js --list-jobs --port 9222"
|
|
1513
1521
|
}
|
|
1514
1522
|
}));
|
|
@@ -43,6 +43,8 @@ function createArgs(overrides = {}) {
|
|
|
43
43
|
function testParseArgsPageScope() {
|
|
44
44
|
const parsed = parseArgs(["--page-scope", "featured"]);
|
|
45
45
|
assert.equal(parsed.pageScope, "featured");
|
|
46
|
+
const latestParsed = parseArgs(["--page-scope", "latest"]);
|
|
47
|
+
assert.equal(latestParsed.pageScope, "latest");
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
class SelectJobCliMock extends RecommendSearchCli {
|