@reconcrap/boss-recommend-mcp 1.1.2 → 1.1.4
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 +3 -2
- package/scripts/postinstall.cjs +44 -44
- package/skills/boss-recommend-pipeline/README.md +12 -12
- package/skills/boss-recommend-pipeline/SKILL.md +195 -195
- package/src/adapters.js +1876 -1806
- package/src/index.js +1254 -1254
- package/src/parser.js +19 -28
- package/src/pipeline.js +919 -792
- package/src/run-state.js +351 -351
- package/src/test-adapters-runtime.js +163 -163
- package/src/test-index-async.js +236 -236
- package/src/test-parser.js +55 -0
- package/src/test-pipeline.js +103 -0
- package/src/test-run-state.js +152 -152
- package/vendor/boss-recommend-screen-cli/boss-recommend-screen-cli.cjs +111 -18
- package/vendor/boss-recommend-screen-cli/scripts/capture-full-resume-canvas.cjs +508 -452
- package/vendor/boss-recommend-screen-cli/test-recoverable-resume-failures.cjs +245 -0
- package/vendor/boss-recommend-search-cli/src/cli.js +811 -811
- package/vendor/boss-recommend-search-cli/src/test-job-selection.js +201 -201
package/src/parser.js
CHANGED
|
@@ -28,10 +28,11 @@ const DEGREE_ORDER = [
|
|
|
28
28
|
];
|
|
29
29
|
const GENDER_OPTIONS = ["不限", "男", "女"];
|
|
30
30
|
const RECENT_NOT_VIEW_OPTIONS = ["不限", "近14天没有"];
|
|
31
|
-
const POST_ACTION_OPTIONS = ["favorite", "greet"];
|
|
31
|
+
const POST_ACTION_OPTIONS = ["favorite", "greet", "none"];
|
|
32
32
|
const POST_ACTION_LABELS = {
|
|
33
33
|
favorite: "收藏",
|
|
34
|
-
greet: "直接沟通"
|
|
34
|
+
greet: "直接沟通",
|
|
35
|
+
none: "什么也不做"
|
|
35
36
|
};
|
|
36
37
|
const LEADING_NOISE_PATTERNS = [
|
|
37
38
|
/^使用boss-recommend-pipeline skills/i,
|
|
@@ -90,7 +91,7 @@ const FILTER_CLAUSE_PATTERNS = [
|
|
|
90
91
|
/近?14天(?:内)?没有|近?14天(?:内)?没看过|近?14天(?:内)?未查看|过滤[^。;;\n]{0,12}14天|排除[^。;;\n]{0,12}14天/i,
|
|
91
92
|
/目标(?:处理|筛选)?(?:人数|数量)?|至少(?:处理|筛选)|(?:处理|筛选)\s*\d+\s*(?:位|人)/i,
|
|
92
93
|
/最多(?:打招呼|沟通|联系)|(?:打招呼|沟通|联系)(?:上限|最多|不超过|至多)/i,
|
|
93
|
-
|
|
94
|
+
/收藏|打招呼|直接沟通|什么也不做|不做任何操作|不操作|仅筛选|只筛选/i
|
|
94
95
|
];
|
|
95
96
|
const META_CLAUSE_PATTERNS = [
|
|
96
97
|
/推荐页|推荐页面|boss推荐/i,
|
|
@@ -259,6 +260,9 @@ function normalizePostAction(value) {
|
|
|
259
260
|
if (!normalized) return null;
|
|
260
261
|
if (["favorite", "fav", "收藏"].includes(normalized)) return "favorite";
|
|
261
262
|
if (["greet", "chat", "打招呼", "直接沟通", "沟通"].includes(normalized)) return "greet";
|
|
263
|
+
if (["none", "noop", "no-op", "什么也不做", "不做任何操作", "不操作", "仅筛选", "只筛选"].includes(normalized)) {
|
|
264
|
+
return "none";
|
|
265
|
+
}
|
|
262
266
|
return null;
|
|
263
267
|
}
|
|
264
268
|
|
|
@@ -377,6 +381,8 @@ function resolvePostAction({ instruction, confirmation, overrides }) {
|
|
|
377
381
|
? "favorite"
|
|
378
382
|
: /打招呼|直接沟通|沟通/.test(instruction)
|
|
379
383
|
? "greet"
|
|
384
|
+
: /什么也不做|不做任何操作|不操作|仅筛选|只筛选/.test(instruction)
|
|
385
|
+
? "none"
|
|
380
386
|
: null;
|
|
381
387
|
const proposed = overrideValue || confirmationValue || instructionValue || null;
|
|
382
388
|
|
|
@@ -534,41 +540,25 @@ export function parseRecommendInstruction({ instruction, confirmation, overrides
|
|
|
534
540
|
invalidOverrideSchoolTags: schoolTagAudit.invalid,
|
|
535
541
|
maxGreetCountResolution
|
|
536
542
|
});
|
|
537
|
-
const
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
);
|
|
542
|
-
const hasDegreeSignal = Boolean(
|
|
543
|
-
(Array.isArray(overrideDegrees) && overrideDegrees.length > 0)
|
|
544
|
-
|| (Array.isArray(confirmationDegrees) && confirmationDegrees.length > 0)
|
|
545
|
-
|| (Array.isArray(detectedDegrees) && detectedDegrees.length > 0)
|
|
546
|
-
);
|
|
547
|
-
const hasGenderSignal = Boolean(
|
|
548
|
-
overrideGender
|
|
549
|
-
|| confirmationGender
|
|
550
|
-
|| extractGender(text)
|
|
551
|
-
);
|
|
552
|
-
const hasRecentNotViewSignal = Boolean(
|
|
553
|
-
overrideRecentNotView
|
|
554
|
-
|| confirmationRecentNotView
|
|
555
|
-
|| extractRecentNotView(text)
|
|
556
|
-
);
|
|
543
|
+
const hasConfirmedSchoolTagValue = Array.isArray(confirmationSchoolTag) && confirmationSchoolTag.length > 0;
|
|
544
|
+
const hasConfirmedDegreeValue = Array.isArray(confirmationDegrees) && confirmationDegrees.length > 0;
|
|
545
|
+
const hasConfirmedGenderValue = Boolean(confirmationGender);
|
|
546
|
+
const hasConfirmedRecentNotViewValue = Boolean(confirmationRecentNotView);
|
|
557
547
|
const needs_school_tag_confirmation = (
|
|
558
548
|
confirmation?.school_tag_confirmed !== true
|
|
559
|
-
|| !
|
|
549
|
+
|| !hasConfirmedSchoolTagValue
|
|
560
550
|
);
|
|
561
551
|
const needs_degree_confirmation = (
|
|
562
552
|
confirmation?.degree_confirmed !== true
|
|
563
|
-
|| !
|
|
553
|
+
|| !hasConfirmedDegreeValue
|
|
564
554
|
);
|
|
565
555
|
const needs_gender_confirmation = (
|
|
566
556
|
confirmation?.gender_confirmed !== true
|
|
567
|
-
|| !
|
|
557
|
+
|| !hasConfirmedGenderValue
|
|
568
558
|
);
|
|
569
559
|
const needs_recent_not_view_confirmation = (
|
|
570
560
|
confirmation?.recent_not_view_confirmed !== true
|
|
571
|
-
|| !
|
|
561
|
+
|| !hasConfirmedRecentNotViewValue
|
|
572
562
|
);
|
|
573
563
|
const needs_filters_confirmation = (
|
|
574
564
|
confirmation?.filters_confirmed !== true
|
|
@@ -659,7 +649,8 @@ export function parseRecommendInstruction({ instruction, confirmation, overrides
|
|
|
659
649
|
value: postActionResolution.proposed_post_action,
|
|
660
650
|
options: [
|
|
661
651
|
{ label: POST_ACTION_LABELS.favorite, value: "favorite" },
|
|
662
|
-
{ label: POST_ACTION_LABELS.greet, value: "greet" }
|
|
652
|
+
{ label: POST_ACTION_LABELS.greet, value: "greet" },
|
|
653
|
+
{ label: POST_ACTION_LABELS.none, value: "none" }
|
|
663
654
|
]
|
|
664
655
|
});
|
|
665
656
|
}
|