Skip to content

refactor: add XHS-shaped content platform interface - #287

Closed
IRONICBo wants to merge 13 commits into
socai-io:mainfrom
IRONICBo:refactor/content-platform-interface
Closed

refactor: add XHS-shaped content platform interface#287
IRONICBo wants to merge 13 commits into
socai-io:mainfrom
IRONICBo:refactor/content-platform-interface

Conversation

@IRONICBo

@IRONICBo IRONICBo commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an XHS-shaped ContentPlatform contract for get_notes, search, author_scan, and page_state
  • expose common XHS request schemas and product defaults for note limits, comments, preview, media download, OCR, and local ASR
  • select adapters by site_id through SiteSpec.content_platform without platform branches in shared dispatch code
  • generate the common agent tool surface from adapter capabilities and hide unsupported operations
  • implement XHS as the reference adapter and preserve the existing XHS login and rate-limit tools
  • register the existing Douyin card search and page-state tools as a capability-limited adapter pending its full implementation PR
  • replace hosted audio transcription with a local Qwen3-ASR 0.6B Int8 worker, CLI and desktop model installation, verified release assets, and timeout recovery

Design

  • XHS owns the upper-layer vocabulary and effective-input behavior
  • platform adapters own URL contracts, navigation, extraction, native entity fields, and canonical aliases
  • ContentCapabilities reports full search, author scan, filters, comments, replies, media, OCR, ASR, history, and artifact support
  • platform-specific CLI commands remain compatible while interactive agents receive the common four-tool surface

Validation

  • cargo check -p socai-cli
  • cargo check -p socai-asr -p socai-core -p socai-cli -p socai_app
  • cargo test -p socai-core --lib — 99 passed, 0 failed, 2 ignored
  • pnpm run build
  • actual WAV and XHS MP4 transcription with the installed local model
  • CDP endpoint discovery skips stale conventional ports and reconnects to another live existing browser endpoint
  • macOS arm64, macOS x86_64, and Windows x86_64 sherpa-onnx archives verified against pinned SHA-256 values
  • rustfmt --edition 2021 --check on changed Rust files
  • git diff --check
  • two-pass automated review completed with no remaining findings

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

@IRONICBo is attempting to deploy a commit to the socai Team on Vercel.

A member of the Team first needs to authorize it.

@IRONICBo
IRONICBo force-pushed the refactor/content-platform-interface branch from b44c040 to da3ace4 Compare September 2, 2026 12:40
@IRONICBo

IRONICBo commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

按当前实现边界撤回公共 ContentPlatform 抽象。TikTok 和 Douyin 分别沿用现有 site 模块结构接入,XHS 保持不变;本地 Whisper small ASR 独立提交。

@IRONICBo IRONICBo closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant