vmware-debug 1.13.2__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/.claude-plugin/plugin.json +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/.mcp.json +1 -1
- vmware_debug-2.1.0/PKG-INFO +150 -0
- vmware_debug-2.1.0/README-CN.md +107 -0
- vmware_debug-2.1.0/README.md +127 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/RELEASE_NOTES.md +56 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/openclaw.plugin.json +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/package.json +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/pyproject.toml +2 -2
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/server.json +2 -2
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/skills/vmware-debug/SKILL.md +37 -37
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/skills/vmware-debug/references/agent-guardrails.md +4 -4
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/skills/vmware-debug/references/capabilities.md +2 -2
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/skills/vmware-debug/references/cli-reference.md +4 -4
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/skills/vmware-debug/references/event-envelope.md +4 -4
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/skills/vmware-debug/references/routing.md +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/skills/vmware-debug/references/setup-guide.md +31 -6
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/capability/_family.py +86 -69
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/capability/_scores.json +30 -30
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/capability/_skill.py +3 -3
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/capability/test_entity_reachability.py +2 -2
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_case_id_non_ascii.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_case_plan_max_steps.py +23 -23
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_classification_against_vsphere_vocabulary.py +2 -2
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_debug_regressions.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_environment_resolver_isolation.py +3 -3
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_every_tool_parameter_is_documented.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_evidence_payload_contract.py +8 -8
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_real_alert_titles_classify.py +6 -6
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_skill_name_aliases.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_tool_annotations.py +7 -7
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_grading_per_hypothesis.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_hypotheses.py +2 -2
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_ids.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_ledger_concurrency.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_plan.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_readiness.py +2 -2
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_store.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_timeline_close.py +2 -2
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_tools.py +24 -24
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_mcp_audit.py +38 -38
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_safe_error_passthrough.py +11 -11
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/uv.lock +5 -5
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/__init__.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/cli.py +18 -6
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/envelope.py +6 -6
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/mcp/tools.py +27 -27
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/mcp_server/server.py +92 -88
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/api.py +6 -6
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/evidence.py +2 -2
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/grading.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/hypotheses.py +5 -5
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/ids.py +5 -5
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/payloads.py +8 -8
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/plan.py +7 -7
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/readiness.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/store.py +6 -6
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/timeline.py +3 -3
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/skill_names.py +1 -1
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/timeline.py +6 -6
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/rules/evidence_sources.yaml +22 -22
- vmware_debug-1.13.2/PKG-INFO +0 -103
- vmware_debug-1.13.2/README-CN.md +0 -72
- vmware_debug-1.13.2/README.md +0 -80
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/.clawhubignore +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/.gitignore +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/SECURITY.md +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/docs/plans/2026-08-28-investigation-layer-design.md +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/__init__.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/conftest.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/__init__.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/capability/__init__.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/capability/_scoring.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/capability/conftest.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/capability/test_error_actionability.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/capability/test_tool_description_quality.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/capability/test_tool_manifest_budget.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/__init__.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/_vsphere_event_vocabulary.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_audit_isolation.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_capability_grader.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_host_lifecycle_classification.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_investigation_metrics.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_result_envelope.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/eval/regression/test_spike_resolution.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_conclusion.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_evidence.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_case_grading.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_knowledge.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/tests/test_timeline.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/mcp/__init__.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/mcp_server/__init__.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/__init__.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/__init__.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/conclusion.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/knowledge.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/model.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/ops/cases/sources.py +0 -0
- {vmware_debug-1.13.2 → vmware_debug-2.1.0}/vmware_debug/rules/grading_rules.yaml +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
|
|
3
3
|
"name": "vmware-debug",
|
|
4
4
|
"displayName": "VMware Debug",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "2.1.0",
|
|
6
6
|
"description": "VMware incident timeline, root-cause routing, local case ledger; no vSphere access. 14 MCP tools.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Wei Zhou",
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: vmware-debug
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Summary: VMware diagnostic brain — offline incident triage, log/event correlation, and root-cause routing across the VMware skill family
|
|
5
|
+
Project-URL: Homepage, https://github.com/vmware-skills/VMware-Debug
|
|
6
|
+
Project-URL: Repository, https://github.com/vmware-skills/VMware-Debug
|
|
7
|
+
Project-URL: Issues, https://github.com/vmware-skills/VMware-Debug/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/vmware-skills/VMware-Debug/blob/main/RELEASE_NOTES.md
|
|
9
|
+
Author-email: Wei Zhou <wei-wz.zhou@broadcom.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
Keywords: ai-ops,debug,diagnostics,mcp,rca,troubleshooting,vmware,vsphere
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: System :: Monitoring
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Requires-Dist: mcp[cli]<2.0,>=1.10
|
|
18
|
+
Requires-Dist: pyyaml<7.0,>=6.0
|
|
19
|
+
Requires-Dist: rich<15.0,>=13.0
|
|
20
|
+
Requires-Dist: typer<1.0,>=0.12
|
|
21
|
+
Requires-Dist: vmware-policy<2.0,>=1.20.0
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
<!-- mcp-name: io.github.vmware-skills/vmware-debug -->
|
|
25
|
+
|
|
26
|
+
# VMware Debug
|
|
27
|
+
|
|
28
|
+
> **Disclaimer**: Community-maintained open-source project, **not affiliated with,
|
|
29
|
+
> endorsed by, or sponsored by VMware, Inc. or Broadcom Inc.** "VMware" and
|
|
30
|
+
> "vSphere" are trademarks of Broadcom. Source is publicly auditable under the MIT
|
|
31
|
+
> license.
|
|
32
|
+
|
|
33
|
+
The diagnostic brain of the VMware skill family. You bring the symptom (an error,
|
|
34
|
+
a log dump, a slow VM); this skill runs a systematic investigation, correlates
|
|
35
|
+
events from the other skills into one timeline, ranks root-cause hypotheses, and
|
|
36
|
+
tells you what to check next. It **never touches vSphere** — it connects to
|
|
37
|
+
nothing and never executes fixes; its only writes are to a local case ledger
|
|
38
|
+
under `$OPS_HOME`. Remediation is routed to `vmware-aiops` (single op) or
|
|
39
|
+
`vmware-pilot` (multi-step, gated), mirroring the `vmware-harden → vmware-pilot`
|
|
40
|
+
advisor/executor split.
|
|
41
|
+
|
|
42
|
+
See [`skills/vmware-debug/SKILL.md`](skills/vmware-debug/SKILL.md) for the full
|
|
43
|
+
methodology, the event-envelope contract, and symptom routing.
|
|
44
|
+
|
|
45
|
+
## Upgrading to 2.0
|
|
46
|
+
|
|
47
|
+
2.0 renames 13 of its 14 MCP tools so every name starts with a verb (e.g. `case_close` → `close_case`, `case_get` → `get_case`, `case_grade` → `grade_case`). The full old → new table is in
|
|
48
|
+
[RELEASE_NOTES.md](RELEASE_NOTES.md#v200--mcp-tools-renamed-verb-first). Nothing else changes: same tools, parameters,
|
|
49
|
+
safety gates and CLI commands. If an agent prompt, script or `~/.vmware/rules.yaml` names a tool, update it — though deny
|
|
50
|
+
rules written with the old names keep working with vmware-policy ≥ 1.18.1 (`vmware-audit policy` lists any rule the
|
|
51
|
+
renames widened), and vmware-pilot ≥ 1.13 translates old names in saved workflows.
|
|
52
|
+
If an install older than 2.0 shares that `rules.yaml`, give it vmware-policy ≥ 1.18.2 too: it matches each rule
|
|
53
|
+
against both the old and the new name, so one file serves both.
|
|
54
|
+
|
|
55
|
+
## Companion Skills
|
|
56
|
+
|
|
57
|
+
| Need | Skill |
|
|
58
|
+
|---|---|
|
|
59
|
+
| Incident correlation / root cause | **vmware-debug** (this project) |
|
|
60
|
+
| Centralized log search | vmware-log-insight (feed its `search_logs` results here) |
|
|
61
|
+
| vCenter events and alarms | vmware-monitor |
|
|
62
|
+
| Metrics / anomalies | vmware-aria |
|
|
63
|
+
| Executing a fix | vmware-aiops (single op) / vmware-pilot (multi-step, gated) |
|
|
64
|
+
|
|
65
|
+
## Install
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
uv tool install vmware-debug
|
|
69
|
+
vmware-debug categories # see which symptom categories it can diagnose
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## MCP tools (14 — 7 read, 7 write)
|
|
73
|
+
|
|
74
|
+
The seven writes go to the local case ledger only; none reaches a VMware system.
|
|
75
|
+
|
|
76
|
+
**Correlation** — stateless, for a single look:
|
|
77
|
+
|
|
78
|
+
| Tool | What |
|
|
79
|
+
|---|---|
|
|
80
|
+
| `build_incident_timeline` | [READ] Correlate pre-fetched events → timeline + spikes + ranked hypotheses + next-check ideas |
|
|
81
|
+
| `list_symptom_categories` | [READ] List recognised symptom categories + what to check for each |
|
|
82
|
+
|
|
83
|
+
**Investigation ledger** — for an incident you will reason about over time:
|
|
84
|
+
|
|
85
|
+
| Tool | What |
|
|
86
|
+
|---|---|
|
|
87
|
+
| `open_case` | [WRITE] Define the event; returns a case id and the grade this environment can reach |
|
|
88
|
+
| `get_case_readiness` | [READ] What grade this environment can reach, per symptom category, **before** you start |
|
|
89
|
+
| `get_case_knowledge` | [READ] Which knowledge formats are accepted, what is mounted, and which entries apply to a case |
|
|
90
|
+
| `plan_case` | [READ] What to fetch next — skill, tool and purpose per step; recomputed from the case's current state |
|
|
91
|
+
| `list_cases` | [READ] Cases, newest first |
|
|
92
|
+
| `get_case` | [READ] One case: scope, ledger sizes, grade history |
|
|
93
|
+
| `record_case_hypothesis` | [WRITE] Register a candidate explanation, or read the ledger of what supports and refutes each |
|
|
94
|
+
| `submit_case_evidence` | [WRITE] Record one retrieved fact, with its source, query and time basis |
|
|
95
|
+
| `record_case_gap` | [WRITE] Record what could **not** be retrieved, and how to close it |
|
|
96
|
+
| `record_case_timeline` | [WRITE] Correlate everything the case has collected into one timeline |
|
|
97
|
+
| `grade_case` | [WRITE] Recompute the conclusion grade from the ledger and record it |
|
|
98
|
+
| `close_case` | [WRITE] Record the final grade, archive, and name what was left open |
|
|
99
|
+
|
|
100
|
+
**Event envelope**: `{ts, source, severity, entity, text, fields}`. The agent normalizes events from each source
|
|
101
|
+
into this shape before handing them to debug, so debug has zero runtime dependency on the other packages.
|
|
102
|
+
**Keep each event's `event_type` in `fields`** — the classifier matches it as well as the text, and most modern
|
|
103
|
+
vSphere events are `EventEx`: the text is a generic boilerplate sentence, and only `eventTypeId` says what the
|
|
104
|
+
event actually is.
|
|
105
|
+
|
|
106
|
+
## Security
|
|
107
|
+
|
|
108
|
+
Offline and credential-free by construction: it connects to no vCenter/NSX/Aria, has no destructive surface on
|
|
109
|
+
VMware, and holds no secret to leak. The only writes are the local case ledger: evidence, gaps, hypotheses and
|
|
110
|
+
grade history are append-only; `timeline.md` is regenerated from the evidence, and `case.json` holds the current
|
|
111
|
+
grade and status. The same holds with several writers: every write to a case first takes that case's lock file
|
|
112
|
+
(`.ledger.lock`, exclusive create), so two processes writing the same case in a shared `$OPS_HOME` are serialized
|
|
113
|
+
instead of dropping each other's entries; every file is written under a temporary name and then moved into place,
|
|
114
|
+
so a reader never sees a half-written file (on a file system without hard links, a new evidence file is instead
|
|
115
|
+
created in place: still never overwritten, but it can be read half-written). A lock left behind by a crashed
|
|
116
|
+
process is reported together with its holder and never deleted automatically; delete it by hand once you have
|
|
117
|
+
confirmed no process is writing that case. Released versions 1.11.3 and earlier do not take this lock, so every
|
|
118
|
+
machine sharing a case directory must upgrade. See [SECURITY.md](SECURITY.md).
|
|
119
|
+
|
|
120
|
+
## Offline / Air-Gapped Install (from source)
|
|
121
|
+
|
|
122
|
+
This project uses the modern PEP 517 build system (hatchling), so there is **no
|
|
123
|
+
`setup.py`** by design — that is expected, not a missing file. If you cloned the
|
|
124
|
+
source and hit `ERROR: File "setup.py" or "setup.cfg" not found ... editable mode
|
|
125
|
+
currently requires a setuptools-based build`, your `pip` is older than 21.3 and
|
|
126
|
+
cannot do an *editable* (`-e`) install with a non-setuptools backend. Editable
|
|
127
|
+
mode is a developer convenience, not needed to run the tool — do one of:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# From the source tree — a normal (non-editable) install builds a wheel:
|
|
131
|
+
pip install . # NOT pip install -e .
|
|
132
|
+
|
|
133
|
+
# ...or upgrade pip first, and editable works too:
|
|
134
|
+
pip install --upgrade pip && pip install -e .
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
For a **truly air-gapped host**, build the wheels on a connected machine and copy
|
|
138
|
+
them over — the target then needs no network:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# On a connected machine, collect this package + its dependencies as wheels:
|
|
142
|
+
pip wheel . -w dist # → dist/*.whl (or: uv build, for just this package)
|
|
143
|
+
|
|
144
|
+
# Copy dist/ to the air-gapped host, then install offline:
|
|
145
|
+
pip install --no-index --find-links dist vmware-debug
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
MIT.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<!-- mcp-name: io.github.vmware-skills/vmware-debug -->
|
|
2
|
+
|
|
3
|
+
# VMware Debug(中文)
|
|
4
|
+
|
|
5
|
+
> **声明**:本项目为社区维护的开源项目,**与 VMware, Inc. 或 Broadcom Inc. 无任何隶属、
|
|
6
|
+
> 背书或赞助关系。** "VMware"、"vSphere" 为 Broadcom 商标。源码以 MIT 许可证公开可审计。
|
|
7
|
+
|
|
8
|
+
VMware skill 家族的**诊断大脑**。你给出症状(报错、日志、变慢的 VM),它来跑系统化排查:
|
|
9
|
+
把其它 skill 取到的事件关联成一条时间线、检测突刺、给根因假设排序,并告诉你下一步该查什么。
|
|
10
|
+
它**从不触碰 vSphere**——不连接任何东西,也从不执行修复;唯一的写入是 `$OPS_HOME` 下的本地案卷。修复一律路由给 vmware-aiops(单步)或
|
|
11
|
+
vmware-pilot(多步、带审批门控),完全复刻 vmware-harden → vmware-pilot 的「顾问/执行」分工。
|
|
12
|
+
|
|
13
|
+
完整的方法论、事件信封约定和症状路由见 [`skills/vmware-debug/SKILL.md`](skills/vmware-debug/SKILL.md)。
|
|
14
|
+
|
|
15
|
+
## 升级到 2.0
|
|
16
|
+
|
|
17
|
+
2.0 把 14 个 MCP 工具中的 13 个改成动词在前(例如 `case_close` → `close_case`, `case_get` → `get_case`, `case_grade` → `grade_case`),完整的新旧名对照表见
|
|
18
|
+
[RELEASE_NOTES.md](RELEASE_NOTES.md#v200--mcp-tools-renamed-verb-first)。其他都不变:工具、参数、安全确认门和 CLI 命令都一样。
|
|
19
|
+
如果 agent 提示词、脚本或 `~/.vmware/rules.yaml` 里写了工具名,请改成新名——不过用旧名写的 deny 规则在
|
|
20
|
+
vmware-policy ≥ 1.18.1 下仍然生效(`vmware-audit policy` 会列出因改名而多匹配的规则),vmware-pilot ≥ 1.13 也会自动转换已保存工作流里的旧名。
|
|
21
|
+
如果还有 2.0 之前的安装共用这个 `rules.yaml`,请把它的 vmware-policy 也升到 ≥ 1.18.2:它会按新旧两个名字匹配每条规则,一份文件两边都管用。
|
|
22
|
+
|
|
23
|
+
## 配套 Skill
|
|
24
|
+
|
|
25
|
+
| 需求 | Skill |
|
|
26
|
+
|---|---|
|
|
27
|
+
| 故障关联 / 根因 | **vmware-debug**(本项目) |
|
|
28
|
+
| 集中日志检索 | vmware-log-insight(把 `search_logs` 结果喂给它) |
|
|
29
|
+
| vCenter 事件与告警 | vmware-monitor |
|
|
30
|
+
| 指标 / 异常 | vmware-aria |
|
|
31
|
+
| 执行修复 | vmware-aiops(单步)/ vmware-pilot(多步门控) |
|
|
32
|
+
|
|
33
|
+
## 安装
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
uv tool install vmware-debug
|
|
37
|
+
vmware-debug categories # 看它能诊断哪些症状类别
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## MCP 工具(14 个:7 读、7 写)
|
|
41
|
+
|
|
42
|
+
7 个写工具只写本地案卷,没有一个触及任何 VMware 系统。
|
|
43
|
+
|
|
44
|
+
**关联**——无状态,看一眼用:
|
|
45
|
+
|
|
46
|
+
- `build_incident_timeline`:[READ] 把已取到的事件关联成 时间线 + 突刺 + 排序后的根因假设 + 下一步检查建议
|
|
47
|
+
- `list_symptom_categories`:[READ] 列出能识别的症状类别 + 每类该查什么
|
|
48
|
+
|
|
49
|
+
**调查案卷**——需要持续推理的事件:
|
|
50
|
+
|
|
51
|
+
- `open_case`:[WRITE] 定义事件;返回案卷 id 和本环境能达到的结论等级
|
|
52
|
+
- `get_case_readiness`:[READ] 开始**之前**,按症状类别说明本环境能达到的等级
|
|
53
|
+
- `get_case_knowledge`:[READ] 接受哪些知识格式、挂载了什么、哪些条目适用于某个案卷
|
|
54
|
+
- `plan_case`:[READ] 下一步该取什么——每步给出 skill、工具和目的;按案卷当前状态重算
|
|
55
|
+
- `list_cases`:[READ] 案卷列表,最新的在前
|
|
56
|
+
- `get_case`:[READ] 单个案卷:范围、账本大小、等级历史
|
|
57
|
+
- `record_case_hypothesis`:[WRITE] 登记一个候选解释,或读取各假设的支持/反驳账本
|
|
58
|
+
- `submit_case_evidence`:[WRITE] 记录一条取到的事实,连同来源、查询和时间基准
|
|
59
|
+
- `record_case_gap`:[WRITE] 记录**没能**取到的东西,以及如何补上
|
|
60
|
+
- `record_case_timeline`:[WRITE] 把案卷收集到的一切关联成一条时间线
|
|
61
|
+
- `grade_case`:[WRITE] 从账本重算结论等级并记录
|
|
62
|
+
- `close_case`:[WRITE] 记录最终等级、归档,并写明留下了哪些未决项
|
|
63
|
+
|
|
64
|
+
**事件信封**:`{ts, source, severity, entity, text, fields}`。agent 把各源事件归一成此形状再交给
|
|
65
|
+
debug;debug 因此与其它包零运行时依赖。**请把每条事件的 `event_type` 保留在 `fields` 里**——
|
|
66
|
+
分类器除了正文之外也匹配它,而现代 vSphere 多数事件是 `EventEx`:正文是一句通用套话,
|
|
67
|
+
真正说明「这是什么事件」的只有 `eventTypeId`。
|
|
68
|
+
|
|
69
|
+
## 安全
|
|
70
|
+
|
|
71
|
+
结构上离线、无凭据:不连任何 vCenter/NSX/Aria,对 VMware 没有可破坏面,也没有秘密可泄露。
|
|
72
|
+
唯一的写入是本地案卷:证据、缺口、假设和等级历史只增不改;`timeline.md` 由证据重新生成,
|
|
73
|
+
`case.json` 保存当前等级和状态。多个写入者同样成立:每次写案卷都要先拿该案卷的锁文件(`.ledger.lock`,
|
|
74
|
+
独占创建),所以两个进程在共享的 `$OPS_HOME` 里写同一个案卷会被串行化,而不是互相丢条目;每个文件都先写到
|
|
75
|
+
临时文件名再移到位,读者不会读到写了一半的文件(在不支持硬链接的文件系统上,新的证据文件改为原地创建:
|
|
76
|
+
仍然绝不覆盖,但可能被读到写了一半)。崩溃进程留下的锁会连同持有者一起报告,从不自动删除;
|
|
77
|
+
确认没有进程在写该案卷后再手动删除。已发布的 1.11.3 及更早版本不拿这个锁,共享案卷目录的每台机器都要升级。
|
|
78
|
+
详见 [SECURITY.md](SECURITY.md)。
|
|
79
|
+
|
|
80
|
+
## 离线 / 隔离网络安装(从源码)
|
|
81
|
+
|
|
82
|
+
本项目使用现代 PEP 517 构建系统(hatchling),所以**按设计就没有 `setup.py`**——这是预期行为,不是缺文件。
|
|
83
|
+
如果你克隆了源码后遇到 `ERROR: File "setup.py" or "setup.cfg" not found ... editable mode
|
|
84
|
+
currently requires a setuptools-based build`,说明你的 `pip` 低于 21.3,无法对非 setuptools 后端做*可编辑*(`-e`)安装。
|
|
85
|
+
可编辑模式只是开发便利,运行这个工具并不需要——任选其一:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# 在源码目录里——普通(非可编辑)安装会构建 wheel:
|
|
89
|
+
pip install . # 不是 pip install -e .
|
|
90
|
+
|
|
91
|
+
# ……或者先升级 pip,可编辑安装也能用:
|
|
92
|
+
pip install --upgrade pip && pip install -e .
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
对于**真正隔离网络的主机**,在联网机器上构建 wheel 再拷过去——目标主机就不需要网络:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# 在联网机器上,把本包及其依赖收集成 wheel:
|
|
99
|
+
pip wheel . -w dist # → dist/*.whl (或:uv build,只构建本包)
|
|
100
|
+
|
|
101
|
+
# 把 dist/ 拷到隔离主机,然后离线安装:
|
|
102
|
+
pip install --no-index --find-links dist vmware-debug
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## 许可证
|
|
106
|
+
|
|
107
|
+
MIT。
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<!-- mcp-name: io.github.vmware-skills/vmware-debug -->
|
|
2
|
+
|
|
3
|
+
# VMware Debug
|
|
4
|
+
|
|
5
|
+
> **Disclaimer**: Community-maintained open-source project, **not affiliated with,
|
|
6
|
+
> endorsed by, or sponsored by VMware, Inc. or Broadcom Inc.** "VMware" and
|
|
7
|
+
> "vSphere" are trademarks of Broadcom. Source is publicly auditable under the MIT
|
|
8
|
+
> license.
|
|
9
|
+
|
|
10
|
+
The diagnostic brain of the VMware skill family. You bring the symptom (an error,
|
|
11
|
+
a log dump, a slow VM); this skill runs a systematic investigation, correlates
|
|
12
|
+
events from the other skills into one timeline, ranks root-cause hypotheses, and
|
|
13
|
+
tells you what to check next. It **never touches vSphere** — it connects to
|
|
14
|
+
nothing and never executes fixes; its only writes are to a local case ledger
|
|
15
|
+
under `$OPS_HOME`. Remediation is routed to `vmware-aiops` (single op) or
|
|
16
|
+
`vmware-pilot` (multi-step, gated), mirroring the `vmware-harden → vmware-pilot`
|
|
17
|
+
advisor/executor split.
|
|
18
|
+
|
|
19
|
+
See [`skills/vmware-debug/SKILL.md`](skills/vmware-debug/SKILL.md) for the full
|
|
20
|
+
methodology, the event-envelope contract, and symptom routing.
|
|
21
|
+
|
|
22
|
+
## Upgrading to 2.0
|
|
23
|
+
|
|
24
|
+
2.0 renames 13 of its 14 MCP tools so every name starts with a verb (e.g. `case_close` → `close_case`, `case_get` → `get_case`, `case_grade` → `grade_case`). The full old → new table is in
|
|
25
|
+
[RELEASE_NOTES.md](RELEASE_NOTES.md#v200--mcp-tools-renamed-verb-first). Nothing else changes: same tools, parameters,
|
|
26
|
+
safety gates and CLI commands. If an agent prompt, script or `~/.vmware/rules.yaml` names a tool, update it — though deny
|
|
27
|
+
rules written with the old names keep working with vmware-policy ≥ 1.18.1 (`vmware-audit policy` lists any rule the
|
|
28
|
+
renames widened), and vmware-pilot ≥ 1.13 translates old names in saved workflows.
|
|
29
|
+
If an install older than 2.0 shares that `rules.yaml`, give it vmware-policy ≥ 1.18.2 too: it matches each rule
|
|
30
|
+
against both the old and the new name, so one file serves both.
|
|
31
|
+
|
|
32
|
+
## Companion Skills
|
|
33
|
+
|
|
34
|
+
| Need | Skill |
|
|
35
|
+
|---|---|
|
|
36
|
+
| Incident correlation / root cause | **vmware-debug** (this project) |
|
|
37
|
+
| Centralized log search | vmware-log-insight (feed its `search_logs` results here) |
|
|
38
|
+
| vCenter events and alarms | vmware-monitor |
|
|
39
|
+
| Metrics / anomalies | vmware-aria |
|
|
40
|
+
| Executing a fix | vmware-aiops (single op) / vmware-pilot (multi-step, gated) |
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
uv tool install vmware-debug
|
|
46
|
+
vmware-debug categories # see which symptom categories it can diagnose
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## MCP tools (14 — 7 read, 7 write)
|
|
50
|
+
|
|
51
|
+
The seven writes go to the local case ledger only; none reaches a VMware system.
|
|
52
|
+
|
|
53
|
+
**Correlation** — stateless, for a single look:
|
|
54
|
+
|
|
55
|
+
| Tool | What |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `build_incident_timeline` | [READ] Correlate pre-fetched events → timeline + spikes + ranked hypotheses + next-check ideas |
|
|
58
|
+
| `list_symptom_categories` | [READ] List recognised symptom categories + what to check for each |
|
|
59
|
+
|
|
60
|
+
**Investigation ledger** — for an incident you will reason about over time:
|
|
61
|
+
|
|
62
|
+
| Tool | What |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `open_case` | [WRITE] Define the event; returns a case id and the grade this environment can reach |
|
|
65
|
+
| `get_case_readiness` | [READ] What grade this environment can reach, per symptom category, **before** you start |
|
|
66
|
+
| `get_case_knowledge` | [READ] Which knowledge formats are accepted, what is mounted, and which entries apply to a case |
|
|
67
|
+
| `plan_case` | [READ] What to fetch next — skill, tool and purpose per step; recomputed from the case's current state |
|
|
68
|
+
| `list_cases` | [READ] Cases, newest first |
|
|
69
|
+
| `get_case` | [READ] One case: scope, ledger sizes, grade history |
|
|
70
|
+
| `record_case_hypothesis` | [WRITE] Register a candidate explanation, or read the ledger of what supports and refutes each |
|
|
71
|
+
| `submit_case_evidence` | [WRITE] Record one retrieved fact, with its source, query and time basis |
|
|
72
|
+
| `record_case_gap` | [WRITE] Record what could **not** be retrieved, and how to close it |
|
|
73
|
+
| `record_case_timeline` | [WRITE] Correlate everything the case has collected into one timeline |
|
|
74
|
+
| `grade_case` | [WRITE] Recompute the conclusion grade from the ledger and record it |
|
|
75
|
+
| `close_case` | [WRITE] Record the final grade, archive, and name what was left open |
|
|
76
|
+
|
|
77
|
+
**Event envelope**: `{ts, source, severity, entity, text, fields}`. The agent normalizes events from each source
|
|
78
|
+
into this shape before handing them to debug, so debug has zero runtime dependency on the other packages.
|
|
79
|
+
**Keep each event's `event_type` in `fields`** — the classifier matches it as well as the text, and most modern
|
|
80
|
+
vSphere events are `EventEx`: the text is a generic boilerplate sentence, and only `eventTypeId` says what the
|
|
81
|
+
event actually is.
|
|
82
|
+
|
|
83
|
+
## Security
|
|
84
|
+
|
|
85
|
+
Offline and credential-free by construction: it connects to no vCenter/NSX/Aria, has no destructive surface on
|
|
86
|
+
VMware, and holds no secret to leak. The only writes are the local case ledger: evidence, gaps, hypotheses and
|
|
87
|
+
grade history are append-only; `timeline.md` is regenerated from the evidence, and `case.json` holds the current
|
|
88
|
+
grade and status. The same holds with several writers: every write to a case first takes that case's lock file
|
|
89
|
+
(`.ledger.lock`, exclusive create), so two processes writing the same case in a shared `$OPS_HOME` are serialized
|
|
90
|
+
instead of dropping each other's entries; every file is written under a temporary name and then moved into place,
|
|
91
|
+
so a reader never sees a half-written file (on a file system without hard links, a new evidence file is instead
|
|
92
|
+
created in place: still never overwritten, but it can be read half-written). A lock left behind by a crashed
|
|
93
|
+
process is reported together with its holder and never deleted automatically; delete it by hand once you have
|
|
94
|
+
confirmed no process is writing that case. Released versions 1.11.3 and earlier do not take this lock, so every
|
|
95
|
+
machine sharing a case directory must upgrade. See [SECURITY.md](SECURITY.md).
|
|
96
|
+
|
|
97
|
+
## Offline / Air-Gapped Install (from source)
|
|
98
|
+
|
|
99
|
+
This project uses the modern PEP 517 build system (hatchling), so there is **no
|
|
100
|
+
`setup.py`** by design — that is expected, not a missing file. If you cloned the
|
|
101
|
+
source and hit `ERROR: File "setup.py" or "setup.cfg" not found ... editable mode
|
|
102
|
+
currently requires a setuptools-based build`, your `pip` is older than 21.3 and
|
|
103
|
+
cannot do an *editable* (`-e`) install with a non-setuptools backend. Editable
|
|
104
|
+
mode is a developer convenience, not needed to run the tool — do one of:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# From the source tree — a normal (non-editable) install builds a wheel:
|
|
108
|
+
pip install . # NOT pip install -e .
|
|
109
|
+
|
|
110
|
+
# ...or upgrade pip first, and editable works too:
|
|
111
|
+
pip install --upgrade pip && pip install -e .
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
For a **truly air-gapped host**, build the wheels on a connected machine and copy
|
|
115
|
+
them over — the target then needs no network:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# On a connected machine, collect this package + its dependencies as wheels:
|
|
119
|
+
pip wheel . -w dist # → dist/*.whl (or: uv build, for just this package)
|
|
120
|
+
|
|
121
|
+
# Copy dist/ to the air-gapped host, then install offline:
|
|
122
|
+
pip install --no-index --find-links dist vmware-debug
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
MIT.
|
|
@@ -1,3 +1,59 @@
|
|
|
1
|
+
## v2.1.0 — offer only read tools, plus chosen write tools
|
|
2
|
+
|
|
3
|
+
`vmware-debug mcp` can now offer a subset of this server's tools (HLD §17 D-16, via vmware-policy 1.20.0):
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
vmware-debug mcp --expose read --allow-write close_case
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
* `--expose read` (or `VMWARE_DEBUG_MCP_EXPOSE=read`) keeps only tools annotated `readOnlyHint: true`; `--allow-write a,b`
|
|
10
|
+
(or `VMWARE_DEBUG_MCP_ALLOW_WRITE`) keeps chosen write tools on top. The default is unchanged: every tool.
|
|
11
|
+
* A bad value, or a name that is not a write tool of this server, stops the server before it serves (exit 2).
|
|
12
|
+
Flags and environment variables are not mixed; a blank flag counts as not given. Pre-2.0 names are accepted.
|
|
13
|
+
* This limits what clients are offered; it is not authorization. See "Limiting which tools are offered" in
|
|
14
|
+
`references/setup-guide.md`, which also notes that an agent with a shell can bypass MCP, so the account itself
|
|
15
|
+
must be least-privilege.
|
|
16
|
+
* Requires `vmware-policy>=1.20.0`.
|
|
17
|
+
|
|
18
|
+
## v2.0.0 — MCP tools renamed verb-first
|
|
19
|
+
|
|
20
|
+
Every MCP tool in the VMware skill family now follows one naming convention: the verb comes first
|
|
21
|
+
(`open_…`, `get_…`, `record_…`, `build_…`), followed by what it acts on. Where two skills would
|
|
22
|
+
otherwise expose the same name, the tool carries a domain word — here `case`, so the ledger tools read
|
|
23
|
+
`open_case`, `grade_case`, `record_case_gap`. 13 of this skill's 14 tools are renamed;
|
|
24
|
+
`list_symptom_categories` already led with its verb. Parameters, annotations, the `sensitive_params` /
|
|
25
|
+
`sensitive_result` declarations and behaviour are unchanged; only the names move.
|
|
26
|
+
`record_case_hypothesis` still reads the hypothesis ledger, writing nothing, when called without a
|
|
27
|
+
`statement` — its description now says so in its first sentence.
|
|
28
|
+
|
|
29
|
+
| Old name | New name |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `case_close` | `close_case` |
|
|
32
|
+
| `case_get` | `get_case` |
|
|
33
|
+
| `case_grade` | `grade_case` |
|
|
34
|
+
| `case_hypotheses` | `record_case_hypothesis` |
|
|
35
|
+
| `case_knowledge` | `get_case_knowledge` |
|
|
36
|
+
| `case_list` | `list_cases` |
|
|
37
|
+
| `case_open` | `open_case` |
|
|
38
|
+
| `case_plan` | `plan_case` |
|
|
39
|
+
| `case_readiness` | `get_case_readiness` |
|
|
40
|
+
| `case_record_gap` | `record_case_gap` |
|
|
41
|
+
| `case_submit_evidence` | `submit_case_evidence` |
|
|
42
|
+
| `case_timeline` | `record_case_timeline` |
|
|
43
|
+
| `incident_timeline` | `build_incident_timeline` |
|
|
44
|
+
|
|
45
|
+
**Sibling tools are cited by their 2.0 names.** The evidence-source catalogue
|
|
46
|
+
(`rules/evidence_sources.yaml`), the symptom routing table, `plan_case` steps, teaching errors, and the
|
|
47
|
+
docs now name the other skills' tools by their new names (`get_events` → unchanged, `log_search` →
|
|
48
|
+
`search_logs`, `vsan_health` → `get_vsan_health`, `host_investigation_bundle` → `investigate_host`, …),
|
|
49
|
+
so a plan step is a tool the 2.0 servers actually register.
|
|
50
|
+
|
|
51
|
+
**CLI commands are unchanged** (`vmware-debug triage`, `vmware-debug categories`). `triage`'s audit row
|
|
52
|
+
records its MCP twin's name, so those rows now carry `build_incident_timeline`.
|
|
53
|
+
|
|
54
|
+
**Deny rules** in `~/.vmware/rules.yaml` written with old names keep working with vmware-policy ≥ 1.18.1 (1.18.1 carries `case_timeline` → `record_case_timeline`)
|
|
55
|
+
(it matches both names); `vmware-audit policy` lists any rule that now matches more.
|
|
56
|
+
|
|
1
57
|
## v1.13.2 — auth diagnosis never reads or records a secret
|
|
2
58
|
|
|
3
59
|
Docs only; no code change.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vmware-debug"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "2.1.0"
|
|
8
8
|
description = "VMware diagnostic brain — offline incident triage, log/event correlation, and root-cause routing across the VMware skill family"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -21,7 +21,7 @@ dependencies = [
|
|
|
21
21
|
"typer>=0.12,<1.0",
|
|
22
22
|
"rich>=13.0,<15.0",
|
|
23
23
|
"mcp[cli]>=1.10,<2.0",
|
|
24
|
-
"vmware-policy>=1.
|
|
24
|
+
"vmware-policy>=1.20.0,<2.0",
|
|
25
25
|
# Imported directly by ops/cases/grading.py for the rules file. It has
|
|
26
26
|
# always arrived transitively via vmware-policy; a package should
|
|
27
27
|
# declare what it imports rather than rely on a dependency's dependency.
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"url": "https://github.com/vmware-skills/VMware-Debug",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "1.
|
|
10
|
+
"version": "2.1.0",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "pypi",
|
|
14
14
|
"identifier": "vmware-debug",
|
|
15
|
-
"version": "1.
|
|
15
|
+
"version": "2.1.0",
|
|
16
16
|
"runtimeHint": "uvx",
|
|
17
17
|
"packageArguments": [
|
|
18
18
|
{
|