Node.js sidecar and helper functions for BattleLuck — battle-intelligence enrichment and Stripe-to-Discord relay.
The BattleLuck C# plugin calls HTTP endpoints exposed by this sidecar when ai_sidecar.enabled is on in config/BattleLuck/ai_config.json.
GET /healthPOST /api/query/enrich
Optional:
POST /stripe/discord
npm install
npm run build
npm startDefault sidecar base URL for local dev: http://localhost:3000
BATTLELUCK_SHARED_SECRET— bearer token shared with the C# pluginBATTLELUCK_ALLOW_PUBLIC_HEALTH— whentrue,/healthis publicly accessibleBATTLELUCK_CORS_ALLOWED_ORIGINS— comma-separated allowed browser originsBATTLELUCK_CORS_ALLOW_ALL_ORIGINS— whentrue, responds withAccess-Control-Allow-Origin: *PORT— sidecar port (default3000)STRIPE_SIGNING_SECRET— Stripe webhook signature secretDISCORD_WEBHOOK_URL— Discord webhook for Stripe relayPG_CONNECTION_URL— optional Postgres connection for battle stats
bl.aistatus/bl.ai <question>bl.ai.status/bl.ai.test <query>/bl.ai.event
See INTEGRATION_SETUP.md for full configuration details.