mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
chore: update dependencies to latest
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
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
|
||||
@@ -11,28 +12,48 @@ Example:
|
||||
"""
|
||||
|
||||
from .types import (
|
||||
AgentEvent,
|
||||
AgentInfo,
|
||||
ApprovalPolicy,
|
||||
SandboxPolicy,
|
||||
ClientInfo,
|
||||
CommitInfo,
|
||||
EventMsg,
|
||||
FileChange,
|
||||
MessageType,
|
||||
RealtimeAudioFrame,
|
||||
SandboxPolicy,
|
||||
ServerInfo,
|
||||
Submission,
|
||||
Tool,
|
||||
ToolCall,
|
||||
ToolResult,
|
||||
ServerInfo,
|
||||
ClientInfo,
|
||||
)
|
||||
from .client import ZapClient
|
||||
from .server import ZapServer
|
||||
from .playground import PlaygroundClient
|
||||
|
||||
__version__ = "0.6.1"
|
||||
__version__ = "0.7.0"
|
||||
__all__ = [
|
||||
# Wire protocol
|
||||
"ZapClient",
|
||||
"ZapServer",
|
||||
# Playground
|
||||
"PlaygroundClient",
|
||||
# Core types
|
||||
"ApprovalPolicy",
|
||||
"SandboxPolicy",
|
||||
"ClientInfo",
|
||||
"MessageType",
|
||||
"SandboxPolicy",
|
||||
"ServerInfo",
|
||||
"Tool",
|
||||
"ToolCall",
|
||||
"ToolResult",
|
||||
"ServerInfo",
|
||||
"ClientInfo",
|
||||
# Playground types
|
||||
"AgentEvent",
|
||||
"AgentInfo",
|
||||
"CommitInfo",
|
||||
"EventMsg",
|
||||
"FileChange",
|
||||
"RealtimeAudioFrame",
|
||||
"Submission",
|
||||
]
|
||||
|
||||
@@ -144,3 +144,77 @@ class Prompt:
|
||||
name: str
|
||||
description: str | None = None
|
||||
arguments: list[dict[str, Any]] | None = None
|
||||
|
||||
|
||||
# --- Playground Protocol Types (SQ/EQ pattern from hanzo/dev) ---
|
||||
|
||||
|
||||
@dataclass
|
||||
class Submission:
|
||||
"""Submission Queue entry -- request from user/agent."""
|
||||
|
||||
id: str
|
||||
op: dict[str, Any] # Op variant as dict with "type" discriminator
|
||||
trace: dict[str, str] | None = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class EventMsg:
|
||||
"""Event Queue entry -- response from agent runtime."""
|
||||
|
||||
type: str # "turn_started", "turn_completed", "agent_message", etc.
|
||||
data: dict[str, Any] = field(default_factory=dict)
|
||||
raw: bytes | None = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class AgentEvent:
|
||||
"""Real-time event from an agent in a space."""
|
||||
|
||||
type: str
|
||||
space_id: str
|
||||
agent_id: str
|
||||
agent_name: str = ""
|
||||
timestamp: str = ""
|
||||
data: dict[str, Any] = field(default_factory=dict)
|
||||
|
||||
|
||||
@dataclass
|
||||
class AgentInfo:
|
||||
"""Agent discovery info from gossip tracker."""
|
||||
|
||||
agent_id: str
|
||||
did: str = ""
|
||||
space_id: str = ""
|
||||
display_name: str = ""
|
||||
status: str = "offline"
|
||||
capabilities: list[dict[str, Any]] = field(default_factory=list)
|
||||
model: str = ""
|
||||
|
||||
|
||||
@dataclass
|
||||
class RealtimeAudioFrame:
|
||||
"""Audio frame for realtime conversation."""
|
||||
|
||||
data: str # base64
|
||||
sample_rate: int = 16000
|
||||
num_channels: int = 1
|
||||
|
||||
|
||||
@dataclass
|
||||
class FileChange:
|
||||
"""Git file change."""
|
||||
|
||||
path: str
|
||||
status: str # "added", "modified", "deleted"
|
||||
|
||||
|
||||
@dataclass
|
||||
class CommitInfo:
|
||||
"""Git commit info."""
|
||||
|
||||
hash: str
|
||||
message: str
|
||||
author: str
|
||||
email: str
|
||||
timestamp: str
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "hanzo-zap"
|
||||
version = "0.6.1"
|
||||
version = "0.7.0"
|
||||
description = "Zero-copy Agent Protocol (ZAP) SDK - 1000x faster than MCP"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
@@ -22,7 +22,9 @@ classifiers = [
|
||||
"Typing :: Typed",
|
||||
]
|
||||
keywords = ["agent", "ai", "hanzo", "mcp", "protocol", "zap", "zero-copy"]
|
||||
dependencies = []
|
||||
dependencies = [
|
||||
"httpx>=0.23.0",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/hanzoai/python-sdk"
|
||||
|
||||
Reference in New Issue
Block a user