24 lines
997 B
TypeScript
24 lines
997 B
TypeScript
// randomizable section — surface canon vocabulary (names, items, terms,
|
|
// flavors) that could vary per run, contextual to the vibe. These become the
|
|
// `query` prompts for `randomizable` draws (per-run names for archetypal NPCs,
|
|
// the specific item, a complication, a background detail).
|
|
//
|
|
// Usage: GRAPHMCP_URL=http://localhost:9000 npx tsx scripts/lore-vocabulary.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-vocabulary.ts "<vibe>" [limit]');
|
|
process.exit(2);
|
|
}
|
|
|
|
try {
|
|
await printOptions(sectionQuery('Mardonar names, items, terms, and flavor that varies — personal names, goods, complications, local color', vibe), limit);
|
|
} catch (err) {
|
|
console.error(`GraphMCP lookup failed: ${String((err as Error)?.message ?? err)}`);
|
|
process.exit(1);
|
|
} |