convez.ai
MCP Server
Wolfe-Jam

faf-radio-rust

Wolfe-Jam/faf-radio-rust

Ver no GitHub
BomPluginScore · de 0 a 100

Radio Protocol client for Rust — AI context broadcasting via WebSocket frequencies. crates.io: faf-radio-rust

Instalação

$npx convez-ai Wolfe-Jam/faf-radio-rust

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
1
Saúde
71%
Último commit
há 2 semanas
Versão
—
Issues abertas
0
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

faf-radio-rust

Radio Protocol client for Rust. Broadcast AI context once, every tool receives.

Client SDK for MCPaaS — persistent AI context infrastructure.

Install

[dependencies]
faf-radio-rust = "0.2"
tokio = { version = "1", features = ["full"] }
serde_json = "1.0"

Or via the meta-crate:

[dependencies]
faf = { version = "0.3", features = ["radio"] }

Quick Start

use faf_radio_rust::{RadioClient, RadioConfig};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut radio = RadioClient::new(RadioConfig::grok());

    radio.connect().await?;
    radio.tune(vec!["91.0".to_string()]).await?;

    // Broadcast an event on the frequency
    radio.broadcast("91.0", serde_json::json!({
        "type": "fafb",
        "project": "my-project",
        "size": 220,
    })).await?;

    // Context arrives from any AI, any session
    tokio::time::sleep(tokio::time::Duration::from_secs(30)).await;

    radio.disconnect().await?;
    Ok(())
}

How It Works

MCPaaS uses the Radio Protocol — broadcast once, every AI receives.

You → Broadcast to 91.0 FM (send once)
  Claude  ← tuned in
  Grok    ← tuned in
  Gemini  ← tuned in
= 1x cost, instant, zero drift

Presets

RadioConfig::grok() connects to the FAF beacon with zero configuration:

// Before (v0.1):
let config = RadioConfig::new("wss://faf-beacon.wolfejam2020.workers.dev/radio");

// After (v0.2):
let config = RadioConfig::grok();

Broadcasting

Clients can now send events on frequencies (v0.2.0):

// Broadcast FAFb metadata
client.broadcast("91.0", serde_json::json!({
    "type": "fafb",
    "project": "faf-cli",
    "yaml_bytes": 4188,
    "fafb_bytes": 220,
})).await?;

Multi-AI Example

use faf_radio_rust::{RadioClient, RadioConfig};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut claude = RadioClient::new(RadioConfig::grok());
    let mut grok   = RadioClient::new(RadioConfig::grok());
    let mut gemini = RadioClient::new(RadioConfig::grok());

    claude.connect().await?;
    grok.connect().await?;
    gemini.connect().await?;

    // All three tune to the same frequency
    for radio in [&mut claude, &mut grok, &mut gemini] {
        radio.tune(vec!["91.0".to_string()]).await?;
    }

    // All three AIs now share the same context, in real time
    Ok(())
}

API

MethodDescription
RadioConfig::grok()Preset config for Grok inference frequency
RadioConfig::new(url)Custom server URL
connect().awaitConnect to beacon
tune(frequencies).awaitSubscribe to frequencies
untune(frequencies).awaitUnsubscribe
broadcast(freq, event).awaitSend event on a frequency
disconnect().awaitDisconnect
state().awaitGet connection state
validate_frequencies(&freqs)Validate range (40.0-108.0 FM)

Features

  • Preset configs (RadioConfig::grok()) — zero-config setup
  • Client broadcasting — send events on frequencies
  • Auto-reconnection with exponential backoff
  • Heartbeat (ping/pong every 30s)
  • Frequency validation (40.0-108.0 FM)
  • Type-safe protocol messages (serde)
  • Tokio async/await

Testing

50/50 passing — WJTTC Championship-Grade:

TierTestsWhat
T1 BRAKES14Security — injection, boundary, validation
T2 ENGINE19Core — state, config, serialization, broadcast
T3 AERO12Edge cases — error display, traits
Unit5Inline — grok preset, broadcast validation
cargo test

Ecosystem

CrateWhat
fafMeta-crate — cargo add faf --features radio
faf-rust-sdkParse, validate, compile .faf files
faf-radio-rustStream context live via Radio Protocol

Also available in Bun/TypeScript and Zig (coming soon).

Previously

This crate was published as mcpaas. The platform lives on at mcpaas.live — the radio client now has its own name.

If faf-radio-rust has been useful, consider starring the repo — it helps others find it.

License

MIT


Built by Wolfe James | Platform: MCPaaS | Format: FAF

Ver o original no GitHub

Bom para

Relacionados