All checks were successful
ci/woodpecker/push/api Pipeline was successful
- 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>
41 lines
599 B
TypeScript
41 lines
599 B
TypeScript
import {
|
|
IsString,
|
|
IsOptional,
|
|
MinLength,
|
|
MaxLength,
|
|
IsInt,
|
|
Min,
|
|
Max,
|
|
IsNumber,
|
|
} from "class-validator";
|
|
import { Type } from "class-transformer";
|
|
|
|
/**
|
|
* DTO for semantic search across conversation archives
|
|
*/
|
|
export class SearchConversationDto {
|
|
@IsString()
|
|
@MinLength(1)
|
|
@MaxLength(1000)
|
|
query!: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(500)
|
|
agentId?: string;
|
|
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsInt()
|
|
@Min(1)
|
|
@Max(100)
|
|
limit?: number;
|
|
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsNumber()
|
|
@Min(0)
|
|
@Max(1)
|
|
similarityThreshold?: number;
|
|
}
|