Skip to content

v0.2.1 — PFE + batch tools

Choose a tag to compare

@fastrevmd-lab fastrevmd-lab released this 06 May 01:00

Sub-project #3 follow-up to v0.2.0. Two new MCP tools and an independent PFE blocklist list. Stdio + remote transport + auth paths unchanged from v0.2.0.

Highlights

  • execute_junos_pfe_command — single PFE-shell call against an explicit FPC target. Wraps as request pfe execute target <fpc> command "<cmd>". Rejects literal " in the input (JmcpError::BadPfeCommand).
  • execute_junos_command_batch — N routers x M operational CLI commands. Parallel across routers (cap = max_concurrent_routers, default 16) via tokio::sync::Semaphore + tokio::task::JoinSet. Sequential per router. Per-command command_timeout (default 360s) and optional whole-batch batch_timeout. Continue-on-error after pre-flight; per-router error rows preserve commands.len() invariant. Result order matches input.
  • Independent pfe_commands blocklist list — under _blocklist_defaults and per-device blocklist. A deny on commands does NOT gate PFE and vice versa. See devices-template.json.

Architecture notes

  • BatchRunner / RouterSession traits (via async-trait) provide a testing seam — production runner wraps rustez::Device; tests use a stub.
  • batch_timeout wraps the JoinSet collect future and synthesizes "batch timeout" rows for routers that didn't report.
  • KNOWN_TOOLS (rust-junosmcp-auth) extended with the two new names. Token files referencing them load only on a 0.2.1+ binary; older binaries reject the file at parse time.

Gating order (unchanged from v0.2.0)

transport → AuthLayer → CallerCtx → tool scope → router scope → blocklist. For batch, router-scope is enforced in a for loop with first-failure short-circuit BEFORE any device I/O.

Install

cargo install --git https://github.com/fastrevmd-lab/RustJunosMCP --tag v0.2.1

Or build from source — see README.md. Docker tag is now 0.2; LXC tarball is rust-junosmcp_0.2.1_amd64.tar.gz.

Plan & spec

  • Spec: docs/superpowers/specs/2026-05-05-pfe-batch-design.md
  • Plan: docs/superpowers/plans/2026-05-05-pfe-batch.md (17 tasks, all complete)
  • PR: #5

Diff

v0.2.0...v0.2.1. 177 tests passing / 7 ignored (real-device, gated on JMCP_TEST_HOST/USER/PASS and JMCP_TEST_FPC).