@qvac/registry-client 0.1.5 → 0.1.8

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 ADDED
@@ -0,0 +1,458 @@
1
+ @qvac/registry-client
2
+ Copyright 2026 Tether Data, S.A. de C.V.
3
+
4
+ This product includes third-party components under their
5
+ respective licenses. @qvac/registry-client itself is licensed under
6
+ Apache-2.0; bundled dependencies are governed by the licenses
7
+ listed below.
8
+
9
+ =========================================================================
10
+ Required Attribution Notices
11
+ =========================================================================
12
+
13
+ Gemma is provided under and subject to the Gemma Terms of Use found
14
+ at ai.google.dev/gemma/terms
15
+
16
+ Additional requirements per Section 3.1:
17
+ Distribution must be accompanied by the Gemma Terms of Use.
18
+ Use is subject to the Gemma Prohibited Use Policy at
19
+ ai.google.dev/gemma/prohibited_use_policy
20
+
21
+ HAI-DEF is provided under and subject to the Health AI Developer
22
+ Foundations Terms of Use found at
23
+ https://developers.google.com/health-ai-developer-foundations/terms
24
+
25
+ Additional requirements per Section 3.1:
26
+ Distribution must be accompanied by the HAI-DEF Terms of Use.
27
+ Clinical use requires Health Regulatory Authorization from the
28
+ relevant authority (Section 3.1.3).
29
+ Use is subject to the HAI-DEF Prohibited Use Policy at
30
+ developers.google.com/health-ai-developer-foundations/prohibited-use-policy
31
+
32
+ Llama 3.2 is licensed under the Llama 3.2 Community License,
33
+ Copyright (c) Meta Platforms, Inc. All Rights Reserved.
34
+
35
+ Additional requirements per license Section 1.b.i:
36
+ Products or services distributing or containing Llama 3.2 materials
37
+ must prominently display "Built with Llama" on a related website,
38
+ user interface, blog post, about page, or product documentation.
39
+
40
+ =========================================================================
41
+ Third-Party Model Licenses
42
+ =========================================================================
43
+
44
+ --- apache-2.0 (Apache License 2.0) ---
45
+
46
+ de-tiny-ggml-model-f16
47
+ https://huggingface.co/primeline/whisper-tiny-german-1224
48
+ en-base-ggml-model-f16
49
+ https://huggingface.co/openai/whisper-base
50
+ fr-base-ggml-model-f16
51
+ https://huggingface.co/personalizedrefrigerator/whisper-base-fr
52
+ fr-tiny-ggml-model-f16
53
+ https://huggingface.co/JaepaX/whisper-tiny-fr
54
+ ggml-opus-ar-en
55
+ https://huggingface.co/Helsinki-NLP/opus-mt-ar-en
56
+ ggml-opus-de-en
57
+ https://huggingface.co/Helsinki-NLP/opus-mt-de-en
58
+ ggml-opus-de-fr
59
+ https://huggingface.co/Helsinki-NLP/opus-mt-de-fr
60
+ ggml-opus-en-ar
61
+ https://huggingface.co/Helsinki-NLP/opus-mt-en-ar
62
+ ggml-opus-en-es
63
+ https://huggingface.co/Helsinki-NLP/opus-mt-en-es
64
+ ggml-opus-en-fr
65
+ https://huggingface.co/Helsinki-NLP/opus-mt-en-fr
66
+ ggml-opus-en-it
67
+ https://huggingface.co/Helsinki-NLP/opus-mt-en-it
68
+ ggml-opus-en-ru
69
+ https://huggingface.co/Helsinki-NLP/opus-mt-en-ru
70
+ ggml-opus-en-zh
71
+ https://huggingface.co/Helsinki-NLP/opus-mt-en-zh
72
+ ggml-opus-es-en
73
+ https://huggingface.co/Helsinki-NLP/opus-mt-es-en
74
+ ggml-opus-es-fr
75
+ https://huggingface.co/Helsinki-NLP/opus-mt-es-fr
76
+ ggml-opus-fr-de
77
+ https://huggingface.co/Helsinki-NLP/opus-mt-fr-de
78
+ ggml-opus-fr-en
79
+ https://huggingface.co/Helsinki-NLP/opus-mt-fr-en
80
+ ggml-opus-fr-es
81
+ https://huggingface.co/Helsinki-NLP/opus-mt-fr-es
82
+ ggml-opus-it-en
83
+ https://huggingface.co/Helsinki-NLP/opus-mt-it-en
84
+ ggml-opus-ja-en
85
+ https://huggingface.co/Helsinki-NLP/opus-mt-ja-en
86
+ ggml-opus-mt-en-roa-f16
87
+ https://huggingface.co/Helsinki-NLP/opus-mt-en-roa
88
+ ggml-opus-mt-roa-en-f16
89
+ https://huggingface.co/Helsinki-NLP/opus-mt-roa-en
90
+ gpt-oss-20b-GGUF
91
+ https://huggingface.co/unsloth/gpt-oss-20b-GGUF
92
+ it-base-ggml-model-f16
93
+ https://huggingface.co/gustavv-andrzejewski/distil-whisper-base-it
94
+ it-tiny-ggml-model-f16
95
+ https://huggingface.co/luigisaetta/whisper-tiny-it
96
+ ja-base-ggml-model-f16
97
+ https://huggingface.co/bygreencn/whisper-base-ja
98
+ ja-tiny-ggml-model-f16
99
+ https://huggingface.co/CheeLi03/whisper-tiny-ja-puct-4k
100
+ laser-dolphin-mixtral-2x7b-dpo-GGUF
101
+ https://huggingface.co/jmb95/laser-dolphin-mixtral-2x7b-dpo-GGUF
102
+ Llama_3.2_1B_Intruct_Tool_Calling_V2-GGUF
103
+ https://huggingface.co/mav23/Llama_3.2_1B_Intruct_Tool_Calling_V2-GGUF
104
+ nb-tiny-ggml-model
105
+ https://huggingface.co/NbAiLab/nb-whisper-tiny
106
+ pt-base-ggml-model-f16
107
+ https://huggingface.co/mariana-coelho-9/whisper-base-pt
108
+ Qwen3-0.6B-GGUF
109
+ https://huggingface.co/unsloth/Qwen3-0.6B-GGUF
110
+ Qwen3-1.7B-GGUF
111
+ https://huggingface.co/unsloth/Qwen3-1.7B-GGUF
112
+ Qwen3-4B-Q4_0-00001-of-00005
113
+ https://huggingface.co/unsloth/Qwen3-4B-GGUF
114
+ Qwen3-4B-Q4_K_M
115
+ https://huggingface.co/Qwen/Qwen3-4B-GGUF
116
+ Qwen3-8B-GGUF
117
+ https://huggingface.co/Qwen/Qwen3-8B-GGUF
118
+ Qwen3-VL-2B-Instruct-GGUF
119
+ https://huggingface.co/Qwen/Qwen3-VL-2B-Instruct-GGUF
120
+ recognizer_latin
121
+ https://www.jaided.ai/easyocr/modelhub/
122
+ ru-base-ggml-model-f16
123
+ https://huggingface.co/CheeLi03/whisper-base-rus-8
124
+ ru-tiny-ggml-model-f16
125
+ https://huggingface.co/yaroslav0530/whisper-tiny-ru
126
+ salamandraTA-2B-instruct-GGUF
127
+ https://huggingface.co/BSC-LT/salamandraTA-2B-instruct-GGUF
128
+ SmolVLM2-500M-Video-Instruct-GGUF
129
+ https://huggingface.co/ggml-org/SmolVLM2-500M-Video-Instruct-GGUF
130
+
131
+ --- cc-by-4.0 (Creative Commons Attribution 4.0 International) ---
132
+
133
+ ggml-opus-en-de
134
+ https://huggingface.co/Helsinki-NLP/opus-mt-en-de
135
+ ggml-opus-en-pt
136
+ https://huggingface.co/Helsinki-NLP/opus-mt-tc-big-en-pt
137
+ ggml-opus-ru-en
138
+ https://huggingface.co/Helsinki-NLP/opus-mt-ru-en
139
+ ggml-opus-zh-en
140
+ https://huggingface.co/Helsinki-NLP/opus-mt-zh-en
141
+
142
+ --- gemma (Gemma Terms of Use) ---
143
+
144
+ embeddinggemma-300m-GGUF
145
+ https://huggingface.co/unsloth/embeddinggemma-300m-GGUF
146
+
147
+ --- health-ai-developer-foundations (HAI-DEF Terms of Use) ---
148
+
149
+ medgemma-4b-it-GGUF
150
+ https://huggingface.co/unsloth/medgemma-4b-it-GGUF
151
+
152
+ --- llama3.2 (Llama 3.2 Community License) ---
153
+
154
+ Llama-3.2-1B-Instruct-GGUF
155
+ https://huggingface.co/unsloth/Llama-3.2-1B-Instruct-GGUF
156
+ Llama-3.2-1B-Instruct-Q4_0-00001-of-00008
157
+ https://huggingface.co/bartowski/Llama-3.2-1B-Instruct-GGUF
158
+
159
+ --- mit (MIT License) ---
160
+
161
+ chatterbox-turbo-ONNX
162
+ https://huggingface.co/ResembleAI/chatterbox-turbo-ONNX
163
+ de-base-ggml-model-f16
164
+ https://huggingface.co/aware-ai/whisper-base-german
165
+ es-tiny-ggml-model-f16
166
+ https://huggingface.co/JaepaX/whisper-tiny-es
167
+ ggml-indictrans2-en-indic-1B-f16
168
+ https://huggingface.co/ai4bharat/indictrans2-en-indic-1B
169
+ ggml-indictrans2-en-indic-dist-200M-f16
170
+ https://huggingface.co/ai4bharat/indictrans2-en-indic-dist-200M
171
+ ggml-indictrans2-indic-en-1B-f16
172
+ https://huggingface.co/ai4bharat/indictrans2-indic-en-1B
173
+ ggml-indictrans2-indic-en-dist-200M-f16
174
+ https://huggingface.co/ai4bharat/indictrans2-indic-en-dist-200M
175
+ ggml-indictrans2-indic-indic-1B-f16
176
+ https://huggingface.co/ai4bharat/indictrans2-indic-indic-1B
177
+ ggml-indictrans2-indic-indic-dist-320M-f16
178
+ https://huggingface.co/ai4bharat/indictrans2-indic-indic-dist-320M
179
+ gte-large-gguf
180
+ https://huggingface.co/ChristianAzinn/gte-large-gguf
181
+ pt-tiny-ggml-model-f16
182
+ https://huggingface.co/DavyCosta701/whisper-tiny-pt-bpra
183
+ tiny_acft_q8_0
184
+ https://voiceinput.futo.org/VoiceInput/tiny_en_acft_q8_0.bin
185
+ whisper-vad
186
+ https://huggingface.co/ggml-org/whisper-vad
187
+ whisper.cpp
188
+ https://huggingface.co/ggerganov/whisper.cpp
189
+
190
+ --- mpl-2.0 (Mozilla Public License 2.0) ---
191
+
192
+ lex.50.50.aren.s2t
193
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/aren
194
+ lex.50.50.csen.s2t
195
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/csen
196
+ lex.50.50.enar.s2t
197
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/enar
198
+ lex.50.50.encs.s2t
199
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/encs
200
+ lex.50.50.enes.s2t
201
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/enes
202
+ lex.50.50.enfr.s2t
203
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/enfr
204
+ lex.50.50.enit.s2t
205
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/tiny/enit
206
+ lex.50.50.enja.s2t
207
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/enja
208
+ lex.50.50.enpt.s2t
209
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/enpt
210
+ lex.50.50.enru.s2t
211
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/enru
212
+ lex.50.50.enzh.s2t
213
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/enzh
214
+ lex.50.50.esen.s2t
215
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/tiny/esen
216
+ lex.50.50.fren.s2t
217
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/fren
218
+ lex.50.50.iten.s2t
219
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/iten
220
+ lex.50.50.jaen.s2t
221
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/jaen
222
+ lex.50.50.pten.s2t
223
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/pten
224
+ lex.50.50.ruen.s2t
225
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/tiny/ruen
226
+ lex.50.50.zhen.s2t
227
+ https://github.com/mozilla/firefox-translations-models/tree/main/models/base-memory/zhen
228
+
229
+ --- openrail ---
230
+
231
+ Supertonic-TTS-ONNX
232
+ https://huggingface.co/onnx-community/Supertonic-TTS-ONNX
233
+
234
+ =========================================================================
235
+ Modification Notice
236
+ =========================================================================
237
+
238
+ Models listed above may have been converted from original model
239
+ weights into optimized inference formats (GGUF, GGML, ONNX, or
240
+ Bergamot intgemm). These conversions involve format transformation
241
+ and/or weight quantization. No architectural changes were made to
242
+ the underlying models.
243
+
244
+ Source URLs for original weights are recorded in each model's
245
+ metadata entry within the registry.
246
+
247
+ =========================================================================
248
+ JavaScript Dependencies
249
+ =========================================================================
250
+
251
+ --- apache-2.0 (Apache License 2.0) ---
252
+
253
+ @hyperswarm/secret-stream@6.9.1
254
+ https://github.com/holepunchto/hyperswarm-secret-stream
255
+ @qvac/error@0.1.1
256
+ @qvac/registry-schema@0.1.1
257
+ adaptive-timeout@1.0.1
258
+ https://github.com/holepunchto/adaptive-timeout
259
+ b4a@1.7.3
260
+ https://github.com/holepunchto/b4a
261
+ bare-addon-resolve@1.9.7
262
+ https://github.com/holepunchto/bare-addon-resolve
263
+ bare-env@3.0.0
264
+ https://github.com/holepunchto/bare-env
265
+ bare-events@2.8.2
266
+ https://github.com/holepunchto/bare-events
267
+ bare-fs@4.5.4
268
+ https://github.com/holepunchto/bare-fs
269
+ bare-hrtime@2.1.1
270
+ https://github.com/holepunchto/bare-hrtime
271
+ bare-module-resolve@1.12.1
272
+ https://github.com/holepunchto/bare-module-resolve
273
+ bare-node-fs@1.0.2
274
+ https://github.com/holepunchto/bare-node
275
+ bare-node-os@1.0.1
276
+ https://github.com/holepunchto/bare-node
277
+ bare-node-path@1.0.1
278
+ https://github.com/holepunchto/bare-node
279
+ bare-node-process@1.0.1
280
+ https://github.com/holepunchto/bare-node
281
+ bare-os@3.6.2
282
+ https://github.com/holepunchto/bare-os
283
+ bare-path@3.0.0
284
+ https://github.com/holepunchto/bare-path
285
+ bare-pipe@4.1.3
286
+ https://github.com/holepunchto/bare-pipe
287
+ bare-process@4.2.2
288
+ https://github.com/holepunchto/bare-process
289
+ bare-semver@1.0.2
290
+ https://github.com/holepunchto/bare-semver
291
+ bare-signals@4.2.0
292
+ https://github.com/holepunchto/bare-signals
293
+ bare-stream@2.7.0
294
+ https://github.com/holepunchto/bare-stream
295
+ bare-tty@5.0.3
296
+ https://github.com/holepunchto/bare-tty
297
+ bare-url@2.3.2
298
+ https://github.com/holepunchto/bare-url
299
+ blind-relay@1.4.0
300
+ https://github.com/holepunchto/blind-relay
301
+ compact-encoding@2.18.0
302
+ https://github.com/compact-encoding/compact-encoding
303
+ device-file@2.3.1
304
+ https://github.com/holepunchto/device-file
305
+ events-universal@1.0.1
306
+ https://github.com/holepunchto/events-universal
307
+ fd-lock@2.1.1
308
+ https://github.com/holepunchto/fd-lock
309
+ fs-native-extensions@1.4.5
310
+ https://github.com/holepunchto/fs-native-extensions
311
+ hyperblobs@2.8.0
312
+ https://github.com/holepunchto/hyperblobs
313
+ hypercore-errors@1.5.0
314
+ https://github.com/holepunchto/hypercore-errors
315
+ hypercore-id-encoding@1.3.0
316
+ https://github.com/holepunchto/hypercore-id-encoding
317
+ hypercore-storage@2.4.1
318
+ hyperdb@4.22.3
319
+ https://github.com/holepunchto/hyperdb
320
+ hyperdispatch@1.4.4
321
+ https://github.com/holepunchto/hyperdispatch
322
+ hyperschema@1.19.0
323
+ https://github.com/holepunchto/hyperschema
324
+ index-encoder@3.4.0
325
+ https://github.com/holepunchto/index-encoder
326
+ noise-handshake@4.2.0
327
+ https://github.com/holepunchto/noise-handshake
328
+ paparam@1.10.0
329
+ https://github.com/holepunchto/paparam
330
+ quickbit-native@2.4.8
331
+ https://github.com/holepunchto/quickbit-native
332
+ rache@1.0.0
333
+ https://github.com/holepunchto/rache
334
+ refcounter@1.0.0
335
+ https://github.com/holepunchto/refcounter
336
+ require-addon@1.2.0
337
+ https://github.com/holepunchto/require-addon
338
+ resource-on-exit@1.0.0
339
+ https://github.com/holepunchto/bare-teardown
340
+ rocksdb-native@3.12.0
341
+ https://github.com/holepunchto/rocksdb-native
342
+ scope-lock@1.2.4
343
+ https://github.com/holepunchto/scope-lock
344
+ simdle-native@1.3.9
345
+ https://github.com/holepunchto/simdle-native
346
+ text-decoder@1.2.3
347
+ https://github.com/holepunchto/text-decoder
348
+ udx-native@1.19.2
349
+ https://github.com/holepunchto/udx-native
350
+ unslab@1.3.0
351
+ https://github.com/holepunchto/unslab
352
+ which-runtime@1.3.2
353
+ https://github.com/holepunchto/which-runtime
354
+
355
+ --- isc (ISC License) ---
356
+
357
+ bits-to-bytes@1.3.0
358
+ https://github.com/holepunchto/bits-to-bytes
359
+ compact-encoding-bitfield@1.0.0
360
+ https://github.com/compact-encoding/compact-encoding-bitfield
361
+ compact-encoding-net@1.2.0
362
+ https://github.com/compact-encoding/compact-encoding-net
363
+ nanoassert@2.0.0
364
+ https://github.com/emilbayes/nanoassert
365
+ noise-curve-ed@2.1.0
366
+ https://github.com/chm-diederichs/noise-curve-ed
367
+ quickbit-universal@2.2.0
368
+ https://github.com/holepunchto/quickbit-universal
369
+ simdle-universal@1.1.2
370
+ https://github.com/holepunchto/simdle-universal
371
+
372
+ --- mit (MIT License) ---
373
+
374
+ big-sparse-array@1.0.3
375
+ https://github.com/mafintosh/big-sparse-array
376
+ bogon@1.2.0
377
+ https://github.com/mafintosh/bogon
378
+ codecs@3.1.0
379
+ https://github.com/mafintosh/codecs
380
+ corestore@7.8.0
381
+ https://github.com/holepunchto/corestore
382
+ debounceify@1.1.0
383
+ https://github.com/mafintosh/debounceify
384
+ dht-rpc@6.24.2
385
+ https://github.com/mafintosh/dht-rpc
386
+ fast-fifo@1.3.2
387
+ https://github.com/mafintosh/fast-fifo
388
+ flat-tree@1.13.0
389
+ https://github.com/mafintosh/flat-tree
390
+ generate-object-property@2.0.0
391
+ https://github.com/mafintosh/generate-object-property
392
+ generate-string@1.0.1
393
+ https://github.com/mafintosh/generate-string
394
+ hyperbee@2.27.3
395
+ https://github.com/holepunchto/hyperbee
396
+ hypercore@11.24.0
397
+ https://github.com/holepunchto/hypercore
398
+ hypercore-crypto@3.6.1
399
+ https://github.com/mafintosh/hypercore-crypto
400
+ hyperdht@6.29.0
401
+ https://github.com/holepunchto/hyperdht
402
+ hyperswarm@4.16.0
403
+ https://github.com/holepunchto/hyperswarm
404
+ is-options@1.0.2
405
+ https://github.com/mafintosh/is-options
406
+ is-property@1.0.2
407
+ https://github.com/mikolalysenko/is-property
408
+ kademlia-routing-table@1.0.6
409
+ https://github.com/mafintosh/kademlia-routing-table
410
+ mutexify@1.4.0
411
+ https://github.com/mafintosh/mutexify
412
+ nat-sampler@1.0.1
413
+ https://github.com/mafintosh/nat-sampler
414
+ protocol-buffers-encodings@1.2.0
415
+ https://github.com/mafintosh/protocol-buffers-encodings
416
+ protomux@3.10.1
417
+ https://github.com/mafintosh/protomux
418
+ queue-tick@1.0.1
419
+ https://github.com/mafintosh/queue-tick
420
+ random-array-iterator@1.0.0
421
+ https://github.com/mafintosh/random-array-iterator
422
+ ready-resource@1.2.0
423
+ https://github.com/holepunchto/ready-resource
424
+ record-cache@1.2.0
425
+ https://github.com/mafintosh/record-cache
426
+ resolve-reject-promise@1.1.0
427
+ https://github.com/mafintosh/resolve-reject-promise
428
+ safety-catch@1.0.2
429
+ https://github.com/mafintosh/safety-catch
430
+ shuffled-priority-queue@2.1.0
431
+ https://github.com/mafintosh/shuffled-priority-queue
432
+ signal-promise@1.0.3
433
+ https://github.com/mafintosh/signal-promise
434
+ signed-varint@2.0.1
435
+ https://github.com/dominictarr/signed-varint
436
+ sodium-native@5.0.10
437
+ https://github.com/holepunchto/sodium-native
438
+ sodium-secretstream@1.2.0
439
+ https://github.com/mafintosh/sodium-secretstream
440
+ sodium-universal@5.0.1
441
+ https://github.com/holepunchto/sodium-universal
442
+ speedometer@1.1.0
443
+ https://github.com/mafintosh/speedometer
444
+ streamx@2.23.0
445
+ https://github.com/mafintosh/streamx
446
+ time-ordered-set@2.0.1
447
+ https://github.com/mafintosh/time-ordered-set
448
+ timeout-refresh@2.0.1
449
+ https://github.com/mafintosh/timeout-refresh
450
+ unordered-set@2.0.1
451
+ https://github.com/mafintosh/unordered-set
452
+ varint@5.0.0
453
+ https://github.com/chrisdickinson/varint
454
+ xache@1.2.1
455
+ https://github.com/mafintosh/xache
456
+ z32@1.1.0
457
+ https://github.com/mafintosh/z32
458
+
package/README.md CHANGED
@@ -110,8 +110,20 @@ result.artifact.stream.pipe(fs.createWriteStream('./model.ggml'))
110
110
 
111
111
  The package includes a CLI for querying and downloading models from the registry.
112
112
 
113
+ ### Install
114
+
115
+ The package is hosted on GitHub Packages. Configure npm to use the GitHub registry for the `@tetherto` scope, then install globally:
116
+
117
+ ```bash
118
+ echo "@tetherto:registry=https://npm.pkg.github.com" >> ~/.npmrc
119
+ echo "//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT" >> ~/.npmrc
120
+ npm install -g @tetherto/registry-client-mono
121
+ ```
122
+
123
+ Verify installation:
124
+
113
125
  ```bash
114
- npx qvac-registry --help
126
+ qvac-registry --help
115
127
  ```
116
128
 
117
129
  ### List models
package/bin/cli.js CHANGED
@@ -4,7 +4,7 @@
4
4
  const { command, flag, arg, summary, header, footer, description } = require('paparam')
5
5
  const { QVACRegistryClient } = require('../index')
6
6
  const IdEnc = require('hypercore-id-encoding')
7
- const path = require('path')
7
+ const path = require('#path')
8
8
 
9
9
  const VERSION = require('../package.json').version
10
10
 
@@ -23,7 +23,7 @@ function createClient (parentFlags) {
23
23
  }
24
24
 
25
25
  function getRootFlags (cmd) {
26
- let current = cmd
26
+ let current = cmd.command || cmd
27
27
  while (current.parent) current = current.parent
28
28
  return current.flags || {}
29
29
  }
package/lib/client.js CHANGED
@@ -9,8 +9,8 @@ const Corestore = require('corestore')
9
9
  const Hyperswarm = require('hyperswarm')
10
10
  const Hyperblobs = require('hyperblobs')
11
11
  const IdEnc = require('hypercore-id-encoding')
12
- const path = require('path')
13
- const fs = require('fs')
12
+ const path = require('#path')
13
+ const fs = require('#fs')
14
14
 
15
15
  class QVACRegistryClient extends ReadyResource {
16
16
  constructor (opts = {}) {
@@ -151,6 +151,23 @@ class QVACRegistryClient extends ReadyResource {
151
151
  }
152
152
  }
153
153
 
154
+ async _checkBlobProgress (core, blobPointer) {
155
+ const totalBlocks = blobPointer.blockLength
156
+ const totalBytes = blobPointer.byteLength
157
+
158
+ if (totalBlocks === 0) {
159
+ return { cachedBlocks: 0, totalBlocks: 0, totalBytes: 0 }
160
+ }
161
+
162
+ let cachedBlocks = 0
163
+ for (let i = blobPointer.blockOffset; i < blobPointer.blockOffset + totalBlocks; i++) {
164
+ const hasBlock = await core.has(i)
165
+ if (hasBlock) cachedBlocks++
166
+ }
167
+
168
+ return { cachedBlocks, totalBlocks, totalBytes }
169
+ }
170
+
154
171
  async _getBlobsCore (blobsCoreKey) {
155
172
  const keyBuffer = Buffer.isBuffer(blobsCoreKey)
156
173
  ? blobsCoreKey
@@ -208,10 +225,12 @@ class QVACRegistryClient extends ReadyResource {
208
225
  await core.update({ wait: true })
209
226
  this.logger.debug('Blobs core updated')
210
227
 
228
+ const totalSize = model.blobBinding.byteLength
229
+
211
230
  let artifact
212
231
  if (options.outputFile) {
213
- await this._streamBlobToFile(blobs, model.blobBinding, options.outputFile, options)
214
- artifact = { path: options.outputFile }
232
+ await this._streamBlobToFile(blobs, core, model.blobBinding, options.outputFile, options)
233
+ artifact = { path: options.outputFile, totalSize }
215
234
 
216
235
  if (blobs) await blobs.close()
217
236
  if (core) await core.close()
@@ -220,7 +239,7 @@ class QVACRegistryClient extends ReadyResource {
220
239
  wait: true,
221
240
  timeout: options.timeout || 30000
222
241
  })
223
- artifact = { stream }
242
+ artifact = { stream, totalSize }
224
243
 
225
244
  const cleanup = async () => {
226
245
  if (blobs) {
@@ -271,7 +290,45 @@ class QVACRegistryClient extends ReadyResource {
271
290
  }
272
291
  }
273
292
 
274
- async _streamBlobToFile (blobs, blobPointer, filePath, options) {
293
+ async _streamBlobToFile (blobs, core, blobPointer, filePath, options) {
294
+ const { cachedBlocks, totalBlocks, totalBytes } = await this._checkBlobProgress(core, blobPointer)
295
+
296
+ this.logger.debug('Blob progress before download', {
297
+ cachedBlocks,
298
+ totalBlocks,
299
+ totalBytes,
300
+ resuming: cachedBlocks > 0 && cachedBlocks < totalBlocks
301
+ })
302
+
303
+ const bytesPerBlock = totalBlocks > 0 ? totalBytes / totalBlocks : 0
304
+ let downloadedBytes = Math.floor(cachedBlocks * bytesPerBlock)
305
+
306
+ if (options.onProgress && downloadedBytes > 0) {
307
+ options.onProgress({
308
+ downloaded: downloadedBytes,
309
+ total: totalBytes,
310
+ cachedBlocks,
311
+ totalBlocks
312
+ })
313
+ }
314
+
315
+ const progressHandler = (index, bytes) => {
316
+ if (index >= blobPointer.blockOffset && index < blobPointer.blockOffset + blobPointer.blockLength) {
317
+ downloadedBytes += bytes
318
+ const capped = Math.min(downloadedBytes, totalBytes)
319
+ if (options.onProgress) {
320
+ options.onProgress({
321
+ downloaded: capped,
322
+ total: totalBytes,
323
+ cachedBlocks,
324
+ totalBlocks
325
+ })
326
+ }
327
+ }
328
+ }
329
+
330
+ core.on('download', progressHandler)
331
+
275
332
  const stream = blobs.createReadStream(blobPointer, {
276
333
  wait: true,
277
334
  timeout: options.timeout || 30000
@@ -282,12 +339,30 @@ class QVACRegistryClient extends ReadyResource {
282
339
 
283
340
  const writeStream = fs.createWriteStream(filePath)
284
341
 
285
- return new Promise((resolve, reject) => {
286
- stream.pipe(writeStream)
287
- writeStream.on('finish', resolve)
288
- writeStream.on('error', reject)
289
- stream.on('error', reject)
290
- })
342
+ try {
343
+ await new Promise((resolve, reject) => {
344
+ stream.pipe(writeStream)
345
+ writeStream.on('finish', resolve)
346
+ writeStream.on('error', reject)
347
+ stream.on('error', reject)
348
+
349
+ if (options.signal) {
350
+ if (options.signal.aborted) {
351
+ stream.destroy()
352
+ writeStream.destroy()
353
+ reject(new Error('Download cancelled'))
354
+ return
355
+ }
356
+ options.signal.addEventListener('abort', () => {
357
+ stream.destroy()
358
+ writeStream.destroy()
359
+ reject(new Error('Download cancelled'))
360
+ }, { once: true })
361
+ }
362
+ })
363
+ } finally {
364
+ core.off('download', progressHandler)
365
+ }
291
366
  }
292
367
 
293
368
  async _close () {
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = require('fs')
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = require('os')
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = require('path')
package/lib/config.js CHANGED
@@ -3,8 +3,10 @@
3
3
  const { getEnv } = require('../utils/env')
4
4
  const { ENV_KEYS } = require('@qvac/registry-schema')
5
5
  const Logger = require('./logger')
6
- const os = require('os')
7
- const path = require('path')
6
+ const os = require('#os')
7
+ const path = require('#path')
8
+
9
+ const DEFAULT_REGISTRY_CORE_KEY = 'uf1fm44uzockp6azhcdiqt1esjgm65fwtimsh946e8kwysdes9ko'
8
10
 
9
11
  class RegistryConfig {
10
12
  constructor (opts = {}) {
@@ -38,8 +40,9 @@ class RegistryConfig {
38
40
  }
39
41
 
40
42
  const envKey = getEnv(ENV_KEYS.QVAC_REGISTRY_CORE_KEY)
41
- this.logger.debug('getRegistryCoreKey loaded from env', { envKey })
42
- return envKey || null
43
+ const result = envKey || DEFAULT_REGISTRY_CORE_KEY
44
+ this.logger.debug('getRegistryCoreKey resolved', { fromEnv: !!envKey, usingDefault: !envKey })
45
+ return result
43
46
  }
44
47
  }
45
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/registry-client",
3
- "version": "0.1.5",
3
+ "version": "0.1.8",
4
4
  "description": "QVAC Registry client library for read-only queries via Hyperswarm",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",
@@ -12,6 +12,20 @@
12
12
  ".": "./index.js",
13
13
  "./types": "./index.d.ts"
14
14
  },
15
+ "imports": {
16
+ "#os": {
17
+ "bare": "bare-os",
18
+ "default": "./lib/compat/os.js"
19
+ },
20
+ "#path": {
21
+ "bare": "bare-path",
22
+ "default": "./lib/compat/path.js"
23
+ },
24
+ "#fs": {
25
+ "bare": "bare-fs",
26
+ "default": "./lib/compat/fs.js"
27
+ }
28
+ },
15
29
  "files": [
16
30
  "index.js",
17
31
  "index.d.ts",
@@ -19,7 +33,8 @@
19
33
  "lib/",
20
34
  "utils/",
21
35
  "README.md",
22
- "LICENSE"
36
+ "LICENSE",
37
+ "NOTICE"
23
38
  ],
24
39
  "scripts": {
25
40
  "test:unit": "brittle tests/unit/*.test.js",
@@ -35,17 +50,14 @@
35
50
  "b4a": "^1.6.7",
36
51
  "bare-fs": "^4.5.2",
37
52
  "bare-os": "^3.6.2",
53
+ "bare-path": "^3.0.0",
38
54
  "bare-process": "^4.2.2",
39
55
  "corestore": "^7.4.5",
40
- "fs": "npm:bare-node-fs",
41
56
  "hyperblobs": "^2.8.0",
42
57
  "hypercore-id-encoding": "^1.3.0",
43
58
  "hyperdb": "^4.16.1",
44
59
  "hyperswarm": "^4.14.0",
45
- "os": "npm:bare-node-os",
46
60
  "paparam": "^1.10.0",
47
- "path": "npm:bare-node-path",
48
- "process": "npm:bare-node-process",
49
61
  "ready-resource": "^1.0.1"
50
62
  },
51
63
  "devDependencies": {