@qvac/sdk 0.19.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -365,11 +365,11 @@ Third-Party Model Licenses
365
365
  gte-large-gguf
366
366
  https://huggingface.co/ChristianAzinn/gte-large-gguf
367
367
  indic-conformer-ctc.f16
368
- https://huggingface.co/ai4bharat/indic-conformer
368
+ https://huggingface.co/ai4bharat/indic-conformer-600m-multilingual
369
369
  indic-conformer-ctc.q4_0
370
- https://huggingface.co/ai4bharat/indic-conformer
370
+ https://huggingface.co/ai4bharat/indic-conformer-600m-multilingual
371
371
  indic-conformer-ctc.q8_0
372
- https://huggingface.co/ai4bharat/indic-conformer
372
+ https://huggingface.co/ai4bharat/indic-conformer-600m-multilingual
373
373
  lavasr-denoiser-f16
374
374
  https://huggingface.co/spaces/YatharthS
375
375
  lavasr-enhancer-f16
@@ -665,47 +665,48 @@ JavaScript Dependencies
665
665
 
666
666
  @hyperswarm/secret-stream@6.9.1
667
667
  https://github.com/holepunchto/hyperswarm-secret-stream
668
- @qvac/asr-ggml@0.3.2
668
+ @qvac/asr-ggml@0.3.3
669
669
  https://github.com/tetherto/qvac
670
- @qvac/audiogen-ggml@0.2.3
670
+ @qvac/audiogen-ggml@0.3.3
671
671
  https://github.com/tetherto/qvac
672
- @qvac/bci-whispercpp@0.7.2
672
+ @qvac/bci-whispercpp@0.8.2
673
673
  https://github.com/tetherto/qvac
674
- @qvac/classification-ggml@0.20.0
674
+ @qvac/classification-ggml@0.23.0
675
675
  https://github.com/tetherto/qvac
676
676
  @qvac/decoder-audio@0.5.0
677
677
  https://github.com/tetherto/qvac
678
678
  @qvac/diagnostics@0.1.2
679
679
  https://github.com/tetherto/qvac
680
- @qvac/diffusion-cpp@0.17.0
680
+ @qvac/diffusion-cpp@0.21.0
681
681
  https://github.com/tetherto/qvac
682
- @qvac/embed-llamacpp@0.34.0
682
+ @qvac/embed-llamacpp@0.37.0
683
683
  https://github.com/tetherto/qvac
684
684
  @qvac/error@0.1.1
685
- @qvac/fabric@0.6.0
685
+ @qvac/fabric@0.10.0
686
686
  https://github.com/tetherto/qvac
687
687
  @qvac/infer-base@0.4.2
688
688
  https://github.com/tetherto/qvac
689
689
  @qvac/infer-base@0.6.2
690
690
  https://github.com/tetherto/qvac
691
+ @qvac/inference@0.19.1
692
+ https://github.com/tetherto/qvac
691
693
  @qvac/langdetect-text@0.1.2
692
694
  https://github.com/tetherto/qvac
693
- @qvac/llm-llamacpp@0.45.0
695
+ @qvac/llm-llamacpp@0.49.1
694
696
  https://github.com/tetherto/qvac
695
- @qvac/logging@0.1.0
696
- @qvac/ocr-ggml@0.18.0
697
+ @qvac/logging@0.1.1
697
698
  https://github.com/tetherto/qvac
698
- @qvac/rag@0.6.4
699
+ @qvac/ocr-ggml@0.21.0
699
700
  https://github.com/tetherto/qvac
700
701
  @qvac/registry-client@0.6.1
701
702
  https://github.com/tetherto/qvac
702
703
  @qvac/registry-schema@0.3.0
703
704
  https://github.com/tetherto/qvac
704
- @qvac/translation-nmtcpp@0.10.0
705
+ @qvac/translation-nmtcpp@0.13.0
705
706
  https://github.com/tetherto/qvac
706
- @qvac/tts-ggml@0.7.4
707
+ @qvac/tts-ggml@0.8.1
707
708
  https://github.com/tetherto/qvac
708
- @qvac/vla-ggml@0.21.1
709
+ @qvac/vla-ggml@0.24.0
709
710
  https://github.com/tetherto/qvac
710
711
  adaptive-timeout@1.0.1
711
712
  https://github.com/holepunchto/adaptive-timeout
@@ -715,15 +716,15 @@ JavaScript Dependencies
715
716
  https://github.com/holepunchto/bare-abort
716
717
  bare-abort-controller@1.1.2
717
718
  https://github.com/holepunchto/bare-abort-controller
718
- bare-addon-resolve@1.10.0
719
+ bare-addon-resolve@1.10.1
719
720
  https://github.com/holepunchto/bare-addon-resolve
720
721
  bare-ansi-escapes@2.2.3
721
722
  https://github.com/holepunchto/bare-ansi-escapes
722
723
  bare-assert@1.2.0
723
724
  https://github.com/holepunchto/bare-assert
724
- bare-buffer@3.6.1
725
+ bare-buffer@3.7.1
725
726
  https://github.com/holepunchto/bare-buffer
726
- bare-bundle@1.10.0
727
+ bare-bundle@1.11.0
727
728
  https://github.com/holepunchto/bare-bundle
728
729
  bare-bundle-id@1.0.2
729
730
  https://github.com/holepunchto/bare-bundle-id
@@ -735,15 +736,15 @@ JavaScript Dependencies
735
736
  https://github.com/holepunchto/bare-crypto
736
737
  bare-debug-log@2.0.0
737
738
  https://github.com/holepunchto/bare-debug-log
738
- bare-dns@2.1.4
739
+ bare-dns@2.2.0
739
740
  https://github.com/holepunchto/bare-dns
740
741
  bare-encoding@1.0.3
741
742
  https://github.com/holepunchto/bare-encoding
742
- bare-env@3.0.0
743
+ bare-env@3.0.1
743
744
  https://github.com/holepunchto/bare-env
744
- bare-events@2.9.1
745
+ bare-events@2.9.2
745
746
  https://github.com/holepunchto/bare-events
746
- bare-fetch@3.0.1
747
+ bare-fetch@3.2.1
747
748
  https://github.com/holepunchto/bare-fetch
748
749
  bare-ffmpeg@1.5.0
749
750
  https://github.com/holepunchto/bare-ffmpeg
@@ -751,59 +752,69 @@ JavaScript Dependencies
751
752
  https://github.com/holepunchto/bare-form-data
752
753
  bare-format@1.0.2
753
754
  https://github.com/holepunchto/bare-format
754
- bare-fs@4.7.2
755
+ bare-fs@4.8.1
755
756
  https://github.com/holepunchto/bare-fs
756
757
  bare-gpu-info@0.1.1
757
758
  https://github.com/holepunchto/bare-gpu-info
758
- bare-hrtime@2.1.1
759
+ bare-hrtime@2.1.2
759
760
  https://github.com/holepunchto/bare-hrtime
760
- bare-http-parser@1.1.5
761
+ bare-http-parser@2.1.4
761
762
  https://github.com/holepunchto/bare-http-parser
762
- bare-http1@4.5.7
763
+ bare-http1@4.6.1
763
764
  https://github.com/holepunchto/bare-http1
764
- bare-https@3.0.0
765
+ bare-https@3.1.0
765
766
  https://github.com/holepunchto/bare-https
766
- bare-inspect@3.1.4
767
+ bare-inspect@3.1.10
767
768
  https://github.com/holepunchto/bare-inspect
768
- bare-inspector@6.0.2
769
+ bare-inspector@6.1.0
769
770
  https://github.com/holepunchto/bare-inspector
771
+ bare-lief@0.2.7
772
+ https://github.com/holepunchto/bare-lief
773
+ bare-link@3.3.0
774
+ https://github.com/holepunchto/bare-link
770
775
  bare-mime@1.0.0
771
776
  https://github.com/holepunchto/bare-mime
772
- bare-module@6.2.1
777
+ bare-module@6.4.0
773
778
  https://github.com/holepunchto/bare-module
774
- bare-module-lexer@1.5.2
779
+ bare-module-lexer@1.6.6
775
780
  https://github.com/holepunchto/bare-module-lexer
776
- bare-module-resolve@1.12.2
781
+ bare-module-resolve@1.12.5
777
782
  https://github.com/holepunchto/bare-module-resolve
778
- bare-module-traverse@2.1.2
783
+ bare-module-traverse@2.5.5
779
784
  https://github.com/holepunchto/bare-module-traverse
780
- bare-net@2.3.2
785
+ bare-net@2.3.3
781
786
  https://github.com/holepunchto/bare-net
782
787
  bare-os@3.9.3
783
788
  https://github.com/holepunchto/bare-os
784
- bare-pack@2.1.3
789
+ bare-pack@2.2.2
785
790
  https://github.com/holepunchto/bare-pack
786
- bare-path@3.0.1
791
+ bare-path@3.1.2
787
792
  https://github.com/holepunchto/bare-path
788
- bare-pipe@4.2.2
793
+ bare-performance@2.1.1
794
+ https://github.com/holepunchto/bare-performance
795
+ bare-pipe@4.3.1
789
796
  https://github.com/holepunchto/bare-pipe
790
- bare-process@4.4.1
797
+ bare-posix@1.0.1
798
+ https://github.com/holepunchto/bare-posix
799
+ bare-process@4.5.1
791
800
  https://github.com/holepunchto/bare-process
792
- bare-rpc@1.3.3
801
+ bare-rpc@1.3.8
793
802
  https://github.com/holepunchto/bare-rpc
794
- bare-runtime@1.28.7
803
+ bare-runtime@1.32.0
795
804
  https://github.com/holepunchto/bare-runtime
796
- bare-runtime-darwin-arm64@1.28.7
805
+ bare-runtime-darwin-arm64@1.32.0
797
806
  https://github.com/holepunchto/bare-runtime
798
- bare-semver@1.0.3
807
+ bare-semver@1.1.0
799
808
  https://github.com/holepunchto/bare-semver
800
809
  bare-signals@4.2.0
801
810
  https://github.com/holepunchto/bare-signals
802
- bare-stdio@1.0.2
811
+ bare-signals@5.0.0
812
+ https://github.com/holepunchto/bare-signals
813
+ bare-stdio@1.0.3
803
814
  https://github.com/holepunchto/bare-stdio
804
- bare-stream@2.13.3
815
+ bare-stream@2.13.4
805
816
  https://github.com/holepunchto/bare-stream
806
- bare-structured-clone@1.5.5
817
+ bare-structured-clone@1.6.0
807
818
  https://github.com/holepunchto/bare-structured-clone
808
819
  bare-stylize@0.0.1
809
820
  https://github.com/holepunchto/bare-stylize
@@ -811,28 +822,30 @@ JavaScript Dependencies
811
822
  https://github.com/holepunchto/bare-subprocess
812
823
  bare-subprocess@6.1.0
813
824
  https://github.com/holepunchto/bare-subprocess
814
- bare-tcp@2.5.1
825
+ bare-tcp@2.6.1
815
826
  https://github.com/holepunchto/bare-tcp
816
- bare-tls@3.1.7
827
+ bare-tls@3.1.10
817
828
  https://github.com/holepunchto/bare-tls
818
- bare-tty@5.1.1
829
+ bare-tty@5.2.1
819
830
  https://github.com/holepunchto/bare-tty
820
- bare-type@1.1.0
831
+ bare-type@1.1.1
821
832
  https://github.com/holepunchto/bare-type
822
- bare-url@2.4.5
833
+ bare-type-stripper@0.1.6
834
+ https://github.com/holepunchto/bare-type-stripper
835
+ bare-url@2.5.4
823
836
  https://github.com/holepunchto/bare-url
824
837
  bare-utils@1.6.0
825
838
  https://github.com/holepunchto/bare-utils
826
839
  bare-v8-to-istanbul@1.0.2
827
- bare-ws@3.0.0
840
+ bare-ws@3.1.0
828
841
  https://github.com/holepunchto/bare-ws
829
- bare-zlib@1.4.0
842
+ bare-zlib@1.4.1
830
843
  https://github.com/holepunchto/bare-zlib
831
844
  blind-relay@1.6.1
832
845
  https://github.com/holepunchto/blind-relay
833
846
  brittle@3.19.1
834
847
  https://github.com/holepunchto/brittle
835
- compact-encoding@3.2.0
848
+ compact-encoding@3.5.0
836
849
  https://github.com/holepunchto/compact-encoding
837
850
  compact-encoding-bitfield@1.1.0
838
851
  https://github.com/compact-encoding/compact-encoding-bitfield
@@ -842,11 +855,11 @@ JavaScript Dependencies
842
855
  https://github.com/holepunchto/device-file
843
856
  events-universal@1.0.1
844
857
  https://github.com/holepunchto/events-universal
845
- fd-lock@2.1.1
858
+ fd-lock@2.2.0
846
859
  https://github.com/holepunchto/fd-lock
847
- fs-native-extensions@1.5.0
860
+ fs-native-extensions@1.5.1
848
861
  https://github.com/holepunchto/fs-native-extensions
849
- globbie@1.0.3
862
+ globbie@1.0.6
850
863
  https://github.com/holepunchto/globbie
851
864
  hyperblobs@2.12.1
852
865
  https://github.com/holepunchto/hyperblobs
@@ -854,21 +867,21 @@ JavaScript Dependencies
854
867
  https://github.com/holepunchto/hypercore-errors
855
868
  hypercore-id-encoding@1.3.0
856
869
  https://github.com/holepunchto/hypercore-id-encoding
857
- hypercore-stats@2.4.0
870
+ hypercore-stats@2.5.1
858
871
  https://github.com/holepunchto/hypercore-stats
859
- hypercore-storage@3.1.1
872
+ hypercore-storage@3.2.1
860
873
  https://github.com/holepunchto/hypercore-storage
861
- hyperdb@6.7.0
874
+ hyperdb@6.9.0
862
875
  https://github.com/holepunchto/hyperdb
863
876
  hyperdht-address@1.1.1
864
877
  https://github.com/holepunchto/hyperdht-address
865
- hyperdht-stats@1.10.0
878
+ hyperdht-stats@1.11.0
866
879
  https://github.com/holepunchto/hyperdht-stats
867
880
  hyperdispatch@1.6.0
868
881
  https://github.com/holepunchto/hyperdispatch
869
- hyperdrive@13.3.2
882
+ hyperdrive@13.3.3
870
883
  https://github.com/holepunchto/hyperdrive
871
- hyperschema@1.21.0
884
+ hyperschema@1.24.0
872
885
  https://github.com/holepunchto/hyperschema
873
886
  hyperswarm-stats@1.3.1
874
887
  https://github.com/holepunchto/hyperswarm-stats
@@ -878,7 +891,7 @@ JavaScript Dependencies
878
891
  https://github.com/holepunchto/mirror-drive
879
892
  noise-handshake@4.2.0
880
893
  https://github.com/holepunchto/noise-handshake
881
- paparam@1.10.1
894
+ paparam@1.13.0
882
895
  https://github.com/holepunchto/paparam
883
896
  passive-core-watcher@1.0.1
884
897
  https://github.com/holepunchto/passive-core-watcher
@@ -892,13 +905,13 @@ JavaScript Dependencies
892
905
  https://github.com/holepunchto/rache
893
906
  refcounter@1.0.0
894
907
  https://github.com/holepunchto/refcounter
895
- require-addon@1.2.0
908
+ require-addon@1.3.0
896
909
  https://github.com/holepunchto/require-addon
897
910
  require-asset@1.2.2
898
911
  https://github.com/holepunchto/require-asset
899
912
  resource-on-exit@1.0.0
900
913
  https://github.com/holepunchto/bare-teardown
901
- rocksdb-native@3.16.0
914
+ rocksdb-native@3.17.4
902
915
  https://github.com/holepunchto/rocksdb-native
903
916
  scope-lock@1.2.4
904
917
  https://github.com/holepunchto/scope-lock
@@ -908,7 +921,7 @@ JavaScript Dependencies
908
921
  https://github.com/holepunchto/sub-encoder
909
922
  text-decoder@1.2.7
910
923
  https://github.com/holepunchto/text-decoder
911
- udx-native@1.20.7
924
+ udx-native@1.21.1
912
925
  https://github.com/holepunchto/udx-native
913
926
  unslab@1.3.0
914
927
  https://github.com/holepunchto/unslab
@@ -925,7 +938,7 @@ JavaScript Dependencies
925
938
  https://github.com/chm-diederichs/noise-curve-ed
926
939
  quickbit-universal@2.2.0
927
940
  https://github.com/holepunchto/quickbit-universal
928
- semver@7.8.4
941
+ semver@7.8.5
929
942
  https://github.com/npm/node-semver
930
943
  simdle-universal@1.1.2
931
944
  https://github.com/holepunchto/simdle-universal
@@ -938,7 +951,7 @@ JavaScript Dependencies
938
951
 
939
952
  @jridgewell/resolve-uri@3.1.2
940
953
  https://github.com/jridgewell/resolve-uri
941
- @jridgewell/sourcemap-codec@1.5.5
954
+ @jridgewell/sourcemap-codec@1.6.0
942
955
  https://github.com/jridgewell/sourcemaps
943
956
  @jridgewell/trace-mapping@0.3.31
944
957
  https://github.com/jridgewell/sourcemaps
@@ -954,7 +967,7 @@ JavaScript Dependencies
954
967
  https://github.com/mafintosh/codecs
955
968
  convert-source-map@2.0.0
956
969
  https://github.com/thlorenz/convert-source-map
957
- corestore@7.10.1
970
+ corestore@7.12.4
958
971
  https://github.com/holepunchto/corestore
959
972
  debounceify@1.1.0
960
973
  https://github.com/mafintosh/debounceify
@@ -974,13 +987,13 @@ JavaScript Dependencies
974
987
  https://github.com/mafintosh/generate-string
975
988
  hyperbee@2.27.3
976
989
  https://github.com/holepunchto/hyperbee
977
- hypercore@11.33.1
990
+ hypercore@11.35.5
978
991
  https://github.com/holepunchto/hypercore
979
992
  hypercore-crypto@3.7.0
980
993
  https://github.com/mafintosh/hypercore-crypto
981
- hyperdht@6.32.0
994
+ hyperdht@6.34.0
982
995
  https://github.com/holepunchto/hyperdht
983
- hyperswarm@4.17.0
996
+ hyperswarm@4.17.1
984
997
  https://github.com/holepunchto/hyperswarm
985
998
  is-options@1.0.2
986
999
  https://github.com/mafintosh/is-options
@@ -988,19 +1001,17 @@ JavaScript Dependencies
988
1001
  https://github.com/mikolalysenko/is-property
989
1002
  kademlia-routing-table@1.0.6
990
1003
  https://github.com/mafintosh/kademlia-routing-table
991
- llm-splitter@0.2.0
992
- https://github.com/nearform/llm-splitter
993
1004
  mutexify@1.4.0
994
1005
  https://github.com/mafintosh/mutexify
995
1006
  nat-sampler@1.0.1
996
1007
  https://github.com/mafintosh/nat-sampler
997
- picomatch@4.0.4
1008
+ picomatch@4.0.7
998
1009
  https://github.com/micromatch/picomatch
999
1010
  promaphore@1.0.0
1000
1011
  https://github.com/mafintosh/promaphore
1001
1012
  protocol-buffers-encodings@1.2.0
1002
1013
  https://github.com/mafintosh/protocol-buffers-encodings
1003
- protomux@3.11.0
1014
+ protomux@3.12.0
1004
1015
  https://github.com/holepunchto/protomux
1005
1016
  queue-tick@1.0.1
1006
1017
  https://github.com/mafintosh/queue-tick
@@ -1034,9 +1045,9 @@ JavaScript Dependencies
1034
1045
  https://github.com/mafintosh/speedometer
1035
1046
  stackframe@1.3.4
1036
1047
  https://github.com/stacktracejs/stackframe
1037
- streamx@2.28.0
1048
+ streamx@2.28.1
1038
1049
  https://github.com/mafintosh/streamx
1039
- tar-stream@3.2.0
1050
+ tar-stream@3.2.1
1040
1051
  https://github.com/mafintosh/tar-stream
1041
1052
  teex@1.0.1
1042
1053
  https://github.com/mafintosh/teex
@@ -1056,10 +1067,10 @@ JavaScript Dependencies
1056
1067
  https://github.com/mafintosh/unordered-set
1057
1068
  varint@5.0.0
1058
1069
  https://github.com/chrisdickinson/varint
1059
- xache@1.2.1
1070
+ xache@1.3.0
1060
1071
  https://github.com/mafintosh/xache
1061
1072
  z32@1.1.0
1062
1073
  https://github.com/mafintosh/z32
1063
- zod@4.4.3
1074
+ zod@4.6.1
1064
1075
  https://github.com/colinhacks/zod
1065
1076
 
@@ -53,7 +53,12 @@ try {
53
53
  for (const [index, model] of result.models.entries()) {
54
54
  const mark = VERDICT_MARK[model.verdict];
55
55
  const size = gib(CANDIDATES[index].expectedSize).padStart(9);
56
- const needs = model.estimate ? `needs ${gib(model.estimate.upperBoundBytes)}` : '';
56
+ // A calibrated row has a two-sided estimate; a computed-only row has the floor.
57
+ const needs = model.estimate
58
+ ? `needs ${gib(model.estimate.upperBoundBytes)}`
59
+ : model.evidence === 'computed-only' && model.floorBytes
60
+ ? `at least ${gib(model.floorBytes)}`
61
+ : '';
57
62
  console.log(` ${mark} ${model.name.padEnd(46)} ${size} on disk ${needs}`);
58
63
  // Present on every `unknown`, and worth surfacing: it names what is missing.
59
64
  if (model.verdict === 'unknown') {
@@ -69,13 +69,16 @@ try {
69
69
  console.log('\n▸ 2. Delete specific model within cache key:');
70
70
  console.log('▸ await deleteCache({ kvCacheKey: "my-session", modelId: "model-abc" })');
71
71
  console.log('▸ └─ Removes: my-session/model-abc/ (specific model directory)');
72
- console.log('\n▸ 3. Delete ALL caches (entire cache folder):');
72
+ console.log('\n▸ 3. Reclaim automatic caches only (named keys survive):');
73
+ console.log('▸ await deleteCache({ auto: true })');
74
+ console.log('▸ └─ Removes: every kvCache:true cache no request is using');
75
+ console.log('\n▸ 4. Delete ALL caches (entire cache folder):');
73
76
  console.log('▸ await deleteCache({ all: true })');
74
77
  console.log('▸ └─ Removes: ALL cache files from all sessions and models');
75
78
  console.log('\n▸ Use Cases:');
76
79
  console.log("▸ - User logout → Delete user's cache key");
77
80
  console.log('▸ - Model updated → Delete old model caches');
78
- console.log('▸ - Disk space cleanup → Delete old cache keys or all caches');
81
+ console.log('▸ - Disk space cleanup → Reclaim with { auto: true }');
79
82
  console.log('▸ - Privacy → Clear conversation history');
80
83
  console.log('▸ - App reset → Delete all caches with { all: true }');
81
84
  await unloadModel({ modelId, clearStorage: false });
@@ -21,17 +21,20 @@
21
21
  * node dist/examples/model-fit-ui/server.js
22
22
  */
23
23
  import { createServer } from 'node:http';
24
- import { readFileSync } from 'node:fs';
25
- import { assessModelFit, getSystemResources, loadModel, unloadModel, completion, close, QWEN3_600M_INST_Q4, QWEN3_1_7B_INST_Q4, QWEN3_4B_INST_Q4_K_M, QWEN3_8B_INST_Q4_K_M, QWEN3_8_27B_MULTIMODAL_UD_Q8_K_XL } from '@qvac/sdk';
24
+ import { readFileSync, readdirSync, statSync } from 'node:fs';
25
+ import { homedir } from 'node:os';
26
+ import { join } from 'node:path';
27
+ import { assessModelFit, getSystemResources, loadModel, unloadModel, completion, close, QWEN3_600M_INST_Q4, QWEN3_1_7B_INST_Q4, QWEN3_4B_INST_Q4_K_M, QWEN3_8B_INST_Q4_K_M, GEMMA4_31B_MULTIMODAL_Q4_K_M } from '@qvac/sdk';
26
28
  const PORT = 8712;
27
- // A ladder ending well past what a laptop has, so one screen shows every
28
- // verdict. The 27B at Q8 is here to be refused.
29
+ // A ladder ending past what a laptop has, so one screen shows every verdict.
30
+ // The 31B is here to be refused: 18 GiB against a 24 GiB machine leaves the OS
31
+ // no way to satisfy it without paging.
29
32
  const CATALOG = [
30
33
  QWEN3_600M_INST_Q4,
31
34
  QWEN3_1_7B_INST_Q4,
32
35
  QWEN3_4B_INST_Q4_K_M,
33
36
  QWEN3_8B_INST_Q4_K_M,
34
- QWEN3_8_27B_MULTIMODAL_UD_Q8_K_XL
37
+ GEMMA4_31B_MULTIMODAL_Q4_K_M
35
38
  ];
36
39
  const PAGE_PATH = new URL('index.html', import.meta.url);
37
40
  // Read per request, not once at startup: editing the page and reloading is the
@@ -43,6 +46,18 @@ function page() {
43
46
  // `onProgress` is passed, and without it a 29 GiB download, a stall and a dead
44
47
  // worker all look identical from the browser: "loading…" forever.
45
48
  const progress = new Map();
49
+ // Whether the weights are already on disk, so a Run costs no download. The
50
+ // cache layout is not API, so this matches on file size — enough to label a
51
+ // button, and it errs towards promising a download that may not happen.
52
+ function cachedSizes() {
53
+ try {
54
+ const dir = join(homedir(), '.qvac', 'models');
55
+ return new Set(readdirSync(dir).map((file) => statSync(join(dir, file)).size));
56
+ }
57
+ catch {
58
+ return new Set();
59
+ }
60
+ }
46
61
  function byName(name) {
47
62
  const model = CATALOG.find((entry) => entry.name === name);
48
63
  if (!model)
@@ -131,7 +146,13 @@ async function run(body) {
131
146
  systemUsedBeforeBytes: before,
132
147
  systemUsedAfterLoadBytes: afterLoad,
133
148
  backendDevice: final.stats?.backendDevice,
134
- sample: final.contentText.trim().slice(0, 120)
149
+ // The engine's own numbers for the run: tokens/s, time to first token,
150
+ // token counts. Worth showing next to the memory figures.
151
+ stats: final.stats,
152
+ // `cacheableAssistantContent` is the same text with <think> blocks
153
+ // stripped; a reasoning model otherwise leads with its scratchpad.
154
+ sample: (final.cacheableAssistantContent ?? final.contentText).trim().slice(0, 160) ||
155
+ '(no plain text — the model returned reasoning only)'
135
156
  };
136
157
  }
137
158
  catch (error) {
@@ -164,7 +185,12 @@ const server = createServer((request, response) => {
164
185
  return;
165
186
  }
166
187
  if (request.method === 'GET' && url === '/api/models') {
167
- sendJson(response, 200, CATALOG.map((model) => ({ name: model.name, expectedSize: model.expectedSize })));
188
+ const sizes = cachedSizes();
189
+ sendJson(response, 200, CATALOG.map((model) => ({
190
+ name: model.name,
191
+ expectedSize: model.expectedSize,
192
+ cached: sizes.has(model.expectedSize)
193
+ })));
168
194
  return;
169
195
  }
170
196
  if (request.method === 'POST' && (url === '/api/assess' || url === '/api/run')) {
@@ -29,8 +29,10 @@ export async function assessModelFit(input) {
29
29
  verdict: response.verdict,
30
30
  basis: response.basis,
31
31
  execution: response.execution,
32
+ ...(response.evidence && { evidence: response.evidence }),
32
33
  ...(response.budget && { budget: response.budget }),
33
34
  ...(response.estimate && { estimate: response.estimate }),
35
+ ...(response.floorBytes !== undefined && { floorBytes: response.floorBytes }),
34
36
  models: response.models,
35
37
  reasons: response.reasons,
36
38
  assumptions: response.assumptions
@@ -2,7 +2,8 @@
2
2
  * Deletes KV cache files.
3
3
  *
4
4
  * @param params - The delete cache parameters
5
- * @param params.all - If true, deletes all cache files
5
+ * @param params.all - If true, deletes all cache files, including caller-owned named caches
6
+ * @param params.auto - If true, reclaims only automatic caches (`completion({ kvCache: true })`) that no request is using. Named caches are untouched. Covers the whole cache directory, which is shared by every QVAC process using the same home directory
6
7
  * @param params.kvCacheKey - The cache key to delete
7
8
  * @param params.modelId - Optional: specific model ID to delete within the cache key. If not provided, deletes entire cache key.
8
9
  * @returns Promise resolving to success status
@@ -12,6 +13,9 @@
12
13
  * // Delete all caches
13
14
  * await deleteCache({ all: true });
14
15
  *
16
+ * // Reclaim disk from automatic caches, leaving named caches alone
17
+ * await deleteCache({ auto: true });
18
+ *
15
19
  * // Delete entire cache key (all models)
16
20
  * await deleteCache({ kvCacheKey: "my-session" });
17
21
  *
@@ -21,6 +25,8 @@
21
25
  */
22
26
  export declare function deleteCache(params: {
23
27
  all: true;
28
+ } | {
29
+ auto: true;
24
30
  } | {
25
31
  kvCacheKey: string;
26
32
  modelId?: string;
@@ -4,7 +4,8 @@ import { InvalidDeleteCacheParamsError, DeleteCacheFailedError } from '../../uti
4
4
  * Deletes KV cache files.
5
5
  *
6
6
  * @param params - The delete cache parameters
7
- * @param params.all - If true, deletes all cache files
7
+ * @param params.all - If true, deletes all cache files, including caller-owned named caches
8
+ * @param params.auto - If true, reclaims only automatic caches (`completion({ kvCache: true })`) that no request is using. Named caches are untouched. Covers the whole cache directory, which is shared by every QVAC process using the same home directory
8
9
  * @param params.kvCacheKey - The cache key to delete
9
10
  * @param params.modelId - Optional: specific model ID to delete within the cache key. If not provided, deletes entire cache key.
10
11
  * @returns Promise resolving to success status
@@ -14,6 +15,9 @@ import { InvalidDeleteCacheParamsError, DeleteCacheFailedError } from '../../uti
14
15
  * // Delete all caches
15
16
  * await deleteCache({ all: true });
16
17
  *
18
+ * // Reclaim disk from automatic caches, leaving named caches alone
19
+ * await deleteCache({ auto: true });
20
+ *
17
21
  * // Delete entire cache key (all models)
18
22
  * await deleteCache({ kvCacheKey: "my-session" });
19
23
  *
@@ -29,6 +33,12 @@ export async function deleteCache(params) {
29
33
  all: true
30
34
  };
31
35
  }
36
+ else if ('auto' in params && params.auto) {
37
+ req = {
38
+ type: 'deleteCache',
39
+ auto: true
40
+ };
41
+ }
32
42
  else if ('kvCacheKey' in params) {
33
43
  req = {
34
44
  type: 'deleteCache',
@@ -1,4 +1,11 @@
1
1
  import type { ExpoConfig } from 'expo/config';
2
+ /**
3
+ * Desktop-only modules deferred so bare-pack stops walking into them. They back
4
+ * the advisory fit check, which mobile refuses at runtime, but the imports are
5
+ * static and pull in `bare-process` -> `bare-posix`, which ships no
6
+ * `android-arm64` prebuild and fails bundle verification.
7
+ */
8
+ declare const MOBILE_UNSUPPORTED_MODULES: string[];
2
9
  declare const MOBILE_HOSTS: string[];
3
10
  type BareKitLinkerPaths = {
4
11
  android: string | null;
@@ -18,7 +25,7 @@ declare function runIOSAddonLinker(linkerPath: string): Promise<void>;
18
25
  * the paths for each platform that was successfully patched.
19
26
  */
20
27
  declare function patchBareKitLinkers(projectRoot: string, qvacSdkPath: string): BareKitLinkerPaths;
21
- export { MOBILE_HOSTS, patchBareKitLinkers, runIOSAddonLinker };
28
+ export { MOBILE_HOSTS, MOBILE_UNSUPPORTED_MODULES, patchBareKitLinkers, runIOSAddonLinker };
22
29
  export type { BareKitLinkerPaths };
23
30
  export default withMobileBundle;
24
31
  //# sourceMappingURL=withMobileBundle.d.ts.map
@@ -12,6 +12,13 @@ import { BundleVerificationFailedError } from '../../utils/errors-client.js';
12
12
  const { withDangerousMod } = configPlugins;
13
13
  /** Modules to defer from mobile bundles (not available at bundle time) */
14
14
  const DEFERRED_MODULES = ['expo-file-system', 'react-native-bare-kit'];
15
+ /**
16
+ * Desktop-only modules deferred so bare-pack stops walking into them. They back
17
+ * the advisory fit check, which mobile refuses at runtime, but the imports are
18
+ * static and pull in `bare-process` -> `bare-posix`, which ships no
19
+ * `android-arm64` prebuild and fails bundle verification.
20
+ */
21
+ const MOBILE_UNSUPPORTED_MODULES = ['bare-runtime/spawn', '@qvac/model-fit/process'];
15
22
  const MOBILE_HOSTS = ['android-arm64', 'ios-arm64', 'ios-arm64-simulator', 'ios-x64-simulator'];
16
23
  /**
17
24
  * Expo plugin: bundle, verify, then copy the mobile worker bundle.
@@ -31,7 +38,11 @@ function withMobileBundle(config) {
31
38
  else {
32
39
  console.log('🕚 QVAC: No config found, generating default bundle (all plugins)...');
33
40
  }
34
- const deferredModules = [...DEFERRED_MODULES, `${sdkPackage.name}/worker.mobile.bundle`];
41
+ const deferredModules = [
42
+ ...DEFERRED_MODULES,
43
+ ...MOBILE_UNSUPPORTED_MODULES,
44
+ `${sdkPackage.name}/worker.mobile.bundle`
45
+ ];
35
46
  const linkerPaths = await runBundler(projectRoot, sdkPackage.dir, configPath, deferredModules);
36
47
  const generatedBundle = path.join(projectRoot, 'qvac', 'worker.bundle.js');
37
48
  await runVerifier(projectRoot, generatedBundle, configPath);
@@ -148,5 +159,5 @@ function patchBareKitLinkers(projectRoot, qvacSdkPath) {
148
159
  }
149
160
  return { android: androidLinkerPath, ios: iosLinkerPath };
150
161
  }
151
- export { MOBILE_HOSTS, patchBareKitLinkers, runIOSAddonLinker };
162
+ export { MOBILE_HOSTS, MOBILE_UNSUPPORTED_MODULES, patchBareKitLinkers, runIOSAddonLinker };
152
163
  export default withMobileBundle;
@@ -59,25 +59,25 @@ native value does not establish one, rather than inventing a scope.
59
59
 
60
60
  ## Metric behavior
61
61
 
62
- | Public metric | Accepted value | Source and scope when `supported` | Current runtime evidence |
63
- | -------------------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
64
- | `capabilities.cpu.value.logicalCores` | Positive integer | `bare-cpu-info`; scope omitted | `supported` on `darwin-arm64` |
65
- | `sample.cpu` | Number from 0 through 1 | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
66
- | `capabilities.memory.totalBytes` | Positive integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
67
- | `sample.memory.usedBytes` | Non-negative integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
68
- | `sample.memory.totalBytes` | Positive integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
69
- | `sample.memory.processUsedBytes` | Non-negative integer | `bare-os`; `process` | `supported` where `bare-os` reports RSS |
70
- | `sample.memory.processAvailableBytes` | Non-negative integer | `bare-os`; `process` | `unavailable` everywhere — iOS needs a native `os_proc_available_memory` source before this reports a value |
71
- | `capabilities.gpus` | Array, including an empty array | `bare-gpu-info`; scope omitted | `supported` with one GPU on `darwin-arm64` |
72
- | `capabilities.gpus.value[].memoryTotalBytes` | Non-negative number | `bare-gpu-info`; `device`, when not unified memory | `unverified` on `darwin-arm64` (unified) |
73
- | `sample.gpus` | Array aligned with the cached GPU inventory | `bare-gpu-info`; scope omitted | `supported` with one GPU sample on `darwin-arm64` |
74
- | `sample.gpus.value[].compute` | Number from 0 through 1 | `bare-gpu-info`; `device` | `supported` on `darwin-arm64` |
75
- | `sample.gpus.value[].encode` | Number from 0 through 1 | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
76
- | `sample.gpus.value[].decode` | Number from 0 through 1 | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
77
- | `sample.gpus.value[].memoryUsedBytes` | Non-negative number | `bare-gpu-info`; `device`, when the sample agrees with the declared memory | `unverified` on `darwin-arm64` (unified) |
78
- | `sample.gpus.value[].memoryTotalBytes` | Non-negative number | `bare-gpu-info`; `device`, when the sample agrees with the declared memory | `unverified` on `darwin-arm64` (unified) |
79
- | `sample.gpus.value[].powerWatts` | Non-negative number | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
80
- | `sample.gpus.value[].temperatureCelsius` | Non-negative number | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
62
+ | Public metric | Accepted value | Source and scope when `supported` | Current runtime evidence |
63
+ | -------------------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------- |
64
+ | `capabilities.cpu.value.logicalCores` | Positive integer | `bare-cpu-info`; scope omitted | `supported` on `darwin-arm64` |
65
+ | `sample.cpu` | Number from 0 through 1 | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
66
+ | `capabilities.memory.totalBytes` | Positive integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
67
+ | `sample.memory.usedBytes` | Non-negative integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
68
+ | `sample.memory.totalBytes` | Positive integer | `bare-cpu-info`; `system` | `supported` on `darwin-arm64` |
69
+ | `sample.memory.processUsedBytes` | Non-negative integer | `bare-os`; `process` | `supported` where `bare-os` reports RSS |
70
+ | `sample.memory.processAvailableBytes` | Non-negative integer | `bare-os`; `process` | `supported` on `ios-arm64`; `unavailable` elsewhere |
71
+ | `capabilities.gpus` | Array, including an empty array | `bare-gpu-info`; scope omitted | `supported` with one GPU on `darwin-arm64` |
72
+ | `capabilities.gpus.value[].memoryTotalBytes` | Non-negative number | `bare-gpu-info`; `device`, when not unified memory | `unverified` on `darwin-arm64` (unified) |
73
+ | `sample.gpus` | Array aligned with the cached GPU inventory | `bare-gpu-info`; scope omitted | `supported` with one GPU sample on `darwin-arm64` |
74
+ | `sample.gpus.value[].compute` | Number from 0 through 1 | `bare-gpu-info`; `device` | `supported` on `darwin-arm64` |
75
+ | `sample.gpus.value[].encode` | Number from 0 through 1 | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
76
+ | `sample.gpus.value[].decode` | Number from 0 through 1 | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
77
+ | `sample.gpus.value[].memoryUsedBytes` | Non-negative number | `bare-gpu-info`; `device`, when the sample agrees with the declared memory | `unverified` on `darwin-arm64` (unified) |
78
+ | `sample.gpus.value[].memoryTotalBytes` | Non-negative number | `bare-gpu-info`; `device`, when the sample agrees with the declared memory | `unverified` on `darwin-arm64` (unified) |
79
+ | `sample.gpus.value[].powerWatts` | Non-negative number | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
80
+ | `sample.gpus.value[].temperatureCelsius` | Non-negative number | `bare-gpu-info`; `device` | `unavailable` on `darwin-arm64` |
81
81
 
82
82
  For GPU memory, a missing native value becomes `unavailable`. The native API
83
83
  does not identify the scope of a present value, so the SDK establishes it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/sdk",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -220,7 +220,7 @@
220
220
  "@qvac/diffusion-cpp": "^0.21.0",
221
221
  "@qvac/embed-llamacpp": "^0.37.0",
222
222
  "@qvac/error": "^0.1.1",
223
- "@qvac/inference": "^0.19.0",
223
+ "@qvac/inference": "^0.19.1",
224
224
  "@qvac/langdetect-text": "^0.1.2",
225
225
  "@qvac/llm-llamacpp": "^0.49.1",
226
226
  "@qvac/logging": "^0.1.0",