mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-27 04:20:09 +00:00
- 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
63 lines
1.3 KiB
Python
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",
|
|
]
|