Skip to main content

sbp4ai-dispatcher

The SBP (Session Bridge Protocol) relay. It forwards frames between clients and devices over WebSocket. Two modes coexist:

Mode Endpoint Trust Use
Legacy /ws HMAC shared secret, plaintext JSON trusted LAN / old clients
E2EE /ws-e2ee Ed25519 pubkey auth, opaque-tag pub/sub untrusted relay

In E2EE mode the relay holds only public keys and routes frames by an opaque HMAC(rk, scope) tag it cannot invert. It verifies each frame's Ed25519 signature (rejecting forgeries) but never decrypts payloads — there is no secret key on the relay. See sbp-spec/spec/SBP-0.4-e2ee.md.

Run

pip install sbp4ai-dispatcher
export SBP_TRUSTED_KEYS="dev:<signPkB64>[:<boxPkB64>],cli:<signPkB64>[:<boxPkB64>]"
sbp-dispatcher                # listens on 127.0.0.1:8787 by default (alias: sbp4ai-dispatcher)

Standard usage (3 steps)

pip install sbp4ai-agents                      # on the controlled machine
sbp-agents --relay wss://relay.example.com/ws-e2ee
cat .copy2client

cat .copy2client → copy the whole block → paste it into the console / mini-program 「粘贴导入」(paste-import) box — it imports both clients at once (cli-web web console + cli-minis WeChat mini program).

The two-line setup with sbp4ai-agents

sbp4ai-agents writes the public-key directory for you into .copy4relay (public keys only — safe to send over any channel):

# on the device
cat .copy4relay
# SBP_TRUSTED_KEYS=dev-mac-1a2b:<signPk>:<boxPk>,cli-web:<signPk>:<boxPk>,cli-minis:...

# on the relay
export SBP_TRUSTED_KEYS="$(sed -n 's/^SBP_TRUSTED_KEYS=//p' .copy4relay)"
sbp-dispatcher

Then paste the device's .copy2client into the console / mini-program import box — done.

  • SBP_TRUSTED_KEYS — comma-separated keyId:signPublicKeyB64[:boxPublicKeyB64]. The relay uses only the signing public key (to verify sigs). The box public key is ignored by the relay (endpoints use it to seal frames).
  • SBP_PORT, SBP_HOST — bind address.
  • Legacy mode additionally reads SBP_HMAC_KEYS / SBP_OPEN (see legacy docs).

Note on the legacy code

The legacy /ws handler lives in legacy.py (copied from the original tmux-ai-coder-panel server). It is kept for backward compatibility on trusted networks. New deployments should use /ws-e2ee exclusively.

  • sbp4ai-client — the E2EE crypto core both endpoints import.
  • sbp4ai-agents — the device/panel that reports local tmux / CLI sessions.

Metadata

Release files for sbp4ai-dispatcher 0.5.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sbp4ai-dispatcher 0.5.7
File Size Uploaded Provenance Actions
sbp4ai_dispatcher-0.5.7.tar.gz 17.4 kB Without provenance Details for sbp4ai_dispatcher-0.5.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sbp4ai-dispatcher 0.5.7
File Interpreter ABI Platform Actions
sbp4ai_dispatcher-0.5.7-py3-none-any.whl Python 3 none any Details for sbp4ai_dispatcher-0.5.7-py3-none-any.whl

Total release size: 37.0 kB

Release files / sbp4ai_dispatcher-0.5.7.tar.gz

Download URL sbp4ai_dispatcher-0.5.7.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
311cbf180cd35f24e649801d6b67c2cc42b315cfbd0e59d25e79ccff80407bf8
BLAKE2b-256 checksum
How to use checksums
6721505fb7d6cbc00af1dcbfcade89d9018562aaef39ff77328307dd85e2f868
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / sbp4ai_dispatcher-0.5.7-py3-none-any.whl

Download URL sbp4ai_dispatcher-0.5.7-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e2deeb361848084cc736b96556135ce83c3e4654b6a3172ecf7f0308cac1518
BLAKE2b-256 checksum
How to use checksums
4fec900896acf57d753796daf134c246f4aa4034f114c4226f115b2b5ac34a65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Security for sbp4ai-dispatcher 0.5.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.7 This release

2 release files No provenance

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