pitbridge (daemon)
Python 3.12 daemon that sits between AI agents (MCP / REST / WS) and the
NinjaTrader 8 AddOn (outbound WebSocket, port 8873). Binding spec:
../docs/architecture.md.
Dev setup
cd daemon
uv venv --python 3.12
uv pip install -e ".[dev]"
uv run pytest
uv run ruff check .
Status: M2 daemon-core — protocol models (14 message types, schema-mirrored),
guardrail engine (M1), the AddOn WS link (hello/auth/heartbeat/snapshot/
reconnect-reconcile, reconcile-first hard), executor (idempotent pending-order
table + ack timeouts), the frozen pipeline (schema -> permission -> guardrails
-> confirm gate -> submit -> audit) as the single order path, the /v1 REST + WS
surfaces, and tools/fake_addon.py for chaos tests. pitbridge run --config
serves it. MCP surface + C# AddOn land in M3/M4.
Agent surface (0.2.0)
One uvicorn server, one port (default 127.0.0.1:8873), three transports over
the same guardrail pipeline:
- REST
/v1/*and the WS/v1/wsevent feed; - MCP over streamable HTTP at
/mcp([daemon] mcp_http, defaulttrue), for HTTP-native MCP clients; served by bothpitbridge runandpitbridge mcp; - MCP over stdio via
pitbridge mcp(Claude Desktop / Claude Code).
Bearer auth ([daemon] agent_token)
Generate a token with pitbridge token new and set it in the config yourself
(the CLI never writes it for you). With it set, every /v1/* call, the
/v1/ws stream and /mcp require Authorization: Bearer <agent_token>
(401 otherwise, constant-time compare). The WS /v1/addon leg keeps its own
pairing_token hello auth.
Fail-closed rule: a non-localhost bind REFUSES to start without an
agent_token (on top of the existing paired_mode + pairing_token
requirement). On a 127.0.0.1 bind the token is optional and off by default
(backwards compatible). pitbridge status and pitbridge doctor report the
auth state.
Metadata
Release files for pitbridge 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pitbridge-0.2.2.tar.gz | 164.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pitbridge-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 252.0 kB
Release files / pitbridge-0.2.2.tar.gz
| Download URL | pitbridge-0.2.2.tar.gz |
|---|---|
| Size | 164.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b9a2eab0bd340574f40503f2e674759494e2af88d340efc9a87f4038dc15f71
|
|
BLAKE2b-256 checksum How to use checksums |
f8a1bf5533fdfbd7cf63fbda3778bdfc9904c31975173d5c48bed25be2c418e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pitbridge-0.2.2-py3-none-any.whl
| Download URL | pitbridge-0.2.2-py3-none-any.whl |
|---|---|
| Size | 87.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04f2c3de0d55f178556167ec811a7f11715051ba9a0f4b29976fdf7404463401
|
|
BLAKE2b-256 checksum How to use checksums |
3174755e63db22c33bff8b15304dd82c29752b3bd5f3a2fb28631b0b0dc32fc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|