@bsbofmusic/cdper-doubao
v1.1.9
Published
Standalone Doubao CLI controlled through a user's real Chrome/Edge via CDP Bridge
Maintainers
Readme
cdper-doubao
Standalone Doubao workflow CLI for the user's real logged-in Chrome over CDP. It is not a general browser automation framework; use official playwright-core directly for arbitrary page control after Chrome is available.
Install
npm install -g @bsbofmusic/cdper-doubaoRequirements:
- Node.js 18+
- A real Chrome/Edge profile with Doubao logged in
- Local Chrome DevTools on
127.0.0.1:9222from your launcher/bridge;CDP_WSremains an optional explicit override
Use
cdper-doubao "1+1等于几?"
cdper-doubao "请详细解释 TCP keepalive" --json --wait normal
cdper-doubao doctor --json
cdper-doubao status --json
cdper-doubao session --jsonSave a CDP WebSocket URL locally:
cdper-doubao config set --ws "ws://<host>:<port>/devtools/browser?token=<token>" --jsonQuery options
--json- structured JSON output--mode expert- Doubao mode path--session <id>- continue a known session--conversation-policy auto|fresh|followup--wait short|normal|long|very_long--max-wait-ms <ms>--progress-every-ms <ms>--max-extends <n>--no-check- skip preflight check
Programmatic API
const { queryDoubao } = require('@bsbofmusic/cdper-doubao');
const result = await queryDoubao('请用一句话回答:1+1等于几?', {
conversationPolicy: 'fresh',
expectedDuration: 'short',
});Release notes — 1.0.3
- Depends on
@bsbofmusic/cdper-core@^1.2.7, sostatus --jsoncorrectly reports healthy local CDP asok=true. - Removed the dead
url-actionquery branch from the live Doubao query path. Fresh/followup queries now consistently use the composer path: open clean Doubao home, switch快速 → 专家, insert prompt text, click send, and verify submission. - Kept
url-actiononly as a URL-pattern guard for conversation-id parsing (/chat/url-actionis not a real followup anchor). - Pack/install smoke was verified from the generated tarball in an isolated npm prefix before publish.
Design note: Doubao link reading is more reliable when URLs are included in the composer prompt and handled by the page’s native preview/search flow. A hidden url-action branch created false confidence and made fallback logic unreachable.
Security
All Doubao workflow control happens through the user's real browser via local CDP. Tokens are redacted from diagnostic output. Do not commit CDP_WS or full WebSocket URLs containing token=. For arbitrary page automation, use playwright-core directly instead of expanding cdper's product surface.
