Events can now come from streams outside the server. @events.source registers a long-lived listener, such as a websocket to a firehose, that emits events as they arrive. The server runs one copy of it however many clients subscribe, restarts it from the position it last saved when it fails, and, when replicas share an event log, runs it on one replica at a time. On hosts that can't keep work running between requests, pass EventsExtension(sources=False) and run the sources in a worker with events.run_sources().
DocketEventLog is now RedisEventLog. Import it from fastmcp_events.redis_log and install it with fastmcp-events[redis] instead of fastmcp-events[docket]. The old name has no alias, so change the import and the extra. The log uses the same Redis keys as before, so existing events and client cursors carry over.
This prerelease also rejects mounts that would make a server contain itself, raises when a background task's result doesn't match the tool's output schema (as call_tool already did), sends elicitation responses under the schema's property names, and adds max_request_body_size to http_app().
Thanks to our 16 contributors, including 8 first-time contributors.
What's Changed
Enhancements ✨
- Require the triage reviewer on every PR head by @zzstoatzz in #6897
- Add webhook delivery to fastmcp-events by @zzstoatzz in #6846
- Exempt PrefectHQ org members from the issue-link gate by @zzstoatzz in #6942
- Run outside-stream listeners as event sources by @zzstoatzz in #7014
Fixes 🐞
- Skip legacy backends and omit invalid entries in proxied skills/list by @parkedwards in #6828
- Accept percent-encoded slashes in skill path prefixes by @parkedwards in #6827
- fix(skills): sanitize proxy validation warnings by @jlowin in #6830
- Refuse subscription arguments for event types without for_subscription by @zzstoatzz in #6847
- Close refresh token revocation races in OAuthProxy by @zzstoatzz, @Pipe5linger, and @Mirabis in #6840
- Hide credentials in TaskContextSnapshot repr by @zzstoatzz, @abhishekrajv7-cmd, and @soarkit in #6851
- Fix lifespan shutdown crash when a lifespan holds a task group by @zzstoatzz in #6864
- Fix generate-cli type labels for optional and union parameters by @andreivince in #6403
- test: skip symlink privilege tests on Windows (#6365) by @mohitdixit02 in #6381
- Send elicitation responses under the schema's property names by @AarnavNoble in #6567
- Order OpenAPI schema definitions by component order by @hanneslipusch in #6842
- Reject circular server mounts before attachment by @its-amann in #6784
- Validate explicit task results against output schemas by @GoldArowana in #6467
- fix: suffix colliding sanitized parameter names in generate-cli by @IhateStomachProblems in #6670
- fix: preserve untyped object extras with an empty schema by @qyf700 in #6569
- Accept max_request_body_size in http_app() by @andreivince in #6804
Docs 📚
- Say what changed for events since 4.2.5 in the v4.2.6 notes by @zzstoatzz in #6811
- docs: explain dynamic skills over MCP by @jlowin in #6829
- docs: add v4.2.7a1 changelog entries by @jlowin in #6831
- Explain the automatic PR review in plain words by @zzstoatzz in #6901
- Release skill: send a direct link to every approval by @zzstoatzz in #6919
- docs: add v4.2.7a2 changelog entries by @zzstoatzz in #6921
- docs: add v3.4.12 changelog entries by @zzstoatzz in #6951
Other Changes 🦾
- fix: skip yanked releases in the PyPI version check by @AP24110011695 in #6585
New Contributors
- @Pipe5linger made their first contribution in #6840
- @Mirabis made their first contribution in #6840
- @abhishekrajv7-cmd made their first contribution in #6851
- @hanneslipusch made their first contribution in #6842
- @its-amann made their first contribution in #6784
- @GoldArowana made their first contribution in #6467
- @IhateStomachProblems made their first contribution in #6670
- @qyf700 made their first contribution in #6569
Full Changelog: v4.2.6...v4.2.7a3