@automagik/omni 2.260803.3 → 2.260804.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 +80 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -128149,7 +128149,7 @@ import { fileURLToPath } from "url";
|
|
|
128149
128149
|
// package.json
|
|
128150
128150
|
var package_default = {
|
|
128151
128151
|
name: "@automagik/omni",
|
|
128152
|
-
version: "2.
|
|
128152
|
+
version: "2.260804.2",
|
|
128153
128153
|
description: "LLM-optimized CLI for Omni",
|
|
128154
128154
|
type: "module",
|
|
128155
128155
|
bin: {
|
package/dist/server/index.js
CHANGED
|
@@ -242831,7 +242831,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
242831
242831
|
var require_package7 = __commonJS((exports, module) => {
|
|
242832
242832
|
module.exports = {
|
|
242833
242833
|
name: "@omni/api",
|
|
242834
|
-
version: "2.
|
|
242834
|
+
version: "2.260804.2",
|
|
242835
242835
|
type: "module",
|
|
242836
242836
|
exports: {
|
|
242837
242837
|
".": {
|
|
@@ -365971,6 +365971,18 @@ function applyTwilioWhatsAppConnectionOptions(options, input) {
|
|
|
365971
365971
|
options.twilioValidateSignature = input.twilioValidateSignature;
|
|
365972
365972
|
}
|
|
365973
365973
|
}
|
|
365974
|
+
function applyHermesConnectionOptions(options, input) {
|
|
365975
|
+
if (input.hermesBaseUrl)
|
|
365976
|
+
options.hermesBaseUrl = input.hermesBaseUrl;
|
|
365977
|
+
if (input.hermesUsername)
|
|
365978
|
+
options.hermesUsername = input.hermesUsername;
|
|
365979
|
+
if (input.hermesPassword)
|
|
365980
|
+
options.hermesPassword = input.hermesPassword;
|
|
365981
|
+
if (input.hermesMediaId)
|
|
365982
|
+
options.hermesMediaId = input.hermesMediaId;
|
|
365983
|
+
if (input.hermesTemplateNamespace)
|
|
365984
|
+
options.hermesTemplateNamespace = input.hermesTemplateNamespace;
|
|
365985
|
+
}
|
|
365974
365986
|
function applyChannelSpecificConnectionOptions(options, input) {
|
|
365975
365987
|
switch (input.channel) {
|
|
365976
365988
|
case "telegram":
|
|
@@ -365985,6 +365997,9 @@ function applyChannelSpecificConnectionOptions(options, input) {
|
|
|
365985
365997
|
case "twilio-whatsapp":
|
|
365986
365998
|
applyTwilioWhatsAppConnectionOptions(options, input);
|
|
365987
365999
|
return;
|
|
366000
|
+
case "hermes":
|
|
366001
|
+
applyHermesConnectionOptions(options, input);
|
|
366002
|
+
return;
|
|
365988
366003
|
}
|
|
365989
366004
|
}
|
|
365990
366005
|
function buildInstanceConnectionOptions(input) {
|
|
@@ -366113,7 +366128,12 @@ function buildConnectConnectionOptions(instance4, body, forceNewQr) {
|
|
|
366113
366128
|
twilioMessagingServiceSid: body.twilioMessagingServiceSid ?? instance4.twilioMessagingServiceSid,
|
|
366114
366129
|
twilioStatusCallbackUrl: body.twilioStatusCallbackUrl ?? instance4.twilioStatusCallbackUrl,
|
|
366115
366130
|
twilioWebhookUrl: body.twilioWebhookUrl ?? instance4.twilioWebhookUrl,
|
|
366116
|
-
twilioValidateSignature: body.twilioValidateSignature ?? instance4.twilioValidateSignature
|
|
366131
|
+
twilioValidateSignature: body.twilioValidateSignature ?? instance4.twilioValidateSignature,
|
|
366132
|
+
hermesBaseUrl: body.hermesBaseUrl ?? instance4.hermesBaseUrl,
|
|
366133
|
+
hermesUsername: body.hermesUsername ?? instance4.hermesUsername,
|
|
366134
|
+
hermesPassword: body.hermesPassword ?? instance4.hermesPassword,
|
|
366135
|
+
hermesMediaId: body.hermesMediaId ?? instance4.hermesMediaId,
|
|
366136
|
+
hermesTemplateNamespace: body.hermesTemplateNamespace ?? instance4.hermesTemplateNamespace
|
|
366117
366137
|
});
|
|
366118
366138
|
}
|
|
366119
366139
|
function hydrateConnectionOptionsForInstance(plugin10, instance4, options) {
|
|
@@ -366135,17 +366155,28 @@ function buildConnectPersistUpdates(instance4, body) {
|
|
|
366135
366155
|
isActive: true,
|
|
366136
366156
|
...buildTokenPersistUpdates(instance4.channel, body)
|
|
366137
366157
|
};
|
|
366138
|
-
if (instance4.channel
|
|
366139
|
-
return
|
|
366140
|
-
|
|
366141
|
-
|
|
366142
|
-
|
|
366143
|
-
|
|
366144
|
-
|
|
366145
|
-
|
|
366146
|
-
|
|
366147
|
-
|
|
366148
|
-
}
|
|
366158
|
+
if (instance4.channel === "twilio-whatsapp") {
|
|
366159
|
+
return {
|
|
366160
|
+
...updates,
|
|
366161
|
+
twilioAccountSid: body.twilioAccountSid ?? instance4.twilioAccountSid,
|
|
366162
|
+
twilioFrom: body.twilioFrom ?? instance4.twilioFrom,
|
|
366163
|
+
twilioMessagingServiceSid: body.twilioMessagingServiceSid ?? instance4.twilioMessagingServiceSid,
|
|
366164
|
+
twilioStatusCallbackUrl: body.twilioStatusCallbackUrl ?? instance4.twilioStatusCallbackUrl,
|
|
366165
|
+
twilioWebhookUrl: body.twilioWebhookUrl ?? instance4.twilioWebhookUrl,
|
|
366166
|
+
twilioValidateSignature: body.twilioValidateSignature ?? instance4.twilioValidateSignature
|
|
366167
|
+
};
|
|
366168
|
+
}
|
|
366169
|
+
if (instance4.channel === "hermes") {
|
|
366170
|
+
return {
|
|
366171
|
+
...updates,
|
|
366172
|
+
hermesBaseUrl: body.hermesBaseUrl ?? instance4.hermesBaseUrl,
|
|
366173
|
+
hermesUsername: body.hermesUsername ?? instance4.hermesUsername,
|
|
366174
|
+
hermesPassword: body.hermesPassword ?? instance4.hermesPassword,
|
|
366175
|
+
hermesMediaId: body.hermesMediaId ?? instance4.hermesMediaId,
|
|
366176
|
+
hermesTemplateNamespace: body.hermesTemplateNamespace ?? instance4.hermesTemplateNamespace
|
|
366177
|
+
};
|
|
366178
|
+
}
|
|
366179
|
+
return updates;
|
|
366149
366180
|
}
|
|
366150
366181
|
async function validateMessageSyncPreconditions(services, instanceId, channel5, type, chatJids) {
|
|
366151
366182
|
if (chatJids?.length && !channel5.startsWith("whatsapp")) {
|
|
@@ -366324,6 +366355,11 @@ var init_instances3 = __esm(() => {
|
|
|
366324
366355
|
twilioStatusCallbackUrl: exports_external.string().optional().nullable().describe("Twilio outbound status callback URL"),
|
|
366325
366356
|
twilioWebhookUrl: exports_external.string().optional().nullable().describe("Public Twilio inbound webhook URL for signature validation"),
|
|
366326
366357
|
twilioValidateSignature: exports_external.boolean().default(true).describe("Validate X-Twilio-Signature on webhooks"),
|
|
366358
|
+
hermesBaseUrl: exports_external.string().optional().nullable().describe("Hermes API base URL (e.g. https://waap-api.h3rmes.com)"),
|
|
366359
|
+
hermesUsername: exports_external.string().optional().nullable().describe("Hermes account username"),
|
|
366360
|
+
hermesPassword: exports_external.string().optional().nullable().describe("Hermes account password"),
|
|
366361
|
+
hermesMediaId: exports_external.string().optional().nullable().describe("Hermes line UUID (media_id) \u2014 required on every send"),
|
|
366362
|
+
hermesTemplateNamespace: exports_external.string().optional().nullable().describe("Meta template namespace for HSM sends"),
|
|
366327
366363
|
readReceipts: exports_external.enum(["on", "off", "exclude-self"]).default("on").describe("Read receipt mode: on (default), off, or exclude-self (skip receipts for the instance own number)"),
|
|
366328
366364
|
groupHistorySize: exports_external.number().int().min(0).max(200).default(50).describe("Number of context messages to include when dispatching to agent. Groups use the full value; DMs are capped at 20. (0 = disabled, max 200)"),
|
|
366329
366365
|
markOnlineOnConnect: exports_external.boolean().default(true).describe("Mark the instance as online when connecting to WhatsApp (default: true). Set to false to preserve phone push notifications."),
|
|
@@ -366381,7 +366417,8 @@ var init_instances3 = __esm(() => {
|
|
|
366381
366417
|
"slackSigningSecret",
|
|
366382
366418
|
"gupshupAuthToken",
|
|
366383
366419
|
"webhookVerifyToken",
|
|
366384
|
-
"twilioAuthToken"
|
|
366420
|
+
"twilioAuthToken",
|
|
366421
|
+
"hermesPassword"
|
|
366385
366422
|
];
|
|
366386
366423
|
instancesRoutes.get("/", zValidator("query", listQuerySchema12), async (c) => {
|
|
366387
366424
|
const { channel: channel5, status, limit: limit2, cursor } = c.req.valid("query");
|
|
@@ -366479,7 +366516,12 @@ var init_instances3 = __esm(() => {
|
|
|
366479
366516
|
twilioMessagingServiceSid: instance4.twilioMessagingServiceSid,
|
|
366480
366517
|
twilioStatusCallbackUrl: instance4.twilioStatusCallbackUrl,
|
|
366481
366518
|
twilioWebhookUrl: instance4.twilioWebhookUrl,
|
|
366482
|
-
twilioValidateSignature: instance4.twilioValidateSignature
|
|
366519
|
+
twilioValidateSignature: instance4.twilioValidateSignature,
|
|
366520
|
+
hermesBaseUrl: instance4.hermesBaseUrl,
|
|
366521
|
+
hermesUsername: instance4.hermesUsername,
|
|
366522
|
+
hermesPassword: instance4.hermesPassword,
|
|
366523
|
+
hermesMediaId: instance4.hermesMediaId,
|
|
366524
|
+
hermesTemplateNamespace: instance4.hermesTemplateNamespace
|
|
366483
366525
|
});
|
|
366484
366526
|
const createPlugin = getPluginFromRegistry(channelRegistry2, data.channel);
|
|
366485
366527
|
if (createPlugin && "loadGuildConfigs" in createPlugin && instance4.guildConfigOverrides) {
|
|
@@ -366658,6 +366700,11 @@ var init_instances3 = __esm(() => {
|
|
|
366658
366700
|
twilioStatusCallbackUrl: exports_external.string().optional().describe("Twilio outbound status callback URL"),
|
|
366659
366701
|
twilioWebhookUrl: exports_external.string().optional().describe("Public Twilio inbound webhook URL for signature validation"),
|
|
366660
366702
|
twilioValidateSignature: exports_external.boolean().optional().describe("Validate X-Twilio-Signature on webhooks"),
|
|
366703
|
+
hermesBaseUrl: exports_external.string().optional().describe("Hermes API base URL"),
|
|
366704
|
+
hermesUsername: exports_external.string().optional().describe("Hermes account username"),
|
|
366705
|
+
hermesPassword: exports_external.string().optional().describe("Hermes account password"),
|
|
366706
|
+
hermesMediaId: exports_external.string().optional().describe("Hermes line UUID (media_id)"),
|
|
366707
|
+
hermesTemplateNamespace: exports_external.string().optional().describe("Meta template namespace for HSM sends"),
|
|
366661
366708
|
whatsapp: exports_external.object({
|
|
366662
366709
|
syncFullHistory: exports_external.boolean().optional().describe("Sync full message history on connect (default: true)")
|
|
366663
366710
|
}).optional().describe("WhatsApp-specific connection options")
|
|
@@ -366753,6 +366800,9 @@ var init_instances3 = __esm(() => {
|
|
|
366753
366800
|
restartOptions.twilioWebhookUrl = instance4.twilioWebhookUrl;
|
|
366754
366801
|
restartOptions.twilioValidateSignature = instance4.twilioValidateSignature;
|
|
366755
366802
|
}
|
|
366803
|
+
if (instance4.channel === "hermes") {
|
|
366804
|
+
applyHermesConnectionOptions(restartOptions, instance4);
|
|
366805
|
+
}
|
|
366756
366806
|
if (instance4.channel === "whatsapp-baileys" && instance4.markOnlineOnConnect != null) {
|
|
366757
366807
|
restartOptions.whatsapp = {
|
|
366758
366808
|
...restartOptions.whatsapp,
|
|
@@ -376143,8 +376193,23 @@ function buildInstanceConnectOptions(instance4) {
|
|
|
376143
376193
|
if (instance4.channel === "whatsapp-business") {
|
|
376144
376194
|
applyWhatsAppBusinessOptions(options, instance4);
|
|
376145
376195
|
}
|
|
376196
|
+
if (instance4.channel === "hermes") {
|
|
376197
|
+
applyHermesOptions(options, instance4);
|
|
376198
|
+
}
|
|
376146
376199
|
return options;
|
|
376147
376200
|
}
|
|
376201
|
+
function applyHermesOptions(options, instance4) {
|
|
376202
|
+
if (instance4.hermesBaseUrl)
|
|
376203
|
+
options.hermesBaseUrl = instance4.hermesBaseUrl;
|
|
376204
|
+
if (instance4.hermesUsername)
|
|
376205
|
+
options.hermesUsername = instance4.hermesUsername;
|
|
376206
|
+
if (instance4.hermesPassword)
|
|
376207
|
+
options.hermesPassword = instance4.hermesPassword;
|
|
376208
|
+
if (instance4.hermesMediaId)
|
|
376209
|
+
options.hermesMediaId = instance4.hermesMediaId;
|
|
376210
|
+
if (instance4.hermesTemplateNamespace)
|
|
376211
|
+
options.hermesTemplateNamespace = instance4.hermesTemplateNamespace;
|
|
376212
|
+
}
|
|
376148
376213
|
function applyWhatsAppBusinessOptions(options, instance4) {
|
|
376149
376214
|
if (instance4.metaAccessToken)
|
|
376150
376215
|
options.metaAccessToken = instance4.metaAccessToken;
|