Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sightmap-next

Next.js compatibility layer for Sightmap and Sightkick, with an integration for Vercel's agent-browser. A Next.js app that carries a .sightmap/ corpus ships WebMCP tools on every deploy, with no change to application code, and those tools are what agent-browser, the ChatGPT browser, and Chrome's native surface call by name.

flowchart LR
  corpus[".sightmap/<br/>what the app is"] & tools[".sightkick/<br/>what it can do"] --> build["sightmap-next build"]
  build --> wk["/.well-known/sightmap.json<br/>/.well-known/sightkick.json"]
  build --> init["webmcp.init.js"]
  wk --> comp["&lt;SightkickTools/&gt;"] --> mc["document.modelContext<br/>(WebMCP)"]
  init -- "--init-script" --> mc
  mc --> ab["agent-browser<br/>webmcp list · invoke"]
  plans["plans/*.plan.json"] -- "sightmap-next run-plan" --> ab
Loading
Path What
packages/next @sightmap/next: sightmap-next seed / build / run-plan, and <SightkickTools/>
examples/with-sightmap-webmcp A Next.js 16 task board with a corpus, nine tools, three Gherkin features, and stamped plans
examples/with-sightmap-storefront A Next.js 16 storefront (route groups, dynamic routes, route handlers) with six views, 34 tools, six scenarios, and the adapter's end-to-end test
docs/proposal.md The write-up: where this sits relative to sitemap.ts, what was verified, the PR sequence for the Vercel repos

Quick start

npm install
npx agent-browser install                      # Chrome for Testing 152, which has native WebMCP
npm run build:example && npm run start:example &
npx agent-browser open localhost:3000 && npx agent-browser webmcp list
npm run test:plans                              # replays the Gherkin scenarios, no model in the loop

The example board after agent-browser invoked add_task A task page after agent-browser invoked open_task and mark_done

The storefront is the larger test bed. test:e2e needs the app running and checks the served artifacts, native registration, view scoping on every route, SPA re-registration, guidance, the --init-script path, and replays its six plans:

npm run build:storefront && npm run start:storefront &
npm run test:e2e

The storefront catalog after agent-browser invoked quick_add_to_cart and filter_by_category An order confirmation reached through WebMCP tool calls alone

In your own app

npm i -D @sightmap/sightmap @sightmap/sightkick agent-browser && npm i @sightmap/next
npx sightmap-next seed          # .sightmap/ stubs from app/**/page.*, never overwrites
# curate against `next dev` with the sightmap-authoring skill; write .sightkick/tools.yaml
npx sightmap-next build         # public/.well-known/*, public/sightkick-runtime.js, webmcp.init.js
// app/layout.tsx
import { SightkickTools } from "@sightmap/next";
import ir from "../public/.well-known/sightkick.json";
// …
<SightkickTools ir={ir} />

Requires Chrome 152+ for agent-browser to see the tools: it reads the browser's native WebMCP registry over CDP, so a JavaScript polyfill is invisible to it.

Contributing

npm test runs the package tests. Commits are signed off (git commit -s), as in the other Sightmap repos. A user-facing change to packages/next carries a changeset (npm run changeset); merging to main opens a Version Packages PR, and merging that publishes @sightmap/next. See .changeset/README.md. MIT, see LICENSE.

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages