@happyvertical/smrt-ingestion 0.55.12 → 0.55.14

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 (42) hide show
  1. package/FEEDBACK.md +6 -0
  2. package/PROPOSALS.md +8 -0
  3. package/README.md +26 -1
  4. package/REVIEW.md +31 -0
  5. package/agents/execution.md +2 -1
  6. package/dist/chunks/{execution-C7sTFXFU.js → execution-TWeIv0o-.js} +2 -2
  7. package/dist/chunks/{execution-C7sTFXFU.js.map → execution-TWeIv0o-.js.map} +1 -1
  8. package/dist/chunks/{feedback-C3OHD4sA.js → feedback-DmuvGO2o.js} +17 -7
  9. package/dist/chunks/feedback-DmuvGO2o.js.map +1 -0
  10. package/dist/chunks/{proposal-errors-z24VKWnQ.js → proposal-errors-BQjFXSOt.js} +15 -2
  11. package/dist/chunks/proposal-errors-BQjFXSOt.js.map +1 -0
  12. package/dist/execution.js +1 -1
  13. package/dist/feedback.d.ts +4 -0
  14. package/dist/feedback.d.ts.map +1 -1
  15. package/dist/index.js +2 -16
  16. package/dist/index.js.map +1 -1
  17. package/dist/manifest.json +3 -21
  18. package/dist/models.js +1 -1
  19. package/dist/models.js.map +1 -1
  20. package/dist/proposal-dto.d.ts +4 -0
  21. package/dist/proposal-dto.d.ts.map +1 -1
  22. package/dist/proposal-limits.d.ts +4 -0
  23. package/dist/proposal-limits.d.ts.map +1 -0
  24. package/dist/proposals.d.ts.map +1 -1
  25. package/dist/proposals.js +18 -22
  26. package/dist/proposals.js.map +1 -1
  27. package/dist/recipes.d.ts +2 -16
  28. package/dist/recipes.d.ts.map +1 -1
  29. package/dist/review-analysis.d.ts +10 -0
  30. package/dist/review-analysis.d.ts.map +1 -0
  31. package/dist/review-host.d.ts +26 -0
  32. package/dist/review-host.d.ts.map +1 -0
  33. package/dist/review-summary.d.ts +9 -0
  34. package/dist/review-summary.d.ts.map +1 -0
  35. package/dist/server.d.ts +1 -0
  36. package/dist/server.d.ts.map +1 -1
  37. package/dist/server.js +166 -3
  38. package/dist/server.js.map +1 -1
  39. package/dist/smrt-knowledge.json +20 -38
  40. package/package.json +17 -17
  41. package/dist/chunks/feedback-C3OHD4sA.js.map +0 -1
  42. package/dist/chunks/proposal-errors-z24VKWnQ.js.map +0 -1
package/FEEDBACK.md CHANGED
@@ -154,3 +154,9 @@ cohort demonstrates contract-level influence, not provider quality or measured
154
154
  production improvement. Real-provider evaluation belongs to #3677. There are no
155
155
  sampled automatic outcomes in this feature; reporting that stratum as unavailable
156
156
  avoids inventing correctness labels from successful jobs.
157
+
158
+ When interpretation requests optional examples, an explicit denial of feedback
159
+ retrieval degrades to generation without examples or feedback provenance. Direct
160
+ `retrieveFeedback` calls still reject denied reads. Other authorization errors
161
+ are not swallowed, and already selected examples must pass the normal live
162
+ provider-boundary checks; revocation does not silently preserve selected data.
package/PROPOSALS.md CHANGED
@@ -171,3 +171,11 @@ Generative responses and the separate injected PDF split boundaries establish
171
171
  deterministic orchestration, not model accuracy or OCR quality. No held-out routing
172
172
  evaluation or automatic approval is claimed. Missing/unknown AI completion remains
173
173
  explicit under [SDK #1381](https://github.com/happyvertical/sdk/issues/1381).
174
+
175
+ Proposal limits are checked at `IngestionService` construction: positive safe
176
+ integers, at most 20 handlers/candidates/suggestions and 2147483647 ms timeout.
177
+ Interpretation output uses the exported `GenerationAnalysisOutput` wrapper at
178
+ `analysis.result.output.proposals`; the published review host unwraps it.
179
+ An explicit feedback `retrieve` denial omits optional examples and feedback
180
+ provenance and continues generation. Item/execution denials, unexpected failures,
181
+ and revocation after examples were selected still fail closed before disclosure.
package/README.md CHANGED
@@ -179,6 +179,31 @@ limits.
179
179
  The recipe manifest registers those existing browser components as
180
180
  `/ingestion/inbox` and `/ingestion/review` routes for a host to mount. The route
181
181
  metadata does not supply a host, source, provider, or demo fixture, and it does
182
- not change the preview-only status. Both recipes declare `both` runtime: their
182
+ not change the preview-only status. Neither recipe declares generic model
183
+ navigation: the ingestion records have no generated screens, so hosts use the
184
+ authenticated route surfaces instead. Both recipes declare `both` runtime: their
183
185
  components render in a browser, while the authenticated review host and package
184
186
  dependency closure require a server.
187
+
188
+ ## First analysis and host constraints
189
+
190
+ `receive` retains evidence and queues the initial dispatch, but does not choose
191
+ an extraction configuration. Before a worker can analyze a new item, the host must
192
+ call `analyze(itemId, { stage: 'extract', extraction: { configurationRevision,
193
+ limits } }, requestId)`, then claim that returned revision and run `extractAnalysis`.
194
+ Use a stable request ID for retries. `repairDispatches` repairs queue delivery;
195
+ it does not supply the missing extraction request. After extraction, use
196
+ `prepareGeneration` and `analyze` to request interpretation.
197
+
198
+ Retention requires `replayUntil >= expiresAt`; an earlier replay deadline rejects
199
+ even a fresh delivery as `expired`. The replay tombstone must outlive retained
200
+ source bytes. Set both deadlines explicitly before calling `receive`.
201
+
202
+ Handler preview `normalizedArgs` must equal the submitted arguments exactly.
203
+ It is an integrity assertion, not a normalization hook: defaults or tidying must
204
+ happen before submitting args for preview, so review binds exactly what was sent.
205
+
206
+ Proposal limits must be positive safe integers. `maxHandlers`, `maxCandidates`
207
+ and `maxSuggestions` are each capped at 20; `timeoutMs` is capped at 2147483647.
208
+ Invalid limits are rejected when constructing `IngestionService`, before receipt
209
+ or interpretation. See [REVIEW.md](REVIEW.md) for the published server review host.
package/REVIEW.md CHANGED
@@ -135,3 +135,34 @@ page using fresh cursors, then publish the combined authorized set together. Old
135
135
  page payloads are cleared while loading; any unavailable page clears all payloads.
136
136
  This keeps plan controls and earlier steps visible across page boundaries without
137
137
  reusing a prior authorization decision.
138
+
139
+ ## Published server adapter
140
+
141
+ Import `createIntakeReviewHost` and `IntakeReviewHostOptions` from
142
+ `@happyvertical/smrt-ingestion/server`. Call `createIntakeReviewHost(service,
143
+ options)` with a service constructed from the current authenticated session.
144
+ The returned `IntakeReviewHost` implements inbox state projection across saved
145
+ review pages, current generation loading, stable `ui:<index>` intention keys,
146
+ action/plan preview CAS lookup, decisions, apply, corrections, candidates, split
147
+ and feedback. Repeated preparation of an unchanged authorized suggestion retains
148
+ its current review instead of creating a new revision. Changed arguments still
149
+ require explicit re-preview and a fresh human decision.
150
+ Lists scan 20 items per page; filtered pages may be empty with a `nextCursor`.
151
+ Continue until the cursor is absent. Listing does not load original bytes.
152
+
153
+ Supply four application adapters: `upload(files, requestId)` (authenticated
154
+ receipt plus first extraction request), `assignment(itemId)` (durable read),
155
+ `assign(input)` (manager authorization, eligible assignees, durable CAS and request
156
+ replay protection), and `evidence(part)` (safe label/text or authenticated
157
+ same-origin URL). Optional `label(item)` changes presentation. Optional
158
+ `enableFeedback: true` exposes the optional feedback callback when the service
159
+ has feedback configured. Optional `onSplit(itemId, revision)` wakes the host worker after the durable extraction
160
+ request; repair dispatches if wakeup fails. The factory creates no assignment
161
+ schema and grants no permissions. Create it per session, authenticate every HTTP
162
+ call and enforce CSRF before dispatching a mutation.
163
+
164
+ `GenerationAnalysisOutput` is exported by `/dto` and describes the interpretation
165
+ wrapper `{ proposals: GenerationOutput }` under `analysis.result.output`.
166
+ The factory unwraps this into `ItemReviewView.generation`. Stale generation is
167
+ omitted while authorized saved reviews remain available; access denials propagate.
168
+ The reference application still owns its fixture provisioning and HTTP transport.
@@ -15,7 +15,8 @@ Applications supply a trusted `IntakeExecutionOptions.handlers` catalog.
15
15
  schemas for arguments/results, allowlisted `resultModels`, `validate`, `preview`,
16
16
  a registered `{model, action, version}` operation and explicit effect/idempotency/
17
17
  open-world capability declaration. Preview returns display, exact normalized
18
- arguments and target revision preconditions. There is no arbitrary tool execution
18
+ arguments and target revision preconditions. `normalizedArgs` must equal the
19
+ submitted args exactly; default or normalize before submission, never in preview. There is no arbitrary tool execution
19
20
  or expression evaluation. Reviewer display wraps application fields under `preview`
20
21
  and symbolic metadata under `dependencies`; plan steps additionally wrap that
21
22
  object under `step` alongside the plan preview. Application display keys cannot
@@ -6848,7 +6848,7 @@ var IntakeExecutionService = class {
6848
6848
  if (!Array.isArray(references)) throw new Error("Feedback lineage unavailable");
6849
6849
  if (references.length === 0) return;
6850
6850
  if (!this.options.feedback) throw new Error("Feedback configuration unavailable");
6851
- const { IntakeFeedbackService } = await import("./feedback-C3OHD4sA.js").then((n) => n.n);
6851
+ const { IntakeFeedbackService } = await import("./feedback-DmuvGO2o.js").then((n) => n.r);
6852
6852
  await new IntakeFeedbackService(this.options, this).assertActionLineage(String(bound.action.id), db, String(bound.proposal.id));
6853
6853
  }
6854
6854
  async getAction(actionId) {
@@ -8028,4 +8028,4 @@ async function continueIntakeReview(service, actionId, task) {
8028
8028
  //#endregion
8029
8029
  export { feedbackActionTransaction as a, __exportAll as c, resolveIntakePolicy as i, __toESM as l, continueIntakeReview as n, feedbackDiscoveryContext as o, intakeBindingDigest as r, require_ajv as s, IntakeExecutionService as t };
8030
8030
 
8031
- //# sourceMappingURL=execution-C7sTFXFU.js.map
8031
+ //# sourceMappingURL=execution-TWeIv0o-.js.map