@automagik/omni 2.260730.1 → 2.260730.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.
@@ -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
@@ -32290,7 +32290,8 @@ var init_whatsapp_cloud = __esm(() => {
32290
32290
  sha256: exports_external.string().optional(),
32291
32291
  caption: exports_external.string().optional(),
32292
32292
  filename: exports_external.string().optional(),
32293
- voice: exports_external.boolean().optional()
32293
+ voice: exports_external.boolean().optional(),
32294
+ file: exports_external.string().optional()
32294
32295
  });
32295
32296
  MetaInboundTextMessageSchema = exports_external.object({
32296
32297
  type: exports_external.literal("text"),
@@ -32491,6 +32492,24 @@ var init_whatsapp_cloud = __esm(() => {
32491
32492
  });
32492
32493
  });
32493
32494
 
32495
+ // ../core/src/schemas/hermes.ts
32496
+ var HermesContactSchema, HermesWebhookPayloadSchema;
32497
+ var init_hermes = __esm(() => {
32498
+ init_zod();
32499
+ init_whatsapp_cloud();
32500
+ HermesContactSchema = exports_external.object({
32501
+ profile: exports_external.object({ name: exports_external.string().optional() }).optional(),
32502
+ wa_id: exports_external.string().optional()
32503
+ });
32504
+ HermesWebhookPayloadSchema = exports_external.object({
32505
+ media_id: exports_external.string(),
32506
+ message_type: exports_external.string().optional(),
32507
+ contacts: exports_external.array(HermesContactSchema).optional(),
32508
+ messages: exports_external.array(MetaInboundMessageSchema).optional(),
32509
+ statuses: exports_external.array(MetaWebhookStatusEntrySchema).optional()
32510
+ });
32511
+ });
32512
+
32494
32513
  // ../core/src/schemas/index.ts
32495
32514
  var init_schemas = __esm(() => {
32496
32515
  init_agent2();
@@ -32505,6 +32524,7 @@ var init_schemas = __esm(() => {
32505
32524
  init_message();
32506
32525
  init_person();
32507
32526
  init_whatsapp_cloud();
32527
+ init_hermes();
32508
32528
  });
32509
32529
 
32510
32530
  // ../core/src/types/channel.ts
@@ -32518,6 +32538,7 @@ var init_channel = __esm(() => {
32518
32538
  "telegram",
32519
32539
  "a2a",
32520
32540
  "gupshup",
32541
+ "hermes",
32521
32542
  "twilio-whatsapp",
32522
32543
  "internal"
32523
32544
  ];
@@ -38641,6 +38662,7 @@ var init_capabilities = __esm(() => {
38641
38662
  MESSAGING_WINDOW_MS = 24 * 60 * 60 * 1000;
38642
38663
  CHANNELS_WITH_MESSAGING_WINDOW = new Set([
38643
38664
  "whatsapp-cloud",
38665
+ "hermes",
38644
38666
  "twilio-whatsapp"
38645
38667
  ]);
38646
38668
  CHANNELS_WITH_TYPING_INDICATOR = new Set([
@@ -67251,6 +67273,8 @@ __export(exports_src, {
67251
67273
  ID_PREFIXES: () => ID_PREFIXES,
67252
67274
  HookRegistry: () => HookRegistry,
67253
67275
  HookContextSchemas: () => HookContextSchemas,
67276
+ HermesWebhookPayloadSchema: () => HermesWebhookPayloadSchema,
67277
+ HermesContactSchema: () => HermesContactSchema,
67254
67278
  HOOK_EVENTS: () => HOOK_EVENTS,
67255
67279
  GuildConfigOverridesSchema: () => GuildConfigOverridesSchema,
67256
67280
  GuildConfigOverrideSchema: () => GuildConfigOverrideSchema,
@@ -72771,6 +72795,7 @@ var init_schema2 = __esm(() => {
72771
72795
  "telegram",
72772
72796
  "a2a",
72773
72797
  "gupshup",
72798
+ "hermes",
72774
72799
  "twilio-whatsapp",
72775
72800
  "internal"
72776
72801
  ];
@@ -73067,6 +73092,11 @@ var init_schema2 = __esm(() => {
73067
73092
  metaConnectionMethod: varchar("meta_connection_method", { length: 32 }).default("manual"),
73068
73093
  metaDisplayPhoneNumber: varchar("meta_display_phone_number", { length: 32 }),
73069
73094
  metaConnectedAt: timestamp("meta_connected_at", { withTimezone: true }),
73095
+ hermesBaseUrl: text("hermes_base_url"),
73096
+ hermesUsername: varchar("hermes_username", { length: 255 }),
73097
+ hermesPassword: text("hermes_password"),
73098
+ hermesMediaId: varchar("hermes_media_id", { length: 64 }),
73099
+ hermesTemplateNamespace: varchar("hermes_template_namespace", { length: 128 }),
73070
73100
  agentId: uuid("agent_id").references(() => agents.id, { onDelete: "set null" }),
73071
73101
  agentTimeout: integer("agent_timeout").notNull().default(600),
73072
73102
  agentStreamMode: boolean("agent_stream_mode").notNull().default(false),
@@ -127652,7 +127682,7 @@ import { fileURLToPath } from "url";
127652
127682
  // package.json
127653
127683
  var package_default = {
127654
127684
  name: "@automagik/omni",
127655
- version: "2.260730.1",
127685
+ version: "2.260730.2",
127656
127686
  description: "LLM-optimized CLI for Omni",
127657
127687
  type: "module",
127658
127688
  bin: {
@@ -127690,6 +127720,7 @@ var package_default = {
127690
127720
  },
127691
127721
  dependencies: {
127692
127722
  "@anthropic-ai/claude-agent-sdk": "^0.2.62",
127723
+ "@omni/channel-hermes": "workspace:*",
127693
127724
  "@sentry/bun": "^10.43.0",
127694
127725
  "@snazzah/davey": "^0.1.11",
127695
127726
  chalk: "^5.4.0",