@happyvertical/smrt-ingestion 0.57.20 → 0.57.22

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 (115) hide show
  1. package/FEEDBACK.md +137 -0
  2. package/PROPOSALS.md +146 -5
  3. package/README.md +168 -2
  4. package/REVIEW.md +611 -7
  5. package/agents/execution.md +87 -0
  6. package/dist/chunks/{execution-NoDh3pjs.js → execution-BzVQax0n.js} +528 -42
  7. package/dist/chunks/execution-BzVQax0n.js.map +1 -0
  8. package/dist/chunks/{feedback-CJB900iG.js → feedback-D3UTF8fm.js} +175 -36
  9. package/dist/chunks/feedback-D3UTF8fm.js.map +1 -0
  10. package/dist/chunks/{proposal-errors-VxcTU6Db.js → proposal-contracts-77Uo1B1j.js} +38 -44
  11. package/dist/chunks/proposal-contracts-77Uo1B1j.js.map +1 -0
  12. package/dist/chunks/reviewer-instruction-CEc3AOuU.js +33 -0
  13. package/dist/chunks/reviewer-instruction-CEc3AOuU.js.map +1 -0
  14. package/dist/dto.d.ts +75 -0
  15. package/dist/dto.d.ts.map +1 -1
  16. package/dist/execution-contracts.d.ts +4 -1
  17. package/dist/execution-contracts.d.ts.map +1 -1
  18. package/dist/execution-dto.d.ts +16 -0
  19. package/dist/execution-dto.d.ts.map +1 -1
  20. package/dist/execution-internal.d.ts +2 -0
  21. package/dist/execution-internal.d.ts.map +1 -1
  22. package/dist/execution.d.ts +101 -4
  23. package/dist/execution.d.ts.map +1 -1
  24. package/dist/execution.js +2 -2
  25. package/dist/feedback-dto.d.ts +18 -4
  26. package/dist/feedback-dto.d.ts.map +1 -1
  27. package/dist/feedback-internal.d.ts +9 -0
  28. package/dist/feedback-internal.d.ts.map +1 -1
  29. package/dist/feedback.d.ts +10 -0
  30. package/dist/feedback.d.ts.map +1 -1
  31. package/dist/index.js +2 -2
  32. package/dist/manifest.json +339 -3
  33. package/dist/models.d.ts +15 -0
  34. package/dist/models.d.ts.map +1 -1
  35. package/dist/models.js +82 -2
  36. package/dist/models.js.map +1 -1
  37. package/dist/policy.d.ts +3 -0
  38. package/dist/policy.d.ts.map +1 -1
  39. package/dist/presented-filename.d.ts +11 -0
  40. package/dist/presented-filename.d.ts.map +1 -0
  41. package/dist/proposal-contracts.d.ts +31 -6
  42. package/dist/proposal-contracts.d.ts.map +1 -1
  43. package/dist/proposal-dto.d.ts +17 -0
  44. package/dist/proposal-dto.d.ts.map +1 -1
  45. package/dist/proposal-errors.d.ts +20 -0
  46. package/dist/proposal-errors.d.ts.map +1 -1
  47. package/dist/proposal-validation.d.ts +26 -0
  48. package/dist/proposal-validation.d.ts.map +1 -1
  49. package/dist/proposals.d.ts +6 -1
  50. package/dist/proposals.d.ts.map +1 -1
  51. package/dist/proposals.js +268 -71
  52. package/dist/proposals.js.map +1 -1
  53. package/dist/redaction.d.ts +9 -0
  54. package/dist/redaction.d.ts.map +1 -0
  55. package/dist/review-dto.d.ts +108 -5
  56. package/dist/review-dto.d.ts.map +1 -1
  57. package/dist/review-host.d.ts +52 -3
  58. package/dist/review-host.d.ts.map +1 -1
  59. package/dist/review-instruction-view.d.ts +12 -0
  60. package/dist/review-instruction-view.d.ts.map +1 -0
  61. package/dist/review-summary.d.ts.map +1 -1
  62. package/dist/reviewer-instruction.d.ts +20 -0
  63. package/dist/reviewer-instruction.d.ts.map +1 -0
  64. package/dist/server.d.ts +252 -13
  65. package/dist/server.d.ts.map +1 -1
  66. package/dist/server.js +1190 -85
  67. package/dist/server.js.map +1 -1
  68. package/dist/smrt-knowledge.json +137 -23
  69. package/dist/sources/common.d.ts +11 -0
  70. package/dist/sources/common.d.ts.map +1 -1
  71. package/dist/sources/email.d.ts.map +1 -1
  72. package/dist/sources/http.d.ts.map +1 -1
  73. package/dist/sources/watch-folder.d.ts.map +1 -1
  74. package/dist/svelte/components/ActionReview.svelte +54 -55
  75. package/dist/svelte/components/ActionReview.svelte.d.ts +8 -1
  76. package/dist/svelte/components/ActionReview.svelte.d.ts.map +1 -1
  77. package/dist/svelte/components/CandidatePicker.svelte +72 -0
  78. package/dist/svelte/components/CandidatePicker.svelte.d.ts +15 -0
  79. package/dist/svelte/components/CandidatePicker.svelte.d.ts.map +1 -0
  80. package/dist/svelte/components/EvidenceViewer.svelte +60 -4
  81. package/dist/svelte/components/EvidenceViewer.svelte.d.ts +12 -1
  82. package/dist/svelte/components/EvidenceViewer.svelte.d.ts.map +1 -1
  83. package/dist/svelte/components/InboxView.svelte +172 -19
  84. package/dist/svelte/components/InboxView.svelte.d.ts +36 -2
  85. package/dist/svelte/components/InboxView.svelte.d.ts.map +1 -1
  86. package/dist/svelte/components/IntakeInbox.svelte +6 -3
  87. package/dist/svelte/components/IntakeInbox.svelte.d.ts +4 -1
  88. package/dist/svelte/components/IntakeInbox.svelte.d.ts.map +1 -1
  89. package/dist/svelte/components/IntakeReview.svelte +4 -2
  90. package/dist/svelte/components/IntakeReview.svelte.d.ts +2 -0
  91. package/dist/svelte/components/IntakeReview.svelte.d.ts.map +1 -1
  92. package/dist/svelte/components/IntakeWorkspace.svelte +27 -0
  93. package/dist/svelte/components/IntakeWorkspace.svelte.d.ts +19 -0
  94. package/dist/svelte/components/IntakeWorkspace.svelte.d.ts.map +1 -0
  95. package/dist/svelte/components/ReviewView.svelte +653 -71
  96. package/dist/svelte/components/ReviewView.svelte.d.ts +20 -1
  97. package/dist/svelte/components/ReviewView.svelte.d.ts.map +1 -1
  98. package/dist/svelte/components/TriageView.svelte +669 -0
  99. package/dist/svelte/components/TriageView.svelte.d.ts +16 -0
  100. package/dist/svelte/components/TriageView.svelte.d.ts.map +1 -0
  101. package/dist/svelte/i18n.d.ts +56 -0
  102. package/dist/svelte/i18n.d.ts.map +1 -1
  103. package/dist/svelte/i18n.js +56 -0
  104. package/dist/svelte/index.d.ts +2 -1
  105. package/dist/svelte/index.d.ts.map +1 -1
  106. package/dist/svelte/index.js +1 -0
  107. package/dist/svelte/view-utils.d.ts +67 -0
  108. package/dist/svelte/view-utils.d.ts.map +1 -1
  109. package/dist/svelte/view-utils.js +157 -0
  110. package/package.json +13 -13
  111. package/dist/chunks/execution-NoDh3pjs.js.map +0 -1
  112. package/dist/chunks/execution-internal-DWteDHM2.js +0 -7
  113. package/dist/chunks/execution-internal-DWteDHM2.js.map +0 -1
  114. package/dist/chunks/feedback-CJB900iG.js.map +0 -1
  115. package/dist/chunks/proposal-errors-VxcTU6Db.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  /** Browser-only view contracts. Every value must come from an authenticated host. */
2
- import type { IntakeEvidenceDTO, IntakeItemDTO } from './dto.js';
3
- import type { ActionResult, IntakeValues, PreviewPlanInput, PreviewProposalInput, ProposalReview, ResultReference, ReviewInput } from './execution-dto.js';
4
- import type { CandidatePage, CompletedAnalysisSnapshot, GenerationOutput } from './proposal-dto.js';
5
- export type InboxState = 'processing' | 'unresolved' | 'waiting' | 'failed' | 'deferred' | 'partially_completed' | 'completed';
2
+ import type { IntakeEvidenceDTO, IntakeFailure, IntakeItemDTO, ItemDisposition } from './dto.js';
3
+ import type { ActionResult, IntakeValues, PreviewPlanInput, PreviewProposalInput, ProposalReview, ResolveItemInput, ResultReference, ReviewInput, StartActionInput } from './execution-dto.js';
4
+ import type { CandidatePage, CompletedAnalysisSnapshot, GenerationOutput, ProposalCatalogEntry } from './proposal-dto.js';
5
+ export type InboxState = 'processing' | 'unresolved' | 'waiting' | 'failed' | 'deferred' | 'partially_completed' | 'completed' | 'resolved';
6
6
  export interface ReviewAction {
7
7
  review: ProposalReview;
8
8
  /** Absent on state-only stale/expired/unavailable entries. */
@@ -10,6 +10,8 @@ export interface ReviewAction {
10
10
  handlerId?: string;
11
11
  handlerVersion?: string;
12
12
  attemptId?: string;
13
+ /** `reviewer-selected` marks a human-started action; never automation-eligible. */
14
+ origin?: string;
13
15
  dependencies?: Record<string, ResultReference>;
14
16
  result?: ActionResult;
15
17
  /** Authorized identity/CAS only; hosts must collect fresh explicit args. */
@@ -46,6 +48,26 @@ export interface InboxEntry {
46
48
  label: string;
47
49
  state: InboxState;
48
50
  assignment: Assignment;
51
+ /**
52
+ * An inbox row's preview of its primary original, present only on `list`
53
+ * entries and only when the host supplies the opt-in `rowEvidence` option
54
+ * (#4213). The part is chosen by role: the shallowest child part (an
55
+ * upload's file, an email's first attachment), else the first root part.
56
+ * `list` reads the page's durable parts in one batched query, asks
57
+ * `rowEvidence` once for the page, and fills this from its answer; it is
58
+ * absent when the host omits `rowEvidence`, does not answer for the row,
59
+ * or the item has no durable parts. `load` never sets it.
60
+ */
61
+ evidence?: InboxEvidence;
62
+ }
63
+ /** A row's preview: the primary part's identity plus host URLs, never text. */
64
+ export interface InboxEvidence {
65
+ evidence: IntakeEvidenceDTO;
66
+ label: string;
67
+ /** Host-authorized same-origin content URL, never an object-storage key. */
68
+ viewUrl?: string;
69
+ /** Optional host-authorized same-origin preview image for the row. */
70
+ thumbnailUrl?: string;
49
71
  }
50
72
  export interface EvidenceView {
51
73
  evidence: IntakeEvidenceDTO;
@@ -59,11 +81,61 @@ export interface ItemReviewView {
59
81
  evidence: EvidenceView[];
60
82
  analysis?: CompletedAnalysisSnapshot;
61
83
  generation?: GenerationOutput;
84
+ /** Handlers the item's catalog currently offers a reviewer; presentation only. */
85
+ catalog?: ProposalCatalogEntry[];
86
+ /** Reviewer and reason of a resolved item, loaded under review authority. */
87
+ disposition?: ItemDisposition;
62
88
  reviews: ReviewPage;
89
+ /** Present when an instruction was recorded or carried by the displayed generation. */
90
+ instruction?: ReviewerInstructionView;
63
91
  /** Host-projected safe state, never raw server exception text. */
64
92
  availability: 'available' | 'stale' | 'revoked' | 'expired' | 'unavailable';
65
93
  message?: string;
66
94
  }
95
+ /** Immutable authenticated reviewer guidance for one item; it steers the model only. */
96
+ export interface ReviewerInstruction {
97
+ id: string;
98
+ text: string;
99
+ actorId: string;
100
+ recordedAt: string;
101
+ /** The instruction this one replaced for future interpretations, if any. */
102
+ supersedesId: string | null;
103
+ digest: string;
104
+ }
105
+ export interface ReviewerInstructionInput {
106
+ itemId: string;
107
+ attemptId: string;
108
+ expectedRevision: number;
109
+ text: string;
110
+ requestId: string;
111
+ }
112
+ export interface ReviewerInstructionView {
113
+ /**
114
+ * Latest recorded instruction that is still in effect: the item's newest
115
+ * extraction carries it, so its interpretations do. Null when none was
116
+ * recorded or a host reprocess dropped it (see `dropped`).
117
+ */
118
+ current: ReviewerInstruction | null;
119
+ /**
120
+ * Latest recorded instruction that a host reprocess dropped (a reprocess
121
+ * builds its own configuration and cannot carry human corrections). It no
122
+ * longer applies; the reviewer can re-record it.
123
+ */
124
+ dropped?: ReviewerInstruction;
125
+ /** The instruction the displayed generation was produced under. */
126
+ applied: ReviewerInstruction | null;
127
+ /** Displayed suggestions predate the current instruction. */
128
+ stale: boolean;
129
+ /** Safe failure category, or `not_started` when interpretation was never appended in time. */
130
+ failure?: IntakeFailure | 'not_started';
131
+ /** Server-side "in flight", including the gap between extraction and interpretation. */
132
+ reinterpreting?: boolean;
133
+ /** Record/retry binding when no current generation is displayable: the latest completed generation attempt and the item's current revision. */
134
+ binding?: {
135
+ attemptId: string;
136
+ expectedRevision: number;
137
+ };
138
+ }
67
139
  export interface LogicalSplitInput {
68
140
  itemId: string;
69
141
  attemptId: string;
@@ -72,12 +144,21 @@ export interface LogicalSplitInput {
72
144
  groups: number[][];
73
145
  requestId: string;
74
146
  }
147
+ /**
148
+ * A preview the handler refused on its own validation of the arguments. The
149
+ * reviewer may correct the arguments and retry; it is never an access result.
150
+ */
151
+ export interface PreviewRejection {
152
+ rejected: 'invalid';
153
+ }
75
154
  /** Transport-neutral callbacks. Implement on an authenticated host; props confer no permission. */
76
155
  export interface IntakeReviewHost {
156
+ /** Newest receipt first; `limit` defaults to 20 and is clamped to 1..100. */
77
157
  list(input: {
78
158
  state?: InboxState;
79
159
  assigneeId?: string;
80
160
  cursor?: string;
161
+ limit?: number;
81
162
  }): Promise<{
82
163
  items: InboxEntry[];
83
164
  nextCursor?: string;
@@ -91,7 +172,13 @@ export interface IntakeReviewHost {
91
172
  attemptId: string;
92
173
  index: number;
93
174
  requestId: string;
94
- }): Promise<void>;
175
+ /**
176
+ * Explicit human arguments completing a `needs_review` suggestion. The host
177
+ * publishes them through the ordinary operation/plan preview, never through
178
+ * the generated snapshot, so the handler validates them again.
179
+ */
180
+ args?: IntakeValues;
181
+ }): Promise<void | PreviewRejection>;
95
182
  decide(input: ReviewInput): Promise<void>;
96
183
  apply(actionId: string): Promise<ActionResult>;
97
184
  editPlan?: (input: PreviewPlanInput) => Promise<void>;
@@ -109,6 +196,22 @@ export interface IntakeReviewHost {
109
196
  requestId: string;
110
197
  }): Promise<void>;
111
198
  split(input: LogicalSplitInput): Promise<void>;
199
+ /** Start a reviewer-chosen handler; the server previews and requires normal approval. */
200
+ startAction?: (input: StartActionInput) => Promise<void>;
201
+ /** Close the item as handled without an action; terminal and distinct from reject. */
202
+ resolve?: (input: ResolveItemInput) => Promise<void>;
203
+ /**
204
+ * Record reviewer guidance and request a background reinterpretation; never
205
+ * approval. Resolves `{ stale: true }` when the anchor is superseded or work
206
+ * is still in flight, a refresh-and-retry signal rather than a denial, and
207
+ * `{ invalid: true }` when the text fails validation (empty, whitespace-only
208
+ * or longer than 4,000 characters), shown inline rather than as a denial.
209
+ */
210
+ instruct?: (input: ReviewerInstructionInput) => Promise<void | {
211
+ stale: true;
212
+ } | {
213
+ invalid: true;
214
+ }>;
112
215
  /** Explicit correctness judgment only; never called implicitly after review or apply. */
113
216
  feedback?: (input: import('./feedback-dto.js').RecordFeedbackInput) => Promise<import('./feedback-dto.js').FeedbackReceipt | void>;
114
217
  }
@@ -1 +1 @@
1
- {"version":3,"file":"review-dto.d.ts","sourceRoot":"","sources":["../src/review-dto.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf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,yFAAyF;IACzF,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,OAAO,mBAAmB,EAAE,mBAAmB,KACnD,OAAO,CAAC,OAAO,mBAAmB,EAAE,eAAe,GAAG,IAAI,CAAC,CAAC;CAClE"}
@@ -1,23 +1,72 @@
1
1
  /** Server-side implementation of the transport-neutral review callback contract. */
2
2
  import type { IntakeEvidenceDTO, IntakeItemDTO } from './dto.js';
3
- import type { Assignment, EvidenceView, IntakeReviewHost } from './review-dto.js';
4
- import type { IngestionService } from './server.js';
3
+ import type { Assignment, EvidenceView, InboxEvidence, IntakeReviewHost } from './review-dto.js';
4
+ import { type IngestionService } from './server.js';
5
+ /** One listed row's primary original, as passed to `rowEvidence`. */
6
+ export interface RowEvidenceRequest {
7
+ itemId: string;
8
+ evidence: IntakeEvidenceDTO;
9
+ }
10
+ /** A host's preview for one row: label and same-origin URLs, never text. */
11
+ export type RowEvidenceView = Omit<InboxEvidence, 'evidence'>;
5
12
  /** Trusted application adapters, bound to the same authenticated session as service. */
6
13
  export interface IntakeReviewHostOptions {
7
14
  /** Authenticate receipt, enforce upload limits, and request the first extraction. */
8
15
  upload: IntakeReviewHost['upload'];
9
16
  /** Read durable assignment state; assignment never grants ingestion permissions. */
10
17
  assignment(itemId: string): Promise<Assignment>;
18
+ /**
19
+ * Optional batched assignment read for one inbox page. Missing ids are
20
+ * unassigned at version 0. Without it, `list` calls `assignment` per row.
21
+ */
22
+ assignments?(itemIds: string[]): Promise<Map<string, Assignment>>;
23
+ /**
24
+ * Optional assignee pushdown: the item ids currently assigned to `assigneeId`.
25
+ * `list` restricts the page query to them, so a filtered page is cut in one
26
+ * query. Without it (or beyond ITEM_ID_FILTER_CEILING ids) `list` scans pages
27
+ * and filters by `assignment`, which is still honest but costs more rows.
28
+ */
29
+ assignedItemIds?(assigneeId: string): Promise<string[]>;
11
30
  /** Authorize manager/assignee and enforce durable CAS plus request-id replay checks. */
12
31
  assign: IntakeReviewHost['assign'];
13
32
  /** Produce safe text or an authenticated same-origin URL; never storage keys. */
14
33
  evidence(evidence: IntakeEvidenceDTO): Promise<Omit<EvidenceView, 'evidence'>>;
15
- label?(item: IntakeItemDTO): string;
34
+ /**
35
+ * Optional, opt-in row previews for the inbox (#4213). Called at most once
36
+ * per `list` page with each listed row's primary durable part (metadata
37
+ * only, read in one batched query); return item id -> `{ label, viewUrl?,
38
+ * thumbnailUrl? }` built from metadata, without reading bytes. Rows missing
39
+ * from the map get no preview. When omitted, rows show no original link and
40
+ * `list` calls no review-host adapter (`evidence`/`rowEvidence`); it still
41
+ * reads the page's evidence metadata once for filename labels (#4214), for
42
+ * which the host's `authorize` runs once per distinct captured ceiling, and
43
+ * lists with item-only labels if that read fails. If `rowEvidence` throws,
44
+ * the page still lists without previews. `load` never calls it.
45
+ */
46
+ rowEvidence?(rows: readonly RowEvidenceRequest[]): Promise<ReadonlyMap<string, RowEvidenceView>>;
47
+ /**
48
+ * Presentation label (#4214). `evidence` is the item's durable parts with
49
+ * the primary part first, so a host can label by the original filename;
50
+ * one-argument implementations keep working. The default is the primary
51
+ * part's own `filename`, else `Intake <8 hex>`.
52
+ */
53
+ label?(item: IntakeItemDTO, evidence: IntakeEvidenceDTO[]): string;
16
54
  /** Expose the optional feedback UI only when the service has feedback configured. */
17
55
  enableFeedback?: boolean;
18
56
  /** Optional wakeup after a durable logical split has queued extraction. */
19
57
  onSplit?(itemId: string, revision: number): Promise<void>;
58
+ /** Optional wakeup after a durable reviewer instruction has queued reinterpretation. */
59
+ onInstruct?(itemId: string, revision: number): Promise<void>;
20
60
  }
61
+ /**
62
+ * The original a row should preview, chosen by role rather than media type:
63
+ * when any part has a parent, the record parts (an upload's capture record,
64
+ * an email's message) are skipped and the shallowest child wins (the uploaded
65
+ * file, the first attachment), even when that child is itself JSON. When no
66
+ * part has a parent (a watched-folder file, an email without attachments),
67
+ * the first root part is the original. Ties sort by part id, numerically.
68
+ */
69
+ export declare function primaryEvidence(parts: readonly IntakeEvidenceDTO[]): IntakeEvidenceDTO | undefined;
21
70
  /**
22
71
  * Create callbacks for one authenticated service scope. Create a fresh host when
23
72
  * the session changes; HTTP authentication and CSRF remain application duties.
@@ -1 +1 @@
1
- {"version":3,"file":"review-host.d.ts","sourceRoot":"","sources":["../src/review-host.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGjE,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EAEZ,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,wFAAwF;AACxF,MAAM,WAAW,uBAAuB;IACtC,qFAAqF;IACrF,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACnC,oFAAoF;IACpF,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAChD,wFAAwF;IACxF,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACnC,iFAAiF;IACjF,QAAQ,CACN,QAAQ,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;IAC3C,KAAK,CAAC,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAAC;IACpC,qFAAqF;IACrF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2EAA2E;IAC3E,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,uBAAuB,GAC/B,gBAAgB,CAgLlB"}
1
+ {"version":3,"file":"review-host.d.ts","sourceRoot":"","sources":["../src/review-host.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO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,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAAC;IACnE,qFAAqF;IACrF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2EAA2E;IAC3E,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,wFAAwF;IACxF,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS,iBAAiB,EAAE,GAClC,iBAAiB,GAAG,SAAS,CAkB/B;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,uBAAuB,GAC/B,gBAAgB,CA2YlB"}
@@ -0,0 +1,12 @@
1
+ /** Server-side projection of an item's reviewer-instruction state for review hosts. */
2
+ import type { CompletedAnalysisSnapshot } from './proposal-dto.js';
3
+ import type { ReviewerInstructionView } from './review-dto.js';
4
+ import type { IngestionService } from './server.js';
5
+ /**
6
+ * Project `ItemReviewView.instruction`. History and reinterpretation state are
7
+ * separate reads, so an instruction recorded between them would otherwise look
8
+ * like a dropped one: when the in-effect id names a different instruction the
9
+ * history is re-read, and `dropped` is set only when nothing is in effect.
10
+ */
11
+ export declare function loadInstructionView(service: Pick<IngestionService, 'listReviewerInstructions' | 'getReinterpretationState'>, itemId: string, analysis: CompletedAnalysisSnapshot | undefined): Promise<ReviewerInstructionView | undefined>;
12
+ //# sourceMappingURL=review-instruction-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-instruction-view.d.ts","sourceRoot":"","sources":["../src/review-instruction-view.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,IAAI,CACX,gBAAgB,EAChB,0BAA0B,GAAG,0BAA0B,CACxD,EACD,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,yBAAyB,GAAG,SAAS,GAC9C,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CA0C9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"review-summary.d.ts","sourceRoot":"","sources":["../src/review-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,mFAAmF;AACnF,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,aAAa,EACnB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC,CA2CrD"}
1
+ {"version":3,"file":"review-summary.d.ts","sourceRoot":"","sources":["../src/review-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,mFAAmF;AACnF,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,aAAa,EACnB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC,CA+CrD"}
@@ -0,0 +1,20 @@
1
+ import type { ReviewerInstruction } from './review-dto.js';
2
+ /** Reviewer instruction text ceiling; the prompt input budget still applies. */
3
+ export declare const REVIEWER_INSTRUCTION_MAX_LENGTH = 4000;
4
+ /**
5
+ * Instruction text is empty, whitespace-only or longer than the ceiling. Hosts
6
+ * surface it inline as a validation result, never as an access denial.
7
+ */
8
+ export declare class ReviewerInstructionInvalidError extends Error {
9
+ constructor();
10
+ }
11
+ /**
12
+ * The anchor generation is superseded or a reinterpretation is still in flight.
13
+ * Hosts surface it as a refresh-and-retry signal, never as an access denial.
14
+ */
15
+ export declare class ReviewerInstructionStaleError extends Error {
16
+ constructor();
17
+ }
18
+ /** Verify the record's own digest and project its browser-safe shape. */
19
+ export declare function reviewerInstructionView(value: unknown): ReviewerInstruction;
20
+ //# sourceMappingURL=reviewer-instruction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviewer-instruction.d.ts","sourceRoot":"","sources":["../src/reviewer-instruction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,gFAAgF;AAChF,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAEpD;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,KAAK;;CAKzD;AAED;;;GAGG;AACH,qBAAa,6BAA8B,SAAQ,KAAK;;CAKvD;AAED,yEAAyE;AACzE,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,CAwB3E"}