wire
Wire-format contract for @dbx-tools/appkit-mastra: the
dependency-free zod schemas + inferred types every consumer (the
React client, browser bundles, the server plugin) shares.
Kept free of pg, fastembed, and the Mastra runtime so the
client can import these schemas without dragging in server-only
dependencies. Three layers live here:
- The descriptor published by
MastraPlugin.clientConfig()plus the REST payloads its routes return (models, history, suggestions, chart embeds, statement data). The server derives every path from the plugin mount and publishes the resolved paths so the client composes URLs without hard-coding/api/mastra- rename the plugin and the client keeps working. - The
ctx.writerevent vocabulary: the wire-derived GenieChatEvents from@dbx-tools/genie-sharedplus the Mastra-only agent lifecycle events, unified as GenieWriterEvent so subscribers narrow both halves with a singleswitch (event.type). - The Genie agent’s workflow output shapes (GenieAgentResult and its summary / dataset items).
The route segments live in the sibling routes.ts
(MASTRA_ROUTES) and the embed-marker grammar in marker.ts,
so this file stays purely declarative (schemas + inferred types).
The browser client that drives these routes (MastraPluginClient)
ships from @dbx-tools/ui-mastra.
Interfaces
Section titled “Interfaces”Type Aliases
Section titled “Type Aliases”- AskGenieDoneEvent
- Chart
- ChartResult
- ChartType
- DefaultModelResponse
- GenieAgentEvent
- GenieAgentResult
- GenieDataset
- GenieDatasetChart
- GenieDatasetData
- GenieSummaryItem
- GenieSummaryItemType
- GenieWriterEvent
- GenieWriterEventType
- MastraClearHistoryResponse
- MastraClientConfig
- MastraDeleteThreadResponse
- MastraGenieErrorEvent
- MastraHistoryResponse
- MastraHistoryUIMessage
- MastraSuggestionsResponse
- MastraThread
- MastraThreadsResponse
- MastraUpdateThreadRequest
- MastraUpdateThreadResponse
- ServingEndpointsResponse
- StartedEvent
- StatementData
- SummaryEvent
Variables
Section titled “Variables”- AskGenieDoneEventSchema
- ChartResultSchema
- ChartSchema
- ChartTypeSchema
- DefaultModelResponseSchema
- GenieAgentEventSchema
- GenieAgentResultSchema
- GenieDatasetChartSchema
- GenieDatasetDataSchema
- GenieDatasetSchema
- GenieSummaryItemSchema
- GenieWriterEventSchema
- MASTRA_THREAD_TITLE_MAX
- MastraClearHistoryResponseSchema
- MastraClientConfigSchema
- MastraDeleteThreadResponseSchema
- MastraGenieErrorEventSchema
- MastraHistoryResponseSchema
- MastraHistoryUIMessageSchema
- MastraSuggestionsResponseSchema
- MastraThreadSchema
- MastraThreadsResponseSchema
- MastraUpdateThreadRequestSchema
- MastraUpdateThreadResponseSchema
- ServingEndpointsResponseSchema
- StartedEventSchema
- StatementDataSchema
- SummaryEventSchema