@kontourai/survey 0.4.5 → 0.4.7
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.
- package/README.md +23 -0
- package/dist/examples/review-workbench/review-workbench.d.ts +1 -7
- package/dist/examples/review-workbench/review-workbench.js +5 -487
- package/dist/src/index.d.ts +1 -1
- package/dist/src/review-resource.d.ts +33 -2
- package/dist/{examples → src}/review-workbench/review-queue-session.d.ts +7 -1
- package/dist/src/review-workbench/review-queue-session.js +275 -0
- package/dist/{examples → src}/review-workbench/review-surface-preview.d.ts +1 -1
- package/dist/src/review-workbench/review-workbench-data.d.ts +536 -0
- package/dist/{examples → src}/review-workbench/review-workbench-data.js +138 -1
- package/dist/src/review-workbench/review-workbench.css +1499 -0
- package/dist/src/review-workbench/review-workbench.d.ts +34 -0
- package/dist/src/review-workbench/review-workbench.js +821 -0
- package/dist/src/review-workbench/review-workbench.standalone.css +1341 -0
- package/dist/src/review-workbench/vendor/console-kit/tokens/fonts.css +1 -0
- package/dist/src/review-workbench/vendor/console-kit/tokens/index.css +2 -0
- package/dist/src/review-workbench/vendor/console-kit/tokens/themes.css +67 -0
- package/dist/src/review-workbench/vendor/console-kit/tokens/tokens.css +79 -0
- package/package.json +15 -3
- package/dist/examples/review-workbench/review-queue-session.js +0 -122
- package/dist/examples/review-workbench/review-workbench-data.d.ts +0 -261
- /package/dist/{examples → src}/review-workbench/review-surface-preview.js +0 -0
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
import { type ReviewItem } from "../review-resource.js";
|
|
2
|
+
export declare const publicDirectoryReviewItemFixture: {
|
|
3
|
+
apiVersion: "survey.kontourai.io/v1alpha1";
|
|
4
|
+
kind: "ReviewItem";
|
|
5
|
+
metadata: {
|
|
6
|
+
name: string;
|
|
7
|
+
labels: {
|
|
8
|
+
domain: string;
|
|
9
|
+
};
|
|
10
|
+
producer: {
|
|
11
|
+
displayName: string;
|
|
12
|
+
slug: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
spec: {
|
|
16
|
+
target: string;
|
|
17
|
+
selectedCandidateId: string;
|
|
18
|
+
candidateSetStatus: "resolved";
|
|
19
|
+
rationale: string;
|
|
20
|
+
candidates: ({
|
|
21
|
+
id: string;
|
|
22
|
+
role: "current";
|
|
23
|
+
value: string;
|
|
24
|
+
confidence: number;
|
|
25
|
+
source: {
|
|
26
|
+
sourceId: string;
|
|
27
|
+
sourceRef: string;
|
|
28
|
+
kind: "web-page";
|
|
29
|
+
observedAt: string;
|
|
30
|
+
fetchedAt: string;
|
|
31
|
+
locatorScheme: "html";
|
|
32
|
+
};
|
|
33
|
+
locator: {
|
|
34
|
+
scheme: "html";
|
|
35
|
+
locator: string;
|
|
36
|
+
excerpt: string;
|
|
37
|
+
};
|
|
38
|
+
extraction: {
|
|
39
|
+
extractionId: string;
|
|
40
|
+
target: string;
|
|
41
|
+
confidence: number;
|
|
42
|
+
extractor: string;
|
|
43
|
+
extractedAt: string;
|
|
44
|
+
};
|
|
45
|
+
claimTarget: {
|
|
46
|
+
claimId: string;
|
|
47
|
+
subjectType: string;
|
|
48
|
+
subjectId: string;
|
|
49
|
+
surface: string;
|
|
50
|
+
claimType: string;
|
|
51
|
+
fieldOrBehavior: string;
|
|
52
|
+
impactLevel: "medium";
|
|
53
|
+
collectedBy: string;
|
|
54
|
+
};
|
|
55
|
+
projection: {
|
|
56
|
+
rawSourceId: string;
|
|
57
|
+
extractionId: string;
|
|
58
|
+
candidateSetId: string;
|
|
59
|
+
candidateId: string;
|
|
60
|
+
reviewOutcomeId: string;
|
|
61
|
+
claimId: string;
|
|
62
|
+
};
|
|
63
|
+
producer: {
|
|
64
|
+
sourceAuthority: {
|
|
65
|
+
authorityClass: string;
|
|
66
|
+
declaredBy: string;
|
|
67
|
+
scope: string;
|
|
68
|
+
};
|
|
69
|
+
proposalId?: undefined;
|
|
70
|
+
oldValue?: undefined;
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
id: string;
|
|
74
|
+
role: "proposed";
|
|
75
|
+
value: string;
|
|
76
|
+
confidence: number;
|
|
77
|
+
source: {
|
|
78
|
+
sourceId: string;
|
|
79
|
+
sourceRef: string;
|
|
80
|
+
kind: "web-page";
|
|
81
|
+
observedAt: string;
|
|
82
|
+
fetchedAt: string;
|
|
83
|
+
locatorScheme: "html";
|
|
84
|
+
};
|
|
85
|
+
locator: {
|
|
86
|
+
scheme: "html";
|
|
87
|
+
locator: string;
|
|
88
|
+
excerpt: string;
|
|
89
|
+
};
|
|
90
|
+
extraction: {
|
|
91
|
+
extractionId: string;
|
|
92
|
+
target: string;
|
|
93
|
+
confidence: number;
|
|
94
|
+
extractor: string;
|
|
95
|
+
extractedAt: string;
|
|
96
|
+
};
|
|
97
|
+
claimTarget: {
|
|
98
|
+
claimId: string;
|
|
99
|
+
subjectType: string;
|
|
100
|
+
subjectId: string;
|
|
101
|
+
surface: string;
|
|
102
|
+
claimType: string;
|
|
103
|
+
fieldOrBehavior: string;
|
|
104
|
+
impactLevel: "medium";
|
|
105
|
+
collectedBy: string;
|
|
106
|
+
};
|
|
107
|
+
projection: {
|
|
108
|
+
rawSourceId: string;
|
|
109
|
+
extractionId: string;
|
|
110
|
+
candidateSetId: string;
|
|
111
|
+
candidateId: string;
|
|
112
|
+
claimId: string;
|
|
113
|
+
reviewOutcomeId?: undefined;
|
|
114
|
+
};
|
|
115
|
+
producer: {
|
|
116
|
+
proposalId: string;
|
|
117
|
+
oldValue: string;
|
|
118
|
+
sourceAuthority: {
|
|
119
|
+
authorityClass: string;
|
|
120
|
+
declaredBy: string;
|
|
121
|
+
scope: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
})[];
|
|
125
|
+
};
|
|
126
|
+
status: {
|
|
127
|
+
observedCandidateCount: number;
|
|
128
|
+
selectedCandidateId: string;
|
|
129
|
+
reviewDecisionName: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export declare const regulatedRuleConflictReviewItemFixture: {
|
|
133
|
+
apiVersion: "survey.kontourai.io/v1alpha1";
|
|
134
|
+
kind: "ReviewItem";
|
|
135
|
+
metadata: {
|
|
136
|
+
name: string;
|
|
137
|
+
labels: {
|
|
138
|
+
domain: string;
|
|
139
|
+
};
|
|
140
|
+
producer: {
|
|
141
|
+
displayName: string;
|
|
142
|
+
jurisdiction: string;
|
|
143
|
+
reportingPeriod: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
spec: {
|
|
147
|
+
target: string;
|
|
148
|
+
selectedCandidateId: string;
|
|
149
|
+
candidateSetStatus: "conflict";
|
|
150
|
+
rationale: string;
|
|
151
|
+
projection: {
|
|
152
|
+
candidateSetId: string;
|
|
153
|
+
};
|
|
154
|
+
producerPolicy: {
|
|
155
|
+
decisionMode: string;
|
|
156
|
+
sourceAuthorityProjection: string;
|
|
157
|
+
feedbackTags: string[];
|
|
158
|
+
};
|
|
159
|
+
candidates: ({
|
|
160
|
+
id: string;
|
|
161
|
+
role: "current";
|
|
162
|
+
value: number;
|
|
163
|
+
confidence: number;
|
|
164
|
+
source: {
|
|
165
|
+
sourceId: string;
|
|
166
|
+
sourceRef: string;
|
|
167
|
+
kind: "manual-entry";
|
|
168
|
+
observedAt: string;
|
|
169
|
+
locatorScheme: "structured-field";
|
|
170
|
+
};
|
|
171
|
+
locator: {
|
|
172
|
+
scheme: "structured-field";
|
|
173
|
+
locator: string;
|
|
174
|
+
excerpt: string;
|
|
175
|
+
};
|
|
176
|
+
extraction: {
|
|
177
|
+
extractionId: string;
|
|
178
|
+
target: string;
|
|
179
|
+
confidence: number;
|
|
180
|
+
extractor: string;
|
|
181
|
+
extractedAt: string;
|
|
182
|
+
};
|
|
183
|
+
claimTarget: {
|
|
184
|
+
claimId: string;
|
|
185
|
+
subjectType: string;
|
|
186
|
+
subjectId: string;
|
|
187
|
+
surface: string;
|
|
188
|
+
claimType: string;
|
|
189
|
+
fieldOrBehavior: string;
|
|
190
|
+
impactLevel: "high";
|
|
191
|
+
evidenceType: "human_attestation";
|
|
192
|
+
evidenceMethod: "attestation";
|
|
193
|
+
collectedBy: string;
|
|
194
|
+
};
|
|
195
|
+
projection: {
|
|
196
|
+
rawSourceId: string;
|
|
197
|
+
extractionId: string;
|
|
198
|
+
candidateSetId: string;
|
|
199
|
+
candidateId: string;
|
|
200
|
+
claimId: string;
|
|
201
|
+
};
|
|
202
|
+
producer: {
|
|
203
|
+
status: string;
|
|
204
|
+
sourceSection?: undefined;
|
|
205
|
+
sourcePage?: undefined;
|
|
206
|
+
sourceAuthority?: undefined;
|
|
207
|
+
};
|
|
208
|
+
sourceRank?: undefined;
|
|
209
|
+
} | {
|
|
210
|
+
id: string;
|
|
211
|
+
role: "proposed";
|
|
212
|
+
value: number;
|
|
213
|
+
confidence: number;
|
|
214
|
+
sourceRank: number;
|
|
215
|
+
source: {
|
|
216
|
+
sourceId: string;
|
|
217
|
+
sourceRef: string;
|
|
218
|
+
kind: "uploaded-document";
|
|
219
|
+
observedAt: string;
|
|
220
|
+
locatorScheme: "pdf";
|
|
221
|
+
};
|
|
222
|
+
locator: {
|
|
223
|
+
scheme: "pdf";
|
|
224
|
+
locator: string;
|
|
225
|
+
excerpt: string;
|
|
226
|
+
};
|
|
227
|
+
extraction: {
|
|
228
|
+
extractionId: string;
|
|
229
|
+
target: string;
|
|
230
|
+
confidence: number;
|
|
231
|
+
extractor: string;
|
|
232
|
+
extractedAt: string;
|
|
233
|
+
};
|
|
234
|
+
claimTarget: {
|
|
235
|
+
claimId: string;
|
|
236
|
+
subjectType: string;
|
|
237
|
+
subjectId: string;
|
|
238
|
+
surface: string;
|
|
239
|
+
claimType: string;
|
|
240
|
+
fieldOrBehavior: string;
|
|
241
|
+
impactLevel: "high";
|
|
242
|
+
evidenceType: "policy_rule";
|
|
243
|
+
evidenceMethod: "extraction";
|
|
244
|
+
collectedBy: string;
|
|
245
|
+
};
|
|
246
|
+
projection: {
|
|
247
|
+
rawSourceId: string;
|
|
248
|
+
extractionId: string;
|
|
249
|
+
candidateSetId: string;
|
|
250
|
+
candidateId: string;
|
|
251
|
+
claimId: string;
|
|
252
|
+
};
|
|
253
|
+
producer: {
|
|
254
|
+
sourceSection: string;
|
|
255
|
+
sourcePage: number;
|
|
256
|
+
sourceAuthority: {
|
|
257
|
+
authorityClass: string;
|
|
258
|
+
declaredBy: string;
|
|
259
|
+
scope: string;
|
|
260
|
+
};
|
|
261
|
+
status?: undefined;
|
|
262
|
+
};
|
|
263
|
+
})[];
|
|
264
|
+
};
|
|
265
|
+
status: {
|
|
266
|
+
observedCandidateCount: number;
|
|
267
|
+
selectedCandidateId: string;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
export declare const reviewWorkbenchQueueFixtures: (ReviewItem | {
|
|
271
|
+
apiVersion: "survey.kontourai.io/v1alpha1";
|
|
272
|
+
kind: "ReviewItem";
|
|
273
|
+
metadata: {
|
|
274
|
+
name: string;
|
|
275
|
+
labels: {
|
|
276
|
+
domain: string;
|
|
277
|
+
};
|
|
278
|
+
producer: {
|
|
279
|
+
displayName: string;
|
|
280
|
+
slug: string;
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
spec: {
|
|
284
|
+
target: string;
|
|
285
|
+
selectedCandidateId: string;
|
|
286
|
+
candidateSetStatus: "resolved";
|
|
287
|
+
rationale: string;
|
|
288
|
+
candidates: ({
|
|
289
|
+
id: string;
|
|
290
|
+
role: "current";
|
|
291
|
+
value: string;
|
|
292
|
+
confidence: number;
|
|
293
|
+
source: {
|
|
294
|
+
sourceId: string;
|
|
295
|
+
sourceRef: string;
|
|
296
|
+
kind: "web-page";
|
|
297
|
+
observedAt: string;
|
|
298
|
+
fetchedAt: string;
|
|
299
|
+
locatorScheme: "html";
|
|
300
|
+
};
|
|
301
|
+
locator: {
|
|
302
|
+
scheme: "html";
|
|
303
|
+
locator: string;
|
|
304
|
+
excerpt: string;
|
|
305
|
+
};
|
|
306
|
+
extraction: {
|
|
307
|
+
extractionId: string;
|
|
308
|
+
target: string;
|
|
309
|
+
confidence: number;
|
|
310
|
+
extractor: string;
|
|
311
|
+
extractedAt: string;
|
|
312
|
+
};
|
|
313
|
+
claimTarget: {
|
|
314
|
+
claimId: string;
|
|
315
|
+
subjectType: string;
|
|
316
|
+
subjectId: string;
|
|
317
|
+
surface: string;
|
|
318
|
+
claimType: string;
|
|
319
|
+
fieldOrBehavior: string;
|
|
320
|
+
impactLevel: "medium";
|
|
321
|
+
collectedBy: string;
|
|
322
|
+
};
|
|
323
|
+
projection: {
|
|
324
|
+
rawSourceId: string;
|
|
325
|
+
extractionId: string;
|
|
326
|
+
candidateSetId: string;
|
|
327
|
+
candidateId: string;
|
|
328
|
+
reviewOutcomeId: string;
|
|
329
|
+
claimId: string;
|
|
330
|
+
};
|
|
331
|
+
producer: {
|
|
332
|
+
sourceAuthority: {
|
|
333
|
+
authorityClass: string;
|
|
334
|
+
declaredBy: string;
|
|
335
|
+
scope: string;
|
|
336
|
+
};
|
|
337
|
+
proposalId?: undefined;
|
|
338
|
+
oldValue?: undefined;
|
|
339
|
+
};
|
|
340
|
+
} | {
|
|
341
|
+
id: string;
|
|
342
|
+
role: "proposed";
|
|
343
|
+
value: string;
|
|
344
|
+
confidence: number;
|
|
345
|
+
source: {
|
|
346
|
+
sourceId: string;
|
|
347
|
+
sourceRef: string;
|
|
348
|
+
kind: "web-page";
|
|
349
|
+
observedAt: string;
|
|
350
|
+
fetchedAt: string;
|
|
351
|
+
locatorScheme: "html";
|
|
352
|
+
};
|
|
353
|
+
locator: {
|
|
354
|
+
scheme: "html";
|
|
355
|
+
locator: string;
|
|
356
|
+
excerpt: string;
|
|
357
|
+
};
|
|
358
|
+
extraction: {
|
|
359
|
+
extractionId: string;
|
|
360
|
+
target: string;
|
|
361
|
+
confidence: number;
|
|
362
|
+
extractor: string;
|
|
363
|
+
extractedAt: string;
|
|
364
|
+
};
|
|
365
|
+
claimTarget: {
|
|
366
|
+
claimId: string;
|
|
367
|
+
subjectType: string;
|
|
368
|
+
subjectId: string;
|
|
369
|
+
surface: string;
|
|
370
|
+
claimType: string;
|
|
371
|
+
fieldOrBehavior: string;
|
|
372
|
+
impactLevel: "medium";
|
|
373
|
+
collectedBy: string;
|
|
374
|
+
};
|
|
375
|
+
projection: {
|
|
376
|
+
rawSourceId: string;
|
|
377
|
+
extractionId: string;
|
|
378
|
+
candidateSetId: string;
|
|
379
|
+
candidateId: string;
|
|
380
|
+
claimId: string;
|
|
381
|
+
reviewOutcomeId?: undefined;
|
|
382
|
+
};
|
|
383
|
+
producer: {
|
|
384
|
+
proposalId: string;
|
|
385
|
+
oldValue: string;
|
|
386
|
+
sourceAuthority: {
|
|
387
|
+
authorityClass: string;
|
|
388
|
+
declaredBy: string;
|
|
389
|
+
scope: string;
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
})[];
|
|
393
|
+
};
|
|
394
|
+
status: {
|
|
395
|
+
observedCandidateCount: number;
|
|
396
|
+
selectedCandidateId: string;
|
|
397
|
+
reviewDecisionName: string;
|
|
398
|
+
};
|
|
399
|
+
} | {
|
|
400
|
+
apiVersion: "survey.kontourai.io/v1alpha1";
|
|
401
|
+
kind: "ReviewItem";
|
|
402
|
+
metadata: {
|
|
403
|
+
name: string;
|
|
404
|
+
labels: {
|
|
405
|
+
domain: string;
|
|
406
|
+
};
|
|
407
|
+
producer: {
|
|
408
|
+
displayName: string;
|
|
409
|
+
jurisdiction: string;
|
|
410
|
+
reportingPeriod: string;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
spec: {
|
|
414
|
+
target: string;
|
|
415
|
+
selectedCandidateId: string;
|
|
416
|
+
candidateSetStatus: "conflict";
|
|
417
|
+
rationale: string;
|
|
418
|
+
projection: {
|
|
419
|
+
candidateSetId: string;
|
|
420
|
+
};
|
|
421
|
+
producerPolicy: {
|
|
422
|
+
decisionMode: string;
|
|
423
|
+
sourceAuthorityProjection: string;
|
|
424
|
+
feedbackTags: string[];
|
|
425
|
+
};
|
|
426
|
+
candidates: ({
|
|
427
|
+
id: string;
|
|
428
|
+
role: "current";
|
|
429
|
+
value: number;
|
|
430
|
+
confidence: number;
|
|
431
|
+
source: {
|
|
432
|
+
sourceId: string;
|
|
433
|
+
sourceRef: string;
|
|
434
|
+
kind: "manual-entry";
|
|
435
|
+
observedAt: string;
|
|
436
|
+
locatorScheme: "structured-field";
|
|
437
|
+
};
|
|
438
|
+
locator: {
|
|
439
|
+
scheme: "structured-field";
|
|
440
|
+
locator: string;
|
|
441
|
+
excerpt: string;
|
|
442
|
+
};
|
|
443
|
+
extraction: {
|
|
444
|
+
extractionId: string;
|
|
445
|
+
target: string;
|
|
446
|
+
confidence: number;
|
|
447
|
+
extractor: string;
|
|
448
|
+
extractedAt: string;
|
|
449
|
+
};
|
|
450
|
+
claimTarget: {
|
|
451
|
+
claimId: string;
|
|
452
|
+
subjectType: string;
|
|
453
|
+
subjectId: string;
|
|
454
|
+
surface: string;
|
|
455
|
+
claimType: string;
|
|
456
|
+
fieldOrBehavior: string;
|
|
457
|
+
impactLevel: "high";
|
|
458
|
+
evidenceType: "human_attestation";
|
|
459
|
+
evidenceMethod: "attestation";
|
|
460
|
+
collectedBy: string;
|
|
461
|
+
};
|
|
462
|
+
projection: {
|
|
463
|
+
rawSourceId: string;
|
|
464
|
+
extractionId: string;
|
|
465
|
+
candidateSetId: string;
|
|
466
|
+
candidateId: string;
|
|
467
|
+
claimId: string;
|
|
468
|
+
};
|
|
469
|
+
producer: {
|
|
470
|
+
status: string;
|
|
471
|
+
sourceSection?: undefined;
|
|
472
|
+
sourcePage?: undefined;
|
|
473
|
+
sourceAuthority?: undefined;
|
|
474
|
+
};
|
|
475
|
+
sourceRank?: undefined;
|
|
476
|
+
} | {
|
|
477
|
+
id: string;
|
|
478
|
+
role: "proposed";
|
|
479
|
+
value: number;
|
|
480
|
+
confidence: number;
|
|
481
|
+
sourceRank: number;
|
|
482
|
+
source: {
|
|
483
|
+
sourceId: string;
|
|
484
|
+
sourceRef: string;
|
|
485
|
+
kind: "uploaded-document";
|
|
486
|
+
observedAt: string;
|
|
487
|
+
locatorScheme: "pdf";
|
|
488
|
+
};
|
|
489
|
+
locator: {
|
|
490
|
+
scheme: "pdf";
|
|
491
|
+
locator: string;
|
|
492
|
+
excerpt: string;
|
|
493
|
+
};
|
|
494
|
+
extraction: {
|
|
495
|
+
extractionId: string;
|
|
496
|
+
target: string;
|
|
497
|
+
confidence: number;
|
|
498
|
+
extractor: string;
|
|
499
|
+
extractedAt: string;
|
|
500
|
+
};
|
|
501
|
+
claimTarget: {
|
|
502
|
+
claimId: string;
|
|
503
|
+
subjectType: string;
|
|
504
|
+
subjectId: string;
|
|
505
|
+
surface: string;
|
|
506
|
+
claimType: string;
|
|
507
|
+
fieldOrBehavior: string;
|
|
508
|
+
impactLevel: "high";
|
|
509
|
+
evidenceType: "policy_rule";
|
|
510
|
+
evidenceMethod: "extraction";
|
|
511
|
+
collectedBy: string;
|
|
512
|
+
};
|
|
513
|
+
projection: {
|
|
514
|
+
rawSourceId: string;
|
|
515
|
+
extractionId: string;
|
|
516
|
+
candidateSetId: string;
|
|
517
|
+
candidateId: string;
|
|
518
|
+
claimId: string;
|
|
519
|
+
};
|
|
520
|
+
producer: {
|
|
521
|
+
sourceSection: string;
|
|
522
|
+
sourcePage: number;
|
|
523
|
+
sourceAuthority: {
|
|
524
|
+
authorityClass: string;
|
|
525
|
+
declaredBy: string;
|
|
526
|
+
scope: string;
|
|
527
|
+
};
|
|
528
|
+
status?: undefined;
|
|
529
|
+
};
|
|
530
|
+
})[];
|
|
531
|
+
};
|
|
532
|
+
status: {
|
|
533
|
+
observedCandidateCount: number;
|
|
534
|
+
selectedCandidateId: string;
|
|
535
|
+
};
|
|
536
|
+
})[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reviewResourceApiVersion } from "
|
|
1
|
+
import { reviewResourceApiVersion } from "../review-resource.js";
|
|
2
2
|
// Browser-safe mirror of fixtures/public-directory-review-resource.ts.
|
|
3
3
|
// scripts/check-review-workbench.cjs fails if this data drifts from the canonical fixture.
|
|
4
4
|
export const publicDirectoryReviewItemFixture = {
|
|
@@ -131,6 +131,142 @@ export const publicDirectoryReviewItemFixture = {
|
|
|
131
131
|
reviewDecisionName: "public-directory-availability-operator-decision",
|
|
132
132
|
},
|
|
133
133
|
};
|
|
134
|
+
export const regulatedRuleConflictReviewItemFixture = {
|
|
135
|
+
apiVersion: reviewResourceApiVersion,
|
|
136
|
+
kind: "ReviewItem",
|
|
137
|
+
metadata: {
|
|
138
|
+
name: "regulated-rule-conflict-standard-threshold",
|
|
139
|
+
labels: {
|
|
140
|
+
domain: "regulated-rule-source",
|
|
141
|
+
},
|
|
142
|
+
producer: {
|
|
143
|
+
displayName: "Regulated Rule Review",
|
|
144
|
+
jurisdiction: "example-jurisdiction",
|
|
145
|
+
reportingPeriod: "2026",
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
spec: {
|
|
149
|
+
target: "standardThreshold",
|
|
150
|
+
selectedCandidateId: "regulated-rule-conflict-standard-threshold:candidate:current",
|
|
151
|
+
candidateSetStatus: "conflict",
|
|
152
|
+
rationale: "A newly extracted source candidate conflicts with the currently managed rule value.",
|
|
153
|
+
projection: {
|
|
154
|
+
candidateSetId: "regulated-rule-conflict-standard-threshold:candidate-set",
|
|
155
|
+
},
|
|
156
|
+
producerPolicy: {
|
|
157
|
+
decisionMode: "keep-current",
|
|
158
|
+
sourceAuthorityProjection: "only-for-selected-source-backed-value",
|
|
159
|
+
feedbackTags: ["rule-conflict", "source-extraction-review"],
|
|
160
|
+
},
|
|
161
|
+
candidates: [
|
|
162
|
+
{
|
|
163
|
+
id: "regulated-rule-conflict-standard-threshold:candidate:current",
|
|
164
|
+
role: "current",
|
|
165
|
+
value: 15000,
|
|
166
|
+
confidence: 1,
|
|
167
|
+
source: {
|
|
168
|
+
sourceId: "regulated-rule-conflict-standard-threshold:source:current",
|
|
169
|
+
sourceRef: "survey-example://rules/example-jurisdiction/2026/standardThreshold",
|
|
170
|
+
kind: "manual-entry",
|
|
171
|
+
observedAt: "2026-06-03T00:00:00.000Z",
|
|
172
|
+
locatorScheme: "structured-field",
|
|
173
|
+
},
|
|
174
|
+
locator: {
|
|
175
|
+
scheme: "structured-field",
|
|
176
|
+
locator: "managed-rules:path=standardThreshold",
|
|
177
|
+
excerpt: "Current managed rule value.",
|
|
178
|
+
},
|
|
179
|
+
extraction: {
|
|
180
|
+
extractionId: "regulated-rule-conflict-standard-threshold:extraction:current",
|
|
181
|
+
target: "standardThreshold",
|
|
182
|
+
confidence: 1,
|
|
183
|
+
extractor: "example-rule-manager",
|
|
184
|
+
extractedAt: "2026-06-03T00:00:00.000Z",
|
|
185
|
+
},
|
|
186
|
+
claimTarget: {
|
|
187
|
+
claimId: "regulated-rule.example-jurisdiction.2026.standard-threshold.current",
|
|
188
|
+
subjectType: "regulated-rule-source",
|
|
189
|
+
subjectId: "example-jurisdiction:2026:standardThreshold",
|
|
190
|
+
surface: "regulated.rules",
|
|
191
|
+
claimType: "regulated.rule-source-value",
|
|
192
|
+
fieldOrBehavior: "standardThreshold",
|
|
193
|
+
impactLevel: "high",
|
|
194
|
+
evidenceType: "human_attestation",
|
|
195
|
+
evidenceMethod: "attestation",
|
|
196
|
+
collectedBy: "example-rule-manager",
|
|
197
|
+
},
|
|
198
|
+
projection: {
|
|
199
|
+
rawSourceId: "regulated-rule-conflict-standard-threshold:source:current",
|
|
200
|
+
extractionId: "regulated-rule-conflict-standard-threshold:extraction:current",
|
|
201
|
+
candidateSetId: "regulated-rule-conflict-standard-threshold:candidate-set",
|
|
202
|
+
candidateId: "regulated-rule-conflict-standard-threshold:projection:current",
|
|
203
|
+
claimId: "regulated-rule.example-jurisdiction.2026.standard-threshold.current",
|
|
204
|
+
},
|
|
205
|
+
producer: {
|
|
206
|
+
status: "current-managed-value",
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
id: "regulated-rule-conflict-standard-threshold:candidate:proposed",
|
|
211
|
+
role: "proposed",
|
|
212
|
+
value: 16000,
|
|
213
|
+
confidence: 0.95,
|
|
214
|
+
sourceRank: 1,
|
|
215
|
+
source: {
|
|
216
|
+
sourceId: "regulated-rule-conflict-standard-threshold:source:proposed",
|
|
217
|
+
sourceRef: "https://example.test/regulatory-bulletins/2026-thresholds.pdf",
|
|
218
|
+
kind: "uploaded-document",
|
|
219
|
+
observedAt: "2026-06-03T00:30:00.000Z",
|
|
220
|
+
locatorScheme: "pdf",
|
|
221
|
+
},
|
|
222
|
+
locator: {
|
|
223
|
+
scheme: "pdf",
|
|
224
|
+
locator: "pdf:page=12;section=Standard%20Threshold;path=standardThreshold",
|
|
225
|
+
excerpt: "Example Individual Standard Threshold $16,000",
|
|
226
|
+
},
|
|
227
|
+
extraction: {
|
|
228
|
+
extractionId: "regulated-rule-conflict-standard-threshold:extraction:proposed",
|
|
229
|
+
target: "standardThreshold",
|
|
230
|
+
confidence: 0.95,
|
|
231
|
+
extractor: "example-rule-source-parser",
|
|
232
|
+
extractedAt: "2026-06-03T00:30:00.000Z",
|
|
233
|
+
},
|
|
234
|
+
claimTarget: {
|
|
235
|
+
claimId: "regulated-rule.example-jurisdiction.2026.standard-threshold.proposed",
|
|
236
|
+
subjectType: "regulated-rule-source",
|
|
237
|
+
subjectId: "example-jurisdiction:2026:standardThreshold",
|
|
238
|
+
surface: "regulated.rules",
|
|
239
|
+
claimType: "regulated.rule-source-value",
|
|
240
|
+
fieldOrBehavior: "standardThreshold",
|
|
241
|
+
impactLevel: "high",
|
|
242
|
+
evidenceType: "policy_rule",
|
|
243
|
+
evidenceMethod: "extraction",
|
|
244
|
+
collectedBy: "example-rule-source-parser",
|
|
245
|
+
},
|
|
246
|
+
projection: {
|
|
247
|
+
rawSourceId: "regulated-rule-conflict-standard-threshold:source:proposed",
|
|
248
|
+
extractionId: "regulated-rule-conflict-standard-threshold:extraction:proposed",
|
|
249
|
+
candidateSetId: "regulated-rule-conflict-standard-threshold:candidate-set",
|
|
250
|
+
candidateId: "regulated-rule-conflict-standard-threshold:projection:proposed",
|
|
251
|
+
claimId: "regulated-rule.example-jurisdiction.2026.standard-threshold.proposed",
|
|
252
|
+
},
|
|
253
|
+
producer: {
|
|
254
|
+
sourceSection: "Standard Threshold",
|
|
255
|
+
sourcePage: 12,
|
|
256
|
+
sourceAuthority: {
|
|
257
|
+
authorityClass: "official_publication",
|
|
258
|
+
declaredBy: "Example regulatory source registry",
|
|
259
|
+
scope: "standardThreshold rule value for example-jurisdiction 2026",
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
],
|
|
264
|
+
},
|
|
265
|
+
status: {
|
|
266
|
+
observedCandidateCount: 2,
|
|
267
|
+
selectedCandidateId: "regulated-rule-conflict-standard-threshold:candidate:current",
|
|
268
|
+
},
|
|
269
|
+
};
|
|
134
270
|
function queueFixture(name, target, currentValue, proposedValue, candidateSetStatus, feedbackTags) {
|
|
135
271
|
return {
|
|
136
272
|
...publicDirectoryReviewItemFixture,
|
|
@@ -196,4 +332,5 @@ export const reviewWorkbenchQueueFixtures = [
|
|
|
196
332
|
publicDirectoryReviewItemFixture,
|
|
197
333
|
queueFixture("public-directory-address", "streetAddress", "100 Main Street", "102 Main Street", "needs-review", ["address-change", "producer-escalation-candidate"]),
|
|
198
334
|
queueFixture("public-directory-license", "licenseStatus", "ACTIVE", "EXPIRED", "escalated", ["licensing", "manual-review-required"]),
|
|
335
|
+
regulatedRuleConflictReviewItemFixture,
|
|
199
336
|
];
|