Expand description
DCP (Development Context Protocol) Integration
This module provides integration with the DCP crate for high-performance AI tool communication. DCP is our MCP competitor with 10-1000x performance improvements while maintaining backward compatibility.
§Features
- Binary Message Envelope (BME) protocol support
- Zero-Copy Tool Invocation (ZCTI)
- MCP compatibility via McpAdapter
- Capability manifest support
- Ed25519 signing for secure tool definitions
§Usage
ⓘ
use driven::dcp::{DcpClient, DcpConfig};
let config = DcpConfig::default();
let mut client = DcpClient::new(config);
// Connect to a DCP server
client.connect("tcp://localhost:9000")?;
// Invoke a tool
let result = client.invoke_tool(tool_id, &args)?;
// Or use MCP fallback
let result = client.invoke_tool_mcp(&json_rpc_request)?;Modules§
- Chunk
Flags - Chunk flag constants
- Flags
- Flag bits
Structs§
- Binary
Message Envelope - Binary Message Envelope - 8 bytes fixed header
- Capability
Manifest - Pre-computed capability manifest
- Capability
Stats - Statistics about the current capability manifest
- DcpClient
- DCP client for AI tool communication
- DcpConfig
- DCP client configuration
- DcpMessage
- DCP message representing a complete binary message with envelope and payload
- Json
RpcError - JSON-RPC 2.0 error object
- Json
RpcParser - JSON-RPC parser
- Json
RpcRequest - JSON-RPC 2.0 request
- Json
RpcResponse - JSON-RPC 2.0 response
- McpAdapter
- MCP to DCP adapter
- Shared
ArgBuffer - Shared memory buffer for zero-copy argument passing
- Signed
Invocation - Signed invocation with replay protection
- Signed
Tool Def - Ed25519 signed tool definition
- Signer
- Ed25519 signer for creating signatures
- Stream
Assembler - Stream assembler for handling chunked streaming messages
- Stream
Builder - Stream builder for creating chunked streaming messages
- Stream
Chunk - Binary stream chunk - 7 bytes header
- Tool
Definition - Tool definition
- Tool
Invocation - Zero-copy tool invocation
- Verifier
- Ed25519 verifier for checking signatures
- Zcti
Builder - Zero-Copy Tool Invocation (ZCTI) builder
- Zcti
Reader - Zero-Copy Tool Invocation (ZCTI) reader
Enums§
- Adapter
Error - Adapter errors
- ArgType
- Argument types encoded in arg_layout
- Connection
State - Connection state
- Invocation
Result - Result of a tool invocation
- Message
Type - Message types enumeration
- Protocol
- Protocol type
- Request
Id - JSON-RPC request ID (can be string, number, or null)
Functions§
- create_
envelope - Create a Binary Message Envelope
- parse_
envelope - Parse a Binary Message Envelope from bytes