Neues UI
release-tag / release-image (push) Successful in 1m31s

This commit is contained in:
2026-07-28 18:55:55 +02:00
parent de813aad3c
commit 51995f9275
7 changed files with 575 additions and 164 deletions
+78 -47
View File
@@ -208,52 +208,83 @@ type PolicyResult struct {
AIReason string `json:"ai_reason,omitempty"`
}
// KnowledgeCandidateAudit captures the top retrieval candidates used for a run.
// It intentionally stores only normalized, non-secret diagnostic information.
type KnowledgeCandidateAudit struct {
ID string `json:"id"`
Title string `json:"title"`
Source string `json:"source"`
Score float64 `json:"score"`
SemanticScore float64 `json:"semantic_score,omitempty"`
TitleScore float64 `json:"title_score,omitempty"`
KeywordScore float64 `json:"keyword_score,omitempty"`
CategoryScore float64 `json:"category_score,omitempty"`
RequiredScore float64 `json:"required_score,omitempty"`
AutoReply bool `json:"auto_reply"`
BestChunkExcerpt string `json:"best_chunk_excerpt,omitempty"`
BestQueryExcerpt string `json:"best_query_excerpt,omitempty"`
QueryChunkCount int `json:"query_chunk_count,omitempty"`
DocumentChunkCount int `json:"document_chunk_count,omitempty"`
}
// ContextAuditItem is a compact snapshot of context that influenced a run.
type ContextAuditItem struct {
Kind string `json:"kind"`
ID int64 `json:"id,omitempty"`
Name string `json:"name"`
Status string `json:"status,omitempty"`
Relevance float64 `json:"relevance,omitempty"`
Detail string `json:"detail,omitempty"`
}
type RunRecord struct {
RunID string `json:"run_id"`
TicketID int64 `json:"ticket_id"`
TicketName string `json:"ticket_name"`
SourceVersion string `json:"source_version"`
StartedAt time.Time `json:"started_at"`
FinishedAt time.Time `json:"finished_at"`
Outcome string `json:"outcome"`
Reason string `json:"reason"`
AIReason string `json:"ai_reason,omitempty"`
PolicyReason string `json:"policy_reason,omitempty"`
CategoryBefore int64 `json:"category_before"`
CategoryBeforeName string `json:"category_before_name,omitempty"`
AIRecommendedCategoryID int64 `json:"ai_recommended_category_id,omitempty"`
AIRecommendedCategoryName string `json:"ai_recommended_category_name,omitempty"`
AICategoryConfidence float64 `json:"ai_category_confidence,omitempty"`
CategoryThreshold float64 `json:"category_threshold,omitempty"`
CategoryDecision string `json:"category_decision,omitempty"`
CategoryProposed int64 `json:"category_proposed"`
CategoryWouldChange bool `json:"category_would_change"`
CategoryChanged bool `json:"category_changed"`
AIReplyRecommended bool `json:"ai_reply_recommended,omitempty"`
AIReplyConfidence float64 `json:"ai_reply_confidence,omitempty"`
ReplyThreshold float64 `json:"reply_threshold,omitempty"`
AIKnowledgeID string `json:"ai_knowledge_id,omitempty"`
ReplyDecision string `json:"reply_decision,omitempty"`
ReplyProposed bool `json:"reply_proposed"`
ReplyWritten bool `json:"reply_written"`
KnowledgeID string `json:"knowledge_id,omitempty"`
KnowledgeTopID string `json:"knowledge_top_id,omitempty"`
KnowledgeTopTitle string `json:"knowledge_top_title,omitempty"`
KnowledgeScore float64 `json:"knowledge_score,omitempty"`
KnowledgeSemanticScore float64 `json:"knowledge_semantic_score,omitempty"`
KnowledgeTitleScore float64 `json:"knowledge_title_score,omitempty"`
KnowledgeKeywordScore float64 `json:"knowledge_keyword_score,omitempty"`
KnowledgeCategoryScore float64 `json:"knowledge_category_score,omitempty"`
KnowledgeThreshold float64 `json:"knowledge_threshold,omitempty"`
KnowledgeBestChunk string `json:"knowledge_best_chunk,omitempty"`
KnowledgeBestQueryChunk string `json:"knowledge_best_query_chunk,omitempty"`
KnowledgeQueryChunks int `json:"knowledge_query_chunks,omitempty"`
KnowledgeDocumentChunks int `json:"knowledge_document_chunks,omitempty"`
ContextChanges int `json:"context_changes,omitempty"`
ContextIncidents int `json:"context_incidents,omitempty"`
ContextIssues int `json:"context_issues,omitempty"`
ContextDevices int `json:"context_devices,omitempty"`
ContextWarnings []string `json:"context_warnings,omitempty"`
DryRun bool `json:"dry_run"`
Error string `json:"error,omitempty"`
RunID string `json:"run_id"`
TicketID int64 `json:"ticket_id"`
TicketName string `json:"ticket_name"`
SourceVersion string `json:"source_version"`
StartedAt time.Time `json:"started_at"`
FinishedAt time.Time `json:"finished_at"`
Outcome string `json:"outcome"`
Reason string `json:"reason"`
AIReason string `json:"ai_reason,omitempty"`
PolicyReason string `json:"policy_reason,omitempty"`
CategoryBefore int64 `json:"category_before"`
CategoryBeforeName string `json:"category_before_name,omitempty"`
AIRecommendedCategoryID int64 `json:"ai_recommended_category_id,omitempty"`
AIRecommendedCategoryName string `json:"ai_recommended_category_name,omitempty"`
AICategoryConfidence float64 `json:"ai_category_confidence,omitempty"`
CategoryThreshold float64 `json:"category_threshold,omitempty"`
CategoryDecision string `json:"category_decision,omitempty"`
CategoryProposed int64 `json:"category_proposed"`
CategoryWouldChange bool `json:"category_would_change"`
CategoryChanged bool `json:"category_changed"`
AIReplyRecommended bool `json:"ai_reply_recommended,omitempty"`
AIReplyConfidence float64 `json:"ai_reply_confidence,omitempty"`
ReplyThreshold float64 `json:"reply_threshold,omitempty"`
AIKnowledgeID string `json:"ai_knowledge_id,omitempty"`
ReplyDecision string `json:"reply_decision,omitempty"`
ReplyProposed bool `json:"reply_proposed"`
ReplyWritten bool `json:"reply_written"`
KnowledgeID string `json:"knowledge_id,omitempty"`
KnowledgeTopID string `json:"knowledge_top_id,omitempty"`
KnowledgeTopTitle string `json:"knowledge_top_title,omitempty"`
KnowledgeScore float64 `json:"knowledge_score,omitempty"`
KnowledgeSemanticScore float64 `json:"knowledge_semantic_score,omitempty"`
KnowledgeTitleScore float64 `json:"knowledge_title_score,omitempty"`
KnowledgeKeywordScore float64 `json:"knowledge_keyword_score,omitempty"`
KnowledgeCategoryScore float64 `json:"knowledge_category_score,omitempty"`
KnowledgeThreshold float64 `json:"knowledge_threshold,omitempty"`
KnowledgeBestChunk string `json:"knowledge_best_chunk,omitempty"`
KnowledgeBestQueryChunk string `json:"knowledge_best_query_chunk,omitempty"`
KnowledgeQueryChunks int `json:"knowledge_query_chunks,omitempty"`
KnowledgeDocumentChunks int `json:"knowledge_document_chunks,omitempty"`
ContextChanges int `json:"context_changes,omitempty"`
ContextIncidents int `json:"context_incidents,omitempty"`
ContextIssues int `json:"context_issues,omitempty"`
ContextDevices int `json:"context_devices,omitempty"`
ContextWarnings []string `json:"context_warnings,omitempty"`
KnowledgeCandidates []KnowledgeCandidateAudit `json:"knowledge_candidates,omitempty"`
ContextDetails []ContextAuditItem `json:"context_details,omitempty"`
DryRun bool `json:"dry_run"`
Error string `json:"error,omitempty"`
}