@cyber-dash-tech/revela 0.17.0 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ export interface NarrativeDisplayModel {
9
9
  summaryLine?: string
10
10
  labels?: Partial<NarrativeDisplayLabels>
11
11
  claimCards?: NarrativeDisplayClaimCard[]
12
+ researchGapCards?: NarrativeDisplayResearchGapCard[]
12
13
  relations?: NarrativeDisplayRelation[]
13
14
  }
14
15
 
@@ -17,6 +18,18 @@ export interface NarrativeDisplayLabels {
17
18
  claimFlow: string
18
19
  flowNote: string
19
20
  selectedClaim: string
21
+ selectedEvidence: string
22
+ evidenceList: string
23
+ gap: string
24
+ gaps: string
25
+ noEvidence: string
26
+ selectEvidencePrompt: string
27
+ sourceTrace: string
28
+ evidenceSource: string
29
+ whyThisSupports: string
30
+ linkedGaps: string
31
+ selectedGap: string
32
+ noLinkedGaps: string
20
33
  claim: string
21
34
  claimId: string
22
35
  status: string
@@ -48,6 +61,11 @@ export interface NarrativeDisplayClaimCard {
48
61
  researchGapsSummary?: string
49
62
  }
50
63
 
64
+ export interface NarrativeDisplayResearchGapCard {
65
+ gapId: string
66
+ displayQuestion?: string
67
+ }
68
+
51
69
  export interface NarrativeDisplayRelation {
52
70
  fromClaimId: string
53
71
  toClaimId: string
@@ -63,6 +81,7 @@ export interface ValidatedNarrativeDisplayModel {
63
81
  summaryLine?: string
64
82
  labels: NarrativeDisplayLabels
65
83
  claimCards: Map<string, NarrativeDisplayClaimCard>
84
+ researchGapCards: Map<string, NarrativeDisplayResearchGapCard>
66
85
  relations: Map<string, NarrativeDisplayRelation>
67
86
  }
68
87
 
@@ -71,8 +90,20 @@ export function defaultNarrativeDisplayLabels(language: NarrativeViewLanguage):
71
90
  return {
72
91
  eyebrow: "只读主张流",
73
92
  claimFlow: "主张推进",
74
- flowNote: "点击主张查看证据、关系、风险、缺口和已覆盖页面。",
93
+ flowNote: "点击主张查看论据和真实存在的缺口;点击论据查看它关联的缺口。",
75
94
  selectedClaim: "当前主张",
95
+ selectedEvidence: "当前论据",
96
+ evidenceList: "论据",
97
+ gap: "缺口",
98
+ gaps: "缺口",
99
+ noEvidence: "没有绑定论据",
100
+ selectEvidencePrompt: "选择一条论据或缺口查看详情",
101
+ sourceTrace: "来源追踪",
102
+ evidenceSource: "来源",
103
+ whyThisSupports: "为什么支撑论点",
104
+ linkedGaps: "这条论据关联的缺口",
105
+ selectedGap: "当前缺口",
106
+ noLinkedGaps: "这条论据没有关联缺口",
76
107
  claim: "主张",
77
108
  claimId: "主张 ID",
78
109
  status: "状态",
@@ -93,8 +124,20 @@ export function defaultNarrativeDisplayLabels(language: NarrativeViewLanguage):
93
124
  return {
94
125
  eyebrow: "読み取り専用クレームフロー",
95
126
  claimFlow: "クレームフロー",
96
- flowNote: "クレームをクリックすると、根拠、関係、リスク、ギャップ、該当スライドを確認できます。",
127
+ flowNote: "クレームをクリックして根拠と実在するギャップを確認し、根拠をクリックして紐づくギャップを確認します。",
97
128
  selectedClaim: "選択中のクレーム",
129
+ selectedEvidence: "選択中の根拠",
130
+ evidenceList: "根拠",
131
+ gap: "ギャップ",
132
+ gaps: "ギャップ",
133
+ noEvidence: "紐づいた根拠はありません",
134
+ selectEvidencePrompt: "根拠またはギャップを選択して詳細を確認してください",
135
+ sourceTrace: "出典トレース",
136
+ evidenceSource: "出典",
137
+ whyThisSupports: "この根拠がクレームを支える理由",
138
+ linkedGaps: "この根拠に紐づくギャップ",
139
+ selectedGap: "選択中のギャップ",
140
+ noLinkedGaps: "この根拠に紐づくギャップはありません",
98
141
  claim: "クレーム",
99
142
  claimId: "クレーム ID",
100
143
  status: "ステータス",
@@ -114,8 +157,20 @@ export function defaultNarrativeDisplayLabels(language: NarrativeViewLanguage):
114
157
  return {
115
158
  eyebrow: "Read-only claim flow board",
116
159
  claimFlow: "Claim Flow",
117
- flowNote: "Click a claim to inspect support, relation context, gaps, and covered slides.",
160
+ flowNote: "Click a claim to read its evidence and real gaps; click evidence to see gaps linked to that evidence.",
118
161
  selectedClaim: "Selected claim",
162
+ selectedEvidence: "Selected evidence",
163
+ evidenceList: "Evidence",
164
+ gap: "Gap",
165
+ gaps: "Gaps",
166
+ noEvidence: "No evidence bound",
167
+ selectEvidencePrompt: "Select evidence or a gap to inspect details.",
168
+ sourceTrace: "Source trace",
169
+ evidenceSource: "Source",
170
+ whyThisSupports: "Why this supports the claim",
171
+ linkedGaps: "Gaps linked to evidence",
172
+ selectedGap: "Selected gap",
173
+ noLinkedGaps: "No gaps linked to this evidence.",
119
174
  claim: "Claim",
120
175
  claimId: "Claim ID",
121
176
  status: "Status",
@@ -140,6 +195,7 @@ export function validateNarrativeDisplayModel(map: NarrativeMap, input: Narrativ
140
195
  if (input.language !== language) throw new Error(`Narrative display model language must be ${language}.`)
141
196
 
142
197
  const claimIds = new Set(map.claimFlow.map((claim) => claim.id))
198
+ const gapIds = new Set(map.researchGaps.map((gap) => gap.id))
143
199
  const relationByKey = new Map(map.claimRelations.map((relation) => [relationKey(relation), relation]))
144
200
  const claimCards = new Map<string, NarrativeDisplayClaimCard>()
145
201
  for (const card of input.claimCards ?? []) {
@@ -147,6 +203,12 @@ export function validateNarrativeDisplayModel(map: NarrativeMap, input: Narrativ
147
203
  claimCards.set(card.claimId, cleanClaimCard(card))
148
204
  }
149
205
 
206
+ const researchGapCards = new Map<string, NarrativeDisplayResearchGapCard>()
207
+ for (const card of input.researchGapCards ?? []) {
208
+ if (!gapIds.has(card.gapId)) throw new Error(`Unknown display gapId: ${card.gapId}`)
209
+ researchGapCards.set(card.gapId, cleanResearchGapCard(card))
210
+ }
211
+
150
212
  const relations = new Map<string, NarrativeDisplayRelation>()
151
213
  for (const relation of input.relations ?? []) {
152
214
  const key = relationKey(relation)
@@ -162,12 +224,13 @@ export function validateNarrativeDisplayModel(map: NarrativeMap, input: Narrativ
162
224
  summaryLine: clean(input.summaryLine),
163
225
  labels: mergeLabels(defaults, input.labels),
164
226
  claimCards,
227
+ researchGapCards,
165
228
  relations,
166
229
  }
167
230
  }
168
231
 
169
232
  export function emptyDisplayModel(language: NarrativeViewLanguage, labels = defaultNarrativeDisplayLabels(language)): ValidatedNarrativeDisplayModel {
170
- return { version: 1, language, labels, claimCards: new Map(), relations: new Map() }
233
+ return { version: 1, language, labels, claimCards: new Map(), researchGapCards: new Map(), relations: new Map() }
171
234
  }
172
235
 
173
236
  export function relationKey(relation: Pick<NarrativeDisplayRelation, "fromClaimId" | "toClaimId" | "relation">): string {
@@ -210,6 +273,13 @@ function cleanClaimCard(card: NarrativeDisplayClaimCard): NarrativeDisplayClaimC
210
273
  }
211
274
  }
212
275
 
276
+ function cleanResearchGapCard(card: NarrativeDisplayResearchGapCard): NarrativeDisplayResearchGapCard {
277
+ return {
278
+ gapId: card.gapId,
279
+ displayQuestion: clean(card.displayQuestion),
280
+ }
281
+ }
282
+
213
283
  function cleanRelation(relation: NarrativeDisplayRelation, canonical: NarrativeMapClaimRelation): NarrativeDisplayRelation {
214
284
  const displayLabel = clean(relation.displayLabel)
215
285
  const displayRationale = clean(relation.displayRationale)