FOnline Engine
Current master GitHub
Documentation Docs/en/reference/ai-control-protocol/wire.md

AiControl Wire Contract

Generated reference. Do not edit directly. Update BuildTools/AiControlProtocol.json, then run python BuildTools/docs_ai_control_protocol.py --write.

Index Wire Methods Commands and events Security Integration and validation Canonical JSON Guide
Stable ID Rule Requirement Why Source
ai-control-protocol.wire.tcp-stream TCP byte stream A bridge accepts an explicitly configured TCP endpoint; clients must not assume service discovery, TLS, HTTP, or WebSocket framing. The common project implementations are local tooling channels, not an internet service protocol. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.wire.ndjson One JSON object per line Each request and response is one JSON object terminated by LF; peers process lines in connection order. Line framing is streamable, inspectable, and shared by both audited project bridges. BuildTools/ai_control_client.py
ai-control-protocol.wire.utf8 UTF-8 encoding JSON lines are encoded and decoded as strict UTF-8; malformed input receives a parse error or closes the connection. Project observations and action payloads may contain localized text. BuildTools/ai_control_client.py
ai-control-protocol.wire.line-limit Bounded line size A request or response JSON payload is at most 1 MiB before the LF terminator; oversized input is rejected and the connection may close. A local automation channel still needs deterministic memory bounds. BuildTools/ai_control_client.py
ai-control-protocol.wire.request-envelope Request envelope A request object carries jsonrpc=2.0, a caller-chosen id, a non-empty method string, and an object-valued params member. A small JSON-RPC-shaped envelope gives correlation without claiming the full JSON-RPC specification. BuildTools/ai_control_client.py
ai-control-protocol.wire.response-envelope Response envelope A response echoes jsonrpc=2.0 and the request id, then contains exactly one of result or error; error contains an integer code and string message. Strict correlation prevents one automation step from consuming another step’s result. BuildTools/ai_control_client.py
ai-control-protocol.wire.sequential-connection Sequential request processing A client sends a request and consumes its matching response before reusing that connection; clients must not require multiplexing or concurrent in-flight requests. The contract remains implementable by a single project-owned listener and avoids hidden ordering races. BuildTools/ai_control_client.py

Error codes

Stable ID Code Name Use Source
ai-control-protocol.error.parse -32700 Parse error Reject malformed UTF-8 JSON. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.error.invalid-request -32600 Invalid request Reject a non-object, invalid envelope, missing method, or oversized request. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.error.method-not-found -32601 Method not found Reject an unknown protocol method. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.error.invalid-params -32602 Invalid params Reject missing command type or structurally invalid method parameters. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.error.unauthorized -32001 Unauthorized Reject every method except auth until the connection is authorized when a token is configured. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.error.queue-full -32002 Command queue full Reject act when the bounded project command queue has no capacity. Examples/AiControlSample/ai_control_sample.py
Start typing to search.