- conformance.py: declarative scenario runner (subset matcher, $kind/$gt/ $enum/$required assertions, call_id/session_id echo checks), reference bridge, CLI entry (python -m aicc.conformance) - bridge.py: protocol version check before parsing (protocol_mismatch), session expiry handling (session_expired), malformed tool_call -> invalid_input, emit_event() for async events - client.py: Self return type - in_process.py: drain bridge event queue after response (event delivery), Self return type - websocket.py: Self return type, best-effort shutdown - tests: 14 passing (incl. conformance scenarios, 9/9 core scenarios) - ruff: all checks pass
46 lines
870 B
Python
46 lines
870 B
Python
"""aicc-py: Python SDK for the AI-Controlled Character Protocol."""
|
|
|
|
from aicc.bridge import Bridge
|
|
from aicc.client import AICCClient
|
|
from aicc.errors import AICCError, CapabilityError, ProtocolError, ToolError
|
|
from aicc.protocol import (
|
|
ErrorCode,
|
|
ErrorMessage,
|
|
EventMessage,
|
|
Heartbeat,
|
|
MessageType,
|
|
ModelClass,
|
|
SessionClose,
|
|
SessionInit,
|
|
TickMode,
|
|
ToolCall,
|
|
ToolClass,
|
|
ToolResult,
|
|
WorldKind,
|
|
)
|
|
from aicc.tool import tool
|
|
|
|
__version__ = "0.1.0"
|
|
__all__ = [
|
|
"AICCClient",
|
|
"AICCError",
|
|
"Bridge",
|
|
"CapabilityError",
|
|
"ErrorCode",
|
|
"ErrorMessage",
|
|
"EventMessage",
|
|
"Heartbeat",
|
|
"MessageType",
|
|
"ModelClass",
|
|
"ProtocolError",
|
|
"SessionClose",
|
|
"SessionInit",
|
|
"TickMode",
|
|
"ToolCall",
|
|
"ToolClass",
|
|
"ToolError",
|
|
"ToolResult",
|
|
"WorldKind",
|
|
"tool",
|
|
]
|