m4/org/openalice-agent-protocol-rs

openalice-agent-protocol-rs

[Atlas card](https://atlas.blal.pro/repos/openalice-agent-protocol-rs)

Features
6
Status
·unknown
Last activity
1mo ago
Branch
mvp

Architecture rating

D1mo ago
consistencyB+

This crate IS the shared substrate — AgentRuntime trait + ConnectorEvent/ToolCall used by every OpenAlice Rust service, mirrored 1:1 with the TS half under same-commit-window discipline; inspector confirms uniform clean code (0 cycles, 0 dead imports, 0 naming violations).

data layerC-

Owns no tables/migrations (correct for a contract crate); core value is the data-shape contract itself, with strong discipline that JSON shape is kept byte-identical to the TS mirror — but no constraint/validation layer or schema-version/compat markers evidenced.

docsD

Manifest present+valid with a clear polyglot-pair summary and AGENTS.md present, but README is only an Atlas-card stub, 66 missing docstrings on public contract types, and roadmap scores 30/100 (Atlas-flagged weakest).

reliabilityD

Library has no runtime concerns (no shutdown/timeouts/retries expected); code is clean (0 cycles, avg complexity 3.57) but serde round-trip robustness and cross-repo wire compat are unproven without any tests, and 1 duplicate signature + 2 complexity flags (max 23) hint at edge-case fragility.

securityD

Pure wire-contract crate with no authn/network/secret surface, but serde-based deserialization of ConnectorEvent/ToolCall has no evidenced validation, size bounds, or fuzz/regression tests against malformed input — graded conservatively for absent input-hardening.

observabilityF

No metrics, tracing, structured logging, or health surface (Atlas probe failed: 'no https endpoint' — expected for a lib); nothing observable is exposed, so graded as absent even though largely N/A for a contract crate.

testingF

No tests/ directory and no test presence detected at all — critical gap for a wire contract that must stay byte-identical with its TS mirror, where zero serialization round-trip or cross-repo compat regression tests means drift can ship undetected.

source · auto-grader-2026-06-16

Ecosystem manifest

.atlas-deps.yml

Rust half of the polyglot agent-protocol pair (TS half is openalice-agent-protocol). Wire contract for ConnectorEvent / ToolCall + AgentRuntime trait used by every OpenAlice Rust service. JSON shape kept identical with the TS mirror; changes must land in both repos same commit window.

Exposes
  • cargo_crate: openalice-agent-protocol-rs

Code composition

tokei · loc
1.4kloc
  • Rust98.5%
  • TOML1.5%
  • Rust98.5%· 1,423
  • TOML1.5%· 21
Language% codecodecommentsblanksfiles
Rust98.5%1,423521157
TOML1.5%21431
Markdown0.0%050272

Telemetry ribbon · last 90 days

3 events
MAYJUNJUL2026-06-10 · lifecycle · first scan — repo indexed2026-07-16 · kind · kind reclassified · service → library2026-07-17 · kind · kind reclassified · library → serviceNOW
commitmanifestlifecyclekind

agent-protocol-rs/core

1 feature
  • agent-protocol-rs.core.wire-contract
    src/lib.rs:17
    Rust mirror of `@openalicelabs/agent-protocol`. Provides all shared types (`ConnectorEvent`, `ToolCall`), the `AgentRuntime` trait, `CooldownMiddleware`, `ProductDispatcher`, and the optional `fetch_agent_config` helper so every Rust service (live-control, social-api, voice, chat-bridge) shares one wire contract with zero translation overhead against the TypeScript twin.

agent-protocol-rs/dispatcher

1 feature
  • agent-protocol-rs.dispatcher.product-dispatcher
    src/dispatcher.rs:31
    Generic per-broadcast event → action pipeline shared by all OpenAlice products. `dispatch(event)` builds `AgentTurnInput`, calls `AgentRuntime::turn`, applies `CooldownMiddleware` per `(channel_id, tool_name)`, and invokes the product-supplied `ToolHandler` for every allowed call. Returns the count of executed calls for metrics. Products pass their own slug and `ToolHandler` closure; the turn loop, cooldown filtering, and `AgentContext` construction are identical for all products.

agent-protocol-rs/events

1 feature
  • agent-protocol-rs.events.connector-event
    src/events.rs:133
    Inbound event envelope for all connector-originated signals. Six variants: `ChatMessage`, `ChatFeed`, `VoiceUtterance`, `PresenceChange`, `ViewerMetrics`, `System`. The `kind` field is the serde tag discriminator — identical to the TS package so JSON round-trips with no translation between TypeScript connectors and Rust service consumers. [derive(Debug, Clone, Serialize, Deserialize)] [serde(tag = "kind", rename_all = "snake_case")]

agent-protocol-rs/fetch

1 feature
  • agent-protocol-rs.fetch.fetch-agent-config
    src/fetch.rs:54
    Canonical single-source fetcher for `auth /internal/users/{id}/agent-config` (behind the `fetch` cargo feature). Replaces identical copies that previously lived in live-control, voice, and social-api. Authenticates via `X-Internal-Secret`, projects the wire shape onto `AgentRuntimeConfig`, and propagates HTTP errors verbatim for operator observability. Gate with `#[cfg(feature = "fetch")]` — consumers that only use types (chat-bridge) do not pull reqwest + uuid.

agent-protocol-rs/runtime

1 feature
  • agent-protocol-rs.runtime.agent-runtime
    src/runtime.rs:132
    Core integration contract for all OpenAlice agent backends. Every product (live, social, voice, world) drives the agent through `init → reconfigure → turn*`. `turn` receives the batched `AgentTurnInput` (events + prior tool results) and returns an `AgentTurnOutput` (list of `ToolCall`s to execute). `shutdown` is optional — default impl is a no-op. The trait is `Send + Sync` so a single `Arc<dyn AgentRuntime>` can be shared across `ProductDispatcher` instances. [async_trait]

agent-protocol-rs/tools

1 feature
  • agent-protocol-rs.tools.tool-call
    src/tools.rs:33
    Outbound action envelope produced by an `AgentRuntime::turn`. All 15 variants share a `call_id` (for result correlation) and an optional `ToolRouting` (product / platform / channel overrides). The `ToolCall::name()` and `call_id()` helpers are stable for metrics and observability without a match. Wire shape is identical to the TS `@openalicelabs/agent-protocol` package. [derive(Debug, Clone, Serialize, Deserialize)] [serde(tag = "name", rename_all = "snake_case")]