Skip to main content

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

Apache-2.0

Metadata

Release files for kollabor-rpc 0.21.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kollabor-rpc 0.21.0
File Size Uploaded Provenance Actions
kollabor_rpc-0.21.0.tar.gz 15.7 kB Without provenance Details for kollabor_rpc-0.21.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kollabor-rpc 0.21.0
File Interpreter ABI Platform Actions
kollabor_rpc-0.21.0-py3-none-any.whl Python 3 none any Details for kollabor_rpc-0.21.0-py3-none-any.whl

Total release size: 25.9 kB

Release files / kollabor_rpc-0.21.0.tar.gz

Download URL kollabor_rpc-0.21.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
de173d7d3fe6c71948a07dd2d8d306649f52090270c0459bae78d2ce2d970d5f
BLAKE2b-256 checksum
How to use checksums
9d7fcc65af47510ea5d789aa342298ff3c06445adf13de4372a1bc1b1e6a4233
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / kollabor_rpc-0.21.0-py3-none-any.whl

Download URL kollabor_rpc-0.21.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
017b5667fce7f5a8cd403c8cafbeadd45fa420f8e4fb63d49d737a1ef223a582
BLAKE2b-256 checksum
How to use checksums
9b052ea8bc292ced855113cc4d825f068b04bb97a9d3e139bd99f4ca2df5f0ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for kollabor-rpc 0.21.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.21.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page