@omnizap-system/omnizap 2.6.1 → 2.6.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.
- package/.env.example +78 -9
- package/.github/workflows/ci.yml +3 -3
- package/.github/workflows/security-runner-hardening.yml +1 -1
- package/.github/workflows/security-zap-full-scan.yml +1 -0
- package/app/config/index.js +6 -0
- package/app/configParts/adminIdentity.js +36 -7
- package/app/configParts/baileysConfig.js +343 -56
- package/app/configParts/groupUtils.js +226 -0
- package/app/configParts/loggerConfig.js +185 -0
- package/app/configParts/messagePersistenceService.js +307 -5
- package/app/configParts/sessionConfig.js +242 -0
- package/app/connection/baileysCompatibility.test.js +10 -1
- package/app/connection/baileysDbAuthState.js +205 -9
- package/app/connection/baileysLibsignalPatch.js +210 -0
- package/app/connection/groupOwnerWriteStateResolver.js +141 -0
- package/app/connection/socketController.js +694 -123
- package/app/connection/socketController.multiSession.test.js +128 -0
- package/app/controllers/messageController.js +1 -1
- package/app/controllers/messagePipeline/commandMiddleware.js +12 -10
- package/app/controllers/messagePipeline/conversationMiddleware.js +2 -1
- package/app/controllers/messagePipeline/messagePipelineMiddlewares.test.js +104 -0
- package/app/controllers/messagePipeline/preProcessingMiddlewares.js +96 -4
- package/app/controllers/messageProcessingPipeline.js +90 -9
- package/app/controllers/messageProcessingPipeline.test.js +202 -0
- package/app/modules/adminModule/AGENT.md +1 -1
- package/app/modules/adminModule/commandConfig.json +3318 -1347
- package/app/modules/adminModule/groupCommandHandlers.js +856 -14
- package/app/modules/adminModule/groupCommandHandlers.test.js +375 -9
- package/app/modules/adminModule/groupWarningRepository.js +152 -0
- package/app/modules/aiModule/AGENT.md +47 -30
- package/app/modules/aiModule/aiConfigRuntime.js +1 -0
- package/app/modules/aiModule/catCommand.js +132 -25
- package/app/modules/aiModule/commandConfig.json +114 -28
- package/app/modules/analyticsModule/messageAnalysisEventRepository.js +54 -6
- package/app/modules/gameModule/AGENT.md +1 -1
- package/app/modules/gameModule/commandConfig.json +29 -0
- package/app/modules/menuModule/AGENT.md +1 -1
- package/app/modules/menuModule/commandConfig.json +45 -10
- package/app/modules/menuModule/menuCatalogService.js +190 -0
- package/app/modules/menuModule/menuCommandUsageRepository.js +109 -0
- package/app/modules/menuModule/menuDynamicService.js +511 -0
- package/app/modules/menuModule/menuDynamicService.test.js +141 -0
- package/app/modules/menuModule/menus.js +36 -5
- package/app/modules/playModule/AGENT.md +10 -5
- package/app/modules/playModule/commandConfig.json +74 -16
- package/app/modules/playModule/playCommandConstants.js +13 -7
- package/app/modules/playModule/playCommandCore.js +4 -6
- package/app/modules/playModule/{playCommandYtDlpClient.js → playCommandMediaClient.js} +684 -332
- package/app/modules/playModule/playConfigRuntime.js +5 -6
- package/app/modules/playModule/playModuleCriticalFlows.test.js +44 -59
- package/app/modules/quoteModule/AGENT.md +1 -1
- package/app/modules/quoteModule/commandConfig.json +29 -0
- package/app/modules/rpgPokemonModule/AGENT.md +1 -1
- package/app/modules/rpgPokemonModule/commandConfig.json +29 -0
- package/app/modules/statsModule/AGENT.md +1 -1
- package/app/modules/statsModule/commandConfig.json +58 -0
- package/app/modules/stickerModule/AGENT.md +1 -1
- package/app/modules/stickerModule/commandConfig.json +145 -0
- package/app/modules/stickerPackModule/AGENT.md +1 -1
- package/app/modules/stickerPackModule/autoPackCollectorService.js +5 -1
- package/app/modules/stickerPackModule/commandConfig.json +29 -0
- package/app/modules/stickerPackModule/stickerAutoPackByTagsRuntime.js +1 -1
- package/app/modules/stickerPackModule/stickerPackCommandHandlers.js +78 -57
- package/app/modules/stickerPackModule/stickerPackService.js +13 -6
- package/app/modules/systemMetricsModule/AGENT.md +1 -1
- package/app/modules/systemMetricsModule/commandConfig.json +29 -0
- package/app/modules/tiktokModule/AGENT.md +1 -1
- package/app/modules/tiktokModule/commandConfig.json +29 -0
- package/app/modules/userModule/AGENT.md +1 -1
- package/app/modules/userModule/commandConfig.json +29 -0
- package/app/modules/waifuPicsModule/AGENT.md +57 -27
- package/app/modules/waifuPicsModule/commandConfig.json +87 -0
- package/app/observability/metrics.js +136 -0
- package/app/services/ai/commandConfigEnrichmentService.js +229 -47
- package/app/services/ai/geminiService.js +131 -7
- package/app/services/ai/geminiService.test.js +59 -2
- package/app/services/ai/moduleAiHelpCoreService.js +33 -4
- package/app/services/group/groupMetadataService.js +24 -1
- package/app/services/infra/dbWriteQueue.js +51 -21
- package/app/services/messaging/newsBroadcastService.js +843 -27
- package/app/services/multiSession/assignmentBalancerService.js +452 -0
- package/app/services/multiSession/groupOwnershipRepository.js +346 -0
- package/app/services/multiSession/groupOwnershipService.js +809 -0
- package/app/services/multiSession/groupOwnershipService.test.js +317 -0
- package/app/services/multiSession/sessionRegistryService.js +239 -0
- package/app/store/aiPromptStore.js +36 -19
- package/app/store/groupConfigStore.js +41 -5
- package/app/store/premiumUserStore.js +21 -7
- package/app/utils/antiLink/antiLinkModule.js +391 -25
- package/app/workers/aiHelperContinuousLearningWorker.js +512 -0
- package/database/index.js +6 -0
- package/database/migrations/20260307_d0_hardening_down.sql +1 -1
- package/database/migrations/20260314_d7_canonical_sender_down.sql +1 -1
- package/database/migrations/20260406_d30_security_analytics_down.sql +1 -1
- package/database/migrations/20260411_d35_group_community_metadata_down.sql +59 -0
- package/database/migrations/20260411_d35_group_community_metadata_up.sql +62 -0
- package/database/migrations/20260412_d36_system_config_tables_down.sql +32 -0
- package/database/migrations/20260412_d36_system_config_tables_up.sql +66 -0
- package/database/migrations/20260413_d37_group_user_warnings_down.sql +11 -0
- package/database/migrations/20260413_d37_group_user_warnings_up.sql +24 -0
- package/database/migrations/20260414_d38_multi_session_foundation_down.sql +72 -0
- package/database/migrations/20260414_d38_multi_session_foundation_up.sql +125 -0
- package/database/migrations/20260414_d39_multi_session_cutover_down.sql +103 -0
- package/database/migrations/20260414_d39_multi_session_cutover_up.sql +83 -0
- package/database/schema.sql +102 -1
- package/docker-compose.yml +4 -1
- package/docs/compliance/acceptable-use-policy-2026-03-07.md +1 -1
- package/docs/compliance/privacy-policy-2026-03-07.md +2 -2
- package/docs/security/dsar-lgpd-runbook-2026-03-07.md +1 -1
- package/docs/security/network-hardening-runbook-2026-03-07.md +53 -0
- package/docs/security/omnizap-static-security-headers.conf +25 -0
- package/ecosystem.prod.config.cjs +31 -11
- package/index.js +52 -18
- package/observability/alert-rules.yml +20 -0
- package/observability/grafana/dashboards/omnizap-system-admin.json +229 -0
- package/observability/mysql-setup.sql +4 -4
- package/observability/system-admin-observability.md +26 -0
- package/package.json +14 -6
- package/public/comandos/commands-catalog.json +2253 -78
- package/public/css/payments-react.css +478 -0
- package/public/js/apps/commandsReactApp.js +267 -87
- package/public/js/apps/createPackApp.js +3 -3
- package/public/js/apps/homeReactApp.js +2 -2
- package/public/js/apps/paymentsCancelReactApp.js +45 -0
- package/public/js/apps/paymentsReactApp.js +399 -0
- package/public/js/apps/paymentsSuccessReactApp.js +148 -0
- package/public/js/apps/stickersApp.js +255 -103
- package/public/js/apps/termsReactApp.js +57 -8
- package/public/js/apps/userPasswordResetReactApp.js +406 -0
- package/public/js/apps/userReactApp.js +96 -47
- package/public/js/apps/userSystemAdmReactApp.js +1506 -0
- package/public/pages/pagamentos-cancelado.html +21 -0
- package/public/pages/pagamentos-sucesso.html +21 -0
- package/public/pages/pagamentos.html +30 -0
- package/public/pages/politica-de-privacidade.html +1 -1
- package/public/pages/stickers.html +5 -5
- package/public/pages/termos-de-uso-texto-integral.html +1 -1
- package/public/pages/termos-de-uso.html +1 -1
- package/public/pages/user-password-reset.html +3 -4
- package/public/pages/user-systemadm.html +8 -462
- package/public/pages/user.html +1 -1
- package/scripts/clear-whatsapp-session.sh +123 -0
- package/scripts/core-ai-mode.mjs +163 -0
- package/scripts/deploy.sh +13 -0
- package/scripts/enrich-command-config-ux-openai.mjs +492 -0
- package/scripts/generate-commands-catalog.mjs +155 -0
- package/scripts/new-whatsapp-session.sh +564 -0
- package/scripts/security-web-surface-check.mjs +218 -0
- package/server/controllers/admin/adminPanelHandlers.js +253 -3
- package/server/controllers/admin/systemAdminController.js +254 -0
- package/server/controllers/payments/paymentsController.js +731 -0
- package/server/controllers/sticker/stickerCatalogController.js +9 -23
- package/server/controllers/system/contactController.js +9 -17
- package/server/controllers/system/stickerCatalogSystemContext.js +27 -6
- package/server/controllers/system/systemController.js +228 -1
- package/server/controllers/userController.js +6 -0
- package/server/email/emailAutomationRuntime.js +36 -1
- package/server/email/emailAutomationService.js +42 -1
- package/server/email/emailTemplateService.js +140 -33
- package/server/http/httpRequestUtils.js +18 -14
- package/server/http/httpServer.js +8 -4
- package/server/middleware/securityHeaders.js +35 -3
- package/server/routes/admin/systemAdminRouter.js +6 -0
- package/server/routes/indexRouter.js +50 -6
- package/server/routes/observability/grafanaProxyRouter.js +254 -0
- package/server/routes/payments/paymentsRouter.js +47 -0
- package/server/routes/static/staticPageRouter.js +30 -1
- package/server/utils/publicContact.js +31 -0
- package/utils/whatsapp/contactEnv.js +39 -0
- package/vite.config.mjs +5 -1
- package/app/modules/playModule/local/installYtDlp.js +0 -25
- package/app/modules/playModule/local/ytDlpInstaller.js +0 -28
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
{
|
|
2
|
+
"uid": "omnizap-system-admin",
|
|
3
|
+
"title": "OmniZap System Admin",
|
|
4
|
+
"timezone": "browser",
|
|
5
|
+
"schemaVersion": 38,
|
|
6
|
+
"version": 2,
|
|
7
|
+
"refresh": "10s",
|
|
8
|
+
"time": {
|
|
9
|
+
"from": "now-6h",
|
|
10
|
+
"to": "now"
|
|
11
|
+
},
|
|
12
|
+
"tags": ["omnizap", "system-admin", "observability"],
|
|
13
|
+
"panels": [
|
|
14
|
+
{
|
|
15
|
+
"type": "timeseries",
|
|
16
|
+
"title": "Admin Snapshot Freshness (s)",
|
|
17
|
+
"datasource": "Prometheus",
|
|
18
|
+
"gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 },
|
|
19
|
+
"targets": [
|
|
20
|
+
{
|
|
21
|
+
"expr": "time() - omnizap_admin_overview_updated_at_seconds",
|
|
22
|
+
"legendFormat": "freshness_s",
|
|
23
|
+
"refId": "A"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "timeseries",
|
|
29
|
+
"title": "Snapshot Publishes/sec",
|
|
30
|
+
"datasource": "Prometheus",
|
|
31
|
+
"gridPos": { "x": 12, "y": 0, "w": 12, "h": 8 },
|
|
32
|
+
"targets": [
|
|
33
|
+
{
|
|
34
|
+
"expr": "rate(omnizap_admin_overview_requests_total[5m])",
|
|
35
|
+
"legendFormat": "{{source}}",
|
|
36
|
+
"refId": "A"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "timeseries",
|
|
42
|
+
"title": "Sessoes, Usuarios e Bans",
|
|
43
|
+
"datasource": "Prometheus",
|
|
44
|
+
"gridPos": { "x": 0, "y": 8, "w": 12, "h": 8 },
|
|
45
|
+
"targets": [
|
|
46
|
+
{
|
|
47
|
+
"expr": "omnizap_admin_counters{counter=~\"active_google_sessions|known_google_users|active_bans\"}",
|
|
48
|
+
"legendFormat": "{{counter}}",
|
|
49
|
+
"refId": "A"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "timeseries",
|
|
55
|
+
"title": "Mensagens, Spam e Erros (Quick)",
|
|
56
|
+
"datasource": "Prometheus",
|
|
57
|
+
"gridPos": { "x": 12, "y": 8, "w": 12, "h": 8 },
|
|
58
|
+
"targets": [
|
|
59
|
+
{
|
|
60
|
+
"expr": "omnizap_admin_dashboard_quick{metric=~\"messages_today|spam_blocked_today|errors_5xx\"}",
|
|
61
|
+
"legendFormat": "{{metric}}",
|
|
62
|
+
"refId": "A"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "timeseries",
|
|
68
|
+
"title": "CPU e RAM (%)",
|
|
69
|
+
"datasource": "Prometheus",
|
|
70
|
+
"gridPos": { "x": 0, "y": 16, "w": 8, "h": 8 },
|
|
71
|
+
"targets": [
|
|
72
|
+
{
|
|
73
|
+
"expr": "omnizap_admin_system_health{metric=~\"cpu_percent|ram_percent\"}",
|
|
74
|
+
"legendFormat": "{{metric}}",
|
|
75
|
+
"refId": "A"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "timeseries",
|
|
81
|
+
"title": "Latencia P95 e Queue Pending",
|
|
82
|
+
"datasource": "Prometheus",
|
|
83
|
+
"gridPos": { "x": 8, "y": 16, "w": 8, "h": 8 },
|
|
84
|
+
"targets": [
|
|
85
|
+
{
|
|
86
|
+
"expr": "omnizap_admin_system_health{metric=~\"http_latency_p95_ms|queue_pending\"}",
|
|
87
|
+
"legendFormat": "{{metric}}",
|
|
88
|
+
"refId": "A"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "timeseries",
|
|
94
|
+
"title": "DB Total e Slow Queries",
|
|
95
|
+
"datasource": "Prometheus",
|
|
96
|
+
"gridPos": { "x": 16, "y": 16, "w": 8, "h": 8 },
|
|
97
|
+
"targets": [
|
|
98
|
+
{
|
|
99
|
+
"expr": "omnizap_admin_system_health{metric=~\"db_total_queries|db_slow_queries\"}",
|
|
100
|
+
"legendFormat": "{{metric}}",
|
|
101
|
+
"refId": "A"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "timeseries",
|
|
107
|
+
"title": "Alertas por severidade",
|
|
108
|
+
"datasource": "Prometheus",
|
|
109
|
+
"gridPos": { "x": 0, "y": 24, "w": 8, "h": 8 },
|
|
110
|
+
"targets": [
|
|
111
|
+
{
|
|
112
|
+
"expr": "omnizap_admin_alerts_total",
|
|
113
|
+
"legendFormat": "{{severity}}",
|
|
114
|
+
"refId": "A"
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "timeseries",
|
|
120
|
+
"title": "Feature Flags",
|
|
121
|
+
"datasource": "Prometheus",
|
|
122
|
+
"gridPos": { "x": 8, "y": 24, "w": 8, "h": 8 },
|
|
123
|
+
"targets": [
|
|
124
|
+
{
|
|
125
|
+
"expr": "omnizap_admin_feature_flags_total",
|
|
126
|
+
"legendFormat": "{{state}}",
|
|
127
|
+
"refId": "A"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "timeseries",
|
|
133
|
+
"title": "Itens por secao do Snapshot",
|
|
134
|
+
"datasource": "Prometheus",
|
|
135
|
+
"gridPos": { "x": 16, "y": 24, "w": 8, "h": 8 },
|
|
136
|
+
"targets": [
|
|
137
|
+
{
|
|
138
|
+
"expr": "omnizap_admin_snapshot_items_total",
|
|
139
|
+
"legendFormat": "{{section}}",
|
|
140
|
+
"refId": "A"
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"type": "timeseries",
|
|
146
|
+
"title": "MySQL Disponibilidade e Conexoes",
|
|
147
|
+
"datasource": "Prometheus",
|
|
148
|
+
"gridPos": { "x": 0, "y": 32, "w": 8, "h": 8 },
|
|
149
|
+
"targets": [
|
|
150
|
+
{
|
|
151
|
+
"expr": "mysql_up",
|
|
152
|
+
"legendFormat": "mysql_up",
|
|
153
|
+
"refId": "A"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"expr": "mysql_global_status_threads_connected",
|
|
157
|
+
"legendFormat": "threads_connected",
|
|
158
|
+
"refId": "B"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"type": "timeseries",
|
|
164
|
+
"title": "MySQL Throughput (QPS/Writes/Slow)",
|
|
165
|
+
"datasource": "Prometheus",
|
|
166
|
+
"gridPos": { "x": 8, "y": 32, "w": 8, "h": 8 },
|
|
167
|
+
"targets": [
|
|
168
|
+
{
|
|
169
|
+
"expr": "rate(mysql_global_status_queries[5m])",
|
|
170
|
+
"legendFormat": "qps",
|
|
171
|
+
"refId": "A"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"expr": "sum(rate(mysql_global_status_commands_total{command=~\"insert|update|delete\"}[5m])) or (sum(rate(mysql_global_status_com_insert[5m])) + sum(rate(mysql_global_status_com_update[5m])) + sum(rate(mysql_global_status_com_delete[5m]))) or vector(0)",
|
|
175
|
+
"legendFormat": "writes",
|
|
176
|
+
"refId": "B"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"expr": "rate(mysql_global_status_slow_queries[5m])",
|
|
180
|
+
"legendFormat": "slow",
|
|
181
|
+
"refId": "C"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"type": "timeseries",
|
|
187
|
+
"title": "MySQL Perf Schema (series ativas)",
|
|
188
|
+
"datasource": "Prometheus",
|
|
189
|
+
"gridPos": { "x": 16, "y": 32, "w": 8, "h": 8 },
|
|
190
|
+
"targets": [
|
|
191
|
+
{
|
|
192
|
+
"expr": "count(mysql_perf_schema_events_statements_errors_total)",
|
|
193
|
+
"legendFormat": "perf_schema_series",
|
|
194
|
+
"refId": "A"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"type": "timeseries",
|
|
200
|
+
"title": "MySQL InnoDB (Locks e Buffer)",
|
|
201
|
+
"datasource": "Prometheus",
|
|
202
|
+
"gridPos": { "x": 0, "y": 40, "w": 12, "h": 8 },
|
|
203
|
+
"targets": [
|
|
204
|
+
{
|
|
205
|
+
"expr": "rate(mysql_global_status_innodb_row_lock_waits[5m])",
|
|
206
|
+
"legendFormat": "lock_waits",
|
|
207
|
+
"refId": "A"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"expr": "1 - (rate(mysql_global_status_innodb_buffer_pool_reads[5m]) / rate(mysql_global_status_innodb_buffer_pool_read_requests[5m]))",
|
|
211
|
+
"legendFormat": "buffer_pool_hit_ratio",
|
|
212
|
+
"refId": "B"
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"type": "logs",
|
|
218
|
+
"title": "MySQL Slow Log (Loki)",
|
|
219
|
+
"datasource": "Loki",
|
|
220
|
+
"gridPos": { "x": 12, "y": 40, "w": 12, "h": 8 },
|
|
221
|
+
"targets": [
|
|
222
|
+
{
|
|
223
|
+
"expr": "{job=\"mysql-slow\"}",
|
|
224
|
+
"refId": "A"
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
-- This script is idempotent and focused on metrics/logging for mysqld-exporter.
|
|
4
4
|
|
|
5
5
|
-- 1) Metrics user for mysqld-exporter
|
|
6
|
-
-- Matches docker-compose default DSN:
|
|
6
|
+
-- Matches docker-compose default DSN:
|
|
7
|
+
-- exporter:exporter@unix(/run/mysqld/mysqld.sock)/
|
|
7
8
|
CREATE USER IF NOT EXISTS 'exporter'@'%' IDENTIFIED BY 'exporter';
|
|
8
9
|
ALTER USER 'exporter'@'%' IDENTIFIED BY 'exporter';
|
|
9
10
|
|
|
@@ -17,9 +18,8 @@ FLUSH PRIVILEGES;
|
|
|
17
18
|
SET GLOBAL slow_query_log = ON;
|
|
18
19
|
SET GLOBAL long_query_time = 0.5;
|
|
19
20
|
SET GLOBAL log_output = 'FILE';
|
|
20
|
-
--
|
|
21
|
-
|
|
22
|
-
SET GLOBAL slow_query_log_file = '/var/lib/mysql/mysql-slow.log';
|
|
21
|
+
-- This path matches promtail's mysql-slow scrape target in observability/promtail-config.yml.
|
|
22
|
+
SET GLOBAL slow_query_log_file = '/var/log/mysql/mysql-slow.log';
|
|
23
23
|
|
|
24
24
|
-- 3) Performance Schema consumers/instruments
|
|
25
25
|
-- NOTE: performance_schema itself cannot be enabled dynamically.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# System Admin na Observabilidade
|
|
2
|
+
|
|
3
|
+
Esta integração publica o snapshot do painel `System Admin` no endpoint `/metrics`, permitindo acompanhar os mesmos dados no Prometheus/Grafana.
|
|
4
|
+
|
|
5
|
+
## Dashboard
|
|
6
|
+
|
|
7
|
+
- Grafana: `OmniZap System Admin`
|
|
8
|
+
- Arquivo: `observability/grafana/dashboards/omnizap-system-admin.json`
|
|
9
|
+
|
|
10
|
+
## Métricas adicionadas
|
|
11
|
+
|
|
12
|
+
- `omnizap_admin_overview_updated_at_seconds`
|
|
13
|
+
- `omnizap_admin_overview_requests_total{source}`
|
|
14
|
+
- `omnizap_admin_counters{counter}`
|
|
15
|
+
- `omnizap_admin_dashboard_quick{metric}`
|
|
16
|
+
- `omnizap_admin_system_health{metric}`
|
|
17
|
+
- `omnizap_admin_alerts_total{severity}`
|
|
18
|
+
- `omnizap_admin_feature_flags_total{state}`
|
|
19
|
+
- `omnizap_admin_snapshot_items_total{section}`
|
|
20
|
+
|
|
21
|
+
## Alertas
|
|
22
|
+
|
|
23
|
+
Em `observability/alert-rules.yml`:
|
|
24
|
+
|
|
25
|
+
- `OmniZapAdminSnapshotStale`
|
|
26
|
+
- `OmniZapAdminCriticalAlerts`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnizap-system/omnizap",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"description": "Sistema profissional de automação WhatsApp com tecnologia Baileys",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"build": "npm run build:all",
|
|
35
35
|
"build:all": "npm run catalog:commands && npm run build:frontend",
|
|
36
36
|
"build:frontend": "npm run build:css && npm run build:js",
|
|
37
|
-
"build:css": "npm run build:css:home && npm run build:css:user && npm run build:css:login && npm run build:css:terms && npm run build:css:api-docs && npm run build:css:stickers && npm run build:css:create-pack && npm run build:css:stickers-admin && npm run build:css:user-systemadm && npm run build:css:commands",
|
|
37
|
+
"build:css": "npm run build:css:home && npm run build:css:user && npm run build:css:login && npm run build:css:terms && npm run build:css:api-docs && npm run build:css:payments && npm run build:css:stickers && npm run build:css:create-pack && npm run build:css:stickers-admin && npm run build:css:user-systemadm && npm run build:css:commands",
|
|
38
38
|
"build:js": "vite build --config ./vite.config.mjs",
|
|
39
39
|
"build:js:home": "npm run build:js",
|
|
40
40
|
"build:js:user": "npm run build:js",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"build:css:terms": "tailwindcss -i ./public/assets/css/terms-react.input.css -o ./public/assets/css/terms-react.css --minify",
|
|
52
52
|
"build:css:commands": "tailwindcss -i ./public/assets/css/commands-react.input.css -o ./public/assets/css/commands-react.css --minify",
|
|
53
53
|
"build:css:api-docs": "cp ./public/css/api-docs.css ./public/assets/css/api-docs.css",
|
|
54
|
+
"build:css:payments": "cp ./public/css/payments-react.css ./public/assets/css/payments-react.css",
|
|
54
55
|
"build:css:stickers": "tailwindcss -i ./public/assets/css/stickers-react.input.css -o ./public/assets/css/stickers-react.css --minify",
|
|
55
56
|
"build:css:create-pack": "tailwindcss -i ./public/assets/css/create-pack-react.input.css -o ./public/assets/css/create-pack-react.css --minify",
|
|
56
57
|
"build:css:stickers-admin": "cp ./public/css/stickers-admin.css ./public/assets/css/stickers-admin.css",
|
|
@@ -73,6 +74,12 @@
|
|
|
73
74
|
"lint": "eslint .",
|
|
74
75
|
"lint:fix": "eslint . --fix",
|
|
75
76
|
"validate:command-configs": "node ./scripts/validate-command-configs.mjs",
|
|
77
|
+
"command-config:ux:openai": "node ./scripts/enrich-command-config-ux-openai.mjs",
|
|
78
|
+
"core:ai": "node ./scripts/core-ai-mode.mjs",
|
|
79
|
+
"core:ai:on": "node ./scripts/core-ai-mode.mjs on",
|
|
80
|
+
"core:ai:off": "node ./scripts/core-ai-mode.mjs off",
|
|
81
|
+
"core:ai:status": "node ./scripts/core-ai-mode.mjs status",
|
|
82
|
+
"new:work": "bash ./scripts/new-whatsapp-session.sh",
|
|
76
83
|
"command-config:schema:generate": "node ./scripts/generate-command-config-schema.mjs",
|
|
77
84
|
"command-config:schema:validate": "node ./scripts/validate-command-config-schema.mjs",
|
|
78
85
|
"format": "node ./scripts/run-prettier-all.mjs --write",
|
|
@@ -81,12 +88,13 @@
|
|
|
81
88
|
"ci": "npm run check && npm run build",
|
|
82
89
|
"security:audit": "npm audit --audit-level=high",
|
|
83
90
|
"security:audit:fix": "npm audit fix",
|
|
84
|
-
"security:codeql": "bash ./scripts/run-codeql-local.sh"
|
|
91
|
+
"security:codeql": "bash ./scripts/run-codeql-local.sh",
|
|
92
|
+
"security:web-surface": "node ./scripts/security-web-surface-check.mjs"
|
|
85
93
|
},
|
|
86
94
|
"dependencies": {
|
|
87
95
|
"@hapi/boom": "^10.0.1",
|
|
88
96
|
"@kaikybrofc/logger-module": "^1.0.4",
|
|
89
|
-
"@whiskeysockets/baileys": "github:jlucaso1/Baileys#
|
|
97
|
+
"@whiskeysockets/baileys": "github:jlucaso1/Baileys#feat-add-stickerpack-support",
|
|
90
98
|
"argon2": "^0.44.0",
|
|
91
99
|
"axios": "^1.13.5",
|
|
92
100
|
"canvas": "^3.2.1",
|
|
@@ -113,13 +121,13 @@
|
|
|
113
121
|
"qrcode-terminal": "^0.12.0",
|
|
114
122
|
"react": "^18.3.1",
|
|
115
123
|
"react-dom": "^18.3.1",
|
|
124
|
+
"sharp": "^0.34.3",
|
|
116
125
|
"stream-json": "^1.9.1",
|
|
117
126
|
"uuid": "^13.0.0",
|
|
118
127
|
"webp-conv": "github:kaikybrofc/webp-conv",
|
|
119
128
|
"wink-bm25-text-search": "^3.1.2",
|
|
120
129
|
"winston": "^3.17.0",
|
|
121
130
|
"winston-daily-rotate-file": "^5.0.0",
|
|
122
|
-
"yt-dlp-wrap": "^2.3.12",
|
|
123
131
|
"zod": "^3.25.76"
|
|
124
132
|
},
|
|
125
133
|
"devDependencies": {
|
|
@@ -135,7 +143,7 @@
|
|
|
135
143
|
"music-metadata": {
|
|
136
144
|
"file-type": "21.3.2"
|
|
137
145
|
},
|
|
138
|
-
"flatted": "3.4.
|
|
146
|
+
"flatted": "3.4.2"
|
|
139
147
|
},
|
|
140
148
|
"engines": {
|
|
141
149
|
"node": ">=18.0.0"
|