Every plugin ESM module running in the React app shell (style: app) can import directly from @aiui/sdk, react, react/jsx-runtime, react-dom, and react-dom/client. The shell's import map binds all five specifiers to its own runtime instances so hooks work with zero duplicate React bundles.
style: app
@aiui/sdk
react
react/jsx-runtime
react-dom
react-dom/client
See Scaffolding & Types to export the exact aiui-sdk.d.ts file for your installed version.
aiui-sdk.d.ts
Share the shell's built-in data-refresh lifecycle (abort on navigation, retain last good data on refresh failure, skip hidden tabs, exponential backoff, single read on tab return) and SPA navigation links (ordinary click stays in the shell with Back/Forward support; Cmd/Ctrl/middle-click opens a new tab):
Render any of PraisonAIUI's 73 native React blocks (card, metric, table, chart, diff_viewer, tabs, form, rich_text_input, preview_frame, button_group, alert, …) inside a React plugin page without writing custom CSS. <BlockTree> lazy-loads the blocks engine on demand (zero boot-bundle cost) and wraps rendering in an error boundary with Retry recovery:
card
metric
table
chart
diff_viewer
tabs
form
rich_text_input
preview_frame
button_group
alert
<BlockTree>
<BlockTree> keeps its lazy <Suspense> wrapper identity stable across initial load and subsequent rerenders, so uncontrolled native inputs and textareas preserve their DOM node, value, focus, and text selection when surrounding plugin state updates.
<Suspense>
Plugin WebSocket routes mounted under /api/plugins/<name>/* can connect cleanly across open, session-cookie, and bearer-token auth modes without ever putting long-lived tokens in URLs:
/api/plugins/<name>/*
SDK_VERSION stays 1 while new exports are added monotonically to SDK_EXPORTS and SDK_FEATURES. Plugins that also target older shells can guard optional exports cleanly:
SDK_VERSION
1
SDK_EXPORTS
SDK_FEATURES
| Category | Exports |
|---|---|
| Metadata | SDK_VERSION, SDK_FEATURES |
| Registries | registerPage, registerBlock, registerSlot, registerToolRenderer, registerView, getPage, getBlock, getSlot, getToolRenderers, subscribe, useRegistryVersion |
registerPage
registerBlock
registerSlot
registerToolRenderer
registerView
getPage
getBlock
getSlot
getToolRenderers
subscribe
useRegistryVersion
| Rendering | BlockTree, Markdown |
BlockTree
Markdown
| Navigation & Live Data | navigate, pageHref, pageLinkProps, getPageId, usePageId, useLiveData, fetchJson, useManifest, useThemeMode |
navigate
pageHref
pageLinkProps
getPageId
usePageId
useLiveData
fetchJson
useManifest
useThemeMode
| Realtime | getWsTicket, openWebSocket |
getWsTicket
openWebSocket
| Notifications & Commands | notify, dismiss, notifications, useNotifications, registerCommand, onActivate |
notify
dismiss
notifications
useNotifications
registerCommand
onActivate
| Contributions & Layouts | registerSettingsSection, registerNavGroup, registerThemePreset, registerLayout, getLayouts, useLayout, setLayout, provideLayoutData, useLayoutData |
registerSettingsSection
registerNavGroup
registerThemePreset
registerLayout
getLayouts
useLayout
setLayout
provideLayoutData
useLayoutData