Expand description
§bitrouter (library)
Assembly layer: turns a bitrouter_sdk::config::Config into a running
bitrouter_sdk::App, and carries the management-command logic. This is
the home of v0’s load_builtin_plugins equivalent.
Assembly sits above the SDK and the plugins (plugins → sdk, sdk never
depends back) — see. The bin target (main.rs) is the CLI/TUI
entry point and a thin shell over this lib.
Re-exports§
pub use assemble::Assembled;pub use assemble::build_app;pub use assemble::build_app_with_path;
Modules§
- agent_
proxy bitrouter agent-proxy <agent_id>— stdio bridge between a downstream ACP consumer (e.g. an editor) and an upstream agent process configured underagents:inbitrouter.yaml.- agents
bitrouter agents— lifecycle CLI for upstream ACP agents.- assemble
- Assembly: turn a parsed
Configinto a runningApp. - auth
- OSS auth —
brvk_virtual-key authentication, theAuthenticatedevent, and theusers+api_keystables. - commands
- Management command logic — the implementations behind the CLI subcommands. Kept in the lib so it is testable and so a future desktop front-end can reuse it without dragging in the binary.
- daemon
- Daemon control over a Unix domain socket.
- db
- Database layer: connection handling and schema migrations.
- error_
report - User-facing CLI diagnostics — replaces anyhow’s default
Debugrendering ("Error: …\n\nCaused by:\n …") with a tighter, actionable presentation. - metering
- OSS metering — pipeline-observed cost data captured to local SQLite.
- paths
- Config source resolution for the OSS binary.
- policy
- OSS policy engine — per-API-key model allow/deny, spend ceiling, expiry, tool-access rules, request-rate limits.
- reload
AppReloader— the daemon’s config hot-reload fan-out.- style
- Shared terminal styling — ANSI palette + TTY /
NO_COLORgating — used by every user-facing CLI surface (error reports, status reports, future report-style output). Centralising the palette and the TTY-detection logic keeps the look consistent across surfaces and means a future “force colour” / theme toggle only has to change one place. - tools
bitrouter tools— introspection over the configured MCP servers.
Constants§
- VERSION
- Crate version string, surfaced by
bitrouter --version.