feat(omp-rpc): introduced typed event listeners and todo phase management to RPC client
- Added typed event listeners and granular event handling for all RPC notification types. - Added set_todos RPC command and todoPhases session state field for todo phase management. - Added RpcClient initialization parameters (thinking, tools, no_session, rpc_defaults) for startup configuration. - Added install_headless_ui() method and todo management methods (get_todos, set_todos, clear_todos). - Added TodoItem and TodoPhase dataclasses with parser functions for structured todo representation. - Added RPC mode behavior: disables session title generation by default and resets workflow settings to built-in defaults.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
from .client import (
|
||||
AgentEventListener,
|
||||
ExtensionErrorListener,
|
||||
NotificationListener,
|
||||
PromptTurn,
|
||||
ReadyListener,
|
||||
RpcClient,
|
||||
RpcCommandError,
|
||||
RpcError,
|
||||
@@ -48,6 +50,11 @@ from .protocol import (
|
||||
ThinkingConfig,
|
||||
ThinkingLevel,
|
||||
ThinkingLevelCycleResult,
|
||||
TodoAutoClearEvent,
|
||||
TodoItem,
|
||||
TodoPhase,
|
||||
TodoReminderEvent,
|
||||
TodoStatus,
|
||||
ToolDescriptor,
|
||||
ToolExecutionEndEvent,
|
||||
ToolExecutionStartEvent,
|
||||
@@ -62,6 +69,7 @@ from .protocol import (
|
||||
message_text,
|
||||
parse_notification,
|
||||
parse_session_state,
|
||||
parse_todo_phases,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
@@ -94,9 +102,11 @@ __all__ = [
|
||||
"ModelCost",
|
||||
"ModelCycleResult",
|
||||
"ModelInfo",
|
||||
"NotificationListener",
|
||||
"PromptTurn",
|
||||
"PythonExecutionMessage",
|
||||
"ReadyEvent",
|
||||
"ReadyListener",
|
||||
"RetryFallbackAppliedEvent",
|
||||
"RetryFallbackSucceededEvent",
|
||||
"RpcAgentEvent",
|
||||
@@ -111,6 +121,11 @@ __all__ = [
|
||||
"ThinkingConfig",
|
||||
"ThinkingLevel",
|
||||
"ThinkingLevelCycleResult",
|
||||
"TodoAutoClearEvent",
|
||||
"TodoItem",
|
||||
"TodoPhase",
|
||||
"TodoReminderEvent",
|
||||
"TodoStatus",
|
||||
"ToolDescriptor",
|
||||
"ToolExecutionEndEvent",
|
||||
"ToolExecutionStartEvent",
|
||||
@@ -126,4 +141,5 @@ __all__ = [
|
||||
"message_text",
|
||||
"parse_notification",
|
||||
"parse_session_state",
|
||||
"parse_todo_phases",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user