# @garuda/encoder — the Commission pillar-op seam

Computes the **target EPC** from `barcode + serial + standard`, reusing **i-TEK's lifted production
encoder-decoder** (SGTIN-96 / TataGID / i-TEK non-standard). Third use of the swap-seam pattern
(after `Device` and `EventLog`).

## The split (ADR-0006, refined)
- **Compute the EPC** = engine's **Commission pillar-op** → this seam (`RealEncoder`).
- **Write it to the tag** = the **device's** job (`device.write(epcs)`).

The engine selects the algorithm from config (`Workflow.encodingStandard`, e.g. `gs1-ean13` → `retailgtin`).

## Files
- `src/encoder.js` — the `Encoder` seam + `RealEncoder` (wraps the lifted lib; `computeEpc`, `decode`, `algorithms`).
- `vendor/` — the **compiled** lift of `@garudanextgen/encoder-decoder` (CommonJS; scoped via `vendor/package.json`). See `vendor/PROVENANCE.md`. Do not hand-edit.

## Verify
`cd ../engine && node src/run.js` asserts EPCs are real SGTIN-96 (24 hex, header `30`), serialised distinct per item,
and decode round-trips to the EAN.
