2026-02-18 13:20:52 +00:00
|
|
|
{
|
2026-04-12 23:59:20 +00:00
|
|
|
"name": "horizon",
|
2026-02-18 13:20:52 +00:00
|
|
|
"version": "0.1.0",
|
|
|
|
|
"private": true,
|
|
|
|
|
"scripts": {
|
|
|
|
|
"dev": "next dev",
|
|
|
|
|
"dev:webpack": "next dev --webpack",
|
|
|
|
|
"dev:stop": "pkill -TERM -f 'next-server' ; pkill -TERM -f 'next dev' ; pkill -9 -f 'next-server' 2>/dev/null ; rm -f .next/dev/lock",
|
|
|
|
|
"dev:restart": "npm run dev:stop && sleep 2 && npm run dev",
|
|
|
|
|
"build": "next build",
|
|
|
|
|
"start": "next start",
|
|
|
|
|
"lint": "eslint",
|
|
|
|
|
"test": "jest",
|
|
|
|
|
"test:watch": "jest --watch",
|
|
|
|
|
"test:coverage": "jest --coverage"
|
|
|
|
|
},
|
|
|
|
|
"prisma": {
|
|
|
|
|
"seed": "tsx prisma/seed.ts"
|
|
|
|
|
},
|
|
|
|
|
"dependencies": {
|
|
|
|
|
"@auth/prisma-adapter": "^2.11.1",
|
2026-04-10 13:50:04 +00:00
|
|
|
"@dnd-kit/core": "^6.3.1",
|
|
|
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
|
|
|
"@dnd-kit/utilities": "^3.2.2",
|
feat(imageright): two-pass metadata + content-inspection audit model
Replace the single-pass, exact-match-only audit with the two-pass model from
imageright_claim_review_audit_methodology.md, applied across all 10 SHAPE
checklist items:
- TaskAudit.status (3-state) -> TaskAuditClassification (7-state): PASS,
PASS_WITH_NAMING_EXCEPTION, MANUAL_REVIEW, FAIL_MISSING, FAIL_LATE,
FAIL_WRONG_ARTIFACT, NOT_APPLICABLE. New columns for confidence score,
evidence bucket, naming-exception/manual-review flags, msg subject/sent
date, attachment filenames, a human-readable evidence summary, and the
full scoring signal trail (matched_signals).
- New audit-scoring.ts: weighted metadata + content scoring per the
methodology's table, generalized to use each spec item's own
keywords/docTypes rather than a hardcoded claim-specific list.
- New content-inspector.ts: downloads and parses `.msg` (subject, sender,
sent date, body, attachments via @kenjiuno/msgreader), `.xlsx` (sheet
names/cell text via xlsx), and `.pdf` (text-layer only via pdf-parse,
no OCR) — recursing one level into email attachments.
- ImageRightClient: new getPageImageContent() using the v2 REST API
(`/api/v2/pages/{pageId}/images/{imageId}/{version}`) — the only endpoint
that returns raw file bytes; v1 only exposes JSON metadata. Verified live
against a real .msg (correct OLE2 signature, exact byte-size match).
- audit-matching.ts: matchesKeywords is now plural/singular-tolerant
(normalizeForMatch) — fixes false negatives like "Open Claims Review" not
matching keyword "CLAIM REVIEW". Added docTypesToExtensions, mapping the
spec's generic doc_types labels to real file extensions (evidence shows
these labels describe file format, not ImageRight's document-type
taxonomy).
- audit-engine.ts: auditSpecItem() replaces findBestMatch() — scores every
in-window candidate, falls back to strict exact-match (fast path, no
content download) when possible, otherwise deep-inspects the top
candidate and only confirms PASS_WITH_NAMING_EXCEPTION when content
positively confirms (not merely "score didn't decrease"). Also fixes a
real accuracy bug: unscoped whole-file document search silently truncates
at ~1000 docs on high-volume accounts (verified live) — ALL_TIME spec
items now iterate every folder instead (findDocumentsSafe).
- UI/API updated for the new classification taxonomy and evidence fields.
Verified end-to-end live against the methodology doc's own worked example
(American Marine Express, Inc., IR document 12884779): real API calls, real
.msg download/parse (found both a signature image and the actual Excel
attachment), correctly classified PASS_WITH_NAMING_EXCEPTION.
68 new/updated tests covering scoring, content parsing (real xlsx bytes;
mocked msgreader/pdf-parse), fuzzy keyword matching, and all 6+1
classification outcomes via auditSpecItem with a fake ImageRight client.
Known follow-up (not resolved here): this client's stored Client.renewalDate
(2026-10-07) and PolicyGroup renewal date (2027-03-02) don't match the
2026-04-04 renewal date used in the methodology doc's own example — worth
reconciling separately, since it determines which target-date windows the
live app actually computes for this client.
2026-07-08 14:36:23 +00:00
|
|
|
"@kenjiuno/msgreader": "^1.28.0",
|
2026-07-16 22:52:41 +00:00
|
|
|
"@napi-rs/canvas": "^1.0.2",
|
2026-02-18 13:20:52 +00:00
|
|
|
"@prisma/adapter-pg": "^7.2.0",
|
|
|
|
|
"@prisma/client": "^7.2.0",
|
|
|
|
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
|
|
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
|
|
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
|
|
|
"@radix-ui/react-label": "^2.1.8",
|
|
|
|
|
"@radix-ui/react-progress": "^1.1.8",
|
|
|
|
|
"@radix-ui/react-select": "^2.2.6",
|
|
|
|
|
"@radix-ui/react-slot": "^1.2.4",
|
|
|
|
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
|
|
|
"class-variance-authority": "^0.7.1",
|
|
|
|
|
"clsx": "^2.1.1",
|
|
|
|
|
"lucide-react": "^0.562.0",
|
|
|
|
|
"mssql": "^12.2.0",
|
|
|
|
|
"next": "16.1.4",
|
|
|
|
|
"next-auth": "^4.24.13",
|
|
|
|
|
"next-themes": "^0.4.6",
|
|
|
|
|
"node-cron": "^4.2.1",
|
feat(imageright): two-pass metadata + content-inspection audit model
Replace the single-pass, exact-match-only audit with the two-pass model from
imageright_claim_review_audit_methodology.md, applied across all 10 SHAPE
checklist items:
- TaskAudit.status (3-state) -> TaskAuditClassification (7-state): PASS,
PASS_WITH_NAMING_EXCEPTION, MANUAL_REVIEW, FAIL_MISSING, FAIL_LATE,
FAIL_WRONG_ARTIFACT, NOT_APPLICABLE. New columns for confidence score,
evidence bucket, naming-exception/manual-review flags, msg subject/sent
date, attachment filenames, a human-readable evidence summary, and the
full scoring signal trail (matched_signals).
- New audit-scoring.ts: weighted metadata + content scoring per the
methodology's table, generalized to use each spec item's own
keywords/docTypes rather than a hardcoded claim-specific list.
- New content-inspector.ts: downloads and parses `.msg` (subject, sender,
sent date, body, attachments via @kenjiuno/msgreader), `.xlsx` (sheet
names/cell text via xlsx), and `.pdf` (text-layer only via pdf-parse,
no OCR) — recursing one level into email attachments.
- ImageRightClient: new getPageImageContent() using the v2 REST API
(`/api/v2/pages/{pageId}/images/{imageId}/{version}`) — the only endpoint
that returns raw file bytes; v1 only exposes JSON metadata. Verified live
against a real .msg (correct OLE2 signature, exact byte-size match).
- audit-matching.ts: matchesKeywords is now plural/singular-tolerant
(normalizeForMatch) — fixes false negatives like "Open Claims Review" not
matching keyword "CLAIM REVIEW". Added docTypesToExtensions, mapping the
spec's generic doc_types labels to real file extensions (evidence shows
these labels describe file format, not ImageRight's document-type
taxonomy).
- audit-engine.ts: auditSpecItem() replaces findBestMatch() — scores every
in-window candidate, falls back to strict exact-match (fast path, no
content download) when possible, otherwise deep-inspects the top
candidate and only confirms PASS_WITH_NAMING_EXCEPTION when content
positively confirms (not merely "score didn't decrease"). Also fixes a
real accuracy bug: unscoped whole-file document search silently truncates
at ~1000 docs on high-volume accounts (verified live) — ALL_TIME spec
items now iterate every folder instead (findDocumentsSafe).
- UI/API updated for the new classification taxonomy and evidence fields.
Verified end-to-end live against the methodology doc's own worked example
(American Marine Express, Inc., IR document 12884779): real API calls, real
.msg download/parse (found both a signature image and the actual Excel
attachment), correctly classified PASS_WITH_NAMING_EXCEPTION.
68 new/updated tests covering scoring, content parsing (real xlsx bytes;
mocked msgreader/pdf-parse), fuzzy keyword matching, and all 6+1
classification outcomes via auditSpecItem with a fake ImageRight client.
Known follow-up (not resolved here): this client's stored Client.renewalDate
(2026-10-07) and PolicyGroup renewal date (2027-03-02) don't match the
2026-04-04 renewal date used in the methodology doc's own example — worth
reconciling separately, since it determines which target-date windows the
live app actually computes for this client.
2026-07-08 14:36:23 +00:00
|
|
|
"pdf-parse": "^2.4.5",
|
2026-02-18 13:20:52 +00:00
|
|
|
"pg": "^8.17.1",
|
|
|
|
|
"prisma": "^7.2.0",
|
|
|
|
|
"radix-ui": "^1.4.3",
|
|
|
|
|
"react": "19.2.3",
|
|
|
|
|
"react-dom": "19.2.3",
|
|
|
|
|
"sonner": "^2.0.7",
|
feat(imageright): two-pass metadata + content-inspection audit model
Replace the single-pass, exact-match-only audit with the two-pass model from
imageright_claim_review_audit_methodology.md, applied across all 10 SHAPE
checklist items:
- TaskAudit.status (3-state) -> TaskAuditClassification (7-state): PASS,
PASS_WITH_NAMING_EXCEPTION, MANUAL_REVIEW, FAIL_MISSING, FAIL_LATE,
FAIL_WRONG_ARTIFACT, NOT_APPLICABLE. New columns for confidence score,
evidence bucket, naming-exception/manual-review flags, msg subject/sent
date, attachment filenames, a human-readable evidence summary, and the
full scoring signal trail (matched_signals).
- New audit-scoring.ts: weighted metadata + content scoring per the
methodology's table, generalized to use each spec item's own
keywords/docTypes rather than a hardcoded claim-specific list.
- New content-inspector.ts: downloads and parses `.msg` (subject, sender,
sent date, body, attachments via @kenjiuno/msgreader), `.xlsx` (sheet
names/cell text via xlsx), and `.pdf` (text-layer only via pdf-parse,
no OCR) — recursing one level into email attachments.
- ImageRightClient: new getPageImageContent() using the v2 REST API
(`/api/v2/pages/{pageId}/images/{imageId}/{version}`) — the only endpoint
that returns raw file bytes; v1 only exposes JSON metadata. Verified live
against a real .msg (correct OLE2 signature, exact byte-size match).
- audit-matching.ts: matchesKeywords is now plural/singular-tolerant
(normalizeForMatch) — fixes false negatives like "Open Claims Review" not
matching keyword "CLAIM REVIEW". Added docTypesToExtensions, mapping the
spec's generic doc_types labels to real file extensions (evidence shows
these labels describe file format, not ImageRight's document-type
taxonomy).
- audit-engine.ts: auditSpecItem() replaces findBestMatch() — scores every
in-window candidate, falls back to strict exact-match (fast path, no
content download) when possible, otherwise deep-inspects the top
candidate and only confirms PASS_WITH_NAMING_EXCEPTION when content
positively confirms (not merely "score didn't decrease"). Also fixes a
real accuracy bug: unscoped whole-file document search silently truncates
at ~1000 docs on high-volume accounts (verified live) — ALL_TIME spec
items now iterate every folder instead (findDocumentsSafe).
- UI/API updated for the new classification taxonomy and evidence fields.
Verified end-to-end live against the methodology doc's own worked example
(American Marine Express, Inc., IR document 12884779): real API calls, real
.msg download/parse (found both a signature image and the actual Excel
attachment), correctly classified PASS_WITH_NAMING_EXCEPTION.
68 new/updated tests covering scoring, content parsing (real xlsx bytes;
mocked msgreader/pdf-parse), fuzzy keyword matching, and all 6+1
classification outcomes via auditSpecItem with a fake ImageRight client.
Known follow-up (not resolved here): this client's stored Client.renewalDate
(2026-10-07) and PolicyGroup renewal date (2027-03-02) don't match the
2026-04-04 renewal date used in the methodology doc's own example — worth
reconciling separately, since it determines which target-date windows the
live app actually computes for this client.
2026-07-08 14:36:23 +00:00
|
|
|
"tailwind-merge": "^3.4.0",
|
|
|
|
|
"xlsx": "^0.18.5"
|
2026-02-18 13:20:52 +00:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
|
|
|
|
"@tailwindcss/postcss": "^4",
|
|
|
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
|
|
|
"@testing-library/react": "^16.3.2",
|
|
|
|
|
"@testing-library/user-event": "^14.6.1",
|
|
|
|
|
"@types/jest": "^30.0.0",
|
|
|
|
|
"@types/mssql": "^9.1.9",
|
|
|
|
|
"@types/node": "^20",
|
|
|
|
|
"@types/node-cron": "^3.0.11",
|
|
|
|
|
"@types/pg": "^8.16.0",
|
|
|
|
|
"@types/react": "^19",
|
|
|
|
|
"@types/react-dom": "^19",
|
|
|
|
|
"babel-plugin-react-compiler": "1.0.0",
|
|
|
|
|
"eslint": "^9",
|
|
|
|
|
"eslint-config-next": "16.1.4",
|
|
|
|
|
"jest": "^30.2.0",
|
|
|
|
|
"jest-environment-jsdom": "^30.2.0",
|
|
|
|
|
"tailwindcss": "^4",
|
|
|
|
|
"tsx": "^4.21.0",
|
|
|
|
|
"tw-animate-css": "^1.4.0",
|
|
|
|
|
"typescript": "^5"
|
|
|
|
|
}
|
|
|
|
|
}
|