@dbx-tools/appkit-mastra 0.1.29 → 0.1.30

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/dist/index.d.ts CHANGED
@@ -10,12 +10,12 @@
10
10
  * is the right surface for browser bundles and `usePluginClientConfig`
11
11
  * consumers.
12
12
  */
13
- export * from "./src/plugin.js";
14
13
  export * from "@dbx-tools/appkit-mastra-shared";
15
- export * from "./src/config.js";
16
14
  export * from "./src/agents.js";
17
15
  export * from "./src/chart.js";
16
+ export * from "./src/config.js";
18
17
  export * from "./src/genie.js";
18
+ export { FALLBACK_MODEL_IDS, MODEL_CATALOG, ModelTier, modelForTier, modelsForTier, } from "./src/model.js";
19
+ export * from "./src/plugin.js";
20
+ export { MASTRA_MODEL_OVERRIDE_KEY, MODEL_OVERRIDE_BODY_FIELDS, MODEL_OVERRIDE_HEADER, MODEL_OVERRIDE_QUERY, clearServingEndpointsCache, extractModelOverride, listServingEndpoints, resolveModelId, type ResolveModelOptions, type ResolvedModel, type ServingEndpointSummary, } from "./src/serving.js";
19
21
  export * from "./src/tools/email.js";
20
- export { clearServingEndpointsCache, extractModelOverride, listServingEndpoints, MASTRA_MODEL_OVERRIDE_KEY, MODEL_OVERRIDE_BODY_FIELDS, MODEL_OVERRIDE_HEADER, MODEL_OVERRIDE_QUERY, resolveModelId, type ResolvedModel, type ResolveModelOptions, type ServingEndpointSummary, } from "./src/serving.js";
21
- export { FALLBACK_MODEL_IDS, MODEL_CATALOG, modelForTier, modelsForTier, ModelTier, } from "./src/model.js";
package/dist/index.js CHANGED
@@ -10,12 +10,12 @@
10
10
  * is the right surface for browser bundles and `usePluginClientConfig`
11
11
  * consumers.
12
12
  */
13
- export * from "./src/plugin.js";
14
13
  export * from "@dbx-tools/appkit-mastra-shared";
15
- export * from "./src/config.js";
16
14
  export * from "./src/agents.js";
17
15
  export * from "./src/chart.js";
16
+ export * from "./src/config.js";
18
17
  export * from "./src/genie.js";
18
+ export { FALLBACK_MODEL_IDS, MODEL_CATALOG, ModelTier, modelForTier, modelsForTier, } from "./src/model.js";
19
+ export * from "./src/plugin.js";
20
+ export { MASTRA_MODEL_OVERRIDE_KEY, MODEL_OVERRIDE_BODY_FIELDS, MODEL_OVERRIDE_HEADER, MODEL_OVERRIDE_QUERY, clearServingEndpointsCache, extractModelOverride, listServingEndpoints, resolveModelId, } from "./src/serving.js";
19
21
  export * from "./src/tools/email.js";
20
- export { clearServingEndpointsCache, extractModelOverride, listServingEndpoints, MASTRA_MODEL_OVERRIDE_KEY, MODEL_OVERRIDE_BODY_FIELDS, MODEL_OVERRIDE_HEADER, MODEL_OVERRIDE_QUERY, resolveModelId, } from "./src/serving.js";
21
- export { FALLBACK_MODEL_IDS, MODEL_CATALOG, modelForTier, modelsForTier, ModelTier, } from "./src/model.js";
@@ -13,8 +13,8 @@
13
13
  * `chatRoute` agent for demos.
14
14
  */
15
15
  import { appkitUtils, logUtils } from "@dbx-tools/shared";
16
- import { Agent } from "@mastra/core/agent";
17
16
  import type { AgentConfig, ToolsInput } from "@mastra/core/agent";
17
+ import { Agent } from "@mastra/core/agent";
18
18
  import type { Tool } from "@mastra/core/tools";
19
19
  import type { PgVectorConfig, PostgresStoreConfig } from "@mastra/pg";
20
20
  import type { MastraPluginConfig } from "./config.js";
@@ -15,11 +15,11 @@
15
15
  import { appkitUtils, logUtils, stringUtils } from "@dbx-tools/shared";
16
16
  import { Agent } from "@mastra/core/agent";
17
17
  import { createTool } from "@mastra/core/tools";
18
+ import { buildRenderDataTool } from "./chart.js";
18
19
  import { buildGenieToolkitProvider, resolveGenieSpaces } from "./genie.js";
19
20
  import { buildModel, FALLBACK_MODEL_IDS } from "./model.js";
20
- import { stripStaleChartsProcessor } from "./processors/strip-stale-charts.js";
21
- import { buildRenderDataTool } from "./chart.js";
22
21
  import { ResultProcessor } from "./processor.js";
22
+ import { stripStaleChartsProcessor } from "./processors/strip-stale-charts.js";
23
23
  /** Re-export of Mastra's native `createTool` for full-feature access. */
24
24
  export { createTool } from "@mastra/core/tools";
25
25
  /**
package/dist/src/chart.js CHANGED
@@ -30,7 +30,7 @@ import { commonUtils, logUtils, stringUtils } from "@dbx-tools/shared";
30
30
  import { Agent } from "@mastra/core/agent";
31
31
  import { createTool } from "@mastra/core/tools";
32
32
  import { z } from "zod";
33
- import { buildModel, ModelTier, modelForTier } from "./model.js";
33
+ import { buildModel, modelForTier, ModelTier } from "./model.js";
34
34
  const log = logUtils.logger("mastra/chart");
35
35
  /* ------------------------------ constants ------------------------------ */
36
36
  /**
package/dist/src/genie.js CHANGED
@@ -35,9 +35,9 @@
35
35
  */
36
36
  import { CacheManager, genie } from "@databricks/appkit";
37
37
  import { ApiError, HttpError, WorkspaceClient } from "@databricks/sdk-experimental";
38
+ import { ChartSchema, } from "@dbx-tools/appkit-mastra-shared";
38
39
  import { genieEventChat } from "@dbx-tools/genie";
39
40
  import {} from "@dbx-tools/genie-shared";
40
- import { ChartSchema, } from "@dbx-tools/appkit-mastra-shared";
41
41
  import { apiUtils, appkitUtils, commonUtils, logUtils, stringUtils, } from "@dbx-tools/shared";
42
42
  import { MASTRA_THREAD_ID_KEY } from "@mastra/core/request-context";
43
43
  import { createTool } from "@mastra/core/tools";
@@ -15,8 +15,8 @@
15
15
  * the handler runs - no cookie or user lookups happen here, and the
16
16
  * session-cookie logic stays the single source of truth in `server.ts`.
17
17
  */
18
- import type { Agent } from "@mastra/core/agent";
19
18
  import type { MastraHistoryResponse } from "@dbx-tools/appkit-mastra-shared";
19
+ import type { Agent } from "@mastra/core/agent";
20
20
  /** Inputs accepted by {@link loadHistory}. */
21
21
  export interface LoadHistoryOptions {
22
22
  agent: Agent;
@@ -132,9 +132,7 @@ export class MemoryBuilder {
132
132
  ...(vector ? { vector, embedder: fastembed } : {}),
133
133
  options: {
134
134
  lastMessages: 10,
135
- ...(vector
136
- ? { semanticRecall: { topK: 3, messageRange: 2 } }
137
- : {}),
135
+ ...(vector ? { semanticRecall: { topK: 3, messageRange: 2 } } : {}),
138
136
  },
139
137
  });
140
138
  }
@@ -47,9 +47,7 @@ const DEFAULT_SERVICE_NAME = "mastra";
47
47
  * either way to stay forward-compatible.
48
48
  */
49
49
  export async function buildObservability(options) {
50
- const serviceName = options?.serviceName ??
51
- (await projectUtils.name()) ??
52
- DEFAULT_SERVICE_NAME;
50
+ const serviceName = options?.serviceName ?? (await projectUtils.name()) ?? DEFAULT_SERVICE_NAME;
53
51
  const requestContextKeys = [
54
52
  ...(options?.requestContextKeys ?? TRACE_REQUEST_CONTEXT_KEYS),
55
53
  ];
@@ -27,7 +27,7 @@
27
27
  * AI SDK transport URL is `/api/mastra/route/chat/<agentId>`.
28
28
  */
29
29
  import { genie, getExecutionContext, lakebase, Plugin, toPlugin, } from "@databricks/appkit";
30
- import { appkitUtils, commonUtils, logUtils } from "@dbx-tools/shared";
30
+ import { appkitUtils, logUtils } from "@dbx-tools/shared";
31
31
  import { chatRoute } from "@mastra/ai-sdk";
32
32
  import { Mastra } from "@mastra/core/mastra";
33
33
  import express from "express";
@@ -39,7 +39,6 @@ import { buildObservability } from "./observability.js";
39
39
  import { attachRoutePatchMiddleware, MastraServer } from "./server.js";
40
40
  import { clearServingEndpointsCache, listServingEndpoints, resolveServingConfig, } from "./serving.js";
41
41
  import { fetchStatementData, isStatementNotFoundError, STATEMENT_ROW_CAP, } from "./statement.js";
42
- import { ResultProcessor } from "./processor.js";
43
42
  const GENIE_MANIFEST = appkitUtils.data(genie).plugin.manifest;
44
43
  const LAKEBASE_MANIFEST = appkitUtils.data(lakebase).plugin.manifest;
45
44
  /**
@@ -73,8 +73,7 @@ export const stripStaleChartsProcessor = {
73
73
  if (part.type !== "tool-invocation") {
74
74
  continue;
75
75
  }
76
- const inv = part
77
- .toolInvocation;
76
+ const inv = part.toolInvocation;
78
77
  if (!inv || inv.result === undefined)
79
78
  continue;
80
79
  const before = inv.result;