You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add globalConfigSourceRegistry to match middleware pattern (#206)
* Add globalConfigSourceRegistry to match middleware registry pattern
Add a global ConfigSourceRegistry singleton that resolveConfig() auto-includes,
matching the existing globalMiddlewareRegistry and globalAuthMiddlewareRegistry
patterns. This eliminates the need to manually pass plugin config sources to
every resolveConfig()/loadConfig() call.
Changes:
- New ConfigSourceRegistry class with register/unregister/getSources/clear
- resolveConfig() auto-includes globalConfigSourceRegistry sources
- B2CPluginManager.applyMiddleware() registers config sources globally
- Simplified BaseCommand: removed getPluginSources() and pluginSources properties
- Simplified 6 loadConfig() callsites across CLI commands
- Deprecated PluginSources type in cli/config.ts
- VS Code extension: removed resolveConfigWithPlugins() wrapper
- Fixes MCP server bug where plugin config sources were silently dropped
* Isolate tests from developer environment (plugin hooks and global registries)
Add B2C_SKIP_PLUGIN_HOOKS env var guard to all three collectPlugin* methods
in BaseCommand to prevent real plugins (keychain, password-store, etc.) from
running during tests. Add mocha root hooks to CLI, MCP, and SDK packages that
set this env var and clear global registries before each test.
This fixes a pre-existing test isolation issue where locally installed plugins
could pollute test state, made visible by the globalConfigSourceRegistry
addition (plugin config sources accumulated O(N^2) across N tests).
* Add changeset for globalConfigSourceRegistry and test isolation
Add `globalConfigSourceRegistry` for automatic plugin config source inclusion in `resolveConfig()`, matching the existing middleware registry pattern. Plugin config sources are now picked up automatically by all SDK consumers without manual plumbing. Also improves test isolation by preventing locally installed plugins from affecting test runs.
0 commit comments