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

EndpointsOriginPurpose
/install.sh · /install.ps1 · /releases/latest.jsonhttps://orquelo.devCross-platform install scripts, release metadata, and SHA-256 checksums
/v1/catalog/pluginshttps://orquelo.devPublic plugin catalog query API
/v1/waitlist · /v1/auth/*https://orquelo.devEarly access waitlist, feedback, and web session auth
/v1/health · /v1/messages · /v1/stream · /v1/questions/*https://orquelo.dev or self-hosted HostOrquelo 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

EndpointPurpose
GET /v1/healthUnauthenticated handshake returning protocol_version, host_version, and capabilities
POST /v1/messagesIdempotent message submit; steers active runs; 503 + Retry-After during shutdown
GET /v1/streamSSE stream with Last-Event-ID replay and structured run.activity snapshots
GET /v1/questions · POST /v1/questions/{id}/answerPending 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 · /deliveriesInspect worktree diffs, full run traces, and per-target delivery states
POST /v1/deliveries/{id}/retryRequeues a failed delivery without rerunning the runtime
GET /v1/memory · /v1/plugins · /v1/egress/rulesManage scoped memory, plugin toggles, secrets, and egress routing