Closes gap-analysis v2 §7.1 (no FIN-link adapter; SWIFT generators
produce strings but no transport) + §10.6 (stand up sandbox transport).
- services/finLink/sandbox.ts — in-process FIN-link sandbox.
Accepts POST /dispatch with a SWIFT/ISO payload, assigns a FIN
reference, and advances messages deterministically through
received -> acknowledged -> accepted -> settled (with reject as a
terminal fork). Optional webhook per-message (x-fin-sandbox-signature
header, HMAC-SHA256). Timer-driven auto-progress opt-in via
startAutoProgress().
- services/finLink/client.ts — two client adapters:
createHttpFinLinkClient(baseUrl) - for the live router
createInProcessFinLinkClient() - for unit tests that skip
the HTTP hop
getFinLinkClient() picks HTTP when FIN_SANDBOX_URL is set, else
falls back to in-process.
- services/finLink/index.ts — public surface.
- src/index.ts — mounts /fin-sandbox only when
FIN_SANDBOX_ENABLED=true; off by default to keep prod surface clean.
- tests/unit/finLinkSandbox.test.ts — 12 tests covering lifecycle,
rejection, listing, signature determinism, HTTP endpoints
(dispatch/advance/messages/filtering), and both client adapters
(including a live ephemeral-port HTTP round-trip).
- Verification: tsc --noEmit clean; full jest 92/92 passing
(8 suites).