@automagik/omni 2.260502.2 → 2.260503.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 CHANGED
@@ -58865,11 +58865,11 @@ var init_schema2 = __esm(() => {
58865
58865
  description: text("description"),
58866
58866
  tags: text("tags").array(),
58867
58867
  isActive: boolean("is_active").notNull().default(true),
58868
- lastHealthCheck: timestamp("last_health_check"),
58868
+ lastHealthCheck: timestamp("last_health_check", { withTimezone: true }),
58869
58869
  lastHealthStatus: varchar("last_health_status", { length: 20 }),
58870
58870
  lastHealthError: text("last_health_error"),
58871
- createdAt: timestamp("created_at").notNull().defaultNow(),
58872
- updatedAt: timestamp("updated_at").notNull().defaultNow()
58871
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
58872
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
58873
58873
  }, (table3) => ({
58874
58874
  nameIdx: index("agent_providers_name_idx").on(table3.name),
58875
58875
  schemaIdx: index("agent_providers_schema_idx").on(table3.schema),
@@ -58890,8 +58890,8 @@ var init_schema2 = __esm(() => {
58890
58890
  metadata: jsonb("metadata").$type(),
58891
58891
  agentCard: jsonb("agent_card").$type(),
58892
58892
  followUpConfig: jsonb("follow_up_config").$type(),
58893
- createdAt: timestamp("created_at").notNull().defaultNow(),
58894
- updatedAt: timestamp("updated_at").notNull().defaultNow()
58893
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
58894
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
58895
58895
  }, (table3) => ({
58896
58896
  nameIdx: index("agents_name_idx").on(table3.name),
58897
58897
  ownerIdx: index("agents_owner_idx").on(table3.ownerId),
@@ -58933,8 +58933,8 @@ var init_schema2 = __esm(() => {
58933
58933
  label: varchar("label", { length: 255 }),
58934
58934
  priority: integer("priority").notNull().default(0),
58935
58935
  isActive: boolean("is_active").notNull().default(true),
58936
- createdAt: timestamp("created_at").notNull().defaultNow(),
58937
- updatedAt: timestamp("updated_at").notNull().defaultNow()
58936
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
58937
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
58938
58938
  }, (table3) => ({
58939
58939
  scopeCheck: check("scope_check", sql`(scope = 'chat' AND chat_id IS NOT NULL AND person_id IS NULL) OR (scope = 'user' AND person_id IS NOT NULL AND chat_id IS NULL)`),
58940
58940
  uniqueChatRoute: uniqueIndex("agent_routes_unique_chat_route").on(table3.instanceId, table3.chatId),
@@ -58950,10 +58950,10 @@ var init_schema2 = __esm(() => {
58950
58950
  instanceId: uuid("instance_id").notNull().references(() => instances.id, { onDelete: "cascade" }),
58951
58951
  sessionKey: varchar("session_key", { length: 512 }).notNull(),
58952
58952
  providerSessionData: jsonb("provider_session_data").notNull().$type(),
58953
- lastUsedAt: timestamp("last_used_at").notNull().defaultNow(),
58954
- expiresAt: timestamp("expires_at"),
58955
- createdAt: timestamp("created_at").notNull().defaultNow(),
58956
- updatedAt: timestamp("updated_at").notNull().defaultNow()
58953
+ lastUsedAt: timestamp("last_used_at", { withTimezone: true }).notNull().defaultNow(),
58954
+ expiresAt: timestamp("expires_at", { withTimezone: true }),
58955
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
58956
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
58957
58957
  }, (table3) => ({
58958
58958
  uniqueSession: uniqueIndex("agent_sessions_instance_key_idx").on(table3.instanceId, table3.sessionKey),
58959
58959
  expiresIdx: index("agent_sessions_expires_idx").on(table3.expiresAt),
@@ -58974,21 +58974,21 @@ var init_schema2 = __esm(() => {
58974
58974
  instanceIds: uuid("instance_ids").array(),
58975
58975
  status: varchar("status", { length: 20 }).notNull().default("active").$type(),
58976
58976
  rateLimit: integer("rate_limit"),
58977
- expiresAt: timestamp("expires_at"),
58978
- lastUsedAt: timestamp("last_used_at"),
58977
+ expiresAt: timestamp("expires_at", { withTimezone: true }),
58978
+ lastUsedAt: timestamp("last_used_at", { withTimezone: true }),
58979
58979
  lastUsedIp: varchar("last_used_ip", { length: 45 }),
58980
58980
  usageCount: integer("usage_count").notNull().default(0),
58981
- revokedAt: timestamp("revoked_at"),
58981
+ revokedAt: timestamp("revoked_at", { withTimezone: true }),
58982
58982
  revokedBy: varchar("revoked_by", { length: 255 }),
58983
58983
  revokeReason: text("revoke_reason"),
58984
58984
  activeInstanceId: uuid("active_instance_id"),
58985
58985
  contextInstanceId: uuid("context_instance_id"),
58986
58986
  contextChatId: uuid("context_chat_id"),
58987
58987
  contextMessageId: uuid("context_message_id"),
58988
- contextUpdatedAt: timestamp("context_updated_at"),
58989
- createdAt: timestamp("created_at").notNull().defaultNow(),
58988
+ contextUpdatedAt: timestamp("context_updated_at", { withTimezone: true }),
58989
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
58990
58990
  createdBy: varchar("created_by", { length: 255 }),
58991
- updatedAt: timestamp("updated_at").notNull().defaultNow()
58991
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
58992
58992
  }, (table3) => ({
58993
58993
  keyPrefixIdx: index("api_keys_key_prefix_idx").on(table3.keyPrefix),
58994
58994
  keyHashIdx: uniqueIndex("api_keys_key_hash_idx").on(table3.keyHash),
@@ -59004,7 +59004,7 @@ var init_schema2 = __esm(() => {
59004
59004
  ipAddress: varchar("ip_address", { length: 45 }),
59005
59005
  userAgent: text("user_agent"),
59006
59006
  responseTimeMs: integer("response_time_ms"),
59007
- timestamp: timestamp("timestamp").notNull().defaultNow()
59007
+ timestamp: timestamp("timestamp", { withTimezone: true }).notNull().defaultNow()
59008
59008
  }, (table3) => ({
59009
59009
  apiKeyIdx: index("api_key_audit_logs_api_key_idx").on(table3.apiKeyId),
59010
59010
  timestampIdx: index("api_key_audit_logs_timestamp_idx").on(table3.timestamp),
@@ -59059,7 +59059,7 @@ var init_schema2 = __esm(() => {
59059
59059
  profilePicUrl: text("profile_pic_url"),
59060
59060
  profileBio: text("profile_bio"),
59061
59061
  profileMetadata: jsonb("profile_metadata").$type(),
59062
- profileSyncedAt: timestamp("profile_synced_at"),
59062
+ profileSyncedAt: timestamp("profile_synced_at", { withTimezone: true }),
59063
59063
  ownerIdentifier: varchar("owner_identifier", { length: 255 }),
59064
59064
  downloadMediaOnSync: boolean("download_media_on_sync").notNull().default(false),
59065
59065
  isDefault: boolean("is_default").notNull().default(false),
@@ -59098,9 +59098,9 @@ var init_schema2 = __esm(() => {
59098
59098
  readReceipts: varchar("read_receipts", { length: 20 }).notNull().default("on").$type(),
59099
59099
  markOnlineOnConnect: boolean("mark_online_on_connect").notNull().default(true),
59100
59100
  groupHistorySize: integer("group_history_size").notNull().default(50),
59101
- lastMessageAt: timestamp("last_message_at"),
59101
+ lastMessageAt: timestamp("last_message_at", { withTimezone: true }),
59102
59102
  replayEnabled: boolean("replay_enabled").notNull().default(true),
59103
- lastSeenAt: timestamp("last_seen_at"),
59103
+ lastSeenAt: timestamp("last_seen_at", { withTimezone: true }),
59104
59104
  agentStalledTimeoutMs: integer("agent_stalled_timeout_ms").notNull().default(600000),
59105
59105
  agentChainToInstanceId: uuid("agent_chain_to_instance_id").references(() => instances.id, {
59106
59106
  onDelete: "set null"
@@ -59109,8 +59109,8 @@ var init_schema2 = __esm(() => {
59109
59109
  followUpConfig: jsonb("follow_up_config").$type(),
59110
59110
  bridgeTmuxSession: text("bridge_tmux_session"),
59111
59111
  requireGenieSignature: boolean("require_genie_signature").notNull().default(false),
59112
- createdAt: timestamp("created_at").notNull().defaultNow(),
59113
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59112
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59113
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59114
59114
  }, (table3) => ({
59115
59115
  nameIdx: uniqueIndex("instances_name_idx").on(table3.name),
59116
59116
  channelIdx: index("instances_channel_idx").on(table3.channel),
@@ -59126,8 +59126,8 @@ var init_schema2 = __esm(() => {
59126
59126
  primaryEmail: varchar("primary_email", { length: 255 }),
59127
59127
  avatarUrl: text("avatar_url"),
59128
59128
  metadata: jsonb("metadata").$type(),
59129
- createdAt: timestamp("created_at").notNull().defaultNow(),
59130
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59129
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59130
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59131
59131
  }, (table3) => ({
59132
59132
  phoneIdx: uniqueIndex("persons_phone_idx").on(table3.primaryPhone),
59133
59133
  emailIdx: index("persons_email_idx").on(table3.primaryEmail),
@@ -59144,13 +59144,13 @@ var init_schema2 = __esm(() => {
59144
59144
  profilePicUrl: text("profile_pic_url"),
59145
59145
  profileData: jsonb("profile_data").$type(),
59146
59146
  messageCount: integer("message_count").notNull().default(0),
59147
- lastSeenAt: timestamp("last_seen_at"),
59148
- firstSeenAt: timestamp("first_seen_at").notNull().defaultNow(),
59147
+ lastSeenAt: timestamp("last_seen_at", { withTimezone: true }),
59148
+ firstSeenAt: timestamp("first_seen_at", { withTimezone: true }).notNull().defaultNow(),
59149
59149
  linkedBy: varchar("linked_by", { length: 50 }),
59150
59150
  confidence: integer("confidence").notNull().default(100),
59151
59151
  linkReason: text("link_reason"),
59152
- createdAt: timestamp("created_at").notNull().defaultNow(),
59153
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59152
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59153
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59154
59154
  }, (table3) => ({
59155
59155
  personIdx: index("platform_identities_person_idx").on(table3.personId),
59156
59156
  agentIdx: index("platform_identities_agent_idx").on(table3.agentId),
@@ -59165,8 +59165,8 @@ var init_schema2 = __esm(() => {
59165
59165
  title: varchar("title", { length: 500 }),
59166
59166
  summary: text("summary"),
59167
59167
  state: jsonb("state").$type(),
59168
- createdAt: timestamp("created_at").notNull().defaultNow(),
59169
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59168
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59169
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59170
59170
  }, (table3) => ({
59171
59171
  createdAtIdx: index("conversations_created_at_idx").on(table3.createdAt),
59172
59172
  updatedAtIdx: index("conversations_updated_at_idx").on(table3.updatedAt)
@@ -59185,7 +59185,7 @@ var init_schema2 = __esm(() => {
59185
59185
  participantCount: integer("participant_count").notNull().default(0),
59186
59186
  messageCount: integer("message_count").notNull().default(0),
59187
59187
  unreadCount: integer("unread_count").notNull().default(0),
59188
- lastMessageAt: timestamp("last_message_at"),
59188
+ lastMessageAt: timestamp("last_message_at", { withTimezone: true }),
59189
59189
  lastMessagePreview: text("last_message_preview"),
59190
59190
  lastMessageFromMe: boolean("last_message_from_me"),
59191
59191
  visibility: varchar("visibility", { length: 20 }).notNull().default("visible"),
@@ -59193,10 +59193,10 @@ var init_schema2 = __esm(() => {
59193
59193
  settings: jsonb("settings").$type(),
59194
59194
  platformMetadata: jsonb("platform_metadata").$type(),
59195
59195
  conversationId: uuid("conversation_id").references(() => conversations.id, { onDelete: "set null" }),
59196
- createdAt: timestamp("created_at").notNull().defaultNow(),
59197
- updatedAt: timestamp("updated_at").notNull().defaultNow(),
59198
- archivedAt: timestamp("archived_at"),
59199
- deletedAt: timestamp("deleted_at")
59196
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59197
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
59198
+ archivedAt: timestamp("archived_at", { withTimezone: true }),
59199
+ deletedAt: timestamp("deleted_at", { withTimezone: true })
59200
59200
  }, (table3) => ({
59201
59201
  instanceExternalIdx: uniqueIndex("chats_instance_external_idx").on(table3.instanceId, table3.externalId),
59202
59202
  canonicalIdIdx: index("chats_canonical_id_idx").on(table3.canonicalId),
@@ -59217,13 +59217,13 @@ var init_schema2 = __esm(() => {
59217
59217
  avatarUrl: text("avatar_url"),
59218
59218
  role: varchar("role", { length: 50 }),
59219
59219
  isActive: boolean("is_active").notNull().default(true),
59220
- joinedAt: timestamp("joined_at").notNull().defaultNow(),
59221
- leftAt: timestamp("left_at"),
59222
- lastSeenAt: timestamp("last_seen_at"),
59220
+ joinedAt: timestamp("joined_at", { withTimezone: true }).notNull().defaultNow(),
59221
+ leftAt: timestamp("left_at", { withTimezone: true }),
59222
+ lastSeenAt: timestamp("last_seen_at", { withTimezone: true }),
59223
59223
  messageCount: integer("message_count").notNull().default(0),
59224
59224
  platformMetadata: jsonb("platform_metadata").$type(),
59225
- createdAt: timestamp("created_at").notNull().defaultNow(),
59226
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59225
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59226
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59227
59227
  }, (table3) => ({
59228
59228
  chatUserIdx: uniqueIndex("chat_participants_chat_user_idx").on(table3.chatId, table3.platformUserId),
59229
59229
  chatIdx: index("chat_participants_chat_idx").on(table3.chatId),
@@ -59245,9 +59245,9 @@ var init_schema2 = __esm(() => {
59245
59245
  isReadOnly: boolean("is_read_only").notNull().default(false),
59246
59246
  isCommunity: boolean("is_community").notNull().default(false),
59247
59247
  platformMetadata: jsonb("platform_metadata").$type(),
59248
- syncedAt: timestamp("synced_at").notNull().defaultNow(),
59249
- createdAt: timestamp("created_at").notNull().defaultNow(),
59250
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59248
+ syncedAt: timestamp("synced_at", { withTimezone: true }).notNull().defaultNow(),
59249
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59250
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59251
59251
  }, (table3) => ({
59252
59252
  instanceExternalIdx: uniqueIndex("omni_groups_instance_external_idx").on(table3.instanceId, table3.externalId),
59253
59253
  instanceIdx: index("omni_groups_instance_idx").on(table3.instanceId),
@@ -59292,17 +59292,17 @@ var init_schema2 = __esm(() => {
59292
59292
  editCount: integer("edit_count").notNull().default(0),
59293
59293
  originalText: text("original_text"),
59294
59294
  editHistory: jsonb("edit_history").$type(),
59295
- editedAt: timestamp("edited_at"),
59296
- deletedAt: timestamp("deleted_at"),
59295
+ editedAt: timestamp("edited_at", { withTimezone: true }),
59296
+ deletedAt: timestamp("deleted_at", { withTimezone: true }),
59297
59297
  reactions: jsonb("reactions").$type(),
59298
59298
  reactionCounts: jsonb("reaction_counts").$type(),
59299
59299
  rawPayload: jsonb("raw_payload").$type(),
59300
59300
  originalEventId: uuid("original_event_id"),
59301
59301
  latestEventId: uuid("latest_event_id"),
59302
- platformTimestamp: timestamp("platform_timestamp").notNull(),
59303
- receivedAt: timestamp("received_at").notNull().defaultNow(),
59304
- createdAt: timestamp("created_at").notNull().defaultNow(),
59305
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59302
+ platformTimestamp: timestamp("platform_timestamp", { withTimezone: true }).notNull(),
59303
+ receivedAt: timestamp("received_at", { withTimezone: true }).notNull().defaultNow(),
59304
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59305
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59306
59306
  }, (table3) => ({
59307
59307
  chatExternalIdx: uniqueIndex("messages_chat_external_idx").on(table3.chatId, table3.externalId),
59308
59308
  chatIdx: index("messages_chat_idx").on(table3.chatId),
@@ -59347,10 +59347,10 @@ var init_schema2 = __esm(() => {
59347
59347
  status: varchar("status", { length: 20 }).notNull().default("received"),
59348
59348
  errorMessage: text("error_message"),
59349
59349
  errorStage: varchar("error_stage", { length: 50 }),
59350
- receivedAt: timestamp("received_at").notNull().defaultNow(),
59351
- processedAt: timestamp("processed_at"),
59352
- deliveredAt: timestamp("delivered_at"),
59353
- readAt: timestamp("read_at"),
59350
+ receivedAt: timestamp("received_at", { withTimezone: true }).notNull().defaultNow(),
59351
+ processedAt: timestamp("processed_at", { withTimezone: true }),
59352
+ deliveredAt: timestamp("delivered_at", { withTimezone: true }),
59353
+ readAt: timestamp("read_at", { withTimezone: true }),
59354
59354
  processingTimeMs: integer("processing_time_ms"),
59355
59355
  agentLatencyMs: integer("agent_latency_ms"),
59356
59356
  totalLatencyMs: integer("total_latency_ms"),
@@ -59358,7 +59358,7 @@ var init_schema2 = __esm(() => {
59358
59358
  agentRequest: jsonb("agent_request").$type(),
59359
59359
  agentResponse: jsonb("agent_response").$type(),
59360
59360
  metadata: jsonb("metadata").$type(),
59361
- createdAt: timestamp("created_at").notNull().defaultNow()
59361
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
59362
59362
  }, (table3) => ({
59363
59363
  externalIdIdx: index("omni_events_external_id_idx").on(table3.externalId),
59364
59364
  channelIdx: index("omni_events_channel_idx").on(table3.channel),
@@ -59384,7 +59384,7 @@ var init_schema2 = __esm(() => {
59384
59384
  agentId: uuid("agent_id").references(() => agents.id, { onDelete: "set null" }),
59385
59385
  externalMessageId: varchar("external_message_id", { length: 255 }),
59386
59386
  handoffFields: jsonb("handoff_fields").$type(),
59387
- sentAt: timestamp("sent_at").notNull().defaultNow(),
59387
+ sentAt: timestamp("sent_at", { withTimezone: true }).notNull().defaultNow(),
59388
59388
  metadata: jsonb("metadata").$type()
59389
59389
  }, (table3) => ({
59390
59390
  instanceIdx: index("handoff_logs_instance_idx").on(table3.instanceId),
@@ -59425,12 +59425,12 @@ var init_schema2 = __esm(() => {
59425
59425
  priority: integer("priority").notNull().default(0),
59426
59426
  enabled: boolean("enabled").notNull().default(true),
59427
59427
  reason: text("reason"),
59428
- expiresAt: timestamp("expires_at"),
59428
+ expiresAt: timestamp("expires_at", { withTimezone: true }),
59429
59429
  action: varchar("action", { length: 20 }).notNull().default("block"),
59430
59430
  blockMessage: text("block_message"),
59431
59431
  metadata: jsonb("metadata").$type(),
59432
- createdAt: timestamp("created_at").notNull().defaultNow(),
59433
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59432
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59433
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59434
59434
  }, (table3) => ({
59435
59435
  instanceIdx: index("access_rules_instance_idx").on(table3.instanceId),
59436
59436
  phoneIdx: index("access_rules_phone_idx").on(table3.phonePattern),
@@ -59449,8 +59449,8 @@ var init_schema2 = __esm(() => {
59449
59449
  isRequired: boolean("is_required").notNull().default(false),
59450
59450
  defaultValue: text("default_value"),
59451
59451
  validationRules: jsonb("validation_rules").$type(),
59452
- createdAt: timestamp("created_at").notNull().defaultNow(),
59453
- updatedAt: timestamp("updated_at").notNull().defaultNow(),
59452
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59453
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
59454
59454
  createdBy: varchar("created_by", { length: 255 }),
59455
59455
  updatedBy: varchar("updated_by", { length: 255 })
59456
59456
  }, (table3) => ({
@@ -59463,7 +59463,7 @@ var init_schema2 = __esm(() => {
59463
59463
  oldValue: text("old_value"),
59464
59464
  newValue: text("new_value"),
59465
59465
  changedBy: varchar("changed_by", { length: 255 }),
59466
- changedAt: timestamp("changed_at").notNull().defaultNow(),
59466
+ changedAt: timestamp("changed_at", { withTimezone: true }).notNull().defaultNow(),
59467
59467
  changeReason: text("change_reason")
59468
59468
  }, (table3) => ({
59469
59469
  settingIdx: index("setting_change_history_setting_idx").on(table3.settingId),
@@ -59484,9 +59484,9 @@ var init_schema2 = __esm(() => {
59484
59484
  totalTokens: integer("total_tokens"),
59485
59485
  errorMessage: text("error_message"),
59486
59486
  errors: jsonb("errors").$type(),
59487
- createdAt: timestamp("created_at").notNull().defaultNow(),
59488
- startedAt: timestamp("started_at"),
59489
- completedAt: timestamp("completed_at")
59487
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59488
+ startedAt: timestamp("started_at", { withTimezone: true }),
59489
+ completedAt: timestamp("completed_at", { withTimezone: true })
59490
59490
  }, (table3) => ({
59491
59491
  statusIdx: index("batch_jobs_status_idx").on(table3.status),
59492
59492
  instanceIdx: index("batch_jobs_instance_idx").on(table3.instanceId),
@@ -59502,9 +59502,9 @@ var init_schema2 = __esm(() => {
59502
59502
  config: jsonb("config").notNull().default("{}").$type(),
59503
59503
  progress: jsonb("progress").notNull().default("{}").$type(),
59504
59504
  errorMessage: text("error_message"),
59505
- createdAt: timestamp("created_at").notNull().defaultNow(),
59506
- startedAt: timestamp("started_at"),
59507
- completedAt: timestamp("completed_at")
59505
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59506
+ startedAt: timestamp("started_at", { withTimezone: true }),
59507
+ completedAt: timestamp("completed_at", { withTimezone: true })
59508
59508
  }, (table3) => ({
59509
59509
  instanceIdx: index("sync_jobs_instance_idx").on(table3.instanceId),
59510
59510
  statusIdx: index("sync_jobs_status_idx").on(table3.status),
@@ -59525,7 +59525,7 @@ var init_schema2 = __esm(() => {
59525
59525
  costUsd: numeric("cost_usd", { precision: 15, scale: 6 }),
59526
59526
  batchJobId: uuid("batch_job_id").references(() => batchJobs.id, { onDelete: "set null" }),
59527
59527
  processingTimeMs: integer("processing_time_ms"),
59528
- createdAt: timestamp("created_at").notNull().defaultNow()
59528
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
59529
59529
  }, (table3) => ({
59530
59530
  eventIdx: index("media_content_event_idx").on(table3.eventId),
59531
59531
  mediaIdx: index("media_content_media_idx").on(table3.mediaId),
@@ -59536,7 +59536,7 @@ var init_schema2 = __esm(() => {
59536
59536
  instanceId: uuid("instance_id").notNull().references(() => instances.id, { onDelete: "cascade" }),
59537
59537
  lidId: varchar("lid_id", { length: 255 }).notNull(),
59538
59538
  phoneId: varchar("phone_id", { length: 255 }).notNull(),
59539
- discoveredAt: timestamp("discovered_at").notNull().defaultNow(),
59539
+ discoveredAt: timestamp("discovered_at", { withTimezone: true }).notNull().defaultNow(),
59540
59540
  discoveredFrom: varchar("discovered_from", { length: 50 })
59541
59541
  }, (table3) => ({
59542
59542
  instanceLidIdx: uniqueIndex("chat_id_mappings_instance_lid_idx").on(table3.instanceId, table3.lidId),
@@ -59547,9 +59547,9 @@ var init_schema2 = __esm(() => {
59547
59547
  pluginId: varchar("plugin_id", { length: 100 }).notNull(),
59548
59548
  key: varchar("key", { length: 500 }).notNull(),
59549
59549
  value: text("value").notNull(),
59550
- expiresAt: timestamp("expires_at"),
59551
- createdAt: timestamp("created_at").notNull().defaultNow(),
59552
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59550
+ expiresAt: timestamp("expires_at", { withTimezone: true }),
59551
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59552
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59553
59553
  }, (table3) => ({
59554
59554
  pluginKeyIdx: uniqueIndex("plugin_storage_plugin_key_idx").on(table3.pluginId, table3.key),
59555
59555
  pluginIdx: index("plugin_storage_plugin_idx").on(table3.pluginId),
@@ -59764,11 +59764,11 @@ var init_schema2 = __esm(() => {
59764
59764
  stack: text("stack"),
59765
59765
  autoRetryCount: integer("auto_retry_count").notNull().default(0),
59766
59766
  manualRetryCount: integer("manual_retry_count").notNull().default(0),
59767
- nextAutoRetryAt: timestamp("next_auto_retry_at"),
59767
+ nextAutoRetryAt: timestamp("next_auto_retry_at", { withTimezone: true }),
59768
59768
  status: varchar("status", { length: 20 }).notNull().default("pending").$type(),
59769
- createdAt: timestamp("created_at").notNull().defaultNow(),
59770
- lastRetryAt: timestamp("last_retry_at"),
59771
- resolvedAt: timestamp("resolved_at"),
59769
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59770
+ lastRetryAt: timestamp("last_retry_at", { withTimezone: true }),
59771
+ resolvedAt: timestamp("resolved_at", { withTimezone: true }),
59772
59772
  resolvedBy: varchar("resolved_by", { length: 100 })
59773
59773
  }, (table3) => ({
59774
59774
  eventIdIdx: index("dead_letter_events_event_id_idx").on(table3.eventId),
@@ -59786,8 +59786,8 @@ var init_schema2 = __esm(() => {
59786
59786
  storeChannelSend: boolean("store_channel_send").notNull().default(true),
59787
59787
  storeError: boolean("store_error").notNull().default(true),
59788
59788
  retentionDays: integer("retention_days").notNull().default(14),
59789
- createdAt: timestamp("created_at").notNull().defaultNow(),
59790
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59789
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59790
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59791
59791
  }, (table3) => ({
59792
59792
  eventTypeIdx: uniqueIndex("payload_storage_config_event_type_idx").on(table3.eventType)
59793
59793
  }));
@@ -59800,10 +59800,10 @@ var init_schema2 = __esm(() => {
59800
59800
  payloadCompressed: text("payload_compressed").notNull(),
59801
59801
  payloadSizeOriginal: integer("payload_size_original"),
59802
59802
  payloadSizeCompressed: integer("payload_size_compressed"),
59803
- timestamp: timestamp("timestamp").notNull().defaultNow(),
59803
+ timestamp: timestamp("timestamp", { withTimezone: true }).notNull().defaultNow(),
59804
59804
  containsMedia: boolean("contains_media").notNull().default(false),
59805
59805
  containsBase64: boolean("contains_base64").notNull().default(false),
59806
- deletedAt: timestamp("deleted_at"),
59806
+ deletedAt: timestamp("deleted_at", { withTimezone: true }),
59807
59807
  deletedBy: varchar("deleted_by", { length: 100 }),
59808
59808
  deleteReason: varchar("delete_reason", { length: 255 })
59809
59809
  }, (table3) => ({
@@ -59820,10 +59820,10 @@ var init_schema2 = __esm(() => {
59820
59820
  description: text("description"),
59821
59821
  expectedHeaders: jsonb("expected_headers").$type(),
59822
59822
  enabled: boolean("enabled").notNull().default(true),
59823
- lastReceivedAt: timestamp("last_received_at"),
59823
+ lastReceivedAt: timestamp("last_received_at", { withTimezone: true }),
59824
59824
  totalReceived: integer("total_received").notNull().default(0),
59825
- createdAt: timestamp("created_at").notNull().defaultNow(),
59826
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59825
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59826
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59827
59827
  }, (table3) => ({
59828
59828
  nameIdx: uniqueIndex("webhook_sources_name_idx").on(table3.name),
59829
59829
  enabledIdx: index("webhook_sources_enabled_idx").on(table3.enabled)
@@ -59854,8 +59854,8 @@ var init_schema2 = __esm(() => {
59854
59854
  debounce: jsonb("debounce").$type(),
59855
59855
  enabled: boolean("enabled").notNull().default(true),
59856
59856
  priority: integer("priority").notNull().default(0),
59857
- createdAt: timestamp("created_at").notNull().defaultNow(),
59858
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59857
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59858
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59859
59859
  }, (table3) => ({
59860
59860
  nameIdx: index("automations_name_idx").on(table3.name),
59861
59861
  triggerIdx: index("automations_trigger_idx").on(table3.triggerEventType),
@@ -59872,7 +59872,7 @@ var init_schema2 = __esm(() => {
59872
59872
  actionsExecuted: jsonb("actions_executed").$type(),
59873
59873
  error: text("error"),
59874
59874
  executionTimeMs: integer("execution_time_ms"),
59875
- createdAt: timestamp("created_at").notNull().defaultNow()
59875
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
59876
59876
  }, (table3) => ({
59877
59877
  automationIdx: index("automation_logs_automation_idx").on(table3.automationId),
59878
59878
  eventIdIdx: index("automation_logs_event_id_idx").on(table3.eventId),
@@ -59884,7 +59884,7 @@ var init_schema2 = __esm(() => {
59884
59884
  streamName: varchar("stream_name", { length: 50 }).notNull(),
59885
59885
  lastSequence: integer("last_sequence").notNull().default(0),
59886
59886
  lastEventId: uuid("last_event_id"),
59887
- updatedAt: timestamp("updated_at").notNull().defaultNow()
59887
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
59888
59888
  });
59889
59889
  automationsRelations = relations(automations2, ({ many }) => ({
59890
59890
  logs: many(automationLogs)
@@ -59963,9 +59963,9 @@ var init_schema2 = __esm(() => {
59963
59963
  parentTaskId: uuid("parent_task_id").references(() => agentTasks.id, { onDelete: "set null" }),
59964
59964
  subtaskCount: integer("subtask_count").notNull().default(0),
59965
59965
  completedSubtaskCount: integer("completed_subtask_count").notNull().default(0),
59966
- createdAt: timestamp("created_at").notNull().defaultNow(),
59967
- startedAt: timestamp("started_at"),
59968
- completedAt: timestamp("completed_at")
59966
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
59967
+ startedAt: timestamp("started_at", { withTimezone: true }),
59968
+ completedAt: timestamp("completed_at", { withTimezone: true })
59969
59969
  }, (table3) => ({
59970
59970
  agentIdIdx: index("agent_tasks_agent_id_idx").on(table3.agentId),
59971
59971
  chatIdIdx: index("agent_tasks_chat_id_idx").on(table3.chatId),
@@ -60014,9 +60014,9 @@ var init_schema2 = __esm(() => {
60014
60014
  action: varchar("action", { length: 20 }).$type(),
60015
60015
  nudgeCount: integer("nudge_count").notNull().default(0),
60016
60016
  messagesSent: integer("messages_sent").notNull().default(0),
60017
- startedAt: timestamp("started_at").notNull().defaultNow(),
60018
- lastActivityAt: timestamp("last_activity_at").notNull().defaultNow(),
60019
- closedAt: timestamp("closed_at"),
60017
+ startedAt: timestamp("started_at", { withTimezone: true }).notNull().defaultNow(),
60018
+ lastActivityAt: timestamp("last_activity_at", { withTimezone: true }).notNull().defaultNow(),
60019
+ closedAt: timestamp("closed_at", { withTimezone: true }),
60020
60020
  closedReason: text("closed_reason"),
60021
60021
  metadata: jsonb("metadata").$type()
60022
60022
  }, (table3) => ({
@@ -60089,7 +60089,7 @@ var init_schema2 = __esm(() => {
60089
60089
  processedEvents = pgTable("processed_events", {
60090
60090
  eventId: varchar("event_id", { length: 255 }).notNull(),
60091
60091
  handler: varchar("handler", { length: 100 }).notNull(),
60092
- processedAt: timestamp("processed_at").notNull().defaultNow()
60092
+ processedAt: timestamp("processed_at", { withTimezone: true }).notNull().defaultNow()
60093
60093
  }, (table3) => ({
60094
60094
  pk: primaryKey({ columns: [table3.eventId, table3.handler], name: "processed_events_pk" }),
60095
60095
  processedAtIdx: index("processed_events_processed_at_idx").on(table3.processedAt)
@@ -60100,10 +60100,10 @@ var init_schema2 = __esm(() => {
60100
60100
  hostname: varchar("hostname", { length: 255 }).notNull(),
60101
60101
  capabilities: jsonb("capabilities").notNull().default(sql`'{}'::jsonb`),
60102
60102
  scopes: text("scopes").array().notNull().default(sql`ARRAY['*']::text[]`),
60103
- lastSeenAt: timestamp("last_seen_at"),
60104
- revokedAt: timestamp("revoked_at"),
60105
- createdAt: timestamp("created_at").notNull().defaultNow(),
60106
- updatedAt: timestamp("updated_at").notNull().defaultNow()
60103
+ lastSeenAt: timestamp("last_seen_at", { withTimezone: true }),
60104
+ revokedAt: timestamp("revoked_at", { withTimezone: true }),
60105
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
60106
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
60107
60107
  }, (table3) => ({
60108
60108
  pubkeyUq: index("genie_hosts_pubkey_idx").on(table3.pubkey),
60109
60109
  activeIdx: index("genie_hosts_active_idx").on(table3.revokedAt)
@@ -114209,7 +114209,7 @@ import { fileURLToPath } from "url";
114209
114209
  // package.json
114210
114210
  var package_default = {
114211
114211
  name: "@automagik/omni",
114212
- version: "2.260502.2",
114212
+ version: "2.260503.2",
114213
114213
  description: "LLM-optimized CLI for Omni",
114214
114214
  type: "module",
114215
114215
  bin: {