@qvac/inference 0.23.0 → 0.24.0
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 +60 -28
- package/README.md +3 -1
- package/dist/api/assess-model-fit.d.ts +14 -14
- package/dist/api/assess-model-fit.js +14 -14
- package/dist/api/audio-gen.d.ts +2 -2
- package/dist/api/audio-gen.js +135 -44
- package/dist/api/batch-completion.js +2 -1
- package/dist/api/calc-tokens.d.ts +30 -0
- package/dist/api/calc-tokens.js +41 -0
- package/dist/api/classify.d.ts +5 -2
- package/dist/api/classify.js +5 -2
- package/dist/api/completion-stream.d.ts +1 -1
- package/dist/api/completion-stream.js +2 -1
- package/dist/api/delete-cache.d.ts +7 -1
- package/dist/api/delete-cache.js +11 -1
- package/dist/api/diffusion.d.ts +14 -1
- package/dist/api/diffusion.js +14 -1
- package/dist/api/embed.d.ts +82 -29
- package/dist/api/embed.js +64 -18
- package/dist/api/get-model-info.d.ts +1 -1
- package/dist/api/index.d.ts +2 -1
- package/dist/api/index.js +2 -1
- package/dist/api/rag.d.ts +1 -1
- package/dist/api/rag.js +1 -1
- package/dist/api/registry.d.ts +16 -6
- package/dist/api/registry.js +32 -9
- package/dist/api/text-to-speech.d.ts +14 -5
- package/dist/api/text-to-speech.js +83 -29
- package/dist/api/transcribe.d.ts +6 -2
- package/dist/api/transcribe.js +7 -1
- package/dist/api/vector-index.d.ts +25 -3
- package/dist/api/vector-index.js +17 -2
- package/dist/api/video-request.d.ts +15 -15
- package/dist/dispatch.d.ts +10 -4
- package/dist/dispatch.js +65 -15
- package/dist/engine.d.ts +1 -1
- package/dist/errors/index.d.ts +70 -0
- package/dist/errors/index.js +128 -0
- package/dist/handlers/assess-model-fit.d.ts +3 -21
- package/dist/handlers/assess-model-fit.js +4 -303
- package/dist/handlers/cancelHandler.d.ts +10 -9
- package/dist/handlers/cancelHandler.js +17 -13
- package/dist/handlers/completion-orchestrate.d.ts +14 -2
- package/dist/handlers/completion-orchestrate.js +164 -22
- package/dist/handlers/delete-cache.d.ts +2 -1
- package/dist/handlers/delete-cache.js +6 -1
- package/dist/handlers/download-asset.js +11 -4
- package/dist/handlers/get-loaded-model-info.js +1 -0
- package/dist/handlers/get-model-info.js +71 -2
- package/dist/handlers/load-model/coreml-sidecars.d.ts +2 -13
- package/dist/handlers/load-model/coreml-sidecars.js +16 -119
- package/dist/handlers/load-model/download-lock.d.ts +20 -0
- package/dist/handlers/load-model/download-lock.js +213 -0
- package/dist/handlers/load-model/download-manager.d.ts +10 -2
- package/dist/handlers/load-model/download-manager.js +62 -11
- package/dist/handlers/load-model/handler.js +88 -35
- package/dist/handlers/load-model/http.js +327 -205
- package/dist/handlers/load-model/hyperdrive.d.ts +15 -0
- package/dist/handlers/load-model/hyperdrive.js +123 -50
- package/dist/handlers/load-model/registry-client-options.d.ts +2 -0
- package/dist/handlers/load-model/registry-client-options.js +4 -2
- package/dist/handlers/load-model/registry-companion-set.d.ts +5 -0
- package/dist/handlers/load-model/registry-companion-set.js +19 -1
- package/dist/handlers/load-model/registry-delete.d.ts +5 -0
- package/dist/handlers/load-model/registry-delete.js +269 -0
- package/dist/handlers/load-model/registry-download-utils.d.ts +4 -2
- package/dist/handlers/load-model/registry-download-utils.js +93 -22
- package/dist/handlers/load-model/registry.d.ts +20 -0
- package/dist/handlers/load-model/registry.js +308 -175
- package/dist/handlers/load-model/resolve.js +4 -1
- package/dist/handlers/load-model/types.d.ts +2 -0
- package/dist/handlers/logging-stream.js +17 -5
- package/dist/handlers/plugin-invoke.js +152 -39
- package/dist/handlers/registry.d.ts +2 -2
- package/dist/handlers/registry.js +105 -28
- package/dist/handlers/rpc-server.js +7 -7
- package/dist/handlers/session.d.ts +11 -0
- package/dist/handlers/session.js +40 -0
- package/dist/handlers/unload-model.js +8 -3
- package/dist/handlers/vector-index.js +118 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/logging/utils.js +10 -2
- package/dist/model-cache-layout.d.ts +1 -0
- package/dist/model-cache-layout.js +2 -0
- package/dist/model-fit/assess.d.ts +18 -67
- package/dist/model-fit/assess.js +96 -665
- package/dist/model-fit/describe.d.ts +12 -0
- package/dist/model-fit/describe.js +29 -0
- package/dist/model-fit/description/fetch.d.ts +1 -1
- package/dist/model-fit/description/fetch.js +95 -16
- package/dist/model-fit/description/resolve-load.d.ts +5 -3
- package/dist/model-fit/description/resolve-load.js +14 -14
- package/dist/model-fit/fit-load.d.ts +23 -0
- package/dist/model-fit/fit-load.js +29 -0
- package/dist/model-fit/load-check.d.ts +15 -33
- package/dist/model-fit/load-check.js +50 -195
- package/dist/model-fit/run/engine.d.ts +12 -72
- package/dist/model-fit/run/engine.js +4 -8
- package/dist/model-fit/run/run.d.ts +10 -7
- package/dist/model-fit/run/run.js +22 -18
- package/dist/model-fit/sum.d.ts +32 -0
- package/dist/model-fit/sum.js +60 -0
- package/dist/models/registry/models.d.ts +865 -128
- package/dist/models/registry/models.js +3737 -2963
- package/dist/plugins/builtin/asr-ggml/config.d.ts +19 -4
- package/dist/plugins/builtin/asr-ggml/config.js +39 -3
- package/dist/plugins/builtin/asr-ggml/fit.d.ts +18 -0
- package/dist/{model-fit/request/engines/asr.js → plugins/builtin/asr-ggml/fit.js} +55 -71
- package/dist/plugins/builtin/audiogen-ggml/config.d.ts +6 -0
- package/dist/plugins/builtin/audiogen-ggml/config.js +9 -0
- package/dist/plugins/builtin/audiogen-ggml/fit.d.ts +3 -0
- package/dist/{model-fit/request/engines/audiogen.js → plugins/builtin/audiogen-ggml/fit.js} +28 -18
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.d.ts +3 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.js +2 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-encode.d.ts +17 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-encode.js +68 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-run.d.ts +11 -3
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-run.js +47 -11
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.d.ts +3 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +2 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.d.ts +3 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.js +2 -1
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +143 -18
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +13 -1
- package/dist/plugins/builtin/bci-whispercpp-transcription/fit.d.ts +3 -0
- package/dist/plugins/builtin/bci-whispercpp-transcription/fit.js +22 -0
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +45 -4
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +8 -6
- package/dist/plugins/builtin/ggml-classification/plugin.d.ts +4 -1
- package/dist/plugins/builtin/ggml-classification/plugin.js +88 -8
- package/dist/plugins/builtin/ggml-image-embedding/ops/embed.d.ts +24 -0
- package/dist/plugins/builtin/ggml-image-embedding/ops/embed.js +184 -0
- package/dist/plugins/builtin/ggml-image-embedding/plugin.d.ts +120 -0
- package/dist/plugins/builtin/ggml-image-embedding/plugin.js +39 -0
- package/dist/plugins/builtin/ggml-ocr/fit.d.ts +6 -0
- package/dist/plugins/builtin/ggml-ocr/fit.js +19 -0
- package/dist/plugins/builtin/ggml-ocr/params.d.ts +1 -1
- package/dist/plugins/builtin/ggml-ocr/plugin.d.ts +9 -3
- package/dist/plugins/builtin/ggml-ocr/plugin.js +107 -21
- package/dist/plugins/builtin/ggml-vla/ops/vla-run.d.ts +2 -2
- package/dist/plugins/builtin/ggml-vla/ops/vla-run.js +18 -2
- package/dist/plugins/builtin/ggml-vla/plugin.d.ts +3 -3
- package/dist/plugins/builtin/index.d.ts +1 -0
- package/dist/plugins/builtin/index.js +1 -0
- package/dist/plugins/builtin/llamacpp-completion/fit.d.ts +3 -0
- package/dist/plugins/builtin/llamacpp-completion/fit.js +28 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +1 -1
- package/dist/plugins/builtin/llamacpp-completion/ops/cache-logger.js +15 -4
- package/dist/plugins/builtin/llamacpp-completion/ops/calc-tokens.d.ts +2 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/calc-tokens.js +32 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.d.ts +1 -1
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +17 -3
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +61 -5
- package/dist/plugins/builtin/llamacpp-completion/ops/finetune.d.ts +5 -4
- package/dist/plugins/builtin/llamacpp-completion/ops/finetune.js +54 -19
- package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +148 -19
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +26 -9
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.d.ts +3 -1
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.js +5 -2
- package/dist/plugins/builtin/llamacpp-decision/plugin.d.ts +4 -2
- package/dist/plugins/builtin/llamacpp-decision/plugin.js +2 -2
- package/dist/plugins/builtin/llamacpp-embedding/fit.d.ts +3 -0
- package/dist/plugins/builtin/llamacpp-embedding/fit.js +23 -0
- package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +194 -4
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +37 -11
- package/dist/plugins/builtin/llamacpp-embedding/transform.d.ts +2 -2
- package/dist/plugins/builtin/llamacpp-embedding/transform.js +23 -2
- package/dist/plugins/builtin/llamacpp-rerank/ops/rerank.d.ts +3 -1
- package/dist/plugins/builtin/llamacpp-rerank/ops/rerank.js +5 -2
- package/dist/plugins/builtin/llamacpp-rerank/plugin.d.ts +6 -5
- package/dist/plugins/builtin/llamacpp-rerank/plugin.js +2 -3
- package/dist/plugins/builtin/moss-transcribe/plugin.d.ts +30 -3
- package/dist/plugins/builtin/moss-transcribe/plugin.js +5 -3
- package/dist/plugins/builtin/nmtcpp-translation/fit.d.ts +3 -0
- package/dist/plugins/builtin/nmtcpp-translation/fit.js +11 -0
- package/dist/plugins/builtin/nmtcpp-translation/plugin.d.ts +14 -5
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +4 -2
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +205 -9
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +39 -13
- package/dist/plugins/builtin/sdcpp-generation/fit.d.ts +3 -0
- package/dist/plugins/builtin/sdcpp-generation/fit.js +68 -0
- package/dist/plugins/builtin/sdcpp-generation/load-files.d.ts +30 -0
- package/dist/plugins/builtin/sdcpp-generation/load-files.js +121 -0
- package/dist/plugins/builtin/sdcpp-generation/ops/diffusion.d.ts +4 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/diffusion.js +8 -3
- package/dist/plugins/builtin/sdcpp-generation/ops/upscale.d.ts +4 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/upscale.js +107 -22
- package/dist/plugins/builtin/sdcpp-generation/ops/video.d.ts +3 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +4 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/world.d.ts +4 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/world.js +7 -2
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +79 -16
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +29 -117
- package/dist/plugins/builtin/tts-ggml/fit.d.ts +3 -0
- package/dist/plugins/builtin/tts-ggml/fit.js +162 -0
- package/dist/plugins/builtin/tts-ggml/ops/cancel-binding.d.ts +2 -1
- package/dist/plugins/builtin/tts-ggml/ops/cancel-binding.js +4 -1
- package/dist/plugins/builtin/tts-ggml/ops/moss-options.d.ts +1 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.d.ts +2 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +22 -9
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.d.ts +2 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +51 -16
- package/dist/plugins/builtin/tts-ggml/ops/voice-options.d.ts +50 -0
- package/dist/plugins/builtin/tts-ggml/ops/voice-options.js +74 -0
- package/dist/plugins/builtin/tts-ggml/plugin.d.ts +368 -25
- package/dist/plugins/builtin/tts-ggml/plugin.js +180 -31
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +70 -7
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +8 -6
- package/dist/plugins/ops/bci-transcribe.d.ts +5 -4
- package/dist/plugins/ops/bci-transcribe.js +18 -4
- package/dist/plugins/ops/cancel.d.ts +1 -0
- package/dist/plugins/ops/cancel.js +11 -2
- package/dist/plugins/ops/embed.d.ts +5 -3
- package/dist/plugins/ops/embed.js +89 -34
- package/dist/plugins/ops/kv-cache-utils.d.ts +1 -0
- package/dist/plugins/ops/kv-cache-utils.js +6 -2
- package/dist/plugins/ops/load-model.d.ts +2 -0
- package/dist/plugins/ops/load-model.js +33 -16
- package/dist/plugins/ops/transcribe.d.ts +5 -4
- package/dist/plugins/ops/transcribe.js +62 -27
- package/dist/plugins/ops/translate.d.ts +2 -1
- package/dist/plugins/ops/translate.js +4 -1
- package/dist/plugins/ops/unload-model.d.ts +17 -1
- package/dist/plugins/ops/unload-model.js +31 -2
- package/dist/plugins/turbovec-backend.d.ts +1 -1
- package/dist/plugins/turbovec-backend.js +16 -1
- package/dist/profiling/operation-metrics.js +22 -19
- package/dist/rag/embedding-scope.d.ts +16 -0
- package/dist/rag/embedding-scope.js +81 -0
- package/dist/rag/handler.d.ts +25 -0
- package/dist/rag/handler.js +50 -16
- package/dist/rag/handlers/ingest.js +2 -6
- package/dist/rag/handlers/search.d.ts +10 -1
- package/dist/rag/handlers/search.js +16 -7
- package/dist/rag/rag-operation-manager.d.ts +27 -3
- package/dist/rag/rag-operation-manager.js +10 -27
- package/dist/registry.js +5 -0
- package/dist/resources/collector.d.ts +70 -36
- package/dist/resources/collector.js +8 -1
- package/dist/resources/types.d.ts +2 -0
- package/dist/rpc/inventory.js +1 -12
- package/dist/runtime/env.d.ts +5 -1
- package/dist/runtime/env.js +6 -21
- package/dist/runtime/index.d.ts +4 -1
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/lifecycle.d.ts +6 -4
- package/dist/runtime/lifecycle.js +9 -5
- package/dist/runtime/model-config-utils.js +5 -1
- package/dist/runtime/model-registry.d.ts +28 -4
- package/dist/runtime/model-registry.js +46 -1
- package/dist/runtime/model-work-lock.d.ts +13 -0
- package/dist/runtime/model-work-lock.js +48 -0
- package/dist/runtime/registry-client.d.ts +47 -1
- package/dist/runtime/registry-client.js +446 -88
- package/dist/runtime/request-context.d.ts +9 -1
- package/dist/runtime/request-context.js +25 -1
- package/dist/runtime/request-registry.d.ts +55 -7
- package/dist/runtime/request-registry.js +189 -71
- package/dist/runtime/runtime-lifecycle.js +10 -1
- package/dist/runtime/session-id.d.ts +18 -0
- package/dist/runtime/session-id.js +20 -0
- package/dist/runtime/session-registry.d.ts +39 -0
- package/dist/runtime/session-registry.js +114 -0
- package/dist/runtime/vector-index-backend.d.ts +4 -0
- package/dist/runtime/vector-index-registry.d.ts +21 -0
- package/dist/runtime/vector-index-registry.js +56 -18
- package/dist/schemas/abort-signal.d.ts +8 -0
- package/dist/schemas/abort-signal.js +1 -0
- package/dist/schemas/assess-model-fit.d.ts +132 -282
- package/dist/schemas/assess-model-fit.js +82 -216
- package/dist/schemas/audio-gen.d.ts +278 -24
- package/dist/schemas/audio-gen.js +127 -23
- package/dist/schemas/batch-completion-stream.d.ts +105 -13
- package/dist/schemas/batch-completion-stream.js +8 -4
- package/dist/schemas/bci-config.d.ts +2 -1
- package/dist/schemas/bci.d.ts +54 -3
- package/dist/schemas/bci.js +11 -16
- package/dist/schemas/calc-tokens.d.ts +141 -0
- package/dist/schemas/calc-tokens.js +53 -0
- package/dist/schemas/cancel.d.ts +26 -0
- package/dist/schemas/cancel.js +10 -2
- package/dist/schemas/classification.d.ts +3 -0
- package/dist/schemas/classification.js +6 -2
- package/dist/schemas/common.d.ts +1831 -348
- package/dist/schemas/common.js +18 -2
- package/dist/schemas/completion-event.d.ts +3 -0
- package/dist/schemas/completion-event.js +1 -1
- package/dist/schemas/completion-stream.d.ts +162 -17
- package/dist/schemas/completion-stream.js +83 -13
- package/dist/schemas/config.d.ts +1212 -169
- package/dist/schemas/config.js +9 -13
- package/dist/schemas/decision.d.ts +4 -2
- package/dist/schemas/decision.js +2 -1
- package/dist/schemas/download-asset.d.ts +10 -5
- package/dist/schemas/download-asset.js +3 -6
- package/dist/schemas/embed.d.ts +286 -3
- package/dist/schemas/embed.js +162 -16
- package/dist/schemas/engine-addon-map.d.ts +1 -0
- package/dist/schemas/engine-addon-map.js +1 -0
- package/dist/schemas/errors.d.ts +12 -0
- package/dist/schemas/errors.js +66 -1
- package/dist/schemas/finetune.d.ts +14 -4
- package/dist/schemas/finetune.js +5 -6
- package/dist/schemas/heartbeat.d.ts +1 -0
- package/dist/schemas/heartbeat.js +5 -2
- package/dist/schemas/image-embedding.d.ts +27 -0
- package/dist/schemas/image-embedding.js +107 -0
- package/dist/schemas/index.d.ts +7 -3
- package/dist/schemas/index.js +7 -3
- package/dist/schemas/lifecycle.d.ts +3 -0
- package/dist/schemas/lifecycle.js +13 -6
- package/dist/schemas/llamacpp-config.d.ts +269 -22
- package/dist/schemas/llamacpp-config.js +86 -7
- package/dist/schemas/load-model.d.ts +6418 -1960
- package/dist/schemas/load-model.js +39 -8
- package/dist/schemas/logging-stream.d.ts +1 -0
- package/dist/schemas/logging-stream.js +5 -2
- package/dist/schemas/model-config-schemas.d.ts +542 -116
- package/dist/schemas/model-config-schemas.js +2 -0
- package/dist/schemas/model-fit-policy.d.ts +2 -2
- package/dist/schemas/model-info.d.ts +54 -56
- package/dist/schemas/model-info.js +17 -6
- package/dist/schemas/model-ops.d.ts +12 -0
- package/dist/schemas/model-ops.js +33 -5
- package/dist/schemas/model-src-utils.d.ts +10 -6
- package/dist/schemas/model-types.d.ts +8 -4
- package/dist/schemas/model-types.js +1 -0
- package/dist/schemas/ocr.d.ts +9 -4
- package/dist/schemas/ocr.js +6 -2
- package/dist/schemas/plugin.d.ts +62 -6
- package/dist/schemas/plugin.js +26 -4
- package/dist/schemas/profiling.d.ts +32 -32
- package/dist/schemas/rag.d.ts +9 -0
- package/dist/schemas/rag.js +10 -16
- package/dist/schemas/registry.d.ts +30 -10
- package/dist/schemas/registry.js +14 -6
- package/dist/schemas/reload-config.d.ts +41 -6
- package/dist/schemas/reload-config.js +11 -4
- package/dist/schemas/request-base.d.ts +39 -0
- package/dist/schemas/request-base.js +64 -0
- package/dist/schemas/rerank.d.ts +8 -7
- package/dist/schemas/rerank.js +6 -4
- package/dist/schemas/rpc-server.d.ts +3 -0
- package/dist/schemas/rpc-server.js +15 -15
- package/dist/schemas/sdcpp-config.d.ts +90 -20
- package/dist/schemas/sdcpp-config.js +96 -19
- package/dist/schemas/session.d.ts +37 -0
- package/dist/schemas/session.js +53 -0
- package/dist/schemas/system-resources.d.ts +364 -179
- package/dist/schemas/system-resources.js +8 -3
- package/dist/schemas/text-to-speech.d.ts +1343 -271
- package/dist/schemas/text-to-speech.js +547 -33
- package/dist/schemas/tools.d.ts +7 -0
- package/dist/schemas/tools.js +29 -0
- package/dist/schemas/transcription-config.d.ts +262 -2
- package/dist/schemas/transcription-config.js +122 -6
- package/dist/schemas/transcription.d.ts +93 -6
- package/dist/schemas/transcription.js +98 -21
- package/dist/schemas/translate.d.ts +2 -0
- package/dist/schemas/translate.js +5 -9
- package/dist/schemas/translation-config.d.ts +30 -20
- package/dist/schemas/tts-pcm.d.ts +35 -0
- package/dist/schemas/tts-pcm.js +69 -0
- package/dist/schemas/vector-index.d.ts +47 -1
- package/dist/schemas/vector-index.js +37 -10
- package/dist/schemas/vla.d.ts +3 -3
- package/dist/surface.d.ts +3 -3
- package/dist/surface.js +3 -3
- package/dist/utils/addon-responses.d.ts +69 -2
- package/dist/utils/archive.d.ts +7 -0
- package/dist/utils/archive.js +88 -29
- package/dist/utils/asr-events.d.ts +5 -0
- package/dist/utils/asr-events.js +10 -1
- package/dist/utils/cache/auto-history.js +3 -1
- package/dist/utils/cache/layout.d.ts +48 -0
- package/dist/utils/cache/layout.js +190 -0
- package/dist/utils/cache/paths.js +2 -4
- package/dist/utils/cache/types.d.ts +2 -1
- package/dist/utils/checksum.d.ts +5 -0
- package/dist/utils/checksum.js +18 -0
- package/dist/utils/completion-normalizer.js +286 -87
- package/dist/utils/gguf-tensor-extractor.d.ts +0 -6
- package/dist/utils/gguf-tensor-extractor.js +1 -50
- package/dist/utils/shard-utils.d.ts +0 -21
- package/dist/utils/shard-utils.js +12 -62
- package/dist/utils/tool-integration.d.ts +2 -2
- package/dist/utils/tools/defer.d.ts +39 -10
- package/dist/utils/tools/defer.js +72 -17
- package/dist/utils/tools/index.d.ts +1 -1
- package/dist/utils/tools/index.js +1 -1
- package/dist/utils/transcribe-metadata.d.ts +28 -2
- package/dist/utils/transcribe-metadata.js +16 -0
- package/dist/utils/tts-stats.d.ts +42 -0
- package/dist/utils/tts-stats.js +120 -22
- package/package.json +43 -39
- package/dist/model-fit/classify.d.ts +0 -6
- package/dist/model-fit/classify.js +0 -166
- package/dist/model-fit/description/project.d.ts +0 -27
- package/dist/model-fit/description/project.js +0 -33
- package/dist/model-fit/floor.d.ts +0 -31
- package/dist/model-fit/floor.js +0 -65
- package/dist/model-fit/kv-cache.d.ts +0 -23
- package/dist/model-fit/kv-cache.js +0 -85
- package/dist/model-fit/platform.d.ts +0 -14
- package/dist/model-fit/platform.js +0 -26
- package/dist/model-fit/request/create.d.ts +0 -31
- package/dist/model-fit/request/create.js +0 -61
- package/dist/model-fit/request/engines/asr.d.ts +0 -14
- package/dist/model-fit/request/engines/audiogen.d.ts +0 -8
- package/dist/model-fit/request/engines/diffusion.d.ts +0 -7
- package/dist/model-fit/request/engines/diffusion.js +0 -93
- package/dist/model-fit/request/engines/llama.d.ts +0 -12
- package/dist/model-fit/request/engines/llama.js +0 -44
- package/dist/model-fit/request/engines/nmt.d.ts +0 -8
- package/dist/model-fit/request/engines/nmt.js +0 -11
- package/dist/model-fit/request/engines/ocr.d.ts +0 -9
- package/dist/model-fit/request/engines/ocr.js +0 -13
- package/dist/model-fit/request/engines/tts.d.ts +0 -10
- package/dist/model-fit/request/engines/tts.js +0 -152
- package/dist/models/registry/resource-profiles.d.ts +0 -17
- package/dist/models/registry/resource-profiles.js +0 -5859
- package/dist/schemas/model-resource-profile.d.ts +0 -109
- package/dist/schemas/model-resource-profile.js +0 -80
- /package/dist/model-fit/{request/gpu.d.ts → gpu.d.ts} +0 -0
- /package/dist/model-fit/{request/gpu.js → gpu.js} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface SessionEntry {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string | undefined;
|
|
4
|
+
openedAt: Date;
|
|
5
|
+
}
|
|
6
|
+
export declare function openSession(id: string, name?: string): SessionEntry;
|
|
7
|
+
/**
|
|
8
|
+
* Starts closing the session: calls naming it are refused from here on, and
|
|
9
|
+
* its id stays reserved until `finishSessionClose`. The caller cancels its
|
|
10
|
+
* work and releases its leases in between.
|
|
11
|
+
*/
|
|
12
|
+
export declare function closeSession(id: string): SessionEntry;
|
|
13
|
+
/**
|
|
14
|
+
* Calls `listener` when the session starts closing. Returns a function that
|
|
15
|
+
* removes it. A listener for the owner or a session that is not open is never
|
|
16
|
+
* called, so check `isSessionOpen` first.
|
|
17
|
+
*/
|
|
18
|
+
export declare function onSessionClose(id: string, listener: () => void): () => void;
|
|
19
|
+
/** Frees a closed session's id for reuse once its cleanup has finished. */
|
|
20
|
+
export declare function finishSessionClose(id: string): void;
|
|
21
|
+
export declare function isOwnerSession(id: string): boolean;
|
|
22
|
+
export declare function isSessionOpen(id: string): boolean;
|
|
23
|
+
export declare function assertSessionOpen(id: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* The open-session check for a request as it arrived on the wire. A request
|
|
26
|
+
* runs as the owner only by naming no session: the owner id itself is refused
|
|
27
|
+
* so a client cannot act as the owner by sending the string.
|
|
28
|
+
*/
|
|
29
|
+
export declare function assertWireSessionOpen(request: {
|
|
30
|
+
sessionId?: string | undefined;
|
|
31
|
+
}): void;
|
|
32
|
+
export declare function assertOwnerOperation(request: {
|
|
33
|
+
type: string;
|
|
34
|
+
sessionId?: string | undefined;
|
|
35
|
+
}): void;
|
|
36
|
+
export declare function listSessions(): SessionEntry[];
|
|
37
|
+
export declare function hasOpenSessions(): boolean;
|
|
38
|
+
/** Root shutdown: drop every session record. Work and models are torn down by the engine close path. */
|
|
39
|
+
export declare function clearSessions(): void;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { OwnerOnlyError, SessionIdConflictError, SessionNotOpenError } from '../errors/index.js';
|
|
2
|
+
import { getEngineLogger } from '../logging/index.js';
|
|
3
|
+
import { OWNER_SESSION_ID } from '../runtime/session-id.js';
|
|
4
|
+
import { OWNER_ONLY_OPERATIONS } from '../schemas/session.js';
|
|
5
|
+
const logger = getEngineLogger();
|
|
6
|
+
/**
|
|
7
|
+
* Open caller sessions by id. The owner session is implicit: it is always open,
|
|
8
|
+
* never stored here, and cannot be closed through this module.
|
|
9
|
+
*
|
|
10
|
+
* This module only tracks identity. Cancelling a closing session's requests
|
|
11
|
+
* and releasing its model leases is done by the `closeSession` handler, which
|
|
12
|
+
* owns the ordering between the request registry and the model registry.
|
|
13
|
+
*/
|
|
14
|
+
const sessions = new Map();
|
|
15
|
+
// Ids whose close is still releasing work, indexes and leases. Leases and
|
|
16
|
+
// indexes are keyed by session id, so a session reopened under one of these
|
|
17
|
+
// ids would have its resources released by the close still running.
|
|
18
|
+
const closingSessions = new Set();
|
|
19
|
+
// Work that is not a registered request but must end with its session, such
|
|
20
|
+
// as a log subscription.
|
|
21
|
+
const closeListeners = new Map();
|
|
22
|
+
export function openSession(id, name) {
|
|
23
|
+
if (id === OWNER_SESSION_ID || sessions.has(id) || closingSessions.has(id)) {
|
|
24
|
+
throw new SessionIdConflictError(id);
|
|
25
|
+
}
|
|
26
|
+
const entry = { id, name, openedAt: new Date() };
|
|
27
|
+
sessions.set(id, entry);
|
|
28
|
+
logger.info(`Session opened: ${id}${name ? ` (${name})` : ''}`);
|
|
29
|
+
return entry;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Starts closing the session: calls naming it are refused from here on, and
|
|
33
|
+
* its id stays reserved until `finishSessionClose`. The caller cancels its
|
|
34
|
+
* work and releases its leases in between.
|
|
35
|
+
*/
|
|
36
|
+
export function closeSession(id) {
|
|
37
|
+
const entry = sessions.get(id);
|
|
38
|
+
if (!entry)
|
|
39
|
+
throw new SessionNotOpenError(id);
|
|
40
|
+
sessions.delete(id);
|
|
41
|
+
closingSessions.add(id);
|
|
42
|
+
logger.info(`Session closed: ${id}`);
|
|
43
|
+
const listeners = closeListeners.get(id);
|
|
44
|
+
closeListeners.delete(id);
|
|
45
|
+
for (const listener of listeners ?? []) {
|
|
46
|
+
try {
|
|
47
|
+
listener();
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
logger.warn(`Session close listener failed for ${id}:`, error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return entry;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Calls `listener` when the session starts closing. Returns a function that
|
|
57
|
+
* removes it. A listener for the owner or a session that is not open is never
|
|
58
|
+
* called, so check `isSessionOpen` first.
|
|
59
|
+
*/
|
|
60
|
+
export function onSessionClose(id, listener) {
|
|
61
|
+
let listeners = closeListeners.get(id);
|
|
62
|
+
if (!listeners) {
|
|
63
|
+
listeners = new Set();
|
|
64
|
+
closeListeners.set(id, listeners);
|
|
65
|
+
}
|
|
66
|
+
listeners.add(listener);
|
|
67
|
+
return () => {
|
|
68
|
+
const current = closeListeners.get(id);
|
|
69
|
+
current?.delete(listener);
|
|
70
|
+
if (current?.size === 0)
|
|
71
|
+
closeListeners.delete(id);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/** Frees a closed session's id for reuse once its cleanup has finished. */
|
|
75
|
+
export function finishSessionClose(id) {
|
|
76
|
+
closingSessions.delete(id);
|
|
77
|
+
}
|
|
78
|
+
export function isOwnerSession(id) {
|
|
79
|
+
return id === OWNER_SESSION_ID;
|
|
80
|
+
}
|
|
81
|
+
export function isSessionOpen(id) {
|
|
82
|
+
return isOwnerSession(id) || sessions.has(id);
|
|
83
|
+
}
|
|
84
|
+
export function assertSessionOpen(id) {
|
|
85
|
+
if (!isSessionOpen(id))
|
|
86
|
+
throw new SessionNotOpenError(id);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The open-session check for a request as it arrived on the wire. A request
|
|
90
|
+
* runs as the owner only by naming no session: the owner id itself is refused
|
|
91
|
+
* so a client cannot act as the owner by sending the string.
|
|
92
|
+
*/
|
|
93
|
+
export function assertWireSessionOpen(request) {
|
|
94
|
+
if (request.sessionId === OWNER_SESSION_ID)
|
|
95
|
+
throw new SessionNotOpenError(OWNER_SESSION_ID);
|
|
96
|
+
assertSessionOpen(request.sessionId ?? OWNER_SESSION_ID);
|
|
97
|
+
}
|
|
98
|
+
export function assertOwnerOperation(request) {
|
|
99
|
+
if (request.sessionId !== undefined && OWNER_ONLY_OPERATIONS.has(request.type)) {
|
|
100
|
+
throw new OwnerOnlyError(request.type, request.sessionId);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
export function listSessions() {
|
|
104
|
+
return Array.from(sessions.values());
|
|
105
|
+
}
|
|
106
|
+
export function hasOpenSessions() {
|
|
107
|
+
return sessions.size > 0;
|
|
108
|
+
}
|
|
109
|
+
/** Root shutdown: drop every session record. Work and models are torn down by the engine close path. */
|
|
110
|
+
export function clearSessions() {
|
|
111
|
+
sessions.clear();
|
|
112
|
+
closingSessions.clear();
|
|
113
|
+
closeListeners.clear();
|
|
114
|
+
}
|
|
@@ -9,6 +9,10 @@ export interface OpenVectorIndex {
|
|
|
9
9
|
readonly dim: number;
|
|
10
10
|
readonly length: number;
|
|
11
11
|
readonly storage: VectorIndexStorage | undefined;
|
|
12
|
+
readonly calibrated: boolean | undefined;
|
|
13
|
+
readonly stagedSearch: boolean | undefined;
|
|
14
|
+
/** Returns the setting as the native index reports it afterwards. */
|
|
15
|
+
setStagedSearch(enabled: boolean): boolean;
|
|
12
16
|
/** Adds `ids.length` vectors of `dim` components each, atomically. */
|
|
13
17
|
add(vectors: Float32Array, ids: BigUint64Array): void;
|
|
14
18
|
/** One hit list per query row, ordered by descending score; never padded. */
|
|
@@ -9,7 +9,10 @@ export declare function resolveVectorIndexPath(snapshotPath: string): string;
|
|
|
9
9
|
export declare function createVectorIndex(params: {
|
|
10
10
|
dim: number;
|
|
11
11
|
storage: VectorIndexStorage;
|
|
12
|
+
sessionId?: string | undefined;
|
|
12
13
|
}): Promise<{
|
|
14
|
+
stagedSearch?: boolean;
|
|
15
|
+
calibrated?: boolean;
|
|
13
16
|
indexId: string;
|
|
14
17
|
dim: number;
|
|
15
18
|
storage: VectorIndexStorage;
|
|
@@ -17,8 +20,11 @@ export declare function createVectorIndex(params: {
|
|
|
17
20
|
}>;
|
|
18
21
|
export declare function loadVectorIndex(params: {
|
|
19
22
|
path: string;
|
|
23
|
+
sessionId?: string | undefined;
|
|
20
24
|
}): Promise<{
|
|
21
25
|
storage?: VectorIndexStorage;
|
|
26
|
+
stagedSearch?: boolean;
|
|
27
|
+
calibrated?: boolean;
|
|
22
28
|
indexId: string;
|
|
23
29
|
dim: number;
|
|
24
30
|
length: number;
|
|
@@ -28,8 +34,16 @@ export declare function addVectors(params: {
|
|
|
28
34
|
ids: VectorIdWire[];
|
|
29
35
|
vectors: number[][];
|
|
30
36
|
}): {
|
|
37
|
+
stagedSearch?: boolean;
|
|
38
|
+
calibrated?: boolean;
|
|
31
39
|
length: number;
|
|
32
40
|
};
|
|
41
|
+
export declare function setVectorIndexStagedSearch(params: {
|
|
42
|
+
indexId: string;
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
}): {
|
|
45
|
+
stagedSearch: boolean;
|
|
46
|
+
};
|
|
33
47
|
export declare function searchVectors(params: {
|
|
34
48
|
indexId: string;
|
|
35
49
|
queries: number[][];
|
|
@@ -73,4 +87,11 @@ export declare function disposeVectorIndex(params: {
|
|
|
73
87
|
disposed: boolean;
|
|
74
88
|
};
|
|
75
89
|
export declare function getOpenVectorIndexCount(): number;
|
|
90
|
+
/**
|
|
91
|
+
* Releases the indexes a session opened. Once the session ends its handles
|
|
92
|
+
* can no longer reach the worker, so nothing else would release them before
|
|
93
|
+
* shutdown. An index whose dispose fails stays registered and is released at
|
|
94
|
+
* shutdown. Returns the ids released.
|
|
95
|
+
*/
|
|
96
|
+
export declare function disposeSessionVectorIndexes(sessionId: string): string[];
|
|
76
97
|
export declare function disposeAllVectorIndexes(): Promise<void>;
|
|
@@ -4,11 +4,9 @@ import { QvacErrorBase } from '@qvac/error';
|
|
|
4
4
|
import { getTurboVecBackend } from '../plugins/turbovec-backend.js';
|
|
5
5
|
import { getConfiguredCacheDir } from '../runtime/state.js';
|
|
6
6
|
import { generateRandomRequestId } from '../runtime/request-id.js';
|
|
7
|
+
import { resolveSessionId } from '../runtime/session-id.js';
|
|
7
8
|
import { getEngineLogger } from '../logging/index.js';
|
|
8
9
|
import { VectorIndexFailedError, VectorIndexInvalidVectorsError, VectorIndexNotFoundError, VectorIndexProviderUnavailableError } from '../errors/index.js';
|
|
9
|
-
// Worker-side bookkeeping for open indexes: ids, wire-to-native conversion,
|
|
10
|
-
// row validation, snapshot paths, and lifetime. Engine behaviour lives in
|
|
11
|
-
// the backend.
|
|
12
10
|
const indexes = new Map();
|
|
13
11
|
const pendingIndexes = new Set();
|
|
14
12
|
function requireBackend() {
|
|
@@ -18,10 +16,10 @@ function requireBackend() {
|
|
|
18
16
|
return backend;
|
|
19
17
|
}
|
|
20
18
|
function getIndex(indexId) {
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
19
|
+
const tracked = indexes.get(indexId);
|
|
20
|
+
if (!tracked)
|
|
23
21
|
throw new VectorIndexNotFoundError(indexId);
|
|
24
|
-
return index;
|
|
22
|
+
return tracked.index;
|
|
25
23
|
}
|
|
26
24
|
// Backends throw plain TypeError/RangeError/Error values from the native
|
|
27
25
|
// layer; wrap them so the caller receives a coded error with the original
|
|
@@ -42,7 +40,7 @@ function failBackend(error, describe) {
|
|
|
42
40
|
throw new VectorIndexFailedError(describe ? describe(detail) : detail, error);
|
|
43
41
|
}
|
|
44
42
|
// Keep pending opens reachable by shutdown until their indexes are registered.
|
|
45
|
-
async function openVectorIndex(action) {
|
|
43
|
+
async function openVectorIndex(sessionId, action) {
|
|
46
44
|
const opening = (async () => {
|
|
47
45
|
try {
|
|
48
46
|
return await action();
|
|
@@ -54,7 +52,7 @@ async function openVectorIndex(action) {
|
|
|
54
52
|
pendingIndexes.add(opening);
|
|
55
53
|
try {
|
|
56
54
|
const index = await opening;
|
|
57
|
-
const indexId = track(index);
|
|
55
|
+
const indexId = track(index, sessionId);
|
|
58
56
|
return { index, indexId };
|
|
59
57
|
}
|
|
60
58
|
finally {
|
|
@@ -85,23 +83,37 @@ function flattenRows(rows, dim, label) {
|
|
|
85
83
|
function toNativeIds(ids) {
|
|
86
84
|
return new BigUint64Array(ids.map((id) => BigInt(id)));
|
|
87
85
|
}
|
|
88
|
-
function track(index) {
|
|
86
|
+
function track(index, sessionId) {
|
|
89
87
|
const indexId = generateRandomRequestId();
|
|
90
|
-
indexes.set(indexId, index);
|
|
88
|
+
indexes.set(indexId, { index, sessionId });
|
|
91
89
|
return indexId;
|
|
92
90
|
}
|
|
91
|
+
// A provider without the controls reports neither field.
|
|
92
|
+
function indexState(index) {
|
|
93
|
+
return {
|
|
94
|
+
...(index.calibrated !== undefined && { calibrated: index.calibrated }),
|
|
95
|
+
...(index.stagedSearch !== undefined && { stagedSearch: index.stagedSearch })
|
|
96
|
+
};
|
|
97
|
+
}
|
|
93
98
|
export async function createVectorIndex(params) {
|
|
94
99
|
const backend = requireBackend();
|
|
95
|
-
const { index, indexId } = await openVectorIndex(() => backend.create(params.dim, params.storage));
|
|
96
|
-
return {
|
|
100
|
+
const { index, indexId } = await openVectorIndex(resolveSessionId(params), () => backend.create(params.dim, params.storage));
|
|
101
|
+
return {
|
|
102
|
+
indexId,
|
|
103
|
+
dim: index.dim,
|
|
104
|
+
storage: params.storage,
|
|
105
|
+
length: index.length,
|
|
106
|
+
...indexState(index)
|
|
107
|
+
};
|
|
97
108
|
}
|
|
98
109
|
export async function loadVectorIndex(params) {
|
|
99
110
|
const backend = requireBackend();
|
|
100
|
-
const { index, indexId } = await openVectorIndex(() => backend.load(resolveVectorIndexPath(params.path)));
|
|
111
|
+
const { index, indexId } = await openVectorIndex(resolveSessionId(params), () => backend.load(resolveVectorIndexPath(params.path)));
|
|
101
112
|
return {
|
|
102
113
|
indexId,
|
|
103
114
|
dim: index.dim,
|
|
104
115
|
length: index.length,
|
|
116
|
+
...indexState(index),
|
|
105
117
|
...(index.storage !== undefined && { storage: index.storage })
|
|
106
118
|
};
|
|
107
119
|
}
|
|
@@ -113,7 +125,11 @@ export function addVectors(params) {
|
|
|
113
125
|
const vectors = flattenRows(params.vectors, index.dim, 'vectors');
|
|
114
126
|
const ids = toNativeIds(params.ids);
|
|
115
127
|
runBackend(() => index.add(vectors, ids));
|
|
116
|
-
return { length: index.length };
|
|
128
|
+
return { length: index.length, ...indexState(index) };
|
|
129
|
+
}
|
|
130
|
+
export function setVectorIndexStagedSearch(params) {
|
|
131
|
+
const index = getIndex(params.indexId);
|
|
132
|
+
return runBackend(() => ({ stagedSearch: index.setStagedSearch(params.enabled) }));
|
|
117
133
|
}
|
|
118
134
|
export function searchVectors(params) {
|
|
119
135
|
const index = getIndex(params.indexId);
|
|
@@ -157,22 +173,44 @@ export async function writeVectorIndex(params) {
|
|
|
157
173
|
// Disposing an unknown id is not an error: the caller may retry after a
|
|
158
174
|
// worker restart, and the memory it refers to is already gone.
|
|
159
175
|
export function disposeVectorIndex(params) {
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
176
|
+
const tracked = indexes.get(params.indexId);
|
|
177
|
+
if (!tracked)
|
|
162
178
|
return { disposed: false };
|
|
163
179
|
// Drop the entry only once the backend confirms. Deleting first would strand
|
|
164
180
|
// a failed dispose: the retry would find nothing and report success, and
|
|
165
181
|
// `disposeAllVectorIndexes` could not reach it at shutdown either.
|
|
166
|
-
runBackend(() => index.dispose());
|
|
182
|
+
runBackend(() => tracked.index.dispose());
|
|
167
183
|
indexes.delete(params.indexId);
|
|
168
184
|
return { disposed: true };
|
|
169
185
|
}
|
|
170
186
|
export function getOpenVectorIndexCount() {
|
|
171
187
|
return indexes.size;
|
|
172
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* Releases the indexes a session opened. Once the session ends its handles
|
|
191
|
+
* can no longer reach the worker, so nothing else would release them before
|
|
192
|
+
* shutdown. An index whose dispose fails stays registered and is released at
|
|
193
|
+
* shutdown. Returns the ids released.
|
|
194
|
+
*/
|
|
195
|
+
export function disposeSessionVectorIndexes(sessionId) {
|
|
196
|
+
const released = [];
|
|
197
|
+
for (const [indexId, tracked] of indexes) {
|
|
198
|
+
if (tracked.sessionId !== sessionId)
|
|
199
|
+
continue;
|
|
200
|
+
try {
|
|
201
|
+
tracked.index.dispose();
|
|
202
|
+
indexes.delete(indexId);
|
|
203
|
+
released.push(indexId);
|
|
204
|
+
}
|
|
205
|
+
catch (error) {
|
|
206
|
+
getEngineLogger().warn(`Failed to dispose vector index '${indexId}' of closed session '${sessionId}':`, error);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return released;
|
|
210
|
+
}
|
|
173
211
|
export async function disposeAllVectorIndexes() {
|
|
174
212
|
await Promise.allSettled(pendingIndexes);
|
|
175
|
-
for (const [indexId, index] of indexes) {
|
|
213
|
+
for (const [indexId, { index }] of indexes) {
|
|
176
214
|
try {
|
|
177
215
|
index.dispose();
|
|
178
216
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Structural `AbortSignal`: fits the global one and bare-abort-controller's. */
|
|
2
|
+
export interface AbortSignalLike {
|
|
3
|
+
readonly aborted: boolean;
|
|
4
|
+
addEventListener(type: 'abort', listener: () => void, options?: {
|
|
5
|
+
once?: boolean;
|
|
6
|
+
}): void;
|
|
7
|
+
removeEventListener(type: 'abort', listener: () => void): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|