Skip to content

feat(chanmama): add commerce analytics adapters - #2191

Open
genoooool wants to merge 1 commit into
jackwener:mainfrom
genoooool:codex/chanmama-adapters
Open

feat(chanmama): add commerce analytics adapters#2191
genoooool wants to merge 1 commit into
jackwener:mainfrom
genoooool:codex/chanmama-adapters

Conversation

@genoooool

Copy link
Copy Markdown

Description

Add a read-only browser adapter for ChanMama (蝉妈妈), a third-party Douyin
commerce analytics service.

The adapter provides 11 commands covering:

  • product category discovery and ranking search
  • product details and daily/channel analysis
  • associated creators, commerce videos, live rooms, and product-card trends
  • viewer and buyer audience profiles
  • creator moving-video analysis by period and traffic source

All commands read the already-rendered Vue page state from the authenticated
ChanMama page. They do not reproduce the site's payload encryption and do not
perform write actions. Third-party estimates retain value-type/range metadata,
and masked numeric sentinels are emitted as null.

Related issue: none

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful

Documentation (if adding/modifying an adapter)

  • Added doc page under docs/adapters/ (if new adapter)
  • Updated docs/adapters/index.md table (if new adapter)
  • Updated sidebar in docs/.vitepress/config.mts (if new adapter)
  • Updated README.md / README.zh-CN.md when command discoverability changed
  • Used positional args for the command's primary subject unless a named flag is clearly better
  • Normalized expected adapter failures to CliError subclasses instead of raw Error

Verification

  • npm run typecheck
  • npm run build
  • npm test — 559 files, 6,348 passed, 1 skipped
  • npm run test:adapter — 473 files, 4,968 passed
  • npm run docs:build
  • npm run check:typed-error-lint
  • npm run check:silent-column-drop
  • npm run advise:listing-id-pairing
  • node dist/src/main.js validate chanmama — 11 commands, 0 errors, 0 warnings
  • Live Browser Bridge verification against all 11 commands using local fixtures

The full test run used isolated OPENCLI_CONFIG_DIR and OPENCLI_CACHE_DIR
directories so the developer machine's saved default browser profile could not
leak into browser-targeting unit tests.

Screenshots / Output

Representative live verification results:

  • categories: 20 rows
  • products: 3 rows
  • product: 1 row
  • product-analysis: 3 rows
  • authors: 50 rows across the site's effective 30-row component pages
  • videos: 3 rows
  • video: 1 row
  • live: 2 rows
  • card: 3 rows
  • audience: 2 rows (product audience and product buyers)
  • author-sales-videos: 3 rows

No cookies, credentials, traces, or private site-memory fixtures are included.

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