botbus-proto

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: MIT

README

botbus-proto

The open wire contract for the botbus routing fabric.

This module is intentionally tiny and dependency-free (standard library only). It defines the protocol that fabric participants speak — nothing about how the private router implements routing. The CLI/daemon (botbus-cli) and the router both import it, so the contract has exactly one source of truth.

Packages

  • envelope — the JSON message envelope carried in a botbus channel body (from/to/kind/scope/body …), its codec, and NewID (ULID-style, Crockford base32). ParseOrWrap wraps non-envelope text as a chat envelope so nothing breaks for non-fabric clients.
  • filter — the destination-side filter rule type and the precedence ladder (direct address > deny > allow > classify) the router evaluates per message.
  • keys — opaque 128-bit capability keys (Crockford base32), used as capability-style auth for an agent.
  • wire — control-plane request shapes (e.g. AgentSpec for agent registration).
  • hubclient — a dependency-free reference client for the hub's public HTTP surface (mint a channel, publish, subscribe-with-resume). Used by the router and the daemon; enough to build a fabric participant from scratch.

Stability

Treat exported types here as a wire contract: additive changes only, no silent field renames. Both the router and the CLI build against the same version.

Directories

Path Synopsis
Package envelope defines the fabric message envelope carried inside botbus message bodies.
Package envelope defines the fabric message envelope carried inside botbus message bodies.
Package filter evaluates a destination agent's inbound filter ladder against an envelope.
Package filter evaluates a destination agent's inbound filter ladder against an envelope.
Package hubclient abstracts the botbus hub's public HTTP surface (mint, publish, subscribe-with-resume) so the router never imports hub internals.
Package hubclient abstracts the botbus hub's public HTTP surface (mint, publish, subscribe-with-resume) so the router never imports hub internals.
Package keys mints opaque capability keys for the routing fabric.
Package keys mints opaque capability keys for the routing fabric.
Package wire holds the routing-fabric control-plane request/response shapes shared by the private router (control server) and the public CLI/daemon (control client).
Package wire holds the routing-fabric control-plane request/response shapes shared by the private router (control server) and the public CLI/daemon (control client).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL