23 lines
917 B
TypeScript
23 lines
917 B
TypeScript
// openingNarrative section — surface the atmosphere, recent events, and live
|
|
// tensions at/around the chosen place, contextual to the vibe. The wizard
|
|
// folds these into the examples it offers while the user writes the opening.
|
|
//
|
|
// Usage: GRAPHMCP_URL=http://localhost:9000 npx tsx scripts/lore-atmosphere.ts "<vibe>" [limit]
|
|
// Exit 0 with results / 1 on fetch failure / 2 on usage error.
|
|
|
|
import { printOptions, sectionQuery } from './loreShared.js';
|
|
|
|
const vibe = process.argv[2];
|
|
const limit = Number(process.argv[3] ?? 8);
|
|
|
|
if (!vibe) {
|
|
console.error('Usage: npx tsx scripts/lore-atmosphere.ts "<vibe>" [limit]');
|
|
process.exit(2);
|
|
}
|
|
|
|
try {
|
|
await printOptions(sectionQuery('Mardonar atmosphere, recent events, tensions, dangers, and what is happening right now', vibe), limit);
|
|
} catch (err) {
|
|
console.error(`GraphMCP lookup failed: ${String((err as Error)?.message ?? err)}`);
|
|
process.exit(1);
|
|
} |