Version 1.4.0 (current)
Requests, responses, and call lifecycle
Read the request, result, and error from a taku/0.1 call.
The SDK and CLI use taku/0.1 to describe a call. It defines the data format; the transport separately selects how to reach a device. The existing SDK constructs requests for you, so you do not need to send the JSON below yourself.
Request fields
| Field | Type / requirement | Current limit |
|---|---|---|
protocol | string, required | taku/0.1 |
type | string, required | request |
id | string, required, 1–128 characters | Correlates the response |
method | string, required | Implemented dot-separated name, such as system.info |
params | object, required | Must be an empty object for current methods |
This is an example request structure for reading system information:
{
"protocol": "taku/0.1",
"type": "request",
"id": "req-1",
"method": "system.info",
"params": {}
}One call
- The SDK or CLI constructs a request.
- The call entry point, called the facade in source, checks the protocol, method, and parameters.
- Metadata methods read local specifications; device-data methods run an Android probe through the selected transport.
- The call returns a result or an explicit error.
For example, a device-data call without a device connection is rejected:
{
"protocol": "taku/0.1",
"type": "response",
"id": "req-1",
"ok": false,
"error": {
"code": "DEVICE_REQUIRED",
"message": "Provide Android transport",
"retryable": false
}
}This illustrates the protocol structure. id matches the request. Read error when ok is false and result on success. retryable: false means repeating the same request is insufficient: first fix conditions such as the missing connection. The protocol does not elevate identity or turn unknown methods into arbitrary root commands.
Three different entry points
| Entry point | What you receive |
|---|---|
| Host CLI | Complete response JSON; also check the process exit code |
| JavaScript SDK | Directly returns result on success; throws TakuError on failure |
| Device shell entry point | Complete response JSON; accepts only system.info, displays.status and tasks.status, without phone-side Node.js. Call other device methods through the host CLI over adb |
See CLI and SDK reference for usage and partial failures in aggregated extension results.
Outputs and events
See generated protocol and methods for each method’s parameters and result fields. Each query reflects the state at that moment. Different results on consecutive calls do not by themselves indicate a protocol error.
JSON Schema defines format validation; it does not establish an HTTP service for the whole system. Event formats are reserved, but general subscription, ordering, cursors, and deduplication remain unimplemented. See snapshots and events.
Next: Look up an error in the error index, or write a caller with your first development example.
Research preview · Current availability
Report an issue or give feedback
Delivery to the maintenance queue does not mean it has been handled. Feedback is retained for 90 days.
Built with Fumadocs