Add Phantom.Test framework for asserting on tools, prompts, and resources#22
Draft
dbernheisel wants to merge 1 commit intomainfrom
Draft
Add Phantom.Test framework for asserting on tools, prompts, and resources#22dbernheisel wants to merge 1 commit intomainfrom
dbernheisel wants to merge 1 commit intomainfrom
Conversation
555d41b to
fd77ce5
Compare
fd77ce5 to
b319989
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #15.
Phantom.Testis a framework for unit-testing MCP routers without booting an HTTP transport.call_tool,read_resource,get_prompt,complete_prompt,complete_resource,list_resources) return the final response whether the handler replied sync or async viaSession.respond/2.:elicitation_required, progress notifications, client logs) live on the same module.expect_elicit/1/expect_elicit_url/1settle handlers that block onSession.elicit/2(sync or from a spawnedTask).phoenix_pubsubstays optional.Phantom.Test.start/1only startsPhantom.Trackerwhen:pubsubis passed.Phantom.Test.TimeoutErrorraised at the call site when an async handler doesn't respond in:timeout(default 1000ms).Phantom.Test.Conn(transport-level escape hatch) is not in this PR — the existing internal dispatcher still backs the library's own integration tests.