vmware-pilot 1.4.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.
@@ -0,0 +1,35 @@
1
+ Metadata-Version: 2.4
2
+ Name: vmware-pilot
3
+ Version: 1.4.0
4
+ Summary: VMware workflow orchestration — multi-step state machine with approval gates
5
+ Author: Wei Zhou / 周崴
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: mcp[cli]<2.0,>=1.0
9
+ Requires-Dist: pyyaml<7.0,>=6.0
10
+ Requires-Dist: vmware-policy<2.0,>=1.0.0
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest-cov<8.0,>=5.0; extra == 'dev'
13
+ Requires-Dist: pytest<10.0,>=8.0; extra == 'dev'
14
+ Requires-Dist: ruff<1.0,>=0.5; extra == 'dev'
15
+ Description-Content-Type: text/markdown
16
+
17
+ # VMware Pilot
18
+
19
+ Multi-step workflow orchestration for VMware MCP skills — state machine, approval gates, audit trail.
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ pip install vmware-pilot
25
+ ```
26
+
27
+ ## MCP Tools
28
+
29
+ | Tool | Description |
30
+ |------|-------------|
31
+ | `plan_workflow` | Generate execution plan, returns workflow_id |
32
+ | `run_workflow` | Execute workflow, pauses at approval gates |
33
+ | `get_workflow_status` | Query state + diff report + audit log |
34
+ | `approve` | Human approval, continue execution |
35
+ | `rollback` | Abort and rollback at any stage |
@@ -0,0 +1,19 @@
1
+ # VMware Pilot
2
+
3
+ Multi-step workflow orchestration for VMware MCP skills — state machine, approval gates, audit trail.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install vmware-pilot
9
+ ```
10
+
11
+ ## MCP Tools
12
+
13
+ | Tool | Description |
14
+ |------|-------------|
15
+ | `plan_workflow` | Generate execution plan, returns workflow_id |
16
+ | `run_workflow` | Execute workflow, pauses at approval gates |
17
+ | `get_workflow_status` | Query state + diff report + audit log |
18
+ | `approve` | Human approval, continue execution |
19
+ | `rollback` | Abort and rollback at any stage |
@@ -0,0 +1,168 @@
1
+ # Aria vs Pilot: Boundary Definition
2
+
3
+ This document defines the responsibility boundaries between the VMware skill family members, ensuring no duplication of capabilities and clear guidance on when to use which skill.
4
+
5
+ ---
6
+
7
+ ## Role Separation
8
+
9
+ The VMware skill family follows a **Eyes / Brain / Hands** model:
10
+
11
+ | Skill | Role | Responsibility | Tool Count |
12
+ |---|---|---|---|
13
+ | **vmware-aria** | Eyes | Monitoring, alerts, capacity planning, anomaly detection | 27 read-heavy MCP tools |
14
+ | **vmware-pilot** | Brain | Workflow orchestration, state machine, approval gates | 5 MCP tools |
15
+ | **vmware-aiops** | Hands | VM lifecycle, deployment, clusters, guest operations | 34 MCP tools |
16
+
17
+ ### vmware-aria (Eyes)
18
+
19
+ Aria is the **observability layer**. It answers questions about what is happening right now, what happened in the past, and what is likely to happen based on trends.
20
+
21
+ - Real-time and historical metrics (CPU, memory, storage, network)
22
+ - Alert retrieval and acknowledgement
23
+ - Capacity overview and runway forecasting
24
+ - Anomaly detection and health scoring
25
+ - Resource contention analysis
26
+
27
+ Aria tools are predominantly **read-only**. The only write operations are alert management actions (acknowledge, suspend) which do not change infrastructure state.
28
+
29
+ ### vmware-pilot (Brain)
30
+
31
+ Pilot is the **orchestration layer**. It coordinates multi-step operations that require sequencing, state tracking, conditional logic, and human approval gates.
32
+
33
+ - Workflow template instantiation and execution
34
+ - State machine management (pending, approved, running, completed, failed, rolled-back)
35
+ - Approval gate enforcement (no step proceeds without explicit approval)
36
+ - Rollback coordination on failure
37
+ - Cross-skill delegation (pilot calls aria, aiops, vks, nsx -- never VMware APIs directly)
38
+
39
+ Pilot tools are **coordination-only**. They contain zero VMware API calls. Every infrastructure action is delegated to the appropriate skill.
40
+
41
+ ### vmware-aiops (Hands)
42
+
43
+ AIOps is the **execution layer**. It performs atomic, single-step operations against vCenter and ESXi infrastructure.
44
+
45
+ - VM lifecycle: create, clone, delete, power on/off, suspend, reset
46
+ - VM reconfiguration: CPU, memory, disk, network
47
+ - Snapshot management: create, revert, delete
48
+ - Migration: vMotion, Storage vMotion
49
+ - Guest operations: file transfer, process execution
50
+ - Cluster and host management
51
+
52
+ AIOps tools are **imperative and atomic**. Each tool does one thing. Multi-step sequences are the responsibility of pilot.
53
+
54
+ ---
55
+
56
+ ## When to Use Which
57
+
58
+ | Scenario | Use | Why |
59
+ |---|---|---|
60
+ | "Check if cluster has capacity" | **aria** | Read-only monitoring query |
61
+ | "Clone VM, test changes, then apply to prod" | **pilot** | Multi-step workflow with approval gates |
62
+ | "Power on a VM" | **aiops** | Single atomic operation |
63
+ | "Alert triggered, diagnose and fix" | **pilot** (incident_response template) | Multi-step workflow: diagnose via aria, remediate via aiops, verify via aria |
64
+ | "Get resource health score" | **aria** | Monitoring data retrieval |
65
+ | "Scale TKC cluster" | **vks** | Single atomic operation against Tanzu |
66
+ | "Show me CPU trends for the last 7 days" | **aria** | Historical metric analysis |
67
+ | "Create a firewall rule" | **nsx-security** | Single atomic network security operation |
68
+ | "Migrate VM to another host" | **aiops** | Single atomic vMotion operation |
69
+ | "Rolling upgrade across 10 VMs" | **pilot** (rolling_update template) | Multi-step with sequencing, health checks, and rollback |
70
+ | "Check if VM has high memory usage" | **aria** | Real-time metric query |
71
+ | "Snapshot VM, patch OS, verify, delete snapshot" | **pilot** (maintenance_window template) | Multi-step with state tracking and rollback on failure |
72
+
73
+ ### Decision Flowchart
74
+
75
+ ```
76
+ Is this a single, atomic operation?
77
+ |
78
+ +-- YES --> Use the appropriate skill directly:
79
+ | - Infrastructure state change --> aiops
80
+ | - Monitoring / metrics / alerts --> aria
81
+ | - Network config --> nsx / nsx-security
82
+ | - Tanzu / Kubernetes --> vks
83
+ | - Storage --> storage
84
+ |
85
+ +-- NO (multiple steps, conditions, approvals)
86
+ |
87
+ +--> Use pilot
88
+ pilot delegates each step to the appropriate skill
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Pilot Uses Aria as Data Source
94
+
95
+ Pilot workflows routinely include steps that call aria tools to gather context before making decisions or verifying outcomes. This is by design.
96
+
97
+ ### Examples of Aria Calls Within Pilot Workflows
98
+
99
+ 1. **Pre-check**: Before a maintenance window, pilot calls `aria.get_capacity_overview` to confirm the cluster can absorb the workload shift.
100
+ 2. **Diagnosis**: In an incident response workflow, pilot calls `aria.get_alarms` and `aria.get_anomalies` to identify root cause before selecting a remediation path.
101
+ 3. **Post-verification**: After a migration, pilot calls `aria.get_resource_health` to confirm the VM is healthy in its new location.
102
+
103
+ ### What Pilot Does NOT Do
104
+
105
+ - Pilot does **not** duplicate aria's monitoring capabilities. It does not store metrics, compute health scores, or manage alert state.
106
+ - Pilot does **not** re-implement any monitoring logic. If aria exposes a tool for a monitoring task, pilot calls that tool.
107
+ - If Aria gains workflow features in the future (e.g., vRealize Automation / vRealize Orchestrator integration), pilot calls those features via the aria skill rather than re-implementing them.
108
+
109
+ ---
110
+
111
+ ## Key Rules
112
+
113
+ ### Rule 1: Single Operation = Direct Skill Call
114
+
115
+ If the task is a single, self-contained operation with no dependencies on other steps, call the appropriate skill directly. Do not wrap a single operation in a pilot workflow.
116
+
117
+ ```
118
+ # Correct: single operation, call aiops directly
119
+ aiops.vm_power_on(vm_name="web-prod-01")
120
+
121
+ # Wrong: unnecessary pilot wrapper for a single step
122
+ pilot.run_workflow(template="power_on", targets=["web-prod-01"])
123
+ ```
124
+
125
+ ### Rule 2: Multiple Steps with State/Approval = Pilot
126
+
127
+ If the task involves two or more steps where the outcome of one step affects the next, or where human approval is required between steps, use pilot.
128
+
129
+ ```
130
+ # Correct: multi-step with approval
131
+ pilot.run_workflow(
132
+ template="maintenance_window",
133
+ targets=["db-prod-01"],
134
+ steps=["snapshot", "patch", "verify", "cleanup"],
135
+ require_approval=["patch"]
136
+ )
137
+ ```
138
+
139
+ ### Rule 3: Pilot Never Calls VMware APIs Directly
140
+
141
+ Pilot is a pure orchestrator. It has zero VMware SDK imports, zero vCenter connections, and zero direct API calls. Every infrastructure interaction is delegated to a skill (aiops, aria, vks, nsx, nsx-security, storage).
142
+
143
+ This separation ensures:
144
+ - **Testability**: Pilot logic can be tested with mocked skill responses.
145
+ - **Single responsibility**: API compatibility changes only affect the skill that owns the API.
146
+ - **Auditability**: Every action pilot takes is visible as a skill tool call with parameters.
147
+
148
+ ### Rule 4: Aria Owns All Monitoring State
149
+
150
+ If you need to know the current state of any VMware resource (health, metrics, alerts, capacity), the answer comes from aria. No other skill maintains monitoring state or computes health scores.
151
+
152
+ ### Rule 5: Skills Are Composable, Not Hierarchical
153
+
154
+ Pilot can call any skill, but skills do not call each other. The dependency graph is flat:
155
+
156
+ ```
157
+ pilot --> aria
158
+ pilot --> aiops
159
+ pilot --> vks
160
+ pilot --> nsx
161
+ pilot --> nsx-security
162
+ pilot --> storage
163
+
164
+ aria -/-> aiops (skills do not call each other)
165
+ aiops -/-> aria (skills do not call each other)
166
+ ```
167
+
168
+ The only exception is pilot itself, which exists specifically to compose skills into workflows.
File without changes