- Add ConversationArchive Prisma model with pgvector(1536) embedding field - Migration: 20260228000000_ms22_conversation_archive - NestJS module at apps/api/src/conversation-archive/ with service, controller, DTOs, spec - POST /api/conversations/ingest — ingest session logs, auto-embed via EmbeddingService - POST /api/conversations/search — vector similarity search with agentId filter - GET /api/conversations — paginated list with agentId + date range filters - GET /api/conversations/:id — fetch full conversation including messages - Register ConversationArchiveModule in app.module.ts - 8 unit tests, all passing (vitest) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
594 B
TypeScript
34 lines
594 B
TypeScript
import { IsString, IsOptional, MaxLength, IsInt, Min, Max, IsDateString } from "class-validator";
|
|
import { Type } from "class-transformer";
|
|
|
|
/**
|
|
* DTO for listing/filtering conversation archives
|
|
*/
|
|
export class ListConversationsDto {
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(500)
|
|
agentId?: string;
|
|
|
|
@IsOptional()
|
|
@IsDateString()
|
|
startedAfter?: string;
|
|
|
|
@IsOptional()
|
|
@IsDateString()
|
|
startedBefore?: string;
|
|
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsInt()
|
|
@Min(1)
|
|
page?: number;
|
|
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsInt()
|
|
@Min(1)
|
|
@Max(100)
|
|
limit?: number;
|
|
}
|