- M5-008: Add session-hardening.test.ts verifying /model switch, /agent switch, session resume with conversationHistory, and metrics tracking (tokens + message count) - M6-001: Install bullmq, configure connection via VALKEY_URL (redis://localhost:6380) - M6-002: Create QueueService (apps/gateway/src/queue/) with typed job definitions (SummarizationJob, GCJob, TierManagementJob), worker registration with exponential backoff, queue health status, and admin API helpers (listJobs, retryJob, pause/resume) - M6-003: Migrate summarization cron → BullMQ repeatable job (SUMMARIZATION_CRON env) - M6-004: Migrate session GC cron → BullMQ repeatable job (SESSION_GC_CRON env) - M6-005: Migrate tier management cron → BullMQ repeatable job (TIER_MANAGEMENT_CRON env) - Add AdminJobsController for queue/job management at /api/admin/jobs - All three quality gates pass: typecheck, lint, format:check - 319 tests pass Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
63 lines
2.1 KiB
TypeScript
63 lines
2.1 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { APP_GUARD } from '@nestjs/core';
|
|
import { HealthController } from './health/health.controller.js';
|
|
import { DatabaseModule } from './database/database.module.js';
|
|
import { AuthModule } from './auth/auth.module.js';
|
|
import { BrainModule } from './brain/brain.module.js';
|
|
import { AgentModule } from './agent/agent.module.js';
|
|
import { ChatModule } from './chat/chat.module.js';
|
|
import { ConversationsModule } from './conversations/conversations.module.js';
|
|
import { ProjectsModule } from './projects/projects.module.js';
|
|
import { MissionsModule } from './missions/missions.module.js';
|
|
import { TasksModule } from './tasks/tasks.module.js';
|
|
import { CoordModule } from './coord/coord.module.js';
|
|
import { MemoryModule } from './memory/memory.module.js';
|
|
import { LogModule } from './log/log.module.js';
|
|
import { SkillsModule } from './skills/skills.module.js';
|
|
import { PluginModule } from './plugin/plugin.module.js';
|
|
import { McpModule } from './mcp/mcp.module.js';
|
|
import { AdminModule } from './admin/admin.module.js';
|
|
import { CommandsModule } from './commands/commands.module.js';
|
|
import { PreferencesModule } from './preferences/preferences.module.js';
|
|
import { GCModule } from './gc/gc.module.js';
|
|
import { ReloadModule } from './reload/reload.module.js';
|
|
import { WorkspaceModule } from './workspace/workspace.module.js';
|
|
import { QueueModule } from './queue/queue.module.js';
|
|
import { ThrottlerGuard, ThrottlerModule } from '@nestjs/throttler';
|
|
|
|
@Module({
|
|
imports: [
|
|
ThrottlerModule.forRoot([{ name: 'default', ttl: 60_000, limit: 60 }]),
|
|
DatabaseModule,
|
|
AuthModule,
|
|
BrainModule,
|
|
AgentModule,
|
|
ChatModule,
|
|
ConversationsModule,
|
|
ProjectsModule,
|
|
MissionsModule,
|
|
TasksModule,
|
|
CoordModule,
|
|
MemoryModule,
|
|
LogModule,
|
|
SkillsModule,
|
|
PluginModule,
|
|
McpModule,
|
|
AdminModule,
|
|
PreferencesModule,
|
|
CommandsModule,
|
|
GCModule,
|
|
QueueModule,
|
|
ReloadModule,
|
|
WorkspaceModule,
|
|
],
|
|
controllers: [HealthController],
|
|
providers: [
|
|
{
|
|
provide: APP_GUARD,
|
|
useClass: ThrottlerGuard,
|
|
},
|
|
],
|
|
})
|
|
export class AppModule {}
|