@reconcrap/boss-recommend-mcp 1.0.4 → 1.0.6

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 CHANGED
@@ -74,9 +74,9 @@ npx -y @reconcrap/boss-recommend-mcp@latest run --instruction "推荐页筛选98
74
74
  `screening-config.json` 默认写入路径(按优先级):
75
75
 
76
76
  1. `BOSS_RECOMMEND_SCREEN_CONFIG`(若已设置)
77
- 2. `<workspace>/config/screening-config.json`(本地 `npm install` / `npx ... install` 默认会优先写这里)
78
- 3. `<workspace>/boss-recommend-mcp/config/screening-config.json`
79
- 4. `~/.boss-recommend-mcp/screening-config.json`(当 workspace 不可写或无 workspace 时回退)
77
+ 2. `~/.boss-recommend-mcp/screening-config.json`(默认主路径)
78
+ 3. `<workspace>/config/screening-config.json`(兼容历史路径)
79
+ 4. `<workspace>/boss-recommend-mcp/config/screening-config.json`(兼容历史路径)
80
80
  5. 兼容旧路径:`$CODEX_HOME/boss-recommend-mcp/screening-config.json`
81
81
 
82
82
  配置路径优先级:
@@ -91,6 +91,7 @@ npx -y @reconcrap/boss-recommend-mcp@latest run --instruction "推荐页筛选98
91
91
 
92
92
  - `install` / `postinstall` 会自动创建 `screening-config.json` 模板(若目标路径可写)
93
93
  - 当当前目录是系统目录(例如 `C:\\Windows\\System32`)、用户主目录根(例如 `C:\\Users\\<name>`)或磁盘根目录时,不会再写入 `<cwd>/config`,而是回退到 `~/.boss-recommend-mcp/screening-config.json`
94
+ - `doctor` / `run` 默认优先读取 `~/.boss-recommend-mcp/screening-config.json`;如需强制其它路径,请设置 `BOSS_RECOMMEND_SCREEN_CONFIG`
94
95
  - 首次运行时,若仍检测到默认占位词(如 `replace-with-openai-api-key`),pipeline 会返回配置目录并要求用户修改后确认“已修改完成”再继续
95
96
  - 在 `npx` 临时目录(如 `AppData\\Local\\npm-cache\\_npx\\...`)执行时,不会再把该临时目录当作 `screening-config.json` 目标路径
96
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reconcrap/boss-recommend-mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Unified MCP pipeline for recommend-page filtering and screening on Boss Zhipin",
5
5
  "keywords": [
6
6
  "boss",
@@ -8,16 +8,19 @@ description: "Use when users ask to run Boss recommend-page filtering and screen
8
8
  ## Purpose
9
9
 
10
10
  当用户希望在 Boss 推荐页按条件筛选候选人时,优先调用 MCP 工具 `run_recommend_pipeline` 完成端到端任务:
11
-
12
- 1. 解析推荐页筛选指令
13
- 2. 结构化推荐页 filters
14
- 3. 确认筛选 criteria
15
- 4. 在运行开始时询问 `target_count`(可选,可留空)
16
- 5. 在运行开始时一次性确认 `post_action`
17
- 6. 若 `post_action=greet`,同时确认 `max_greet_count`
18
- 7. 在页面就绪后先提取岗位列表,列出全部岗位并让用户确认本次岗位
19
- 8. 用户确认岗位后先点击该岗位,再执行 recommend-search-cli 与 recommend-screen-cli
20
- 9. 返回结果摘要
11
+
12
+ 1. 解析推荐页筛选指令
13
+ 2. 第一阶段仅确认非岗位参数(filters / criteria / target_count / post_action / max_greet_count)
14
+ 3. 先执行页面就绪检查(端口、登录态、是否在 recommend 页面)
15
+ 4. 页面就绪后再提取岗位列表,列出全部岗位并让用户确认本次岗位
16
+ 5. 用户确认岗位后先点击该岗位,再执行 recommend-search-cli 与 recommend-screen-cli
17
+ 6. 返回结果摘要
18
+
19
+ 严格顺序约束(必须遵守):
20
+
21
+ - 在页面就绪前,禁止询问“岗位(job)要选哪个”
22
+ - 只有在工具返回 `job_options` 后,才允许发起岗位确认
23
+ - 岗位确认时必须展示 `job_options` 里的全部岗位,禁止只列一部分或让用户盲填
21
24
 
22
25
  路由约束(必须遵守):
23
26
 
@@ -32,13 +35,15 @@ description: "Use when users ask to run Boss recommend-page filtering and screen
32
35
  - “在 Boss 搜索页面帮我找人” -> `boss-recruit-pipeline`
33
36
  - “Find candidates on Boss search page” -> `boss-recruit-pipeline`
34
37
 
35
- ## Required Confirmation
36
-
37
- 在真正执行前,必须先确认:
38
-
38
+ ## Required Confirmation
39
+
40
+ 在真正执行前,按两个阶段确认:
41
+
42
+ 阶段 A(页面就绪前,禁止问岗位):
43
+
39
44
  - 学校标签(`school_tag`,支持多选)
40
45
  - 若输入混合了有效与无效选项(如 `985,211,qs100`),必须忽略无效项并保留有效项;不要直接回退到“不限”
41
- - 学历(`degree`)
46
+ - 学历(`degree`)
42
47
  - 性别(`gender`)
43
48
  - 是否过滤近14天已看(`recent_not_view`)
44
49
  - screening criteria 是否正确
@@ -49,13 +54,22 @@ description: "Use when users ask to run Boss recommend-page filtering and screen
49
54
  - `post_action` 是否确定为 `favorite` 或 `greet`
50
55
  - 当 `post_action=greet` 时,`max_greet_count`(最多打招呼人数)是否确定
51
56
  - 严禁在未询问用户的情况下自动把 `max_greet_count` 设为 `target_count` 或其他默认值
57
+
58
+ 阶段 B(页面就绪后,且已拿到岗位列表):
59
+
52
60
  - 岗位(`job`)是否确定
53
- - 必须先列出 recommend 页岗位栏里识别到的全部岗位,让用户明确选择
61
+ - 必须先列出 recommend 页岗位栏里识别到的全部岗位(来自工具返回的 `job_options`),让用户明确选择
54
62
  - 即使前序步骤已提取到 `job` 参数,执行前也必须再次展示岗位列表并让用户二次确认
55
63
  - 用户确认后必须先点击该岗位,再开始 search 和 screen
56
64
  - 正式开始 search/screen 前,必须做最后一轮“全参数总确认”
57
65
  - 需要向用户复述并确认:岗位、school_tag、degree、gender、recent_not_view、criteria、target_count、post_action、max_greet_count
58
66
  - 只有用户明确最终确认后才允许执行
67
+
68
+ 禁止行为(必须避免):
69
+
70
+ - 第一轮就问“你要绑定哪个岗位”
71
+ - 让用户在未登录或未进入推荐页时先填岗位
72
+ - 在岗位确认时只展示部分岗位
59
73
 
60
74
  `post_action` 的确认是**单次运行级别**的:
61
75
 
@@ -174,9 +188,11 @@ CLI fallback 的状态机与 MCP 保持一致:
174
188
  - 没有 Python 时,不能先装 Pillow
175
189
 
176
190
  ## Response Style
177
-
191
+
178
192
  - 用结构化中文输出
179
193
  - 先给用户确认卡片,再正式执行
194
+ - 第一轮确认卡片不得包含 `job` 字段
195
+ - 只有当工具返回 `job_options` 后,岗位确认卡片才允许出现 `job` 字段,且必须完整列出 `job_options`
180
196
  - 对 `school_tag/degree/gender/recent_not_view` 必须逐项提问并逐项确认,不可合并成一句“filters已确认”
181
197
  - 询问 `criteria` 时必须使用开放式文本输入,不要提供“严格执行/宽松执行”等枚举选项
182
198
  - 当页面就绪检查失败时,提示文案里必须包含 `debug_port` 和 recommend 页面 URL
package/src/adapters.js CHANGED
@@ -161,8 +161,8 @@ function resolveScreenConfigCandidates(workspaceRoot) {
161
161
  const candidateMap = buildScreenConfigCandidateMap(workspaceRoot);
162
162
  return [
163
163
  candidateMap.env_path,
164
- ...candidateMap.workspace_paths,
165
164
  candidateMap.user_path,
165
+ ...candidateMap.workspace_paths,
166
166
  candidateMap.legacy_path
167
167
  ].filter(Boolean);
168
168
  }
@@ -183,12 +183,12 @@ function resolveWritableScreenConfigPath(workspaceRoot) {
183
183
  if (candidateMap.env_path) {
184
184
  return candidateMap.env_path;
185
185
  }
186
- if (workspacePreferred && canWriteDirectory(path.dirname(workspacePreferred))) {
187
- return workspacePreferred;
188
- }
189
186
  if (candidateMap.user_path && canWriteDirectory(path.dirname(candidateMap.user_path))) {
190
187
  return candidateMap.user_path;
191
188
  }
189
+ if (workspacePreferred && canWriteDirectory(path.dirname(workspacePreferred))) {
190
+ return workspacePreferred;
191
+ }
192
192
  if (workspacePreferred) {
193
193
  return workspacePreferred;
194
194
  }
@@ -200,6 +200,9 @@ function resolveScreenConfigPath(workspaceRoot) {
200
200
  if (candidateMap.env_path) {
201
201
  return candidateMap.env_path;
202
202
  }
203
+ if (candidateMap.user_path && pathExists(candidateMap.user_path)) {
204
+ return candidateMap.user_path;
205
+ }
203
206
  const existingWorkspacePath = candidateMap.workspace_paths.find((item) => pathExists(item));
204
207
  if (existingWorkspacePath) {
205
208
  return existingWorkspacePath;