build(intake): add the Anthropic SDK and warn when its key is absent (#223)

Both packages go in dependencies rather than devDependencies. The final Docker stage installs with --omit=dev, so the wrong section produces a container that fails on the first submission and nowhere else — which is how sharp went wrong in #226.

ANTHROPIC_API_KEY is a warning, not a requirement. Absent, the container still boots and a submission still arrives, keeps its photos and waits in the queue undrafted. The photos are often the only copy of an item no longer in the sender's hands, so losing a consignment to an expired key would be a worse outcome than an item arriving without its description written. Silence would be wrong too: an operator who believes drafting is on and finds every item undrafted has nothing to tell them why.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-31 19:25:49 -05:00
co-authored by Claude Opus 5
parent 94e4f8c98a
commit 747ed2d00a
4 changed files with 118 additions and 3 deletions
+3 -1
View File
@@ -27,6 +27,7 @@
"migrate:create": "node-pg-migrate create --migration-file-language js"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.122.0",
"@types/markdown-it": "^14.2.0",
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.6",
@@ -39,7 +40,8 @@
"node-pg-migrate": "^7.6.1",
"nodemailer": "^6.9.14",
"pg": "^8.12.0",
"sharp": "^0.35.4"
"sharp": "^0.35.4",
"zod": "^4.5.4"
},
"devDependencies": {
"@eslint/js": "^9.39.5",