fix: switch gateway to ESM + explicit @Inject for tsx compatibility
Pi SDK is ESM-only. tsx (esbuild) doesn't emit decorator metadata, so NestJS constructor injection fails without explicit @Inject(). - Set "type": "module" in gateway package.json - Switch tsconfig to NodeNext module resolution - Add @Inject(AgentService) to ChatController and ChatGateway Tested end-to-end: REST /api/chat → Pi SDK → Anthropic → response OK. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
"name": "@mosaic/gateway",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "dist/main.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
|
||||
Reference in New Issue
Block a user