Thanks for contributing to AgentBridge.
Before your first pull request can be merged, please sign our lightweight Contributor License Agreement. A bot will prompt you on the PR; you reply once and all future PRs are covered. The CLA keeps the project's licensing options open (e.g. a future commercial edition alongside the open-source one) while you keep full ownership of your own contributions.
- Bun v1.0+
- Claude Code v2.1.80+
- Codex CLI
bun install
bun link # Makes the 'agentbridge' command available globallyUse the dev command to register a local plugin marketplace and sync plugin files to the Claude Code cache:
agentbridge dev # Register local marketplace + sync plugin
agentbridge claude # Start Claude Code with plugin auto-loadedAfter changing plugin or runtime code, run agentbridge dev again and restart Claude Code (or /reload-plugins in an active session).
Committed build artifacts. The bundles under
plugins/agentbridge/server/*.jsare generated but committed on purpose (the marketplace and.mcp.jsonrun them straight from git). After anysrc/change runbun run build:pluginand commit the result; on a bundle conflict, rebuild — do not hand-merge. See docs/adr-bundle-in-git.md.
- Create a focused branch for one change (
feat/xxx,fix/xxx,docs/xxx). - Make the smallest coherent change that solves the problem.
- Update documentation when behavior, setup, or limitations change.
- Run validation locally before opening a pull request.
- All PRs target
masterand use squash merge.
Run these commands before submitting a PR:
bun run typecheck # TypeScript type checking
bun test src/ # Unit + E2E testsBoth must pass. If your change affects the local bridge flow, add manual reproduction steps in the PR description.
- Unit tests:
src/unit-test/*.test.ts(pure-logic, fast inner loop —bun run test:unit) - Integration / E2E tests:
src/integration-test/*.test.ts(spawn real processes; slow). Includese2e-cli.test.ts(CLI surface) ande2e-reconnect.test.ts(daemon reconnect). Run withbun run test:integration. - Integration tests use isolated harnesses with temporary directories, reserved ports, and shim binaries
- All tests (both layers) run with
bun test src(thecheckgate and CI run the full suite)
- Keep PRs small and scoped to one problem.
- Never push directly to
master-- always use feature/fix branches + PR. - Explain the user-visible change and the reason for it.
- Include validation results from
bun run typecheckandbun test src/. - Link related issues when applicable.
- Update
README.mdandREADME.zh-CN.mdtogether when setup or usage changes.
- Use TypeScript with strict typing.
- Prefer small, explicit functions over broad refactors.
- Preserve the current architecture unless the PR is intentionally structural.
- Avoid committing local machine config, secrets, logs, or generated noise.
- Keep comments short and only where they add real context.
- Use
execFileSync(array form) instead ofexecSync(string form) to avoid shell injection.