@happyvertical/smrt-ingestion 0.57.32 → 0.57.34
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/EXTRACTION.md +76 -1
- package/PROPOSALS.md +132 -2
- package/dist/chunks/{execution-BxkUOtLf.js → execution-DKWz2cz0.js} +14 -3
- package/dist/chunks/{execution-BxkUOtLf.js.map → execution-DKWz2cz0.js.map} +1 -1
- package/dist/chunks/{extraction-providers-C66ADDVe.js → extraction-providers-GOoo2Vfj.js} +141 -15
- package/dist/chunks/extraction-providers-GOoo2Vfj.js.map +1 -0
- package/dist/chunks/{feedback-D69e1hX5.js → feedback-DHcSKgVU.js} +3 -3
- package/dist/chunks/{feedback-D69e1hX5.js.map → feedback-DHcSKgVU.js.map} +1 -1
- package/dist/chunks/{proposal-contracts-CqVVPvqq.js → proposal-contracts-ClAXdqDF.js} +34 -4
- package/dist/chunks/proposal-contracts-ClAXdqDF.js.map +1 -0
- package/dist/chunks/{reviewer-instruction-Ip4W4f0j.js → reviewer-instruction-Deoe4NPv.js} +2 -2
- package/dist/chunks/{reviewer-instruction-Ip4W4f0j.js.map → reviewer-instruction-Deoe4NPv.js.map} +1 -1
- package/dist/execution-contracts.d.ts +4 -0
- package/dist/execution-contracts.d.ts.map +1 -1
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +1 -1
- package/dist/extraction-providers.d.ts +9 -1
- package/dist/extraction-providers.d.ts.map +1 -1
- package/dist/extraction-types.d.ts +23 -0
- package/dist/extraction-types.d.ts.map +1 -1
- package/dist/extraction-worker.js +6 -2
- package/dist/extraction-worker.js.map +1 -1
- package/dist/extraction.d.ts +5 -1
- package/dist/extraction.d.ts.map +1 -1
- package/dist/host-review.d.ts +19 -0
- package/dist/host-review.d.ts.map +1 -0
- package/dist/json-storage.d.ts +9 -0
- package/dist/json-storage.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/models.js +1 -1
- package/dist/models.js.map +1 -1
- package/dist/observed-regions.d.ts +13 -0
- package/dist/observed-regions.d.ts.map +1 -0
- package/dist/proposal-contracts.d.ts +27 -0
- package/dist/proposal-contracts.d.ts.map +1 -1
- package/dist/proposal-dto.d.ts +34 -0
- package/dist/proposal-dto.d.ts.map +1 -1
- package/dist/proposal-sdk.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 +8 -1
- package/dist/proposals.d.ts.map +1 -1
- package/dist/proposals.js +202 -18
- package/dist/proposals.js.map +1 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +28 -38
- package/dist/server.js.map +1 -1
- package/dist/smrt-knowledge.json +12 -12
- package/dist/svelte/components/ReviewView.svelte +1 -0
- package/dist/svelte/components/ReviewView.svelte.d.ts.map +1 -1
- package/dist/svelte/i18n.d.ts +4 -0
- package/dist/svelte/i18n.d.ts.map +1 -1
- package/dist/svelte/i18n.js +4 -0
- package/package.json +13 -13
- package/dist/chunks/extraction-providers-C66ADDVe.js.map +0 -1
- package/dist/chunks/proposal-contracts-CqVVPvqq.js.map +0 -1
package/EXTRACTION.md
CHANGED
|
@@ -48,7 +48,46 @@ time, falling back to actual rendered-page OCR for empty pages. Embedded text
|
|
|
48
48
|
is not evidence that every visual element was understood. TIFF is actually
|
|
49
49
|
decoded page-by-page with sharp to PNG; each result cites its original TIFF page.
|
|
50
50
|
Animated non-TIFF images are unsupported. Ordinary image OCR and scene vision
|
|
51
|
-
are separately configured.
|
|
51
|
+
are separately configured. Vision alone prepares an EXIF-oriented, full-frame
|
|
52
|
+
image inside a 2048-pixel edge without cropping or upscaling. Opaque inputs use
|
|
53
|
+
JPEG quality 85 (80 only when needed); alpha inputs retain transparency in PNG.
|
|
54
|
+
A 512 KiB encoded-image cap bounds base64 transport to about 700 KiB per image.
|
|
55
|
+
If neither high-quality JPEG encoding fits, or transparent PNG exceeds the cap,
|
|
56
|
+
extraction returns `limit` before a vision provider call. It never shrinks further,
|
|
57
|
+
drops a page, or silently flattens transparency. Original decode pixel limits,
|
|
58
|
+
native-memory isolation, deadlines and authorization apply before downsizing.
|
|
59
|
+
OCR, including PDF fallback, keeps its existing full-resolution PNG coordinates.
|
|
60
|
+
|
|
61
|
+
Trusted `visionImageLimits?: {maxEdge?, maxEncodedBytes?}` may tighten defaults
|
|
62
|
+
(edge 256–2048; encoded bytes 1024–524288). Adapter construction rejects expanded
|
|
63
|
+
or invalid limits. Use a new extraction configuration revision when adopting this
|
|
64
|
+
policy or changing its bounds. `imagePreparations` records `vision-image-v1`, the
|
|
65
|
+
bounds, source dimensions/orientation, derivative dimensions/format/quality/bytes
|
|
66
|
+
and source/page location. Evidence still identifies the unchanged retained bytes.
|
|
67
|
+
This is lossy provider preparation, not a claim that all text detail survives.
|
|
68
|
+
Small handwriting can become unreadable; the vision instruction requires honest
|
|
69
|
+
unreadable observations. Vision also separates printed questions/solved examples
|
|
70
|
+
from learner handwriting, preserves observed responses even when incorrect, and
|
|
71
|
+
reports matching lines only with visibly traceable endpoints. Unreadable or
|
|
72
|
+
uncertain responses/endpoints remain unknown; arithmetic solutions and expected
|
|
73
|
+
matches must not be reported as observations. The generic scene/text instruction,
|
|
74
|
+
untrusted-image instruction boundary and prohibition on actions still apply.
|
|
75
|
+
Observation text preserves visible sections/headings, columns/rows, task parts,
|
|
76
|
+
reading order, and their text/response associations. Unclear structure or reading
|
|
77
|
+
order is explicitly unknown; the prompt forbids invented layout, boxes,
|
|
78
|
+
coordinates, or verified geometry. A physical source page is identified only
|
|
79
|
+
when known, otherwise unknown; a visible printed page number is separate and
|
|
80
|
+
does not establish the physical source page. These are textual observations,
|
|
81
|
+
not a new structured generic layout contract. Assessment-specific consumers may
|
|
82
|
+
derive bounded advisory layout metadata from them under their own contracts.
|
|
83
|
+
Hosts adopting this observation prompt must use a new extraction configuration
|
|
84
|
+
revision; `vision-image-v1` versions image preparation, not prompt behavior.
|
|
85
|
+
Synthetic request tests verify these instructions reach the provider, not remote
|
|
86
|
+
recognition quality. Hosts must verify their intended model on representative
|
|
87
|
+
work and retain manual access to originals. No point weights or assessment
|
|
88
|
+
content may be invented to compensate for lost detail.
|
|
89
|
+
|
|
90
|
+
Speech uses source-level text unless actual segment
|
|
52
91
|
timestamps are returned; absent speech confidence calibration is unknown.
|
|
53
92
|
|
|
54
93
|
Confidence and boxes are explicitly null unless an OCR provider advertises and
|
|
@@ -91,6 +130,21 @@ boundaries for mixed/scanned PDF, Unlimited-OCR, camera observations, message
|
|
|
91
130
|
attachments, audio timestamps and malformed/partial output. These fixtures are
|
|
92
131
|
not real remote-provider integrations and are not the ADR evaluation corpus.
|
|
93
132
|
|
|
133
|
+
### Host OCR data
|
|
134
|
+
|
|
135
|
+
`@happyvertical/pdf` probes its Kreuzberg provider on import and logs
|
|
136
|
+
`Kreuzberg could not initialize Tesseract language 'eng'` when no `eng`
|
|
137
|
+
traineddata is found. Ingestion's suites do not route through Kreuzberg (PDF
|
|
138
|
+
extraction uses `unpdf` or injected fixtures), so on its own this warning does
|
|
139
|
+
not explain a test failure. Hosts that run Kreuzberg OCR need Tesseract
|
|
140
|
+
language data: install `tesseract-ocr-eng` (Debian/Ubuntu) or `tesseract`
|
|
141
|
+
(Homebrew), or place `eng.traineddata` from
|
|
142
|
+
[tessdata_fast](https://github.com/tesseract-ocr/tessdata_fast) in a directory
|
|
143
|
+
and export `TESSDATA_PREFIX` pointing at it. The SDK checks
|
|
144
|
+
`TESSDATA_PREFIX`, then `tesseract --list-langs`, then the common
|
|
145
|
+
`/usr/share`, `/usr/local/share` and Homebrew `tessdata` directories; on
|
|
146
|
+
hosts without those paths (for example NixOS), set `TESSDATA_PREFIX`.
|
|
147
|
+
|
|
94
148
|
No live Unlimited-OCR, speech recognition or vision quality run is claimed.
|
|
95
149
|
No recorded-human-audio recognition accuracy, real camera-scene quality,
|
|
96
150
|
calibrated confidence, table extraction, or automatic-action acceptance is
|
|
@@ -118,3 +172,24 @@ truncation only. The adapter never bypasses the SDK to recover hidden fields.
|
|
|
118
172
|
The missing SDK metadata is tracked in [happyvertical/ocr#144](https://github.com/happyvertical/ocr/issues/144).
|
|
119
173
|
AI vision retains reported truncation when supplied by its SDK. Missing provider
|
|
120
174
|
cost is unknown, not zero; no cost estimate is invented.
|
|
175
|
+
|
|
176
|
+
### Optional observed image regions
|
|
177
|
+
|
|
178
|
+
Trusted SDK configuration `observeAnswerRegions: true` asks the SAME existing
|
|
179
|
+
vision request for JSON observations plus an optional bounded region catalog.
|
|
180
|
+
Default off preserves ordinary text observations. This prompt/protocol adoption
|
|
181
|
+
requires a new host configurationRevision (Hearth uses
|
|
182
|
+
`hearth-paper-v5-answer-regions`); no model change or extra automatic request.
|
|
183
|
+
|
|
184
|
+
Catalog rectangles are approximate direct visual observations, not verified boxes:
|
|
185
|
+
version1, coordinateSpace display-oriented, at most64 regions with short id/text
|
|
186
|
+
and finite normalized positive `[x,y,width,height]` inside the entire upright
|
|
187
|
+
EXIF-oriented uncropped image. Fit-inside resize preserves full-frame mapping;
|
|
188
|
+
never infer locations from columns/task numbers. Initial source images only,
|
|
189
|
+
not PDF raster fallback. Missing, uncertain or malformed catalog data is omitted
|
|
190
|
+
while valid observation text survives. A catalog that alone would exceed the
|
|
191
|
+
retained output byte budget is omitted. Existing total token/native/input limits
|
|
192
|
+
still apply; usage includes numeric vision_* counters when the provider reports
|
|
193
|
+
them. Tests prove exactly one SDK call and synthetic oriented alignment, not remote
|
|
194
|
+
model quality. imagePreparations records original orientation/dimensions and sent
|
|
195
|
+
format/dimensions/bytes; immutable source hashes/bytes remain unchanged.
|
package/PROPOSALS.md
CHANGED
|
@@ -133,11 +133,16 @@ absent or no offered candidate matches. On required-only schema refusals, the
|
|
|
133
133
|
validator computes the absent required set and corrects a mismatched model
|
|
134
134
|
declaration; the instruction guides the model without making its declaration
|
|
135
135
|
authoritative. Absent optional fields stay out
|
|
136
|
-
of both `args` and `missingFields`. The model prefers `no_action` when no
|
|
136
|
+
of both `args` and `missingFields`, rather than being sent as null (unless the field explicitly permits null). Suggestion objects contain exactly the required envelope keys, with handler arguments nested only inside `args`. Alternatives mean genuinely competing OTHER choices, not a list of offered choices: use `[]` when none exist and never list the selected handler itself. The SDK response schema excludes that handler key from each suggestion variant while retaining other handler and candidate keys (#4395). Existing malformed or ambiguous outputs remain refused/pending; no self-alternative is stripped after generation. The model prefers `no_action` when no
|
|
137
137
|
offered handler's description fits the document's role, and `unknown` when the
|
|
138
138
|
evidence cannot be interpreted (#4290). Domain routing, such as which received
|
|
139
139
|
documents an application ignores, belongs in host handler descriptions or
|
|
140
|
-
reviewer guidance, not in this text.
|
|
140
|
+
reviewer guidance, not in this text. Keep these shared instructions concise: the
|
|
141
|
+
maintained reference host pins the complete SDK request to an 8 KiB wire/input
|
|
142
|
+
budget. That budget includes schema and transport overhead; adding repeated prose
|
|
143
|
+
can prevent a valid small request from reaching its provider. The frozen
|
|
144
|
+
evaluation checks the real envelope without raising its budget (#4395).
|
|
145
|
+
The text is not persisted. It is not part
|
|
141
146
|
of the frozen interpretation configuration, the input, catalog or output
|
|
142
147
|
digests, or the stored generation output, so a package release that changes it
|
|
143
148
|
leaves stored attempts readable and previewable unchanged. New attempts send the
|
|
@@ -145,6 +150,45 @@ new text, but their digests do not record it; a host that needs provenance to
|
|
|
145
150
|
tell the two apart bumps its own `promptVersion`, which, like any configuration
|
|
146
151
|
change, makes earlier attempts read as stale (`GenerationSnapshotStaleError`).
|
|
147
152
|
|
|
153
|
+
Each suggestion's `explanation` is one or two plain sentences stating what the
|
|
154
|
+
document is and why the handler fits, with no deliberation, self-correction or
|
|
155
|
+
restating of the rules, and is bounded at 300 code points (#4331,
|
|
156
|
+
`PROPOSAL_EXPLANATION_LIMIT`). Two such sentences run about 150-250
|
|
157
|
+
characters; the bound keeps a verbose model from spending its output budget
|
|
158
|
+
(and hitting the `length` finish reason) on prose instead of arguments. A
|
|
159
|
+
reply cut at the token limit is still refused (`finish_reason`) and partial
|
|
160
|
+
JSON is never salvaged; the grammar bound and the instruction are what keep
|
|
161
|
+
replies under the limit. The provider schema and the validator carry the same `maxLength`, so the provider
|
|
162
|
+
copy still accepts a superset of the validator (#4261), and a grammar backend
|
|
163
|
+
enforces the bound while decoding. In the provider schema `explanation` is the
|
|
164
|
+
last suggestion property, after `handlerId`, `handlerVersion`, `args`,
|
|
165
|
+
`evidence`, `alternatives` and `missingFields`, and the top-level keys are
|
|
166
|
+
`outcome`, `suggestions`, `splits` in that order; `required` lists the same
|
|
167
|
+
order. That order predates #4331 and is now pinned by a test, so explanation
|
|
168
|
+
prose cannot precede the arguments. xgrammar emits object properties in schema `properties` order unless
|
|
169
|
+
`any_order` is set (its default is `false`, and vLLM does not set it), and
|
|
170
|
+
llguidance fixes property order to the `properties` map, then `required`. A provider
|
|
171
|
+
that ignores the schema can still return a longer explanation: fresh output is
|
|
172
|
+
normalized after the list deduplication above and before validation, cutting
|
|
173
|
+
it to 299 code points plus `…` on a code-point boundary, so a long explanation
|
|
174
|
+
never fails validation (the raw output-size and SDK `output_limit` checks
|
|
175
|
+
still run first). The value-free count is recorded as
|
|
176
|
+
`provenance.explanationsTruncated`, absent when zero and removed with
|
|
177
|
+
`duplicatesRemoved` whenever the suggestions are discarded. It counts only
|
|
178
|
+
replies from providers that ignore the schema: on a grammar backend such as
|
|
179
|
+
vLLM the string closes at 300 code points with no marker, and nothing is
|
|
180
|
+
counted. The cut happens
|
|
181
|
+
before the invented-target echo check, so an echo beyond the bound is no
|
|
182
|
+
longer seen; explanation text is never a target or authority.
|
|
183
|
+
|
|
184
|
+
Replay: the bound, the property order and the instruction text feed no digest.
|
|
185
|
+
The response schema is built per request and never persisted; the frozen
|
|
186
|
+
interpretation configuration holds versions, identities, the catalog digest and
|
|
187
|
+
`limits`, none of which include the explanation bound. Stored attempts are read
|
|
188
|
+
as persisted, never re-validated or re-cut, so an earlier attempt with an
|
|
189
|
+
explanation of up to 2000 characters still reads, previews and replays with
|
|
190
|
+
its original `output_digest`. New attempts' digests cover the bounded form.
|
|
191
|
+
|
|
148
192
|
A trusted custom `ProposalGenerator` must likewise honor cancellation, bound its
|
|
149
193
|
response, and explicitly declare validated `complete` or `unknown` completion.
|
|
150
194
|
The SDK currently normalizes missing/unknown finish reasons to `stop`
|
|
@@ -386,6 +430,44 @@ phrase. Transport failures through the OpenAI SDK already carried
|
|
|
386
430
|
problem, and other non-SDK errors contribute the transport facts above. The
|
|
387
431
|
category is unchanged (`unavailable`).
|
|
388
432
|
|
|
433
|
+
### Host suggestion review (`reviewSuggestion`)
|
|
434
|
+
|
|
435
|
+
A host's own checks on a generated suggestion (a label that is not the invoice
|
|
436
|
+
date, an amount that is not in the document) can hold it and leave a record a
|
|
437
|
+
reviewer sees:
|
|
438
|
+
|
|
439
|
+
```ts
|
|
440
|
+
proposals: {
|
|
441
|
+
// ...
|
|
442
|
+
reviewSuggestion: ({ suggestion, handler, evidence }) => ({
|
|
443
|
+
hold: true, // optional; forces needs_review
|
|
444
|
+
reasons: ['total_not_in_text'], // optional; <= 8 codes, /^[a-z][a-z0-9_.-]{0,47}$/
|
|
445
|
+
prefilled: ['billDate'], // optional; names declared in handler.argsSchema.properties
|
|
446
|
+
}),
|
|
447
|
+
},
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
The hook is trusted, server-only and optional. It runs once per validated
|
|
451
|
+
suggestion, after validation and before the decision gate, with deep copies of
|
|
452
|
+
the suggestion, its offered handler and the retained evidence text. It cannot
|
|
453
|
+
change `args`, `missingFields`, evidence or the outcome except through `hold`,
|
|
454
|
+
and it can never upgrade: `hold` sets the suggestion (and a `proposals` outcome)
|
|
455
|
+
to `needs_review`; absent or `hold: false` leaves the validator's disposition.
|
|
456
|
+
|
|
457
|
+
The result is stored as `suggestion.hostReview` (`{held, reasons, prefilled}`)
|
|
458
|
+
and counted in `provenance.hostReview` (`{annotated, held}`); both are absent
|
|
459
|
+
when the hook records nothing. Values cannot be stored: unknown keys, free-text
|
|
460
|
+
or over-long reasons, `prefilled` names that are not argument names, and any
|
|
461
|
+
reason code containing one of the suggestion's own argument values (3+
|
|
462
|
+
characters) make the result invalid. An invalid result, a throw, a rejection or
|
|
463
|
+
a hook slower than `limits.timeoutMs` holds the suggestion with the fixed code
|
|
464
|
+
`host_review_invalid` or `host_review_failed`; the error text is discarded.
|
|
465
|
+
`ReviewView` shows "Checked by the shop: ..." under the arguments.
|
|
466
|
+
|
|
467
|
+
Like `failureCapture`, the hook is not public read configuration and never enters
|
|
468
|
+
frozen configuration or digests. Hosts keep it synchronous-cheap: it runs inside
|
|
469
|
+
the generation lease.
|
|
470
|
+
|
|
389
471
|
### Failed-attempt capture (opt-in, #4285)
|
|
390
472
|
|
|
391
473
|
The value-free reason cannot show what the model actually sent. A host that
|
|
@@ -609,3 +691,51 @@ Interpretation output uses the exported `GenerationAnalysisOutput` wrapper at
|
|
|
609
691
|
An explicit feedback `retrieve` denial omits optional examples and feedback
|
|
610
692
|
provenance and continues generation. Item/execution denials, unexpected failures,
|
|
611
693
|
and revocation after examples were selected still fail closed before disclosure.
|
|
694
|
+
|
|
695
|
+
## Storage-safe provider text (#4393)
|
|
696
|
+
|
|
697
|
+
After the normal output-byte ceiling, generation validates decoded JSON object
|
|
698
|
+
keys and nested string values for PostgreSQL's unsupported NUL and unpaired
|
|
699
|
+
UTF-16 surrogate characters. A refusal is `malformed_output` with a fixed,
|
|
700
|
+
value-free reason, before either accepted or refused suggestion arguments can be
|
|
701
|
+
retained. Provider content is never stripped, repaired or treated as authority.
|
|
702
|
+
Literal backslash-u text and valid supplementary Unicode remain unchanged.
|
|
703
|
+
|
|
704
|
+
The generic `completeAnalysis` publication boundary independently checks the
|
|
705
|
+
whole result, including provider metadata and diagnostics. An invalid result
|
|
706
|
+
records the exact current fenced attempt as `needs_attention/malformed_output`
|
|
707
|
+
on the same authorized executor and completes its dispatch; it produces no
|
|
708
|
+
completed analysis, proposal or execution. Originals remain readable, and a
|
|
709
|
+
fresh authorized analysis revision can retry without rewriting the failed one.
|
|
710
|
+
Existing byte limits and current authority/fence checks still apply.
|
|
711
|
+
|
|
712
|
+
Optional failed-attempt capture uses the existing private, reviewer-authorized
|
|
713
|
+
host redaction policy. Unsupported generated JSON can be retained there as its
|
|
714
|
+
JSON-escaped diagnostic representation; it is never copied into a successful
|
|
715
|
+
proposal or returned in ordinary snapshot payloads. Without an enabled redactor,
|
|
716
|
+
no raw diagnostic text is retained. Shared foundation/proposal tests exercise
|
|
717
|
+
SQLite and actual PostgreSQL JSONB writes, invalid keys and values, lone high/low
|
|
718
|
+
surrogates, valid emoji/literal escapes, source retention, retry and capture policy.
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
## Descriptive candidate context
|
|
722
|
+
|
|
723
|
+
A discovery candidate may include optional `context`, a plain JSON object of
|
|
724
|
+
untrusted descriptive data. It is never instructions or new authority. Keep the
|
|
725
|
+
label concise: context does not create extra entity choices. Validation rejects
|
|
726
|
+
non-JSON values, lossy coercions, unsafe Unicode, cycles, depth over32 and context
|
|
727
|
+
exceeding the existing `maxInputBytes`. The complete offered input still uses the
|
|
728
|
+
same total byte budget. Invalid authorized context fails closed; denied candidates
|
|
729
|
+
and their context never reach generation. Absent context preserves the old wire.
|
|
730
|
+
|
|
731
|
+
Context is snapshotted and included in the candidate key/digest and generator
|
|
732
|
+
contract. Hosts must bind any context changes to their current target revision;
|
|
733
|
+
current target checks retain their existing live executor/authorization boundary.
|
|
734
|
+
Education binds canonical same-capture prompt context to its target revision digest.
|
|
735
|
+
|
|
736
|
+
The engine exposes read-only `HandlerContext.analysisRevision` and forwards the
|
|
737
|
+
same current item revision to target authorization on its shared executor. This
|
|
738
|
+
pin comes from the owned intake row, not handler arguments, browser input or model
|
|
739
|
+
output. An owner may use it to avoid treating that generation's own materialized
|
|
740
|
+
result as an independent change to its input context; ordinary unrelated changes
|
|
741
|
+
and current authority/revision checks still invalidate stale snapshots.
|
|
@@ -6875,12 +6875,14 @@ var IntakeExecutionService = class IntakeExecutionService {
|
|
|
6875
6875
|
db,
|
|
6876
6876
|
scope: this.scope,
|
|
6877
6877
|
itemId: String(item.id),
|
|
6878
|
+
analysisRevision: Number(item.analysis_revision),
|
|
6878
6879
|
policy,
|
|
6879
6880
|
assertTarget: async (model, targetId, revision) => {
|
|
6880
6881
|
await this.config.assertTarget({
|
|
6881
6882
|
db,
|
|
6882
6883
|
scope: this.scope,
|
|
6883
6884
|
itemId: String(item.id),
|
|
6885
|
+
analysisRevision: Number(item.analysis_revision),
|
|
6884
6886
|
model,
|
|
6885
6887
|
id: targetId,
|
|
6886
6888
|
...revision === void 0 ? {} : { revision }
|
|
@@ -6930,6 +6932,7 @@ var IntakeExecutionService = class IntakeExecutionService {
|
|
|
6930
6932
|
db,
|
|
6931
6933
|
scope: this.scope,
|
|
6932
6934
|
itemId,
|
|
6935
|
+
analysisRevision: context.analysisRevision,
|
|
6933
6936
|
model,
|
|
6934
6937
|
id: id2
|
|
6935
6938
|
})), requireReview);
|
|
@@ -7141,7 +7144,7 @@ var IntakeExecutionService = class IntakeExecutionService {
|
|
|
7141
7144
|
if (!Array.isArray(references)) throw new Error("Feedback lineage unavailable");
|
|
7142
7145
|
if (references.length === 0) return;
|
|
7143
7146
|
if (!this.options.feedback) throw new Error("Feedback configuration unavailable");
|
|
7144
|
-
const { IntakeFeedbackService } = await import("./feedback-
|
|
7147
|
+
const { IntakeFeedbackService } = await import("./feedback-DHcSKgVU.js").then((n) => n.r);
|
|
7145
7148
|
await new IntakeFeedbackService(this.options, this).assertActionLineage(String(bound.action.id), db, String(bound.proposal.id));
|
|
7146
7149
|
}
|
|
7147
7150
|
async getAction(actionId) {
|
|
@@ -7230,6 +7233,7 @@ var IntakeExecutionService = class IntakeExecutionService {
|
|
|
7230
7233
|
db,
|
|
7231
7234
|
scope: this.scope,
|
|
7232
7235
|
itemId,
|
|
7236
|
+
analysisRevision: Number(bound.item.analysis_revision),
|
|
7233
7237
|
model: target.model,
|
|
7234
7238
|
id: target.id
|
|
7235
7239
|
})).revision !== target.revision) {
|
|
@@ -7804,6 +7808,7 @@ var IntakeExecutionService = class IntakeExecutionService {
|
|
|
7804
7808
|
db,
|
|
7805
7809
|
scope: this.scope,
|
|
7806
7810
|
itemId: String(item.id),
|
|
7811
|
+
analysisRevision: Number(item.analysis_revision),
|
|
7807
7812
|
model,
|
|
7808
7813
|
id: result[field]
|
|
7809
7814
|
});
|
|
@@ -7834,6 +7839,7 @@ var IntakeExecutionService = class IntakeExecutionService {
|
|
|
7834
7839
|
db,
|
|
7835
7840
|
scope: this.scope,
|
|
7836
7841
|
itemId: String(bound.item.id),
|
|
7842
|
+
analysisRevision: Number(bound.item.analysis_revision),
|
|
7837
7843
|
model,
|
|
7838
7844
|
id: result[field]
|
|
7839
7845
|
});
|
|
@@ -8004,6 +8010,7 @@ var IntakeExecutionService = class IntakeExecutionService {
|
|
|
8004
8010
|
db: this.db,
|
|
8005
8011
|
scope: this.scope,
|
|
8006
8012
|
itemId: String(send.bound.item.id),
|
|
8013
|
+
analysisRevision: Number(send.bound.item.analysis_revision),
|
|
8007
8014
|
model,
|
|
8008
8015
|
id: targetId,
|
|
8009
8016
|
...revision === void 0 ? {} : { revision }
|
|
@@ -8622,7 +8629,11 @@ var IntakeExecutionService = class IntakeExecutionService {
|
|
|
8622
8629
|
...this.config,
|
|
8623
8630
|
assertTarget: async (target) => {
|
|
8624
8631
|
try {
|
|
8625
|
-
|
|
8632
|
+
const item = await this.item(target.db, target.itemId);
|
|
8633
|
+
return await this.config.assertTarget({
|
|
8634
|
+
...target,
|
|
8635
|
+
analysisRevision: Number(item.analysis_revision)
|
|
8636
|
+
});
|
|
8626
8637
|
} catch {
|
|
8627
8638
|
throw new IntakeAccessDeniedError();
|
|
8628
8639
|
}
|
|
@@ -8718,4 +8729,4 @@ async function continueIntakeReview(service, actionId, task) {
|
|
|
8718
8729
|
//#endregion
|
|
8719
8730
|
export { __toESM as A, storedFailureCapture as C, generationSnapshotRead as D, discoveryTransaction as E, listReadGate as O, prepareFailureCapture as S, completeWithFailureCapture as T, HandlerArgumentsInvalidError as _, resolveIntakePolicy as a, FAILURE_CAPTURE_MAX_BYTES as b, HANDLER_ARGUMENT_ISSUE_LIMIT as c, schemaOwnedPath as d, require_ajv as f, GenerationSourceStaleError as g, GenerationSnapshotStaleError as h, intakeBindingDigest as i, __exportAll as k, HANDLER_ARGUMENT_PATH_LIMIT as l, redactedCeiling as m, IntakeExecutionService as n, feedbackActionTransaction as o, UNFINISHED_ACTION_STATES as p, continueIntakeReview as r, feedbackDiscoveryContext as s, IntakeAccessDeniedError as t, describeArgumentRefusal as u, ProposalsNotConfiguredError as v, analysisLeaseRemaining as w, assertFailureCapture as x, FAILURE_CAPTURE_DEFAULT_MAX_BYTES as y };
|
|
8720
8731
|
|
|
8721
|
-
//# sourceMappingURL=execution-
|
|
8732
|
+
//# sourceMappingURL=execution-DKWz2cz0.js.map
|