@derwinjs/db 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/project-profile-store.d.ts +31 -0
- package/dist/project-profile-store.d.ts.map +1 -0
- package/dist/project-profile-store.js +156 -0
- package/dist/project-profile-store.js.map +1 -0
- package/dist/rag-retriever.d.ts +44 -0
- package/dist/rag-retriever.d.ts.map +1 -0
- package/dist/rag-retriever.js +177 -0
- package/dist/rag-retriever.js.map +1 -0
- package/dist/scripts/smoke-auto-fix.js +2 -0
- package/dist/scripts/smoke-auto-fix.js.map +1 -1
- package/dist/scripts/smoke-learning-loop.js +2 -0
- package/dist/scripts/smoke-learning-loop.js.map +1 -1
- package/dist/scripts/smoke-seed-lifeline-profile.d.ts +25 -0
- package/dist/scripts/smoke-seed-lifeline-profile.d.ts.map +1 -0
- package/dist/scripts/smoke-seed-lifeline-profile.js +130 -0
- package/dist/scripts/smoke-seed-lifeline-profile.js.map +1 -0
- package/package.json +5 -4
- package/prisma/migrations/20260506180000_enable_pgvector_and_vector_column/migration.sql +12 -0
- package/prisma/schema.prisma +10 -7
- package/prisma/seed.ts +52 -70
- package/prisma-client/edge.js +3 -4
- package/prisma-client/index-browser.js +0 -1
- package/prisma-client/index.d.ts +0 -80
- package/prisma-client/index.js +3 -4
- package/prisma-client/package.json +1 -1
- package/prisma-client/schema.prisma +10 -7
- package/prisma-client/wasm.js +0 -1
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
// 2. A multi-project broken-fixture E2E that asserts isolation
|
|
12
12
|
// (added in Sprint 13 / QAP-130).
|
|
13
13
|
//
|
|
14
|
-
// pgvector convention:
|
|
15
|
-
//
|
|
16
|
-
//
|
|
14
|
+
// pgvector convention: Sprint 5 Phase 1 enabled the pgvector extension and
|
|
15
|
+
// migrated `RAGCorpus.embedding` to `vector(1536)`. The column is typed as
|
|
16
|
+
// `Unsupported("vector(1536)")` because Prisma 5.22.0 has no native vector
|
|
17
|
+
// type — reads/writes use raw SQL via `$queryRaw` / `$executeRaw`. The HNSW
|
|
18
|
+
// index with `vector_cosine_ops` lives in the migration SQL.
|
|
17
19
|
//
|
|
18
20
|
// Multi-schema: every model + enum is in the `derwin` Postgres schema (not
|
|
19
21
|
// `public`). This isolates Derwin's tables from each consumer's existing
|
|
@@ -494,16 +496,17 @@ model ClassificationTrust {
|
|
|
494
496
|
}
|
|
495
497
|
|
|
496
498
|
// Successful past fixes used as in-context examples for new dispatches.
|
|
497
|
-
// Embedding column is
|
|
499
|
+
// Embedding column is `vector(1536)` (pgvector); Sprint 5 Phase 1 enabled the
|
|
500
|
+
// extension and migrated from `Bytes?`. See file header for query convention.
|
|
498
501
|
model RAGCorpus {
|
|
499
502
|
id String @id @default(cuid())
|
|
500
503
|
projectId String
|
|
501
504
|
classification String
|
|
502
505
|
surface SurfaceCategory
|
|
503
506
|
|
|
504
|
-
promptText String
|
|
505
|
-
diff String
|
|
506
|
-
embedding
|
|
507
|
+
promptText String @db.Text // the prompt that produced the fix
|
|
508
|
+
diff String @db.Text // the unified diff that worked
|
|
509
|
+
embedding Unsupported("vector(1536)")? // pgvector — Sprint 5 Phase 1 enabled the extension. Queries via raw SQL because Prisma 5.22.0 doesn't have native vector type support.
|
|
507
510
|
|
|
508
511
|
fixAttemptId String // back-reference to the source attempt
|
|
509
512
|
outcomeQuality Float // priority weight; declines if later usage shows problems
|
package/prisma-client/wasm.js
CHANGED