Initial release — Crucix Intelligence Engine v2.0.0
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>
This commit is contained in:
24
apis/save-briefing.mjs
Normal file
24
apis/save-briefing.mjs
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/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);
|
||||
Reference in New Issue
Block a user