Skip to content

v0.8.0

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Dec 04:51

Added

  • A relay now runs as a service of the same two levels as the Broker. peers service install --relay writes the relay configuration file and its users and keys file and registers the relay service, and start, stop, restart, remove and status take --relay; --admin-group with --relay is a usage error. The relay listens on :17444 unless relay.listen says otherwise and starts only when relay.tls_cert_file and relay.tls_key_file name a certificate and its key; without them the install registers the definition, leaves it disabled and says so. peers service run --relay runs the relay in the foreground, every key of its configuration file applies while it runs except relay.listen, which applies at the next start, and a key it does not know makes the file invalid. peers update restarts a running relay service and rolls it back with the Broker, and peers uninstall removes the relay service, with --purge also removing its configuration file, users and keys file and data directory.
  • peers relay user add, list, disable, enable and remove, and peers relay key issue, list and revoke, manage the relay users and API keys in the users and keys file of the caller's level. They edit the file and talk to no process, the running relay picks a change up, and key issue prints the new API key once, alone on its line; this is the only relay output that contains a key.
  • A Broker's configuration file now carries relays.<name>.address, .api_key, .fingerprint and .register (true by default), and link.direct_probe_interval (default 5m, 0 turns it off). At most four entries may be set to register, the API key can be set only by editing the file, and the template carries a commented example entry. A Broker advertises its relay addresses after its direct addresses, and a card holding more than four relay items is invalid.
  • A Broker registers at the relays whose entry is set to register and keeps one of four states for each: registered, registering, registration failed or registration off, with the latest failure's reason as its detail. peers service status --relay shows the running relay's version, listen address, certificate, users, registrations and relayed connections, and whether a newer release is available.
  • Pairing and linking now go through a relay when the two hosts cannot reach each other directly. connect_broker and peers broker connect accept a relay address written relay://<host:port>/<rendezvous id>, and peers key create shows a relay address when the Broker holds a relay registration even if it does not listen. A relayed link's traffic stays encrypted end to end between the two Brokers. The dialer of a relayed link tries the peer's direct addresses every link.direct_probe_interval and returns the link to a direct connection when one succeeds, recording link_down with detail moved_to_direct and then link_up; a failed probe changes nothing.
  • A pairing through a relay that fails at the relay returns the error code relay_failed with a reason: relay unreachable, relay certificate could not be verified, relay rejected the API key, no API key for the relay named in the address, target not registered at the relay, an endpoint that is not the Broker the address names, relay refused: this relay user exceeded a limit or relay cannot join the connection at this time. When the Broker has stopped using a relay, the pairing fails without contacting it and says whether the key was rejected or the registration superseded, and what resumes it.
  • list_brokers adds link_path, relay_address and relays: link_path is direct or relayed for an established link, relay_address is the relay's host:port for a relayed link, and relays lists every configured relay with its name, address, state and detail, never its API key.
  • The website has guides for running a relay and for pairing through a relay, and its security page has a Relays section that states what a relay can and cannot see.

Changed

  • peers broker list gains a PATH column between LINK and ADDRESSES, naming direct, relay <host:port> or -, and peers service status writes a Relays table after the Agents table, or Relays: none, a breaking change: output parsed by position changes, so read columns by their header name or shift every column after LINK by one, and read the Agents table only up to the empty line that follows it.
  • connect_broker now waits up to 50 seconds instead of 30, the longer limit covering a pairing that goes through a relay.
  • peers relay key issue now returns only after the running relay of the same level has adopted the key. The relay records the digest of the users and keys file it adopted in its status record, and the command waits up to 10 seconds for that digest to match the file it wrote. On success it prints a fourth line naming the relay and its process id, saying whether the key is in effect now or takes effect when a disabled user is enabled, or that no relay is running and the key takes effect when one starts. When the adoption is not confirmed within the bound, the command is interrupted, or the status record cannot be read, it still prints the three lines with the key and exits 1, saying why the adoption was not confirmed. This removes the window in which a Broker that set the key before the relay had read the file was refused KEY_REJECTED and stopped using the relay until its configuration changed or it restarted.
  • make lint now runs scripts/check-test-privilege, which fails on a test, harness helper, compose file, Dockerfile or CI step that changes network configuration, captures packets, or uses root or sudo for behaviour no requirement says runs as root. The end-to-end containers drop their network capabilities and NET_RAW, and the e2e image no longer installs iptables or tcpdump.

Removed

  • The test-root make target, its ROOT_TEST_* variables and the Linux CI step that ran it under sudo. The two broker helper tests it ran now run as root inside the plain system end-to-end container, and the macOS test job no longer runs a root test round either. CLAUDE.md's description of cover-check no longer mentions the target's coverage data.

Fixed

  • The version checker now records its timer under a generation number, so a check that schedules the next one while starting cannot leave a newer timer untracked, and shutting down stops every pending check. The old window was not reachable at production intervals; the fix keeps the shutdown guarantee at any interval.
  • A topic or card revoked while a request for the same identifier was in flight could stay listed on a Broker two hops away until the next full reconciliation, longer than the replacement interval the design promises. A newer record announced during an in-flight request is now requested again when that request ends.
  • An agent that renamed itself could have its new name sent to clients while the topic table still served the old one, because the rename event was queued before the table was updated. The table now updates before the event is sent.
  • A default topic whose join was still pending when the agent's registration completion arrived could be lost until the agent reconnected. The completion and the attach now join from the same pending list, and a topic stays pending until a join succeeds or the Broker drops it.
  • A pending default-topic join could undo a leave the user had just issued, or repeat a join a completion had already made, by adding the topic back after the pending check. The check and the join are now one ordered step under the adapter's topic-operation lock, and a leave removes the topic from the pending defaults before it reaches the adapter.
  • A registration completion's restoring round could join a default topic that the completion's own auto-join had just joined, producing a duplicate join. The round now restores exactly the topics remembered when the completion arrived.
  • A default join could rejoin a topic the user had joined or left through the tools, undoing the leave or replacing the public declaration and description the user had given. The MCP server now remembers every topic the user settled and keeps the default paths away from it for the life of the process.
  • An established link could be observed with no connected address recorded for a moment, because the dial round recorded the address after the link was published. The dial round and the pair dial now record the address before the link is published; the direct probe added in 0.8.0 does the same.