Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(lume): show provisioning status in lume get and improve MCP docs (#853)

Francesco Bonaccia6566d66e82b
diff --git a/docs/content/docs/lume/guide/advanced/mcp-server.mdx b/docs/content/docs/lume/guide/advanced/mcp-server.mdx
index 2d11a625d9..e521f64626 100644
--- a/docs/content/docs/lume/guide/advanced/mcp-server.mdx
+++ b/docs/content/docs/lume/guide/advanced/mcp-server.mdx
@@ -29,13 +29,28 @@ Lume supports the [Model Context Protocol (MCP)](https://modelcontextprotocol.io
### 1. Configure Claude Desktop
-Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
+Run this command to automatically configure Claude Desktop:
+
+```bash
+mkdir -p ~/Library/Application\ Support/Claude && cat > ~/Library/Application\ Support/Claude/claude_desktop_config.json << EOF
+{
+ "mcpServers": {
+ "lume": {
+ "command": "$(which lume)",
+ "args": ["serve", "--mcp"]
+ }
+ }
+}
+EOF
+```
+
+Or manually edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"lume": {
- "command": "lume",
+ "command": "/Users/yourname/.local/bin/lume",
"args": ["serve", "--mcp"]
}
}
@@ -43,7 +58,7 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
```
<Callout type="info">
-If `lume` isn't in your PATH, use the full path: `/Users/yourname/.local/bin/lume`
+If editing manually, replace `/Users/yourname/.local/bin/lume` with the actual path to your lume binary. You can find it by running `which lume` in your terminal.
</Callout>
### 2. Restart Claude Desktop
diff --git a/libs/lume/src/Commands/Get.swift b/libs/lume/src/Commands/Get.swift
index aad561364e..13638a28a4 100644
--- a/libs/lume/src/Commands/Get.swift
+++ b/libs/lume/src/Commands/Get.swift
@@ -21,7 +21,7 @@ struct Get: AsyncParsableCommand {
@MainActor
func run() async throws {
let vmController = LumeController()
- let vm = try vmController.get(name: name, storage: storage)
- try VMDetailsPrinter.printStatus([vm.details], format: self.format)
+ let vmDetails = try vmController.getDetails(name: name, storage: storage)
+ try VMDetailsPrinter.printStatus([vmDetails], format: self.format)
}
}
diff --git a/libs/lume/src/LumeController.swift b/libs/lume/src/LumeController.swift
index a5c6c9fdee..c6881ff39c 100644
--- a/libs/lume/src/LumeController.swift
+++ b/libs/lume/src/LumeController.swift
@@ -343,6 +343,49 @@ final class LumeController {
}
}
+ /// Gets VM details using the lightweight path (includes provisioning status)
+ /// Use this instead of get().details when you need accurate status including provisioning state
+ @MainActor
+ public func getDetails(name: String, storage: String? = nil) throws -> VMDetails {
+ let normalizedName = normalizeVMName(name: name)
+ do {
+ let vmDir: VMDirectory
+ let locationName: String
+
+ if let storagePath = storage, storagePath.contains("/") || storagePath.contains("\\") {
+ // Storage is a direct path
+ vmDir = try home.getVMDirectoryFromPath(normalizedName, storagePath: storagePath)
+ guard vmDir.initialized() else {
+ if vmDir.exists() {
+ throw VMError.notInitialized(normalizedName)
+ } else {
+ throw VMError.notFound(normalizedName)
+ }
+ }
+ locationName = storagePath
+ } else {
+ // Storage is nil or a named location - find the VM
+ let actualLocation = try self.validateVMExists(normalizedName, storage: storage)
+ vmDir = try home.getVMDirectory(normalizedName, storage: actualLocation)
+ locationName = actualLocation ?? "home"
+ }
+
+ // Use the lightweight path that includes provisioning status
+ guard let details = getVMDetailsLightweight(vmDir: vmDir, locationName: locationName) else {
+ throw VMError.notFound(normalizedName)
+ }
+ return details
+ } catch {
+ Logger.error(
+ "Failed to get VM details",
+ metadata: [
+ "vmName": normalizedName, "storage": storage ?? "home",
+ "error": error.localizedDescription,
+ ])
+ throw error
+ }
+ }
+
@MainActor
public func create(
name: String,