GravityKit\GravityMigrate\Abilities\Bundles\CancelJob
Stops the background export or import that is running.
Narrower than a state reset: it stops one job and leaves the other side's state and the bundles already written where they were.
Since: %ver%
Source: src/Abilities/Bundles/CancelJob.php:26
Details
- Kind:
class - Namespace:
GravityKit\GravityMigrate\Abilities\Bundles - Extends:
Ability
Methods
| Method | Description |
|---|---|
name() | The ability name, gk-gravitymigrate/{object}-{verb}. |
label() | The short human label, shown in Foundation's settings list. |
description() | What this ability does, written for the agent that has to choose between it and the one |
category() | The category slug, which must be one {@see Bootstrap::categories()} declares. |
input_schema() | JSON Schema for the input. |
output_schema() | JSON Schema for the output. |
annotations() | WordPress's own annotation vocabulary for this ability. |
execute() | Does the work. |
permission() | Whether this caller may run it. |
Method Reference
name()
public static function name(): string
The ability name, gk-gravitymigrate/{object}-{verb}.
Permanent once published: the MCP tool name is derived from it, so renaming one breaks every client already bound to it.
Returns
string
Since: %ver%
Source: src/Abilities/Bundles/CancelJob.php:52
label()
public static function label(): string
The short human label, shown in Foundation's settings list.
Returns
string
Since: %ver%
Source: src/Abilities/Bundles/CancelJob.php:59
description()
public static function description(): string
What this ability does, written for the agent that has to choose between it and the one
next to it. It is the only documentation an MCP client ever sees.
Returns
string
Since: %ver%
Source: src/Abilities/Bundles/CancelJob.php:66
category()
public static function category(): string
The category slug, which must be one {@see Bootstrap::categories()} declares.
Foundation derives gk_scope from the suffix, so only a gk-gravitymigrate-{scope} slug
is reachable through a cross-product scope filter.
Returns
string
Since: %ver%
Source: src/Abilities/Bundles/CancelJob.php:77
input_schema()
public static function input_schema(): array
JSON Schema for the input.
Returns
array
Since: %ver%
Source: src/Abilities/Bundles/CancelJob.php:84
output_schema()
public static function output_schema(): array
JSON Schema for the output.
Returns
array
Since: %ver%
Source: src/Abilities/Bundles/CancelJob.php:106
annotations()
public static function annotations(): array
WordPress's own annotation vocabulary for this ability.
Not destructive: cancelling removes nothing that existed before the job began -- an export cancel deletes only the unfinished export, and an import cancel stops adding. The flag is load-bearing, because the MCP client refuses every destructive tool unless GRAVITY_FORMS_ALLOW_DELETE is set. Idempotent: a second cancel leaves the same site.
Returns
array{readonly:bool,— destructive:bool, idempotent:bool}
Since: %ver%
Source: src/Abilities/Bundles/CancelJob.php:141
execute()
public static function execute( array $input )
Does the work.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | Input as received. |
Returns
array|\WP_Error
Since: %ver%
Source: src/Abilities/Bundles/CancelJob.php:156
permission()
public static function permission( array $input=[] )
Whether this caller may run it.
Answered through \GravityKit\GravityMigrate\Migration\Permission, never a bare
current_user_can(): that helper is the one gate the wizard and wp gk migrate also ask.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | [] | Input as received. |
Returns
bool|\WP_Error
Since: %ver%
Source: src/Abilities/Bundles/CancelJob.php:235