{"_id":"@aidran/db","_rev":"5-979414848b723c68fd3faa4a55f5a57e","name":"@aidran/db","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@aidran/db","version":"0.1.0","keywords":["aidran","discourse-intelligence","drizzle","postgres","schema","typescript"],"author":{"name":"AIDRAN contributors"},"license":"Apache-2.0","_id":"@aidran/db@0.1.0","maintainers":[{"name":"joshweaver","email":"josh@aidran.ai"}],"homepage":"https://github.com/AIDRAN/aidran#readme","bugs":{"url":"https://github.com/AIDRAN/aidran/issues"},"dist":{"shasum":"687c82ba31d181e2eff7a8bfe5480fe98ecafdea","tarball":"https://registry.npmjs.org/@aidran/db/-/db-0.1.0.tgz","fileCount":32,"integrity":"sha512-SGvc88bjgJyDjI0QEZjWhWNhvfkR+8atDHj42p+5OPeqqurDoxsqD9fBT13fNLjCtdpVkNy2MGa2rdaccqyMdg==","signatures":[{"sig":"MEUCIQC5JoSIN4cXg9ANdOO7GflGi1nCZ57LyWAvGlaTjj2TWgIgI18mQyMx3JvkN68GgBR9E492EgXyJ0StA5J72V9YjXE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aidran%2fdb@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":293056},"main":"./dist/index.js","type":"module","_from":"file:aidran-db-0.1.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"}},"scripts":{"build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"joshweaver","email":"josh@aidran.ai"},"_resolved":"/tmp/c4d6c52a685b661c21c8f66b0394054e/aidran-db-0.1.0.tgz","_integrity":"sha512-SGvc88bjgJyDjI0QEZjWhWNhvfkR+8atDHj42p+5OPeqqurDoxsqD9fBT13fNLjCtdpVkNy2MGa2rdaccqyMdg==","repository":{"url":"git+https://github.com/AIDRAN/aidran.git","type":"git","directory":"packages/db"},"_npmVersion":"10.9.8","description":"AIDRAN — Drizzle ORM schemas for the corpus tables (records, analysis, signals, editorial, search-sync). Public reference; production system uses additional tables not included here.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"pg":"^8.13.0","postgres":"^3.4.0","drizzle-orm":"^0.36.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.9.0"},"_npmOperationalInternal":{"tmp":"tmp/db_0.1.0_1779575455180_0.18228100763564448","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aidran/db","version":"0.2.0","keywords":["aidran","discourse-intelligence","drizzle","postgres","schema","typescript"],"author":{"name":"AIDRAN contributors"},"license":"Apache-2.0","_id":"@aidran/db@0.2.0","maintainers":[{"name":"joshweaver","email":"josh@aidran.ai"}],"homepage":"https://github.com/AIDRAN/aidran#readme","bugs":{"url":"https://github.com/AIDRAN/aidran/issues"},"dist":{"shasum":"3511a3cd2b4317de9dcb052138cd8b3c410de888","tarball":"https://registry.npmjs.org/@aidran/db/-/db-0.2.0.tgz","fileCount":39,"integrity":"sha512-F4IS3wzFq4cmn6CK0UwRSw50i6vQqR7EabnOaTiyU3sAefacUNbLo0kCIBVdQ4vnEMGCEURyyO1EyI33nt1T9A==","signatures":[{"sig":"MEYCIQDirXw1Ur1qKzGcfXelSDkj0fRUCN/2I7BcJeFsbWnHxgIhAJuZcMc6FOYeUbLx5ccfXEBm7Y/W9JDWeGpNKcbj+2/Y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aidran%2fdb@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":435378},"main":"./dist/index.js","type":"module","_from":"file:aidran-db-0.2.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"},"./migrations-path":{"types":"./dist/migrations-path.d.ts","import":"./dist/migrations-path.js"}},"scripts":{"build":"tsc","generate":"tsc && drizzle-kit generate","typecheck":"tsc --noEmit"},"_npmUser":{"name":"joshweaver","email":"josh@aidran.ai"},"_resolved":"/tmp/c624d6c6a127e4213b35a64825744cd5/aidran-db-0.2.0.tgz","_integrity":"sha512-F4IS3wzFq4cmn6CK0UwRSw50i6vQqR7EabnOaTiyU3sAefacUNbLo0kCIBVdQ4vnEMGCEURyyO1EyI33nt1T9A==","repository":{"url":"git+https://github.com/AIDRAN/aidran.git","type":"git","directory":"packages/db"},"_npmVersion":"10.9.8","description":"AIDRAN — Drizzle ORM schemas plus generated SQL migrations for the corpus tables (records, analysis, signals, editorial, search-sync). Public reference; production system uses additional tables not included here.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"pg":"^8.13.0","postgres":"^3.4.0","drizzle-orm":"^0.36.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.9.0","drizzle-kit":"^0.28.0"},"_npmOperationalInternal":{"tmp":"tmp/db_0.2.0_1779576724740_0.3102667939995778","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aidran/db","version":"0.3.0","keywords":["aidran","discourse-intelligence","drizzle","postgres","schema","typescript"],"author":{"name":"AIDRAN contributors"},"license":"Apache-2.0","_id":"@aidran/db@0.3.0","maintainers":[{"name":"joshweaver","email":"josh@aidran.ai"}],"homepage":"https://github.com/AIDRAN/aidran#readme","bugs":{"url":"https://github.com/AIDRAN/aidran/issues"},"dist":{"shasum":"8d9478cc305d028996dee1584e8a5f3046c4fcbe","tarball":"https://registry.npmjs.org/@aidran/db/-/db-0.3.0.tgz","fileCount":39,"integrity":"sha512-1iB9D7ePGQpvmJ4Ag6rqBQnuWvhnIP6wDL21evlJzHAXnT26O9tJEKpgS2dpZiLAb1vIajK6j9+Mw8N0EYjXYA==","signatures":[{"sig":"MEUCIQDJU7GUgxffRtwk3u7HetUw9Vtnp6MB9kuAt+groI3R2AIgIGj3+4tUbb1J+ZWSKriEMc/G3G1MTzg7ym6W9P8nkOA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aidran%2fdb@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":435378},"main":"./dist/index.js","type":"module","_from":"file:aidran-db-0.3.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"},"./migrations-path":{"types":"./dist/migrations-path.d.ts","import":"./dist/migrations-path.js"}},"scripts":{"build":"tsc","generate":"tsc && drizzle-kit generate","typecheck":"tsc --noEmit"},"_npmUser":{"name":"joshweaver","email":"josh@aidran.ai"},"_resolved":"/tmp/415bfe2e0ab52b6a1bb6339cb2dfdb2a/aidran-db-0.3.0.tgz","_integrity":"sha512-1iB9D7ePGQpvmJ4Ag6rqBQnuWvhnIP6wDL21evlJzHAXnT26O9tJEKpgS2dpZiLAb1vIajK6j9+Mw8N0EYjXYA==","repository":{"url":"git+https://github.com/AIDRAN/aidran.git","type":"git","directory":"packages/db"},"_npmVersion":"10.9.8","description":"AIDRAN — Drizzle ORM schemas plus generated SQL migrations for the corpus tables (records, analysis, signals, editorial, search-sync). Public reference; production system uses additional tables not included here.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"pg":"^8.13.0","postgres":"^3.4.0","drizzle-orm":"^0.36.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.9.0","drizzle-kit":"^0.28.0"},"_npmOperationalInternal":{"tmp":"tmp/db_0.3.0_1779577142197_0.9504696580631367","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@aidran/db","version":"0.4.0","keywords":["aidran","discourse-intelligence","drizzle","postgres","schema","typescript"],"author":{"name":"AIDRAN contributors"},"license":"Apache-2.0","_id":"@aidran/db@0.4.0","maintainers":[{"name":"joshweaver","email":"josh@aidran.ai"}],"homepage":"https://github.com/AIDRAN/aidran#readme","bugs":{"url":"https://github.com/AIDRAN/aidran/issues"},"dist":{"shasum":"0c71fa3fce6082206b7edbaced8a7add726ac399","tarball":"https://registry.npmjs.org/@aidran/db/-/db-0.4.0.tgz","fileCount":39,"integrity":"sha512-HTGmVuXalXU/sudJjKzxKTitIxtqaGuAquKwkxj0+ZcckbyCAaFbJcJ7h/AU6y4pNNzuy5lfPnz1L+LnF2GiIw==","signatures":[{"sig":"MEUCIQDpb9Wz+rNH5n38LuQxsg9eLoTZvn8UYa27zL+sGSWxnQIgOtY7M7vSsZVah5dD0VBsiRGT2cfdRe+HKqTKU+XLiWM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aidran%2fdb@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":435378},"main":"./dist/index.js","type":"module","_from":"file:aidran-db-0.4.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"},"./migrations-path":{"types":"./dist/migrations-path.d.ts","import":"./dist/migrations-path.js"}},"scripts":{"build":"tsc","generate":"tsc && drizzle-kit generate","typecheck":"tsc --noEmit"},"_npmUser":{"name":"joshweaver","email":"josh@aidran.ai"},"_resolved":"/tmp/e6697a337b567a75d446e51fb1508678/aidran-db-0.4.0.tgz","_integrity":"sha512-HTGmVuXalXU/sudJjKzxKTitIxtqaGuAquKwkxj0+ZcckbyCAaFbJcJ7h/AU6y4pNNzuy5lfPnz1L+LnF2GiIw==","repository":{"url":"git+https://github.com/AIDRAN/aidran.git","type":"git","directory":"packages/db"},"_npmVersion":"10.9.8","description":"AIDRAN — Drizzle ORM schemas plus generated SQL migrations for the corpus tables (records, analysis, signals, editorial, search-sync). Public reference; production system uses additional tables not included here.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"pg":"^8.13.0","postgres":"^3.4.0","drizzle-orm":"^0.36.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.9.0","drizzle-kit":"^0.28.0"},"_npmOperationalInternal":{"tmp":"tmp/db_0.4.0_1779578101335_0.9767525532505401","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@aidran/db","version":"0.5.0","description":"AIDRAN — Drizzle ORM schemas plus generated SQL migrations for the corpus tables (records, analysis, signals, editorial, search-sync). Public reference; production system uses additional tables not included here.","keywords":["aidran","discourse-intelligence","drizzle","postgres","schema","typescript"],"homepage":"https://github.com/AIDRAN/aidran#readme","bugs":{"url":"https://github.com/AIDRAN/aidran/issues"},"repository":{"type":"git","url":"git+https://github.com/AIDRAN/aidran.git","directory":"packages/db"},"license":"Apache-2.0","author":{"name":"AIDRAN contributors"},"type":"module","sideEffects":false,"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"},"./migrations-path":{"types":"./dist/migrations-path.d.ts","import":"./dist/migrations-path.js"}},"dependencies":{"drizzle-orm":"^0.36.0","pg":"^8.13.0","postgres":"^3.4.0"},"devDependencies":{"@types/node":"^22.9.0","drizzle-kit":"^0.28.0","typescript":"^5.7.2"},"publishConfig":{"access":"public","provenance":true},"engines":{"node":">=22.0.0"},"scripts":{"typecheck":"tsc --noEmit","build":"tsc","generate":"tsc && drizzle-kit generate"},"_id":"@aidran/db@0.5.0","_integrity":"sha512-SYzjkQfGIWoffAxtCZWipNbm8fs4MU/4QsyclCjvkbjpsrG/t7y5nYFW8Pzp/pMPpk0tbqE426zaWWxJjykgiA==","_resolved":"/tmp/d4471b5f10509d8557a7c21fda96fb9f/aidran-db-0.5.0.tgz","_from":"file:aidran-db-0.5.0.tgz","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-SYzjkQfGIWoffAxtCZWipNbm8fs4MU/4QsyclCjvkbjpsrG/t7y5nYFW8Pzp/pMPpk0tbqE426zaWWxJjykgiA==","shasum":"dc86206df3c4abf89586f7086442ef9cb27da6b7","tarball":"https://registry.npmjs.org/@aidran/db/-/db-0.5.0.tgz","fileCount":39,"unpackedSize":435378,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aidran%2fdb@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDqqbtQo0kqLnoH8+h9y0eQTAmnrIGB5i7VxnhD473rzQIhALxVm+uJ4y5RBZFRqBQpgEyZGt0tT/dElgDyilVGtt95"}]},"_npmUser":{"name":"joshweaver","email":"josh@aidran.ai"},"directories":{},"maintainers":[{"name":"joshweaver","email":"josh@aidran.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/db_0.5.0_1779578298595_0.5761275498880567"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-23T22:30:55.023Z","modified":"2026-05-23T23:18:19.120Z","0.1.0":"2026-05-23T22:30:55.309Z","0.2.0":"2026-05-23T22:52:04.881Z","0.3.0":"2026-05-23T22:59:02.341Z","0.4.0":"2026-05-23T23:15:01.488Z","0.5.0":"2026-05-23T23:18:18.804Z"},"bugs":{"url":"https://github.com/AIDRAN/aidran/issues"},"author":{"name":"AIDRAN contributors"},"license":"Apache-2.0","homepage":"https://github.com/AIDRAN/aidran#readme","keywords":["aidran","discourse-intelligence","drizzle","postgres","schema","typescript"],"repository":{"type":"git","url":"git+https://github.com/AIDRAN/aidran.git","directory":"packages/db"},"description":"AIDRAN — Drizzle ORM schemas plus generated SQL migrations for the corpus tables (records, analysis, signals, editorial, search-sync). Public reference; production system uses additional tables not included here.","maintainers":[{"name":"joshweaver","email":"josh@aidran.ai"}],"readme":"# @aidran/db\n\nDrizzle ORM schemas for the [AIDRAN](https://aidran.ai) discourse-intelligence corpus.\n\nThis package exposes the table definitions and inferred TypeScript types for the public-reference subset of AIDRAN's database: records, analysis, signals, editorial, and search-sync. Bring your own Postgres connection; this package does not ship a client, connection pool, or migration tooling.\n\n## Install\n\n```sh\npnpm add @aidran/db drizzle-orm pg\n# or\nnpm install @aidran/db drizzle-orm pg\n```\n\n## Usage\n\n```ts\nimport { drizzle } from 'drizzle-orm/node-postgres';\nimport { Pool } from 'pg';\nimport * as schema from '@aidran/db';\nimport type { Database, NewRecord } from '@aidran/db';\n\nconst pool = new Pool({ connectionString: process.env.DATABASE_URL });\nconst db: Database = drizzle(pool, { schema });\n\nawait db.insert(schema.records).values({ /* NewRecord */ });\n```\n\nThe `Database` type is a `NodePgDatabase<Schema>` with the full schema attached, so query results are fully typed without manual annotation at call sites.\n\n## Scope\n\nSchemas published here:\n\n- `records` — ingested raw items with source, cursor, and normalization metadata\n- `analysis` — per-record enrichment (embeddings, classifications, signals derived later)\n- `signals` — evidence-joined signal events with citations back to records\n- `editorial` — story chains (append-only, versioned)\n- `search-sync` — denormalized projection used by the search index\n\nTables and columns used in production but not part of the public reference (prompt exemplars, rubric calibration tables, learned-pattern stores, etc.) are intentionally omitted. See [`NOTICE.md`](https://github.com/AIDRAN/aidran/blob/main/NOTICE.md) in the repo root for the full list.\n\nYou cannot regenerate AIDRAN's editorial output from this schema alone. That's intentional.\n\n## License\n\nApache-2.0. See [`LICENSE`](./LICENSE).\n","readmeFilename":"README.md"}