Commit graph

28 commits

Author SHA1 Message Date
Pavel Buchnev
99bf56eef8
Registry Architecture Refactoring - Enhanced Separation of Concerns (#46)
* refactor: Separate Registry concerns following SOLID principles [WIP]

- Extract ReferenceProvider and ReferenceRegistryInterface interfaces
- Create DefaultToolExecutor with ReferenceHandlerInterface
- Remove execution responsibility from Registry class
- Enable custom handler and executor implementations

* refactor: implement SOLID principles with separated execution concerns

* Create DefaultResourceReader, DefaultPromptGetter
* Refactor JsonRpc Handler and RequestHandlers to use dedicated executors
* Update ServerBuilder to support custom executors via dependency injection

* chore: remove extra comments

* feat: introduce DispatchableRegistry for enhanced tool and resource management

* refactor: use proper interfaces

* refactor: implement HandlerInterface for improved abstraction and flexibility

* test: add unit tests for DispatchableRegistry and Registry classes

* refactor: cover with unit tests Resource reader, Prompt getter and Tool executor

* cs fix

* phpstan fix

* test: add unit tests for CallToolHandler, GetPromptHandler, PingHandler, and ReadResourceHandler

* refactor: revert Handler

* chore: remove style guide for tests

* refactor: remove "Default" prefix from classes

* refactor: remove DispatchableRegistry

* refactor: use package specific exception classes

* refactor: remove DispatchableRegistry

* refactor: add logger support to PromptGetter and ResourceReader classes

* Update src/Capability/Prompt/PromptGetter.php

Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>

* refactor: Use FQN for Resource class to avoid cs-fixer misinterpreting it as `resource`

* refactor: rename ToolExecutor to ToolCaller and related classes for clarity and consistency

* refactor: add missed docblock

* refactor: rename ToolExecutor references to ToolCaller

* refactor: rename ToolCallerTest property and variable references

* cs fix

* ignore some phpstan errors

---------

Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>
2025-09-14 20:44:18 +02:00
Aleksei Gagarin
bfc3b82d19
Add Makefile to export-ignore in .gitattributes (#56)
* Add Makefile to export-ignore in .gitattributes

* Update .gitattributes to export-ignore all phpstan configuration files
2025-09-09 22:32:02 +02:00
Igor Markin
20e789d402
Fix return type in abstract methods from self to static (#53)
* Change return type of abstract request methods

* Change return type of `fromParams` method to `static` in request classes

(cherry picked from commit 94799ab66ff60d4b2305aadb6b73aaa4c805221e)

* Make request classes final and update `getParams` return types for improved type safety

(cherry picked from commit d6be496f89cc0e6d30f519792d0dc902685c4178)
2025-09-09 18:22:29 +02:00
Oskar Stark
4b667327e7
Remove --no-scripts option from composer install (#30) 2025-09-07 01:47:53 +02:00
Adebayo120
f457802371
Updated README.md to clarify grammar in "Important" section (#41) 2025-09-06 22:34:51 +02:00
Sapayth Hossain
952cd2420b
Update README for clarity and consistency (#38)
Improved capitalization and wording in the roadmap and credits sections for better readability and consistency.
2025-09-06 21:21:32 +02:00
Oskar Stark
9590e9c158
Rename workflow file from .yml to .yaml (#35) 2025-09-04 23:58:30 +02:00
Oskar Stark
a94d348f72
Remove suggest section in composer.json (#34)
* Sort suggest section in composer.json alphabetically

* Remove suggest section from composer.json
2025-09-04 23:50:15 +02:00
Oskar Stark
a7ddc11844
Add missing ConfigurationException and update PHPStan baseline (#31)
- Add ConfigurationException class in src/Exception/ConfigurationException.php
- Update ServerBuilder to use the new ConfigurationException
- Regenerate PHPStan baseline to account for the new exception class,
  reducing errors from 160+ to 124
2025-09-04 23:43:12 +02:00
Christopher Hertel
7eaca45860
Remove outdated docs (#32) 2025-09-04 23:40:40 +02:00
Kyrian Obikwelu
5bda030630
fix: correct namespace and import paths in README Quick Start example (#23) 2025-09-04 23:39:30 +02:00
Oskar Stark
580ce38d26
[CI] Validate composer.json file before install (#29) 2025-09-04 23:33:43 +02:00
Oskar Stark
af5690d4c3
Require Symfony 7.3 instead of unmaintained versions (#26) 2025-09-04 23:29:59 +02:00
Oskar Stark
57ccb5bcf7
Remove unused nyholm/nsa dependency (#28) 2025-09-04 23:29:37 +02:00
Oskar Stark
a5f9d5647d
Fix typos in documentation and configuration files (#25)
- Fix grammar in doc/index.rst: "There two types" → "There are two types"
- Fix grammar in doc/index.rst: "if non of" → "if none of"
- Fix grammar in phpstan.dist.neon: "This errors" → "These errors"
- Fix grammar in examples/09-standalone-cli/README.md: "test add" → "test by adding"
- Fix sentence structure in examples/README.md for better readability

Signed-off-by: Oskar Stark <oskarstark@googlemail.com>
2025-09-04 23:25:49 +02:00
Oskar Stark
87d5592830
Update actions/checkout from v4 to v5 (#24) 2025-09-04 23:25:29 +02:00
Oskar Stark
a027ae4de3
Remove unused development dependencies (#33)
Remove symfony/dependency-injection and symfony/event-dispatcher
from require-dev as they are not used in the codebase. The project
uses psr/event-dispatcher interface instead of symfony's implementation.
2025-09-04 23:24:34 +02:00
Oskar Stark
226bc96ae0
Fix JSON formatting (#22)
* Fix JSON formatting and clean up PHP code snippet

* Update README.md
2025-09-04 23:11:04 +02:00
Christopher Hertel
4fef07d0f3
Add note about minimum stability to README (#21)
* Add note about minimum stability to README

* Remove unnecessary blank line.
2025-09-04 16:15:58 +02:00
Roman Pronskiy
8985be6af3
Add roadmap to readme (#20)
* Update README.md

Add roadmap
Add a basic example
Fix default NullLogger() in ServerBuilder

* Update README.md

Update intro
Add roadmap
Add a basic example
Fix default NullLogger() in ServerBuilder
Add Credits

* Update src/Server/ServerBuilder.php

Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>

* Fix code review comments

---------

Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>
2025-09-04 15:49:16 +02:00
Christopher Hertel
4812b563a1 Fix manual registration of capabilities via ServerBuilder 2025-09-03 16:03:42 +02:00
Christopher Hertel
91323d36a0
Add WIP note to readme 2025-08-29 11:34:00 +02:00
Christopher Hertel
2ef051a355
Adopt server examples 2025-08-29 11:19:51 +02:00
Christopher Hertel
da0d5a87a0
Introduce Capability Registry & Discovery 2025-08-29 11:18:33 +02:00
Christopher Hertel
09707b4798
Adopt Schema component in server handlers 2025-08-29 11:12:23 +02:00
Christopher Hertel
6025f890f9
Introduce schema component 2025-08-29 11:11:20 +02:00
Christopher Hertel
ee0dffe369
Kick off the SDK based on Symfony's MCP SDK 2025-08-29 11:09:16 +02:00
Christopher Hertel
0044ffb365
Add README 2025-07-25 11:30:23 +02:00