Skip to content

SDK Reference

Suggest Edits

The Bakin SDK is a single package with multiple subpaths. Plugin authors mark @makinbakin/sdk (and react/react-dom) as externals at build time; the host serves a single shared instance at runtime.

import { registerPlugin } from '@makinbakin/sdk'
import { useSearch } from '@makinbakin/sdk/hooks'
import { PluginHeader } from '@makinbakin/sdk/components'
import type { BakinPlugin, PluginContext } from '@makinbakin/sdk/types'

The main entry. Re-exports the plugin contract types (./types) plus the high-traffic plugin lifecycle helpers (registerPlugin, defineRoute, definePlugin). Source: packages/sdk/src/index.ts.

ExportDescription
registerPluginRegister a plugin (single-call entry from a plugin’s client.tsx).
unregisterPluginTear down all registrations owned by a plugin (used during hot-swap).
registerPluginCleanupRegister a cleanup callback fired when the plugin is unregistered.
getRegistryVersionCurrent registry version — bumps on every mutation (for useSyncExternalStore).
subscribeRegistrySubscribe to registry-version changes.
getAllNavItemsGet every registered nav item across all plugins.
getNavItemsSnapshotGet a snapshot of the current nav items (non-subscribing).
getPluginNavItemsGet nav items contributed by a specific plugin.
getPluginRouteLook up a specific client route by plugin id + path.
getPluginRoutesGet all registered client routes (across all plugins).
ClientRouteEntry
MatchedPluginRoute
PluginRegistration
defineRouteDefine a plugin HTTP route with typed input/output schemas.
defineCoreRouteDefine a core (non-plugin) HTTP route.
definePluginCompose a plugin’s routes into a single definition for the server.
HttpStatus
RouteContext
PluginContextLite
CoreContext
BodySpec
ResponseSpec
ParsedInput

Source: packages/sdk/src/hooks/index.ts.

import { useSearch, useAssets, useDebug } from '@makinbakin/sdk/hooks'
HookDescription
useAssetsFetch and filter the asset library with live SSE updates.
useTrashFetch trashed assets eligible for restore or permanent delete.
useContentStoreAccess the global Zustand store for SSE-driven content state.
useScheduleJobsList scheduled jobs with live updates.
useRunHistoryFetch run history for a scheduled job.
ScheduleJob
RunEntry
HookDescription
useSearchHybrid full-text + semantic search across plugins with facet filtering.
reorderBySearchResultsRe-rank a local list to match the order returned by a search query.
SearchResult
SearchResponse
UseSearchOptions
UseSearchReturn
HookDescription
useQueryStateBind a single component-state value to a URL query param.
useQueryArrayStateBind a multi-value (array) component state to a URL query param.
useSidebarRead sidebar open/closed state and toggle helper.
useRouterAccess the TanStack Router instance for imperative navigation.
usePathnameCurrent URL pathname (Next.js-shape compatible).
useSearchParamsCurrent URL search params as a URLSearchParams instance.
useParamsCurrent route’s typed path parameters.
HookDescription
useAgentStoreAccess the agent registry store (Zustand).
useAgentLook up a single agent by ID.
useAgentListList all registered agents.
useAgentColorGet an agent’s brand color (hex string).
useAgentDisplayNameGet an agent’s display name (fallback to ID).
useAgentIdsList all registered agent IDs.
useMainAgentIdGet the ID of the designated main/orchestrator agent.
usePackageStateRead agent-package install state (managed/adopted/unmanaged).
hexToMutedConvert a hex color to a muted variant for backgrounds.
HookDescription
useNotificationChannelsList configured notification channels (Discord, Slack, email, etc.).
getChannelLabelGet a human-readable label for a channel ID.
getChannelInitialsGet initials for a channel (e.g. “Discord” → “D”).
HookDescription
useDebugRead/toggle the global debug (X-Ray) flag.
useFormGuardGuard a form against unmounting while submission is in flight.
toastFire a toast notification (success/error/info).
useToastStoreSubscribe to the toast store for custom toast UIs.
useVerticalResizeImperatively resize a vertical pane via mouse drag handle.
HookDescription
useRuntimeStatusSubscribe to runtime connection status (online/offline, last heartbeat).
useSSESubscribe to a Server-Sent Events endpoint with auto-reconnect.

Source: packages/sdk/src/components/index.ts.

import { PluginHeader, FacetFilter, AgentAvatar } from '@makinbakin/sdk/components'
ComponentDescription
AgentAvatarRound avatar image for an agent, falls back to initials.
AgentFilterMulti-select facet filter scoped to agents.
AgentSelectSingle-agent picker dropdown for form fields.
AgentDotSmall status dot showing an agent’s online/offline state.
AgentStatusCompound agent status (dot + label + last-seen timestamp).
BakinDrawerRight-side slide-out drawer with backdrop and focus trap.
ColorPickerColor picker swatch grid for tag/agent color assignment.
EmptyStateCentered empty-state component with icon, title, and CTA.
ErrorBannerInline error banner with dismiss + retry actions.
ErrorStateFull-page error state with title, description, and retry button.
FacetFilterPopover multi-select facet filter (column, owner, tag, etc.).
FacetOption
IntegratedBrainstormChat + plan-proposal review panel for brainstorm sessions.
BrainstormMessage
IntegratedBrainstormProps
BrainstormOnSend
SendContext
AssistantTransformed
BrainstormActivityInput
BrainstormActivityStorageInput
BrainstormActivityStorageRecord
BrainstormTimelineActivityInput
BrainstormTimelineMessageInput
brainstormActivityMessageFromCustomConvert a custom activity message back into a brainstorm activity.
brainstormThreadIdCompute the canonical thread ID for a brainstorm session.
normalizeBrainstormActivityForStorageNormalize a brainstorm activity payload for persistence.
normalizeBrainstormActivityMessageForStorageNormalize a single brainstorm message for persistence.
readBrainstormSseResponseRead an SSE response stream into brainstorm activity events.
runtimeChunkToBrainstormActivityConvert a runtime chat chunk to a brainstorm activity event.
toBrainstormTimelineFold a brainstorm session’s events into a renderable timeline.
MarkdownContentRender markdown content with syntax highlighting and link handling.
MarkdownEditorEditable markdown text area with preview toggle.
ModelSelectModel picker dropdown listing available models from the catalog.
PageLayoutStandard plugin page wrapper with header, content area, and toaster.
PluginHeaderPlugin page header with title, count badge, search, and action buttons.
PluginSettingsRendererRender a settings form from a PluginSettingsSchema definition.
PluginSettingsSchema
SortableHeadSortable table column header with ascending/descending indicator.
SortDir
UnderlineTabsTab list with animated underline indicator.
UnderlineTab
ChannelIconIcon component for a notification channel (Discord, Slack, email, etc.).

Source: packages/sdk/src/ui/index.ts. Re-exports of shadcn/ui primitives bundled with Bakin’s design tokens. For usage, see the upstream component docs.

import { Button, Card, Dialog, Input } from '@makinbakin/sdk/ui'

Source: packages/sdk/src/slots/index.tsx.

Slot systemDescription
registerSlotRegister a component for a named slot. Lower order renders first; entries
getSlotEntriesRead the registered entries for a slot. Exported for tooling / tests.
clearSlotsOwnedByRemove every slot entry owned by the given plugin. Used by
SlotRender all components registered for the named slot, in order. Extra props

Source: packages/sdk/src/types/index.ts. The full plugin contract surface. Below: detailed field-level docs for the types most plugin authors directly implement, then summary tables grouped by domain.

import type { BakinPlugin, PluginContext, ExecToolDefinition } from '@makinbakin/sdk/types'

The main plugin interface. The default export of a plugin’s index.ts.

FieldTypeDescription
idstringUnique plugin identifier (matches manifest id).
namestringDisplay name.
versionstringPlugin version (semver).
activate(ctx: PluginContext) => void | Promise<void>Called once at plugin load. Register routes/tools/nav/etc. here.
onReady?() => void | Promise<void>Called after all plugins have activated. Useful for cross-plugin setup.
onShutdown?() => void | Promise<void>Called when the server shuts down or the plugin is hot-swapped out.
onSettingsChange?(settings: Record<string, unknown>) => void | Promise<void>Called when this plugin’s settings are persisted.
onUninstall?(ctx: PluginContext) => void | Promise<void>Called when the plugin is uninstalled — clean up persisted data here.
settingsSchema?PluginSettingsSchemaSettings schema rendered on this plugin’s settings page.
navItems?NavItem[]Convenience: nav items to auto-register at activation.
contentFiles?ContentFile[]Convenience: static content files declared at construction.

The activation context passed to a plugin’s activate(ctx) method.

FieldTypeDescription
storageStorageAdapterPlugin-scoped filesystem storage adapter.
eventsEventBusCross-plugin event bus.
pluginIdstringID of the plugin this context belongs to.
runtimeAgentRuntimeAdapterAgent runtime adapter (agents, messaging, channels, cron, skills).
tasksTaskServiceTask CRUD service.
assetsAssetsAPIAssets API for asset metadata + file lookups.
registerNav(items: NavItem[]) => voidRegister sidebar navigation items.
registerRoute(route: APIRoute) => voidRegister an HTTP route under /api/plugins/{pluginId}.
registerSlot(registration: UISlotRegistration) => voidRegister a component for a named slot (legacy — prefer <Slot> from /slots).
registerExecTool(tool: ExecToolDefinition) => voidRegister an MCP exec tool agents can call.
registerSkill(skill: SkillDefinition) => voidRegister a runtime skill (capability definition).
registerWorkflow(definition: WorkflowDefinitionInput, opts?: { readOnly?: boolean }) => voidRegister a workflow definition (or template) the plugin ships.
registerNodeType(def: PluginNodeTypeInput<T>) => stringRegister a custom workflow node type (step kind).
registerNotificationChannel(def: PluginNotificationChannelInput) => stringRegister a notification channel the runtime can deliver to.
registerHealthCheck(def: PluginHealthCheckInput) => stringRegister a health check that runs on bakin doctor.
watchFiles(patterns: string[]) => voidSubscribe to file globs for live updates (Chokidar-based).
getSettings() => TRead this plugin’s persisted settings.
updateSettings(patch: Record<string, unknown>) => voidPatch this plugin’s persisted settings.
activityActivityAPIActivity feed + audit log API.
log?PluginLoggerPlugin-scoped structured logger. Optional — falls back to console.
hooksHookAPICross-plugin hook registry.
searchSearchAPISearch API for indexing and querying.

The bakin-plugin.json manifest. Required for every plugin.

FieldTypeDescription
idstringUnique plugin identifier (kebab-case).
namestringHuman-readable plugin name.
versionstringPlugin version (semver).
bakinstringMinimum Bakin version this plugin supports.
descriptionstringOne-line summary shown in the plugin manager.
entryPluginEntryPointsServer + optional client entry-point file paths.
contentFiles?string[]Static content files the plugin ships (rendered as docs/pages).
secrets?SecretDeclaration[]Environment-variable secrets the plugin requires.
tests?stringPath to a test entry-point (for bakin plugins test).
dependencies?string[]Other plugin IDs this plugin depends on.
permissions?PluginPermission[]Capabilities this plugin requests access to.
runtimeCapabilities?RuntimeCapability[]Runtime features this plugin needs to function.
contributes?PluginContributionsEverything the plugin adds to the host (routes, tools, settings, etc.).
devWatch?string[]File globs that trigger a hot reload in dev.
signature?PluginManifestSignatureOptional Ed25519 signature for authenticity.

The full contributions block in bakin-plugin.json — everything a plugin adds to the host.

FieldTypeDescription
apiRoutes?ApiRouteContribution[]HTTP routes the plugin exposes under /api/plugins/{id}/....
clientRoutes?ClientRouteContribution[]Client-side routes the plugin renders (sidebar nav targets).
execTools?ExecToolContribution[]MCP exec tools agents can call.
cliCommands?CliCommandContribution[]CLI commands the plugin contributes to the bakin binary.
settings?SettingsContribution[]Settings keys this plugin owns in the settings UI.
docs?DocsContributionOptional docs page slug.

MCP exec tool definition registered via ctx.registerExecTool().

FieldTypeDescription
namestringTool name. Convention: bakin_exec_{pluginId}_{action}.
descriptionstringDescription shown to the agent (used for tool selection).
label?stringOptional UI label for the activity feed.
activityDuplicate?booleanIf true, this tool can fire multiple times in a single agent turn.
parametersZodRawShapeZod raw shape describing the tool’s parameters.
handler(params: Record<string, unknown>, agent: string, ctx?: PluginToolContext) => Promise<ExecToolResult>Handler that executes the tool.
source?stringOptional source-file path for generated docs.

Context passed to an exec tool handler. Subset of PluginContext sans UI registration.

FieldTypeDescription
storageStorageAdapterPlugin-scoped storage adapter.
eventsEventBusCross-plugin event bus.
pluginIdstringID of the plugin owning this tool.
runtimeAgentRuntimeAdapterAgent runtime adapter (messaging, agents, channels, cron).
tasksTaskServiceTask CRUD service.
searchSearchAPISearch API.
assetsAssetsAPIAssets API.
hooksHookAPIHook registry.
activityActivityAPIActivity feed and audit log.
getSettings() => TRead this plugin’s persisted settings.

Sidebar navigation item registered by a plugin via ctx.registerNav().

FieldTypeDescription
idstringUnique nav item id (used for active-state tracking).
labelstringDisplay label in the sidebar.
iconstringLucide icon name (e.g. “tasks”, “calendar”).
hrefstringTarget route path.
order?numberSort order within the parent group. Lower renders first.
children?NavItem[]Optional nested nav items for groups.
alwaysExpanded?booleanIf true, the group cannot be collapsed.

HTTP route handler registered by a plugin via ctx.registerRoute().

FieldTypeDescription
pathstringRoute path relative to /api/plugins/{pluginId}.
methodHttpMethodHTTP method.
handler(req: Request, ctx: PluginContext) => Response | Promise<Response>Request handler. Receives a standard Request and the plugin context.
summary?stringOne-line summary for docs.
description?stringFull description for docs.
params?stringPath param descriptor (e.g. ":id").
input?SchemaLikeInput schema for validation and docs.
output?SchemaLikeOutput schema for docs.
visibility?ContractVisibilityVisibility tier (public/internal/experimental).
stability?ContractStabilityStability tier.
examples?DocsExample[]Reference examples for the docs site.
source?SourceLocationSource location for generated docs back-references.
permissions?string[]Permissions required to call this route.

Plugin settings schema — declares fields rendered on the settings page.

FieldTypeDescription
fieldsSettingsField[]Ordered list of settings fields for the form.

Result row returned by a health check (doctor).

FieldTypeDescription
checkstringStable check identifier.
status'ok' | 'warn' | 'error' | 'fixed'Severity of the result.
messagestringHuman-readable message describing the finding.
autoFixablebooleanWhether the issue can be auto-fixed by an attached repair handler.

The bakin.config.ts shape — root configuration for a Bakin installation.

FieldTypeDescription
pluginsPluginEntry[]Plugins to load at startup.
theme?Record<string, string>Theme overrides for CSS custom properties.
storage?{ /** Override the default content directory. */ contentDir?: string }Storage configuration.
TypeDescription
HttpMethodHTTP method literal used in route and contribution definitions.
ContractVisibilityVisibility tier for a documented contract (route, hook, tool, etc.).
ContractStabilityStability tier for a documented contract.
SchemaLikeMinimal interface a validation schema must satisfy (Zod-compatible).
SourceLocationPointer to a symbol’s source file location, used in generated docs.
DocsExampleReference example for a documented contract (request/response or code snippet).
TypeDescription
PluginPermissionCapability a plugin can request in its manifest (gates access to APIs).
RuntimeCapabilityRuntime feature a plugin declares it needs (used by doctor/health checks).
PluginEntryPointsServer and client entry-point file paths for a plugin.
SecretDeclarationSecret (env var) a plugin declares it needs (rendered in setup/health).
ApiRouteContributionManifest declaration of an HTTP route the plugin exposes.
JsonSchemaContributionRaw JSON Schema object embedded in API contributions.
ApiParameterContributionPath/query/header/cookie parameter declaration for an API route.
ApiRequestBodyContributionRequest body declaration for an API route.
ApiResponseContributionResponse declaration for one HTTP status code on an API route.
ClientRouteContributionManifest declaration of a client-side route the plugin contributes.
ExecToolContributionManifest declaration of an MCP exec tool the plugin exposes.
CliCommandContributionManifest declaration of a CLI command the plugin contributes.
SettingsContributionManifest declaration of a settings key the plugin owns.
DocsContributionManifest declaration of the plugin’s docs page slug.
PluginManifestSignatureOptional Ed25519 signature block proving manifest authenticity.
TypeDescription
StorageStatFile metadata returned by storage adapter stat().
StorageAdapterPlugin-scoped filesystem adapter passed via ctx.storage.
EventBusCross-plugin event bus. Emit and subscribe by pattern.
ActivityAPIActivity feed + structured audit log API exposed on the plugin context.
PluginLoggerPlugin-scoped structured logger (writes to server log + stdout).
HookAPICross-plugin RPC/event/waterfall hook registry.
HookRegistrationMetadataOptional documentation metadata for a registered hook.
HookKindHook semantics: single-return RPC, fire-and-forget event, or input transform waterfall.
TypeDescription
UISlotRegistrationSlot registration record: place a component at a named extension point.
ContentFileStatic content file shipped with a plugin (e.g. README, docs page).
TypeDescription
RuntimeAgentAn agent registered with the runtime (OpenClaw, etc.).
RuntimeChannelA messaging channel (Discord, Slack, email, etc.) registered with the runtime.
RuntimeMessageToolsModeWhether to expose runtime-native tools for this agent turn.
RuntimeMessageToolPolicyPer-turn policy for which runtime tools the agent may call.
RuntimeMessageArgsArguments for a single message dispatched to an agent.
RuntimeMessageResultResult returned by a non-streaming runtime message.
RuntimeToolActivityTool call/result event surfaced during a streaming agent turn.
RuntimeChatChunkOne chunk in a streaming agent response (text, tool, status, done, error).
CronJobA cron-scheduled job tracked by the runtime.
CronRunExecution record for a single cron job run.
RuntimeSkillA skill (runtime-side capability) registered with an agent.
WorkspaceFileA file in an agent’s runtime workspace.
AgentRuntimeAdapterProvider-agnostic interface for agent runtime adapters (OpenClaw, etc.).
TypeDescription
TaskLogEntryOne entry in a task’s activity log.
TaskA task on the Bakin board.
TaskSourceIdentifies the plugin/entity that originated a task.
TaskColumnsThe seven task board columns.
TaskBoardThe full task board snapshot (columns + timestamp).
ColumnIdValid task column identifier (keyof TaskColumns).
TaskCreateInputPayload for tasks.create().
TaskUpdateInputPatch payload for tasks.update(). Nullable fields explicitly clear.
TaskServiceCRUD service for tasks, exposed via ctx.tasks.
TypeDescription
SearchSchemaFieldField schema entry for a search content type.
SearchIndexDefinitionNamed index definition (embedder + chunker config) for a content type.
SearchContentTypeDefinitionFull content-type definition: schema, indexes, facets, reindex generator.
FilePatternMapperFile glob + mappers used by file-backed search content types.
FileBackedContentTypeDefinitionFile-backed content type: indexes documents derived from on-disk files.
SearchQueryParamsQuery payload for search.query() — filters, facets, paging, strategy.
SearchResultA single search hit with score and field projection.
SearchResponseFull search response: results, aggregations, and query metadata.
SearchHealthSnapshotHealth snapshot reported by the search adapter (per-table state).
SearchTransformOpAtomic transform operation applied to an indexed document.
SearchAPISearch API exposed via ctx.search — index, query, transform documents.
TypeDescription
AssetVariantMetaAuto-generated variant (thumbnail/optimized/webp) for an asset.
AssetMetaFull asset record: file info + sidecar metadata + auto-generated variants.
TrashedAssetMetaAsset record while in trash (with deleted/expires timestamps).
AssetFileRefCompact reference to an asset by filename — used in channel deliveries.
AssetsAPIAssets API exposed via ctx.assets — read-only asset lookups.
TypeDescription
ExecToolResultResult returned from an exec tool handler.
SkillDefinitionRuntime skill definition registered via ctx.registerSkill().
WorkflowLayoutInputLayout hints for a workflow’s canvas rendering.
WorkflowDefinitionInputPlugin-contributed workflow definition input shape.
FormFieldTypeField types supported by FormField.
FormFieldForm field descriptor for plugin-contributed workflow nodes.
EdgeRulesEdge constraints for a plugin-contributed workflow node type.
PluginNodeTypeInputWorkflow node type contributed by a plugin (custom step kind).
PluginNotificationChannelInputNotification channel definition contributed by a plugin.
TypeDescription
HealthRepairSafetyRepair safety tier: safe (auto), manual (needs review), destructive (data-affecting).
HealthRepairChangeSingle change a repair plan will apply.
HealthRepairPlanItemOne item in a repair plan: what will change and why.
HealthRepairApplyResultResult of applying a single repair plan item.
HealthRepairHandlerTwo-phase repair handler attached to a health check.
PluginHealthCheckInputHealth check registration input passed to ctx.registerHealthCheck().
TypeDescription
StringSettingsFieldSingle-line text settings field.
NumberSettingsFieldNumeric settings field with optional default.
BooleanSettingsFieldBoolean toggle settings field.
SelectSettingsFieldDropdown settings field with predefined options.
ListSettingsFieldRepeatable list settings field with per-item shape.
SettingsFieldUnion of all supported settings field types.
TypeDescription
WorkflowDefinitionA workflow definition stored on disk (YAML or programmatic).
WorkflowInstanceA running instance of a workflow attached to a task.
WorkflowStepOne step in a workflow definition or instance.
WorkflowTemplateAlias for WorkflowDefinition when used as a reusable template.
TypeDescription
CalendarEventSingle calendar event (time + text).
CalendarDayOne day on an agent’s calendar (date + list of events).
RecurringEventA recurring event (cron expression + display text).
MemoryEntrySingle memory entry (decision, learned-thing, or freeform note).
MemoryDayMemory entries grouped by day.
HeartbeatAgent heartbeat snapshot (status + current task + timestamp).
TypeDescription
ProjectMetaProject metadata loaded from a markdown project file.
AvailableModelA model available in the models catalog (LLM, image, or video).
TypeDescription
PluginEntryA plugin entry in bakin.config.ts.

Source: packages/sdk/src/utils/index.ts.

UtilityDescription
cnTailwind class merger (clsx + tailwind-merge).
formatAgeFormat a Date or ISO string as a relative age (e.g. “5m ago”).
formatSizeFormat a byte count as a human-readable size string (e.g. “1.2 MB”).
isStaleReturns true if a timestamp is older than a configurable staleness threshold.
brainstormActivityMessageFromCustomConvert a custom activity message into a brainstorm activity input.
runtimeChunkToBrainstormActivityConvert a runtime chat chunk into a brainstorm activity event.
toBrainstormTimelineFold brainstorm events into a renderable timeline.
brainstormThreadIdCompute the canonical thread id for a brainstorm session.
normalizeBrainstormActivityForStorageNormalize a brainstorm activity payload for persistence.
normalizeBrainstormActivityMessageForStorageNormalize a single brainstorm message for persistence.
BrainstormActivityInput
BrainstormTimelineActivityInput
BrainstormTimelineMessageInput
BrainstormActivityStorageInput
BrainstormActivityStorageRecord
readBrainstormSseResponseRead an SSE response stream into brainstorm activity events.

Source: packages/sdk/src/metadata/index.ts.

Contract helperDescription
ContractMetadata@makinbakin/sdk/metadata — docs-aware contract helpers.
ContractStability@makinbakin/sdk/metadata — docs-aware contract helpers.
ContractVisibility@makinbakin/sdk/metadata — docs-aware contract helpers.
CliCommandContract@makinbakin/sdk/metadata — docs-aware contract helpers.
DocsAwareAPIRoute@makinbakin/sdk/metadata — docs-aware contract helpers.
DocsExample@makinbakin/sdk/metadata — docs-aware contract helpers.
ExecToolContract@makinbakin/sdk/metadata — docs-aware contract helpers.
HookContract@makinbakin/sdk/metadata — docs-aware contract helpers.
HookKind@makinbakin/sdk/metadata — docs-aware contract helpers.
PublicContract@makinbakin/sdk/metadata — docs-aware contract helpers.
RouteContract@makinbakin/sdk/metadata — docs-aware contract helpers.
SchemaLike@makinbakin/sdk/metadata — docs-aware contract helpers.
SlotContract@makinbakin/sdk/metadata — docs-aware contract helpers.
SourceLocation@makinbakin/sdk/metadata — docs-aware contract helpers.
defineApiRouteLegacy: declare an API route with docs metadata. Prefer defineRoute from /routing.
defineCliCommandContractDefine a CLI command contract for documentation.
defineExecToolContractDefine an MCP exec tool contract for documentation.
defineHookContractDefine a cross-plugin hook contract for documentation.
definePluginRouteLegacy: declare a plugin route with docs metadata. Prefer defineRoute from /routing.
defineRouteContractDefine a generic route contract (shared shape for API + plugin routes).
defineSlotContractDefine a UI slot contract for documentation.

Source: packages/sdk/src/routing/index.ts.

RoutingDescription
defineRouteDefine a plugin HTTP route with typed input/output and handler.
defineCoreRouteDefine a core (non-plugin) HTTP route.
definePluginCompose a plugin’s routes into a single definition for the server.
HttpMethod
HttpStatus
RouteContext
PluginContextLite
CoreContext
JsonBodySpec
MultipartBodySpec
RawBodySpec
NoBodySpec
BodySpec
JsonResponseSpec
NoContentResponseSpec
NonJsonResponseSpec
ResponseSpec
ParsedInput
APIRoute
PluginWithRoutes
DefinePluginInput