|
Server : Apache System : Linux s1230 5.15.0-139-generic #149~20.04.1 SMP Tue Jul 14 11:21:49 UTC 2026 x86_64 User : p141464 ( 418825) PHP Version : 7.4.33.12 Disable Function : NONE Directory : /html/relaunch-kmu/wp-content/plugins/imagify/classes/Abilities/ |
Upload File : |
<?php
declare(strict_types=1);
namespace Imagify\Abilities;
/**
* Contract for MCP abilities that spend Imagify quota.
*
* Implementing this interface opts an ability into
* `AbstractAbility::guard_credit_confirmation()`, the shared pre-flight
* quota/confirmation gate.
*
* @since 2.4.0
*/
interface CreditConsumingAbilityInterface {
/**
* Returns a small associative array describing what the call is about to do.
*
* Used by `AbstractAbility::guard_credit_confirmation()` to build the
* `confirmation_required` response so the caller/AI can see the impact
* before confirming.
*
* @param array $args Raw input arguments passed to execute().
* @return array{unit: string, count: int, total?: int, label: string}
*/
public function get_impact_estimate( array $args ): array;
}