Files
zeekay 985bec5352 feat: add CloudClient and rewrite wire protocol for Rust compatibility
- Add CloudClient for luxfi/zap binary protocol (TCP + auto-TLS)
- Rewrite wire.py Builder/ObjectBuilder to match Rust single-buffer architecture
- Fix response field offsets (CLOUD_RESP_BODY=4, CLOUD_RESP_ERROR=12)
- Use signed i32 relative offsets from absolute positions
- 28 unit tests + cross-language integration test passing
2026-03-29 15:13:32 -07:00

63 lines
1.3 KiB
Python

"""
hanzo-zap - Zero-copy Agent Protocol SDK for Python
1000x faster than MCP/JSON-RPC through binary wire protocol.
Includes PlaygroundClient for the Hanzo Playground control plane.
Example:
>>> from hanzo_zap import ZapClient
>>> async with ZapClient.connect("zap://localhost:9999") as client:
... tools = await client.list_tools()
... result = await client.call_tool("read_file", {"path": "README.md"})
"""
from .types import (
AgentEvent,
AgentInfo,
ApprovalPolicy,
ClientInfo,
CommitInfo,
EventMsg,
FileChange,
MessageType,
RealtimeAudioFrame,
SandboxPolicy,
ServerInfo,
Submission,
Tool,
ToolCall,
ToolResult,
)
from .client import ZapClient
from .server import ZapServer
from .cloud import CloudClient
from .playground import PlaygroundClient
__version__ = "0.7.0"
__all__ = [
# Wire protocol
"ZapClient",
"ZapServer",
# Cloud (luxfi/zap binary protocol — compatible with Rust hanzo-zap)
"CloudClient",
# Playground
"PlaygroundClient",
# Core types
"ApprovalPolicy",
"ClientInfo",
"MessageType",
"SandboxPolicy",
"ServerInfo",
"Tool",
"ToolCall",
"ToolResult",
# Playground types
"AgentEvent",
"AgentInfo",
"CommitInfo",
"EventMsg",
"FileChange",
"RealtimeAudioFrame",
"Submission",
]