@happyvertical/smrt-ingestion 0.57.19 → 0.57.21
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/FEEDBACK.md +33 -0
- package/PROPOSALS.md +127 -5
- package/README.md +42 -2
- package/REVIEW.md +339 -3
- package/agents/execution.md +15 -0
- package/dist/chunks/{execution-NoDh3pjs.js → execution-9CfjxX8I.js} +110 -22
- package/dist/chunks/execution-9CfjxX8I.js.map +1 -0
- package/dist/chunks/{proposal-errors-VxcTU6Db.js → extraction-CJ-zrbg0.js} +4 -10
- package/dist/chunks/extraction-CJ-zrbg0.js.map +1 -0
- package/dist/chunks/{feedback-CJB900iG.js → feedback-CuUzWKzP.js} +59 -18
- package/dist/chunks/feedback-CuUzWKzP.js.map +1 -0
- package/dist/chunks/reviewer-instruction-Db3jDN9a.js +33 -0
- package/dist/chunks/reviewer-instruction-Db3jDN9a.js.map +1 -0
- package/dist/dto.d.ts +6 -0
- package/dist/dto.d.ts.map +1 -1
- package/dist/execution-internal.d.ts +2 -0
- package/dist/execution-internal.d.ts.map +1 -1
- package/dist/execution.d.ts +43 -1
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +1 -1
- package/dist/feedback-dto.d.ts +6 -0
- package/dist/feedback-dto.d.ts.map +1 -1
- package/dist/feedback.d.ts +7 -0
- package/dist/feedback.d.ts.map +1 -1
- package/dist/manifest.json +19 -1
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +10 -1
- package/dist/models.js.map +1 -1
- package/dist/presented-filename.d.ts +11 -0
- package/dist/presented-filename.d.ts.map +1 -0
- package/dist/proposal-contracts.d.ts +31 -6
- package/dist/proposal-contracts.d.ts.map +1 -1
- package/dist/proposal-dto.d.ts +17 -0
- package/dist/proposal-dto.d.ts.map +1 -1
- package/dist/proposal-errors.d.ts +16 -0
- package/dist/proposal-errors.d.ts.map +1 -1
- package/dist/proposal-validation.d.ts +26 -0
- package/dist/proposal-validation.d.ts.map +1 -1
- package/dist/proposals.d.ts +5 -1
- package/dist/proposals.d.ts.map +1 -1
- package/dist/proposals.js +261 -69
- package/dist/proposals.js.map +1 -1
- package/dist/review-dto.d.ts +95 -2
- package/dist/review-dto.d.ts.map +1 -1
- package/dist/review-host.d.ts +52 -3
- package/dist/review-host.d.ts.map +1 -1
- package/dist/review-instruction-view.d.ts +12 -0
- package/dist/review-instruction-view.d.ts.map +1 -0
- package/dist/review-summary.d.ts.map +1 -1
- package/dist/reviewer-instruction.d.ts +20 -0
- package/dist/reviewer-instruction.d.ts.map +1 -0
- package/dist/server.d.ts +171 -4
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +835 -49
- package/dist/server.js.map +1 -1
- package/dist/smrt-knowledge.json +29 -21
- package/dist/sources/common.d.ts +11 -0
- package/dist/sources/common.d.ts.map +1 -1
- package/dist/sources/email.d.ts.map +1 -1
- package/dist/sources/http.d.ts.map +1 -1
- package/dist/sources/watch-folder.d.ts.map +1 -1
- package/dist/svelte/components/ActionReview.svelte +15 -46
- package/dist/svelte/components/ActionReview.svelte.d.ts.map +1 -1
- package/dist/svelte/components/CandidatePicker.svelte +72 -0
- package/dist/svelte/components/CandidatePicker.svelte.d.ts +15 -0
- package/dist/svelte/components/CandidatePicker.svelte.d.ts.map +1 -0
- package/dist/svelte/components/InboxView.svelte +14 -3
- package/dist/svelte/components/InboxView.svelte.d.ts +8 -1
- package/dist/svelte/components/InboxView.svelte.d.ts.map +1 -1
- package/dist/svelte/components/IntakeInbox.svelte +6 -3
- package/dist/svelte/components/IntakeInbox.svelte.d.ts +4 -1
- package/dist/svelte/components/IntakeInbox.svelte.d.ts.map +1 -1
- package/dist/svelte/components/IntakeReview.svelte +4 -2
- package/dist/svelte/components/IntakeReview.svelte.d.ts +2 -0
- package/dist/svelte/components/IntakeReview.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ReviewView.svelte +403 -62
- package/dist/svelte/components/ReviewView.svelte.d.ts +2 -0
- package/dist/svelte/components/ReviewView.svelte.d.ts.map +1 -1
- package/dist/svelte/i18n.d.ts +17 -0
- package/dist/svelte/i18n.d.ts.map +1 -1
- package/dist/svelte/i18n.js +17 -0
- package/dist/svelte/index.d.ts +1 -1
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/view-utils.d.ts +2 -0
- package/dist/svelte/view-utils.d.ts.map +1 -1
- package/dist/svelte/view-utils.js +12 -0
- package/package.json +13 -13
- package/dist/chunks/execution-NoDh3pjs.js.map +0 -1
- package/dist/chunks/execution-internal-DWteDHM2.js +0 -7
- package/dist/chunks/execution-internal-DWteDHM2.js.map +0 -1
- package/dist/chunks/feedback-CJB900iG.js.map +0 -1
- package/dist/chunks/proposal-errors-VxcTU6Db.js.map +0 -1
package/dist/review-dto.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Browser-only view contracts. Every value must come from an authenticated host. */
|
|
2
|
-
import type { IntakeEvidenceDTO, IntakeItemDTO } from './dto.js';
|
|
2
|
+
import type { IntakeEvidenceDTO, IntakeFailure, IntakeItemDTO } from './dto.js';
|
|
3
3
|
import type { ActionResult, IntakeValues, PreviewPlanInput, PreviewProposalInput, ProposalReview, ResultReference, ReviewInput } from './execution-dto.js';
|
|
4
4
|
import type { CandidatePage, CompletedAnalysisSnapshot, GenerationOutput } from './proposal-dto.js';
|
|
5
5
|
export type InboxState = 'processing' | 'unresolved' | 'waiting' | 'failed' | 'deferred' | 'partially_completed' | 'completed';
|
|
@@ -46,6 +46,26 @@ export interface InboxEntry {
|
|
|
46
46
|
label: string;
|
|
47
47
|
state: InboxState;
|
|
48
48
|
assignment: Assignment;
|
|
49
|
+
/**
|
|
50
|
+
* An inbox row's preview of its primary original, present only on `list`
|
|
51
|
+
* entries and only when the host supplies the opt-in `rowEvidence` option
|
|
52
|
+
* (#4213). The part is chosen by role: the shallowest child part (an
|
|
53
|
+
* upload's file, an email's first attachment), else the first root part.
|
|
54
|
+
* `list` reads the page's durable parts in one batched query, asks
|
|
55
|
+
* `rowEvidence` once for the page, and fills this from its answer; it is
|
|
56
|
+
* absent when the host omits `rowEvidence`, does not answer for the row,
|
|
57
|
+
* or the item has no durable parts. `load` never sets it.
|
|
58
|
+
*/
|
|
59
|
+
evidence?: InboxEvidence;
|
|
60
|
+
}
|
|
61
|
+
/** A row's preview: the primary part's identity plus host URLs, never text. */
|
|
62
|
+
export interface InboxEvidence {
|
|
63
|
+
evidence: IntakeEvidenceDTO;
|
|
64
|
+
label: string;
|
|
65
|
+
/** Host-authorized same-origin content URL, never an object-storage key. */
|
|
66
|
+
viewUrl?: string;
|
|
67
|
+
/** Optional host-authorized same-origin preview image for the row. */
|
|
68
|
+
thumbnailUrl?: string;
|
|
49
69
|
}
|
|
50
70
|
export interface EvidenceView {
|
|
51
71
|
evidence: IntakeEvidenceDTO;
|
|
@@ -60,10 +80,56 @@ export interface ItemReviewView {
|
|
|
60
80
|
analysis?: CompletedAnalysisSnapshot;
|
|
61
81
|
generation?: GenerationOutput;
|
|
62
82
|
reviews: ReviewPage;
|
|
83
|
+
/** Present when an instruction was recorded or carried by the displayed generation. */
|
|
84
|
+
instruction?: ReviewerInstructionView;
|
|
63
85
|
/** Host-projected safe state, never raw server exception text. */
|
|
64
86
|
availability: 'available' | 'stale' | 'revoked' | 'expired' | 'unavailable';
|
|
65
87
|
message?: string;
|
|
66
88
|
}
|
|
89
|
+
/** Immutable authenticated reviewer guidance for one item; it steers the model only. */
|
|
90
|
+
export interface ReviewerInstruction {
|
|
91
|
+
id: string;
|
|
92
|
+
text: string;
|
|
93
|
+
actorId: string;
|
|
94
|
+
recordedAt: string;
|
|
95
|
+
/** The instruction this one replaced for future interpretations, if any. */
|
|
96
|
+
supersedesId: string | null;
|
|
97
|
+
digest: string;
|
|
98
|
+
}
|
|
99
|
+
export interface ReviewerInstructionInput {
|
|
100
|
+
itemId: string;
|
|
101
|
+
attemptId: string;
|
|
102
|
+
expectedRevision: number;
|
|
103
|
+
text: string;
|
|
104
|
+
requestId: string;
|
|
105
|
+
}
|
|
106
|
+
export interface ReviewerInstructionView {
|
|
107
|
+
/**
|
|
108
|
+
* Latest recorded instruction that is still in effect: the item's newest
|
|
109
|
+
* extraction carries it, so its interpretations do. Null when none was
|
|
110
|
+
* recorded or a host reprocess dropped it (see `dropped`).
|
|
111
|
+
*/
|
|
112
|
+
current: ReviewerInstruction | null;
|
|
113
|
+
/**
|
|
114
|
+
* Latest recorded instruction that a host reprocess dropped (a reprocess
|
|
115
|
+
* builds its own configuration and cannot carry human corrections). It no
|
|
116
|
+
* longer applies; the reviewer can re-record it.
|
|
117
|
+
*/
|
|
118
|
+
dropped?: ReviewerInstruction;
|
|
119
|
+
/** The instruction the displayed generation was produced under. */
|
|
120
|
+
applied: ReviewerInstruction | null;
|
|
121
|
+
/** Displayed suggestions predate the current instruction. */
|
|
122
|
+
stale: boolean;
|
|
123
|
+
/** Safe failure category, or `not_started` when interpretation was never appended in time. */
|
|
124
|
+
failure?: IntakeFailure | 'not_started';
|
|
125
|
+
/** Server-side "in flight", including the gap between extraction and interpretation. */
|
|
126
|
+
reinterpreting?: boolean;
|
|
127
|
+
/** Record/retry binding when no current generation is displayable: the latest completed generation attempt and the item's current revision. */
|
|
128
|
+
binding?: {
|
|
129
|
+
attemptId: string;
|
|
130
|
+
expectedRevision: number;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
67
133
|
export interface LogicalSplitInput {
|
|
68
134
|
itemId: string;
|
|
69
135
|
attemptId: string;
|
|
@@ -72,12 +138,21 @@ export interface LogicalSplitInput {
|
|
|
72
138
|
groups: number[][];
|
|
73
139
|
requestId: string;
|
|
74
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* A preview the handler refused on its own validation of the arguments. The
|
|
143
|
+
* reviewer may correct the arguments and retry; it is never an access result.
|
|
144
|
+
*/
|
|
145
|
+
export interface PreviewRejection {
|
|
146
|
+
rejected: 'invalid';
|
|
147
|
+
}
|
|
75
148
|
/** Transport-neutral callbacks. Implement on an authenticated host; props confer no permission. */
|
|
76
149
|
export interface IntakeReviewHost {
|
|
150
|
+
/** Newest receipt first; `limit` defaults to 20 and is clamped to 1..100. */
|
|
77
151
|
list(input: {
|
|
78
152
|
state?: InboxState;
|
|
79
153
|
assigneeId?: string;
|
|
80
154
|
cursor?: string;
|
|
155
|
+
limit?: number;
|
|
81
156
|
}): Promise<{
|
|
82
157
|
items: InboxEntry[];
|
|
83
158
|
nextCursor?: string;
|
|
@@ -91,7 +166,13 @@ export interface IntakeReviewHost {
|
|
|
91
166
|
attemptId: string;
|
|
92
167
|
index: number;
|
|
93
168
|
requestId: string;
|
|
94
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Explicit human arguments completing a `needs_review` suggestion. The host
|
|
171
|
+
* publishes them through the ordinary operation/plan preview, never through
|
|
172
|
+
* the generated snapshot, so the handler validates them again.
|
|
173
|
+
*/
|
|
174
|
+
args?: IntakeValues;
|
|
175
|
+
}): Promise<void | PreviewRejection>;
|
|
95
176
|
decide(input: ReviewInput): Promise<void>;
|
|
96
177
|
apply(actionId: string): Promise<ActionResult>;
|
|
97
178
|
editPlan?: (input: PreviewPlanInput) => Promise<void>;
|
|
@@ -109,6 +190,18 @@ export interface IntakeReviewHost {
|
|
|
109
190
|
requestId: string;
|
|
110
191
|
}): Promise<void>;
|
|
111
192
|
split(input: LogicalSplitInput): Promise<void>;
|
|
193
|
+
/**
|
|
194
|
+
* Record reviewer guidance and request a background reinterpretation; never
|
|
195
|
+
* approval. Resolves `{ stale: true }` when the anchor is superseded or work
|
|
196
|
+
* is still in flight, a refresh-and-retry signal rather than a denial, and
|
|
197
|
+
* `{ invalid: true }` when the text fails validation (empty, whitespace-only
|
|
198
|
+
* or longer than 4,000 characters), shown inline rather than as a denial.
|
|
199
|
+
*/
|
|
200
|
+
instruct?: (input: ReviewerInstructionInput) => Promise<void | {
|
|
201
|
+
stale: true;
|
|
202
|
+
} | {
|
|
203
|
+
invalid: true;
|
|
204
|
+
}>;
|
|
112
205
|
/** Explicit correctness judgment only; never called implicitly after review or apply. */
|
|
113
206
|
feedback?: (input: import('./feedback-dto.js').RecordFeedbackInput) => Promise<import('./feedback-dto.js').FeedbackReceipt | void>;
|
|
114
207
|
}
|
package/dist/review-dto.d.ts.map
CHANGED
|
@@ -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;
|
|
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,aAAa,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,aAAa,EACb,yBAAyB,EACzB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,UAAU,GACV,qBAAqB,GACrB,WAAW,CAAC;AAChB,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,cAAc,CAAC;IACvB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,4EAA4E;IAC5E,SAAS,CAAC,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,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ract. */
|
|
2
2
|
import type { IntakeEvidenceDTO, IntakeItemDTO } from './dto.js';
|
|
3
|
-
import type { Assignment, EvidenceView, IntakeReviewHost } from './review-dto.js';
|
|
4
|
-
import type
|
|
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
|
-
|
|
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;
|
|
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,aAAa,EACb,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAOzB,OAAO,EACL,KAAK,gBAAgB,EAMtB,MAAM,aAAa,CAAC;AAErB,qEAAqE;AACrE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AACD,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;AAE9D,wFAAwF;AACxF,MAAM,WAAW,uBAAuB;IACtC,qFAAqF;IACrF,MAAM,EAAE,gBAAgB,CAA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,EAAE,gBAAgB,EACzB,OAAO,EAAE,uBAAuB,GAC/B,gBAAgB,CAkXlB"}
|
|
@@ -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,
|
|
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"}
|
package/dist/server.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { FeedbackConfiguration } from './feedback-contracts.js';
|
|
|
7
7
|
import type { AdoptRuleInput, ObserveFeedbackInput, ReadRuleInput, RecordFeedbackInput, RetrieveFeedbackInput, SuggestRuleInput } from './feedback-dto.js';
|
|
8
8
|
import { type ProposalConfiguration, type ProposalReadConfiguration } from './proposal-contracts.js';
|
|
9
9
|
import type { CompletedAnalysisSnapshot, PreviewGeneratedInput } from './proposal-dto.js';
|
|
10
|
-
import type { LogicalSplitInput } from './review-dto.js';
|
|
10
|
+
import type { InboxState, LogicalSplitInput, ReviewerInstruction, ReviewerInstructionInput } from './review-dto.js';
|
|
11
11
|
/** Authenticated host context. Never construct this from transport JSON. */
|
|
12
12
|
export interface IngestionScope {
|
|
13
13
|
tenantId: string;
|
|
@@ -26,6 +26,8 @@ export interface IntakePart {
|
|
|
26
26
|
id: string;
|
|
27
27
|
version: string;
|
|
28
28
|
};
|
|
29
|
+
/** Original name as the source presented it; presentation only, never identity. */
|
|
30
|
+
filename?: string;
|
|
29
31
|
}
|
|
30
32
|
/** Host-resolved delivery and retention policy, never untrusted content labels. */
|
|
31
33
|
export interface ReceiveInput {
|
|
@@ -44,6 +46,35 @@ export interface ReceiveInput {
|
|
|
44
46
|
limits: IntakeLimits;
|
|
45
47
|
traceId?: string;
|
|
46
48
|
}
|
|
49
|
+
/** One inbox page request. Filters apply in the query, before the page is cut. */
|
|
50
|
+
export interface ListItemsInput {
|
|
51
|
+
/** Rows per page; defaults to 20 and never exceeds 100. */
|
|
52
|
+
limit?: number;
|
|
53
|
+
/** Opaque continuation returned by the previous page. */
|
|
54
|
+
cursor?: string;
|
|
55
|
+
/** Durable inbox-state projection; see REVIEW.md for how it is derived. */
|
|
56
|
+
state?: InboxState;
|
|
57
|
+
/** Restrict the page to these item IDs (host-side assignment pushdown). */
|
|
58
|
+
itemIds?: string[];
|
|
59
|
+
/**
|
|
60
|
+
* Rows this call may examine, at most ITEM_SCAN_CEILING (the default). A
|
|
61
|
+
* host that scans across several calls passes its remaining budget so the
|
|
62
|
+
* sum never exceeds the ceiling.
|
|
63
|
+
*/
|
|
64
|
+
scanLimit?: number;
|
|
65
|
+
}
|
|
66
|
+
/** Inbox items newest-first by receipt, with their durable state projection. */
|
|
67
|
+
export interface IntakeItemPage {
|
|
68
|
+
/** `cursor` continues after that row, so a host may cut a page short of it. */
|
|
69
|
+
items: Array<{
|
|
70
|
+
item: IntakeItemDTO;
|
|
71
|
+
state: InboxState;
|
|
72
|
+
cursor: string;
|
|
73
|
+
}>;
|
|
74
|
+
/** Rows this call examined, including denied and skipped ones; hosts cap on it. */
|
|
75
|
+
scanned: number;
|
|
76
|
+
nextCursor?: string;
|
|
77
|
+
}
|
|
47
78
|
/** Durable attempt claim. Its fence and token are verified on every completion. */
|
|
48
79
|
export interface AnalysisLease {
|
|
49
80
|
itemId: string;
|
|
@@ -77,6 +108,13 @@ export interface IngestionOptions {
|
|
|
77
108
|
db: DatabaseInterface;
|
|
78
109
|
assets: AssetRuntimeLike;
|
|
79
110
|
scope: IngestionScope;
|
|
111
|
+
/**
|
|
112
|
+
* Optional server secret (at least 32 bytes) that seals inbox page cursors.
|
|
113
|
+
* With it, a page that spends its scan limit on unreadable rows can hand
|
|
114
|
+
* back an opaque position past them; without it, a cursor only ever names
|
|
115
|
+
* the last row the actor can read. Never derive it from request data.
|
|
116
|
+
*/
|
|
117
|
+
cursorKey?: string | Uint8Array;
|
|
80
118
|
/** Recheck current access for EVERY boundary, including worker completion. */
|
|
81
119
|
authorize(input: {
|
|
82
120
|
scope: IngestionScope;
|
|
@@ -110,11 +148,36 @@ export interface IngestionOptions {
|
|
|
110
148
|
/** Fault injection/observability; never changes authority or persistence. */
|
|
111
149
|
checkpoint?: (boundary: string) => Promise<void>;
|
|
112
150
|
}
|
|
151
|
+
/** The most rows one inbox page returns. */
|
|
152
|
+
export declare const ITEM_PAGE_CEILING = 100;
|
|
153
|
+
/**
|
|
154
|
+
* The most rows one `listItemsPage` call examines, whatever its filters.
|
|
155
|
+
* When it is reached the page is returned short with a `nextCursor`, or the
|
|
156
|
+
* call fails with `IntakeScanLimitError` when it found no readable row and may not
|
|
157
|
+
* disclose a position; no single call scans an unbounded scope.
|
|
158
|
+
*/
|
|
159
|
+
export declare const ITEM_SCAN_CEILING: number;
|
|
160
|
+
/** The most ids one page may be restricted to before the host must fall back to scanning. */
|
|
161
|
+
export declare const ITEM_ID_FILTER_CEILING = 1000;
|
|
162
|
+
/** True for a value shaped like an intake item id; hosts use it to drop junk before a page query. */
|
|
163
|
+
export declare function isIntakeId(value: unknown): value is string;
|
|
164
|
+
/**
|
|
165
|
+
* A page call spent its scan limit without finding a row the actor can read,
|
|
166
|
+
* or would otherwise hand back its own input cursor. Without a `cursorKey`
|
|
167
|
+
* the service may not return a position derived from rows the actor cannot
|
|
168
|
+
* read, so the call fails closed instead; the message names no row. Hosts
|
|
169
|
+
* that already collected rows return them with their cursor.
|
|
170
|
+
*/
|
|
171
|
+
export declare class IntakeScanLimitError extends Error {
|
|
172
|
+
constructor();
|
|
173
|
+
}
|
|
113
174
|
/** Server-only durable lifecycle. Domain approval/execution remains a later layer. */
|
|
114
175
|
export declare class IngestionService {
|
|
115
176
|
private readonly options;
|
|
116
177
|
private readonly db;
|
|
117
178
|
private readonly scope;
|
|
179
|
+
private readonly engine;
|
|
180
|
+
private readonly cursorKey?;
|
|
118
181
|
private readonly dispatchTarget;
|
|
119
182
|
constructor(options: IngestionOptions);
|
|
120
183
|
private execution;
|
|
@@ -178,11 +241,73 @@ export declare class IngestionService {
|
|
|
178
241
|
private dispatchRouteState;
|
|
179
242
|
/** Repair lost enqueue/mark writes and deleted/failed jobs. Duplicate jobs are safe. */
|
|
180
243
|
repairDispatches(): Promise<number>;
|
|
181
|
-
/**
|
|
244
|
+
/**
|
|
245
|
+
* One authorized inbox page, newest receipt first with the id as tiebreak.
|
|
246
|
+
* Tenant, confidential scope, retention and the id restriction run in the
|
|
247
|
+
* query; rows are authorized before the `state` filter is applied to the
|
|
248
|
+
* fetched batch, so every filter is bounded by the scan limit (default
|
|
249
|
+
* ITEM_SCAN_CEILING). Authority is rechecked at two levels: the host
|
|
250
|
+
* `authorize('read')` once per distinct captured ceiling, and the execution
|
|
251
|
+
* read gate once per distinct (item, handler) bound by a scanned row that
|
|
252
|
+
* passed the first. Without a `cursorKey` every cursor names a row the
|
|
253
|
+
* actor can read; with one, all cursors are sealed and a budget-stopped
|
|
254
|
+
* page may resume past rows the actor cannot read. `scanned` is for trusted
|
|
255
|
+
* host accounting and must not be sent to clients.
|
|
256
|
+
*/
|
|
257
|
+
listItemsPage(input?: ListItemsInput): Promise<IntakeItemPage>;
|
|
258
|
+
/**
|
|
259
|
+
* The bounded page scan behind `listItemsPage` and `listItems`. It returns
|
|
260
|
+
* the rows to list with their positions, the exact scan position reached
|
|
261
|
+
* (`scanFrom`, which may be a row the actor cannot read and must never
|
|
262
|
+
* leave the service unsealed), and the last row the actor can read
|
|
263
|
+
* (`lastReadable`, which may not match the `state` filter).
|
|
264
|
+
*/
|
|
265
|
+
private scanItems;
|
|
266
|
+
/** Associated data that binds a sealed cursor to this authenticated scope. */
|
|
267
|
+
private cursorScope;
|
|
268
|
+
private encodeCursor;
|
|
269
|
+
private decodeCursor;
|
|
270
|
+
/**
|
|
271
|
+
* Every authorized active item, newest receipt first.
|
|
272
|
+
* @deprecated Use `listItemsPage`. Kept so callers of the array-returning
|
|
273
|
+
* API keep working. It walks every page, so its cost grows with the scope,
|
|
274
|
+
* including one execution authorization per (item, handler) across the
|
|
275
|
+
* whole scope. It follows the internal scan position, which never leaves
|
|
276
|
+
* the service, so runs of rows the actor cannot read never stop it. Items
|
|
277
|
+
* are gated exactly as on a page.
|
|
278
|
+
*/
|
|
182
279
|
listItems(): Promise<IntakeItemDTO[]>;
|
|
280
|
+
/**
|
|
281
|
+
* One read authorization per distinct captured ceiling for a page of rows.
|
|
282
|
+
* A refusal hides the rows; a malformed ceiling hides its row; a host
|
|
283
|
+
* callback that throws rejects the page with that error.
|
|
284
|
+
*/
|
|
285
|
+
private ceilingGate;
|
|
286
|
+
/**
|
|
287
|
+
* The handler checks `listReviews` applies per action, batched for a page:
|
|
288
|
+
* the bindings of the rows' current proposals are projected in SQL
|
|
289
|
+
* (handler id, version, operation and capability; distinct per item) once
|
|
290
|
+
* per fetched batch, then the execution list read gate runs once per distinct
|
|
291
|
+
* (item, handler) of a row that passed the item-level gate. An item whose
|
|
292
|
+
* bound handler the actor cannot currently read, whose binding drifted
|
|
293
|
+
* from the configured handler, or whose bindings cannot be resolved, is
|
|
294
|
+
* not listed. Actions without a proposal carry no handler and are not
|
|
295
|
+
* gated, as in `listReviews`.
|
|
296
|
+
*/
|
|
297
|
+
private handlerGate;
|
|
183
298
|
private itemDTO;
|
|
184
299
|
getItem(id: string): Promise<IntakeItemDTO>;
|
|
185
300
|
getEvidence(itemId: string): Promise<IntakeEvidenceDTO[]>;
|
|
301
|
+
/**
|
|
302
|
+
* Durable evidence for one inbox page in a single query, keyed by item id.
|
|
303
|
+
* Items that are not active, retained and readable are omitted (no
|
|
304
|
+
* existence disclosure); the host authorize callback runs once per distinct
|
|
305
|
+
* captured ceiling rather than once per item, through the same gate as
|
|
306
|
+
* `listItemsPage`: a refusal or a malformed ceiling hides the item, and a
|
|
307
|
+
* host callback that throws rejects the read.
|
|
308
|
+
*/
|
|
309
|
+
listEvidence(itemIds: string[]): Promise<Map<string, IntakeEvidenceDTO[]>>;
|
|
310
|
+
private evidenceDTO;
|
|
186
311
|
readEvidence(itemId: string, evidenceId: string): Promise<Uint8Array>;
|
|
187
312
|
/** Append an immutable input revision. Reprocessing never creates actions. */
|
|
188
313
|
analyze(itemId: string, configuration: Record<string, unknown>, requestKey: string): Promise<{
|
|
@@ -195,6 +320,47 @@ export declare class IngestionService {
|
|
|
195
320
|
id: string;
|
|
196
321
|
revision: number;
|
|
197
322
|
}>;
|
|
323
|
+
/**
|
|
324
|
+
* Record an authenticated reviewer instruction as an immutable human correction
|
|
325
|
+
* and queue a fresh extraction plus interpretation that carries it as trusted
|
|
326
|
+
* guidance. The text steers the model only; it never changes the catalog,
|
|
327
|
+
* candidates, schemas, permissions or automation eligibility.
|
|
328
|
+
*/
|
|
329
|
+
recordReviewerInstruction(input: ReviewerInstructionInput): Promise<{
|
|
330
|
+
id: string;
|
|
331
|
+
revision: number;
|
|
332
|
+
instruction: ReviewerInstruction;
|
|
333
|
+
}>;
|
|
334
|
+
/**
|
|
335
|
+
* How the revisions after an anchor generation relate to it. Shared by the
|
|
336
|
+
* retry guard and getReinterpretationState so they cannot disagree.
|
|
337
|
+
* A completed extraction with no interpretation appended is in flight until
|
|
338
|
+
* its attempt's completion plus the item's analysis lease duration
|
|
339
|
+
* (`limits.leaseMs`, the same lease claimAnalysis grants); after that it is
|
|
340
|
+
* treated as a reinterpretation that did not start.
|
|
341
|
+
*/
|
|
342
|
+
private laterWork;
|
|
343
|
+
/** Pollable reinterpretation state: current revision, safe failure and the retry anchor. */
|
|
344
|
+
getReinterpretationState(itemId: string): Promise<{
|
|
345
|
+
revision: number;
|
|
346
|
+
processingState: string;
|
|
347
|
+
/** Safe category, or `not_started` when the interpretation was never appended in time. */
|
|
348
|
+
failure: IntakeFailure | 'not_started' | null;
|
|
349
|
+
/** True while work after the latest completed generation is in flight, including between stages. */
|
|
350
|
+
reinterpreting: boolean;
|
|
351
|
+
/** Latest completed generation attempt; absent when none has completed. */
|
|
352
|
+
generationAttemptId: string | null;
|
|
353
|
+
/**
|
|
354
|
+
* Id of the instruction carried by the item's newest extraction (verified
|
|
355
|
+
* by digest), or null. A host reprocess builds its own configuration and
|
|
356
|
+
* cannot carry human corrections, so it drops the instruction exactly as
|
|
357
|
+
* it drops a split.
|
|
358
|
+
*/
|
|
359
|
+
instructionInEffect: string | null;
|
|
360
|
+
}>;
|
|
361
|
+
/** Immutable instruction history, newest first. History is never deleted. */
|
|
362
|
+
listReviewerInstructions(itemId: string): Promise<ReviewerInstruction[]>;
|
|
363
|
+
private recordedInstructions;
|
|
198
364
|
/** Allocate a fenced attempt; active leases cannot be stolen before expiry. */
|
|
199
365
|
claimAnalysis(itemId: string, revision: number, workerId: string): Promise<AnalysisLease | null>;
|
|
200
366
|
private completedAnalysisSnapshot;
|
|
@@ -259,7 +425,8 @@ export declare class IngestionService {
|
|
|
259
425
|
}
|
|
260
426
|
export * from './extraction.js';
|
|
261
427
|
export type * from './feedback-contracts.js';
|
|
262
|
-
export { GenerationSnapshotStaleError } from './proposal-errors.js';
|
|
263
|
-
export { createIntakeReviewHost, type IntakeReviewHostOptions, } from './review-host.js';
|
|
428
|
+
export { GenerationSnapshotStaleError, GenerationSourceStaleError, HandlerArgumentsInvalidError, } from './proposal-errors.js';
|
|
429
|
+
export { createIntakeReviewHost, type IntakeReviewHostOptions, type RowEvidenceRequest, type RowEvidenceView, } from './review-host.js';
|
|
430
|
+
export { REVIEWER_INSTRUCTION_MAX_LENGTH, ReviewerInstructionInvalidError, ReviewerInstructionStaleError, reviewerInstructionView, } from './reviewer-instruction.js';
|
|
264
431
|
export * from './sources/index.js';
|
|
265
432
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAOA,OAAO,EAAS,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAS1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,aAAa,EACd,MAAM,UAAU,CAAC;AAGlB,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAE/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,iB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