Skip to content

Conversation

@mattalline
Copy link

Due to the discussion in #32 I thought it may be worth actually exploring hooks that allow someone to perform anything they needed before a tool / resource / etc. are invoked instead of just auth concerns. Currently this draft PR is a bit more of a concrete example of what I was thinking rather than trying to put it into words for the thread linked above on the issue.

Items to implement

  • Add Tool
  • Add Resource (not sure on this)
  • Add Prompt (not sure on this)

Other Concerns

  • Tests likely need more attention
  • Would it be worth extracting the existing auth and/or adjusting it to use these style hooks?
  • Do we need hooks at other points of the fastify lifecycle

Comment on lines +214 to +215
let seenInGlobal: any = null
let seenInLocal: any = null
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally tried to have some types here but the current typescheck target was failing on the assertions below.

@mattalline
Copy link
Author

Closing this given it seems like this repo doesn't get much attention. Will explore forks or other methods of extending this elsewhere.

@mattalline mattalline closed this Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant