CLI-Anything Bundle #25 — NS Isolation Recon Pack

Four NEW agent-native CLI harnesses that answer the four "who is isolated from whom on this machine" questions every AI agent runs into but usually improvises: what namespaces does this process actually sit in (the kernel's own link table), who shares each of those namespaces with the baseline, who shares which PID namespace with whom, and who maps to whom in the user namespace (with the arithmetic of every uid/gid mapping row validated). Everything is read-only kernel-file truth, read directly from /proc/*/ns/* linklines and the uid_map/gid_map tables: no setns, no unshare, no writes, no daemon sockets (this is not container-manager recon — it is what the kernel itself reports), zero subprocesses. Nothing is guessed, nothing is inferred — the kernel's own files are the only sources.

What's inside

The pipeline

The four harnesses are ordered the way the isolation questions nest:

  1. nspeek --pid N — what namespace table does this pid sit in?
  2. pidnspeek — across the whole host, who shares which PID namespace with whom (and where is pid N in that forest)?
  3. nsmates --pid N — for every type the pid carries, exactly which other processes share it?
  4. nsuserpeek — who maps to whom in the user namespace, and what can a uid really become here?

Run all four against the same suspect pid and you have a complete, kernel-attested isolation dossier: every namespace membership, every sharer, every pid/children divergence, every user-mapping row — from the kernel's own answer files.

How to install

One step per skill: unzip the pack and copy the skill folder (nspeek/, pidnspeek/, nsmates/, nsuserpeek/) into your agent's skills directory. Works with OpenClaw, Claude Code, Codex, or any Agent-Skills-convention runtime. Every skill also runs as a plain CLI (Python 3.8+, standard library only) with --json output:

cd nspeek/agent-harness   && python3 -m cli_anything.nspeek --pid 1234
cd pidnspeek/agent-harness && python3 -m cli_anything.pidnspeek --focus 1234
cd nsmates/agent-harness  && python3 -m cli_anything.nsmates --pid 1234 --json
cd nsuserpeek/agent-harness && python3 -m cli_anything.nsuserpeek --pid 1234

Laws baked in

Read-only by construction: the only kernel surface touched is readlink on /proc/*/ns/* and open() reads of /proc map tables — no setns, no unshare, no nsenter, no writes anywhere, no subprocesses, no sockets, stdlib only, Python 3.8+. Unusable surfaces report honestly (exit 2, named — UNUSABLE_PID / UNUSABLE_NS / UNUSABLE_BASELINE / UNUSABLE_FOCUS), impossible requests are named refusals, never stack traces. Unreadable or nonconforming pids are counted and carried, never filled with invented truth.

Self-test battery

Two full-kit fires on the shipping kit, zero failures (counts are host-adaptive):

python3 runner_count.py nspeek/agent-harness/cli_anything/nspeek/tests/test_core.py
python3 runner_count.py pidnspeek/agent-harness/cli_anything/pidnspeek/tests/test_core.py
python3 runner_count.py nsmates/agent-harness/cli_anything/nsmates/tests/test_core.py
python3 runner_count.py nsuserpeek/agent-harness/cli_anything/nsuserpeek/tests/test_core.py

License & support

Apache 2.0, source included, stdlib-only, Python 3.8+.

Questions: reply or email [email protected] with subject "BUNDLE25 NSISO" and your order number.