Browse Source

Feature/scaffold CSV Import Auditor module

Add ImportAuditorModule skeleton with health endpoint for the
CSV Import Auditor reasoning agent. This is the foundation for
a deterministic validation pipeline that safely handles broker
CSV transaction imports.

- Add zod and langfuse dependencies
- Create ImportAuditorModule with controller and service
- Register module in AppModule
- Health endpoint at GET /api/v1/import-auditor/health

Co-authored-by: Cursor <cursoragent@cursor.com>
pull/6387/head
Stefano Caruso 1 month ago
parent
commit
91643ff427
  1. 2
      apps/api/src/app/app.module.ts
  2. 15
      apps/api/src/app/import-auditor/import-auditor.controller.ts
  3. 11
      apps/api/src/app/import-auditor/import-auditor.module.ts
  4. 8
      apps/api/src/app/import-auditor/import-auditor.service.ts
  5. 49
      package-lock.json
  6. 2
      package.json

2
apps/api/src/app/app.module.ts

@ -45,6 +45,7 @@ import { WatchlistModule } from './endpoints/watchlist/watchlist.module';
import { ExchangeRateModule } from './exchange-rate/exchange-rate.module';
import { ExportModule } from './export/export.module';
import { HealthModule } from './health/health.module';
import { ImportAuditorModule } from './import-auditor/import-auditor.module';
import { ImportModule } from './import/import.module';
import { InfoModule } from './info/info.module';
import { LogoModule } from './logo/logo.module';
@ -90,6 +91,7 @@ import { UserModule } from './user/user.module';
ExportModule,
GhostfolioModule,
HealthModule,
ImportAuditorModule,
ImportModule,
InfoModule,
LogoModule,

15
apps/api/src/app/import-auditor/import-auditor.controller.ts

@ -0,0 +1,15 @@
import { Controller, Get } from '@nestjs/common';
import { ImportAuditorService } from './import-auditor.service';
@Controller('import-auditor')
export class ImportAuditorController {
public constructor(
private readonly importAuditorService: ImportAuditorService
) {}
@Get('health')
public getHealth(): { status: string } {
return this.importAuditorService.getHealth();
}
}

11
apps/api/src/app/import-auditor/import-auditor.module.ts

@ -0,0 +1,11 @@
import { Module } from '@nestjs/common';
import { ImportAuditorController } from './import-auditor.controller';
import { ImportAuditorService } from './import-auditor.service';
@Module({
controllers: [ImportAuditorController],
exports: [ImportAuditorService],
providers: [ImportAuditorService]
})
export class ImportAuditorModule {}

8
apps/api/src/app/import-auditor/import-auditor.service.ts

@ -0,0 +1,8 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class ImportAuditorService {
public getHealth(): { status: string } {
return { status: 'OK' };
}
}

49
package-lock.json

@ -69,6 +69,7 @@
"http-status-codes": "2.3.0",
"ionicons": "8.0.13",
"jsonpath": "1.1.1",
"langfuse": "^3.38.6",
"lodash": "4.17.23",
"marked": "17.0.2",
"ms": "3.0.0-canary.1",
@ -90,6 +91,7 @@
"tablemark": "4.1.0",
"twitter-api-v2": "1.29.0",
"yahoo-finance2": "3.13.0",
"zod": "^3.25.76",
"zone.js": "0.16.0"
},
"devDependencies": {
@ -24843,6 +24845,30 @@
"node": ">= 0.6"
}
},
"node_modules/langfuse": {
"version": "3.38.6",
"resolved": "https://registry.npmjs.org/langfuse/-/langfuse-3.38.6.tgz",
"integrity": "sha512-mtwfsNGIYvObRh+NYNGlJQJDiBN+Wr3Hnr++wN25mxuOpSTdXX+JQqVCyAqGL5GD2TAXRZ7COsN42Vmp9krYmg==",
"license": "MIT",
"dependencies": {
"langfuse-core": "^3.38.6"
},
"engines": {
"node": ">=18"
}
},
"node_modules/langfuse-core": {
"version": "3.38.6",
"resolved": "https://registry.npmjs.org/langfuse-core/-/langfuse-core-3.38.6.tgz",
"integrity": "sha512-EcZXa+DK9FJdi1I30+u19eKjuBJ04du6j2Nybk19KKCuraLczg/ppkTQcGvc4QOk//OAi3qUHrajUuV74RXsBQ==",
"license": "MIT",
"dependencies": {
"mustache": "^4.2.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/langium": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/langium/-/langium-3.3.1.tgz",
@ -26150,6 +26176,15 @@
"multicast-dns": "cli.js"
}
},
"node_modules/mustache": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz",
"integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==",
"license": "MIT",
"bin": {
"mustache": "bin/mustache"
}
},
"node_modules/mute-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz",
@ -32296,13 +32331,13 @@
}
},
"node_modules/swr": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/swr/-/swr-2.3.4.tgz",
"integrity": "sha512-bYd2lrhc+VarcpkgWclcUi92wYCpOgMws9Sd1hG1ntAu0NEy+14CbotuFjshBU2kt9rYj9TSmDcybpxpeTU1fg==",
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/swr/-/swr-2.4.0.tgz",
"integrity": "sha512-sUlC20T8EOt1pHmDiqueUWMmRRX03W7w5YxovWX7VR2KHEPCTMly85x05vpkP5i6Bu4h44ePSMD9Tc+G2MItFw==",
"license": "MIT",
"dependencies": {
"dequal": "^2.0.3",
"use-sync-external-store": "^1.4.0"
"use-sync-external-store": "^1.6.0"
},
"peerDependencies": {
"react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
@ -33934,9 +33969,9 @@
}
},
"node_modules/use-sync-external-store": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz",
"integrity": "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==",
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz",
"integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==",
"license": "MIT",
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"

2
package.json

@ -114,6 +114,7 @@
"http-status-codes": "2.3.0",
"ionicons": "8.0.13",
"jsonpath": "1.1.1",
"langfuse": "^3.38.6",
"lodash": "4.17.23",
"marked": "17.0.2",
"ms": "3.0.0-canary.1",
@ -135,6 +136,7 @@
"tablemark": "4.1.0",
"twitter-api-v2": "1.29.0",
"yahoo-finance2": "3.13.0",
"zod": "^3.25.76",
"zone.js": "0.16.0"
},
"devDependencies": {

Loading…
Cancel
Save