@okhay-p/mivra 0.1.5 → 0.1.6

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 (44) hide show
  1. package/README.md +1 -0
  2. package/THIRD_PARTY_NOTICES.md +250 -0
  3. package/dist/chunk-B47HA6IQ.js +2294 -0
  4. package/dist/chunk-B47HA6IQ.js.map +7 -0
  5. package/dist/{chunk-ODFBAPPH.js → chunk-DYXNHODU.js} +9 -3
  6. package/dist/chunk-DYXNHODU.js.map +7 -0
  7. package/dist/{chunk-KUKQU7EQ.js → chunk-VHOVRHI3.js} +38 -10
  8. package/dist/{chunk-KUKQU7EQ.js.map → chunk-VHOVRHI3.js.map} +2 -2
  9. package/dist/cli.js +726 -49
  10. package/dist/cli.js.map +4 -4
  11. package/dist/{client-5YDLS4KV.js → client-4UG5W5NJ.js} +2 -2
  12. package/dist/exercise-child.js +37 -0
  13. package/dist/exercise-child.js.map +7 -0
  14. package/dist/extract-child.js +1 -1
  15. package/dist/python-child.js +51 -0
  16. package/dist/python-child.js.map +7 -0
  17. package/dist/{start-2RXX57ZZ.js → start-SX3BCBIN.js} +1204 -236
  18. package/dist/start-SX3BCBIN.js.map +7 -0
  19. package/drizzle/0019_public_doctor_faustus.sql +1 -0
  20. package/drizzle/0020_early_wolfpack.sql +3 -0
  21. package/drizzle/meta/0019_snapshot.json +2288 -0
  22. package/drizzle/meta/0020_snapshot.json +2297 -0
  23. package/drizzle/meta/_journal.json +14 -0
  24. package/package.json +6 -1
  25. package/web/assets/emscripten-module-uFzwHH0Y.wasm +0 -0
  26. package/web/assets/emscripten-module.browser-D72eEgXo.js +1 -0
  27. package/web/assets/exercise-workers/exercise.worker-DzC1lTCg.js +265 -0
  28. package/web/assets/exercise-workers/python-exercise.worker-CtSr-syJ.js +236 -0
  29. package/web/assets/ffi-4V2b7xu3.js +1 -0
  30. package/web/assets/index-D3M-SX0V.js +538 -0
  31. package/web/assets/index-DUFQVtIh.css +1 -0
  32. package/web/assets/module-ES6BEMUI-Chb6aYUZ.js +1 -0
  33. package/web/assets/notes-graph.worker-Dqb5HK34.js +1 -0
  34. package/web/assets/render.worker-D6KYAHiU.js +537 -0
  35. package/web/index.html +2 -2
  36. package/dist/chunk-ODFBAPPH.js.map +0 -7
  37. package/dist/chunk-YACRW47X.js +0 -1203
  38. package/dist/chunk-YACRW47X.js.map +0 -7
  39. package/dist/start-2RXX57ZZ.js.map +0 -7
  40. package/web/assets/index-DJ2D5ZXo.css +0 -1
  41. package/web/assets/index-DcYzUL1W.js +0 -413
  42. package/web/assets/notes-graph.worker-DaVQvftJ.js +0 -1
  43. package/web/assets/render.worker-BAfybD27.js +0 -416
  44. /package/dist/{client-5YDLS4KV.js.map → client-4UG5W5NJ.js.map} +0 -0
@@ -0,0 +1,2297 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "1ca53cca-e209-4ab5-87e2-cd0ce4cf625d",
5
+ "prevId": "2b09bd3c-6d83-456b-8281-68874a346001",
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_sources": {
346
+ "name": "concept_sources",
347
+ "columns": {
348
+ "concept_id": {
349
+ "name": "concept_id",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": true,
353
+ "autoincrement": false
354
+ },
355
+ "note_id": {
356
+ "name": "note_id",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ }
362
+ },
363
+ "indexes": {
364
+ "concept_sources_note_idx": {
365
+ "name": "concept_sources_note_idx",
366
+ "columns": [
367
+ "note_id"
368
+ ],
369
+ "isUnique": false
370
+ }
371
+ },
372
+ "foreignKeys": {
373
+ "concept_sources_concept_id_concepts_id_fk": {
374
+ "name": "concept_sources_concept_id_concepts_id_fk",
375
+ "tableFrom": "concept_sources",
376
+ "tableTo": "concepts",
377
+ "columnsFrom": [
378
+ "concept_id"
379
+ ],
380
+ "columnsTo": [
381
+ "id"
382
+ ],
383
+ "onDelete": "cascade",
384
+ "onUpdate": "no action"
385
+ },
386
+ "concept_sources_note_id_notes_id_fk": {
387
+ "name": "concept_sources_note_id_notes_id_fk",
388
+ "tableFrom": "concept_sources",
389
+ "tableTo": "notes",
390
+ "columnsFrom": [
391
+ "note_id"
392
+ ],
393
+ "columnsTo": [
394
+ "id"
395
+ ],
396
+ "onDelete": "cascade",
397
+ "onUpdate": "no action"
398
+ }
399
+ },
400
+ "compositePrimaryKeys": {
401
+ "concept_sources_concept_id_note_id_pk": {
402
+ "columns": [
403
+ "concept_id",
404
+ "note_id"
405
+ ],
406
+ "name": "concept_sources_concept_id_note_id_pk"
407
+ }
408
+ },
409
+ "uniqueConstraints": {},
410
+ "checkConstraints": {}
411
+ },
412
+ "concepts": {
413
+ "name": "concepts",
414
+ "columns": {
415
+ "id": {
416
+ "name": "id",
417
+ "type": "text",
418
+ "primaryKey": true,
419
+ "notNull": true,
420
+ "autoincrement": false
421
+ },
422
+ "key": {
423
+ "name": "key",
424
+ "type": "text",
425
+ "primaryKey": false,
426
+ "notNull": true,
427
+ "autoincrement": false
428
+ },
429
+ "name": {
430
+ "name": "name",
431
+ "type": "text",
432
+ "primaryKey": false,
433
+ "notNull": true,
434
+ "autoincrement": false
435
+ },
436
+ "created_at": {
437
+ "name": "created_at",
438
+ "type": "integer",
439
+ "primaryKey": false,
440
+ "notNull": true,
441
+ "autoincrement": false
442
+ }
443
+ },
444
+ "indexes": {
445
+ "concepts_key_idx": {
446
+ "name": "concepts_key_idx",
447
+ "columns": [
448
+ "key"
449
+ ],
450
+ "isUnique": true
451
+ }
452
+ },
453
+ "foreignKeys": {},
454
+ "compositePrimaryKeys": {},
455
+ "uniqueConstraints": {},
456
+ "checkConstraints": {}
457
+ },
458
+ "courses": {
459
+ "name": "courses",
460
+ "columns": {
461
+ "id": {
462
+ "name": "id",
463
+ "type": "text",
464
+ "primaryKey": true,
465
+ "notNull": true,
466
+ "autoincrement": false
467
+ },
468
+ "session_id": {
469
+ "name": "session_id",
470
+ "type": "text",
471
+ "primaryKey": false,
472
+ "notNull": true,
473
+ "autoincrement": false
474
+ },
475
+ "goal": {
476
+ "name": "goal",
477
+ "type": "text",
478
+ "primaryKey": false,
479
+ "notNull": true,
480
+ "autoincrement": false
481
+ },
482
+ "kind": {
483
+ "name": "kind",
484
+ "type": "text",
485
+ "primaryKey": false,
486
+ "notNull": true,
487
+ "autoincrement": false,
488
+ "default": "'lessons'"
489
+ },
490
+ "status": {
491
+ "name": "status",
492
+ "type": "text",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "autoincrement": false
496
+ },
497
+ "icon": {
498
+ "name": "icon",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": false,
502
+ "autoincrement": false
503
+ },
504
+ "created_at": {
505
+ "name": "created_at",
506
+ "type": "integer",
507
+ "primaryKey": false,
508
+ "notNull": true,
509
+ "autoincrement": false
510
+ },
511
+ "updated_at": {
512
+ "name": "updated_at",
513
+ "type": "integer",
514
+ "primaryKey": false,
515
+ "notNull": true,
516
+ "autoincrement": false
517
+ }
518
+ },
519
+ "indexes": {
520
+ "courses_session_idx": {
521
+ "name": "courses_session_idx",
522
+ "columns": [
523
+ "session_id"
524
+ ],
525
+ "isUnique": true
526
+ }
527
+ },
528
+ "foreignKeys": {
529
+ "courses_session_id_sessions_id_fk": {
530
+ "name": "courses_session_id_sessions_id_fk",
531
+ "tableFrom": "courses",
532
+ "tableTo": "sessions",
533
+ "columnsFrom": [
534
+ "session_id"
535
+ ],
536
+ "columnsTo": [
537
+ "id"
538
+ ],
539
+ "onDelete": "cascade",
540
+ "onUpdate": "no action"
541
+ }
542
+ },
543
+ "compositePrimaryKeys": {},
544
+ "uniqueConstraints": {},
545
+ "checkConstraints": {}
546
+ },
547
+ "document_chunks": {
548
+ "name": "document_chunks",
549
+ "columns": {
550
+ "id": {
551
+ "name": "id",
552
+ "type": "integer",
553
+ "primaryKey": true,
554
+ "notNull": true,
555
+ "autoincrement": true
556
+ },
557
+ "document_id": {
558
+ "name": "document_id",
559
+ "type": "text",
560
+ "primaryKey": false,
561
+ "notNull": true,
562
+ "autoincrement": false
563
+ },
564
+ "page": {
565
+ "name": "page",
566
+ "type": "integer",
567
+ "primaryKey": false,
568
+ "notNull": true,
569
+ "autoincrement": false
570
+ },
571
+ "seq": {
572
+ "name": "seq",
573
+ "type": "integer",
574
+ "primaryKey": false,
575
+ "notNull": true,
576
+ "autoincrement": false
577
+ },
578
+ "text": {
579
+ "name": "text",
580
+ "type": "text",
581
+ "primaryKey": false,
582
+ "notNull": true,
583
+ "autoincrement": false
584
+ }
585
+ },
586
+ "indexes": {
587
+ "document_chunks_document_seq_idx": {
588
+ "name": "document_chunks_document_seq_idx",
589
+ "columns": [
590
+ "document_id",
591
+ "seq"
592
+ ],
593
+ "isUnique": true
594
+ }
595
+ },
596
+ "foreignKeys": {
597
+ "document_chunks_document_id_documents_id_fk": {
598
+ "name": "document_chunks_document_id_documents_id_fk",
599
+ "tableFrom": "document_chunks",
600
+ "tableTo": "documents",
601
+ "columnsFrom": [
602
+ "document_id"
603
+ ],
604
+ "columnsTo": [
605
+ "id"
606
+ ],
607
+ "onDelete": "cascade",
608
+ "onUpdate": "no action"
609
+ }
610
+ },
611
+ "compositePrimaryKeys": {},
612
+ "uniqueConstraints": {},
613
+ "checkConstraints": {}
614
+ },
615
+ "documents": {
616
+ "name": "documents",
617
+ "columns": {
618
+ "id": {
619
+ "name": "id",
620
+ "type": "text",
621
+ "primaryKey": true,
622
+ "notNull": true,
623
+ "autoincrement": false
624
+ },
625
+ "session_id": {
626
+ "name": "session_id",
627
+ "type": "text",
628
+ "primaryKey": false,
629
+ "notNull": true,
630
+ "autoincrement": false
631
+ },
632
+ "message_id": {
633
+ "name": "message_id",
634
+ "type": "text",
635
+ "primaryKey": false,
636
+ "notNull": false,
637
+ "autoincrement": false
638
+ },
639
+ "filename": {
640
+ "name": "filename",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": true,
644
+ "autoincrement": false
645
+ },
646
+ "kind": {
647
+ "name": "kind",
648
+ "type": "text",
649
+ "primaryKey": false,
650
+ "notNull": true,
651
+ "autoincrement": false
652
+ },
653
+ "byte_size": {
654
+ "name": "byte_size",
655
+ "type": "integer",
656
+ "primaryKey": false,
657
+ "notNull": true,
658
+ "autoincrement": false
659
+ },
660
+ "text_chars": {
661
+ "name": "text_chars",
662
+ "type": "integer",
663
+ "primaryKey": false,
664
+ "notNull": true,
665
+ "autoincrement": false
666
+ },
667
+ "page_count": {
668
+ "name": "page_count",
669
+ "type": "integer",
670
+ "primaryKey": false,
671
+ "notNull": true,
672
+ "autoincrement": false
673
+ },
674
+ "pages_with_text": {
675
+ "name": "pages_with_text",
676
+ "type": "integer",
677
+ "primaryKey": false,
678
+ "notNull": true,
679
+ "autoincrement": false
680
+ },
681
+ "status": {
682
+ "name": "status",
683
+ "type": "text",
684
+ "primaryKey": false,
685
+ "notNull": true,
686
+ "autoincrement": false
687
+ },
688
+ "created_at": {
689
+ "name": "created_at",
690
+ "type": "integer",
691
+ "primaryKey": false,
692
+ "notNull": true,
693
+ "autoincrement": false
694
+ }
695
+ },
696
+ "indexes": {
697
+ "documents_session_idx": {
698
+ "name": "documents_session_idx",
699
+ "columns": [
700
+ "session_id",
701
+ "created_at"
702
+ ],
703
+ "isUnique": false
704
+ }
705
+ },
706
+ "foreignKeys": {
707
+ "documents_session_id_sessions_id_fk": {
708
+ "name": "documents_session_id_sessions_id_fk",
709
+ "tableFrom": "documents",
710
+ "tableTo": "sessions",
711
+ "columnsFrom": [
712
+ "session_id"
713
+ ],
714
+ "columnsTo": [
715
+ "id"
716
+ ],
717
+ "onDelete": "cascade",
718
+ "onUpdate": "no action"
719
+ },
720
+ "documents_message_id_messages_id_fk": {
721
+ "name": "documents_message_id_messages_id_fk",
722
+ "tableFrom": "documents",
723
+ "tableTo": "messages",
724
+ "columnsFrom": [
725
+ "message_id"
726
+ ],
727
+ "columnsTo": [
728
+ "id"
729
+ ],
730
+ "onDelete": "set null",
731
+ "onUpdate": "no action"
732
+ }
733
+ },
734
+ "compositePrimaryKeys": {},
735
+ "uniqueConstraints": {},
736
+ "checkConstraints": {}
737
+ },
738
+ "lesson_sections": {
739
+ "name": "lesson_sections",
740
+ "columns": {
741
+ "id": {
742
+ "name": "id",
743
+ "type": "text",
744
+ "primaryKey": true,
745
+ "notNull": true,
746
+ "autoincrement": false
747
+ },
748
+ "lesson_id": {
749
+ "name": "lesson_id",
750
+ "type": "text",
751
+ "primaryKey": false,
752
+ "notNull": true,
753
+ "autoincrement": false
754
+ },
755
+ "kind": {
756
+ "name": "kind",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": true,
760
+ "autoincrement": false
761
+ },
762
+ "title": {
763
+ "name": "title",
764
+ "type": "text",
765
+ "primaryKey": false,
766
+ "notNull": true,
767
+ "autoincrement": false
768
+ },
769
+ "markdown": {
770
+ "name": "markdown",
771
+ "type": "text",
772
+ "primaryKey": false,
773
+ "notNull": false,
774
+ "autoincrement": false
775
+ },
776
+ "artifact_id": {
777
+ "name": "artifact_id",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": false,
781
+ "autoincrement": false
782
+ },
783
+ "revisits": {
784
+ "name": "revisits",
785
+ "type": "text",
786
+ "primaryKey": false,
787
+ "notNull": true,
788
+ "autoincrement": false,
789
+ "default": "'[]'"
790
+ },
791
+ "created_at": {
792
+ "name": "created_at",
793
+ "type": "integer",
794
+ "primaryKey": false,
795
+ "notNull": true,
796
+ "autoincrement": false
797
+ }
798
+ },
799
+ "indexes": {
800
+ "lesson_sections_lesson_idx": {
801
+ "name": "lesson_sections_lesson_idx",
802
+ "columns": [
803
+ "lesson_id"
804
+ ],
805
+ "isUnique": false
806
+ },
807
+ "lesson_sections_artifact_idx": {
808
+ "name": "lesson_sections_artifact_idx",
809
+ "columns": [
810
+ "artifact_id"
811
+ ],
812
+ "isUnique": true
813
+ }
814
+ },
815
+ "foreignKeys": {
816
+ "lesson_sections_lesson_id_lessons_id_fk": {
817
+ "name": "lesson_sections_lesson_id_lessons_id_fk",
818
+ "tableFrom": "lesson_sections",
819
+ "tableTo": "lessons",
820
+ "columnsFrom": [
821
+ "lesson_id"
822
+ ],
823
+ "columnsTo": [
824
+ "id"
825
+ ],
826
+ "onDelete": "cascade",
827
+ "onUpdate": "no action"
828
+ },
829
+ "lesson_sections_artifact_id_artifacts_id_fk": {
830
+ "name": "lesson_sections_artifact_id_artifacts_id_fk",
831
+ "tableFrom": "lesson_sections",
832
+ "tableTo": "artifacts",
833
+ "columnsFrom": [
834
+ "artifact_id"
835
+ ],
836
+ "columnsTo": [
837
+ "id"
838
+ ],
839
+ "onDelete": "cascade",
840
+ "onUpdate": "no action"
841
+ }
842
+ },
843
+ "compositePrimaryKeys": {},
844
+ "uniqueConstraints": {},
845
+ "checkConstraints": {}
846
+ },
847
+ "lesson_versions": {
848
+ "name": "lesson_versions",
849
+ "columns": {
850
+ "id": {
851
+ "name": "id",
852
+ "type": "text",
853
+ "primaryKey": true,
854
+ "notNull": true,
855
+ "autoincrement": false
856
+ },
857
+ "lesson_id": {
858
+ "name": "lesson_id",
859
+ "type": "text",
860
+ "primaryKey": false,
861
+ "notNull": true,
862
+ "autoincrement": false
863
+ },
864
+ "version": {
865
+ "name": "version",
866
+ "type": "integer",
867
+ "primaryKey": false,
868
+ "notNull": true,
869
+ "autoincrement": false
870
+ },
871
+ "outline": {
872
+ "name": "outline",
873
+ "type": "text",
874
+ "primaryKey": false,
875
+ "notNull": true,
876
+ "autoincrement": false
877
+ },
878
+ "section_ids": {
879
+ "name": "section_ids",
880
+ "type": "text",
881
+ "primaryKey": false,
882
+ "notNull": true,
883
+ "autoincrement": false
884
+ },
885
+ "changed_section_ids": {
886
+ "name": "changed_section_ids",
887
+ "type": "text",
888
+ "primaryKey": false,
889
+ "notNull": true,
890
+ "autoincrement": false,
891
+ "default": "'[]'"
892
+ },
893
+ "reason": {
894
+ "name": "reason",
895
+ "type": "text",
896
+ "primaryKey": false,
897
+ "notNull": false,
898
+ "autoincrement": false
899
+ },
900
+ "created_at": {
901
+ "name": "created_at",
902
+ "type": "integer",
903
+ "primaryKey": false,
904
+ "notNull": true,
905
+ "autoincrement": false
906
+ }
907
+ },
908
+ "indexes": {
909
+ "lesson_versions_lesson_version_idx": {
910
+ "name": "lesson_versions_lesson_version_idx",
911
+ "columns": [
912
+ "lesson_id",
913
+ "version"
914
+ ],
915
+ "isUnique": true
916
+ }
917
+ },
918
+ "foreignKeys": {
919
+ "lesson_versions_lesson_id_lessons_id_fk": {
920
+ "name": "lesson_versions_lesson_id_lessons_id_fk",
921
+ "tableFrom": "lesson_versions",
922
+ "tableTo": "lessons",
923
+ "columnsFrom": [
924
+ "lesson_id"
925
+ ],
926
+ "columnsTo": [
927
+ "id"
928
+ ],
929
+ "onDelete": "cascade",
930
+ "onUpdate": "no action"
931
+ }
932
+ },
933
+ "compositePrimaryKeys": {},
934
+ "uniqueConstraints": {},
935
+ "checkConstraints": {}
936
+ },
937
+ "lessons": {
938
+ "name": "lessons",
939
+ "columns": {
940
+ "id": {
941
+ "name": "id",
942
+ "type": "text",
943
+ "primaryKey": true,
944
+ "notNull": true,
945
+ "autoincrement": false
946
+ },
947
+ "course_id": {
948
+ "name": "course_id",
949
+ "type": "text",
950
+ "primaryKey": false,
951
+ "notNull": true,
952
+ "autoincrement": false
953
+ },
954
+ "topic_id": {
955
+ "name": "topic_id",
956
+ "type": "text",
957
+ "primaryKey": false,
958
+ "notNull": true,
959
+ "autoincrement": false
960
+ },
961
+ "topic_title": {
962
+ "name": "topic_title",
963
+ "type": "text",
964
+ "primaryKey": false,
965
+ "notNull": true,
966
+ "autoincrement": false
967
+ },
968
+ "position": {
969
+ "name": "position",
970
+ "type": "integer",
971
+ "primaryKey": false,
972
+ "notNull": true,
973
+ "autoincrement": false
974
+ },
975
+ "session_id": {
976
+ "name": "session_id",
977
+ "type": "text",
978
+ "primaryKey": false,
979
+ "notNull": true,
980
+ "autoincrement": false
981
+ },
982
+ "status": {
983
+ "name": "status",
984
+ "type": "text",
985
+ "primaryKey": false,
986
+ "notNull": true,
987
+ "autoincrement": false
988
+ },
989
+ "error": {
990
+ "name": "error",
991
+ "type": "text",
992
+ "primaryKey": false,
993
+ "notNull": false,
994
+ "autoincrement": false
995
+ },
996
+ "error_action": {
997
+ "name": "error_action",
998
+ "type": "text",
999
+ "primaryKey": false,
1000
+ "notNull": false,
1001
+ "autoincrement": false
1002
+ },
1003
+ "created_at": {
1004
+ "name": "created_at",
1005
+ "type": "integer",
1006
+ "primaryKey": false,
1007
+ "notNull": true,
1008
+ "autoincrement": false
1009
+ },
1010
+ "finished_at": {
1011
+ "name": "finished_at",
1012
+ "type": "integer",
1013
+ "primaryKey": false,
1014
+ "notNull": false,
1015
+ "autoincrement": false
1016
+ }
1017
+ },
1018
+ "indexes": {
1019
+ "lessons_course_topic_idx": {
1020
+ "name": "lessons_course_topic_idx",
1021
+ "columns": [
1022
+ "course_id",
1023
+ "topic_id"
1024
+ ],
1025
+ "isUnique": true
1026
+ },
1027
+ "lessons_session_idx": {
1028
+ "name": "lessons_session_idx",
1029
+ "columns": [
1030
+ "session_id"
1031
+ ],
1032
+ "isUnique": true
1033
+ }
1034
+ },
1035
+ "foreignKeys": {
1036
+ "lessons_course_id_courses_id_fk": {
1037
+ "name": "lessons_course_id_courses_id_fk",
1038
+ "tableFrom": "lessons",
1039
+ "tableTo": "courses",
1040
+ "columnsFrom": [
1041
+ "course_id"
1042
+ ],
1043
+ "columnsTo": [
1044
+ "id"
1045
+ ],
1046
+ "onDelete": "cascade",
1047
+ "onUpdate": "no action"
1048
+ },
1049
+ "lessons_session_id_sessions_id_fk": {
1050
+ "name": "lessons_session_id_sessions_id_fk",
1051
+ "tableFrom": "lessons",
1052
+ "tableTo": "sessions",
1053
+ "columnsFrom": [
1054
+ "session_id"
1055
+ ],
1056
+ "columnsTo": [
1057
+ "id"
1058
+ ],
1059
+ "onDelete": "cascade",
1060
+ "onUpdate": "no action"
1061
+ }
1062
+ },
1063
+ "compositePrimaryKeys": {},
1064
+ "uniqueConstraints": {},
1065
+ "checkConstraints": {}
1066
+ },
1067
+ "memories": {
1068
+ "name": "memories",
1069
+ "columns": {
1070
+ "id": {
1071
+ "name": "id",
1072
+ "type": "text",
1073
+ "primaryKey": true,
1074
+ "notNull": true,
1075
+ "autoincrement": false
1076
+ },
1077
+ "kind": {
1078
+ "name": "kind",
1079
+ "type": "text",
1080
+ "primaryKey": false,
1081
+ "notNull": true,
1082
+ "autoincrement": false
1083
+ },
1084
+ "text": {
1085
+ "name": "text",
1086
+ "type": "text",
1087
+ "primaryKey": false,
1088
+ "notNull": true,
1089
+ "autoincrement": false
1090
+ },
1091
+ "concept": {
1092
+ "name": "concept",
1093
+ "type": "text",
1094
+ "primaryKey": false,
1095
+ "notNull": false,
1096
+ "autoincrement": false
1097
+ },
1098
+ "basis": {
1099
+ "name": "basis",
1100
+ "type": "text",
1101
+ "primaryKey": false,
1102
+ "notNull": true,
1103
+ "autoincrement": false
1104
+ },
1105
+ "attempt_id": {
1106
+ "name": "attempt_id",
1107
+ "type": "text",
1108
+ "primaryKey": false,
1109
+ "notNull": false,
1110
+ "autoincrement": false
1111
+ },
1112
+ "session_id": {
1113
+ "name": "session_id",
1114
+ "type": "text",
1115
+ "primaryKey": false,
1116
+ "notNull": false,
1117
+ "autoincrement": false
1118
+ },
1119
+ "run_id": {
1120
+ "name": "run_id",
1121
+ "type": "text",
1122
+ "primaryKey": false,
1123
+ "notNull": false,
1124
+ "autoincrement": false
1125
+ },
1126
+ "status": {
1127
+ "name": "status",
1128
+ "type": "text",
1129
+ "primaryKey": false,
1130
+ "notNull": true,
1131
+ "autoincrement": false
1132
+ },
1133
+ "replaces_id": {
1134
+ "name": "replaces_id",
1135
+ "type": "text",
1136
+ "primaryKey": false,
1137
+ "notNull": false,
1138
+ "autoincrement": false
1139
+ },
1140
+ "note_id": {
1141
+ "name": "note_id",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": false,
1145
+ "autoincrement": false
1146
+ },
1147
+ "created_at": {
1148
+ "name": "created_at",
1149
+ "type": "integer",
1150
+ "primaryKey": false,
1151
+ "notNull": true,
1152
+ "autoincrement": false
1153
+ },
1154
+ "edited_at": {
1155
+ "name": "edited_at",
1156
+ "type": "integer",
1157
+ "primaryKey": false,
1158
+ "notNull": false,
1159
+ "autoincrement": false
1160
+ }
1161
+ },
1162
+ "indexes": {
1163
+ "memories_status_idx": {
1164
+ "name": "memories_status_idx",
1165
+ "columns": [
1166
+ "status",
1167
+ "created_at"
1168
+ ],
1169
+ "isUnique": false
1170
+ },
1171
+ "memories_run_idx": {
1172
+ "name": "memories_run_idx",
1173
+ "columns": [
1174
+ "run_id"
1175
+ ],
1176
+ "isUnique": false
1177
+ },
1178
+ "memories_note_idx": {
1179
+ "name": "memories_note_idx",
1180
+ "columns": [
1181
+ "note_id"
1182
+ ],
1183
+ "isUnique": false
1184
+ }
1185
+ },
1186
+ "foreignKeys": {
1187
+ "memories_attempt_id_attempts_id_fk": {
1188
+ "name": "memories_attempt_id_attempts_id_fk",
1189
+ "tableFrom": "memories",
1190
+ "tableTo": "attempts",
1191
+ "columnsFrom": [
1192
+ "attempt_id"
1193
+ ],
1194
+ "columnsTo": [
1195
+ "id"
1196
+ ],
1197
+ "onDelete": "set null",
1198
+ "onUpdate": "no action"
1199
+ },
1200
+ "memories_session_id_sessions_id_fk": {
1201
+ "name": "memories_session_id_sessions_id_fk",
1202
+ "tableFrom": "memories",
1203
+ "tableTo": "sessions",
1204
+ "columnsFrom": [
1205
+ "session_id"
1206
+ ],
1207
+ "columnsTo": [
1208
+ "id"
1209
+ ],
1210
+ "onDelete": "set null",
1211
+ "onUpdate": "no action"
1212
+ },
1213
+ "memories_run_id_runs_id_fk": {
1214
+ "name": "memories_run_id_runs_id_fk",
1215
+ "tableFrom": "memories",
1216
+ "tableTo": "runs",
1217
+ "columnsFrom": [
1218
+ "run_id"
1219
+ ],
1220
+ "columnsTo": [
1221
+ "id"
1222
+ ],
1223
+ "onDelete": "set null",
1224
+ "onUpdate": "no action"
1225
+ },
1226
+ "memories_note_id_notes_id_fk": {
1227
+ "name": "memories_note_id_notes_id_fk",
1228
+ "tableFrom": "memories",
1229
+ "tableTo": "notes",
1230
+ "columnsFrom": [
1231
+ "note_id"
1232
+ ],
1233
+ "columnsTo": [
1234
+ "id"
1235
+ ],
1236
+ "onDelete": "cascade",
1237
+ "onUpdate": "no action"
1238
+ }
1239
+ },
1240
+ "compositePrimaryKeys": {},
1241
+ "uniqueConstraints": {},
1242
+ "checkConstraints": {}
1243
+ },
1244
+ "memory_sources": {
1245
+ "name": "memory_sources",
1246
+ "columns": {
1247
+ "memory_id": {
1248
+ "name": "memory_id",
1249
+ "type": "text",
1250
+ "primaryKey": false,
1251
+ "notNull": true,
1252
+ "autoincrement": false
1253
+ },
1254
+ "note_id": {
1255
+ "name": "note_id",
1256
+ "type": "text",
1257
+ "primaryKey": false,
1258
+ "notNull": true,
1259
+ "autoincrement": false
1260
+ },
1261
+ "text": {
1262
+ "name": "text",
1263
+ "type": "text",
1264
+ "primaryKey": false,
1265
+ "notNull": true,
1266
+ "autoincrement": false
1267
+ }
1268
+ },
1269
+ "indexes": {
1270
+ "memory_sources_note_idx": {
1271
+ "name": "memory_sources_note_idx",
1272
+ "columns": [
1273
+ "note_id"
1274
+ ],
1275
+ "isUnique": false
1276
+ }
1277
+ },
1278
+ "foreignKeys": {
1279
+ "memory_sources_memory_id_memories_id_fk": {
1280
+ "name": "memory_sources_memory_id_memories_id_fk",
1281
+ "tableFrom": "memory_sources",
1282
+ "tableTo": "memories",
1283
+ "columnsFrom": [
1284
+ "memory_id"
1285
+ ],
1286
+ "columnsTo": [
1287
+ "id"
1288
+ ],
1289
+ "onDelete": "cascade",
1290
+ "onUpdate": "no action"
1291
+ },
1292
+ "memory_sources_note_id_notes_id_fk": {
1293
+ "name": "memory_sources_note_id_notes_id_fk",
1294
+ "tableFrom": "memory_sources",
1295
+ "tableTo": "notes",
1296
+ "columnsFrom": [
1297
+ "note_id"
1298
+ ],
1299
+ "columnsTo": [
1300
+ "id"
1301
+ ],
1302
+ "onDelete": "cascade",
1303
+ "onUpdate": "no action"
1304
+ }
1305
+ },
1306
+ "compositePrimaryKeys": {
1307
+ "memory_sources_memory_id_note_id_pk": {
1308
+ "columns": [
1309
+ "memory_id",
1310
+ "note_id"
1311
+ ],
1312
+ "name": "memory_sources_memory_id_note_id_pk"
1313
+ }
1314
+ },
1315
+ "uniqueConstraints": {},
1316
+ "checkConstraints": {}
1317
+ },
1318
+ "messages": {
1319
+ "name": "messages",
1320
+ "columns": {
1321
+ "id": {
1322
+ "name": "id",
1323
+ "type": "text",
1324
+ "primaryKey": true,
1325
+ "notNull": true,
1326
+ "autoincrement": false
1327
+ },
1328
+ "session_id": {
1329
+ "name": "session_id",
1330
+ "type": "text",
1331
+ "primaryKey": false,
1332
+ "notNull": true,
1333
+ "autoincrement": false
1334
+ },
1335
+ "seq": {
1336
+ "name": "seq",
1337
+ "type": "integer",
1338
+ "primaryKey": false,
1339
+ "notNull": true,
1340
+ "autoincrement": false
1341
+ },
1342
+ "role": {
1343
+ "name": "role",
1344
+ "type": "text",
1345
+ "primaryKey": false,
1346
+ "notNull": true,
1347
+ "autoincrement": false
1348
+ },
1349
+ "parts": {
1350
+ "name": "parts",
1351
+ "type": "text",
1352
+ "primaryKey": false,
1353
+ "notNull": true,
1354
+ "autoincrement": false
1355
+ },
1356
+ "created_at": {
1357
+ "name": "created_at",
1358
+ "type": "integer",
1359
+ "primaryKey": false,
1360
+ "notNull": true,
1361
+ "autoincrement": false
1362
+ }
1363
+ },
1364
+ "indexes": {
1365
+ "messages_session_seq_idx": {
1366
+ "name": "messages_session_seq_idx",
1367
+ "columns": [
1368
+ "session_id",
1369
+ "seq"
1370
+ ],
1371
+ "isUnique": true
1372
+ }
1373
+ },
1374
+ "foreignKeys": {
1375
+ "messages_session_id_sessions_id_fk": {
1376
+ "name": "messages_session_id_sessions_id_fk",
1377
+ "tableFrom": "messages",
1378
+ "tableTo": "sessions",
1379
+ "columnsFrom": [
1380
+ "session_id"
1381
+ ],
1382
+ "columnsTo": [
1383
+ "id"
1384
+ ],
1385
+ "onDelete": "cascade",
1386
+ "onUpdate": "no action"
1387
+ }
1388
+ },
1389
+ "compositePrimaryKeys": {},
1390
+ "uniqueConstraints": {},
1391
+ "checkConstraints": {}
1392
+ },
1393
+ "note_chunks": {
1394
+ "name": "note_chunks",
1395
+ "columns": {
1396
+ "id": {
1397
+ "name": "id",
1398
+ "type": "integer",
1399
+ "primaryKey": true,
1400
+ "notNull": true,
1401
+ "autoincrement": true
1402
+ },
1403
+ "note_id": {
1404
+ "name": "note_id",
1405
+ "type": "text",
1406
+ "primaryKey": false,
1407
+ "notNull": true,
1408
+ "autoincrement": false
1409
+ },
1410
+ "seq": {
1411
+ "name": "seq",
1412
+ "type": "integer",
1413
+ "primaryKey": false,
1414
+ "notNull": true,
1415
+ "autoincrement": false
1416
+ },
1417
+ "heading": {
1418
+ "name": "heading",
1419
+ "type": "text",
1420
+ "primaryKey": false,
1421
+ "notNull": false,
1422
+ "autoincrement": false
1423
+ },
1424
+ "text": {
1425
+ "name": "text",
1426
+ "type": "text",
1427
+ "primaryKey": false,
1428
+ "notNull": true,
1429
+ "autoincrement": false
1430
+ }
1431
+ },
1432
+ "indexes": {
1433
+ "note_chunks_note_seq_idx": {
1434
+ "name": "note_chunks_note_seq_idx",
1435
+ "columns": [
1436
+ "note_id",
1437
+ "seq"
1438
+ ],
1439
+ "isUnique": true
1440
+ }
1441
+ },
1442
+ "foreignKeys": {
1443
+ "note_chunks_note_id_notes_id_fk": {
1444
+ "name": "note_chunks_note_id_notes_id_fk",
1445
+ "tableFrom": "note_chunks",
1446
+ "tableTo": "notes",
1447
+ "columnsFrom": [
1448
+ "note_id"
1449
+ ],
1450
+ "columnsTo": [
1451
+ "id"
1452
+ ],
1453
+ "onDelete": "cascade",
1454
+ "onUpdate": "no action"
1455
+ }
1456
+ },
1457
+ "compositePrimaryKeys": {},
1458
+ "uniqueConstraints": {},
1459
+ "checkConstraints": {}
1460
+ },
1461
+ "note_links": {
1462
+ "name": "note_links",
1463
+ "columns": {
1464
+ "note_id": {
1465
+ "name": "note_id",
1466
+ "type": "text",
1467
+ "primaryKey": false,
1468
+ "notNull": true,
1469
+ "autoincrement": false
1470
+ },
1471
+ "target": {
1472
+ "name": "target",
1473
+ "type": "text",
1474
+ "primaryKey": false,
1475
+ "notNull": true,
1476
+ "autoincrement": false
1477
+ },
1478
+ "kind": {
1479
+ "name": "kind",
1480
+ "type": "text",
1481
+ "primaryKey": false,
1482
+ "notNull": true,
1483
+ "autoincrement": false
1484
+ }
1485
+ },
1486
+ "indexes": {},
1487
+ "foreignKeys": {
1488
+ "note_links_note_id_notes_id_fk": {
1489
+ "name": "note_links_note_id_notes_id_fk",
1490
+ "tableFrom": "note_links",
1491
+ "tableTo": "notes",
1492
+ "columnsFrom": [
1493
+ "note_id"
1494
+ ],
1495
+ "columnsTo": [
1496
+ "id"
1497
+ ],
1498
+ "onDelete": "cascade",
1499
+ "onUpdate": "no action"
1500
+ }
1501
+ },
1502
+ "compositePrimaryKeys": {
1503
+ "note_links_note_id_target_kind_pk": {
1504
+ "columns": [
1505
+ "note_id",
1506
+ "target",
1507
+ "kind"
1508
+ ],
1509
+ "name": "note_links_note_id_target_kind_pk"
1510
+ }
1511
+ },
1512
+ "uniqueConstraints": {},
1513
+ "checkConstraints": {}
1514
+ },
1515
+ "note_tags": {
1516
+ "name": "note_tags",
1517
+ "columns": {
1518
+ "note_id": {
1519
+ "name": "note_id",
1520
+ "type": "text",
1521
+ "primaryKey": false,
1522
+ "notNull": true,
1523
+ "autoincrement": false
1524
+ },
1525
+ "tag": {
1526
+ "name": "tag",
1527
+ "type": "text",
1528
+ "primaryKey": false,
1529
+ "notNull": true,
1530
+ "autoincrement": false
1531
+ }
1532
+ },
1533
+ "indexes": {
1534
+ "note_tags_tag_idx": {
1535
+ "name": "note_tags_tag_idx",
1536
+ "columns": [
1537
+ "tag"
1538
+ ],
1539
+ "isUnique": false
1540
+ }
1541
+ },
1542
+ "foreignKeys": {
1543
+ "note_tags_note_id_notes_id_fk": {
1544
+ "name": "note_tags_note_id_notes_id_fk",
1545
+ "tableFrom": "note_tags",
1546
+ "tableTo": "notes",
1547
+ "columnsFrom": [
1548
+ "note_id"
1549
+ ],
1550
+ "columnsTo": [
1551
+ "id"
1552
+ ],
1553
+ "onDelete": "cascade",
1554
+ "onUpdate": "no action"
1555
+ }
1556
+ },
1557
+ "compositePrimaryKeys": {
1558
+ "note_tags_note_id_tag_pk": {
1559
+ "columns": [
1560
+ "note_id",
1561
+ "tag"
1562
+ ],
1563
+ "name": "note_tags_note_id_tag_pk"
1564
+ }
1565
+ },
1566
+ "uniqueConstraints": {},
1567
+ "checkConstraints": {}
1568
+ },
1569
+ "notes": {
1570
+ "name": "notes",
1571
+ "columns": {
1572
+ "id": {
1573
+ "name": "id",
1574
+ "type": "text",
1575
+ "primaryKey": true,
1576
+ "notNull": true,
1577
+ "autoincrement": false
1578
+ },
1579
+ "import_id": {
1580
+ "name": "import_id",
1581
+ "type": "text",
1582
+ "primaryKey": false,
1583
+ "notNull": true,
1584
+ "autoincrement": false
1585
+ },
1586
+ "path": {
1587
+ "name": "path",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": true,
1591
+ "autoincrement": false
1592
+ },
1593
+ "title": {
1594
+ "name": "title",
1595
+ "type": "text",
1596
+ "primaryKey": false,
1597
+ "notNull": true,
1598
+ "autoincrement": false
1599
+ },
1600
+ "title_key": {
1601
+ "name": "title_key",
1602
+ "type": "text",
1603
+ "primaryKey": false,
1604
+ "notNull": true,
1605
+ "autoincrement": false
1606
+ },
1607
+ "aliases": {
1608
+ "name": "aliases",
1609
+ "type": "text",
1610
+ "primaryKey": false,
1611
+ "notNull": true,
1612
+ "autoincrement": false
1613
+ },
1614
+ "body": {
1615
+ "name": "body",
1616
+ "type": "text",
1617
+ "primaryKey": false,
1618
+ "notNull": true,
1619
+ "autoincrement": false
1620
+ },
1621
+ "hash": {
1622
+ "name": "hash",
1623
+ "type": "text",
1624
+ "primaryKey": false,
1625
+ "notNull": true,
1626
+ "autoincrement": false
1627
+ },
1628
+ "distilled_hash": {
1629
+ "name": "distilled_hash",
1630
+ "type": "text",
1631
+ "primaryKey": false,
1632
+ "notNull": false,
1633
+ "autoincrement": false
1634
+ },
1635
+ "created_at": {
1636
+ "name": "created_at",
1637
+ "type": "integer",
1638
+ "primaryKey": false,
1639
+ "notNull": true,
1640
+ "autoincrement": false
1641
+ },
1642
+ "updated_at": {
1643
+ "name": "updated_at",
1644
+ "type": "integer",
1645
+ "primaryKey": false,
1646
+ "notNull": true,
1647
+ "autoincrement": false
1648
+ }
1649
+ },
1650
+ "indexes": {
1651
+ "notes_import_path_idx": {
1652
+ "name": "notes_import_path_idx",
1653
+ "columns": [
1654
+ "import_id",
1655
+ "path"
1656
+ ],
1657
+ "isUnique": true
1658
+ },
1659
+ "notes_import_title_idx": {
1660
+ "name": "notes_import_title_idx",
1661
+ "columns": [
1662
+ "import_id",
1663
+ "title_key"
1664
+ ],
1665
+ "isUnique": false
1666
+ }
1667
+ },
1668
+ "foreignKeys": {
1669
+ "notes_import_id_vault_imports_id_fk": {
1670
+ "name": "notes_import_id_vault_imports_id_fk",
1671
+ "tableFrom": "notes",
1672
+ "tableTo": "vault_imports",
1673
+ "columnsFrom": [
1674
+ "import_id"
1675
+ ],
1676
+ "columnsTo": [
1677
+ "id"
1678
+ ],
1679
+ "onDelete": "cascade",
1680
+ "onUpdate": "no action"
1681
+ }
1682
+ },
1683
+ "compositePrimaryKeys": {},
1684
+ "uniqueConstraints": {},
1685
+ "checkConstraints": {}
1686
+ },
1687
+ "runs": {
1688
+ "name": "runs",
1689
+ "columns": {
1690
+ "id": {
1691
+ "name": "id",
1692
+ "type": "text",
1693
+ "primaryKey": true,
1694
+ "notNull": true,
1695
+ "autoincrement": false
1696
+ },
1697
+ "session_id": {
1698
+ "name": "session_id",
1699
+ "type": "text",
1700
+ "primaryKey": false,
1701
+ "notNull": true,
1702
+ "autoincrement": false
1703
+ },
1704
+ "user_message_id": {
1705
+ "name": "user_message_id",
1706
+ "type": "text",
1707
+ "primaryKey": false,
1708
+ "notNull": true,
1709
+ "autoincrement": false
1710
+ },
1711
+ "continuation_of": {
1712
+ "name": "continuation_of",
1713
+ "type": "text",
1714
+ "primaryKey": false,
1715
+ "notNull": false,
1716
+ "autoincrement": false
1717
+ },
1718
+ "assistant_message_id": {
1719
+ "name": "assistant_message_id",
1720
+ "type": "text",
1721
+ "primaryKey": false,
1722
+ "notNull": false,
1723
+ "autoincrement": false
1724
+ },
1725
+ "status": {
1726
+ "name": "status",
1727
+ "type": "text",
1728
+ "primaryKey": false,
1729
+ "notNull": true,
1730
+ "autoincrement": false
1731
+ },
1732
+ "model": {
1733
+ "name": "model",
1734
+ "type": "text",
1735
+ "primaryKey": false,
1736
+ "notNull": false,
1737
+ "autoincrement": false
1738
+ },
1739
+ "effort": {
1740
+ "name": "effort",
1741
+ "type": "text",
1742
+ "primaryKey": false,
1743
+ "notNull": false,
1744
+ "autoincrement": false
1745
+ },
1746
+ "endpoint": {
1747
+ "name": "endpoint",
1748
+ "type": "text",
1749
+ "primaryKey": false,
1750
+ "notNull": false,
1751
+ "autoincrement": false
1752
+ },
1753
+ "error": {
1754
+ "name": "error",
1755
+ "type": "text",
1756
+ "primaryKey": false,
1757
+ "notNull": false,
1758
+ "autoincrement": false
1759
+ },
1760
+ "started_at": {
1761
+ "name": "started_at",
1762
+ "type": "integer",
1763
+ "primaryKey": false,
1764
+ "notNull": true,
1765
+ "autoincrement": false
1766
+ },
1767
+ "ended_at": {
1768
+ "name": "ended_at",
1769
+ "type": "integer",
1770
+ "primaryKey": false,
1771
+ "notNull": false,
1772
+ "autoincrement": false
1773
+ }
1774
+ },
1775
+ "indexes": {
1776
+ "runs_continuation_once_idx": {
1777
+ "name": "runs_continuation_once_idx",
1778
+ "columns": [
1779
+ "continuation_of"
1780
+ ],
1781
+ "isUnique": true
1782
+ },
1783
+ "runs_session_idx": {
1784
+ "name": "runs_session_idx",
1785
+ "columns": [
1786
+ "session_id",
1787
+ "started_at"
1788
+ ],
1789
+ "isUnique": false
1790
+ },
1791
+ "runs_one_running_per_session_idx": {
1792
+ "name": "runs_one_running_per_session_idx",
1793
+ "columns": [
1794
+ "session_id"
1795
+ ],
1796
+ "isUnique": true,
1797
+ "where": "\"runs\".\"status\" = 'running'"
1798
+ }
1799
+ },
1800
+ "foreignKeys": {
1801
+ "runs_session_id_sessions_id_fk": {
1802
+ "name": "runs_session_id_sessions_id_fk",
1803
+ "tableFrom": "runs",
1804
+ "tableTo": "sessions",
1805
+ "columnsFrom": [
1806
+ "session_id"
1807
+ ],
1808
+ "columnsTo": [
1809
+ "id"
1810
+ ],
1811
+ "onDelete": "cascade",
1812
+ "onUpdate": "no action"
1813
+ },
1814
+ "runs_user_message_id_messages_id_fk": {
1815
+ "name": "runs_user_message_id_messages_id_fk",
1816
+ "tableFrom": "runs",
1817
+ "tableTo": "messages",
1818
+ "columnsFrom": [
1819
+ "user_message_id"
1820
+ ],
1821
+ "columnsTo": [
1822
+ "id"
1823
+ ],
1824
+ "onDelete": "cascade",
1825
+ "onUpdate": "no action"
1826
+ },
1827
+ "runs_assistant_message_id_messages_id_fk": {
1828
+ "name": "runs_assistant_message_id_messages_id_fk",
1829
+ "tableFrom": "runs",
1830
+ "tableTo": "messages",
1831
+ "columnsFrom": [
1832
+ "assistant_message_id"
1833
+ ],
1834
+ "columnsTo": [
1835
+ "id"
1836
+ ],
1837
+ "onDelete": "set null",
1838
+ "onUpdate": "no action"
1839
+ }
1840
+ },
1841
+ "compositePrimaryKeys": {},
1842
+ "uniqueConstraints": {},
1843
+ "checkConstraints": {}
1844
+ },
1845
+ "sessions": {
1846
+ "name": "sessions",
1847
+ "columns": {
1848
+ "id": {
1849
+ "name": "id",
1850
+ "type": "text",
1851
+ "primaryKey": true,
1852
+ "notNull": true,
1853
+ "autoincrement": false
1854
+ },
1855
+ "title": {
1856
+ "name": "title",
1857
+ "type": "text",
1858
+ "primaryKey": false,
1859
+ "notNull": true,
1860
+ "autoincrement": false
1861
+ },
1862
+ "title_set_by_learner": {
1863
+ "name": "title_set_by_learner",
1864
+ "type": "integer",
1865
+ "primaryKey": false,
1866
+ "notNull": true,
1867
+ "autoincrement": false,
1868
+ "default": false
1869
+ },
1870
+ "created_at": {
1871
+ "name": "created_at",
1872
+ "type": "integer",
1873
+ "primaryKey": false,
1874
+ "notNull": true,
1875
+ "autoincrement": false
1876
+ },
1877
+ "updated_at": {
1878
+ "name": "updated_at",
1879
+ "type": "integer",
1880
+ "primaryKey": false,
1881
+ "notNull": true,
1882
+ "autoincrement": false
1883
+ }
1884
+ },
1885
+ "indexes": {},
1886
+ "foreignKeys": {},
1887
+ "compositePrimaryKeys": {},
1888
+ "uniqueConstraints": {},
1889
+ "checkConstraints": {}
1890
+ },
1891
+ "settings": {
1892
+ "name": "settings",
1893
+ "columns": {
1894
+ "key": {
1895
+ "name": "key",
1896
+ "type": "text",
1897
+ "primaryKey": true,
1898
+ "notNull": true,
1899
+ "autoincrement": false
1900
+ },
1901
+ "value": {
1902
+ "name": "value",
1903
+ "type": "text",
1904
+ "primaryKey": false,
1905
+ "notNull": true,
1906
+ "autoincrement": false
1907
+ },
1908
+ "updated_at": {
1909
+ "name": "updated_at",
1910
+ "type": "integer",
1911
+ "primaryKey": false,
1912
+ "notNull": true,
1913
+ "autoincrement": false
1914
+ }
1915
+ },
1916
+ "indexes": {},
1917
+ "foreignKeys": {},
1918
+ "compositePrimaryKeys": {},
1919
+ "uniqueConstraints": {},
1920
+ "checkConstraints": {}
1921
+ },
1922
+ "syllabus_versions": {
1923
+ "name": "syllabus_versions",
1924
+ "columns": {
1925
+ "id": {
1926
+ "name": "id",
1927
+ "type": "text",
1928
+ "primaryKey": true,
1929
+ "notNull": true,
1930
+ "autoincrement": false
1931
+ },
1932
+ "course_id": {
1933
+ "name": "course_id",
1934
+ "type": "text",
1935
+ "primaryKey": false,
1936
+ "notNull": true,
1937
+ "autoincrement": false
1938
+ },
1939
+ "version": {
1940
+ "name": "version",
1941
+ "type": "integer",
1942
+ "primaryKey": false,
1943
+ "notNull": true,
1944
+ "autoincrement": false
1945
+ },
1946
+ "topics": {
1947
+ "name": "topics",
1948
+ "type": "text",
1949
+ "primaryKey": false,
1950
+ "notNull": true,
1951
+ "autoincrement": false
1952
+ },
1953
+ "known": {
1954
+ "name": "known",
1955
+ "type": "text",
1956
+ "primaryKey": false,
1957
+ "notNull": true,
1958
+ "autoincrement": false
1959
+ },
1960
+ "source": {
1961
+ "name": "source",
1962
+ "type": "text",
1963
+ "primaryKey": false,
1964
+ "notNull": true,
1965
+ "autoincrement": false,
1966
+ "default": "'interview'"
1967
+ },
1968
+ "trigger_lesson_id": {
1969
+ "name": "trigger_lesson_id",
1970
+ "type": "text",
1971
+ "primaryKey": false,
1972
+ "notNull": false,
1973
+ "autoincrement": false
1974
+ },
1975
+ "reason": {
1976
+ "name": "reason",
1977
+ "type": "text",
1978
+ "primaryKey": false,
1979
+ "notNull": false,
1980
+ "autoincrement": false
1981
+ },
1982
+ "changed_topic_ids": {
1983
+ "name": "changed_topic_ids",
1984
+ "type": "text",
1985
+ "primaryKey": false,
1986
+ "notNull": true,
1987
+ "autoincrement": false,
1988
+ "default": "'[]'"
1989
+ },
1990
+ "run_id": {
1991
+ "name": "run_id",
1992
+ "type": "text",
1993
+ "primaryKey": false,
1994
+ "notNull": false,
1995
+ "autoincrement": false
1996
+ },
1997
+ "created_at": {
1998
+ "name": "created_at",
1999
+ "type": "integer",
2000
+ "primaryKey": false,
2001
+ "notNull": true,
2002
+ "autoincrement": false
2003
+ }
2004
+ },
2005
+ "indexes": {
2006
+ "syllabus_versions_course_version_idx": {
2007
+ "name": "syllabus_versions_course_version_idx",
2008
+ "columns": [
2009
+ "course_id",
2010
+ "version"
2011
+ ],
2012
+ "isUnique": true
2013
+ }
2014
+ },
2015
+ "foreignKeys": {
2016
+ "syllabus_versions_course_id_courses_id_fk": {
2017
+ "name": "syllabus_versions_course_id_courses_id_fk",
2018
+ "tableFrom": "syllabus_versions",
2019
+ "tableTo": "courses",
2020
+ "columnsFrom": [
2021
+ "course_id"
2022
+ ],
2023
+ "columnsTo": [
2024
+ "id"
2025
+ ],
2026
+ "onDelete": "cascade",
2027
+ "onUpdate": "no action"
2028
+ },
2029
+ "syllabus_versions_run_id_runs_id_fk": {
2030
+ "name": "syllabus_versions_run_id_runs_id_fk",
2031
+ "tableFrom": "syllabus_versions",
2032
+ "tableTo": "runs",
2033
+ "columnsFrom": [
2034
+ "run_id"
2035
+ ],
2036
+ "columnsTo": [
2037
+ "id"
2038
+ ],
2039
+ "onDelete": "set null",
2040
+ "onUpdate": "no action"
2041
+ }
2042
+ },
2043
+ "compositePrimaryKeys": {},
2044
+ "uniqueConstraints": {},
2045
+ "checkConstraints": {}
2046
+ },
2047
+ "usage_records": {
2048
+ "name": "usage_records",
2049
+ "columns": {
2050
+ "id": {
2051
+ "name": "id",
2052
+ "type": "text",
2053
+ "primaryKey": true,
2054
+ "notNull": true,
2055
+ "autoincrement": false
2056
+ },
2057
+ "kind": {
2058
+ "name": "kind",
2059
+ "type": "text",
2060
+ "primaryKey": false,
2061
+ "notNull": true,
2062
+ "autoincrement": false
2063
+ },
2064
+ "status": {
2065
+ "name": "status",
2066
+ "type": "text",
2067
+ "primaryKey": false,
2068
+ "notNull": true,
2069
+ "autoincrement": false
2070
+ },
2071
+ "session_id": {
2072
+ "name": "session_id",
2073
+ "type": "text",
2074
+ "primaryKey": false,
2075
+ "notNull": false,
2076
+ "autoincrement": false
2077
+ },
2078
+ "run_id": {
2079
+ "name": "run_id",
2080
+ "type": "text",
2081
+ "primaryKey": false,
2082
+ "notNull": false,
2083
+ "autoincrement": false
2084
+ },
2085
+ "seq": {
2086
+ "name": "seq",
2087
+ "type": "integer",
2088
+ "primaryKey": false,
2089
+ "notNull": true,
2090
+ "autoincrement": false
2091
+ },
2092
+ "provider": {
2093
+ "name": "provider",
2094
+ "type": "text",
2095
+ "primaryKey": false,
2096
+ "notNull": true,
2097
+ "autoincrement": false
2098
+ },
2099
+ "provider_label": {
2100
+ "name": "provider_label",
2101
+ "type": "text",
2102
+ "primaryKey": false,
2103
+ "notNull": true,
2104
+ "autoincrement": false
2105
+ },
2106
+ "model": {
2107
+ "name": "model",
2108
+ "type": "text",
2109
+ "primaryKey": false,
2110
+ "notNull": true,
2111
+ "autoincrement": false
2112
+ },
2113
+ "model_label": {
2114
+ "name": "model_label",
2115
+ "type": "text",
2116
+ "primaryKey": false,
2117
+ "notNull": false,
2118
+ "autoincrement": false
2119
+ },
2120
+ "effort": {
2121
+ "name": "effort",
2122
+ "type": "text",
2123
+ "primaryKey": false,
2124
+ "notNull": false,
2125
+ "autoincrement": false
2126
+ },
2127
+ "billing": {
2128
+ "name": "billing",
2129
+ "type": "text",
2130
+ "primaryKey": false,
2131
+ "notNull": true,
2132
+ "autoincrement": false
2133
+ },
2134
+ "input_tokens": {
2135
+ "name": "input_tokens",
2136
+ "type": "integer",
2137
+ "primaryKey": false,
2138
+ "notNull": false,
2139
+ "autoincrement": false
2140
+ },
2141
+ "input_no_cache_tokens": {
2142
+ "name": "input_no_cache_tokens",
2143
+ "type": "integer",
2144
+ "primaryKey": false,
2145
+ "notNull": false,
2146
+ "autoincrement": false
2147
+ },
2148
+ "input_cache_read_tokens": {
2149
+ "name": "input_cache_read_tokens",
2150
+ "type": "integer",
2151
+ "primaryKey": false,
2152
+ "notNull": false,
2153
+ "autoincrement": false
2154
+ },
2155
+ "input_cache_write_tokens": {
2156
+ "name": "input_cache_write_tokens",
2157
+ "type": "integer",
2158
+ "primaryKey": false,
2159
+ "notNull": false,
2160
+ "autoincrement": false
2161
+ },
2162
+ "output_tokens": {
2163
+ "name": "output_tokens",
2164
+ "type": "integer",
2165
+ "primaryKey": false,
2166
+ "notNull": false,
2167
+ "autoincrement": false
2168
+ },
2169
+ "output_reasoning_tokens": {
2170
+ "name": "output_reasoning_tokens",
2171
+ "type": "integer",
2172
+ "primaryKey": false,
2173
+ "notNull": false,
2174
+ "autoincrement": false
2175
+ },
2176
+ "reported_cost": {
2177
+ "name": "reported_cost",
2178
+ "type": "real",
2179
+ "primaryKey": false,
2180
+ "notNull": false,
2181
+ "autoincrement": false
2182
+ },
2183
+ "price": {
2184
+ "name": "price",
2185
+ "type": "text",
2186
+ "primaryKey": false,
2187
+ "notNull": false,
2188
+ "autoincrement": false
2189
+ },
2190
+ "estimated_cost": {
2191
+ "name": "estimated_cost",
2192
+ "type": "real",
2193
+ "primaryKey": false,
2194
+ "notNull": false,
2195
+ "autoincrement": false
2196
+ },
2197
+ "started_at": {
2198
+ "name": "started_at",
2199
+ "type": "integer",
2200
+ "primaryKey": false,
2201
+ "notNull": true,
2202
+ "autoincrement": false
2203
+ },
2204
+ "ended_at": {
2205
+ "name": "ended_at",
2206
+ "type": "integer",
2207
+ "primaryKey": false,
2208
+ "notNull": true,
2209
+ "autoincrement": false
2210
+ }
2211
+ },
2212
+ "indexes": {
2213
+ "usage_records_started_idx": {
2214
+ "name": "usage_records_started_idx",
2215
+ "columns": [
2216
+ "started_at"
2217
+ ],
2218
+ "isUnique": false
2219
+ },
2220
+ "usage_records_run_idx": {
2221
+ "name": "usage_records_run_idx",
2222
+ "columns": [
2223
+ "run_id"
2224
+ ],
2225
+ "isUnique": false
2226
+ }
2227
+ },
2228
+ "foreignKeys": {},
2229
+ "compositePrimaryKeys": {},
2230
+ "uniqueConstraints": {},
2231
+ "checkConstraints": {}
2232
+ },
2233
+ "vault_imports": {
2234
+ "name": "vault_imports",
2235
+ "columns": {
2236
+ "id": {
2237
+ "name": "id",
2238
+ "type": "text",
2239
+ "primaryKey": true,
2240
+ "notNull": true,
2241
+ "autoincrement": false
2242
+ },
2243
+ "name": {
2244
+ "name": "name",
2245
+ "type": "text",
2246
+ "primaryKey": false,
2247
+ "notNull": true,
2248
+ "autoincrement": false
2249
+ },
2250
+ "source": {
2251
+ "name": "source",
2252
+ "type": "text",
2253
+ "primaryKey": false,
2254
+ "notNull": true,
2255
+ "autoincrement": false
2256
+ },
2257
+ "created_at": {
2258
+ "name": "created_at",
2259
+ "type": "integer",
2260
+ "primaryKey": false,
2261
+ "notNull": true,
2262
+ "autoincrement": false
2263
+ },
2264
+ "updated_at": {
2265
+ "name": "updated_at",
2266
+ "type": "integer",
2267
+ "primaryKey": false,
2268
+ "notNull": true,
2269
+ "autoincrement": false
2270
+ }
2271
+ },
2272
+ "indexes": {
2273
+ "vault_imports_name_idx": {
2274
+ "name": "vault_imports_name_idx",
2275
+ "columns": [
2276
+ "name"
2277
+ ],
2278
+ "isUnique": true
2279
+ }
2280
+ },
2281
+ "foreignKeys": {},
2282
+ "compositePrimaryKeys": {},
2283
+ "uniqueConstraints": {},
2284
+ "checkConstraints": {}
2285
+ }
2286
+ },
2287
+ "views": {},
2288
+ "enums": {},
2289
+ "_meta": {
2290
+ "schemas": {},
2291
+ "tables": {},
2292
+ "columns": {}
2293
+ },
2294
+ "internal": {
2295
+ "indexes": {}
2296
+ }
2297
+ }