Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "model-serving-minefield",
"owner": {
"name": "Blackwellboy",
"url": "https://github.com/Blackwellboy"
},
"metadata": {
"description": "Diagnose local LLM serving traps (vLLM, llama.cpp, Ollama, SGLang, MLX) from a symptom, your config files, or a live endpoint."
},
"plugins": [
{
"name": "minefield",
"source": "./",
"description": "Model Serving Minefield: the trap-registry skill plus the read-only minefield MCP server (symptom search, file scan, Doctor report interpretation). Runs the server with uvx, so nothing to install.",
"category": "debugging",
"keywords": ["llm-serving", "vllm", "llama.cpp", "ollama", "sglang", "diagnostics", "mcp"]
}
]
}
19 changes: 19 additions & 0 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "minefield",
"description": "Model Serving Minefield: the trap-registry skill plus the read-only minefield MCP server for diagnosing local LLM serving failures.",
"version": "0.2.2",
"author": {
"name": "Blackwellboy",
"url": "https://github.com/Blackwellboy"
},
"homepage": "https://github.com/Blackwellboy/model-serving-minefield",
"repository": "https://github.com/Blackwellboy/model-serving-minefield",
"license": "MIT",
"keywords": ["llm-serving", "vllm", "llama.cpp", "ollama", "sglang", "diagnostics", "mcp"],
"mcpServers": {
"minefield": {
"command": "uvx",
"args": ["--from", "model-serving-minefield>=0.2.2,<0.3", "minefield-mcp"]
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ hosts.yml
*credentials*.json
*cookies*.txt
*cookies*.json
*.egg-info/
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ CLI/MCP surface or the docs adds an entry at the top of this file, under a
pull request that changes those paths without touching this file; label it
`no-changelog` for a change nobody would look for here (typo, CI-only).

## 2026-12-04 - one command for anything, honest exit codes, `uvx msmf`

- `minefield <anything>`: an endpoint URL (`http://...` or `host:port`) and/or files that exist and look like paths now route to `minefield diagnose` in lite mode (at most 5 live requests), with any remaining words as the symptom. Plain words still go to `guide`, and a bare word is never taken as a path, so `minefield logs are empty` is unchanged. In a terminal the routed command is printed to stderr.
- `diagnose` exits **3** when an endpoint was supplied but could not be reached, and the text view now says "Could not reach URL: nothing was tested live" with what to check. It used to exit 0 with "No canonical trap rose to the candidate list", which reads like a clean run. `--fail-on-problem` (opt-in, for CI) exits 1 when a live probe reports a PROBLEM; file and symptom leads never change the exit code.
- `diagnose` reads the endpoint key from `MINEFIELD_API_KEY` when `--api-key` is not given, so it stays out of shell history and `ps`. `OPENAI_API_KEY` is deliberately not read: that would send a cloud key to whatever local URL was typed.
- `minefield --version` prints the package version and trap count (it used to be parsed as `guide --version` and fail).
- The no-match hint suggests `minefield http://HOST:PORT/v1` (5 requests) instead of `quick` (the full Doctor).
- Alias package `msmf` 0.1.1 adds an `msmf` executable, so `uvx msmf ...` and `pipx run msmf ...` work. Needs publishing to take effect.
- [MCP setup](docs/MCP_SETUP.md) opens with a zero-install `uvx --from model-serving-minefield minefield-mcp` config that works in any MCP client.
- The repository is now a Claude Code plugin marketplace (`.claude-plugin/marketplace.json` and `plugin.json`): `claude plugin install minefield@model-serving-minefield` installs the existing skill plus the MCP server run through `uvx`. Checked with `claude plugin validate .` and a real install into an empty config, where the server reported Connected.
- Registry count and Doctor coverage are unchanged.

## 2026-11-22 - secret scan on new commits, ignore rules for weights and secrets

- CI gains a `secret-scan` job: gitleaks (checksum-pinned binary, values redacted) scans only the commits in each push or pull request. `.gitleaks.toml` allowlists known fake-credential fixtures.
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ minefield streaming shows blank replies --stack vllm

(From a clone instead: `python -m pip install .`)

**One command for anything.** Give it a URL, files, a symptom, or all three:
`minefield http://HOST:PORT/v1` runs a live check of at most 5 requests,
`minefield ./start.sh ./logs/` scans files, and words are a symptom lookup. With
nothing installed: `uvx msmf http://HOST:PORT/v1`. See the
[CLI reference](docs/CLI_REFERENCE.md#one-command).

Not sure where to start? Run `minefield` on its own for a numbered menu of
everything it can do. Each option says what it touches (nothing, files you
name, or a set number of requests to your endpoint) before it runs.
Expand Down Expand Up @@ -119,6 +125,10 @@ minefield quick --base-url http://HOST:PORT/v1 --json doctor.json
plugin and type `/minefield` for the menu; the skill and MCP server also work.
See [Hermes setup](docs/HERMES_SETUP.md).

**Claude Code user:** `/plugin marketplace add Blackwellboy/model-serving-minefield`,
then `/plugin install minefield@model-serving-minefield`. You get the skill and
the MCP server (run through `uvx`, nothing else to install).

**MCP user:** run `minefield-mcp` over stdio. It exposes search,
report-interpretation, reproduction-plan, explicit-file inspection and a
`list_menu` tool (the same numbered menu as the CLI);
Expand Down Expand Up @@ -424,7 +434,7 @@ against 70 of this registry's 168 entries in under a minute:

```bash
curl -sO https://raw.githubusercontent.com/Blackwellboy/model-serving-minefield/main/doctor/minefield_doctor.py
python3 minefield_doctor.py --base-url http://localhost:8000/v1
python3 minefield_doctor.py --base-url http://HOST:PORT/v1
```

Read-only and bounded: GET probes plus at most 12 small temperature-0
Expand Down
8 changes: 4 additions & 4 deletions dist/MANIFEST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ dist/MINEFIELD_AGENT_BUNDLE.md 709206 0e595e0c1f91dbf5e4fbd5ce7f6eb7987ee4564c39
dist/MINEFIELD_AGENT_BUNDLE_LITE.md 156835 479b8d1c35f13b7442f91f51acec9d1c096ead2f999722a378091a0766e6096d
dist/MINEFIELD_REGISTRY.json 820767 f3c1ff8b3d0d773a8667af1c23ef4bdc357ca153a0a1987da29743946e4b4013
dist/MINEFIELD_REGISTRY.min.json 718403 713947fe9c2f9a8b8a12be7e4ccdd23866e87b34663529c48f838a02c8afb111
docs/CLI_REFERENCE.md 8803 9d3e62fbec78a92b7744bb3824015e8943d8e316c43f169de5558f77de6f1db5
docs/CLI_REFERENCE.md 10564 a8e160435f2c6e519cd7fadd3cc1c01b79e7e2dfb9b546b0b7121cc2bff33164
docs/DIAGNOSIS_CONTRACT.md 3240 b08dafb0891190efeae60d67f92c93ff23c03f0b95a29c6d37f5b661c14ec622
docs/DIAGNOSTIC_COVERAGE.md 1586 7845ecf742e55cf13e0092fec7ba4a1cc997acdc5ca458048771c4cf24cc3086
docs/GITHUB_ACTION_SCAN.md 5744 e188b0b2e6f5b3875cc90aee1369c81fd2d136b5028232ac6c157cc41f7e8a5c
docs/HERMES_SETUP.md 3085 3672ac7d84c0913d3adabf1a54ddb1e174da0a8dbc5e339e522c1bccf87d3079
docs/LIBRARY_API.md 5419 211dc4034ecbb16e5a4ec11947a23b414dac7ad154c8f65f299cb3a1b1e90c56
docs/LIVE_MODEL_QUALIFICATION.md 8508 a6ce0d86b0d5fb5ca8cf06449d1ee1e10b2afab38d89d290747e0bea5498299a
docs/MCP_SETUP.md 1997 3298738be9cb90e9f2115f7d8d9feb641d7e32cd805b0c15b5001d59a9a6e177
docs/MCP_SETUP.md 3277 ba42be23da52e41e3ff60e317ef84f492d063ecfd0de51afc68f6b4ac15dd9ad
docs/PRIVACY_AND_SAFETY.md 912 e464c950efea90364eb1e0efe0ff9ebc7bc43aee128d582447371d0d56435825
docs/PRODUCT_ARCHITECTURE.md 2372 a06a93801fc63c3b7310b31210e9be4a788a36a369d1cced75f86514c09a22f9
docs/PRODUCT_BASELINE_20260730.md 3603 6a2059518021beae13ec0ef2aaf781b297a00261f94afb2d1869796bce62c8a2
Expand All @@ -30,7 +30,7 @@ minefield/__init__.py 713 e3ba29028534134b43175244e02985622db2e69319a50d2e810dbf
minefield/__main__.py 48 935a1c1166b0c1ea35a82256345000bf2c73ded718d77773bc27a71ecce28f7d
minefield/api.py 22140 bf2857b416d9b34e5c3d049048c643c915a1c756f6f6006a07e9cfd1a47958f1
minefield/blind_review.py 4241 6faf73dca9601b3acf0129489bcf12c0b74af28d0bf05774723feca7c0870f77
minefield/cli.py 24005 25bf9d312b8e5bc3fc461ea2d2dfdec8ccb210a0215b4fe6f1c40cb74d856808
minefield/cli.py 27956 681973d992b1f2408990034fd6f84646a3cb44e89d533b0ae72cc8fed0ea4320
minefield/context_lookup.py 3042 79ce2b28920ce334d825a0d941700454536b3af397bade9c86fc5940ed18c41b
minefield/coverage.py 5887 5c390e719aad6254b1958a640a32e2ac50ba91587d6a3cf288f4f8db1dbebb1f
minefield/data/UNVERIFIED_LEADS.json 71896 7458344b8d12b0424d9ac06210969aff591b147f54478313cbde7c0ed1ff955e
Expand All @@ -52,7 +52,7 @@ minefield/probe_options.py 2597 011ad8a1994b41b58a668e06d4c7436f95126c2c05e649ac
minefield/promotion_receipt.py 4382 8ac3f106755ad8cbcce1685dc290fa058db481aceb5890f3bfb79daa5a797d44
minefield/redaction.py 5487 4d9b98facb54a20a7b29611e19bf4d851890c12a5f64f6a1999c2566f086ef9f
minefield/registry.py 12154 71cb91ee90f698e8513c928f13f398ecf2389cb897f54e55fe3314ab25ba5f16
minefield/render.py 12820 178cb4d567f94b69df0468ec9d8393f544bcbc54f133a59df6c6105240778b18
minefield/render.py 13214 f810167857a935e5ebf28606647f197b0c4dae3e10686039434718ea568a8a96
minefield/results_inspector.py 17621 7bc02c411e40bd60ca8bb1b8ed1b48a75d0a8d18b2746023ddc3f052fa23b362
minefield/safe_template.py 7329 9f69a574d6b7ec850ce1b4a1987b8a3afdb80912783af9e132be4df54b572d62
minefield/scan.py 19569 f90a4c73fc735beebfc1b67c434d53b7897f01dcc9cf0ed61577d8b7ced567a7
Expand Down
10 changes: 5 additions & 5 deletions dist/SHA256SUMS
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
116e76f24d684efeff14c25c50e737917224597915829f25c1cfddb3138031a1 AGENT_START_HERE.md
3ff80219826911232226f354a3e4de1a4f6486eedf6fb88b49fb77c05f611a90 CORE.md
ac430a54ea5acbd012e891098a18a262701f6346a29fff27f325b4d8e4f47a0c MANIFEST.txt
bcc571f7d07f8cc247db02438ade6bbe821d5f2538961c92378c6b820084d98b MANIFEST.txt
5dbe60c30e78d106825bc8102d785625d11153445a1d8a0639a6668e25ea11f9 MINEFIELD_AGENT_BUNDLE.json
0e595e0c1f91dbf5e4fbd5ce7f6eb7987ee4564c393fec26e2ce54f65ee359ab MINEFIELD_AGENT_BUNDLE.md
479b8d1c35f13b7442f91f51acec9d1c096ead2f999722a378091a0766e6096d MINEFIELD_AGENT_BUNDLE_LITE.md
f3c1ff8b3d0d773a8667af1c23ef4bdc357ca153a0a1987da29743946e4b4013 MINEFIELD_REGISTRY.json
713947fe9c2f9a8b8a12be7e4ccdd23866e87b34663529c48f838a02c8afb111 MINEFIELD_REGISTRY.min.json
9d3e62fbec78a92b7744bb3824015e8943d8e316c43f169de5558f77de6f1db5 docs/CLI_REFERENCE.md
a8e160435f2c6e519cd7fadd3cc1c01b79e7e2dfb9b546b0b7121cc2bff33164 docs/CLI_REFERENCE.md
b08dafb0891190efeae60d67f92c93ff23c03f0b95a29c6d37f5b661c14ec622 docs/DIAGNOSIS_CONTRACT.md
7845ecf742e55cf13e0092fec7ba4a1cc997acdc5ca458048771c4cf24cc3086 docs/DIAGNOSTIC_COVERAGE.md
e188b0b2e6f5b3875cc90aee1369c81fd2d136b5028232ac6c157cc41f7e8a5c docs/GITHUB_ACTION_SCAN.md
3672ac7d84c0913d3adabf1a54ddb1e174da0a8dbc5e339e522c1bccf87d3079 docs/HERMES_SETUP.md
211dc4034ecbb16e5a4ec11947a23b414dac7ad154c8f65f299cb3a1b1e90c56 docs/LIBRARY_API.md
a6ce0d86b0d5fb5ca8cf06449d1ee1e10b2afab38d89d290747e0bea5498299a docs/LIVE_MODEL_QUALIFICATION.md
3298738be9cb90e9f2115f7d8d9feb641d7e32cd805b0c15b5001d59a9a6e177 docs/MCP_SETUP.md
ba42be23da52e41e3ff60e317ef84f492d063ecfd0de51afc68f6b4ac15dd9ad docs/MCP_SETUP.md
e464c950efea90364eb1e0efe0ff9ebc7bc43aee128d582447371d0d56435825 docs/PRIVACY_AND_SAFETY.md
a06a93801fc63c3b7310b31210e9be4a788a36a369d1cced75f86514c09a22f9 docs/PRODUCT_ARCHITECTURE.md
6a2059518021beae13ec0ef2aaf781b297a00261f94afb2d1869796bce62c8a2 docs/PRODUCT_BASELINE_20260730.md
Expand All @@ -30,7 +30,7 @@ e3ba29028534134b43175244e02985622db2e69319a50d2e810dbf154b807dad minefield/__in
935a1c1166b0c1ea35a82256345000bf2c73ded718d77773bc27a71ecce28f7d minefield/__main__.py
bf2857b416d9b34e5c3d049048c643c915a1c756f6f6006a07e9cfd1a47958f1 minefield/api.py
6faf73dca9601b3acf0129489bcf12c0b74af28d0bf05774723feca7c0870f77 minefield/blind_review.py
25bf9d312b8e5bc3fc461ea2d2dfdec8ccb210a0215b4fe6f1c40cb74d856808 minefield/cli.py
681973d992b1f2408990034fd6f84646a3cb44e89d533b0ae72cc8fed0ea4320 minefield/cli.py
79ce2b28920ce334d825a0d941700454536b3af397bade9c86fc5940ed18c41b minefield/context_lookup.py
5c390e719aad6254b1958a640a32e2ac50ba91587d6a3cf288f4f8db1dbebb1f minefield/coverage.py
7458344b8d12b0424d9ac06210969aff591b147f54478313cbde7c0ed1ff955e minefield/data/UNVERIFIED_LEADS.json
Expand All @@ -52,7 +52,7 @@ c573be23c18571f4f6f11f72be220c75a925b33efd23fec96bb94288e9b5c6e7 minefield/mode
8ac3f106755ad8cbcce1685dc290fa058db481aceb5890f3bfb79daa5a797d44 minefield/promotion_receipt.py
4d9b98facb54a20a7b29611e19bf4d851890c12a5f64f6a1999c2566f086ef9f minefield/redaction.py
71cb91ee90f698e8513c928f13f398ecf2389cb897f54e55fe3314ab25ba5f16 minefield/registry.py
178cb4d567f94b69df0468ec9d8393f544bcbc54f133a59df6c6105240778b18 minefield/render.py
f810167857a935e5ebf28606647f197b0c4dae3e10686039434718ea568a8a96 minefield/render.py
7bc02c411e40bd60ca8bb1b8ed1b48a75d0a8d18b2746023ddc3f052fa23b362 minefield/results_inspector.py
9f69a574d6b7ec850ce1b4a1987b8a3afdb80912783af9e132be4df54b572d62 minefield/safe_template.py
f90a4c73fc735beebfc1b67c434d53b7897f01dcc9cf0ed61577d8b7ced567a7 minefield/scan.py
Expand Down
Binary file modified dist/model-serving-minefield-agent-pack.zip
Binary file not shown.
37 changes: 35 additions & 2 deletions docs/CLI_REFERENCE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,39 @@
# CLI reference

## One command

Give `minefield` whatever you have. It works out what each argument is:

```bash
minefield http://HOST:PORT/v1 # live check, at most 5 requests
minefield HOST:PORT # same; http:// is added
minefield ./start.sh docker-compose.yml # offline scan of those files
minefield streaming replies are blank # symptom lookup
minefield HOST:PORT ./start.sh tool calls come back as text # all three at once
uvx msmf http://HOST:PORT/v1 # the same, with nothing installed
```

A URL (`http://`, `https://`, or `host:port`) becomes `--base-url`. An argument
that exists on disk **and** looks like a path (contains `/` or `.`) is scanned:
write `./logs`, not `logs`, so `minefield logs are empty` stays a symptom. Any
URL or path routes to `minefield diagnose` in lite mode (the full command is
printed to stderr in a terminal); plain words go to `minefield guide`.

Exit codes for `diagnose` (and so for the one-command form): `0` it ran, read
the result; `3` an endpoint was given but could not be reached, so nothing was
tested live; `2` bad input or no named file could be read; `1` a live probe
reported a PROBLEM, **only** with `--fail-on-problem` (for CI). File and symptom
matches are leads and never change the exit code. The API key is read from
`MINEFIELD_API_KEY` when `--api-key` is not given, so it stays out of shell
history and the process list. `minefield --version` prints the package version
and the number of traps it ships.

## Every command

```text
minefield quick --base-url URL [doctor options]
minefield [URL] [PATH...] [SYMPTOM...] (one command; see above)
minefield --version
minefield quick --base-url URL [doctor options] (full Doctor, dozens of requests)
minefield inspect-config FILE... --allowed-root ROOT [--allowed-root ROOT...]
minefield inspect-logs FILE... --allowed-root ROOT [--allowed-root ROOT...]
minefield SYMPTOM... (shorthand for `minefield guide`)
Expand All @@ -10,7 +42,8 @@ minefield guide SYMPTOM... [--stack STACK] [--model MODEL] [--version VERSION]
[--log EXCERPT] [--limit N] [--text | --json]
minefield diagnose [SYMPTOM...] [--files PATH...] [--base-url URL]
[--stack STACK] [--model MODEL] [--version VERSION]
[--mode lite|doctor] [--max-requests N] [--probe ID] [--text | --json]
[--mode lite|doctor] [--max-requests N] [--probe ID]
[--api-key KEY | env MINEFIELD_API_KEY] [--fail-on-problem] [--text | --json]
minefield bundle [--config FILE] [--log FILE] [--doctor-report FILE]
[--output ZIP] [--no-write]
minefield coverage [--json]
Expand Down
41 changes: 39 additions & 2 deletions docs/MCP_SETUP.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
# MCP setup

Install the Python package first:
## Any MCP client, nothing to install

If the client can run `uvx` (from [uv](https://docs.astral.sh/uv/)), point it at
the published package and skip the install step:

```json
{
"mcpServers": {
"minefield": {
"command": "uvx",
"args": ["--from", "model-serving-minefield", "minefield-mcp"]
}
}
}
```

That JSON shape works in Claude Desktop, Cursor, Windsurf, Cline and most other
clients. One-liners: `claude mcp add minefield -- uvx --from model-serving-minefield minefield-mcp`,
`codex mcp add minefield -- uvx --from model-serving-minefield minefield-mcp`,
`hermes mcp add minefield --command uvx --args --from model-serving-minefield minefield-mcp`
(check `hermes mcp add --help` on your version for the argument syntax).

## Installed package

Or install the Python package first:

```bash
python -m pip install .
Expand Down Expand Up @@ -60,7 +84,20 @@ Place this in `.cursor/mcp.json` for project scope:

## Claude Code and Claude Desktop

Claude Code:
Claude Code, as a plugin (the skill and the MCP server together; the server runs
through `uvx`):

```bash
claude plugin marketplace add Blackwellboy/model-serving-minefield
claude plugin install minefield@model-serving-minefield
```

The plugin is this repository itself (`.claude-plugin/`), so an install copies
the whole tree, about 36 MB, and the agent can read every trap file offline.
Bump `version` in `.claude-plugin/plugin.json` with each release so installed
copies update.

Claude Code, MCP server only:

```bash
claude mcp add minefield -- minefield-mcp
Expand Down
Loading
Loading