adachsoft / prompt-manager-tool
AI tool-call SPI adapter for managing prompts with adachsoft/prompt-manager-lib
Requires
- php: ^8.3
- adachsoft/ai-agent-config-repository: ^0.6
- adachsoft/ai-tool-call: ^2.3
- adachsoft/prompt-manager-lib: ^0.1.0
Requires (Dev)
- adachsoft/php-code-style: ^0.7.3
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.3
- phpunit/phpunit: ^12.5
- rector/rector: ^2.8
- symplify/phpstan-rules: ^14.19
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-23 03:40:47 UTC
README
An adapter that exposes adachsoft/prompt-manager-lib as an AI tool-call SPI tool named prompt_manager. It lets an AI client inspect and manage system prompts through a structured tool interface.
Requirements
- PHP 8.3 or newer.
- Composer.
- An implementation of
AdachSoft\\PromptManagerLib\\PublicApi\\PromptManagerInterfaceand an AI tool-call SPI integration.
Features
- List, retrieve, create, update, and delete system prompts.
- Retrieve the raw prompt template separately from the compiled prompt.
- Apply targeted fragment edits and return a bounded unified diff.
- Validate tool-call parameters and map prompt-manager failures to SPI exceptions.
Installation
Install the package with Composer:
composer require adachsoft/prompt-manager-tool
Usage
Provide an implementation of AdachSoft\PromptManagerLib\PublicApi\PromptManagerInterface and register AdachSoft\PromptManagerTool\Factory\PromptManagerToolFactory with your AI tool-call SPI integration. The factory creates the prompt_manager tool; the integration can then publish its tool definition and dispatch calls to it.
See the examples for supported calls and targeted edits.