New funders/funder_grants schema + ingest990pf monthly workflow: IRS BMF state file discovers NH private foundations (747), e-file index CSVs select their latest 990-PF filings, batch ZIPs stream through fflate (4/run cap, most-hits-first, deferred logged), grants-paid rows land in funder_grants, and funders with >=2 NH grants synthesize rolling grant rows (source irs_990pf, funder_ein linked) that flow through the existing embed+match pipeline. Scoring v2: funderPrecedentSubscore tiers repeated in-state giving (1/3/5/10 -> 8/15/20/25); easy win = >=65 total AND >=12 precedent (plan's precedent floor); scale is the full 0-100. Rolling deadlines pass the runway gate. Retrieval computes per-funder in-state counts and exposes funder_ein. Lead-quality gates from the first precedent run's failures: candidate orgs exclude NTEE T* grantmakers; self-matches gated by EIN + normalized name (NHDOJ registers foundations as charities, several without resolved EINs — the first run's top 'leads' were foundations matched to themselves). Live: ~6.5GB of IRS batches processed, 2,766 grants-paid rows, 123 synthesized foundation grants, 89 easy wins across 27 orgs, credible top-10 (AIDS Response-Seacoast -> Foundation for Seacoast Health, 25/25 precedent). 153 tests green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
38 lines
1.0 KiB
JSON
38 lines
1.0 KiB
JSON
{
|
|
"name": "@novelpad/outreach-worker",
|
|
"packageManager": "yarn@4.5.0",
|
|
"type": "module",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "node --env-file=.env --env-file-if-exists=.env.local --import tsx/esm ./src/main.ts",
|
|
"build": "esbuild src/main.ts --bundle --platform=node --format=esm --outfile=build/main.js --packages=external",
|
|
"start": "node ./build/main.js",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run"
|
|
},
|
|
"imports": {
|
|
"#~/*": "./src/*"
|
|
},
|
|
"dependencies": {
|
|
"@dbos-inc/dbos-sdk": "4.17.6",
|
|
"@dbos-inc/drizzle-datasource": "4.17.6",
|
|
"@novelpad/outreach-ai": "workspace:^",
|
|
"@novelpad/outreach-core": "workspace:^",
|
|
"drizzle-orm": "0.44.6",
|
|
"fast-xml-parser": "^4.5.0",
|
|
"fflate": "^0.8.2",
|
|
"pdfjs-dist": "^4.10.38",
|
|
"pg": "8.20.0",
|
|
"tsx": "^4.19.2"
|
|
},
|
|
"devDependencies": {
|
|
"@novelpad/config": "workspace:^",
|
|
"@types/node": "^22",
|
|
"@types/pg": "8.20.0",
|
|
"esbuild": "^0.24.0",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^3.2.4"
|
|
}
|
|
}
|