@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.
- package/FEEDBACK.md +137 -0
- package/PROPOSALS.md +146 -5
- package/README.md +168 -2
- package/REVIEW.md +611 -7
- package/agents/execution.md +87 -0
- package/dist/chunks/{execution-NoDh3pjs.js → execution-BzVQax0n.js} +528 -42
- package/dist/chunks/execution-BzVQax0n.js.map +1 -0
- package/dist/chunks/{feedback-CJB900iG.js → feedback-D3UTF8fm.js} +175 -36
- package/dist/chunks/feedback-D3UTF8fm.js.map +1 -0
- package/dist/chunks/{proposal-errors-VxcTU6Db.js → proposal-contracts-77Uo1B1j.js} +38 -44
- package/dist/chunks/proposal-contracts-77Uo1B1j.js.map +1 -0
- package/dist/chunks/reviewer-instruction-CEc3AOuU.js +33 -0
- package/dist/chunks/reviewer-instruction-CEc3AOuU.js.map +1 -0
- package/dist/dto.d.ts +75 -0
- package/dist/dto.d.ts.map +1 -1
- package/dist/execution-contracts.d.ts +4 -1
- package/dist/execution-contracts.d.ts.map +1 -1
- package/dist/execution-dto.d.ts +16 -0
- package/dist/execution-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 +101 -4
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +2 -2
- package/dist/feedback-dto.d.ts +18 -4
- package/dist/feedback-dto.d.ts.map +1 -1
- package/dist/feedback-internal.d.ts +9 -0
- package/dist/feedback-internal.d.ts.map +1 -1
- package/dist/feedback.d.ts +10 -0
- package/dist/feedback.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/manifest.json +339 -3
- package/dist/models.d.ts +15 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +82 -2
- package/dist/models.js.map +1 -1
- package/dist/policy.d.ts +3 -0
- package/dist/policy.d.ts.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 +20 -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 +6 -1
- package/dist/proposals.d.ts.map +1 -1
- package/dist/proposals.js +268 -71
- package/dist/proposals.js.map +1 -1
- package/dist/redaction.d.ts +9 -0
- package/dist/redaction.d.ts.map +1 -0
- package/dist/review-dto.d.ts +108 -5
- 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 +252 -13
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1190 -85
- package/dist/server.js.map +1 -1
- package/dist/smrt-knowledge.json +137 -23
- 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 +54 -55
- package/dist/svelte/components/ActionReview.svelte.d.ts +8 -1
- 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/EvidenceViewer.svelte +60 -4
- package/dist/svelte/components/EvidenceViewer.svelte.d.ts +12 -1
- package/dist/svelte/components/EvidenceViewer.svelte.d.ts.map +1 -1
- package/dist/svelte/components/InboxView.svelte +172 -19
- package/dist/svelte/components/InboxView.svelte.d.ts +36 -2
- 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/IntakeWorkspace.svelte +27 -0
- package/dist/svelte/components/IntakeWorkspace.svelte.d.ts +19 -0
- package/dist/svelte/components/IntakeWorkspace.svelte.d.ts.map +1 -0
- package/dist/svelte/components/ReviewView.svelte +653 -71
- package/dist/svelte/components/ReviewView.svelte.d.ts +20 -1
- package/dist/svelte/components/ReviewView.svelte.d.ts.map +1 -1
- package/dist/svelte/components/TriageView.svelte +669 -0
- package/dist/svelte/components/TriageView.svelte.d.ts +16 -0
- package/dist/svelte/components/TriageView.svelte.d.ts.map +1 -0
- package/dist/svelte/i18n.d.ts +56 -0
- package/dist/svelte/i18n.d.ts.map +1 -1
- package/dist/svelte/i18n.js +56 -0
- package/dist/svelte/index.d.ts +2 -1
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +1 -0
- package/dist/svelte/view-utils.d.ts +67 -0
- package/dist/svelte/view-utils.d.ts.map +1 -1
- package/dist/svelte/view-utils.js +157 -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/agents/execution.md
CHANGED
|
@@ -37,6 +37,34 @@ requires human review; machine authorization requires explicit evaluated opt-ins
|
|
|
37
37
|
at all three authority layers and remains separate provenance from human review.
|
|
38
38
|
The reference handlers always require review; no evaluation claim is made here.
|
|
39
39
|
|
|
40
|
+
`operation: 'review_own'` is the submitter-scoped decision gate (#4085). The
|
|
41
|
+
service accepts it only when the host's `authorize` result carries
|
|
42
|
+
`submitter: true`, the resolved policy's `submitterReview` is enabled (the
|
|
43
|
+
application layer opts in; tenant/source layers may only set it `false`), and
|
|
44
|
+
the item's server-recorded `submitter_id` (the receiving service's authenticated
|
|
45
|
+
`scope.actorId`) equals the current actor and the captured
|
|
46
|
+
`execution.principalId`; apply rechecks that a `review_own` decision's reviewer
|
|
47
|
+
is that submitter and principal. All other `review` checks apply
|
|
48
|
+
unchanged; `correct` is refused. The decision row records `mode` and
|
|
49
|
+
`selfDecision` (decider is the submitter, in either mode), and `feedbackEvent` copies them as `decisionMode`/`selfDecision`;
|
|
50
|
+
`authorizeAutomatic` never reads human decisions, so a self-decision cannot
|
|
51
|
+
become automation evidence. `listOwnProposals` reads with the ordinary `read`
|
|
52
|
+
operation per handler after an item-level `read` check. Unreadable items are
|
|
53
|
+
skipped before projection (1000 hidden rows per call, then `Own proposal scan
|
|
54
|
+
limit`) and the cursor names only emitted items with a confirmed readable
|
|
55
|
+
successor. On this surface every host `assertTarget` throw is mapped to the
|
|
56
|
+
exported `IntakeAccessDeniedError` (message `Intake unavailable`, the type of
|
|
57
|
+
every execution denial), so the item becomes an `unavailable` entry and host
|
|
58
|
+
error text is not returned; hosts need no change. Other errors propagate,
|
|
59
|
+
including a throwing grant store in `authorize`. The feedback anti-widening
|
|
60
|
+
check also refuses a re-evaluation that turns `submitterReview` on.
|
|
61
|
+
Deletion redaction blanks `submitter_id` and `owner_key` with the payloads and
|
|
62
|
+
drops `execution.principalId` unless an external action is still `executing`
|
|
63
|
+
or `outcome_unknown`; `finish` and the reconcile state update release it once
|
|
64
|
+
none is left, and later deletion sweeps do the same.
|
|
65
|
+
Hosts whose `authorize` switches exhaustively on the operation fail closed for
|
|
66
|
+
the new value until they opt in.
|
|
67
|
+
|
|
40
68
|
`mutationBoundary: 'serialized'` is an explicit host guarantee, not an inferred
|
|
41
69
|
property of a permissions array: grant revocation must serialize with the supplied
|
|
42
70
|
transaction, or the owning mutation must revalidate under its own lock. The host
|
|
@@ -47,6 +75,50 @@ row lock before public `Contents` reads. A current `PrincipalRun` intersects liv
|
|
|
47
75
|
permissions with the captured ceiling and checks the exact registered collection
|
|
48
76
|
operation at every effect. No `runOnce` atomicity is assumed.
|
|
49
77
|
|
|
78
|
+
## Reviewer-chosen actions and dispositions
|
|
79
|
+
|
|
80
|
+
`startAction(StartActionInput)` lets an authenticated reviewer begin any
|
|
81
|
+
operation handler the item's evidence media types offer, without a model
|
|
82
|
+
suggestion. It checks `review` access under that handler before any callback,
|
|
83
|
+
refuses plan handlers and resolved items, binds the current analysis revision's
|
|
84
|
+
completed/partial attempt, inserts an action keyed `reviewer:<requestId>` with
|
|
85
|
+
`data.origin = 'reviewer-selected'`, and reuses `buildBinding`/`publish`: schema
|
|
86
|
+
validation, `validate`, `preview`, exact normalized arguments, target locks,
|
|
87
|
+
evidence pins and the request ledger behave exactly as for `previewProposal`.
|
|
88
|
+
Replays re-preview against the original revision and return the same review.
|
|
89
|
+
Approval, apply, retention, redaction and reconciliation are unchanged.
|
|
90
|
+
`authorizeAutomatic` refuses `reviewer-selected` actions and resolved items;
|
|
91
|
+
human routing is never machine authority.
|
|
92
|
+
|
|
93
|
+
`resolveItem(ResolveItemInput)` appends one terminal `intake_dispositions` row
|
|
94
|
+
(`disposition = 'resolved_no_action'`, reason/reviewer in redactable `data`)
|
|
95
|
+
under the item lock. Reviewer authority is taken from the first handler the
|
|
96
|
+
captured ceiling and policy offer; no new grant exists. It refuses while any
|
|
97
|
+
action is `authorized` with an unexpired approval for its current review
|
|
98
|
+
version, `executing`, `outcome_unknown` or `succeeded`; `failed` actions and
|
|
99
|
+
lapsed approvals do not block it (neither can be rejected). Afterwards
|
|
100
|
+
`submitDecision` refuses everything but `reject`, `publish` refuses any new
|
|
101
|
+
revision (correction, re-preview, plan preview), the apply gate (`approved`)
|
|
102
|
+
refuses any execution or retry, and `IngestionService.analyze`,
|
|
103
|
+
`reviseLogicalSplit` and `createAction` refuse the item under its lock before
|
|
104
|
+
any write. `createAction` (process authority) also refuses the reserved
|
|
105
|
+
`reviewer:` key prefix and `reviewer-selected` origin, which only
|
|
106
|
+
`startReviewerAction` mints; `previewProposal` on such an action requires
|
|
107
|
+
`review` access and the current handler@version. `resolveItem` supersedes
|
|
108
|
+
queued/running analyses and completes dispatch intents under the item lock, and
|
|
109
|
+
`claimAnalysis` returns `null` for a resolved item; `publishProposal` refuses
|
|
110
|
+
a resolved item and any reviewer-selected action. `[feedbackActionTransaction]`
|
|
111
|
+
takes `targetRevisions` (default true); routing lineage re-checks pass false. The feedback context's
|
|
112
|
+
`settled` flag gates selection only; lineage re-checks ignore it (FEEDBACK.md). `intake_dispositions` is a new model: deploy
|
|
113
|
+
its manifest migration (`pnpm ... db:migrate`) before upgrading hosts;
|
|
114
|
+
`assertReady` checks it, and both privacy deletion and retention expiry
|
|
115
|
+
(`redactExecution`) redact its payload with the other item-owned tables.
|
|
116
|
+
`IntakeItemDTO.disposition` is `{ state: 'resolved', at }` (row `created_at`,
|
|
117
|
+
never redacted); `getItemDisposition` returns reviewer and reason under
|
|
118
|
+
`reviewerAccess`. `resolveItem` captures an optional `reviewer_routing` feedback projection in the
|
|
119
|
+
same transaction; a reviewer-selected action is captured when its approval is
|
|
120
|
+
recorded (FEEDBACK.md).
|
|
121
|
+
|
|
50
122
|
## Durable review and effects
|
|
51
123
|
|
|
52
124
|
Preview appends a proposal bound to exact analysis attempt/evidence, handler,
|
|
@@ -83,6 +155,21 @@ each step review; changed preview/preconditions require a fresh review.
|
|
|
83
155
|
Abort/continue follows the pinned public playbook definition, with fresh authority
|
|
84
156
|
at every step.
|
|
85
157
|
|
|
158
|
+
Human corrections are the logical split and the reviewer instruction. Both are
|
|
159
|
+
minted only by their authenticated review API under reviewer authority, written
|
|
160
|
+
into a new immutable extraction configuration, and reach interpretation only as
|
|
161
|
+
a digest-verified copy. Neither grants handlers, candidates, permissions or
|
|
162
|
+
automation; `authorizeAutomatic` and preview/approval are unchanged for actions
|
|
163
|
+
produced under an instruction. Recording either supersedes current suggestions
|
|
164
|
+
and queues the existing dispatch stages (a new extraction revision, then
|
|
165
|
+
interpretation — provider extraction budget is spent per correction because the
|
|
166
|
+
predecessor pin is not reused); hosts wake their worker through
|
|
167
|
+
`onSplit`/`onInstruct` and rely on dispatch repair otherwise. While a stage is
|
|
168
|
+
queued/running the item reports `processing` regardless of earlier actions; a
|
|
169
|
+
failed stage (extraction or interpretation) exposes its safe category through
|
|
170
|
+
`getReinterpretationState`, and a retry anchored on the latest completed
|
|
171
|
+
generation carries forward any newer split correction.
|
|
172
|
+
|
|
86
173
|
`continueIntakeReview` uses the existing jobs continuation context. Applications
|
|
87
174
|
create tasks with owner, tenant and exact `{recordId, revision, inputKey}` binding
|
|
88
175
|
and configure `authorizeMcpTask` to revalidate it. A continuation answer only wakes
|