chore: rename quicproquo → quicprochat in docs, Docker, CI, and packaging
Rename all project references from quicproquo/qpq to quicprochat/qpc across documentation, Docker configuration, CI workflows, packaging scripts, operational configs, and build tooling. - Docker: crate paths, binary names, user/group, data dirs, env vars - CI: workflow crate references, binary names, artifact names - Docs: all markdown files under docs/, SDK READMEs, book.toml - Packaging: OpenWrt Makefile, init script, UCI config (file renames) - Scripts: justfile, dev-shell, screenshot, cross-compile, ai_team - Operations: Prometheus config, alert rules, Grafana dashboard - Config: .env.example (QPQ_* → QPC_*), CODEOWNERS paths - Top-level: README, CONTRIBUTING, ROADMAP, CLAUDE.md
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
# quicproquo Python SDK
|
||||
# quicprochat Python SDK
|
||||
|
||||
Python client library for the [quicproquo](https://github.com/nicholasgasior/quicproquo) E2E encrypted messenger.
|
||||
Python client library for the [quicprochat](https://github.com/nicholasgasior/quicprochat) E2E encrypted messenger.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Python 3.10+
|
||||
- A running quicproquo server
|
||||
- A running quicprochat server
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
pip install quicproquo
|
||||
pip install quicprochat
|
||||
```
|
||||
|
||||
For development:
|
||||
@@ -27,7 +27,7 @@ Uses [aioquic](https://github.com/aiortc/aioquic) for native QUIC transport with
|
||||
|
||||
```python
|
||||
import asyncio
|
||||
from quicproquo import QpqClient, ConnectOptions
|
||||
from quicprochat import QpqClient, ConnectOptions
|
||||
|
||||
async def main():
|
||||
client = await QpqClient.connect(ConnectOptions(
|
||||
@@ -61,15 +61,15 @@ asyncio.run(main())
|
||||
|
||||
### 2. Rust FFI (synchronous)
|
||||
|
||||
Wraps `libquicproquo_ffi` via CFFI for full Rust crypto stack (MLS, hybrid KEM, OPAQUE) at native speed.
|
||||
Wraps `libquicprochat_ffi` via CFFI for full Rust crypto stack (MLS, hybrid KEM, OPAQUE) at native speed.
|
||||
|
||||
```sh
|
||||
# Build the FFI library first
|
||||
cargo build --release -p quicproquo-ffi
|
||||
cargo build --release -p quicprochat-ffi
|
||||
```
|
||||
|
||||
```python
|
||||
from quicproquo import QpqClient, ConnectOptions
|
||||
from quicprochat import QpqClient, ConnectOptions
|
||||
|
||||
client = QpqClient.connect_ffi(ConnectOptions(
|
||||
addr="127.0.0.1:5001",
|
||||
@@ -138,7 +138,7 @@ client.close_sync()
|
||||
|
||||
## Wire Format
|
||||
|
||||
The SDK implements the qpq v2 wire format:
|
||||
The SDK implements the qpc v2 wire format:
|
||||
|
||||
```
|
||||
[method_id:u16][req_id:u32][len:u32][protobuf payload]
|
||||
@@ -148,12 +148,12 @@ Each RPC is sent over its own QUIC bidirectional stream.
|
||||
|
||||
## Structure
|
||||
|
||||
- `quicproquo/client.py` -- High-level client API
|
||||
- `quicproquo/transport.py` -- QUIC transport (aioquic)
|
||||
- `quicproquo/ffi.py` -- Rust FFI transport (CFFI)
|
||||
- `quicproquo/proto.py` -- Protobuf encode/decode (no codegen)
|
||||
- `quicproquo/wire.py` -- v2 wire format framing
|
||||
- `quicproquo/types.py` -- Data types and exceptions
|
||||
- `quicprochat/client.py` -- High-level client API
|
||||
- `quicprochat/transport.py` -- QUIC transport (aioquic)
|
||||
- `quicprochat/ffi.py` -- Rust FFI transport (CFFI)
|
||||
- `quicprochat/proto.py` -- Protobuf encode/decode (no codegen)
|
||||
- `quicprochat/wire.py` -- v2 wire format framing
|
||||
- `quicprochat/types.py` -- Data types and exceptions
|
||||
- `examples/bot.py` -- Async echo bot example
|
||||
- `examples/ffi_demo.py` -- Synchronous FFI example
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Example: async echo bot using the quicproquo Python SDK.
|
||||
"""Example: async echo bot using the quicprochat Python SDK.
|
||||
|
||||
Connects to a qpq server, authenticates, and echoes back any received
|
||||
messages with a "[bot] " prefix.
|
||||
@@ -19,7 +19,7 @@ import asyncio
|
||||
import signal
|
||||
import sys
|
||||
|
||||
from quicproquo import QpqClient, ConnectOptions
|
||||
from quicprochat import QpqClient, ConnectOptions
|
||||
|
||||
|
||||
async def run_bot(opts: ConnectOptions, token: bytes, identity_key: bytes) -> None:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Example: synchronous messaging using the Rust FFI backend.
|
||||
|
||||
Requires libquicproquo_ffi to be built:
|
||||
cargo build --release -p quicproquo-ffi
|
||||
Requires libquicprochat_ffi to be built:
|
||||
cargo build --release -p quicprochat-ffi
|
||||
|
||||
Set QPQ_LIB_PATH if the library is not in the default search path.
|
||||
|
||||
@@ -15,7 +15,7 @@ from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
||||
from quicproquo import QpqClient, ConnectOptions
|
||||
from quicprochat import QpqClient, ConnectOptions
|
||||
|
||||
|
||||
def main() -> None:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""quicproquo -- Python SDK for the quicproquo E2E encrypted messenger.
|
||||
"""quicprochat -- Python SDK for the quicprochat E2E encrypted messenger.
|
||||
|
||||
Two transport backends are available:
|
||||
|
||||
1. **FFI** (``QpqClient.connect_ffi``): wraps the Rust ``libquicproquo_ffi``
|
||||
1. **FFI** (``QpqClient.connect_ffi``): wraps the Rust ``libquicprochat_ffi``
|
||||
shared library via CFFI. This gives you the full Rust crypto stack
|
||||
(MLS, hybrid KEM, OPAQUE) at native speed.
|
||||
|
||||
@@ -11,8 +11,8 @@ Two transport backends are available:
|
||||
operations must be supplied externally.
|
||||
"""
|
||||
|
||||
from quicproquo.client import QpqClient
|
||||
from quicproquo.types import (
|
||||
from quicprochat.client import QpqClient
|
||||
from quicprochat.types import (
|
||||
ConnectOptions,
|
||||
Envelope,
|
||||
ChannelResult,
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
"""High-level quicproquo client.
|
||||
"""High-level quicprochat client.
|
||||
|
||||
Provides both async (QUIC transport) and sync (FFI transport) APIs for
|
||||
interacting with a quicproquo server.
|
||||
interacting with a quicprochat server.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from quicproquo.types import (
|
||||
from quicprochat.types import (
|
||||
ConnectOptions,
|
||||
Envelope,
|
||||
ChannelResult,
|
||||
HealthInfo,
|
||||
ConnectionError,
|
||||
)
|
||||
from quicproquo.transport import QuicTransport
|
||||
from quicproquo.ffi import FfiTransport
|
||||
from quicproquo import proto, wire
|
||||
from quicprochat.transport import QuicTransport
|
||||
from quicprochat.ffi import FfiTransport
|
||||
from quicprochat import proto, wire
|
||||
|
||||
|
||||
class QpqClient:
|
||||
"""High-level quicproquo client.
|
||||
"""High-level quicprochat client.
|
||||
|
||||
Use ``QpqClient.connect()`` for the async QUIC transport, or
|
||||
``QpqClient.connect_ffi()`` for the synchronous Rust FFI backend.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""CFFI bindings to ``libquicproquo_ffi`` (the Rust C FFI layer).
|
||||
"""CFFI bindings to ``libquicprochat_ffi`` (the Rust C FFI layer).
|
||||
|
||||
This module loads the shared library and exposes a synchronous Python API
|
||||
that mirrors the C functions in ``crates/quicproquo-ffi/src/lib.rs``.
|
||||
that mirrors the C functions in ``crates/quicprochat-ffi/src/lib.rs``.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -13,14 +13,14 @@ from typing import Optional
|
||||
|
||||
import cffi
|
||||
|
||||
from quicproquo.types import (
|
||||
from quicprochat.types import (
|
||||
QpqError,
|
||||
AuthError,
|
||||
TimeoutError,
|
||||
ConnectionError,
|
||||
)
|
||||
|
||||
# Status codes (must match crates/quicproquo-ffi/src/lib.rs).
|
||||
# Status codes (must match crates/quicprochat-ffi/src/lib.rs).
|
||||
QPQ_OK = 0
|
||||
QPQ_ERROR = 1
|
||||
QPQ_AUTH_FAILED = 2
|
||||
@@ -54,23 +54,23 @@ def _load_lib() -> object:
|
||||
# Explicit environment variable.
|
||||
os.environ.get("QPQ_LIB_PATH", ""),
|
||||
# Common cargo build output locations.
|
||||
str(Path(__file__).resolve().parents[3] / "target" / "release" / "libquicproquo_ffi.so"),
|
||||
str(Path(__file__).resolve().parents[3] / "target" / "debug" / "libquicproquo_ffi.so"),
|
||||
str(Path(__file__).resolve().parents[3] / "target" / "release" / "libquicprochat_ffi.so"),
|
||||
str(Path(__file__).resolve().parents[3] / "target" / "debug" / "libquicprochat_ffi.so"),
|
||||
# macOS dylib.
|
||||
str(
|
||||
Path(__file__).resolve().parents[3]
|
||||
/ "target"
|
||||
/ "release"
|
||||
/ "libquicproquo_ffi.dylib"
|
||||
/ "libquicprochat_ffi.dylib"
|
||||
),
|
||||
str(
|
||||
Path(__file__).resolve().parents[3]
|
||||
/ "target"
|
||||
/ "debug"
|
||||
/ "libquicproquo_ffi.dylib"
|
||||
/ "libquicprochat_ffi.dylib"
|
||||
),
|
||||
# System library path.
|
||||
"libquicproquo_ffi.so",
|
||||
"libquicprochat_ffi.so",
|
||||
]
|
||||
|
||||
for path in search_paths:
|
||||
@@ -83,8 +83,8 @@ def _load_lib() -> object:
|
||||
continue
|
||||
|
||||
raise OSError(
|
||||
"Could not find libquicproquo_ffi. Set QPQ_LIB_PATH or build with "
|
||||
"`cargo build --release -p quicproquo-ffi`."
|
||||
"Could not find libquicprochat_ffi. Set QPQ_LIB_PATH or build with "
|
||||
"`cargo build --release -p quicprochat-ffi`."
|
||||
)
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ def _check_error(handle: object, code: int) -> None:
|
||||
|
||||
|
||||
class FfiTransport:
|
||||
"""Synchronous transport wrapping ``libquicproquo_ffi``.
|
||||
"""Synchronous transport wrapping ``libquicprochat_ffi``.
|
||||
|
||||
Provides the same logical operations as ``QuicTransport`` but backed
|
||||
by the Rust client library through C FFI.
|
||||
|
||||
@@ -14,8 +14,8 @@ import asyncio
|
||||
import ssl
|
||||
from typing import Any
|
||||
|
||||
from quicproquo.types import ConnectionError, TimeoutError
|
||||
from quicproquo.wire import HEADER_SIZE, encode_frame, decode_header
|
||||
from quicprochat.types import ConnectionError, TimeoutError
|
||||
from quicprochat.wire import HEADER_SIZE, encode_frame, decode_header
|
||||
|
||||
|
||||
def _make_protocol_class() -> type:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Data types and exceptions for the quicproquo Python SDK."""
|
||||
"""Data types and exceptions for the quicprochat Python SDK."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -12,7 +12,7 @@ from typing import Optional
|
||||
|
||||
|
||||
class QpqError(Exception):
|
||||
"""Base exception for quicproquo SDK errors."""
|
||||
"""Base exception for quicprochat SDK errors."""
|
||||
|
||||
|
||||
class AuthError(QpqError):
|
||||
@@ -34,7 +34,7 @@ class ConnectionError(QpqError):
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ConnectOptions:
|
||||
"""Options for connecting to a quicproquo server.
|
||||
"""Options for connecting to a quicprochat server.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
@@ -12,7 +12,7 @@ import struct
|
||||
HEADER_FMT = "!HII" # network byte-order: u16 + u32 + u32
|
||||
HEADER_SIZE = struct.calcsize(HEADER_FMT)
|
||||
|
||||
# Method IDs (mirrors quicproquo-proto/src/lib.rs::method_ids).
|
||||
# Method IDs (mirrors quicprochat-proto/src/lib.rs::method_ids).
|
||||
# Auth (100-103)
|
||||
OPAQUE_REGISTER_START = 100
|
||||
OPAQUE_REGISTER_FINISH = 101
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Tests for the manual protobuf encode/decode layer."""
|
||||
|
||||
from quicproquo.proto import (
|
||||
from quicprochat.proto import (
|
||||
encode_health,
|
||||
decode_health_response,
|
||||
encode_resolve_user,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Tests for SDK data types and exceptions."""
|
||||
|
||||
from quicproquo.types import (
|
||||
from quicprochat.types import (
|
||||
ConnectOptions,
|
||||
Envelope,
|
||||
ChannelResult,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Tests for the v2 wire format encoder/decoder."""
|
||||
|
||||
from quicproquo.wire import (
|
||||
from quicprochat.wire import (
|
||||
HEADER_SIZE,
|
||||
encode_frame,
|
||||
decode_header,
|
||||
|
||||
Reference in New Issue
Block a user