* [AI] Fix API build output path (dist/index.js instead of dist/api/index.js)
- Set rootDir in packages/api/tsconfig.json so output is under dist/ not dist/api/
- Remove loot-core pegjs.ts from include; add local typings/pegjs.d.ts
- Use mkdir -p in build:migrations for idempotent build
- Exclude **/@types/** so declaration output does not conflict with input
Made-with: Cursor
* Update TypeScript configuration in api package to refine exclude patterns