Skip to main content

[DAN] BRIDGE

A real, standalone, zero-dependency multi-channel message bus for agents — post, read, and list shared channels from a plain local log.

python runtime deps docs license

⚡ Zero runtime dependencies. Pure Python standard library (≥ 3.9) — no packages to resolve, no build step. python -m unittest tests it. Full breakdown under Dependencies.

🔴 No authentication, by design — stated plainly, not left for you to discover. The agent sender is caller-asserted: anyone with local write access to the bus file can post as any agent name, and the log carries no message id, nonce, or tamper-evidence. Use it only inside a trust boundary you already control — see Trust model. Per-agent auth is a deliberate product decision, not an oversight (see SECURITY.md).

A local coordination log for cooperating agents: any number of agents post to and read from any number of named channels, all backed by one plain, append-only file. No server, no broker, no network — just a file and three commands.

Install

Not on PyPI yet — install from source:

pip install git+https://github.com/STRATO-DAN/dan-oss-bridge-cli.git

or clone and install:

git clone https://github.com/STRATO-DAN/dan-oss-bridge-cli.git
cd dan-oss-bridge-cli
pip install .

Pure standard library, so there is no dependency tree to resolve. Once it's published, pip install dan-oss-bridge will work directly.

Use

dan-oss-bridge post <channel> <agent> "<text>"   # append a message to a channel
dan-oss-bridge read  <channel> [--limit N]       # read a channel (default: 50 most recent)
dan-oss-bridge channels                          # list every channel that has a message

Messages persist to ~/.dan-oss-bridge/bus.jsonl by default (override with --bus or DAN_OSS_BRIDGE_BUS), so they survive across processes and restarts.

Worked example

Real output from a live run — two agents post to a standup channel, then read it back:

$ dan-oss-bridge post standup agent-a "Starting on the auth refactor"
posted to 'standup'
$ dan-oss-bridge post standup agent-b "Reviewing agent-a's PR now"
posted to 'standup'

$ dan-oss-bridge read standup
[standup] agent-a: Starting on the auth refactor
[standup] agent-b: Reviewing agent-a's PR now

$ dan-oss-bridge channels
standup

$ dan-oss-bridge read standup --limit 1
[standup] agent-b: Reviewing agent-a's PR now

Messages are returned oldest-first, and --limit N reads only the N most recent (the read seeks the tail of the file, so it stays fast on a large log — it's bounded by N, not the whole file).

Python API

from dan_oss_bridge import MessageBus

bus = MessageBus("~/.dan-oss-bridge/bus.jsonl")

bus.post("standup", "agent-a", "Starting on the auth refactor")
bus.read("standup")            # -> [Message(channel="standup", agent="agent-a", text=..., ts=...)]
bus.read("standup", limit=1)   # -> only the most recent message
bus.channels()                 # -> ["standup"]

Message is a small dataclass — channel, agent, text, ts (a POSIX timestamp). post raises ValueError on an empty channel/agent or a text larger than 1 MiB.

Configuration

Setting Default What it does
--bus <path> ~/.dan-oss-bridge/bus.jsonl Which log file to use (CLI flag)
DAN_OSS_BRIDGE_BUS (unset) Same as --bus, via environment (the flag wins if both are set)
--limit <N> 50 On read: how many of the most-recent messages to return

What it never does

  • Never opens a network socket or a server — it is a file and a CLI, nothing listens.
  • Never lets one bad line deny reads to everyone — a corrupt record (invalid UTF-8, non-JSON, a valid-JSON non-object, or a bad timestamp) is skipped, not fatal.
  • Never loads the whole log to answer read --limit N — it seeks backward from the end, so read cost is bounded by N, not the file size.
  • Never crashes on a bad invocation — an unwritable or directory --bus path is a clear one-line error and exit code, not a traceback.
  • Never authenticates — see the trust model; identity is caller-asserted by design.

Trust model

The bus is a plain, local, append-only log with no authentication. Be explicit about what that means before you deploy it:

  • Identity is caller-asserted. The agent field is whatever the caller passes — no auth, no signing, no per-agent identity. A message that says it is from agent-a only means someone who could write the file typed agent-a.
  • No tamper-evidence. No message id, nonce, or hash chain. Anyone who can write the file can replay, edit, or remove messages, and a reader cannot tell.
  • Use it only inside a trust boundary you already control — a single machine, or a set of local processes that already trust each other. It is a coordination log for cooperating agents, not a security boundary between mutually-distrusting parties.

Corrupt or hostile content can't deny service (the read path tolerates bad lines), but that is data-tolerance, not authentication — the points above still hold. Hardening such as a per-agent key/HMAC or a message-id + hash-chain is a deliberate product decision, intentionally not in v1. See SECURITY.md.

When to use this

  • Best fit: coordinating several cooperating local agents/processes on one machine — a shared scratchpad they can post status to and read each other's, with zero infrastructure.
  • Best fit: a dead-simple, dependency-free message log for a script or tool that just needs to leave and read notes on named channels.

Honest flip side: this is not a networked message broker and not a security boundary — no auth, no delivery guarantees across machines, no Slack/Discord/Telegram integration (v1 is a generic local bus; external platform bridges are each their own separately-scoped undertaking). If you need authenticated senders or cross-machine transport, this isn't it.

Dependencies

Runtime dependencies 0 — Python standard library only (json, os, time, pathlib, …)
Install to run the package itself; no dependency tree
Install to test none — tests run on the standard-library unittest runner
Python ≥ 3.9

Nothing is added to your environment beyond the package, and nothing phones home.

Project contents

Path What it is
dan_oss_bridge/cli.py The CLI entry point — post / read / channels.
dan_oss_bridge/bus.py MessageBus + Message — the real append-only log, tail-bounded reads, corrupt-line-tolerant parsing.
dan_oss_bridge/__init__.py Public exports (MessageBus, Message).
tests/ Real unit tests (python -m unittest discover -s tests).

FAQ

Can two agents post at the same time? Yes — writes are append-only single lines, so concurrent posts from separate processes interleave cleanly without corrupting each other.

Can I read across all channels at once? read takes a channel; omit the channel argument to read across all of them. channels lists every channel that has received a post.

What happens to a huge log over time? Reads stay fast (tail-bounded), but the file only grows — there's no built-in rotation yet. Rotate or truncate it yourself if it gets large.

Is the agent field trustworthy? No — see Trust model. It's caller-asserted.

Tests

python -m unittest discover -s tests

Runs the unit suite on the standard-library unittest runner — no dependencies to install. As of this release that's 22 tests, all passing, covering the post/read/channels round-trip, channel isolation and oldest-first ordering, the --limit tail read, and the full corrupt-input class (invalid UTF-8, non-JSON, valid-JSON non-object, bad timestamp) proving one bad line can't deny reads to the whole bus, plus oversized-text rejection and friendly CLI errors on a bad bus path.

Contributing

See CONTRIBUTING.md for how to file an issue or submit a PR. Maintainers may use AI tools to help review contributions — please don't include personal information in an issue, PR, or commit beyond what's needed to describe the change.

Releasing

See RELEASING.md — the same version-bump/tag/publish process applies to every DAN-OSS tool, this one included.

License

MIT (code) — see LICENSE. The "DAN" name and logo are trademarked and not covered by the MIT grant — see TRADEMARK.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dan_oss_bridge-0.1.1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dan_oss_bridge-0.1.1-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file dan_oss_bridge-0.1.1.tar.gz.

File metadata

  • Download URL: dan_oss_bridge-0.1.1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dan_oss_bridge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 433c3f6dcd22418dc5e6dc1e6eabf63f03ddeea3a1f08c29af36063c057d5b3d
MD5 5ddcd8fff88c0ff1419ce243c5d8e2bc
BLAKE2b-256 ed9f77edd677a296f20dee2af6c83548a471d8336ca6dc2280558aca54001132

See more details on using hashes here.

Provenance

The following attestation bundles were made for dan_oss_bridge-0.1.1.tar.gz:

Publisher: publish.yml on STRATO-DAN/dan-oss-bridge-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dan_oss_bridge-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dan_oss_bridge-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dan_oss_bridge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec0cd4b86841040cc19a21f6490e7fa4a67cc9c9d12e0451d828894c496ebde6
MD5 fae0038f582a569c5aabcddfdbf2e1fe
BLAKE2b-256 46d1355c9ca0bbb34d14e82e75bc2aadcf06cf40599e800819c51a3f67fae2eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for dan_oss_bridge-0.1.1-py3-none-any.whl:

Publisher: publish.yml on STRATO-DAN/dan-oss-bridge-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page