v0.2.1 — PFE + batch tools
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 asrequest 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) viatokio::sync::Semaphore+tokio::task::JoinSet. Sequential per router. Per-commandcommand_timeout(default 360s) and optional whole-batchbatch_timeout. Continue-on-error after pre-flight; per-router error rows preservecommands.len()invariant. Result order matches input.- Independent
pfe_commandsblocklist list — under_blocklist_defaultsand per-deviceblocklist. A deny oncommandsdoes NOT gate PFE and vice versa. Seedevices-template.json.
Architecture notes
BatchRunner/RouterSessiontraits (viaasync-trait) provide a testing seam — production runner wrapsrustez::Device; tests use a stub.batch_timeoutwraps 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.1Or 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).