OpenAPI 3.1doc/zh/design/client-protocol.md · api/httpapi/v2/openapi.yaml
Client Protocol (httpapi v2) & orquelo.dev
The unified HTTP JSON + SSE protocol between Orquelo Host and thin clients, plus orquelo.dev platform endpoints.
orquelo.ai vs orquelo.dev Surface
| Endpoints | Origin | Purpose |
|---|---|---|
| /install.sh · /install.ps1 · /releases/latest.json | https://orquelo.dev | Cross-platform install scripts, release metadata, and SHA-256 checksums |
| /v1/catalog/plugins | https://orquelo.dev | Public plugin catalog query API |
| /v1/waitlist · /v1/auth/* | https://orquelo.dev | Early access waitlist, feedback, and web session auth |
| /v1/health · /v1/messages · /v1/stream · /v1/questions/* | https://orquelo.dev or self-hosted Host | Orquelo Host httpapi v2 thin-client protocol (HTTP JSON + SSE) |
Authentication & Error Envelope
- ◆Local client (orq_loc_…): Host writes 0600 data/local-client.json on loopback so orq TUI and desktop sidecar connect with zero pairing.
- ◆Paired devices (orq_dev_…): 8-char 5-minute pairing code exchanged at /v1/auth/pair/exchange; Host stores only SHA-256 hashes.
- ◆Static bearer token: trusted proxies or automation scripts specifying X-Orquelo-User.
Structured error envelope (409 CAS conflict)
{
"error": {
"code": "question.already_resolved",
"message_key": "question.already_resolved",
"params": { "reason": "already_approved" },
"message": "Question was already approved in feishu.",
"retryable": false,
"data": { "current_version": 2 }
}
}Core httpapi v2 Endpoints
| Endpoint | Purpose |
|---|---|
| GET /v1/health | Unauthenticated handshake returning protocol_version, host_version, and capabilities |
| POST /v1/messages | Idempotent message submit; steers active runs; 503 + Retry-After during shutdown |
| GET /v1/stream | SSE stream with Last-Event-ID replay and structured run.activity snapshots |
| GET /v1/questions · POST /v1/questions/{id}/answer | Pending approvals/questions/sign-ins settled atomically by version CAS |
| POST /v1/uploads · PATCH /v1/uploads/{id} | Multipart and resumable chunked uploads (Upload-Offset) surviving Host restarts |
| GET /v1/runs/{id}/diff · /trace · /deliveries | Inspect worktree diffs, full run traces, and per-target delivery states |
| POST /v1/deliveries/{id}/retry | Requeues a failed delivery without rerunning the runtime |
| GET /v1/memory · /v1/plugins · /v1/egress/rules | Manage scoped memory, plugin toggles, secrets, and egress routing |