@mastra/playground-ui 44.0.0 → 45.0.0-alpha.2
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/CHANGELOG.md +31 -0
- package/dist/components/HoverCard.cjs.js +1 -1
- package/dist/components/HoverCard.es.js +1 -1
- package/dist/components/KeyValueList.cjs.js +1 -1
- package/dist/components/KeyValueList.es.js +1 -1
- package/dist/domains/traces/components/timeline-timing-col.cjs.js +1 -1
- package/dist/domains/traces/components/timeline-timing-col.es.js +1 -1
- package/dist/ee/signals/components/signals-empty-state.cjs.js +119 -40
- package/dist/ee/signals/components/signals-empty-state.cjs.js.map +1 -1
- package/dist/ee/signals/components/signals-empty-state.es.js +119 -40
- package/dist/ee/signals/components/signals-empty-state.es.js.map +1 -1
- package/dist/{hover-card-DegapekV.cjs → hover-card-Bx258om1.cjs} +3 -3
- package/dist/{hover-card-DegapekV.cjs.map → hover-card-Bx258om1.cjs.map} +1 -1
- package/dist/{hover-card-CADL8HiJ.js → hover-card-crVofiZO.js} +3 -3
- package/dist/{hover-card-CADL8HiJ.js.map → hover-card-crVofiZO.js.map} +1 -1
- package/dist/src/ee/signals/components/signals-empty-state.d.ts +13 -1
- package/dist/style.css +15 -58
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 45.0.0-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Refreshed the HoverCard look: rounded corners, a soft elevation shadow, tighter padding, and the same white-in-light-mode surface as dropdowns and popovers. ([#20365](https://github.com/mastra-ai/mastra/pull/20365))
|
|
8
|
+
|
|
9
|
+
- Added Trace Intelligence progress types and improved the onboarding state with processing progress, clearer copy, accessible markup, mobile polish, and the dedicated documentation link. ([#20401](https://github.com/mastra-ai/mastra/pull/20401))
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`55c9e24`](https://github.com/mastra-ai/mastra/commit/55c9e248c27c1d72b5bb7e94ea6b8a3999eee49f), [`e83473d`](https://github.com/mastra-ai/mastra/commit/e83473d63d6b48d78c229b52430a7b0be4189263), [`7a34274`](https://github.com/mastra-ai/mastra/commit/7a34274124c156b7303a18fb6d749f9f0b4b9bf8), [`07f5b4b`](https://github.com/mastra-ai/mastra/commit/07f5b4ba9d608d88865030732e580298296adf99), [`c1e4d83`](https://github.com/mastra-ai/mastra/commit/c1e4d83662bc692ec9deab83871931b9758a67d3)]:
|
|
12
|
+
- @mastra/core@1.55.0-alpha.2
|
|
13
|
+
- @mastra/client-js@1.36.0-alpha.2
|
|
14
|
+
- @mastra/react@1.3.4-alpha.2
|
|
15
|
+
|
|
16
|
+
## 44.0.1-alpha.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`ba369f2`](https://github.com/mastra-ai/mastra/commit/ba369f2a0aaf998da0d6aa033d26f64f96bef8ac), [`dcfed93`](https://github.com/mastra-ai/mastra/commit/dcfed93e1e256c6abfa792cbb7ca836f5d0e8638), [`2876e15`](https://github.com/mastra-ai/mastra/commit/2876e15b4d2f616a3bc1ed3af57d546c268384ce), [`598080f`](https://github.com/mastra-ai/mastra/commit/598080f224edb3f0f5b801035b067fac50a56a03)]:
|
|
21
|
+
- @mastra/core@1.55.0-alpha.1
|
|
22
|
+
- @mastra/client-js@1.35.1-alpha.1
|
|
23
|
+
- @mastra/react@1.3.4-alpha.1
|
|
24
|
+
|
|
25
|
+
## 44.0.1-alpha.0
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`3f472b4`](https://github.com/mastra-ai/mastra/commit/3f472b468892a1ff14ccb43cc0343b86f7d8fd7d), [`35b929b`](https://github.com/mastra-ai/mastra/commit/35b929b7abc3d20d85c7985880960ac2d04a6c86), [`9b3626a`](https://github.com/mastra-ai/mastra/commit/9b3626aeb1d16fcd34b0a8e94c114ddb80a3b240)]:
|
|
30
|
+
- @mastra/core@1.55.0-alpha.0
|
|
31
|
+
- @mastra/client-js@1.35.1-alpha.0
|
|
32
|
+
- @mastra/react@1.3.4-alpha.0
|
|
33
|
+
|
|
3
34
|
## 44.0.0
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { H as HoverCard, a as HoverCardContent, b as HoverCardTrigger } from '../hover-card-
|
|
1
|
+
export { H as HoverCard, a as HoverCardContent, b as HoverCardTrigger } from '../hover-card-crVofiZO.js';
|
|
2
2
|
//# sourceMappingURL=HoverCard.es.js.map
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const lucideReact = require('lucide-react');
|
|
7
7
|
const React = require('react');
|
|
8
|
-
const hoverCard = require('../hover-card-
|
|
8
|
+
const hoverCard = require('../hover-card-Bx258om1.cjs');
|
|
9
9
|
const reactVisuallyHidden = require('@radix-ui/react-visually-hidden');
|
|
10
10
|
const utils_cn = require('../cn-vA5sWo9W.cjs');
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { ChevronRightIcon } from 'lucide-react';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { H as HoverCard, b as HoverCardTrigger, a as HoverCardContent } from '../hover-card-
|
|
4
|
+
import { H as HoverCard, b as HoverCardTrigger, a as HoverCardContent } from '../hover-card-crVofiZO.js';
|
|
5
5
|
import { VisuallyHidden } from '@radix-ui/react-visually-hidden';
|
|
6
6
|
import { c as cn } from '../cn-BakJzhuv.js';
|
|
7
7
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const format = require('date-fns/format');
|
|
7
7
|
const dataKeysAndValues = require('../../../data-keys-and-values-sjag88jf.cjs');
|
|
8
|
-
const hoverCard = require('../../../hover-card-
|
|
8
|
+
const hoverCard = require('../../../hover-card-Bx258om1.cjs');
|
|
9
9
|
const utils_cn = require('../../../cn-vA5sWo9W.cjs');
|
|
10
10
|
|
|
11
11
|
function TimelineTimingCol({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { format } from 'date-fns/format';
|
|
3
3
|
import { D as DataKeysAndValues } from '../../../data-keys-and-values-BJynhd6V.js';
|
|
4
|
-
import { H as HoverCard, b as HoverCardTrigger, a as HoverCardContent } from '../../../hover-card-
|
|
4
|
+
import { H as HoverCard, b as HoverCardTrigger, a as HoverCardContent } from '../../../hover-card-crVofiZO.js';
|
|
5
5
|
import { c as cn } from '../../../cn-BakJzhuv.js';
|
|
6
6
|
|
|
7
7
|
function TimelineTimingCol({
|
|
@@ -10,13 +10,14 @@ const sankeyColor = require('../../../sankeyColor-DONd5cg9.cjs');
|
|
|
10
10
|
const ee_signals_signalColors = require('../signal-colors.cjs.js');
|
|
11
11
|
|
|
12
12
|
const signalDefinitions = [
|
|
13
|
-
{ label: "Goal", description: "What the user is trying to achieve
|
|
14
|
-
{ label: "
|
|
13
|
+
{ key: "goal", label: "Goal", description: "What the user is trying to achieve." },
|
|
14
|
+
{ key: "outcome", label: "Outcome", description: "Whether the interaction was completed, unresolved, or blocked." },
|
|
15
15
|
{
|
|
16
|
+
key: "behavior",
|
|
16
17
|
label: "Behavior",
|
|
17
|
-
description: "The
|
|
18
|
+
description: "The observable actions and patterns in the trace, including tool use, retries, failures, and recovery."
|
|
18
19
|
},
|
|
19
|
-
{ label: "
|
|
20
|
+
{ key: "sentiment", label: "Sentiment", description: "The user's emotional state or attitude." }
|
|
20
21
|
];
|
|
21
22
|
const signalLabels = signalDefinitions.map((signal) => signal.label);
|
|
22
23
|
const traceRows = [
|
|
@@ -31,27 +32,105 @@ const PipelineConnector = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { "aria-h
|
|
|
31
32
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-border1 w-full border-t border-dashed" }),
|
|
32
33
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "signals-pipeline-connector bg-positive1 absolute left-1/2 size-2.5 -translate-x-1/2 rounded-full shadow-[0_0_12px_currentColor]" })
|
|
33
34
|
] });
|
|
34
|
-
|
|
35
|
+
function formatNumber(value) {
|
|
36
|
+
return new Intl.NumberFormat("en-US").format(value);
|
|
37
|
+
}
|
|
38
|
+
function statusCopy(progress, isRangeEmpty) {
|
|
39
|
+
if (isRangeEmpty) {
|
|
40
|
+
return {
|
|
41
|
+
title: "No Trace Intelligence themes in this date range.",
|
|
42
|
+
body: "Choose a wider snapshot date range, or wait for newly processed traces to form recurring themes."
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
if (!progress || progress.status === "collecting") {
|
|
46
|
+
return {
|
|
47
|
+
title: "Collecting traces for Trace Intelligence.",
|
|
48
|
+
body: "Trace Intelligence starts grouping recurring patterns after your deployed agents send enough completed traces."
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (progress.status === "ready") {
|
|
52
|
+
return {
|
|
53
|
+
title: "Trace Intelligence themes are ready.",
|
|
54
|
+
body: "Select at least two available trace signal types to see how goals, outcomes, behaviors, and sentiment connect."
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
title: "Analyzing traces for Trace Intelligence.",
|
|
59
|
+
body: "Trace signals have started processing. Themes appear after enough generated and embedded trace signals form recurring patterns."
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function ProgressSummary({ progress }) {
|
|
63
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-4 grid gap-2 sm:grid-cols-3", children: [
|
|
64
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-border1 bg-surface3 rounded-md border px-3 py-2", children: [
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-neutral3 text-xs", children: "Traces analyzed" }),
|
|
66
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-neutral6 mt-1 text-lg font-semibold", children: formatNumber(progress.traceCount) })
|
|
67
|
+
] }),
|
|
68
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-border1 bg-surface3 rounded-md border px-3 py-2", children: [
|
|
69
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-neutral3 text-xs", children: "Trace signal types ready" }),
|
|
70
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dd", { className: "text-neutral6 mt-1 text-lg font-semibold", children: [
|
|
71
|
+
progress.availableSignals.length,
|
|
72
|
+
" of 4"
|
|
73
|
+
] })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-border1 bg-surface3 rounded-md border px-3 py-2", children: [
|
|
76
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-neutral3 text-xs", children: "Status" }),
|
|
77
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-neutral6 mt-1 text-lg font-semibold capitalize", children: progress.status })
|
|
78
|
+
] })
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
81
|
+
function SignalProgressList({ progress }) {
|
|
82
|
+
if (!progress) return null;
|
|
83
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { "aria-label": "Trace signal processing progress", className: "mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-4", children: signalDefinitions.map((signal) => {
|
|
84
|
+
const value = progress.signals[signal.key];
|
|
85
|
+
const isReady = progress.availableSignals.includes(signal.key);
|
|
86
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "border-border1 bg-surface2 rounded-md border px-3 py-2", children: [
|
|
87
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
88
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold", style: signalStyle(signal.label), children: signal.label }),
|
|
89
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-neutral4 text-xs", children: isReady ? "Themes ready" : "Processing" })
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-neutral3 mt-1 text-xs", children: [
|
|
92
|
+
formatNumber(value.generated),
|
|
93
|
+
" generated · ",
|
|
94
|
+
formatNumber(value.embedded),
|
|
95
|
+
" embedded"
|
|
96
|
+
] })
|
|
97
|
+
] }, signal.label);
|
|
98
|
+
}) });
|
|
99
|
+
}
|
|
100
|
+
const SignalsEmptyState = ({
|
|
101
|
+
actionSlot,
|
|
102
|
+
LinkComponent = "a",
|
|
103
|
+
progress,
|
|
104
|
+
isRangeEmpty
|
|
105
|
+
}) => {
|
|
106
|
+
const copy = statusCopy(progress, isRangeEmpty);
|
|
35
107
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "bg-surface1 min-h-full w-full p-6 md:px-10 lg:px-12 xl:px-[4.375rem]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto w-full max-w-260", children: [
|
|
36
|
-
/* @__PURE__ */ jsxRuntime.
|
|
108
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { children: [
|
|
109
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-neutral4 flex items-center gap-2 font-mono text-xs tracking-wider uppercase", children: [
|
|
110
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "bg-accent1 size-2 rounded-full" }),
|
|
111
|
+
"Trace Intelligence"
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-header-xl text-neutral6 mt-2 font-medium tracking-tight", children: "Understand what drives every agent interaction" }),
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral3 mt-2 max-w-180 text-sm leading-5", children: "Trace Intelligence groups recurring goals, outcomes, behaviors, and sentiment across completed traces." })
|
|
115
|
+
] }),
|
|
37
116
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
38
117
|
"div",
|
|
39
118
|
{
|
|
40
|
-
"aria-label": "Trace intelligence pipeline",
|
|
41
|
-
className: "mt-14 grid gap-4 lg:grid-cols-[17.5rem_4.5rem_17.5rem_4.5rem_minmax(0,1fr)] lg:gap-0",
|
|
42
119
|
role: "list",
|
|
120
|
+
"aria-label": "Trace Intelligence analysis pipeline",
|
|
121
|
+
className: "mt-14 grid gap-4 lg:grid-cols-[17.5rem_4.5rem_17.5rem_4.5rem_minmax(0,1fr)] lg:gap-0",
|
|
43
122
|
children: [
|
|
44
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
123
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { role: "listitem", className: "min-h-50 p-5", children: [
|
|
45
124
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-neutral6 text-lg font-semibold", children: "Traces" }),
|
|
46
125
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral3 mt-0.5 text-xs", children: "Every agent interaction" }),
|
|
47
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
126
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral3 mt-5 font-mono text-[0.6875rem] tracking-[0.18em] uppercase", children: "Input" }),
|
|
48
127
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2.5 space-y-2", children: traceRows.map(([name, duration]) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
49
128
|
"div",
|
|
50
129
|
{
|
|
51
130
|
className: "border-border1 bg-surface3 text-ui-xs flex items-center justify-between rounded border px-3 py-1.5 font-mono",
|
|
52
131
|
children: [
|
|
53
132
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-neutral4", children: name }),
|
|
54
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
133
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-neutral3", children: duration })
|
|
55
134
|
]
|
|
56
135
|
},
|
|
57
136
|
name
|
|
@@ -61,28 +140,28 @@ const SignalsEmptyState = ({ actionSlot, LinkComponent = "a" }) => {
|
|
|
61
140
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
62
141
|
Card.Card,
|
|
63
142
|
{
|
|
64
|
-
as: "
|
|
65
|
-
className: "flex h-50 flex-col items-center p-5 text-center",
|
|
66
|
-
elevation: "elevated",
|
|
143
|
+
as: "div",
|
|
67
144
|
role: "listitem",
|
|
145
|
+
className: "flex min-h-50 flex-col items-center p-5 text-center",
|
|
146
|
+
elevation: "elevated",
|
|
68
147
|
children: [
|
|
69
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-neutral6 text-lg font-semibold", children: "
|
|
70
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral3 mt-0.5 text-xs", children: "
|
|
148
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-neutral6 text-lg font-semibold", children: "Trace Intelligence" }),
|
|
149
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral3 mt-0.5 text-xs", children: "Finds recurring themes" }),
|
|
71
150
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "aria-hidden": "true", className: "relative mt-5 flex size-20 items-center justify-center", children: [
|
|
72
151
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "signals-engine-pulse border-positive1/15 absolute size-20 rounded-full border" }),
|
|
73
152
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "border-positive1/25 absolute size-14 rounded-full border" }),
|
|
74
153
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "border-positive1/40 bg-positive1/5 absolute size-9 rounded-full border shadow-[0_0_24px_var(--color-positive1)]" }),
|
|
75
154
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CpuIcon, { className: "text-positive1 relative size-4" })
|
|
76
155
|
] }),
|
|
77
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-ui-xs text-
|
|
156
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-ui-xs text-neutral3 mt-3 max-w-40 leading-4", children: "Clusters similar trace signals into themes for each dimension" })
|
|
78
157
|
]
|
|
79
158
|
}
|
|
80
159
|
),
|
|
81
160
|
/* @__PURE__ */ jsxRuntime.jsx(PipelineConnector, {}),
|
|
82
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
83
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-neutral6 text-lg font-semibold", children: "
|
|
84
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral3 mt-0.5 text-xs", children: "
|
|
85
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
161
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { role: "listitem", className: "min-h-50 p-5", children: [
|
|
162
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-neutral6 text-lg font-semibold", children: "Theme analysis" }),
|
|
163
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral3 mt-0.5 text-xs", children: "How recurring patterns connect" }),
|
|
164
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral3 mt-5 font-mono text-[0.6875rem] tracking-[0.18em] uppercase", children: "Output" }),
|
|
86
165
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 flex flex-wrap gap-2", children: signalLabels.map((label) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
87
166
|
"span",
|
|
88
167
|
{
|
|
@@ -101,45 +180,45 @@ const SignalsEmptyState = ({ actionSlot, LinkComponent = "a" }) => {
|
|
|
101
180
|
),
|
|
102
181
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "mt-10", "aria-labelledby": "signal-definitions-heading", children: [
|
|
103
182
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { id: "signal-definitions-heading", className: "text-neutral6 text-lg font-semibold", children: "What each trace signal means" }),
|
|
104
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
183
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { "aria-label": "Trace signal definitions", className: "mt-4 grid gap-3 sm:grid-cols-2", children: signalDefinitions.map((signal) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "px-1 py-2", children: [
|
|
105
184
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold", style: signalStyle(signal.label), children: signal.label }),
|
|
106
185
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-neutral3 mt-1.5 text-xs leading-5", children: signal.description })
|
|
107
186
|
] }, signal.label)) })
|
|
108
187
|
] }),
|
|
109
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
110
|
-
/* @__PURE__ */ jsxRuntime.
|
|
111
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "mt-3 grid h-18 grid-cols-3 gap-5 opacity-35", children: [0, 1, 2].map((index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-border1 bg-surface2/30 rounded-md border border-dashed p-4", children: [
|
|
112
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-neutral1 h-1.5 w-16 rounded-full" }),
|
|
113
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-neutral1/60 mt-3 h-1 w-full rounded-full" }),
|
|
114
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-neutral1/40 mt-2 h-1 w-2/3 rounded-full" })
|
|
115
|
-
] }, index)) })
|
|
116
|
-
] }),
|
|
117
|
-
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "border-border1 bg-surface2 mt-9 flex min-h-16 flex-col gap-4 rounded-md border px-5 py-3.5 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
118
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-start gap-3 sm:items-center", children: [
|
|
188
|
+
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "border-border1 bg-surface2 mt-9 rounded-md border px-5 py-4", children: [
|
|
189
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-start gap-3", children: [
|
|
119
190
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
120
191
|
"span",
|
|
121
192
|
{
|
|
122
193
|
"aria-hidden": "true",
|
|
123
|
-
className: "bg-warning1 mt-1.5 size-2 shrink-0 rounded-full shadow-[0_0_9px_currentColor]
|
|
194
|
+
className: "bg-warning1 mt-1.5 size-2 shrink-0 rounded-full shadow-[0_0_9px_currentColor]"
|
|
124
195
|
}
|
|
125
196
|
),
|
|
126
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
127
|
-
/* @__PURE__ */ jsxRuntime.
|
|
128
|
-
|
|
197
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
198
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-neutral3 text-xs leading-5", children: [
|
|
199
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-neutral5 font-semibold", children: copy.title }),
|
|
200
|
+
" ",
|
|
201
|
+
copy.body
|
|
202
|
+
] }),
|
|
203
|
+
progress ? /* @__PURE__ */ jsxRuntime.jsx(ProgressSummary, { progress }) : null,
|
|
204
|
+
/* @__PURE__ */ jsxRuntime.jsx(SignalProgressList, { progress })
|
|
129
205
|
] })
|
|
130
206
|
] }),
|
|
131
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: [
|
|
207
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex shrink-0 flex-wrap items-center gap-2 sm:justify-end", children: [
|
|
132
208
|
actionSlot,
|
|
133
|
-
/* @__PURE__ */ jsxRuntime.
|
|
209
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
134
210
|
Button.Button,
|
|
135
211
|
{
|
|
136
212
|
as: "a",
|
|
137
|
-
href: "https://mastra.ai/en/docs/
|
|
213
|
+
href: "https://mastra.ai/en/docs/mastra-platform/trace-intelligence",
|
|
138
214
|
target: "_blank",
|
|
139
215
|
rel: "noopener noreferrer",
|
|
140
216
|
variant: "outline",
|
|
141
217
|
size: "sm",
|
|
142
|
-
children:
|
|
218
|
+
children: [
|
|
219
|
+
"Read the docs",
|
|
220
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: " (opens in new tab)" })
|
|
221
|
+
]
|
|
143
222
|
}
|
|
144
223
|
),
|
|
145
224
|
/* @__PURE__ */ jsxRuntime.jsx(Button.Button, { as: LinkComponent, href: "/observability", variant: "primary", size: "sm", children: "View incoming traces" })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals-empty-state.cjs.js","sources":["../../../../src/ee/signals/components/signals-empty-state.tsx"],"sourcesContent":["import { CpuIcon } from 'lucide-react';\nimport type { CSSProperties, ReactNode } from 'react';\n\nimport './signals-empty-state.css';\nimport { Button } from '../../../ds/components/Button';\nimport { Card } from '../../../ds/components/Card';\nimport { nodeColor } from '../../../ds/components/SankeyChart/sankeyColor';\nimport type { LinkComponent } from '../../../ds/types/link-component';\nimport { getSignalHue } from '../signal-colors';\n\nconst signalDefinitions = [\n { label: 'Goal', description: 'What the user is trying to achieve or have completed.' },\n { label: 'Sentiment', description: \"The user's emotional state or attitude.\" },\n {\n label: 'Behavior',\n description:\n \"The entity's observable actions and patterns, including tool use, omissions, retries, failures, and recovery.\",\n },\n { label: 'Outcome', description: 'The final completed, unresolved, or blocked state.' },\n];\nconst signalLabels = signalDefinitions.map(signal => signal.label);\n\nconst traceRows = [\n ['chat.completion', '1.2s'],\n ['tool.search_docs', '340ms'],\n ['workflow.support', '2.8s'],\n];\n\nconst signalStyle = (label: string): CSSProperties => ({\n color: nodeColor(getSignalHue(label)),\n});\n\nconst PipelineConnector = () => (\n <div aria-hidden=\"true\" className=\"relative hidden h-full items-center lg:flex\">\n <div className=\"border-border1 w-full border-t border-dashed\" />\n <span className=\"signals-pipeline-connector bg-positive1 absolute left-1/2 size-2.5 -translate-x-1/2 rounded-full shadow-[0_0_12px_currentColor]\" />\n </div>\n);\n\nexport type SignalsEmptyStateProps = {\n actionSlot?: ReactNode;\n LinkComponent?: LinkComponent;\n};\n\nexport const SignalsEmptyState = ({ actionSlot, LinkComponent = 'a' }: SignalsEmptyStateProps) => {\n return (\n <section className=\"bg-surface1 min-h-full w-full p-6 md:px-10 lg:px-12 xl:px-[4.375rem]\">\n <div className=\"mx-auto w-full max-w-260\">\n <header>\n <h1 className=\"text-header-xl text-neutral6 font-medium tracking-tight\">\n Understand what drives every agent interaction\n </h1>\n </header>\n\n <div\n aria-label=\"Trace intelligence pipeline\"\n className=\"mt-14 grid gap-4 lg:grid-cols-[17.5rem_4.5rem_17.5rem_4.5rem_minmax(0,1fr)] lg:gap-0\"\n role=\"list\"\n >\n <article className=\"h-50 p-5\" role=\"listitem\">\n <h2 className=\"text-neutral6 text-lg font-semibold\">Traces</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">Every agent interaction</p>\n <p className=\"text-neutral2 mt-5 font-mono text-[0.5625rem] tracking-[0.24em] uppercase\">Input</p>\n <div className=\"mt-2.5 space-y-2\">\n {traceRows.map(([name, duration]) => (\n <div\n className=\"border-border1 bg-surface3 text-ui-xs flex items-center justify-between rounded border px-3 py-1.5 font-mono\"\n key={name}\n >\n <span className=\"text-neutral4\">{name}</span>\n <span className=\"text-neutral2\">{duration}</span>\n </div>\n ))}\n </div>\n </article>\n\n <PipelineConnector />\n\n <Card\n as=\"article\"\n className=\"flex h-50 flex-col items-center p-5 text-center\"\n elevation=\"elevated\"\n role=\"listitem\"\n >\n <h2 className=\"text-neutral6 text-lg font-semibold\">Mastra Engine</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">Clusters recurring patterns</p>\n <div aria-hidden=\"true\" className=\"relative mt-5 flex size-20 items-center justify-center\">\n <span className=\"signals-engine-pulse border-positive1/15 absolute size-20 rounded-full border\" />\n <span className=\"border-positive1/25 absolute size-14 rounded-full border\" />\n <span className=\"border-positive1/40 bg-positive1/5 absolute size-9 rounded-full border shadow-[0_0_24px_var(--color-positive1)]\" />\n <CpuIcon className=\"text-positive1 relative size-4\" />\n </div>\n <p className=\"text-ui-xs text-neutral2 mt-3 max-w-40 leading-4\">\n Finds relationships across conversations, tools, and workflows\n </p>\n </Card>\n\n <PipelineConnector />\n\n <article className=\"h-50 p-5\" role=\"listitem\">\n <h2 className=\"text-neutral6 text-lg font-semibold\">Trace signals</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">What your users actually do</p>\n <p className=\"text-neutral2 mt-5 font-mono text-[0.5625rem] tracking-[0.24em] uppercase\">Output</p>\n <div className=\"mt-3 flex flex-wrap gap-2\">\n {signalLabels.map(label => (\n <span\n className=\"signals-chip bg-surface3 inline-flex items-center gap-2 rounded border border-current/25 px-2.5 py-1.5 text-xs font-medium shadow-[0_0_14px_color-mix(in_oklch,currentColor_12%,transparent)]\"\n key={label}\n style={signalStyle(label)}\n >\n <span aria-hidden=\"true\" className=\"size-1.5 rounded-full bg-current shadow-[0_0_7px_currentColor]\" />\n {label}\n </span>\n ))}\n </div>\n </article>\n </div>\n\n <section className=\"mt-10\" aria-labelledby=\"signal-definitions-heading\">\n <h2 id=\"signal-definitions-heading\" className=\"text-neutral6 text-lg font-semibold\">\n What each trace signal means\n </h2>\n <div aria-label=\"Trace signal definitions\" className=\"mt-4 grid gap-3 sm:grid-cols-2\" role=\"list\">\n {signalDefinitions.map(signal => (\n <article className=\"px-1 py-2\" key={signal.label} role=\"listitem\">\n <h3 className=\"text-sm font-semibold\" style={signalStyle(signal.label)}>\n {signal.label}\n </h3>\n <p className=\"text-neutral3 mt-1.5 text-xs leading-5\">{signal.description}</p>\n </article>\n ))}\n </div>\n </section>\n\n <section className=\"mt-10\" aria-label=\"Trace signal relationship preview\">\n <p className=\"text-neutral2 font-mono text-[0.5625rem] tracking-[0.2em] uppercase\">\n Grouped trace relationships will appear after traces contain at least two trace signal types\n </p>\n <div aria-hidden=\"true\" className=\"mt-3 grid h-18 grid-cols-3 gap-5 opacity-35\">\n {[0, 1, 2].map(index => (\n <div className=\"border-border1 bg-surface2/30 rounded-md border border-dashed p-4\" key={index}>\n <div className=\"bg-neutral1 h-1.5 w-16 rounded-full\" />\n <div className=\"bg-neutral1/60 mt-3 h-1 w-full rounded-full\" />\n <div className=\"bg-neutral1/40 mt-2 h-1 w-2/3 rounded-full\" />\n </div>\n ))}\n </div>\n </section>\n\n <aside className=\"border-border1 bg-surface2 mt-9 flex min-h-16 flex-col gap-4 rounded-md border px-5 py-3.5 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex min-w-0 items-start gap-3 sm:items-center\">\n <span\n aria-hidden=\"true\"\n className=\"bg-warning1 mt-1.5 size-2 shrink-0 rounded-full shadow-[0_0_9px_currentColor] sm:mt-0\"\n />\n <p className=\"text-neutral3 text-xs leading-5\">\n <strong className=\"text-neutral5 font-semibold\">Waiting for traces.</strong> Trace intelligence activates\n automatically once your agents start receiving traffic.\n </p>\n </div>\n <div className=\"flex shrink-0 flex-wrap items-center gap-2\">\n {actionSlot}\n <Button\n as=\"a\"\n href=\"https://mastra.ai/en/docs/observability/tracing/overview\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n variant=\"outline\"\n size=\"sm\"\n >\n Read the docs\n </Button>\n <Button as={LinkComponent} href=\"/observability\" variant=\"primary\" size=\"sm\">\n View incoming traces\n </Button>\n </div>\n </aside>\n </div>\n </section>\n );\n};\n"],"names":["nodeColor","getSignalHue","jsxs","jsx","Card","CpuIcon","Button"],"mappings":";;;;;;;;;;;AAUA,MAAM,iBAAA,GAAoB;AAAA,EACxB,EAAE,KAAA,EAAO,MAAA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,SAAA,EAE9E;AAAA,OAAA,EACF,CAAA;AAAA,sBACAD,eAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,4CAAA,EACZ,QAAA,EAAA;AAAA,QAAA,UAAA;AAAA,wBACDC,cAAA;AAAA,UAACG,aAAA;AAAA,UAAA;AAAA,YACC,EAAA,EAAG,GAAA;AAAA,YACH,IAAA,EAAK,0DAAA;AAAA,YACL,MAAA,EAAO,QAAA;AAAA,YACP,GAAA,EAAI,qBAAA;AAAA,YACJ,OAAA,EAAQ,SAAA;AAAA,YACR,IAAA,EAAK,IAAA;AAAA,YACN,QAAA,EAAA;AAAA;AAAA,SAED;AAAA,wBACAH,cAAA,CAACG,aAAA,EAAA,EAAO,EAAA,EAAI,aAAA,EAAe,IAAA,EAAK,kBAAiB,OAAA,EAAQ,SAAA,EAAU,IAAA,EAAK,IAAA,EAAK,QAAA,EAAA,sBAAA,EAE7E;AAAA,OAAA,EACF;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"signals-empty-state.cjs.js","sources":["../../../../src/ee/signals/components/signals-empty-state.tsx"],"sourcesContent":["import type { TraceSignalName } from '@mastra/client-js';\nimport { CpuIcon } from 'lucide-react';\nimport type { CSSProperties, ReactNode } from 'react';\n\nimport './signals-empty-state.css';\nimport { Button } from '../../../ds/components/Button';\nimport { Card } from '../../../ds/components/Card';\nimport { nodeColor } from '../../../ds/components/SankeyChart/sankeyColor';\nimport type { LinkComponent } from '../../../ds/types/link-component';\nimport { getSignalHue } from '../signal-colors';\n\ntype SignalDefinition = {\n key: TraceSignalName;\n label: string;\n description: string;\n};\n\nconst signalDefinitions: SignalDefinition[] = [\n { key: 'goal', label: 'Goal', description: 'What the user is trying to achieve.' },\n { key: 'outcome', label: 'Outcome', description: 'Whether the interaction was completed, unresolved, or blocked.' },\n {\n key: 'behavior',\n label: 'Behavior',\n description:\n 'The observable actions and patterns in the trace, including tool use, retries, failures, and recovery.',\n },\n { key: 'sentiment', label: 'Sentiment', description: \"The user's emotional state or attitude.\" },\n];\nconst signalLabels = signalDefinitions.map(signal => signal.label);\n\nconst traceRows = [\n ['chat.completion', '1.2s'],\n ['tool.search_docs', '340ms'],\n ['workflow.support', '2.8s'],\n];\n\nconst signalStyle = (label: string): CSSProperties => ({\n color: nodeColor(getSignalHue(label)),\n});\n\nconst PipelineConnector = () => (\n <div aria-hidden=\"true\" className=\"relative hidden h-full items-center lg:flex\">\n <div className=\"border-border1 w-full border-t border-dashed\" />\n <span className=\"signals-pipeline-connector bg-positive1 absolute left-1/2 size-2.5 -translate-x-1/2 rounded-full shadow-[0_0_12px_currentColor]\" />\n </div>\n);\n\nexport type TraceIntelligenceProgress = {\n status: 'collecting' | 'processing' | 'ready';\n traceCount: number;\n signals: Record<TraceSignalName, { generated: number; embedded: number }>;\n availableSignals: TraceSignalName[];\n};\n\nexport type SignalsEmptyStateProps = {\n actionSlot?: ReactNode;\n LinkComponent?: LinkComponent;\n progress?: TraceIntelligenceProgress;\n isRangeEmpty?: boolean;\n};\n\nfunction formatNumber(value: number) {\n return new Intl.NumberFormat('en-US').format(value);\n}\n\nfunction statusCopy(progress?: TraceIntelligenceProgress, isRangeEmpty?: boolean) {\n if (isRangeEmpty) {\n return {\n title: 'No Trace Intelligence themes in this date range.',\n body: 'Choose a wider snapshot date range, or wait for newly processed traces to form recurring themes.',\n };\n }\n if (!progress || progress.status === 'collecting') {\n return {\n title: 'Collecting traces for Trace Intelligence.',\n body: 'Trace Intelligence starts grouping recurring patterns after your deployed agents send enough completed traces.',\n };\n }\n if (progress.status === 'ready') {\n return {\n title: 'Trace Intelligence themes are ready.',\n body: 'Select at least two available trace signal types to see how goals, outcomes, behaviors, and sentiment connect.',\n };\n }\n return {\n title: 'Analyzing traces for Trace Intelligence.',\n body: 'Trace signals have started processing. Themes appear after enough generated and embedded trace signals form recurring patterns.',\n };\n}\n\nfunction ProgressSummary({ progress }: { progress: TraceIntelligenceProgress }) {\n return (\n <dl className=\"mt-4 grid gap-2 sm:grid-cols-3\">\n <div className=\"border-border1 bg-surface3 rounded-md border px-3 py-2\">\n <dt className=\"text-neutral3 text-xs\">Traces analyzed</dt>\n <dd className=\"text-neutral6 mt-1 text-lg font-semibold\">{formatNumber(progress.traceCount)}</dd>\n </div>\n <div className=\"border-border1 bg-surface3 rounded-md border px-3 py-2\">\n <dt className=\"text-neutral3 text-xs\">Trace signal types ready</dt>\n <dd className=\"text-neutral6 mt-1 text-lg font-semibold\">{progress.availableSignals.length} of 4</dd>\n </div>\n <div className=\"border-border1 bg-surface3 rounded-md border px-3 py-2\">\n <dt className=\"text-neutral3 text-xs\">Status</dt>\n <dd className=\"text-neutral6 mt-1 text-lg font-semibold capitalize\">{progress.status}</dd>\n </div>\n </dl>\n );\n}\n\nfunction SignalProgressList({ progress }: { progress?: TraceIntelligenceProgress }) {\n if (!progress) return null;\n\n return (\n <ul aria-label=\"Trace signal processing progress\" className=\"mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-4\">\n {signalDefinitions.map(signal => {\n const value = progress.signals[signal.key];\n const isReady = progress.availableSignals.includes(signal.key);\n return (\n <li className=\"border-border1 bg-surface2 rounded-md border px-3 py-2\" key={signal.label}>\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"text-sm font-semibold\" style={signalStyle(signal.label)}>\n {signal.label}\n </span>\n <span className=\"text-neutral4 text-xs\">{isReady ? 'Themes ready' : 'Processing'}</span>\n </div>\n <p className=\"text-neutral3 mt-1 text-xs\">\n {formatNumber(value.generated)} generated · {formatNumber(value.embedded)} embedded\n </p>\n </li>\n );\n })}\n </ul>\n );\n}\n\nexport const SignalsEmptyState = ({\n actionSlot,\n LinkComponent = 'a',\n progress,\n isRangeEmpty,\n}: SignalsEmptyStateProps) => {\n const copy = statusCopy(progress, isRangeEmpty);\n\n return (\n <section className=\"bg-surface1 min-h-full w-full p-6 md:px-10 lg:px-12 xl:px-[4.375rem]\">\n <div className=\"mx-auto w-full max-w-260\">\n <header>\n <p className=\"text-neutral4 flex items-center gap-2 font-mono text-xs tracking-wider uppercase\">\n <span aria-hidden=\"true\" className=\"bg-accent1 size-2 rounded-full\" />\n Trace Intelligence\n </p>\n <h1 className=\"text-header-xl text-neutral6 mt-2 font-medium tracking-tight\">\n Understand what drives every agent interaction\n </h1>\n <p className=\"text-neutral3 mt-2 max-w-180 text-sm leading-5\">\n Trace Intelligence groups recurring goals, outcomes, behaviors, and sentiment across completed traces.\n </p>\n </header>\n\n <div\n role=\"list\"\n aria-label=\"Trace Intelligence analysis pipeline\"\n className=\"mt-14 grid gap-4 lg:grid-cols-[17.5rem_4.5rem_17.5rem_4.5rem_minmax(0,1fr)] lg:gap-0\"\n >\n <div role=\"listitem\" className=\"min-h-50 p-5\">\n <h2 className=\"text-neutral6 text-lg font-semibold\">Traces</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">Every agent interaction</p>\n <p className=\"text-neutral3 mt-5 font-mono text-[0.6875rem] tracking-[0.18em] uppercase\">Input</p>\n <div className=\"mt-2.5 space-y-2\">\n {traceRows.map(([name, duration]) => (\n <div\n className=\"border-border1 bg-surface3 text-ui-xs flex items-center justify-between rounded border px-3 py-1.5 font-mono\"\n key={name}\n >\n <span className=\"text-neutral4\">{name}</span>\n <span className=\"text-neutral3\">{duration}</span>\n </div>\n ))}\n </div>\n </div>\n\n <PipelineConnector />\n\n <Card\n as=\"div\"\n role=\"listitem\"\n className=\"flex min-h-50 flex-col items-center p-5 text-center\"\n elevation=\"elevated\"\n >\n <h2 className=\"text-neutral6 text-lg font-semibold\">Trace Intelligence</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">Finds recurring themes</p>\n <div aria-hidden=\"true\" className=\"relative mt-5 flex size-20 items-center justify-center\">\n <span className=\"signals-engine-pulse border-positive1/15 absolute size-20 rounded-full border\" />\n <span className=\"border-positive1/25 absolute size-14 rounded-full border\" />\n <span className=\"border-positive1/40 bg-positive1/5 absolute size-9 rounded-full border shadow-[0_0_24px_var(--color-positive1)]\" />\n <CpuIcon className=\"text-positive1 relative size-4\" />\n </div>\n <p className=\"text-ui-xs text-neutral3 mt-3 max-w-40 leading-4\">\n Clusters similar trace signals into themes for each dimension\n </p>\n </Card>\n\n <PipelineConnector />\n\n <div role=\"listitem\" className=\"min-h-50 p-5\">\n <h2 className=\"text-neutral6 text-lg font-semibold\">Theme analysis</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">How recurring patterns connect</p>\n <p className=\"text-neutral3 mt-5 font-mono text-[0.6875rem] tracking-[0.18em] uppercase\">Output</p>\n <div className=\"mt-3 flex flex-wrap gap-2\">\n {signalLabels.map(label => (\n <span\n className=\"signals-chip bg-surface3 inline-flex items-center gap-2 rounded border border-current/25 px-2.5 py-1.5 text-xs font-medium shadow-[0_0_14px_color-mix(in_oklch,currentColor_12%,transparent)]\"\n key={label}\n style={signalStyle(label)}\n >\n <span aria-hidden=\"true\" className=\"size-1.5 rounded-full bg-current shadow-[0_0_7px_currentColor]\" />\n {label}\n </span>\n ))}\n </div>\n </div>\n </div>\n\n <section className=\"mt-10\" aria-labelledby=\"signal-definitions-heading\">\n <h2 id=\"signal-definitions-heading\" className=\"text-neutral6 text-lg font-semibold\">\n What each trace signal means\n </h2>\n <ul aria-label=\"Trace signal definitions\" className=\"mt-4 grid gap-3 sm:grid-cols-2\">\n {signalDefinitions.map(signal => (\n <li className=\"px-1 py-2\" key={signal.label}>\n <h3 className=\"text-sm font-semibold\" style={signalStyle(signal.label)}>\n {signal.label}\n </h3>\n <p className=\"text-neutral3 mt-1.5 text-xs leading-5\">{signal.description}</p>\n </li>\n ))}\n </ul>\n </section>\n\n <aside className=\"border-border1 bg-surface2 mt-9 rounded-md border px-5 py-4\">\n <div className=\"flex min-w-0 items-start gap-3\">\n <span\n aria-hidden=\"true\"\n className=\"bg-warning1 mt-1.5 size-2 shrink-0 rounded-full shadow-[0_0_9px_currentColor]\"\n />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-neutral3 text-xs leading-5\">\n <strong className=\"text-neutral5 font-semibold\">{copy.title}</strong> {copy.body}\n </p>\n {progress ? <ProgressSummary progress={progress} /> : null}\n <SignalProgressList progress={progress} />\n </div>\n </div>\n <div className=\"mt-4 flex shrink-0 flex-wrap items-center gap-2 sm:justify-end\">\n {actionSlot}\n <Button\n as=\"a\"\n href=\"https://mastra.ai/en/docs/mastra-platform/trace-intelligence\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n variant=\"outline\"\n size=\"sm\"\n >\n Read the docs<span className=\"sr-only\"> (opens in new tab)</span>\n </Button>\n <Button as={LinkComponent} href=\"/observability\" variant=\"primary\" size=\"sm\">\n View incoming traces\n </Button>\n </div>\n </aside>\n </div>\n </section>\n );\n};\n"],"names":["nodeColor","getSignalHue","jsxs","jsx","Card","CpuIcon","Button"],"mappings":";;;;;;;;;;;AAiBA,MAAM,iBAAA,GAAwC;AAAA,EAC5C,EAAE,GAAA,EAAK,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAQ,aAAa,qCAAA,EAAsC;AAAA,EACjF,EAAE,GAAA,EAAK,SAAA,EAAW,KAAA,EAAO,SAAA,EAAW,aAAa,gEAAA,EAAiE;AAAA,EAClH;AAAA,IACE,GAAA,EAAK,UAAA;AAAA,IACL,KAAA,EAAO,UAAA;AAAA,IACP,WAAA,EACE;AAAA,GACJ;AAAA,EACA,EAAE,GAAA,EAAK,WAAA,EAAa,KAAA,EAAO,WAAA,EAAa,aAAa,yCAAA;AACvD,CAAA;AACA,MAAM,YAAA,GAAe,iBAAA,CAAkB,GAAA,CAAI,CAAA,MAAA,KAAU,OAAO,KAAK,CAAA;AAEjE,MAAM,SAAA,GAAY;AAAA,EAChB,CAAC,mBAAmB,MAAM,CAAA;AAAA,EAC1B,CAAC,oBAAoB,OAAO,CAAA;AAAA,EAC5B,CAAC,oBAAoB,MAAM;AAC7B,CAAA;AAEA,MAAM,WAAA,GAAc,CAAC,KAAA,MAAkC;AAAA,EACrD,KAAA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CAAA;AAAA,sBACAD,eAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,gEAAA,EACZ,QAAA,EAAA;AAAA,QAAA,UAAA;AAAA,wBACDA,eAAA;AAAA,UAACI,aAAA;AAAA,UAAA;AAAA,YACC,EAAA,EAAG,GAAA;AAAA,YACH,IAAA,EAAK,8DAAA;AAAA,YACL,MAAA,EAAO,QAAA;AAAA,YACP,GAAA,EAAI,qBAAA;AAAA,YACJ,OAAA,EAAQ,SAAA;AAAA,YACR,IAAA,EAAK,IAAA;AAAA,YACN,QAAA,EAAA;AAAA,cAAA,eAAA;AAAA,8BACcH,cAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,SAAA,EAAU,QAAA,EAAA,qBAAA,EAAmB;AAAA;AAAA;AAAA,SAC5D;AAAA,wBACAA,cAAA,CAACG,aAAA,EAAA,EAAO,EAAA,EAAI,aAAA,EAAe,IAAA,EAAK,kBAAiB,OAAA,EAAQ,SAAA,EAAU,IAAA,EAAK,IAAA,EAAK,QAAA,EAAA,sBAAA,EAE7E;AAAA,OAAA,EACF;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -6,13 +6,14 @@ import { n as nodeColor } from '../../../sankeyColor-CQ5nkgtL.js';
|
|
|
6
6
|
import { getSignalHue } from '../signal-colors.es.js';
|
|
7
7
|
|
|
8
8
|
import '../../../signals-empty-state.css';const signalDefinitions = [
|
|
9
|
-
{ label: "Goal", description: "What the user is trying to achieve
|
|
10
|
-
{ label: "
|
|
9
|
+
{ key: "goal", label: "Goal", description: "What the user is trying to achieve." },
|
|
10
|
+
{ key: "outcome", label: "Outcome", description: "Whether the interaction was completed, unresolved, or blocked." },
|
|
11
11
|
{
|
|
12
|
+
key: "behavior",
|
|
12
13
|
label: "Behavior",
|
|
13
|
-
description: "The
|
|
14
|
+
description: "The observable actions and patterns in the trace, including tool use, retries, failures, and recovery."
|
|
14
15
|
},
|
|
15
|
-
{ label: "
|
|
16
|
+
{ key: "sentiment", label: "Sentiment", description: "The user's emotional state or attitude." }
|
|
16
17
|
];
|
|
17
18
|
const signalLabels = signalDefinitions.map((signal) => signal.label);
|
|
18
19
|
const traceRows = [
|
|
@@ -27,27 +28,105 @@ const PipelineConnector = () => /* @__PURE__ */ jsxs("div", { "aria-hidden": "tr
|
|
|
27
28
|
/* @__PURE__ */ jsx("div", { className: "border-border1 w-full border-t border-dashed" }),
|
|
28
29
|
/* @__PURE__ */ jsx("span", { className: "signals-pipeline-connector bg-positive1 absolute left-1/2 size-2.5 -translate-x-1/2 rounded-full shadow-[0_0_12px_currentColor]" })
|
|
29
30
|
] });
|
|
30
|
-
|
|
31
|
+
function formatNumber(value) {
|
|
32
|
+
return new Intl.NumberFormat("en-US").format(value);
|
|
33
|
+
}
|
|
34
|
+
function statusCopy(progress, isRangeEmpty) {
|
|
35
|
+
if (isRangeEmpty) {
|
|
36
|
+
return {
|
|
37
|
+
title: "No Trace Intelligence themes in this date range.",
|
|
38
|
+
body: "Choose a wider snapshot date range, or wait for newly processed traces to form recurring themes."
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (!progress || progress.status === "collecting") {
|
|
42
|
+
return {
|
|
43
|
+
title: "Collecting traces for Trace Intelligence.",
|
|
44
|
+
body: "Trace Intelligence starts grouping recurring patterns after your deployed agents send enough completed traces."
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
if (progress.status === "ready") {
|
|
48
|
+
return {
|
|
49
|
+
title: "Trace Intelligence themes are ready.",
|
|
50
|
+
body: "Select at least two available trace signal types to see how goals, outcomes, behaviors, and sentiment connect."
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
title: "Analyzing traces for Trace Intelligence.",
|
|
55
|
+
body: "Trace signals have started processing. Themes appear after enough generated and embedded trace signals form recurring patterns."
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function ProgressSummary({ progress }) {
|
|
59
|
+
return /* @__PURE__ */ jsxs("dl", { className: "mt-4 grid gap-2 sm:grid-cols-3", children: [
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: "border-border1 bg-surface3 rounded-md border px-3 py-2", children: [
|
|
61
|
+
/* @__PURE__ */ jsx("dt", { className: "text-neutral3 text-xs", children: "Traces analyzed" }),
|
|
62
|
+
/* @__PURE__ */ jsx("dd", { className: "text-neutral6 mt-1 text-lg font-semibold", children: formatNumber(progress.traceCount) })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ jsxs("div", { className: "border-border1 bg-surface3 rounded-md border px-3 py-2", children: [
|
|
65
|
+
/* @__PURE__ */ jsx("dt", { className: "text-neutral3 text-xs", children: "Trace signal types ready" }),
|
|
66
|
+
/* @__PURE__ */ jsxs("dd", { className: "text-neutral6 mt-1 text-lg font-semibold", children: [
|
|
67
|
+
progress.availableSignals.length,
|
|
68
|
+
" of 4"
|
|
69
|
+
] })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { className: "border-border1 bg-surface3 rounded-md border px-3 py-2", children: [
|
|
72
|
+
/* @__PURE__ */ jsx("dt", { className: "text-neutral3 text-xs", children: "Status" }),
|
|
73
|
+
/* @__PURE__ */ jsx("dd", { className: "text-neutral6 mt-1 text-lg font-semibold capitalize", children: progress.status })
|
|
74
|
+
] })
|
|
75
|
+
] });
|
|
76
|
+
}
|
|
77
|
+
function SignalProgressList({ progress }) {
|
|
78
|
+
if (!progress) return null;
|
|
79
|
+
return /* @__PURE__ */ jsx("ul", { "aria-label": "Trace signal processing progress", className: "mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-4", children: signalDefinitions.map((signal) => {
|
|
80
|
+
const value = progress.signals[signal.key];
|
|
81
|
+
const isReady = progress.availableSignals.includes(signal.key);
|
|
82
|
+
return /* @__PURE__ */ jsxs("li", { className: "border-border1 bg-surface2 rounded-md border px-3 py-2", children: [
|
|
83
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
84
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold", style: signalStyle(signal.label), children: signal.label }),
|
|
85
|
+
/* @__PURE__ */ jsx("span", { className: "text-neutral4 text-xs", children: isReady ? "Themes ready" : "Processing" })
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ jsxs("p", { className: "text-neutral3 mt-1 text-xs", children: [
|
|
88
|
+
formatNumber(value.generated),
|
|
89
|
+
" generated · ",
|
|
90
|
+
formatNumber(value.embedded),
|
|
91
|
+
" embedded"
|
|
92
|
+
] })
|
|
93
|
+
] }, signal.label);
|
|
94
|
+
}) });
|
|
95
|
+
}
|
|
96
|
+
const SignalsEmptyState = ({
|
|
97
|
+
actionSlot,
|
|
98
|
+
LinkComponent = "a",
|
|
99
|
+
progress,
|
|
100
|
+
isRangeEmpty
|
|
101
|
+
}) => {
|
|
102
|
+
const copy = statusCopy(progress, isRangeEmpty);
|
|
31
103
|
return /* @__PURE__ */ jsx("section", { className: "bg-surface1 min-h-full w-full p-6 md:px-10 lg:px-12 xl:px-[4.375rem]", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-260", children: [
|
|
32
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ jsxs("header", { children: [
|
|
105
|
+
/* @__PURE__ */ jsxs("p", { className: "text-neutral4 flex items-center gap-2 font-mono text-xs tracking-wider uppercase", children: [
|
|
106
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "bg-accent1 size-2 rounded-full" }),
|
|
107
|
+
"Trace Intelligence"
|
|
108
|
+
] }),
|
|
109
|
+
/* @__PURE__ */ jsx("h1", { className: "text-header-xl text-neutral6 mt-2 font-medium tracking-tight", children: "Understand what drives every agent interaction" }),
|
|
110
|
+
/* @__PURE__ */ jsx("p", { className: "text-neutral3 mt-2 max-w-180 text-sm leading-5", children: "Trace Intelligence groups recurring goals, outcomes, behaviors, and sentiment across completed traces." })
|
|
111
|
+
] }),
|
|
33
112
|
/* @__PURE__ */ jsxs(
|
|
34
113
|
"div",
|
|
35
114
|
{
|
|
36
|
-
"aria-label": "Trace intelligence pipeline",
|
|
37
|
-
className: "mt-14 grid gap-4 lg:grid-cols-[17.5rem_4.5rem_17.5rem_4.5rem_minmax(0,1fr)] lg:gap-0",
|
|
38
115
|
role: "list",
|
|
116
|
+
"aria-label": "Trace Intelligence analysis pipeline",
|
|
117
|
+
className: "mt-14 grid gap-4 lg:grid-cols-[17.5rem_4.5rem_17.5rem_4.5rem_minmax(0,1fr)] lg:gap-0",
|
|
39
118
|
children: [
|
|
40
|
-
/* @__PURE__ */ jsxs("
|
|
119
|
+
/* @__PURE__ */ jsxs("div", { role: "listitem", className: "min-h-50 p-5", children: [
|
|
41
120
|
/* @__PURE__ */ jsx("h2", { className: "text-neutral6 text-lg font-semibold", children: "Traces" }),
|
|
42
121
|
/* @__PURE__ */ jsx("p", { className: "text-neutral3 mt-0.5 text-xs", children: "Every agent interaction" }),
|
|
43
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
122
|
+
/* @__PURE__ */ jsx("p", { className: "text-neutral3 mt-5 font-mono text-[0.6875rem] tracking-[0.18em] uppercase", children: "Input" }),
|
|
44
123
|
/* @__PURE__ */ jsx("div", { className: "mt-2.5 space-y-2", children: traceRows.map(([name, duration]) => /* @__PURE__ */ jsxs(
|
|
45
124
|
"div",
|
|
46
125
|
{
|
|
47
126
|
className: "border-border1 bg-surface3 text-ui-xs flex items-center justify-between rounded border px-3 py-1.5 font-mono",
|
|
48
127
|
children: [
|
|
49
128
|
/* @__PURE__ */ jsx("span", { className: "text-neutral4", children: name }),
|
|
50
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
129
|
+
/* @__PURE__ */ jsx("span", { className: "text-neutral3", children: duration })
|
|
51
130
|
]
|
|
52
131
|
},
|
|
53
132
|
name
|
|
@@ -57,28 +136,28 @@ const SignalsEmptyState = ({ actionSlot, LinkComponent = "a" }) => {
|
|
|
57
136
|
/* @__PURE__ */ jsxs(
|
|
58
137
|
Card,
|
|
59
138
|
{
|
|
60
|
-
as: "
|
|
61
|
-
className: "flex h-50 flex-col items-center p-5 text-center",
|
|
62
|
-
elevation: "elevated",
|
|
139
|
+
as: "div",
|
|
63
140
|
role: "listitem",
|
|
141
|
+
className: "flex min-h-50 flex-col items-center p-5 text-center",
|
|
142
|
+
elevation: "elevated",
|
|
64
143
|
children: [
|
|
65
|
-
/* @__PURE__ */ jsx("h2", { className: "text-neutral6 text-lg font-semibold", children: "
|
|
66
|
-
/* @__PURE__ */ jsx("p", { className: "text-neutral3 mt-0.5 text-xs", children: "
|
|
144
|
+
/* @__PURE__ */ jsx("h2", { className: "text-neutral6 text-lg font-semibold", children: "Trace Intelligence" }),
|
|
145
|
+
/* @__PURE__ */ jsx("p", { className: "text-neutral3 mt-0.5 text-xs", children: "Finds recurring themes" }),
|
|
67
146
|
/* @__PURE__ */ jsxs("div", { "aria-hidden": "true", className: "relative mt-5 flex size-20 items-center justify-center", children: [
|
|
68
147
|
/* @__PURE__ */ jsx("span", { className: "signals-engine-pulse border-positive1/15 absolute size-20 rounded-full border" }),
|
|
69
148
|
/* @__PURE__ */ jsx("span", { className: "border-positive1/25 absolute size-14 rounded-full border" }),
|
|
70
149
|
/* @__PURE__ */ jsx("span", { className: "border-positive1/40 bg-positive1/5 absolute size-9 rounded-full border shadow-[0_0_24px_var(--color-positive1)]" }),
|
|
71
150
|
/* @__PURE__ */ jsx(CpuIcon, { className: "text-positive1 relative size-4" })
|
|
72
151
|
] }),
|
|
73
|
-
/* @__PURE__ */ jsx("p", { className: "text-ui-xs text-
|
|
152
|
+
/* @__PURE__ */ jsx("p", { className: "text-ui-xs text-neutral3 mt-3 max-w-40 leading-4", children: "Clusters similar trace signals into themes for each dimension" })
|
|
74
153
|
]
|
|
75
154
|
}
|
|
76
155
|
),
|
|
77
156
|
/* @__PURE__ */ jsx(PipelineConnector, {}),
|
|
78
|
-
/* @__PURE__ */ jsxs("
|
|
79
|
-
/* @__PURE__ */ jsx("h2", { className: "text-neutral6 text-lg font-semibold", children: "
|
|
80
|
-
/* @__PURE__ */ jsx("p", { className: "text-neutral3 mt-0.5 text-xs", children: "
|
|
81
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
157
|
+
/* @__PURE__ */ jsxs("div", { role: "listitem", className: "min-h-50 p-5", children: [
|
|
158
|
+
/* @__PURE__ */ jsx("h2", { className: "text-neutral6 text-lg font-semibold", children: "Theme analysis" }),
|
|
159
|
+
/* @__PURE__ */ jsx("p", { className: "text-neutral3 mt-0.5 text-xs", children: "How recurring patterns connect" }),
|
|
160
|
+
/* @__PURE__ */ jsx("p", { className: "text-neutral3 mt-5 font-mono text-[0.6875rem] tracking-[0.18em] uppercase", children: "Output" }),
|
|
82
161
|
/* @__PURE__ */ jsx("div", { className: "mt-3 flex flex-wrap gap-2", children: signalLabels.map((label) => /* @__PURE__ */ jsxs(
|
|
83
162
|
"span",
|
|
84
163
|
{
|
|
@@ -97,45 +176,45 @@ const SignalsEmptyState = ({ actionSlot, LinkComponent = "a" }) => {
|
|
|
97
176
|
),
|
|
98
177
|
/* @__PURE__ */ jsxs("section", { className: "mt-10", "aria-labelledby": "signal-definitions-heading", children: [
|
|
99
178
|
/* @__PURE__ */ jsx("h2", { id: "signal-definitions-heading", className: "text-neutral6 text-lg font-semibold", children: "What each trace signal means" }),
|
|
100
|
-
/* @__PURE__ */ jsx("
|
|
179
|
+
/* @__PURE__ */ jsx("ul", { "aria-label": "Trace signal definitions", className: "mt-4 grid gap-3 sm:grid-cols-2", children: signalDefinitions.map((signal) => /* @__PURE__ */ jsxs("li", { className: "px-1 py-2", children: [
|
|
101
180
|
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold", style: signalStyle(signal.label), children: signal.label }),
|
|
102
181
|
/* @__PURE__ */ jsx("p", { className: "text-neutral3 mt-1.5 text-xs leading-5", children: signal.description })
|
|
103
182
|
] }, signal.label)) })
|
|
104
183
|
] }),
|
|
105
|
-
/* @__PURE__ */ jsxs("
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "mt-3 grid h-18 grid-cols-3 gap-5 opacity-35", children: [0, 1, 2].map((index) => /* @__PURE__ */ jsxs("div", { className: "border-border1 bg-surface2/30 rounded-md border border-dashed p-4", children: [
|
|
108
|
-
/* @__PURE__ */ jsx("div", { className: "bg-neutral1 h-1.5 w-16 rounded-full" }),
|
|
109
|
-
/* @__PURE__ */ jsx("div", { className: "bg-neutral1/60 mt-3 h-1 w-full rounded-full" }),
|
|
110
|
-
/* @__PURE__ */ jsx("div", { className: "bg-neutral1/40 mt-2 h-1 w-2/3 rounded-full" })
|
|
111
|
-
] }, index)) })
|
|
112
|
-
] }),
|
|
113
|
-
/* @__PURE__ */ jsxs("aside", { className: "border-border1 bg-surface2 mt-9 flex min-h-16 flex-col gap-4 rounded-md border px-5 py-3.5 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
114
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-start gap-3 sm:items-center", children: [
|
|
184
|
+
/* @__PURE__ */ jsxs("aside", { className: "border-border1 bg-surface2 mt-9 rounded-md border px-5 py-4", children: [
|
|
185
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-start gap-3", children: [
|
|
115
186
|
/* @__PURE__ */ jsx(
|
|
116
187
|
"span",
|
|
117
188
|
{
|
|
118
189
|
"aria-hidden": "true",
|
|
119
|
-
className: "bg-warning1 mt-1.5 size-2 shrink-0 rounded-full shadow-[0_0_9px_currentColor]
|
|
190
|
+
className: "bg-warning1 mt-1.5 size-2 shrink-0 rounded-full shadow-[0_0_9px_currentColor]"
|
|
120
191
|
}
|
|
121
192
|
),
|
|
122
|
-
/* @__PURE__ */ jsxs("
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
|
|
193
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
194
|
+
/* @__PURE__ */ jsxs("p", { className: "text-neutral3 text-xs leading-5", children: [
|
|
195
|
+
/* @__PURE__ */ jsx("strong", { className: "text-neutral5 font-semibold", children: copy.title }),
|
|
196
|
+
" ",
|
|
197
|
+
copy.body
|
|
198
|
+
] }),
|
|
199
|
+
progress ? /* @__PURE__ */ jsx(ProgressSummary, { progress }) : null,
|
|
200
|
+
/* @__PURE__ */ jsx(SignalProgressList, { progress })
|
|
125
201
|
] })
|
|
126
202
|
] }),
|
|
127
|
-
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: [
|
|
203
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-4 flex shrink-0 flex-wrap items-center gap-2 sm:justify-end", children: [
|
|
128
204
|
actionSlot,
|
|
129
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ jsxs(
|
|
130
206
|
Button,
|
|
131
207
|
{
|
|
132
208
|
as: "a",
|
|
133
|
-
href: "https://mastra.ai/en/docs/
|
|
209
|
+
href: "https://mastra.ai/en/docs/mastra-platform/trace-intelligence",
|
|
134
210
|
target: "_blank",
|
|
135
211
|
rel: "noopener noreferrer",
|
|
136
212
|
variant: "outline",
|
|
137
213
|
size: "sm",
|
|
138
|
-
children:
|
|
214
|
+
children: [
|
|
215
|
+
"Read the docs",
|
|
216
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: " (opens in new tab)" })
|
|
217
|
+
]
|
|
139
218
|
}
|
|
140
219
|
),
|
|
141
220
|
/* @__PURE__ */ jsx(Button, { as: LinkComponent, href: "/observability", variant: "primary", size: "sm", children: "View incoming traces" })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals-empty-state.es.js","sources":["../../../../src/ee/signals/components/signals-empty-state.tsx"],"sourcesContent":["import { CpuIcon } from 'lucide-react';\nimport type { CSSProperties, ReactNode } from 'react';\n\nimport './signals-empty-state.css';\nimport { Button } from '../../../ds/components/Button';\nimport { Card } from '../../../ds/components/Card';\nimport { nodeColor } from '../../../ds/components/SankeyChart/sankeyColor';\nimport type { LinkComponent } from '../../../ds/types/link-component';\nimport { getSignalHue } from '../signal-colors';\n\nconst signalDefinitions = [\n { label: 'Goal', description: 'What the user is trying to achieve or have completed.' },\n { label: 'Sentiment', description: \"The user's emotional state or attitude.\" },\n {\n label: 'Behavior',\n description:\n \"The entity's observable actions and patterns, including tool use, omissions, retries, failures, and recovery.\",\n },\n { label: 'Outcome', description: 'The final completed, unresolved, or blocked state.' },\n];\nconst signalLabels = signalDefinitions.map(signal => signal.label);\n\nconst traceRows = [\n ['chat.completion', '1.2s'],\n ['tool.search_docs', '340ms'],\n ['workflow.support', '2.8s'],\n];\n\nconst signalStyle = (label: string): CSSProperties => ({\n color: nodeColor(getSignalHue(label)),\n});\n\nconst PipelineConnector = () => (\n <div aria-hidden=\"true\" className=\"relative hidden h-full items-center lg:flex\">\n <div className=\"border-border1 w-full border-t border-dashed\" />\n <span className=\"signals-pipeline-connector bg-positive1 absolute left-1/2 size-2.5 -translate-x-1/2 rounded-full shadow-[0_0_12px_currentColor]\" />\n </div>\n);\n\nexport type SignalsEmptyStateProps = {\n actionSlot?: ReactNode;\n LinkComponent?: LinkComponent;\n};\n\nexport const SignalsEmptyState = ({ actionSlot, LinkComponent = 'a' }: SignalsEmptyStateProps) => {\n return (\n <section className=\"bg-surface1 min-h-full w-full p-6 md:px-10 lg:px-12 xl:px-[4.375rem]\">\n <div className=\"mx-auto w-full max-w-260\">\n <header>\n <h1 className=\"text-header-xl text-neutral6 font-medium tracking-tight\">\n Understand what drives every agent interaction\n </h1>\n </header>\n\n <div\n aria-label=\"Trace intelligence pipeline\"\n className=\"mt-14 grid gap-4 lg:grid-cols-[17.5rem_4.5rem_17.5rem_4.5rem_minmax(0,1fr)] lg:gap-0\"\n role=\"list\"\n >\n <article className=\"h-50 p-5\" role=\"listitem\">\n <h2 className=\"text-neutral6 text-lg font-semibold\">Traces</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">Every agent interaction</p>\n <p className=\"text-neutral2 mt-5 font-mono text-[0.5625rem] tracking-[0.24em] uppercase\">Input</p>\n <div className=\"mt-2.5 space-y-2\">\n {traceRows.map(([name, duration]) => (\n <div\n className=\"border-border1 bg-surface3 text-ui-xs flex items-center justify-between rounded border px-3 py-1.5 font-mono\"\n key={name}\n >\n <span className=\"text-neutral4\">{name}</span>\n <span className=\"text-neutral2\">{duration}</span>\n </div>\n ))}\n </div>\n </article>\n\n <PipelineConnector />\n\n <Card\n as=\"article\"\n className=\"flex h-50 flex-col items-center p-5 text-center\"\n elevation=\"elevated\"\n role=\"listitem\"\n >\n <h2 className=\"text-neutral6 text-lg font-semibold\">Mastra Engine</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">Clusters recurring patterns</p>\n <div aria-hidden=\"true\" className=\"relative mt-5 flex size-20 items-center justify-center\">\n <span className=\"signals-engine-pulse border-positive1/15 absolute size-20 rounded-full border\" />\n <span className=\"border-positive1/25 absolute size-14 rounded-full border\" />\n <span className=\"border-positive1/40 bg-positive1/5 absolute size-9 rounded-full border shadow-[0_0_24px_var(--color-positive1)]\" />\n <CpuIcon className=\"text-positive1 relative size-4\" />\n </div>\n <p className=\"text-ui-xs text-neutral2 mt-3 max-w-40 leading-4\">\n Finds relationships across conversations, tools, and workflows\n </p>\n </Card>\n\n <PipelineConnector />\n\n <article className=\"h-50 p-5\" role=\"listitem\">\n <h2 className=\"text-neutral6 text-lg font-semibold\">Trace signals</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">What your users actually do</p>\n <p className=\"text-neutral2 mt-5 font-mono text-[0.5625rem] tracking-[0.24em] uppercase\">Output</p>\n <div className=\"mt-3 flex flex-wrap gap-2\">\n {signalLabels.map(label => (\n <span\n className=\"signals-chip bg-surface3 inline-flex items-center gap-2 rounded border border-current/25 px-2.5 py-1.5 text-xs font-medium shadow-[0_0_14px_color-mix(in_oklch,currentColor_12%,transparent)]\"\n key={label}\n style={signalStyle(label)}\n >\n <span aria-hidden=\"true\" className=\"size-1.5 rounded-full bg-current shadow-[0_0_7px_currentColor]\" />\n {label}\n </span>\n ))}\n </div>\n </article>\n </div>\n\n <section className=\"mt-10\" aria-labelledby=\"signal-definitions-heading\">\n <h2 id=\"signal-definitions-heading\" className=\"text-neutral6 text-lg font-semibold\">\n What each trace signal means\n </h2>\n <div aria-label=\"Trace signal definitions\" className=\"mt-4 grid gap-3 sm:grid-cols-2\" role=\"list\">\n {signalDefinitions.map(signal => (\n <article className=\"px-1 py-2\" key={signal.label} role=\"listitem\">\n <h3 className=\"text-sm font-semibold\" style={signalStyle(signal.label)}>\n {signal.label}\n </h3>\n <p className=\"text-neutral3 mt-1.5 text-xs leading-5\">{signal.description}</p>\n </article>\n ))}\n </div>\n </section>\n\n <section className=\"mt-10\" aria-label=\"Trace signal relationship preview\">\n <p className=\"text-neutral2 font-mono text-[0.5625rem] tracking-[0.2em] uppercase\">\n Grouped trace relationships will appear after traces contain at least two trace signal types\n </p>\n <div aria-hidden=\"true\" className=\"mt-3 grid h-18 grid-cols-3 gap-5 opacity-35\">\n {[0, 1, 2].map(index => (\n <div className=\"border-border1 bg-surface2/30 rounded-md border border-dashed p-4\" key={index}>\n <div className=\"bg-neutral1 h-1.5 w-16 rounded-full\" />\n <div className=\"bg-neutral1/60 mt-3 h-1 w-full rounded-full\" />\n <div className=\"bg-neutral1/40 mt-2 h-1 w-2/3 rounded-full\" />\n </div>\n ))}\n </div>\n </section>\n\n <aside className=\"border-border1 bg-surface2 mt-9 flex min-h-16 flex-col gap-4 rounded-md border px-5 py-3.5 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex min-w-0 items-start gap-3 sm:items-center\">\n <span\n aria-hidden=\"true\"\n className=\"bg-warning1 mt-1.5 size-2 shrink-0 rounded-full shadow-[0_0_9px_currentColor] sm:mt-0\"\n />\n <p className=\"text-neutral3 text-xs leading-5\">\n <strong className=\"text-neutral5 font-semibold\">Waiting for traces.</strong> Trace intelligence activates\n automatically once your agents start receiving traffic.\n </p>\n </div>\n <div className=\"flex shrink-0 flex-wrap items-center gap-2\">\n {actionSlot}\n <Button\n as=\"a\"\n href=\"https://mastra.ai/en/docs/observability/tracing/overview\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n variant=\"outline\"\n size=\"sm\"\n >\n Read the docs\n </Button>\n <Button as={LinkComponent} href=\"/observability\" variant=\"primary\" size=\"sm\">\n View incoming traces\n </Button>\n </div>\n </aside>\n </div>\n </section>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAUA,MAAM,iBAAA,GAAoB;AAAA,EACxB,EAAE,KAAA,EAAO,MAAA,EAAQ,WAAA,EAAa,uDAAA,EAAwD;AAAA,EACtF,EAAE,KAAA,EAAO,WAAA,EAAa,WAAA,EAAa,yCAAA,EAA0C;AAAA,EAC7E;AAAA,IACE,KAAA,EAAO,UAAA;AAAA,IACP,WAAA,EACE;AAAA,GACJ;AAAA,EACA,EAAE,KAAA,EAAO,SAAA,EAAW,WAAA,EAAa,oDAAA;AACnC,CAAA;AACA,MAAM,YAAA,GAAe,iBAAA,CAAkB,GAAA,CAAI,CAAA,MAAA,KAAU,OAAO,KAAK,CAAA;AAEjE,MAAM,SAAA,GAAY;AAAA,EAChB,CAAC,mBAAmB,MAAM,CAAA;AAAA,EAC1B,CAAC,oBAAoB,OAAO,CAAA;AAAA,EAC5B,CAAC,oBAAoB,MAAM;AAC7B,CAAA;AAEA,MAAM,WAAA,GAAc,CAAC,KAAA,MAAkC;AAAA,EACrD,KAAA,EAAO,SAAA,CAAU,YAAA,CAAa,KAAK,CAAC;AACtC,CAAA,CAAA;AAEA,MAAM,oBAAoB,sBACxB,IAAA,CAAC,SAAI,aAAA,EAAY,MAAA,EAAO,WAAU,6CAAA,EAChC,QAAA,EAAA;AAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,WAAU,8CAAA,EAA+C,CAAA;AAAA,kBAC9D,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,iIAAA,E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AA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAY,MAAA;AAAA,YACZ,SAAA,EAAU;AAAA;AAAA,SACZ;AAAA,wBACA,IAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,iCAAA,EACX,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,QAAA,EAAA,EAAO,SAAA,EAAU,6BAAA,EAA8B,QAAA,EAAA,qBAAA,EAAmB,CAAA;AAAA,UAAS;AAAA,SAAA,EAE9E;AAAA,OAAA,EACF,CAAA;AAAA,sBACA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,4CAAA,EACZ,QAAA,EAAA;AAAA,QAAA,UAAA;AAAA,wBACD,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,EAAA,EAAG,GAAA;AAAA,YACH,IAAA,EAAK,0DAAA;AAAA,YACL,MAAA,EAAO,QAAA;AAAA,YACP,GAAA,EAAI,qBAAA;AAAA,YACJ,OAAA,EAAQ,SAAA;AAAA,YACR,IAAA,EAAK,IAAA;AAAA,YACN,QAAA,EAAA;AAAA;AAAA,SAED;AAAA,wBACA,GAAA,CAAC,MAAA,EAAA,EAAO,EAAA,EAAI,aAAA,EAAe,IAAA,EAAK,kBAAiB,OAAA,EAAQ,SAAA,EAAU,IAAA,EAAK,IAAA,EAAK,QAAA,EAAA,sBAAA,EAE7E;AAAA,OAAA,EACF;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"signals-empty-state.es.js","sources":["../../../../src/ee/signals/components/signals-empty-state.tsx"],"sourcesContent":["import type { TraceSignalName } from '@mastra/client-js';\nimport { CpuIcon } from 'lucide-react';\nimport type { CSSProperties, ReactNode } from 'react';\n\nimport './signals-empty-state.css';\nimport { Button } from '../../../ds/components/Button';\nimport { Card } from '../../../ds/components/Card';\nimport { nodeColor } from '../../../ds/components/SankeyChart/sankeyColor';\nimport type { LinkComponent } from '../../../ds/types/link-component';\nimport { getSignalHue } from '../signal-colors';\n\ntype SignalDefinition = {\n key: TraceSignalName;\n label: string;\n description: string;\n};\n\nconst signalDefinitions: SignalDefinition[] = [\n { key: 'goal', label: 'Goal', description: 'What the user is trying to achieve.' },\n { key: 'outcome', label: 'Outcome', description: 'Whether the interaction was completed, unresolved, or blocked.' },\n {\n key: 'behavior',\n label: 'Behavior',\n description:\n 'The observable actions and patterns in the trace, including tool use, retries, failures, and recovery.',\n },\n { key: 'sentiment', label: 'Sentiment', description: \"The user's emotional state or attitude.\" },\n];\nconst signalLabels = signalDefinitions.map(signal => signal.label);\n\nconst traceRows = [\n ['chat.completion', '1.2s'],\n ['tool.search_docs', '340ms'],\n ['workflow.support', '2.8s'],\n];\n\nconst signalStyle = (label: string): CSSProperties => ({\n color: nodeColor(getSignalHue(label)),\n});\n\nconst PipelineConnector = () => (\n <div aria-hidden=\"true\" className=\"relative hidden h-full items-center lg:flex\">\n <div className=\"border-border1 w-full border-t border-dashed\" />\n <span className=\"signals-pipeline-connector bg-positive1 absolute left-1/2 size-2.5 -translate-x-1/2 rounded-full shadow-[0_0_12px_currentColor]\" />\n </div>\n);\n\nexport type TraceIntelligenceProgress = {\n status: 'collecting' | 'processing' | 'ready';\n traceCount: number;\n signals: Record<TraceSignalName, { generated: number; embedded: number }>;\n availableSignals: TraceSignalName[];\n};\n\nexport type SignalsEmptyStateProps = {\n actionSlot?: ReactNode;\n LinkComponent?: LinkComponent;\n progress?: TraceIntelligenceProgress;\n isRangeEmpty?: boolean;\n};\n\nfunction formatNumber(value: number) {\n return new Intl.NumberFormat('en-US').format(value);\n}\n\nfunction statusCopy(progress?: TraceIntelligenceProgress, isRangeEmpty?: boolean) {\n if (isRangeEmpty) {\n return {\n title: 'No Trace Intelligence themes in this date range.',\n body: 'Choose a wider snapshot date range, or wait for newly processed traces to form recurring themes.',\n };\n }\n if (!progress || progress.status === 'collecting') {\n return {\n title: 'Collecting traces for Trace Intelligence.',\n body: 'Trace Intelligence starts grouping recurring patterns after your deployed agents send enough completed traces.',\n };\n }\n if (progress.status === 'ready') {\n return {\n title: 'Trace Intelligence themes are ready.',\n body: 'Select at least two available trace signal types to see how goals, outcomes, behaviors, and sentiment connect.',\n };\n }\n return {\n title: 'Analyzing traces for Trace Intelligence.',\n body: 'Trace signals have started processing. Themes appear after enough generated and embedded trace signals form recurring patterns.',\n };\n}\n\nfunction ProgressSummary({ progress }: { progress: TraceIntelligenceProgress }) {\n return (\n <dl className=\"mt-4 grid gap-2 sm:grid-cols-3\">\n <div className=\"border-border1 bg-surface3 rounded-md border px-3 py-2\">\n <dt className=\"text-neutral3 text-xs\">Traces analyzed</dt>\n <dd className=\"text-neutral6 mt-1 text-lg font-semibold\">{formatNumber(progress.traceCount)}</dd>\n </div>\n <div className=\"border-border1 bg-surface3 rounded-md border px-3 py-2\">\n <dt className=\"text-neutral3 text-xs\">Trace signal types ready</dt>\n <dd className=\"text-neutral6 mt-1 text-lg font-semibold\">{progress.availableSignals.length} of 4</dd>\n </div>\n <div className=\"border-border1 bg-surface3 rounded-md border px-3 py-2\">\n <dt className=\"text-neutral3 text-xs\">Status</dt>\n <dd className=\"text-neutral6 mt-1 text-lg font-semibold capitalize\">{progress.status}</dd>\n </div>\n </dl>\n );\n}\n\nfunction SignalProgressList({ progress }: { progress?: TraceIntelligenceProgress }) {\n if (!progress) return null;\n\n return (\n <ul aria-label=\"Trace signal processing progress\" className=\"mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-4\">\n {signalDefinitions.map(signal => {\n const value = progress.signals[signal.key];\n const isReady = progress.availableSignals.includes(signal.key);\n return (\n <li className=\"border-border1 bg-surface2 rounded-md border px-3 py-2\" key={signal.label}>\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"text-sm font-semibold\" style={signalStyle(signal.label)}>\n {signal.label}\n </span>\n <span className=\"text-neutral4 text-xs\">{isReady ? 'Themes ready' : 'Processing'}</span>\n </div>\n <p className=\"text-neutral3 mt-1 text-xs\">\n {formatNumber(value.generated)} generated · {formatNumber(value.embedded)} embedded\n </p>\n </li>\n );\n })}\n </ul>\n );\n}\n\nexport const SignalsEmptyState = ({\n actionSlot,\n LinkComponent = 'a',\n progress,\n isRangeEmpty,\n}: SignalsEmptyStateProps) => {\n const copy = statusCopy(progress, isRangeEmpty);\n\n return (\n <section className=\"bg-surface1 min-h-full w-full p-6 md:px-10 lg:px-12 xl:px-[4.375rem]\">\n <div className=\"mx-auto w-full max-w-260\">\n <header>\n <p className=\"text-neutral4 flex items-center gap-2 font-mono text-xs tracking-wider uppercase\">\n <span aria-hidden=\"true\" className=\"bg-accent1 size-2 rounded-full\" />\n Trace Intelligence\n </p>\n <h1 className=\"text-header-xl text-neutral6 mt-2 font-medium tracking-tight\">\n Understand what drives every agent interaction\n </h1>\n <p className=\"text-neutral3 mt-2 max-w-180 text-sm leading-5\">\n Trace Intelligence groups recurring goals, outcomes, behaviors, and sentiment across completed traces.\n </p>\n </header>\n\n <div\n role=\"list\"\n aria-label=\"Trace Intelligence analysis pipeline\"\n className=\"mt-14 grid gap-4 lg:grid-cols-[17.5rem_4.5rem_17.5rem_4.5rem_minmax(0,1fr)] lg:gap-0\"\n >\n <div role=\"listitem\" className=\"min-h-50 p-5\">\n <h2 className=\"text-neutral6 text-lg font-semibold\">Traces</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">Every agent interaction</p>\n <p className=\"text-neutral3 mt-5 font-mono text-[0.6875rem] tracking-[0.18em] uppercase\">Input</p>\n <div className=\"mt-2.5 space-y-2\">\n {traceRows.map(([name, duration]) => (\n <div\n className=\"border-border1 bg-surface3 text-ui-xs flex items-center justify-between rounded border px-3 py-1.5 font-mono\"\n key={name}\n >\n <span className=\"text-neutral4\">{name}</span>\n <span className=\"text-neutral3\">{duration}</span>\n </div>\n ))}\n </div>\n </div>\n\n <PipelineConnector />\n\n <Card\n as=\"div\"\n role=\"listitem\"\n className=\"flex min-h-50 flex-col items-center p-5 text-center\"\n elevation=\"elevated\"\n >\n <h2 className=\"text-neutral6 text-lg font-semibold\">Trace Intelligence</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">Finds recurring themes</p>\n <div aria-hidden=\"true\" className=\"relative mt-5 flex size-20 items-center justify-center\">\n <span className=\"signals-engine-pulse border-positive1/15 absolute size-20 rounded-full border\" />\n <span className=\"border-positive1/25 absolute size-14 rounded-full border\" />\n <span className=\"border-positive1/40 bg-positive1/5 absolute size-9 rounded-full border shadow-[0_0_24px_var(--color-positive1)]\" />\n <CpuIcon className=\"text-positive1 relative size-4\" />\n </div>\n <p className=\"text-ui-xs text-neutral3 mt-3 max-w-40 leading-4\">\n Clusters similar trace signals into themes for each dimension\n </p>\n </Card>\n\n <PipelineConnector />\n\n <div role=\"listitem\" className=\"min-h-50 p-5\">\n <h2 className=\"text-neutral6 text-lg font-semibold\">Theme analysis</h2>\n <p className=\"text-neutral3 mt-0.5 text-xs\">How recurring patterns connect</p>\n <p className=\"text-neutral3 mt-5 font-mono text-[0.6875rem] tracking-[0.18em] uppercase\">Output</p>\n <div className=\"mt-3 flex flex-wrap gap-2\">\n {signalLabels.map(label => (\n <span\n className=\"signals-chip bg-surface3 inline-flex items-center gap-2 rounded border border-current/25 px-2.5 py-1.5 text-xs font-medium shadow-[0_0_14px_color-mix(in_oklch,currentColor_12%,transparent)]\"\n key={label}\n style={signalStyle(label)}\n >\n <span aria-hidden=\"true\" className=\"size-1.5 rounded-full bg-current shadow-[0_0_7px_currentColor]\" />\n {label}\n </span>\n ))}\n </div>\n </div>\n </div>\n\n <section className=\"mt-10\" aria-labelledby=\"signal-definitions-heading\">\n <h2 id=\"signal-definitions-heading\" className=\"text-neutral6 text-lg font-semibold\">\n What each trace signal means\n </h2>\n <ul aria-label=\"Trace signal definitions\" className=\"mt-4 grid gap-3 sm:grid-cols-2\">\n {signalDefinitions.map(signal => (\n <li className=\"px-1 py-2\" key={signal.label}>\n <h3 className=\"text-sm font-semibold\" style={signalStyle(signal.label)}>\n {signal.label}\n </h3>\n <p className=\"text-neutral3 mt-1.5 text-xs leading-5\">{signal.description}</p>\n </li>\n ))}\n </ul>\n </section>\n\n <aside className=\"border-border1 bg-surface2 mt-9 rounded-md border px-5 py-4\">\n <div className=\"flex min-w-0 items-start gap-3\">\n <span\n aria-hidden=\"true\"\n className=\"bg-warning1 mt-1.5 size-2 shrink-0 rounded-full shadow-[0_0_9px_currentColor]\"\n />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-neutral3 text-xs leading-5\">\n <strong className=\"text-neutral5 font-semibold\">{copy.title}</strong> {copy.body}\n </p>\n {progress ? <ProgressSummary progress={progress} /> : null}\n <SignalProgressList progress={progress} />\n </div>\n </div>\n <div className=\"mt-4 flex shrink-0 flex-wrap items-center gap-2 sm:justify-end\">\n {actionSlot}\n <Button\n as=\"a\"\n href=\"https://mastra.ai/en/docs/mastra-platform/trace-intelligence\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n variant=\"outline\"\n size=\"sm\"\n >\n Read the docs<span className=\"sr-only\"> (opens in new tab)</span>\n </Button>\n <Button as={LinkComponent} href=\"/observability\" variant=\"primary\" size=\"sm\">\n View incoming traces\n </Button>\n </div>\n </aside>\n </div>\n </section>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAiBA,MAAM,iBAAA,GAAwC;AAAA,EAC5C,EAAE,GAAA,EAAK,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAQ,aAAa,qCAAA,EAAsC;AAAA,EACjF,EAAE,GAAA,EAAK,SAAA,EAAW,KAAA,EAAO,SAAA,EAAW,aAAa,gEAAA,EAAiE;AAAA,EAClH;AAAA,IACE,GAAA,EAAK,UAAA;AAAA,IACL,KAAA,EAAO,UAAA;AAAA,IACP,WAAA,EACE;AAAA,GACJ;AAAA,EACA,EAAE,GAAA,EAAK,WAAA,EAAa,KAAA,EAAO,WAAA,EAAa,aAAa,yCAAA;AACvD,CAAA;AACA,MAAM,YAAA,GAAe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AK;AAAA,WAAA,EAC9E,CAAA;AAAA,UACC,QAAA,mBAAW,GAAA,CAAC,eAAA,EAAA,EAAgB,QAAA,EAAoB,CAAA,GAAK,IAAA;AAAA,0BACtD,GAAA,CAAC,sBAAmB,QAAA,EAAoB;AAAA,SAAA,EAC1C;AAAA,OAAA,EACF,CAAA;AAAA,sBACA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,gEAAA,EACZ,QAAA,EAAA;AAAA,QAAA,UAAA;AAAA,wBACD,IAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,EAAA,EAAG,GAAA;AAAA,YACH,IAAA,EAAK,8DAAA;AAAA,YACL,MAAA,EAAO,QAAA;AAAA,YACP,GAAA,EAAI,qBAAA;AAAA,YACJ,OAAA,EAAQ,SAAA;AAAA,YACR,IAAA,EAAK,IAAA;AAAA,YACN,QAAA,EAAA;AAAA,cAAA,eAAA;AAAA,8BACc,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,SAAA,EAAU,QAAA,EAAA,qBAAA,EAAmB;AAAA;AAAA;AAAA,SAC5D;AAAA,wBACA,GAAA,CAAC,MAAA,EAAA,EAAO,EAAA,EAAI,aAAA,EAAe,IAAA,EAAK,kBAAiB,OAAA,EAAQ,SAAA,EAAU,IAAA,EAAK,IAAA,EAAK,QAAA,EAAA,sBAAA,EAE7E;AAAA,OAAA,EACF;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -68,7 +68,7 @@ const HoverCardContent = React__namespace.forwardRef(
|
|
|
68
68
|
{
|
|
69
69
|
ref,
|
|
70
70
|
className: utils_cn.cn(
|
|
71
|
-
"max-w-100 w-auto origin-[var(--transform-origin)] rounded-
|
|
71
|
+
"max-w-100 w-auto origin-[var(--transform-origin)] rounded-xl border border-border1 bg-surface3 px-3 py-2.5 text-ui-sm text-neutral5 shadow-dialog",
|
|
72
72
|
"data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95 data-[open]:animate-in data-[open]:fade-in-0 data-[open]:zoom-in-95",
|
|
73
73
|
"data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
|
74
74
|
className
|
|
@@ -76,7 +76,7 @@ const HoverCardContent = React__namespace.forwardRef(
|
|
|
76
76
|
...props,
|
|
77
77
|
children: [
|
|
78
78
|
children,
|
|
79
|
-
showArrow && /* @__PURE__ */ jsxRuntime.jsx(previewCard.PreviewCard.Arrow, { className: "fill-
|
|
79
|
+
showArrow && /* @__PURE__ */ jsxRuntime.jsx(previewCard.PreviewCard.Arrow, { className: "fill-surface3" })
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
82
|
) }) });
|
|
@@ -87,4 +87,4 @@ HoverCardContent.displayName = "HoverCardContent";
|
|
|
87
87
|
exports.HoverCard = HoverCard;
|
|
88
88
|
exports.HoverCardContent = HoverCardContent;
|
|
89
89
|
exports.HoverCardTrigger = HoverCardTrigger;
|
|
90
|
-
//# sourceMappingURL=hover-card-
|
|
90
|
+
//# sourceMappingURL=hover-card-Bx258om1.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card-
|
|
1
|
+
{"version":3,"file":"hover-card-Bx258om1.cjs","sources":["../src/ds/components/HoverCard/hover-card.tsx"],"sourcesContent":["import { PreviewCard as PreviewCardPrimitive } from '@base-ui/react/preview-card';\nimport type { PreviewCardPopupProps, PreviewCardPositionerProps } from '@base-ui/react/preview-card';\nimport * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n/**\n * HoverCard — a floating card that reveals extra content when its trigger is\n * hovered or focused. Built on Base UI's `PreviewCard`\n * (`@base-ui/react/preview-card`); the `HoverCard` name matches the Radix\n * component this replaced and the common term for the pattern.\n *\n * Compose it as `HoverCard` > (`HoverCardTrigger` + `HoverCardContent`).\n */\nconst HoverCard = PreviewCardPrimitive.Root;\n\nexport type HoverCardTriggerProps = Omit<PreviewCardPrimitive.Trigger.Props, 'className'> & {\n className?: string;\n};\n\n/**\n * The element that opens the card on hover/focus. Renders an `<a>` by default;\n * pass `render` to project the behavior onto an existing element.\n *\n * `delay` defaults to 250ms to preserve the previous Radix `openDelay`\n * behavior — Base UI's own default is 600ms.\n */\nconst HoverCardTrigger = React.forwardRef<HTMLAnchorElement, HoverCardTriggerProps>(\n ({ className, delay = 250, ...props }, ref) => (\n <PreviewCardPrimitive.Trigger ref={ref} delay={delay} className={className} {...props} />\n ),\n);\nHoverCardTrigger.displayName = 'HoverCardTrigger';\n\ntype HoverCardContentPositionerProps = Omit<PreviewCardPositionerProps, keyof PreviewCardPopupProps>;\n\nexport type HoverCardContentProps = Omit<PreviewCardPopupProps, 'className'> &\n HoverCardContentPositionerProps & {\n className?: string;\n /** Optional portal container, forwarded to `PreviewCard.Portal`. */\n container?: HTMLElement | null;\n /** Whether to render the small arrow pointing at the trigger. */\n showArrow?: boolean;\n };\n\n/**\n * The floating card body. Wraps Base UI's `Portal` / `Positioner` / `Popup`\n * (and an optional `Arrow`) so consumers only deal with a single element.\n */\nconst HoverCardContent = React.forwardRef<HTMLDivElement, HoverCardContentProps>(\n (\n {\n className,\n children,\n side = 'top',\n align,\n sideOffset = 5,\n container,\n showArrow = true,\n anchor,\n positionMethod,\n alignOffset,\n collisionBoundary,\n collisionPadding,\n sticky,\n arrowPadding,\n disableAnchorTracking,\n collisionAvoidance,\n ...props\n },\n ref,\n ) => {\n const positionerProps: HoverCardContentPositionerProps = {\n side,\n align,\n sideOffset,\n anchor,\n positionMethod,\n alignOffset,\n collisionBoundary,\n collisionPadding,\n sticky,\n arrowPadding,\n disableAnchorTracking,\n collisionAvoidance,\n };\n\n return (\n <PreviewCardPrimitive.Portal container={container ?? undefined}>\n <PreviewCardPrimitive.Positioner className=\"z-50\" {...positionerProps}>\n <PreviewCardPrimitive.Popup\n ref={ref}\n className={cn(\n 'max-w-100 w-auto origin-[var(--transform-origin)] rounded-xl border border-border1 bg-surface3 px-3 py-2.5 text-ui-sm text-neutral5 shadow-dialog',\n 'data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95 data-[open]:animate-in data-[open]:fade-in-0 data-[open]:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1',\n className,\n )}\n {...props}\n >\n {children}\n {showArrow && <PreviewCardPrimitive.Arrow className=\"fill-surface3\" />}\n </PreviewCardPrimitive.Popup>\n </PreviewCardPrimitive.Positioner>\n </PreviewCardPrimitive.Portal>\n );\n },\n);\nHoverCardContent.displayName = 'HoverCardContent';\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"],"names":["PreviewCardPrimitive","React","jsx","jsxs","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAM,YAAYA,uBAAA,CAAqB;AAavC,MAAM,mBAAmBC,gBAAA,CAAM,UAAA;AAAA,EAC7B,CAAC,EAAE,SAAA,EAAW,KAAA,GAAQ,GAAA,EAAK,GAAG,KAAA,EAAM,EAAG,GAAA,qBACrCC,cAAA,CAACF,wBAAqB,OAAA,EAArB,EAA6B,KAAU,KAAA,EAAc,SAAA,EAAuB,GAAG,KAAA,EAAO;AAE3F;AACA,gBAAA,CAAiB,WAAA,GAAc,kBAAA;AAiB/B,MAAM,mBAAmBC,gBAAA,CAAM,UAAA;AAAA,EAC7B,CACE;AAAA,IACE,SAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAA,GAAO,KAAA;AAAA,IACP,KAAA;AAAA,IACA,UAAA,GAAa,CAAA;AAAA,IACb,SAAA;AAAA,IACA,SAAA,GAAY,IAAA;AAAA,IACZ,MAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,iBAAA;AAAA,IACA,gBAAA;AAAA,IACA,MAAA;AAAA,IACA,YAAA;AAAA,IACA,qBAAA;AAAA,IACA,kBAAA;AAAA,IACA,GAAG;AAAA,KAEL,GAAA,KACG;AACH,IAAA,MAAM,eAAA,GAAmD;AAAA,MACvD,IAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,iBAAA;AAAA,MACA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,YAAA;AAAA,MACA,qBAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,uBACEC,cAAA,CAACF,uBAAA,CAAqB,MAAA,EAArB,EAA4B,WAAW,SAAA,IAAa,MAAA,EACnD,QAAA,kBAAAE,cAAA,CAACF,uBAAA,CAAqB,UAAA,EAArB,EAAgC,SAAA,EAAU,MAAA,EAAQ,GAAG,eAAA,EACpD,QAAA,kBAAAG,eAAA;AAAA,MAACH,uBAAA,CAAqB,KAAA;AAAA,MAArB;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAWI,WAAA;AAAA,UACT,mJAAA;AAAA,UACA,kJAAA;AAAA,UACA,6JAAA;AAAA,UACA;AAAA,SACF;AAAA,QACC,GAAG,KAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAA,QAAA;AAAA,UACA,6BAAaF,cAAA,CAACF,uBAAA,CAAqB,KAAA,EAArB,EAA2B,WAAU,eAAA,EAAgB;AAAA;AAAA;AAAA,OAExE,CAAA,EACF,CAAA;AAAA,EAEJ;AACF;AACA,gBAAA,CAAiB,WAAA,GAAc,kBAAA;;;;;;"}
|
|
@@ -47,7 +47,7 @@ const HoverCardContent = React.forwardRef(
|
|
|
47
47
|
{
|
|
48
48
|
ref,
|
|
49
49
|
className: cn(
|
|
50
|
-
"max-w-100 w-auto origin-[var(--transform-origin)] rounded-
|
|
50
|
+
"max-w-100 w-auto origin-[var(--transform-origin)] rounded-xl border border-border1 bg-surface3 px-3 py-2.5 text-ui-sm text-neutral5 shadow-dialog",
|
|
51
51
|
"data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95 data-[open]:animate-in data-[open]:fade-in-0 data-[open]:zoom-in-95",
|
|
52
52
|
"data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
|
53
53
|
className
|
|
@@ -55,7 +55,7 @@ const HoverCardContent = React.forwardRef(
|
|
|
55
55
|
...props,
|
|
56
56
|
children: [
|
|
57
57
|
children,
|
|
58
|
-
showArrow && /* @__PURE__ */ jsx(PreviewCard.Arrow, { className: "fill-
|
|
58
|
+
showArrow && /* @__PURE__ */ jsx(PreviewCard.Arrow, { className: "fill-surface3" })
|
|
59
59
|
]
|
|
60
60
|
}
|
|
61
61
|
) }) });
|
|
@@ -64,4 +64,4 @@ const HoverCardContent = React.forwardRef(
|
|
|
64
64
|
HoverCardContent.displayName = "HoverCardContent";
|
|
65
65
|
|
|
66
66
|
export { HoverCard as H, HoverCardContent as a, HoverCardTrigger as b };
|
|
67
|
-
//# sourceMappingURL=hover-card-
|
|
67
|
+
//# sourceMappingURL=hover-card-crVofiZO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card-
|
|
1
|
+
{"version":3,"file":"hover-card-crVofiZO.js","sources":["../src/ds/components/HoverCard/hover-card.tsx"],"sourcesContent":["import { PreviewCard as PreviewCardPrimitive } from '@base-ui/react/preview-card';\nimport type { PreviewCardPopupProps, PreviewCardPositionerProps } from '@base-ui/react/preview-card';\nimport * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n/**\n * HoverCard — a floating card that reveals extra content when its trigger is\n * hovered or focused. Built on Base UI's `PreviewCard`\n * (`@base-ui/react/preview-card`); the `HoverCard` name matches the Radix\n * component this replaced and the common term for the pattern.\n *\n * Compose it as `HoverCard` > (`HoverCardTrigger` + `HoverCardContent`).\n */\nconst HoverCard = PreviewCardPrimitive.Root;\n\nexport type HoverCardTriggerProps = Omit<PreviewCardPrimitive.Trigger.Props, 'className'> & {\n className?: string;\n};\n\n/**\n * The element that opens the card on hover/focus. Renders an `<a>` by default;\n * pass `render` to project the behavior onto an existing element.\n *\n * `delay` defaults to 250ms to preserve the previous Radix `openDelay`\n * behavior — Base UI's own default is 600ms.\n */\nconst HoverCardTrigger = React.forwardRef<HTMLAnchorElement, HoverCardTriggerProps>(\n ({ className, delay = 250, ...props }, ref) => (\n <PreviewCardPrimitive.Trigger ref={ref} delay={delay} className={className} {...props} />\n ),\n);\nHoverCardTrigger.displayName = 'HoverCardTrigger';\n\ntype HoverCardContentPositionerProps = Omit<PreviewCardPositionerProps, keyof PreviewCardPopupProps>;\n\nexport type HoverCardContentProps = Omit<PreviewCardPopupProps, 'className'> &\n HoverCardContentPositionerProps & {\n className?: string;\n /** Optional portal container, forwarded to `PreviewCard.Portal`. */\n container?: HTMLElement | null;\n /** Whether to render the small arrow pointing at the trigger. */\n showArrow?: boolean;\n };\n\n/**\n * The floating card body. Wraps Base UI's `Portal` / `Positioner` / `Popup`\n * (and an optional `Arrow`) so consumers only deal with a single element.\n */\nconst HoverCardContent = React.forwardRef<HTMLDivElement, HoverCardContentProps>(\n (\n {\n className,\n children,\n side = 'top',\n align,\n sideOffset = 5,\n container,\n showArrow = true,\n anchor,\n positionMethod,\n alignOffset,\n collisionBoundary,\n collisionPadding,\n sticky,\n arrowPadding,\n disableAnchorTracking,\n collisionAvoidance,\n ...props\n },\n ref,\n ) => {\n const positionerProps: HoverCardContentPositionerProps = {\n side,\n align,\n sideOffset,\n anchor,\n positionMethod,\n alignOffset,\n collisionBoundary,\n collisionPadding,\n sticky,\n arrowPadding,\n disableAnchorTracking,\n collisionAvoidance,\n };\n\n return (\n <PreviewCardPrimitive.Portal container={container ?? undefined}>\n <PreviewCardPrimitive.Positioner className=\"z-50\" {...positionerProps}>\n <PreviewCardPrimitive.Popup\n ref={ref}\n className={cn(\n 'max-w-100 w-auto origin-[var(--transform-origin)] rounded-xl border border-border1 bg-surface3 px-3 py-2.5 text-ui-sm text-neutral5 shadow-dialog',\n 'data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95 data-[open]:animate-in data-[open]:fade-in-0 data-[open]:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1',\n className,\n )}\n {...props}\n >\n {children}\n {showArrow && <PreviewCardPrimitive.Arrow className=\"fill-surface3\" />}\n </PreviewCardPrimitive.Popup>\n </PreviewCardPrimitive.Positioner>\n </PreviewCardPrimitive.Portal>\n );\n },\n);\nHoverCardContent.displayName = 'HoverCardContent';\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"],"names":["PreviewCardPrimitive"],"mappings":";;;;;AAcA,MAAM,YAAYA,WAAA,CAAqB;AAavC,MAAM,mBAAmB,KAAA,CAAM,UAAA;AAAA,EAC7B,CAAC,EAAE,SAAA,EAAW,KAAA,GAAQ,GAAA,EAAK,GAAG,KAAA,EAAM,EAAG,GAAA,qBACrC,GAAA,CAACA,YAAqB,OAAA,EAArB,EAA6B,KAAU,KAAA,EAAc,SAAA,EAAuB,GAAG,KAAA,EAAO;AAE3F;AACA,gBAAA,CAAiB,WAAA,GAAc,kBAAA;AAiB/B,MAAM,mBAAmB,KAAA,CAAM,UAAA;AAAA,EAC7B,CACE;AAAA,IACE,SAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAA,GAAO,KAAA;AAAA,IACP,KAAA;AAAA,IACA,UAAA,GAAa,CAAA;AAAA,IACb,SAAA;AAAA,IACA,SAAA,GAAY,IAAA;AAAA,IACZ,MAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,iBAAA;AAAA,IACA,gBAAA;AAAA,IACA,MAAA;AAAA,IACA,YAAA;AAAA,IACA,qBAAA;AAAA,IACA,kBAAA;AAAA,IACA,GAAG;AAAA,KAEL,GAAA,KACG;AACH,IAAA,MAAM,eAAA,GAAmD;AAAA,MACvD,IAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,iBAAA;AAAA,MACA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,YAAA;AAAA,MACA,qBAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,uBACE,GAAA,CAACA,WAAA,CAAqB,MAAA,EAArB,EAA4B,WAAW,SAAA,IAAa,MAAA,EACnD,QAAA,kBAAA,GAAA,CAACA,WAAA,CAAqB,UAAA,EAArB,EAAgC,SAAA,EAAU,MAAA,EAAQ,GAAG,eAAA,EACpD,QAAA,kBAAA,IAAA;AAAA,MAACA,WAAA,CAAqB,KAAA;AAAA,MAArB;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACT,mJAAA;AAAA,UACA,kJAAA;AAAA,UACA,6JAAA;AAAA,UACA;AAAA,SACF;AAAA,QACC,GAAG,KAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAA,QAAA;AAAA,UACA,6BAAa,GAAA,CAACA,WAAA,CAAqB,KAAA,EAArB,EAA2B,WAAU,eAAA,EAAgB;AAAA;AAAA;AAAA,OAExE,CAAA,EACF,CAAA;AAAA,EAEJ;AACF;AACA,gBAAA,CAAiB,WAAA,GAAc,kBAAA;;;;"}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import { TraceSignalName } from '@mastra/client-js';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
import { LinkComponent } from '../../../ds/types/link-component';
|
|
4
|
+
export type TraceIntelligenceProgress = {
|
|
5
|
+
status: 'collecting' | 'processing' | 'ready';
|
|
6
|
+
traceCount: number;
|
|
7
|
+
signals: Record<TraceSignalName, {
|
|
8
|
+
generated: number;
|
|
9
|
+
embedded: number;
|
|
10
|
+
}>;
|
|
11
|
+
availableSignals: TraceSignalName[];
|
|
12
|
+
};
|
|
3
13
|
export type SignalsEmptyStateProps = {
|
|
4
14
|
actionSlot?: ReactNode;
|
|
5
15
|
LinkComponent?: LinkComponent;
|
|
16
|
+
progress?: TraceIntelligenceProgress;
|
|
17
|
+
isRangeEmpty?: boolean;
|
|
6
18
|
};
|
|
7
|
-
export declare const SignalsEmptyState: ({ actionSlot, LinkComponent }: SignalsEmptyStateProps) => import("react").JSX.Element;
|
|
19
|
+
export declare const SignalsEmptyState: ({ actionSlot, LinkComponent, progress, isRangeEmpty, }: SignalsEmptyStateProps) => import("react").JSX.Element;
|
package/dist/style.css
CHANGED
|
@@ -1741,10 +1741,6 @@
|
|
|
1741
1741
|
min-height: var(--spacing-14);
|
|
1742
1742
|
}
|
|
1743
1743
|
|
|
1744
|
-
.min-h-16 {
|
|
1745
|
-
min-height: var(--spacing-16);
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
1744
|
.min-h-20 {
|
|
1749
1745
|
min-height: var(--spacing-20);
|
|
1750
1746
|
}
|
|
@@ -1805,10 +1801,6 @@
|
|
|
1805
1801
|
width: var(--spacing-2_5);
|
|
1806
1802
|
}
|
|
1807
1803
|
|
|
1808
|
-
.w-2\/3 {
|
|
1809
|
-
width: 66.6667%;
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
1804
|
.w-3 {
|
|
1813
1805
|
width: var(--spacing-3);
|
|
1814
1806
|
}
|
|
@@ -3646,26 +3638,10 @@
|
|
|
3646
3638
|
}
|
|
3647
3639
|
}
|
|
3648
3640
|
|
|
3649
|
-
.bg-neutral1
|
|
3641
|
+
.bg-neutral1 {
|
|
3650
3642
|
background-color: var(--color-neutral1);
|
|
3651
3643
|
}
|
|
3652
3644
|
|
|
3653
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3654
|
-
.bg-neutral1\/40 {
|
|
3655
|
-
background-color: color-mix(in oklab, var(--color-neutral1) 40%, transparent);
|
|
3656
|
-
}
|
|
3657
|
-
}
|
|
3658
|
-
|
|
3659
|
-
.bg-neutral1\/60 {
|
|
3660
|
-
background-color: var(--color-neutral1);
|
|
3661
|
-
}
|
|
3662
|
-
|
|
3663
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3664
|
-
.bg-neutral1\/60 {
|
|
3665
|
-
background-color: color-mix(in oklab, var(--color-neutral1) 60%, transparent);
|
|
3666
|
-
}
|
|
3667
|
-
}
|
|
3668
|
-
|
|
3669
3645
|
.bg-neutral2 {
|
|
3670
3646
|
background-color: var(--color-neutral2);
|
|
3671
3647
|
}
|
|
@@ -3964,17 +3940,7 @@
|
|
|
3964
3940
|
}
|
|
3965
3941
|
}
|
|
3966
3942
|
|
|
3967
|
-
.bg-surface2, .bg-surface2\/
|
|
3968
|
-
background-color: var(--color-surface2);
|
|
3969
|
-
}
|
|
3970
|
-
|
|
3971
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3972
|
-
.bg-surface2\/30 {
|
|
3973
|
-
background-color: color-mix(in oklab, var(--color-surface2) 30%, transparent);
|
|
3974
|
-
}
|
|
3975
|
-
}
|
|
3976
|
-
|
|
3977
|
-
.bg-surface2\/60 {
|
|
3943
|
+
.bg-surface2, .bg-surface2\/60 {
|
|
3978
3944
|
background-color: var(--color-surface2);
|
|
3979
3945
|
}
|
|
3980
3946
|
|
|
@@ -4155,10 +4121,6 @@
|
|
|
4155
4121
|
fill: var(--color-surface3);
|
|
4156
4122
|
}
|
|
4157
4123
|
|
|
4158
|
-
.fill-surface5 {
|
|
4159
|
-
fill: var(--color-surface5);
|
|
4160
|
-
}
|
|
4161
|
-
|
|
4162
4124
|
.stroke-border1 {
|
|
4163
4125
|
stroke: var(--color-border1);
|
|
4164
4126
|
}
|
|
@@ -4646,8 +4608,8 @@
|
|
|
4646
4608
|
font-size: .65rem;
|
|
4647
4609
|
}
|
|
4648
4610
|
|
|
4649
|
-
.text-\[0\.
|
|
4650
|
-
font-size: .
|
|
4611
|
+
.text-\[0\.6875rem\] {
|
|
4612
|
+
font-size: .6875rem;
|
|
4651
4613
|
}
|
|
4652
4614
|
|
|
4653
4615
|
.text-\[10\.5px\] {
|
|
@@ -4820,14 +4782,9 @@
|
|
|
4820
4782
|
font-weight: var(--font-weight-semibold);
|
|
4821
4783
|
}
|
|
4822
4784
|
|
|
4823
|
-
.tracking-\[0\.
|
|
4824
|
-
--tw-tracking: .
|
|
4825
|
-
letter-spacing: .
|
|
4826
|
-
}
|
|
4827
|
-
|
|
4828
|
-
.tracking-\[0\.24em\] {
|
|
4829
|
-
--tw-tracking: .24em;
|
|
4830
|
-
letter-spacing: .24em;
|
|
4785
|
+
.tracking-\[0\.18em\] {
|
|
4786
|
+
--tw-tracking: .18em;
|
|
4787
|
+
letter-spacing: .18em;
|
|
4831
4788
|
}
|
|
4832
4789
|
|
|
4833
4790
|
.tracking-normal {
|
|
@@ -5148,10 +5105,6 @@
|
|
|
5148
5105
|
opacity: .3;
|
|
5149
5106
|
}
|
|
5150
5107
|
|
|
5151
|
-
.opacity-35 {
|
|
5152
|
-
opacity: .35;
|
|
5153
|
-
}
|
|
5154
|
-
|
|
5155
5108
|
.opacity-40 {
|
|
5156
5109
|
opacity: .4;
|
|
5157
5110
|
}
|
|
@@ -7999,10 +7952,6 @@
|
|
|
7999
7952
|
top: var(--spacing-8);
|
|
8000
7953
|
}
|
|
8001
7954
|
|
|
8002
|
-
.sm\:mt-0 {
|
|
8003
|
-
margin-top: var(--spacing-0);
|
|
8004
|
-
}
|
|
8005
|
-
|
|
8006
7955
|
.sm\:flex {
|
|
8007
7956
|
display: flex;
|
|
8008
7957
|
}
|
|
@@ -8063,6 +8012,10 @@
|
|
|
8063
8012
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
8064
8013
|
}
|
|
8065
8014
|
|
|
8015
|
+
.sm\:grid-cols-3 {
|
|
8016
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
8017
|
+
}
|
|
8018
|
+
|
|
8066
8019
|
.sm\:flex-row {
|
|
8067
8020
|
flex-direction: row;
|
|
8068
8021
|
}
|
|
@@ -8153,6 +8106,10 @@
|
|
|
8153
8106
|
min-width: var(--container-sm);
|
|
8154
8107
|
}
|
|
8155
8108
|
|
|
8109
|
+
.lg\:grid-cols-4 {
|
|
8110
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
8111
|
+
}
|
|
8112
|
+
|
|
8156
8113
|
.lg\:grid-cols-\[1\.4fr_0\.8fr\] {
|
|
8157
8114
|
grid-template-columns: 1.4fr .8fr;
|
|
8158
8115
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "45.0.0-alpha.2",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css"
|
|
@@ -150,8 +150,8 @@
|
|
|
150
150
|
"react": ">=19.0.0",
|
|
151
151
|
"react-dom": ">=19.0.0",
|
|
152
152
|
"tailwindcss": "^4.0.0",
|
|
153
|
-
"@mastra/client-js": "^1.
|
|
154
|
-
"@mastra/react": "1.3.
|
|
153
|
+
"@mastra/client-js": "^1.36.0-alpha.2",
|
|
154
|
+
"@mastra/react": "1.3.4-alpha.2"
|
|
155
155
|
},
|
|
156
156
|
"devDependencies": {
|
|
157
157
|
"@storybook/addon-a11y": "^10.4.1",
|
|
@@ -189,11 +189,11 @@
|
|
|
189
189
|
"vite-plugin-dts": "^4.5.4",
|
|
190
190
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
191
191
|
"vitest": "4.1.10",
|
|
192
|
-
"@
|
|
193
|
-
"@mastra/
|
|
194
|
-
"@mastra/core": "1.
|
|
195
|
-
"@mastra/react": "1.3.
|
|
196
|
-
"@
|
|
192
|
+
"@internal/lint": "0.0.118",
|
|
193
|
+
"@mastra/client-js": "^1.36.0-alpha.2",
|
|
194
|
+
"@mastra/core": "1.55.0-alpha.2",
|
|
195
|
+
"@mastra/react": "1.3.4-alpha.2",
|
|
196
|
+
"@mastra/memory": "1.24.0"
|
|
197
197
|
},
|
|
198
198
|
"homepage": "https://mastra.ai",
|
|
199
199
|
"repository": {
|