Developers

Responses and errors

The response envelope and every response code returned by the RooQi bridge.

Platforms
Mac only (macOS 14 or later)
Version
Bridge protocol v1
Status
Preview — not yet publicly released
Last verified
2026-10-26 against RooQiIPCShared/Wire.swift and Client.swift

Response envelope

{
  "version": 1,
  "requestID": "…",
  "code": "ready",
  "instanceID": "…",
  "processID": 1234,
  "brokerInstanceID": "…",
  "resultJSON": "{…}"
}

resultJSON is a JSON-encoded string with the method’s result; parse it a second time. Envelopes never contain local paths or underlying system errors.

Codes

CodeMeaningWhat to do
readySuccess—
approvalRequiredThe user hasn’t approved yet; RooQi is showing a windowWait, then call the same request again
deniedThe user declinedStart a new connection to ask again
appUnavailableRooQi isn’t runningOpen RooQi
transportUnavailableThe connection service isn’t reachableEnable External Connections; allow the background service
duplicateAppMore than one RooQi instance is registeredQuit extra copies of RooQi
shuttingDownRooQi is closing the connectionRetry later on a new connection
protocolMismatchBridge and app versions don’t matchUse the bridge inside the same RooQi.app
unsupportedMethodUnknown tool or methodCheck the reference
malformedRequestMissing, extra or invalid fieldsFix the input
busyToo many calls in flight, or another approval is pendingWait for earlier calls
timeoutNo reply within 8 seconds; the connection is retiredReconnect (needs new approval)
resultTooLargeThe result exceeds 16,384 bytesRead less (e.g. a smaller PDF region)
readUnavailableThe content can’t be read right nowCheck that the document still exists and is saved
mutationRejectedThe write was refused before it was submitted (e.g. version mismatch)Re-read, then retry with a new operation
mutationUncertainThe write may have been committedQuery or retry with the same operationID; never a new one

Retry rules

  • Idempotency: writes are keyed by operationID. Reusing the same ID with the same content is safe; changing the content under the same ID is rejected.
  • Connections: timeout, transportUnavailable, protocolMismatch and malformedRequest responses end the connection and all its grants.

View as Markdown · hello@rooqi.ai