@okhay-p/mivra 0.1.5 → 0.1.7

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 (62) hide show
  1. package/README.md +1 -0
  2. package/THIRD_PARTY_NOTICES.md +250 -0
  3. package/dist/{chunk-ODFBAPPH.js → chunk-M62PZTK3.js} +125 -6
  4. package/dist/chunk-M62PZTK3.js.map +7 -0
  5. package/dist/{chunk-KE5ZEREE.js → chunk-T5WM74CI.js} +2 -1
  6. package/dist/chunk-TKDX5OCX.js +2555 -0
  7. package/dist/chunk-TKDX5OCX.js.map +7 -0
  8. package/dist/{chunk-KUKQU7EQ.js → chunk-VHOVRHI3.js} +38 -10
  9. package/dist/{chunk-KUKQU7EQ.js.map → chunk-VHOVRHI3.js.map} +2 -2
  10. package/dist/cli.js +1099 -53
  11. package/dist/cli.js.map +4 -4
  12. package/dist/{client-5YDLS4KV.js → client-76YUHG4T.js} +2 -2
  13. package/dist/exercise-child.js +37 -0
  14. package/dist/exercise-child.js.map +7 -0
  15. package/dist/extract-child.js +2 -2
  16. package/dist/python-child.js +51 -0
  17. package/dist/python-child.js.map +7 -0
  18. package/dist/{start-2RXX57ZZ.js → start-GVAACONX.js} +5809 -2377
  19. package/dist/start-GVAACONX.js.map +7 -0
  20. package/drizzle/0019_public_doctor_faustus.sql +1 -0
  21. package/drizzle/0020_early_wolfpack.sql +3 -0
  22. package/drizzle/0021_strange_gamma_corps.sql +2 -0
  23. package/drizzle/0022_fast_forgotten_one.sql +28 -0
  24. package/drizzle/0023_low_wiccan.sql +17 -0
  25. package/drizzle/0024_windy_annihilus.sql +1 -0
  26. package/drizzle/0025_brief_rictor.sql +6 -0
  27. package/drizzle/0026_greedy_sally_floyd.sql +1 -0
  28. package/drizzle/0027_regular_calypso.sql +41 -0
  29. package/drizzle/0028_lazy_agent_zero.sql +17 -0
  30. package/drizzle/meta/0019_snapshot.json +2288 -0
  31. package/drizzle/meta/0020_snapshot.json +2297 -0
  32. package/drizzle/meta/0021_snapshot.json +2313 -0
  33. package/drizzle/meta/0022_snapshot.json +2529 -0
  34. package/drizzle/meta/0023_snapshot.json +2654 -0
  35. package/drizzle/meta/0024_snapshot.json +2662 -0
  36. package/drizzle/meta/0025_snapshot.json +2707 -0
  37. package/drizzle/meta/0026_snapshot.json +2714 -0
  38. package/drizzle/meta/0027_snapshot.json +2816 -0
  39. package/drizzle/meta/0028_snapshot.json +2940 -0
  40. package/drizzle/meta/_journal.json +70 -0
  41. package/package.json +6 -1
  42. package/web/assets/emscripten-module-uFzwHH0Y.wasm +0 -0
  43. package/web/assets/emscripten-module.browser-D72eEgXo.js +1 -0
  44. package/web/assets/exercise-workers/exercise.worker-LCHlYekD.js +265 -0
  45. package/web/assets/exercise-workers/python-exercise.worker-DeTriNjh.js +236 -0
  46. package/web/assets/ffi-4V2b7xu3.js +1 -0
  47. package/web/assets/index-CQjNLnxP.js +540 -0
  48. package/web/assets/index-DpV5il_3.css +1 -0
  49. package/web/assets/module-ES6BEMUI-B2wjplZC.js +1 -0
  50. package/web/assets/notes-graph.worker-Dqb5HK34.js +1 -0
  51. package/web/assets/render.worker-OksjuBjV.js +537 -0
  52. package/web/index.html +2 -2
  53. package/dist/chunk-ODFBAPPH.js.map +0 -7
  54. package/dist/chunk-YACRW47X.js +0 -1203
  55. package/dist/chunk-YACRW47X.js.map +0 -7
  56. package/dist/start-2RXX57ZZ.js.map +0 -7
  57. package/web/assets/index-DJ2D5ZXo.css +0 -1
  58. package/web/assets/index-DcYzUL1W.js +0 -413
  59. package/web/assets/notes-graph.worker-DaVQvftJ.js +0 -1
  60. package/web/assets/render.worker-BAfybD27.js +0 -416
  61. /package/dist/{chunk-KE5ZEREE.js.map → chunk-T5WM74CI.js.map} +0 -0
  62. /package/dist/{client-5YDLS4KV.js.map → client-76YUHG4T.js.map} +0 -0
@@ -0,0 +1,2529 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "4eccc4be-c496-42ab-b00e-ce7a68f26192",
5
+ "prevId": "33d84283-0d10-49e5-bb05-ade70b1f772c",
6
+ "tables": {
7
+ "artifacts": {
8
+ "name": "artifacts",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "session_id": {
18
+ "name": "session_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "run_id": {
25
+ "name": "run_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "tool_call_id": {
32
+ "name": "tool_call_id",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "kind": {
39
+ "name": "kind",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "version": {
46
+ "name": "version",
47
+ "type": "integer",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "spec": {
53
+ "name": "spec",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false
58
+ },
59
+ "created_at": {
60
+ "name": "created_at",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ }
66
+ },
67
+ "indexes": {
68
+ "artifacts_session_idx": {
69
+ "name": "artifacts_session_idx",
70
+ "columns": [
71
+ "session_id",
72
+ "created_at"
73
+ ],
74
+ "isUnique": false
75
+ },
76
+ "artifacts_tool_call_idx": {
77
+ "name": "artifacts_tool_call_idx",
78
+ "columns": [
79
+ "run_id",
80
+ "tool_call_id"
81
+ ],
82
+ "isUnique": true
83
+ }
84
+ },
85
+ "foreignKeys": {
86
+ "artifacts_session_id_sessions_id_fk": {
87
+ "name": "artifacts_session_id_sessions_id_fk",
88
+ "tableFrom": "artifacts",
89
+ "tableTo": "sessions",
90
+ "columnsFrom": [
91
+ "session_id"
92
+ ],
93
+ "columnsTo": [
94
+ "id"
95
+ ],
96
+ "onDelete": "cascade",
97
+ "onUpdate": "no action"
98
+ },
99
+ "artifacts_run_id_runs_id_fk": {
100
+ "name": "artifacts_run_id_runs_id_fk",
101
+ "tableFrom": "artifacts",
102
+ "tableTo": "runs",
103
+ "columnsFrom": [
104
+ "run_id"
105
+ ],
106
+ "columnsTo": [
107
+ "id"
108
+ ],
109
+ "onDelete": "cascade",
110
+ "onUpdate": "no action"
111
+ }
112
+ },
113
+ "compositePrimaryKeys": {},
114
+ "uniqueConstraints": {},
115
+ "checkConstraints": {}
116
+ },
117
+ "attempts": {
118
+ "name": "attempts",
119
+ "columns": {
120
+ "id": {
121
+ "name": "id",
122
+ "type": "text",
123
+ "primaryKey": true,
124
+ "notNull": true,
125
+ "autoincrement": false
126
+ },
127
+ "artifact_id": {
128
+ "name": "artifact_id",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": true,
132
+ "autoincrement": false
133
+ },
134
+ "session_id": {
135
+ "name": "session_id",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": true,
139
+ "autoincrement": false
140
+ },
141
+ "answer": {
142
+ "name": "answer",
143
+ "type": "text",
144
+ "primaryKey": false,
145
+ "notNull": true,
146
+ "autoincrement": false
147
+ },
148
+ "grade": {
149
+ "name": "grade",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": true,
153
+ "autoincrement": false
154
+ },
155
+ "correct": {
156
+ "name": "correct",
157
+ "type": "integer",
158
+ "primaryKey": false,
159
+ "notNull": true,
160
+ "autoincrement": false
161
+ },
162
+ "concept": {
163
+ "name": "concept",
164
+ "type": "text",
165
+ "primaryKey": false,
166
+ "notNull": false,
167
+ "autoincrement": false
168
+ },
169
+ "judge": {
170
+ "name": "judge",
171
+ "type": "text",
172
+ "primaryKey": false,
173
+ "notNull": true,
174
+ "autoincrement": false,
175
+ "default": "'grader'"
176
+ },
177
+ "created_at": {
178
+ "name": "created_at",
179
+ "type": "integer",
180
+ "primaryKey": false,
181
+ "notNull": true,
182
+ "autoincrement": false
183
+ }
184
+ },
185
+ "indexes": {
186
+ "attempts_one_per_artifact_idx": {
187
+ "name": "attempts_one_per_artifact_idx",
188
+ "columns": [
189
+ "artifact_id",
190
+ "judge"
191
+ ],
192
+ "isUnique": true
193
+ },
194
+ "attempts_session_idx": {
195
+ "name": "attempts_session_idx",
196
+ "columns": [
197
+ "session_id",
198
+ "created_at"
199
+ ],
200
+ "isUnique": false
201
+ },
202
+ "attempts_created_idx": {
203
+ "name": "attempts_created_idx",
204
+ "columns": [
205
+ "created_at"
206
+ ],
207
+ "isUnique": false
208
+ }
209
+ },
210
+ "foreignKeys": {
211
+ "attempts_artifact_id_artifacts_id_fk": {
212
+ "name": "attempts_artifact_id_artifacts_id_fk",
213
+ "tableFrom": "attempts",
214
+ "tableTo": "artifacts",
215
+ "columnsFrom": [
216
+ "artifact_id"
217
+ ],
218
+ "columnsTo": [
219
+ "id"
220
+ ],
221
+ "onDelete": "cascade",
222
+ "onUpdate": "no action"
223
+ },
224
+ "attempts_session_id_sessions_id_fk": {
225
+ "name": "attempts_session_id_sessions_id_fk",
226
+ "tableFrom": "attempts",
227
+ "tableTo": "sessions",
228
+ "columnsFrom": [
229
+ "session_id"
230
+ ],
231
+ "columnsTo": [
232
+ "id"
233
+ ],
234
+ "onDelete": "cascade",
235
+ "onUpdate": "no action"
236
+ }
237
+ },
238
+ "compositePrimaryKeys": {},
239
+ "uniqueConstraints": {},
240
+ "checkConstraints": {}
241
+ },
242
+ "concept_edges": {
243
+ "name": "concept_edges",
244
+ "columns": {
245
+ "from_id": {
246
+ "name": "from_id",
247
+ "type": "text",
248
+ "primaryKey": false,
249
+ "notNull": true,
250
+ "autoincrement": false
251
+ },
252
+ "to_id": {
253
+ "name": "to_id",
254
+ "type": "text",
255
+ "primaryKey": false,
256
+ "notNull": true,
257
+ "autoincrement": false
258
+ },
259
+ "kind": {
260
+ "name": "kind",
261
+ "type": "text",
262
+ "primaryKey": false,
263
+ "notNull": true,
264
+ "autoincrement": false
265
+ },
266
+ "note_id": {
267
+ "name": "note_id",
268
+ "type": "text",
269
+ "primaryKey": false,
270
+ "notNull": true,
271
+ "autoincrement": false
272
+ }
273
+ },
274
+ "indexes": {
275
+ "concept_edges_note_idx": {
276
+ "name": "concept_edges_note_idx",
277
+ "columns": [
278
+ "note_id"
279
+ ],
280
+ "isUnique": false
281
+ },
282
+ "concept_edges_to_idx": {
283
+ "name": "concept_edges_to_idx",
284
+ "columns": [
285
+ "to_id"
286
+ ],
287
+ "isUnique": false
288
+ }
289
+ },
290
+ "foreignKeys": {
291
+ "concept_edges_from_id_concepts_id_fk": {
292
+ "name": "concept_edges_from_id_concepts_id_fk",
293
+ "tableFrom": "concept_edges",
294
+ "tableTo": "concepts",
295
+ "columnsFrom": [
296
+ "from_id"
297
+ ],
298
+ "columnsTo": [
299
+ "id"
300
+ ],
301
+ "onDelete": "cascade",
302
+ "onUpdate": "no action"
303
+ },
304
+ "concept_edges_to_id_concepts_id_fk": {
305
+ "name": "concept_edges_to_id_concepts_id_fk",
306
+ "tableFrom": "concept_edges",
307
+ "tableTo": "concepts",
308
+ "columnsFrom": [
309
+ "to_id"
310
+ ],
311
+ "columnsTo": [
312
+ "id"
313
+ ],
314
+ "onDelete": "cascade",
315
+ "onUpdate": "no action"
316
+ },
317
+ "concept_edges_note_id_notes_id_fk": {
318
+ "name": "concept_edges_note_id_notes_id_fk",
319
+ "tableFrom": "concept_edges",
320
+ "tableTo": "notes",
321
+ "columnsFrom": [
322
+ "note_id"
323
+ ],
324
+ "columnsTo": [
325
+ "id"
326
+ ],
327
+ "onDelete": "cascade",
328
+ "onUpdate": "no action"
329
+ }
330
+ },
331
+ "compositePrimaryKeys": {
332
+ "concept_edges_from_id_to_id_kind_note_id_pk": {
333
+ "columns": [
334
+ "from_id",
335
+ "to_id",
336
+ "kind",
337
+ "note_id"
338
+ ],
339
+ "name": "concept_edges_from_id_to_id_kind_note_id_pk"
340
+ }
341
+ },
342
+ "uniqueConstraints": {},
343
+ "checkConstraints": {}
344
+ },
345
+ "concept_session_edges": {
346
+ "name": "concept_session_edges",
347
+ "columns": {
348
+ "id": {
349
+ "name": "id",
350
+ "type": "text",
351
+ "primaryKey": true,
352
+ "notNull": true,
353
+ "autoincrement": false
354
+ },
355
+ "from_id": {
356
+ "name": "from_id",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ },
362
+ "to_id": {
363
+ "name": "to_id",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": true,
367
+ "autoincrement": false
368
+ },
369
+ "kind": {
370
+ "name": "kind",
371
+ "type": "text",
372
+ "primaryKey": false,
373
+ "notNull": true,
374
+ "autoincrement": false
375
+ },
376
+ "session_id": {
377
+ "name": "session_id",
378
+ "type": "text",
379
+ "primaryKey": false,
380
+ "notNull": false,
381
+ "autoincrement": false
382
+ },
383
+ "created_at": {
384
+ "name": "created_at",
385
+ "type": "integer",
386
+ "primaryKey": false,
387
+ "notNull": true,
388
+ "autoincrement": false
389
+ }
390
+ },
391
+ "indexes": {
392
+ "concept_session_edges_edge_session_idx": {
393
+ "name": "concept_session_edges_edge_session_idx",
394
+ "columns": [
395
+ "from_id",
396
+ "to_id",
397
+ "kind",
398
+ "session_id"
399
+ ],
400
+ "isUnique": true,
401
+ "where": "\"concept_session_edges\".\"session_id\" is not null"
402
+ },
403
+ "concept_session_edges_from_to_idx": {
404
+ "name": "concept_session_edges_from_to_idx",
405
+ "columns": [
406
+ "from_id",
407
+ "to_id",
408
+ "kind"
409
+ ],
410
+ "isUnique": false
411
+ },
412
+ "concept_session_edges_to_idx": {
413
+ "name": "concept_session_edges_to_idx",
414
+ "columns": [
415
+ "to_id"
416
+ ],
417
+ "isUnique": false
418
+ },
419
+ "concept_session_edges_session_idx": {
420
+ "name": "concept_session_edges_session_idx",
421
+ "columns": [
422
+ "session_id"
423
+ ],
424
+ "isUnique": false
425
+ }
426
+ },
427
+ "foreignKeys": {
428
+ "concept_session_edges_from_id_concepts_id_fk": {
429
+ "name": "concept_session_edges_from_id_concepts_id_fk",
430
+ "tableFrom": "concept_session_edges",
431
+ "tableTo": "concepts",
432
+ "columnsFrom": [
433
+ "from_id"
434
+ ],
435
+ "columnsTo": [
436
+ "id"
437
+ ],
438
+ "onDelete": "cascade",
439
+ "onUpdate": "no action"
440
+ },
441
+ "concept_session_edges_to_id_concepts_id_fk": {
442
+ "name": "concept_session_edges_to_id_concepts_id_fk",
443
+ "tableFrom": "concept_session_edges",
444
+ "tableTo": "concepts",
445
+ "columnsFrom": [
446
+ "to_id"
447
+ ],
448
+ "columnsTo": [
449
+ "id"
450
+ ],
451
+ "onDelete": "cascade",
452
+ "onUpdate": "no action"
453
+ },
454
+ "concept_session_edges_session_id_sessions_id_fk": {
455
+ "name": "concept_session_edges_session_id_sessions_id_fk",
456
+ "tableFrom": "concept_session_edges",
457
+ "tableTo": "sessions",
458
+ "columnsFrom": [
459
+ "session_id"
460
+ ],
461
+ "columnsTo": [
462
+ "id"
463
+ ],
464
+ "onDelete": "set null",
465
+ "onUpdate": "no action"
466
+ }
467
+ },
468
+ "compositePrimaryKeys": {},
469
+ "uniqueConstraints": {},
470
+ "checkConstraints": {}
471
+ },
472
+ "concept_session_sources": {
473
+ "name": "concept_session_sources",
474
+ "columns": {
475
+ "id": {
476
+ "name": "id",
477
+ "type": "text",
478
+ "primaryKey": true,
479
+ "notNull": true,
480
+ "autoincrement": false
481
+ },
482
+ "concept_id": {
483
+ "name": "concept_id",
484
+ "type": "text",
485
+ "primaryKey": false,
486
+ "notNull": true,
487
+ "autoincrement": false
488
+ },
489
+ "session_id": {
490
+ "name": "session_id",
491
+ "type": "text",
492
+ "primaryKey": false,
493
+ "notNull": false,
494
+ "autoincrement": false
495
+ },
496
+ "created_at": {
497
+ "name": "created_at",
498
+ "type": "integer",
499
+ "primaryKey": false,
500
+ "notNull": true,
501
+ "autoincrement": false
502
+ }
503
+ },
504
+ "indexes": {
505
+ "concept_session_sources_concept_session_idx": {
506
+ "name": "concept_session_sources_concept_session_idx",
507
+ "columns": [
508
+ "concept_id",
509
+ "session_id"
510
+ ],
511
+ "isUnique": true,
512
+ "where": "\"concept_session_sources\".\"session_id\" is not null"
513
+ },
514
+ "concept_session_sources_concept_idx": {
515
+ "name": "concept_session_sources_concept_idx",
516
+ "columns": [
517
+ "concept_id"
518
+ ],
519
+ "isUnique": false
520
+ },
521
+ "concept_session_sources_session_idx": {
522
+ "name": "concept_session_sources_session_idx",
523
+ "columns": [
524
+ "session_id"
525
+ ],
526
+ "isUnique": false
527
+ }
528
+ },
529
+ "foreignKeys": {
530
+ "concept_session_sources_concept_id_concepts_id_fk": {
531
+ "name": "concept_session_sources_concept_id_concepts_id_fk",
532
+ "tableFrom": "concept_session_sources",
533
+ "tableTo": "concepts",
534
+ "columnsFrom": [
535
+ "concept_id"
536
+ ],
537
+ "columnsTo": [
538
+ "id"
539
+ ],
540
+ "onDelete": "cascade",
541
+ "onUpdate": "no action"
542
+ },
543
+ "concept_session_sources_session_id_sessions_id_fk": {
544
+ "name": "concept_session_sources_session_id_sessions_id_fk",
545
+ "tableFrom": "concept_session_sources",
546
+ "tableTo": "sessions",
547
+ "columnsFrom": [
548
+ "session_id"
549
+ ],
550
+ "columnsTo": [
551
+ "id"
552
+ ],
553
+ "onDelete": "set null",
554
+ "onUpdate": "no action"
555
+ }
556
+ },
557
+ "compositePrimaryKeys": {},
558
+ "uniqueConstraints": {},
559
+ "checkConstraints": {}
560
+ },
561
+ "concept_sources": {
562
+ "name": "concept_sources",
563
+ "columns": {
564
+ "concept_id": {
565
+ "name": "concept_id",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": true,
569
+ "autoincrement": false
570
+ },
571
+ "note_id": {
572
+ "name": "note_id",
573
+ "type": "text",
574
+ "primaryKey": false,
575
+ "notNull": true,
576
+ "autoincrement": false
577
+ }
578
+ },
579
+ "indexes": {
580
+ "concept_sources_note_idx": {
581
+ "name": "concept_sources_note_idx",
582
+ "columns": [
583
+ "note_id"
584
+ ],
585
+ "isUnique": false
586
+ }
587
+ },
588
+ "foreignKeys": {
589
+ "concept_sources_concept_id_concepts_id_fk": {
590
+ "name": "concept_sources_concept_id_concepts_id_fk",
591
+ "tableFrom": "concept_sources",
592
+ "tableTo": "concepts",
593
+ "columnsFrom": [
594
+ "concept_id"
595
+ ],
596
+ "columnsTo": [
597
+ "id"
598
+ ],
599
+ "onDelete": "cascade",
600
+ "onUpdate": "no action"
601
+ },
602
+ "concept_sources_note_id_notes_id_fk": {
603
+ "name": "concept_sources_note_id_notes_id_fk",
604
+ "tableFrom": "concept_sources",
605
+ "tableTo": "notes",
606
+ "columnsFrom": [
607
+ "note_id"
608
+ ],
609
+ "columnsTo": [
610
+ "id"
611
+ ],
612
+ "onDelete": "cascade",
613
+ "onUpdate": "no action"
614
+ }
615
+ },
616
+ "compositePrimaryKeys": {
617
+ "concept_sources_concept_id_note_id_pk": {
618
+ "columns": [
619
+ "concept_id",
620
+ "note_id"
621
+ ],
622
+ "name": "concept_sources_concept_id_note_id_pk"
623
+ }
624
+ },
625
+ "uniqueConstraints": {},
626
+ "checkConstraints": {}
627
+ },
628
+ "concepts": {
629
+ "name": "concepts",
630
+ "columns": {
631
+ "id": {
632
+ "name": "id",
633
+ "type": "text",
634
+ "primaryKey": true,
635
+ "notNull": true,
636
+ "autoincrement": false
637
+ },
638
+ "key": {
639
+ "name": "key",
640
+ "type": "text",
641
+ "primaryKey": false,
642
+ "notNull": true,
643
+ "autoincrement": false
644
+ },
645
+ "name": {
646
+ "name": "name",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": true,
650
+ "autoincrement": false
651
+ },
652
+ "created_at": {
653
+ "name": "created_at",
654
+ "type": "integer",
655
+ "primaryKey": false,
656
+ "notNull": true,
657
+ "autoincrement": false
658
+ }
659
+ },
660
+ "indexes": {
661
+ "concepts_key_idx": {
662
+ "name": "concepts_key_idx",
663
+ "columns": [
664
+ "key"
665
+ ],
666
+ "isUnique": true
667
+ }
668
+ },
669
+ "foreignKeys": {},
670
+ "compositePrimaryKeys": {},
671
+ "uniqueConstraints": {},
672
+ "checkConstraints": {}
673
+ },
674
+ "courses": {
675
+ "name": "courses",
676
+ "columns": {
677
+ "id": {
678
+ "name": "id",
679
+ "type": "text",
680
+ "primaryKey": true,
681
+ "notNull": true,
682
+ "autoincrement": false
683
+ },
684
+ "session_id": {
685
+ "name": "session_id",
686
+ "type": "text",
687
+ "primaryKey": false,
688
+ "notNull": true,
689
+ "autoincrement": false
690
+ },
691
+ "goal": {
692
+ "name": "goal",
693
+ "type": "text",
694
+ "primaryKey": false,
695
+ "notNull": true,
696
+ "autoincrement": false
697
+ },
698
+ "kind": {
699
+ "name": "kind",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": true,
703
+ "autoincrement": false,
704
+ "default": "'lessons'"
705
+ },
706
+ "status": {
707
+ "name": "status",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true,
711
+ "autoincrement": false
712
+ },
713
+ "icon": {
714
+ "name": "icon",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": false,
718
+ "autoincrement": false
719
+ },
720
+ "created_at": {
721
+ "name": "created_at",
722
+ "type": "integer",
723
+ "primaryKey": false,
724
+ "notNull": true,
725
+ "autoincrement": false
726
+ },
727
+ "updated_at": {
728
+ "name": "updated_at",
729
+ "type": "integer",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "autoincrement": false
733
+ }
734
+ },
735
+ "indexes": {
736
+ "courses_session_idx": {
737
+ "name": "courses_session_idx",
738
+ "columns": [
739
+ "session_id"
740
+ ],
741
+ "isUnique": true
742
+ }
743
+ },
744
+ "foreignKeys": {
745
+ "courses_session_id_sessions_id_fk": {
746
+ "name": "courses_session_id_sessions_id_fk",
747
+ "tableFrom": "courses",
748
+ "tableTo": "sessions",
749
+ "columnsFrom": [
750
+ "session_id"
751
+ ],
752
+ "columnsTo": [
753
+ "id"
754
+ ],
755
+ "onDelete": "cascade",
756
+ "onUpdate": "no action"
757
+ }
758
+ },
759
+ "compositePrimaryKeys": {},
760
+ "uniqueConstraints": {},
761
+ "checkConstraints": {}
762
+ },
763
+ "document_chunks": {
764
+ "name": "document_chunks",
765
+ "columns": {
766
+ "id": {
767
+ "name": "id",
768
+ "type": "integer",
769
+ "primaryKey": true,
770
+ "notNull": true,
771
+ "autoincrement": true
772
+ },
773
+ "document_id": {
774
+ "name": "document_id",
775
+ "type": "text",
776
+ "primaryKey": false,
777
+ "notNull": true,
778
+ "autoincrement": false
779
+ },
780
+ "page": {
781
+ "name": "page",
782
+ "type": "integer",
783
+ "primaryKey": false,
784
+ "notNull": true,
785
+ "autoincrement": false
786
+ },
787
+ "seq": {
788
+ "name": "seq",
789
+ "type": "integer",
790
+ "primaryKey": false,
791
+ "notNull": true,
792
+ "autoincrement": false
793
+ },
794
+ "text": {
795
+ "name": "text",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true,
799
+ "autoincrement": false
800
+ }
801
+ },
802
+ "indexes": {
803
+ "document_chunks_document_seq_idx": {
804
+ "name": "document_chunks_document_seq_idx",
805
+ "columns": [
806
+ "document_id",
807
+ "seq"
808
+ ],
809
+ "isUnique": true
810
+ }
811
+ },
812
+ "foreignKeys": {
813
+ "document_chunks_document_id_documents_id_fk": {
814
+ "name": "document_chunks_document_id_documents_id_fk",
815
+ "tableFrom": "document_chunks",
816
+ "tableTo": "documents",
817
+ "columnsFrom": [
818
+ "document_id"
819
+ ],
820
+ "columnsTo": [
821
+ "id"
822
+ ],
823
+ "onDelete": "cascade",
824
+ "onUpdate": "no action"
825
+ }
826
+ },
827
+ "compositePrimaryKeys": {},
828
+ "uniqueConstraints": {},
829
+ "checkConstraints": {}
830
+ },
831
+ "documents": {
832
+ "name": "documents",
833
+ "columns": {
834
+ "id": {
835
+ "name": "id",
836
+ "type": "text",
837
+ "primaryKey": true,
838
+ "notNull": true,
839
+ "autoincrement": false
840
+ },
841
+ "session_id": {
842
+ "name": "session_id",
843
+ "type": "text",
844
+ "primaryKey": false,
845
+ "notNull": true,
846
+ "autoincrement": false
847
+ },
848
+ "message_id": {
849
+ "name": "message_id",
850
+ "type": "text",
851
+ "primaryKey": false,
852
+ "notNull": false,
853
+ "autoincrement": false
854
+ },
855
+ "filename": {
856
+ "name": "filename",
857
+ "type": "text",
858
+ "primaryKey": false,
859
+ "notNull": true,
860
+ "autoincrement": false
861
+ },
862
+ "kind": {
863
+ "name": "kind",
864
+ "type": "text",
865
+ "primaryKey": false,
866
+ "notNull": true,
867
+ "autoincrement": false
868
+ },
869
+ "byte_size": {
870
+ "name": "byte_size",
871
+ "type": "integer",
872
+ "primaryKey": false,
873
+ "notNull": true,
874
+ "autoincrement": false
875
+ },
876
+ "text_chars": {
877
+ "name": "text_chars",
878
+ "type": "integer",
879
+ "primaryKey": false,
880
+ "notNull": true,
881
+ "autoincrement": false
882
+ },
883
+ "page_count": {
884
+ "name": "page_count",
885
+ "type": "integer",
886
+ "primaryKey": false,
887
+ "notNull": true,
888
+ "autoincrement": false
889
+ },
890
+ "pages_with_text": {
891
+ "name": "pages_with_text",
892
+ "type": "integer",
893
+ "primaryKey": false,
894
+ "notNull": true,
895
+ "autoincrement": false
896
+ },
897
+ "status": {
898
+ "name": "status",
899
+ "type": "text",
900
+ "primaryKey": false,
901
+ "notNull": true,
902
+ "autoincrement": false
903
+ },
904
+ "created_at": {
905
+ "name": "created_at",
906
+ "type": "integer",
907
+ "primaryKey": false,
908
+ "notNull": true,
909
+ "autoincrement": false
910
+ }
911
+ },
912
+ "indexes": {
913
+ "documents_session_idx": {
914
+ "name": "documents_session_idx",
915
+ "columns": [
916
+ "session_id",
917
+ "created_at"
918
+ ],
919
+ "isUnique": false
920
+ }
921
+ },
922
+ "foreignKeys": {
923
+ "documents_session_id_sessions_id_fk": {
924
+ "name": "documents_session_id_sessions_id_fk",
925
+ "tableFrom": "documents",
926
+ "tableTo": "sessions",
927
+ "columnsFrom": [
928
+ "session_id"
929
+ ],
930
+ "columnsTo": [
931
+ "id"
932
+ ],
933
+ "onDelete": "cascade",
934
+ "onUpdate": "no action"
935
+ },
936
+ "documents_message_id_messages_id_fk": {
937
+ "name": "documents_message_id_messages_id_fk",
938
+ "tableFrom": "documents",
939
+ "tableTo": "messages",
940
+ "columnsFrom": [
941
+ "message_id"
942
+ ],
943
+ "columnsTo": [
944
+ "id"
945
+ ],
946
+ "onDelete": "set null",
947
+ "onUpdate": "no action"
948
+ }
949
+ },
950
+ "compositePrimaryKeys": {},
951
+ "uniqueConstraints": {},
952
+ "checkConstraints": {}
953
+ },
954
+ "lesson_sections": {
955
+ "name": "lesson_sections",
956
+ "columns": {
957
+ "id": {
958
+ "name": "id",
959
+ "type": "text",
960
+ "primaryKey": true,
961
+ "notNull": true,
962
+ "autoincrement": false
963
+ },
964
+ "lesson_id": {
965
+ "name": "lesson_id",
966
+ "type": "text",
967
+ "primaryKey": false,
968
+ "notNull": true,
969
+ "autoincrement": false
970
+ },
971
+ "kind": {
972
+ "name": "kind",
973
+ "type": "text",
974
+ "primaryKey": false,
975
+ "notNull": true,
976
+ "autoincrement": false
977
+ },
978
+ "title": {
979
+ "name": "title",
980
+ "type": "text",
981
+ "primaryKey": false,
982
+ "notNull": true,
983
+ "autoincrement": false
984
+ },
985
+ "markdown": {
986
+ "name": "markdown",
987
+ "type": "text",
988
+ "primaryKey": false,
989
+ "notNull": false,
990
+ "autoincrement": false
991
+ },
992
+ "artifact_id": {
993
+ "name": "artifact_id",
994
+ "type": "text",
995
+ "primaryKey": false,
996
+ "notNull": false,
997
+ "autoincrement": false
998
+ },
999
+ "revisits": {
1000
+ "name": "revisits",
1001
+ "type": "text",
1002
+ "primaryKey": false,
1003
+ "notNull": true,
1004
+ "autoincrement": false,
1005
+ "default": "'[]'"
1006
+ },
1007
+ "created_at": {
1008
+ "name": "created_at",
1009
+ "type": "integer",
1010
+ "primaryKey": false,
1011
+ "notNull": true,
1012
+ "autoincrement": false
1013
+ }
1014
+ },
1015
+ "indexes": {
1016
+ "lesson_sections_lesson_idx": {
1017
+ "name": "lesson_sections_lesson_idx",
1018
+ "columns": [
1019
+ "lesson_id"
1020
+ ],
1021
+ "isUnique": false
1022
+ },
1023
+ "lesson_sections_artifact_idx": {
1024
+ "name": "lesson_sections_artifact_idx",
1025
+ "columns": [
1026
+ "artifact_id"
1027
+ ],
1028
+ "isUnique": true
1029
+ }
1030
+ },
1031
+ "foreignKeys": {
1032
+ "lesson_sections_lesson_id_lessons_id_fk": {
1033
+ "name": "lesson_sections_lesson_id_lessons_id_fk",
1034
+ "tableFrom": "lesson_sections",
1035
+ "tableTo": "lessons",
1036
+ "columnsFrom": [
1037
+ "lesson_id"
1038
+ ],
1039
+ "columnsTo": [
1040
+ "id"
1041
+ ],
1042
+ "onDelete": "cascade",
1043
+ "onUpdate": "no action"
1044
+ },
1045
+ "lesson_sections_artifact_id_artifacts_id_fk": {
1046
+ "name": "lesson_sections_artifact_id_artifacts_id_fk",
1047
+ "tableFrom": "lesson_sections",
1048
+ "tableTo": "artifacts",
1049
+ "columnsFrom": [
1050
+ "artifact_id"
1051
+ ],
1052
+ "columnsTo": [
1053
+ "id"
1054
+ ],
1055
+ "onDelete": "cascade",
1056
+ "onUpdate": "no action"
1057
+ }
1058
+ },
1059
+ "compositePrimaryKeys": {},
1060
+ "uniqueConstraints": {},
1061
+ "checkConstraints": {}
1062
+ },
1063
+ "lesson_versions": {
1064
+ "name": "lesson_versions",
1065
+ "columns": {
1066
+ "id": {
1067
+ "name": "id",
1068
+ "type": "text",
1069
+ "primaryKey": true,
1070
+ "notNull": true,
1071
+ "autoincrement": false
1072
+ },
1073
+ "lesson_id": {
1074
+ "name": "lesson_id",
1075
+ "type": "text",
1076
+ "primaryKey": false,
1077
+ "notNull": true,
1078
+ "autoincrement": false
1079
+ },
1080
+ "version": {
1081
+ "name": "version",
1082
+ "type": "integer",
1083
+ "primaryKey": false,
1084
+ "notNull": true,
1085
+ "autoincrement": false
1086
+ },
1087
+ "outline": {
1088
+ "name": "outline",
1089
+ "type": "text",
1090
+ "primaryKey": false,
1091
+ "notNull": true,
1092
+ "autoincrement": false
1093
+ },
1094
+ "section_ids": {
1095
+ "name": "section_ids",
1096
+ "type": "text",
1097
+ "primaryKey": false,
1098
+ "notNull": true,
1099
+ "autoincrement": false
1100
+ },
1101
+ "changed_section_ids": {
1102
+ "name": "changed_section_ids",
1103
+ "type": "text",
1104
+ "primaryKey": false,
1105
+ "notNull": true,
1106
+ "autoincrement": false,
1107
+ "default": "'[]'"
1108
+ },
1109
+ "reason": {
1110
+ "name": "reason",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": false,
1114
+ "autoincrement": false
1115
+ },
1116
+ "created_at": {
1117
+ "name": "created_at",
1118
+ "type": "integer",
1119
+ "primaryKey": false,
1120
+ "notNull": true,
1121
+ "autoincrement": false
1122
+ }
1123
+ },
1124
+ "indexes": {
1125
+ "lesson_versions_lesson_version_idx": {
1126
+ "name": "lesson_versions_lesson_version_idx",
1127
+ "columns": [
1128
+ "lesson_id",
1129
+ "version"
1130
+ ],
1131
+ "isUnique": true
1132
+ }
1133
+ },
1134
+ "foreignKeys": {
1135
+ "lesson_versions_lesson_id_lessons_id_fk": {
1136
+ "name": "lesson_versions_lesson_id_lessons_id_fk",
1137
+ "tableFrom": "lesson_versions",
1138
+ "tableTo": "lessons",
1139
+ "columnsFrom": [
1140
+ "lesson_id"
1141
+ ],
1142
+ "columnsTo": [
1143
+ "id"
1144
+ ],
1145
+ "onDelete": "cascade",
1146
+ "onUpdate": "no action"
1147
+ }
1148
+ },
1149
+ "compositePrimaryKeys": {},
1150
+ "uniqueConstraints": {},
1151
+ "checkConstraints": {}
1152
+ },
1153
+ "lessons": {
1154
+ "name": "lessons",
1155
+ "columns": {
1156
+ "id": {
1157
+ "name": "id",
1158
+ "type": "text",
1159
+ "primaryKey": true,
1160
+ "notNull": true,
1161
+ "autoincrement": false
1162
+ },
1163
+ "course_id": {
1164
+ "name": "course_id",
1165
+ "type": "text",
1166
+ "primaryKey": false,
1167
+ "notNull": true,
1168
+ "autoincrement": false
1169
+ },
1170
+ "topic_id": {
1171
+ "name": "topic_id",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": true,
1175
+ "autoincrement": false
1176
+ },
1177
+ "topic_title": {
1178
+ "name": "topic_title",
1179
+ "type": "text",
1180
+ "primaryKey": false,
1181
+ "notNull": true,
1182
+ "autoincrement": false
1183
+ },
1184
+ "position": {
1185
+ "name": "position",
1186
+ "type": "integer",
1187
+ "primaryKey": false,
1188
+ "notNull": true,
1189
+ "autoincrement": false
1190
+ },
1191
+ "session_id": {
1192
+ "name": "session_id",
1193
+ "type": "text",
1194
+ "primaryKey": false,
1195
+ "notNull": true,
1196
+ "autoincrement": false
1197
+ },
1198
+ "status": {
1199
+ "name": "status",
1200
+ "type": "text",
1201
+ "primaryKey": false,
1202
+ "notNull": true,
1203
+ "autoincrement": false
1204
+ },
1205
+ "error": {
1206
+ "name": "error",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": false,
1210
+ "autoincrement": false
1211
+ },
1212
+ "error_action": {
1213
+ "name": "error_action",
1214
+ "type": "text",
1215
+ "primaryKey": false,
1216
+ "notNull": false,
1217
+ "autoincrement": false
1218
+ },
1219
+ "created_at": {
1220
+ "name": "created_at",
1221
+ "type": "integer",
1222
+ "primaryKey": false,
1223
+ "notNull": true,
1224
+ "autoincrement": false
1225
+ },
1226
+ "finished_at": {
1227
+ "name": "finished_at",
1228
+ "type": "integer",
1229
+ "primaryKey": false,
1230
+ "notNull": false,
1231
+ "autoincrement": false
1232
+ }
1233
+ },
1234
+ "indexes": {
1235
+ "lessons_course_topic_idx": {
1236
+ "name": "lessons_course_topic_idx",
1237
+ "columns": [
1238
+ "course_id",
1239
+ "topic_id"
1240
+ ],
1241
+ "isUnique": true
1242
+ },
1243
+ "lessons_session_idx": {
1244
+ "name": "lessons_session_idx",
1245
+ "columns": [
1246
+ "session_id"
1247
+ ],
1248
+ "isUnique": true
1249
+ }
1250
+ },
1251
+ "foreignKeys": {
1252
+ "lessons_course_id_courses_id_fk": {
1253
+ "name": "lessons_course_id_courses_id_fk",
1254
+ "tableFrom": "lessons",
1255
+ "tableTo": "courses",
1256
+ "columnsFrom": [
1257
+ "course_id"
1258
+ ],
1259
+ "columnsTo": [
1260
+ "id"
1261
+ ],
1262
+ "onDelete": "cascade",
1263
+ "onUpdate": "no action"
1264
+ },
1265
+ "lessons_session_id_sessions_id_fk": {
1266
+ "name": "lessons_session_id_sessions_id_fk",
1267
+ "tableFrom": "lessons",
1268
+ "tableTo": "sessions",
1269
+ "columnsFrom": [
1270
+ "session_id"
1271
+ ],
1272
+ "columnsTo": [
1273
+ "id"
1274
+ ],
1275
+ "onDelete": "cascade",
1276
+ "onUpdate": "no action"
1277
+ }
1278
+ },
1279
+ "compositePrimaryKeys": {},
1280
+ "uniqueConstraints": {},
1281
+ "checkConstraints": {}
1282
+ },
1283
+ "memories": {
1284
+ "name": "memories",
1285
+ "columns": {
1286
+ "id": {
1287
+ "name": "id",
1288
+ "type": "text",
1289
+ "primaryKey": true,
1290
+ "notNull": true,
1291
+ "autoincrement": false
1292
+ },
1293
+ "kind": {
1294
+ "name": "kind",
1295
+ "type": "text",
1296
+ "primaryKey": false,
1297
+ "notNull": true,
1298
+ "autoincrement": false
1299
+ },
1300
+ "text": {
1301
+ "name": "text",
1302
+ "type": "text",
1303
+ "primaryKey": false,
1304
+ "notNull": true,
1305
+ "autoincrement": false
1306
+ },
1307
+ "concept": {
1308
+ "name": "concept",
1309
+ "type": "text",
1310
+ "primaryKey": false,
1311
+ "notNull": false,
1312
+ "autoincrement": false
1313
+ },
1314
+ "basis": {
1315
+ "name": "basis",
1316
+ "type": "text",
1317
+ "primaryKey": false,
1318
+ "notNull": true,
1319
+ "autoincrement": false
1320
+ },
1321
+ "attempt_id": {
1322
+ "name": "attempt_id",
1323
+ "type": "text",
1324
+ "primaryKey": false,
1325
+ "notNull": false,
1326
+ "autoincrement": false
1327
+ },
1328
+ "session_id": {
1329
+ "name": "session_id",
1330
+ "type": "text",
1331
+ "primaryKey": false,
1332
+ "notNull": false,
1333
+ "autoincrement": false
1334
+ },
1335
+ "run_id": {
1336
+ "name": "run_id",
1337
+ "type": "text",
1338
+ "primaryKey": false,
1339
+ "notNull": false,
1340
+ "autoincrement": false
1341
+ },
1342
+ "status": {
1343
+ "name": "status",
1344
+ "type": "text",
1345
+ "primaryKey": false,
1346
+ "notNull": true,
1347
+ "autoincrement": false
1348
+ },
1349
+ "replaces_id": {
1350
+ "name": "replaces_id",
1351
+ "type": "text",
1352
+ "primaryKey": false,
1353
+ "notNull": false,
1354
+ "autoincrement": false
1355
+ },
1356
+ "note_id": {
1357
+ "name": "note_id",
1358
+ "type": "text",
1359
+ "primaryKey": false,
1360
+ "notNull": false,
1361
+ "autoincrement": false
1362
+ },
1363
+ "created_at": {
1364
+ "name": "created_at",
1365
+ "type": "integer",
1366
+ "primaryKey": false,
1367
+ "notNull": true,
1368
+ "autoincrement": false
1369
+ },
1370
+ "edited_at": {
1371
+ "name": "edited_at",
1372
+ "type": "integer",
1373
+ "primaryKey": false,
1374
+ "notNull": false,
1375
+ "autoincrement": false
1376
+ }
1377
+ },
1378
+ "indexes": {
1379
+ "memories_status_idx": {
1380
+ "name": "memories_status_idx",
1381
+ "columns": [
1382
+ "status",
1383
+ "created_at"
1384
+ ],
1385
+ "isUnique": false
1386
+ },
1387
+ "memories_run_idx": {
1388
+ "name": "memories_run_idx",
1389
+ "columns": [
1390
+ "run_id"
1391
+ ],
1392
+ "isUnique": false
1393
+ },
1394
+ "memories_note_idx": {
1395
+ "name": "memories_note_idx",
1396
+ "columns": [
1397
+ "note_id"
1398
+ ],
1399
+ "isUnique": false
1400
+ }
1401
+ },
1402
+ "foreignKeys": {
1403
+ "memories_attempt_id_attempts_id_fk": {
1404
+ "name": "memories_attempt_id_attempts_id_fk",
1405
+ "tableFrom": "memories",
1406
+ "tableTo": "attempts",
1407
+ "columnsFrom": [
1408
+ "attempt_id"
1409
+ ],
1410
+ "columnsTo": [
1411
+ "id"
1412
+ ],
1413
+ "onDelete": "set null",
1414
+ "onUpdate": "no action"
1415
+ },
1416
+ "memories_session_id_sessions_id_fk": {
1417
+ "name": "memories_session_id_sessions_id_fk",
1418
+ "tableFrom": "memories",
1419
+ "tableTo": "sessions",
1420
+ "columnsFrom": [
1421
+ "session_id"
1422
+ ],
1423
+ "columnsTo": [
1424
+ "id"
1425
+ ],
1426
+ "onDelete": "set null",
1427
+ "onUpdate": "no action"
1428
+ },
1429
+ "memories_run_id_runs_id_fk": {
1430
+ "name": "memories_run_id_runs_id_fk",
1431
+ "tableFrom": "memories",
1432
+ "tableTo": "runs",
1433
+ "columnsFrom": [
1434
+ "run_id"
1435
+ ],
1436
+ "columnsTo": [
1437
+ "id"
1438
+ ],
1439
+ "onDelete": "set null",
1440
+ "onUpdate": "no action"
1441
+ },
1442
+ "memories_note_id_notes_id_fk": {
1443
+ "name": "memories_note_id_notes_id_fk",
1444
+ "tableFrom": "memories",
1445
+ "tableTo": "notes",
1446
+ "columnsFrom": [
1447
+ "note_id"
1448
+ ],
1449
+ "columnsTo": [
1450
+ "id"
1451
+ ],
1452
+ "onDelete": "cascade",
1453
+ "onUpdate": "no action"
1454
+ }
1455
+ },
1456
+ "compositePrimaryKeys": {},
1457
+ "uniqueConstraints": {},
1458
+ "checkConstraints": {}
1459
+ },
1460
+ "memory_sources": {
1461
+ "name": "memory_sources",
1462
+ "columns": {
1463
+ "memory_id": {
1464
+ "name": "memory_id",
1465
+ "type": "text",
1466
+ "primaryKey": false,
1467
+ "notNull": true,
1468
+ "autoincrement": false
1469
+ },
1470
+ "note_id": {
1471
+ "name": "note_id",
1472
+ "type": "text",
1473
+ "primaryKey": false,
1474
+ "notNull": true,
1475
+ "autoincrement": false
1476
+ },
1477
+ "text": {
1478
+ "name": "text",
1479
+ "type": "text",
1480
+ "primaryKey": false,
1481
+ "notNull": true,
1482
+ "autoincrement": false
1483
+ }
1484
+ },
1485
+ "indexes": {
1486
+ "memory_sources_note_idx": {
1487
+ "name": "memory_sources_note_idx",
1488
+ "columns": [
1489
+ "note_id"
1490
+ ],
1491
+ "isUnique": false
1492
+ }
1493
+ },
1494
+ "foreignKeys": {
1495
+ "memory_sources_memory_id_memories_id_fk": {
1496
+ "name": "memory_sources_memory_id_memories_id_fk",
1497
+ "tableFrom": "memory_sources",
1498
+ "tableTo": "memories",
1499
+ "columnsFrom": [
1500
+ "memory_id"
1501
+ ],
1502
+ "columnsTo": [
1503
+ "id"
1504
+ ],
1505
+ "onDelete": "cascade",
1506
+ "onUpdate": "no action"
1507
+ },
1508
+ "memory_sources_note_id_notes_id_fk": {
1509
+ "name": "memory_sources_note_id_notes_id_fk",
1510
+ "tableFrom": "memory_sources",
1511
+ "tableTo": "notes",
1512
+ "columnsFrom": [
1513
+ "note_id"
1514
+ ],
1515
+ "columnsTo": [
1516
+ "id"
1517
+ ],
1518
+ "onDelete": "cascade",
1519
+ "onUpdate": "no action"
1520
+ }
1521
+ },
1522
+ "compositePrimaryKeys": {
1523
+ "memory_sources_memory_id_note_id_pk": {
1524
+ "columns": [
1525
+ "memory_id",
1526
+ "note_id"
1527
+ ],
1528
+ "name": "memory_sources_memory_id_note_id_pk"
1529
+ }
1530
+ },
1531
+ "uniqueConstraints": {},
1532
+ "checkConstraints": {}
1533
+ },
1534
+ "messages": {
1535
+ "name": "messages",
1536
+ "columns": {
1537
+ "id": {
1538
+ "name": "id",
1539
+ "type": "text",
1540
+ "primaryKey": true,
1541
+ "notNull": true,
1542
+ "autoincrement": false
1543
+ },
1544
+ "session_id": {
1545
+ "name": "session_id",
1546
+ "type": "text",
1547
+ "primaryKey": false,
1548
+ "notNull": true,
1549
+ "autoincrement": false
1550
+ },
1551
+ "seq": {
1552
+ "name": "seq",
1553
+ "type": "integer",
1554
+ "primaryKey": false,
1555
+ "notNull": true,
1556
+ "autoincrement": false
1557
+ },
1558
+ "role": {
1559
+ "name": "role",
1560
+ "type": "text",
1561
+ "primaryKey": false,
1562
+ "notNull": true,
1563
+ "autoincrement": false
1564
+ },
1565
+ "parts": {
1566
+ "name": "parts",
1567
+ "type": "text",
1568
+ "primaryKey": false,
1569
+ "notNull": true,
1570
+ "autoincrement": false
1571
+ },
1572
+ "created_at": {
1573
+ "name": "created_at",
1574
+ "type": "integer",
1575
+ "primaryKey": false,
1576
+ "notNull": true,
1577
+ "autoincrement": false
1578
+ }
1579
+ },
1580
+ "indexes": {
1581
+ "messages_session_seq_idx": {
1582
+ "name": "messages_session_seq_idx",
1583
+ "columns": [
1584
+ "session_id",
1585
+ "seq"
1586
+ ],
1587
+ "isUnique": true
1588
+ }
1589
+ },
1590
+ "foreignKeys": {
1591
+ "messages_session_id_sessions_id_fk": {
1592
+ "name": "messages_session_id_sessions_id_fk",
1593
+ "tableFrom": "messages",
1594
+ "tableTo": "sessions",
1595
+ "columnsFrom": [
1596
+ "session_id"
1597
+ ],
1598
+ "columnsTo": [
1599
+ "id"
1600
+ ],
1601
+ "onDelete": "cascade",
1602
+ "onUpdate": "no action"
1603
+ }
1604
+ },
1605
+ "compositePrimaryKeys": {},
1606
+ "uniqueConstraints": {},
1607
+ "checkConstraints": {}
1608
+ },
1609
+ "note_chunks": {
1610
+ "name": "note_chunks",
1611
+ "columns": {
1612
+ "id": {
1613
+ "name": "id",
1614
+ "type": "integer",
1615
+ "primaryKey": true,
1616
+ "notNull": true,
1617
+ "autoincrement": true
1618
+ },
1619
+ "note_id": {
1620
+ "name": "note_id",
1621
+ "type": "text",
1622
+ "primaryKey": false,
1623
+ "notNull": true,
1624
+ "autoincrement": false
1625
+ },
1626
+ "seq": {
1627
+ "name": "seq",
1628
+ "type": "integer",
1629
+ "primaryKey": false,
1630
+ "notNull": true,
1631
+ "autoincrement": false
1632
+ },
1633
+ "heading": {
1634
+ "name": "heading",
1635
+ "type": "text",
1636
+ "primaryKey": false,
1637
+ "notNull": false,
1638
+ "autoincrement": false
1639
+ },
1640
+ "text": {
1641
+ "name": "text",
1642
+ "type": "text",
1643
+ "primaryKey": false,
1644
+ "notNull": true,
1645
+ "autoincrement": false
1646
+ }
1647
+ },
1648
+ "indexes": {
1649
+ "note_chunks_note_seq_idx": {
1650
+ "name": "note_chunks_note_seq_idx",
1651
+ "columns": [
1652
+ "note_id",
1653
+ "seq"
1654
+ ],
1655
+ "isUnique": true
1656
+ }
1657
+ },
1658
+ "foreignKeys": {
1659
+ "note_chunks_note_id_notes_id_fk": {
1660
+ "name": "note_chunks_note_id_notes_id_fk",
1661
+ "tableFrom": "note_chunks",
1662
+ "tableTo": "notes",
1663
+ "columnsFrom": [
1664
+ "note_id"
1665
+ ],
1666
+ "columnsTo": [
1667
+ "id"
1668
+ ],
1669
+ "onDelete": "cascade",
1670
+ "onUpdate": "no action"
1671
+ }
1672
+ },
1673
+ "compositePrimaryKeys": {},
1674
+ "uniqueConstraints": {},
1675
+ "checkConstraints": {}
1676
+ },
1677
+ "note_links": {
1678
+ "name": "note_links",
1679
+ "columns": {
1680
+ "note_id": {
1681
+ "name": "note_id",
1682
+ "type": "text",
1683
+ "primaryKey": false,
1684
+ "notNull": true,
1685
+ "autoincrement": false
1686
+ },
1687
+ "target": {
1688
+ "name": "target",
1689
+ "type": "text",
1690
+ "primaryKey": false,
1691
+ "notNull": true,
1692
+ "autoincrement": false
1693
+ },
1694
+ "target_key": {
1695
+ "name": "target_key",
1696
+ "type": "text",
1697
+ "primaryKey": false,
1698
+ "notNull": true,
1699
+ "autoincrement": false,
1700
+ "default": "''"
1701
+ },
1702
+ "kind": {
1703
+ "name": "kind",
1704
+ "type": "text",
1705
+ "primaryKey": false,
1706
+ "notNull": true,
1707
+ "autoincrement": false
1708
+ }
1709
+ },
1710
+ "indexes": {
1711
+ "note_links_target_key_idx": {
1712
+ "name": "note_links_target_key_idx",
1713
+ "columns": [
1714
+ "target_key"
1715
+ ],
1716
+ "isUnique": false
1717
+ }
1718
+ },
1719
+ "foreignKeys": {
1720
+ "note_links_note_id_notes_id_fk": {
1721
+ "name": "note_links_note_id_notes_id_fk",
1722
+ "tableFrom": "note_links",
1723
+ "tableTo": "notes",
1724
+ "columnsFrom": [
1725
+ "note_id"
1726
+ ],
1727
+ "columnsTo": [
1728
+ "id"
1729
+ ],
1730
+ "onDelete": "cascade",
1731
+ "onUpdate": "no action"
1732
+ }
1733
+ },
1734
+ "compositePrimaryKeys": {
1735
+ "note_links_note_id_target_kind_pk": {
1736
+ "columns": [
1737
+ "note_id",
1738
+ "target",
1739
+ "kind"
1740
+ ],
1741
+ "name": "note_links_note_id_target_kind_pk"
1742
+ }
1743
+ },
1744
+ "uniqueConstraints": {},
1745
+ "checkConstraints": {}
1746
+ },
1747
+ "note_tags": {
1748
+ "name": "note_tags",
1749
+ "columns": {
1750
+ "note_id": {
1751
+ "name": "note_id",
1752
+ "type": "text",
1753
+ "primaryKey": false,
1754
+ "notNull": true,
1755
+ "autoincrement": false
1756
+ },
1757
+ "tag": {
1758
+ "name": "tag",
1759
+ "type": "text",
1760
+ "primaryKey": false,
1761
+ "notNull": true,
1762
+ "autoincrement": false
1763
+ }
1764
+ },
1765
+ "indexes": {
1766
+ "note_tags_tag_idx": {
1767
+ "name": "note_tags_tag_idx",
1768
+ "columns": [
1769
+ "tag"
1770
+ ],
1771
+ "isUnique": false
1772
+ }
1773
+ },
1774
+ "foreignKeys": {
1775
+ "note_tags_note_id_notes_id_fk": {
1776
+ "name": "note_tags_note_id_notes_id_fk",
1777
+ "tableFrom": "note_tags",
1778
+ "tableTo": "notes",
1779
+ "columnsFrom": [
1780
+ "note_id"
1781
+ ],
1782
+ "columnsTo": [
1783
+ "id"
1784
+ ],
1785
+ "onDelete": "cascade",
1786
+ "onUpdate": "no action"
1787
+ }
1788
+ },
1789
+ "compositePrimaryKeys": {
1790
+ "note_tags_note_id_tag_pk": {
1791
+ "columns": [
1792
+ "note_id",
1793
+ "tag"
1794
+ ],
1795
+ "name": "note_tags_note_id_tag_pk"
1796
+ }
1797
+ },
1798
+ "uniqueConstraints": {},
1799
+ "checkConstraints": {}
1800
+ },
1801
+ "notes": {
1802
+ "name": "notes",
1803
+ "columns": {
1804
+ "id": {
1805
+ "name": "id",
1806
+ "type": "text",
1807
+ "primaryKey": true,
1808
+ "notNull": true,
1809
+ "autoincrement": false
1810
+ },
1811
+ "import_id": {
1812
+ "name": "import_id",
1813
+ "type": "text",
1814
+ "primaryKey": false,
1815
+ "notNull": true,
1816
+ "autoincrement": false
1817
+ },
1818
+ "path": {
1819
+ "name": "path",
1820
+ "type": "text",
1821
+ "primaryKey": false,
1822
+ "notNull": true,
1823
+ "autoincrement": false
1824
+ },
1825
+ "title": {
1826
+ "name": "title",
1827
+ "type": "text",
1828
+ "primaryKey": false,
1829
+ "notNull": true,
1830
+ "autoincrement": false
1831
+ },
1832
+ "title_key": {
1833
+ "name": "title_key",
1834
+ "type": "text",
1835
+ "primaryKey": false,
1836
+ "notNull": true,
1837
+ "autoincrement": false
1838
+ },
1839
+ "aliases": {
1840
+ "name": "aliases",
1841
+ "type": "text",
1842
+ "primaryKey": false,
1843
+ "notNull": true,
1844
+ "autoincrement": false
1845
+ },
1846
+ "body": {
1847
+ "name": "body",
1848
+ "type": "text",
1849
+ "primaryKey": false,
1850
+ "notNull": true,
1851
+ "autoincrement": false
1852
+ },
1853
+ "hash": {
1854
+ "name": "hash",
1855
+ "type": "text",
1856
+ "primaryKey": false,
1857
+ "notNull": true,
1858
+ "autoincrement": false
1859
+ },
1860
+ "distilled_hash": {
1861
+ "name": "distilled_hash",
1862
+ "type": "text",
1863
+ "primaryKey": false,
1864
+ "notNull": false,
1865
+ "autoincrement": false
1866
+ },
1867
+ "created_at": {
1868
+ "name": "created_at",
1869
+ "type": "integer",
1870
+ "primaryKey": false,
1871
+ "notNull": true,
1872
+ "autoincrement": false
1873
+ },
1874
+ "updated_at": {
1875
+ "name": "updated_at",
1876
+ "type": "integer",
1877
+ "primaryKey": false,
1878
+ "notNull": true,
1879
+ "autoincrement": false
1880
+ }
1881
+ },
1882
+ "indexes": {
1883
+ "notes_import_path_idx": {
1884
+ "name": "notes_import_path_idx",
1885
+ "columns": [
1886
+ "import_id",
1887
+ "path"
1888
+ ],
1889
+ "isUnique": true
1890
+ },
1891
+ "notes_import_title_idx": {
1892
+ "name": "notes_import_title_idx",
1893
+ "columns": [
1894
+ "import_id",
1895
+ "title_key"
1896
+ ],
1897
+ "isUnique": false
1898
+ }
1899
+ },
1900
+ "foreignKeys": {
1901
+ "notes_import_id_vault_imports_id_fk": {
1902
+ "name": "notes_import_id_vault_imports_id_fk",
1903
+ "tableFrom": "notes",
1904
+ "tableTo": "vault_imports",
1905
+ "columnsFrom": [
1906
+ "import_id"
1907
+ ],
1908
+ "columnsTo": [
1909
+ "id"
1910
+ ],
1911
+ "onDelete": "cascade",
1912
+ "onUpdate": "no action"
1913
+ }
1914
+ },
1915
+ "compositePrimaryKeys": {},
1916
+ "uniqueConstraints": {},
1917
+ "checkConstraints": {}
1918
+ },
1919
+ "runs": {
1920
+ "name": "runs",
1921
+ "columns": {
1922
+ "id": {
1923
+ "name": "id",
1924
+ "type": "text",
1925
+ "primaryKey": true,
1926
+ "notNull": true,
1927
+ "autoincrement": false
1928
+ },
1929
+ "session_id": {
1930
+ "name": "session_id",
1931
+ "type": "text",
1932
+ "primaryKey": false,
1933
+ "notNull": true,
1934
+ "autoincrement": false
1935
+ },
1936
+ "user_message_id": {
1937
+ "name": "user_message_id",
1938
+ "type": "text",
1939
+ "primaryKey": false,
1940
+ "notNull": true,
1941
+ "autoincrement": false
1942
+ },
1943
+ "continuation_of": {
1944
+ "name": "continuation_of",
1945
+ "type": "text",
1946
+ "primaryKey": false,
1947
+ "notNull": false,
1948
+ "autoincrement": false
1949
+ },
1950
+ "assistant_message_id": {
1951
+ "name": "assistant_message_id",
1952
+ "type": "text",
1953
+ "primaryKey": false,
1954
+ "notNull": false,
1955
+ "autoincrement": false
1956
+ },
1957
+ "status": {
1958
+ "name": "status",
1959
+ "type": "text",
1960
+ "primaryKey": false,
1961
+ "notNull": true,
1962
+ "autoincrement": false
1963
+ },
1964
+ "model": {
1965
+ "name": "model",
1966
+ "type": "text",
1967
+ "primaryKey": false,
1968
+ "notNull": false,
1969
+ "autoincrement": false
1970
+ },
1971
+ "effort": {
1972
+ "name": "effort",
1973
+ "type": "text",
1974
+ "primaryKey": false,
1975
+ "notNull": false,
1976
+ "autoincrement": false
1977
+ },
1978
+ "endpoint": {
1979
+ "name": "endpoint",
1980
+ "type": "text",
1981
+ "primaryKey": false,
1982
+ "notNull": false,
1983
+ "autoincrement": false
1984
+ },
1985
+ "error": {
1986
+ "name": "error",
1987
+ "type": "text",
1988
+ "primaryKey": false,
1989
+ "notNull": false,
1990
+ "autoincrement": false
1991
+ },
1992
+ "started_at": {
1993
+ "name": "started_at",
1994
+ "type": "integer",
1995
+ "primaryKey": false,
1996
+ "notNull": true,
1997
+ "autoincrement": false
1998
+ },
1999
+ "ended_at": {
2000
+ "name": "ended_at",
2001
+ "type": "integer",
2002
+ "primaryKey": false,
2003
+ "notNull": false,
2004
+ "autoincrement": false
2005
+ }
2006
+ },
2007
+ "indexes": {
2008
+ "runs_continuation_once_idx": {
2009
+ "name": "runs_continuation_once_idx",
2010
+ "columns": [
2011
+ "continuation_of"
2012
+ ],
2013
+ "isUnique": true
2014
+ },
2015
+ "runs_session_idx": {
2016
+ "name": "runs_session_idx",
2017
+ "columns": [
2018
+ "session_id",
2019
+ "started_at"
2020
+ ],
2021
+ "isUnique": false
2022
+ },
2023
+ "runs_one_running_per_session_idx": {
2024
+ "name": "runs_one_running_per_session_idx",
2025
+ "columns": [
2026
+ "session_id"
2027
+ ],
2028
+ "isUnique": true,
2029
+ "where": "\"runs\".\"status\" = 'running'"
2030
+ }
2031
+ },
2032
+ "foreignKeys": {
2033
+ "runs_session_id_sessions_id_fk": {
2034
+ "name": "runs_session_id_sessions_id_fk",
2035
+ "tableFrom": "runs",
2036
+ "tableTo": "sessions",
2037
+ "columnsFrom": [
2038
+ "session_id"
2039
+ ],
2040
+ "columnsTo": [
2041
+ "id"
2042
+ ],
2043
+ "onDelete": "cascade",
2044
+ "onUpdate": "no action"
2045
+ },
2046
+ "runs_user_message_id_messages_id_fk": {
2047
+ "name": "runs_user_message_id_messages_id_fk",
2048
+ "tableFrom": "runs",
2049
+ "tableTo": "messages",
2050
+ "columnsFrom": [
2051
+ "user_message_id"
2052
+ ],
2053
+ "columnsTo": [
2054
+ "id"
2055
+ ],
2056
+ "onDelete": "cascade",
2057
+ "onUpdate": "no action"
2058
+ },
2059
+ "runs_assistant_message_id_messages_id_fk": {
2060
+ "name": "runs_assistant_message_id_messages_id_fk",
2061
+ "tableFrom": "runs",
2062
+ "tableTo": "messages",
2063
+ "columnsFrom": [
2064
+ "assistant_message_id"
2065
+ ],
2066
+ "columnsTo": [
2067
+ "id"
2068
+ ],
2069
+ "onDelete": "set null",
2070
+ "onUpdate": "no action"
2071
+ }
2072
+ },
2073
+ "compositePrimaryKeys": {},
2074
+ "uniqueConstraints": {},
2075
+ "checkConstraints": {}
2076
+ },
2077
+ "sessions": {
2078
+ "name": "sessions",
2079
+ "columns": {
2080
+ "id": {
2081
+ "name": "id",
2082
+ "type": "text",
2083
+ "primaryKey": true,
2084
+ "notNull": true,
2085
+ "autoincrement": false
2086
+ },
2087
+ "title": {
2088
+ "name": "title",
2089
+ "type": "text",
2090
+ "primaryKey": false,
2091
+ "notNull": true,
2092
+ "autoincrement": false
2093
+ },
2094
+ "title_set_by_learner": {
2095
+ "name": "title_set_by_learner",
2096
+ "type": "integer",
2097
+ "primaryKey": false,
2098
+ "notNull": true,
2099
+ "autoincrement": false,
2100
+ "default": false
2101
+ },
2102
+ "created_at": {
2103
+ "name": "created_at",
2104
+ "type": "integer",
2105
+ "primaryKey": false,
2106
+ "notNull": true,
2107
+ "autoincrement": false
2108
+ },
2109
+ "updated_at": {
2110
+ "name": "updated_at",
2111
+ "type": "integer",
2112
+ "primaryKey": false,
2113
+ "notNull": true,
2114
+ "autoincrement": false
2115
+ }
2116
+ },
2117
+ "indexes": {},
2118
+ "foreignKeys": {},
2119
+ "compositePrimaryKeys": {},
2120
+ "uniqueConstraints": {},
2121
+ "checkConstraints": {}
2122
+ },
2123
+ "settings": {
2124
+ "name": "settings",
2125
+ "columns": {
2126
+ "key": {
2127
+ "name": "key",
2128
+ "type": "text",
2129
+ "primaryKey": true,
2130
+ "notNull": true,
2131
+ "autoincrement": false
2132
+ },
2133
+ "value": {
2134
+ "name": "value",
2135
+ "type": "text",
2136
+ "primaryKey": false,
2137
+ "notNull": true,
2138
+ "autoincrement": false
2139
+ },
2140
+ "updated_at": {
2141
+ "name": "updated_at",
2142
+ "type": "integer",
2143
+ "primaryKey": false,
2144
+ "notNull": true,
2145
+ "autoincrement": false
2146
+ }
2147
+ },
2148
+ "indexes": {},
2149
+ "foreignKeys": {},
2150
+ "compositePrimaryKeys": {},
2151
+ "uniqueConstraints": {},
2152
+ "checkConstraints": {}
2153
+ },
2154
+ "syllabus_versions": {
2155
+ "name": "syllabus_versions",
2156
+ "columns": {
2157
+ "id": {
2158
+ "name": "id",
2159
+ "type": "text",
2160
+ "primaryKey": true,
2161
+ "notNull": true,
2162
+ "autoincrement": false
2163
+ },
2164
+ "course_id": {
2165
+ "name": "course_id",
2166
+ "type": "text",
2167
+ "primaryKey": false,
2168
+ "notNull": true,
2169
+ "autoincrement": false
2170
+ },
2171
+ "version": {
2172
+ "name": "version",
2173
+ "type": "integer",
2174
+ "primaryKey": false,
2175
+ "notNull": true,
2176
+ "autoincrement": false
2177
+ },
2178
+ "topics": {
2179
+ "name": "topics",
2180
+ "type": "text",
2181
+ "primaryKey": false,
2182
+ "notNull": true,
2183
+ "autoincrement": false
2184
+ },
2185
+ "known": {
2186
+ "name": "known",
2187
+ "type": "text",
2188
+ "primaryKey": false,
2189
+ "notNull": true,
2190
+ "autoincrement": false
2191
+ },
2192
+ "source": {
2193
+ "name": "source",
2194
+ "type": "text",
2195
+ "primaryKey": false,
2196
+ "notNull": true,
2197
+ "autoincrement": false,
2198
+ "default": "'interview'"
2199
+ },
2200
+ "trigger_lesson_id": {
2201
+ "name": "trigger_lesson_id",
2202
+ "type": "text",
2203
+ "primaryKey": false,
2204
+ "notNull": false,
2205
+ "autoincrement": false
2206
+ },
2207
+ "reason": {
2208
+ "name": "reason",
2209
+ "type": "text",
2210
+ "primaryKey": false,
2211
+ "notNull": false,
2212
+ "autoincrement": false
2213
+ },
2214
+ "changed_topic_ids": {
2215
+ "name": "changed_topic_ids",
2216
+ "type": "text",
2217
+ "primaryKey": false,
2218
+ "notNull": true,
2219
+ "autoincrement": false,
2220
+ "default": "'[]'"
2221
+ },
2222
+ "run_id": {
2223
+ "name": "run_id",
2224
+ "type": "text",
2225
+ "primaryKey": false,
2226
+ "notNull": false,
2227
+ "autoincrement": false
2228
+ },
2229
+ "created_at": {
2230
+ "name": "created_at",
2231
+ "type": "integer",
2232
+ "primaryKey": false,
2233
+ "notNull": true,
2234
+ "autoincrement": false
2235
+ }
2236
+ },
2237
+ "indexes": {
2238
+ "syllabus_versions_course_version_idx": {
2239
+ "name": "syllabus_versions_course_version_idx",
2240
+ "columns": [
2241
+ "course_id",
2242
+ "version"
2243
+ ],
2244
+ "isUnique": true
2245
+ }
2246
+ },
2247
+ "foreignKeys": {
2248
+ "syllabus_versions_course_id_courses_id_fk": {
2249
+ "name": "syllabus_versions_course_id_courses_id_fk",
2250
+ "tableFrom": "syllabus_versions",
2251
+ "tableTo": "courses",
2252
+ "columnsFrom": [
2253
+ "course_id"
2254
+ ],
2255
+ "columnsTo": [
2256
+ "id"
2257
+ ],
2258
+ "onDelete": "cascade",
2259
+ "onUpdate": "no action"
2260
+ },
2261
+ "syllabus_versions_run_id_runs_id_fk": {
2262
+ "name": "syllabus_versions_run_id_runs_id_fk",
2263
+ "tableFrom": "syllabus_versions",
2264
+ "tableTo": "runs",
2265
+ "columnsFrom": [
2266
+ "run_id"
2267
+ ],
2268
+ "columnsTo": [
2269
+ "id"
2270
+ ],
2271
+ "onDelete": "set null",
2272
+ "onUpdate": "no action"
2273
+ }
2274
+ },
2275
+ "compositePrimaryKeys": {},
2276
+ "uniqueConstraints": {},
2277
+ "checkConstraints": {}
2278
+ },
2279
+ "usage_records": {
2280
+ "name": "usage_records",
2281
+ "columns": {
2282
+ "id": {
2283
+ "name": "id",
2284
+ "type": "text",
2285
+ "primaryKey": true,
2286
+ "notNull": true,
2287
+ "autoincrement": false
2288
+ },
2289
+ "kind": {
2290
+ "name": "kind",
2291
+ "type": "text",
2292
+ "primaryKey": false,
2293
+ "notNull": true,
2294
+ "autoincrement": false
2295
+ },
2296
+ "status": {
2297
+ "name": "status",
2298
+ "type": "text",
2299
+ "primaryKey": false,
2300
+ "notNull": true,
2301
+ "autoincrement": false
2302
+ },
2303
+ "session_id": {
2304
+ "name": "session_id",
2305
+ "type": "text",
2306
+ "primaryKey": false,
2307
+ "notNull": false,
2308
+ "autoincrement": false
2309
+ },
2310
+ "run_id": {
2311
+ "name": "run_id",
2312
+ "type": "text",
2313
+ "primaryKey": false,
2314
+ "notNull": false,
2315
+ "autoincrement": false
2316
+ },
2317
+ "seq": {
2318
+ "name": "seq",
2319
+ "type": "integer",
2320
+ "primaryKey": false,
2321
+ "notNull": true,
2322
+ "autoincrement": false
2323
+ },
2324
+ "provider": {
2325
+ "name": "provider",
2326
+ "type": "text",
2327
+ "primaryKey": false,
2328
+ "notNull": true,
2329
+ "autoincrement": false
2330
+ },
2331
+ "provider_label": {
2332
+ "name": "provider_label",
2333
+ "type": "text",
2334
+ "primaryKey": false,
2335
+ "notNull": true,
2336
+ "autoincrement": false
2337
+ },
2338
+ "model": {
2339
+ "name": "model",
2340
+ "type": "text",
2341
+ "primaryKey": false,
2342
+ "notNull": true,
2343
+ "autoincrement": false
2344
+ },
2345
+ "model_label": {
2346
+ "name": "model_label",
2347
+ "type": "text",
2348
+ "primaryKey": false,
2349
+ "notNull": false,
2350
+ "autoincrement": false
2351
+ },
2352
+ "effort": {
2353
+ "name": "effort",
2354
+ "type": "text",
2355
+ "primaryKey": false,
2356
+ "notNull": false,
2357
+ "autoincrement": false
2358
+ },
2359
+ "billing": {
2360
+ "name": "billing",
2361
+ "type": "text",
2362
+ "primaryKey": false,
2363
+ "notNull": true,
2364
+ "autoincrement": false
2365
+ },
2366
+ "input_tokens": {
2367
+ "name": "input_tokens",
2368
+ "type": "integer",
2369
+ "primaryKey": false,
2370
+ "notNull": false,
2371
+ "autoincrement": false
2372
+ },
2373
+ "input_no_cache_tokens": {
2374
+ "name": "input_no_cache_tokens",
2375
+ "type": "integer",
2376
+ "primaryKey": false,
2377
+ "notNull": false,
2378
+ "autoincrement": false
2379
+ },
2380
+ "input_cache_read_tokens": {
2381
+ "name": "input_cache_read_tokens",
2382
+ "type": "integer",
2383
+ "primaryKey": false,
2384
+ "notNull": false,
2385
+ "autoincrement": false
2386
+ },
2387
+ "input_cache_write_tokens": {
2388
+ "name": "input_cache_write_tokens",
2389
+ "type": "integer",
2390
+ "primaryKey": false,
2391
+ "notNull": false,
2392
+ "autoincrement": false
2393
+ },
2394
+ "output_tokens": {
2395
+ "name": "output_tokens",
2396
+ "type": "integer",
2397
+ "primaryKey": false,
2398
+ "notNull": false,
2399
+ "autoincrement": false
2400
+ },
2401
+ "output_reasoning_tokens": {
2402
+ "name": "output_reasoning_tokens",
2403
+ "type": "integer",
2404
+ "primaryKey": false,
2405
+ "notNull": false,
2406
+ "autoincrement": false
2407
+ },
2408
+ "reported_cost": {
2409
+ "name": "reported_cost",
2410
+ "type": "real",
2411
+ "primaryKey": false,
2412
+ "notNull": false,
2413
+ "autoincrement": false
2414
+ },
2415
+ "price": {
2416
+ "name": "price",
2417
+ "type": "text",
2418
+ "primaryKey": false,
2419
+ "notNull": false,
2420
+ "autoincrement": false
2421
+ },
2422
+ "estimated_cost": {
2423
+ "name": "estimated_cost",
2424
+ "type": "real",
2425
+ "primaryKey": false,
2426
+ "notNull": false,
2427
+ "autoincrement": false
2428
+ },
2429
+ "started_at": {
2430
+ "name": "started_at",
2431
+ "type": "integer",
2432
+ "primaryKey": false,
2433
+ "notNull": true,
2434
+ "autoincrement": false
2435
+ },
2436
+ "ended_at": {
2437
+ "name": "ended_at",
2438
+ "type": "integer",
2439
+ "primaryKey": false,
2440
+ "notNull": true,
2441
+ "autoincrement": false
2442
+ }
2443
+ },
2444
+ "indexes": {
2445
+ "usage_records_started_idx": {
2446
+ "name": "usage_records_started_idx",
2447
+ "columns": [
2448
+ "started_at"
2449
+ ],
2450
+ "isUnique": false
2451
+ },
2452
+ "usage_records_run_idx": {
2453
+ "name": "usage_records_run_idx",
2454
+ "columns": [
2455
+ "run_id"
2456
+ ],
2457
+ "isUnique": false
2458
+ }
2459
+ },
2460
+ "foreignKeys": {},
2461
+ "compositePrimaryKeys": {},
2462
+ "uniqueConstraints": {},
2463
+ "checkConstraints": {}
2464
+ },
2465
+ "vault_imports": {
2466
+ "name": "vault_imports",
2467
+ "columns": {
2468
+ "id": {
2469
+ "name": "id",
2470
+ "type": "text",
2471
+ "primaryKey": true,
2472
+ "notNull": true,
2473
+ "autoincrement": false
2474
+ },
2475
+ "name": {
2476
+ "name": "name",
2477
+ "type": "text",
2478
+ "primaryKey": false,
2479
+ "notNull": true,
2480
+ "autoincrement": false
2481
+ },
2482
+ "source": {
2483
+ "name": "source",
2484
+ "type": "text",
2485
+ "primaryKey": false,
2486
+ "notNull": true,
2487
+ "autoincrement": false
2488
+ },
2489
+ "created_at": {
2490
+ "name": "created_at",
2491
+ "type": "integer",
2492
+ "primaryKey": false,
2493
+ "notNull": true,
2494
+ "autoincrement": false
2495
+ },
2496
+ "updated_at": {
2497
+ "name": "updated_at",
2498
+ "type": "integer",
2499
+ "primaryKey": false,
2500
+ "notNull": true,
2501
+ "autoincrement": false
2502
+ }
2503
+ },
2504
+ "indexes": {
2505
+ "vault_imports_name_idx": {
2506
+ "name": "vault_imports_name_idx",
2507
+ "columns": [
2508
+ "name"
2509
+ ],
2510
+ "isUnique": true
2511
+ }
2512
+ },
2513
+ "foreignKeys": {},
2514
+ "compositePrimaryKeys": {},
2515
+ "uniqueConstraints": {},
2516
+ "checkConstraints": {}
2517
+ }
2518
+ },
2519
+ "views": {},
2520
+ "enums": {},
2521
+ "_meta": {
2522
+ "schemas": {},
2523
+ "tables": {},
2524
+ "columns": {}
2525
+ },
2526
+ "internal": {
2527
+ "indexes": {}
2528
+ }
2529
+ }