Skip to content

v3.1.0

Latest

Choose a tag to compare

@paiad paiad released this 27 Feb 07:42
· 4 commits to master since this release

v3.1.0

EN

🔧 Refactoring - Harden Tool Contract and Crawl Reliability

Platform/Crawler Registry Refactor

  • Introduced PlatformRegistry and CrawlerRegistry for clearer platform-to-crawler mapping
  • Reduced coupling in NewsService and improved registry-based validation
  • Makes platform management and future crawler expansion safer and easier

Crawl Outcome Model Hardening

  • Added structured per-platform outcome model (PlatformCrawlOutcome, PlatformCrawlStatus)
  • Improved partial-failure visibility instead of treating all failures uniformly
  • Better operational observability for unstable or blocked platforms

MCP Tool Response Contract Enhancement

  • get_hot_news and search_news now return partial_success
  • Added failure_count and detailed failure_details (platform, status, error_code, error_message, latency_ms)
  • Preserves existing core response fields while giving AI clients richer error context

📄 Documentation & Test Coverage

  • Added contract and registry-focused tests (ToolResponseContractTest, registry validation tests)
  • Updated README and OpenSpec change artifacts to reflect the hardened behavior

CN

🔧 重构 - 强化工具契约与抓取可靠性

平台/爬虫注册表重构

  • 引入 PlatformRegistry 与 CrawlerRegistry,明确平台与爬虫映射关系
  • 降低 NewsService 耦合度,并增强基于注册表的校验能力
  • 让平台管理和后续爬虫扩展更安全、更易维护

抓取结果模型强化

  • 新增结构化平台结果模型(PlatformCrawlOutcome、PlatformCrawlStatus)
  • 支持更精细的部分失败表达,而非统一失败处理
  • 提升对不稳定平台/被限流平台的可观测性

MCP 工具响应契约增强

  • get_hot_news 与 search_news 增加 partial_success 字段
  • 新增 failure_count 与 failure_details(包含 platform、status、error_code、error_message、latency_ms)
  • 保持原有核心字段兼容,同时为 AI 客户端提供更完整错误上下文

📄 文档与测试

  • 新增契约与注册表相关测试(ToolResponseContractTest、注册表校验测试)
  • 更新 README 与 OpenSpec 变更文档,反映强化后的行为