Skip to content

Repository files navigation

Workshop starter

A minimal scaffold that handles the starter plumbing — Copilot SDK session, auth, WebSocket bridge, and Hydra canvas setup — so you can spend the workshop on the creative work.

What's done for you

  • Copilot SDK server with a working session, streaming event subscriptions, and a /ws/agent WebSocket route.
  • Auth gate UI that runs copilot auth login and waits for sign-in before launching the app.
  • Hydra installed and attached to a canvas. After init, Hydra's globals (osc, noise, shape, gradient, solid, src, o0..o3, s0..s3, render, width, height, time, etc.) are available on window.
  • A typed CopilotConnection client with handlers for every assistant event (status, intent, reasoning, tokens, tool calls).
  • A placeholder system prompt with a TODO.

What you'll build

Everything else — chat UI, code editor, the protocol the model follows, visuals, music, whatever your project needs. Nothing is rendered into <main id="app"> until you put something there.

Prerequisites

  • Node.js 20 or newer.
  • The GitHub CLI (gh). Sign in once with gh auth login — the Copilot SDK picks this up automatically.

Alternatively, install the Copilot CLI (npm i -g @github/copilot) and use its device-flow sign-in via the in-app login overlay.

Run it

npm install
npm run dev

Web app: http://localhost:5173. Server: http://localhost:5174.

If anything looks off, run:

npm run doctor

It checks Node version, gh auth, Copilot SDK auth, and that the dev servers are reachable.

Where to start

File What it is
apps/server/system-prompt.md The instructions the model sees. Replace the TODO with your real prompt.
apps/server/src/system-prompt.ts Tiny loader that reads the markdown above. You usually won't touch this.
apps/web/src/main.ts App boot. After auth + Hydra init, the rest is yours.
apps/web/src/copilot.ts CopilotConnection — import this from your UI to talk to the assistant.
apps/web/src/hydra.ts initHydra(canvas) and evalHydra(code) — drive visuals however you want.
packages/shared/src/index.ts The full AgentEvent union — every kind of message the server can send.
apps/server/src/agent.ts SDK session wiring. You usually won't need to touch this.

Layout

workshop-starter/
├── apps/
│   ├── web/          # browser app (Hydra canvas + auth gate, no UI yet)
│   └── server/       # Copilot SDK session + WebSocket bridge
├── packages/
│   └── shared/       # types shared by both
├── .mcp.json         # MCP servers (Playwright + Microsoft Learn) for AI tooling
└── README.md

MCP servers

.mcp.json configures two Model Context Protocol servers any MCP-aware client (Copilot CLI, Claude Code, etc.) can use:

  • Playwright — browser automation. Useful for letting an assistant drive your app while you build it.
  • Microsoft Learn — fetch official Microsoft documentation.

Verify

npm run typecheck
npm run build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages