Skip to content

Commit a57f1b7

Browse files
author
Paul C
committed
fix: AI can now exec on Proxmox nodes (they have WolfStack agents)
Removed the node_type != "proxmox" filter from AI chat cluster_nodes, so [EXEC_ALL] reaches ALL online nodes including Proxmox ones. Updated system prompt to correctly state Proxmox nodes have agents and can be targeted with commands.
1 parent dbf7397 commit a57f1b7

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

src/ai/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,15 +1384,15 @@ fn build_system_prompt(knowledge: &str, server_context: &str) -> String {
13841384
- Keep commands simple and focused\n\
13851385
- When showing results from [EXEC_ALL], clearly label which node each result came from\n\n\
13861386
## Cluster Topology\n\
1387-
- All WolfStack nodes are **equal peers** — do NOT label any node as 'main', 'primary', or 'secondary'\n\
1388-
- Each node runs whatever Wolf components it needs; not all nodes run the same services\n\
1389-
- Do NOT assume a service should be running on a node just because it runs on others\n\
1390-
- [EXEC_ALL] only targets WolfStack nodes, NOT Proxmox nodes\n\n\
1387+
- All nodes are **equal peers** — do NOT label any node as 'main', 'primary', or 'secondary'\n\
1388+
- Each node runs whatever components it needs; not all nodes run the same services\n\
1389+
- Some nodes also run Proxmox VE — they are full WolfStack nodes AND Proxmox hypervisors\n\
1390+
- [EXEC_ALL] targets ALL online nodes including Proxmox nodes (they all have WolfStack agents)\n\
1391+
- Do NOT assume a service should be running on a node just because it runs on others\n\n\
13911392
## Proxmox Nodes\n\
1392-
- Proxmox nodes are **monitored but not managed** — you can see their metrics, VM/CT counts, and status\n\
1393-
- You CANNOT execute commands on Proxmox nodes (they don't run WolfStack agents)\n\
1394-
- For Proxmox node issues (high CPU, high memory), use the metrics data provided below — you cannot SSH or exec into them\n\
1395-
- When a user asks about a Proxmox node, answer from the metrics/VM/CT data, and explain you cannot run commands on it\n\
1393+
- Proxmox nodes have WolfStack agents — you CAN execute commands on them via [EXEC_ALL]\n\
1394+
- They appear in both the WolfStack node list and as Proxmox hypervisors\n\
1395+
- Proxmox data (VM/CT counts, per-guest CPU) is shown in the server state below\n\
13961396
- When reporting on the full infrastructure, include Proxmox node health data (CPU, RAM, disk)\n\n\
13971397
## Proposed Actions (Fix It)\n\
13981398
When you identify a problem and know how to fix it, propose the fix using ACTION tags.\n\

src/api/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5133,13 +5133,12 @@ pub async fn ai_chat(
51335133
};
51345134

51355135
// Build cluster node list for remote command execution
5136+
// Include ALL online nodes (including Proxmox nodes that have WolfStack agents)
51365137
let cluster_nodes: Vec<(String, String, String, String)> = {
51375138
let nodes = state.cluster.get_all_nodes();
51385139
nodes.iter()
5139-
.filter(|n| !n.is_self && n.online && n.node_type != "proxmox")
5140+
.filter(|n| !n.is_self && n.online)
51405141
.map(|n| {
5141-
// When TLS is enabled, main port serves HTTPS; inter-node HTTP is on port+1.
5142-
// Try port+1 first (works for HTTPS nodes), fall back to original port (HTTP-only).
51435142
let url1 = format!("http://{}:{}", n.address, n.port + 1);
51445143
let url2 = format!("http://{}:{}", n.address, n.port);
51455144
(n.id.clone(), n.hostname.clone(), url1, url2)

0 commit comments

Comments
 (0)