API reference
Generated from each package's source with TypeDoc.
Packages
| Package | Description |
|---|---|
| @affordances/core | The framework-agnostic core of Affordances: defineAction and defineState (or createAffordances for a shared session resolver), and createHandler, which answers graph and call requests as a (request: Request) => Promise<Response>. Framework adapters such as @affordances/next build on it. |
| @affordances/lint | Affordances lint rules for ESLint and oxlint: require-affordance, static-action-name |
| @affordances/mcp | Affordances over MCP: any Affordances site as two tools, for Claude, Cursor, and other MCP clients |
| @affordances/md | Serve any Next.js page as clean markdown at the same URL |
| @affordances/next | Affordances for Next.js: withAffordances, codegen, and the route handler |
| @affordances/protocol | Affordances protocol: types, JSON Schemas, and the spec |
| @affordances/react | Affordances for React: WebMCP tools from the page graph, and <Affordance> markers |