2026-05-04 16:09:01 +08:00
|
|
|
{
|
|
|
|
|
"name": "api-server",
|
|
|
|
|
"version": "0.0.1",
|
|
|
|
|
"description": "",
|
|
|
|
|
"author": "",
|
|
|
|
|
"private": true,
|
|
|
|
|
"license": "UNLICENSED",
|
|
|
|
|
"scripts": {
|
|
|
|
|
"build": "nest build",
|
|
|
|
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
|
|
|
"start": "nest start",
|
|
|
|
|
"start:dev": "nest start --watch",
|
|
|
|
|
"start:debug": "nest start --debug --watch",
|
|
|
|
|
"start:prod": "node dist/main",
|
|
|
|
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
|
|
|
"test": "jest",
|
|
|
|
|
"test:watch": "jest --watch",
|
|
|
|
|
"test:cov": "jest --coverage",
|
|
|
|
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
2026-05-21 15:05:31 +08:00
|
|
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
|
|
|
"seed": "npx ts-node --compiler-options '{\"module\":\"commonjs\"}' prisma/seed.ts"
|
|
|
|
|
},
|
|
|
|
|
"prisma": {
|
|
|
|
|
"seed": "npx ts-node --compiler-options '{\"module\":\"commonjs\"}' prisma/seed.ts"
|
2026-05-04 16:09:01 +08:00
|
|
|
},
|
|
|
|
|
"dependencies": {
|
2026-05-09 18:25:04 +08:00
|
|
|
"@bull-board/nestjs": "^7.0.0",
|
|
|
|
|
"@nestjs/bullmq": "^11.0.4",
|
2026-05-04 16:09:01 +08:00
|
|
|
"@nestjs/common": "^11.0.1",
|
2026-05-09 18:25:04 +08:00
|
|
|
"@nestjs/config": "^4.0.4",
|
2026-05-04 16:09:01 +08:00
|
|
|
"@nestjs/core": "^11.0.1",
|
2026-05-22 22:22:25 +08:00
|
|
|
"@nestjs/event-emitter": "^3.1.0",
|
2026-05-09 18:25:04 +08:00
|
|
|
"@nestjs/jwt": "^11.0.2",
|
2026-05-09 18:57:33 +08:00
|
|
|
"@nestjs/passport": "^11.0.5",
|
2026-05-04 16:09:01 +08:00
|
|
|
"@nestjs/platform-express": "^11.0.1",
|
|
|
|
|
"@nestjs/swagger": "^11.4.2",
|
2026-05-09 18:57:33 +08:00
|
|
|
"@nestjs/throttler": "^6.5.0",
|
2026-05-13 15:35:41 +08:00
|
|
|
"@prisma/client": "^5.22.0",
|
feat: M1-01~03 — AI Gateway deepening, Vector module, Task Queue deepening
M1-01 AI Gateway:
- DB-driven ModelRoute/ProviderConfig/FallbackEvent tables
- ModelRouter rewrite with loadFromDb() hot-reload
- Fallback event recording + AIUsageRecorded event publishing
- Admin AAPI: routes CRUD, provider enable/disable, fallback events log
M1-02 Vector & Retrieval:
- VectorService with Qdrant client (upsert/delete/search/rerank)
- Admin AAPI: collection status, vector count, reindex trigger
M1-03 Task Queue:
- 16 task types with default retry/timeout configs
- Task stats dashboard, worker status panel, batch retry endpoint
M0 audit fixes:
- ApiMetric retention policy (30-day cleanup)
- Content Safety integration in Files module
- Queue registration centralized (domain-events)
- SECRET_MASTER_KEY production validation
E2E tests:
- M0: 28 smoke tests covering all 14 M0 issues
- M1: 16 tests covering M1-01/02/03
- Mock infrastructure: prisma, ioredis, jose, bullmq, qdrant
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 10:18:07 +08:00
|
|
|
"@qdrant/js-client-rest": "^1.18.0",
|
2026-05-09 18:57:33 +08:00
|
|
|
"bcryptjs": "^3.0.3",
|
2026-05-04 16:09:01 +08:00
|
|
|
"class-transformer": "^0.5.1",
|
|
|
|
|
"class-validator": "^0.15.1",
|
2026-05-17 22:30:14 +08:00
|
|
|
"cos-nodejs-sdk-v5": "^2.15.4",
|
2026-05-09 18:57:33 +08:00
|
|
|
"helmet": "^8.1.0",
|
2026-05-09 18:25:04 +08:00
|
|
|
"ioredis": "^5.10.1",
|
2026-05-13 17:31:50 +08:00
|
|
|
"jose": "^6.2.3",
|
2026-05-09 18:57:33 +08:00
|
|
|
"passport": "^0.7.0",
|
|
|
|
|
"passport-jwt": "^4.0.1",
|
2026-05-04 16:09:01 +08:00
|
|
|
"reflect-metadata": "^0.2.2",
|
|
|
|
|
"rxjs": "^7.8.1",
|
2026-05-17 00:39:46 +08:00
|
|
|
"swagger-ui-express": "^5.0.1",
|
|
|
|
|
"zod": "^4.4.3"
|
2026-05-04 16:09:01 +08:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
|
|
|
|
"@eslint/eslintrc": "^3.2.0",
|
|
|
|
|
"@eslint/js": "^9.18.0",
|
|
|
|
|
"@nestjs/cli": "^11.0.0",
|
|
|
|
|
"@nestjs/schematics": "^11.0.0",
|
|
|
|
|
"@nestjs/testing": "^11.0.1",
|
2026-05-09 18:57:33 +08:00
|
|
|
"@types/bcryptjs": "^2.4.6",
|
2026-05-04 16:09:01 +08:00
|
|
|
"@types/express": "^5.0.0",
|
|
|
|
|
"@types/jest": "^30.0.0",
|
2026-05-09 18:25:04 +08:00
|
|
|
"@types/node": "^24.12.3",
|
2026-05-09 18:57:33 +08:00
|
|
|
"@types/passport-jwt": "^4.0.1",
|
2026-05-04 16:09:01 +08:00
|
|
|
"@types/supertest": "^7.0.0",
|
2026-05-09 18:25:04 +08:00
|
|
|
"bullmq": "^5.76.6",
|
2026-05-04 16:09:01 +08:00
|
|
|
"eslint": "^9.18.0",
|
|
|
|
|
"eslint-config-prettier": "^10.0.1",
|
|
|
|
|
"eslint-plugin-prettier": "^5.2.2",
|
|
|
|
|
"globals": "^17.0.0",
|
|
|
|
|
"jest": "^30.0.0",
|
|
|
|
|
"prettier": "^3.4.2",
|
2026-05-09 18:25:04 +08:00
|
|
|
"prisma": "^5.22.0",
|
2026-05-04 16:09:01 +08:00
|
|
|
"source-map-support": "^0.5.21",
|
|
|
|
|
"supertest": "^7.0.0",
|
|
|
|
|
"ts-jest": "^29.2.5",
|
|
|
|
|
"ts-loader": "^9.5.2",
|
|
|
|
|
"ts-node": "^10.9.2",
|
|
|
|
|
"tsconfig-paths": "^4.2.0",
|
|
|
|
|
"typescript": "^5.7.3",
|
|
|
|
|
"typescript-eslint": "^8.20.0"
|
|
|
|
|
},
|
|
|
|
|
"jest": {
|
|
|
|
|
"moduleFileExtensions": [
|
|
|
|
|
"js",
|
|
|
|
|
"json",
|
|
|
|
|
"ts"
|
|
|
|
|
],
|
|
|
|
|
"rootDir": "src",
|
|
|
|
|
"testRegex": ".*\\.spec\\.ts$",
|
|
|
|
|
"transform": {
|
|
|
|
|
"^.+\\.(t|j)s$": "ts-jest"
|
|
|
|
|
},
|
|
|
|
|
"collectCoverageFrom": [
|
|
|
|
|
"**/*.(t|j)s"
|
|
|
|
|
],
|
|
|
|
|
"coverageDirectory": "../coverage",
|
|
|
|
|
"testEnvironment": "node"
|
|
|
|
|
}
|
|
|
|
|
}
|