Inspiration

A late-night flight cancellation can disrupt the flight, the final airport ride and an existing hotel reservation together. Nightjar explores recovery across all three while preserving existing reservations and keeping new commitments within an explicit budget and arrival deadline. This scenario is a product hypothesis, not a claim based on traveller interviews.

What it does

The prototype computes a connected plan, records approval for that exact plan version and spending limit, and executes the steps in order. In its fictional SFO-to-LAX scenario, a $234 recovery fits a $300 budget and reaches the hotel at 00:45. Prices, schedules and reservations are fixtures, not current travel information.

The separate Node.js technical proof introduces a difficult failure: the transfer supplier saves a booking but loses its response. Nightjar preserves the earlier receipts and writes the unknown outcome to disk. After the actual server process is forcibly terminated and restarted, the client retrieves the saved state and reconciles the existing transfer. The recorded run produces one transfer creation and one reconciliation lookup. Repeating execution leaves supplier counts unchanged.

How it is built

Node.js provides the HTTP service and durable JSON checkpoint. The official MCP SDK implements Streamable HTTP and protocol 2025-11-25, with get_recovery_state, plan_recovery and execute_recovery tools. Approval is recorded separately from the MCP tool surface. The published source also includes an English web interface.

Challenges and testing

Regression tests exposed and helped fix approval-version reuse after reset and loss of earlier receipt history during an infeasible replan. Plan versions now remain monotonic across reset and restart, and earlier execution receipts survive replanning.

A clean installation and the full 48-test suite, TypeScript checks and project-specific syntax/security lint passed on October 9, 2026. The 117-second main video shows real interface interaction with a private cloud Worker/D1 adaptation: plan selection, spending approval, a simulated failure, refresh-based recovery and receipt review. Travel suppliers and payments are simulated. The public repository remains the original Node.js reference implementation. A separate 94-second technical proof records actual MCP and HTTP execution, including forced process termination, restart, reconciliation and repeat execution.

Contribution and AI assistance

I participated in the project's design and testing. AI assistance generated the implementation and contributed substantially to concept framing, architecture, test design, debugging and documentation. The prototype was developed under my direction in an assistant-managed cloud workspace. I am not claiming that I wrote the code or that the work was exclusively human-authored.

This AI-assisted workflow gave me significant learning value and useful AI experience for my work. I would use it again because it greatly saves time and workload.

Limitations

All travel suppliers, prices, reservations and approval decisions in the recording are synthetic. Planning is deterministic; the conversation is scripted. There is no live Alexa connection, language-model call, payment or external travel booking. Browser visual and accessibility checks remain incomplete. The project has not been tested with real travellers, and no reduction in stress, cost or recovery time is claimed. Local consent and single-process JSON storage are prototype mechanisms, not production authorization or multi-user infrastructure.

Run and evaluate

Use Node.js 24.19.0. Clone https://github.com/liutongxian/nightjar, run npm ci --ignore-scripts, then npm run check. Run npm start for the local web app, or npm run demo:proof and npm run proof:crash for protocol and recovery evidence. No account, API key, live payment or provider connection is required. See JUDGE_GUIDE.md in the repository for detailed evaluation instructions.

Project-specific source is MIT-licensed; third-party dependencies retain their respective licenses. No AWS service is used.

Built With

Share this project:

Updates

Submission history