Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions crates/tui/src/plugins/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2301,4 +2301,30 @@
assert!(PluginManifest::validate_from_path(&path).is_err());
}
}

#[test]
fn bundled_computer_use_plugin_validates() {
use crate::plugins::agent_plugin;
let root = PathBuf::from(concat!(
env!("CARGO_MANIFEST_DIR"),
"/../../plugins/computer-use"
));
let validated = PluginManifest::validate_from_path(&root.join("plugin.json"))
.expect("in-repo computer-use bundle must validate");
assert_eq!(validated.manifest.plugin.name, "computer-use");
assert_eq!(validated.inventory.skills, 1);
assert_eq!(validated.components.commands.len(), 1);
assert!(validated.warnings.is_empty(), "{:?}", validated.warnings);

let mcp_text = fs::read_to_string(root.join("mcp.json")).unwrap();
let servers =
agent_plugin::parse_mcp_json(&mcp_text).expect("computer-use mcp.json must parse");
let computer = servers.get("computer").expect("computer server");
assert_eq!(computer.command.as_deref(), Some("python3"));
assert!(
computer.args.iter().any(|arg| arg.ends_with("server.py")),
"{:?}",
computer.args
);
}
}
13 changes: 13 additions & 0 deletions plugins/computer-use/commands/computer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
description: Drive this machine's screen, mouse, and keyboard
usage: /computer [status|look]
---

$ARGUMENTS

- With no arguments or `status`: report whether the computer-use
plugin is usable here — server reachable, platform supported,
screen size — without taking any action.
- With `look`: take one screenshot and describe what is on screen.
- Anything else (clicking, typing, operating apps) goes through the
computer-use skill's look-act-verify loop with per-action approval.
1 change: 1 addition & 0 deletions plugins/computer-use/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mcpServers": {"computer": {"args": ["server/server.py"], "command": "python3", "cwd": ".", "type": "stdio"}}}
1 change: 1 addition & 0 deletions plugins/computer-use/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"$schema": "https://agent-plugins.org/schemas/plugin.json", "author": {"name": "codewhale"}, "description": "See the screen, click, and type: local computer use over an MCP server plus the look-act-verify skill.", "extensions": {"net.codewhale": {"capabilities": {}, "commands": {"path": "commands"}, "when": {"binaries": ["python3"], "os": ["macos", "linux"]}}}, "keywords": ["computer-use", "screenshot", "automation"], "license": "MIT", "name": "computer-use", "version": "0.1.0"}
Loading
Loading