convez.ai
AgenteIntegração & APIsAvançado
meawoppl

Rust Code Agent SDKs

meawoppl/rust-code-agent-sdks

Bindings Rust tipados para Claude Code e OpenAI Codex

Ver no GitHub
BomPluginScore · de 0 a 100

Interfaces Rust tipadas para interagir com protocolos de streaming JSON/JSONL dos agentes de código Claude e OpenAI Codex. Fornece dois crates independentes com suporte a clientes síncronos e assíncronos, além de tipos puros compatíveis com WASM.

Instalação

$npx convez-ai meawoppl/rust-code-agent-sdks

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
30
Forks
6
Acompanhando
0
Saúde
42%
Último commit
há 1 dia
Versão
—
Issues abertas
4
Contribuidores
1

Casos de uso

  • Integrar agentes de código Claude em aplicações Rust
  • Consumir APIs de streaming de protocolos de código em tempo real
  • Construir ferramentas CLI que orquestram execução de código com IA

Veredito

SDK maduro e bem estruturado para desenvolvedores Rust que precisam integrar agentes de código. A documentação e testes de round-trip com JSON real garantem confiabilidade, mas exige familiaridade com async/await e protocolos de streaming.

README

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

rust-code-agent-sdks

Typed Rust interfaces for AI code agent CLI protocols.

This workspace provides two independent crates for interacting with Claude Code and OpenAI Codex via their JSON/JSONL streaming protocols.

Crates

CrateVersionDocsCIWASM
claude-codesCrates.iodocs.rsCIFeature Matrix
codex-codesCrates.iodocs.rsCIFeature Matrix

Versioning

Each crate's version tracks the CLI it wraps:

  • claude-codes version tracks the Claude CLI it targets and may sit slightly ahead of the CLI it was last integration-tested against. Currently claude-codes 2.1.157, tested against Claude CLI 2.1.170.
  • codex-codes version tracks the Codex CLI it has been tested against, sitting a small offset behind while the bindings stabilize. Currently 0.137.4, tested against Codex CLI 0.137.0.

Both crates will warn (or fail gracefully) if the installed CLI version diverges from the tested version.

Feature Flags

claude-codes

claude-codes is structured into three feature flags to control dependency weight:

FeatureDescriptionWASM-compatible
typesCore message types and protocol structs onlyYes
sync-clientSynchronous client with blocking I/ONo
async-clientAsynchronous client using tokioNo

All features are enabled by default. For WASM or type-sharing use cases:

[dependencies]
claude-codes = { version = "2", default-features = false, features = ["types"] }

codex-codes

codex-codes mirrors the same feature flag structure:

FeatureDescriptionWASM-compatible
typesCore message types and protocol structs onlyYes
sync-clientSynchronous client with blocking I/ONo
async-clientAsynchronous client using tokioNo

All features are enabled by default. For WASM or type-sharing use cases:

[dependencies]
codex-codes = { version = "0.137", default-features = false, features = ["types"] }

Testing Approach

Both crates share the same testing philosophy:

  1. Unit tests validate serde round-tripping for every type variant against hand-crafted JSON.
  2. Integration tests deserialize real JSONL captures from actual CLI sessions. These captures live in each crate's test_cases/ directory and are checked into the repo, so deserialization is validated against real-world protocol output.
  3. CI matrix tests each feature combination independently, including WASM builds via wasm32-unknown-unknown, clippy, rustfmt, and MSRV (1.85).

To run all tests locally:

cargo test --workspace

Workspace Structure

rust-code-agent-sdks/
  claude-codes/          # Claude Code CLI protocol bindings
    src/                 # Types, sync/async clients, protocol handling
    tests/               # Deserialization + integration tests
    test_cases/          # Real CLI captures and failure cases
    examples/            # async_client, sync_client, basic_repl
  codex-codes/           # Codex CLI protocol bindings
    src/                 # Types, sync/async clients, CLI builder
    tests/               # Integration tests
    test_cases/          # Real CLI captures
    examples/            # async_client, sync_client, basic_repl

See each crate's README for detailed usage:

License

Apache-2.0. See LICENSE.

Ver o original no GitHub

Bom para

Relacionados