Contributing
AgentDuo is one repository: the duo CLI in apps/cli, the VS Code extension in apps/vscode, the desktop app in apps/desktop, the code they share in packages/ (the engine, the host that runs it in a worker, and the chat’s page) and this website in website/. All of them build with Node.js ≥ 22.12 and npm; the root’s npm workspaces link the packages.
On this page
Build the CLI from source
Terminal
git clone https://github.com/HaiTrieu247/agentduo.git
cd agentduo
npm ci
npm run buildnpm run build bundles the CLI into apps/cli/dist/. Run it as node apps/cli/dist/cli.js, or run npm link in apps/cli to put duo and agentduo on your PATH.
| Command | What it does |
|---|---|
npm test | Unit, workflow and UI tests (Vitest). Workflow scenarios drive a fake agent through real subprocesses, so they cost nothing. |
npm run typecheck | TypeScript, strict. |
npm run test:pack | Builds, packs and installs the package in a temporary prefix, then runs its binaries. |
npm run demo:ui | The live terminal UI with scripted fake agents (free). |
npm run smoke:real | Real agents on a demo repository. It costs money. |
The VS Code extension
The extension builds from the root, with the root’s toolchain:
| Command | What it does |
|---|---|
npm run typecheck:vscode | Checks the extension’s TypeScript. |
npm run build:vscode | Builds apps/vscode/dist (host and webview) and runtime/ (the engine worker and schemas). |
npm run test:vscode | A smoke test in a downloaded VS Code; on Linux, run it under xvfb-run. |
npm run package:vscode | Writes apps/vscode/agentduo-vscode-<version>.vsix, for code --install-extension. |
npm run test:pack:vscode | Packages it, checks the VSIX contents and runs its worker outside the checkout. |
To develop it, open the repository in VS Code and press F5 (Run agentduo extension): it builds the extension and opens an Extension Development Host.
The desktop app
The desktop package builds from the checkout with the root toolchain, so install the root first, then the desktop’s own development dependencies (Electron, electron-builder, @electron/fuses, electron-updater, Playwright):
Terminal
npm ci
npm ci --prefix apps/desktop| Script | What it does |
|---|---|
dev | Builds, then opens the app from dist/. |
build | Bundles main, preload, renderer and the engine worker into dist/. |
typecheck | The desktop’s TypeScript check. |
test | Its unit and integration tests. |
test:e2e | The Electron end-to-end tests (Playwright): the real app with fake CLIs in a scratch Git project, driven as a user. |
pack:dir | An unpacked app for this system under release/. |
test:pack | Checks that unpacked app away from the checkout. |
package:mac, package:win, package:linux | The installers. Packages are native: build each system’s on that system. |
When you change the desktop app, run typecheck, test, build and test:e2e. Its version follows the root’s; npm version keeps them together.
This website
The website is static HTML generated from website/content, in English and Vietnamese. It needs no install:
Terminal
cd website
npm run build
npm test
npm run previewWhile writing a page, node scripts/check-page.mjs <page id> checks it in every language without building the site. Every section and sub-heading must exist in both languages.
Conventions
- AgentDuo enforces nothing. It passes protocol flags only, plus your
argsandrole_args; unexpected changes become warnings, never blocks. Permission rules belong to each CLI’s own configuration. - The published CLI’s runtime dependencies (
apps/cli/package.json) are exactlyink,react,commander,yamlandajv; the workspace packages are bundled into it. Ask before adding one. - Node ≥ 22.12, ESM, TypeScript strict. Relative imports end in
.js, also for.tsand.tsxfiles. - Packages import each other by name (
@agentduo/engine/…), in one direction: the engine, then the host, then the webview, then the apps;test/boundaries.test.tschecks it. What reaches the screen is an event, and human decisions come back through an interface. - A changed workflow transition gets a scenario in
packages/engine/test/workflow/workflow.test.ts. Agent output schemas stay OpenAI-strict (every property required, no additional properties), whichpackages/engine/test/agents/schema.test.tschecks. - CI runs the tests on Linux, macOS and Windows. Build paths with
joinin tests, and never name the user config folder withXDG_CONFIG_HOMEalone: Windows reads%APPDATA%.
The full list is in AGENTS.md at the root of the repository.
Report a problem
Open an issue on GitHub. Before you do, check Troubleshooting. Include:
- The AgentDuo version (
duo --version; the extension’s in VS Code’s Extensions view; the desktop app’s in Settings → General) and the versions ofclaudeandcodex. - Your operating system and its version, and which interface you used.
- The output of
duo doctor, or the desktop app’s Settings → Diagnostics export. - What you did, what you expected and what happened, with the warning or error text.
Warning
Issues are public. Before you post anything:
- Replace email addresses, user names and home folder paths (for example with
/repoor~). - Remove tokens, API keys and anything from a credential file.
- Do not attach a run folder or conversation from private code: it holds your prompts, the agents’ output and diffs of your files. Copy only the lines that show the problem.
License
AgentDuo is released under the MIT License (LICENSE in the repository).