@automagik/omni 2.260730.1 → 2.260730.3

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.
@@ -0,0 +1,27 @@
1
+ -- Hermes (Mutant WhatsApp gateway) channel — per-instance configuration.
2
+ --
3
+ -- Adds the five instance columns the `@omni/channel-hermes` plugin reads:
4
+ -- * hermes_base_url — customer-specific API host
5
+ -- * hermes_username/password — sign_in credentials (JWT auth)
6
+ -- * hermes_media_id — Hermes UUID of the WhatsApp line; the
7
+ -- webhook -> instance resolution key
8
+ -- * hermes_template_namespace — Meta template namespace for HSM sends
9
+ --
10
+ -- Hand-written following the 0042_whatsapp_cloud_channel precedent (additive,
11
+ -- idempotent, no rewrite: ADD COLUMN with no default does not rewrite the
12
+ -- table, and the partial index build is small on `instances`).
13
+
14
+ -- NOTE: no explicit BEGIN/COMMIT — the boot migrator executes this file on a
15
+ -- pooled postgres-js connection, which rejects raw transaction control
16
+ -- (UNSAFE_TRANSACTION). Single batch, idempotent statements.
17
+
18
+ ALTER TABLE "instances"
19
+ ADD COLUMN IF NOT EXISTS "hermes_base_url" text,
20
+ ADD COLUMN IF NOT EXISTS "hermes_username" varchar(255),
21
+ ADD COLUMN IF NOT EXISTS "hermes_password" text,
22
+ ADD COLUMN IF NOT EXISTS "hermes_media_id" varchar(64),
23
+ ADD COLUMN IF NOT EXISTS "hermes_template_namespace" varchar(128);
24
+
25
+ CREATE INDEX IF NOT EXISTS "instances_hermes_media_idx"
26
+ ON "instances" ("hermes_media_id");
27
+
@@ -302,6 +302,13 @@
302
302
  "when": 1784200000000,
303
303
  "tag": "0042_whatsapp_cloud_channel",
304
304
  "breakpoints": true
305
+ },
306
+ {
307
+ "idx": 43,
308
+ "version": "7",
309
+ "when": 1784300000000,
310
+ "tag": "0043_hermes_channel",
311
+ "breakpoints": true
305
312
  }
306
313
  ]
307
314
  }
package/dist/index.js CHANGED
@@ -31479,6 +31479,49 @@ var init_agent = __esm(() => {
31479
31479
  JOB_STATUSES = ["pending", "running", "completed", "failed", "cancelled"];
31480
31480
  });
31481
31481
 
31482
+ // ../core/src/types/channel.ts
31483
+ var CHANNEL_TYPES, CONTENT_TYPES, DEBOUNCE_MODES, SPLIT_DELAY_MODES, RULE_TYPES;
31484
+ var init_channel = __esm(() => {
31485
+ CHANNEL_TYPES = [
31486
+ "whatsapp-baileys",
31487
+ "whatsapp-cloud",
31488
+ "discord",
31489
+ "slack",
31490
+ "telegram",
31491
+ "a2a",
31492
+ "gupshup",
31493
+ "hermes",
31494
+ "twilio-whatsapp",
31495
+ "internal"
31496
+ ];
31497
+ CONTENT_TYPES = [
31498
+ "text",
31499
+ "audio",
31500
+ "image",
31501
+ "video",
31502
+ "document",
31503
+ "sticker",
31504
+ "contact",
31505
+ "location",
31506
+ "reaction",
31507
+ "poll",
31508
+ "poll_update",
31509
+ "event",
31510
+ "live_location",
31511
+ "product",
31512
+ "pix",
31513
+ "template",
31514
+ "location_request",
31515
+ "flow",
31516
+ "edit",
31517
+ "delete",
31518
+ "unknown"
31519
+ ];
31520
+ DEBOUNCE_MODES = ["disabled", "fixed", "randomized"];
31521
+ SPLIT_DELAY_MODES = ["disabled", "fixed", "randomized"];
31522
+ RULE_TYPES = ["allow", "deny"];
31523
+ });
31524
+
31482
31525
  // ../core/src/schemas/common.ts
31483
31526
  var UuidSchema, TimestampSchema, IsoDateSchema, PhoneSchema, EmailSchema, UrlSchema, NonEmptyStringSchema, PaginationSchema, paginatedResponse = (itemSchema) => exports_external.object({
31484
31527
  items: exports_external.array(itemSchema),
@@ -31491,6 +31534,7 @@ var init_common = __esm(() => {
31491
31534
  init_zod();
31492
31535
  init_types2();
31493
31536
  init_agent();
31537
+ init_channel();
31494
31538
  UuidSchema = exports_external.string().uuid();
31495
31539
  TimestampSchema = exports_external.number().int().positive();
31496
31540
  IsoDateSchema = exports_external.string().datetime();
@@ -31503,28 +31547,8 @@ var init_common = __esm(() => {
31503
31547
  offset: exports_external.number().int().min(0).default(0)
31504
31548
  });
31505
31549
  MetadataSchema = exports_external.record(exports_external.string(), exports_external.unknown());
31506
- ChannelTypeSchema = exports_external.enum([
31507
- "whatsapp-baileys",
31508
- "whatsapp-cloud",
31509
- "discord",
31510
- "slack",
31511
- "telegram",
31512
- "a2a",
31513
- "gupshup",
31514
- "twilio-whatsapp",
31515
- "internal"
31516
- ]);
31517
- ContentTypeSchema = exports_external.enum([
31518
- "text",
31519
- "audio",
31520
- "image",
31521
- "video",
31522
- "document",
31523
- "sticker",
31524
- "contact",
31525
- "location",
31526
- "reaction"
31527
- ]);
31550
+ ChannelTypeSchema = exports_external.enum(CHANNEL_TYPES);
31551
+ ContentTypeSchema = exports_external.enum(CONTENT_TYPES);
31528
31552
  EventTypeSchema = exports_external.enum(CORE_EVENT_TYPES);
31529
31553
  JobStatusSchema = exports_external.enum(["pending", "running", "completed", "failed", "cancelled"]);
31530
31554
  ProviderSchemaEnum = exports_external.enum(PROVIDER_SCHEMAS);
@@ -32290,7 +32314,8 @@ var init_whatsapp_cloud = __esm(() => {
32290
32314
  sha256: exports_external.string().optional(),
32291
32315
  caption: exports_external.string().optional(),
32292
32316
  filename: exports_external.string().optional(),
32293
- voice: exports_external.boolean().optional()
32317
+ voice: exports_external.boolean().optional(),
32318
+ file: exports_external.string().optional()
32294
32319
  });
32295
32320
  MetaInboundTextMessageSchema = exports_external.object({
32296
32321
  type: exports_external.literal("text"),
@@ -32491,6 +32516,24 @@ var init_whatsapp_cloud = __esm(() => {
32491
32516
  });
32492
32517
  });
32493
32518
 
32519
+ // ../core/src/schemas/hermes.ts
32520
+ var HermesContactSchema, HermesWebhookPayloadSchema;
32521
+ var init_hermes = __esm(() => {
32522
+ init_zod();
32523
+ init_whatsapp_cloud();
32524
+ HermesContactSchema = exports_external.object({
32525
+ profile: exports_external.object({ name: exports_external.string().optional() }).optional(),
32526
+ wa_id: exports_external.string().optional()
32527
+ });
32528
+ HermesWebhookPayloadSchema = exports_external.object({
32529
+ media_id: exports_external.string(),
32530
+ message_type: exports_external.string().optional(),
32531
+ contacts: exports_external.array(HermesContactSchema).optional(),
32532
+ messages: exports_external.array(MetaInboundMessageSchema).optional(),
32533
+ statuses: exports_external.array(MetaWebhookStatusEntrySchema).optional()
32534
+ });
32535
+ });
32536
+
32494
32537
  // ../core/src/schemas/index.ts
32495
32538
  var init_schemas = __esm(() => {
32496
32539
  init_agent2();
@@ -32505,48 +32548,7 @@ var init_schemas = __esm(() => {
32505
32548
  init_message();
32506
32549
  init_person();
32507
32550
  init_whatsapp_cloud();
32508
- });
32509
-
32510
- // ../core/src/types/channel.ts
32511
- var CHANNEL_TYPES, CONTENT_TYPES, DEBOUNCE_MODES, SPLIT_DELAY_MODES, RULE_TYPES;
32512
- var init_channel = __esm(() => {
32513
- CHANNEL_TYPES = [
32514
- "whatsapp-baileys",
32515
- "whatsapp-cloud",
32516
- "discord",
32517
- "slack",
32518
- "telegram",
32519
- "a2a",
32520
- "gupshup",
32521
- "twilio-whatsapp",
32522
- "internal"
32523
- ];
32524
- CONTENT_TYPES = [
32525
- "text",
32526
- "audio",
32527
- "image",
32528
- "video",
32529
- "document",
32530
- "sticker",
32531
- "contact",
32532
- "location",
32533
- "reaction",
32534
- "poll",
32535
- "poll_update",
32536
- "event",
32537
- "live_location",
32538
- "product",
32539
- "pix",
32540
- "template",
32541
- "location_request",
32542
- "flow",
32543
- "edit",
32544
- "delete",
32545
- "unknown"
32546
- ];
32547
- DEBOUNCE_MODES = ["disabled", "fixed", "randomized"];
32548
- SPLIT_DELAY_MODES = ["disabled", "fixed", "randomized"];
32549
- RULE_TYPES = ["allow", "deny"];
32551
+ init_hermes();
32550
32552
  });
32551
32553
 
32552
32554
  // ../core/src/types/whatsapp-cloud.ts
@@ -38641,6 +38643,7 @@ var init_capabilities = __esm(() => {
38641
38643
  MESSAGING_WINDOW_MS = 24 * 60 * 60 * 1000;
38642
38644
  CHANNELS_WITH_MESSAGING_WINDOW = new Set([
38643
38645
  "whatsapp-cloud",
38646
+ "hermes",
38644
38647
  "twilio-whatsapp"
38645
38648
  ]);
38646
38649
  CHANNELS_WITH_TYPING_INDICATOR = new Set([
@@ -67251,6 +67254,8 @@ __export(exports_src, {
67251
67254
  ID_PREFIXES: () => ID_PREFIXES,
67252
67255
  HookRegistry: () => HookRegistry,
67253
67256
  HookContextSchemas: () => HookContextSchemas,
67257
+ HermesWebhookPayloadSchema: () => HermesWebhookPayloadSchema,
67258
+ HermesContactSchema: () => HermesContactSchema,
67254
67259
  HOOK_EVENTS: () => HOOK_EVENTS,
67255
67260
  GuildConfigOverridesSchema: () => GuildConfigOverridesSchema,
67256
67261
  GuildConfigOverrideSchema: () => GuildConfigOverrideSchema,
@@ -72761,6 +72766,7 @@ __export(exports_schema, {
72761
72766
  var channelTypes, agentTypes, agentSystems, agentEntityTypes, debounceMode, splitDelayMode, supersedeMode, replyFilterMode, agentSessionStrategies, ruleTypes, accessModes, settingValueTypes, apiKeyStatuses, apiKeyProfiles, eventTypes, contentTypes, chatTypes, messageSources, messageTypes, messageStatuses, deliveryStatuses, jobStatuses, providerSchemas, agentProviders, agents, agentRoutes, agentSessions, apiKeys, apiKeyAuditLogs, apiKeysRelations, apiKeyAuditLogsRelations, instances, whatsappTemplates, persons, platformIdentities, conversations, chats, chatParticipants, omniGroups, messages2, omniEvents, handoffLogs, closeContactOutcomes, closeContactLogs, accessRules, globalSettings, settingChangeHistory, batchJobs, syncJobTypes, syncJobs, mediaContent, chatIdMappings, pluginStorage, agentProvidersRelations, agentsRelations, instancesRelations, syncJobsRelations, personsRelations, platformIdentitiesRelations, conversationsRelations, chatsRelations, chatParticipantsRelations, messagesRelations, omniEventsRelations, accessRulesRelations, globalSettingsRelations, settingChangeHistoryRelations, batchJobsRelations, mediaContentRelations, chatIdMappingsRelations, deadLetterStatuses, deadLetterEvents, payloadStorageConfig, payloadStages, eventPayloads, webhookSources, conditionOperators, actionTypes, automationDebounceModes, automations2, automationLogStatuses, automationLogs, consumerOffsets, automationsRelations, automationLogsRelations, triggerLogs, triggerLogsRelations, agentRoutesRelations, agentTaskStatuses, agentTasks, agentTasksRelations, turnStatuses, turnActions, turns, turnsRelations, followUpDisarmReasons, chatFollowUpState, chatFollowUpStateRelations, processedEvents, genieHosts, tenantStatuses, principalTypes, principalStatuses, tenantRoles, membershipStatuses, credentialClasses, authCredentialStatuses, platformApiKeyStatuses, tenants, principals, tenantMemberships, tenantRolePolicies, platformApiKeys, tenantKeyLineage, authCredentials, tenantAuditLogs, platformAuditLogs, platformProviderCatalog, tenantProviderConfig, platformSettings, tenantSettings, platformSettingChangeHistory, tenantSettingChangeHistory, platformPluginStorage, tenantPluginStorage, platformPayloadStorageConfig, tenantPayloadStorageOverrides, tenantMigrationLedger, tenantMigrationLedgerHistory;
72762
72767
  var init_schema2 = __esm(() => {
72763
72768
  init_events();
72769
+ init_types5();
72764
72770
  init_drizzle_orm();
72765
72771
  init_pg_core();
72766
72772
  channelTypes = [
@@ -72771,6 +72777,7 @@ var init_schema2 = __esm(() => {
72771
72777
  "telegram",
72772
72778
  "a2a",
72773
72779
  "gupshup",
72780
+ "hermes",
72774
72781
  "twilio-whatsapp",
72775
72782
  "internal"
72776
72783
  ];
@@ -72797,17 +72804,7 @@ var init_schema2 = __esm(() => {
72797
72804
  "console-admin"
72798
72805
  ];
72799
72806
  eventTypes = CORE_EVENT_TYPES;
72800
- contentTypes = [
72801
- "text",
72802
- "audio",
72803
- "image",
72804
- "video",
72805
- "document",
72806
- "sticker",
72807
- "contact",
72808
- "location",
72809
- "reaction"
72810
- ];
72807
+ contentTypes = CONTENT_TYPES;
72811
72808
  chatTypes = [
72812
72809
  "dm",
72813
72810
  "group",
@@ -73067,6 +73064,11 @@ var init_schema2 = __esm(() => {
73067
73064
  metaConnectionMethod: varchar("meta_connection_method", { length: 32 }).default("manual"),
73068
73065
  metaDisplayPhoneNumber: varchar("meta_display_phone_number", { length: 32 }),
73069
73066
  metaConnectedAt: timestamp("meta_connected_at", { withTimezone: true }),
73067
+ hermesBaseUrl: text("hermes_base_url"),
73068
+ hermesUsername: varchar("hermes_username", { length: 255 }),
73069
+ hermesPassword: text("hermes_password"),
73070
+ hermesMediaId: varchar("hermes_media_id", { length: 64 }),
73071
+ hermesTemplateNamespace: varchar("hermes_template_namespace", { length: 128 }),
73070
73072
  agentId: uuid("agent_id").references(() => agents.id, { onDelete: "set null" }),
73071
73073
  agentTimeout: integer("agent_timeout").notNull().default(600),
73072
73074
  agentStreamMode: boolean("agent_stream_mode").notNull().default(false),
@@ -127652,7 +127654,7 @@ import { fileURLToPath } from "url";
127652
127654
  // package.json
127653
127655
  var package_default = {
127654
127656
  name: "@automagik/omni",
127655
- version: "2.260730.1",
127657
+ version: "2.260730.3",
127656
127658
  description: "LLM-optimized CLI for Omni",
127657
127659
  type: "module",
127658
127660
  bin: {
@@ -127690,6 +127692,7 @@ var package_default = {
127690
127692
  },
127691
127693
  dependencies: {
127692
127694
  "@anthropic-ai/claude-agent-sdk": "^0.2.62",
127695
+ "@omni/channel-hermes": "workspace:*",
127693
127696
  "@sentry/bun": "^10.43.0",
127694
127697
  "@snazzah/davey": "^0.1.11",
127695
127698
  chalk: "^5.4.0",