SDK Overview
@mdanai/sdk is the TypeScript reference implementation for MDAN.
This page answers three questions:
- which packages exist in the SDK
- what each package is responsible for
- where to start reading
If you only remember one thing, remember this:
corehandles MDAN pages and Markdownserverturns pages and operations into a runnable server-side appwebhandles follow-up interaction in the browserelementsprovides the default UI
Package Structure
The current release model is one package with subpath exports.
@mdanai/sdk/core@mdanai/sdk/server@mdanai/sdk/web@mdanai/sdk/elements
You can also import from the root @mdanai/sdk entry.
Import guidance:
- prefer subpath imports to keep boundaries clear, such as
@mdanai/sdk/server - only use the root entry when you explicitly want one import surface
- do not depend on deep internal paths such as
dist/*
What Each Package Does
coreparses pages, validates pages, handles Markdown request bodies, and serializes resultsserverhandles page routes, action registration, content negotiation, and server hostingwebhandles browser-side requests, local updates, and state synchronizationelementsprovides the official default UI on top ofweb
Protocol Boundary
The protocol boundary is always Markdown:
- page routes return full page Markdown
BLOCKoperations return the current block's Markdown fragment by default- browsers receive HTML first, then the runtime takes over further updates
Agents consume Markdown directly. Browsers consume HTML produced from the same app.
Where To Start Reading
If this is your first time using the SDK, the recommended path is:
- want to get an app running first: Getting Started
- want to understand project layout: Application Structure
- want to understand server-side capabilities: Server Runtime
- want to understand browser-side capabilities: Web Runtime
- want to look up specific APIs: API Reference
Public Entry Points
The current release line is one package with subpath exports. Older multi-package names are not part of the public surface.
The supported public entries are:
@mdanai/sdk@mdanai/sdk/core@mdanai/sdk/server@mdanai/sdk/web@mdanai/sdk/elements