@dbx-tools/appkit-mastra 0.1.93 → 0.1.95

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 CHANGED
@@ -18,7 +18,9 @@ history / listing in [`history.ts`](src/history.ts) /
18
18
  [`threads.ts`](src/threads.ts), Model Serving resolution in
19
19
  [`model.ts`](src/model.ts) / [`serving.ts`](src/serving.ts), Genie
20
20
  tooling in [`genie.ts`](src/genie.ts), the chart pipeline in
21
- [`chart.ts`](src/chart.ts), and MLflow feedback logging in
21
+ [`chart.ts`](src/chart.ts), Databricks workspace mounts in
22
+ [`workspaces.ts`](src/workspaces.ts) / [`filesystems.ts`](src/filesystems.ts),
23
+ and MLflow feedback logging in
22
24
  [`mlflow.ts`](src/mlflow.ts) (over the shared REST helper in
23
25
  [`rest.ts`](src/rest.ts)).
24
26
 
@@ -92,7 +94,57 @@ Override per plugin or per agent by passing `memory` / `storage` as
92
94
  index / schema). The fields are typed in [`config.ts`](src/config.ts);
93
95
  the wiring is in [`memory.ts`](src/memory.ts).
94
96
 
95
- ### Conversations (threads)
97
+ ## Workspace and Assistant skills
98
+
99
+ Every `createAgent` call applies a Mastra `Workspace` by default via
100
+ `createWorkspace()` ([`workspaces.ts`](src/workspaces.ts)). The
101
+ workspace is resolved per request and backed by the OBO user's
102
+ `WorkspaceClient` through [`filesystems.ts`](src/filesystems.ts).
103
+
104
+ Unless you opt out, `assistantSkills: true` mounts read-only Databricks
105
+ trees where Mastra looks for `SKILL.md` files:
106
+
107
+ | Databricks path | Workspace mount |
108
+ | --- | --- |
109
+ | `/Workspace/.assistant/skills` | `/workspace_skills` |
110
+ | `/Users/<email>/.assistant/skills` | `/workspace_user_skills` |
111
+
112
+ Production mounts require `workspace` or `all-apis` on the forwarded
113
+ access token. [`server.ts`](src/server.ts) stamps parsed scopes on
114
+ `MASTRA_SCOPES_KEY` using `tokenUtils` from `@dbx-tools/shared`.
115
+ `NODE_ENV=development` skips the scope gate.
116
+
117
+ ```ts
118
+ import { createAgent, createWorkspace } from "@dbx-tools/appkit-mastra";
119
+
120
+ // Default: Assistant skills on.
121
+ const support = createAgent({ instructions: "..." });
122
+
123
+ // Extra per-request mounts (merged with built-in skill mounts).
124
+ const analyst = createAgent({
125
+ instructions: "...",
126
+ workspace: createWorkspace({
127
+ mounts: [
128
+ async () => ({
129
+ mounts: { "/data": myFilesystem },
130
+ skillPaths: [],
131
+ }),
132
+ ],
133
+ }),
134
+ });
135
+
136
+ // Disable built-in skill mounts.
137
+ const bare = createAgent({
138
+ instructions: "...",
139
+ workspace: createWorkspace({ assistantSkills: false }),
140
+ });
141
+ ```
142
+
143
+ Exported for direct use: `createWorkspace`, `DatabricksWorkspaceFilesystem`,
144
+ `emptyFilesystem`, and path helpers (`normalizeDatabricksBasePath`,
145
+ `isDbfsPath`, `resolveDatabricksAbsolutePath`, ...).
146
+
147
+ ## Conversations (threads)
96
148
 
97
149
  When storage is on, a user owns many conversation threads. The plugin
98
150
  resolves the thread a request targets from `RequestContext`, in order:
package/dist/index.d.ts CHANGED
@@ -1,15 +1,16 @@
1
1
  import { Chart } from "@dbx-tools/appkit-mastra-shared";
2
2
  import { ServingEndpointSummary } from "@dbx-tools/model";
3
+ import { CopyOptions, FileContent, FileEntry, FileStat, FilesystemInfo, ListOptions, MastraFilesystem, MastraFilesystemOptions, ProviderStatus, ReadOptions, RemoveOptions, SkillsResolver, Workspace, WorkspaceFilesystem, WriteOptions } from "@mastra/core/workspace";
3
4
  import { appkitUtils, logUtils } from "@dbx-tools/shared";
5
+ import { RequestContext } from "@mastra/core/request-context";
6
+ import { WorkspaceClient } from "@databricks/sdk-experimental";
7
+ import * as _databricks_appkit0 from "@databricks/appkit";
8
+ import { BasePluginConfig, IAppRouter, Plugin, ResourceRequirement } from "@databricks/appkit";
4
9
  import * as _mastra_core_agent0 from "@mastra/core/agent";
5
10
  import { Agent, AgentConfig, ToolsInput } from "@mastra/core/agent";
6
11
  import * as _mastra_core_tools0 from "@mastra/core/tools";
7
12
  import { Tool, createTool } from "@mastra/core/tools";
8
- import * as _databricks_appkit0 from "@databricks/appkit";
9
- import { BasePluginConfig, IAppRouter, Plugin, ResourceRequirement } from "@databricks/appkit";
10
13
  import { z } from "zod";
11
- import { RequestContext } from "@mastra/core/request-context";
12
- import { WorkspaceClient } from "@databricks/sdk-experimental";
13
14
  import { MCPServer } from "@mastra/mcp";
14
15
  import { Mastra } from "@mastra/core/mastra";
15
16
  import express from "express";
@@ -29,6 +30,62 @@ import * as _mastra_core_channels0 from "@mastra/core/channels";
29
30
  export * from "@dbx-tools/appkit-mastra-shared";
30
31
  export * from "@dbx-tools/model";
31
32
 
33
+ //#region packages/appkit-mastra/src/workspaces.d.ts
34
+ /** Per-request context for mount resolvers. */
35
+ interface WorkspaceMountContext {
36
+ requestContext?: RequestContext;
37
+ }
38
+ /** Mount map plus optional Mastra skill scan roots for one resolver. */
39
+ interface WorkspaceMountContribution {
40
+ mounts: Record<string, WorkspaceFilesystem>;
41
+ /** Paths within the composite namespace where `SKILL.md` files are scanned. */
42
+ skillPaths?: string[];
43
+ }
44
+ /** Contributes filesystem mounts (and optional skill paths) for one request. */
45
+ type WorkspaceMountResolver = (context: WorkspaceMountContext) => WorkspaceMountContribution | Promise<WorkspaceMountContribution>;
46
+ /** Options for {@link createWorkspace}. */
47
+ interface CreateWorkspaceOptions {
48
+ /** Workspace id; derived from `name` or `"workspace"` when omitted. */
49
+ id?: string;
50
+ /** Display name; derived from `id` when omitted. */
51
+ name?: string;
52
+ /**
53
+ * Mount read-only Assistant skill trees from `/Workspace/.assistant/skills`
54
+ * and `/Users/<email>/.assistant/skills`. Defaults to `true`.
55
+ */
56
+ assistantSkills?: boolean;
57
+ /** Extra per-request mount resolvers (run after built-in options). */
58
+ mounts?: WorkspaceMountResolver[];
59
+ /** Replace the auto-built dynamic skills resolver. */
60
+ skills?: SkillsResolver;
61
+ /** Forwarded to Mastra when skill discovery is enabled. */
62
+ checkSkillFileMtime?: boolean;
63
+ /** Enable BM25 keyword search over indexed workspace content. */
64
+ bm25?: boolean;
65
+ }
66
+ /**
67
+ * Create a Mastra {@link Workspace} with per-request Databricks mounts.
68
+ *
69
+ * @example Assistant skills only (default for agents in this plugin)
70
+ * ```ts
71
+ * createWorkspace()
72
+ * ```
73
+ *
74
+ * @example Assistant skills plus a custom mount resolver
75
+ * ```ts
76
+ * createWorkspace({
77
+ * assistantSkills: true,
78
+ * mounts: [
79
+ * async ({ requestContext }) => ({
80
+ * mounts: { "/data": myFilesystem },
81
+ * skillPaths: [],
82
+ * }),
83
+ * ],
84
+ * })
85
+ * ```
86
+ */
87
+ declare function createWorkspace(options?: CreateWorkspaceOptions): Workspace;
88
+ //#endregion
32
89
  //#region packages/appkit-mastra/src/genie.d.ts
33
90
  /** Default alias used when a single unnamed Genie space is wired up. */
34
91
  declare const DEFAULT_GENIE_ALIAS = "default";
@@ -178,6 +235,13 @@ declare const MASTRA_USER_EMAIL_KEY = "mastra__userEmail";
178
235
  * join key.
179
236
  */
180
237
  declare const MASTRA_REQUEST_ID_KEY = "mastra__requestId";
238
+ /**
239
+ * `RequestContext` key for OAuth scopes parsed from the forwarded
240
+ * access token by {@link MastraServer.configureRequestContextScopes}.
241
+ * Workspace mounts that touch Databricks workspace files require
242
+ * `workspace` or `all-apis` in this list.
243
+ */
244
+ declare const MASTRA_SCOPES_KEY = "mastra__scopes";
181
245
  /**
182
246
  * Canonical list of `RequestContext` keys we want Mastra to extract
183
247
  * as metadata on every observability span (agent runs, model calls,
@@ -764,6 +828,8 @@ interface MastraPluginToolkitProvider {
764
828
  type MastraPlugins = Record<string, MastraPluginToolkitProvider>;
765
829
  /** Function form of {@link MastraAgentDefinition.tools}. */
766
830
  type MastraToolsFn = (plugins: MastraPlugins) => MastraTools | Promise<MastraTools>;
831
+ /** Function form of {@link MastraAgentDefinition.workspace}. */
832
+ type MastraAgentWorkspaceResolver = () => Workspace | undefined;
767
833
  /**
768
834
  * A code-defined Mastra agent. Mirrors the shape AppKit's `agents`
769
835
  * plugin uses for `AgentDefinition`. The registry key under
@@ -825,6 +891,12 @@ interface MastraAgentDefinition {
825
891
  * `PostgresStore` config (custom schema, connection, etc.).
826
892
  */
827
893
  storage?: boolean | MastraStorageConfigOverride;
894
+ /**
895
+ * Mastra {@link Workspace} for this agent (filesystem, sandbox, or other
896
+ * providers). Assistant skills from Databricks workspace paths are wired
897
+ * via {@link createWorkspace}.
898
+ */
899
+ workspace?: Workspace | MastraAgentWorkspaceResolver;
828
900
  }
829
901
  /**
830
902
  * Distributive `Omit` so unions in `PostgresStoreConfig` /
@@ -1033,6 +1105,200 @@ declare function buildRenderDataTool(config: MastraPluginConfig): _mastra_core_t
1033
1105
  chartId: string;
1034
1106
  }, unknown, unknown, _mastra_core_tools0.ToolExecutionContext<unknown, unknown, unknown>, "render_data", unknown>;
1035
1107
  //#endregion
1108
+ //#region packages/appkit-mastra/src/filesystems.d.ts
1109
+ /** Options for {@link DatabricksWorkspaceFilesystem}. */
1110
+ interface DatabricksWorkspaceFilesystemOptions extends MastraFilesystemOptions {
1111
+ /** Unique identifier for this filesystem instance. */
1112
+ id?: string;
1113
+ /** Auth-scoped Databricks workspace client. */
1114
+ client?: WorkspaceClient;
1115
+ /**
1116
+ * Absolute Databricks path that roots the workspace namespace, e.g.
1117
+ * `/Volumes/catalog/schema/volume` or `/dbfs/FileStore/shared`.
1118
+ */
1119
+ basePath: string;
1120
+ /**
1121
+ * When `true`, {@link init} and file operations fail if {@link basePath}
1122
+ * is missing. When `false` (default), a missing base path yields an empty
1123
+ * read-only namespace (only `/` exists).
1124
+ */
1125
+ requireBasePath?: boolean;
1126
+ /** Block writes while still allowing reads. When omitted, {@link DatabricksWorkspaceFilesystem.init} probes write access. */
1127
+ readOnly?: boolean;
1128
+ }
1129
+ /** Normalize a Databricks base path (POSIX, no trailing slash). */
1130
+ declare function normalizeDatabricksBasePath(basePath: string): string;
1131
+ /** True when `absolutePath` is served by DBFS rather than the UC Files API. */
1132
+ declare function isDbfsPath(absolutePath: string): boolean;
1133
+ /** True when `absolutePath` is a Databricks workspace object path. */
1134
+ declare function isWorkspaceFilesPath(absolutePath: string): boolean;
1135
+ /**
1136
+ * Resolve a workspace-relative path to an absolute Databricks path under
1137
+ * `basePath`.
1138
+ */
1139
+ declare function resolveDatabricksAbsolutePath(basePath: string, inputPath: string): string;
1140
+ /** Map an absolute Databricks path back to the workspace namespace. */
1141
+ declare function toDatabricksWorkspacePath(basePath: string, absolutePath: string): string;
1142
+ /**
1143
+ * Mastra filesystem provider that reads and writes through a Databricks
1144
+ * {@link WorkspaceClient}.
1145
+ *
1146
+ * Workspace paths are absolute within the namespace (`/notes.md` maps to
1147
+ * `<basePath>/notes.md`). Unity Catalog volumes use the Files API;
1148
+ * `/dbfs/...` paths use DBFS.
1149
+ */
1150
+ declare class DatabricksWorkspaceFilesystem extends MastraFilesystem {
1151
+ readonly id: string;
1152
+ readonly name = "DatabricksWorkspaceFilesystem";
1153
+ readonly provider = "databricks";
1154
+ readonly basePath: string;
1155
+ status: ProviderStatus;
1156
+ private readonly client;
1157
+ private readonly requireBasePath;
1158
+ private _readOnly;
1159
+ private _basePathMissing;
1160
+ get readOnly(): boolean | undefined;
1161
+ /**
1162
+ * @param options.client - Defaults to the AppKit execution-context client.
1163
+ * @param options.readOnly - When omitted, {@link init} probes write access.
1164
+ * @param options.requireBasePath - When `false` (default), a missing
1165
+ * {@link basePath} yields an empty namespace instead of errors.
1166
+ */
1167
+ constructor(options: DatabricksWorkspaceFilesystemOptions);
1168
+ /** Resolve and sandbox a workspace-relative path under {@link basePath}. */
1169
+ private resolvePath;
1170
+ /** Map a Databricks absolute path back to the workspace namespace. */
1171
+ private workspacePath;
1172
+ /** Throw when the filesystem is read-only. */
1173
+ private assertWritable;
1174
+ /** Map SDK / HTTP errors to Mastra workspace filesystem errors. */
1175
+ private rethrow;
1176
+ /**
1177
+ * When {@link requireBasePath} is `false`, probe whether {@link basePath}
1178
+ * exists and cache the result on {@link _basePathMissing}.
1179
+ */
1180
+ private resolveBasePathStatus;
1181
+ /** Delegate to {@link emptyFilesystem} when the optional base path is missing. */
1182
+ private emptyFallback;
1183
+ init(): Promise<void>;
1184
+ /**
1185
+ * Create the base directory when missing and writes are allowed.
1186
+ *
1187
+ * Uses raw SDK errors for the not-found branch so {@link apiUtils.isNotFoundError}
1188
+ * still matches before {@link rethrow} wraps them as Mastra errors.
1189
+ */
1190
+ private ensureBaseExists;
1191
+ /**
1192
+ * Write and delete a ephemeral probe file to detect read-only access when
1193
+ * {@link DatabricksWorkspaceFilesystemOptions.readOnly} was not set.
1194
+ *
1195
+ * @returns `true` when the probe write (and cleanup) succeeded.
1196
+ */
1197
+ private probeReadOnly;
1198
+ destroy(): Promise<void>;
1199
+ /** Probe that `absolutePath` exists (file or directory metadata). */
1200
+ private assertAbsoluteReadable;
1201
+ /** Read the full contents of `absolutePath` from the matching backend. */
1202
+ private readAbsolute;
1203
+ /** Write `buffer` to `absolutePath` on the matching backend. */
1204
+ private writeAbsolute;
1205
+ /** Upload a buffer to a Unity Catalog Files API path. */
1206
+ private uploadUcFile;
1207
+ /** Delete a single file at `absolutePath` (non-recursive). */
1208
+ private deleteAbsoluteFile;
1209
+ /**
1210
+ * Delete a file or directory at `absolutePath`.
1211
+ *
1212
+ * DBFS and workspace APIs accept `recursive`; UC volumes recurse manually.
1213
+ */
1214
+ private deleteAbsolutePath;
1215
+ /** Create `absolutePath` and any missing parents on the matching backend. */
1216
+ private mkdirAbsolute;
1217
+ private readDbfsFile;
1218
+ private readWorkspaceFile;
1219
+ private writeDbfsFile;
1220
+ private writeWorkspaceFile;
1221
+ getInfo(): FilesystemInfo<{
1222
+ basePath: string;
1223
+ }>;
1224
+ getInstructions(): string;
1225
+ /** Map a workspace-relative path to the backing Databricks absolute path. */
1226
+ resolveAbsolutePath(inputPath: string): string | undefined;
1227
+ /** Read file contents from the workspace namespace. */
1228
+ readFile(inputPath: string, options?: ReadOptions): Promise<string | Buffer>;
1229
+ /** Write file contents into the workspace namespace. */
1230
+ writeFile(inputPath: string, content: FileContent, options?: WriteOptions): Promise<void>;
1231
+ /** Append to an existing file, creating it when missing. */
1232
+ appendFile(inputPath: string, content: FileContent): Promise<void>;
1233
+ /** Delete a file in the workspace namespace. */
1234
+ deleteFile(inputPath: string, options?: RemoveOptions): Promise<void>;
1235
+ /** Copy a file within the workspace namespace. */
1236
+ copyFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
1237
+ /** Move or rename a file within the workspace namespace. */
1238
+ moveFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
1239
+ /** Create a directory in the workspace namespace. */
1240
+ mkdir(inputPath: string, options?: {
1241
+ recursive?: boolean;
1242
+ }): Promise<void>;
1243
+ /** Remove a directory from the workspace namespace. */
1244
+ rmdir(inputPath: string, options?: RemoveOptions): Promise<void>;
1245
+ /**
1246
+ * Recursively delete a Unity Catalog directory tree.
1247
+ *
1248
+ * DBFS and workspace trees use native recursive delete via
1249
+ * {@link deleteAbsolutePath} instead.
1250
+ */
1251
+ private deleteUcDirectoryRecursive;
1252
+ /** List entries in a workspace directory. */
1253
+ readdir(inputPath: string, options?: ListOptions): Promise<FileEntry[]>;
1254
+ private readDirectoryRecursive;
1255
+ private listAbsoluteDirectory;
1256
+ /** Apply Mastra list filters (`extension`, etc.) to directory entries. */
1257
+ private filterEntries;
1258
+ /** Return whether `inputPath` exists in the workspace namespace. */
1259
+ exists(inputPath: string): Promise<boolean>;
1260
+ /** Return file or directory metadata for `inputPath`. */
1261
+ stat(inputPath: string): Promise<FileStat>;
1262
+ /**
1263
+ * Stat a Unity Catalog path by probing file metadata first, then
1264
+ * directory metadata.
1265
+ */
1266
+ private statUcAbsolute;
1267
+ }
1268
+ /**
1269
+ * Read-only in-memory {@link WorkspaceFilesystem} with a single empty root.
1270
+ * Use {@link emptyFilesystem} rather than constructing directly.
1271
+ */
1272
+ declare class EmptyFilesystem extends MastraFilesystem {
1273
+ readonly id = "empty-fs";
1274
+ readonly name = "EmptyFilesystem";
1275
+ readonly provider = "empty";
1276
+ readonly readOnly = true;
1277
+ status: ProviderStatus;
1278
+ constructor();
1279
+ init(): Promise<void>;
1280
+ destroy(): Promise<void>;
1281
+ getInfo(): FilesystemInfo;
1282
+ getInstructions(): string;
1283
+ private rootStat;
1284
+ private assertWritable;
1285
+ readFile(inputPath: string, _options?: ReadOptions): Promise<string | Buffer>;
1286
+ writeFile(_inputPath: string, _content: FileContent, _options?: WriteOptions): Promise<void>;
1287
+ appendFile(_inputPath: string, _content: FileContent): Promise<void>;
1288
+ deleteFile(inputPath: string, options?: RemoveOptions): Promise<void>;
1289
+ copyFile(src: string, _dest: string, _options?: CopyOptions): Promise<void>;
1290
+ moveFile(src: string, dest: string, options?: CopyOptions): Promise<void>;
1291
+ mkdir(_inputPath: string, _options?: {
1292
+ recursive?: boolean;
1293
+ }): Promise<void>;
1294
+ rmdir(inputPath: string, options?: RemoveOptions): Promise<void>;
1295
+ readdir(inputPath: string, _options?: ListOptions): Promise<FileEntry[]>;
1296
+ exists(inputPath: string): Promise<boolean>;
1297
+ stat(inputPath: string): Promise<FileStat>;
1298
+ }
1299
+ /** Memoized singleton empty read-only filesystem for no-op mounts. */
1300
+ declare const emptyFilesystem: () => EmptyFilesystem;
1301
+ //#endregion
1036
1302
  //#region packages/appkit-mastra/src/mcp.d.ts
1037
1303
  /**
1038
1304
  * A built MCP server plus the request paths it answers on, relative to
@@ -1100,7 +1366,7 @@ declare class MastraServer$1 extends MastraServer {
1100
1366
  private feedbackEnabled;
1101
1367
  constructor(config: MastraPluginConfig, ...args: ConstructorParameters<typeof MastraServer>);
1102
1368
  registerAuthMiddleware(): void;
1103
- configureRequestContextUser(requestContext: RequestContext): void;
1369
+ configureRequestContextUser(requestContext: RequestContext): Promise<void>;
1104
1370
  /**
1105
1371
  * Stamp a per-request id and echo it on the response so an upstream
1106
1372
  * proxy / curl client / browser-side log line can pair its view of
@@ -1113,6 +1379,11 @@ declare class MastraServer$1 extends MastraServer {
1113
1379
  * response header so dev tools can copy it from either side.
1114
1380
  */
1115
1381
  configureRequestContextRequestId(req: express.Request, res: express.Response, requestContext: RequestContext): void;
1382
+ /**
1383
+ * Stamp OAuth scopes from the forwarded access token on
1384
+ * {@link MASTRA_SCOPES_KEY} for workspace mount gating.
1385
+ */
1386
+ configureRequestContextScopes(req: express.Request, requestContext: RequestContext): void;
1116
1387
  /**
1117
1388
  * Stamp the turn's MLflow trace id on the response so the chat client
1118
1389
  * can attach thumbs / comment feedback to it later. MLflow derives
@@ -1404,4 +1675,4 @@ declare function buildSummarizeTool(config: MastraPluginConfig): _mastra_core_to
1404
1675
  maxWords?: number | undefined;
1405
1676
  }, unknown, unknown, unknown, _mastra_core_tools0.ToolExecutionContext<unknown, unknown, unknown>, "summarize", unknown>;
1406
1677
  //#endregion
1407
- export { AppKitToolOptions, BuiltAgents, ChartPlannerRequest, DEFAULT_AGENT_MAX_STEPS, DEFAULT_GENIE_ALIAS, DEFAULT_STYLE_INSTRUCTIONS, FALLBACK_AGENT_ID, FetchChartOptions, GENIE_INSTRUCTIONS, GenieSpaceConfig, GenieSpacesConfig, MASTRA_MODEL_OVERRIDE_KEY, MASTRA_REQUEST_ID_KEY, MASTRA_USER_EMAIL_KEY, MASTRA_USER_KEY, MASTRA_USER_NAME_KEY, MastraAgentDefinition, MastraMcpConfig, MastraMemoryConfig, MastraMemoryConfigOverride, MastraPlugin, MastraPluginConfig, MastraPluginToolkitProvider, MastraPlugins, MastraStorageConfigOverride, MastraTools, MastraToolsFn, type ModelOverrideRequest, PrepareChartOptions, ResolvedMcp, type SummarizeOptions, TRACE_REQUEST_CONTEXT_KEYS, ToolkitOptions, User, approvalGatedToolIds, buildAgents, buildGenieToolkitProvider, buildGenieTools, buildMcpServer, buildRenderDataTool, buildSummarizeTool, chartPlannerRequestSchema, collectSpaceSuggestions, createAgent, createTool, extractModelOverride, fetchChart, mastra, normalizeGenieSpaces, prepareChart, resolveGenieSpaces, summarizeText, tool };
1678
+ export { AppKitToolOptions, BuiltAgents, ChartPlannerRequest, DEFAULT_AGENT_MAX_STEPS, DEFAULT_GENIE_ALIAS, DEFAULT_STYLE_INSTRUCTIONS, DatabricksWorkspaceFilesystem, type DatabricksWorkspaceFilesystemOptions, FALLBACK_AGENT_ID, FetchChartOptions, GENIE_INSTRUCTIONS, GenieSpaceConfig, GenieSpacesConfig, MASTRA_MODEL_OVERRIDE_KEY, MASTRA_REQUEST_ID_KEY, MASTRA_SCOPES_KEY, MASTRA_USER_EMAIL_KEY, MASTRA_USER_KEY, MASTRA_USER_NAME_KEY, MastraAgentDefinition, MastraAgentWorkspaceResolver, MastraMcpConfig, MastraMemoryConfig, MastraMemoryConfigOverride, MastraPlugin, MastraPluginConfig, MastraPluginToolkitProvider, MastraPlugins, MastraStorageConfigOverride, MastraTools, MastraToolsFn, type ModelOverrideRequest, PrepareChartOptions, ResolvedMcp, type SummarizeOptions, TRACE_REQUEST_CONTEXT_KEYS, ToolkitOptions, User, approvalGatedToolIds, buildAgents, buildGenieToolkitProvider, buildGenieTools, buildMcpServer, buildRenderDataTool, buildSummarizeTool, chartPlannerRequestSchema, collectSpaceSuggestions, createAgent, createTool, createWorkspace, emptyFilesystem, extractModelOverride, fetchChart, isDbfsPath, isWorkspaceFilesPath, mastra, normalizeDatabricksBasePath, normalizeGenieSpaces, prepareChart, resolveDatabricksAbsolutePath, resolveGenieSpaces, summarizeText, toDatabricksWorkspacePath, tool };