adachsoft/ai-tool-call-plugin

Composer plugin that discovers ai-tool-call providers and generates a deterministic registry.

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:composer-plugin

pkg:composer/adachsoft/ai-tool-call-plugin

v0.2.1 2025-11-20 08:59 UTC

This package is not auto-updated.

Last update: 2025-12-04 08:07:36 UTC


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).