@reconcrap/boss-recommend-mcp 2.1.21 → 2.1.22
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 +5 -2
- package/bin/boss-recommend-mcp.js +4 -4
- package/config/screening-config.example.json +33 -33
- package/package.json +8 -8
- package/scripts/install-macos.sh +280 -280
- package/scripts/postinstall.cjs +44 -44
- package/skills/boss-chat/README.md +42 -42
- package/skills/boss-chat/SKILL.md +106 -106
- package/skills/boss-recommend-pipeline/README.md +13 -13
- package/skills/boss-recommend-pipeline/SKILL.md +219 -214
- package/skills/boss-recruit-pipeline/README.md +19 -19
- package/skills/boss-recruit-pipeline/SKILL.md +89 -89
- package/src/chat-mcp.js +127 -127
- package/src/chat-runtime-config.js +775 -775
- package/src/cli.js +573 -573
- package/src/core/boss-cards/index.js +199 -199
- package/src/core/browser/index.js +2419 -2415
- package/src/core/capture/index.js +1201 -1201
- package/src/core/cv-acquisition/index.js +238 -238
- package/src/core/cv-capture-target/index.js +299 -299
- package/src/core/greet-quota/index.js +71 -71
- package/src/core/infinite-list/index.js +1326 -1326
- package/src/core/reporting/legacy-csv.js +334 -332
- package/src/core/run/index.js +32 -32
- package/src/core/run/timing.js +33 -33
- package/src/core/screening/index.js +2135 -2135
- package/src/core/self-heal/index.js +973 -973
- package/src/core/self-heal/viewport.js +564 -564
- package/src/detached-worker.js +99 -99
- package/src/domains/chat/cards.js +137 -137
- package/src/domains/chat/constants.js +9 -9
- package/src/domains/chat/detail.js +113 -113
- package/src/domains/chat/index.js +7 -7
- package/src/domains/chat/jobs.js +620 -620
- package/src/domains/chat/page-guard.js +122 -122
- package/src/domains/chat/roots.js +56 -56
- package/src/domains/chat/run-service.js +571 -571
- package/src/domains/common/account-rights-panel.js +314 -314
- package/src/domains/common/recovery-settle.js +159 -159
- package/src/domains/recommend/actions.js +472 -472
- package/src/domains/recommend/cards.js +243 -243
- package/src/domains/recommend/colleague-contact.js +333 -333
- package/src/domains/recommend/constants.js +228 -159
- package/src/domains/recommend/detail.js +650 -650
- package/src/domains/recommend/filters.js +748 -377
- package/src/domains/recommend/index.js +4 -3
- package/src/domains/recommend/jobs.js +542 -542
- package/src/domains/recommend/location.js +736 -0
- package/src/domains/recommend/refresh.js +504 -361
- package/src/domains/recommend/roots.js +80 -80
- package/src/domains/recommend/run-service.js +987 -854
- package/src/domains/recommend/scopes.js +246 -246
- package/src/domains/recruit/actions.js +277 -277
- package/src/domains/recruit/cards.js +74 -74
- package/src/domains/recruit/constants.js +236 -236
- package/src/domains/recruit/detail.js +588 -588
- package/src/domains/recruit/index.js +9 -9
- package/src/domains/recruit/instruction-parser.js +866 -866
- package/src/domains/recruit/refresh.js +45 -45
- package/src/domains/recruit/roots.js +68 -68
- package/src/domains/recruit/run-service.js +1620 -1620
- package/src/domains/recruit/search.js +3229 -3229
- package/src/index.js +13 -0
- package/src/parser.js +376 -8
- package/src/recommend-mcp.js +929 -915
- package/src/recommend-scheduler.js +496 -496
- package/src/recruit-mcp.js +2121 -2121
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
findIframeDocument,
|
|
3
|
-
getDocumentRoot,
|
|
4
|
-
querySelector,
|
|
5
|
-
sleep
|
|
6
|
-
} from "../../core/browser/index.js";
|
|
7
|
-
import { RECOMMEND_IFRAME_SELECTORS } from "./constants.js";
|
|
8
|
-
|
|
9
|
-
export async function getRecommendRoots(client, {
|
|
10
|
-
iframeSelectors = RECOMMEND_IFRAME_SELECTORS,
|
|
11
|
-
requireFrame = true
|
|
12
|
-
} = {}) {
|
|
13
|
-
const topRoot = await getDocumentRoot(client);
|
|
14
|
-
const iframe = await findIframeDocument(client, topRoot.nodeId, iframeSelectors);
|
|
15
|
-
if (!iframe && requireFrame) {
|
|
16
|
-
throw new Error("recommendFrame iframe was not found");
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
topRoot,
|
|
21
|
-
iframe,
|
|
22
|
-
roots: [
|
|
23
|
-
{ name: "top", nodeId: topRoot.nodeId },
|
|
24
|
-
iframe ? { name: "recommend-frame", nodeId: iframe.documentNodeId } : null
|
|
25
|
-
].filter(Boolean),
|
|
26
|
-
rootNodes: {
|
|
27
|
-
top: topRoot.nodeId,
|
|
28
|
-
frame: iframe?.documentNodeId || 0,
|
|
29
|
-
frameOwner: iframe?.nodeId || 0
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export async function waitForRecommendRoots(client, {
|
|
35
|
-
timeoutMs = 10000,
|
|
36
|
-
intervalMs = 250,
|
|
37
|
-
iframeSelectors = RECOMMEND_IFRAME_SELECTORS
|
|
38
|
-
} = {}) {
|
|
39
|
-
const started = Date.now();
|
|
40
|
-
let lastState = null;
|
|
41
|
-
while (Date.now() - started <= timeoutMs) {
|
|
42
|
-
try {
|
|
43
|
-
lastState = await getRecommendRoots(client, {
|
|
44
|
-
iframeSelectors,
|
|
45
|
-
requireFrame: false
|
|
46
|
-
});
|
|
47
|
-
} catch (error) {
|
|
48
|
-
lastState = {
|
|
49
|
-
error: error?.message || String(error),
|
|
50
|
-
roots: [],
|
|
51
|
-
rootNodes: {
|
|
52
|
-
top: 0,
|
|
53
|
-
frame: 0,
|
|
54
|
-
frameOwner: 0
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
if (lastState.iframe?.documentNodeId) return lastState;
|
|
59
|
-
await sleep(intervalMs);
|
|
60
|
-
}
|
|
61
|
-
return lastState;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export async function queryFirstAcrossRoots(client, roots, selectors) {
|
|
65
|
-
for (const root of roots) {
|
|
66
|
-
if (!root?.nodeId) continue;
|
|
67
|
-
for (const selector of selectors) {
|
|
68
|
-
const nodeId = await querySelector(client, root.nodeId, selector);
|
|
69
|
-
if (nodeId) {
|
|
70
|
-
return {
|
|
71
|
-
root: root.name,
|
|
72
|
-
root_node_id: root.nodeId,
|
|
73
|
-
selector,
|
|
74
|
-
node_id: nodeId
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
findIframeDocument,
|
|
3
|
+
getDocumentRoot,
|
|
4
|
+
querySelector,
|
|
5
|
+
sleep
|
|
6
|
+
} from "../../core/browser/index.js";
|
|
7
|
+
import { RECOMMEND_IFRAME_SELECTORS } from "./constants.js";
|
|
8
|
+
|
|
9
|
+
export async function getRecommendRoots(client, {
|
|
10
|
+
iframeSelectors = RECOMMEND_IFRAME_SELECTORS,
|
|
11
|
+
requireFrame = true
|
|
12
|
+
} = {}) {
|
|
13
|
+
const topRoot = await getDocumentRoot(client);
|
|
14
|
+
const iframe = await findIframeDocument(client, topRoot.nodeId, iframeSelectors);
|
|
15
|
+
if (!iframe && requireFrame) {
|
|
16
|
+
throw new Error("recommendFrame iframe was not found");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
topRoot,
|
|
21
|
+
iframe,
|
|
22
|
+
roots: [
|
|
23
|
+
{ name: "top", nodeId: topRoot.nodeId },
|
|
24
|
+
iframe ? { name: "recommend-frame", nodeId: iframe.documentNodeId } : null
|
|
25
|
+
].filter(Boolean),
|
|
26
|
+
rootNodes: {
|
|
27
|
+
top: topRoot.nodeId,
|
|
28
|
+
frame: iframe?.documentNodeId || 0,
|
|
29
|
+
frameOwner: iframe?.nodeId || 0
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export async function waitForRecommendRoots(client, {
|
|
35
|
+
timeoutMs = 10000,
|
|
36
|
+
intervalMs = 250,
|
|
37
|
+
iframeSelectors = RECOMMEND_IFRAME_SELECTORS
|
|
38
|
+
} = {}) {
|
|
39
|
+
const started = Date.now();
|
|
40
|
+
let lastState = null;
|
|
41
|
+
while (Date.now() - started <= timeoutMs) {
|
|
42
|
+
try {
|
|
43
|
+
lastState = await getRecommendRoots(client, {
|
|
44
|
+
iframeSelectors,
|
|
45
|
+
requireFrame: false
|
|
46
|
+
});
|
|
47
|
+
} catch (error) {
|
|
48
|
+
lastState = {
|
|
49
|
+
error: error?.message || String(error),
|
|
50
|
+
roots: [],
|
|
51
|
+
rootNodes: {
|
|
52
|
+
top: 0,
|
|
53
|
+
frame: 0,
|
|
54
|
+
frameOwner: 0
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
if (lastState.iframe?.documentNodeId) return lastState;
|
|
59
|
+
await sleep(intervalMs);
|
|
60
|
+
}
|
|
61
|
+
return lastState;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export async function queryFirstAcrossRoots(client, roots, selectors) {
|
|
65
|
+
for (const root of roots) {
|
|
66
|
+
if (!root?.nodeId) continue;
|
|
67
|
+
for (const selector of selectors) {
|
|
68
|
+
const nodeId = await querySelector(client, root.nodeId, selector);
|
|
69
|
+
if (nodeId) {
|
|
70
|
+
return {
|
|
71
|
+
root: root.name,
|
|
72
|
+
root_node_id: root.nodeId,
|
|
73
|
+
selector,
|
|
74
|
+
node_id: nodeId
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|