⬡
WATCHDOG — Continuous platform health monitor. Runs 8 checks every 10 minutes. Alerts fire to Supabase
watchdog_alerts + HAMAYA Risk Register. Covers API health, PM2 cluster, Supabase connection, ADM threshold, disk usage, Beast KB staleness, VIDHUR escalation spike.Check Frequency
8
every 10 minutes
API Status
—
api.flybytheway.com
Supabase
—
Mumbai region
Open Alerts
—
unresolved
PM2 Workers
6
cluster online
Beast KB
v5.2
last updated
⬡ Platform Health — Live
Loading…
WATCHDOG Checks — All 8
| # | Check | Trigger | Action |
|---|---|---|---|
| 1 | API Health | 3 consecutive failures | CRITICAL alert → HAMAYA Risk |
| 2 | PM2 Cluster | Any worker offline | HIGH alert → HAMAYA Risk |
| 3 | Supabase Connection | REST ping failure | CRITICAL alert |
| 4 | ADM Threshold | >5 ADMs in 7 days | HIGH alert → Maya review |
| 5 | Disk Usage | >80% VPS disk | MEDIUM alert |
| 6 | Beast KB Staleness | KB not updated >30 days | MEDIUM alert |
| 7 | VIDHUR Escalation Spike | >10 escalations in 24h | HIGH alert → investigate |
| 8 | Hold Booking TTL Expiry | TTL <2h on held booking | AMBER alert → Booking Manager |
Recent WATCHDOG Alerts
Click Load to fetch alerts
Cron Schedule
# VPS — admin crontab (not root)
# WATCHDOG — every 10 minutes
*/10 * * * * /usr/bin/python3 /opt/travel-management/flybrain/watchdog.py >> /opt/travel-management/flybrain/logs/watchdog.log 2>&1
# Alerts route to:
# POST /api/watchdog/alert → watchdog_alerts (Supabase) + HAMAYA_Risk_Register
# WATCHDOG — every 10 minutes
*/10 * * * * /usr/bin/python3 /opt/travel-management/flybrain/watchdog.py >> /opt/travel-management/flybrain/logs/watchdog.log 2>&1
# Alerts route to:
# POST /api/watchdog/alert → watchdog_alerts (Supabase) + HAMAYA_Risk_Register
▣
Booking Manager — Phase 6. Manages all booking queues end-to-end. CONFIRMED (issued tickets), HOLD (Beast-gated, TTL active), VOID (same-day BSP), CANCELLED (post-void refund). Gated on IATA accreditation for live operations. Architecture fully mapped.
✓ Confirmed Queue
—
Issued tickets · E-ticket generated · GST invoiced
⏸ Hold Queue
—
Beast-cleared · TTL active · Pending issuance
⊘ Void Queue
—
Same-day void · BSP rules · Carrier overrides
✕ Cancelled Queue
—
Post-void · Refund initiated · DGCA SLA tracked
Queue Intelligence — How Each Works
| Queue | Entry Trigger | Beast Role | TTL | Exit |
|---|---|---|---|---|
| CONFIRMED | Booking confirmed via /api/book | Beast ran before booking · severity logged | None — ticket issued | Void (same day) or Cancel |
| HOLD | Passenger selects Hold on checkout | Beast must return CLEAR or LOW — HIGH/CRITICAL cannot be held | Economy 24h · Prem Eco 48h · Business/First 72h | Issue (ticket generated) or TTL expiry (auto-cancel) |
| VOID | Same calendar day of issuance | BSP_VOID Engine v2.0 — 8 markets, 30+ carrier rules | Must be voided before midnight IST | Refund processed · BSP credit |
| CANCELLED | Post-void or passenger request | ATPCO Cat 31/33 fare rules applied | DGCA: 7-day refund SLA (domestic) · Airline SLA (intl) | Refund to original payment method |
Hold Booking — Beast Gate Rules
| Cabin | Hold TTL | Beast Requirement | Who Uses |
|---|---|---|---|
| Economy | 24 hours | Beast CLEAR or LOW only | B2C · B2B agents |
| Premium Economy | 48 hours | Beast CLEAR or LOW only | B2C · B2B agents |
| Business | 72 hours | Beast CLEAR or LOW only | Corporate · B2B |
| First Class | 72 hours | Beast CLEAR only | Corporate accounts |
WATCHDOG checks all HOLD bookings every 10 minutes. At TTL −2 hours → AMBER alert fired. At TTL expiry → auto-cancel triggered. No revenue loss from expired holds.
Phase 6 Endpoints — Build Plan
| Endpoint | Duffel API | Rule | Status |
|---|---|---|---|
| GET /api/booking/:ref | GET /air/orders/{id} | — | Post-IATA |
| POST /api/void | POST /air/order_cancellations | BSP_VOID v2.0 | Post-IATA |
| POST /api/cancel | POST /air/order_cancellations | ATPCO Cat 31/33 · DGCA | Post-IATA |
| POST /api/change | POST /air/order_change_requests | Cat 31 reissue rules | Post-IATA |
| POST /api/hold/issue | POST /air/orders (from hold) | TTL must not be expired | Post-IATA |
| GET /api/eticket/:ref | GET /air/orders/{id}/documents | — | Post-IATA |
| POST /api/refund | POST /air/refund_requests | DGCA 7-day SLA | Post-IATA |
IATA Gate — What Unlocks Booking Manager
1
IATA Accreditation confirmed
Section 8 complete · Air India + IndiGo documents uploaded · Bank + CA statements
2
Razorpay KYC approved + live payment gate wired
Merchant ID: TARYB9ksqJc8f7 · Wire into checkout.html → server.js payment route
3
Duffel live key activated
Switch DUFFEL_KEY in .env from test to live — Maya confirms only
4
Build Phase 6 endpoints in server.js
7 endpoints above · Python3 heredoc method only · node --check each time
5
Wire Booking Manager queues to checkout.html
CONFIRMED / HOLD / VOID / CANCEL flows connected · WATCHDOG monitors TTL
◉
Scout — IRROPS Monitor. Monitors airline operational disruptions — cancellations, diversions, ground stops, delays >3 hours. When a disruption is detected, Scout matches affected bookings in
fbtw_bookings, fires HAMAYA IRROPS_Alerts flow, routes affected PNRs to Booking Manager, and notifies passengers via VIDHUR.Deploy Status
Staged
Script exists · Not cron'd
Check Interval
30m
target frequency
PA Flow
LIVE
IRROPS_Alerts ready
Supabase Table
Pending
irrops_alerts · not created
Scout — How It Works
1
Detect Disruption
Scout polls airline status pages, FlightAware API, OAG disruption feeds every 30 minutes. Triggers: cancellation, diversion, delay >3h, ground stop.
2
Match Affected Bookings
Queries
fbtw_bookings in Supabase — finds PNRs on the disrupted flight/carrier/route. Status: CONFIRMED or HOLD.3
Fire HAMAYA IRROPS Alert
POST to HAMAYA_IRROPS_Alerts Power Automate flow → SharePoint IRROPS register. Maya sees disruption + affected booking count.
4
Route to Booking Manager
Affected PNRs moved to IRROPS sub-queue in Booking Manager. Rebooking options fetched from Duffel. EU261/DGCA passenger rights calculated.
5
Passenger Notification
VIDHUR sends proactive alert to passenger email/phone. Rights explained. Rebooking link provided. No passenger left uninformed.
Passenger Rights — Scout Applies These
| Regulation | Applies | Right |
|---|---|---|
| DGCA CAR Section 3 | All Indian domestic flights | Full refund or alternate within 6h · Meal voucher if delay >2h |
| EU Regulation 261/2004 | Flights from EU airports | Compensation €250–€600 · Full refund or rerouting |
| US DOT Rule | Flights to/from USA | Full refund if cancelled · No voucher required |
| IATA Resolution 735 | International involuntary | Rerouting on next available · Endorsement to other carrier |
Scout Deploy Checklist
Review scout.py at /home/admin/flybytheway/agent/irrops_scout/
PendingCreate irrops_alerts table in Supabase SQL Editor
Not doneWire IRROPS_Alerts PA flow to scout.py output
Not doneAdd cron: */30 * * * * python3 ...scout.py
Not doneIRROPS_Alerts Power Automate flow
Livefbtw_bookings table (for PNR matching)
Live
◎
FlyBrain — Executive Intelligence Layer. The command intelligence that feeds all other agents. GRAND Feed monitors 41 sources daily. Market Monitor tracks 6 competitor platforms. FlyBrain is the brain — WATCHDOG, Scout, Beast KB, and Booking Manager all receive their intelligence signals from FlyBrain.
GRAND Feed
LIVE
6AM UTC daily
Sources
41
Airlines · Competitors · GDS · Regulators
Daily Brief
LIVE
4AM UTC · Maya direct
Register Audit
LIVE
Sunday 6AM UTC
Market Monitor
Staged
8AM UTC · deploy pending
Groups Built
4
of 26 total (A–Z)
FlyBrain — Agent Intelligence Flow
G
GRAND Feed → All Agents
41 sources scanned daily. Findings → HAMAYA_Agent_Intelligence_Register. Policy changes → Beast KB pending. Carrier reliability signals → Scout + Booking Manager. Competitor moves → Maya direct.
B
Daily Brief → Maya
4AM UTC every day. Platform KPIs, bookings, Beast stats, escalations, ADM ledger, competitor alerts. Maya's morning intelligence digest.
M
Market Monitor → Strategy
6 competitor platforms tracked: MakeMyTrip myBiz, Cleartrip, EaseMyTrip, Yatra, BrightSun, TBO. Pricing signals, product changes, UI changes detected → HAMAYA Intel Register.
J
Register Audit → Governance
Sunday 6AM UTC. 9 HAMAYA SharePoint registers audited. 27 checks. Zero errors confirmed. Compliance health snapshot delivered.
N
NDC Sync → Beast KB [Planned]
NDC policy changes from Amadeus, Sabre, Travelport, Duffel, Verteil → automatically queued as Beast KB pending update → HAMAYA approval gate.
P
Policy Scanner → VIDHUR + Beast [Planned]
Visa rule changes, transit requirement updates, health certificate changes → Supabase visa_transit_matrix + transit_airport_master updates → HAMAYA review → instant deploy.
GRAND Feed — 41 Sources
Competitors (9)
MakeMyTrip myBiz · Cleartrip OOO · EaseMyTrip · Yatra · BrightSun Travel · Ish Travel · Riya Travels · Southall Travel · TBO
Distribution (7)
Amadeus · Sabre · Travelport · Verteil NDC · IATA NDC · SITA · ATPCO
Airlines (25)
AI · 6E · SG · QP · EK · EY · QR · G9 · WY · LH · BA · TK · KL · AF · SQ · CX · MH · UL · GF · UA · AA · DL · B6 · AS · MS
Regulators (6)
IATA · ICAO · DGCA India · FAA · EASA · AAI
Group Status — A to Z Build Sequence
| Group | Name | Output | Cron | Status |
|---|---|---|---|---|
| B | Daily Briefing | Morning digest → Maya email | 4AM UTC daily | Live |
| G | GRAND Feed | 41 sources → HAMAYA Intel Register | 6AM UTC daily | Live |
| H | WATCHDOG | 8 health checks → Supabase + HAMAYA | Every 10 min | Deploy pending |
| J | Register Audit | 9 registers · 27 checks | Sunday 6AM UTC | Live |
| M | Market Monitor | 6 competitors → HAMAYA Intel | 8AM UTC daily | Deploy pending |
| N | NDC Sync | Policy changes → Beast KB pipeline | Planned | Not built |
| P | Policy Scanner | Visa/transit changes → Supabase | Planned | Not built |
| S | Scout Integration | IRROPS → Booking Manager | Every 30 min | Script exists |
⚡
Beast KB Auto-Update Pipeline — LIVE. When aviation intelligence changes (visa rules, carrier policies, BSP void rules), a KB update is submitted here. HAMAYA approval gate fires. On approval, Beast Engine reads the update on its very next compliance check. No server restart. No blind updates.
Submit KB Update
Check Number (1–37)
Severity
Updated Rule
Source / Reference
Pipeline — How It Works
1
Change Detected
GRAND Feed / Market Monitor / Manual submission here → KB update submitted
2
Supabase — PENDING
Written to
beast_kb_pending_updates · status: PENDING3
HAMAYA Notified
HAMAYA_Risk_Register webhook fires · Maya reviews in SharePoint
4
Maya Approves / Rejects
Approve or reject below → POST /api/hamaya/beast-kb-approve
5
Instant Activation
Beast Engine reads from Supabase on every check · No restart · No blind changes
Pending Updates
Click Load to fetch pending KB updates