Two bugs found during E2E smoke testing that prevent gateway startup:
PLUGIN_REGISTRY circular reference — plugin.service.ts imports from plugin.module.ts which imports plugin.service.ts. Extracted PLUGIN_REGISTRY symbol to plugin.tokens.ts (same pattern as auth.tokens.ts, brain.tokens.ts).
AuthStorage.create() silent exit — Pi SDK file-based auth resolves ~/.pi/auth.json causing silent process exit. Replaced with AuthStorage.inMemory() since gateway manages API keys via env vars.
Test plan
Gateway starts without crash
Plugins load when tokens are set
LLM providers register correctly
## Summary
Two bugs found during E2E smoke testing that prevent gateway startup:
1. **PLUGIN_REGISTRY circular reference** — plugin.service.ts imports from plugin.module.ts which imports plugin.service.ts. Extracted PLUGIN_REGISTRY symbol to plugin.tokens.ts (same pattern as auth.tokens.ts, brain.tokens.ts).
2. **AuthStorage.create() silent exit** — Pi SDK file-based auth resolves ~/.pi/auth.json causing silent process exit. Replaced with AuthStorage.inMemory() since gateway manages API keys via env vars.
## Test plan
- [ ] Gateway starts without crash
- [ ] Plugins load when tokens are set
- [ ] LLM providers register correctly
BUG-1: Extract PLUGIN_REGISTRY to plugin.tokens.ts to break ESM
circular reference between plugin.module.ts and plugin.service.ts.
Was causing ReferenceError at startup.
BUG-2: Replace AuthStorage.create() with AuthStorage.inMemory() in
ProviderService. The file-based auth storage resolves ~/.pi/auth.json
which causes silent process exit in server context.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Two bugs found during E2E smoke testing that prevent gateway startup:
PLUGIN_REGISTRY circular reference — plugin.service.ts imports from plugin.module.ts which imports plugin.service.ts. Extracted PLUGIN_REGISTRY symbol to plugin.tokens.ts (same pattern as auth.tokens.ts, brain.tokens.ts).
AuthStorage.create() silent exit — Pi SDK file-based auth resolves ~/.pi/auth.json causing silent process exit. Replaced with AuthStorage.inMemory() since gateway manages API keys via env vars.
Test plan