MythEclipse
aaebe168cf
fix(ai-moderation): fallback to discord_url when uploaded_url is null for attachment images
2026-06-04 17:06:57 +07:00
MythEclipse
fc52fe5c1d
feat(ai-moderation): cache per-user moderation results for text-only messages to skip redundant LLM calls
2026-06-04 16:54:06 +07:00
MythEclipse
65a65fdf39
feat(ai-moderation): fetch web content from URLs in text-only messages for accurate LLM analysis
2026-06-04 16:32:08 +07:00
MythEclipse
259b0babb5
feat(ai-moderation): parse moderation category from LLM fallback response instead of using static defaults
2026-06-04 13:49:35 +07:00
MythEclipse
3fc26592fc
feat(ai-moderation): add simple text-only LLM fallback when normal analysis fails for small models
2026-06-04 13:40:25 +07:00
MythEclipse
e55ee342b1
fix(ai-moderation): downgrade operational logs to debug and add missing debug logs to silent early-return paths
2026-06-04 13:13:55 +07:00
MythEclipse
d568cab88f
fix(ai-moderation): add defensive logging to silent failure paths in media analysis
2026-06-04 13:06:35 +07:00
MythEclipse
c304d4ca7c
fix(ai-moderation): implement exponential backoff for LLM and vision API retries
2026-06-04 13:02:02 +07:00
MythEclipse
aad62bc66b
fix(ai-moderation): strip fallback text from LLM analysis content
2026-06-03 20:59:10 +07:00
MythEclipse
b7d4e66600
refactor: remove json_schema response format, simplify to json_object only
2026-06-03 00:40:42 +07:00
MythEclipse
b98aba5748
Tidak ada perubahan staged. Staging area kosong — git diff --cached tidak menghasilkan output. Silakan git add file yang ingin di-commit terlebih dahulu.
2026-06-02 23:09:30 +07:00
MythEclipse
3f3a1184fe
Tidak ada perubahan staged untuk dibuatkan commit message. Working tree bersih — git status menunjukkan tidak ada file yang di-stage. Silakan git add file yang ingin di-commit terlebih dahulu, lalu saya bisa bantu tulis commit messagenya.
2026-06-02 23:08:48 +07:00
MythEclipse
75983a390c
There are no staged changes to commit — the working tree is clean (nothing to commit, working tree clean). Stage some files first with git add, then I can craft the commit message.
2026-06-02 23:07:21 +07:00
MythEclipse
130f45a859
The git add -A command needs your approval to stage the modified file. Once staged, I'll craft the commit message.
2026-06-02 23:04:16 +07:00
MythEclipse
a227c883e3
There are no staged changes to commit. The staging area is empty — stage some files first with git add and I can help craft the message.
2026-06-02 23:00:42 +07:00
MythEclipse
aac80e569f
perf(discord-gateway): parallelize all media downloads into single Promise.all batch
2026-06-02 22:59:33 +07:00
MythEclipse
c18954a263
The staging area is empty — there are no staged changes to summarize. Stage some files first with git add and I can help craft the message.
2026-06-02 22:58:41 +07:00
MythEclipse
9f0d0d06ad
If you meant to summarize the most recent (already committed) changes on this branch (41 commits ahead of origin/master), let me know and I can help craft a message for a squash or a summary instead.
2026-06-02 22:57:03 +07:00
MythEclipse
8150c5a20c
fix(discord-gateway): update tiktoken import to encoding_for_model and replace includeMediaInstructions boolean with mode enum
2026-06-02 22:52:05 +07:00
MythEclipse
acb7e86f07
No staged changes found. The staging area is empty.
2026-06-02 22:51:47 +07:00
MythEclipse
f163ead3cf
feat(discord-gateway): add local badword pre-filter, accurate token estimation, Piscina maxThreads config, and PromptMode support
2026-06-02 22:50:23 +07:00
MythEclipse
6d2da7ce1d
perf(discord-gateway): start AI moderation analysis immediately, running attachment uploads in parallel instead of blocking
2026-06-02 22:49:57 +07:00
MythEclipse
bf6ec728c4
chore(discord-gateway): remove stale eslint-disable comment for sticker cache stats
2026-06-02 22:20:46 +07:00
MythEclipse
00851e76da
There are **no staged changes** to work with — the working tree is clean and git diff --cached returned nothing.
2026-06-02 22:16:06 +07:00
MythEclipse
22b8e1a698
I can see the git command needs permission to run. Could you approve the git diff --cached command so I can see the staged changes and write the commit message?
2026-06-02 22:13:29 +07:00
MythEclipse
9b1f6b4a8d
There are no staged changes to summarize.
2026-06-02 22:13:03 +07:00
MythEclipse
57d28a08af
feat(ai-moderation): add per-batch timeout for text-only moderation calls
2026-06-02 22:12:32 +07:00
MythEclipse
4c5d76ea38
No staged changes detected. Would you like me to check unstaged changes instead?
2026-06-02 22:12:25 +07:00
MythEclipse
19028cf244
refactor: migrate discord-gateway from winston to @bete/shared/logger and utils
...
- Replace all local logger imports (../../shared/logger/logger.js) with @bete/shared/logger across 26 files
- Remove winston dependency, add pino to discord-gateway package.json
- Delete shared/logger/logger.ts (winston-based, 132 lines) and serialization.ts (109 lines)
- Replace local retryWithBackoff imports with @bete/shared/utils across 6 files
- Delete shared/utils/retry.ts (42 lines)
- Add CustomLogger type alias to @bete/shared/logger for backwards compatibility
- Remove logger param from all retryWithBackoff calls and uploadToTele interfaces
- Frontend: convert entity type files to re-exports from shared/api/client.ts
- Full monorepo typecheck clean (4/4 packages)
35 files changed, 42 insertions(+), 488 deletions(-)
2026-06-02 21:23:12 +07:00
MythEclipse and Claude Opus 4.8
363676b608
fix: remove dead OpenAI client instance and fix ChatCompletion type imports
...
- Delete unused OpenAI WAF bypass client block (60+ lines) from both monolith
and microservice llmModerationClient.ts
- Replace OpenAI.Chat.Completions.ChatCompletion with type-only ChatCompletion
import from openai/resources/chat/completions
- All LLM chat calls already go through centralized llmClient.ts helper
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-02 18:22:42 +07:00
MythEclipse
71de941470
chore: session auto-commit
2026-06-02 18:09:00 +07:00
MythEclipse
292fcbf238
chore: session auto-commit
2026-06-02 17:55:42 +07:00
MythEclipse
a2d4ba3f95
chore: auto-commit task -
2026-06-02 17:45:47 +07:00
MythEclipse
498ab73d62
chore: auto-commit task -
2026-06-02 17:08:42 +07:00
MythEclipse
406a6cbf79
refactor: migrate sticker cache to PostgreSQL, remove versioning
...
- Replace file-based sticker cache (.dat + index.json) with PostgreSQL sticker_cache table
- Remove model_version column and all versioning logic (git branch detection, GitHub API, CACHE_MODEL_VERSION)
- Strip VISION_MODEL_VERSION, logCacheEvent calls, and version filtering from SQL queries
- Remove STICKER_CACHE_DIR and STICKER_CACHE_MAX_SIZE_MB config variables
- Delete dead migration add_model_version_to_cache.sql
textCacheStore.ts reduced 482→204 lines (-57%)
stickerCache.ts reduced 210→144 lines (-31%)
Total: 11 files changed, 233 insertions, 591 deletions
2026-06-02 14:05:51 +07:00
MythEclipse
505c30f124
chore(discord-gateway): remove unused imports from response logger
...
- aiAnalyzer.ts: removed unused logAnalysisSummary and logFalsePositiveDetected
- llmModerationClient.ts: removed unused logVisionAnalysis, logVisionError, logRetryAttempt
These functions are not called in the codebase.
2026-06-02 12:36:05 +07:00
MythEclipse
1acd452a2c
fix(discord-gateway): resolve type errors in error logging - cast unknown error types to Error | string for logModerationError calls
...
- aiAnalyzer.ts: cast error to Error | string in individual fallback phase
- llmModerationClient.ts: cast parseError to Error | string in parse response phase
Fixes GitHub Actions build failure (exit code 2)
2026-06-02 12:30:59 +07:00
MythEclipse
385fc0bbbf
feat: add response logger for moderation/vision audit trail + cache model versioning
...
- Add responseLogger.ts with comprehensive logging: vision analysis, moderation
analysis batches, cache hit/miss events, errors, retries, false positives,
model version changes, cache invalidation
- Integrate responseLogger calls into llmModerationClient.ts (cache events,
moderation results, errors, retries)
- Add model_version column to text_analysis_cache schema with composite
index for efficient filtering
- Add migration SQL for model_version column
- Document CACHE_MODEL_VERSION in .env.example
2026-06-02 12:23:52 +07:00
MythEclipse and Claude Opus 4.8
74400376a0
fix: vision analysis retry + fallback jelas saat gagal
...
Vision API call sekarang pakai retryWithBackoff (2 retries instant).
Fallback message tegas: 'GAGAL DIANALISIS — JANGAN mengasumsikan aman'.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-02 11:41:18 +07:00
MythEclipse and Claude Opus 4.8
64643bb066
perf: hapus semua cooldown/backoff delay — retry tanpa bottleneck
...
Semua retry sekarang instant (retries=0, minTimeout=0, maxTimeout=0):
- retry.ts (kedua) — default minTimeout/maxTimeout 0, factor 1
- config.ts (kedua) — DECODER_COOLDOWN_MS=0, AI_ANALYSIS_ERROR_COOLDOWN_MS=0
- llmModerationClient.ts (kedua) — retries 0 tanpa delay
- aiAnalyzer.ts (kedua) — retries 0, AI_ANALYSIS_ERROR_COOLDOWN jadi 0
- indonesianTextNormalizer.ts (kedua) — semua rate limit cooldown 0
- recorder.ts (kedua), teleUpload (3 files), uploader (2 files) — retry instant
- attachmentUploader (kedua) — retries 0
- syncRoutes.ts — BACKLOG_SYNC_COOLDOWN 0
20 files changed. Semua cooldown bottleneck dihapus.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-02 11:29:52 +07:00
MythEclipse and Claude Opus 4.8
55ee8ade16
fix: vision model hanya deskripsi, tidak memutuskan moderasi
...
Root cause: vision model diminta untuk 'flag' dan 'menilai' gambar,
sehingga screenshot terminal/chat biasa diklaim sebagai 'situs perjudian'.
Fix:
- vision prompt: HANYA deskripsi objektif (objek, teks, layout, jenis gambar)
- larang tegas kata 'gambling', 'judi', 'pelanggaran', 'harus dihapus'
- tambah buildGeneralImageVisionPrompt di discord-gateway stickerPrompt
- MEDIA_INSTRUCTIONS: tegaskan batch LLM adalah hakim, vision hanya saksi mata
- deskripsi netral (terminal, chat, editor kode) tidak boleh jadi dasar flag
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-02 11:08:41 +07:00
MythEclipse and Claude Opus 4.8
f1ddca5eee
fix: false positive gambling detection + route collision + WS events ( #1 )
...
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-02 10:44:27 +07:00
MythEclipse and Claude Opus 4.8
c48a0c5e3b
refactor: split monolith into 3 microservices (frontend, backend, discord-gateway)
...
- Extract services into services/{frontend,backend,discord-gateway}
- Create packages/shared/ for shared logger, errors, utils, types
- Setup Modular MVC pattern in backend (controller→service→repository)
- Setup event-driven architecture in discord-gateway with Redis pub/sub
- Move Docker files to infra/docker/ with per-service Dockerfiles
- Update docker-compose.yml to use Traefik-only routing (no port exposes)
- Update GitHub Actions deploy workflow for multi-service matrix build
- Fix all import paths and resolve type errors across all services
- All 3 services pass tsc --noEmit clean
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-01 21:44:29 +07:00