Spaces:
Runtime error
Runtime error
Download scripts/trigger_weekly.js from dazat-knight/nexa-server: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/spaces/dazat-knight/nexa-server/resolve/main/scripts/trigger_weekly.js
- Command line
-
hf download hf://spaces/dazat-knight/nexa-server/scripts/trigger_weekly.js
-
curl -L -o trigger_weekly.js https://huggingface.co/spaces/dazat-knight/nexa-server/resolve/main/scripts/trigger_weekly.js
1.56 kB
| const env = require('../src/config/env'); | |
| const inferenceEngine = require('../src/domain/Inference_Engine'); | |
| const { sendTelegramOutbound } = require('../src/interfaces/webhook'); | |
| (async () => { | |
| console.log('π Memulai Manual Trigger Weekly Cognitive Sunday Pass...'); | |
| try { | |
| const result = await inferenceEngine.runWeeklyIdentityInference(); | |
| console.log('β Selesai:', result); | |
| if (result.success && result.saved > 0) { | |
| const summaryMsg = [ | |
| `π§ <b>Weekly Identity Inference Selesai</b>`, | |
| `<i>(Siklus Pemahaman Mingguan N.E.X.A β Manual Trigger)</i>`, | |
| '', | |
| `π Hipotesis yang dianalisis : <b>${result.totalHypotheses}</b>`, | |
| `β Proposal baru tersimpan : <b>${result.saved}</b>`, | |
| `π¨ Dikirim untuk review : <b>${result.pendingSent}</b>`, | |
| `π Di-stage (bukti kurang) : <b>${result.staged}</b>`, | |
| `β‘ Diabaikan (duplikat/lemah): <b>${result.skipped}</b>`, | |
| '', | |
| result.pendingSent > 0 | |
| ? `π‘ Silakan review proposal identitas di atas, Tuan.` | |
| : `π Semua hipotesis minggu ini di-stage untuk observasi lanjutan.` | |
| ].join('\n'); | |
| await sendTelegramOutbound(summaryMsg, true); | |
| } else { | |
| await sendTelegramOutbound(`π§ <b>Weekly Identity Inference Selesai</b>\n\nTidak ada hipotesis baru (atau observasi belum cukup untuk menarik kesimpulan baru). Model identitas stabil.`, true); | |
| } | |
| } catch (err) { | |
| console.error('β Error:', err.message); | |
| } finally { | |
| process.exit(0); | |
| } | |
| })(); | |