Skip to content

Commit 5ce9c57

Browse files
authored
docs: add Cursor Cloud specific instructions to AGENTS.md (#19)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> Adds a `## Cursor Cloud specific instructions` section to `AGENTS.md` with: - VM update script details (Bun install + frozen lockfile) - Instructions for building/linking SDK and running examples locally - Key gotchas (Bun not pre-installed, CSS watch mode quirk, no external services needed) **Evidence of working development environment:** [Next.js example running at localhost:3000](https://cursor.com/agents/bc-e383660f-23ef-4e69-b348-a2926d3b11d4/artifacts?path=%2Fopt%2Fcursor%2Fartifacts%2Fnextjs_example_running.webp) All CI-equivalent checks pass: lint, typecheck, build, and 38/38 tests. <sub>To show artifacts inline, <a href="https://cursor.com/dashboard/cloud-agents#team-pull-requests">enable</a> in settings.</sub> <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-e383660f-23ef-4e69-b348-a2926d3b11d4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-e383660f-23ef-4e69-b348-a2926d3b11d4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>
1 parent 66b2a48 commit 5ce9c57

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,14 @@ bun test # Run tests
136136
- Cross-session audio routing (two avatars hearing each other) is not supported by the SDK; achieving avatar-to-avatar conversation requires Web Audio API bridging in the browser or server-side LiveKit audio forwarding — the SDK intentionally does not expose the underlying LiveKit room object to consumer code
137137
- `AvatarProvider` and `AvatarCall` are parallel implementations (both independently use `useCredentials` + `AvatarSession`) — `AvatarCall` does not delegate to `AvatarProvider`; `useCredentials` is not Suspense-compatible so loading state is via `AvatarProvider`'s `fallback` prop (not `<Suspense>`); `AvatarCallProps` extends `AvatarProviderProps` (minus `fallback`) for type DRYness; recommended hierarchy: `AvatarCall` (default, styled container) → `AvatarProvider` (headless, full layout control) → `AvatarSession` (pre-fetched credentials); `examples/subtitles/` demonstrates the headless pattern with `useTranscript` rendered outside the video container
138138
- Public-facing examples target production API only (`new Runway()` with no `baseURL` override); don't build multi-environment infrastructure — keep `.env.example` minimal (just `RUNWAYML_API_SECRET`); hardcode preset IDs and other constants directly in code rather than env var indirection; keep example code straightforward — don't add defensive error-handling utilities, env-var validation guards, or staging base URL plumbing to committed examples; for internal staging/dev testing, pass `baseUrl` to `AvatarCall`/`AvatarProvider`/`AvatarSession` and set `NEXT_PUBLIC_RUNWAYML_BASE_URL` in `.env.local`; also pass `baseUrl` to `createRpcHandler` since it defaults independently to production and does not auto-read `RUNWAYML_BASE_URL`
139+
140+
## Cursor Cloud specific instructions
141+
142+
The VM update script installs Bun (via `npm install -g bun`) and runs `bun install --frozen-lockfile`. All standard dev commands are documented in `CONTRIBUTING.md` and `package.json` scripts — use those as the primary reference.
143+
144+
**Running examples locally:** To test an example (e.g. `examples/nextjs-simple`), first build and link the SDK: `bun run build && bun link`, then in the example directory run `bun install && bun link @runwayml/avatars-react`. Start the example's dev server with `npx next dev` (or the example's own `dev` script). Examples require `RUNWAYML_API_SECRET` set as an environment variable to create real avatar sessions; without it the UI still loads but connecting to an avatar will fail.
145+
146+
**Gotchas:**
147+
- Bun is not pre-installed on the base VM image — the update script handles this via `npm install -g bun`.
148+
- The `bun run dev` (watch mode) script pre-copies `src/styles.css` to `dist/` because tsup's CSS-only entry silently fails in watch mode. For a clean full build, use `bun run build` instead.
149+
- No Docker, databases, or external services are required for SDK development. The only external dependency is the `RUNWAYML_API_SECRET` for running examples against the Runway API.

0 commit comments

Comments
 (0)