@dbx-tools/appkit-mastra 0.3.2 → 0.3.4
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 +10 -10
- package/src/plugin.ts +10 -3
package/package.json
CHANGED
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
"@opentelemetry/api": "^1.9.1",
|
|
28
28
|
"pg": "^8.22.0",
|
|
29
29
|
"zod": "^4.3.6",
|
|
30
|
-
"@dbx-tools/
|
|
31
|
-
"@dbx-tools/
|
|
32
|
-
"@dbx-tools/
|
|
33
|
-
"@dbx-tools/
|
|
34
|
-
"@dbx-tools/
|
|
35
|
-
"@dbx-tools/shared-
|
|
36
|
-
"@dbx-tools/shared-
|
|
37
|
-
"@dbx-tools/shared-
|
|
38
|
-
"@dbx-tools/shared-model": "0.3.
|
|
30
|
+
"@dbx-tools/core": "0.3.4",
|
|
31
|
+
"@dbx-tools/appkit": "0.3.4",
|
|
32
|
+
"@dbx-tools/databricks": "0.3.4",
|
|
33
|
+
"@dbx-tools/genie": "0.3.4",
|
|
34
|
+
"@dbx-tools/model": "0.3.4",
|
|
35
|
+
"@dbx-tools/shared-genie": "0.3.4",
|
|
36
|
+
"@dbx-tools/shared-mastra": "0.3.4",
|
|
37
|
+
"@dbx-tools/shared-core": "0.3.4",
|
|
38
|
+
"@dbx-tools/shared-model": "0.3.4"
|
|
39
39
|
},
|
|
40
40
|
"main": "index.ts",
|
|
41
41
|
"license": "UNLICENSED",
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"version": "0.3.
|
|
45
|
+
"version": "0.3.4",
|
|
46
46
|
"types": "index.ts",
|
|
47
47
|
"type": "module",
|
|
48
48
|
"exports": {
|
package/src/plugin.ts
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
type StatementData,
|
|
63
63
|
} from "@dbx-tools/shared-mastra";
|
|
64
64
|
import { serving as nodeServing } from "@dbx-tools/model";
|
|
65
|
-
import { type ServingEndpointSummary } from "@dbx-tools/shared-model";
|
|
65
|
+
import { display, type ServingEndpointSummary } from "@dbx-tools/shared-model";
|
|
66
66
|
import { buildAgents, FALLBACK_AGENT_ID, type BuiltAgents } from "./agents";
|
|
67
67
|
import { fetchChart } from "./chart";
|
|
68
68
|
import type { MastraPluginConfig } from "./config";
|
|
@@ -327,9 +327,16 @@ export class MastraPlugin extends Plugin<MastraPluginConfig> {
|
|
|
327
327
|
router.get(routes.MASTRA_ROUTES.defaultModel, (req, res) => {
|
|
328
328
|
const requested = string.firstNonEmpty(req.query["agentId"]);
|
|
329
329
|
const agentId = requested ?? this.built?.defaultAgentId ?? FALLBACK_AGENT_ID;
|
|
330
|
-
const
|
|
330
|
+
const raw = this.built?.defaultModels[agentId];
|
|
331
331
|
// `"<dynamic>"` (a call-time function) has no fixed id to advertise.
|
|
332
|
-
|
|
332
|
+
const model = raw && raw !== "<dynamic>" ? raw : null;
|
|
333
|
+
// Return the humanized label too, so the picker shows a friendly name on
|
|
334
|
+
// load without waiting on the `/models` catalogue (no raw-id flash).
|
|
335
|
+
res.json({
|
|
336
|
+
agentId,
|
|
337
|
+
model,
|
|
338
|
+
displayName: model ? display.toModelDisplayName(model) : null,
|
|
339
|
+
});
|
|
333
340
|
});
|
|
334
341
|
|
|
335
342
|
// `GET /embed/:type/:id` is the single resolver for every embed
|