omnius 1.0.616 → 1.0.617
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/dist/index.js +92 -27
- package/dist/update-worker.js +3 -0
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -602265,18 +602265,34 @@ function getAsrEngine(engineId) {
|
|
|
602265
602265
|
function getAsrModel(engineId, modelId) {
|
|
602266
602266
|
return getAsrEngine(engineId)?.models.find((model) => model.id === modelId.trim().toLowerCase());
|
|
602267
602267
|
}
|
|
602268
|
-
function
|
|
602269
|
-
const
|
|
602268
|
+
function findAsrEnginesForModel(modelId) {
|
|
602269
|
+
const wanted = String(modelId || "").trim().toLowerCase();
|
|
602270
|
+
if (!wanted)
|
|
602271
|
+
return [];
|
|
602272
|
+
return ASR_ENGINES.filter((engine) => engine.models.some((model) => model.id === wanted));
|
|
602273
|
+
}
|
|
602274
|
+
function getAsrEngineUnavailableReason(engineId) {
|
|
602270
602275
|
const engine = getAsrEngine(engineId);
|
|
602271
|
-
|
|
602276
|
+
return engine?.availability === "disabled" ? engine.unavailableReason ?? `ASR engine ${engine.id} is disabled.` : void 0;
|
|
602277
|
+
}
|
|
602278
|
+
function resolveAsrSelection(input, options2 = {}) {
|
|
602279
|
+
const requestedEngineId = normalizeAsrEngineId(input?.engineId || "openai-whisper");
|
|
602280
|
+
const requestedEngine = getAsrEngine(requestedEngineId);
|
|
602281
|
+
if (!requestedEngine)
|
|
602272
602282
|
throw new Error(`Unknown ASR engine: ${input?.engineId || ""}`);
|
|
602273
|
-
const modelId = String(input?.modelId ||
|
|
602274
|
-
if (
|
|
602275
|
-
|
|
602283
|
+
const modelId = String(input?.modelId || requestedEngine.models[0]?.id || "").trim().toLowerCase();
|
|
602284
|
+
if (getAsrModel(requestedEngineId, modelId)) {
|
|
602285
|
+
return { engineId: requestedEngineId, modelId };
|
|
602286
|
+
}
|
|
602287
|
+
const owners = findAsrEnginesForModel(modelId);
|
|
602288
|
+
if (options2.inferEngineFromModel && owners.length === 1) {
|
|
602289
|
+
return { engineId: owners[0].id, modelId };
|
|
602276
602290
|
}
|
|
602277
|
-
|
|
602291
|
+
const known = requestedEngine.models.map((model) => model.id).join(", ");
|
|
602292
|
+
const hint = owners.length === 1 ? ` That model belongs to engine ${owners[0].id}; send engineId with it.` : owners.length > 1 ? ` That model id is shared by engines ${owners.map((engine) => engine.id).join(", ")}; send engineId to disambiguate.` : "";
|
|
602293
|
+
throw new Error(`Unknown ASR model ${modelId || "(empty)"} for engine ${requestedEngineId}.${hint} Known models for ${requestedEngineId}: ${known}.`);
|
|
602278
602294
|
}
|
|
602279
|
-
var VIBEVOICE_ASR_MODEL_REVISION, VIBEVOICE_ASR_SOURCE_REVISION, VIBEVOICE_ASR_QWEN_TOKENIZER_REVISION, VIBEVOICE_ASR_WEIGHTS_BYTES, whisperCapabilities, WHISPER_MODEL_IDS, whisperModels, ASR_ENGINES, ENGINE_ALIASES;
|
|
602295
|
+
var VIBEVOICE_ASR_MODEL_REVISION, VIBEVOICE_ASR_SOURCE_REVISION, VIBEVOICE_ASR_QWEN_TOKENIZER_REVISION, VIBEVOICE_ASR_WEIGHTS_BYTES, NEMOTRON_DISABLED_REASON, whisperCapabilities, WHISPER_MODEL_IDS, whisperModels, ASR_ENGINES, ENGINE_ALIASES;
|
|
602280
602296
|
var init_registry2 = __esm({
|
|
602281
602297
|
"packages/execution/dist/asr/registry.js"() {
|
|
602282
602298
|
"use strict";
|
|
@@ -602284,6 +602300,7 @@ var init_registry2 = __esm({
|
|
|
602284
602300
|
VIBEVOICE_ASR_SOURCE_REVISION = "94da20d98b2fa7688e9cbfaf7692ddb4954f7600";
|
|
602285
602301
|
VIBEVOICE_ASR_QWEN_TOKENIZER_REVISION = "d149729398750b98c0af14eb82c78cfe92750796";
|
|
602286
602302
|
VIBEVOICE_ASR_WEIGHTS_BYTES = 17348198410;
|
|
602303
|
+
NEMOTRON_DISABLED_REASON = "Nemotron is catalogued but its legacy self-installing worker is disabled until it is migrated to the managed fail-closed runtime.";
|
|
602287
602304
|
whisperCapabilities = Object.freeze({
|
|
602288
602305
|
file: true,
|
|
602289
602306
|
pcmStream: true,
|
|
@@ -602324,6 +602341,8 @@ var init_registry2 = __esm({
|
|
|
602324
602341
|
provider: "NVIDIA",
|
|
602325
602342
|
runtime: "python",
|
|
602326
602343
|
setupMode: "managed",
|
|
602344
|
+
availability: "disabled",
|
|
602345
|
+
unavailableReason: NEMOTRON_DISABLED_REASON,
|
|
602327
602346
|
models: [
|
|
602328
602347
|
{
|
|
602329
602348
|
id: "nemotron-speech-streaming-en-0.6b",
|
|
@@ -603250,7 +603269,7 @@ print(json.dumps({"ok": False, "error": "No whisper backend available"}))
|
|
|
603250
603269
|
backend: "nemotron",
|
|
603251
603270
|
text: "",
|
|
603252
603271
|
latencyMs: Math.round(performance.now() - t0),
|
|
603253
|
-
error:
|
|
603272
|
+
error: NEMOTRON_DISABLED_REASON
|
|
603254
603273
|
};
|
|
603255
603274
|
}
|
|
603256
603275
|
};
|
|
@@ -611906,6 +611925,7 @@ __export(dist_exports2, {
|
|
|
611906
611925
|
ModelBroker: () => ModelBroker,
|
|
611907
611926
|
ModelGenerateTool: () => ModelGenerateTool,
|
|
611908
611927
|
MultimodalMemoryTool: () => MultimodalMemoryTool,
|
|
611928
|
+
NEMOTRON_DISABLED_REASON: () => NEMOTRON_DISABLED_REASON,
|
|
611909
611929
|
NetworkEgressPolicyError: () => NetworkEgressPolicyError,
|
|
611910
611930
|
NexusTool: () => NexusTool,
|
|
611911
611931
|
NotebookEditTool: () => NotebookEditTool,
|
|
@@ -612115,6 +612135,7 @@ __export(dist_exports2, {
|
|
|
612115
612135
|
failureClassCounts: () => failureClassCounts,
|
|
612116
612136
|
fetchHuggingFaceModelInfo: () => fetchHuggingFaceModelInfo,
|
|
612117
612137
|
fetchWithNetworkEgressPolicy: () => fetchWithNetworkEgressPolicy,
|
|
612138
|
+
findAsrEnginesForModel: () => findAsrEnginesForModel,
|
|
612118
612139
|
findNonGatedAudioFallback: () => findNonGatedAudioFallback,
|
|
612119
612140
|
findNonGatedImageFallback: () => findNonGatedImageFallback,
|
|
612120
612141
|
findNonGatedVideoFallback: () => findNonGatedVideoFallback,
|
|
@@ -612134,6 +612155,7 @@ __export(dist_exports2, {
|
|
|
612134
612155
|
getAllConstraints: () => getAllConstraints,
|
|
612135
612156
|
getAllFullSubAgents: () => getAllFullSubAgents,
|
|
612136
612157
|
getAsrEngine: () => getAsrEngine,
|
|
612158
|
+
getAsrEngineUnavailableReason: () => getAsrEngineUnavailableReason,
|
|
612137
612159
|
getAsrModel: () => getAsrModel,
|
|
612138
612160
|
getAudioGenerationPreset: () => getAudioGenerationPreset,
|
|
612139
612161
|
getCodeGraphDB: () => getCodeGraphDB,
|
|
@@ -683735,11 +683757,8 @@ var init_listen = __esm({
|
|
|
683735
683757
|
throw error;
|
|
683736
683758
|
}
|
|
683737
683759
|
}
|
|
683738
|
-
|
|
683739
|
-
|
|
683740
|
-
"Nemotron is catalogued but its legacy self-installing worker is disabled until it is migrated to the managed fail-closed runtime."
|
|
683741
|
-
);
|
|
683742
|
-
}
|
|
683760
|
+
const unavailableReason = getAsrEngineUnavailableReason(selection.engineId);
|
|
683761
|
+
if (unavailableReason) throw new Error(unavailableReason);
|
|
683743
683762
|
const whisperModel2 = selection.modelId;
|
|
683744
683763
|
if (wasActive) await this.stop();
|
|
683745
683764
|
if (previous.engineId === "vibevoice-transformers") await stopVibeVoiceAsr();
|
|
@@ -805719,7 +805738,7 @@ async function loadAsrEngines() {
|
|
|
805719
805738
|
_asrSelection = data.selection || null;
|
|
805720
805739
|
engineSelect.innerHTML = _asrEngines.map(engine =>
|
|
805721
805740
|
'<option value="' + escAttr(engine.id) + '"' + (engine.id === _asrSelection?.engineId ? ' selected' : '') + '>' +
|
|
805722
|
-
escHtml(engine.label) + '</option>'
|
|
805741
|
+
escHtml(engine.label) + (engine.availability === 'disabled' ? ' (unavailable)' : '') + '</option>'
|
|
805723
805742
|
).join('');
|
|
805724
805743
|
renderAsrModelSelect();
|
|
805725
805744
|
} catch (error) {
|
|
@@ -805749,13 +805768,23 @@ window.renderAsrModelSelect = renderAsrModelSelect;
|
|
|
805749
805768
|
function renderAsrStatus(engine, error) {
|
|
805750
805769
|
const host = document.getElementById('voice-asr-status');
|
|
805751
805770
|
const setupButton = document.getElementById('voice-asr-setup-btn');
|
|
805771
|
+
const activateButton = document.getElementById('voice-asr-activate-btn');
|
|
805752
805772
|
if (!host) return;
|
|
805753
805773
|
if (error || !engine) {
|
|
805754
805774
|
host.style.borderLeftColor = 'var(--color-error)';
|
|
805755
805775
|
host.textContent = error || 'No ASR engine selected';
|
|
805756
805776
|
if (setupButton) setupButton.style.display = 'none';
|
|
805777
|
+
if (activateButton) activateButton.disabled = false;
|
|
805757
805778
|
return;
|
|
805758
805779
|
}
|
|
805780
|
+
if (engine.availability === 'disabled') {
|
|
805781
|
+
host.style.borderLeftColor = 'var(--color-error)';
|
|
805782
|
+
host.textContent = 'unavailable · ' + (engine.unavailableReason || 'this engine cannot be activated');
|
|
805783
|
+
if (setupButton) setupButton.style.display = 'none';
|
|
805784
|
+
if (activateButton) activateButton.disabled = true;
|
|
805785
|
+
return;
|
|
805786
|
+
}
|
|
805787
|
+
if (activateButton) activateButton.disabled = false;
|
|
805759
805788
|
const readiness = engine.readiness || {};
|
|
805760
805789
|
const model = (engine.models || []).find(item => item.id === document.getElementById('voice-asr-model-select')?.value) || engine.models?.[0];
|
|
805761
805790
|
const caps = model?.capabilities || {};
|
|
@@ -805787,6 +805816,11 @@ async function activateSelectedAsr() {
|
|
|
805787
805816
|
const engineId = document.getElementById('voice-asr-engine-select')?.value;
|
|
805788
805817
|
const modelId = document.getElementById('voice-asr-model-select')?.value;
|
|
805789
805818
|
if (!engineId || !modelId) return;
|
|
805819
|
+
const engine = selectedAsrEngine();
|
|
805820
|
+
if (engine?.availability === 'disabled') {
|
|
805821
|
+
alert('ASR engine unavailable: ' + (engine.unavailableReason || engine.id));
|
|
805822
|
+
return;
|
|
805823
|
+
}
|
|
805790
805824
|
const button = document.getElementById('voice-asr-activate-btn');
|
|
805791
805825
|
if (button) { button.disabled = true; button.textContent = 'activating…'; }
|
|
805792
805826
|
try {
|
|
@@ -816715,13 +816749,21 @@ data: ${JSON.stringify(data)}
|
|
|
816715
816749
|
const vibe = getVibeVoiceAsrReadiness();
|
|
816716
816750
|
const engines = listAsrEngines().map((engine) => {
|
|
816717
816751
|
const selected = engine.id === listen.currentEngine;
|
|
816718
|
-
const
|
|
816752
|
+
const unavailableReason = getAsrEngineUnavailableReason(engine.id);
|
|
816753
|
+
const readiness = unavailableReason ? {
|
|
816754
|
+
installed: false,
|
|
816755
|
+
weightsReady: false,
|
|
816756
|
+
active: false,
|
|
816757
|
+
lastError: unavailableReason
|
|
816758
|
+
} : engine.id === "vibevoice-transformers" ? vibe : {
|
|
816719
816759
|
installed: true,
|
|
816720
816760
|
weightsReady: true,
|
|
816721
816761
|
active: selected && listen.isActive
|
|
816722
816762
|
};
|
|
816723
816763
|
return {
|
|
816724
816764
|
...engine,
|
|
816765
|
+
availability: unavailableReason ? "disabled" : "available",
|
|
816766
|
+
unavailableReason,
|
|
816725
816767
|
selected,
|
|
816726
816768
|
readiness,
|
|
816727
816769
|
models: engine.models.map((model) => ({
|
|
@@ -816787,16 +816829,39 @@ data: ${JSON.stringify(data)}
|
|
|
816787
816829
|
if ((pathname === "/v1/asr/selection" || pathname === "/v1/asr/activate" || pathname === "/v1/voice/asr-models/switch") && (method === "POST" || method === "PATCH")) {
|
|
816788
816830
|
const body = await parseJsonBody(req3);
|
|
816789
816831
|
const current = getDaemonListenEngine();
|
|
816832
|
+
const explicitEngineId = body?.engineId ?? body?.engine;
|
|
816790
816833
|
let selection;
|
|
816791
816834
|
try {
|
|
816792
|
-
selection = resolveAsrSelection(
|
|
816793
|
-
|
|
816794
|
-
|
|
816795
|
-
|
|
816835
|
+
selection = resolveAsrSelection(
|
|
816836
|
+
{
|
|
816837
|
+
engineId: explicitEngineId ?? current.currentEngine,
|
|
816838
|
+
modelId: body?.modelId ?? body?.model
|
|
816839
|
+
},
|
|
816840
|
+
{ inferEngineFromModel: !explicitEngineId }
|
|
816841
|
+
);
|
|
816796
816842
|
} catch (err) {
|
|
816797
816843
|
jsonResponse(res, 400, {
|
|
816798
816844
|
error: "invalid_asr_selection",
|
|
816799
|
-
message: err instanceof Error ? err.message : String(err)
|
|
816845
|
+
message: err instanceof Error ? err.message : String(err),
|
|
816846
|
+
requested: {
|
|
816847
|
+
engineId: explicitEngineId ?? current.currentEngine,
|
|
816848
|
+
engineInferred: !explicitEngineId,
|
|
816849
|
+
modelId: body?.modelId ?? body?.model ?? null
|
|
816850
|
+
},
|
|
816851
|
+
engines: listAsrEngines().map((engine) => ({
|
|
816852
|
+
engineId: engine.id,
|
|
816853
|
+
models: engine.models.map((model) => model.id)
|
|
816854
|
+
}))
|
|
816855
|
+
});
|
|
816856
|
+
return;
|
|
816857
|
+
}
|
|
816858
|
+
const unavailableReason = getAsrEngineUnavailableReason(selection.engineId);
|
|
816859
|
+
if (unavailableReason) {
|
|
816860
|
+
jsonResponse(res, 409, {
|
|
816861
|
+
error: "asr_engine_unavailable",
|
|
816862
|
+
message: unavailableReason,
|
|
816863
|
+
requested: selection,
|
|
816864
|
+
state: getRuntimeStatus()
|
|
816800
816865
|
});
|
|
816801
816866
|
return;
|
|
816802
816867
|
}
|
|
@@ -829502,10 +829567,8 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
829502
829567
|
},
|
|
829503
829568
|
async listenSetModel(model) {
|
|
829504
829569
|
const engine = getListenEngine();
|
|
829505
|
-
const
|
|
829506
|
-
|
|
829507
|
-
modelId: model
|
|
829508
|
-
});
|
|
829570
|
+
const engineId = getAsrModel(engine.currentEngine, model) ? engine.currentEngine : "openai-whisper";
|
|
829571
|
+
const result = await engine.activateSelection({ engineId, modelId: model });
|
|
829509
829572
|
return result.message;
|
|
829510
829573
|
},
|
|
829511
829574
|
asrGetSelection() {
|
|
@@ -833244,11 +833307,13 @@ async function coerceForSettings(key, value2) {
|
|
|
833244
833307
|
return normalized3;
|
|
833245
833308
|
}
|
|
833246
833309
|
if (key === "asrModel") {
|
|
833247
|
-
const { getAsrModel: getAsrModel2, normalizeAsrEngineId: normalizeAsrEngineId2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports2));
|
|
833310
|
+
const { findAsrEnginesForModel: findAsrEnginesForModel2, getAsrModel: getAsrModel2, normalizeAsrEngineId: normalizeAsrEngineId2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports2));
|
|
833248
833311
|
const engine = normalizeAsrEngineId2(loadGlobalSettings().asrEngine || "openai-whisper");
|
|
833249
833312
|
const normalized3 = value2.trim().toLowerCase();
|
|
833250
833313
|
if (!getAsrModel2(engine, normalized3)) {
|
|
833251
|
-
|
|
833314
|
+
const owners = findAsrEnginesForModel2(normalized3).map((spec) => spec.id);
|
|
833315
|
+
const hint = owners.length ? ` It belongs to ${owners.join(", ")}; run "omnius config set asrEngine ${owners[0]}" first.` : "";
|
|
833316
|
+
throw new Error(`Invalid ASR model "${value2}" for ${engine}.${hint}`);
|
|
833252
833317
|
}
|
|
833253
833318
|
return normalized3;
|
|
833254
833319
|
}
|
package/dist/update-worker.js
CHANGED
|
@@ -293353,6 +293353,7 @@ var MM_INDEX = join9(MM_DIR, "index.json");
|
|
|
293353
293353
|
// packages/execution/dist/asr/registry.js
|
|
293354
293354
|
var VIBEVOICE_ASR_MODEL_REVISION = "d0c9efdb8d614685062c04425d91e01b6f37d944";
|
|
293355
293355
|
var VIBEVOICE_ASR_WEIGHTS_BYTES = 17348198410;
|
|
293356
|
+
var NEMOTRON_DISABLED_REASON = "Nemotron is catalogued but its legacy self-installing worker is disabled until it is migrated to the managed fail-closed runtime.";
|
|
293356
293357
|
var whisperCapabilities = Object.freeze({
|
|
293357
293358
|
file: true,
|
|
293358
293359
|
pcmStream: true,
|
|
@@ -293410,6 +293411,8 @@ var ASR_ENGINES = Object.freeze([
|
|
|
293410
293411
|
provider: "NVIDIA",
|
|
293411
293412
|
runtime: "python",
|
|
293412
293413
|
setupMode: "managed",
|
|
293414
|
+
availability: "disabled",
|
|
293415
|
+
unavailableReason: NEMOTRON_DISABLED_REASON,
|
|
293413
293416
|
models: [
|
|
293414
293417
|
{
|
|
293415
293418
|
id: "nemotron-speech-streaming-en-0.6b",
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.617",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.617",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
|
@@ -1745,9 +1745,9 @@
|
|
|
1745
1745
|
}
|
|
1746
1746
|
},
|
|
1747
1747
|
"node_modules/@noble/ciphers": {
|
|
1748
|
-
"version": "2.
|
|
1749
|
-
"resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-2.
|
|
1750
|
-
"integrity": "sha512-
|
|
1748
|
+
"version": "2.3.0",
|
|
1749
|
+
"resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-2.3.0.tgz",
|
|
1750
|
+
"integrity": "sha512-Clu/xdfgVTf9o7ngLOURaxePwR0j8sjclKEtVij10/jGulwFsPWCvvRgG/XjUVf8Nei+jLG6uwyXzUTGY1DQrw==",
|
|
1751
1751
|
"license": "MIT",
|
|
1752
1752
|
"engines": {
|
|
1753
1753
|
"node": ">= 20.19.0"
|
package/package.json
CHANGED