Files
ForgeBase/Max API/src/sessions/dto/level-turn-response.dto.ts
T
williamandClaude Sonnet 5 755bc07d18 feat(sessions): wire Agents 2-4 into the pipeline orchestration
confirmObjective() now chains Agent 2 (mapping) then starts Agent 3
(level) synchronously after Agent 1 confirms - by the time the HTTP
response returns, session.status is already "level_assessment" and
the response carries Agent 3's first question in a new "nextPrompt"
field, to be spoken aloud (never displayed as text).

New endpoints: POST /sessions/:id/level/confirm (runs Agent 4, advances
to "planning") and POST /sessions/:id/level/dispute. routeIncomingMessage
dispatches "level_assessment" sessions to LevelAgent.converse(), same
single entry point used for text and voice.

RouteMessageResponseDto gains levelDone/levelProfile fields: every
response field is a structured, typed signal the frontend's main
process can branch on to decide whether to open a result window - never
an instruction embedded in the LLM's reply text.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-02 09:48:10 +01:00

31 lines
906 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
export class LevelGapDto {
@ApiProperty() concept!: string;
@ApiProperty() description!: string;
}
export class LevelProfileDto {
@ApiProperty({ type: [String] }) mastered!: string[];
@ApiProperty({ type: [LevelGapDto] }) gaps!: LevelGapDto[];
@ApiProperty({ type: [String] }) unknown!: string[];
@ApiProperty({ enum: ['beginner', 'intermediate', 'advanced'] })
overallLevel!: 'beginner' | 'intermediate' | 'advanced';
}
export class LevelTurnResponseDto {
@ApiProperty({
description: 'Question de Max, ou transition une fois le profil pret.',
})
reply!: string;
@ApiProperty({
description:
'true une fois les 3-5 questions posees et le profil pret a etre confirme via POST /sessions/:id/level/confirm.',
})
done!: boolean;
@ApiProperty({ type: LevelProfileDto, required: false })
profile?: LevelProfileDto;
}