vmware-debug 2.0.0__py3-none-any.whl → 2.2.0__py3-none-any.whl

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/__init__.py CHANGED
@@ -6,4 +6,4 @@ remediation to vmware-aiops / vmware-pilot. Never writes to any VMware system
6
6
  and never executes fixes; its only writes go to the local case ledger.
7
7
  """
8
8
 
9
- __version__ = "2.0.0"
9
+ __version__ = "2.2.0"
vmware_debug/cli.py CHANGED
@@ -104,11 +104,44 @@ def triage(
104
104
 
105
105
  @app.command()
106
106
  @cli_local("starts the MCP server; its tools audit themselves")
107
- def mcp() -> None:
108
- """Start the stdio MCP server (no network access; proxy-safe)."""
107
+ def mcp(
108
+ expose: Optional[str] = typer.Option(
109
+ None,
110
+ "--expose",
111
+ help="Which tools to offer: all (default) or read. Limits what clients see; "
112
+ "not authorization: the account's permissions still decide.",
113
+ ),
114
+ allow_write: Optional[str] = typer.Option(
115
+ None,
116
+ "--allow-write",
117
+ help="With --expose read: comma-separated write tools to offer as well.",
118
+ ),
119
+ transport: Optional[str] = typer.Option(
120
+ None,
121
+ "--transport",
122
+ help="stdio (default), https, or http (loopback only, behind a TLS reverse proxy). "
123
+ "https/http need a token: 'vmware-audit token create NAME'.",
124
+ ),
125
+ host: Optional[str] = typer.Option(None, "--host", help="Bind address (default 127.0.0.1)."),
126
+ port: Optional[int] = typer.Option(None, "--port", help="Port (default 8443)."),
127
+ cert: Optional[str] = typer.Option(None, "--cert", help="TLS certificate (PEM) for https."),
128
+ key: Optional[str] = typer.Option(None, "--key", help="TLS private key (PEM) for https."),
129
+ public_name: Optional[str] = typer.Option(
130
+ None,
131
+ "--public-name",
132
+ help="Host names clients use, comma-separated; other Host/Origin values are refused.",
133
+ ),
134
+ token_file: Optional[str] = typer.Option(
135
+ None, "--token-file", help="Token hash file (default $OPS_HOME/mcp-tokens)."
136
+ ),
137
+ ) -> None:
138
+ """Start the MCP server: stdio by default (proxy-safe), or --transport https."""
109
139
  from vmware_debug.mcp_server.server import main as _main
110
140
 
111
- _main()
141
+ _main(
142
+ expose=expose, allow_write=allow_write, transport=transport, host=host, port=port,
143
+ cert=cert, key=key, public_name=public_name, token_file=token_file,
144
+ )
112
145
 
113
146
 
114
147
  if __name__ == "__main__":
@@ -862,7 +862,17 @@ def build_server() -> FastMCP:
862
862
 
863
863
 
864
864
  return server
865
- def main() -> None:
865
+ def main(
866
+ expose: Optional[str] = None,
867
+ allow_write: Optional[str] = None,
868
+ transport: Optional[str] = None,
869
+ host: Optional[str] = None,
870
+ port: Optional[int] = None,
871
+ cert: Optional[str] = None,
872
+ key: Optional[str] = None,
873
+ public_name: Optional[str] = None,
874
+ token_file: Optional[str] = None,
875
+ ) -> None:
866
876
  """Entry point for `vmware-debug-mcp` (stdio transport)."""
867
877
  # Floor is 3.10, matching `requires-python` and the other eleven skills.
868
878
  # This guard used to demand 3.11 on the grounds that FastMCP schema
@@ -878,7 +888,14 @@ def main() -> None:
878
888
  "Reinstall on a newer interpreter: "
879
889
  "uv tool install --python 3.12 --force vmware-debug"
880
890
  )
881
- build_server().run()
891
+ from vmware_policy.serve import run_server
892
+ server = build_server()
893
+ run_server(
894
+ server,
895
+ skill="debug",
896
+ expose=expose, allow_write=allow_write, transport=transport, host=host, port=port,
897
+ cert=cert, key=key, public_name=public_name, token_file=token_file,
898
+ )
882
899
 
883
900
 
884
901
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vmware-debug
3
- Version: 2.0.0
3
+ Version: 2.2.0
4
4
  Summary: VMware diagnostic brain — offline incident triage, log/event correlation, and root-cause routing across the VMware skill family
5
5
  Project-URL: Homepage, https://github.com/vmware-skills/VMware-Debug
6
6
  Project-URL: Repository, https://github.com/vmware-skills/VMware-Debug
@@ -14,11 +14,11 @@ Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Programming Language :: Python :: 3
15
15
  Classifier: Topic :: System :: Monitoring
16
16
  Requires-Python: >=3.10
17
- Requires-Dist: mcp[cli]<2.0,>=1.10
17
+ Requires-Dist: mcp[cli]<2.0,>=1.28
18
18
  Requires-Dist: pyyaml<7.0,>=6.0
19
19
  Requires-Dist: rich<15.0,>=13.0
20
20
  Requires-Dist: typer<1.0,>=0.12
21
- Requires-Dist: vmware-policy<2.0,>=1.18.1
21
+ Requires-Dist: vmware-policy<2.0,>=1.21.0
22
22
  Description-Content-Type: text/markdown
23
23
 
24
24
  <!-- mcp-name: io.github.vmware-skills/vmware-debug -->
@@ -52,6 +52,23 @@ renames widened), and vmware-pilot ≥ 1.13 translates old names in saved workfl
52
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
53
  against both the old and the new name, so one file serves both.
54
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
+
55
72
  ## MCP tools (14 — 7 read, 7 write)
56
73
 
57
74
  The seven writes go to the local case ledger only; none reaches a VMware system.
@@ -80,6 +97,26 @@ The seven writes go to the local case ledger only; none reaches a VMware system.
80
97
  | `grade_case` | [WRITE] Recompute the conclusion grade from the ledger and record it |
81
98
  | `close_case` | [WRITE] Record the final grade, archive, and name what was left open |
82
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
+
83
120
  ## Offline / Air-Gapped Install (from source)
84
121
 
85
122
  This project uses the modern PEP 517 build system (hatchling), so there is **no
@@ -1,10 +1,10 @@
1
- vmware_debug/__init__.py,sha256=HgXmztN-9zVLKmVLLP8tSY-KkzK36Q6VDV9yurnx8ws,376
2
- vmware_debug/cli.py,sha256=MCreiUBS1x2Ne5cZXuafLHrjThSdkL7GqeREhfVWXV8,4135
1
+ vmware_debug/__init__.py,sha256=JjgubSbR8Xhn-i8kk8lV2EtYQxwqZUwSAQqxyW3k46o,376
2
+ vmware_debug/cli.py,sha256=nho92ORzfyqEPPvnFWuAY3J5uyWpVdzx5kAd7DPmbcA,5690
3
3
  vmware_debug/envelope.py,sha256=66AQzI_h4JoopUcFxHvqaFe48rYRZz0uX9Wdm5lDcuI,11235
4
4
  vmware_debug/mcp/__init__.py,sha256=isuSzMWp1iXgJWGz2Q0JyUXlDTfcFfHNPSTHALuNHaA,220
5
5
  vmware_debug/mcp/tools.py,sha256=TcWywxro1zqGYFmJC8NUgxb7DMyGpSQbZusJrHzqnGI,2796
6
6
  vmware_debug/mcp_server/__init__.py,sha256=QZpQxriDdqDCYaS-HP7McsaPbTPbHwcamIwu-7UxY-E,49
7
- vmware_debug/mcp_server/server.py,sha256=LhBuwoon-IlGOMj71mK0-M6rzbaP4wMUkUlwqYWXWa8,46786
7
+ vmware_debug/mcp_server/server.py,sha256=uz4BnW-6Zu7G4fYYffT6B5cfOQ7xVFDzLWsmpASTrfc,47379
8
8
  vmware_debug/ops/__init__.py,sha256=Co9u0zZexST7-IOUBOAS5eq5RHkaEeI2FqfYijzhI1g,46
9
9
  vmware_debug/ops/skill_names.py,sha256=JkBaKBJYyq0RrEqzro-e-zhSVh7Cn5wlxjAoakgXSyY,3990
10
10
  vmware_debug/ops/timeline.py,sha256=GzafF7jkEfa6cr3H2wO0At7fZEBdn_9m9_0Omh7faTs,27556
@@ -25,7 +25,7 @@ vmware_debug/ops/cases/store.py,sha256=dIgdAR111_gDoZ4rYbTtccuiaQVdksMCDoZOHKmbW
25
25
  vmware_debug/ops/cases/timeline.py,sha256=WbJg2xUrqyHxMERBFYA-tgU9Mmy67whH9GGh96R8ifk,7843
26
26
  vmware_debug/rules/evidence_sources.yaml,sha256=w8YOdUtKw-oi-t9c5ePJaktx7CwZlfFinH8aQAQfhzo,11387
27
27
  vmware_debug/rules/grading_rules.yaml,sha256=USCp7D2geU_CZgscvo8GMHEHZPgqbzbjqE-qwWG3QtA,3261
28
- vmware_debug-2.0.0.dist-info/METADATA,sha256=7SkPIgndd2IACxjSgv_hfox9iSg6Y_BG2z0sCMJgn30,5877
29
- vmware_debug-2.0.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
30
- vmware_debug-2.0.0.dist-info/entry_points.txt,sha256=4d14JRHy0ouSOfCJyczaxUFH6p8AsHZNS19AKom0v4c,109
31
- vmware_debug-2.0.0.dist-info/RECORD,,
28
+ vmware_debug-2.2.0.dist-info/METADATA,sha256=HCpMz0WTX-CNGVrBN0YmFA3M6IANeTRMH7fRJFyAPVM,8059
29
+ vmware_debug-2.2.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
30
+ vmware_debug-2.2.0.dist-info/entry_points.txt,sha256=4d14JRHy0ouSOfCJyczaxUFH6p8AsHZNS19AKom0v4c,109
31
+ vmware_debug-2.2.0.dist-info/RECORD,,