Skip to content

refactor(server): simplify typed plugin host - #50

Merged
zaxovaiko merged 9 commits into
devfrom
feat/typed-plugin-container-safety
Aug 5, 2026
Merged

refactor(server): simplify typed plugin host#50
zaxovaiko merged 9 commits into
devfrom
feat/typed-plugin-container-safety

Conversation

@zaxovaiko

@zaxovaiko zaxovaiko commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

Simplify the typed plugin host around the existing catalog-constrained container.

Changes

  • retain definePlugin, typed container access, routes, events, jobs, and MCP registration
  • remove duplicate dependency graph metadata and unused slot surfaces
  • keep load ordering derived only from plugin descriptors

Verification

  • pnpm verify
  • pnpm check:drift

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
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
zaxovaiko marked this pull request as ready for review August 4, 2026 21:14
@zaxovaiko zaxovaiko changed the title fix: enforce typed plugin container access refactor(server): simplify typed plugin host Aug 4, 2026
@zaxovaiko
zaxovaiko force-pushed the feat/typed-plugin-container-safety branch from 236e21b to d41a4c0 Compare August 4, 2026 21:15
dev added QA fixtures using the old definePlugin() factory after this
branch removed it in favor of the typed Plugin<Catalog> object pattern.
@zaxovaiko
zaxovaiko merged commit 2617721 into dev Aug 5, 2026
2 checks passed
@zaxovaiko
zaxovaiko deleted the feat/typed-plugin-container-safety branch August 5, 2026 20:03
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.

2 participants