Implement Scene 7 evidence goal flow
This commit is contained in:
@@ -53,6 +53,7 @@ export interface DocumentUploadAnalysis {
|
||||
extractionStatus: 'succeeded' | 'unsupported' | 'failed'
|
||||
matchedFlags: string[]
|
||||
awardedFlags: string[]
|
||||
goals: LevelGoal[]
|
||||
}
|
||||
|
||||
export interface UploadedCaseDocument extends DocumentExhibit {
|
||||
@@ -150,6 +151,22 @@ export interface BriefConcept {
|
||||
|
||||
export interface LevelBrief { body: string; concepts: BriefConcept[] }
|
||||
|
||||
export interface LevelGoal {
|
||||
/** Present in author mode so the goal can be edited; omitted in play mode. */
|
||||
id?: string
|
||||
key: string
|
||||
title: string
|
||||
instructions: string
|
||||
completionMessage: string
|
||||
enabled?: boolean
|
||||
/** Author-only success condition. Expected answer flags stay out of play payloads. */
|
||||
requiredFlags?: string[]
|
||||
status: 'pending' | 'complete'
|
||||
completedAt?: string
|
||||
/** True only in the response to the mutation that completed this goal. */
|
||||
newlyCompleted: boolean
|
||||
}
|
||||
|
||||
export interface CaseState {
|
||||
id: string
|
||||
title: string
|
||||
@@ -160,6 +177,7 @@ export interface CaseState {
|
||||
views: BoardView[]
|
||||
viewport: Viewport
|
||||
brief: LevelBrief
|
||||
goals: LevelGoal[]
|
||||
revision: number
|
||||
updatedAt?: string
|
||||
levelStatus?: string
|
||||
@@ -185,6 +203,8 @@ export interface EvidenceMatchAnchorDefinition {
|
||||
export interface EvidenceMatchRuleDefinition {
|
||||
id: string
|
||||
name: string
|
||||
sourceLabel?: string
|
||||
sourceUri?: string
|
||||
flagKey: string
|
||||
matcherVersion: 'char_trigram_v1'
|
||||
minimumAnchorMatches: number
|
||||
@@ -192,6 +212,32 @@ export interface EvidenceMatchRuleDefinition {
|
||||
anchors: EvidenceMatchAnchorDefinition[]
|
||||
}
|
||||
|
||||
export interface EvidenceSemanticRuleDefinition {
|
||||
id: string
|
||||
goalId: string
|
||||
goalKey: string
|
||||
name: string
|
||||
targetSubject: string
|
||||
relatedSubject?: string
|
||||
assertion: string
|
||||
successFlagKey: string
|
||||
relatedFlagKey?: string
|
||||
minimumConfidence: number
|
||||
evaluatorVersion: string
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
export interface DocumentSemanticAnalysis {
|
||||
status: 'not_needed' | 'unavailable' | 'pending' | 'succeeded' | 'failed'
|
||||
subject?: 'target' | 'related' | 'ambiguous' | 'neither'
|
||||
supportsClaim?: boolean
|
||||
evidenceExcerpt?: string
|
||||
confidence?: number
|
||||
retryable: boolean
|
||||
awardedFlags: string[]
|
||||
goals: LevelGoal[]
|
||||
}
|
||||
|
||||
export function isDocumentExhibit(exhibit: Exhibit): exhibit is DocumentExhibit { return exhibit.type === 'document' }
|
||||
export function isEvidenceExhibit(exhibit: Exhibit): exhibit is Evidence { return exhibit.type !== 'document' }
|
||||
export function isFolderExhibit(exhibit: Exhibit): exhibit is FolderExhibit { return exhibit.type === 'folder' }
|
||||
|
||||
Reference in New Issue
Block a user