Plugin Management Abilities
Gratis AI Agent v1.5.0 ships with 7 plugin management abilities that the AI assistant can invoke during a conversation. These abilities provide programmatic control over WordPress plugins installed through the Plugin Builder & Sandbox System.
Abilities Overview
| Ability | Slug | Description |
|---|---|---|
| List Plugins | list_plugins | Returns a list of plugins in the sandbox store with their status. |
| Get Plugin | get_plugin | Retrieves metadata and source code for a specific plugin by slug. |
| Create Plugin | create_plugin | Generates a new plugin from a description and stores it in the sandbox. |
| Update Plugin | update_plugin | Replaces a plugin's source code with a new version. |
| Delete Plugin | delete_plugin | Removes a plugin from the sandbox store. Deactivates first. |
| Install Plugin | install_plugin | Deploys a sandboxed plugin to the live WordPress plugin directory. |
| Activate Plugin | activate_plugin | Activates a sandboxed plugin in the wp-env sandbox environment. |
Plugin Installer API
The plugin installer handles file system operations when deploying or removing plugins. Key behaviours:
- Path validation: All plugin paths are validated against the allowed plugin directory before any file write. Directory traversal attempts are rejected.
- Multi-file install: A plugin may consist of multiple files. The installer creates the plugin directory and writes all files atomically.
- Update: Replaces existing plugin files. Deactivates the plugin before writing to avoid partial-state errors.
- Delete by slug: Locates the plugin directory by slug, deactivates across all sites, then removes the directory.