adachsoft/ai-tool-call-plugin
最新稳定版本:v0.2.1
Composer 安装命令:
composer require adachsoft/ai-tool-call-plugin
包简介
Composer plugin that discovers ai-tool-call providers and generates a deterministic registry.
README 文档
README
Composer plugin that discovers ai-tool-call providers across installed packages and generates a deterministic registry file used at runtime.
Requirements
- PHP >= 8.3
- Composer 2.x
- composer-plugin-api ^2.0, psr/log ^3.0, adachsoft/collection ^3.0
Quick Start 1) Enable plugin in your project composer.json:
{ "config": {
"allow-plugins": {
"adachsoft/ai-tool-call-plugin": true
}
} }
2) In your extension package add entry-file and point it in composer.json:
- extra.ai-tool-call.entry-file: "resources/ai-tool-call.php"
- resources/ai-tool-call.php must return array like:
<?php return [
'providers' => [
['provider' => 'Vendor\\Pkg\\Provider\\MyToolProvider'],
],
];
3) Run composer update (or install) -> plugin generates .generated/ai-tool-call-registry.php
4) At runtime use RegistryReader to load data (or integrate with your ai-tool-call bootstrap).
Debug helper (bin)
Use bin/ai-tool-call-registry-debug to quickly inspect the generated registry.
- Prints absolute path, provider count and provider FQCNs.
- Exits with non‑zero when registry is missing/invalid.
Example:
$ ./vendor/bin/ai-tool-call-registry-debug [ai-tool-call-plugin] Registry path: /path/to/project/.generated/ai-tool-call-registry.php Providers: 2 Provider FQCNs:
- Vendor\Pkg\Provider\MyToolProvider
- Vendor\Other\Provider\AnotherProvider
Notes
- No scanning of vendor at runtime. Only generated registry is read.
- Deterministic content (providers sorted).
- Schema is provider-only (no backward compatibility for the old "factory" key).
Versioning
- Semantic Versioning via Git tags (do not set version in composer.json).
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-17