@dbx-tools/appkit-mastra 0.1.58 → 0.1.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -1
- package/dist/index.d.ts +1229 -17
- package/dist/index.js +3348 -19
- package/package.json +17 -28
- package/src/agents.ts +7 -1
- package/src/config.ts +64 -0
- package/src/genie.ts +9 -21
- package/{index.ts → src/index.ts} +7 -9
- package/src/mcp.ts +89 -0
- package/src/model.ts +9 -3
- package/src/plugin.ts +51 -8
- package/src/serving.ts +5 -9
- package/src/statement.ts +8 -36
- package/dist/src/agents.d.ts +0 -316
- package/dist/src/agents.js +0 -470
- package/dist/src/chart.d.ts +0 -153
- package/dist/src/chart.js +0 -570
- package/dist/src/config.d.ts +0 -295
- package/dist/src/config.js +0 -55
- package/dist/src/genie.d.ts +0 -161
- package/dist/src/genie.js +0 -973
- package/dist/src/history.d.ts +0 -95
- package/dist/src/history.js +0 -278
- package/dist/src/memory.d.ts +0 -109
- package/dist/src/memory.js +0 -253
- package/dist/src/model.d.ts +0 -52
- package/dist/src/model.js +0 -198
- package/dist/src/observability.d.ts +0 -64
- package/dist/src/observability.js +0 -83
- package/dist/src/plugin.d.ts +0 -177
- package/dist/src/plugin.js +0 -554
- package/dist/src/processor.d.ts +0 -8
- package/dist/src/processor.js +0 -40
- package/dist/src/processors/strip-stale-charts.d.ts +0 -32
- package/dist/src/processors/strip-stale-charts.js +0 -98
- package/dist/src/server.d.ts +0 -51
- package/dist/src/server.js +0 -152
- package/dist/src/serving.d.ts +0 -65
- package/dist/src/serving.js +0 -79
- package/dist/src/statement.d.ts +0 -66
- package/dist/src/statement.js +0 -111
- package/dist/src/writer.d.ts +0 -23
- package/dist/src/writer.js +0 -37
- package/dist/tsconfig.build.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -189,7 +189,7 @@ fallbacks). Its exports are re-exported here, so `ModelClass` /
|
|
|
189
189
|
`modelForClass` and friends are available straight off
|
|
190
190
|
`@dbx-tools/appkit-mastra`.
|
|
191
191
|
|
|
192
|
-
The plugin layers on the config sources for
|
|
192
|
+
The plugin layers on the config sources for _which_ model an agent asks
|
|
193
193
|
for, in priority order: a per-request override, the per-agent `model`,
|
|
194
194
|
the plugin `defaultModel`, then `DATABRICKS_SERVING_ENDPOINT_NAME`. With
|
|
195
195
|
none set, resolution falls through to the dynamic class picker.
|
|
@@ -210,6 +210,46 @@ exposed at `GET ${basePath}/models` for model pickers; the same data is
|
|
|
210
210
|
available in-process from a sibling plugin via
|
|
211
211
|
`appkitUtils.require(this.context, mastra).exports()`.
|
|
212
212
|
|
|
213
|
+
## MCP server
|
|
214
|
+
|
|
215
|
+
Set `mcp` to expose the plugin's agents (and, opt-in, its tools) as a
|
|
216
|
+
Mastra [`MCPServer`](https://mastra.ai/docs/tools-mcp/mcp-overview) so
|
|
217
|
+
external MCP clients - Claude Desktop, Cursor, the Mastra playground, or
|
|
218
|
+
another agent - can call them over the standard MCP transports. The
|
|
219
|
+
server is registered on the Mastra instance via `mcpServers`, so
|
|
220
|
+
`@mastra/express` serves the stock MCP routes under the plugin mount; no
|
|
221
|
+
bespoke route is added.
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
import { mastra } from "@dbx-tools/appkit-mastra";
|
|
225
|
+
|
|
226
|
+
// Expose every registered agent as an `ask_<agentId>` MCP tool.
|
|
227
|
+
mastra({ mcp: true });
|
|
228
|
+
|
|
229
|
+
// Or tune the server id / metadata and expose extra tools.
|
|
230
|
+
mastra({
|
|
231
|
+
mcp: {
|
|
232
|
+
serverId: "analytics",
|
|
233
|
+
name: "Analytics MCP",
|
|
234
|
+
version: "2.1.0",
|
|
235
|
+
tools: true, // also expose ambient tools (off by default)
|
|
236
|
+
},
|
|
237
|
+
});
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
With `mcp` enabled the transports mount under the plugin base path
|
|
241
|
+
(`/api/<plugin>`):
|
|
242
|
+
|
|
243
|
+
- Streamable HTTP: `POST /api/<plugin>/mcp/<serverId>/mcp`
|
|
244
|
+
- SSE (legacy): `GET /api/<plugin>/mcp/<serverId>/sse` +
|
|
245
|
+
`POST /api/<plugin>/mcp/<serverId>/messages`
|
|
246
|
+
|
|
247
|
+
`serverId` defaults to the plugin name. Requests run under the same
|
|
248
|
+
AppKit OBO scope as the chat routes, so an agent invoked over MCP
|
|
249
|
+
resolves its model and tools as the calling user. The resolved endpoint
|
|
250
|
+
paths are available in-process via
|
|
251
|
+
`appkitUtils.require(this.context, mastra).exports().getMcp()`.
|
|
252
|
+
|
|
213
253
|
## License
|
|
214
254
|
|
|
215
255
|
Apache-2.0
|