@dbx-tools/appkit-mastra 0.1.13 → 0.1.14
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 +304 -645
- package/index.ts +46 -38
- package/package.json +58 -45
- package/src/agents.ts +224 -66
- package/src/chart.ts +531 -429
- package/src/config.ts +270 -19
- package/src/filesystems.ts +1090 -0
- package/src/genie.ts +1000 -660
- package/src/history.ts +166 -79
- package/src/mcp.ts +105 -0
- package/src/memory.ts +94 -92
- package/src/mlflow.ts +149 -0
- package/src/model.ts +75 -408
- package/src/observability.ts +121 -69
- package/src/pagination.ts +34 -0
- package/src/plugin.ts +552 -67
- package/src/processors.ts +168 -0
- package/src/rest.ts +67 -0
- package/src/server.ts +232 -45
- package/src/serving-sanitize.ts +167 -0
- package/src/serving.ts +27 -243
- package/src/statement.ts +89 -0
- package/src/storage-schema.ts +41 -0
- package/src/summarize.ts +176 -0
- package/src/threads.ts +338 -0
- package/src/workspaces.ts +346 -0
- package/src/writer.ts +44 -0
- package/tsconfig.json +41 -0
- package/dist/index.d.ts +0 -20
- package/dist/index.js +0 -20
- package/dist/src/agents.d.ts +0 -306
- package/dist/src/agents.js +0 -403
- package/dist/src/chart.d.ts +0 -170
- package/dist/src/chart.js +0 -491
- package/dist/src/config.d.ts +0 -183
- package/dist/src/config.js +0 -12
- package/dist/src/genie.d.ts +0 -131
- package/dist/src/genie.js +0 -630
- package/dist/src/history.d.ts +0 -67
- package/dist/src/history.js +0 -172
- package/dist/src/memory.d.ts +0 -100
- package/dist/src/memory.js +0 -242
- package/dist/src/model.d.ts +0 -159
- package/dist/src/model.js +0 -427
- package/dist/src/observability.d.ts +0 -33
- package/dist/src/observability.js +0 -71
- package/dist/src/plugin.d.ts +0 -130
- package/dist/src/plugin.js +0 -283
- package/dist/src/processors/strip-stale-charts.d.ts +0 -29
- package/dist/src/processors/strip-stale-charts.js +0 -96
- package/dist/src/server.d.ts +0 -46
- package/dist/src/server.js +0 -123
- package/dist/src/serving.d.ts +0 -156
- package/dist/src/serving.js +0 -231
- package/dist/src/tools/email.d.ts +0 -74
- package/dist/src/tools/email.js +0 -122
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/src/processors/strip-stale-charts.ts +0 -105
- package/src/tools/email.ts +0 -147
package/src/config.ts
CHANGED
|
@@ -5,11 +5,14 @@
|
|
|
5
5
|
* `memory.ts` can import them without creating a cycle.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { BasePluginConfig
|
|
8
|
+
import type { BasePluginConfig } from "@databricks/appkit";
|
|
9
9
|
import type { AgentConfig } from "@mastra/core/agent";
|
|
10
|
+
import { MASTRA_RESOURCE_ID_KEY, MASTRA_THREAD_ID_KEY } from "@mastra/core/request-context";
|
|
10
11
|
import type { PgVectorConfig, PostgresStoreConfig } from "@mastra/pg";
|
|
11
12
|
|
|
12
|
-
import type { MastraAgentDefinition, MastraTools } from "./agents
|
|
13
|
+
import type { MastraAgentDefinition, MastraTools } from "./agents";
|
|
14
|
+
import type { GenieSpacesConfig } from "./genie";
|
|
15
|
+
import { appkit } from "@dbx-tools/appkit";
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* `RequestContext` key under which {@link MastraServer} stores the
|
|
@@ -18,10 +21,63 @@ import type { MastraAgentDefinition, MastraTools } from "./agents.js";
|
|
|
18
21
|
*/
|
|
19
22
|
export const MASTRA_USER_KEY = "mastra__user";
|
|
20
23
|
|
|
24
|
+
/**
|
|
25
|
+
* `RequestContext` keys for AppKit user metadata stamped by
|
|
26
|
+
* {@link MastraServer}. Surfaced as trace metadata via
|
|
27
|
+
* {@link TRACE_REQUEST_CONTEXT_KEYS} so traces are filterable by who
|
|
28
|
+
* issued the request without leaking the full user object.
|
|
29
|
+
*/
|
|
30
|
+
export const MASTRA_USER_NAME_KEY = "mastra__userName";
|
|
31
|
+
export const MASTRA_USER_EMAIL_KEY = "mastra__userEmail";
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* `RequestContext` key for the per-HTTP-request id stamped by
|
|
35
|
+
* {@link MastraServer}. Reads `X-Request-Id` from the incoming
|
|
36
|
+
* headers when present (so an upstream load balancer / API gateway
|
|
37
|
+
* can keep its trace correlation), falls back to a freshly minted
|
|
38
|
+
* UUID. Echoed back on the response and surfaced on every span via
|
|
39
|
+
* {@link TRACE_REQUEST_CONTEXT_KEYS} so logs and traces share a
|
|
40
|
+
* join key.
|
|
41
|
+
*/
|
|
42
|
+
export const MASTRA_REQUEST_ID_KEY = "mastra__requestId";
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* `RequestContext` key for OAuth scopes parsed from the forwarded
|
|
46
|
+
* access token by {@link MastraServer.configureRequestContextScopes}.
|
|
47
|
+
* Workspace mounts that touch Databricks workspace files require
|
|
48
|
+
* `workspace` or `all-apis` in this list.
|
|
49
|
+
*/
|
|
50
|
+
export const MASTRA_SCOPES_KEY = "mastra__scopes";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Canonical list of `RequestContext` keys we want Mastra to extract
|
|
54
|
+
* as metadata on every observability span (agent runs, model calls,
|
|
55
|
+
* tool invocations, workflow steps).
|
|
56
|
+
*
|
|
57
|
+
* Mirrors {@link https://mastra.ai/docs/observability/tracing/overview#automatic-metadata-from-requestcontext}:
|
|
58
|
+
* passed verbatim into `Observability.configs[*].requestContextKeys`,
|
|
59
|
+
* so any key listed here is read from `RequestContext` at trace
|
|
60
|
+
* start and attached as scalar span metadata. Keep the set to plain
|
|
61
|
+
* scalars - never include {@link MASTRA_USER_KEY} (it carries the
|
|
62
|
+
* full AppKit execution context with a `WorkspaceClient` reference).
|
|
63
|
+
*
|
|
64
|
+
* Order is purely cosmetic; Mastra de-dupes internally.
|
|
65
|
+
*/
|
|
66
|
+
export const TRACE_REQUEST_CONTEXT_KEYS: readonly string[] = [
|
|
67
|
+
MASTRA_RESOURCE_ID_KEY,
|
|
68
|
+
MASTRA_THREAD_ID_KEY,
|
|
69
|
+
MASTRA_REQUEST_ID_KEY,
|
|
70
|
+
MASTRA_USER_NAME_KEY,
|
|
71
|
+
MASTRA_USER_EMAIL_KEY,
|
|
72
|
+
// Model override key is owned by `serving.ts`; spelled inline here
|
|
73
|
+
// so this module stays leaf-level (no cycles with `serving.ts`).
|
|
74
|
+
"mastra__model_override",
|
|
75
|
+
];
|
|
76
|
+
|
|
21
77
|
/** AppKit execution context plus the canonical user id. */
|
|
22
78
|
export interface User {
|
|
23
79
|
id: string;
|
|
24
|
-
executionContext:
|
|
80
|
+
executionContext: appkit.ExecutionContextLike;
|
|
25
81
|
}
|
|
26
82
|
|
|
27
83
|
/** PgVector config with an optional Mastra store id. */
|
|
@@ -29,6 +85,45 @@ export type MastraMemoryConfig = PgVectorConfig & {
|
|
|
29
85
|
id?: string;
|
|
30
86
|
};
|
|
31
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Fine-grained control for the optional MCP server exposure
|
|
90
|
+
* ({@link MastraPluginConfig.mcp}). Every field is optional; the object
|
|
91
|
+
* form only needs to set what differs from the defaults.
|
|
92
|
+
*/
|
|
93
|
+
export interface MastraMcpConfig {
|
|
94
|
+
/**
|
|
95
|
+
* Server id used in the route path (`/mcp/<serverId>/...`) and as the
|
|
96
|
+
* MCP registry id. Defaults to the plugin's registered name.
|
|
97
|
+
*/
|
|
98
|
+
serverId?: string;
|
|
99
|
+
/** Display name advertised over MCP. Defaults to `"<displayName> MCP"`. */
|
|
100
|
+
name?: string;
|
|
101
|
+
/** Semantic version advertised over MCP. Defaults to `"1.0.0"`. */
|
|
102
|
+
version?: string;
|
|
103
|
+
/** Optional human-readable description advertised over MCP. */
|
|
104
|
+
description?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Expose every registered agent as an `ask_<agentId>` MCP tool.
|
|
107
|
+
* Defaults to `true` - this is the "leverage the Mastra agents over
|
|
108
|
+
* MCP" behavior most callers want.
|
|
109
|
+
*/
|
|
110
|
+
agents?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Also expose the plugin's ambient tools (the built-in `render_data`
|
|
113
|
+
* plus anything in `config.tools`) as MCP tools. Defaults to `false`:
|
|
114
|
+
* the ambient tools assume an in-process chat turn (they publish
|
|
115
|
+
* writer events the chat UI consumes), so they aren't useful to a
|
|
116
|
+
* standalone MCP client. Turn this on only when those tools are safe
|
|
117
|
+
* to call out-of-band.
|
|
118
|
+
*/
|
|
119
|
+
tools?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Extra tools to expose over MCP beyond the agent / ambient sets.
|
|
122
|
+
* Use this for tools written specifically for MCP consumers.
|
|
123
|
+
*/
|
|
124
|
+
extraTools?: MastraTools;
|
|
125
|
+
}
|
|
126
|
+
|
|
32
127
|
/** Configuration accepted by the Mastra AppKit plugin. */
|
|
33
128
|
export interface MastraPluginConfig extends BasePluginConfig {
|
|
34
129
|
/** Mastra OpenAI-compatible provider id. Defaults to `"databricks"`. */
|
|
@@ -89,10 +184,7 @@ export interface MastraPluginConfig extends BasePluginConfig {
|
|
|
89
184
|
* });
|
|
90
185
|
* ```
|
|
91
186
|
*/
|
|
92
|
-
agents?:
|
|
93
|
-
| Record<string, MastraAgentDefinition>
|
|
94
|
-
| MastraAgentDefinition
|
|
95
|
-
| MastraAgentDefinition[];
|
|
187
|
+
agents?: Record<string, MastraAgentDefinition> | MastraAgentDefinition | MastraAgentDefinition[];
|
|
96
188
|
/**
|
|
97
189
|
* Ambient tools spread into every registered agent's tools record;
|
|
98
190
|
* per-agent tools win on key collision. Use for a small shared
|
|
@@ -100,7 +192,8 @@ export interface MastraPluginConfig extends BasePluginConfig {
|
|
|
100
192
|
*/
|
|
101
193
|
tools?: MastraTools;
|
|
102
194
|
/**
|
|
103
|
-
* Agent id used
|
|
195
|
+
* Agent id used when the client doesn't specify one (the bare,
|
|
196
|
+
* un-suffixed history / suggestions routes resolve to it).
|
|
104
197
|
* Defaults to the first key in `agents` (or `"default"` when
|
|
105
198
|
* `agents` is omitted). Must match an id in `agents` when both are
|
|
106
199
|
* set; a mismatch throws at setup with the available candidates.
|
|
@@ -148,17 +241,20 @@ export interface MastraPluginConfig extends BasePluginConfig {
|
|
|
148
241
|
*/
|
|
149
242
|
modelOverride?: boolean;
|
|
150
243
|
/**
|
|
151
|
-
* Priority-ordered list of endpoint names tried when no
|
|
152
|
-
* plugin / env / request-override model id is set
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
244
|
+
* Priority-ordered list of endpoint names tried *first* when no
|
|
245
|
+
* agent / plugin / env / request-override model id is set, ahead of
|
|
246
|
+
* the dynamic score-classified catalogue. The resolver picks the
|
|
247
|
+
* first id that is actually present in the workspace's
|
|
248
|
+
* `/serving-endpoints` listing.
|
|
156
249
|
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
250
|
+
* When unset, resolution is driven by the live Foundation Model API
|
|
251
|
+
* `quality` / `speed` / `cost` scores: endpoints are classified into
|
|
252
|
+
* chat classes (`classifyEndpoints`) and walked best-first
|
|
253
|
+
* (ChatThinking -> ChatBalanced -> ChatFast), with the small built-in
|
|
254
|
+
* `FALLBACK_MODEL_IDS` list as the floor when the catalogue can't be
|
|
255
|
+
* read. Set this to
|
|
256
|
+
* pin a regulated workspace to an approved subset, or to put custom
|
|
257
|
+
* endpoints in front of the auto-classified catalogue.
|
|
162
258
|
*/
|
|
163
259
|
defaultModelFallbacks?: readonly string[];
|
|
164
260
|
/**
|
|
@@ -166,7 +262,7 @@ export interface MastraPluginConfig extends BasePluginConfig {
|
|
|
166
262
|
* processor that strips `chartId` fields from prior assistant
|
|
167
263
|
* tool-invocation results before they reach the model. This
|
|
168
264
|
* prevents the model from reusing turn-scoped chartIds it sees
|
|
169
|
-
* in memory recall (which would leave `[
|
|
265
|
+
* in memory recall (which would leave `[chart:<id>]` markers
|
|
170
266
|
* pointing at writer events that no longer exist).
|
|
171
267
|
*
|
|
172
268
|
* Set to `false` to opt out - useful if a non-default agent
|
|
@@ -189,4 +285,159 @@ export interface MastraPluginConfig extends BasePluginConfig {
|
|
|
189
285
|
* and the style block leans on the model's recency bias.
|
|
190
286
|
*/
|
|
191
287
|
styleInstructions?: string | false;
|
|
288
|
+
/**
|
|
289
|
+
* Genie spaces this plugin's agents can delegate to. One Mastra
|
|
290
|
+
* tool is registered per alias (`genie` for the well-known
|
|
291
|
+
* `default` alias, `genie_<alias>` otherwise). Each tool spins
|
|
292
|
+
* up a per-question Genie sub-agent that runs Databricks
|
|
293
|
+
* "agent mode" against the space, broadcasts wire events to the
|
|
294
|
+
* UI, fetches statement rows for non-empty results, and returns
|
|
295
|
+
* a `(string | data | chart)[]` summary the host UI renders
|
|
296
|
+
* inline.
|
|
297
|
+
*
|
|
298
|
+
* Entries accept either a full {@link GenieSpaceConfig} object
|
|
299
|
+
* or a bare `space_id` string when no extras are needed:
|
|
300
|
+
*
|
|
301
|
+
* ```ts
|
|
302
|
+
* mastra({
|
|
303
|
+
* genieSpaces: {
|
|
304
|
+
* default: "01ef0d3c0e1b1f4a8d2c3e4f5a6b7c8d",
|
|
305
|
+
* forecasts: { spaceId: "01ef...", hint: "weekly demand forecasts" },
|
|
306
|
+
* },
|
|
307
|
+
* });
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* Reach the spaces from an agent's `tools(plugins)` callback via
|
|
311
|
+
* `plugins.genie?.toolkit()`; the resulting tools accept
|
|
312
|
+
* `{ content, conversationId? }` and return a hydrated summary.
|
|
313
|
+
*
|
|
314
|
+
* **Fallback discovery** (highest precedence first): if this
|
|
315
|
+
* field is omitted, the Genie agent also picks up spaces from
|
|
316
|
+
* (1) the AppKit `genie({ spaces: { ... } })` plugin instance
|
|
317
|
+
* when registered, and (2) the `DATABRICKS_GENIE_SPACE_ID`
|
|
318
|
+
* env var (registered under the `default` alias). This keeps
|
|
319
|
+
* existing AppKit deployments working without restating the
|
|
320
|
+
* spaces config in two places.
|
|
321
|
+
*/
|
|
322
|
+
genieSpaces?: GenieSpacesConfig;
|
|
323
|
+
/**
|
|
324
|
+
* TTL for the in-memory Genie space metadata cache, in
|
|
325
|
+
* milliseconds. Defaults to 5 minutes. The Genie agent calls
|
|
326
|
+
* `client.genie.getSpace(...)` on every cold-start to get the
|
|
327
|
+
* title / description / warehouse id; cached responses skip the
|
|
328
|
+
* round-trip and concurrent callers coalesce on a single
|
|
329
|
+
* in-flight fetch. Drop to a smaller value when analysts are
|
|
330
|
+
* actively editing space metadata and you want changes visible
|
|
331
|
+
* within seconds; raise it to amortise the round-trip when
|
|
332
|
+
* space metadata is effectively frozen.
|
|
333
|
+
*
|
|
334
|
+
* Backed by AppKit's `CacheManager`, so the cache participates
|
|
335
|
+
* in telemetry spans (`cache.getOrExecute`) and benefits from
|
|
336
|
+
* Lakebase persistence when the `lakebase` plugin is wired up.
|
|
337
|
+
*/
|
|
338
|
+
genieSpaceCacheTtlMs?: number;
|
|
339
|
+
/**
|
|
340
|
+
* Maximum LLM steps each agent gets per turn. One step = one
|
|
341
|
+
* round-trip to the underlying model (a tool call consumes a
|
|
342
|
+
* step, the final-text reply consumes one too). Applies to
|
|
343
|
+
* every agent registered through {@link MastraPluginConfig.agents}
|
|
344
|
+
* - per-agent overrides aren't surfaced yet because the same
|
|
345
|
+
* ceiling has been sufficient across every workload we've run.
|
|
346
|
+
*
|
|
347
|
+
* Defaults to {@link DEFAULT_AGENT_MAX_STEPS} (25), sized to fit
|
|
348
|
+
* a decomposed Genie turn (grounding + several `ask_genie` calls
|
|
349
|
+
* + `prepare_chart` per dataset + the final-text reply) with
|
|
350
|
+
* headroom for the model to chain a couple of follow-ups before
|
|
351
|
+
* answering. Mastra's own `agent.generate` default of 5 would
|
|
352
|
+
* cut multi-step orchestration off after 2-3 tool calls, so
|
|
353
|
+
* explicitly raising the ceiling here is what lets the
|
|
354
|
+
* agent-mode loop play out.
|
|
355
|
+
*
|
|
356
|
+
* Lower when an unusually slow or expensive model makes long
|
|
357
|
+
* turns unaffordable; raise for exploratory workloads that need
|
|
358
|
+
* to drill deep into a dataset within a single turn.
|
|
359
|
+
*/
|
|
360
|
+
agentMaxSteps?: number;
|
|
361
|
+
/**
|
|
362
|
+
* Wire Mastra spans into AppKit's global OTel pipeline via
|
|
363
|
+
* `@mastra/otel-bridge`.
|
|
364
|
+
*
|
|
365
|
+
* - `undefined` (default, auto): on only when
|
|
366
|
+
* `OTEL_EXPORTER_OTLP_ENDPOINT` or
|
|
367
|
+
* `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` is set. When unset, the
|
|
368
|
+
* bridge is skipped so Mastra does not log
|
|
369
|
+
* `[OtelBridge] No OTEL span found` on the noop tracer.
|
|
370
|
+
* - `true`: force on even without an OTLP endpoint.
|
|
371
|
+
* - `false`: force off.
|
|
372
|
+
*/
|
|
373
|
+
observability?: boolean;
|
|
374
|
+
/**
|
|
375
|
+
* Log user feedback (thumbs up/down + freeform comments) to MLflow as
|
|
376
|
+
* trace assessments, and surface the feedback controls in the chat UI.
|
|
377
|
+
*
|
|
378
|
+
* - `undefined` (default, auto): enabled only when MLflow tracing is
|
|
379
|
+
* wired - an OTLP exporter endpoint is set and an MLflow experiment
|
|
380
|
+
* is named (the same signals the observability pipeline needs to
|
|
381
|
+
* ship traces to MLflow). Otherwise off, since there'd be no trace
|
|
382
|
+
* to attach feedback to.
|
|
383
|
+
* - `true`: force on. Feedback controls show and writes are attempted
|
|
384
|
+
* regardless of env detection (use when the env is configured in a
|
|
385
|
+
* way the auto-probe doesn't recognize).
|
|
386
|
+
* - `false`: force off. No trace-id header, no feedback route, no UI.
|
|
387
|
+
*
|
|
388
|
+
* Feedback attaches to a turn's MLflow trace via the OpenTelemetry
|
|
389
|
+
* trace id the server stamps on each response; see `mlflow.ts`.
|
|
390
|
+
*/
|
|
391
|
+
feedback?: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Expose the plugin's agents (and optionally tools) as a Mastra MCP
|
|
394
|
+
* server so external MCP clients - Claude Desktop, Cursor, the Mastra
|
|
395
|
+
* playground, or another agent - can call them over the standard MCP
|
|
396
|
+
* transports. Enabled by default (agents only): wrapping the
|
|
397
|
+
* already-registered agents costs nothing extra, so the endpoint is on
|
|
398
|
+
* out of the box; only the ambient tools (which assume an in-process
|
|
399
|
+
* chat turn) stay off unless explicitly opted in.
|
|
400
|
+
*
|
|
401
|
+
* - `undefined` (default) / `true`: expose every registered agent as
|
|
402
|
+
* an `ask_<agentId>` MCP tool under a server whose id is the plugin
|
|
403
|
+
* name.
|
|
404
|
+
* - `false`: no MCP endpoints.
|
|
405
|
+
* - {@link MastraMcpConfig}: fine-grained control over the server id,
|
|
406
|
+
* advertised metadata, and which agents / tools are exposed.
|
|
407
|
+
*
|
|
408
|
+
* When enabled, the stock Mastra MCP routes mount under the plugin's
|
|
409
|
+
* base path (no bespoke route is added - the server is handed to the
|
|
410
|
+
* `Mastra` instance via `mcpServers`, which `@mastra/express` serves):
|
|
411
|
+
*
|
|
412
|
+
* - Streamable HTTP: `POST /api/<plugin>/mcp/<serverId>/mcp`
|
|
413
|
+
* - SSE (legacy): `GET /api/<plugin>/mcp/<serverId>/sse`
|
|
414
|
+
* `POST /api/<plugin>/mcp/<serverId>/messages`
|
|
415
|
+
*
|
|
416
|
+
* Requests run under the same AppKit OBO scope as the chat routes, so
|
|
417
|
+
* an agent invoked over MCP resolves its model and tools as the
|
|
418
|
+
* calling user.
|
|
419
|
+
*/
|
|
420
|
+
mcp?: boolean | MastraMcpConfig;
|
|
421
|
+
/**
|
|
422
|
+
* How much of the stock `@mastra/express` management API is reachable
|
|
423
|
+
* through the plugin mount. `@mastra/express` registers its full route
|
|
424
|
+
* table (agent inference plus admin / mutating routes: direct tool
|
|
425
|
+
* execution, workflow control, raw memory read/write, telemetry, logs,
|
|
426
|
+
* scores). AppKit already authenticates every request as the OBO user,
|
|
427
|
+
* but nothing there restricts *which* of those operations the browser
|
|
428
|
+
* client may invoke.
|
|
429
|
+
*
|
|
430
|
+
* - `"scoped"` (default): only the routes the chat client legitimately
|
|
431
|
+
* needs are dispatched to Mastra - agent inference
|
|
432
|
+
* (`stream` / `generate` / `network`), read-only agent metadata, this
|
|
433
|
+
* plugin's own OBO- and resource-scoped `/route/*` routes (history /
|
|
434
|
+
* threads), and, when {@link mcp} is enabled, the MCP transport.
|
|
435
|
+
* Everything else (tool execution, workflow control, raw memory,
|
|
436
|
+
* telemetry, logs, scores, and other mutations) is rejected with
|
|
437
|
+
* `403` before it reaches Mastra.
|
|
438
|
+
* - `"full"`: dispatch the entire stock Mastra API. Use only for a
|
|
439
|
+
* trusted first-party console that genuinely needs the management
|
|
440
|
+
* surface.
|
|
441
|
+
*/
|
|
442
|
+
apiAccess?: "scoped" | "full";
|
|
192
443
|
}
|