feat: archive mvp demo trace acceptance

This commit is contained in:
zhuyongxin
2026-07-03 16:25:00 +08:00
parent 5b827fe90e
commit 6919092b83
24 changed files with 1343 additions and 2 deletions
@@ -0,0 +1,102 @@
package com.superbiz.agent.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DiagnosisTraceResponse {
private SessionTrace session;
private List<AgentStepTrace> steps;
private List<ToolInvocationTrace> toolInvocations;
private TraceSummary summary;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class SessionTrace {
private Long id;
private String sessionId;
private String query;
private String status;
private String agentFlow;
private Integer totalDurationMs;
private Integer totalTokenCount;
private Integer stepCount;
private Integer toolCallCount;
private String answer;
private String selfEvaluationRaw;
private Map<String, Object> selfEvaluation;
private String feedback;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
}
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class AgentStepTrace {
private Long id;
private String sessionId;
private Integer stepIndex;
private String agentName;
private String modelInput;
private String modelOutput;
private String thought;
private Boolean hasToolCall;
private Integer durationMs;
private Integer tokenCount;
private LocalDateTime createdAt;
}
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class ToolInvocationTrace {
private Long id;
private String sessionId;
private Long stepId;
private String toolName;
private String inputParamsRaw;
private Map<String, Object> inputParams;
private String outputPreview;
private Integer outputLength;
private String retrievalLayer;
private Integer l0MatchCount;
private Integer l1MatchCount;
private Boolean truncated;
private String relevanceLevel;
private String dedupReason;
private String retrievalDetailsRaw;
private Map<String, Object> retrievalDetails;
private Integer durationMs;
private Boolean success;
private String errorMessage;
private LocalDateTime createdAt;
}
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class TraceSummary {
private int persistedStepCount;
private int returnedStepCount;
private int persistedToolCallCount;
private int returnedToolCallCount;
private boolean hasVerifierEvaluation;
private boolean hasFeedback;
}
}