@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.
- package/README.md +1 -0
- package/THIRD_PARTY_NOTICES.md +250 -0
- package/dist/{chunk-ODFBAPPH.js → chunk-M62PZTK3.js} +125 -6
- package/dist/chunk-M62PZTK3.js.map +7 -0
- package/dist/{chunk-KE5ZEREE.js → chunk-T5WM74CI.js} +2 -1
- package/dist/chunk-TKDX5OCX.js +2555 -0
- package/dist/chunk-TKDX5OCX.js.map +7 -0
- package/dist/{chunk-KUKQU7EQ.js → chunk-VHOVRHI3.js} +38 -10
- package/dist/{chunk-KUKQU7EQ.js.map → chunk-VHOVRHI3.js.map} +2 -2
- package/dist/cli.js +1099 -53
- package/dist/cli.js.map +4 -4
- package/dist/{client-5YDLS4KV.js → client-76YUHG4T.js} +2 -2
- package/dist/exercise-child.js +37 -0
- package/dist/exercise-child.js.map +7 -0
- package/dist/extract-child.js +2 -2
- package/dist/python-child.js +51 -0
- package/dist/python-child.js.map +7 -0
- package/dist/{start-2RXX57ZZ.js → start-GVAACONX.js} +5809 -2377
- package/dist/start-GVAACONX.js.map +7 -0
- package/drizzle/0019_public_doctor_faustus.sql +1 -0
- package/drizzle/0020_early_wolfpack.sql +3 -0
- package/drizzle/0021_strange_gamma_corps.sql +2 -0
- package/drizzle/0022_fast_forgotten_one.sql +28 -0
- package/drizzle/0023_low_wiccan.sql +17 -0
- package/drizzle/0024_windy_annihilus.sql +1 -0
- package/drizzle/0025_brief_rictor.sql +6 -0
- package/drizzle/0026_greedy_sally_floyd.sql +1 -0
- package/drizzle/0027_regular_calypso.sql +41 -0
- package/drizzle/0028_lazy_agent_zero.sql +17 -0
- package/drizzle/meta/0019_snapshot.json +2288 -0
- package/drizzle/meta/0020_snapshot.json +2297 -0
- package/drizzle/meta/0021_snapshot.json +2313 -0
- package/drizzle/meta/0022_snapshot.json +2529 -0
- package/drizzle/meta/0023_snapshot.json +2654 -0
- package/drizzle/meta/0024_snapshot.json +2662 -0
- package/drizzle/meta/0025_snapshot.json +2707 -0
- package/drizzle/meta/0026_snapshot.json +2714 -0
- package/drizzle/meta/0027_snapshot.json +2816 -0
- package/drizzle/meta/0028_snapshot.json +2940 -0
- package/drizzle/meta/_journal.json +70 -0
- package/package.json +6 -1
- package/web/assets/emscripten-module-uFzwHH0Y.wasm +0 -0
- package/web/assets/emscripten-module.browser-D72eEgXo.js +1 -0
- package/web/assets/exercise-workers/exercise.worker-LCHlYekD.js +265 -0
- package/web/assets/exercise-workers/python-exercise.worker-DeTriNjh.js +236 -0
- package/web/assets/ffi-4V2b7xu3.js +1 -0
- package/web/assets/index-CQjNLnxP.js +540 -0
- package/web/assets/index-DpV5il_3.css +1 -0
- package/web/assets/module-ES6BEMUI-B2wjplZC.js +1 -0
- package/web/assets/notes-graph.worker-Dqb5HK34.js +1 -0
- package/web/assets/render.worker-OksjuBjV.js +537 -0
- package/web/index.html +2 -2
- package/dist/chunk-ODFBAPPH.js.map +0 -7
- package/dist/chunk-YACRW47X.js +0 -1203
- package/dist/chunk-YACRW47X.js.map +0 -7
- package/dist/start-2RXX57ZZ.js.map +0 -7
- package/web/assets/index-DJ2D5ZXo.css +0 -1
- package/web/assets/index-DcYzUL1W.js +0 -413
- package/web/assets/notes-graph.worker-DaVQvftJ.js +0 -1
- package/web/assets/render.worker-BAfybD27.js +0 -416
- /package/dist/{chunk-KE5ZEREE.js.map → chunk-T5WM74CI.js.map} +0 -0
- /package/dist/{client-5YDLS4KV.js.map → client-76YUHG4T.js.map} +0 -0
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ This starts Mivra and opens it in your browser. The first time, it asks for an A
|
|
|
24
24
|
| `mivra auth set openrouter` | Save an API key (also `anthropic`, `openai`); it asks for the key without showing it |
|
|
25
25
|
| `mivra auth status` / `mivra auth remove <provider>` | See or remove saved keys |
|
|
26
26
|
| `mivra auth login chatgpt` / `mivra auth logout chatgpt` | Sign in with ChatGPT to use your Plus or Pro plan instead of a key, or sign out |
|
|
27
|
+
| `mivra link <course> --run "<command>"` / `mivra check` | For a project course: link your project's folder to it, then run your program on the current milestone's tests and send the changed files for a code review (`mivra check --dry-run` lists what it would send; `.env` files and keys never leave) |
|
|
27
28
|
| `mivra uninstall` | Stop Mivra and ask whether to delete your data; run it before `npm uninstall -g @okhay-p/mivra` |
|
|
28
29
|
|
|
29
30
|
Options: `--port <n>` to use one port only, `--no-open` to skip the browser. `MIVRA_DATA_DIR` moves the data folder. Keys in `OPENROUTER_API_KEY`, `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` take precedence over saved ones.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -692,6 +692,228 @@ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
|
692
692
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
693
693
|
```
|
|
694
694
|
|
|
695
|
+
## @jitl/quickjs-ffi-types 0.32.0
|
|
696
|
+
|
|
697
|
+
License: MIT (https://github.com/justjake/quickjs-emscripten#readme)
|
|
698
|
+
|
|
699
|
+
```
|
|
700
|
+
The MIT License
|
|
701
|
+
|
|
702
|
+
quickjs-emscripten copyright (c) 2019-2024 Jake Teton-Landis
|
|
703
|
+
|
|
704
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
705
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
706
|
+
in the Software without restriction, including without limitation the rights
|
|
707
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
708
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
709
|
+
furnished to do so, subject to the following conditions:
|
|
710
|
+
|
|
711
|
+
The above copyright notice and this permission notice shall be included in all
|
|
712
|
+
copies or substantial portions of the Software.
|
|
713
|
+
|
|
714
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
715
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
716
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
717
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
718
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
719
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
720
|
+
SOFTWARE.
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
## @jitl/quickjs-wasmfile-release-sync 0.32.0
|
|
724
|
+
|
|
725
|
+
License: MIT (https://github.com/justjake/quickjs-emscripten#readme)
|
|
726
|
+
|
|
727
|
+
```
|
|
728
|
+
quickjs-emscripten:
|
|
729
|
+
The MIT License
|
|
730
|
+
|
|
731
|
+
quickjs-emscripten copyright (c) 2019-2024 Jake Teton-Landis
|
|
732
|
+
|
|
733
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
734
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
735
|
+
in the Software without restriction, including without limitation the rights
|
|
736
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
737
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
738
|
+
furnished to do so, subject to the following conditions:
|
|
739
|
+
|
|
740
|
+
The above copyright notice and this permission notice shall be included in all
|
|
741
|
+
copies or substantial portions of the Software.
|
|
742
|
+
|
|
743
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
744
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
745
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
746
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
747
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
748
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
749
|
+
SOFTWARE.
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
quickjs:
|
|
753
|
+
QuickJS Javascript Engine
|
|
754
|
+
|
|
755
|
+
Copyright (c) 2017-2021 Fabrice Bellard
|
|
756
|
+
Copyright (c) 2017-2021 Charlie Gordon
|
|
757
|
+
|
|
758
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
759
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
760
|
+
in the Software without restriction, including without limitation the rights
|
|
761
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
762
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
763
|
+
furnished to do so, subject to the following conditions:
|
|
764
|
+
|
|
765
|
+
The above copyright notice and this permission notice shall be included in
|
|
766
|
+
all copies or substantial portions of the Software.
|
|
767
|
+
|
|
768
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
769
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
770
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
771
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
772
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
773
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
774
|
+
THE SOFTWARE.
|
|
775
|
+
```
|
|
776
|
+
|
|
777
|
+
## @lezer/common 1.5.5
|
|
778
|
+
|
|
779
|
+
License: MIT
|
|
780
|
+
|
|
781
|
+
```
|
|
782
|
+
MIT License
|
|
783
|
+
|
|
784
|
+
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
|
785
|
+
|
|
786
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
787
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
788
|
+
in the Software without restriction, including without limitation the rights
|
|
789
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
790
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
791
|
+
furnished to do so, subject to the following conditions:
|
|
792
|
+
|
|
793
|
+
The above copyright notice and this permission notice shall be included in
|
|
794
|
+
all copies or substantial portions of the Software.
|
|
795
|
+
|
|
796
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
797
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
798
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
799
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
800
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
801
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
802
|
+
THE SOFTWARE.
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
## @lezer/highlight 1.2.5
|
|
806
|
+
|
|
807
|
+
License: MIT
|
|
808
|
+
|
|
809
|
+
```
|
|
810
|
+
MIT License
|
|
811
|
+
|
|
812
|
+
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
|
813
|
+
|
|
814
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
815
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
816
|
+
in the Software without restriction, including without limitation the rights
|
|
817
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
818
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
819
|
+
furnished to do so, subject to the following conditions:
|
|
820
|
+
|
|
821
|
+
The above copyright notice and this permission notice shall be included in
|
|
822
|
+
all copies or substantial portions of the Software.
|
|
823
|
+
|
|
824
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
825
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
826
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
827
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
828
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
829
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
830
|
+
THE SOFTWARE.
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
## @lezer/javascript 1.5.6
|
|
834
|
+
|
|
835
|
+
License: MIT
|
|
836
|
+
|
|
837
|
+
```
|
|
838
|
+
MIT License
|
|
839
|
+
|
|
840
|
+
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
|
841
|
+
|
|
842
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
843
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
844
|
+
in the Software without restriction, including without limitation the rights
|
|
845
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
846
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
847
|
+
furnished to do so, subject to the following conditions:
|
|
848
|
+
|
|
849
|
+
The above copyright notice and this permission notice shall be included in
|
|
850
|
+
all copies or substantial portions of the Software.
|
|
851
|
+
|
|
852
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
853
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
854
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
855
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
856
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
857
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
858
|
+
THE SOFTWARE.
|
|
859
|
+
```
|
|
860
|
+
|
|
861
|
+
## @lezer/lr 1.4.12
|
|
862
|
+
|
|
863
|
+
License: MIT
|
|
864
|
+
|
|
865
|
+
```
|
|
866
|
+
MIT License
|
|
867
|
+
|
|
868
|
+
Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
|
869
|
+
|
|
870
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
871
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
872
|
+
in the Software without restriction, including without limitation the rights
|
|
873
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
874
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
875
|
+
furnished to do so, subject to the following conditions:
|
|
876
|
+
|
|
877
|
+
The above copyright notice and this permission notice shall be included in
|
|
878
|
+
all copies or substantial portions of the Software.
|
|
879
|
+
|
|
880
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
881
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
882
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
883
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
884
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
885
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
886
|
+
THE SOFTWARE.
|
|
887
|
+
```
|
|
888
|
+
|
|
889
|
+
## @lezer/python 1.1.19
|
|
890
|
+
|
|
891
|
+
License: MIT
|
|
892
|
+
|
|
893
|
+
```
|
|
894
|
+
MIT License
|
|
895
|
+
|
|
896
|
+
Copyright (C) 2020 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
|
897
|
+
|
|
898
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
899
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
900
|
+
in the Software without restriction, including without limitation the rights
|
|
901
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
902
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
903
|
+
furnished to do so, subject to the following conditions:
|
|
904
|
+
|
|
905
|
+
The above copyright notice and this permission notice shall be included in
|
|
906
|
+
all copies or substantial portions of the Software.
|
|
907
|
+
|
|
908
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
909
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
910
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
911
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
912
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
913
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
914
|
+
THE SOFTWARE.
|
|
915
|
+
```
|
|
916
|
+
|
|
695
917
|
## @openrouter/ai-sdk-provider 3.1.0
|
|
696
918
|
|
|
697
919
|
License: Apache-2.0 (https://github.com/OpenRouterTeam/ai-sdk-provider)
|
|
@@ -6160,6 +6382,34 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
6160
6382
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
6161
6383
|
```
|
|
6162
6384
|
|
|
6385
|
+
## quickjs-emscripten-core 0.32.0
|
|
6386
|
+
|
|
6387
|
+
License: MIT (https://github.com/justjake/quickjs-emscripten#readme)
|
|
6388
|
+
|
|
6389
|
+
```
|
|
6390
|
+
The MIT License
|
|
6391
|
+
|
|
6392
|
+
quickjs-emscripten copyright (c) 2019-2024 Jake Teton-Landis
|
|
6393
|
+
|
|
6394
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6395
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6396
|
+
in the Software without restriction, including without limitation the rights
|
|
6397
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
6398
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
6399
|
+
furnished to do so, subject to the following conditions:
|
|
6400
|
+
|
|
6401
|
+
The above copyright notice and this permission notice shall be included in all
|
|
6402
|
+
copies or substantial portions of the Software.
|
|
6403
|
+
|
|
6404
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
6405
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
6406
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
6407
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
6408
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
6409
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
6410
|
+
SOFTWARE.
|
|
6411
|
+
```
|
|
6412
|
+
|
|
6163
6413
|
## radix-ui 1.8.1
|
|
6164
6414
|
|
|
6165
6415
|
License: MIT (https://radix-ui.com/primitives)
|
|
@@ -15,16 +15,23 @@ import { readMigrationFiles } from "drizzle-orm/migrator";
|
|
|
15
15
|
var schema_exports = {};
|
|
16
16
|
__export(schema_exports, {
|
|
17
17
|
artifacts: () => artifacts,
|
|
18
|
+
attemptJudges: () => attemptJudges,
|
|
18
19
|
attempts: () => attempts,
|
|
19
20
|
conceptEdgeKinds: () => conceptEdgeKinds,
|
|
20
21
|
conceptEdges: () => conceptEdges,
|
|
22
|
+
conceptSessionEdges: () => conceptSessionEdges,
|
|
23
|
+
conceptSessionSources: () => conceptSessionSources,
|
|
24
|
+
conceptSessionStatuses: () => conceptSessionStatuses,
|
|
21
25
|
conceptSources: () => conceptSources,
|
|
22
26
|
concepts: () => concepts,
|
|
27
|
+
courseKinds: () => courseKinds,
|
|
23
28
|
courseStatuses: () => courseStatuses,
|
|
24
29
|
courses: () => courses,
|
|
25
30
|
documentChunks: () => documentChunks,
|
|
26
31
|
documentKinds: () => documentKinds,
|
|
27
32
|
documents: () => documents,
|
|
33
|
+
flashcardRatings: () => flashcardRatings,
|
|
34
|
+
flashcardReviews: () => flashcardReviews,
|
|
28
35
|
lessonErrorActions: () => lessonErrorActions,
|
|
29
36
|
lessonSections: () => lessonSections,
|
|
30
37
|
lessonStatuses: () => lessonStatuses,
|
|
@@ -34,12 +41,16 @@ __export(schema_exports, {
|
|
|
34
41
|
memorySources: () => memorySources,
|
|
35
42
|
memoryStatuses: () => memoryStatuses,
|
|
36
43
|
messages: () => messages,
|
|
44
|
+
noteAliases: () => noteAliases,
|
|
37
45
|
noteChunks: () => noteChunks,
|
|
38
46
|
noteLinks: () => noteLinks,
|
|
39
47
|
noteTags: () => noteTags,
|
|
40
48
|
notes: () => notes,
|
|
49
|
+
placementDepths: () => placementDepths,
|
|
50
|
+
reviewSessions: () => reviewSessions,
|
|
41
51
|
runStatuses: () => runStatuses,
|
|
42
52
|
runs: () => runs,
|
|
53
|
+
sessionDocuments: () => sessionDocuments,
|
|
43
54
|
sessions: () => sessions,
|
|
44
55
|
settings: () => settings,
|
|
45
56
|
syllabusVersions: () => syllabusVersions,
|
|
@@ -91,6 +102,11 @@ var runs = sqliteTable(
|
|
|
91
102
|
* reasoning metadata never replays to a different destination under the same model id. Null otherwise.
|
|
92
103
|
*/
|
|
93
104
|
endpoint: text("endpoint"),
|
|
105
|
+
/**
|
|
106
|
+
* The open lesson selected when this run started, if any. `""` means explicitly no lesson open;
|
|
107
|
+
* `null` marks legacy runs recorded before lesson selection was persisted.
|
|
108
|
+
*/
|
|
109
|
+
lessonId: text("lesson_id"),
|
|
94
110
|
error: text("error"),
|
|
95
111
|
startedAt: integer("started_at", { mode: "timestamp_ms" }).notNull(),
|
|
96
112
|
endedAt: integer("ended_at", { mode: "timestamp_ms" })
|
|
@@ -115,6 +131,7 @@ var artifacts = sqliteTable(
|
|
|
115
131
|
},
|
|
116
132
|
(t) => [index("artifacts_session_idx").on(t.sessionId, t.createdAt), uniqueIndex("artifacts_tool_call_idx").on(t.runId, t.toolCallId)]
|
|
117
133
|
);
|
|
134
|
+
var attemptJudges = ["grader", "model"];
|
|
118
135
|
var attempts = sqliteTable(
|
|
119
136
|
"attempts",
|
|
120
137
|
{
|
|
@@ -125,9 +142,10 @@ var attempts = sqliteTable(
|
|
|
125
142
|
grade: text("grade", { mode: "json" }).notNull(),
|
|
126
143
|
correct: integer("correct", { mode: "boolean" }).notNull(),
|
|
127
144
|
concept: text("concept"),
|
|
145
|
+
judge: text("judge", { enum: attemptJudges }).notNull().default("grader"),
|
|
128
146
|
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull()
|
|
129
147
|
},
|
|
130
|
-
(t) => [uniqueIndex("attempts_one_per_artifact_idx").on(t.artifactId), index("attempts_session_idx").on(t.sessionId, t.createdAt), index("attempts_created_idx").on(t.createdAt)]
|
|
148
|
+
(t) => [uniqueIndex("attempts_one_per_artifact_idx").on(t.artifactId, t.judge), index("attempts_session_idx").on(t.sessionId, t.createdAt), index("attempts_created_idx").on(t.createdAt)]
|
|
131
149
|
);
|
|
132
150
|
var memoryStatuses = ["pending", "active", "superseded"];
|
|
133
151
|
var memories = sqliteTable(
|
|
@@ -151,12 +169,12 @@ var memories = sqliteTable(
|
|
|
151
169
|
},
|
|
152
170
|
(t) => [index("memories_status_idx").on(t.status, t.createdAt), index("memories_run_idx").on(t.runId), index("memories_note_idx").on(t.noteId)]
|
|
153
171
|
);
|
|
154
|
-
var documentKinds = ["pdf", "pptx"];
|
|
172
|
+
var documentKinds = ["pdf", "pptx", "text", "markdown"];
|
|
155
173
|
var documents = sqliteTable(
|
|
156
174
|
"documents",
|
|
157
175
|
{
|
|
158
176
|
id: text("id").primaryKey(),
|
|
159
|
-
sessionId: text("session_id").
|
|
177
|
+
sessionId: text("session_id").references(() => sessions.id, { onDelete: "set null" }),
|
|
160
178
|
messageId: text("message_id").references(() => messages.id, { onDelete: "set null" }),
|
|
161
179
|
filename: text("filename").notNull(),
|
|
162
180
|
kind: text("kind", { enum: documentKinds }).notNull(),
|
|
@@ -169,6 +187,20 @@ var documents = sqliteTable(
|
|
|
169
187
|
},
|
|
170
188
|
(t) => [index("documents_session_idx").on(t.sessionId, t.createdAt)]
|
|
171
189
|
);
|
|
190
|
+
var sessionDocuments = sqliteTable(
|
|
191
|
+
"session_documents",
|
|
192
|
+
{
|
|
193
|
+
sessionId: text("session_id").notNull().references(() => sessions.id, { onDelete: "cascade" }),
|
|
194
|
+
documentId: text("document_id").notNull().references(() => documents.id, { onDelete: "cascade" }),
|
|
195
|
+
messageId: text("message_id").references(() => messages.id, { onDelete: "set null" }),
|
|
196
|
+
attachedAt: integer("attached_at", { mode: "timestamp_ms" }).notNull()
|
|
197
|
+
},
|
|
198
|
+
(t) => [
|
|
199
|
+
primaryKey({ columns: [t.sessionId, t.documentId] }),
|
|
200
|
+
index("session_documents_session_idx").on(t.sessionId, t.attachedAt),
|
|
201
|
+
index("session_documents_document_idx").on(t.documentId)
|
|
202
|
+
]
|
|
203
|
+
);
|
|
172
204
|
var documentChunks = sqliteTable(
|
|
173
205
|
"document_chunks",
|
|
174
206
|
{
|
|
@@ -181,12 +213,17 @@ var documentChunks = sqliteTable(
|
|
|
181
213
|
(t) => [uniqueIndex("document_chunks_document_seq_idx").on(t.documentId, t.seq)]
|
|
182
214
|
);
|
|
183
215
|
var courseStatuses = ["interviewing", "active", "complete"];
|
|
216
|
+
var placementDepths = ["quick", "thorough", "skip"];
|
|
217
|
+
var courseKinds = ["lessons", "project"];
|
|
184
218
|
var courses = sqliteTable(
|
|
185
219
|
"courses",
|
|
186
220
|
{
|
|
187
221
|
id: text("id").primaryKey(),
|
|
188
222
|
sessionId: text("session_id").notNull().references(() => sessions.id, { onDelete: "cascade" }),
|
|
189
223
|
goal: text("goal").notNull(),
|
|
224
|
+
kind: text("kind", { enum: courseKinds }).notNull().default("lessons"),
|
|
225
|
+
/** How much the placement interview asks (protocol's PlacementDepth); courses from before it are `quick`. */
|
|
226
|
+
placementDepth: text("placement_depth", { enum: placementDepths }).notNull().default("quick"),
|
|
190
227
|
status: text("status", { enum: courseStatuses }).notNull(),
|
|
191
228
|
/** The subject icon's Lucide name, from protocol's `courseIcons`, chosen by the tutor with the first syllabus; null until then. */
|
|
192
229
|
icon: text("icon"),
|
|
@@ -318,9 +355,19 @@ var noteLinks = sqliteTable(
|
|
|
318
355
|
{
|
|
319
356
|
noteId: text("note_id").notNull().references(() => notes.id, { onDelete: "cascade" }),
|
|
320
357
|
target: text("target").notNull(),
|
|
358
|
+
/** Normalised target (`noteKey(target)`) for fast, Unicode- and whitespace-aware backlink lookup. */
|
|
359
|
+
targetKey: text("target_key").notNull().default(""),
|
|
321
360
|
kind: text("kind", { enum: ["link", "embed"] }).notNull()
|
|
322
361
|
},
|
|
323
|
-
(t) => [primaryKey({ columns: [t.noteId, t.target, t.kind] })]
|
|
362
|
+
(t) => [primaryKey({ columns: [t.noteId, t.target, t.kind] }), index("note_links_target_key_idx").on(t.targetKey)]
|
|
363
|
+
);
|
|
364
|
+
var noteAliases = sqliteTable(
|
|
365
|
+
"note_aliases",
|
|
366
|
+
{
|
|
367
|
+
noteId: text("note_id").notNull().references(() => notes.id, { onDelete: "cascade" }),
|
|
368
|
+
aliasKey: text("alias_key").notNull()
|
|
369
|
+
},
|
|
370
|
+
(t) => [primaryKey({ columns: [t.noteId, t.aliasKey] }), index("note_aliases_alias_idx").on(t.aliasKey, t.noteId)]
|
|
324
371
|
);
|
|
325
372
|
var noteTags = sqliteTable(
|
|
326
373
|
"note_tags",
|
|
@@ -330,7 +377,7 @@ var noteTags = sqliteTable(
|
|
|
330
377
|
},
|
|
331
378
|
(t) => [primaryKey({ columns: [t.noteId, t.tag] }), index("note_tags_tag_idx").on(t.tag)]
|
|
332
379
|
);
|
|
333
|
-
var usageKinds = ["chat", "continuation", "lesson", "distillation", "test"];
|
|
380
|
+
var usageKinds = ["chat", "continuation", "lesson", "distillation", "review", "test"];
|
|
334
381
|
var usageStatuses = ["completed", "failed", "cancelled"];
|
|
335
382
|
var usageBillings = ["api", "subscription"];
|
|
336
383
|
var usageRecords = sqliteTable(
|
|
@@ -386,6 +433,25 @@ var conceptSources = sqliteTable(
|
|
|
386
433
|
},
|
|
387
434
|
(t) => [primaryKey({ columns: [t.conceptId, t.noteId] }), index("concept_sources_note_idx").on(t.noteId)]
|
|
388
435
|
);
|
|
436
|
+
var conceptSessionStatuses = ["pending", "active"];
|
|
437
|
+
var conceptSessionSources = sqliteTable(
|
|
438
|
+
"concept_session_sources",
|
|
439
|
+
{
|
|
440
|
+
id: text("id").primaryKey(),
|
|
441
|
+
conceptId: text("concept_id").notNull().references(() => concepts.id, { onDelete: "cascade" }),
|
|
442
|
+
sessionId: text("session_id").references(() => sessions.id, { onDelete: "set null" }),
|
|
443
|
+
/** The run that wrote it; it stays `pending` until that run completes. */
|
|
444
|
+
runId: text("run_id").references(() => runs.id, { onDelete: "set null" }),
|
|
445
|
+
status: text("status", { enum: conceptSessionStatuses }).notNull().default("active"),
|
|
446
|
+
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull()
|
|
447
|
+
},
|
|
448
|
+
(t) => [
|
|
449
|
+
uniqueIndex("concept_session_sources_concept_session_idx").on(t.conceptId, t.sessionId).where(sql`${t.sessionId} is not null`),
|
|
450
|
+
index("concept_session_sources_concept_idx").on(t.conceptId),
|
|
451
|
+
index("concept_session_sources_session_idx").on(t.sessionId),
|
|
452
|
+
index("concept_session_sources_run_idx").on(t.runId)
|
|
453
|
+
]
|
|
454
|
+
);
|
|
389
455
|
var conceptEdgeKinds = ["prerequisite", "related"];
|
|
390
456
|
var conceptEdges = sqliteTable(
|
|
391
457
|
"concept_edges",
|
|
@@ -397,6 +463,27 @@ var conceptEdges = sqliteTable(
|
|
|
397
463
|
},
|
|
398
464
|
(t) => [primaryKey({ columns: [t.fromId, t.toId, t.kind, t.noteId] }), index("concept_edges_note_idx").on(t.noteId), index("concept_edges_to_idx").on(t.toId)]
|
|
399
465
|
);
|
|
466
|
+
var conceptSessionEdges = sqliteTable(
|
|
467
|
+
"concept_session_edges",
|
|
468
|
+
{
|
|
469
|
+
id: text("id").primaryKey(),
|
|
470
|
+
fromId: text("from_id").notNull().references(() => concepts.id, { onDelete: "cascade" }),
|
|
471
|
+
toId: text("to_id").notNull().references(() => concepts.id, { onDelete: "cascade" }),
|
|
472
|
+
kind: text("kind", { enum: conceptEdgeKinds }).notNull(),
|
|
473
|
+
sessionId: text("session_id").references(() => sessions.id, { onDelete: "set null" }),
|
|
474
|
+
/** The run that wrote it; it stays `pending` until that run completes. */
|
|
475
|
+
runId: text("run_id").references(() => runs.id, { onDelete: "set null" }),
|
|
476
|
+
status: text("status", { enum: conceptSessionStatuses }).notNull().default("active"),
|
|
477
|
+
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull()
|
|
478
|
+
},
|
|
479
|
+
(t) => [
|
|
480
|
+
uniqueIndex("concept_session_edges_edge_session_idx").on(t.fromId, t.toId, t.kind, t.sessionId).where(sql`${t.sessionId} is not null`),
|
|
481
|
+
index("concept_session_edges_from_to_idx").on(t.fromId, t.toId, t.kind),
|
|
482
|
+
index("concept_session_edges_to_idx").on(t.toId),
|
|
483
|
+
index("concept_session_edges_session_idx").on(t.sessionId),
|
|
484
|
+
index("concept_session_edges_run_idx").on(t.runId)
|
|
485
|
+
]
|
|
486
|
+
);
|
|
400
487
|
var memorySources = sqliteTable(
|
|
401
488
|
"memory_sources",
|
|
402
489
|
{
|
|
@@ -407,6 +494,28 @@ var memorySources = sqliteTable(
|
|
|
407
494
|
},
|
|
408
495
|
(t) => [primaryKey({ columns: [t.memoryId, t.noteId] }), index("memory_sources_note_idx").on(t.noteId)]
|
|
409
496
|
);
|
|
497
|
+
var reviewSessions = sqliteTable("review_sessions", {
|
|
498
|
+
sessionId: text("session_id").primaryKey().references(() => sessions.id, { onDelete: "cascade" }),
|
|
499
|
+
concepts: text("concepts", { mode: "json" }).notNull(),
|
|
500
|
+
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull()
|
|
501
|
+
});
|
|
502
|
+
var flashcardRatings = ["again", "good", "easy"];
|
|
503
|
+
var flashcardReviews = sqliteTable(
|
|
504
|
+
"flashcard_reviews",
|
|
505
|
+
{
|
|
506
|
+
id: text("id").primaryKey(),
|
|
507
|
+
artifactId: text("artifact_id").notNull().references(() => artifacts.id, { onDelete: "cascade" }),
|
|
508
|
+
sessionId: text("session_id").notNull().references(() => sessions.id, { onDelete: "cascade" }),
|
|
509
|
+
cardId: text("card_id").notNull(),
|
|
510
|
+
rating: text("rating", { enum: flashcardRatings }).notNull(),
|
|
511
|
+
repetitions: integer("repetitions").notNull(),
|
|
512
|
+
intervalDays: integer("interval_days").notNull(),
|
|
513
|
+
ease: real("ease").notNull(),
|
|
514
|
+
dueAt: integer("due_at", { mode: "timestamp_ms" }).notNull(),
|
|
515
|
+
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull()
|
|
516
|
+
},
|
|
517
|
+
(t) => [index("flashcard_reviews_card_idx").on(t.artifactId, t.cardId, t.createdAt), index("flashcard_reviews_session_idx").on(t.sessionId)]
|
|
518
|
+
);
|
|
410
519
|
|
|
411
520
|
// ../server/src/db/client.ts
|
|
412
521
|
var defaultMigrations = fileURLToPath(new URL("../../drizzle", import.meta.url));
|
|
@@ -449,7 +558,11 @@ function openDb(path, { migrationsFolder = defaultMigrations, onBackup, clock =
|
|
|
449
558
|
if (backup) onBackup?.(backup);
|
|
450
559
|
}
|
|
451
560
|
const db = drizzle(sqlite, { schema: schema_exports });
|
|
561
|
+
sqlite.pragma("foreign_keys = OFF");
|
|
452
562
|
migrate(db, { migrationsFolder });
|
|
563
|
+
sqlite.pragma("foreign_keys = ON");
|
|
564
|
+
const violations = sqlite.pragma("foreign_key_check");
|
|
565
|
+
if (violations.length > 0) throw new Error(`Database foreign key check failed after migration (${violations.length} violation(s)).`);
|
|
453
566
|
return db;
|
|
454
567
|
} catch (error) {
|
|
455
568
|
sqlite.close();
|
|
@@ -465,6 +578,7 @@ export {
|
|
|
465
578
|
attempts,
|
|
466
579
|
memories,
|
|
467
580
|
documents,
|
|
581
|
+
sessionDocuments,
|
|
468
582
|
documentChunks,
|
|
469
583
|
courses,
|
|
470
584
|
syllabusVersions,
|
|
@@ -476,14 +590,19 @@ export {
|
|
|
476
590
|
notes,
|
|
477
591
|
noteChunks,
|
|
478
592
|
noteLinks,
|
|
593
|
+
noteAliases,
|
|
479
594
|
noteTags,
|
|
480
595
|
usageRecords,
|
|
481
596
|
concepts,
|
|
482
597
|
conceptSources,
|
|
598
|
+
conceptSessionSources,
|
|
483
599
|
conceptEdges,
|
|
600
|
+
conceptSessionEdges,
|
|
484
601
|
memorySources,
|
|
602
|
+
reviewSessions,
|
|
603
|
+
flashcardReviews,
|
|
485
604
|
KEEP_BACKUPS,
|
|
486
605
|
NewerDatabaseError,
|
|
487
606
|
openDb
|
|
488
607
|
};
|
|
489
|
-
//# sourceMappingURL=chunk-
|
|
608
|
+
//# sourceMappingURL=chunk-M62PZTK3.js.map
|