Skip to main content

Crate okbot_peer

Crate okbot_peer 

Source
Expand description

Peers and teams (ADR 0014): okbots that delegate work to each other.

  • key: each bot’s Ed25519 key and the public keys of members and teams.
  • token: signed request and response tokens (okp1).
  • manifest: team manifests, their signatures and links.
  • a2a: the A2A subset spoken between members.
  • Node: a bot’s peer side, the Peers port and one peer:<team> channel per team that accepts tasks.

Re-exports§

pub use external::ExternalAgent;
pub use external::ExternalClient;
pub use external::ExternalConfig;
pub use key::PublicKey;
pub use key::SigningKey;
pub use manifest::Manifest;
pub use seal::BoxKey;
pub use seal::BoxPublic;

Modules§

a2a
The A2A subset okbot speaks (JSON-RPC binding): sending a message, getting and cancelling a task, and the Agent Card, plus the okbot delegation extension.
external
A2A agents and clients that are not okbots (ADR 0014), as the built-in team external.
key
Ed25519 keys: a bot’s own key (state/peer.key) and the public keys of members and teams.
manifest
Team manifests (ADR 0014): who the members are, how to reach them, and which may call which.
seal
Sealing what passes through a relay (ADR 0014): the relay forwards bytes it cannot read.
token
Signed request and response tokens (okp1, ADR 0014).

Structs§

Node
A bot’s peer side: Peers for delegating, a Channel per team for tasks it receives.
NodeConfig
Everything a Node needs besides its ports.
TeamConfig
This bot’s settings for one team ([teams.<id>]).

Enums§

Error
A peer failure.
ManifestSource
Where a team’s manifest comes from.

Constants§

SIGNATURE_HEADER
Header carrying the response’s signature.

Functions§

socket_dir
Where the sockets of the bots of this machine live: $OKBOT_PEER_DIR, else $XDG_RUNTIME_DIR/okbot, else <temp>/okbot-<user>. Bots under different OS users share one directory by setting OKBOT_PEER_DIR alike.
socket_path
The socket in sockets of the bot in bot_dir, named after its canonical path (short whatever the path’s length, and the same for the bot and for the members that call it).