Technical Specification
Status
| Field | Value |
|---|---|
| Format | Adaptive Slide deck JSON |
| Current package version | 0.2.0 |
| Schema dialect | JSON Schema Draft 2020-12 |
| Adaptive Cards baseline | Adaptive Cards 1.6 concepts |
| MIME type | application/vnd.adaptive-slide.deck+json |
| File extension | .deck.json |
Design principles
- Schema-first: every deck element has an explicit JSON Schema contract.
- Composable: tiles compose into slides, and slides compose into decks.
- Portable: a deck is declarative JSON rather than renderer-owned binary state.
- Extensible: new tile types can be introduced through schema, type, and renderer extensions.
- Host-aware: renderers can target web, Adaptive Cards-inspired hosts, MCP Apps, or native surfaces.
Required deck shape
{
"$schema": "./schemas/deck.schema.json",
"type": "AdaptiveDeck",
"version": "1.0.0",
"slides": [
{
"type": "AdaptiveSlide",
"body": [
{
"type": "Tile.Text",
"text": "Hello"
}
]
}
]
}
Type discriminators
| Object | Discriminator |
|---|---|
| Deck | AdaptiveDeck |
| Slide | AdaptiveSlide |
| Text tile | Tile.Text |
| Image tile | Tile.Image |
| Code tile | Tile.Code |
| Chart tile | Tile.Chart |
| Media tile | Tile.Media |
| Container tile | Tile.Container |
Versioning
The deck version field follows a semver-like string pattern:
major.minor
major.minor.patch
Schema-compatible additive changes should preserve existing render behavior. Breaking schema or renderer changes should update the documented deck version expectations and include migration guidance.
Rendering contract
Renderers should follow these rules:
- Preserve slide order.
- Treat missing optional fields as defaults defined by schema or renderer behavior.
- Escape user-provided text and URLs before writing HTML.
- Do not execute scripts from deck data.
- Respect
isVisible: falseby omitting the tile output. - Apply deck defaults unless a slide provides an override.
- Render unknown future tile types through explicit fallback behavior rather than silent success.
Accessibility guidance
| Area | Requirement |
|---|---|
| Images | Provide altText for content images. |
| Media | Provide altText, captions, or adjacent explanatory text when media is essential. |
| Color | Do not rely on color alone for meaning. |
| Navigation | Keep slide titles meaningful for list and picker UI. |
| Code | Provide title or nearby context for long code blocks. |
Extending with a new tile
- Add
schemas/tiles/your-tile.schema.json. - Add a reference to
schemas/tile.schema.json. - Extend the TypeScript tile union in
src/types/index.ts. - Add rendering support in
src/transformer.ts. - Mirror required behavior in
src/plugins/mcp-app/viewer.html. - Add example deck coverage.
- Add or update tests.
Validation and release checks
Run these checks before publishing changes:
npm run validate
npm run build
npm test
npm run docs:build
For documentation-only changes, npm run docs:build is the key check. For schema or renderer changes, run all commands.