@automagik/omni 2.260602.1 → 2.260602.2
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 +1 -1
- package/dist/server/index.js +17 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -124967,7 +124967,7 @@ import { fileURLToPath } from "url";
|
|
|
124967
124967
|
// package.json
|
|
124968
124968
|
var package_default = {
|
|
124969
124969
|
name: "@automagik/omni",
|
|
124970
|
-
version: "2.260602.
|
|
124970
|
+
version: "2.260602.2",
|
|
124971
124971
|
description: "LLM-optimized CLI for Omni",
|
|
124972
124972
|
type: "module",
|
|
124973
124973
|
bin: {
|
package/dist/server/index.js
CHANGED
|
@@ -225241,7 +225241,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
225241
225241
|
var require_package7 = __commonJS((exports, module) => {
|
|
225242
225242
|
module.exports = {
|
|
225243
225243
|
name: "@omni/api",
|
|
225244
|
-
version: "2.260602.
|
|
225244
|
+
version: "2.260602.2",
|
|
225245
225245
|
type: "module",
|
|
225246
225246
|
exports: {
|
|
225247
225247
|
".": {
|
|
@@ -311383,8 +311383,7 @@ class GeminiVideoGenProvider {
|
|
|
311383
311383
|
aspectRatio,
|
|
311384
311384
|
...options?.durationSec !== undefined ? { durationSeconds: options.durationSec } : {},
|
|
311385
311385
|
...options?.seed !== undefined ? { seed: options.seed } : {},
|
|
311386
|
-
...options?.resolution !== undefined ? { resolution: options.resolution } : {}
|
|
311387
|
-
...!options?.imageBase64 ? { generateAudio: options?.audio !== false } : {}
|
|
311386
|
+
...options?.resolution !== undefined ? { resolution: options.resolution } : {}
|
|
311388
311387
|
}
|
|
311389
311388
|
};
|
|
311390
311389
|
if (options?.imageBase64) {
|
|
@@ -355884,6 +355883,19 @@ function handleSendResult(result, context20) {
|
|
|
355884
355883
|
});
|
|
355885
355884
|
}
|
|
355886
355885
|
}
|
|
355886
|
+
function normalizeSendMediaMimeType(data) {
|
|
355887
|
+
const inferred = data.mimeType ?? inferMediaMimeType(data.type, data.filename);
|
|
355888
|
+
if (data.type === "audio" && data.voiceNote === true && inferred === "audio/ogg") {
|
|
355889
|
+
return "audio/ogg; codecs=opus";
|
|
355890
|
+
}
|
|
355891
|
+
return inferred;
|
|
355892
|
+
}
|
|
355893
|
+
function buildSendMediaMetadata(data) {
|
|
355894
|
+
if (data.type === "audio" && data.voiceNote === true && data.base64) {
|
|
355895
|
+
return { audioBuffer: Buffer.from(data.base64, "base64"), ptt: true };
|
|
355896
|
+
}
|
|
355897
|
+
return { base64: data.base64, ptt: data.voiceNote };
|
|
355898
|
+
}
|
|
355887
355899
|
function getMediaStorageForDownload(db2) {
|
|
355888
355900
|
if (!_mediaStorageForDownload) {
|
|
355889
355901
|
_mediaStorageForDownload = new MediaStorageService(db2);
|
|
@@ -356463,7 +356475,7 @@ var init_messages5 = __esm(() => {
|
|
|
356463
356475
|
});
|
|
356464
356476
|
}
|
|
356465
356477
|
const resolvedTo = await resolveRecipient(data.to, instance4.channel, services);
|
|
356466
|
-
const mediaMimeType =
|
|
356478
|
+
const mediaMimeType = normalizeSendMediaMimeType(data);
|
|
356467
356479
|
const outgoingMessage = {
|
|
356468
356480
|
to: resolvedTo,
|
|
356469
356481
|
threadId: data.threadId,
|
|
@@ -356474,10 +356486,7 @@ var init_messages5 = __esm(() => {
|
|
|
356474
356486
|
filename: data.filename,
|
|
356475
356487
|
mimeType: mediaMimeType
|
|
356476
356488
|
},
|
|
356477
|
-
metadata:
|
|
356478
|
-
base64: data.base64,
|
|
356479
|
-
ptt: data.voiceNote
|
|
356480
|
-
}
|
|
356489
|
+
metadata: buildSendMediaMetadata(data)
|
|
356481
356490
|
};
|
|
356482
356491
|
if (correlationId && tracker.isTracking(correlationId)) {
|
|
356483
356492
|
tracker.recordCheckpoint(correlationId, "T8", JOURNEY_STAGES.T8);
|