@kontourai/survey 6.0.0 → 7.0.0

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.
Files changed (32) hide show
  1. package/dist/src/candidate-verification.d.ts +175 -0
  2. package/dist/src/candidate-verification.js +334 -0
  3. package/dist/src/canonical-reviewed-trust-input.js +30 -1
  4. package/dist/src/console/review-console-server.js +22 -4
  5. package/dist/src/index.d.ts +6 -4
  6. package/dist/src/index.js +3 -2
  7. package/dist/src/mcp/review-mcp.js +161 -44
  8. package/dist/src/review-resource.d.ts +16 -0
  9. package/dist/src/review-session-file.d.ts +7 -0
  10. package/dist/src/review-workbench/audit-rows.d.ts +1 -1
  11. package/dist/src/review-workbench/audit-rows.js +1 -0
  12. package/dist/src/review-workbench/queue-binding.d.ts +45 -2
  13. package/dist/src/review-workbench/queue-binding.js +45 -0
  14. package/dist/src/review-workbench/review-presentation.d.ts +60 -0
  15. package/dist/src/review-workbench/review-presentation.js +107 -10
  16. package/dist/src/review-workbench/review-queue-session.d.ts +47 -4
  17. package/dist/src/review-workbench/review-queue-session.js +73 -8
  18. package/dist/src/review-workbench/review-session-replay.d.ts +11 -1
  19. package/dist/src/review-workbench/review-session-replay.js +35 -1
  20. package/dist/src/review-workbench/review-workbench-css.generated.js +96 -1
  21. package/dist/src/review-workbench/review-workbench-element.d.ts +10 -0
  22. package/dist/src/review-workbench/review-workbench-element.js +21 -3
  23. package/dist/src/review-workbench/review-workbench.css +96 -1
  24. package/dist/src/review-workbench/review-workbench.d.ts +28 -8
  25. package/dist/src/review-workbench/review-workbench.js +174 -63
  26. package/dist/src/review-workbench/review-workbench.standalone.css +96 -1
  27. package/dist/src/review-workbench/server-review-session.d.ts +18 -0
  28. package/dist/src/review-workbench/server-review-session.js +20 -2
  29. package/dist/src/surface-reviewed-extraction.d.ts +23 -0
  30. package/dist/src/surface-reviewed-extraction.js +64 -1
  31. package/dist/src/to-surface.js +32 -3
  32. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { candidateForDecision, decisionSelectsNoCandidate, isClearedWorkbenchDecisionEvent, workbenchDecisionDefinitions, } from "./review-queue-session.js";
1
+ import { candidateForDecision, conflictSelectionIssue, decisionSelectsNoCandidate, isClearedWorkbenchDecisionEvent, workbenchDecisionDefinitions, } from "./review-queue-session.js";
2
2
  import { checkEditedValueForItem } from "./edited-value.js";
3
3
  export function validateReviewSessionEventsForSnapshot(snapshot, events) {
4
4
  const itemsByName = new Map(snapshot.items.map((item) => [item.metadata.name, item]));
@@ -53,6 +53,40 @@ export function validateReviewSessionEventsForSnapshot(snapshot, events) {
53
53
  message: `ReviewSessionEvent ${event.metadata.name} is a decision event but does not include a replayable workbench decision.`,
54
54
  });
55
55
  }
56
+ else if (itemName && itemsByName.has(itemName) && decision === "select-proposed") {
57
+ // The event's candidateId is the choice; it must name one proposed
58
+ // candidate of an item that holds a conflict.
59
+ const item = itemsByName.get(itemName);
60
+ const selectionIssue = conflictSelectionIssue(item, event.spec.candidateId);
61
+ if (selectionIssue) {
62
+ issues.push({
63
+ ...eventRef,
64
+ code: "invalid-conflict-selection",
65
+ reviewItemName: itemName,
66
+ candidateId: event.spec.candidateId,
67
+ message: `ReviewSessionEvent ${event.metadata.name}: ${selectionIssue}`,
68
+ });
69
+ }
70
+ const expectedStatus = workbenchDecisionDefinitions[decision].status;
71
+ if (event.spec.status !== expectedStatus) {
72
+ issues.push({
73
+ ...eventRef,
74
+ code: "decision-status-mismatch",
75
+ reviewItemName: itemName,
76
+ candidateId: event.spec.candidateId,
77
+ message: `ReviewSessionEvent ${event.metadata.name} decision ${decision} expects status ${expectedStatus}, but references ${event.spec.status ?? "no status"}.`,
78
+ });
79
+ }
80
+ if (event.spec.resolution !== undefined) {
81
+ issues.push({
82
+ ...eventRef,
83
+ code: "decision-resolution-mismatch",
84
+ reviewItemName: itemName,
85
+ candidateId: event.spec.candidateId,
86
+ message: `ReviewSessionEvent ${event.metadata.name} decision ${decision} expects resolution none, but references ${event.spec.resolution}.`,
87
+ });
88
+ }
89
+ }
56
90
  else if (itemName && itemsByName.has(itemName)) {
57
91
  const item = itemsByName.get(itemName);
58
92
  const expectedCandidate = item ? candidateForDecision(item, decision) : undefined;
@@ -835,7 +835,102 @@ export const REVIEW_WORKBENCH_CSS = `/* Bundled, scoped Survey Review Workbench
835
835
  font-size: 12px;
836
836
  }
837
837
 
838
- .survey-workbench-embed .excerpt-verification{
838
+ /* A queue that came from an extraction import but was not checked against
839
+ it (unverified), or that does not match it (diverges, shown instead of the
840
+ queue). */
841
+ .survey-workbench-embed .queue-attestation{
842
+ display: flex;
843
+ align-items: flex-start;
844
+ gap: var(--k-space-2);
845
+ margin: 0 0 var(--k-space-3);
846
+ padding: var(--k-space-2) var(--k-space-3);
847
+ border-radius: 9px;
848
+ font-size: 13px;
849
+ line-height: 1.45;
850
+ color: var(--k-caution);
851
+ background: var(--k-caution-wash);
852
+ }
853
+
854
+ .survey-workbench-embed .queue-attestation svg{
855
+ flex: none;
856
+ margin-top: 2px;
857
+ }
858
+
859
+ .survey-workbench-embed .queue-attestation.diverges{
860
+ color: var(--k-negative);
861
+ background: var(--k-negative-wash);
862
+ }
863
+
864
+ /* Conflicting proposed values: each value is listed with its own choice
865
+ control until the field is decided, then marked chosen or not chosen. */
866
+ .survey-workbench-embed .conflict-values ul{
867
+ list-style: none;
868
+ margin: var(--k-space-2) 0 0;
869
+ padding: 0;
870
+ display: grid;
871
+ gap: var(--k-space-2);
872
+ }
873
+
874
+ .survey-workbench-embed .conflict-values li{
875
+ display: flex;
876
+ align-items: center;
877
+ justify-content: space-between;
878
+ gap: var(--k-space-3);
879
+ flex-wrap: wrap;
880
+ padding: var(--k-space-2) var(--k-space-3);
881
+ border: 1px solid var(--k-line);
882
+ border-radius: 9px;
883
+ }
884
+
885
+ .survey-workbench-embed .conflict-values li[data-chosen="true"]{
886
+ border-color: var(--k-positive);
887
+ background: var(--k-positive-wash);
888
+ }
889
+
890
+ .survey-workbench-embed .conflict-values .conflict-text{
891
+ display: inline-flex;
892
+ align-items: baseline;
893
+ gap: var(--k-space-2);
894
+ flex-wrap: wrap;
895
+ min-width: 0;
896
+ }
897
+
898
+ .survey-workbench-embed .conflict-values .vtext{
899
+ font-weight: 600;
900
+ overflow-wrap: anywhere;
901
+ }
902
+
903
+ .survey-workbench-embed .conflict-values q{
904
+ color: var(--k-muted);
905
+ font-size: 12.5px;
906
+ overflow-wrap: anywhere;
907
+ }
908
+
909
+ .survey-workbench-embed .conflict-values .btn.choose{
910
+ min-height: 36px;
911
+ padding: 0 14px;
912
+ font-size: 13px;
913
+ }
914
+
915
+ .survey-workbench-embed .choice-tag{
916
+ font-size: 12px;
917
+ font-weight: 600;
918
+ padding: 2px 8px;
919
+ border-radius: 999px;
920
+ }
921
+
922
+ .survey-workbench-embed .choice-tag.chosen{
923
+ color: var(--k-positive);
924
+ background: var(--k-positive-wash);
925
+ }
926
+
927
+ .survey-workbench-embed .choice-tag.not-chosen{
928
+ color: var(--k-muted);
929
+ background: var(--k-sunken);
930
+ }
931
+
932
+ .survey-workbench-embed .excerpt-verification,
933
+ .survey-workbench-embed .support-verification{
839
934
  margin: 0;
840
935
  font-size: 12px;
841
936
  color: var(--k-muted);
@@ -34,6 +34,7 @@
34
34
  */
35
35
  import { type ReviewQueueSessionState, type ReviewWorkbenchState } from "./review-workbench.js";
36
36
  import type { ReviewPresentationAdapter } from "./review-presentation.js";
37
+ import type { ExtractionEnvelopeImport, ExtractionEnvelopeImportResult } from "../extraction-envelope.js";
37
38
  import { type ExtractionInspectorInput } from "./extraction-inspector.js";
38
39
  export declare class SurveyReviewWorkbenchElement extends HTMLElement {
39
40
  #private;
@@ -45,6 +46,15 @@ export declare class SurveyReviewWorkbenchElement extends HTMLElement {
45
46
  /** Optional presentation adapter for custom labels, value summaries, and links. */
46
47
  get presentationAdapter(): ReviewPresentationAdapter | undefined;
47
48
  set presentationAdapter(value: ReviewPresentationAdapter | undefined);
49
+ /**
50
+ * The extraction import record the queue was built from, as stored beside
51
+ * it. The workbench checks the queue against it (see
52
+ * `MountReviewWorkbenchOptions.extractionImport`). When unset, the import of
53
+ * a single-import `extractionInspector` is used; with neither, a queue whose
54
+ * items came from an extraction import shows an "Unverified queue" notice.
55
+ */
56
+ get extractionImport(): ExtractionEnvelopeImport | ExtractionEnvelopeImportResult | null;
57
+ set extractionImport(value: ExtractionEnvelopeImport | ExtractionEnvelopeImportResult | null | undefined);
48
58
  /** Optional read-only source pane attached to this workbench's existing review lifecycle. */
49
59
  get extractionInspector(): ExtractionInspectorInput | null;
50
60
  set extractionInspector(value: ExtractionInspectorInput | null | undefined);
@@ -169,6 +169,7 @@ export class SurveyReviewWorkbenchElement extends HTMLElement {
169
169
  #session = null;
170
170
  #presentationAdapter = undefined;
171
171
  #extractionInspector = null;
172
+ #extractionImport = null;
172
173
  #unmountInspector;
173
174
  #root;
174
175
  #mountRoot;
@@ -340,6 +341,18 @@ export class SurveyReviewWorkbenchElement extends HTMLElement {
340
341
  this.#presentationAdapter = value;
341
342
  this.#remount();
342
343
  }
344
+ /**
345
+ * The extraction import record the queue was built from, as stored beside
346
+ * it. The workbench checks the queue against it (see
347
+ * `MountReviewWorkbenchOptions.extractionImport`). When unset, the import of
348
+ * a single-import `extractionInspector` is used; with neither, a queue whose
349
+ * items came from an extraction import shows an "Unverified queue" notice.
350
+ */
351
+ get extractionImport() { return this.#extractionImport; }
352
+ set extractionImport(value) {
353
+ this.#extractionImport = value ?? null;
354
+ this.#remount();
355
+ }
343
356
  /** Optional read-only source pane attached to this workbench's existing review lifecycle. */
344
357
  get extractionInspector() { return this.#extractionInspector; }
345
358
  set extractionInspector(value) {
@@ -423,9 +436,14 @@ export class SurveyReviewWorkbenchElement extends HTMLElement {
423
436
  this.#renderEmpty();
424
437
  return;
425
438
  }
426
- const options = this.#presentationAdapter
427
- ? { presentationAdapter: this.#presentationAdapter }
428
- : {};
439
+ const inspectorImport = this.#extractionInspector && !("imports" in this.#extractionInspector)
440
+ ? this.#extractionInspector.importResult
441
+ : undefined;
442
+ const extractionImport = this.#extractionImport ?? inspectorImport;
443
+ const options = {
444
+ ...(this.#presentationAdapter ? { presentationAdapter: this.#presentationAdapter } : {}),
445
+ ...(extractionImport ? { extractionImport } : {}),
446
+ };
429
447
  this.#applyThemeClasses();
430
448
  mountReviewWorkbench(this.#mountRoot, this.#session, options);
431
449
  this.#unmountInspector?.();
@@ -832,7 +832,102 @@
832
832
  font-size: 12px;
833
833
  }
834
834
 
835
- .survey-workbench-embed .excerpt-verification{
835
+ /* A queue that came from an extraction import but was not checked against
836
+ it (unverified), or that does not match it (diverges, shown instead of the
837
+ queue). */
838
+ .survey-workbench-embed .queue-attestation{
839
+ display: flex;
840
+ align-items: flex-start;
841
+ gap: var(--k-space-2);
842
+ margin: 0 0 var(--k-space-3);
843
+ padding: var(--k-space-2) var(--k-space-3);
844
+ border-radius: 9px;
845
+ font-size: 13px;
846
+ line-height: 1.45;
847
+ color: var(--k-caution);
848
+ background: var(--k-caution-wash);
849
+ }
850
+
851
+ .survey-workbench-embed .queue-attestation svg{
852
+ flex: none;
853
+ margin-top: 2px;
854
+ }
855
+
856
+ .survey-workbench-embed .queue-attestation.diverges{
857
+ color: var(--k-negative);
858
+ background: var(--k-negative-wash);
859
+ }
860
+
861
+ /* Conflicting proposed values: each value is listed with its own choice
862
+ control until the field is decided, then marked chosen or not chosen. */
863
+ .survey-workbench-embed .conflict-values ul{
864
+ list-style: none;
865
+ margin: var(--k-space-2) 0 0;
866
+ padding: 0;
867
+ display: grid;
868
+ gap: var(--k-space-2);
869
+ }
870
+
871
+ .survey-workbench-embed .conflict-values li{
872
+ display: flex;
873
+ align-items: center;
874
+ justify-content: space-between;
875
+ gap: var(--k-space-3);
876
+ flex-wrap: wrap;
877
+ padding: var(--k-space-2) var(--k-space-3);
878
+ border: 1px solid var(--k-line);
879
+ border-radius: 9px;
880
+ }
881
+
882
+ .survey-workbench-embed .conflict-values li[data-chosen="true"]{
883
+ border-color: var(--k-positive);
884
+ background: var(--k-positive-wash);
885
+ }
886
+
887
+ .survey-workbench-embed .conflict-values .conflict-text{
888
+ display: inline-flex;
889
+ align-items: baseline;
890
+ gap: var(--k-space-2);
891
+ flex-wrap: wrap;
892
+ min-width: 0;
893
+ }
894
+
895
+ .survey-workbench-embed .conflict-values .vtext{
896
+ font-weight: 600;
897
+ overflow-wrap: anywhere;
898
+ }
899
+
900
+ .survey-workbench-embed .conflict-values q{
901
+ color: var(--k-muted);
902
+ font-size: 12.5px;
903
+ overflow-wrap: anywhere;
904
+ }
905
+
906
+ .survey-workbench-embed .conflict-values .btn.choose{
907
+ min-height: 36px;
908
+ padding: 0 14px;
909
+ font-size: 13px;
910
+ }
911
+
912
+ .survey-workbench-embed .choice-tag{
913
+ font-size: 12px;
914
+ font-weight: 600;
915
+ padding: 2px 8px;
916
+ border-radius: 999px;
917
+ }
918
+
919
+ .survey-workbench-embed .choice-tag.chosen{
920
+ color: var(--k-positive);
921
+ background: var(--k-positive-wash);
922
+ }
923
+
924
+ .survey-workbench-embed .choice-tag.not-chosen{
925
+ color: var(--k-muted);
926
+ background: var(--k-sunken);
927
+ }
928
+
929
+ .survey-workbench-embed .excerpt-verification,
930
+ .survey-workbench-embed .support-verification{
836
931
  margin: 0;
837
932
  font-size: 12px;
838
933
  color: var(--k-muted);
@@ -2,16 +2,25 @@ import { type ReviewQueueSessionState, type ReviewWorkbenchDecision, type Review
2
2
  import { type ReviewSessionReplayIssue, type ReviewSessionReplayWarning } from "./review-session-replay.js";
3
3
  import { type ReviewPresentationAdapter } from "./review-presentation.js";
4
4
  import { type ReviewCandidate, type ReviewDecision, type ReviewItem, type ReviewSession, type ReviewSessionEvent, type ReviewValueDescriptor } from "../review-resource.js";
5
+ import type { ExtractionEnvelopeImport, ExtractionEnvelopeImportResult } from "../extraction-envelope.js";
5
6
  export { reviewAuditRowKeys, type ReviewAuditRowKey } from "./audit-rows.js";
6
- export { assertReviewQueueAgainstExtractionImport, assertReviewQueueBinding, bindReviewQueue, hashReviewQueueSnapshot, UnattestedExtractionQueueError, UnattestedReviewQueueError, validateReviewQueueAgainstExtractionImport, validateReviewQueueBinding, type BindReviewQueueOptions, type ReviewQueueBinding, type ReviewQueueBindingIssue, type ReviewQueueBindingIssueCode, type ReviewQueueExtractionIssue, type ReviewQueueExtractionIssueCode, type ValidateReviewQueueBindingOptions, } from "./queue-binding.js";
7
+ export { assertReviewQueueAgainstExtractionImport, assertReviewQueueBinding, attestReviewQueueExtraction, bindReviewQueue, reviewItemCarriesExtractionBinding, unverifiedExtractionQueueSentence, hashReviewQueueSnapshot, UnattestedExtractionQueueError, UnattestedReviewQueueError, validateReviewQueueAgainstExtractionImport, validateReviewQueueBinding, type BindReviewQueueOptions, type ReviewQueueBinding, type ReviewQueueBindingIssue, type ReviewQueueBindingIssueCode, type ReviewQueueExtractionAttestation, type ReviewQueueExtractionIssue, type ReviewQueueExtractionIssueCode, type ValidateReviewQueueBindingOptions, } from "./queue-binding.js";
7
8
  export { buildExtractionInspectorModel, exportExtractionInspector, filterExtractionInspectorCandidates, mountExtractionInspector, type ExtractionAlignmentState, type ArtifactUnavailableCode, type BuiltExtractionInspectorCandidate, type BuiltExtractionInspectorModel, type ExtractionInspectorCandidate, type ExtractionInspectorEntry, type ExtractionInspectorExportOptions, type ExtractionInspectorFilters, type ExtractionInspectorInput, type ExtractionInspectorMountOptions, type ExtractionInspectorModel, type ExtractionInspectorSource, type ResolvedExtractionArtifact, } from "./extraction-inspector.js";
8
- export { buildReviewSessionEvents, buildReviewSessionEvent, buildReviewSessionResource, candidateForDecision, decisionCandidateId, decisionSelectsNoCandidate, keepActionDecision, currentReviewItem, currentReviewWorkbenchState, defaultReviewSessionName, deriveQueueRowStatus, initialReviewQueueSessionState, initialReviewWorkbenchState, nextUnresolvedItemName, replayReviewSessionEvents, reviewSessionSummary, reviewWorkbenchSessionStorageKey, selectedCandidateRole, workbenchDecisionDefinitions, type ReviewQueueRowStatus, type ReviewQueueSessionState, type ReviewSessionSummary, type ReviewWorkbenchDecision, type ReviewWorkbenchState, } from "./review-queue-session.js";
9
- export { buildReviewCandidatePresentation, buildReviewItemPresentation, buildReviewResultPresentation, humanizeIdentifier, type ReviewCandidatePresentation, type ReviewCandidatePresentationContext, type ReviewItemPresentation, type ReviewItemPresentationContext, type ReviewPresentationAdapter, type ReviewPresentationLink, type ReviewResultPresentation, type ReviewTracePresentationContext, type ReviewTraceRef, type ReviewValuePresentationContext, } from "./review-presentation.js";
9
+ export { buildReviewSessionEvents, buildReviewSessionEvent, buildReviewSessionResource, candidateForDecision, conflictSelectionIssue, unchosenProposedCandidates, decisionCandidateId, decisionSelectsNoCandidate, keepActionDecision, currentReviewItem, currentReviewWorkbenchState, defaultReviewSessionName, deriveQueueRowStatus, initialReviewQueueSessionState, initialReviewWorkbenchState, nextUnresolvedItemName, replayReviewSessionEvents, reviewSessionSummary, reviewWorkbenchSessionStorageKey, selectedCandidateRole, workbenchDecisionDefinitions, type ReviewQueueRowStatus, type ReviewQueueSessionState, type ReviewSessionSummary, type ReviewWorkbenchDecision, type ReviewWorkbenchState, } from "./review-queue-session.js";
10
+ export { buildReviewCandidatePresentation, buildReviewItemPresentation, buildReviewResultPresentation, humanizeIdentifier, type ExcludedProposalPresentation, type ExcludedProposalsUnreadable, type ReviewCandidatePresentation, type ReviewCandidatePresentationContext, type ReviewItemPresentation, type ReviewItemPresentationContext, type ReviewPresentationAdapter, type ReviewPresentationLink, type ReviewResultPresentation, type ReviewTracePresentationContext, type ReviewTraceRef, type ReviewValuePresentationContext, } from "./review-presentation.js";
10
11
  export { buildSurfaceProjectionPreview, type PreviewAuthorityTrace, type PreviewCandidateHistory, type PreviewClaim, type PreviewIntegrityPosture, type PreviewReviewEvent, type PreviewSourceAuthority, type PreviewSourceEvidence, type SurfaceProjectionPreview, } from "./review-surface-preview.js";
11
12
  export { reviewSessionReplayWarningsForSnapshot, validateReviewSessionEventsForSnapshot, type ReviewSessionReplayIssue, type ReviewSessionReplayIssueCode, type ReviewSessionReplayWarning, } from "./review-session-replay.js";
12
13
  export { checkEditedValueForItem, editedValueFromEditorText, type EditedValueCheck, } from "./edited-value.js";
13
14
  export { assertReviewDecisionModeAllows, DecisionModeViolationError, validateReviewDecisionMode, type ReviewDecisionModeIssue, type ReviewDecisionModeIssueCode, type ReviewDecisionModeResult, } from "./producer-decision-mode.js";
14
- export declare function buildReviewDecision(state: ReviewWorkbenchState): ReviewDecision | undefined;
15
+ /**
16
+ * Options for building review decisions. The decision prompt is rendered from
17
+ * the item when the decision is built, so pass the same presentation adapter
18
+ * the card used, or the recorded prompt renders values its own way.
19
+ */
20
+ export interface ReviewDecisionBuildOptions {
21
+ readonly presentationAdapter?: ReviewPresentationAdapter;
22
+ }
23
+ export declare function buildReviewDecision(state: ReviewWorkbenchState, options?: ReviewDecisionBuildOptions): ReviewDecision | undefined;
15
24
  export interface ReviewWorkbenchSessionExport {
16
25
  readonly session: ReviewSession;
17
26
  readonly events: readonly ReviewSessionEvent[];
@@ -31,6 +40,8 @@ export interface DeriveReviewSessionApplyResultForSnapshotOptions {
31
40
  readonly snapshot: ReviewQueueSessionState;
32
41
  readonly events: readonly ReviewSessionEvent[];
33
42
  readonly requiredResolvedItems?: ReviewSessionApplyResolutionRequirement;
43
+ /** The adapter the reviewer's card used; the recorded decision prompts render values with it. */
44
+ readonly presentationAdapter?: ReviewPresentationAdapter;
34
45
  }
35
46
  export type DeriveReviewSessionApplyResultForSnapshotResult = {
36
47
  readonly ok: true;
@@ -89,6 +100,13 @@ export interface PersistentReviewSessionEventStoreOptions {
89
100
  export interface MountReviewWorkbenchOptions {
90
101
  readonly eventStore?: ReviewSessionEventStore;
91
102
  readonly presentationAdapter?: ReviewPresentationAdapter;
103
+ /**
104
+ * The extraction import record the queue was built from, as stored beside
105
+ * it. When supplied, the workbench checks the queue against it and refuses to
106
+ * present a queue that diverges. When absent and the queue's items came from
107
+ * an extraction import, the workbench shows an "Unverified queue" notice.
108
+ */
109
+ readonly extractionImport?: ExtractionEnvelopeImport | ExtractionEnvelopeImportResult;
92
110
  /** Maximum review cards mounted at once. Defaults to 50 and is capped at 250. */
93
111
  readonly pageSize?: number;
94
112
  }
@@ -189,15 +207,15 @@ export interface MapReviewWorkbenchResultsToApplyActionsOptions<TAction> {
189
207
  readonly skip?: (context: ReviewApplyActionContext) => boolean;
190
208
  readonly map: (context: ReviewApplyActionContext) => TAction | readonly TAction[] | undefined;
191
209
  }
192
- export declare function buildReviewDecisionsFromSession(session: ReviewQueueSessionState): ReviewDecision[];
210
+ export declare function buildReviewDecisionsFromSession(session: ReviewQueueSessionState, options?: ReviewDecisionBuildOptions): ReviewDecision[];
193
211
  export declare function requireReviewResultForItem(item: ReviewItem, results: readonly ReviewWorkbenchResult[]): ReviewWorkbenchResult;
194
212
  export declare function assertReviewResultMatches(result: ReviewWorkbenchResult, expectation: ReviewApplyResultExpectation): void;
195
213
  export declare function mapReviewWorkbenchResultsToApplyActions<TAction>(options: MapReviewWorkbenchResultsToApplyActionsOptions<TAction>): ReviewApplyActionMapping<TAction>[];
196
214
  export declare const mapReviewApplyActions: typeof mapReviewWorkbenchResultsToApplyActions;
197
- export declare function buildReviewWorkbenchResultsFromSession(session: ReviewQueueSessionState): ReviewWorkbenchResult[];
198
- export declare function buildReviewWorkbenchSessionExport(session: ReviewQueueSessionState, events?: readonly ReviewSessionEvent[]): ReviewWorkbenchSessionExport;
215
+ export declare function buildReviewWorkbenchResultsFromSession(session: ReviewQueueSessionState, options?: ReviewDecisionBuildOptions): ReviewWorkbenchResult[];
216
+ export declare function buildReviewWorkbenchSessionExport(session: ReviewQueueSessionState, events?: readonly ReviewSessionEvent[], options?: ReviewDecisionBuildOptions): ReviewWorkbenchSessionExport;
199
217
  export declare function replayReviewSessionEventsForSnapshot(snapshot: ReviewQueueSessionState, events: readonly ReviewSessionEvent[]): ReviewQueueSessionState;
200
- export declare function buildReviewWorkbenchSessionExportForSnapshot(snapshot: ReviewQueueSessionState, events: readonly ReviewSessionEvent[]): ReviewWorkbenchSessionExport;
218
+ export declare function buildReviewWorkbenchSessionExportForSnapshot(snapshot: ReviewQueueSessionState, events: readonly ReviewSessionEvent[], options?: ReviewDecisionBuildOptions): ReviewWorkbenchSessionExport;
201
219
  export declare function deriveReviewSessionApplyResultForSnapshot(options: DeriveReviewSessionApplyResultForSnapshotOptions): DeriveReviewSessionApplyResultForSnapshotResult;
202
220
  export declare function createInMemoryReviewSessionEventStore(initialEvents?: readonly ReviewSessionEvent[]): ReviewSessionEventStore & {
203
221
  events(): readonly ReviewSessionEvent[];
@@ -210,6 +228,8 @@ export declare function createPersistentReviewSessionEventStore(options: Persist
210
228
  export declare function renderReviewWorkbenchHtml(state: ReviewWorkbenchState | ReviewQueueSessionState, _events?: readonly ReviewSessionEvent[], options?: {
211
229
  readonly presentationAdapter?: ReviewPresentationAdapter;
212
230
  readonly queueView?: Partial<ReviewQueueView>;
231
+ /** See {@link MountReviewWorkbenchOptions.extractionImport}. */
232
+ readonly extractionImport?: ExtractionEnvelopeImport | ExtractionEnvelopeImportResult;
213
233
  }): string;
214
234
  export declare function buildReviewQueueWindow(session: ReviewQueueSessionState, view?: Partial<ReviewQueueView>): ReviewQueueWindow;
215
235
  /**