offerguard-mcp-server 0.4.0 → 0.4.2

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
@@ -1,118 +1,13 @@
1
- # OfferGuard MCP 0.4.0 复赛候选版
1
+ # OfferGuard MCP 0.4.2
2
2
 
3
- 面向大学生实习选择的证据审计工具。使用官方 MCP SDK,支持 Streamable HTTP、旧式 SSE stdio。
3
+ This package bundles the real official MCP SDK and OfferGuard rules for reproducible startup. It does not simulate tools or delegate scoring to a language model. Node.js >=20 is required. No dependency download is required after installing this package.
4
4
 
5
- **当前是本地候选版。2026-09-09 已读取线上草稿并修改四个节点和 MCP 输入引用,但线上验收未通过:真实 MCP 调用返回 `MCP database operation failed`。本地0.4.0尚未确认部署,不能把本地通过写成平台上线完成。** 进度与备份范围见 `work/online-edit-20260909.md`。
5
+ ## Run
6
6
 
7
- ## 本地复现
7
+ - stdio: `npx -y offerguard-mcp-server@0.4.2` after this version is published.
8
+ - HTTP/SSE: `npm start` in the installed package directory. Default bind address: 127.0.0.1:3000.
9
+ - Tools: offerguard_audit, risk_term_matcher, internship_compliance_checker, offer_score_calculator.
10
+ - Input: raw_input; the original AGENT_USER_INPUT name remains supported. Both names accept labeled source text or the structured JSON envelope. Conflicting values are rejected.
11
+ - Original source is in src; runtime files are in dist. Build with the matching repository's package-lock.json and scripts/build-hosted-package.js. Third-party licenses are in THIRD_PARTY_NOTICES.txt.
8
12
 
9
- 环境:Node.js >=20,npm;依赖版本由 package-lock.json 锁定。
10
-
11
- ```powershell
12
- npm.cmd ci
13
- npm.cmd test
14
- npm.cmd run validate
15
- ```
16
-
17
- Linux/macOS 使用 `npm` 替代 `npm.cmd`。在 Windows PowerShell 运行 Windows npm,不在 WSL 中直接执行 `.cmd` 文件。
18
-
19
- 本地启动 HTTP/SSE:
20
-
21
- ```powershell
22
- npm.cmd start
23
- ```
24
-
25
- 默认仅监听 `127.0.0.1:3000`。端点:`GET /health`、`/mcp`、`/sse`、`/messages`。本地地址不是星辰云端可访问的服务地址。
26
-
27
- 本地 stdio 客户端配置:
28
-
29
- ```json
30
- {
31
- "mcpServers": {
32
- "OfferGuard": {
33
- "command": "node",
34
- "args": ["ABSOLUTE_PROJECT_PATH/src/stdio.js"]
35
- }
36
- }
37
- }
38
- ```
39
-
40
- 0.4.0 是否已发布到 npm、是否被星辰托管,必须另行核验。不要仅凭本地版本号改线上启动命令。
41
-
42
- ## 四个真实工具
43
-
44
- | 工具 | 用途 |
45
- | --- | --- |
46
- | `offerguard_audit` | 独立来源审计、七维评分、追问、对比、状态更新和报告 |
47
- | `risk_term_matcher` | 返回风险词及肯定、否定、未知、冲突的原文证据 |
48
- | `internship_compliance_checker` | 收费、无薪等风险信号与关键信息缺口,不作法律定性 |
49
- | `offer_score_calculator` | 从来源文本重算评分,不信任调用者传入的评分或风险摘要 |
50
-
51
- ## 推荐输入
52
-
53
- ```json
54
- {
55
- "structured_input": {
56
- "jd_text": "岗位原文,不包含学生偏好",
57
- "student_profile": "专业、经历、薪资底线和到岗安排",
58
- "hr_reply": "可选的 HR 补充原文"
59
- },
60
- "mode": "single_check"
61
- }
62
- ```
63
-
64
- `raw_input` 继续支持带标签的原始文本,例如 `JD:...\n学生:...\nHR回复:...`。无标签且无法可靠归属的文本保留为 `unattributed`,先追问,不自动认定企业事实。自然语言覆盖是有限的,应由工作流先分离原文来源。
65
-
66
- 如果星辰节点只能绑定一个字符串,用 `raw_input` 传 JSON 字符串:
67
-
68
- ```json
69
- {
70
- "offerguard_schema": 1,
71
- "user_message": "本轮原话",
72
- "structured_input": {
73
- "jd_text": "本轮提供的岗位原文",
74
- "student_profile": "本轮提供的学生原文",
75
- "hr_reply": "本轮提供的 HR 原文"
76
- }
77
- }
78
- ```
79
-
80
- 同一输入不要同时放入重复的改写文案。各字段只填本轮实际来源,缺失字段省略,不填“无”代替未知。
81
-
82
- ## 多轮与模式
83
-
84
- 把工具返回的 `next_state` 原样保存到当前用户、当前会话、当前岗位的变量中。下一轮作为 `previous_state` 传回工具。服务自身不保存学生数据,也不会自动记住上一轮。
85
-
86
- ```json
87
- {
88
- "raw_input": "HR回复:日薪180元/天,每月15日发放。",
89
- "previous_state": {
90
- "schema_version": 1,
91
- "records": []
92
- }
93
- }
94
- ```
95
-
96
- 上面的空数组仅说明格式,实际使用前一次 `next_state.records`。`changes` 展示状态或值的变化;矛盾原文同时保留,综合分暂停。确认矛盾后,目前需以已核实的完整资料开启新评估,不能静默删除旧证据。更换岗位传 `new_assessment: true`。
97
-
98
- `mode` 可选:`single_check`、`negotiation`、`interview_prep`、`accept_conditions`、`full_report`。回复 1/2/3 分别对应追问、话术、接受条件。话术模式的可见报告不输出长篇评分。
99
-
100
- 对比输入用 `structured_input.offers`,恰好两个不同 `id` 的 `{id,jd_text,hr_reply?}`,共同学生画像放在 `student_profile`。也支持明确按行标记 `A:...`、`B:...` 的原文。各 Offer 独立审计;资料不足、分数相同或均不满足推进条件时不强行推荐。对比后的单岗位追问必须选定对应 Offer 的 `next_state`。
101
-
102
- ## 输出与失败
103
-
104
- - `facts`:每项状态与原文;`source_id` 对应状态中的来源记录。
105
- - `dimensions`、`overall_score`:未知项为 `null`;关键缺口或冲突存在时不生成综合分。
106
- - `route`:`advance`、`verify`、`reject`、`followup` 或 `compare`。
107
- - `mode` 与 `route` 独立。话术模式不代表岗位风险已经解除。
108
- - `report_text`:可直接渲染的 Markdown 文本,不包代码块。`report_date` 来自运行时北京时间。
109
- - `next_state`、`changes`:供工作流保存和更新;不要在报告或公共日志中暴露完整状态。
110
- - `mcp_audit_summary`、`rule_version`:工具与规则审计信息;MCP 通信成功不等同于企业事实已独立核验。
111
-
112
- 输入验证失败时工具返回 `isError: true` / `mcp_ok: false`;连接失败由客户端捕获。两种情况均须进入失败分支,停止生成评分报告。线上故障分支仍待验收。
113
-
114
- ## 测试与交付
115
-
116
- `npm run validate` 运行真实协议及业务回归,生成 `outputs/retest-v040/validation.json`、`validation.md`、测试日志和合成演示输入。耗时数据只代表本地规则执行,不能写成线上响应时间。
117
-
118
- 评分公式与已知边界见 `docs/SCORING.md`。星辰配置步骤和待验收项见 `docs/WORKFLOW_INTEGRATION.md`。旧 V2.3 文档和旧 YAML 是历史资料,不应直接导入或作为复赛当前版本证据。
13
+ A local package build does not prove successful cloud hosting. No current deployment claim is made.