refactor(server): simplify typed plugin host - #50
Merged
Conversation
zaxovaiko
requested review from
agniev-a-hub and
klaudia-blazyczek-blurify
as code owners
August 4, 2026 15:59
The prior commit renamed definePlugin to definePluginWithCatalog and
Container's constructor to createContainer across every core plugin,
which also broke the pnpm gen plugin/module scaffolds (they still call
definePlugin({...}) directly). Restore the original identifiers -
definePlugin is now overloaded to support both the plain uncatalogued
call and definePlugin<Catalog>()({...}) for catalog-constrained
container access, and Container keeps its public constructor. Also
fixes a real generic-inference bug in provide()/Container.get() that
collapsed a factory's container view to a union of every catalog value
instead of the one requested token.
zaxovaiko
marked this pull request as draft
August 4, 2026 18:27
Every top-of-file seam rationale and inline field-level explanation in contracts/adapters was a plain // comment. Convert them to /** */ JSDoc directly above the file/type/field they describe, so editors surface them on hover; no content removed, only reformatted.
zaxovaiko
marked this pull request as ready for review
August 4, 2026 21:14
zaxovaiko
force-pushed
the
feat/typed-plugin-container-safety
branch
from
August 4, 2026 21:15
236e21b to
d41a4c0
Compare
marek-chmielowski-blurify
self-requested a review
August 5, 2026 13:13
marek-chmielowski-blurify
previously approved these changes
Aug 5, 2026
dev added QA fixtures using the old definePlugin() factory after this branch removed it in favor of the typed Plugin<Catalog> object pattern.
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.
Summary
Simplify the typed plugin host around the existing catalog-constrained container.
Changes
definePlugin, typed container access, routes, events, jobs, and MCP registrationVerification
pnpm verifypnpm check:drift