drizzle-cube 0.5.0 → 0.5.1

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.
@@ -1,4 +1,5 @@
1
1
  import { SemanticLayerCompiler, SemanticQuery, SecurityContext, CubeDiscoveryResult, QuerySuggestion, AIValidationResult } from '../server';
2
+ import { MCPPromptResolver, MCPResourceResolver } from './mcp-transport';
2
3
  /**
3
4
  * Calculate query complexity based on query structure
4
5
  */
@@ -247,6 +248,21 @@ export declare function handleBatchRequest(queries: SemanticQuery[], securityCon
247
248
  query: SemanticQuery;
248
249
  })[];
249
250
  }>;
251
+ /**
252
+ * Locale configuration for the MCP App visualization.
253
+ */
254
+ export interface McpAppConfig {
255
+ /**
256
+ * Default locale to use when the browser locale is unavailable or detection is disabled.
257
+ * BCP-47 format (e.g. 'en-GB', 'nl-NL', 'en-US'). Defaults to 'en-GB'.
258
+ */
259
+ defaultLocale?: string;
260
+ /**
261
+ * When true (default), the MCP App will prefer the browser/runtime locale over defaultLocale.
262
+ * Set to false to force defaultLocale regardless of the browser setting.
263
+ */
264
+ detectBrowserLocale?: boolean;
265
+ }
250
266
  /**
251
267
  * MCP Endpoint Options
252
268
  */
@@ -264,8 +280,23 @@ export interface MCPOptions {
264
280
  * Example: ['http://localhost:3000', 'https://myapp.com']
265
281
  */
266
282
  allowedOrigins?: string[];
267
- /** Enable MCP App visualization for load tool results (default: false) */
268
- app?: boolean;
283
+ /**
284
+ * Enable MCP App visualization for load tool results.
285
+ * Pass `true` to enable with defaults, or a config object to set locale options.
286
+ * @example app: { defaultLocale: 'nl-NL', detectBrowserLocale: false }
287
+ */
288
+ app?: boolean | McpAppConfig;
289
+ /**
290
+ * Override the MCP prompt set exposed by the built-in endpoint.
291
+ * Pass an array to replace the defaults, or a function to derive from them.
292
+ */
293
+ prompts?: MCPPromptResolver;
294
+ /**
295
+ * Override the MCP resources exposed by the built-in endpoint.
296
+ * Pass an array to replace the defaults, or a function to derive from them.
297
+ * The live schema resource is always appended automatically.
298
+ */
299
+ resources?: MCPResourceResolver;
269
300
  /**
270
301
  * OAuth 2.1 Protected Resource Metadata URL (RFC 9728).
271
302
  * When set, MCP endpoints require a Bearer token in the Authorization header.
@@ -273,6 +304,11 @@ export interface MCPOptions {
273
304
  * Token validation is the responsibility of extractSecurityContext.
274
305
  */
275
306
  resourceMetadataUrl?: string;
307
+ /**
308
+ * Optional name to use in the MCP serverInfo.name field (initialize response).
309
+ * Defaults to 'drizzle-cube'. Override to match your product branding.
310
+ */
311
+ serverName?: string;
276
312
  }
277
313
  /**
278
314
  * Discovery request body