Files
CatoandClaude 380a31be95 Quick check reads PDFs; a scored deadline eval set; docs truth (#183)
* feat(intake): PDF on the quick check, and a deadline eval set

- /api/extract-pdf reads a PDF's text layer on the server (unpdf, %PDF magic
  check, 10 MB, 10 pages, text capped at MAX_TEXT). Nothing stored or logged.
  Scans answer scanned_pdf; the page then offers the photo picker.
- One file input takes a PDF or photos; the text flows into the letter box and
  the existing redaction and analyze path. Messages in en, de, fr, it.
- eval/letters: 17 synthetic Swiss letters (de, fr, en) with expected
  deadlines; eval/pdf: text and image-only PDFs; `pnpm eval:deadlines` scores
  stored replies offline, or live with --url on the free chain.
- Docs: README quick-check/matter line, ROADMAP ticks, CHANGELOG 2026-12-02,
  .env.example host path.

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(eval): optional private letter set, scored separately

--private <dir> / CAUSIUS_EVAL_PRIVATE_DIR (default
/opt/causius/shared/eval-private). Absent: "private set: not present,
skipped". Present: "private: N/M (x%)" and pass/fail by position only; no ids,
names, quotes or dates are printed. eval-private/ and eval/private/ ignored.

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(eval): precision, recall and false-invention rate; answer key for the private set

Most letters correctly have no deadline, so each is scored true negative,
false invention, true positive, miss or wrong date. Ranges accept any date in
them. Private set reads answers.json and letters/*.txt and prints only counts,
metrics and pass/fail by position. Four more synthetic traps: open-ended
suspension risk, amount with no date, spend-cap reset, 2-3 working days.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-03 01:55:56 +01:00

58 lines
1.8 KiB
JSON

{
"name": "causius",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"verify": "pnpm run type-check && pnpm run lint && pnpm run test && node --test scripts/account-mail-maintenance.test.mjs",
"test": "vitest run",
"check:analyze": "vitest run --config vitest.live.config.mts live/analyze.live.ts",
"check:agent": "vitest run --config vitest.live.config.mts live/agent.live.ts",
"eval:deadlines": "node eval/deadlines.mjs",
"role:grant": "node scripts/grant-role.mjs",
"check:law": "vitest run --config vitest.live.config.mts live/law.live.ts"
},
"packageManager": "pnpm@11.25.0",
"dependencies": {
"@better-auth/passkey": "^1.7.10",
"@bitbaum/accountkit": "^0.32.1",
"@bitbaum/ai-kit": "^1.31.0",
"@bitbaum/bip-kit": "^0.10.0",
"@bitbaum/chatkit": "^0.45.0",
"@bitbaum/design-tokens": "^1.7.1",
"@bitbaum/limitkit": "^0.2.1",
"@bitbaum/mail-kit": "^0.4.0",
"@bitbaum/searchkit": "^0.2.3",
"better-auth": "^1.7.10",
"drizzle-orm": "^0.45.4",
"listkit": "npm:@bitbaum/listkit@^0.2.2",
"next": "16.4.6",
"next-intl": "^4.14.9",
"pg": "^8.23.1",
"react": "19.2.4",
"react-dom": "19.2.4",
"unpdf": "^1.8.1",
"zod": "^4.6.6"
},
"devDependencies": {
"@electric-sql/pglite": "^0.5.8",
"@tailwindcss/postcss": "^4",
"@types/node": "^26.6.4",
"@types/pg": "^8.23.1",
"@types/react": "^19",
"@types/react-dom": "^19",
"drizzle-kit": "^0.31.11",
"eslint": "^10.12.0",
"eslint-config-next": "16.4.6",
"playwright": "1.63.0",
"tailwindcss": "^4",
"typescript": "^6.0.3",
"vite": "8.3.4",
"vitest": "^4.1.11"
}
}