kollabor-rpc
kollabor-rpc is the lightweight RPC transport foundation for Kollabor daemon
and attach-mode state access.
It provides request/response models, error types, a method-dispatch server, a client, and Unix-socket transport helpers. The current package is intentionally small and stdlib-only.
Current Role
- Represent RPC requests and responses with stable IDs.
- Dispatch named methods to async handlers.
- Provide client helpers for request/response calls.
- Wrap common RPC errors such as timeout, missing method, and handler failure.
- Provide Unix socket connection helpers with a larger buffer limit.
Architecture
| Module | Responsibility |
|---|---|
models.py |
RpcRequest, RpcResponse, request ID helpers |
errors.py |
RPC exception hierarchy |
server.py |
handler registration and dispatch |
client.py |
request client abstraction |
transport.py |
Unix transport helpers and buffer settings |
Usage
from kollabor_rpc import RpcServer
server = RpcServer()
async def ping(params):
return {"ok": True, "echo": params.get("echo")}
server.register("ping", ping)
reply = await server.handle_wire({
"request_id": "req_1",
"method": "ping",
"params": {"echo": "hello"},
})
Known Gaps
- This package is still a transport foundation; higher-level StateService method contracts live outside the package.
- Wire-format compatibility should be documented alongside the hub/attach socket protocol.
- Current tests focus on integration through hub sockets; package-local unit coverage should grow as the API stabilizes.
Roadmap
Phase 1: Contract docs
- Document the exact frame format used by attach clients and hub sockets.
- Add examples for both direct dispatch and socket-backed clients.
- Clarify which errors are transport failures versus handler failures.
Phase 2: StateService integration
- Keep RPC generic, but document the StateService method namespace that uses it.
- Add contract tests for high-value state methods.
- Add compatibility checks for attached streaming and request/reply flows.
Phase 3: Operational hardening
- Add timeout/cancellation guidance for callers.
- Improve observability for slow handlers and failed frames.
- Keep the package stdlib-only unless a transport dependency becomes essential.
Development
Targeted validation examples:
python -m py_compile packages/kollabor-rpc/src/kollabor_rpc/*.py
python -m pytest tests/test_hub_rpc_integration.py -q
Dependencies
None. This package is intentionally stdlib-only.
License
MIT
Metadata
Release files for kollabor-rpc 0.10.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kollabor_rpc-0.10.4.tar.gz | 15.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kollabor_rpc-0.10.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.5 kB
Release files / kollabor_rpc-0.10.4.tar.gz
| Download URL | kollabor_rpc-0.10.4.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c3baf1554a9f0114c2c3d1c56690f65d1958c8c64ee2b5c5a47385aaf6dcda4
|
|
BLAKE2b-256 checksum How to use checksums |
5088e9879c7c43b8d414d2394931b52823540c58ce1eb2fabf739fa207281bd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / kollabor_rpc-0.10.4-py3-none-any.whl
| Download URL | kollabor_rpc-0.10.4-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55f3b449ce765b0d4795b7408e59a2a36a46f157f48b689962020dc0984ae6ce
|
|
BLAKE2b-256 checksum How to use checksums |
f0221f671f859c3fa356d80529c81bb52574022fd3c88f6f23be79780669d0a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|