@qvac/sdk 0.13.5 → 0.14.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 +95 -1151
- package/README.md +1 -2
- package/bare-imports.json +0 -5
- package/dist/client/api/bci-transcribe.js +2 -1
- package/dist/client/api/download-asset.js +2 -1
- package/dist/client/api/finetune.js +6 -5
- package/dist/client/api/index.d.ts +1 -0
- package/dist/client/api/index.js +1 -0
- package/dist/client/api/load-model.d.ts +11 -8
- package/dist/client/api/load-model.js +6 -6
- package/dist/client/api/subscribe-logs.d.ts +28 -0
- package/dist/client/api/subscribe-logs.js +43 -0
- package/dist/client/api/text-to-speech.js +2 -1
- package/dist/client/config-loader/config-utils.js +2 -4
- package/dist/client/config-loader/resolve-config.bare.js +4 -3
- package/dist/client/parse-input.d.ts +3 -0
- package/dist/client/parse-input.js +14 -0
- package/dist/client/rpc/expo-rpc-client.js +2 -11
- package/dist/client/rpc/node-rpc-client.js +8 -2
- package/dist/client/rpc/rpc-client.js +39 -7
- package/dist/commands/bundle/constants.js +2 -1
- package/dist/commands/bundle/entry-gen.d.ts +1 -1
- package/dist/commands/bundle/entry-gen.js +6 -6
- package/dist/commands/bundle/index.js +3 -1
- package/dist/commands/bundle/resolve-sdk-import.d.ts +6 -0
- package/dist/commands/bundle/resolve-sdk-import.js +60 -0
- package/dist/examples/bci/bci-filesystem-streaming.js +14 -14
- package/dist/examples/bci/bci-filesystem.js +17 -13
- package/dist/examples/cache-management.js +38 -38
- package/dist/examples/cancel-by-request-id.js +9 -9
- package/dist/examples/completion-events.js +20 -14
- package/dist/examples/completion-stop-reason.js +13 -7
- package/dist/examples/concurrent-completion-collision.js +7 -7
- package/dist/examples/config-reload.js +7 -8
- package/dist/examples/default-config-usage.js +4 -4
- package/dist/examples/delegated-inference/composite.js +14 -10
- package/dist/examples/delegated-inference/consumer-profiled.js +13 -13
- package/dist/examples/delegated-inference/consumer.js +16 -12
- package/dist/examples/delegated-inference/provider.js +12 -12
- package/dist/examples/diffusion-esrgan-upscale.js +19 -15
- package/dist/examples/diffusion-flux2-klein-img2img.js +16 -11
- package/dist/examples/diffusion-flux2-klein.js +14 -9
- package/dist/examples/diffusion-img2img.js +9 -10
- package/dist/examples/diffusion-img2vid.js +17 -12
- package/dist/examples/diffusion-simple.js +1 -1
- package/dist/examples/diffusion-txt2img.js +14 -9
- package/dist/examples/diffusion-txt2vid.js +15 -10
- package/dist/examples/download-with-blind-relays.js +16 -21
- package/dist/examples/download-with-cancel.js +15 -16
- package/dist/examples/embed-multi-gpu.js +3 -4
- package/dist/examples/embed-p2p.js +11 -7
- package/dist/examples/finetune/llamacpp-finetune.js +7 -7
- package/dist/examples/kv-cache-cleanup.js +35 -35
- package/dist/examples/kv-cache-custom-key.js +24 -24
- package/dist/examples/kv-cache-example.js +9 -9
- package/dist/examples/llamacpp-cache.js +18 -14
- package/dist/examples/llamacpp-dynamic-tools.js +15 -9
- package/dist/examples/llamacpp-filesystem.js +15 -9
- package/dist/examples/llamacpp-http.js +12 -10
- package/dist/examples/llamacpp-multi-gpu.js +4 -4
- package/dist/examples/llamacpp-multimodal.js +13 -9
- package/dist/examples/llamacpp-p2p.js +8 -4
- package/dist/examples/llamacpp-sharded.js +5 -5
- package/dist/examples/llamacpp-structured-output.js +15 -9
- package/dist/examples/logging-file-transport.js +3 -3
- package/dist/examples/logging-global.d.ts +2 -0
- package/dist/examples/logging-global.js +34 -0
- package/dist/examples/logging-streaming.js +7 -10
- package/dist/examples/mcp-websearch.js +24 -18
- package/dist/examples/multi-model-demo.js +17 -11
- package/dist/examples/ocr-fasttext.js +14 -16
- package/dist/examples/parallel-download.js +7 -7
- package/dist/examples/plugins.js +40 -28
- package/dist/examples/profiling/basic.js +16 -10
- package/dist/examples/profiling/per-call.js +17 -11
- package/dist/examples/quickstart.bare.d.ts +2 -0
- package/dist/examples/quickstart.bare.js +18 -0
- package/dist/examples/quickstart.js +10 -3
- package/dist/examples/rag/rag-chromadb.js +18 -14
- package/dist/examples/rag/rag-hyperdb/cancellation.js +17 -14
- package/dist/examples/rag/rag-hyperdb/ingest.js +14 -12
- package/dist/examples/rag/rag-hyperdb/pipeline.js +19 -17
- package/dist/examples/rag/rag-hyperdb/workspaces.js +31 -27
- package/dist/examples/rag/rag-lancedb.js +12 -8
- package/dist/examples/rag/rag-sqlite.js +11 -7
- package/dist/examples/registry-query.js +17 -17
- package/dist/examples/seed-p2p.js +10 -6
- package/dist/examples/suspend-resume.js +20 -16
- package/dist/examples/tools/llamacpp-native-tools.js +24 -18
- package/dist/examples/tools/llamacpp-tools-gemma4.js +14 -8
- package/dist/examples/tools/llamacpp-tools-harmony-multiturn.js +20 -14
- package/dist/examples/tools/llamacpp-tools-pythonic.js +14 -8
- package/dist/examples/tools/llamacpp-tools-qwen35.js +14 -8
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +12 -9
- package/dist/examples/transcription/parakeet-microphone-record.js +15 -9
- package/dist/examples/transcription/parakeet-microphone-stream.js +15 -9
- package/dist/examples/transcription/parakeet-sortformer-streaming.js +12 -6
- package/dist/examples/transcription/parakeet-sortformer.js +3 -5
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +13 -10
- package/dist/examples/transcription/whispercpp-filesystem-streaming.js +16 -17
- package/dist/examples/transcription/whispercpp-filesystem.js +14 -10
- package/dist/examples/transcription/whispercpp-microphone-conversation.js +10 -10
- package/dist/examples/transcription/whispercpp-microphone-record.js +6 -6
- package/dist/examples/transcription/whispercpp-prompt.js +14 -10
- package/dist/examples/translation/translation-bergamot-batch.js +11 -7
- package/dist/examples/translation/translation-bergamot-pivot.js +13 -9
- package/dist/examples/translation/translation-bergamot.js +8 -4
- package/dist/examples/translation/translation-indic.js +8 -4
- package/dist/examples/translation/translation-llm-afriquegemma.js +7 -3
- package/dist/examples/translation/translation-llm-context.js +8 -4
- package/dist/examples/translation/translation-llm.js +7 -3
- package/dist/examples/translation/translation-stream.js +4 -4
- package/dist/examples/tts/chatterbox.js +19 -11
- package/dist/examples/tts/llm-to-tts-streaming.js +27 -14
- package/dist/examples/tts/supertonic-multilingual.js +18 -14
- package/dist/examples/tts/supertonic.js +19 -15
- package/dist/examples/tts/utils.js +1 -1
- package/dist/examples/vla-pi05.js +18 -14
- package/dist/examples/vla-smolvla.js +18 -14
- package/dist/examples/voice-assistant/voice-assistant.js +12 -12
- package/dist/index.d.ts +3 -4
- package/dist/index.js +3 -4
- package/dist/logging/client-logger.js +2 -1
- package/dist/logging/index.d.ts +1 -1
- package/dist/logging/index.js +1 -1
- package/dist/logging/namespaces.d.ts +1 -0
- package/dist/logging/namespaces.js +2 -0
- package/dist/logging/server-logger.js +1 -4
- package/dist/logging/utils.js +6 -1
- package/dist/models/registry/index.d.ts +17 -0
- package/dist/models/registry/index.js +20 -1
- package/dist/models/registry/models.d.ts +1062 -38
- package/dist/models/registry/models.js +3546 -2490
- package/dist/pear/pre.js +2 -2
- package/dist/schemas/bci-config.d.ts +37 -0
- package/dist/schemas/bci-config.js +2 -0
- package/dist/schemas/bci.d.ts +2 -0
- package/dist/schemas/common.d.ts +171 -94
- package/dist/schemas/completion-stream.d.ts +6 -3
- package/dist/schemas/completion-stream.js +10 -2
- package/dist/schemas/download-asset.d.ts +5 -5
- package/dist/schemas/engine-addon-map.d.ts +1 -1
- package/dist/schemas/engine-addon-map.js +6 -3
- package/dist/schemas/error.js +6 -1
- package/dist/schemas/llamacpp-config.d.ts +27 -8
- package/dist/schemas/llamacpp-config.js +19 -2
- package/dist/schemas/load-model.d.ts +4170 -570
- package/dist/schemas/load-model.js +85 -26
- package/dist/schemas/logging-stream.js +7 -1
- package/dist/schemas/model-src-utils.d.ts +6 -6
- package/dist/schemas/model-types.d.ts +14 -15
- package/dist/schemas/model-types.js +10 -11
- package/dist/schemas/ocr.d.ts +10 -8
- package/dist/schemas/ocr.js +8 -6
- package/dist/schemas/plugin.d.ts +6 -5
- package/dist/schemas/plugin.js +4 -4
- package/dist/schemas/rag.d.ts +4 -4
- package/dist/schemas/registry.d.ts +8 -8
- package/dist/schemas/registry.js +1 -1
- package/dist/schemas/reload-config.d.ts +6 -6
- package/dist/schemas/sdcpp-config.d.ts +12 -12
- package/dist/schemas/sdk-config.d.ts +171 -117
- package/dist/schemas/sdk-config.js +5 -5
- package/dist/schemas/sdk-errors-client.d.ts +1 -0
- package/dist/schemas/sdk-errors-client.js +7 -2
- package/dist/schemas/text-to-speech.d.ts +157 -13
- package/dist/schemas/text-to-speech.js +70 -7
- package/dist/schemas/transcription-config.d.ts +5 -1
- package/dist/schemas/transcription-config.js +2 -0
- package/dist/schemas/transcription.d.ts +3 -0
- package/dist/schemas/transcription.js +2 -1
- package/dist/schemas/translate.d.ts +6 -6
- package/dist/schemas/translate.js +2 -3
- package/dist/schemas/translation-config.d.ts +20 -20
- package/dist/server/bare/hyperswarm.js +3 -3
- package/dist/server/bare/ops/transcribe.js +46 -15
- package/dist/server/bare/plugins/bci-whispercpp-transcription/args.d.ts +3 -0
- package/dist/server/bare/plugins/bci-whispercpp-transcription/args.js +13 -0
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.d.ts +41 -0
- package/dist/server/bare/plugins/bci-whispercpp-transcription/plugin.js +6 -11
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.d.ts +75 -0
- package/dist/server/bare/plugins/bci-whispercpp-transcription/resolve-config.js +11 -0
- package/dist/server/bare/plugins/{onnx-ocr → ggml-ocr}/plugin.d.ts +16 -10
- package/dist/server/bare/plugins/{onnx-ocr → ggml-ocr}/plugin.js +25 -18
- package/dist/server/bare/plugins/index.d.ts +1 -1
- package/dist/server/bare/plugins/index.js +1 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.d.ts +10 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.js +29 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +4 -22
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +15 -7
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +7 -7
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +2 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +10 -10
- package/dist/server/bare/plugins/tts-ggml/plugin.d.ts +14 -8
- package/dist/server/bare/plugins/tts-ggml/plugin.js +12 -0
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +3 -1
- package/dist/server/bare/registry/logging-stream-registry.d.ts +4 -2
- package/dist/server/bare/registry/logging-stream-registry.js +12 -7
- package/dist/server/bare/registry/model-config-utils.js +2 -2
- package/dist/server/bare/registry/registry-client.js +1 -1
- package/dist/server/bare/runtime-lifecycle.d.ts +9 -0
- package/dist/server/bare/runtime-lifecycle.js +24 -0
- package/dist/server/bare/types/addon-responses.d.ts +1 -0
- package/dist/server/env.js +7 -10
- package/dist/server/plugins/registry.js +2 -4
- package/dist/server/rpc/handlers/load-model/handler.js +2 -4
- package/dist/server/rpc/handlers/load-model/http.js +253 -51
- package/dist/server/rpc/handlers/logging-stream.js +4 -2
- package/dist/server/rpc/handlers/plugin-invoke.js +5 -16
- package/dist/server/utils/completion-normalizer.js +13 -4
- package/dist/server/utils/worker-lock.js +5 -5
- package/dist/server/worker-core.d.ts +1 -1
- package/dist/server/worker-core.js +28 -18
- package/dist/utils/errors-client.d.ts +3 -0
- package/dist/utils/errors-client.js +5 -0
- package/dist/utils/errors-server.d.ts +2 -0
- package/dist/utils/errors-server.js +3 -0
- package/dist/utils/zod-error.d.ts +3 -0
- package/dist/utils/zod-error.js +4 -0
- package/package.json +21 -24
- package/dist/polyfills/bare-globals.d.ts +0 -2
- package/dist/polyfills/bare-globals.js +0 -4
- package/dist/polyfills/bare-globals.noop.d.ts +0 -2
- package/dist/polyfills/bare-globals.noop.js +0 -1
- /package/dist/server/bare/plugins/{onnx-ocr → ggml-ocr}/ops/ocr-stream.d.ts +0 -0
- /package/dist/server/bare/plugins/{onnx-ocr → ggml-ocr}/ops/ocr-stream.js +0 -0
|
@@ -16,7 +16,8 @@ export function getClientLogger(options) {
|
|
|
16
16
|
return cached;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
// The SDK's own logs stay off the console unless the caller opts in.
|
|
20
|
+
const logger = getLogger(CLIENT_NAMESPACE, { enableConsole: false, ...options });
|
|
20
21
|
if (!options) {
|
|
21
22
|
setCachedClientLogger(logger);
|
|
22
23
|
}
|
package/dist/logging/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { createStreamLogger } from "./stream-logger";
|
|
|
4
4
|
export { getServerLogger } from "./server-logger";
|
|
5
5
|
export { getClientLogger } from "./client-logger";
|
|
6
6
|
export type { Logger, LoggerOptions, LogTransport } from "./types";
|
|
7
|
-
export { RAG_NAMESPACE, SDK_LOG_ID, SDK_SERVER_NAMESPACE, type AddonNamespace, } from "./namespaces";
|
|
7
|
+
export { RAG_NAMESPACE, SDK_LOG_ID, SDK_ALL_LOG_ID, SDK_SERVER_NAMESPACE, type AddonNamespace, } from "./namespaces";
|
|
8
8
|
export { registerAddonLogger, unregisterAddonLogger, createAddonLoggerCallback, clearAllAddonLoggers, } from "./addon";
|
|
9
9
|
export { summarizeRequest } from "./utils";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/logging/index.js
CHANGED
|
@@ -3,6 +3,6 @@ export { setGlobalLogLevel, setGlobalConsoleOutput, registerLogger, unregisterLo
|
|
|
3
3
|
export { createStreamLogger } from "./stream-logger.js";
|
|
4
4
|
export { getServerLogger } from "./server-logger.js";
|
|
5
5
|
export { getClientLogger } from "./client-logger.js";
|
|
6
|
-
export { RAG_NAMESPACE, SDK_LOG_ID, SDK_SERVER_NAMESPACE, } from "./namespaces.js";
|
|
6
|
+
export { RAG_NAMESPACE, SDK_LOG_ID, SDK_ALL_LOG_ID, SDK_SERVER_NAMESPACE, } from "./namespaces.js";
|
|
7
7
|
export { registerAddonLogger, unregisterAddonLogger, createAddonLoggerCallback, clearAllAddonLoggers, } from "./addon.js";
|
|
8
8
|
export { summarizeRequest } from "./utils.js";
|
|
@@ -2,5 +2,6 @@ import { type CanonicalModelType } from "../schemas/model-types";
|
|
|
2
2
|
export declare const RAG_NAMESPACE: "rag:hyperdb";
|
|
3
3
|
export type AddonNamespace = CanonicalModelType | typeof RAG_NAMESPACE;
|
|
4
4
|
export declare const SDK_LOG_ID = "__sdk__";
|
|
5
|
+
export declare const SDK_ALL_LOG_ID = "__all__";
|
|
5
6
|
export declare const SDK_SERVER_NAMESPACE = "sdk:server";
|
|
6
7
|
//# sourceMappingURL=namespaces.d.ts.map
|
|
@@ -2,5 +2,7 @@ import {} from "../schemas/model-types.js";
|
|
|
2
2
|
export const RAG_NAMESPACE = "rag:hyperdb";
|
|
3
3
|
// Reserved ID for SDK server logs
|
|
4
4
|
export const SDK_LOG_ID = "__sdk__";
|
|
5
|
+
// Reserved ID for the stream that receives all server-side logs
|
|
6
|
+
export const SDK_ALL_LOG_ID = "__all__";
|
|
5
7
|
// Namespace for all SDK server logs
|
|
6
8
|
export const SDK_SERVER_NAMESPACE = "sdk:server";
|
|
@@ -5,10 +5,7 @@ export function getServerLogger(options) {
|
|
|
5
5
|
if (!options && cachedLogger) {
|
|
6
6
|
return cachedLogger;
|
|
7
7
|
}
|
|
8
|
-
const logger = createStreamLogger(SDK_LOG_ID, SDK_SERVER_NAMESPACE,
|
|
9
|
-
enableConsole: true, // SDK logs should still print to console
|
|
10
|
-
...options,
|
|
11
|
-
});
|
|
8
|
+
const logger = createStreamLogger(SDK_LOG_ID, SDK_SERVER_NAMESPACE, options);
|
|
12
9
|
if (!options) {
|
|
13
10
|
cachedLogger = logger;
|
|
14
11
|
}
|
package/dist/logging/utils.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { LEVEL_PRIORITIES } from "@qvac/logging/constants.js";
|
|
1
|
+
import { LEVEL_PRIORITIES, LOG_LEVELS } from "@qvac/logging/constants.js";
|
|
2
2
|
import stringify from "fast-safe-stringify";
|
|
3
3
|
export function isLevelEnabled(messageLevel, currentLevel) {
|
|
4
|
+
// "off" suppresses every emission (console, streams, and transports alike),
|
|
5
|
+
// even though its priority sits above the real levels.
|
|
6
|
+
if (currentLevel === LOG_LEVELS.OFF || messageLevel === LOG_LEVELS.OFF) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
4
9
|
const messagePriority = LEVEL_PRIORITIES[messageLevel];
|
|
5
10
|
const currentPriority = LEVEL_PRIORITIES[currentLevel];
|
|
6
11
|
if (messagePriority === undefined || currentPriority === undefined) {
|
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
export * from "./models";
|
|
2
|
+
export declare const BCI_EMBEDDER: {
|
|
3
|
+
readonly name: "BCI_EMBEDDER";
|
|
4
|
+
readonly src: "registry://s3/qvac_models_compiled/bci-whispercpp/2026-05-07/bci-embedder.bin";
|
|
5
|
+
readonly registryPath: "qvac_models_compiled/bci-whispercpp/2026-05-07/bci-embedder.bin";
|
|
6
|
+
readonly registrySource: "s3";
|
|
7
|
+
readonly blobCoreKey: "6309722b3460d91d38ad7526875ecfa29183245826b717949c55ba443093d963";
|
|
8
|
+
readonly blobBlockOffset: 2263987;
|
|
9
|
+
readonly blobBlockLength: 382;
|
|
10
|
+
readonly blobByteOffset: 148361525869;
|
|
11
|
+
readonly modelId: "bci-embedder.bin";
|
|
12
|
+
readonly expectedSize: 25028476;
|
|
13
|
+
readonly sha256Checksum: "cca7eeee5b421675edece9f4bb88b34e53e26b2c30fe65f3b70ae98d294274ff";
|
|
14
|
+
readonly addon: "bci";
|
|
15
|
+
readonly engine: "bci-whispercpp-transcription";
|
|
16
|
+
readonly quantization: "";
|
|
17
|
+
readonly params: "";
|
|
18
|
+
};
|
|
2
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { models } from "./models.js";
|
|
2
|
+
// Re-export all generated models
|
|
2
3
|
export * from "./models.js";
|
|
4
|
+
const bciEmbedder = models.find((model) => model.name === "BCI_EMBEDDER");
|
|
5
|
+
export const BCI_EMBEDDER = {
|
|
6
|
+
name: "BCI_EMBEDDER",
|
|
7
|
+
src: `registry://${bciEmbedder.registrySource}/${bciEmbedder.registryPath}`,
|
|
8
|
+
registryPath: bciEmbedder.registryPath,
|
|
9
|
+
registrySource: bciEmbedder.registrySource,
|
|
10
|
+
blobCoreKey: bciEmbedder.blobCoreKey,
|
|
11
|
+
blobBlockOffset: bciEmbedder.blobBlockOffset,
|
|
12
|
+
blobBlockLength: bciEmbedder.blobBlockLength,
|
|
13
|
+
blobByteOffset: bciEmbedder.blobByteOffset,
|
|
14
|
+
modelId: bciEmbedder.modelId,
|
|
15
|
+
expectedSize: bciEmbedder.expectedSize,
|
|
16
|
+
sha256Checksum: bciEmbedder.sha256Checksum,
|
|
17
|
+
addon: bciEmbedder.addon,
|
|
18
|
+
engine: bciEmbedder.engine,
|
|
19
|
+
quantization: bciEmbedder.quantization,
|
|
20
|
+
params: bciEmbedder.params,
|
|
21
|
+
};
|