Repository navigation
v4.0.0
Tracks uapi 4.0.0, from the spec of the uapi v4.0.0 tag. uapi 4.0.0 needs OpenWrt main,
so a router on OpenWrt 25.12 stays on uapi 3.5 and uapi-mcp 3.5. Set UAPI_ENDPOINT to
the /api/v4 path of the router. Before you upgrade a router from uapi 3.x, read the
uapi guide
docs/migration-v3-to-v4.md.
Changed
- BREAKING: uapi-mcp tracks uapi 4.0.0, which needs OpenWrt main. The catalog comes
from the uapi 4.0.0 spec and holds 258 tools.UAPI_ENDPOINTends in/api/v4. The
tools of/tokens,/auth/whoami,/diagnostics,/metricsand/batchmove under
/uapi/, such asuapi_tokens_listanduapi_whoami_read.dhcp_leases6_listand
dhcp_leases6_readgo: calldhcp_leases_listanddhcp_lease_readwith
family: "v6". The 7openvpn_instance*tools go: an openvpn tunnel is a
network_interface*section withproto: "openvpn". A router on OpenWrt 25.12 stays
on uapi 3.5 and uapi-mcp 3.5. The openvpn fields add about 11 KB to each
network_interfacewrite tool. uapi-mcp takes no action for it. (#10) - The footer passes every advisory header. It holds each
X-Reload-*and
X-Kernel-*header andX-Mgmt-Path-Warning, sorted by name, soX-Reload-Stopped
andX-Kernel-Blockedof uapi 4.0.0 reach the agent. A header that a uapi 4.x minor
adds under these prefixes needs no release of uapi-mcp, as uapidocs/versioning.md
promises. The instructions tell the agent to calluapi_service_recoverfor each
service inX-Reload-Stopped, and to ask the user before it changes a WireGuard peer
thatX-Kernel-Blockednames and the task does not. (#10) - The
Idempotency-Keyof a POST goes only in the header, which uapi 4.x reads. (#10) - The instructions send the agent to the merge tool to change some fields of a section.
Before, they told it to read, edit and send the object back with the replace tool. A
replace removes each option that uapi does not model, so a replace of the stock sqm
queue removed the 7 advanced options that LuCI writes on it. (#10)
Added
- The sqm queue tools take the 20 options that LuCI's sqm form writes, such as
ingress_ecn,use_mqandiqdisc_opts(uapi #481). A replace of the read keeps
them. An absent option of a queue reads the default of sqm-scripts, and the field
descriptions give it. (#11) uapi_service_recover, forPOST /uapi/services/{name}/recover. In the generator, a
POST on a literal segment after an item parameter takes that segment as its verb, as
adoptdoes. (#10)- A list walk reads the list again from the first page when uapi answers 400 to a
cursor after the first page, because the list changed under it. It does this at most
3 times, then returns the 400. (#10) - Schema defaults fold into the field descriptions, as
Reads <value> when unset.,
on the create, replace and merge tools. The softening drops thedefaultkeyword, so
the agent did not see what an absent field means. uapi defines a default as the value
that a field reads while its uci option is unset. (#10)
Fixed
- A DELETE that answers 204 lost its footer, so the reload headers of a delete did not
reach the agent. (#10) - A merge field with an enum lost the description of its replace field since 3.3.0,
such asnetwork_interface_merge.ovpnprotoandfirewall_rule_merge.target(26
fields on uapi 4.0.0). The generator now takes the description of the Request field
before it folds the enum of the Patch field,nullincluded. (#10) - A query argument that the agent sent as a bool or a number, such as
"managed": true, was dropped, and the list answered every section. It is now sent as
its text. (#10) - The generator resolves
$refparameters, and hidesrequest_idby name. Before, it
ignored every$refparameter. (#10)