24 lines
987 B
TypeScript
24 lines
987 B
TypeScript
// goals section — surface canon conflicts, debts, unresolved trouble, and
|
|
// faction tensions the encounter could steer toward, contextual to the vibe.
|
|
// The wizard names the top ~3-4 as AskUserQuestion "what does this steer
|
|
// toward?" options (primary goals), plus any loss/secondary hooks.
|
|
//
|
|
// Usage: GRAPHMCP_URL=http://localhost:9000 npx tsx scripts/lore-hooks.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-hooks.ts "<vibe>" [limit]');
|
|
process.exit(2);
|
|
}
|
|
|
|
try {
|
|
await printOptions(sectionQuery('Mardonar conflicts, debts, unresolved trouble, faction tensions, and what could go wrong or be settled', vibe), limit);
|
|
} catch (err) {
|
|
console.error(`GraphMCP lookup failed: ${String((err as Error)?.message ?? err)}`);
|
|
process.exit(1);
|
|
} |