Preview
Incoming files and email wait for a person
smrt-ingestion keeps what arrives (uploads, email, files in a watched folder) as evidence, reads it, and suggests what to do with it. A reviewer decides. Upstream ships it as a preview with automation disabled.
Verified against smrt 0.62.10
What happens without a person
A source hands the service the original bytes, and the service keeps them. A receipt is identified by tenant, source and delivery key, so a source that retries after a failure gets the same receipt back and no duplicate. An item is ready only once every part is stored.
- Four kinds of source ship: an upload endpoint, an email adapter, a watched folder and a vendor webhook handler. All of them only preserve what arrived. None writes to your records, calls an AI tool or takes an outside action.
- Analysis runs as background jobs: extracting text from PDFs, images and audio, then generating suggestions. Receiving an item does not start it. Your host asks for the first analysis and names the extraction settings.
- Retention runs when your host runs it. The host schedules repairDispatches, after a restart and on a timer, along with the retention and cleanup sweeps. When an item expires, access is revoked, the bytes are removed, and the content of its history is redacted.
What waits for a reviewer
A suggestion is only a suggestion. Generating one never approves or applies anything. A reviewer opens the inbox, sees the item beside its original, and decides.
- IntakeInbox lists what arrived and what needs attention. IntakeReview shows one item with its evidence and the suggested action. IntakeWorkspace puts both on one page with keyboard next and previous.
- A reviewer can approve, reject, correct or defer a suggestion, complete one that is missing required fields, start any action the app offers for the item, or close the item with no action.
- An approved action is applied once, under the approver’s current permissions.
- A person confirming their own submission is recorded as exactly that. It is never counted as independent review.
What upstream marks as preview
The package’s own README says the published evaluation did not meet its quality gates and did not establish safety, and that automation remains disabled. We repeat it here so the limits are clear.
- Every generated suggestion is marked as not eligible for automatic action. That flag is always false.
- The package has a path for machine authorization. It needs an explicit, evaluated opt-in at the application, the tenant and the source, and upstream makes no evaluation claim for it. The reference handlers always require review.
- Upstream claims no recognition quality for OCR, speech or vision. Whoever deploys it is expected to test their own provider and model on representative material first.
- Generated REST, command-line and MCP changes to the ingestion records are disabled. A host exposes its own authorized methods.
What is not on by default
The ingestion.inbox and ingestion.review recipes register the two screens as /ingestion/inbox and /ingestion/review for a host to mount. They do not configure a source, a provider or a host.
- Email is opt-in for each configured account.
- No extraction provider or suggestion generator is chosen for you.
- Keeping the output of a failed suggestion attempt for diagnosis is off, and needs a redaction hook from the host.
- Letting a submitter confirm their own suggestion is off until the application policy opts in.
How to switch it on
Ingestion is host work, done in trusted server code. This site does not install the package, so there is no live example here.
- Add @happyvertical/smrt-ingestion and run smrt db:migrate before starting. SQLite and PostgreSQL are supported.
- Create an IngestionService from the /server entry with a database, an asset runtime, the signed-in tenant, actor and scope, an authorization callback, a jobs target and a callback that purges your own previews, indexes and caches. Never take scope or permissions from the incoming document.
- Run the task runner with the ingestion queue enabled, and schedule the repair and retention sweeps.
- Configure a source, then request the first analysis for each new item.
- Mount the inbox and review components from the /svelte entry behind an authenticated review host.