Skip to content

v0.2.2

Choose a tag to compare

@salatmaster salatmaster released this 07 Aug 10:11
· 1 commit to main since this release
0d26827

Two bugs where the server reported success for something it never did, both found and fixed by @dsudomoin against a Giga KN-1012 on KeeneticOS 5.1.1.

Every rci_call POST could silently do nothing

body was declared with no type in the advertised schema, so a client with nothing to go on could serialise it to a string. That string was JSON-encoded a second time on the way out, the router matched no command and answered {}: HTTP 200, no error, nothing done. save_config goes through the same path, so a save could report success having sent nothing.

The schema now describes the shape, and a body that arrives as text is decoded before it goes out. Anything that still is not a command tree is refused rather than sent.

save_config confirmed saves it never checked

unsavedChanges came from fail-safe.unsaved, which tracks the fail-safe rollback timer rather than the saved state. A real router reports it false while a change sits unsaved, so the check passed while the configuration in flash was still the old one, and a reboot would have discarded everything.

It now compares the running checksum against the one the router stamps into the startup-config header. An unreadable startup config answers unsavedChanges: null, and save_config accepts only an explicit false as confirmation, because answering "saved" on a failed read would repeat the same mistake in a new place.

The handshake reported the wrong version

Fixed by @BrainRTP: the version in serverInfo was a literal and had sat at 0.1.0 while the package shipped 0.2.1. It is read from the package at runtime now.

Releases are cut from the tag

No version is written down in the repository any more. package.json carries 0.0.0-dev and the release workflow stamps the tag into it just before publishing, so a release is a tag and nothing else. The plugin manifests carry no version at all, and the plugins pin keenetic-mcp@^0, which tracks the major only.

A checkout reports 0.0.0-dev. KEENETIC_MCP_VERSION, or a .env beside package.json, overrides that for local work.

Also

The keenetic-rci skill now documents the no syntax for deletes, which is the part of the command tree that is hardest to guess: no sits beside the arguments rather than wrapping them, and the object's own name travels in name. Confirmed on 5.1.1 and 5.1.3.

Install

Claude Code

/plugin marketplace add salatmaster/keenetic-mcp
/plugin install keenetic@keenetic
npx -y keenetic-mcp init

Codex

codex plugin marketplace add salatmaster/keenetic-mcp
codex plugin add keenetic@keenetic
npx -y keenetic-mcp init

Anything else

{ "mcpServers": { "keenetic": { "command": "npx", "args": ["-y", "keenetic-mcp"] } } }

217 tests. Notes on the API itself are in docs/rci-api.md.