refactor: move agent evaluation to background jobs for non-blocking execution (#16234)

This commit is contained in:
Abdul Rahman
2025-12-03 10:25:47 +05:30
committed by GitHub
parent 05b30554c3
commit f248b3f7f4
11 changed files with 299 additions and 118 deletions
@@ -19,65 +19,65 @@ export class AgentMessagePartDTO {
@Field()
type: string;
@Field({ nullable: true })
textContent?: string;
@Field(() => String, { nullable: true })
textContent: string | null;
@Field({ nullable: true })
reasoningContent?: string;
@Field(() => String, { nullable: true })
reasoningContent: string | null;
@Field({ nullable: true })
toolName?: string;
@Field(() => String, { nullable: true })
toolName: string | null;
@Field({ nullable: true })
toolCallId?: string;
@Field(() => String, { nullable: true })
toolCallId: string | null;
@Field(() => GraphQLJSON, { nullable: true })
toolInput?: Record<string, unknown>;
toolInput: unknown | null;
@Field(() => GraphQLJSON, { nullable: true })
toolOutput?: Record<string, unknown>;
toolOutput: unknown | null;
@Field({ nullable: true })
state?: string;
@Field(() => String, { nullable: true })
state: string | null;
@Field({ nullable: true })
errorMessage?: string;
@Field(() => String, { nullable: true })
errorMessage: string | null;
@Field(() => GraphQLJSON, { nullable: true })
errorDetails?: Record<string, unknown>;
errorDetails: Record<string, unknown> | null;
@Field({ nullable: true })
sourceUrlSourceId?: string;
@Field(() => String, { nullable: true })
sourceUrlSourceId: string | null;
@Field({ nullable: true })
sourceUrlUrl?: string;
@Field(() => String, { nullable: true })
sourceUrlUrl: string | null;
@Field({ nullable: true })
sourceUrlTitle?: string;
@Field(() => String, { nullable: true })
sourceUrlTitle: string | null;
@Field({ nullable: true })
sourceDocumentSourceId?: string;
@Field(() => String, { nullable: true })
sourceDocumentSourceId: string | null;
@Field({ nullable: true })
sourceDocumentMediaType?: string;
@Field(() => String, { nullable: true })
sourceDocumentMediaType: string | null;
@Field({ nullable: true })
sourceDocumentTitle?: string;
@Field(() => String, { nullable: true })
sourceDocumentTitle: string | null;
@Field({ nullable: true })
sourceDocumentFilename?: string;
@Field(() => String, { nullable: true })
sourceDocumentFilename: string | null;
@Field({ nullable: true })
fileMediaType?: string;
@Field(() => String, { nullable: true })
fileMediaType: string | null;
@Field({ nullable: true })
fileFilename?: string;
@Field(() => String, { nullable: true })
fileFilename: string | null;
@Field({ nullable: true })
fileUrl?: string;
@Field(() => String, { nullable: true })
fileUrl: string | null;
@Field(() => GraphQLJSON, { nullable: true })
providerMetadata?: Record<string, unknown>;
providerMetadata: Record<string, unknown> | null;
@IsDateString()
@Field()