Skip to main content

Crate kimi_wire

Crate kimi_wire 

Source
Expand description

§kimi-wire

Typed Rust client for the Kimi Code CLI Wire protocol.

§Overview

The Wire protocol is a JSON-RPC 2.0 based bidirectional communication protocol exposed by kimi --wire. This crate provides:

§Feature flags

FeatureDescription
process (default)Enables transport::ChildProcessTransport for spawning kimi --wire.
redact (default)Enables protocol::redact::redact_secrets for scrubbing secrets from JSON.

§Example

use kimi_wire::{InMemoryWireClient, WireClient};

let mut client = InMemoryWireClient::new();
let result = client.prompt("hello").await?;

Re-exports§

pub use client::InMemoryWireClient;
pub use client::WireClient;
pub use error::WireError;

Modules§

client
Client trait and in-memory implementation for the Wire protocol.
error
Error types for wire protocol failures.
protocol
Protocol types: JSON-RPC, events, requests, methods, and content parts.
transport
Transport implementations (child process, channels). Transport layer for the Kimi Wire protocol.

Constants§

WIRE_PROTOCOL_LEGACY_VERSION
Legacy protocol version used when the server does not support initialize.
WIRE_PROTOCOL_VERSION
The latest wire protocol version supported by this crate.