feat(omp-rpc): introduced RpcClient with subprocess communication and event listeners

- Added RpcClient class with subprocess-based RPC communication, thread-safe request/response handling, and 30+ public methods for agent operations.
- Defined 65+ public API symbols including protocol types, dataclasses, parser functions, and custom exception types for RPC communication.
- Implemented event listener system with on_event, on_ui_request, and on_extension_error callbacks for asynchronous RPC event handling.
- Added comprehensive test suite with integration tests for RpcClient and unit tests for protocol parsing functions.
- Configured Python package with setuptools, PEP 561 type hints support, and documentation for usage and API reference.
This commit is contained in:
can1357
2026-04-08 04:20:06 +02:00
parent 5eeb9d54e8
commit 67e12b39fe
9 changed files with 2148 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
[build-system]
requires = ["setuptools>=69"]
build-backend = "setuptools.build_meta"
[project]
name = "omp-rpc"
version = "0.1.0"
description = "Typed Python client for the omp coding-agent RPC protocol"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [{ name = "OpenAI Codex" }]
keywords = ["omp", "rpc", "agent", "coding-agent", "jsonl", "stdio"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries",
]
[project.urls]
Repository = "https://github.com/can1357/oh-my-pi"
Documentation = "https://github.com/can1357/oh-my-pi/blob/main/docs/rpc.md"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
omp_rpc = ["py.typed"]