@reconcrap/boss-recommend-mcp 2.1.7 → 2.1.8
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 +6 -4
- package/package.json +1 -1
- package/skills/boss-recommend-pipeline/SKILL.md +20 -10
- package/src/cli.js +4 -4
- package/src/index.js +3 -3
- package/src/recommend-mcp.js +33 -3
package/README.md
CHANGED
|
@@ -265,10 +265,12 @@ BOSS_RECOMMEND_MCP_CONFIG_TARGETS # JSON 数组或系统 path 分隔路径列
|
|
|
265
265
|
BOSS_RECOMMEND_EXTERNAL_SKILL_DIRS # JSON 数组或系统 path 分隔路径列表,指定额外 skills 根目录
|
|
266
266
|
```
|
|
267
267
|
|
|
268
|
-
推荐运行入口是 MCP 工具 `run_recommend` / `start_recommend_pipeline_run`。在 Trae/Trae-CN 这类普通 MCP 宿主中,`prepare_recommend_pipeline_run` 返回 `READY + cron_ready=true` 后,若用户要现在运行,应继续调用 `run_recommend` 或 `start_recommend_pipeline_run`,不要改用 shell/CLI
|
|
268
|
+
推荐运行入口是 MCP 工具 `run_recommend` / `start_recommend_pipeline_run`。在 Trae/Trae-CN 这类普通 MCP 宿主中,`prepare_recommend_pipeline_run` 返回 `READY + cron_ready=true` 后,若用户要现在运行,应继续调用 `run_recommend` 或 `start_recommend_pipeline_run`,不要改用 terminal/shell/run_command/CLI/manual JSON-RPC。`prepare` 能返回结果就证明该宿主已经可以调用本 MCP server。
|
|
269
|
+
|
|
270
|
+
只有宿主是 QClaw 这类真正 shell-only agent、没有把 MCP tools 暴露给模型、且当前会话从未成功调用过 `boss-recommend/prepare_recommend_pipeline_run` 时,才使用 CDP-only CLI fallback。CLI fallback 也必须显式传本次用户确认的 rest level:
|
|
269
271
|
|
|
270
272
|
```bash
|
|
271
|
-
npx -y @reconcrap/boss-recommend-mcp@latest run --detached --instruction-file boss-recommend-instruction.txt --overrides-file boss-recommend-overrides.json --confirmation-file boss-recommend-confirmation.json --slow-live --port 9222
|
|
273
|
+
npx -y @reconcrap/boss-recommend-mcp@latest run --detached --instruction-file boss-recommend-instruction.txt --overrides-file boss-recommend-overrides.json --confirmation-file boss-recommend-confirmation.json --rest-level <low|medium|high> --slow-live --port 9222
|
|
272
274
|
```
|
|
273
275
|
|
|
274
276
|
`--detached` 会让父进程输出 `ACCEPTED + run_id` 后退出,子进程继续持有 Chrome DevTools 会话并执行长任务。岗位发现可以使用只读 CLI:
|
|
@@ -276,8 +278,8 @@ npx -y @reconcrap/boss-recommend-mcp@latest run --detached --instruction-file bo
|
|
|
276
278
|
如果是稍后启动/cron/定时任务,不要手写系统 cron;用 package-owned scheduler:
|
|
277
279
|
|
|
278
280
|
```bash
|
|
279
|
-
npx -y @reconcrap/boss-recommend-mcp@latest prepare-run --instruction-file boss-recommend-instruction.txt --overrides-file boss-recommend-overrides.json --confirmation-file boss-recommend-confirmation.json --slow-live --port 9222
|
|
280
|
-
npx -y @reconcrap/boss-recommend-mcp@latest schedule-run --schedule-delay-minutes 10 --instruction-file boss-recommend-instruction.txt --overrides-file boss-recommend-overrides.json --confirmation-file boss-recommend-confirmation.json --slow-live --port 9222
|
|
281
|
+
npx -y @reconcrap/boss-recommend-mcp@latest prepare-run --instruction-file boss-recommend-instruction.txt --overrides-file boss-recommend-overrides.json --confirmation-file boss-recommend-confirmation.json --rest-level <low|medium|high> --slow-live --port 9222
|
|
282
|
+
npx -y @reconcrap/boss-recommend-mcp@latest schedule-run --schedule-delay-minutes 10 --instruction-file boss-recommend-instruction.txt --overrides-file boss-recommend-overrides.json --confirmation-file boss-recommend-confirmation.json --rest-level <low|medium|high> --slow-live --port 9222
|
|
281
283
|
npx -y @reconcrap/boss-recommend-mcp@latest schedule-status --schedule-id <schedule_id>
|
|
282
284
|
```
|
|
283
285
|
|
package/package.json
CHANGED
|
@@ -17,6 +17,12 @@ description: "Use when users want Boss recommend-page filtering/screening via bo
|
|
|
17
17
|
- 只有用户**明确**说搜索页(`search/搜索页//web/chat/search`)时,才可转 `boss-recruit-pipeline`。
|
|
18
18
|
- recommend 失败时(如 `JOB_TRIGGER_NOT_FOUND/NO_RECOMMEND_IFRAME/BOSS_LOGIN_REQUIRED`)禁止降级到 recruit;先修 recommend 页面就绪/登录态。
|
|
19
19
|
|
|
20
|
+
- **Trae-CN / 原生 MCP 启动强制规则**
|
|
21
|
+
- 如果当前会话里已经成功调用过 `boss-recommend/prepare_recommend_pipeline_run`,说明 Trae-CN 已经具备原生 MCP tool call 能力;下一步必须继续调用 `boss-recommend/start_recommend_pipeline_run` 或 `boss-recommend/run_recommend`。
|
|
22
|
+
- `prepare_recommend_pipeline_run` 返回 `READY` 只代表参数校验通过,不代表已经启动;严禁再次调用 prepare 试图启动。
|
|
23
|
+
- 在 Trae-CN、Trae、Codex、Cursor、Claude Code 等普通 MCP 宿主中,严禁用 `run_command`、终端、PowerShell、`npx ... run --detached`、手写 `tools/call` JSON-RPC 或任何 CLI fallback 启动 recommend run。
|
|
24
|
+
- 不要说“prepare 覆盖了 MCP run 调用”。正确说法是:prepare 没有启动,下一步是原生 MCP tool call。
|
|
25
|
+
|
|
20
26
|
- **确认不可代填(强制)**
|
|
21
27
|
- 禁止 agent 自行“设置合理参数”并代替用户确认。
|
|
22
28
|
- 禁止在用户未明确回复前,把 `final_confirmed=true`。
|
|
@@ -95,8 +101,8 @@ description: "Use when users want Boss recommend-page filtering/screening via bo
|
|
|
95
101
|
- 限制:只读岗位列表,不启动筛选任务;若返回 `BOSS_LOGIN_REQUIRED`,必须让用户在自动打开的 Chrome 完成登录后重试,本次 cron 不得创建。
|
|
96
102
|
- 准备/门禁工具:`prepare_recommend_pipeline_run`
|
|
97
103
|
- 用途:只校验参数是否完整,不启动筛选任务。
|
|
98
|
-
- 要求:若用户要“现在启动”,返回 `status=READY` 且 `cron_ready=true` 后,下一步必须调用 MCP 工具 `run_recommend` 或 `start_recommend_pipeline_run`,禁止改用 CLI
|
|
99
|
-
- READY 响应会带 `prepared_only=true`、`run_started=false`、`recommended_next_tool=start_recommend_pipeline_run`、`alternate_next_tool=run_recommend`、`next_action.do_not_call_prepare_again=true`;必须照这些字段继续,不得再次调用 prepare。
|
|
104
|
+
- 要求:若用户要“现在启动”,返回 `status=READY` 且 `cron_ready=true` 后,下一步必须调用 MCP 工具 `run_recommend` 或 `start_recommend_pipeline_run`,禁止改用 terminal/shell/run_command/CLI/manual JSON-RPC。只有用户要“稍后/cron/定时启动”时,才继续创建定时任务。
|
|
105
|
+
- READY 响应会带 `prepared_only=true`、`run_started=false`、`recommended_next_tool=start_recommend_pipeline_run`、`alternate_next_tool=run_recommend`、`next_action.do_not_call_prepare_again=true`、`agent_guidance.native_mcp_required_after_prepare=true`;必须照这些字段继续,不得再次调用 prepare。
|
|
100
106
|
- 若返回 `NEED_INPUT` / `NEED_CONFIRMATION` / `FAILED`:继续补齐 `pending_questions` 或修复登录/页面/config;不得先创建 cron。
|
|
101
107
|
- Cron 创建工具:`schedule_recommend_pipeline_run`
|
|
102
108
|
- 用途:保存已经 READY 的完整 payload,并启动 package-owned detached scheduler;到点后由包内 worker 直接调用 `start_recommend_pipeline_run`。
|
|
@@ -132,10 +138,10 @@ description: "Use when users want Boss recommend-page filtering/screening via bo
|
|
|
132
138
|
7. 只有拿到 `SCHEDULED + schedule_id` 后才告诉用户定时任务已创建。回复必须包含 `schedule_id`,而不是只说“10 分钟后会启动”。
|
|
133
139
|
8. 到点后由 package-owned detached scheduler 启动;若 Chrome/登录异常,应作为 schedule/run 失败处理,不得再向用户追问参数。
|
|
134
140
|
|
|
135
|
-
Shell-only OpenClaw/QClaw cron 设置同样先运行 prepare
|
|
141
|
+
Shell-only OpenClaw/QClaw cron 设置同样先运行 prepare,并显式带上用户已确认的休息强度:
|
|
136
142
|
|
|
137
143
|
```powershell
|
|
138
|
-
npx -y @reconcrap/boss-recommend-mcp@latest prepare-run --instruction-file .\boss-recommend-instruction.txt --overrides-file .\boss-recommend-overrides.json --confirmation-file .\boss-recommend-confirmation.json --slow-live --port 9222
|
|
144
|
+
npx -y @reconcrap/boss-recommend-mcp@latest prepare-run --instruction-file .\boss-recommend-instruction.txt --overrides-file .\boss-recommend-overrides.json --confirmation-file .\boss-recommend-confirmation.json --rest-level <low|medium|high> --slow-live --port 9222
|
|
139
145
|
```
|
|
140
146
|
|
|
141
147
|
仅当上述命令输出 `READY` 且 `cron_ready=true` 后,才允许继续创建定时任务。
|
|
@@ -143,7 +149,7 @@ npx -y @reconcrap/boss-recommend-mcp@latest prepare-run --instruction-file .\bos
|
|
|
143
149
|
然后必须用 package-owned scheduler 创建定时任务,不要手写系统 cron:
|
|
144
150
|
|
|
145
151
|
```powershell
|
|
146
|
-
npx -y @reconcrap/boss-recommend-mcp@latest schedule-run --schedule-delay-minutes 10 --instruction-file .\boss-recommend-instruction.txt --overrides-file .\boss-recommend-overrides.json --confirmation-file .\boss-recommend-confirmation.json --slow-live --port 9222
|
|
152
|
+
npx -y @reconcrap/boss-recommend-mcp@latest schedule-run --schedule-delay-minutes 10 --instruction-file .\boss-recommend-instruction.txt --overrides-file .\boss-recommend-overrides.json --confirmation-file .\boss-recommend-confirmation.json --rest-level <low|medium|high> --slow-live --port 9222
|
|
147
153
|
```
|
|
148
154
|
|
|
149
155
|
用户查询时:
|
|
@@ -188,18 +194,22 @@ npx -y @reconcrap/boss-recommend-mcp@latest schedule-status --schedule-id <sched
|
|
|
188
194
|
- `featured` 且缺少校准文件:先 `boss-recommend-mcp calibrate`。
|
|
189
195
|
- `latest`:流程同 `recommend`,但使用最新 tab 结构(`data-status=1`)。
|
|
190
196
|
|
|
191
|
-
##
|
|
197
|
+
## True Shell-Only Fallback (Never Trae-CN)
|
|
198
|
+
|
|
199
|
+
本节只适用于宿主**完全没有**原生 MCP tool list、也无法调用 `boss-recommend/prepare_recommend_pipeline_run` 的 QClaw/OpenClaw 变体。
|
|
200
|
+
|
|
201
|
+
只要当前会话里出现过 `boss-recommend/prepare_recommend_pipeline_run`、`boss-recommend/run_recommend`、`boss-recommend/start_recommend_pipeline_run` 这类原生 MCP 调用,本节立即失效。Trae-CN 永远不使用本节。
|
|
192
202
|
|
|
193
|
-
当 QClaw/OpenClaw 变体只暴露 shell、没有原生 MCP tool list
|
|
203
|
+
当 QClaw/OpenClaw 变体只暴露 shell、没有原生 MCP tool list 时,才可以用 shell 继续启动。
|
|
194
204
|
|
|
195
205
|
推荐做法:
|
|
196
206
|
|
|
197
207
|
1. 将锁定的用户原文写入 instruction 文件,将已确认参数写入 `overrides` JSON;`confirmation` JSON 只需要 `{ "final_confirmed": true }`。
|
|
198
|
-
2. 先用 `prepare-run` 校验完整 payload 已 cron-ready
|
|
208
|
+
2. 先用 `prepare-run` 校验完整 payload 已 cron-ready,并显式传 `--rest-level <low|medium|high>`;未返回 `READY + cron_ready=true` 不得创建定时任务或启动 run。
|
|
199
209
|
3. 若用户要“现在启动”,用 detached CLI 启动,让父命令返回启动证据,子进程继续持有 CDP 会话:
|
|
200
210
|
|
|
201
211
|
```powershell
|
|
202
|
-
npx -y @reconcrap/boss-recommend-mcp@latest run --detached --instruction-file .\boss-recommend-instruction.txt --overrides-file .\boss-recommend-overrides.json --confirmation-file .\boss-recommend-confirmation.json --slow-live --port 9222
|
|
212
|
+
npx -y @reconcrap/boss-recommend-mcp@latest run --detached --instruction-file .\boss-recommend-instruction.txt --overrides-file .\boss-recommend-overrides.json --confirmation-file .\boss-recommend-confirmation.json --rest-level <low|medium|high> --slow-live --port 9222
|
|
203
213
|
```
|
|
204
214
|
|
|
205
215
|
4. 若用户要“稍后/cron/定时启动”,用 `schedule-run`,不是 `run --detached`。若 `schedule-run` 未返回 `SCHEDULED + schedule_id`,不得告诉用户定时任务已创建。
|
|
@@ -208,7 +218,7 @@ npx -y @reconcrap/boss-recommend-mcp@latest run --detached --instruction-file .\
|
|
|
208
218
|
兼容路径:
|
|
209
219
|
|
|
210
220
|
- 若 `--detached` 不可用,或返回 `RECOMMEND_CLI_RUN_UNSUPPORTED_CDP_ONLY`,说明 npm/QClaw 仍在使用旧包;先运行 `npx -y @reconcrap/boss-recommend-mcp@latest install --agent qclaw` 并重启 QClaw。
|
|
211
|
-
-
|
|
221
|
+
- 禁止使用 `npx @reconcrap/boss-recommend-mcp --stdio` 或 PowerShell 手写 `tools/call` JSON-RPC;该包的 MCP server 入口是 `start`,普通 MCP 宿主必须使用原生 tool call。
|
|
212
222
|
|
|
213
223
|
普通 MCP 可用时:
|
|
214
224
|
|
package/src/cli.js
CHANGED
|
@@ -2716,11 +2716,11 @@ function printHelp() {
|
|
|
2716
2716
|
console.log(" boss-recommend-mcp install --mcp-launch global-wrapper Use ~/.boss-recommend-mcp/bin wrapper so npm global upgrades affect MCP hosts");
|
|
2717
2717
|
console.log("");
|
|
2718
2718
|
console.log("Run command:");
|
|
2719
|
-
console.log(" boss-recommend-mcp prepare-run --instruction \"...\" --overrides-file overrides.json --confirmation-file confirmation.json");
|
|
2720
|
-
console.log(" boss-recommend-mcp schedule-run --schedule-delay-minutes 10 --instruction-file boss-recommend-instruction.txt --overrides-file overrides.json --confirmation-file confirmation.json");
|
|
2719
|
+
console.log(" boss-recommend-mcp prepare-run --instruction \"...\" --overrides-file overrides.json --confirmation-file confirmation.json --rest-level medium");
|
|
2720
|
+
console.log(" boss-recommend-mcp schedule-run --schedule-delay-minutes 10 --instruction-file boss-recommend-instruction.txt --overrides-file overrides.json --confirmation-file confirmation.json --rest-level medium");
|
|
2721
2721
|
console.log(" boss-recommend-mcp schedule-status --schedule-id <id>");
|
|
2722
|
-
console.log(" boss-recommend-mcp run --instruction \"推荐页上筛选211男生,近14天没有,有大模型平台经验\" --overrides-file overrides.json --confirmation-file confirmation.json");
|
|
2723
|
-
console.log(" boss-recommend-mcp run --detached --instruction \"...\" --overrides-file overrides.json --confirmation-file confirmation.json");
|
|
2722
|
+
console.log(" boss-recommend-mcp run --instruction \"推荐页上筛选211男生,近14天没有,有大模型平台经验\" --overrides-file overrides.json --confirmation-file confirmation.json --rest-level medium");
|
|
2723
|
+
console.log(" boss-recommend-mcp run --detached --instruction \"...\" --overrides-file overrides.json --confirmation-file confirmation.json --rest-level medium");
|
|
2724
2724
|
console.log(" boss-recommend-mcp list-jobs --slow-live --port 9222");
|
|
2725
2725
|
console.log(" boss-recommend-mcp chat prepare-run --slow-live --port 9222 # CDP-only preflight; start runs through MCP start_boss_chat_run");
|
|
2726
2726
|
console.log(" boss-recommend-mcp config set --base-url <url> --api-key <key> --model <model> [--thinking-level off|low|medium|high|current] [--greeting-message <text>] [--openai-organization <id>] [--openai-project <id>]");
|
package/src/index.js
CHANGED
|
@@ -1135,7 +1135,7 @@ function createToolsSchema() {
|
|
|
1135
1135
|
},
|
|
1136
1136
|
{
|
|
1137
1137
|
name: TOOL_PREPARE_RUN,
|
|
1138
|
-
description: "只校验 Boss 推荐页流水线参数是否完整;不会启动筛选任务。若用户要现在运行,返回 READY/cron_ready=true
|
|
1138
|
+
description: "只校验 Boss 推荐页流水线参数是否完整;不会启动筛选任务。若用户要现在运行,返回 READY/cron_ready=true 后必须继续调用本 MCP server 的 run_recommend 或 start_recommend_pipeline_run;只有定时/稍后运行才调用 schedule_recommend_pipeline_run。prepare 能返回结果就证明原生 MCP 可用,禁止改用 terminal/shell/run_command/CLI/manual JSON-RPC。",
|
|
1139
1139
|
inputSchema: createRunInputSchema()
|
|
1140
1140
|
},
|
|
1141
1141
|
{
|
|
@@ -1157,12 +1157,12 @@ function createToolsSchema() {
|
|
|
1157
1157
|
},
|
|
1158
1158
|
{
|
|
1159
1159
|
name: TOOL_RUN_RECOMMEND,
|
|
1160
|
-
description: "
|
|
1160
|
+
description: "立即通过原生 MCP 启动 Boss 推荐页筛选。它是 start_recommend_pipeline_run 的短别名,适合 Trae/Trae-CN 等代理在 prepare_recommend_pipeline_run 返回 READY 后继续正式运行;必须作为 MCP tool call 调用,禁止通过 terminal/shell/run_command/CLI/manual JSON-RPC 代替。",
|
|
1161
1161
|
inputSchema: createRunInputSchema()
|
|
1162
1162
|
},
|
|
1163
1163
|
{
|
|
1164
1164
|
name: TOOL_START_RUN,
|
|
1165
|
-
description: "
|
|
1165
|
+
description: "立即通过原生 MCP 异步启动 Boss 推荐页流水线(含同步门禁预检);prepare_recommend_pipeline_run 返回 READY 后,如果用户要现在运行就调用本工具或 run_recommend。必须作为 MCP tool call 调用,禁止通过 terminal/shell/run_command/CLI/manual JSON-RPC 代替。",
|
|
1166
1166
|
inputSchema: createRunInputSchema()
|
|
1167
1167
|
},
|
|
1168
1168
|
{
|
package/src/recommend-mcp.js
CHANGED
|
@@ -1567,7 +1567,8 @@ export function prepareRecommendPipelineRunTool({ workspaceRoot = "", args = {}
|
|
|
1567
1567
|
immediate_run: {
|
|
1568
1568
|
recommended_next_tool: "start_recommend_pipeline_run",
|
|
1569
1569
|
alternate_next_tool: "run_recommend",
|
|
1570
|
-
same_arguments: true
|
|
1570
|
+
same_arguments: true,
|
|
1571
|
+
native_mcp_required: true
|
|
1571
1572
|
},
|
|
1572
1573
|
scheduled_run: {
|
|
1573
1574
|
recommended_next_tool: "schedule_recommend_pipeline_run",
|
|
@@ -1575,7 +1576,35 @@ export function prepareRecommendPipelineRunTool({ workspaceRoot = "", args = {}
|
|
|
1575
1576
|
requires_schedule_field: true
|
|
1576
1577
|
},
|
|
1577
1578
|
do_not_call_prepare_again: true,
|
|
1578
|
-
do_not_use_cli_fallback_when_mcp_tools_available: true
|
|
1579
|
+
do_not_use_cli_fallback_when_mcp_tools_available: true,
|
|
1580
|
+
do_not_use_terminal_or_shell: true,
|
|
1581
|
+
forbidden_fallbacks: [
|
|
1582
|
+
"run_command",
|
|
1583
|
+
"terminal",
|
|
1584
|
+
"shell",
|
|
1585
|
+
"CLI detached fallback",
|
|
1586
|
+
"manual JSON-RPC over shell",
|
|
1587
|
+
"npx --stdio"
|
|
1588
|
+
]
|
|
1589
|
+
};
|
|
1590
|
+
const agentGuidance = {
|
|
1591
|
+
host_has_native_mcp: true,
|
|
1592
|
+
native_mcp_required_after_prepare: true,
|
|
1593
|
+
proof: "This prepare_recommend_pipeline_run response was returned by the MCP server, so the host can call MCP tools from this server.",
|
|
1594
|
+
immediate_run: {
|
|
1595
|
+
tool: nextAction.immediate_run.recommended_next_tool,
|
|
1596
|
+
alternate_tool: nextAction.immediate_run.alternate_next_tool,
|
|
1597
|
+
same_arguments: true
|
|
1598
|
+
},
|
|
1599
|
+
scheduled_run: {
|
|
1600
|
+
tool: nextAction.scheduled_run.recommended_next_tool,
|
|
1601
|
+
same_arguments: true
|
|
1602
|
+
},
|
|
1603
|
+
trae_cn: {
|
|
1604
|
+
next_step: "Call boss-recommend/start_recommend_pipeline_run or boss-recommend/run_recommend through the native MCP tool interface.",
|
|
1605
|
+
never_use_terminal_fallback_after_prepare: true
|
|
1606
|
+
},
|
|
1607
|
+
forbidden_when_mcp_tools_are_available: nextAction.forbidden_fallbacks
|
|
1579
1608
|
};
|
|
1580
1609
|
return {
|
|
1581
1610
|
status: "READY",
|
|
@@ -1585,7 +1614,8 @@ export function prepareRecommendPipelineRunTool({ workspaceRoot = "", args = {}
|
|
|
1585
1614
|
recommended_next_tool: nextAction.immediate_run.recommended_next_tool,
|
|
1586
1615
|
alternate_next_tool: nextAction.immediate_run.alternate_next_tool,
|
|
1587
1616
|
next_action: nextAction,
|
|
1588
|
-
|
|
1617
|
+
agent_guidance: agentGuidance,
|
|
1618
|
+
message: "READY only means the payload passed validation; prepare_recommend_pipeline_run did not start a run. This response proves the MCP server is available. To start now, call the native MCP tool start_recommend_pipeline_run or run_recommend with the same arguments. Do not call prepare_recommend_pipeline_run again, and do not use terminal, shell, CLI detached fallback, or manual JSON-RPC when MCP tools are available.",
|
|
1589
1619
|
review: parsed.review,
|
|
1590
1620
|
post_action: {
|
|
1591
1621
|
requested: normalized.postAction,
|