Repository navigation
Releases
v0.2.0 — 增量合规与外部漂移
http-semantics-mcp v0.2.0
第二轮迭代:只做「增量合规与外部漂移」。判定逻辑与冻结数据零改动——87 条 golden、31 个
规则码、codes.json / rules.py / schemas/tools/*.json 的字节与 v0.1.0 完全相同。
变更
- 协议版本(D51):
SUPPORTED_PROTOCOL_VERSIONS追加2025-11-25;DEFAULT_PROTOCOL_VERSION
仍为2025-06-18。README 的「Protocol surface」现在写明只支持 legacy 握手——
modern 客户端(跳过initialize、每请求带params._meta)会得到-32002 Server not initialized,server/discover得到-32601。行为是明确定义的错误,不是静默误解析。 structuredContent(D52):五个 tool 都发布outputSchema,而三版规范在 Output Schema
节都写 Servers MUST provide structured results that conform to this schema。tools/call
的结果现在同时给出structuredContent与content[0].text,两者反序列化后同值(有测试
逐字节断言)。错误结果(isError: true)的structuredContent是{"error": {...}}。- Python floor 3.8 → 3.12(D53):3.8 已于 2024-10-07 EOL;
pytest 9要求 ≥3.10,
SPDX license 所需的setuptools>=77要求 ≥3.9;ubuntu-latest自 2026-10-19 起迁
Ubuntu 26,而 setup-python 的 3.8 清单没有 26.04 构建。CI 矩阵改为
{ubuntu-latest, windows-latest} × {3.12},actions 升到checkout@v7/setup-python@v7
(消掉 Node.js 20 弃用注解)。 - license 元数据:
license = "MIT"(SPDX 表达式),删掉已弃用的License ::classifier,
build-system抬到setuptools>=77。wheel 元数据现在是License-Expression: MIT,
构建无 license 弃用告警。 - 发布门名副其实(D54):
scripts/check_release.py --online的attachments检查过去只
比对附件名——把留档里的 sha256 改成 64 个0仍然是 10 PASS。现在逐名比对
gh release view --json assets的digest值;gh太旧没有该字段时报
EnvironmentMissing(退出 3),不静默 PASS。
未改
- 协议握手状态机(不做 dual-era)、
judgement/**的判定语义、错误码集合、
data/README.md §4的任何取值/排序/字段集合口径。 - 运行时依赖仍为 0(
dependencies = [])。
相对 v0.1.0
| v0.1.0 | v0.2.0 | |
|---|---|---|
| Python floor / CI 矩阵 | >=3.8,{ubuntu, windows} × {3.8, 3.12} |
>=3.12,{ubuntu-latest, windows-latest} × {3.12} |
| 协议版本集合 | 2025-06-18 / 2025-03-26 / 2024-11-05 |
追加 2025-11-25(DEFAULT 不变) |
tools/call 信封 |
content + isError |
再加 structuredContent |
| 测试 | 379 | 397 |
| 冻结数据 | 87 golden / 31 code | 完全不变 |
v0.1.0 的 tag 与 Release 保持不动:它的附件里 README 仍是 M5 版(写着「本仓没有远端」),
这一差异登记在仓库 plan/RELEASE-M6.md 的「tag 后追加事实」栏。本次 v0.2.0 的附件
是修正后的自述。
附件校验
ce2531bd8f28603477816ef313195c4537ba6c35308d9ed9e837dd66425898e2 http-semantics-mcp-0.2.0.tar.gz
SHA256SUMS:
sha256: ce2531bd8f28603477816ef313195c4537ba6c35308d9ed9e837dd66425898e2 http-semantics-mcp-0.2.0.tar.gz
复验:
gh release download v0.2.0 --repo yuluo554/http-semantics-mcp
sha256sum -c SHA256SUMS # → http-semantics-mcp-0.2.0.tar.gz: OK
tar xzf http-semantics-mcp-0.2.0.tar.gz && cd http-semantics-mcp-0.2.0
python -m http_semantics_mcp --version # 0.2.0
python -m http_semantics_mcp --selftest # 6 passed / 0 failed
python tools/run_gates.py # 8 gate(s), 0 failing
python -m pytest -q # 397 passed附件由 git archive --format=tar --prefix=http-semantics-mcp-0.2.0/ v0.2.0 | gzip -9n 生成,
可从 tag 逐字节重建。
CI
mainpush0bb3add→ run 39426515196 success(ubuntu + windows 两腿)v0.2.0tag push → run 39426524638 success(两腿)
决策留档
plan/06-交付对标与决策记录.md 的 D51–D55;发布留档 plan/RELEASE-M6.md。
v0.1.0
http-semantics-mcp v0.1.0
首个公开版本。确定性 HTTP 语义判定 MCP server(stdio 传输,换行分隔 JSON-RPC
2.0,纯标准库手写,零运行时依赖)。
输入是调用方给出的 header 字面量,输出是规范推导的判定。无网络、无抓包、不做
安全评分;时间以参数 now 传入,不读时钟——同一输入必须序列化为逐字节相同的
输出。
五个 tool
| tool | 回答的问题 |
|---|---|
cors_evaluate |
浏览器会放行这个跨源响应吗? |
cors_simulate_fetch |
跨重定向、逐跳会发生什么? |
cache_evaluate |
这条已存响应能否不再校验直接复用?(RFC 9111) |
conditional_evaluate |
哪条条件请求规则决定状态码?(RFC 9110) |
vary_match |
这条缓存条目与到来的请求匹配吗? |
安装与验证
python -m pip install -e .
python -m http_semantics_mcp --version # 0.1.0
python -m http_semantics_mcp --selftest # summary: 6 passed, 0 failed附件
| 附件 | 用途 | sha256 |
|---|---|---|
http-semantics-mcp-0.1.0.tar.gz |
手工构建的源码包(git archive v0.1.0 | gzip -9n) |
8cc8892c20f1d37f175c8005a0cdd41993b90b58b6aaeef357bda2e647cef8b2 |
SHA256SUMS |
上行的 sha256sum -c 清单 |
3fa920e376b4870f34975db75f45dd4fef15609eca5d4ff977128eaeb8fab805 |
复验(无需信任本正文):
sha256sum -c SHA256SUMS # 校验源码包
tar -xzf http-semantics-mcp-0.1.0.tar.gz
cd http-semantics-mcp-0.1.0
python -m http_semantics_mcp --version # 0.1.0,退出 0
python -m http_semantics_mcp --selftest # 6 passed, 0 failed,退出 0发布时点事实(本机双解释器实跑)
- Python 3.8 → 379 passed / 379 collected;Python 3.12 → 379 passed / 379 collected
- 冻结 golden 87 / 87 与生产输出逐字节一致;规则码覆盖 31 / 31(双向集合等式)
- 静态门 8 门(732 文件项,0 findings);变异验证 43 / 43 使门变红
- WPT
cors/台账 45 = 15 mapped + 30 unmappable(逐条有 reason);15/15 mapped 行实跑对账 - 5 个 tool 描述符(
inputSchema+outputSchema),dist-mirrors6 文件逐字节相等 scripts/check_release.py --pre-tag→ 7 PASS / 0 FAIL / 3 SKIP
CI
GitHub Actions 首次接入本仓库,四矩阵 {ubuntu, windows} × {3.8, 3.12} 全绿:
| 事件 | run | 结论 |
|---|---|---|
push main(首推 d50011f) |
39141511111 | success(4 legs) |
push v0.1.0 |
39141686281 | success(4 legs) |
push main(发布后回写 ada0965) |
39142585779 | success(4 legs) |
push 数 = run 数(按事件对账):首推阶段 2 = 2,含回写提交共 3 = 3;此后每个文档面
提交恒为 1 push = 1 run。
完整发布留档见发布树内 plan/RELEASE-M6.md。