diff --git a/README.md b/README.md index e7dabe2..98c86a5 100644 --- a/README.md +++ b/README.md @@ -244,7 +244,7 @@ LLM ← tool_calls: get_time, calculator, 6084 мс, токены 377/44 лишнего запроса к модели. ```php -use AiSdk\Tools\FinishTool; +use Rsgrinko\AiSdk\Tools\FinishTool; $agent = new Agent( client: $client, diff --git a/bootstrap.php b/bootstrap.php index ccbddb1..3a613be 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -9,11 +9,11 @@ declare(strict_types=1); * require __DIR__ . '/bootstrap.php'; */ -// Автозагрузка: AiSdk\Tools\* -> tools/, остальное AiSdk\* -> src/. +// Автозагрузка: Rsgrinko\AiSdk\Tools\* -> tools/, остальное Rsgrinko\AiSdk\* -> src/. spl_autoload_register(static function (string $class): void { $map = [ - 'AiSdk\\Tools\\' => __DIR__ . '/tools/', - 'AiSdk\\' => __DIR__ . '/src/', + 'Rsgrinko\\AiSdk\\Tools\\' => __DIR__ . '/tools/', + 'Rsgrinko\\AiSdk\\' => __DIR__ . '/src/', ]; foreach ($map as $prefix => $dir) { @@ -32,4 +32,4 @@ spl_autoload_register(static function (string $class): void { }); // .env рядом с bootstrap.php; если файла нет — работаем на значениях по умолчанию. -\AiSdk\Env::load(__DIR__ . '/.env'); +\Rsgrinko\AiSdk\Env::load(__DIR__ . '/.env'); diff --git a/docs/tools.md b/docs/tools.md index 6a027b3..83e5548 100644 --- a/docs/tools.md +++ b/docs/tools.md @@ -196,7 +196,7 @@ $tools->add(new ShellTool( `DatabaseTool` даёт модели SQL через PDO. Режим задаётся при подключении: ```php -use AiSdk\Tools\DatabaseTool; +use Rsgrinko\AiSdk\Tools\DatabaseTool; // Только чтение (по умолчанию): SELECT, SHOW, DESCRIBE, EXPLAIN, WITH. $db = DatabaseTool::mysql('127.0.0.1', 'shop', 'reader', 'secret'); @@ -251,7 +251,7 @@ MySQL ограничивает только SELECT, MariaDB — любой за Четыре метода. Всё. ```php -use AiSdk\Tool; +use Rsgrinko\AiSdk\Tool; final class DiceTool implements Tool { diff --git a/examples/01-chat.php b/examples/01-chat.php index 513f39e..caf9dae 100644 --- a/examples/01-chat.php +++ b/examples/01-chat.php @@ -14,7 +14,7 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\AiClient; +use Rsgrinko\AiSdk\AiClient; $client = AiClient::fromEnv(); diff --git a/examples/02-tools.php b/examples/02-tools.php index 57a5231..201ff4c 100644 --- a/examples/02-tools.php +++ b/examples/02-tools.php @@ -17,12 +17,12 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\TimeTool; -use AiSdk\Tools\WeatherTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\TimeTool; +use Rsgrinko\AiSdk\Tools\WeatherTool; $tools = new ToolRegistry(); $tools->add( diff --git a/examples/03-custom-tool.php b/examples/03-custom-tool.php index 774121e..42adf7f 100644 --- a/examples/03-custom-tool.php +++ b/examples/03-custom-tool.php @@ -17,10 +17,10 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\Tool; -use AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\ToolRegistry; /** * Инструмент «сведения о сервере». diff --git a/examples/04-cli.php b/examples/04-cli.php index 9a35f1d..e5e85fc 100644 --- a/examples/04-cli.php +++ b/examples/04-cli.php @@ -17,12 +17,12 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\TimeTool; -use AiSdk\Tools\WeatherTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\TimeTool; +use Rsgrinko\AiSdk\Tools\WeatherTool; $tools = (new ToolRegistry())->add( new TimeTool(), diff --git a/examples/05-settings.php b/examples/05-settings.php index a48804f..b64c2a2 100644 --- a/examples/05-settings.php +++ b/examples/05-settings.php @@ -23,11 +23,11 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\TimeTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\TimeTool; $tools = (new ToolRegistry())->add(new TimeTool(), new CalculatorTool()); $client = AiClient::fromEnv(); diff --git a/examples/06-finish.php b/examples/06-finish.php index e105b2d..baabc44 100644 --- a/examples/06-finish.php +++ b/examples/06-finish.php @@ -20,11 +20,11 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\FinishTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\FinishTool; $client = AiClient::fromEnv(); diff --git a/examples/07-tools.php b/examples/07-tools.php index 7bf984d..3ca8f54 100644 --- a/examples/07-tools.php +++ b/examples/07-tools.php @@ -17,13 +17,13 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\ConvertUnitsTool; -use AiSdk\Tools\DateCalcTool; -use AiSdk\Tools\HashTool; -use AiSdk\Tools\UuidTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\ConvertUnitsTool; +use Rsgrinko\AiSdk\Tools\DateCalcTool; +use Rsgrinko\AiSdk\Tools\HashTool; +use Rsgrinko\AiSdk\Tools\UuidTool; $tools = (new ToolRegistry())->add( new ConvertUnitsTool(), diff --git a/examples/08-shell.php b/examples/08-shell.php index d146d36..bfe2b33 100644 --- a/examples/08-shell.php +++ b/examples/08-shell.php @@ -18,7 +18,7 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Tools\ShellTool; +use Rsgrinko\AiSdk\Tools\ShellTool; // Рабочий каталог фиксируем: команда не «гуляет» по всей машине случайно. // tmpDir задаём явно: системный temp бывает недоступен в контейнерах. diff --git a/examples/09-files.php b/examples/09-files.php index da5a2da..616a350 100644 --- a/examples/09-files.php +++ b/examples/09-files.php @@ -17,16 +17,16 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\FileSandbox; -use AiSdk\Tools\FindFilesTool; -use AiSdk\Tools\ListDirTool; -use AiSdk\Tools\ReadFileTool; -use AiSdk\Tools\ReplaceInFileTool; -use AiSdk\Tools\SearchFilesTool; -use AiSdk\Tools\WriteFileTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\FileSandbox; +use Rsgrinko\AiSdk\Tools\FindFilesTool; +use Rsgrinko\AiSdk\Tools\ListDirTool; +use Rsgrinko\AiSdk\Tools\ReadFileTool; +use Rsgrinko\AiSdk\Tools\ReplaceInFileTool; +use Rsgrinko\AiSdk\Tools\SearchFilesTool; +use Rsgrinko\AiSdk\Tools\WriteFileTool; $root = __DIR__ . '/var/sandbox'; @mkdir($root . '/src', 0777, true); diff --git a/examples/10-http.php b/examples/10-http.php index 324f910..3e3f0a2 100644 --- a/examples/10-http.php +++ b/examples/10-http.php @@ -17,8 +17,8 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Tools\Support\HttpRequest; -use AiSdk\Tools\HttpRequestTool; +use Rsgrinko\AiSdk\Tools\Support\HttpRequest; +use Rsgrinko\AiSdk\Tools\HttpRequestTool; // 1. Сборка запроса — то же, что делает инструмент внутри. $request = HttpRequest::build( diff --git a/examples/11-json.php b/examples/11-json.php index ae66aa9..c0188f2 100644 --- a/examples/11-json.php +++ b/examples/11-json.php @@ -17,12 +17,12 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\ToolRegistry; -use AiSdk\Tools\ConvertUnitsTool; -use AiSdk\Tools\DateCalcTool; -use AiSdk\Tools\HashTool; -use AiSdk\Tools\JsonQueryTool; -use AiSdk\Tools\UuidTool; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\ConvertUnitsTool; +use Rsgrinko\AiSdk\Tools\DateCalcTool; +use Rsgrinko\AiSdk\Tools\HashTool; +use Rsgrinko\AiSdk\Tools\JsonQueryTool; +use Rsgrinko\AiSdk\Tools\UuidTool; $registry = (new ToolRegistry())->add( new JsonQueryTool(), diff --git a/examples/12-logging.php b/examples/12-logging.php index 0105264..0d987d6 100644 --- a/examples/12-logging.php +++ b/examples/12-logging.php @@ -16,14 +16,14 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\Cost; -use AiSdk\Env; -use AiSdk\LoggingClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\TimeTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\Cost; +use Rsgrinko\AiSdk\Env; +use Rsgrinko\AiSdk\LoggingClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\TimeTool; // Приёмник — обычный колбэк. Вместо echo можно писать в свой логгер. $client = new LoggingClient( diff --git a/examples/13-code-task.php b/examples/13-code-task.php index a2b83f4..764107a 100644 --- a/examples/13-code-task.php +++ b/examples/13-code-task.php @@ -21,15 +21,15 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\FileSandbox; -use AiSdk\Tools\ListDirTool; -use AiSdk\Tools\ReadFileTool; -use AiSdk\Tools\ReplaceInFileTool; -use AiSdk\Tools\ShellTool; -use AiSdk\Tools\WriteFileTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\FileSandbox; +use Rsgrinko\AiSdk\Tools\ListDirTool; +use Rsgrinko\AiSdk\Tools\ReadFileTool; +use Rsgrinko\AiSdk\Tools\ReplaceInFileTool; +use Rsgrinko\AiSdk\Tools\ShellTool; +use Rsgrinko\AiSdk\Tools\WriteFileTool; $root = __DIR__ . '/var/code-task'; $tmp = __DIR__ . '/var/tmp'; diff --git a/examples/14-hooks.php b/examples/14-hooks.php index 3d871ef..171ea2e 100644 --- a/examples/14-hooks.php +++ b/examples/14-hooks.php @@ -18,12 +18,12 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AgentHooks; -use AiSdk\AiClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\TimeTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AgentHooks; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\TimeTool; $tools = (new ToolRegistry())->add(new TimeTool(), new CalculatorTool()); diff --git a/examples/15-csv.php b/examples/15-csv.php index 79db3a0..5ad343d 100644 --- a/examples/15-csv.php +++ b/examples/15-csv.php @@ -18,12 +18,12 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\CsvQueryTool; -use AiSdk\Tools\FileSandbox; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\CsvQueryTool; +use Rsgrinko\AiSdk\Tools\FileSandbox; $root = __DIR__ . '/var/csv'; @mkdir($root, 0777, true); diff --git a/examples/16-dialog.php b/examples/16-dialog.php index 47389e9..5013989 100644 --- a/examples/16-dialog.php +++ b/examples/16-dialog.php @@ -17,10 +17,10 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\Cost; -use AiSdk\Env; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\Cost; +use Rsgrinko\AiSdk\Env; $agent = new Agent( client: AiClient::fromEnv(timeout: 120.0), diff --git a/examples/17-approval.php b/examples/17-approval.php index 0c4fa20..5de2f1d 100644 --- a/examples/17-approval.php +++ b/examples/17-approval.php @@ -18,13 +18,13 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\FileSandbox; -use AiSdk\Tools\ListDirTool; -use AiSdk\Tools\ReadFileTool; -use AiSdk\Tools\WriteFileTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\FileSandbox; +use Rsgrinko\AiSdk\Tools\ListDirTool; +use Rsgrinko\AiSdk\Tools\ReadFileTool; +use Rsgrinko\AiSdk\Tools\WriteFileTool; $root = __DIR__ . '/var/approval'; @mkdir($root, 0777, true); diff --git a/examples/18-errors.php b/examples/18-errors.php index 4e513a0..55c6abb 100644 --- a/examples/18-errors.php +++ b/examples/18-errors.php @@ -19,10 +19,10 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\AiException; -use AiSdk\Retry; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\AiException; +use Rsgrinko\AiSdk\Retry; // На порту 9 локально никто не слушает: соединение отклоняется сразу. // Если у вас задан HTTP_PROXY, добавьте 127.0.0.1 в NO_PROXY. diff --git a/examples/19-database.php b/examples/19-database.php index 6f8fc72..83588ed 100644 --- a/examples/19-database.php +++ b/examples/19-database.php @@ -24,11 +24,11 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\Env; -use AiSdk\ToolRegistry; -use AiSdk\Tools\DatabaseTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\Env; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\DatabaseTool; $host = Env::get('DB_HOST', '') ?? ''; diff --git a/examples/20-database-offline.php b/examples/20-database-offline.php index a03ae2a..9cdf1a4 100644 --- a/examples/20-database-offline.php +++ b/examples/20-database-offline.php @@ -17,7 +17,7 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Tools\DatabaseTool; +use Rsgrinko\AiSdk\Tools\DatabaseTool; $pdo = new PDO('sqlite::memory:'); $pdo->exec('CREATE TABLE orders (id INTEGER PRIMARY KEY, client TEXT, city TEXT, total INTEGER, paid_at TEXT)'); diff --git a/examples/21-database-chat.php b/examples/21-database-chat.php index e02025a..0a32db1 100644 --- a/examples/21-database-chat.php +++ b/examples/21-database-chat.php @@ -22,11 +22,11 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\Env; -use AiSdk\ToolRegistry; -use AiSdk\Tools\DatabaseTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\Env; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\DatabaseTool; $host = Env::get('DB_HOST', '') ?? ''; diff --git a/examples/22-database-report.php b/examples/22-database-report.php index c2354bd..7f36d1e 100644 --- a/examples/22-database-report.php +++ b/examples/22-database-report.php @@ -20,13 +20,13 @@ declare(strict_types=1); require dirname(__DIR__) . '/bootstrap.php'; -use AiSdk\Agent; -use AiSdk\AgentHooks; -use AiSdk\AiClient; -use AiSdk\Env; -use AiSdk\ToolRegistry; -use AiSdk\Tools\DatabaseTool; -use AiSdk\Tools\FinishTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AgentHooks; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\Env; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\DatabaseTool; +use Rsgrinko\AiSdk\Tools\FinishTool; $host = Env::get('DB_HOST', '') ?? ''; diff --git a/src/Agent.php b/src/Agent.php index 23f897b..4c83cf6 100644 --- a/src/Agent.php +++ b/src/Agent.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Диалог с моделью и цикл вызова инструментов. diff --git a/src/AgentHooks.php b/src/AgentHooks.php index 0180108..400c7c4 100644 --- a/src/AgentHooks.php +++ b/src/AgentHooks.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Колбэки хода работы агента. diff --git a/src/AiClient.php b/src/AiClient.php index c2c29fc..f8bf6f4 100644 --- a/src/AiClient.php +++ b/src/AiClient.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Клиент любого OpenAI-совместимого /chat/completions. diff --git a/src/AiException.php b/src/AiException.php index daca2d4..9feb6c0 100644 --- a/src/AiException.php +++ b/src/AiException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Любая ошибка обращения к модели: сеть, HTTP 4xx/5xx, неожиданный ответ. diff --git a/src/ChatClient.php b/src/ChatClient.php index e3d293f..a1132b3 100644 --- a/src/ChatClient.php +++ b/src/ChatClient.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Минимальный контракт чата. Отдельный интерфейс нужен, чтобы в тестах diff --git a/src/ChatResult.php b/src/ChatResult.php index cebe22e..699f21f 100644 --- a/src/ChatResult.php +++ b/src/ChatResult.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Результат одного ответа модели. diff --git a/src/Cost.php b/src/Cost.php index 3aedb28..74c401a 100644 --- a/src/Cost.php +++ b/src/Cost.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Оценка стоимости запросов по тарифу провайдера. diff --git a/src/Env.php b/src/Env.php index 1a2cbcb..bb263c6 100644 --- a/src/Env.php +++ b/src/Env.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Чтение настроек из .env без единой зависимости. diff --git a/src/HttpTransport.php b/src/HttpTransport.php index 3f0dce7..830847c 100644 --- a/src/HttpTransport.php +++ b/src/HttpTransport.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Минимальный HTTP-клиент без зависимостей. diff --git a/src/LoggingClient.php b/src/LoggingClient.php index 59d3db4..0636237 100644 --- a/src/LoggingClient.php +++ b/src/LoggingClient.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Декоратор ChatClient: пишет каждый запрос и ответ в лог. diff --git a/src/Retry.php b/src/Retry.php index bc6f4a4..2a64762 100644 --- a/src/Retry.php +++ b/src/Retry.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Повтор запроса к модели при временных сбоях. diff --git a/src/Tool.php b/src/Tool.php index 3283c16..825e0f2 100644 --- a/src/Tool.php +++ b/src/Tool.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Инструмент, который модель может вызвать. diff --git a/src/ToolRegistry.php b/src/ToolRegistry.php index 80bf8d6..5bdb47a 100644 --- a/src/ToolRegistry.php +++ b/src/ToolRegistry.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk; +namespace Rsgrinko\AiSdk; /** * Набор инструментов: хранит их, отдаёт схемы модели и вызывает по имени. diff --git a/tests/cases/agent.php b/tests/cases/agent.php index 54b5a26..670d804 100644 --- a/tests/cases/agent.php +++ b/tests/cases/agent.php @@ -4,11 +4,11 @@ declare(strict_types=1); // Тесты: agent. Запускаются из tests/run.php. -use AiSdk\Agent; -use AiSdk\Tool; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\FinishTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\FinishTool; // --------------------------------------------------------------------------- // Агент diff --git a/tests/cases/architecture.php b/tests/cases/architecture.php index cdf9b06..05056ad 100644 --- a/tests/cases/architecture.php +++ b/tests/cases/architecture.php @@ -9,7 +9,7 @@ test('архитектура: ядро не зависит от инструме $code = (string) file_get_contents($file); assertTrue( - preg_match('/^use AiSdk\\\\Tools\\\\/m', $code) !== 1, + preg_match('/^use Rsgrinko\\\\AiSdk\\\\Tools\\\\/m', $code) !== 1, 'ядро импортирует инструменты: ' . basename($file) ); } diff --git a/tests/cases/client.php b/tests/cases/client.php index aa0d933..9486ad0 100644 --- a/tests/cases/client.php +++ b/tests/cases/client.php @@ -5,12 +5,12 @@ declare(strict_types=1); // Тесты: AiClient по настоящему HTTP против поддельного сервера // (tests/stub/llm-server.php). Внешняя сеть не нужна. -use AiSdk\Agent; -use AiSdk\AiClient; -use AiSdk\AiException; -use AiSdk\Retry; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AiClient; +use Rsgrinko\AiSdk\AiException; +use Rsgrinko\AiSdk\Retry; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; /** * Поднять встроенный сервер PHP один раз на весь прогон. diff --git a/tests/cases/database.php b/tests/cases/database.php index 0ec2f54..4b8e306 100644 --- a/tests/cases/database.php +++ b/tests/cases/database.php @@ -4,8 +4,8 @@ declare(strict_types=1); // Тесты: database. SQLite в памяти — тот же PDO, сервер не нужен. -use AiSdk\Tools\DatabaseTool; -use AiSdk\Tools\Support\TextTable; +use Rsgrinko\AiSdk\Tools\DatabaseTool; +use Rsgrinko\AiSdk\Tools\Support\TextTable; function demoDb(): PDO { diff --git a/tests/cases/files.php b/tests/cases/files.php index b84fac6..566f501 100644 --- a/tests/cases/files.php +++ b/tests/cases/files.php @@ -4,14 +4,14 @@ declare(strict_types=1); // Тесты: files. Запускаются из tests/run.php. -use AiSdk\Tools\CsvQueryTool; -use AiSdk\Tools\FileSandbox; -use AiSdk\Tools\FindFilesTool; -use AiSdk\Tools\ListDirTool; -use AiSdk\Tools\ReadFileTool; -use AiSdk\Tools\ReplaceInFileTool; -use AiSdk\Tools\SearchFilesTool; -use AiSdk\Tools\WriteFileTool; +use Rsgrinko\AiSdk\Tools\CsvQueryTool; +use Rsgrinko\AiSdk\Tools\FileSandbox; +use Rsgrinko\AiSdk\Tools\FindFilesTool; +use Rsgrinko\AiSdk\Tools\ListDirTool; +use Rsgrinko\AiSdk\Tools\ReadFileTool; +use Rsgrinko\AiSdk\Tools\ReplaceInFileTool; +use Rsgrinko\AiSdk\Tools\SearchFilesTool; +use Rsgrinko\AiSdk\Tools\WriteFileTool; // --------------------------------------------------------------------------- // Файлы diff --git a/tests/cases/hooks.php b/tests/cases/hooks.php index 9584649..75ec3c0 100644 --- a/tests/cases/hooks.php +++ b/tests/cases/hooks.php @@ -4,11 +4,11 @@ declare(strict_types=1); // Тесты: хуки агента — шаги, инструменты, ответ, остановка. -use AiSdk\Agent; -use AiSdk\AgentHooks; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\FinishTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\AgentHooks; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\FinishTool; test('hooks: шаги, инструменты и ответ идут по порядку', function (): void { $events = []; diff --git a/tests/cases/http.php b/tests/cases/http.php index d1a7c80..b0e7e04 100644 --- a/tests/cases/http.php +++ b/tests/cases/http.php @@ -4,12 +4,12 @@ declare(strict_types=1); // Тесты: http. Запускаются из tests/run.php. -use AiSdk\AiException; -use AiSdk\HttpTransport; -use AiSdk\Tools\Support\HttpRequest; -use AiSdk\Tool; -use AiSdk\Tools\HttpRequestTool; -use AiSdk\Tools\Support\UrlGuard; +use Rsgrinko\AiSdk\AiException; +use Rsgrinko\AiSdk\HttpTransport; +use Rsgrinko\AiSdk\Tools\Support\HttpRequest; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\HttpRequestTool; +use Rsgrinko\AiSdk\Tools\Support\UrlGuard; // --------------------------------------------------------------------------- // http_request: сборка запроса (без сети) diff --git a/tests/cases/logging.php b/tests/cases/logging.php index 6c0cd70..a9ad6b3 100644 --- a/tests/cases/logging.php +++ b/tests/cases/logging.php @@ -4,13 +4,13 @@ declare(strict_types=1); // Тесты: logging. Запускаются из tests/run.php. -use AiSdk\Agent; -use AiSdk\ChatClient; -use AiSdk\ChatResult; -use AiSdk\LoggingClient; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\TimeTool; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\ChatClient; +use Rsgrinko\AiSdk\ChatResult; +use Rsgrinko\AiSdk\LoggingClient; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\TimeTool; // --------------------------------------------------------------------------- // Логирование diff --git a/tests/cases/retry.php b/tests/cases/retry.php index 6b44ec5..d84d715 100644 --- a/tests/cases/retry.php +++ b/tests/cases/retry.php @@ -4,8 +4,8 @@ declare(strict_types=1); // Тесты: повтор запроса к модели при временных сбоях. Без сети и без пауз. -use AiSdk\AiException; -use AiSdk\Retry; +use Rsgrinko\AiSdk\AiException; +use Rsgrinko\AiSdk\Retry; /** * Retry с записью пауз вместо реального ожидания. diff --git a/tests/cases/shell.php b/tests/cases/shell.php index 6ea6524..58a5a2b 100644 --- a/tests/cases/shell.php +++ b/tests/cases/shell.php @@ -4,7 +4,7 @@ declare(strict_types=1); // Тесты: shell. Запускаются из tests/run.php. -use AiSdk\Tools\ShellTool; +use Rsgrinko\AiSdk\Tools\ShellTool; // --------------------------------------------------------------------------- // run_command: оболочка diff --git a/tests/cases/support.php b/tests/cases/support.php index 4cb4e00..faf712d 100644 --- a/tests/cases/support.php +++ b/tests/cases/support.php @@ -4,15 +4,15 @@ declare(strict_types=1); // Тесты: таймаут от модели, стоимость запроса, накопление usage. -use AiSdk\Agent; -use AiSdk\ChatResult; -use AiSdk\Cost; -use AiSdk\ToolRegistry; -use AiSdk\Tools\HttpRequestTool; -use AiSdk\Tools\ShellTool; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\Support\Number; -use AiSdk\Tools\Support\Timeout; +use Rsgrinko\AiSdk\Agent; +use Rsgrinko\AiSdk\ChatResult; +use Rsgrinko\AiSdk\Cost; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\HttpRequestTool; +use Rsgrinko\AiSdk\Tools\ShellTool; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\Support\Number; +use Rsgrinko\AiSdk\Tools\Support\Timeout; test('timeout: значение модели в пределах максимума', function (): void { assertSame(5.0, Timeout::seconds(['timeout' => 5], 10.0, 60.0)); diff --git a/tests/cases/tools.php b/tests/cases/tools.php index 649d864..b9ca1a9 100644 --- a/tests/cases/tools.php +++ b/tests/cases/tools.php @@ -4,15 +4,15 @@ declare(strict_types=1); // Тесты: tools. Запускаются из tests/run.php. -use AiSdk\Tool; -use AiSdk\ToolRegistry; -use AiSdk\Tools\CalculatorTool; -use AiSdk\Tools\ConvertUnitsTool; -use AiSdk\Tools\DateCalcTool; -use AiSdk\Tools\JsonQueryTool; -use AiSdk\Tools\HashTool; -use AiSdk\Tools\TimeTool; -use AiSdk\Tools\UuidTool; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\ToolRegistry; +use Rsgrinko\AiSdk\Tools\CalculatorTool; +use Rsgrinko\AiSdk\Tools\ConvertUnitsTool; +use Rsgrinko\AiSdk\Tools\DateCalcTool; +use Rsgrinko\AiSdk\Tools\JsonQueryTool; +use Rsgrinko\AiSdk\Tools\HashTool; +use Rsgrinko\AiSdk\Tools\TimeTool; +use Rsgrinko\AiSdk\Tools\UuidTool; // --------------------------------------------------------------------------- // Инструменты diff --git a/tests/support.php b/tests/support.php index 73e87d3..6f5e91e 100644 --- a/tests/support.php +++ b/tests/support.php @@ -4,8 +4,8 @@ declare(strict_types=1); // Общие помощники и заглушки для тестов. -use AiSdk\ChatClient; -use AiSdk\ChatResult; +use Rsgrinko\AiSdk\ChatClient; +use Rsgrinko\AiSdk\ChatResult; /** * Тесты SDK: без сети, без модели и без API-ключа. diff --git a/tools/CalculatorTool.php b/tools/CalculatorTool.php index 3abc6f8..fbc472e 100644 --- a/tools/CalculatorTool.php +++ b/tools/CalculatorTool.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\Number; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\Number; /** * Арифметика без eval(): рекурсивный спуск по выражению. diff --git a/tools/ConvertUnitsTool.php b/tools/ConvertUnitsTool.php index 1b24351..479571f 100644 --- a/tools/ConvertUnitsTool.php +++ b/tools/ConvertUnitsTool.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\Number; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\Number; /** * Перевод единиц: температура, длина, масса, скорость. diff --git a/tools/CsvQueryTool.php b/tools/CsvQueryTool.php index fdff8c1..bf25246 100644 --- a/tools/CsvQueryTool.php +++ b/tools/CsvQueryTool.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\Bytes; -use AiSdk\Tools\Support\TextTable; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\Bytes; +use Rsgrinko\AiSdk\Tools\Support\TextTable; /** * Выборка из CSV-файла внутри песочницы. diff --git a/tools/DatabaseTool.php b/tools/DatabaseTool.php index 8e438b4..bf7077f 100644 --- a/tools/DatabaseTool.php +++ b/tools/DatabaseTool.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\TextTable; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\TextTable; /** * SQL-запросы к базе данных через PDO (MySQL/MariaDB, а также SQLite и PostgreSQL). diff --git a/tools/DateCalcTool.php b/tools/DateCalcTool.php index ecb2057..ff88ce6 100644 --- a/tools/DateCalcTool.php +++ b/tools/DateCalcTool.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; +use Rsgrinko\AiSdk\Tool; /** * Арифметика с датами: разница между датами и прибавление интервала. diff --git a/tools/FileSandbox.php b/tools/FileSandbox.php index b626f4e..68696ee 100644 --- a/tools/FileSandbox.php +++ b/tools/FileSandbox.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; /** * Ограничитель файловых инструментов. diff --git a/tools/FindFilesTool.php b/tools/FindFilesTool.php index 753268a..adecbc9 100644 --- a/tools/FindFilesTool.php +++ b/tools/FindFilesTool.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\Bytes; -use AiSdk\Tools\Support\FileWalker; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\Bytes; +use Rsgrinko\AiSdk\Tools\Support\FileWalker; /** * Поиск файлов по маске имени внутри песочницы. diff --git a/tools/FinishTool.php b/tools/FinishTool.php index a47c5f3..3c257ba 100644 --- a/tools/FinishTool.php +++ b/tools/FinishTool.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; +use Rsgrinko\AiSdk\Tool; /** * Явное завершение работы. diff --git a/tools/HashTool.php b/tools/HashTool.php index 0e403a4..fe7354a 100644 --- a/tools/HashTool.php +++ b/tools/HashTool.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; +use Rsgrinko\AiSdk\Tool; /** * Хеш текста: sha256, sha1 или md5. diff --git a/tools/HttpRequestTool.php b/tools/HttpRequestTool.php index 90dd94a..93ae358 100644 --- a/tools/HttpRequestTool.php +++ b/tools/HttpRequestTool.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\HttpTransport; -use AiSdk\Tools\Support\HttpRequest; -use AiSdk\Tools\Support\Timeout; -use AiSdk\Tools\Support\UrlGuard; -use AiSdk\Tool; +use Rsgrinko\AiSdk\HttpTransport; +use Rsgrinko\AiSdk\Tools\Support\HttpRequest; +use Rsgrinko\AiSdk\Tools\Support\Timeout; +use Rsgrinko\AiSdk\Tools\Support\UrlGuard; +use Rsgrinko\AiSdk\Tool; /** * HTTP-запрос любого метода: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS. diff --git a/tools/JsonQueryTool.php b/tools/JsonQueryTool.php index 1f5935f..51ef879 100644 --- a/tools/JsonQueryTool.php +++ b/tools/JsonQueryTool.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; +use Rsgrinko\AiSdk\Tool; /** * Достать значение из JSON по простому пути: data.items[0].id diff --git a/tools/ListDirTool.php b/tools/ListDirTool.php index 780b93f..c163a3d 100644 --- a/tools/ListDirTool.php +++ b/tools/ListDirTool.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\Bytes; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\Bytes; /** * Список файлов и каталогов внутри заданного корня. diff --git a/tools/ReadFileTool.php b/tools/ReadFileTool.php index 4824fbd..e9c6803 100644 --- a/tools/ReadFileTool.php +++ b/tools/ReadFileTool.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\Bytes; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\Bytes; /** * Чтение текстового файла внутри заданного корня. diff --git a/tools/ReplaceInFileTool.php b/tools/ReplaceInFileTool.php index 7fc0676..8ff1896 100644 --- a/tools/ReplaceInFileTool.php +++ b/tools/ReplaceInFileTool.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\AtomicWriter; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\AtomicWriter; /** * Точечная замена в файле: старый фрагмент -> новый. diff --git a/tools/SearchFilesTool.php b/tools/SearchFilesTool.php index 100491f..99d4f50 100644 --- a/tools/SearchFilesTool.php +++ b/tools/SearchFilesTool.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\Bytes; -use AiSdk\Tools\Support\FileWalker; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\Bytes; +use Rsgrinko\AiSdk\Tools\Support\FileWalker; /** * Поиск по содержимому файлов внутри песочницы (аналог grep). diff --git a/tools/ShellTool.php b/tools/ShellTool.php index a8282f9..d57aade 100644 --- a/tools/ShellTool.php +++ b/tools/ShellTool.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\Number; -use AiSdk\Tools\Support\Timeout; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\Number; +use Rsgrinko\AiSdk\Tools\Support\Timeout; /** * Выполнение команд оболочки. diff --git a/tools/Support/AtomicWriter.php b/tools/Support/AtomicWriter.php index 566b736..e9d7e70 100644 --- a/tools/Support/AtomicWriter.php +++ b/tools/Support/AtomicWriter.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk\Tools\Support; +namespace Rsgrinko\AiSdk\Tools\Support; /** * Атомарная запись файла: сначала во временный файл рядом, потом rename. diff --git a/tools/Support/Bytes.php b/tools/Support/Bytes.php index cd41a51..20f9322 100644 --- a/tools/Support/Bytes.php +++ b/tools/Support/Bytes.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk\Tools\Support; +namespace Rsgrinko\AiSdk\Tools\Support; /** * Человекочитаемый размер в байтах. diff --git a/tools/Support/FileWalker.php b/tools/Support/FileWalker.php index 975d9cf..3767507 100644 --- a/tools/Support/FileWalker.php +++ b/tools/Support/FileWalker.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk\Tools\Support; +namespace Rsgrinko\AiSdk\Tools\Support; /** * Рекурсивный обход каталога с единым списком игнорируемых папок. diff --git a/tools/Support/HttpRequest.php b/tools/Support/HttpRequest.php index 325ed3d..4df33b1 100644 --- a/tools/Support/HttpRequest.php +++ b/tools/Support/HttpRequest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk\Tools\Support; +namespace Rsgrinko\AiSdk\Tools\Support; /** * Разобранный HTTP-запрос: метод, URL, заголовки, тело. diff --git a/tools/Support/Number.php b/tools/Support/Number.php index a272229..12a8fd4 100644 --- a/tools/Support/Number.php +++ b/tools/Support/Number.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk\Tools\Support; +namespace Rsgrinko\AiSdk\Tools\Support; /** * Число для ответа модели: без хвостовых нулей и без экспоненты, пока это diff --git a/tools/Support/TextTable.php b/tools/Support/TextTable.php index bccef24..40ae737 100644 --- a/tools/Support/TextTable.php +++ b/tools/Support/TextTable.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk\Tools\Support; +namespace Rsgrinko\AiSdk\Tools\Support; /** * Текстовая таблица для ответа модели: первая строка — заголовок. diff --git a/tools/Support/Timeout.php b/tools/Support/Timeout.php index f0f9836..69343b6 100644 --- a/tools/Support/Timeout.php +++ b/tools/Support/Timeout.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk\Tools\Support; +namespace Rsgrinko\AiSdk\Tools\Support; /** * Таймаут, который может попросить сама модель (аргумент timeout). diff --git a/tools/Support/UrlGuard.php b/tools/Support/UrlGuard.php index ab5b685..fc8fe03 100644 --- a/tools/Support/UrlGuard.php +++ b/tools/Support/UrlGuard.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace AiSdk\Tools\Support; +namespace Rsgrinko\AiSdk\Tools\Support; /** * Защита от SSRF: пропускает только публичные http/https-адреса. diff --git a/tools/TimeTool.php b/tools/TimeTool.php index 3ac0ca0..04588ce 100644 --- a/tools/TimeTool.php +++ b/tools/TimeTool.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; +use Rsgrinko\AiSdk\Tool; /** * Пример самого простого инструмента: без аргументов и без сети. diff --git a/tools/UuidTool.php b/tools/UuidTool.php index 5318064..d34e301 100644 --- a/tools/UuidTool.php +++ b/tools/UuidTool.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; +use Rsgrinko\AiSdk\Tool; /** * Генерация UUID v4. diff --git a/tools/WeatherTool.php b/tools/WeatherTool.php index 3d55e9e..c7cfade 100644 --- a/tools/WeatherTool.php +++ b/tools/WeatherTool.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\HttpTransport; -use AiSdk\Tool; +use Rsgrinko\AiSdk\HttpTransport; +use Rsgrinko\AiSdk\Tool; /** * Пример инструмента с обращением к внешнему API. diff --git a/tools/WriteFileTool.php b/tools/WriteFileTool.php index 38b5a16..8856ba8 100644 --- a/tools/WriteFileTool.php +++ b/tools/WriteFileTool.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace AiSdk\Tools; +namespace Rsgrinko\AiSdk\Tools; -use AiSdk\Tool; -use AiSdk\Tools\Support\AtomicWriter; +use Rsgrinko\AiSdk\Tool; +use Rsgrinko\AiSdk\Tools\Support\AtomicWriter; /** * Создание и перезапись файла внутри песочницы.