@aintela/bi 0.2.5 → 0.2.6
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/{ScriptDashboardViewerVertical-B8Y5LoE4.js → ScriptDashboardViewerVertical-Db2sFEEl.js} +2 -2
- package/dist/{ScriptDashboardViewerVertical-B8Y5LoE4.js.map → ScriptDashboardViewerVertical-Db2sFEEl.js.map} +1 -1
- package/dist/{biModuleSurface-zEeRrln5.js → biModuleSurface-SpadZ11I.js} +3 -3
- package/dist/{biModuleSurface-zEeRrln5.js.map → biModuleSurface-SpadZ11I.js.map} +1 -1
- package/dist/composer.js +1 -1
- package/dist/{index-GTSBsgzP.js → index-DrS3V1Ke.js} +16 -6
- package/dist/index-DrS3V1Ke.js.map +1 -0
- package/dist/{index-C38e4aIE.js → index-DwUXZzTn.js} +2 -2
- package/dist/index-DwUXZzTn.js.map +1 -0
- package/dist/index.js +4 -4
- package/dist/runtime/version.d.ts +1 -1
- package/dist/runtime.js +4 -4
- package/dist/{version-oYqU5xJk.js → version-BNrlEAG1.js} +5 -5
- package/dist/{version-oYqU5xJk.js.map → version-BNrlEAG1.js.map} +1 -1
- package/dist/viewer.js +1 -1
- package/package.json +1 -1
- package/dist/index-C38e4aIE.js.map +0 -1
- package/dist/index-GTSBsgzP.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, S as a, a as r, r as o, u as t } from "./ScriptDashboardViewerVertical-
|
|
1
|
+
import { C as e, S as a, a as r, r as o, u as t } from "./ScriptDashboardViewerVertical-Db2sFEEl.js";
|
|
2
2
|
const i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
3
|
__proto__: null,
|
|
4
4
|
CATEGORY_PREFIXES: e,
|
|
@@ -10,4 +10,4 @@ const i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10
10
|
export {
|
|
11
11
|
i as V
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=index-
|
|
13
|
+
//# sourceMappingURL=index-DwUXZzTn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DwUXZzTn.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -12,10 +12,10 @@ import { t as ya, a as ka, b as za, u as Ha } from "./index-D6-YxBjl.js";
|
|
|
12
12
|
import { C as wa, I as Ya, M as Wa, a as Xa, p as Ka } from "./index-ZBNoVc5M.js";
|
|
13
13
|
import { A as qa, D as Ja, a as Za, V as Qa, b as $a, c as ae, d as ee, g as se } from "./filterFactory-Ysv0FOQ2.js";
|
|
14
14
|
import { V as te, a as oe, b as ie } from "./index-BRx4bRbe.js";
|
|
15
|
-
import { B as de, c as le, n as Ce, r as ue, a as me } from "./version-
|
|
16
|
-
import { getBiModuleSurface as ce } from "./biModuleSurface-
|
|
17
|
-
import { C as Se, S as De, a as Te, c as Pe, e as he, g as _e, b as fe, h as Ie, i as Be, l as Re, r as be, s as ge, u as Ae } from "./ScriptDashboardViewerVertical-
|
|
18
|
-
import { C as xe, a as Ge, b as ve, c as Oe, d as Me, e as Ve, f as Fe, g as Ne, h as ye, i as ke, D as ze, j as He, k as Ue, l as we, m as Ye, n as We, o as Xe, p as Ke, q as je, E as qe, r as Je, s as Ze, t as Qe, u as $e, v as as, F as es, w as ss, x as rs, G as ts, y as os, H as is, P as ns, z as ds, A as ls, S as Cs, B as us, I as ms, J as ps, K as cs, L as Es, M as Ss, T as Ds, N as Ts, O as Ps, Q as hs, R as _s, V as fs, U as Is, W as Bs, X as Rs, Y as bs, Z as gs, _ as As, $ as Ls, a0 as xs, a1 as Gs, a2 as vs, a3 as Os, a4 as Ms, a5 as Vs, a6 as Fs, a7 as Ns, a8 as ys, a9 as ks, aa as zs, ab as Hs, ac as Us, ad as ws, ae as Ys, af as Ws, ag as Xs, ah as Ks, ai as js, aj as qs, ak as Js, al as Zs, am as Qs, an as $s, ao as ar, ap as er, aq as sr, ar as rr, as as tr, at as or, au as ir, av as nr, aw as dr, ax as lr, ay as Cr, az as ur, aA as mr, aB as pr, aC as cr, aD as Er, aE as Sr, aF as Dr, aG as Tr } from "./index-
|
|
15
|
+
import { B as de, c as le, n as Ce, r as ue, a as me } from "./version-BNrlEAG1.js";
|
|
16
|
+
import { getBiModuleSurface as ce } from "./biModuleSurface-SpadZ11I.js";
|
|
17
|
+
import { C as Se, S as De, a as Te, c as Pe, e as he, g as _e, b as fe, h as Ie, i as Be, l as Re, r as be, s as ge, u as Ae } from "./ScriptDashboardViewerVertical-Db2sFEEl.js";
|
|
18
|
+
import { C as xe, a as Ge, b as ve, c as Oe, d as Me, e as Ve, f as Fe, g as Ne, h as ye, i as ke, D as ze, j as He, k as Ue, l as we, m as Ye, n as We, o as Xe, p as Ke, q as je, E as qe, r as Je, s as Ze, t as Qe, u as $e, v as as, F as es, w as ss, x as rs, G as ts, y as os, H as is, P as ns, z as ds, A as ls, S as Cs, B as us, I as ms, J as ps, K as cs, L as Es, M as Ss, T as Ds, N as Ts, O as Ps, Q as hs, R as _s, V as fs, U as Is, W as Bs, X as Rs, Y as bs, Z as gs, _ as As, $ as Ls, a0 as xs, a1 as Gs, a2 as vs, a3 as Os, a4 as Ms, a5 as Vs, a6 as Fs, a7 as Ns, a8 as ys, a9 as ks, aa as zs, ab as Hs, ac as Us, ad as ws, ae as Ys, af as Ws, ag as Xs, ah as Ks, ai as js, aj as qs, ak as Js, al as Zs, am as Qs, an as $s, ao as ar, ap as er, aq as sr, ar as rr, as as tr, at as or, au as ir, av as nr, aw as dr, ax as lr, ay as Cr, az as ur, aA as mr, aB as pr, aC as cr, aD as Er, aE as Sr, aF as Dr, aG as Tr } from "./index-DrS3V1Ke.js";
|
|
19
19
|
import { EnvironmentProvider as hr, InertEnvironmentProvider as _r, useEnvironment as fr, useEnvironmentOptional as Ir } from "@aintela/chat/components";
|
|
20
20
|
import { u as Rr, a as br } from "./index-D3OoOPjl.js";
|
|
21
21
|
import { D as Ar, a as Lr, u as xr } from "./DashboardParametersContext-Clv--79U.js";
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* `AIntelA.Bi.Agents` version at handshake (the instruction files describe
|
|
4
4
|
* THIS React API). Kept in sync with package.json by `tests/runtime/version.test.ts`.
|
|
5
5
|
*/
|
|
6
|
-
export declare const BI_RUNTIME_VERSION = "0.2.
|
|
6
|
+
export declare const BI_RUNTIME_VERSION = "0.2.6";
|
package/dist/runtime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as a, c as o, n as i, r, a as t } from "./version-
|
|
2
|
-
import { getBiModuleSurface as d } from "./biModuleSurface-
|
|
3
|
-
import { c as n, e as B, g as c, b as g, h, i as M, l as S, s as f } from "./ScriptDashboardViewerVertical-
|
|
4
|
-
import { L as p, U as I, W as R, aF as V } from "./index-
|
|
1
|
+
import { B as a, c as o, n as i, r, a as t } from "./version-BNrlEAG1.js";
|
|
2
|
+
import { getBiModuleSurface as d } from "./biModuleSurface-SpadZ11I.js";
|
|
3
|
+
import { c as n, e as B, g as c, b as g, h, i as M, l as S, s as f } from "./ScriptDashboardViewerVertical-Db2sFEEl.js";
|
|
4
|
+
import { L as p, U as I, W as R, aF as V } from "./index-DrS3V1Ke.js";
|
|
5
5
|
export {
|
|
6
6
|
a as BI_RUNTIME_VERSION,
|
|
7
7
|
p as SessionVisualizationsProvider,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var M = Object.defineProperty;
|
|
2
2
|
var l = (t, i) => M(t, "name", { value: i, configurable: !0 });
|
|
3
3
|
import { extendModuleRegistry as _, extendDefaultScope as b, createUiToolRegistry as w } from "@aintela/chat/components";
|
|
4
|
-
import { getBiModuleSurface as B } from "./biModuleSurface-
|
|
5
|
-
import { s as I } from "./ScriptDashboardViewerVertical-
|
|
4
|
+
import { getBiModuleSurface as B } from "./biModuleSurface-SpadZ11I.js";
|
|
5
|
+
import { s as I } from "./ScriptDashboardViewerVertical-Db2sFEEl.js";
|
|
6
6
|
import { jsx as c } from "react/jsx-runtime";
|
|
7
7
|
import { Box as p } from "@mui/material";
|
|
8
8
|
import { M as g, a as V, C as k, I as E } from "./index-ZBNoVc5M.js";
|
|
9
9
|
import { B as R } from "./BiClientProvider-CWJochvi.js";
|
|
10
|
-
import { W as $ } from "./index-
|
|
10
|
+
import { W as $ } from "./index-DrS3V1Ke.js";
|
|
11
11
|
const h = /* @__PURE__ */ new Set();
|
|
12
12
|
function O(t) {
|
|
13
13
|
const i = { ...B(), ...t.extraScope ?? {} }, a = t.specifiers.filter((o) => !h.has(o));
|
|
@@ -111,7 +111,7 @@ function T(t = {}) {
|
|
|
111
111
|
}, { status: "Guia iniciado" }) : x;
|
|
112
112
|
}
|
|
113
113
|
l(T, "createBiUiTools");
|
|
114
|
-
const j = "0.2.
|
|
114
|
+
const j = "0.2.6";
|
|
115
115
|
export {
|
|
116
116
|
j as B,
|
|
117
117
|
P as a,
|
|
@@ -119,4 +119,4 @@ export {
|
|
|
119
119
|
y as n,
|
|
120
120
|
O as r
|
|
121
121
|
};
|
|
122
|
-
//# sourceMappingURL=version-
|
|
122
|
+
//# sourceMappingURL=version-BNrlEAG1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-oYqU5xJk.js","sources":["../src/runtime/registerBiModules.ts","../src/runtime/createBiUiTools.tsx","../src/runtime/version.ts"],"sourcesContent":["import { extendModuleRegistry, extendDefaultScope } from '@aintela/chat/components';\nimport { getBiModuleSurface } from './biModuleSurface';\nimport { seedHostModules } from './loadDashboardBundle';\n\nexport interface RegisterBiModulesOptions {\n /**\n * The module specifiers LLM-emitted code imports from. The compiled\n * snippet does `__scope[\"<specifier>\"].X` and a bundle does\n * `require(\"<specifier>\")`, so every string here must match what the\n * template / instruction files told the model to write.\n *\n * AIA starts clean: `['@aintela/bi']`. Envision must keep resolving the\n * legacy keys forever (persisted sessions + content-hashed bundles):\n * `['@aintela/bi', '@envision/ui-library', '@envision/ui-library/components', …]`.\n */\n specifiers: string[];\n /**\n * Extra values merged into the surface under every specifier AND into the\n * bare-identifier scope — e.g. Envision's `VizLibrary` compat shim, or a\n * host's own components the instructions mention.\n */\n extraScope?: Record<string, unknown>;\n /**\n * Extra `require()` targets for dashboard bundles keyed by specifier\n * (`{ 'date-fns': dateFns, lodash }`). Not in the live-TSX scope.\n */\n extraHostModules?: Record<string, unknown>;\n}\n\nconst registeredKeys = new Set<string>();\n\n/**\n * Makes this library resolvable from LLM-generated code:\n * 1. `extendModuleRegistry(specifier, surface)` once per specifier (live TSX imports);\n * 2. `extendDefaultScope(surface)` once (bare identifiers, no import line);\n * 3. seeds the dashboard-bundle loader's host-module map under the same specifiers.\n *\n * Idempotent per specifier — call it at app start, before the first chat turn\n * or bundle renders.\n */\nexport function registerBiModules(options: RegisterBiModulesOptions): void {\n const surface = { ...getBiModuleSurface(), ...(options.extraScope ?? {}) };\n\n const fresh = options.specifiers.filter((s) => !registeredKeys.has(s));\n for (const specifier of fresh) {\n extendModuleRegistry(specifier, surface);\n registeredKeys.add(specifier);\n }\n if (fresh.length > 0 || options.extraScope) {\n extendDefaultScope(surface);\n }\n seedHostModules(options.specifiers, options.extraHostModules);\n}\n\n/** Test seam. */\nexport function resetBiModuleRegistration(): void {\n registeredKeys.clear();\n}\n","import React from 'react';\nimport { Box } from '@mui/material';\nimport { createUiToolRegistry } from '@aintela/chat/components';\nimport type { UiToolRegistryBuilder } from '@aintela/chat/components';\nimport { Chart, Metric, MetricGroup, IFrame } from '../inline';\nimport type { ChartExpandInfo, IFrameExpandInfo } from '../inline';\nimport { BiClientProvider, type BiClient } from '../client';\nimport { VisualizationFrame, type VisualizationKind } from './sessionVisualizations';\nimport type { DashboardEnvironment, GuideStep } from '../composer/environment/types';\n\n/**\n * The explorer's visual vocabulary as `uiTools` registry entries. The chat\n * library owns the plumbing (routing `[KernelUiFunction]` calls, unwrapping\n * args, replay); here we only declare WHAT to draw per tool name.\n *\n * `present_dashboard` and `present_tsx` are deliberately NOT registered — the\n * dashboard hand-off belongs to the dashboard slice and `present_tsx`'s\n * compiled-JS sibling-event plumbing is host policy. Both are added by the\n * host on the returned builder:\n *\n * const uiTools = createBiUiTools({ client })\n * .render('present_dashboard', (a) => <ScriptDashboardViewer dashboardId={a.id} />)\n * .build();\n */\nexport interface CreateBiUiToolsOptions {\n /**\n * Client whose `artifactUrl` / `iframeUrl` resolve the images. When\n * omitted the renderers rely on an ambient `<BiClientProvider>` above the\n * chat pane (which is how a host also passes the session id).\n */\n client?: BiClient;\n /** Expand handlers (a lightbox, an artifact panel). Default: open in a new tab. */\n onExpandChart?: (info: ChartExpandInfo) => void;\n onExpandIframe?: (info: IFrameExpandInfo) => void;\n /** Start from an existing builder to chain more tools before these. */\n builder?: UiToolRegistryBuilder;\n /**\n * The composer's environment (`useComposerEnvironment()` /\n * `environmentFromStore(store)`). When supplied, the three ACTION tools\n * the dashboard agent calls are registered too: `refresh_dashboard`,\n * `present_dashboard_pad` (`definitionJson` + `mode`) and `present_guide`\n * (`stepsJson`). Without it they are left to the host, like `present_dashboard`.\n */\n environment?: Partial<DashboardEnvironment>;\n}\n\n// present_metric uses camelCase params, but present_metric_group's items come\n// from a C# class serialised PascalCase. Read either casing.\nexport interface PresentMetricArgs {\n currentValue: string;\n previousValue?: string;\n prefix?: string;\n suffix?: string;\n differenceStyle?: 'Percentage' | 'Value';\n description?: string;\n icon?: string;\n}\n\nexport function normalizeMetricArgs(raw: unknown): PresentMetricArgs {\n const o = (raw ?? {}) as Record<string, unknown>;\n const g = (k: string): string | undefined => {\n const v = o[k] ?? o[k.charAt(0).toUpperCase() + k.slice(1)];\n return v == null ? undefined : String(v);\n };\n return {\n currentValue: g('currentValue') ?? '',\n previousValue: g('previousValue'),\n prefix: g('prefix'),\n suffix: g('suffix'),\n differenceStyle: g('differenceStyle') as 'Percentage' | 'Value' | undefined,\n description: g('description'),\n icon: g('icon'),\n };\n}\n\nexport interface PresentChartArgs { src?: string; name?: string; alt?: string; reasoning?: string; naked?: boolean }\nexport interface PresentMetricGroupArgs { title?: string; materialIcon?: string; footNote?: string; metrics?: unknown[] }\nexport interface PresentIframeArgs { src?: string; name?: string }\nexport interface PresentDashboardPadArgs { definitionJson?: string; mode?: 'create' | 'update' | string }\nexport interface PresentGuideArgs { stepsJson?: string }\n\n/** JSON text that may have been encoded once or twice on the way through the tool call. */\nfunction parseJsonArg<T>(raw: string | undefined, fallback: T): T {\n let value: unknown = raw;\n for (let i = 0; i < 2 && typeof value === 'string'; i++) {\n try {\n value = JSON.parse(value);\n } catch {\n return fallback;\n }\n }\n return (value ?? fallback) as T;\n}\n\n/**\n * What `VisualizationFrame` needs from the tool call that produced the thing — a structural subset of the\n * chat library's `UiToolContext`, so the renderers can pass `ctx` straight through.\n */\ninterface FrameInfo {\n callId: string;\n /** The interaction the call belongs to — one group per agent answer. */\n message?: unknown;\n onGoing?: boolean;\n}\n\n/** The interaction's id, when it has one — the group key, and `undefined` is a perfectly good group. */\nfunction groupOf(message: unknown): string | undefined {\n const id = (message as { id?: unknown } | null | undefined)?.id;\n return typeof id === 'string' ? id : undefined;\n}\n\nexport function createBiUiTools(options: CreateBiUiToolsOptions = {}): UiToolRegistryBuilder {\n const { client, onExpandChart, onExpandIframe } = options;\n\n /**\n * Box the node, put it under the client, and REGISTER it as one of the session's visualizations.\n *\n * <p>The registration is here rather than in each inline component because it is a fact about the tool\n * CALL — its id, its interaction, whether the turn is still streaming — and only this layer sees those.\n * Outside a `SessionVisualizationsProvider` the frame is inert and renders its child unchanged, so a host\n * that does not use the panel sees no difference at all.</p>\n */\n const wrap = (node: React.ReactNode, viz?: { kind: VisualizationKind; title?: string; preview?: React.ReactNode; frame: FrameInfo }): React.ReactNode => {\n const boxed = <Box sx={{ my: 1 }}>{node}</Box>;\n const framed = viz ? (\n <VisualizationFrame\n id={viz.frame.callId}\n kind={viz.kind}\n title={viz.title}\n group={groupOf(viz.frame.message)}\n preview={viz.preview}\n ready={!viz.frame.onGoing}\n >\n {boxed}\n </VisualizationFrame>\n ) : (\n boxed\n );\n return client ? <BiClientProvider client={client}>{framed}</BiClientProvider> : framed;\n };\n\n const builder = (options.builder ?? createUiToolRegistry())\n .render<PresentMetricArgs>('present_metric', (args, ctx) => {\n const m = normalizeMetricArgs(args);\n if (!m.currentValue) return null;\n return wrap(<Metric partial={false} {...m} />, {\n kind: 'metric',\n title: m.description,\n // The value IS the thumbnail for a KPI — nothing smaller says more about it.\n preview: <Box sx={{ fontSize: 15, fontWeight: 600, letterSpacing: '-0.02em' }}>{`${m.prefix ?? ''}${m.currentValue}${m.suffix ?? ''}`}</Box>,\n frame: ctx,\n });\n })\n .render<PresentMetricGroupArgs>('present_metric_group', (a, ctx) => {\n if (!a.metrics?.length) return null;\n const values = a.metrics.map((raw) => normalizeMetricArgs(raw));\n return wrap(\n <MetricGroup partial={false} title={a.title} materialIcon={a.materialIcon} footNote={a.footNote}>\n {values.map((m, i) => (\n <Metric key={i} partial={false} {...m} />\n ))}\n </MetricGroup>,\n {\n kind: 'metric',\n title: a.title,\n preview: (\n <Box sx={{ display: 'flex', gap: 1.5, flexWrap: 'wrap', fontSize: 13, fontWeight: 600, letterSpacing: '-0.02em' }}>\n {values.slice(0, 3).map((m, i) => (\n <Box key={i} component=\"span\">{`${m.prefix ?? ''}${m.currentValue}${m.suffix ?? ''}`}</Box>\n ))}\n </Box>\n ),\n frame: ctx,\n },\n );\n })\n .render<PresentChartArgs>('present_chart', (a, ctx) => {\n if (!a.src) return null;\n return wrap(<Chart src={a.src} name={a.name} alt={a.alt} reasoning={a.reasoning} naked={a.naked} onExpand={onExpandChart} />, {\n kind: 'chart',\n title: a.name ?? a.alt,\n // The chart's OWN image, scaled down. A hand-drawn sparkline would be a second, different\n // picture of the same data — and one this package would have to keep in step with the chart.\n preview: client ? <Box component=\"img\" src={client.artifactUrl(a.src)} alt=\"\" sx={{ maxWidth: '100%', maxHeight: 44, objectFit: 'contain', display: 'block' }} /> : undefined,\n frame: ctx,\n });\n })\n .render<PresentIframeArgs>('present_iframe', (a, ctx) => {\n if (!a.src || !a.name) return null;\n return wrap(<IFrame partial={false} src={a.src} name={a.name} onExpand={onExpandIframe} />, { kind: 'iframe', title: a.name, frame: ctx });\n });\n\n const env = options.environment;\n if (!env) return builder;\n\n // Action tools: side effects on the composer, fired once per tool-call id\n // by the chat library; the status chip shows after a successful run.\n return builder\n .action('refresh_dashboard', () => {\n env.refreshDashboard?.();\n }, { status: 'Dashboard atualizado' })\n .action<PresentDashboardPadArgs>('present_dashboard_pad', (a) => {\n const def = parseJsonArg<Record<string, unknown>>(a.definitionJson, {});\n if (a.mode === 'create') env.createDashboardPad?.(def as never);\n else env.updateDashboardPad?.(def as never);\n }, { status: 'Rascunho atualizado' })\n .action<PresentGuideArgs>('present_guide', (a) => {\n const steps = parseJsonArg<GuideStep[]>(a.stepsJson, []);\n if (Array.isArray(steps) && steps.length > 0) env.showGuide?.(steps);\n }, { status: 'Guia iniciado' });\n}\n","/**\n * The package version, so a host can log a mismatch against the server-side\n * `AIntelA.Bi.Agents` version at handshake (the instruction files describe\n * THIS React API). Kept in sync with package.json by `tests/runtime/version.test.ts`.\n */\nexport const BI_RUNTIME_VERSION = '0.2.5';\n"],"names":["registeredKeys","registerBiModules","options","surface","getBiModuleSurface","fresh","s","specifier","extendModuleRegistry","extendDefaultScope","seedHostModules","__name","resetBiModuleRegistration","normalizeMetricArgs","raw","o","g","k","v","parseJsonArg","fallback","value","i","groupOf","message","id","createBiUiTools","client","onExpandChart","onExpandIframe","wrap","node","viz","boxed","Box","framed","jsx","VisualizationFrame","BiClientProvider","builder","createUiToolRegistry","args","ctx","m","Metric","a","_a","values","MetricGroup","Chart","IFrame","env","def","_b","steps","BI_RUNTIME_VERSION"],"mappings":";;;;;;;;;;AA6BA,MAAMA,wBAAqB,IAAA;AAWpB,SAASC,EAAkBC,GAAyC;AACvE,QAAMC,IAAU,EAAE,GAAGC,EAAA,GAAsB,GAAIF,EAAQ,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"],"sourcesContent":["import { extendModuleRegistry, extendDefaultScope } from '@aintela/chat/components';\nimport { getBiModuleSurface } from './biModuleSurface';\nimport { seedHostModules } from './loadDashboardBundle';\n\nexport interface RegisterBiModulesOptions {\n /**\n * The module specifiers LLM-emitted code imports from. The compiled\n * snippet does `__scope[\"<specifier>\"].X` and a bundle does\n * `require(\"<specifier>\")`, so every string here must match what the\n * template / instruction files told the model to write.\n *\n * AIA starts clean: `['@aintela/bi']`. Envision must keep resolving the\n * legacy keys forever (persisted sessions + content-hashed bundles):\n * `['@aintela/bi', '@envision/ui-library', '@envision/ui-library/components', …]`.\n */\n specifiers: string[];\n /**\n * Extra values merged into the surface under every specifier AND into the\n * bare-identifier scope — e.g. Envision's `VizLibrary` compat shim, or a\n * host's own components the instructions mention.\n */\n extraScope?: Record<string, unknown>;\n /**\n * Extra `require()` targets for dashboard bundles keyed by specifier\n * (`{ 'date-fns': dateFns, lodash }`). Not in the live-TSX scope.\n */\n extraHostModules?: Record<string, unknown>;\n}\n\nconst registeredKeys = new Set<string>();\n\n/**\n * Makes this library resolvable from LLM-generated code:\n * 1. `extendModuleRegistry(specifier, surface)` once per specifier (live TSX imports);\n * 2. `extendDefaultScope(surface)` once (bare identifiers, no import line);\n * 3. seeds the dashboard-bundle loader's host-module map under the same specifiers.\n *\n * Idempotent per specifier — call it at app start, before the first chat turn\n * or bundle renders.\n */\nexport function registerBiModules(options: RegisterBiModulesOptions): void {\n const surface = { ...getBiModuleSurface(), ...(options.extraScope ?? {}) };\n\n const fresh = options.specifiers.filter((s) => !registeredKeys.has(s));\n for (const specifier of fresh) {\n extendModuleRegistry(specifier, surface);\n registeredKeys.add(specifier);\n }\n if (fresh.length > 0 || options.extraScope) {\n extendDefaultScope(surface);\n }\n seedHostModules(options.specifiers, options.extraHostModules);\n}\n\n/** Test seam. */\nexport function resetBiModuleRegistration(): void {\n registeredKeys.clear();\n}\n","import React from 'react';\nimport { Box } from '@mui/material';\nimport { createUiToolRegistry } from '@aintela/chat/components';\nimport type { UiToolRegistryBuilder } from '@aintela/chat/components';\nimport { Chart, Metric, MetricGroup, IFrame } from '../inline';\nimport type { ChartExpandInfo, IFrameExpandInfo } from '../inline';\nimport { BiClientProvider, type BiClient } from '../client';\nimport { VisualizationFrame, type VisualizationKind } from './sessionVisualizations';\nimport type { DashboardEnvironment, GuideStep } from '../composer/environment/types';\n\n/**\n * The explorer's visual vocabulary as `uiTools` registry entries. The chat\n * library owns the plumbing (routing `[KernelUiFunction]` calls, unwrapping\n * args, replay); here we only declare WHAT to draw per tool name.\n *\n * `present_dashboard` and `present_tsx` are deliberately NOT registered — the\n * dashboard hand-off belongs to the dashboard slice and `present_tsx`'s\n * compiled-JS sibling-event plumbing is host policy. Both are added by the\n * host on the returned builder:\n *\n * const uiTools = createBiUiTools({ client })\n * .render('present_dashboard', (a) => <ScriptDashboardViewer dashboardId={a.id} />)\n * .build();\n */\nexport interface CreateBiUiToolsOptions {\n /**\n * Client whose `artifactUrl` / `iframeUrl` resolve the images. When\n * omitted the renderers rely on an ambient `<BiClientProvider>` above the\n * chat pane (which is how a host also passes the session id).\n */\n client?: BiClient;\n /** Expand handlers (a lightbox, an artifact panel). Default: open in a new tab. */\n onExpandChart?: (info: ChartExpandInfo) => void;\n onExpandIframe?: (info: IFrameExpandInfo) => void;\n /** Start from an existing builder to chain more tools before these. */\n builder?: UiToolRegistryBuilder;\n /**\n * The composer's environment (`useComposerEnvironment()` /\n * `environmentFromStore(store)`). When supplied, the three ACTION tools\n * the dashboard agent calls are registered too: `refresh_dashboard`,\n * `present_dashboard_pad` (`definitionJson` + `mode`) and `present_guide`\n * (`stepsJson`). Without it they are left to the host, like `present_dashboard`.\n */\n environment?: Partial<DashboardEnvironment>;\n}\n\n// present_metric uses camelCase params, but present_metric_group's items come\n// from a C# class serialised PascalCase. Read either casing.\nexport interface PresentMetricArgs {\n currentValue: string;\n previousValue?: string;\n prefix?: string;\n suffix?: string;\n differenceStyle?: 'Percentage' | 'Value';\n description?: string;\n icon?: string;\n}\n\nexport function normalizeMetricArgs(raw: unknown): PresentMetricArgs {\n const o = (raw ?? {}) as Record<string, unknown>;\n const g = (k: string): string | undefined => {\n const v = o[k] ?? o[k.charAt(0).toUpperCase() + k.slice(1)];\n return v == null ? undefined : String(v);\n };\n return {\n currentValue: g('currentValue') ?? '',\n previousValue: g('previousValue'),\n prefix: g('prefix'),\n suffix: g('suffix'),\n differenceStyle: g('differenceStyle') as 'Percentage' | 'Value' | undefined,\n description: g('description'),\n icon: g('icon'),\n };\n}\n\nexport interface PresentChartArgs { src?: string; name?: string; alt?: string; reasoning?: string; naked?: boolean }\nexport interface PresentMetricGroupArgs { title?: string; materialIcon?: string; footNote?: string; metrics?: unknown[] }\nexport interface PresentIframeArgs { src?: string; name?: string }\nexport interface PresentDashboardPadArgs { definitionJson?: string; mode?: 'create' | 'update' | string }\nexport interface PresentGuideArgs { stepsJson?: string }\n\n/** JSON text that may have been encoded once or twice on the way through the tool call. */\nfunction parseJsonArg<T>(raw: string | undefined, fallback: T): T {\n let value: unknown = raw;\n for (let i = 0; i < 2 && typeof value === 'string'; i++) {\n try {\n value = JSON.parse(value);\n } catch {\n return fallback;\n }\n }\n return (value ?? fallback) as T;\n}\n\n/**\n * What `VisualizationFrame` needs from the tool call that produced the thing — a structural subset of the\n * chat library's `UiToolContext`, so the renderers can pass `ctx` straight through.\n */\ninterface FrameInfo {\n callId: string;\n /** The interaction the call belongs to — one group per agent answer. */\n message?: unknown;\n onGoing?: boolean;\n}\n\n/** The interaction's id, when it has one — the group key, and `undefined` is a perfectly good group. */\nfunction groupOf(message: unknown): string | undefined {\n const id = (message as { id?: unknown } | null | undefined)?.id;\n return typeof id === 'string' ? id : undefined;\n}\n\nexport function createBiUiTools(options: CreateBiUiToolsOptions = {}): UiToolRegistryBuilder {\n const { client, onExpandChart, onExpandIframe } = options;\n\n /**\n * Box the node, put it under the client, and REGISTER it as one of the session's visualizations.\n *\n * <p>The registration is here rather than in each inline component because it is a fact about the tool\n * CALL — its id, its interaction, whether the turn is still streaming — and only this layer sees those.\n * Outside a `SessionVisualizationsProvider` the frame is inert and renders its child unchanged, so a host\n * that does not use the panel sees no difference at all.</p>\n */\n const wrap = (node: React.ReactNode, viz?: { kind: VisualizationKind; title?: string; preview?: React.ReactNode; frame: FrameInfo }): React.ReactNode => {\n const boxed = <Box sx={{ my: 1 }}>{node}</Box>;\n const framed = viz ? (\n <VisualizationFrame\n id={viz.frame.callId}\n kind={viz.kind}\n title={viz.title}\n group={groupOf(viz.frame.message)}\n preview={viz.preview}\n ready={!viz.frame.onGoing}\n >\n {boxed}\n </VisualizationFrame>\n ) : (\n boxed\n );\n return client ? <BiClientProvider client={client}>{framed}</BiClientProvider> : framed;\n };\n\n const builder = (options.builder ?? createUiToolRegistry())\n .render<PresentMetricArgs>('present_metric', (args, ctx) => {\n const m = normalizeMetricArgs(args);\n if (!m.currentValue) return null;\n return wrap(<Metric partial={false} {...m} />, {\n kind: 'metric',\n title: m.description,\n // The value IS the thumbnail for a KPI — nothing smaller says more about it.\n preview: <Box sx={{ fontSize: 15, fontWeight: 600, letterSpacing: '-0.02em' }}>{`${m.prefix ?? ''}${m.currentValue}${m.suffix ?? ''}`}</Box>,\n frame: ctx,\n });\n })\n .render<PresentMetricGroupArgs>('present_metric_group', (a, ctx) => {\n if (!a.metrics?.length) return null;\n const values = a.metrics.map((raw) => normalizeMetricArgs(raw));\n return wrap(\n <MetricGroup partial={false} title={a.title} materialIcon={a.materialIcon} footNote={a.footNote}>\n {values.map((m, i) => (\n <Metric key={i} partial={false} {...m} />\n ))}\n </MetricGroup>,\n {\n kind: 'metric',\n title: a.title,\n preview: (\n <Box sx={{ display: 'flex', gap: 1.5, flexWrap: 'wrap', fontSize: 13, fontWeight: 600, letterSpacing: '-0.02em' }}>\n {values.slice(0, 3).map((m, i) => (\n <Box key={i} component=\"span\">{`${m.prefix ?? ''}${m.currentValue}${m.suffix ?? ''}`}</Box>\n ))}\n </Box>\n ),\n frame: ctx,\n },\n );\n })\n .render<PresentChartArgs>('present_chart', (a, ctx) => {\n if (!a.src) return null;\n return wrap(<Chart src={a.src} name={a.name} alt={a.alt} reasoning={a.reasoning} naked={a.naked} onExpand={onExpandChart} />, {\n kind: 'chart',\n title: a.name ?? a.alt,\n // The chart's OWN image, scaled down. A hand-drawn sparkline would be a second, different\n // picture of the same data — and one this package would have to keep in step with the chart.\n preview: client ? <Box component=\"img\" src={client.artifactUrl(a.src)} alt=\"\" sx={{ maxWidth: '100%', maxHeight: 44, objectFit: 'contain', display: 'block' }} /> : undefined,\n frame: ctx,\n });\n })\n .render<PresentIframeArgs>('present_iframe', (a, ctx) => {\n if (!a.src || !a.name) return null;\n return wrap(<IFrame partial={false} src={a.src} name={a.name} onExpand={onExpandIframe} />, { kind: 'iframe', title: a.name, frame: ctx });\n });\n\n const env = options.environment;\n if (!env) return builder;\n\n // Action tools: side effects on the composer, fired once per tool-call id\n // by the chat library; the status chip shows after a successful run.\n return builder\n .action('refresh_dashboard', () => {\n env.refreshDashboard?.();\n }, { status: 'Dashboard atualizado' })\n .action<PresentDashboardPadArgs>('present_dashboard_pad', (a) => {\n const def = parseJsonArg<Record<string, unknown>>(a.definitionJson, {});\n if (a.mode === 'create') env.createDashboardPad?.(def as never);\n else env.updateDashboardPad?.(def as never);\n }, { status: 'Rascunho atualizado' })\n .action<PresentGuideArgs>('present_guide', (a) => {\n const steps = parseJsonArg<GuideStep[]>(a.stepsJson, []);\n if (Array.isArray(steps) && steps.length > 0) env.showGuide?.(steps);\n }, { status: 'Guia iniciado' });\n}\n","/**\n * The package version, so a host can log a mismatch against the server-side\n * `AIntelA.Bi.Agents` version at handshake (the instruction files describe\n * THIS React API). Kept in sync with package.json by `tests/runtime/version.test.ts`.\n */\nexport const BI_RUNTIME_VERSION = '0.2.6';\n"],"names":["registeredKeys","registerBiModules","options","surface","getBiModuleSurface","fresh","s","specifier","extendModuleRegistry","extendDefaultScope","seedHostModules","__name","resetBiModuleRegistration","normalizeMetricArgs","raw","o","g","k","v","parseJsonArg","fallback","value","i","groupOf","message","id","createBiUiTools","client","onExpandChart","onExpandIframe","wrap","node","viz","boxed","Box","framed","jsx","VisualizationFrame","BiClientProvider","builder","createUiToolRegistry","args","ctx","m","Metric","a","_a","values","MetricGroup","Chart","IFrame","env","def","_b","steps","BI_RUNTIME_VERSION"],"mappings":";;;;;;;;;;AA6BA,MAAMA,wBAAqB,IAAA;AAWpB,SAASC,EAAkBC,GAAyC;AACvE,QAAMC,IAAU,EAAE,GAAGC,EAAA,GAAsB,GAAIF,EAAQ,cAAc,GAAC,GAEhEG,IAAQH,EAAQ,WAAW,OAAO,CAACI,MAAM,CAACN,EAAe,IAAIM,CAAC,CAAC;AACrE,aAAWC,KAAaF;AACpB,IAAAG,EAAqBD,GAAWJ,CAAO,GACvCH,EAAe,IAAIO,CAAS;AAEhC,GAAIF,EAAM,SAAS,KAAKH,EAAQ,eAC5BO,EAAmBN,CAAO,GAE9BO,EAAgBR,EAAQ,YAAYA,EAAQ,gBAAgB;AAChE;AAZgBS,EAAAV,GAAA;AAeT,SAASW,IAAkC;AAC9C,EAAAZ,EAAe,MAAA;AACnB;AAFgBW,EAAAC,GAAA;ACGT,SAASC,EAAoBC,GAAiC;AACjE,QAAMC,IAAKD,KAAO,CAAA,GACZE,IAAI,gBAAAL,EAAA,CAACM,MAAkC;AACzC,UAAMC,IAAIH,EAAEE,CAAC,KAAKF,EAAEE,EAAE,OAAO,CAAC,EAAE,YAAA,IAAgBA,EAAE,MAAM,CAAC,CAAC;AAC1D,WAAOC,KAAK,OAAO,SAAY,OAAOA,CAAC;AAAA,EAC3C,GAHU;AAIV,SAAO;AAAA,IACH,cAAcF,EAAE,cAAc,KAAK;AAAA,IACnC,eAAeA,EAAE,eAAe;AAAA,IAChC,QAAQA,EAAE,QAAQ;AAAA,IAClB,QAAQA,EAAE,QAAQ;AAAA,IAClB,iBAAiBA,EAAE,iBAAiB;AAAA,IACpC,aAAaA,EAAE,aAAa;AAAA,IAC5B,M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0B,EAAE,WAAW,CAAA,CAAE;AACvD,IAAI,MAAM,QAAQS,CAAK,KAAKA,EAAM,SAAS,OAAGR,IAAAK,EAAI,cAAJ,QAAAL,EAAA,KAAAK,GAAgBG;AAAA,EAClE,GAAG,EAAE,QAAQ,iBAAiB,IAhBjBf;AAiBrB;AAnGgB5B,EAAAe,GAAA;AC1GT,MAAM6B,IAAqB;"}
|
package/dist/viewer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, S as s, a as d, r as o, u as t } from "./ScriptDashboardViewerVertical-
|
|
1
|
+
import { C as e, S as s, a as d, r as o, u as t } from "./ScriptDashboardViewerVertical-Db2sFEEl.js";
|
|
2
2
|
export {
|
|
3
3
|
e as CATEGORY_PREFIXES,
|
|
4
4
|
s as ScriptDashboardViewer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aintela/bi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "BI visualisation components, dashboard grid, hooks, the dashboard composer (sketch pad + authoring view) and the LLM runtime registry for the AIA platform (extracted from Envision's dashboard app).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-C38e4aIE.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|