WANGY1ER asked on X for Windows: the plugin said "macOS only", because binary() knew only /Applications/Doubao.app. Doubao's Windows app is the same Chromium 147 fork with the same chat page (doubao://doubao-chat/chat), so the plugin drives it the same way. - binary(): %LOCALAPPDATA%\Doubao\Application\app\Doubao.exe, the per-user install's own exe (Application\Doubao.exe beside it is a launcher). - dataDir(): %LOCALAPPDATA%\magpie-doubao-work. - copies() is empty on Windows: Chromium keeps one copy per profile there, so the user's own Doubao keeps running and the plugin's copy opens beside it, in a second window. No "quit Doubao first" on Windows. - Linux stays unsupported: Doubao has no Linux build. Its download page's platform list is ios, android, mac, OpenHarmony, windows. The sign-in says so. Run: - bun test packages/doubao-work: 29 pass on mote (temp HOME, as CI), win-run (Windows 11) and wsl-run (Ubuntu 24.04). bun scripts/check.mjs ok. - Live on xiaomi-gpu (Windows 11, Doubao 2.34.6 / Chromium 147), with the owner's own Doubao running in the console session: the plugin's App started app\Doubao.exe from its own profile beside it, its DevTools port answered with doubao://doubao-chat/chat, owns() took it, and each step of an ask ran in the real page: NEW_TASK "", CLOUD "" (mode 云电脑), 自动 and 豆包 2.1 Lite picked, 豆包 2.1 Pro "upgrade", fill wrote three lines into tiptap. The owner's copy was untouched throughout. Broken by hand: - binary() without its win32 line: "the app is found on macOS and Windows" is red on mote and Windows. - copies() without its win32 line: "on Windows a running copy never blocks" is red on mote. Not tried: a signed-in request on Windows. That Doubao has no account signed in (its cookie jar is empty), so Enter was not sent; signed-in STATE relies on data-testid=sidebar_bottom as on macOS.
豆包工作 (Doubao Work)
Doubao Work runs its agent loop in ByteDance's cloud and has no API, so there is no request to make on its behalf. This plugin uses the Doubao desktop app the way a person does instead, and gives what it reads back as an OpenAI chat completion:
- It starts Doubao from a profile of its own (
~/Library/Application Support/magpie-doubao-work/profileon macOS,%LOCALAPPDATA%\magpie-doubao-work\profileon Windows), with Chrome DevTools on a local port. Your everyday Doubao's profile is not touched; you sign in once in this second window. - Each request opens a new 工作任务, switches it from 本地电脑 to 云电脑 (so Doubao's agent never reads or runs anything on your computer), picks the model, and writes the whole request (system prompt, tools, every turn) into the input as one message.
- It reads the reply from the message Doubao renders, as it streams: the
raw markdown, and the thinking as
reasoning_content. - The client's tools are asked for as text,
<tool_call>{"name": …, "arguments": …}</tool_call>, and given back astool_calls.
Models: 自动 (auto), 豆包 2.1 Lite (doubao-2.1-lite) and 豆包 2.1 Pro
(doubao-2.1-pro, needs a paid Doubao plan).
What it costs
- Unofficial. It uses Doubao the way its own window does, but ByteDance may not like it. Use an account you can afford to lose.
- On macOS, Doubao runs one copy at a time. If you opened Doubao yourself, quit it (⌘Q) first: the plugin's copy can't start beside it, and yours can't be driven (Chromium allows debugging only off the default profile). While the plugin's copy runs, opening Doubao brings up its window, which you can use as well. On Windows the plugin's copy runs beside yours, in a second window.
- One request at a time. There is one window.
- Every request is a new task in your Doubao history.
- A request the client stops stops being read, but Doubao finishes its task in the cloud anyway.
- Slower than an API: a task takes a few seconds to open, and the reply is read about seven times a second.
- Text only. Images and files in a request are left out.
- Usage is Doubao's own prompt count; the reply's tokens are estimated.
- The DevTools port is on 127.0.0.1 only, but any program on this computer can drive the signed-in Doubao window through it while it runs.
- macOS and Windows. Doubao has no Linux app.
Settings
DOUBAO_WORK_APP: the Doubao binary, if it is not at/Applications/Doubao.app/Contents/MacOS/Doubao(macOS) or%LOCALAPPDATA%\Doubao\Application\app\Doubao.exe(Windows).DOUBAO_WORK_HOME: where the profile and port live.
Adding another cloud agent
cdp.mjs knows nothing about Doubao: it starts a Chromium-based desktop app
from its own profile and drives one page. doubao.mjs is everything that is
Doubao's: which buttons to press and where the reply is. prompt.mjs and
openai.mjs turn a chat request into one message and the reply back into a
completion. Another app built on Chromium or Electron needs only its own
doubao.mjs.