26-source OSINT intelligence engine with live Jarvis dashboard, auto-refresh via SSE, optional LLM layer (4 providers), delta/memory system, and Telegram breaking news alerts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
793 B
JavaScript
25 lines
793 B
JavaScript
#!/usr/bin/env node
|
|
|
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
import { join } from 'node:path';
|
|
import { fullBriefing } from './briefing.mjs';
|
|
|
|
function formatTimestamp(date = new Date()) {
|
|
return date.toISOString().replace(/[:]/g, '-').replace(/\.\d{3}Z$/, 'Z');
|
|
}
|
|
|
|
const runsDir = join(process.cwd(), 'runs');
|
|
await mkdir(runsDir, { recursive: true });
|
|
|
|
const data = await fullBriefing();
|
|
const json = JSON.stringify(data, null, 2);
|
|
const timestamp = formatTimestamp(new Date(data.crucix.timestamp));
|
|
const runFile = join(runsDir, `briefing_${timestamp}.json`);
|
|
const latestFile = join(runsDir, 'latest.json');
|
|
|
|
await writeFile(runFile, json, 'utf8');
|
|
await writeFile(latestFile, json, 'utf8');
|
|
|
|
console.error(`[Crucix] Saved UTF-8 briefing to ${runFile}`);
|
|
console.log(json);
|