This PR was squashed before being merged into the main branch.
Discussion
----------
[Mate] Add Codex wrappers and refresh agent instructions on discover
| Q | A |
| ------------- | --- |
| Bug fix? | yes |
| New feature? | yes |
| Docs? | yes |
| Issues | n/a (no related issue) |
| License | MIT |
## Description
This PR improves Symfony AI Mate integration for Codex and keeps agent instructions in sync with extension discovery.
### What changed
- mate discover now also refreshes agent instruction artifacts:
- updates mate/AGENT_INSTRUCTIONS.md
- updates a managed AI Mate section in AGENTS.md
- mate init now scaffolds all integration artifacts (without running discover):
- keeps mcp.json + .mcp.json behavior
- adds Codex runtime wrappers:
- bin/codex (macOS/Linux)
- bin/codex.bat (Windows)
- adds mate/AGENT_INSTRUCTIONS.md template
- updates AGENTS.md managed section from current instruction file
- prints explicit next step to run vendor/bin/mate discover
- extracted extension sync logic to ExtensionConfigSynchronizer
- added AgentInstructionsMaterializer to centralize writing:
- mate/AGENT_INSTRUCTIONS.md
- managed block in AGENTS.md
- extended AgentInstructionsAggregator with aggregateForExtensions(...) to support fresh discovered maps and avoid stale container state
- updated Mate docs and changelog accordingly
## Usage
vendor/bin/mate init
vendor/bin/mate discover
./bin/codex
discover is now the command that refreshes both extension config and instruction artifacts.
Commits
-------
7362bb22 [Mate] Add Codex wrappers and refresh agent instructions on discover
This PR was merged into the main branch.
Discussion
----------
[MCP Bundle] Implement PSR-16 adapter session storage
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| Docs? | yes
| Issues | Fix https://github.com/symfony/ai/issues/1612
| License | MIT
This PR brings compatibility with the underlying SDK's PSR-16 storage capacities for HTTP sessions storage.
New configurations options are made available :
- `cache` value for `mcp.http.session.store` (in addition to the existing `filesystem` and `memory` values
- `cache_pool` option for providing a custom cache pool to be used for storage (if none provided, defaulting to the built-in adapter)
Commits
-------
abe0d7d1 feat(sessions): implement psr-16 adapter session storage
Problem:
Both ServeCommand and ToolsCallCommand independently created and populated
Registry instances via FilteredDiscoveryLoader, causing duplicate capability
discovery when both commands were used in the same application lifecycle.
Solution:
Created RegistryProvider service that encapsulates Registry creation and
population logic with lazy initialization. Registry is now created only when
first accessed, and both commands share the same populated Registry instance.
- Add RegistryProvider service with lazy initialization
- Register RegistryProvider in service container
- Update ServeCommand to use RegistryProvider (setRegistry instead of addLoader)
- Update ToolsCallCommand to use RegistryProvider and RegistryInterface
- Update tests to use RegistryProvider
This PR was squashed before being merged into the main branch.
Discussion
----------
[Mate] Refactor command registration to use service container
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| Docs? | yes
| Issues | N/A
| License | MIT
## Summary
Refactored the Mate application to use dependency injection container with services for command registration instead of manual instantiation. This improves modularity and makes the application more maintainable.
Commits
-------
ddaf96f9 [Mate] Refactor command registration to use service container
- Remove incorrect 'Profiler Bridge' section (symfony/ai-profiler-mate-extension does not exist)
- Add profiler tools and resources to Symfony Bridge section as optional features
- Profiler functionality is part of symfony/ai-symfony-mate-extension, not a separate package
- Update mate README.md with documentation link and proper formatting
- Update formatting to match other component READMEs (use dashes, add docs link)
The profiler tools (symfony-profiler-list, symfony-profiler-latest,
symfony-profiler-search, symfony-profiler-get) and resources
(symfony-profiler://profile/{token}) are now correctly documented as
optional features of the Symfony bridge that activate when
symfony/http-kernel is installed.
Display comprehensive information about specific MCP tools including
full JSON schema.
Features:
- Accept tool name as required argument
- Display tool metadata: name, description, handler, extension
- Show full JSON schema for tool parameters
- Support text (default) and JSON output formats
- Error handling for non-existent tools
This PR was merged into the main branch.
Discussion
----------
[Mate] Bump mcp/php-sdk in mate to 0.3
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| Docs? | no
| Issues | N/A
| License | MIT
## Summary
Bump mcp/sdk to 0.3
Commits
-------
cdf2967d bump mcp/php-sdk in mate to 0.3
Add support for 'extension: false' flag in extra.ai-mate configuration
to exclude packages from being discovered as extensions. This is useful
for vendor packages that use Mate for internal development tooling but
should not be detected as user-facing extensions.
Changes:
- InitCommand now sets 'extension: false' by default in composer.json
- ComposerExtensionDiscovery skips packages with 'extension: false'
- Added informative note in init command output
- Added comprehensive test coverage (7 new test cases)
- Updated documentation (CHANGELOG.md, CLAUDE.md)
When a package is installed in other projects, it will be completely
hidden from extension discovery if the flag is set to false.
This PR was squashed before being merged into the main branch.
Discussion
----------
[Mate] Add mcp:tools:list command
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| Docs? | yes
| Issues | N/A
| License | MIT
## Summary
Add new console command to list available MCP tools with metadata:
- Support filtering by tool name pattern (wildcards)
- Support filtering by extension name
- Provide both table and JSON output formats
Commits
-------
4d12ecf5 [Mate] Add mcp:tools:list command
- Merged LogSearchToolTest with comprehensive test coverage
- Merged ServiceToolTest with enhanced test cases
- Added necessary fixtures to support comprehensive testing
- Removed duplicate test files and fixtures from mate test suite
- All tests pass with improved coverage and organization
The mate logger was failing to start when the configured log file path
included a non-existing directory, because file_put_contents() does not
automatically create parent directories.
Changes:
- Add ensureDirectoryExists() method to Logger service
- Automatically creates parent directories with 0755 permissions
- Throws clear exception if directory creation fails due to permissions
- Add test coverage for automatic directory creation
- Add test for permission-based directory creation failures
- Update existing test to expect directory creation error message
The implementation uses a simple approach without caching, relying on
the fast is_dir() check and OS filesystem caching for efficiency.
This PR was merged into the main branch.
Discussion
----------
Prepare for release v0.2
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Docs? | no <!-- required for new features -->
| Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
Commits
-------
e1ca6baf Prepare for release v0.2
This PR was merged into the main branch.
Discussion
----------
[Mate] Revert " Execute PHP-CS-Fixer"
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Docs? | no <!-- required for new features -->
| Issues |
| License | MIT
This reverts commit 35fcfa54c148794a38d057ab247d9f91f40a7d19, see #1343
Commits
-------
595491df Revert "[Mate] Execute PHP-CS-Fixer"
This PR was merged into the main branch.
Discussion
----------
[Mate] Refactor ComposerExtensionDiscovery to improve code quality
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| Docs? | no
| Issues | none
| License | MIT
## Summary
- Extract complex nested conditions into extractAiMateConfig() helper method
- Improve error logging for file_get_contents failures with error context
- Reduce code duplication in discoverRootProject() method
- Add detailed error messages including last PHP error when file operations fail
Commits
-------
db5a3f7a Refactor ComposerExtensionDiscovery to improve code quality
This PR was merged into the main branch.
Discussion
----------
[Mate] Improve error message handling in Logger exception path
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| Docs? | no
| Issues | none
| License | MIT
## Summary
- Create separate errorMessage variable for cleaner code
- Add explicit [ERROR] prefix when writing to STDERR
- Write both error message and original log message to STDERR
- Ensures complete information is available even when exception is thrown
Commits
-------
dcebacda Improve error message handling in Logger exception path
- Create separate errorMessage variable for cleaner code
- Add explicit [ERROR] prefix when writing to STDERR
- Write both error message and original log message to STDERR
- Ensures complete information is available even when exception is thrown
- Check return value of file_put_contents() when creating PID file
- Log warning if PID file creation fails instead of silently failing
- Add file_exists() check before cleanup in finally block
- Use error suppression operator to prevent PHP warnings
This PR was squashed before being merged into the main branch.
Discussion
----------
[Mate] Remove exception factory methods
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| Docs? | no
| Issues | none
| License | MIT
## Summary
Remove static factory methods from all exception classes in the mate component
and replace them with constructor parameters that format messages internally.
Commits
-------
04bdfe1f [Mate] Remove exception factory methods
This PR was merged into the main branch.
Discussion
----------
[Mate] Put log file inside `mate.root_dir`
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| Docs? | no
| Issues |
| License | MIT
If you run mate from a non-root dir, you still want the log file to be put in the project
Commits
-------
fae38577 [Mate] Put log file inside mate.root_dir
Implements a new debug:extensions command that displays detailed information
about discovered and loaded MCP extensions, helping developers troubleshoot
extension discovery and loading issues.
Features:
- Shows discovered vs enabled vs loaded extension status
- Displays scan directories and include files per extension
- Differentiates between [enabled] and [loaded] states
- Supports --show-all flag to display disabled extensions
- JSON output format for scripting (--format=json)
- Root project (_custom) extension details
Status indicators:
- [enabled]: Extension configured in mate/extensions.php
- [loaded]: Extension successfully loaded into DI container
- [not loaded]: Extension configured but failed to load (useful for debugging)
Changes:
- Add DebugExtensionsCommand with comprehensive extension inspection
- Add mate.enabled_extensions container parameter in ContainerFactory
- Add command tests with 9 test cases covering all scenarios
- Update documentation (mate.rst, CLAUDE.md)
- Register command in App
Related to debug:capabilities command for complete debugging workflow.
Move initialization code from execute() methods to constructors in
ServeCommand and DiscoverCommand for better separation of concerns.
Extract FilteredDiscoveryLoader filtering logic into public
loadByExtension() method to allow per-extension capability inspection.
- Rename class ComposerTypeDiscovery to ComposerExtensionDiscovery
- Add file existence check in discoverRootProject() method to prevent warnings
- Update all references in tests, commands, and container factory
Extracted container building logic into focused private methods:
- registerCoreServices(): Loads default config and sets parameters
- loadBridges(): Discovers and loads MCP extension bridges
- registerUserServices(): Loads user-defined service configurations
- loadEnvironmentVariables(): Loads environment variables from .env files
The create() method now orchestrates these four steps with clear
separation of concerns and improved maintainability.
Also fixed bug in environment variable loading where .env.local file
was being added to the load list when it didn't exist (inverted logic).
All 27 existing tests pass, confirming backward compatibility.
This PR was merged into the main branch.
Discussion
----------
[Mate] Add support for _composer_autoload_path super global
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| Docs? | no
| Issues | no
| License | MIT
If `$_GLOBALS['_composer_autoload_path']` is defined, then use it. It is defined my composer on each "bin" script.
(See your `vendor/bin/*`)
Commits
-------
da436902 add support for _composer_autoload_path super global