@reconcrap/boss-recruit-mcp 1.0.0
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/README.md +82 -0
- package/bin/boss-recruit-mcp.js +2 -0
- package/config/screening-config.example.json +7 -0
- package/package.json +42 -0
- package/skills/boss-recruit-pipeline/README.md +20 -0
- package/skills/boss-recruit-pipeline/SKILL.md +83 -0
- package/src/adapters.js +352 -0
- package/src/cli.js +112 -0
- package/src/index.js +210 -0
- package/src/parser.js +221 -0
- package/src/pipeline.js +215 -0
- package/src/test-parser.js +79 -0
- package/vendor/boss-screen-cli/boss-screen-cli.cjs +1646 -0
- package/vendor/boss-screen-cli/favorite-calibration.json +9 -0
- package/vendor/boss-search-cli/src/boss-searcher.js +667 -0
- package/vendor/boss-search-cli/src/chrome-connector.js +79 -0
- package/vendor/boss-search-cli/src/cli.js +132 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { parseRecruitInstruction } from "./parser.js";
|
|
3
|
+
|
|
4
|
+
function testNeedInput() {
|
|
5
|
+
const r = parseRecruitInstruction({
|
|
6
|
+
instruction: "帮我找做过AI infra的人选",
|
|
7
|
+
confirmation: null,
|
|
8
|
+
overrides: null
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
assert.equal(r.needs_keyword_confirmation, true);
|
|
12
|
+
assert.equal(r.proposed_keyword?.toLowerCase(), "ai infra");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function testExampleExtraction() {
|
|
16
|
+
const instruction =
|
|
17
|
+
"帮我找35岁以下,做过AI infra的人选,地点在杭州,学历本科及以上,毕业院校必须是985、211或者qs100的学校,必须发表过CCF-A区论文。至少筛选500位人选。";
|
|
18
|
+
|
|
19
|
+
const firstPass = parseRecruitInstruction({
|
|
20
|
+
instruction,
|
|
21
|
+
confirmation: null,
|
|
22
|
+
overrides: null
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
assert.equal(firstPass.needs_keyword_confirmation, true);
|
|
26
|
+
assert.equal(firstPass.proposed_keyword?.toLowerCase(), "ai infra");
|
|
27
|
+
assert.equal(firstPass.searchParams.city, "杭州");
|
|
28
|
+
assert.equal(firstPass.searchParams.degree, "本科及以上");
|
|
29
|
+
assert.deepEqual(firstPass.searchParams.schools.sort(), ["211院校", "985院校", "QS 100"].sort());
|
|
30
|
+
assert.equal(firstPass.screenParams.target_count, 500);
|
|
31
|
+
|
|
32
|
+
const confirmed = parseRecruitInstruction({
|
|
33
|
+
instruction,
|
|
34
|
+
confirmation: { keyword_confirmed: true, keyword_value: "ai infra" },
|
|
35
|
+
overrides: null
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
assert.equal(confirmed.needs_keyword_confirmation, false);
|
|
39
|
+
assert.equal(confirmed.searchParams.keyword, "ai infra");
|
|
40
|
+
assert.equal(confirmed.missing_fields.length, 0);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function testMissingFieldsBatch() {
|
|
44
|
+
const r = parseRecruitInstruction({
|
|
45
|
+
instruction: "帮我筛选做过推荐系统的人",
|
|
46
|
+
confirmation: { keyword_confirmed: true, keyword_value: "推荐系统" },
|
|
47
|
+
overrides: null
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
assert.deepEqual(r.missing_fields.sort(), ["city", "degree", "schools", "target_count"].sort());
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function testStructuredInputAndCriteriaCleanup() {
|
|
54
|
+
const r = parseRecruitInstruction({
|
|
55
|
+
instruction:
|
|
56
|
+
"使用boss-recruit-pipeline skills帮我在boss上找做过AI infra的人选,必须发表过CCF-A区论文。城市:杭州,学历:本科,学校:985、211、qs100,目标人数:10人",
|
|
57
|
+
confirmation: { keyword_confirmed: true, keyword_value: "AI infra" },
|
|
58
|
+
overrides: null
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
assert.equal(r.searchParams.city, "杭州");
|
|
62
|
+
assert.equal(r.searchParams.degree, "本科");
|
|
63
|
+
assert.equal(r.screenParams.target_count, 10);
|
|
64
|
+
assert.equal(
|
|
65
|
+
r.screenParams.criteria,
|
|
66
|
+
"做过AI infra;必须发表过CCF-A区论文"
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function main() {
|
|
71
|
+
testNeedInput();
|
|
72
|
+
testExampleExtraction();
|
|
73
|
+
testMissingFieldsBatch();
|
|
74
|
+
testStructuredInputAndCriteriaCleanup();
|
|
75
|
+
// eslint-disable-next-line no-console
|
|
76
|
+
console.log("parser tests passed");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
main();
|