Skip to content

Commit 5a5f059

Browse files
committed
chore: update dependencies to latest
1 parent eaa6c2d commit 5a5f059

4 files changed

Lines changed: 946 additions & 815 deletions

File tree

pkg/hanzo-zap/hanzo_zap/__init__.py

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
hanzo-zap - Zero-copy Agent Protocol SDK for Python
33
44
1000x faster than MCP/JSON-RPC through binary wire protocol.
5+
Includes PlaygroundClient for the Hanzo Playground control plane.
56
67
Example:
78
>>> from hanzo_zap import ZapClient
@@ -11,28 +12,48 @@
1112
"""
1213

1314
from .types import (
15+
AgentEvent,
16+
AgentInfo,
1417
ApprovalPolicy,
15-
SandboxPolicy,
18+
ClientInfo,
19+
CommitInfo,
20+
EventMsg,
21+
FileChange,
1622
MessageType,
23+
RealtimeAudioFrame,
24+
SandboxPolicy,
25+
ServerInfo,
26+
Submission,
1727
Tool,
1828
ToolCall,
1929
ToolResult,
20-
ServerInfo,
21-
ClientInfo,
2230
)
2331
from .client import ZapClient
2432
from .server import ZapServer
33+
from .playground import PlaygroundClient
2534

26-
__version__ = "0.6.1"
35+
__version__ = "0.7.0"
2736
__all__ = [
37+
# Wire protocol
2838
"ZapClient",
2939
"ZapServer",
40+
# Playground
41+
"PlaygroundClient",
42+
# Core types
3043
"ApprovalPolicy",
31-
"SandboxPolicy",
44+
"ClientInfo",
3245
"MessageType",
46+
"SandboxPolicy",
47+
"ServerInfo",
3348
"Tool",
3449
"ToolCall",
3550
"ToolResult",
36-
"ServerInfo",
37-
"ClientInfo",
51+
# Playground types
52+
"AgentEvent",
53+
"AgentInfo",
54+
"CommitInfo",
55+
"EventMsg",
56+
"FileChange",
57+
"RealtimeAudioFrame",
58+
"Submission",
3859
]

pkg/hanzo-zap/hanzo_zap/types.py

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,77 @@ class Prompt:
144144
name: str
145145
description: str | None = None
146146
arguments: list[dict[str, Any]] | None = None
147+
148+
149+
# --- Playground Protocol Types (SQ/EQ pattern from hanzo/dev) ---
150+
151+
152+
@dataclass
153+
class Submission:
154+
"""Submission Queue entry -- request from user/agent."""
155+
156+
id: str
157+
op: dict[str, Any] # Op variant as dict with "type" discriminator
158+
trace: dict[str, str] | None = None
159+
160+
161+
@dataclass
162+
class EventMsg:
163+
"""Event Queue entry -- response from agent runtime."""
164+
165+
type: str # "turn_started", "turn_completed", "agent_message", etc.
166+
data: dict[str, Any] = field(default_factory=dict)
167+
raw: bytes | None = None
168+
169+
170+
@dataclass
171+
class AgentEvent:
172+
"""Real-time event from an agent in a space."""
173+
174+
type: str
175+
space_id: str
176+
agent_id: str
177+
agent_name: str = ""
178+
timestamp: str = ""
179+
data: dict[str, Any] = field(default_factory=dict)
180+
181+
182+
@dataclass
183+
class AgentInfo:
184+
"""Agent discovery info from gossip tracker."""
185+
186+
agent_id: str
187+
did: str = ""
188+
space_id: str = ""
189+
display_name: str = ""
190+
status: str = "offline"
191+
capabilities: list[dict[str, Any]] = field(default_factory=list)
192+
model: str = ""
193+
194+
195+
@dataclass
196+
class RealtimeAudioFrame:
197+
"""Audio frame for realtime conversation."""
198+
199+
data: str # base64
200+
sample_rate: int = 16000
201+
num_channels: int = 1
202+
203+
204+
@dataclass
205+
class FileChange:
206+
"""Git file change."""
207+
208+
path: str
209+
status: str # "added", "modified", "deleted"
210+
211+
212+
@dataclass
213+
class CommitInfo:
214+
"""Git commit info."""
215+
216+
hash: str
217+
message: str
218+
author: str
219+
email: str
220+
timestamp: str

pkg/hanzo-zap/pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "hanzo-zap"
7-
version = "0.6.1"
7+
version = "0.7.0"
88
description = "Zero-copy Agent Protocol (ZAP) SDK - 1000x faster than MCP"
99
readme = "README.md"
1010
requires-python = ">=3.10"
@@ -22,7 +22,9 @@ classifiers = [
2222
"Typing :: Typed",
2323
]
2424
keywords = ["agent", "ai", "hanzo", "mcp", "protocol", "zap", "zero-copy"]
25-
dependencies = []
25+
dependencies = [
26+
"httpx>=0.23.0",
27+
]
2628

2729
[project.urls]
2830
Homepage = "https://github.com/hanzoai/python-sdk"

0 commit comments

Comments
 (0)