import { notifyToolStart, notifyToolEnd } from '../src/notifications/discordToolNotifier'; const webhook = process.env.DISCORD_TOOL_NOTIFIER_WEBHOOK; async function main() { if (!webhook) { console.error('Set DISCORD_TOOL_NOTIFIER_WEBHOOK env var to test'); process.exit(1); } await notifyToolStart({ webhookUrl: webhook, toolName: 'pump-run', callId: 'test-123', args: { duration: '5s', mode: 'manual', token: 'supersecret' }, }); await new Promise((r) => setTimeout(r, 1200)); await notifyToolEnd({ webhookUrl: webhook, toolName: 'pump-run', callId: 'test-123', args: { duration: '5s', mode: 'manual' }, resultText: 'Pump run completed successfully. Water dispensed: 200ml', startTimestamp: Date.now() - 1200, endTimestamp: Date.now(), }); } main().catch((e) => { console.error(e); process.exit(1); });