Spaces:
Runtime error
Runtime error
File size: 1,555 Bytes
fb15d01 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 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);
}
})();
|