Skip to content

feat: Skylark Air WebMCP flight-booking demo#291

Draft
bookernath wants to merge 1 commit into
mainfrom
feat/webmcp-flights-demo
Draft

feat: Skylark Air WebMCP flight-booking demo#291
bookernath wants to merge 1 commit into
mainfrom
feat/webmcp-flights-demo

Conversation

@bookernath

@bookernath bookernath commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What

A new WebMCP demo — Skylark Air, a flight-booking Copilot — that fills the gap the existing demos miss: a multi-step form with repeater fields, cross-field validation, and an approval-gated commit. The Copilot and the on-page controls drive the same BookingStore, so flight selection, passenger details, and seat picks render identically whoever made the change.

The centerpiece: seat-map tool design

get_seat_map returns a rows × columns grid (array of arrays) so the agent reads human seat concepts straight from the data shape:

  • window vs aisle vs middlecolumnTypes legend (window = first/last column) + each cell's own type
  • adjacency ("two together") — neighbors in a row's seats array
  • near the front — ascending row
  • legroom / exit row — per-cell exitRow / extraLegroom

Structured JSON only, no image round-trip — it runs on a text model. Verified output, row 14: 14A:w 14B:mx 14C:a 14D:a 14E:m 14F:wx.

Tool surface

Group Tools Approval
Reads get_booking_state, search_flights, get_seat_map auto
Form fills select_flight, set_passengers, update_passenger, assign_seat auto
Commit confirm_booking, reset_booking gated

Validation (return ≥ depart, taken/nonexistent seats, missing passenger details, unseated passengers before confirm) lives in the tool handlers and surfaces as relayed errors.

Changes

  • packages/proxyWEBMCP_FLIGHTS_FLOW (nemotron, markdown) teaching the booking workflow + how to read the seat grid; exported from flows/index.ts; mounted at /api/chat/dispatch-flights in both vercel-edge/src/server.ts and api/index.ts. Changeset included (minor).
  • examples/embedded-appwebmcp-flights demo: store.ts, catalog.ts (deterministic flights + seat-map generator), tools.ts, app.ts (page UI with agent-touch flash), main.ts (docked widget, Skylark theme, live {{booking_context}} via contextProviders → requestMiddleware). Registered in vite.config.ts, the index carousel/pattern-links, and the demo list.

Verification

  • pnpm build:proxy ✅ · proxy typecheck ✅ · proxy lint
  • All demo TS modules compile + serve through Vite (200); no errors in src/webmcp-flights
  • Core logic unit-checked: determinism, seat-map shape, window=first/last column, exit-row legroom, self-describing cells, business 4-abreast — all PASS
  • Driven live end-to-end against staging: proxy authenticates upstream → WebMCP Flights Flow streams flow_start/step_deltas, Copilot engages the tools

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-sdk-webmcp Ready Ready Preview, Comment Jun 26, 2026 9:20pm
persona Ready Ready Preview, Comment Jun 26, 2026 9:20pm
persona-proxy Ready Ready Preview, Comment Jun 26, 2026 9:20pm

Request Review

A new WebMCP demo that fills the gap the existing ones miss: a multi-step
booking form with repeater fields, cross-field validation, and an
approval-gated commit. The Copilot and the on-page controls drive the same
BookingStore, so flight selection, passenger details, and seat picks render
identically whoever made the change.

Centerpiece is the seat-map tool design: get_seat_map returns a rows x
columns grid (array of arrays) so the agent reads human seat concepts —
window vs aisle (column position + per-cell type), adjacency (row array
order), "near the front" (ascending row), exit-row/extra-legroom — straight
from the data shape. Structured JSON only, no image round-trip, so it runs
on a text model.

- packages/proxy: WEBMCP_FLIGHTS_FLOW (nemotron, markdown) teaching the
  booking workflow + how to read the seat grid; mounted at
  /api/chat/dispatch-flights in both vercel-edge entry points
- examples/embedded-app: webmcp-flights demo (store, catalog + seat-map
  generator, WebMCP tools, page UI with agent-touch flash, widget mount with
  live {{booking_context}}); registered in vite config, index carousel, and
  the demo list
- Tools: search_flights, get_seat_map, get_booking_state (reads);
  select_flight, set_passengers, update_passenger, assign_seat (auto-approve
  form fills); confirm_booking, reset_booking (approval-gated). Validation
  lives in the tool handlers and surfaces as relayed errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant