ai_agents_test-1.0.0-alpha1/src/AgentsParameterTestInterface.php
src/AgentsParameterTestInterface.php
<?php
declare(strict_types=1);
namespace Drupal\ai_agents_test;
use Drupal\ai\Service\FunctionCalling\ExecutableFunctionCallInterface;
/**
* Interface for agents_parameter_test plugins.
*/
interface AgentsParameterTestInterface {
/**
* Returns the translated plugin label.
*/
public function label(): string;
/**
* Runs the test.
*
* @param Drupal\ai\Service\FunctionCalling\ExecutableFunctionCallInterface $tool
* The tool to run the test on.
* @param array $values
* All the values keyed by the parameter name.
* @param string $parameter_name
* The name of the parameter to test.
* @param array $rule
* The rule to test against, which may include a 'value' key.
* @param string $tool_name
* The name of the tool being tested.
*/
public function runTest(ExecutableFunctionCallInterface $tool, array $values, string $parameter_name, array $rule, string $tool_name): void;
/**
* Returns the possible errors for the test.
*
* @return array
* An array of possible errors.
*/
public function getErrors(): array;
/**
* Returns the details for the test.
*
* @return array
* An array of details.
*/
public function getDetails(): array;
/**
* Returns the status of the test.
*
* @return bool
* TRUE if the test passed, FALSE otherwise.
*/
public function getStatus(): bool;
}
