@dbx-tools/appkit-mastra 0.9.31 → 0.9.36

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/package.json CHANGED
@@ -19,7 +19,8 @@
19
19
  "projen": "projen"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/bun": "1.3.14",
22
+ "@opentelemetry/sdk-trace-base": "2.8.0",
23
+ "@opentelemetry/sdk-trace-node": "2.8.0",
23
24
  "@types/express": "^5.0.5",
24
25
  "@types/node": "^24.6.0",
25
26
  "@types/pg": "^8",
@@ -32,18 +33,18 @@
32
33
  },
33
34
  "dependencies": {
34
35
  "@databricks/appkit": "0.81.0",
35
- "@dbx-tools/appkit": "^0.9.31",
36
- "@dbx-tools/core": "^0.9.31",
37
- "@dbx-tools/databricks": "^0.9.31",
38
- "@dbx-tools/fs": "^0.9.31",
39
- "@dbx-tools/genie": "^0.9.31",
40
- "@dbx-tools/model": "^0.9.31",
41
- "@dbx-tools/path": "^0.9.31",
42
- "@dbx-tools/shared-core": "^0.9.31",
43
- "@dbx-tools/shared-fs": "^0.9.31",
44
- "@dbx-tools/shared-genie": "^0.9.31",
45
- "@dbx-tools/shared-mastra": "^0.9.31",
46
- "@dbx-tools/shared-model": "^0.9.31",
36
+ "@dbx-tools/appkit": "^0.9.36",
37
+ "@dbx-tools/core": "^0.9.36",
38
+ "@dbx-tools/databricks": "^0.9.36",
39
+ "@dbx-tools/fs": "^0.9.36",
40
+ "@dbx-tools/genie": "^0.9.36",
41
+ "@dbx-tools/model": "^0.9.36",
42
+ "@dbx-tools/path": "^0.9.36",
43
+ "@dbx-tools/shared-core": "^0.9.36",
44
+ "@dbx-tools/shared-fs": "^0.9.36",
45
+ "@dbx-tools/shared-genie": "^0.9.36",
46
+ "@dbx-tools/shared-mastra": "^0.9.36",
47
+ "@dbx-tools/shared-model": "^0.9.36",
47
48
  "@mastra/ai-sdk": "1.10.5",
48
49
  "@mastra/core": "1.71.0",
49
50
  "@mastra/express": "1.5.15",
@@ -55,6 +56,7 @@
55
56
  "@mastra/pg": "1.27.1",
56
57
  "@modelcontextprotocol/sdk": "^1.29.0",
57
58
  "@opentelemetry/api": "^1.9.1",
59
+ "@opentelemetry/core": "2.11.0",
58
60
  "@pydantic/monty": "0.0.23",
59
61
  "express": "^5.1.0",
60
62
  "pg": "^8.22.0",
@@ -71,17 +73,278 @@
71
73
  "types": "./lib/index.d.ts",
72
74
  "default": "./lib/index.js"
73
75
  },
76
+ "./agents": {
77
+ "types": "./lib/src/agents.d.ts",
78
+ "default": "./lib/src/agents.js"
79
+ },
80
+ "./chart": {
81
+ "types": "./lib/src/chart.d.ts",
82
+ "default": "./lib/src/chart.js"
83
+ },
84
+ "./chat": {
85
+ "types": "./lib/src/chat.d.ts",
86
+ "default": "./lib/src/chat.js"
87
+ },
88
+ "./config": {
89
+ "types": "./lib/src/config.d.ts",
90
+ "default": "./lib/src/config.js"
91
+ },
92
+ "./defaults": {
93
+ "types": "./lib/src/defaults.d.ts",
94
+ "default": "./lib/src/defaults.js"
95
+ },
96
+ "./evaluation": {
97
+ "types": "./lib/src/evaluation.d.ts",
98
+ "default": "./lib/src/evaluation.js"
99
+ },
100
+ "./filesystems": {
101
+ "types": "./lib/src/filesystems.d.ts",
102
+ "default": "./lib/src/filesystems.js"
103
+ },
104
+ "./genie": {
105
+ "types": "./lib/src/genie.d.ts",
106
+ "default": "./lib/src/genie.js"
107
+ },
108
+ "./identity": {
109
+ "types": "./lib/src/identity.d.ts",
110
+ "default": "./lib/src/identity.js"
111
+ },
112
+ "./mcp": {
113
+ "types": "./lib/src/mcp.d.ts",
114
+ "default": "./lib/src/mcp.js"
115
+ },
116
+ "./memory": {
117
+ "types": "./lib/src/memory.d.ts",
118
+ "default": "./lib/src/memory.js"
119
+ },
120
+ "./mlflow": {
121
+ "types": "./lib/src/mlflow.d.ts",
122
+ "default": "./lib/src/mlflow.js"
123
+ },
124
+ "./model": {
125
+ "types": "./lib/src/model.d.ts",
126
+ "default": "./lib/src/model.js"
127
+ },
128
+ "./monty-sandbox": {
129
+ "types": "./lib/src/monty-sandbox.d.ts",
130
+ "default": "./lib/src/monty-sandbox.js"
131
+ },
132
+ "./observability": {
133
+ "types": "./lib/src/observability.d.ts",
134
+ "default": "./lib/src/observability.js"
135
+ },
136
+ "./plugin": {
137
+ "types": "./lib/src/plugin.d.ts",
138
+ "default": "./lib/src/plugin.js"
139
+ },
140
+ "./processors": {
141
+ "types": "./lib/src/processors.d.ts",
142
+ "default": "./lib/src/processors.js"
143
+ },
144
+ "./remote-skills": {
145
+ "types": "./lib/src/remote-skills.d.ts",
146
+ "default": "./lib/src/remote-skills.js"
147
+ },
148
+ "./rest": {
149
+ "types": "./lib/src/rest.d.ts",
150
+ "default": "./lib/src/rest.js"
151
+ },
152
+ "./sandbox": {
153
+ "types": "./lib/src/sandbox.d.ts",
154
+ "default": "./lib/src/sandbox.js"
155
+ },
156
+ "./server": {
157
+ "types": "./lib/src/server.d.ts",
158
+ "default": "./lib/src/server.js"
159
+ },
160
+ "./serving-sanitize": {
161
+ "types": "./lib/src/serving-sanitize.d.ts",
162
+ "default": "./lib/src/serving-sanitize.js"
163
+ },
164
+ "./serving": {
165
+ "types": "./lib/src/serving.d.ts",
166
+ "default": "./lib/src/serving.js"
167
+ },
168
+ "./skill-paths": {
169
+ "types": "./lib/src/skill-paths.d.ts",
170
+ "default": "./lib/src/skill-paths.js"
171
+ },
172
+ "./statement": {
173
+ "types": "./lib/src/statement.d.ts",
174
+ "default": "./lib/src/statement.js"
175
+ },
176
+ "./storage-schema": {
177
+ "types": "./lib/src/storage-schema.d.ts",
178
+ "default": "./lib/src/storage-schema.js"
179
+ },
180
+ "./style": {
181
+ "types": "./lib/src/style.d.ts",
182
+ "default": "./lib/src/style.js"
183
+ },
184
+ "./summarize": {
185
+ "types": "./lib/src/summarize.d.ts",
186
+ "default": "./lib/src/summarize.js"
187
+ },
188
+ "./trace-io": {
189
+ "types": "./lib/src/trace-io.d.ts",
190
+ "default": "./lib/src/trace-io.js"
191
+ },
192
+ "./validation": {
193
+ "types": "./lib/src/validation.d.ts",
194
+ "default": "./lib/src/validation.js"
195
+ },
196
+ "./workspaces": {
197
+ "types": "./lib/src/workspaces.d.ts",
198
+ "default": "./lib/src/workspaces.js"
199
+ },
200
+ "./writer": {
201
+ "types": "./lib/src/writer.d.ts",
202
+ "default": "./lib/src/writer.js"
203
+ },
74
204
  "./package.json": "./package.json"
75
205
  }
76
206
  },
77
- "version": "0.9.31",
207
+ "version": "0.9.36",
78
208
  "types": "./lib/index.d.ts",
209
+ "dbxToolsConfig": {
210
+ "tags": [
211
+ "node"
212
+ ]
213
+ },
79
214
  "type": "module",
80
215
  "exports": {
81
216
  ".": {
82
217
  "types": "./lib/index.d.ts",
83
218
  "default": "./lib/index.js"
84
219
  },
220
+ "./agents": {
221
+ "types": "./lib/src/agents.d.ts",
222
+ "default": "./lib/src/agents.js"
223
+ },
224
+ "./chart": {
225
+ "types": "./lib/src/chart.d.ts",
226
+ "default": "./lib/src/chart.js"
227
+ },
228
+ "./chat": {
229
+ "types": "./lib/src/chat.d.ts",
230
+ "default": "./lib/src/chat.js"
231
+ },
232
+ "./config": {
233
+ "types": "./lib/src/config.d.ts",
234
+ "default": "./lib/src/config.js"
235
+ },
236
+ "./defaults": {
237
+ "types": "./lib/src/defaults.d.ts",
238
+ "default": "./lib/src/defaults.js"
239
+ },
240
+ "./evaluation": {
241
+ "types": "./lib/src/evaluation.d.ts",
242
+ "default": "./lib/src/evaluation.js"
243
+ },
244
+ "./filesystems": {
245
+ "types": "./lib/src/filesystems.d.ts",
246
+ "default": "./lib/src/filesystems.js"
247
+ },
248
+ "./genie": {
249
+ "types": "./lib/src/genie.d.ts",
250
+ "default": "./lib/src/genie.js"
251
+ },
252
+ "./identity": {
253
+ "types": "./lib/src/identity.d.ts",
254
+ "default": "./lib/src/identity.js"
255
+ },
256
+ "./mcp": {
257
+ "types": "./lib/src/mcp.d.ts",
258
+ "default": "./lib/src/mcp.js"
259
+ },
260
+ "./memory": {
261
+ "types": "./lib/src/memory.d.ts",
262
+ "default": "./lib/src/memory.js"
263
+ },
264
+ "./mlflow": {
265
+ "types": "./lib/src/mlflow.d.ts",
266
+ "default": "./lib/src/mlflow.js"
267
+ },
268
+ "./model": {
269
+ "types": "./lib/src/model.d.ts",
270
+ "default": "./lib/src/model.js"
271
+ },
272
+ "./monty-sandbox": {
273
+ "types": "./lib/src/monty-sandbox.d.ts",
274
+ "default": "./lib/src/monty-sandbox.js"
275
+ },
276
+ "./observability": {
277
+ "types": "./lib/src/observability.d.ts",
278
+ "default": "./lib/src/observability.js"
279
+ },
280
+ "./plugin": {
281
+ "types": "./lib/src/plugin.d.ts",
282
+ "default": "./lib/src/plugin.js"
283
+ },
284
+ "./processors": {
285
+ "types": "./lib/src/processors.d.ts",
286
+ "default": "./lib/src/processors.js"
287
+ },
288
+ "./remote-skills": {
289
+ "types": "./lib/src/remote-skills.d.ts",
290
+ "default": "./lib/src/remote-skills.js"
291
+ },
292
+ "./rest": {
293
+ "types": "./lib/src/rest.d.ts",
294
+ "default": "./lib/src/rest.js"
295
+ },
296
+ "./sandbox": {
297
+ "types": "./lib/src/sandbox.d.ts",
298
+ "default": "./lib/src/sandbox.js"
299
+ },
300
+ "./server": {
301
+ "types": "./lib/src/server.d.ts",
302
+ "default": "./lib/src/server.js"
303
+ },
304
+ "./serving-sanitize": {
305
+ "types": "./lib/src/serving-sanitize.d.ts",
306
+ "default": "./lib/src/serving-sanitize.js"
307
+ },
308
+ "./serving": {
309
+ "types": "./lib/src/serving.d.ts",
310
+ "default": "./lib/src/serving.js"
311
+ },
312
+ "./skill-paths": {
313
+ "types": "./lib/src/skill-paths.d.ts",
314
+ "default": "./lib/src/skill-paths.js"
315
+ },
316
+ "./statement": {
317
+ "types": "./lib/src/statement.d.ts",
318
+ "default": "./lib/src/statement.js"
319
+ },
320
+ "./storage-schema": {
321
+ "types": "./lib/src/storage-schema.d.ts",
322
+ "default": "./lib/src/storage-schema.js"
323
+ },
324
+ "./style": {
325
+ "types": "./lib/src/style.d.ts",
326
+ "default": "./lib/src/style.js"
327
+ },
328
+ "./summarize": {
329
+ "types": "./lib/src/summarize.d.ts",
330
+ "default": "./lib/src/summarize.js"
331
+ },
332
+ "./trace-io": {
333
+ "types": "./lib/src/trace-io.d.ts",
334
+ "default": "./lib/src/trace-io.js"
335
+ },
336
+ "./validation": {
337
+ "types": "./lib/src/validation.d.ts",
338
+ "default": "./lib/src/validation.js"
339
+ },
340
+ "./workspaces": {
341
+ "types": "./lib/src/workspaces.d.ts",
342
+ "default": "./lib/src/workspaces.js"
343
+ },
344
+ "./writer": {
345
+ "types": "./lib/src/writer.d.ts",
346
+ "default": "./lib/src/writer.js"
347
+ },
85
348
  "./package.json": "./package.json"
86
349
  },
87
350
  "files": [
@@ -94,10 +357,5 @@
94
357
  "optional": true
95
358
  }
96
359
  },
97
- "dbxToolsConfig": {
98
- "tags": [
99
- "node"
100
- ]
101
- },
102
360
  "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"bunx projen\"."
103
361
  }
package/src/model.ts CHANGED
@@ -87,7 +87,7 @@ function selectionInput(
87
87
  fuzzy: serving.fuzzy,
88
88
  threshold: serving.threshold,
89
89
  ...(modelClass !== undefined ? { modelClass } : {}),
90
- fallbacks: serving.fallbacks,
90
+ fallbacks: serving.fallbacks.slice(),
91
91
  liveOnly: requested === undefined,
92
92
  ttlMs: serving.ttlMs,
93
93
  };
@@ -46,6 +46,7 @@ import { projectUtils } from "@dbx-tools/core";
46
46
  import { log } from "@dbx-tools/shared-core";
47
47
  import { Observability } from "@mastra/observability";
48
48
  import { OtelBridge } from "@mastra/otel-bridge";
49
+ import { propagation } from "@opentelemetry/api";
49
50
 
50
51
  import { TRACE_REQUEST_CONTEXT_KEYS } from "./config.ts";
51
52
  import { mlflowEnabled } from "./mlflow.ts";
@@ -95,6 +96,21 @@ export function isOtlpTracingConfigured(): boolean {
95
96
  );
96
97
  }
97
98
 
99
+ /**
100
+ * Honor the standard no-op propagator setting after AppKit registers its
101
+ * tracer provider. AppKit 0.81 installs W3C propagation unconditionally, so
102
+ * disabling only the global propagator keeps async span context active while
103
+ * preventing ingress extraction and downstream injection.
104
+ */
105
+ export function configureOtelPropagation(): boolean {
106
+ if (process.env.OTEL_PROPAGATORS?.trim().toLowerCase() !== "none") return false;
107
+ propagation.disable();
108
+ logger.info("OpenTelemetry propagation disabled", {
109
+ setting: "OTEL_PROPAGATORS=none",
110
+ });
111
+ return true;
112
+ }
113
+
98
114
  /**
99
115
  * Build a Mastra `Observability` whose spans ride AppKit's global
100
116
  * OTel pipeline via `@mastra/otel-bridge`.
package/src/plugin.ts CHANGED
@@ -101,7 +101,7 @@ import { buildMcpServer, type ResolvedMcp } from "./mcp.ts";
101
101
  import { createMemoryBuilder, createServicePrincipalPool, needsLakebase } from "./memory.ts";
102
102
  import { logFeedback, resolveFeedbackEnabled } from "./mlflow.ts";
103
103
  import { resolveDefaultModelId } from "./model.ts";
104
- import { buildObservability } from "./observability.ts";
104
+ import { buildObservability, configureOtelPropagation } from "./observability.ts";
105
105
  import { provisionRemoteSkills } from "./remote-skills.ts";
106
106
  import {
107
107
  attachRoutePatchMiddleware,
@@ -252,6 +252,7 @@ export class MastraPlugin extends Plugin<MastraPluginConfig> {
252
252
  // Wait until sibling plugins (e.g. `lakebase`) finish `setup()` so
253
253
  // the lakebase pool is valid when storage/memory are enabled.
254
254
  this.context?.onLifecycle("setup:complete", async () => {
255
+ configureOtelPropagation();
255
256
  this.applyLakebaseAutoDefaults();
256
257
  await this.buildAgentAndServer();
257
258
  });