drizzle-cube 0.5.0 → 0.5.3
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 +4 -0
- package/dist/adapters/express/index.cjs +2 -2
- package/dist/adapters/express/index.js +106 -102
- package/dist/adapters/fastify/index.cjs +2 -2
- package/dist/adapters/fastify/index.js +109 -105
- package/dist/adapters/{handler-3LGcjLtr.js → handler-BC3nFNxV.js} +2 -2
- package/dist/adapters/{handler-BzzbVpcl.cjs → handler-Cqf-CqAS.cjs} +2 -2
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +41 -45
- package/dist/adapters/locale-BoiA6WiV.cjs +198 -0
- package/dist/adapters/{locale-DTnJrxm1.js → locale-D9VQkLXt.js} +442 -404
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.d.ts +7 -3
- package/dist/adapters/mcp-tools.js +28 -28
- package/dist/adapters/mcp-transport-B0mgxRnJ.js +579 -0
- package/dist/adapters/mcp-transport-irsahKmD.cjs +39 -0
- package/dist/adapters/mcp-transport.d.ts +14 -2
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +140 -136
- package/dist/adapters/{openai-C4BD8xnN.cjs → openai-B4N3KfTG.cjs} +1 -1
- package/dist/adapters/{openai-CaSQEduB.js → openai-BWdm0JvG.js} +1 -1
- package/dist/adapters/openai-CoqT_FM5.cjs +16 -0
- package/dist/{server/openai-CqZg6zYL.js → adapters/openai-D0Nsvc9L.js} +824 -720
- package/dist/adapters/{utils-DOg9oGdt.js → utils-CTYvfZ3I.js} +711 -713
- package/dist/adapters/{utils-DNrj-ryp.cjs → utils-XPOzzMdY.cjs} +5 -5
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.d.ts +38 -2
- package/dist/adapters/utils.js +1 -1
- package/dist/cli/index.cjs +2 -2
- package/dist/client/charts.js +10 -10
- package/dist/client/chunks/{DashboardEditModal-cSSIAZGy.js → DashboardEditModal-IU_0dgfC.js} +12 -12
- package/dist/client/chunks/{DashboardEditModal-cSSIAZGy.js.map → DashboardEditModal-IU_0dgfC.js.map} +1 -1
- package/dist/client/chunks/{FieldSearchModal-CZNo4pNK.js → FieldSearchModal-BCWanpPX.js} +3 -3
- package/dist/client/chunks/{FieldSearchModal-CZNo4pNK.js.map → FieldSearchModal-BCWanpPX.js.map} +1 -1
- package/dist/client/chunks/KpiDelta-_igN6cJa.js +2 -0
- package/dist/client/chunks/KpiNumber-t5n8PtRU.js +2 -0
- package/dist/client/chunks/KpiText-BCZJJ6a0.js +2 -0
- package/dist/client/chunks/{RetentionCombinedChart-BD8tGeM_.js → RetentionCombinedChart-CQMBODsK.js} +2 -2
- package/dist/client/chunks/{RetentionCombinedChart-BD8tGeM_.js.map → RetentionCombinedChart-CQMBODsK.js.map} +1 -1
- package/dist/client/chunks/SchemaVisualization-BUUhlOvG.js +2 -0
- package/dist/client/chunks/SchemaVisualizationLazy-CwaPCUL0.js +2 -0
- package/dist/client/chunks/{analysis-builder-BeVZhiQ5.js → analysis-builder-Dm6eD_AX.js} +6 -6
- package/dist/client/chunks/{analysis-builder-BeVZhiQ5.js.map → analysis-builder-Dm6eD_AX.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-BWc7ZZnG.js → analysis-builder-shared-DT5bXwCA.js} +6 -6
- package/dist/client/chunks/{analysis-builder-shared-BWc7ZZnG.js.map → analysis-builder-shared-DT5bXwCA.js.map} +1 -1
- package/dist/client/chunks/{chart-area-D63kG8OT.js → chart-area-DDti9Qtp.js} +2 -2
- package/dist/client/chunks/{chart-area-D63kG8OT.js.map → chart-area-DDti9Qtp.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-BEfsCLjl.js → chart-bar-B3s9qDlh.js} +2 -2
- package/dist/client/chunks/{chart-bar-BEfsCLjl.js.map → chart-bar-B3s9qDlh.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-C3Xh9jwL.js → chart-data-table-Qrt6EAno.js} +17 -17
- package/dist/client/chunks/{chart-data-table-C3Xh9jwL.js.map → chart-data-table-Qrt6EAno.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-CYE0S1x_.js → chart-kpi-delta-CgldZ7zO.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-CYE0S1x_.js.map → chart-kpi-delta-CgldZ7zO.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-BlZ79xHW.js → chart-kpi-number-ByfuX1ki.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-BlZ79xHW.js.map → chart-kpi-number-ByfuX1ki.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-DY1BnxPe.js → chart-kpi-text-DeNuDraJ.js} +2 -2
- package/dist/client/chunks/{chart-kpi-text-DY1BnxPe.js.map → chart-kpi-text-DeNuDraJ.js.map} +1 -1
- package/dist/client/chunks/{chart-line-CBsTThTv.js → chart-line-RdZwtk27.js} +2 -2
- package/dist/client/chunks/{chart-line-CBsTThTv.js.map → chart-line-RdZwtk27.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-BWaWVkuz.js → chart-markdown-CiGRZdJj.js} +1203 -1139
- package/dist/client/chunks/chart-markdown-CiGRZdJj.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-B41qCTBG.js → chart-measure-profile-Ckjw9bX6.js} +2 -2
- package/dist/client/chunks/{chart-measure-profile-B41qCTBG.js.map → chart-measure-profile-Ckjw9bX6.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-Djbu8x2v.js → chart-pie-BvY4FY__.js} +2 -2
- package/dist/client/chunks/{chart-pie-Djbu8x2v.js.map → chart-pie-BvY4FY__.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-BsTcKV0K.js → chart-radar-DjiiEAmc.js} +2 -2
- package/dist/client/chunks/{chart-radar-BsTcKV0K.js.map → chart-radar-DjiiEAmc.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-Du7XNnwE.js → chart-radial-bar-lla_JEYu.js} +2 -2
- package/dist/client/chunks/{chart-radial-bar-Du7XNnwE.js.map → chart-radial-bar-lla_JEYu.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-D8krEYsA.js → chart-scatter-DwXnI0rr.js} +2 -2
- package/dist/client/chunks/{chart-scatter-D8krEYsA.js.map → chart-scatter-DwXnI0rr.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-C5C2iaWM.js → chart-tree-map-DJHoA26f.js} +2 -2
- package/dist/client/chunks/{chart-tree-map-C5C2iaWM.js.map → chart-tree-map-DJHoA26f.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-BGdPrJ5Y.js → chart-waterfall-Y7c8csO5.js} +2 -2
- package/dist/client/chunks/{chart-waterfall-BGdPrJ5Y.js.map → chart-waterfall-Y7c8csO5.js.map} +1 -1
- package/dist/client/chunks/{core-DcfMGTVa.js → core-Dk6z6kC0.js} +2 -2
- package/dist/client/chunks/{core-DcfMGTVa.js.map → core-Dk6z6kC0.js.map} +1 -1
- package/dist/client/chunks/{exceljs.min-CcjgM-qg.js → exceljs.min-DaJsLlWM.js} +24 -24
- package/dist/client/chunks/{exceljs.min-CcjgM-qg.js.map → exceljs.min-DaJsLlWM.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-Xp60Ff2W.js → schema-visualization-DWwJukK7.js} +8 -8
- package/dist/client/chunks/{schema-visualization-Xp60Ff2W.js.map → schema-visualization-DWwJukK7.js.map} +1 -1
- package/dist/client/chunks/{syntaxHighlighting-CnDujqwg.js → syntaxHighlighting-D8J6Yt9j.js} +2 -2
- package/dist/client/chunks/{syntaxHighlighting-CnDujqwg.js.map → syntaxHighlighting-D8J6Yt9j.js.map} +1 -1
- package/dist/client/chunks/{useDebounce-CfmUMFau.js → useDebounce-DyJVREop.js} +2 -2
- package/dist/client/chunks/{useDebounce-CfmUMFau.js.map → useDebounce-DyJVREop.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-BKGmejIj.js → useExplainAI-CxSkjocM.js} +4 -4
- package/dist/client/chunks/{useExplainAI-BKGmejIj.js.map → useExplainAI-CxSkjocM.js.map} +1 -1
- package/dist/client/chunks/{utils-BldkcRHv.js → utils-BHZdKxua.js} +2 -2
- package/dist/client/chunks/{utils-BldkcRHv.js.map → utils-BHZdKxua.js.map} +1 -1
- package/dist/client/chunks/{vendor-ClXpIiea.js → vendor-CBD_Olr0.js} +8 -8
- package/dist/client/chunks/{vendor-ClXpIiea.js.map → vendor-CBD_Olr0.js.map} +1 -1
- package/dist/client/components.js +3 -3
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.js +11 -11
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.js +1 -1
- package/dist/client/utils.js +5 -5
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +39 -37
- package/dist/server/index.cjs +42 -42
- package/dist/server/index.js +1009 -971
- package/dist/server/{openai-D9Zjuby1.cjs → openai-BfiZU0rG.cjs} +1 -1
- package/dist/server/openai-BwsBio1K.cjs +16 -0
- package/dist/server/{openai-rwauPzCT.js → openai-CLWSwD-D.js} +1 -1
- package/dist/{adapters/openai-BAnEZgKZ.js → server/openai-zpXlGbbF.js} +824 -720
- package/package.json +2 -2
- package/dist/adapters/locale-DueXjqMh.cjs +0 -198
- package/dist/adapters/mcp-transport-45SiFcCH.cjs +0 -39
- package/dist/adapters/mcp-transport-Bxpc4mRy.js +0 -553
- package/dist/adapters/openai-4JP2B6pB.cjs +0 -16
- package/dist/client/chunks/KpiDelta-Dll_eCV1.js +0 -2
- package/dist/client/chunks/KpiNumber-BPlR92hI.js +0 -2
- package/dist/client/chunks/KpiText-BIxq7Jso.js +0 -2
- package/dist/client/chunks/SchemaVisualization-CCICjhvv.js +0 -2
- package/dist/client/chunks/SchemaVisualizationLazy-DraGsMx6.js +0 -2
- package/dist/client/chunks/chart-markdown-BWaWVkuz.js.map +0 -1
- package/dist/server/openai-DmuEbFd6.cjs +0 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e, f as t, o as n, r, u as i } from "../utils-
|
|
2
|
-
import { i as a, n as o, r as s, t as c } from "../locale-
|
|
3
|
-
import {
|
|
1
|
+
import { a as e, f as t, o as n, r, u as i } from "../utils-CTYvfZ3I.js";
|
|
2
|
+
import { i as a, n as o, r as s, t as c } from "../locale-D9VQkLXt.js";
|
|
3
|
+
import { S as l, _ as u, a as d, b as f, c as p, g as m, h, i as g, l as _, m as v, o as y, r as b, u as x, v as S, x as C, y as w } from "../mcp-transport-B0mgxRnJ.js";
|
|
4
4
|
import { Hono as T } from "hono";
|
|
5
5
|
//#region node_modules/hono/dist/middleware/cors/index.js
|
|
6
6
|
var E = (e) => {
|
|
@@ -166,7 +166,7 @@ function D(D) {
|
|
|
166
166
|
}
|
|
167
167
|
}), L && R.post(`${P}/agent/chat`, async (e) => {
|
|
168
168
|
try {
|
|
169
|
-
let { handleAgentChat: t } = await import("../handler-
|
|
169
|
+
let { handleAgentChat: t } = await import("../handler-BC3nFNxV.js"), { message: n, sessionId: r, history: i } = await e.req.json();
|
|
170
170
|
if (!n || typeof n != "string") return e.json({ error: "message is required and must be a string" }, 400);
|
|
171
171
|
let a = (L.apiKey || "").trim();
|
|
172
172
|
if (L.allowClientApiKey) {
|
|
@@ -215,43 +215,39 @@ function D(D) {
|
|
|
215
215
|
return console.error("Agent chat error:", t), e.json({ error: t instanceof Error ? t.message : "Agent chat failed" }, 500);
|
|
216
216
|
}
|
|
217
217
|
}), I.enabled !== !1) {
|
|
218
|
-
let e =
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
if (
|
|
227
|
-
let r = w(e.req.header("origin"), I.allowedOrigins ? { allowedOrigins: I.allowedOrigins } : {});
|
|
228
|
-
if (!r.valid) return e.json(g(null, -32600, r.reason), 403);
|
|
229
|
-
let i = e.req.header("accept");
|
|
230
|
-
if (!C(i)) return e.json(g(null, -32600, "Accept header must include both application/json and text/event-stream"), 400);
|
|
231
|
-
let a = v(e.req.header());
|
|
232
|
-
if (!a.ok) return e.json({
|
|
218
|
+
let e = y(B, I.resources), t = S(I.prompts), n = I.basePath ?? "/mcp";
|
|
219
|
+
R.post(`${n}`, async (n) => {
|
|
220
|
+
if (I.resourceMetadataUrl && !x(n.req.header("authorization"))) return n.header("WWW-Authenticate", p(I.resourceMetadataUrl)), n.json({ error: "Bearer token required" }, 401);
|
|
221
|
+
let r = C(n.req.header("origin"), I.allowedOrigins ? { allowedOrigins: I.allowedOrigins } : {});
|
|
222
|
+
if (!r.valid) return n.json(g(null, -32600, r.reason), 403);
|
|
223
|
+
let i = n.req.header("accept");
|
|
224
|
+
if (!f(i)) return n.json(g(null, -32600, "Accept header must include both application/json and text/event-stream"), 400);
|
|
225
|
+
let a = h(n.req.header());
|
|
226
|
+
if (!a.ok) return n.json({
|
|
233
227
|
error: "Unsupported MCP protocol version",
|
|
234
228
|
supported: a.supported
|
|
235
229
|
}, 426);
|
|
236
|
-
let o =
|
|
237
|
-
if (!o) return
|
|
238
|
-
let s =
|
|
230
|
+
let o = m(await n.req.json().catch(() => null));
|
|
231
|
+
if (!o) return n.json(g(null, -32600, "Invalid JSON-RPC 2.0 request"), 400);
|
|
232
|
+
let s = l(i), c = o.method === "initialize";
|
|
239
233
|
try {
|
|
240
|
-
let r = await
|
|
234
|
+
let r = await _(o.method, o.params, {
|
|
241
235
|
semanticLayer: B,
|
|
242
236
|
extractSecurityContext: (e, t) => z(e),
|
|
243
|
-
rawRequest:
|
|
237
|
+
rawRequest: n,
|
|
244
238
|
rawResponse: null,
|
|
245
239
|
negotiatedProtocol: a.negotiated,
|
|
246
|
-
resources:
|
|
247
|
-
prompts:
|
|
248
|
-
appEnabled: !!I.app
|
|
240
|
+
resources: e,
|
|
241
|
+
prompts: t,
|
|
242
|
+
appEnabled: !!I.app,
|
|
243
|
+
appConfig: typeof I.app == "object" ? I.app : void 0,
|
|
244
|
+
serverName: I.serverName
|
|
249
245
|
});
|
|
250
|
-
if (
|
|
251
|
-
let i =
|
|
252
|
-
if (
|
|
253
|
-
let e = new TextEncoder(), t =
|
|
254
|
-
n.enqueue(e.encode(`id: ${t}\n\n`)), n.enqueue(e.encode(
|
|
246
|
+
if (v(o)) return n.body(null, 202);
|
|
247
|
+
let i = d(o.id ?? null, r), l = c && r && typeof r == "object" && "sessionId" in r ? r.sessionId : void 0, f = {};
|
|
248
|
+
if (l && (f[b] = l), s) {
|
|
249
|
+
let e = new TextEncoder(), t = u(), n = new ReadableStream({ start(n) {
|
|
250
|
+
n.enqueue(e.encode(`id: ${t}\n\n`)), n.enqueue(e.encode(w(i, t))), n.close();
|
|
255
251
|
} });
|
|
256
252
|
return new Response(n, {
|
|
257
253
|
status: 200,
|
|
@@ -259,18 +255,18 @@ function D(D) {
|
|
|
259
255
|
"Content-Type": "text/event-stream",
|
|
260
256
|
"Cache-Control": "no-cache",
|
|
261
257
|
Connection: "keep-alive",
|
|
262
|
-
...
|
|
258
|
+
...f
|
|
263
259
|
}
|
|
264
260
|
});
|
|
265
261
|
}
|
|
266
|
-
return
|
|
267
|
-
} catch (
|
|
268
|
-
if (
|
|
269
|
-
console.error("MCP RPC error:",
|
|
270
|
-
let
|
|
262
|
+
return n.json(i, 200, f);
|
|
263
|
+
} catch (e) {
|
|
264
|
+
if (v(o)) return console.error("MCP notification processing error:", e), n.body(null, 202);
|
|
265
|
+
console.error("MCP RPC error:", e);
|
|
266
|
+
let t = e?.code ?? -32603, r = e?.data, i = e.message || "MCP request failed", a = g(o.id ?? null, t, i, r);
|
|
271
267
|
if (s) {
|
|
272
|
-
let e = new TextEncoder(), t =
|
|
273
|
-
n.enqueue(e.encode(`id: ${t}\n\n`)), n.enqueue(e.encode(
|
|
268
|
+
let e = new TextEncoder(), t = u(), n = new ReadableStream({ start(n) {
|
|
269
|
+
n.enqueue(e.encode(`id: ${t}\n\n`)), n.enqueue(e.encode(w(a, t))), n.close();
|
|
274
270
|
} });
|
|
275
271
|
return new Response(n, {
|
|
276
272
|
status: 200,
|
|
@@ -281,13 +277,13 @@ function D(D) {
|
|
|
281
277
|
}
|
|
282
278
|
});
|
|
283
279
|
}
|
|
284
|
-
return
|
|
280
|
+
return n.json(a, 200);
|
|
285
281
|
}
|
|
286
|
-
}), R.delete(`${
|
|
287
|
-
if (I.resourceMetadataUrl && !
|
|
288
|
-
let t = new TextEncoder(), n =
|
|
282
|
+
}), R.delete(`${n}`, (e) => I.resourceMetadataUrl && !x(e.req.header("authorization")) ? (e.header("WWW-Authenticate", p(I.resourceMetadataUrl)), e.json({ error: "Bearer token required" }, 401)) : e.json({ error: "Session termination not supported" }, 405)), R.get(`${n}`, (e) => {
|
|
283
|
+
if (I.resourceMetadataUrl && !x(e.req.header("authorization"))) return e.header("WWW-Authenticate", p(I.resourceMetadataUrl)), e.json({ error: "Bearer token required" }, 401);
|
|
284
|
+
let t = new TextEncoder(), n = u(), r, i = new ReadableStream({
|
|
289
285
|
start(e) {
|
|
290
|
-
e.enqueue(t.encode(
|
|
286
|
+
e.enqueue(t.encode(w({
|
|
291
287
|
jsonrpc: "2.0",
|
|
292
288
|
method: "mcp/ready",
|
|
293
289
|
params: { protocol: "streamable-http" }
|