The bootstrap hotfix PR #440 added `vitest.config.ts` to
apps/gateway/tsconfig.json's include list, which broke `pnpm build`
because the file sits outside `rootDir: src` and tsc emits TS6059
for anything in the program that isn't under rootDir.
The publish pipeline runs `pnpm build` (via turbo) and failed on
main post-merge, blocking the mosaic-v0.0.26 release. The CI
workflow passed because it only runs typecheck/lint/format/test
(typecheck uses tsconfig.typecheck.json with rootDir=../..).
Vitest doesn't need its config file in any tsconfig's program —
it loads the file directly via Node ESM. Reverting the include
line restores the build without affecting the new e2e test, which
lives at src/admin/bootstrap.e2e.spec.ts and is already picked up
by the src/**/* glob.
Verified locally: build ✓ typecheck ✓ 351 tests passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>