Files
zalbot/scripts/lore-locations.ts
Kaysser Kayyali b884a13d98
Some checks failed
tests / Unit tests (Node 22) (push) Failing after 28s
fix wizard for new stories
2026-06-20 06:52:19 +00:00

23 lines
890 B
TypeScript

// Setting section — surface canon locations / landmarks / districts / cities
// contextual to the encounter's vibe. The wizard reads the ranked chunks and
// names the top ~3-4 as AskUserQuestion "which location?" options.
//
// Usage: GRAPHMCP_URL=http://localhost:9000 npx tsx scripts/lore-locations.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-locations.ts "<vibe>" [limit]');
process.exit(2);
}
try {
await printOptions(sectionQuery('Mardonar locations, landmarks, districts, cities, and notable places', vibe), limit);
} catch (err) {
console.error(`GraphMCP lookup failed: ${String((err as Error)?.message ?? err)}`);
process.exit(1);
}