@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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-f5c66233402c066a01e37df825f4f3735dea515740b8083ee9c9d07df826d7e2",
2
+ "name": "prisma-client-066e8161e24d11a80c9958a72d4d5ce33cf4b1ec59b2112c45a8e8419025acf5",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -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: `embedding Bytes?` on RAGCorpus is the v1 storage type.
15
- // QAP-076 (Sprint 7 — RAG corpus add) switches it to a pgvector `vector(1536)`
16
- // column once the extension is enabled in QAP-036.
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 Bytes for v1; QAP-076 (Sprint 7) switches to pgvector.
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 @db.Text // the prompt that produced the fix
505
- diff String @db.Text // the unified diff that worked
506
- embedding Bytes? // for semantic search
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
@@ -285,7 +285,6 @@ exports.Prisma.RAGCorpusScalarFieldEnum = {
285
285
  surface: 'surface',
286
286
  promptText: 'promptText',
287
287
  diff: 'diff',
288
- embedding: 'embedding',
289
288
  fixAttemptId: 'fixAttemptId',
290
289
  outcomeQuality: 'outcomeQuality',
291
290
  addedAt: 'addedAt'