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

MIT

Metadata

Release files for kollabor-rpc 0.15.4

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.15.4
File Size Uploaded
kollabor_rpc-0.15.4.tar.gz 15.7 kB Details

Built distribution (wheel)

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

Total release size: 25.9 kB

Release files / kollabor_rpc-0.15.4.tar.gz

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

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

Download URL kollabor_rpc-0.15.4-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69077ed7d3a1b43c56da39709c9b7f45514c1925f063b27454d39233e1bd8f10
BLAKE2b-256 checksum
How to use checksums
8c19272a9b0becacad8f146d4ac07e89e1aa041cdd8d1913fa7e76b4a983000c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release history Release notifications | RSS feed

1.0.1

2 release files

1.0.0

2 release files

0.15.6

2 release files

0.15.5

2 release files

This release

0.15.4 This release

2 release files

0.15.3

2 release files

0.15.2

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.10.7

2 release files

0.10.6

2 release files

0.10.5

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.24

2 release files

0.5.23

2 release files

0.5.22

2 release files

0.5.19

2 release files

0.5.18

2 release files

0.5.16

2 release files

0.5.15

2 release files

0.5.14

2 release files

0.5.13

2 release files

0.5.12

2 release files

0.5.11

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.5

2 release files

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