Skip to content

v4.0.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 07:51
· 2 commits to main since this release
v4.0.0
32e1bd8

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_ENDPOINT ends in /api/v4. The
    tools of /tokens, /auth/whoami, /diagnostics, /metrics and /batch move under
    /uapi/, such as uapi_tokens_list and uapi_whoami_read. dhcp_leases6_list and
    dhcp_leases6_read go: call dhcp_leases_list and dhcp_lease_read with
    family: "v6". The 7 openvpn_instance* tools go: an openvpn tunnel is a
    network_interface* section with proto: "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_interface write tool. uapi-mcp takes no action for it. (#10)
  • The footer passes every advisory header. It holds each X-Reload-* and
    X-Kernel-* header and X-Mgmt-Path-Warning, sorted by name, so X-Reload-Stopped
    and X-Kernel-Blocked of 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 uapi docs/versioning.md
    promises. The instructions tell the agent to call uapi_service_recover for each
    service in X-Reload-Stopped, and to ask the user before it changes a WireGuard peer
    that X-Kernel-Blocked names and the task does not. (#10)
  • The Idempotency-Key of 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_mq and iqdisc_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, for POST /uapi/services/{name}/recover. In the generator, a
    POST on a literal segment after an item parameter takes that segment as its verb, as
    adopt does. (#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 the default keyword, 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 as network_interface_merge.ovpnproto and firewall_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, null included. (#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 $ref parameters, and hides request_id by name. Before, it
    ignored every $ref parameter. (#10)