Metadata-Version: 2.5
Name: dikolab-horde-ipc
Version: 0.0.1
Summary: The JSON-RPC protocol library shared by horde and every horde plugin.
Project-URL: Homepage, https://diko316.gitlab.io/dikolab-horde/
Project-URL: Documentation, https://diko316.gitlab.io/dikolab-horde/
Project-URL: Funding, https://paypal.me/dikolab
Author-email: Diko TechSlave <diko316@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: horde,ipc,json-rpc,plugin,protocol,stdio
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: dikolab-horde-common>=0.0.1
Description-Content-Type: text/markdown

# dikolab-horde-ipc

The JSON-RPC 2.0 protocol library shared by horde and every horde plugin. It
defines the methods, validates message shapes, and delivers typed objects to the
other side — a frame that does not match its declared shape raises where it is
decoded, never a `KeyError` three layers further in. **It performs no effects**:
`fs.write` is a shape here, and only horde writes a file. Install it if you are
implementing one side of the protocol by hand; most plugin authors want
`dikolab-horde-sdk`, which does this for you.

> **Status: alpha.** `0.0.1` ships the complete protocol — nineteen methods
> across five namespaces, the transport, and `Peer`. The interfaces may still
> move.

## Getting started

```sh
pip install dikolab-horde-ipc
```

Python 3.11 or newer. One dependency, `dikolab-horde-common`.

Claim `stdout` before anything else — the protocol owns it, and a stray
`print()` would desynchronise the connection — then send a request:

```python
import sys

from dikolab_horde_ipc_shared import FsReadParams, Method, Peer, protect_stdout

protocol_out = protect_stdout()
peer = Peer(sys.stdin.buffer, protocol_out)

request_id = peer.send_request(Method.FS_READ, FsReadParams(paths=["pyproject.toml"]))
result = peer.wait_for(request_id)
```

`wait_for` keeps pumping the connection while it blocks, so requests arriving the
other way are still dispatched.

## More reading

Full documentation, guides, and the plugin authoring manual:
https://diko316.gitlab.io/dikolab-horde/

## Support

If horde saves you time, you can support its development:
https://paypal.me/dikolab

---

© 2025–2026 dikolab. Released under the MIT License.
