@creeperhost/modlens-mcp 1.6.0 → 1.6.1

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.
Files changed (89) hide show
  1. package/README.md +950 -938
  2. package/dist/cli.js +267 -267
  3. package/dist/generated/sqlite/internal/class.d.ts.map +1 -1
  4. package/dist/generated/sqlite/internal/class.js +4 -3
  5. package/dist/generated/sqlite/internal/class.js.map +1 -1
  6. package/dist/launcher.js +4 -1
  7. package/dist/launcher.js.map +1 -1
  8. package/dist/repositories/embeddings-sqlite.js +21 -21
  9. package/dist/repositories/embeddings.js +28 -28
  10. package/dist/repositories/mod.js +2 -2
  11. package/dist/search-adapter.js +51 -51
  12. package/dist/tools/compat-check.js +9 -9
  13. package/dist/tools/embed-registry.js +9 -9
  14. package/dist/tools/graphify.js +14 -14
  15. package/dist/tools/mc-fts.js +2 -2
  16. package/dist/tools/mixin-scan.d.ts +1 -1
  17. package/dist/tools/mixin-scan.js +16 -16
  18. package/dist/tools/version-diff.js +3 -3
  19. package/package.json +70 -62
  20. package/prisma/backends/schema.sqlite.prisma +215 -215
  21. package/prisma/schema.prisma +303 -303
  22. package/scripts/backup.mjs +151 -151
  23. package/scripts/check-atm10.mjs +27 -27
  24. package/scripts/check-sync.mjs +13 -13
  25. package/scripts/create-fts-index.mjs +50 -50
  26. package/scripts/enable-pgvector.mjs +90 -90
  27. package/scripts/enable-sqlite-vec.mjs +158 -158
  28. package/scripts/migrate-backend.mjs +188 -188
  29. package/scripts/migrate-embed-provenance.mjs +80 -80
  30. package/scripts/migrate-metadata-source.mjs +62 -62
  31. package/scripts/migrate-mod-source-files.mjs +67 -67
  32. package/scripts/post-update.mjs +77 -77
  33. package/scripts/verify-atm10.mjs +63 -63
  34. package/dist/access-flags.test.d.ts +0 -2
  35. package/dist/access-flags.test.d.ts.map +0 -1
  36. package/dist/access-flags.test.js +0 -189
  37. package/dist/access-flags.test.js.map +0 -1
  38. package/dist/fetch-utils.test.d.ts +0 -2
  39. package/dist/fetch-utils.test.d.ts.map +0 -1
  40. package/dist/fetch-utils.test.js +0 -133
  41. package/dist/fetch-utils.test.js.map +0 -1
  42. package/dist/mappings.test.d.ts +0 -2
  43. package/dist/mappings.test.d.ts.map +0 -1
  44. package/dist/mappings.test.js +0 -161
  45. package/dist/mappings.test.js.map +0 -1
  46. package/dist/processor.test.d.ts +0 -2
  47. package/dist/processor.test.d.ts.map +0 -1
  48. package/dist/processor.test.js +0 -629
  49. package/dist/processor.test.js.map +0 -1
  50. package/dist/search.test.d.ts +0 -2
  51. package/dist/search.test.d.ts.map +0 -1
  52. package/dist/search.test.js +0 -71
  53. package/dist/search.test.js.map +0 -1
  54. package/dist/security.test.d.ts +0 -2
  55. package/dist/security.test.d.ts.map +0 -1
  56. package/dist/security.test.js +0 -687
  57. package/dist/security.test.js.map +0 -1
  58. package/dist/tools/compat-check.test.d.ts +0 -2
  59. package/dist/tools/compat-check.test.d.ts.map +0 -1
  60. package/dist/tools/compat-check.test.js +0 -179
  61. package/dist/tools/compat-check.test.js.map +0 -1
  62. package/dist/tools/diagnostics.test.d.ts +0 -2
  63. package/dist/tools/diagnostics.test.d.ts.map +0 -1
  64. package/dist/tools/diagnostics.test.js +0 -168
  65. package/dist/tools/diagnostics.test.js.map +0 -1
  66. package/dist/tools/graphify.test.d.ts +0 -2
  67. package/dist/tools/graphify.test.d.ts.map +0 -1
  68. package/dist/tools/graphify.test.js +0 -39
  69. package/dist/tools/graphify.test.js.map +0 -1
  70. package/dist/tools/ingest.test.d.ts +0 -2
  71. package/dist/tools/ingest.test.d.ts.map +0 -1
  72. package/dist/tools/ingest.test.js +0 -340
  73. package/dist/tools/ingest.test.js.map +0 -1
  74. package/dist/tools/mod-tags.test.d.ts +0 -2
  75. package/dist/tools/mod-tags.test.d.ts.map +0 -1
  76. package/dist/tools/mod-tags.test.js +0 -75
  77. package/dist/tools/mod-tags.test.js.map +0 -1
  78. package/dist/tools/packtools.test.d.ts +0 -2
  79. package/dist/tools/packtools.test.d.ts.map +0 -1
  80. package/dist/tools/packtools.test.js +0 -99
  81. package/dist/tools/packtools.test.js.map +0 -1
  82. package/dist/tools/version-diff.test.d.ts +0 -2
  83. package/dist/tools/version-diff.test.d.ts.map +0 -1
  84. package/dist/tools/version-diff.test.js +0 -102
  85. package/dist/tools/version-diff.test.js.map +0 -1
  86. package/dist/validate.test.d.ts +0 -2
  87. package/dist/validate.test.d.ts.map +0 -1
  88. package/dist/validate.test.js +0 -73
  89. package/dist/validate.test.js.map +0 -1
package/package.json CHANGED
@@ -1,62 +1,70 @@
1
- {
2
- "name": "@creeperhost/modlens-mcp",
3
- "version": "1.6.0",
4
- "description": "MCP server for browsing, decompiling, and analyzing Minecraft mod JARs",
5
- "type": "module",
6
- "main": "dist/server.js",
7
- "bin": {
8
- "modlens-mcp": "dist/launcher.js"
9
- },
10
- "files": [
11
- "dist/",
12
- "prisma/",
13
- "scripts/",
14
- "package.json",
15
- "README.md"
16
- ],
17
- "scripts": {
18
- "postinstall": "prisma generate",
19
- "build": "npm run db:generate:sqlite && tsc && node scripts/build-template-db.mjs",
20
- "dev": "tsc --watch",
21
- "start": "node dist/server.js",
22
- "setup": "npm run build && node dist/setup.js",
23
- "test": "vitest run",
24
- "test:watch": "vitest",
25
- "db:generate": "prisma generate",
26
- "db:push": "prisma db push",
27
- "db:migrate": "prisma migrate dev",
28
- "db:setup": "prisma migrate deploy && node scripts/create-fts-index.mjs && node scripts/migrate-mod-source-files.mjs",
29
- "db:vector": "node scripts/enable-pgvector.mjs",
30
- "db:studio": "prisma studio",
31
- "db:push:sqlite": "prisma db push --schema prisma/backends/schema.sqlite.prisma",
32
- "db:generate:sqlite": "prisma generate --schema prisma/backends/schema.sqlite.prisma",
33
- "db:vector:sqlite": "node scripts/enable-sqlite-vec.mjs",
34
- "db:push:pglite": "prisma db push",
35
- "db:vector:pglite": "node scripts/enable-pgvector.mjs",
36
- "db:backup": "node scripts/backup.mjs",
37
- "update": "git pull && npm install && npm run build && node scripts/post-update.mjs"
38
- },
39
- "dependencies": {
40
- "@clack/prompts": "^1.4.0",
41
- "@modelcontextprotocol/sdk": "^1.10.0",
42
- "@prisma/adapter-better-sqlite3": "^6.0.0",
43
- "@prisma/client": "^6.0.0",
44
- "adm-zip": "^0.5.16",
45
- "better-sqlite3": "^9.0.0",
46
- "prisma": "^6.0.0",
47
- "smol-toml": "^1.6.1",
48
- "zod": "^3.23.8"
49
- },
50
- "devDependencies": {
51
- "@types/adm-zip": "^0.5.7",
52
- "@types/better-sqlite3": "^7.0.0",
53
- "@types/node": "^22.0.0",
54
- "typescript": "^5.6.0",
55
- "vitest": "^4.1.6"
56
- },
57
- "optionalDependencies": {
58
- "@electric-sql/pglite": "^0.2.0",
59
- "@prisma/adapter-pglite": "^6.0.0",
60
- "sqlite-vec": "^0.1.0"
61
- }
62
- }
1
+ {
2
+ "name": "@creeperhost/modlens-mcp",
3
+ "version": "1.6.1",
4
+ "description": "MCP server for browsing, decompiling, and analyzing Minecraft mod JARs",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/CreeperHost/modlens-mcp.git"
9
+ },
10
+ "homepage": "https://github.com/CreeperHost/modlens-mcp#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/CreeperHost/modlens-mcp/issues"
13
+ },
14
+ "main": "dist/server.js",
15
+ "bin": {
16
+ "modlens-mcp": "dist/launcher.js"
17
+ },
18
+ "files": [
19
+ "dist/",
20
+ "prisma/",
21
+ "scripts/",
22
+ "package.json",
23
+ "README.md"
24
+ ],
25
+ "scripts": {
26
+ "postinstall": "prisma generate",
27
+ "build": "npm run db:generate:sqlite && tsc && node scripts/build-template-db.mjs",
28
+ "dev": "tsc --watch",
29
+ "start": "node dist/server.js",
30
+ "setup": "npm run build && node dist/setup.js",
31
+ "test": "vitest run",
32
+ "test:watch": "vitest",
33
+ "db:generate": "prisma generate",
34
+ "db:push": "prisma db push",
35
+ "db:migrate": "prisma migrate dev",
36
+ "db:setup": "prisma migrate deploy && node scripts/create-fts-index.mjs && node scripts/migrate-mod-source-files.mjs",
37
+ "db:vector": "node scripts/enable-pgvector.mjs",
38
+ "db:studio": "prisma studio",
39
+ "db:push:sqlite": "prisma db push --schema prisma/backends/schema.sqlite.prisma",
40
+ "db:generate:sqlite": "prisma generate --schema prisma/backends/schema.sqlite.prisma",
41
+ "db:vector:sqlite": "node scripts/enable-sqlite-vec.mjs",
42
+ "db:push:pglite": "prisma db push",
43
+ "db:vector:pglite": "node scripts/enable-pgvector.mjs",
44
+ "db:backup": "node scripts/backup.mjs",
45
+ "update": "git pull && npm install && npm run build && node scripts/post-update.mjs"
46
+ },
47
+ "dependencies": {
48
+ "@clack/prompts": "^1.4.0",
49
+ "@modelcontextprotocol/sdk": "^1.10.0",
50
+ "@prisma/adapter-better-sqlite3": "^6.0.0",
51
+ "@prisma/client": "^6.0.0",
52
+ "adm-zip": "^0.5.16",
53
+ "better-sqlite3": "^11.9.0",
54
+ "prisma": "^6.0.0",
55
+ "smol-toml": "^1.6.1",
56
+ "zod": "^3.23.8"
57
+ },
58
+ "devDependencies": {
59
+ "@types/adm-zip": "^0.5.7",
60
+ "@types/better-sqlite3": "^7.0.0",
61
+ "@types/node": "^22.0.0",
62
+ "typescript": "^5.6.0",
63
+ "vitest": "^4.1.6"
64
+ },
65
+ "optionalDependencies": {
66
+ "@electric-sql/pglite": "^0.2.0",
67
+ "@prisma/adapter-pglite": "^6.0.0",
68
+ "sqlite-vec": "^0.1.0"
69
+ }
70
+ }
@@ -1,215 +1,215 @@
1
- // prisma/backends/schema.sqlite.prisma
2
- generator client {
3
- // New Rust-free client: no native query-engine binary. Queries run through a
4
- // portable WASM query compiler driven by the better-sqlite3 driver adapter,
5
- // so the prebuilt client ships and runs on every platform.
6
- provider = "prisma-client"
7
- engineType = "client"
8
- output = "../../src/generated/sqlite"
9
- runtime = "nodejs"
10
- moduleFormat = "esm"
11
- }
12
-
13
- datasource db {
14
- provider = "sqlite"
15
- url = env("DATABASE_URL")
16
- }
17
-
18
- model Mod {
19
- id Int @id @default(autoincrement())
20
- modId String @map("mod_id")
21
- displayName String @map("display_name")
22
- version String
23
- mcVersion String @map("mc_version")
24
- loader String
25
- jarPath String @unique @map("jar_path")
26
- sha256 String?
27
- murmur2 String?
28
- sha512 String?
29
- sourcePath String? @map("source_path")
30
- decompPath String? @map("decomp_path")
31
- decompiled Boolean @default(false)
32
- graphPath String? @map("graph_path")
33
- modrinthId String? @map("modrinth_id")
34
- curseforgeId Int? @map("curseforge_id")
35
- hasMixins Boolean @default(false) @map("has_mixins")
36
- hasAt Boolean @default(false) @map("has_at")
37
- hasAw Boolean @default(false) @map("has_aw")
38
- mixinConfigs String @default("[]") @map("mixin_configs")
39
- mixinTargets String @default("[]") @map("mixin_targets")
40
- atEntries String @default("[]") @map("at_entries")
41
- awEntries String @default("[]") @map("aw_entries")
42
- dependencies String @default("[]")
43
- metadata String @default("{}")
44
- metadataSource String? @map("metadata_source")
45
- tags String @default("[]")
46
- ingestedAt DateTime @default(now()) @map("ingested_at")
47
- updatedAt DateTime @updatedAt @map("updated_at")
48
-
49
- classes ModClass[]
50
- modTags ModTag[]
51
- sourceFiles ModSourceFile[]
52
-
53
- @@unique([modId, version, mcVersion, loader])
54
- @@index([modId])
55
- @@index([mcVersion])
56
- @@index([loader])
57
- @@index([modrinthId])
58
- @@index([curseforgeId])
59
- @@map("mods")
60
- }
61
-
62
- model ModClass {
63
- id Int @id @default(autoincrement())
64
- modId Int @map("mod_id")
65
- className String @map("class_name")
66
- superClass String? @map("super_class")
67
- interfaces String @default("[]")
68
- accessFlags Int @default(0) @map("access_flags")
69
-
70
- mod Mod @relation(fields: [modId], references: [id], onDelete: Cascade)
71
-
72
- @@unique([modId, className])
73
- @@index([className])
74
- @@index([modId])
75
- @@map("mod_classes")
76
- }
77
-
78
- model McVersion {
79
- id Int @id @default(autoincrement())
80
- versionId String @unique @map("version_id")
81
- type String @default("release")
82
- jarPath String? @map("jar_path")
83
- decompPath String? @map("decomp_path")
84
- decompiled Boolean @default(false)
85
- indexed Boolean @default(false)
86
- releaseTime DateTime @map("release_time")
87
- createdAt DateTime @default(now()) @map("created_at")
88
-
89
- sourceFiles McSourceFile[]
90
-
91
- @@map("mc_versions")
92
- }
93
-
94
- // ── Cached AST-level version diffs ──────────────────────────────────────────
95
- // SQLite: result stored as TEXT (JSON string) instead of Json type.
96
-
97
- model McVersionDiff {
98
- id Int @id @default(autoincrement())
99
- versionA String @map("version_a")
100
- versionB String @map("version_b")
101
- packagesHash String @default("all") @map("packages_hash")
102
- result String // SQLite: JSON stored as TEXT
103
- createdAt DateTime @default(now()) @map("created_at")
104
-
105
- @@unique([versionA, versionB, packagesHash])
106
- @@index([versionA, versionB])
107
- @@map("mc_version_diffs")
108
- }
109
-
110
- // ── Cached AST-level mod version diffs ────────────────────────────────────────
111
- // SQLite: result stored as TEXT (JSON string) instead of Json type.
112
-
113
- model ModVersionDiff {
114
- id Int @id @default(autoincrement())
115
- modDbIdA Int @map("mod_db_id_a")
116
- modDbIdB Int @map("mod_db_id_b")
117
- packagesHash String @default("all") @map("packages_hash")
118
- result String // SQLite: JSON stored as TEXT
119
- createdAt DateTime @default(now()) @map("created_at")
120
-
121
- @@unique([modDbIdA, modDbIdB, packagesHash])
122
- @@index([modDbIdA, modDbIdB])
123
- @@map("mod_version_diffs")
124
- }
125
-
126
- model ModTag {
127
- id Int @id @default(autoincrement())
128
- modId Int @map("mod_id")
129
- mod Mod @relation(fields: [modId], references: [id], onDelete: Cascade)
130
- registry String
131
- tagPath String @map("tag_path")
132
- namespace String
133
- entries String @default("[]")
134
- replace Boolean @default(false)
135
-
136
- @@index([modId])
137
- @@index([tagPath])
138
- @@index([registry, tagPath])
139
- @@index([namespace])
140
- @@map("mod_tags")
141
- }
142
-
143
- model McSourceFile {
144
- id Int @id @default(autoincrement())
145
- mcVersionId Int @map("mc_version_id")
146
- className String @map("class_name")
147
- content String
148
- embedding Bytes?
149
- embedSource String? @map("embed_source")
150
- embedUpdatedAt DateTime? @map("embed_updated_at")
151
-
152
- mcVersion McVersion @relation(fields: [mcVersionId], references: [id], onDelete: Cascade)
153
-
154
- @@unique([mcVersionId, className])
155
- @@index([mcVersionId])
156
- @@map("mc_source_files")
157
- }
158
-
159
- model ModSourceFile {
160
- id Int @id @default(autoincrement())
161
- modId Int @map("mod_id")
162
- className String @map("class_name")
163
- content String
164
- embedding Bytes?
165
- embedSource String? @map("embed_source")
166
- embedUpdatedAt DateTime? @map("embed_updated_at")
167
-
168
- mod Mod @relation(fields: [modId], references: [id], onDelete: Cascade)
169
-
170
- @@unique([modId, className])
171
- @@index([modId])
172
- @@map("mod_source_files")
173
- }
174
-
175
- model DocEntry {
176
- id Int @id @default(autoincrement())
177
- className String? @map("class_name")
178
- title String
179
- summary String?
180
- url String
181
- category String @default("minecraft")
182
- tags String @default("[]")
183
- namespace String @default("vanilla")
184
- source String @default("manual")
185
- createdAt DateTime @default(now()) @map("created_at")
186
- updatedAt DateTime @updatedAt @map("updated_at")
187
- embedding Bytes?
188
-
189
- @@index([className])
190
- @@index([category])
191
- @@map("doc_entries")
192
- }
193
-
194
- model Primer {
195
- id Int @id @default(autoincrement())
196
- fromVersion String @map("from_version")
197
- toVersion String @map("to_version")
198
- fromDataVersion Int? @map("from_data_version")
199
- toDataVersion Int? @map("to_data_version")
200
- modloader String @default("neoforge")
201
- title String
202
- summary String?
203
- url String @unique
204
- content String?
205
- tags String @default("[]")
206
- source String @default("manual")
207
- createdAt DateTime @default(now()) @map("created_at")
208
- updatedAt DateTime @updatedAt @map("updated_at")
209
- embedding Bytes?
210
-
211
- @@index([fromVersion, toVersion])
212
- @@index([fromDataVersion, toDataVersion])
213
- @@index([modloader])
214
- @@map("primers")
215
- }
1
+ // prisma/backends/schema.sqlite.prisma
2
+ generator client {
3
+ // New Rust-free client: no native query-engine binary. Queries run through a
4
+ // portable WASM query compiler driven by the better-sqlite3 driver adapter,
5
+ // so the prebuilt client ships and runs on every platform.
6
+ provider = "prisma-client"
7
+ engineType = "client"
8
+ output = "../../src/generated/sqlite"
9
+ runtime = "nodejs"
10
+ moduleFormat = "esm"
11
+ }
12
+
13
+ datasource db {
14
+ provider = "sqlite"
15
+ url = env("DATABASE_URL")
16
+ }
17
+
18
+ model Mod {
19
+ id Int @id @default(autoincrement())
20
+ modId String @map("mod_id")
21
+ displayName String @map("display_name")
22
+ version String
23
+ mcVersion String @map("mc_version")
24
+ loader String
25
+ jarPath String @unique @map("jar_path")
26
+ sha256 String?
27
+ murmur2 String?
28
+ sha512 String?
29
+ sourcePath String? @map("source_path")
30
+ decompPath String? @map("decomp_path")
31
+ decompiled Boolean @default(false)
32
+ graphPath String? @map("graph_path")
33
+ modrinthId String? @map("modrinth_id")
34
+ curseforgeId Int? @map("curseforge_id")
35
+ hasMixins Boolean @default(false) @map("has_mixins")
36
+ hasAt Boolean @default(false) @map("has_at")
37
+ hasAw Boolean @default(false) @map("has_aw")
38
+ mixinConfigs String @default("[]") @map("mixin_configs")
39
+ mixinTargets String @default("[]") @map("mixin_targets")
40
+ atEntries String @default("[]") @map("at_entries")
41
+ awEntries String @default("[]") @map("aw_entries")
42
+ dependencies String @default("[]")
43
+ metadata String @default("{}")
44
+ metadataSource String? @map("metadata_source")
45
+ tags String @default("[]")
46
+ ingestedAt DateTime @default(now()) @map("ingested_at")
47
+ updatedAt DateTime @updatedAt @map("updated_at")
48
+
49
+ classes ModClass[]
50
+ modTags ModTag[]
51
+ sourceFiles ModSourceFile[]
52
+
53
+ @@unique([modId, version, mcVersion, loader])
54
+ @@index([modId])
55
+ @@index([mcVersion])
56
+ @@index([loader])
57
+ @@index([modrinthId])
58
+ @@index([curseforgeId])
59
+ @@map("mods")
60
+ }
61
+
62
+ model ModClass {
63
+ id Int @id @default(autoincrement())
64
+ modId Int @map("mod_id")
65
+ className String @map("class_name")
66
+ superClass String? @map("super_class")
67
+ interfaces String @default("[]")
68
+ accessFlags Int @default(0) @map("access_flags")
69
+
70
+ mod Mod @relation(fields: [modId], references: [id], onDelete: Cascade)
71
+
72
+ @@unique([modId, className])
73
+ @@index([className])
74
+ @@index([modId])
75
+ @@map("mod_classes")
76
+ }
77
+
78
+ model McVersion {
79
+ id Int @id @default(autoincrement())
80
+ versionId String @unique @map("version_id")
81
+ type String @default("release")
82
+ jarPath String? @map("jar_path")
83
+ decompPath String? @map("decomp_path")
84
+ decompiled Boolean @default(false)
85
+ indexed Boolean @default(false)
86
+ releaseTime DateTime @map("release_time")
87
+ createdAt DateTime @default(now()) @map("created_at")
88
+
89
+ sourceFiles McSourceFile[]
90
+
91
+ @@map("mc_versions")
92
+ }
93
+
94
+ // ── Cached AST-level version diffs ──────────────────────────────────────────
95
+ // SQLite: result stored as TEXT (JSON string) instead of Json type.
96
+
97
+ model McVersionDiff {
98
+ id Int @id @default(autoincrement())
99
+ versionA String @map("version_a")
100
+ versionB String @map("version_b")
101
+ packagesHash String @default("all") @map("packages_hash")
102
+ result String // SQLite: JSON stored as TEXT
103
+ createdAt DateTime @default(now()) @map("created_at")
104
+
105
+ @@unique([versionA, versionB, packagesHash])
106
+ @@index([versionA, versionB])
107
+ @@map("mc_version_diffs")
108
+ }
109
+
110
+ // ── Cached AST-level mod version diffs ────────────────────────────────────────
111
+ // SQLite: result stored as TEXT (JSON string) instead of Json type.
112
+
113
+ model ModVersionDiff {
114
+ id Int @id @default(autoincrement())
115
+ modDbIdA Int @map("mod_db_id_a")
116
+ modDbIdB Int @map("mod_db_id_b")
117
+ packagesHash String @default("all") @map("packages_hash")
118
+ result String // SQLite: JSON stored as TEXT
119
+ createdAt DateTime @default(now()) @map("created_at")
120
+
121
+ @@unique([modDbIdA, modDbIdB, packagesHash])
122
+ @@index([modDbIdA, modDbIdB])
123
+ @@map("mod_version_diffs")
124
+ }
125
+
126
+ model ModTag {
127
+ id Int @id @default(autoincrement())
128
+ modId Int @map("mod_id")
129
+ mod Mod @relation(fields: [modId], references: [id], onDelete: Cascade)
130
+ registry String
131
+ tagPath String @map("tag_path")
132
+ namespace String
133
+ entries String @default("[]")
134
+ replace Boolean @default(false)
135
+
136
+ @@index([modId])
137
+ @@index([tagPath])
138
+ @@index([registry, tagPath])
139
+ @@index([namespace])
140
+ @@map("mod_tags")
141
+ }
142
+
143
+ model McSourceFile {
144
+ id Int @id @default(autoincrement())
145
+ mcVersionId Int @map("mc_version_id")
146
+ className String @map("class_name")
147
+ content String
148
+ embedding Bytes?
149
+ embedSource String? @map("embed_source")
150
+ embedUpdatedAt DateTime? @map("embed_updated_at")
151
+
152
+ mcVersion McVersion @relation(fields: [mcVersionId], references: [id], onDelete: Cascade)
153
+
154
+ @@unique([mcVersionId, className])
155
+ @@index([mcVersionId])
156
+ @@map("mc_source_files")
157
+ }
158
+
159
+ model ModSourceFile {
160
+ id Int @id @default(autoincrement())
161
+ modId Int @map("mod_id")
162
+ className String @map("class_name")
163
+ content String
164
+ embedding Bytes?
165
+ embedSource String? @map("embed_source")
166
+ embedUpdatedAt DateTime? @map("embed_updated_at")
167
+
168
+ mod Mod @relation(fields: [modId], references: [id], onDelete: Cascade)
169
+
170
+ @@unique([modId, className])
171
+ @@index([modId])
172
+ @@map("mod_source_files")
173
+ }
174
+
175
+ model DocEntry {
176
+ id Int @id @default(autoincrement())
177
+ className String? @map("class_name")
178
+ title String
179
+ summary String?
180
+ url String
181
+ category String @default("minecraft")
182
+ tags String @default("[]")
183
+ namespace String @default("vanilla")
184
+ source String @default("manual")
185
+ createdAt DateTime @default(now()) @map("created_at")
186
+ updatedAt DateTime @updatedAt @map("updated_at")
187
+ embedding Bytes?
188
+
189
+ @@index([className])
190
+ @@index([category])
191
+ @@map("doc_entries")
192
+ }
193
+
194
+ model Primer {
195
+ id Int @id @default(autoincrement())
196
+ fromVersion String @map("from_version")
197
+ toVersion String @map("to_version")
198
+ fromDataVersion Int? @map("from_data_version")
199
+ toDataVersion Int? @map("to_data_version")
200
+ modloader String @default("neoforge")
201
+ title String
202
+ summary String?
203
+ url String @unique
204
+ content String?
205
+ tags String @default("[]")
206
+ source String @default("manual")
207
+ createdAt DateTime @default(now()) @map("created_at")
208
+ updatedAt DateTime @updatedAt @map("updated_at")
209
+ embedding Bytes?
210
+
211
+ @@index([fromVersion, toVersion])
212
+ @@index([fromDataVersion, toDataVersion])
213
+ @@index([modloader])
214
+ @@map("primers")
215
+ }