Stand up the HTTP surface Prospector calls (this app had no listening port). Bun
service: bearer-auth (MRNUMBER_SERVICE_TOKEN, constant-time) POST /api/screening/requests
{phone, ref} → 202 {accepted, id}, enqueued in a durable SQLite queue; a single serial
worker (one Android box) drains by invoking mr_lookup.py and records the people-service
signal. GET /api/screening/requests/:id returns the row; GET /health is open. Crash-safe
(requeues stale in-flight rows on restart). 7 bun tests + typecheck; smoke-tested end to
end (auth 401, enqueue 202, drain→verdict, invalid-phone 400).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
16 lines
441 B
JSON
16 lines
441 B
JSON
{
|
|
"name": "mr-number-service",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Inbound trigger HTTP service for mr-number — POST /api/screening/requests → durable queue → serial worker driving mr_lookup.py.",
|
|
"scripts": {
|
|
"start": "bun run index.ts",
|
|
"test": "bun test",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "latest",
|
|
"typescript": "^5.4.0"
|
|
}
|
|
}
|